From d2960c732aead1aac955096ec7189be254a6d891 Mon Sep 17 00:00:00 2001 From: Adam Petcher Date: Tue, 28 Feb 2017 02:31:59 +0000 Subject: [PATCH 001/447] 8006259: Add Test Vectors for NIST 800-38A to the JCE Unit Tests Added AES Cipher test vectors from Appendix F of NIST 800-38A Reviewed-by: valeriep --- .../ExampleVectors/CheckExampleVectors.java | 248 +++++++++++ .../ExampleVectors/NIST_800_38A_vectors.txt | 418 ++++++++++++++++++ 2 files changed, 666 insertions(+) create mode 100644 jdk/test/javax/crypto/Cipher/ExampleVectors/CheckExampleVectors.java create mode 100644 jdk/test/javax/crypto/Cipher/ExampleVectors/NIST_800_38A_vectors.txt diff --git a/jdk/test/javax/crypto/Cipher/ExampleVectors/CheckExampleVectors.java b/jdk/test/javax/crypto/Cipher/ExampleVectors/CheckExampleVectors.java new file mode 100644 index 00000000000..08cddef6bb8 --- /dev/null +++ b/jdk/test/javax/crypto/Cipher/ExampleVectors/CheckExampleVectors.java @@ -0,0 +1,248 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8006259 + * @summary Test several modes of operation using vectors from SP 800-38A + * @modules java.xml.bind + * @run main CheckExampleVectors + */ + +import java.io.*; +import java.security.*; +import java.util.*; +import java.util.function.*; +import javax.xml.bind.DatatypeConverter; +import javax.crypto.*; +import javax.crypto.spec.*; + +public class CheckExampleVectors { + + private enum Mode { + ECB, + CBC, + CFB1, + CFB8, + CFB128, + OFB, + CTR + } + + private enum Operation { + Encrypt, + Decrypt + } + + private static class Block { + private byte[] input; + private byte[] output; + + public Block() { + + } + public Block(String settings) { + String[] settingsParts = settings.split(","); + input = stringToBytes(settingsParts[0]); + output = stringToBytes(settingsParts[1]); + } + public byte[] getInput() { + return input; + } + public byte[] getOutput() { + return output; + } + } + + private static class TestVector { + private Mode mode; + private Operation operation; + private byte[] key; + private byte[] iv; + private List blocks = new ArrayList(); + + public TestVector(String settings) { + String[] settingsParts = settings.split(","); + mode = Mode.valueOf(settingsParts[0]); + operation = Operation.valueOf(settingsParts[1]); + key = stringToBytes(settingsParts[2]); + if (settingsParts.length > 3) { + iv = stringToBytes(settingsParts[3]); + } + } + + public Mode getMode() { + return mode; + } + public Operation getOperation() { + return operation; + } + public byte[] getKey() { + return key; + } + public byte[] getIv() { + return iv; + } + public void addBlock (Block b) { + blocks.add(b); + } + public Iterable getBlocks() { + return blocks; + } + } + + private static final String VECTOR_FILE_NAME = "NIST_800_38A_vectors.txt"; + private static final Mode[] REQUIRED_MODES = {Mode.ECB, Mode.CBC, Mode.CTR}; + private static Set supportedModes = new HashSet(); + + public static void main(String[] args) throws Exception { + checkAllProviders(); + checkSupportedModes(); + } + + private static byte[] stringToBytes(String v) { + if (v.equals("")) { + return null; + } + return DatatypeConverter.parseBase64Binary(v); + } + + private static String toModeString(Mode mode) { + return mode.toString(); + } + + private static int toCipherOperation(Operation op) { + switch (op) { + case Encrypt: + return Cipher.ENCRYPT_MODE; + case Decrypt: + return Cipher.DECRYPT_MODE; + } + + throw new RuntimeException("Unknown operation: " + op); + } + + private static void log(String str) { + System.out.println(str); + } + + private static void checkVector(String providerName, TestVector test) { + + String modeString = toModeString(test.getMode()); + String cipherString = "AES" + "/" + modeString + "/" + "NoPadding"; + log("checking: " + cipherString + " on " + providerName); + try { + Cipher cipher = Cipher.getInstance(cipherString, providerName); + SecretKeySpec key = new SecretKeySpec(test.getKey(), "AES"); + if (test.getIv() != null) { + IvParameterSpec iv = new IvParameterSpec(test.getIv()); + cipher.init(toCipherOperation(test.getOperation()), key, iv); + } + else { + cipher.init(toCipherOperation(test.getOperation()), key); + } + int blockIndex = 0; + for (Block curBlock : test.getBlocks()) { + byte[] blockOutput = cipher.update(curBlock.getInput()); + byte[] expectedBlockOutput = curBlock.getOutput(); + if (!Arrays.equals(blockOutput, expectedBlockOutput)) { + throw new RuntimeException("Blocks do not match at index " + + blockIndex); + } + blockIndex++; + } + log("success"); + supportedModes.add(test.getMode()); + } catch (NoSuchAlgorithmException ex) { + log("algorithm not supported"); + } catch (NoSuchProviderException | NoSuchPaddingException + | InvalidKeyException | InvalidAlgorithmParameterException ex) { + throw new RuntimeException(ex); + } + } + + private static boolean isComment(String line) { + return (line != null) && line.startsWith("//"); + } + + private static TestVector readVector(BufferedReader in) throws IOException { + String line; + while (isComment(line = in.readLine())) { + // skip comment lines + } + if (line == null || line.isEmpty()) { + return null; + } + + TestVector newVector = new TestVector(line); + String numBlocksStr = in.readLine(); + int numBlocks = Integer.parseInt(numBlocksStr); + for (int i = 0; i < numBlocks; i++) { + Block newBlock = new Block(in.readLine()); + newVector.addBlock(newBlock); + } + + return newVector; + } + + private static void checkAllProviders() throws IOException { + File dataFile = new File(System.getProperty("test.src", "."), + VECTOR_FILE_NAME); + BufferedReader in = new BufferedReader(new FileReader(dataFile)); + List allTests = new ArrayList<>(); + TestVector newTest; + while ((newTest = readVector(in)) != null) { + allTests.add(newTest); + } + + for (Provider provider : Security.getProviders()) { + checkProvider(provider.getName(), allTests); + } + } + + private static void checkProvider(String providerName, + List allVectors) + throws IOException { + + for (TestVector curVector : allVectors) { + checkVector(providerName, curVector); + } + } + + /* + * This method helps ensure that the test is working properly by + * verifying that the test was able to check the test vectors for + * some of the modes of operation. + */ + private static void checkSupportedModes() { + for (Mode curMode : REQUIRED_MODES) { + if (!supportedModes.contains(curMode)) { + throw new RuntimeException( + "Mode not supported by any provider: " + curMode); + } + } + + } + +} + diff --git a/jdk/test/javax/crypto/Cipher/ExampleVectors/NIST_800_38A_vectors.txt b/jdk/test/javax/crypto/Cipher/ExampleVectors/NIST_800_38A_vectors.txt new file mode 100644 index 00000000000..aca903e487f --- /dev/null +++ b/jdk/test/javax/crypto/Cipher/ExampleVectors/NIST_800_38A_vectors.txt @@ -0,0 +1,418 @@ +// Example vectors from NIST Special Publication 800-38A +// Recommentation for Block Cipher Modes of Operation +// +// format for each vector entry is as follows: +// mode,encrypt/decrypt,key,initialization vector +// number of blocks +// (for each block) input,output +// All key, IV, input, and output values are encoded in Base64 +// +ECB,Encrypt,K34VFiiu0qar9xWICc9PPA==, +4 +a8G+4i5An5bpPX4Rc5MXKg==,Otd7tA16NmConsrzJGbvlw== +ri2KVx4DrJyet2+sRa+OUQ==,9dPVhQO5aZ3nhYlalv26rw== +MMgcRqNc5BHl+8EZGgpS7w==,Q7HNf1mOziOIGwDj7QMGiA== +9p8kRd9PmxetK0F75mw3EA==,ewx4XiforT+CIyBxBHJd1A== +ECB,Decrypt,K34VFiiu0qar9xWICc9PPA==, +4 +Otd7tA16NmConsrzJGbvlw==,a8G+4i5An5bpPX4Rc5MXKg== +9dPVhQO5aZ3nhYlalv26rw==,ri2KVx4DrJyet2+sRa+OUQ== +Q7HNf1mOziOIGwDj7QMGiA==,MMgcRqNc5BHl+8EZGgpS7w== +ewx4XiforT+CIyBxBHJd1A==,9p8kRd9PmxetK0F75mw3EA== +ECB,Encrypt,jnOw99oOZFLIEPMrgJB55WL46tJSLGt7, +4 +a8G+4i5An5bpPX4Rc5MXKg==,vTNPHW5F8l/3EqIUVx+lzA== +ri2KVx4DrJyet2+sRa+OUQ==,l0EEhG0K0613NOyz7O5O7w== +MMgcRqNc5BHl+8EZGgpS7w==,73r9InDi5grc4LovrOZETg== +9p8kRd9PmxetK0F75mw3EA==,mktBunONbHL7FmkWA8GODg== +ECB,Decrypt,jnOw99oOZFLIEPMrgJB55WL46tJSLGt7, +4 +vTNPHW5F8l/3EqIUVx+lzA==,a8G+4i5An5bpPX4Rc5MXKg== +l0EEhG0K0613NOyz7O5O7w==,ri2KVx4DrJyet2+sRa+OUQ== +73r9InDi5grc4LovrOZETg==,MMgcRqNc5BHl+8EZGgpS7w== +mktBunONbHL7FmkWA8GODg==,9p8kRd9PmxetK0F75mw3EA== +ECB,Encrypt,YD3rEBXKcb4rc67whX13gR81LAc7YQjXLZgQowkU3/Q=, +4 +a8G+4i5An5bpPX4Rc5MXKg==,8+7RvbXSoDwGS1p+PbGB+A== +ri2KVx4DrJyet2+sRa+OUQ==,WRzLENQQ7SbcW6dKMTYocA== +MMgcRqNc5BHl+8EZGgpS7w==,tu0huZym9PnxU+exvq/tHQ== +9p8kRd9PmxetK0F75mw3EA==,IzBLejn58/8GfY2PniTsxw== +ECB,Decrypt,YD3rEBXKcb4rc67whX13gR81LAc7YQjXLZgQowkU3/Q=, +4 +8+7RvbXSoDwGS1p+PbGB+A==,a8G+4i5An5bpPX4Rc5MXKg== +WRzLENQQ7SbcW6dKMTYocA==,ri2KVx4DrJyet2+sRa+OUQ== +tu0huZym9PnxU+exvq/tHQ==,MMgcRqNc5BHl+8EZGgpS7w== +IzBLejn58/8GfY2PniTsxw==,9p8kRd9PmxetK0F75mw3EA== +CBC,Encrypt,K34VFiiu0qar9xWICc9PPA==,AAECAwQFBgcICQoLDA0ODw== +4 +a8G+4i5An5bpPX4Rc5MXKg==,dkmrrIEZskbO6Y6bEukZfQ== +ri2KVx4DrJyet2+sRa+OUQ==,UIbLm1ByGe6V2xE6kXZ4sg== +MMgcRqNc5BHl+8EZGgpS7w==,c77WuOPBdDtxFuaeIiKVFg== +9p8kRd9PmxetK0F75mw3EA==,P/HKoWgfrAkSDsowdYbhpw== +CBC,Decrypt,K34VFiiu0qar9xWICc9PPA==,AAECAwQFBgcICQoLDA0ODw== +4 +dkmrrIEZskbO6Y6bEukZfQ==,a8G+4i5An5bpPX4Rc5MXKg== +UIbLm1ByGe6V2xE6kXZ4sg==,ri2KVx4DrJyet2+sRa+OUQ== +c77WuOPBdDtxFuaeIiKVFg==,MMgcRqNc5BHl+8EZGgpS7w== +P/HKoWgfrAkSDsowdYbhpw==,9p8kRd9PmxetK0F75mw3EA== +CBC,Encrypt,jnOw99oOZFLIEPMrgJB55WL46tJSLGt7,AAECAwQFBgcICQoLDA0ODw== +4 +a8G+4i5An5bpPX4Rc5MXKg==,TwIdskO8Yz1xeBg6n6Bx6A== +ri2KVx4DrJyet2+sRa+OUQ==,tNmtqa197fTl5zh2P2kUWg== +MMgcRqNc5BHl+8EZGgpS7w==,VxskIBL7euB/qbqsPfEC4A== +9p8kRd9PmxetK0F75mw3EA==,CLDieYhZiIHZIKnmT1YVzQ== +CBC,Decrypt,jnOw99oOZFLIEPMrgJB55WL46tJSLGt7,AAECAwQFBgcICQoLDA0ODw== +4 +TwIdskO8Yz1xeBg6n6Bx6A==,a8G+4i5An5bpPX4Rc5MXKg== +tNmtqa197fTl5zh2P2kUWg==,ri2KVx4DrJyet2+sRa+OUQ== +VxskIBL7euB/qbqsPfEC4A==,MMgcRqNc5BHl+8EZGgpS7w== +CLDieYhZiIHZIKnmT1YVzQ==,9p8kRd9PmxetK0F75mw3EA== +CBC,Encrypt,YD3rEBXKcb4rc67whX13gR81LAc7YQjXLZgQowkU3/Q=,AAECAwQFBgcICQoLDA0ODw== +4 +a8G+4i5An5bpPX4Rc5MXKg==,9YxMBNbl8bp3nqv7X3v71g== +ri2KVx4DrJyet2+sRa+OUQ==,nPxOln7bgI1nn3d7xnAsfQ== +MMgcRqNc5BHl+8EZGgpS7w==,OfIzaanZus+lMOJjBCMUYQ== +9p8kRd9PmxetK0F75mw3EA==,susF4sOb6fzabBkHjGqdGw== +CBC,Decrypt,YD3rEBXKcb4rc67whX13gR81LAc7YQjXLZgQowkU3/Q=,AAECAwQFBgcICQoLDA0ODw== +4 +9YxMBNbl8bp3nqv7X3v71g==,a8G+4i5An5bpPX4Rc5MXKg== +nPxOln7bgI1nn3d7xnAsfQ==,ri2KVx4DrJyet2+sRa+OUQ== +OfIzaanZus+lMOJjBCMUYQ==,MMgcRqNc5BHl+8EZGgpS7w== +susF4sOb6fzabBkHjGqdGw==,9p8kRd9PmxetK0F75mw3EA== +CFB1,Encrypt,K34VFiiu0qar9xWICc9PPA==,AAECAwQFBgcICQoLDA0ODw== +16 +AA==,AA== +AQ==,AQ== +AQ==,AQ== +AA==,AA== +AQ==,AQ== +AA==,AA== +AQ==,AQ== +AQ==,AA== +AQ==,AQ== +AQ==,AA== +AA==,AQ== +AA==,AQ== +AA==,AA== +AA==,AA== +AA==,AQ== +AQ==,AQ== +CFB1,Decrypt,K34VFiiu0qar9xWICc9PPA==,AAECAwQFBgcICQoLDA0ODw== +16 +AA==,AA== +AQ==,AQ== +AQ==,AQ== +AA==,AA== +AQ==,AQ== +AA==,AA== +AA==,AQ== +AA==,AQ== +AQ==,AQ== +AA==,AQ== +AQ==,AA== +AQ==,AA== +AA==,AA== +AA==,AA== +AQ==,AA== +AQ==,AQ== +CFB1,Encrypt,jnOw99oOZFLIEPMrgJB55WL46tJSLGt7,AAECAwQFBgcICQoLDA0ODw== +16 +AA==,AQ== +AQ==,AA== +AQ==,AA== +AA==,AQ== +AQ==,AA== +AA==,AA== +AQ==,AQ== +AQ==,AQ== +AQ==,AA== +AQ==,AQ== +AA==,AA== +AA==,AQ== +AA==,AQ== +AA==,AA== +AA==,AA== +AQ==,AQ== +CFB1,Decrypt,jnOw99oOZFLIEPMrgJB55WL46tJSLGt7,AAECAwQFBgcICQoLDA0ODw== +16 +AQ==,AA== +AA==,AQ== +AA==,AQ== +AQ==,AA== +AA==,AQ== +AA==,AA== +AQ==,AQ== +AQ==,AQ== +AA==,AQ== +AQ==,AQ== +AA==,AA== +AQ==,AA== +AQ==,AA== +AA==,AA== +AA==,AA== +AQ==,AQ== +CFB1,Encrypt,YD3rEBXKcb4rc67whX13gR81LAc7YQjXLZgQowkU3/Q=,AAECAwQFBgcICQoLDA0ODw== +16 +AA==,AQ== +AQ==,AA== +AQ==,AA== +AA==,AQ== +AQ==,AA== +AA==,AA== +AQ==,AA== +AQ==,AA== +AQ==,AA== +AQ==,AA== +AA==,AQ== +AA==,AA== +AA==,AQ== +AA==,AA== +AA==,AA== +AQ==,AQ== +CFB1,Decrypt,YD3rEBXKcb4rc67whX13gR81LAc7YQjXLZgQowkU3/Q=,AAECAwQFBgcICQoLDA0ODw== +16 +AQ==,AA== +AA==,AQ== +AA==,AQ== +AQ==,AA== +AA==,AQ== +AA==,AA== +AA==,AQ== +AA==,AQ== +AA==,AQ== +AA==,AQ== +AQ==,AA== +AA==,AA== +AQ==,AA== +AA==,AA== +AA==,AA== +AQ==,AQ== +CFB8,Encrypt,K34VFiiu0qar9xWICc9PPA==,AAECAwQFBgcICQoLDA0ODw== +18 +aw==,Ow== +wQ==,eQ== +vg==,Qg== +4g==,TA== +Lg==,nA== +QA==,DQ== +nw==,1A== +lg==,Ng== +6Q==,ug== +PQ==,zg== +fg==,ng== +EQ==,Dg== +cw==,1A== +kw==,WA== +Fw==,ag== +Kg==,Tw== +rg==,Mg== +LQ==,uQ== +CFB8,Decrypt,K34VFiiu0qar9xWICc9PPA==,AAECAwQFBgcICQoLDA0ODw== +18 +Ow==,aw== +eQ==,wQ== +Qg==,vg== +TA==,4g== +nA==,Lg== +DQ==,QA== +1A==,nw== +Ng==,lg== +ug==,6Q== +zg==,PQ== +ng==,fg== +Dg==,EQ== +1A==,cw== +WA==,kw== +ag==,Fw== +Tw==,Kg== +Mg==,rg== +uQ==,LQ== +CFB8,Encrypt,jnOw99oOZFLIEPMrgJB55WL46tJSLGt7,AAECAwQFBgcICQoLDA0ODw== +18 +aw==,zQ== +wQ==,og== +vg==,Ug== +4g==,Hg== +Lg==,8A== +QA==,qQ== +nw==,BQ== +lg==,yg== +6Q==,RA== +PQ==,zQ== +fg==,BQ== +EQ==,fA== +cw==,vw== +kw==,DQ== +Fw==,Rw== +Kg==,oA== +rg==,Zw== +LQ==,ig== +CFB8,Decrypt,jnOw99oOZFLIEPMrgJB55WL46tJSLGt7,AAECAwQFBgcICQoLDA0ODw== +18 +zQ==,aw== +og==,wQ== +Ug==,vg== +Hg==,4g== +8A==,Lg== +qQ==,QA== +BQ==,nw== +yg==,lg== +RA==,6Q== +zQ==,PQ== +BQ==,fg== +fA==,EQ== +vw==,cw== +DQ==,kw== +Rw==,Fw== +oA==,Kg== +Zw==,rg== +ig==,LQ== +CFB8,Encrypt,YD3rEBXKcb4rc67whX13gR81LAc7YQjXLZgQowkU3/Q=,AAECAwQFBgcICQoLDA0ODw== +18 +aw==,3A== +wQ==,Hw== +vg==,Gg== +4g==,hQ== +Lg==,IA== +QA==,pg== +nw==,TQ== +lg==,tQ== +6Q==,Xw== +PQ==,zA== +fg==,ig== +EQ==,xQ== +cw==,VA== +kw==,hA== +Fw==,Tg== +Kg==,iA== +rg==,lw== +LQ==,AA== +CFB8,Decrypt,YD3rEBXKcb4rc67whX13gR81LAc7YQjXLZgQowkU3/Q=,AAECAwQFBgcICQoLDA0ODw== +18 +3A==,aw== +Hw==,wQ== +Gg==,vg== +hQ==,4g== +IA==,Lg== +pg==,QA== +TQ==,nw== +tQ==,lg== +Xw==,6Q== +zA==,PQ== +ig==,fg== +xQ==,EQ== +VA==,cw== +hA==,kw== +Tg==,Fw== +iA==,Kg== +lw==,rg== +AA==,LQ== +CFB128,Encrypt,K34VFiiu0qar9xWICc9PPA==,AAECAwQFBgcICQoLDA0ODw== +4 +a8G+4i5An5bpPX4Rc5MXKg==,Oz/ZLrctrSAzNEn46Dz7Sg== +ri2KVx4DrJyet2+sRa+OUQ==,yKZFN6CzqT/N482tnxzliw== +MMgcRqNc5BHl+8EZGgpS7w==,JnUfZ6PLsUCxgIzxh6T03w== +9p8kRd9PmxetK0F75mw3EA==,wEsFNXxdHA7qxMZvn/fy5g== +CFB128,Decrypt,K34VFiiu0qar9xWICc9PPA==,AAECAwQFBgcICQoLDA0ODw== +4 +Oz/ZLrctrSAzNEn46Dz7Sg==,a8G+4i5An5bpPX4Rc5MXKg== +yKZFN6CzqT/N482tnxzliw==,ri2KVx4DrJyet2+sRa+OUQ== +JnUfZ6PLsUCxgIzxh6T03w==,MMgcRqNc5BHl+8EZGgpS7w== +wEsFNXxdHA7qxMZvn/fy5g==,9p8kRd9PmxetK0F75mw3EA== +CFB128,Encrypt,jnOw99oOZFLIEPMrgJB55WL46tJSLGt7,AAECAwQFBgcICQoLDA0ODw== +4 +a8G+4i5An5bpPX4Rc5MXKg==,zcgNb93xjKs0wlkJyZpBdA== +ri2KVx4DrJyet2+sRa+OUQ==,Z85/f4EXNiGWGitwFx09eg== +MMgcRqNc5BHl+8EZGgpS7w==,Lh6KHdWbiLHI5g/tHvrEyQ== +9p8kRd9PmxetK0F75mw3EA==,wF+fnKmDT6BCro+6WEsJ/w== +CFB128,Decrypt,jnOw99oOZFLIEPMrgJB55WL46tJSLGt7,AAECAwQFBgcICQoLDA0ODw== +4 +zcgNb93xjKs0wlkJyZpBdA==,a8G+4i5An5bpPX4Rc5MXKg== +Z85/f4EXNiGWGitwFx09eg==,ri2KVx4DrJyet2+sRa+OUQ== +Lh6KHdWbiLHI5g/tHvrEyQ==,MMgcRqNc5BHl+8EZGgpS7w== +wF+fnKmDT6BCro+6WEsJ/w==,9p8kRd9PmxetK0F75mw3EA== +CFB128,Encrypt,YD3rEBXKcb4rc67whX13gR81LAc7YQjXLZgQowkU3/Q=,AAECAwQFBgcICQoLDA0ODw== +4 +a8G+4i5An5bpPX4Rc5MXKg==,3H6Ev9p5Fkt+zYSGmF04YA== +ri2KVx4DrJyet2+sRa+OUQ==,Of/tFDsoscgyETxjMeVAew== +MMgcRqNc5BHl+8EZGgpS7w==,3xATJBXlS5KhPtCoJnri+Q== +9p8kRd9PmxetK0F75mw3EA==,daOFdBq5zvggMWI9VbHkcQ== +CFB128,Decrypt,YD3rEBXKcb4rc67whX13gR81LAc7YQjXLZgQowkU3/Q=,AAECAwQFBgcICQoLDA0ODw== +4 +3H6Ev9p5Fkt+zYSGmF04YA==,a8G+4i5An5bpPX4Rc5MXKg== +Of/tFDsoscgyETxjMeVAew==,ri2KVx4DrJyet2+sRa+OUQ== +3xATJBXlS5KhPtCoJnri+Q==,MMgcRqNc5BHl+8EZGgpS7w== +daOFdBq5zvggMWI9VbHkcQ==,9p8kRd9PmxetK0F75mw3EA== +OFB,Encrypt,K34VFiiu0qar9xWICc9PPA==,AAECAwQFBgcICQoLDA0ODw== +4 +a8G+4i5An5bpPX4Rc5MXKg==,Oz/ZLrctrSAzNEn46Dz7Sg== +ri2KVx4DrJyet2+sRa+OUQ==,d4lQjRaRjwP1PFLaxU7YJQ== +MMgcRqNc5BHl+8EZGgpS7w==,l0AFHpxf7PZDRPeoImDtzA== +9p8kRd9PmxetK0F75mw3EA==,MExlKPZZx3hmpRDZwdauXg== +OFB,Decrypt,K34VFiiu0qar9xWICc9PPA==,AAECAwQFBgcICQoLDA0ODw== +4 +Oz/ZLrctrSAzNEn46Dz7Sg==,a8G+4i5An5bpPX4Rc5MXKg== +d4lQjRaRjwP1PFLaxU7YJQ==,ri2KVx4DrJyet2+sRa+OUQ== +l0AFHpxf7PZDRPeoImDtzA==,MMgcRqNc5BHl+8EZGgpS7w== +MExlKPZZx3hmpRDZwdauXg==,9p8kRd9PmxetK0F75mw3EA== +OFB,Encrypt,jnOw99oOZFLIEPMrgJB55WL46tJSLGt7,AAECAwQFBgcICQoLDA0ODw== +4 +a8G+4i5An5bpPX4Rc5MXKg==,zcgNb93xjKs0wlkJyZpBdA== +ri2KVx4DrJyet2+sRa+OUQ==,/MKLjUxjg3wJ6BcAwRAEAQ== +MMgcRqNc5BHl+8EZGgpS7w==,jZqa6sD2WW9VnG1Nr1ml8g== +9p8kRd9PmxetK0F75mw3EA==,bZ8gCFfKbD6crFJL2azJKg== +OFB,Decrypt,jnOw99oOZFLIEPMrgJB55WL46tJSLGt7,AAECAwQFBgcICQoLDA0ODw== +4 +zcgNb93xjKs0wlkJyZpBdA==,a8G+4i5An5bpPX4Rc5MXKg== +/MKLjUxjg3wJ6BcAwRAEAQ==,ri2KVx4DrJyet2+sRa+OUQ== +jZqa6sD2WW9VnG1Nr1ml8g==,MMgcRqNc5BHl+8EZGgpS7w== +bZ8gCFfKbD6crFJL2azJKg==,9p8kRd9PmxetK0F75mw3EA== +OFB,Encrypt,YD3rEBXKcb4rc67whX13gR81LAc7YQjXLZgQowkU3/Q=,AAECAwQFBgcICQoLDA0ODw== +4 +a8G+4i5An5bpPX4Rc5MXKg==,3H6Ev9p5Fkt+zYSGmF04YA== +ri2KVx4DrJyet2+sRa+OUQ==,T+vcZ0DSCzrIj2rYKk+wjQ== +MMgcRqNc5BHl+8EZGgpS7w==,catHoIbobu3znRxbupfECA== +9p8kRd9PmxetK0F75mw3EA==,ASYUHWfze+hTj1qL50DkhA== +OFB,Decrypt,YD3rEBXKcb4rc67whX13gR81LAc7YQjXLZgQowkU3/Q=,AAECAwQFBgcICQoLDA0ODw== +4 +3H6Ev9p5Fkt+zYSGmF04YA==,a8G+4i5An5bpPX4Rc5MXKg== +T+vcZ0DSCzrIj2rYKk+wjQ==,ri2KVx4DrJyet2+sRa+OUQ== +catHoIbobu3znRxbupfECA==,MMgcRqNc5BHl+8EZGgpS7w== +ASYUHWfze+hTj1qL50DkhA==,9p8kRd9PmxetK0F75mw3EA== +CTR,Encrypt,K34VFiiu0qar9xWICc9PPA==,8PHy8/T19vf4+fr7/P3+/w== +4 +a8G+4i5An5bpPX4Rc5MXKg==,h01hkbYg4yYb72hkmQ22zg== +ri2KVx4DrJyet2+sRa+OUQ==,mAb2a3lw/f+GFxh7uf/9/w== +MMgcRqNc5BHl+8EZGgpS7w==,WuTfPtvV015bTwkCDbA+qw== +9p8kRd9PmxetK0F75mw3EA==,HgMd2i++A9F5IXCg8wCc7g== +CTR,Decrypt,K34VFiiu0qar9xWICc9PPA==,8PHy8/T19vf4+fr7/P3+/w== +4 +h01hkbYg4yYb72hkmQ22zg==,a8G+4i5An5bpPX4Rc5MXKg== +mAb2a3lw/f+GFxh7uf/9/w==,ri2KVx4DrJyet2+sRa+OUQ== +WuTfPtvV015bTwkCDbA+qw==,MMgcRqNc5BHl+8EZGgpS7w== +HgMd2i++A9F5IXCg8wCc7g==,9p8kRd9PmxetK0F75mw3EA== +CTR,Encrypt,jnOw99oOZFLIEPMrgJB55WL46tJSLGt7,8PHy8/T19vf4+fr7/P3+/w== +4 +a8G+4i5An5bpPX4Rc5MXKg==,GryTJBdSHKJPKwRZ/n5uCw== +ri2KVx4DrJyet2+sRa+OUQ==,CQM57Aqm+u/VzMLG9M6OlA== +MMgcRqNc5BHl+8EZGgpS7w==,Hjaya9HrxnDRvR1mViCr9w== +9p8kRd9PmxetK0F75mw3EA==,T3in9tKYCVhal9rsWMawUA== +CTR,Decrypt,jnOw99oOZFLIEPMrgJB55WL46tJSLGt7,8PHy8/T19vf4+fr7/P3+/w== +4 +GryTJBdSHKJPKwRZ/n5uCw==,a8G+4i5An5bpPX4Rc5MXKg== +CQM57Aqm+u/VzMLG9M6OlA==,ri2KVx4DrJyet2+sRa+OUQ== +Hjaya9HrxnDRvR1mViCr9w==,MMgcRqNc5BHl+8EZGgpS7w== +T3in9tKYCVhal9rsWMawUA==,9p8kRd9PmxetK0F75mw3EA== +CTR,Encrypt,YD3rEBXKcb4rc67whX13gR81LAc7YQjXLZgQowkU3/Q=,8PHy8/T19vf4+fr7/P3+/w== +4 +a8G+4i5An5bpPX4Rc5MXKg==,YB7DE3dXiaW3p/UEu/PSKA== +ri2KVx4DrJyet2+sRa+OUQ==,9EPjyk1itZrKhOmQysr1xQ== +MMgcRqNc5BHl+8EZGgpS7w==,Kwkw2qI96UzocBe6LYSYjQ== +9p8kRd9PmxetK0F75mw3EA==,38nFjbZ6raYTwt0IRXlBpg== +CTR,Decrypt,YD3rEBXKcb4rc67whX13gR81LAc7YQjXLZgQowkU3/Q=,8PHy8/T19vf4+fr7/P3+/w== +4 +YB7DE3dXiaW3p/UEu/PSKA==,a8G+4i5An5bpPX4Rc5MXKg== +9EPjyk1itZrKhOmQysr1xQ==,ri2KVx4DrJyet2+sRa+OUQ== +Kwkw2qI96UzocBe6LYSYjQ==,MMgcRqNc5BHl+8EZGgpS7w== +38nFjbZ6raYTwt0IRXlBpg==,9p8kRd9PmxetK0F75mw3EA== + From abd5e2514a4558b847ccac34422ae036a1d21527 Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Fri, 26 Feb 2016 20:55:19 -0500 Subject: [PATCH 002/447] 8150687: typedefs without type names Removed unnecessary typedef keywords. Reviewed-by: dholmes, bpb --- jdk/src/java.base/windows/native/libnio/ch/Net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jdk/src/java.base/windows/native/libnio/ch/Net.c b/jdk/src/java.base/windows/native/libnio/ch/Net.c index cae8ef03bf8..4b586d3208a 100644 --- a/jdk/src/java.base/windows/native/libnio/ch/Net.c +++ b/jdk/src/java.base/windows/native/libnio/ch/Net.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -50,13 +50,13 @@ #endif /* MCAST_BLOCK_SOURCE */ -typedef struct my_ip_mreq_source { +struct my_ip_mreq_source { IN_ADDR imr_multiaddr; IN_ADDR imr_sourceaddr; IN_ADDR imr_interface; }; -typedef struct my_group_source_req { +struct my_group_source_req { ULONG gsr_interface; SOCKADDR_STORAGE gsr_group; SOCKADDR_STORAGE gsr_source; From b9e2a5384153e355f1bdab6fc84a390ebb81475b Mon Sep 17 00:00:00 2001 From: Tobias Hartmann Date: Fri, 3 Feb 2017 08:17:35 +0100 Subject: [PATCH 003/447] 8173699: Crash during deoptimization with "assert(result == __null || result->is_oop()) failed: must be oop" Ignore return_oop() when dispatching an exception and only try to retrieve the oop when performing re-allocation during a normal deoptimization (if exec_mode == Unpack_deopt). Reviewed-by: kvn, vlivanov --- hotspot/src/share/vm/runtime/deoptimization.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hotspot/src/share/vm/runtime/deoptimization.cpp b/hotspot/src/share/vm/runtime/deoptimization.cpp index e3b88640768..5ce9f345809 100644 --- a/hotspot/src/share/vm/runtime/deoptimization.cpp +++ b/hotspot/src/share/vm/runtime/deoptimization.cpp @@ -221,8 +221,9 @@ Deoptimization::UnrollBlock* Deoptimization::fetch_unroll_info_helper(JavaThread // It is not guaranteed that we can get such information here only // by analyzing bytecode in deoptimized frames. This is why this flag // is set during method compilation (see Compile::Process_OopMap_Node()). - // If the previous frame was popped, we don't have a result. - bool save_oop_result = chunk->at(0)->scope()->return_oop() && !thread->popframe_forcing_deopt_reexecution(); + // If the previous frame was popped or if we are dispatching an exception, + // we don't have an oop result. + bool save_oop_result = chunk->at(0)->scope()->return_oop() && !thread->popframe_forcing_deopt_reexecution() && (exec_mode == Unpack_deopt); Handle return_value; if (save_oop_result) { // Reallocation may trigger GC. If deoptimization happened on return from From a44e07e4b3f43f92a99c4d48f428da0d4ec96b92 Mon Sep 17 00:00:00 2001 From: Rahul Raghavan Date: Fri, 3 Feb 2017 00:46:58 -0800 Subject: [PATCH 004/447] 8144484: assert(no_dead_loop) failed: dead loop detected Bailout early without splitting Phi through memory merges if TOP inputs present for Phi Nodes Reviewed-by: thartmann, kvn --- hotspot/src/share/vm/opto/cfgnode.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hotspot/src/share/vm/opto/cfgnode.cpp b/hotspot/src/share/vm/opto/cfgnode.cpp index de85b1cb155..69e7659a877 100644 --- a/hotspot/src/share/vm/opto/cfgnode.cpp +++ b/hotspot/src/share/vm/opto/cfgnode.cpp @@ -1889,6 +1889,12 @@ Node *PhiNode::Ideal(PhaseGVN *phase, bool can_reshape) { bool saw_self = false; for( uint i=1; iis_MergeMem()) { MergeMemNode* n = ii->as_MergeMem(); merge_width = MAX2(merge_width, n->req()); From 00f485cdfa7619ae86551c133eaa318f0d54121a Mon Sep 17 00:00:00 2001 From: Michail Chernov Date: Fri, 3 Feb 2017 15:45:57 +0300 Subject: [PATCH 005/447] 8170737: Not enough old space utilisation Reviewed-by: dfazunen, tschatzl --- .../tmtools/jstat/GarbageProducerTest.java | 89 +++++++++++++ .../tmtools/jstat/GcCauseTest02.java | 30 +---- .../tmtools/jstat/GcTest02.java | 32 +---- .../tmtools/jstat/utils/GarbageProducer.java | 121 ++++++++++++++++++ .../tmtools/jstat/utils/GcProvoker.java | 84 +----------- .../tmtools/jstat/utils/GcProvokerImpl.java | 113 ---------------- .../jstat/utils/JstatGcCapacityResults.java | 22 +--- .../jstat/utils/JstatGcCauseResults.java | 20 +-- .../jstat/utils/JstatGcNewResults.java | 9 +- .../tmtools/jstat/utils/JstatGcResults.java | 20 +-- .../tmtools/jstat/utils/JstatResults.java | 45 +++++-- 11 files changed, 266 insertions(+), 319 deletions(-) create mode 100644 hotspot/test/serviceability/tmtools/jstat/GarbageProducerTest.java create mode 100644 hotspot/test/serviceability/tmtools/jstat/utils/GarbageProducer.java delete mode 100644 hotspot/test/serviceability/tmtools/jstat/utils/GcProvokerImpl.java diff --git a/hotspot/test/serviceability/tmtools/jstat/GarbageProducerTest.java b/hotspot/test/serviceability/tmtools/jstat/GarbageProducerTest.java new file mode 100644 index 00000000000..dfe1a8f12dc --- /dev/null +++ b/hotspot/test/serviceability/tmtools/jstat/GarbageProducerTest.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.lang.management.ManagementFactory; +import utils.GarbageProducer; +import common.TmTool; +import utils.JstatResults; + +/** + * Base class for jstat testing which uses GarbageProducer to allocate garbage. + */ +public class GarbageProducerTest { + + // Iterations of measurement to get consistent value of counters and jstat. + private final static int ITERATIONS = 10; + private final static float TARGET_MEMORY_USAGE = 0.7f; + private final static float MEASUREMENT_TOLERANCE = 0.05f; + private final GarbageProducer garbageProducer; + private final TmTool jstatTool; + + public GarbageProducerTest(TmTool tool) { + garbageProducer = new GarbageProducer(TARGET_MEMORY_USAGE); + // We will be running jstat tool + jstatTool = tool; + } + + public void run() throws Exception { + // Run once and get the results asserting that they are reasonable + JstatResults measurement1 = jstatTool.measure(); + measurement1.assertConsistency(); + // Eat metaspace and heap then run the tool again and get the results asserting that they are reasonable + System.gc(); + garbageProducer.allocateMetaspaceAndHeap(); + // Collect garbage. Also update VM statistics + System.gc(); + int i = 0; + long collectionCountBefore = getCollectionCount(); + JstatResults measurement2 = jstatTool.measure(); + do { + System.out.println("Measurement #" + i); + long currentCounter = getCollectionCount(); + // Check if GC cycle occured during measurement + if (currentCounter == collectionCountBefore) { + measurement2.assertConsistency(); + checkOldGenMeasurement(measurement2); + return; + } else { + System.out.println("GC happened during measurement."); + } + collectionCountBefore = getCollectionCount(); + measurement2 = jstatTool.measure(); + + } while (i++ < ITERATIONS); + // Checking will be performed without consistency guarantee. + checkOldGenMeasurement(measurement2); + } + + private void checkOldGenMeasurement(JstatResults measurement2) { + float oldGenAllocationRatio = garbageProducer.getOldGenAllocationRatio() - MEASUREMENT_TOLERANCE; + // Assert that space has been utilized accordingly + JstatResults.assertSpaceUtilization(measurement2, TARGET_MEMORY_USAGE, oldGenAllocationRatio); + } + + private static long getCollectionCount() { + return ManagementFactory.getGarbageCollectorMXBeans().stream() + .mapToLong(b -> b.getCollectionCount()) + .sum(); + } +} diff --git a/hotspot/test/serviceability/tmtools/jstat/GcCauseTest02.java b/hotspot/test/serviceability/tmtools/jstat/GcCauseTest02.java index 2bdf04d39c2..f2fec51d6b2 100644 --- a/hotspot/test/serviceability/tmtools/jstat/GcCauseTest02.java +++ b/hotspot/test/serviceability/tmtools/jstat/GcCauseTest02.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,39 +25,19 @@ * @test * @summary Test checks output displayed with jstat -gccause. * Test scenario: - * tests forces debuggee application eat ~70% of heap and runs jstat. - * jstat should show that ~70% of heap (OC/OU ~= 70%). + * test forces debuggee application eat ~70% of heap and runs jstat. + * jstat should show actual usage of old gen (OC/OU ~= old gen usage). * @requires vm.opt.ExplicitGCInvokesConcurrent != true * @modules java.base/jdk.internal.misc * @library /test/lib * @library ../share - * @run main/othervm -XX:+UsePerfData -XX:InitialHeapSize=128M -XX:MaxHeapSize=128M -XX:MaxMetaspaceSize=128M GcCauseTest02 + * @run main/othervm -XX:+UsePerfData -XX:MaxNewSize=4m -XX:MaxHeapSize=128M -XX:MaxMetaspaceSize=128M GcCauseTest02 */ import utils.*; public class GcCauseTest02 { - private final static float targetMemoryUsagePercent = 0.7f; - public static void main(String[] args) throws Exception { - - // We will be running "jstat -gc" tool - JstatGcCauseTool jstatGcTool = new JstatGcCauseTool(ProcessHandle.current().getPid()); - - // Run once and get the results asserting that they are reasonable - JstatGcCauseResults measurement1 = jstatGcTool.measure(); - measurement1.assertConsistency(); - - GcProvoker gcProvoker = new GcProvoker(); - - // Eat metaspace and heap then run the tool again and get the results asserting that they are reasonable - gcProvoker.allocateAvailableMetaspaceAndHeap(targetMemoryUsagePercent); - // Collect garbage. Also update VM statistics - System.gc(); - JstatGcCauseResults measurement2 = jstatGcTool.measure(); - measurement2.assertConsistency(); - - // Assert that space has been utilized acordingly - JstatResults.assertSpaceUtilization(measurement2, targetMemoryUsagePercent); + new GarbageProducerTest(new JstatGcCauseTool(ProcessHandle.current().getPid())).run(); } } diff --git a/hotspot/test/serviceability/tmtools/jstat/GcTest02.java b/hotspot/test/serviceability/tmtools/jstat/GcTest02.java index 91406fa3838..ad46e7919df 100644 --- a/hotspot/test/serviceability/tmtools/jstat/GcTest02.java +++ b/hotspot/test/serviceability/tmtools/jstat/GcTest02.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,43 +21,23 @@ * questions. */ -import utils.*; /* * @test * @summary Test checks output displayed with jstat -gc. * Test scenario: - * tests forces debuggee application eat ~70% of heap and runs jstat. - * jstat should show that ~70% of heap is utilized (OC/OU ~= 70%). + * test forces debuggee application eat ~70% of heap and runs jstat. + * jstat should show actual usage of old gen (OC/OU ~= old gen usage). * @requires vm.opt.ExplicitGCInvokesConcurrent != true * @modules java.base/jdk.internal.misc * @library /test/lib * @library ../share - * @run main/othervm -XX:+UsePerfData -XX:InitialHeapSize=128M -XX:MaxHeapSize=128M -XX:MaxMetaspaceSize=128M GcTest02 + * @run main/othervm -XX:+UsePerfData -XX:MaxNewSize=4m -XX:MaxHeapSize=128M -XX:MaxMetaspaceSize=128M GcTest02 */ +import utils.*; public class GcTest02 { - private final static float targetMemoryUsagePercent = 0.7f; - public static void main(String[] args) throws Exception { - - // We will be running "jstat -gc" tool - JstatGcTool jstatGcTool = new JstatGcTool(ProcessHandle.current().getPid()); - - // Run once and get the results asserting that they are reasonable - JstatGcResults measurement1 = jstatGcTool.measure(); - measurement1.assertConsistency(); - - GcProvoker gcProvoker = new GcProvoker(); - - // Eat metaspace and heap then run the tool again and get the results asserting that they are reasonable - gcProvoker.allocateAvailableMetaspaceAndHeap(targetMemoryUsagePercent); - // Collect garbage. Also updates VM statistics - System.gc(); - JstatGcResults measurement2 = jstatGcTool.measure(); - measurement2.assertConsistency(); - - // Assert that space has been utilized acordingly - JstatResults.assertSpaceUtilization(measurement2, targetMemoryUsagePercent); + new GarbageProducerTest(new JstatGcTool(ProcessHandle.current().getPid())).run(); } } diff --git a/hotspot/test/serviceability/tmtools/jstat/utils/GarbageProducer.java b/hotspot/test/serviceability/tmtools/jstat/utils/GarbageProducer.java new file mode 100644 index 00000000000..0dd7c858482 --- /dev/null +++ b/hotspot/test/serviceability/tmtools/jstat/utils/GarbageProducer.java @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package utils; + +import java.lang.management.ManagementFactory; +import java.lang.management.MemoryMXBean; +import java.lang.management.MemoryPoolMXBean; +import java.lang.management.MemoryUsage; +import java.util.ArrayList; +import java.util.List; + +/** + * This is an class used to allocate specified amount of metaspace and heap. + */ +public class GarbageProducer { + + // Uses fixed small objects to avoid Humongous objects allocation with G1 GC. + private static final int MEMORY_CHUNK = 2048; + + public static List allocatedMetaspace; + public static List allocatedMemory; + + private final MemoryMXBean memoryMXBean; + private final float targetMemoryUsagePercent; + private final long targetMemoryUsage; + + /** + * @param targetMemoryUsagePercent how many percent of metaspace and heap to + * allocate + */ + public GarbageProducer(float targetMemoryUsagePercent) { + memoryMXBean = ManagementFactory.getMemoryMXBean(); + this.targetMemoryUsagePercent = targetMemoryUsagePercent; + targetMemoryUsage = (long) (memoryMXBean.getHeapMemoryUsage().getMax() * targetMemoryUsagePercent); + } + + /** + * Allocates heap and metaspace upon exit targetMemoryUsagePercent percents + * of heap and metaspace have been consumed. + */ + public void allocateMetaspaceAndHeap() { + // Metaspace should be filled before Java Heap to prevent unexpected OOME + // in the Java Heap while filling Metaspace + allocatedMetaspace = eatMetaspace(targetMemoryUsagePercent); + allocatedMemory = allocateGarbage(targetMemoryUsage); + } + + private List eatMetaspace(float targetUsage) { + List list = new ArrayList<>(); + MemoryPoolMXBean metaspacePool = getMatchedMemoryPool(".*Metaspace.*"); + float currentUsage; + GeneratedClassProducer gp = new GeneratedClassProducer(); + do { + try { + list.add(gp.create(0)); + } catch (OutOfMemoryError oome) { + list = null; + throw new RuntimeException("Unexpected OOME '" + oome.getMessage() + "' while eating " + targetUsage + " of Metaspace."); + } + MemoryUsage memoryUsage = metaspacePool.getUsage(); + currentUsage = (((float) memoryUsage.getUsed()) / memoryUsage.getMax()); + } while (currentUsage < targetUsage); + return list; + } + + private MemoryPoolMXBean getMatchedMemoryPool(String patternPoolName) { + return ManagementFactory.getMemoryPoolMXBeans().stream() + .filter(bean -> bean.getName().matches(patternPoolName)) + .findFirst() + .orElseThrow(() -> new RuntimeException("Cannot find '" + patternPoolName + "' memory pool.")); + } + + private List allocateGarbage(long targetMemoryUsage) { + List list = new ArrayList<>(); + do { + try { + list.add(new byte[MEMORY_CHUNK]); + } catch (OutOfMemoryError e) { + list = null; + throw new RuntimeException("Unexpected OOME '" + e.getMessage() + "'"); + } + } while (memoryMXBean.getHeapMemoryUsage().getUsed() < targetMemoryUsage); + return list; + } + + /** + * Returns allocation rate for old gen based on appropriate MemoryPoolMXBean + * memory usage. + * + * @return allocation rate + */ + public float getOldGenAllocationRatio() { + MemoryPoolMXBean oldGenBean = getMatchedMemoryPool(".*Old.*|.*Tenured.*"); + MemoryUsage usage = oldGenBean.getUsage(); + System.out.format("Memory usage for %1s.\n", oldGenBean.getName()); + System.out.format("Used: %1d\n", usage.getUsed()); + System.out.format("Commited: %1d\n", usage.getCommitted()); + System.out.format("Max: %1d\n", usage.getMax()); + return ((float) usage.getUsed()) / usage.getCommitted(); + } +} diff --git a/hotspot/test/serviceability/tmtools/jstat/utils/GcProvoker.java b/hotspot/test/serviceability/tmtools/jstat/utils/GcProvoker.java index f2111fa5724..8457091800c 100644 --- a/hotspot/test/serviceability/tmtools/jstat/utils/GcProvoker.java +++ b/hotspot/test/serviceability/tmtools/jstat/utils/GcProvoker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,9 +22,6 @@ */ package utils; -import java.lang.management.ManagementFactory; -import java.lang.management.MemoryPoolMXBean; -import java.lang.management.MemoryUsage; import java.util.ArrayList; import java.util.List; @@ -36,11 +33,7 @@ import java.util.List; public class GcProvoker{ // Uses fixed small objects to avoid Humongous objects allocation in G1 - public static final int MEMORY_CHUNK = 2048; - public static final float ALLOCATION_TOLERANCE = 0.05f; - - public static List allocatedMetaspace; - public static List allocatedMemory; + private static final int MEMORY_CHUNK = 2048; private final Runtime runtime; @@ -61,21 +54,6 @@ public class GcProvoker{ return list; } - private List allocateAvailableHeap(float targetUsage) { - // Calculates size of free memory after allocation with small tolerance. - long minFreeMemory = (long) ((1.0 - (targetUsage + ALLOCATION_TOLERANCE)) * runtime.maxMemory()); - List list = new ArrayList<>(); - do { - try { - list.add(new byte[MEMORY_CHUNK]); - } catch (OutOfMemoryError e) { - list = null; - throw new RuntimeException("Unexpected OOME '" + e.getMessage() + "' while eating " + targetUsage + " of heap memory."); - } - } while (runtime.freeMemory() > minFreeMemory); - return list; - } - /** * This method provokes a GC */ @@ -93,65 +71,7 @@ public class GcProvoker{ } } - /** - * Allocates heap and metaspace upon exit not less than targetMemoryUsagePercent percents - * of heap and metaspace have been consumed. - * - * @param targetMemoryUsagePercent how many percent of heap and metaspace to - * allocate - */ - - public void allocateMetaspaceAndHeap(float targetMemoryUsagePercent) { - // Metaspace should be filled before Java Heap to prevent unexpected OOME - // in the Java Heap while filling Metaspace - allocatedMetaspace = eatMetaspace(targetMemoryUsagePercent); - allocatedMemory = allocateHeap(targetMemoryUsagePercent); - } - - /** - * Allocates heap and metaspace upon exit targetMemoryUsagePercent percents - * of heap and metaspace have been consumed. - * - * @param targetMemoryUsagePercent how many percent of heap and metaspace to - * allocate - */ - public void allocateAvailableMetaspaceAndHeap(float targetMemoryUsagePercent) { - // Metaspace should be filled before Java Heap to prevent unexpected OOME - // in the Java Heap while filling Metaspace - allocatedMetaspace = eatMetaspace(targetMemoryUsagePercent); - allocatedMemory = allocateAvailableHeap(targetMemoryUsagePercent); - } - - private List eatMetaspace(float targetUsage) { - List list = new ArrayList<>(); - final String metaspacePoolName = "Metaspace"; - MemoryPoolMXBean metaspacePool = null; - for (MemoryPoolMXBean pool : ManagementFactory.getMemoryPoolMXBeans()) { - if (pool.getName().contains(metaspacePoolName)) { - metaspacePool = pool; - break; - } - } - if (metaspacePool == null) { - throw new RuntimeException("MXBean for Metaspace pool wasn't found"); - } - float currentUsage; - GeneratedClassProducer gp = new GeneratedClassProducer(); - do { - try { - list.add(gp.create(0)); - } catch (OutOfMemoryError oome) { - list = null; - throw new RuntimeException("Unexpected OOME '" + oome.getMessage() + "' while eating " + targetUsage + " of Metaspace."); - } - MemoryUsage memoryUsage = metaspacePool.getUsage(); - currentUsage = (((float) memoryUsage.getUsed()) / memoryUsage.getMax()); - } while (currentUsage < targetUsage); - return list; - } - public GcProvoker() { runtime = Runtime.getRuntime(); } - } diff --git a/hotspot/test/serviceability/tmtools/jstat/utils/GcProvokerImpl.java b/hotspot/test/serviceability/tmtools/jstat/utils/GcProvokerImpl.java deleted file mode 100644 index 565d86cf377..00000000000 --- a/hotspot/test/serviceability/tmtools/jstat/utils/GcProvokerImpl.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package utils; - -import java.lang.management.ManagementFactory; -import java.lang.management.MemoryPoolMXBean; -import java.lang.management.MemoryUsage; -import java.util.ArrayList; -import java.util.List; - -/** - * - * Utilities to provoke GC in various ways - */ -public class GcProvokerImpl implements GcProvoker { - - private static List eatenMetaspace; - private static List eatenMemory; - - static List eatHeapMemory(float targetUsage) { - long maxMemory = Runtime.getRuntime().maxMemory(); - // uses fixed small objects to avoid Humongous objects allocation in G1 - int memoryChunk = 2048; - List list = new ArrayList<>(); - long used = 0; - long target = (long) (maxMemory * targetUsage); - while (used < target) { - try { - list.add(new byte[memoryChunk]); - used += memoryChunk; - } catch (OutOfMemoryError e) { - list = null; - throw new RuntimeException("Unexpected OOME '" + e.getMessage() + "' while eating " + targetUsage + " of heap memory."); - } - } - return list; - } - - @Override - public void provokeGc() { - for (int i = 0; i < 3; i++) { - long edenSize = Pools.getEdenCommittedSize(); - long heapSize = Pools.getHeapCommittedSize(); - float targetPercent = ((float) edenSize) / (heapSize); - if ((targetPercent < 0) || (targetPercent > 1.0)) { - throw new RuntimeException("Error in the percent calculation" + " (eden size: " + edenSize + ", heap size: " + heapSize + ", calculated eden percent: " + targetPercent + ")"); - } - eatHeapMemory(targetPercent); - eatHeapMemory(targetPercent); - System.gc(); - } - } - - @Override - public void eatMetaspaceAndHeap(float targetMemoryUsagePercent) { - // Metaspace should be filled before Java Heap to prevent unexpected OOME - // in the Java Heap while filling Metaspace - eatenMetaspace = eatMetaspace(targetMemoryUsagePercent); - eatenMemory = eatHeapMemory(targetMemoryUsagePercent); - } - - private static List eatMetaspace(float targetUsage) { - List list = new ArrayList<>(); - final String metaspacePoolName = "Metaspace"; - MemoryPoolMXBean metaspacePool = null; - for (MemoryPoolMXBean pool : ManagementFactory.getMemoryPoolMXBeans()) { - if (pool.getName().contains(metaspacePoolName)) { - metaspacePool = pool; - break; - } - } - if (metaspacePool == null) { - throw new RuntimeException("MXBean for Metaspace pool wasn't found"); - } - float currentUsage; - GeneratedClassProducer gp = new GeneratedClassProducer(); - do { - try { - list.add(gp.create(0)); - } catch (OutOfMemoryError oome) { - list = null; - throw new RuntimeException("Unexpected OOME '" + oome.getMessage() + "' while eating " + targetUsage + " of Metaspace."); - } - MemoryUsage memoryUsage = metaspacePool.getUsage(); - currentUsage = (((float) memoryUsage.getUsed()) / memoryUsage.getMax()); - } while (currentUsage < targetUsage); - return list; - } - - public GcProvokerImpl() { - } - -} diff --git a/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcCapacityResults.java b/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcCapacityResults.java index 6ac62fa48ef..350a2a6470d 100644 --- a/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcCapacityResults.java +++ b/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcCapacityResults.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -62,6 +62,7 @@ public class JstatGcCapacityResults extends JstatResults { /** * Checks the overall consistency of the results reported by the tool */ + @Override public void assertConsistency() { // Check exit code @@ -117,8 +118,6 @@ public class JstatGcCapacityResults extends JstatResults { float MC = getFloatValue("MC"); assertThat(MC >= MCMN, "MC < MCMN (generation capacity < min generation capacity)"); assertThat(MC <= MCMX, "MGC > MCMX (generation capacity > max generation capacity)"); - - } /** @@ -139,21 +138,4 @@ public class JstatGcCapacityResults extends JstatResults { } return false; } - - private static final float FLOAT_COMPARISON_TOLERANCE = 0.0011f; - - private static boolean checkFloatIsSum(float sum, float... floats) { - for (float f : floats) { - sum -= f; - } - - return Math.abs(sum) <= FLOAT_COMPARISON_TOLERANCE; - } - - private void assertThat(boolean b, String message) { - if (!b) { - throw new RuntimeException(message); - } - } - } diff --git a/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcCauseResults.java b/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcCauseResults.java index 3bb708dd7ba..cf435f8dba7 100644 --- a/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcCauseResults.java +++ b/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcCauseResults.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -56,6 +56,7 @@ public class JstatGcCauseResults extends JstatResults { /** * Checks the overall consistency of the results reported by the tool */ + @Override public void assertConsistency() { assertThat(getExitCode() == 0, "Unexpected exit code: " + getExitCode()); @@ -83,21 +84,4 @@ public class JstatGcCauseResults extends JstatResults { assertThat(checkFloatIsSum(GCT, YGCT, FGCT), "GCT != (YGCT + FGCT) " + "(GCT = " + GCT + ", YGCT = " + YGCT + ", FGCT = " + FGCT + ", (YCGT + FGCT) = " + (YGCT + FGCT) + ")"); } - - private static final float FLOAT_COMPARISON_TOLERANCE = 0.0011f; - - private static boolean checkFloatIsSum(float sum, float... floats) { - for (float f : floats) { - sum -= f; - } - - return Math.abs(sum) <= FLOAT_COMPARISON_TOLERANCE; - } - - private void assertThat(boolean b, String message) { - if (!b) { - throw new RuntimeException(message); - } - } - } diff --git a/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcNewResults.java b/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcNewResults.java index 24ff4490b80..ca3c04af67c 100644 --- a/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcNewResults.java +++ b/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcNewResults.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -54,6 +54,7 @@ public class JstatGcNewResults extends JstatResults { /** * Checks the overall consistency of the results reported by the tool */ + @Override public void assertConsistency() { assertThat(getExitCode() == 0, "Unexpected exit code: " + getExitCode()); @@ -84,10 +85,4 @@ public class JstatGcNewResults extends JstatResults { int MTT = getIntValue("MTT"); assertThat(TT <= MTT, "TT > MTT (tenuring threshold > maximum tenuring threshold)"); } - - private void assertThat(boolean b, String message) { - if (!b) { - throw new RuntimeException(message); - } - } } diff --git a/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcResults.java b/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcResults.java index 95905418a37..7b736d9f071 100644 --- a/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcResults.java +++ b/hotspot/test/serviceability/tmtools/jstat/utils/JstatGcResults.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -61,6 +61,7 @@ public class JstatGcResults extends JstatResults { /** * Checks the overall consistency of the results reported by the tool */ + @Override public void assertConsistency() { assertThat(getExitCode() == 0, "Unexpected exit code: " + getExitCode()); @@ -112,21 +113,4 @@ public class JstatGcResults extends JstatResults { assertThat(checkFloatIsSum(GCT, YGCT, FGCT), "GCT != (YGCT + FGCT) " + "(GCT = " + GCT + ", YGCT = " + YGCT + ", FGCT = " + FGCT + ", (YCGT + FGCT) = " + (YGCT + FGCT) + ")"); } - - private static final float FLOAT_COMPARISON_TOLERANCE = 0.0011f; - - private static boolean checkFloatIsSum(float sum, float... floats) { - for (float f : floats) { - sum -= f; - } - - return Math.abs(sum) <= FLOAT_COMPARISON_TOLERANCE; - } - - private void assertThat(boolean b, String message) { - if (!b) { - throw new RuntimeException(message); - } - } - } diff --git a/hotspot/test/serviceability/tmtools/jstat/utils/JstatResults.java b/hotspot/test/serviceability/tmtools/jstat/utils/JstatResults.java index d4f961051f8..f628a27d1de 100644 --- a/hotspot/test/serviceability/tmtools/jstat/utils/JstatResults.java +++ b/hotspot/test/serviceability/tmtools/jstat/utils/JstatResults.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,6 +30,8 @@ import common.ToolResults; */ abstract public class JstatResults extends ToolResults { + private static final float FLOAT_COMPARISON_TOLERANCE = 0.0011f; + public JstatResults(ToolResults rawResults) { super(rawResults); } @@ -110,38 +112,61 @@ abstract public class JstatResults extends ToolResults { * space has been utilized */ public static void assertSpaceUtilization(JstatResults measurement, float targetMemoryUsagePercent) { + assertSpaceUtilization(measurement, targetMemoryUsagePercent, targetMemoryUsagePercent); + } + + /** + * Helper function to assert the utilization of the space + * + * @param measurement - measurement results to analyze + * @param targetMetaspaceUsagePercent -assert that not less than this amount + * of metaspace has been utilized + * @param targetOldSpaceUsagePercent -assert that not less than this amount + * of old space has been utilized + */ + public static void assertSpaceUtilization(JstatResults measurement, float targetMetaspaceUsagePercent, + float targetOldSpaceUsagePercent) { if (measurement.valueExists("OU")) { float OC = measurement.getFloatValue("OC"); float OU = measurement.getFloatValue("OU"); - assertThat((OU / OC) > targetMemoryUsagePercent, "Old space utilization should be > " - + (targetMemoryUsagePercent * 100) + "%, actually OU / OC = " + (OU / OC)); + assertThat((OU / OC) > targetOldSpaceUsagePercent, "Old space utilization should be > " + + (targetOldSpaceUsagePercent * 100) + "%, actually OU / OC = " + (OU / OC)); } if (measurement.valueExists("MU")) { float MC = measurement.getFloatValue("MC"); float MU = measurement.getFloatValue("MU"); - assertThat((MU / MC) > targetMemoryUsagePercent, "Metaspace utilization should be > " - + (targetMemoryUsagePercent * 100) + "%, actually MU / MC = " + (MU / MC)); + assertThat((MU / MC) > targetMetaspaceUsagePercent, "Metaspace utilization should be > " + + (targetMetaspaceUsagePercent * 100) + "%, actually MU / MC = " + (MU / MC)); } if (measurement.valueExists("O")) { float O = measurement.getFloatValue("O"); - assertThat(O > targetMemoryUsagePercent * 100, "Old space utilization should be > " - + (targetMemoryUsagePercent * 100) + "%, actually O = " + O); + assertThat(O > targetOldSpaceUsagePercent * 100, "Old space utilization should be > " + + (targetOldSpaceUsagePercent * 100) + "%, actually O = " + O); } if (measurement.valueExists("M")) { float M = measurement.getFloatValue("M"); - assertThat(M > targetMemoryUsagePercent * 100, "Metaspace utilization should be > " - + (targetMemoryUsagePercent * 100) + "%, actually M = " + M); + assertThat(M > targetMetaspaceUsagePercent * 100, "Metaspace utilization should be > " + + (targetMetaspaceUsagePercent * 100) + "%, actually M = " + M); } } - private static void assertThat(boolean result, String message) { + public static void assertThat(boolean result, String message) { if (!result) { throw new RuntimeException(message); } } + public static boolean checkFloatIsSum(float sum, float... floats) { + for (float f : floats) { + sum -= f; + } + + return Math.abs(sum) <= FLOAT_COMPARISON_TOLERANCE; + } + + abstract public void assertConsistency(); } From 104239fe8f5279de379360d4dbe135c6c60cbc0d Mon Sep 17 00:00:00 2001 From: Matthias Baesken Date: Fri, 3 Feb 2017 12:26:10 +0100 Subject: [PATCH 006/447] 8173825: Adjust the comment for flags UseAES, UseFMA, UseSHA in globals.hpp Reviewed-by: kvn, clanger --- hotspot/src/share/vm/runtime/globals.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp index 90b274e58a2..5282a6b9e17 100644 --- a/hotspot/src/share/vm/runtime/globals.hpp +++ b/hotspot/src/share/vm/runtime/globals.hpp @@ -657,14 +657,13 @@ public: range(0, 99) \ \ product(bool, UseAES, false, \ - "Control whether AES instructions can be used on x86/x64") \ + "Control whether AES instructions are used when available") \ \ product(bool, UseFMA, false, \ - "Control whether FMA instructions can be used") \ + "Control whether FMA instructions are used when available") \ \ product(bool, UseSHA, false, \ - "Control whether SHA instructions can be used " \ - "on SPARC, on ARM and on x86") \ + "Control whether SHA instructions are used when available") \ \ diagnostic(bool, UseGHASHIntrinsics, false, \ "Use intrinsics for GHASH versions of crypto") \ From 6f2cad0c0c244db76614d9db5cb7007ca30e9ee6 Mon Sep 17 00:00:00 2001 From: Jamsheed Mohammed C M Date: Fri, 3 Feb 2017 19:26:35 -0800 Subject: [PATCH 007/447] 8173679: Disable ProfileTrap code and UseRTMLocking in emulated client Win32 Disabled mdo trap count update on deopt, and made +UseRTMLocking to exit. Reviewed-by: kvn --- hotspot/src/cpu/x86/vm/vm_version_x86.cpp | 6 ++++++ hotspot/src/share/vm/runtime/deoptimization.cpp | 2 +- .../compiler/testlibrary/rtm/predicate/SupportedVM.java | 2 +- hotspot/test/compiler/types/correctness/OffTest.java | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp index 7bed10749f7..bba96562031 100644 --- a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp +++ b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp @@ -850,6 +850,12 @@ void VM_Version::get_processor_features() { #if INCLUDE_RTM_OPT if (UseRTMLocking) { + if (is_client_compilation_mode_vm()) { + // Only C2 does RTM locking optimization. + // Can't continue because UseRTMLocking affects UseBiasedLocking flag + // setting during arguments processing. See use_biased_locking(). + vm_exit_during_initialization("RTM locking optimization is not supported in emulated client VM"); + } if (is_intel_family_core()) { if ((_model == CPU_MODEL_HASWELL_E3) || (_model == CPU_MODEL_HASWELL_E7 && _stepping < 3) || diff --git a/hotspot/src/share/vm/runtime/deoptimization.cpp b/hotspot/src/share/vm/runtime/deoptimization.cpp index 5ce9f345809..a656e89643a 100644 --- a/hotspot/src/share/vm/runtime/deoptimization.cpp +++ b/hotspot/src/share/vm/runtime/deoptimization.cpp @@ -1813,7 +1813,7 @@ JRT_ENTRY(void, Deoptimization::uncommon_trap_inner(JavaThread* thread, jint tra // aggressive optimization. bool inc_recompile_count = false; ProfileData* pdata = NULL; - if (ProfileTraps && update_trap_state && trap_mdo != NULL) { + if (ProfileTraps && !is_client_compilation_mode_vm() && update_trap_state && trap_mdo != NULL) { assert(trap_mdo == get_method_data(thread, profiled_method, false), "sanity"); uint this_trap_count = 0; bool maybe_prior_trap = false; diff --git a/hotspot/test/compiler/testlibrary/rtm/predicate/SupportedVM.java b/hotspot/test/compiler/testlibrary/rtm/predicate/SupportedVM.java index f4958a607c2..fee36b9e5c1 100644 --- a/hotspot/test/compiler/testlibrary/rtm/predicate/SupportedVM.java +++ b/hotspot/test/compiler/testlibrary/rtm/predicate/SupportedVM.java @@ -30,6 +30,6 @@ import java.util.function.BooleanSupplier; public class SupportedVM implements BooleanSupplier { @Override public boolean getAsBoolean() { - return Platform.isServer(); + return Platform.isServer() && !Platform.isEmulatedClient(); } } diff --git a/hotspot/test/compiler/types/correctness/OffTest.java b/hotspot/test/compiler/types/correctness/OffTest.java index 7593fc68a0d..5a8fe5953ac 100644 --- a/hotspot/test/compiler/types/correctness/OffTest.java +++ b/hotspot/test/compiler/types/correctness/OffTest.java @@ -24,6 +24,7 @@ /* * @test CorrectnessTest * @bug 8038418 + * @requires vm.flavor == "server" & !vm.emulatedClient * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management From a7f34a32959b5fd827c059bbac73c38c384f70c7 Mon Sep 17 00:00:00 2001 From: Oleg Pliss Date: Mon, 6 Feb 2017 08:32:08 +0100 Subject: [PATCH 008/447] 8173119: compiler/jvmci/events/JvmciNotifyBootstrapFinishedEventTest.java fails with custom Tiered Level set externally Check for invalid JVMCI flag combination at startup. Reviewed-by: kvn, thartmann --- hotspot/src/share/vm/runtime/arguments.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp index 168d5ce6ea4..15d010dcb53 100644 --- a/hotspot/src/share/vm/runtime/arguments.cpp +++ b/hotspot/src/share/vm/runtime/arguments.cpp @@ -1894,6 +1894,11 @@ void Arguments::set_jvmci_specific_flags() { if (FLAG_IS_DEFAULT(NewSizeThreadIncrease)) { FLAG_SET_DEFAULT(NewSizeThreadIncrease, 4*K); } + if (TieredStopAtLevel != CompLevel_full_optimization) { + // Currently JVMCI compiler can only work at the full optimization level + warning("forcing TieredStopAtLevel to full optimization because JVMCI is enabled"); + TieredStopAtLevel = CompLevel_full_optimization; + } if (FLAG_IS_DEFAULT(TypeProfileLevel)) { FLAG_SET_DEFAULT(TypeProfileLevel, 0); } @@ -2506,8 +2511,8 @@ bool Arguments::check_vm_args_consistency() { } #endif } -#if INCLUDE_JVMCI +#if INCLUDE_JVMCI status = status && check_jvmci_args_consistency(); if (EnableJVMCI) { From 47960ed2aa463c52e4f087b5b8dc5e74c374b2a4 Mon Sep 17 00:00:00 2001 From: Doug Simon Date: Mon, 6 Feb 2017 10:45:11 +0100 Subject: [PATCH 009/447] 8173912: [JVMCI] fix memory overhead of JVMCI Reviewed-by: kvn --- hotspot/.mx.jvmci/mx_jvmci.py | 64 +--- .../src/jdk/vm/ci/hotspot/CompilerToVM.java | 19 +- .../vm/ci/hotspot/HotSpotConstantPool.java | 17 +- .../vm/ci/hotspot/HotSpotJVMCIRuntime.java | 4 - .../src/jdk/vm/ci/hotspot/HotSpotMethod.java | 11 - .../ci/hotspot/HotSpotMethodUnresolved.java | 8 +- .../hotspot/HotSpotResolvedJavaFieldImpl.java | 22 +- .../HotSpotResolvedJavaMethodImpl.java | 45 ++- .../HotSpotResolvedObjectTypeImpl.java | 222 ++++++------- .../jdk/vm/ci/hotspot/HotSpotVMConfig.java | 13 +- .../vm/ci/hotspot/HotSpotVMConfigAccess.java | 38 +-- .../vm/ci/hotspot/HotSpotVMConfigStore.java | 31 +- .../hotspot/GraalHotSpotVMConfig.java | 10 +- .../src/share/vm/jvmci/jvmciCompilerToVM.cpp | 310 +++++++++++++----- .../src/share/vm/jvmci/jvmciCompilerToVM.hpp | 28 +- .../src/share/vm/jvmci/vmStructs_jvmci.cpp | 13 +- .../jdk/vm/ci/hotspot/CompilerToVMHelper.java | 6 +- .../compilerToVM/ConstantPoolTestCase.java | 6 +- .../compilerToVM/ConstantPoolTestsHelper.java | 4 +- .../jvmci/compilerToVM/GetFlagValueTest.java | 93 ++++++ .../compilerToVM/ResolveFieldInPoolTest.java | 8 +- 21 files changed, 589 insertions(+), 383 deletions(-) create mode 100644 hotspot/test/compiler/jvmci/compilerToVM/GetFlagValueTest.java diff --git a/hotspot/.mx.jvmci/mx_jvmci.py b/hotspot/.mx.jvmci/mx_jvmci.py index daa27f5d607..b87bab712a2 100644 --- a/hotspot/.mx.jvmci/mx_jvmci.py +++ b/hotspot/.mx.jvmci/mx_jvmci.py @@ -158,8 +158,8 @@ To build hotspot and import it into the JDK: "mx make hotspot import-hotspot" # JDK9 must be bootstrapped with a JDK8 compliance = mx.JavaCompliance('8') jdk8 = mx.get_jdk(compliance.exactMatch, versionDescription=compliance.value) - cmd = ['sh', 'configure', '--with-debug-level=' + _vm.debugLevel, '--with-native-debug-symbols=external', '--disable-precompiled-headers', - '--with-jvm-variants=' + _vm.jvmVariant, '--disable-warnings-as-errors', '--with-boot-jdk=' + jdk8.home] + cmd = ['sh', 'configure', '--with-debug-level=' + _vm.debugLevel, '--with-native-debug-symbols=external', '--disable-precompiled-headers', '--with-jvm-features=graal', + '--with-jvm-variants=' + _vm.jvmVariant, '--disable-warnings-as-errors', '--with-boot-jdk=' + jdk8.home, '--with-jvm-features=graal'] mx.run(cmd, cwd=_jdkSourceRoot) cmd = [mx.gmake_cmd(), 'CONF=' + _vm.debugLevel] if mx.get_opts().verbose: @@ -176,66 +176,6 @@ To build hotspot and import it into the JDK: "mx make hotspot import-hotspot" mx.run(cmd, cwd=_jdkSourceRoot) - if 'images' in cmd: - jdkImageDir = join(jdkBuildDir, 'images', 'jdk') - - # The OpenJDK build creates an empty cacerts file so copy one from - # the default JDK (which is assumed to be an OracleJDK) - srcCerts = join(mx.get_jdk(tag='default').home, 'lib', 'security', 'cacerts') - if not exists(srcCerts): - # Might be building with JDK8 which has cacerts under jre/ - srcCerts = join(mx.get_jdk(tag='default').home, 'jre', 'lib', 'security', 'cacerts') - dstCerts = join(jdkImageDir, 'lib', 'security', 'cacerts') - if srcCerts != dstCerts: - shutil.copyfile(srcCerts, dstCerts) - - _create_jdk_bundle(jdkBuildDir, _vm.debugLevel, jdkImageDir) - -def _get_jdk_bundle_arches(): - """ - Gets a list of names that will be the part of a JDK bundle's file name denoting the architecture. - The first element in the list is the canonical name. Symlinks should be created for the - remaining names. - """ - cpu = mx.get_arch() - if cpu == 'amd64': - return ['x64', 'x86_64', 'amd64'] - elif cpu == 'sparcv9': - return ['sparcv9'] - mx.abort('Unsupported JDK bundle arch: ' + cpu) - -def _create_jdk_bundle(jdkBuildDir, debugLevel, jdkImageDir): - """ - Creates a tar.gz JDK archive, an accompanying tar.gz.sha1 file with its - SHA1 signature plus symlinks to the archive for non-canonical architecture names. - """ - - arches = _get_jdk_bundle_arches() - jdkTgzPath = join(_suite.get_output_root(), 'jdk-bundles', 'jdk9-{}-{}-{}.tar.gz'.format(debugLevel, _get_openjdk_os(), arches[0])) - with mx.Archiver(jdkTgzPath, kind='tgz') as arc: - mx.log('Creating ' + jdkTgzPath) - for root, _, filenames in os.walk(jdkImageDir): - for name in filenames: - f = join(root, name) - arcname = 'jdk1.9.0/' + os.path.relpath(f, jdkImageDir) - arc.zf.add(name=f, arcname=arcname, recursive=False) - - with open(jdkTgzPath + '.sha1', 'w') as fp: - mx.log('Creating ' + jdkTgzPath + '.sha1') - fp.write(mx.sha1OfFile(jdkTgzPath)) - - def _create_link(source, link_name): - if exists(link_name): - os.remove(link_name) - mx.log('Creating ' + link_name + ' -> ' + source) - os.symlink(source, link_name) - - for arch in arches[1:]: - link_name = join(_suite.get_output_root(), 'jdk-bundles', 'jdk9-{}-{}-{}.tar.gz'.format(debugLevel, _get_openjdk_os(), arch)) - jdkTgzName = os.path.basename(jdkTgzPath) - _create_link(jdkTgzName, link_name) - _create_link(jdkTgzName + '.sha1', link_name + '.sha1') - def _runmultimake(args): """run the JDK make process for one or more configurations""" diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java index e0b5acb426f..a5c0c7c3b62 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java +++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java @@ -278,8 +278,10 @@ final class CompilerToVM { * {@code info} are: * *
-     *     [(int) flags,   // only valid if field is resolved
-     *      (int) offset]  // only valid if field is resolved
+     *     [ flags,  // fieldDescriptor::access_flags()
+     *       offset, // fieldDescriptor::offset()
+     *       index   // fieldDescriptor::index()
+     *     ]
      * 
* * The behavior of this method is undefined if {@code cpi} does not denote a @@ -288,7 +290,7 @@ final class CompilerToVM { * @param info an array in which the details of the field are returned * @return the type defining the field if resolution is successful, 0 otherwise */ - native HotSpotResolvedObjectTypeImpl resolveFieldInPool(HotSpotConstantPool constantPool, int cpi, HotSpotResolvedJavaMethodImpl method, byte opcode, long[] info); + native HotSpotResolvedObjectTypeImpl resolveFieldInPool(HotSpotConstantPool constantPool, int cpi, HotSpotResolvedJavaMethodImpl method, byte opcode, int[] info); /** * Converts {@code cpci} from an index into the cache for {@code constantPool} to an index @@ -631,4 +633,15 @@ final class CompilerToVM { * {@code lambdaForm} (which must be a {@code java.lang.invoke.LambdaForm} instance). */ native void compileToBytecode(Object lambdaForm); + + /** + * Gets the value of the VM flag named {@code name}. + * + * @param name name of a VM option + * @return {@code this} if the named VM option doesn't exist, a {@link String} or {@code null} + * if its type is {@code ccstr} or {@code ccstrlist}, a {@link Double} if its type is + * {@code double}, a {@link Boolean} if its type is {@code bool} otherwise a + * {@link Long} + */ + native Object getFlagValue(String name); } diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java index 957f66516b9..d88a8468e73 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java +++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java @@ -298,7 +298,7 @@ final class HotSpotConstantPool implements ConstantPool, MetaspaceWrapperObject * @param index constant pool index * @return constant pool entry */ - private long getEntryAt(int index) { + long getEntryAt(int index) { assert checkBounds(index); int offset = index * runtime().getHostJVMCIBackend().getTarget().wordSize; return UNSAFE.getAddress(getMetaspaceConstantPool() + config().constantPoolSize + offset); @@ -605,8 +605,6 @@ final class HotSpotConstantPool implements ConstantPool, MetaspaceWrapperObject public JavaField lookupField(int cpi, ResolvedJavaMethod method, int opcode) { final int index = rawIndexToConstantPoolIndex(cpi, opcode); final int nameAndTypeIndex = getNameAndTypeRefIndexAt(index); - final int nameIndex = getNameRefIndexAt(nameAndTypeIndex); - String name = lookupUtf8(nameIndex); final int typeIndex = getSignatureRefIndexAt(nameAndTypeIndex); String typeName = lookupUtf8(typeIndex); JavaType type = runtime().lookupType(typeName, getHolder(), false); @@ -615,7 +613,7 @@ final class HotSpotConstantPool implements ConstantPool, MetaspaceWrapperObject JavaType holder = lookupType(holderIndex, opcode); if (holder instanceof HotSpotResolvedObjectTypeImpl) { - long[] info = new long[2]; + int[] info = new int[3]; HotSpotResolvedObjectTypeImpl resolvedHolder; try { resolvedHolder = compilerToVM().resolveFieldInPool(this, index, (HotSpotResolvedJavaMethodImpl) method, (byte) opcode, info); @@ -624,14 +622,15 @@ final class HotSpotConstantPool implements ConstantPool, MetaspaceWrapperObject * If there was an exception resolving the field we give up and return an unresolved * field. */ - return new HotSpotUnresolvedField(holder, name, type); + return new HotSpotUnresolvedField(holder, lookupUtf8(getNameRefIndexAt(nameAndTypeIndex)), type); } - final int flags = (int) info[0]; - final long offset = info[1]; - HotSpotResolvedJavaField result = resolvedHolder.createField(name, type, offset, flags); + final int flags = info[0]; + final int offset = info[1]; + final int fieldIndex = info[2]; + HotSpotResolvedJavaField result = resolvedHolder.createField(type, offset, flags, fieldIndex); return result; } else { - return new HotSpotUnresolvedField(holder, name, type); + return new HotSpotUnresolvedField(holder, lookupUtf8(getNameRefIndexAt(nameAndTypeIndex)), type); } } diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java index f6c97ecb07f..b687ab5a367 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java +++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java @@ -513,10 +513,6 @@ public final class HotSpotJVMCIRuntime implements HotSpotJVMCIRuntimeProvider { for (Map.Entry e : constants.entrySet()) { printConfigLine(vm, "[vmconfig:constant] %s = %d[0x%x]%n", e.getKey(), e.getValue(), e.getValue()); } - TreeMap typeSizes = new TreeMap<>(store.getTypeSizes()); - for (Map.Entry e : typeSizes.entrySet()) { - printConfigLine(vm, "[vmconfig:type size] %s = %d%n", e.getKey(), e.getValue()); - } for (VMIntrinsicMethod e : store.getIntrinsics()) { printConfigLine(vm, "[vmconfig:intrinsic] %d = %s.%s %s%n", e.id, e.declaringClass, e.name, e.descriptor); } diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethod.java b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethod.java index da04107bc1a..aca3b3ddb4d 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethod.java +++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethod.java @@ -59,23 +59,12 @@ abstract class HotSpotMethod implements JavaMethod, Formattable { return res; } - protected String name; - /** * Controls whether {@link #toString()} includes the qualified or simple name of the class in * which the method is declared. */ public static final boolean FULLY_QUALIFIED_METHOD_NAME = false; - protected HotSpotMethod(String name) { - this.name = name; - } - - @Override - public final String getName() { - return name; - } - @Override public final String toString() { char h = FULLY_QUALIFIED_METHOD_NAME ? 'H' : 'h'; diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodUnresolved.java b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodUnresolved.java index e68c7fef8c1..7eb437929c3 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodUnresolved.java +++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodUnresolved.java @@ -31,15 +31,21 @@ import jdk.vm.ci.meta.Signature; */ final class HotSpotMethodUnresolved extends HotSpotMethod { + private final String name; private final Signature signature; protected JavaType holder; HotSpotMethodUnresolved(String name, Signature signature, JavaType holder) { - super(name); + this.name = name; this.holder = holder; this.signature = signature; } + @Override + public String getName() { + return name; + } + @Override public Signature getSignature() { return signature; diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java index 24287261984..737135a8e52 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java +++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,19 +38,20 @@ import jdk.vm.ci.meta.ResolvedJavaType; class HotSpotResolvedJavaFieldImpl implements HotSpotResolvedJavaField { private final HotSpotResolvedObjectTypeImpl holder; - private final String name; private JavaType type; private final int offset; + private final short index; /** * This value contains all flags as stored in the VM including internal ones. */ private final int modifiers; - HotSpotResolvedJavaFieldImpl(HotSpotResolvedObjectTypeImpl holder, String name, JavaType type, long offset, int modifiers) { + HotSpotResolvedJavaFieldImpl(HotSpotResolvedObjectTypeImpl holder, JavaType type, long offset, int modifiers, int index) { this.holder = holder; - this.name = name; this.type = type; + this.index = (short) index; + assert this.index == index; assert offset != -1; assert offset == (int) offset : "offset larger than int"; this.offset = (int) offset; @@ -67,7 +68,6 @@ class HotSpotResolvedJavaFieldImpl implements HotSpotResolvedJavaField { if (that.offset != this.offset || that.isStatic() != this.isStatic()) { return false; } else if (this.holder.equals(that.holder)) { - assert this.name.equals(that.name) && this.type.equals(that.type); return true; } } @@ -76,7 +76,7 @@ class HotSpotResolvedJavaFieldImpl implements HotSpotResolvedJavaField { @Override public int hashCode() { - return name.hashCode(); + return offset ^ modifiers; } @Override @@ -109,7 +109,7 @@ class HotSpotResolvedJavaFieldImpl implements HotSpotResolvedJavaField { @Override public String getName() { - return name; + return holder.createFieldInfo(index).getName(); } @Override @@ -178,18 +178,12 @@ class HotSpotResolvedJavaFieldImpl implements HotSpotResolvedJavaField { return null; } - private Field toJavaCache; - private Field toJava() { - if (toJavaCache != null) { - return toJavaCache; - } - if (isInternal()) { return null; } try { - return toJavaCache = holder.mirror().getDeclaredField(name); + return holder.mirror().getDeclaredField(getName()); } catch (NoSuchFieldException | NoClassDefFoundError e) { return null; } diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java index 393b740a71e..f831db4c5f9 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java +++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -75,6 +75,12 @@ final class HotSpotResolvedJavaMethodImpl extends HotSpotMethod implements HotSp private byte[] code; private Executable toJavaCache; + /** + * Only 30% of {@link HotSpotResolvedJavaMethodImpl}s have their name accessed so compute it + * lazily and cache it. + */ + private String nameCache; + /** * Gets the holder of a HotSpot metaspace method native object. * @@ -106,8 +112,6 @@ final class HotSpotResolvedJavaMethodImpl extends HotSpotMethod implements HotSp } HotSpotResolvedJavaMethodImpl(HotSpotResolvedObjectTypeImpl holder, long metaspaceMethod) { - // It would be too much work to get the method name here so we fill it in later. - super(null); this.metaspaceMethod = metaspaceMethod; this.holder = holder; @@ -126,9 +130,6 @@ final class HotSpotResolvedJavaMethodImpl extends HotSpotMethod implements HotSp this.constantPool = compilerToVM().getConstantPool(this); } - final int nameIndex = UNSAFE.getChar(constMethod + config.constMethodNameIndexOffset); - this.name = constantPool.lookupUtf8(nameIndex); - final int signatureIndex = UNSAFE.getChar(constMethod + config.constMethodSignatureIndexOffset); this.signature = (HotSpotSignature) constantPool.lookupSignature(signatureIndex); } @@ -146,6 +147,15 @@ final class HotSpotResolvedJavaMethodImpl extends HotSpotMethod implements HotSp return UNSAFE.getAddress(metaspaceMethod + config().methodConstMethodOffset); } + @Override + public String getName() { + if (nameCache == null) { + final int nameIndex = UNSAFE.getChar(getConstMethod() + config().constMethodNameIndexOffset); + nameCache = constantPool.lookupUtf8(nameIndex); + } + return nameCache; + } + @Override public boolean equals(Object obj) { if (this == obj) { @@ -326,12 +336,24 @@ final class HotSpotResolvedJavaMethodImpl extends HotSpotMethod implements HotSp @Override public boolean isClassInitializer() { - return "".equals(name) && isStatic(); + if (isStatic()) { + final int nameIndex = UNSAFE.getChar(getConstMethod() + config().constMethodNameIndexOffset); + long nameSymbol = constantPool.getEntryAt(nameIndex); + long clinitSymbol = config().symbolClinit; + return nameSymbol == clinitSymbol; + } + return false; } @Override public boolean isConstructor() { - return "".equals(name) && !isStatic(); + if (!isStatic()) { + final int nameIndex = UNSAFE.getChar(getConstMethod() + config().constMethodNameIndexOffset); + long nameSymbol = constantPool.getEntryAt(nameIndex); + long initSymbol = config().symbolInit; + return nameSymbol == initSymbol; + } + return false; } @Override @@ -472,7 +494,7 @@ final class HotSpotResolvedJavaMethodImpl extends HotSpotMethod implements HotSp @Override public Annotation[][] getParameterAnnotations() { Executable javaMethod = toJava(); - return javaMethod == null ? null : javaMethod.getParameterAnnotations(); + return javaMethod == null ? new Annotation[signature.getParameterCount(false)][0] : javaMethod.getParameterAnnotations(); } @Override @@ -513,9 +535,6 @@ final class HotSpotResolvedJavaMethodImpl extends HotSpotMethod implements HotSp } public boolean isDefault() { - if (isConstructor()) { - return false; - } // Copied from java.lang.Method.isDefault() int mask = Modifier.ABSTRACT | Modifier.PUBLIC | Modifier.STATIC; return ((getModifiers() & mask) == Modifier.PUBLIC) && getDeclaringClass().isInterface(); @@ -562,7 +581,7 @@ final class HotSpotResolvedJavaMethodImpl extends HotSpotMethod implements HotSp } else { // Do not use Method.getDeclaredMethod() as it can return a bridge method // when this.isBridge() is false and vice versa. - result = searchMethods(holder.mirror().getDeclaredMethods(), name, returnType, parameterTypes); + result = searchMethods(holder.mirror().getDeclaredMethods(), getName(), returnType, parameterTypes); } toJavaCache = result; return result; diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java index a0a3bc7a7a5..88974c3b415 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java +++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,8 +36,6 @@ import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.nio.ByteOrder; -import java.util.ArrayList; -import java.util.Arrays; import java.util.HashMap; import jdk.vm.ci.common.JVMCIError; @@ -59,12 +57,15 @@ import jdk.vm.ci.meta.ResolvedJavaType; */ final class HotSpotResolvedObjectTypeImpl extends HotSpotResolvedJavaType implements HotSpotResolvedObjectType, MetaspaceWrapperObject { + private static final HotSpotResolvedJavaField[] NO_FIELDS = new HotSpotResolvedJavaField[0]; + private static final int METHOD_CACHE_ARRAY_CAPACITY = 8; + /** * The Java class this type represents. */ private final Class javaClass; - private HashMap fieldCache; - private HashMap methodCache; + private HotSpotResolvedJavaMethodImpl[] methodCacheArray; + private HashMap methodCacheHashMap; private HotSpotResolvedJavaField[] instanceFields; private HotSpotResolvedObjectTypeImpl[] interfaces; private HotSpotConstantPool constantPool; @@ -255,7 +256,7 @@ final class HotSpotResolvedObjectTypeImpl extends HotSpotResolvedJavaType implem * @return true if the type is a leaf class */ private boolean isLeafClass() { - return getSubklass() == null; + return UNSAFE.getLong(this.getMetaspaceKlass() + config().subklassOffset) == 0; } /** @@ -484,18 +485,38 @@ final class HotSpotResolvedObjectTypeImpl extends HotSpotResolvedJavaType implem } synchronized HotSpotResolvedJavaMethod createMethod(long metaspaceMethod) { - HotSpotResolvedJavaMethodImpl method = null; - if (methodCache == null) { - methodCache = new HashMap<>(8); + // Maintain cache as array. + if (methodCacheArray == null) { + methodCacheArray = new HotSpotResolvedJavaMethodImpl[METHOD_CACHE_ARRAY_CAPACITY]; + } + + int i = 0; + for (; i < methodCacheArray.length; ++i) { + HotSpotResolvedJavaMethodImpl curMethod = methodCacheArray[i]; + if (curMethod == null) { + HotSpotResolvedJavaMethodImpl newMethod = new HotSpotResolvedJavaMethodImpl(this, metaspaceMethod); + methodCacheArray[i] = newMethod; + context.add(newMethod); + return newMethod; + } else if (curMethod.getMetaspacePointer() == metaspaceMethod) { + return curMethod; + } + } + + // Fall-back to hash table. + if (methodCacheHashMap == null) { + methodCacheHashMap = new HashMap<>(); + } + + HotSpotResolvedJavaMethodImpl lookupResult = methodCacheHashMap.get(metaspaceMethod); + if (lookupResult == null) { + HotSpotResolvedJavaMethodImpl newMethod = new HotSpotResolvedJavaMethodImpl(this, metaspaceMethod); + methodCacheHashMap.put(metaspaceMethod, newMethod); + context.add(lookupResult); + return newMethod; } else { - method = methodCache.get(metaspaceMethod); + return lookupResult; } - if (method == null) { - method = new HotSpotResolvedJavaMethodImpl(this, metaspaceMethod); - methodCache.put(metaspaceMethod, method); - context.add(method); - } - return method; } public int getVtableLength() { @@ -509,37 +530,8 @@ final class HotSpotResolvedObjectTypeImpl extends HotSpotResolvedJavaType implem return result; } - synchronized HotSpotResolvedJavaField createField(String fieldName, JavaType type, long offset, int rawFlags) { - HotSpotResolvedJavaField result = null; - - final int flags = rawFlags & HotSpotModifiers.jvmFieldModifiers(); - - final long id = offset + ((long) flags << 32); - - // Must cache the fields, because the local load elimination only works if the - // objects from two field lookups are identical. - if (fieldCache == null) { - fieldCache = new HashMap<>(8); - } else { - result = fieldCache.get(id); - } - - if (result == null) { - result = new HotSpotResolvedJavaFieldImpl(this, fieldName, type, offset, rawFlags); - fieldCache.put(id, result); - } else { - assert result.getName().equals(fieldName); - /* - * Comparing the types directly is too strict, because the type in the cache could be - * resolved while the incoming type is unresolved. The name comparison is sufficient - * because the type will always be resolved in the context of the holder. - */ - assert result.getType().getName().equals(type.getName()); - assert result.offset() == offset; - assert result.getModifiers() == flags; - } - - return result; + synchronized HotSpotResolvedJavaField createField(JavaType type, long offset, int rawFlags, int index) { + return new HotSpotResolvedJavaFieldImpl(this, type, offset, rawFlags, index); } @Override @@ -577,11 +569,15 @@ final class HotSpotResolvedObjectTypeImpl extends HotSpotResolvedJavaType implem return null; } + FieldInfo createFieldInfo(int index) { + return new FieldInfo(index); + } + /** * This class represents the field information for one field contained in the fields array of an * {@code InstanceKlass}. The implementation is similar to the native {@code FieldInfo} class. */ - private class FieldInfo { + class FieldInfo { /** * Native pointer into the array of Java shorts. */ @@ -666,61 +662,31 @@ final class HotSpotResolvedObjectTypeImpl extends HotSpotResolvedJavaType implem } } - @SuppressFBWarnings(value = "SE_COMPARATOR_SHOULD_BE_SERIALIZABLE", justification = "comparator is only used transiently") - private static class OffsetComparator implements java.util.Comparator { - @Override - public int compare(HotSpotResolvedJavaField o1, HotSpotResolvedJavaField o2) { - return o1.offset() - o2.offset(); - } - } - @Override public ResolvedJavaField[] getInstanceFields(boolean includeSuperclasses) { if (instanceFields == null) { if (isArray() || isInterface()) { - instanceFields = new HotSpotResolvedJavaField[0]; + instanceFields = NO_FIELDS; } else { - final int fieldCount = getFieldCount(); - ArrayList fieldsArray = new ArrayList<>(fieldCount); - - for (int i = 0; i < fieldCount; i++) { - FieldInfo field = new FieldInfo(i); - - // We are only interested in instance fields. - if (!field.isStatic()) { - HotSpotResolvedJavaField resolvedJavaField = createField(field.getName(), field.getType(), field.getOffset(), field.getAccessFlags()); - fieldsArray.add(resolvedJavaField); - } + HotSpotResolvedJavaField[] prepend = NO_FIELDS; + if (getSuperclass() != null) { + prepend = (HotSpotResolvedJavaField[]) getSuperclass().getInstanceFields(true); } - - fieldsArray.sort(new OffsetComparator()); - - HotSpotResolvedJavaField[] myFields = fieldsArray.toArray(new HotSpotResolvedJavaField[0]); - - if (mirror() != Object.class) { - HotSpotResolvedJavaField[] superFields = (HotSpotResolvedJavaField[]) getSuperclass().getInstanceFields(true); - HotSpotResolvedJavaField[] fields = Arrays.copyOf(superFields, superFields.length + myFields.length); - System.arraycopy(myFields, 0, fields, superFields.length, myFields.length); - instanceFields = fields; - } else { - assert myFields.length == 0 : "java.lang.Object has fields!"; - instanceFields = myFields; - } - + instanceFields = getFields(false, prepend); } } - if (!includeSuperclasses) { - int myFieldsStart = 0; - while (myFieldsStart < instanceFields.length && !instanceFields[myFieldsStart].getDeclaringClass().equals(this)) { - myFieldsStart++; + if (!includeSuperclasses && getSuperclass() != null) { + int superClassFieldCount = getSuperclass().getInstanceFields(true).length; + if (superClassFieldCount == instanceFields.length) { + // This class does not have any instance fields of its own. + return NO_FIELDS; + } else if (superClassFieldCount != 0) { + HotSpotResolvedJavaField[] result = new HotSpotResolvedJavaField[instanceFields.length - superClassFieldCount]; + System.arraycopy(instanceFields, superClassFieldCount, result, 0, result.length); + return result; + } else { + // The super classes of this class do not have any instance fields. } - if (myFieldsStart == 0) { - return instanceFields; - } - if (myFieldsStart == instanceFields.length) { - return new HotSpotResolvedJavaField[0]; - } - return Arrays.copyOfRange(instanceFields, myFieldsStart, instanceFields.length); } return instanceFields; } @@ -730,45 +696,63 @@ final class HotSpotResolvedObjectTypeImpl extends HotSpotResolvedJavaType implem if (isArray()) { return new HotSpotResolvedJavaField[0]; } else { - final int fieldCount = getFieldCount(); - ArrayList fieldsArray = new ArrayList<>(fieldCount); - - for (int i = 0; i < fieldCount; i++) { - FieldInfo field = new FieldInfo(i); - - // We are only interested in static fields. - if (field.isStatic()) { - HotSpotResolvedJavaField resolvedJavaField = createField(field.getName(), field.getType(), field.getOffset(), field.getAccessFlags()); - fieldsArray.add(resolvedJavaField); - } - } - - fieldsArray.sort(new OffsetComparator()); - return fieldsArray.toArray(new HotSpotResolvedJavaField[fieldsArray.size()]); + return getFields(true, NO_FIELDS); } } /** - * Returns the actual field count of this class's internal {@code InstanceKlass::_fields} array - * by walking the array and discounting the generic signature slots at the end of the array. + * Gets the instance or static fields of this class. * - *

- * See {@code FieldStreamBase::init_generic_signature_start_slot} + * @param retrieveStaticFields specifies whether to return instance or static fields + * @param prepend an array to be prepended to the returned result */ - private int getFieldCount() { + private HotSpotResolvedJavaField[] getFields(boolean retrieveStaticFields, HotSpotResolvedJavaField[] prepend) { HotSpotVMConfig config = config(); final long metaspaceFields = UNSAFE.getAddress(getMetaspaceKlass() + config.instanceKlassFieldsOffset); int metaspaceFieldsLength = UNSAFE.getInt(metaspaceFields + config.arrayU1LengthOffset); - int fieldCount = 0; - - for (int i = 0, index = 0; i < metaspaceFieldsLength; i += config.fieldInfoFieldSlots, index++) { + int resultCount = 0; + int index = 0; + for (int i = 0; i < metaspaceFieldsLength; i += config.fieldInfoFieldSlots, index++) { FieldInfo field = new FieldInfo(index); if (field.hasGenericSignature()) { metaspaceFieldsLength--; } - fieldCount++; + + if (field.isStatic() == retrieveStaticFields) { + resultCount++; + } } - return fieldCount; + + if (resultCount == 0) { + return prepend; + } + + int prependLength = prepend.length; + resultCount += prependLength; + + HotSpotResolvedJavaField[] result = new HotSpotResolvedJavaField[resultCount]; + if (prependLength != 0) { + System.arraycopy(prepend, 0, result, 0, prependLength); + } + + int resultIndex = prependLength; + for (int i = 0; i < index; ++i) { + FieldInfo field = new FieldInfo(i); + if (field.isStatic() == retrieveStaticFields) { + int offset = field.getOffset(); + HotSpotResolvedJavaField resolvedJavaField = createField(field.getType(), offset, field.getAccessFlags(), i); + + // Make sure the result is sorted by offset. + int j; + for (j = resultIndex - 1; j >= prependLength && result[j].offset() > offset; j--) { + result[j + 1] = result[j]; + } + result[j + 1] = resolvedJavaField; + resultIndex++; + } + } + + return result; } @Override diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java index c598f8a6f3f..25f6153f54e 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java +++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java @@ -85,7 +85,7 @@ class HotSpotVMConfig extends HotSpotVMConfigAccess { final int klassLayoutHelperNeutralValue = getConstant("Klass::_lh_neutral_value", Integer.class); final int klassLayoutHelperInstanceSlowPathBit = getConstant("Klass::_lh_instance_slow_path_bit", Integer.class); - final int vtableEntrySize = getTypeSize("vtableEntry"); + final int vtableEntrySize = getFieldValue("CompilerToVM::Data::sizeof_vtableEntry", Integer.class, "int"); final int vtableEntryMethodOffset = getFieldOffset("vtableEntry::_method", Integer.class, "Method*"); final int instanceKlassSourceFileNameIndexOffset = getFieldOffset("InstanceKlass::_source_file_name_index", Integer.class, "u2"); @@ -192,20 +192,20 @@ class HotSpotVMConfig extends HotSpotVMConfigAccess { final int constMethodHasLocalVariableTable = getConstant("ConstMethod::_has_localvariable_table", Integer.class); final int constMethodHasExceptionTable = getConstant("ConstMethod::_has_exception_table", Integer.class); - final int exceptionTableElementSize = getTypeSize("ExceptionTableElement"); + final int exceptionTableElementSize = getFieldValue("CompilerToVM::Data::sizeof_ExceptionTableElement", Integer.class, "int"); final int exceptionTableElementStartPcOffset = getFieldOffset("ExceptionTableElement::start_pc", Integer.class, "u2"); final int exceptionTableElementEndPcOffset = getFieldOffset("ExceptionTableElement::end_pc", Integer.class, "u2"); final int exceptionTableElementHandlerPcOffset = getFieldOffset("ExceptionTableElement::handler_pc", Integer.class, "u2"); final int exceptionTableElementCatchTypeIndexOffset = getFieldOffset("ExceptionTableElement::catch_type_index", Integer.class, "u2"); - final int localVariableTableElementSize = getTypeSize("LocalVariableTableElement"); + final int localVariableTableElementSize = getFieldValue("CompilerToVM::Data::sizeof_LocalVariableTableElement", Integer.class, "int"); final int localVariableTableElementStartBciOffset = getFieldOffset("LocalVariableTableElement::start_bci", Integer.class, "u2"); final int localVariableTableElementLengthOffset = getFieldOffset("LocalVariableTableElement::length", Integer.class, "u2"); final int localVariableTableElementNameCpIndexOffset = getFieldOffset("LocalVariableTableElement::name_cp_index", Integer.class, "u2"); final int localVariableTableElementDescriptorCpIndexOffset = getFieldOffset("LocalVariableTableElement::descriptor_cp_index", Integer.class, "u2"); final int localVariableTableElementSlotOffset = getFieldOffset("LocalVariableTableElement::slot", Integer.class, "u2"); - final int constantPoolSize = getTypeSize("ConstantPool"); + final int constantPoolSize = getFieldValue("CompilerToVM::Data::sizeof_ConstantPool", Integer.class, "int"); final int constantPoolTagsOffset = getFieldOffset("ConstantPool::_tags", Integer.class, "Array*"); final int constantPoolHolderOffset = getFieldOffset("ConstantPool::_pool_holder", Integer.class, "InstanceKlass*"); final int constantPoolLengthOffset = getFieldOffset("ConstantPool::_length", Integer.class, "int"); @@ -237,12 +237,15 @@ class HotSpotVMConfig extends HotSpotVMConfigAccess { final int heapWordSize = getConstant("HeapWordSize", Integer.class); - final int symbolPointerSize = getTypeSize("Symbol*"); + final int symbolPointerSize = getFieldValue("CompilerToVM::Data::sizeof_SymbolPointer", Integer.class, "int"); final long vmSymbolsSymbols = getFieldAddress("vmSymbols::_symbols[0]", "Symbol*"); final int vmSymbolsFirstSID = getConstant("vmSymbols::FIRST_SID", Integer.class); final int vmSymbolsSIDLimit = getConstant("vmSymbols::SID_LIMIT", Integer.class); + final long symbolInit = getFieldValue("CompilerToVM::Data::symbol_init", Long.class); + final long symbolClinit = getFieldValue("CompilerToVM::Data::symbol_clinit", Long.class); + /** * Returns the symbol in the {@code vmSymbols} table at position {@code index} as a * {@link String}. diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java index 9bb538d587b..33a07bcb9a9 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java +++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java @@ -66,21 +66,6 @@ public class HotSpotVMConfigAccess { return getAddress(name, null); } - /** - * Gets the size of a C++ type. - * - * @param name name of the type - * @return the size in bytes of the requested field - * @throws JVMCIError if the field is not present and {@code notPresent} is null - */ - public int getTypeSize(String name) { - Long entry = store.vmTypeSizes.get(name); - if (entry == null) { - throw new JVMCIError("expected VM type not found: " + name); - } - return (int) (long) entry; - } - /** * Gets the value of a C++ constant. * @@ -291,13 +276,24 @@ public class HotSpotVMConfigAccess { */ public T getFlag(String name, Class type, T notPresent) { VMFlag entry = store.vmFlags.get(name); + Object value; + String cppType; if (entry == null) { - if (notPresent != null) { - return notPresent; + // Fall back to VM call + value = store.compilerToVm.getFlagValue(name); + if (value == store.compilerToVm) { + if (notPresent != null) { + return notPresent; + } + throw new JVMCIError("expected VM flag not found: " + name); + } else { + cppType = null; } - throw new JVMCIError("expected VM flag not found: " + name); + } else { + value = entry.value; + cppType = entry.type; } - return type.cast(convertValue(name, type, entry.value, entry.type)); + return type.cast(convertValue(name, type, value, cppType)); } private static Object convertValue(String name, Class toType, Object value, String cppType) throws JVMCIError { @@ -319,6 +315,10 @@ public class HotSpotVMConfigAccess { } else if (value instanceof Long) { return (int) (long) value; } + } else if (toType == String.class) { + if (value == null || value instanceof String) { + return value; + } } else if (toType == Long.class) { return value; } diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigStore.java b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigStore.java index e6f074d948f..c388bbfa7c4 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigStore.java +++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigStore.java @@ -46,15 +46,6 @@ public final class HotSpotVMConfigStore { return Collections.unmodifiableMap(vmAddresses); } - /** - * Gets the C++ type sizes exposed by this object. - * - * @return an unmodifiable map from C++ type names to their sizes in bytes - */ - public Map getTypeSizes() { - return Collections.unmodifiableMap(vmTypeSizes); - } - /** * Gets the C++ constants exposed by this object. * @@ -90,11 +81,11 @@ public final class HotSpotVMConfigStore { } final HashMap vmFields; - final HashMap vmTypeSizes; final HashMap vmConstants; final HashMap vmAddresses; final HashMap vmFlags; final List vmIntrinsics; + final CompilerToVM compilerToVm; /** * Reads the database of VM info. The return value encodes the info in a nested object array @@ -103,7 +94,6 @@ public final class HotSpotVMConfigStore { *

      *     info = [
      *         VMField[] vmFields,
-     *         [String name, Long size, ...] vmTypeSizes,
      *         [String name, Long value, ...] vmConstants,
      *         [String name, Long value, ...] vmAddresses,
      *         VMFlag[] vmFlags
@@ -113,25 +103,24 @@ public final class HotSpotVMConfigStore {
      */
     @SuppressWarnings("try")
     HotSpotVMConfigStore(CompilerToVM compilerToVm) {
+        this.compilerToVm = compilerToVm;
         Object[] data;
         try (InitTimer t = timer("CompilerToVm readConfiguration")) {
             data = compilerToVm.readConfiguration();
         }
-        assert data.length == 6 : data.length;
+        assert data.length == 5 : data.length;
 
         // @formatter:off
         VMField[] vmFieldsInfo    = (VMField[]) data[0];
-        Object[] vmTypesSizesInfo = (Object[])  data[1];
-        Object[] vmConstantsInfo  = (Object[])  data[2];
-        Object[] vmAddressesInfo  = (Object[])  data[3];
-        VMFlag[] vmFlagsInfo      = (VMFlag[])  data[4];
+        Object[] vmConstantsInfo  = (Object[])  data[1];
+        Object[] vmAddressesInfo  = (Object[])  data[2];
+        VMFlag[] vmFlagsInfo      = (VMFlag[])  data[3];
 
         vmFields     = new HashMap<>(vmFieldsInfo.length);
-        vmTypeSizes  = new HashMap<>(vmTypesSizesInfo.length);
         vmConstants  = new HashMap<>(vmConstantsInfo.length);
         vmAddresses  = new HashMap<>(vmAddressesInfo.length);
         vmFlags      = new HashMap<>(vmFlagsInfo.length);
-        vmIntrinsics = Arrays.asList((VMIntrinsicMethod[]) data[5]);
+        vmIntrinsics = Arrays.asList((VMIntrinsicMethod[]) data[4]);
         // @formatter:on
 
         try (InitTimer t = timer("HotSpotVMConfigStore fill maps")) {
@@ -139,12 +128,6 @@ public final class HotSpotVMConfigStore {
                 vmFields.put(vmField.name, vmField);
             }
 
-            for (int i = 0; i < vmTypesSizesInfo.length / 2; i++) {
-                String name = (String) vmTypesSizesInfo[i * 2];
-                Long size = (Long) vmTypesSizesInfo[i * 2 + 1];
-                vmTypeSizes.put(name, size);
-            }
-
             for (int i = 0; i < vmConstantsInfo.length / 2; i++) {
                 String name = (String) vmConstantsInfo[i * 2];
                 Long value = (Long) vmConstantsInfo[i * 2 + 1];
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java b/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java
index 898d688747d..40cd58ce8c2 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java
+++ b/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java
@@ -244,7 +244,7 @@ public class GraalHotSpotVMConfig extends HotSpotVMConfigAccess {
         return (int) (Math.log(objectAlignment) / Math.log(2));
     }
 
-    public final int narrowKlassSize = getTypeSize("narrowKlass");
+    public final int narrowKlassSize = getFieldValue("CompilerToVM::Data::sizeof_narrowKlass", Integer.class, "int");
     public final long narrowKlassBase = getFieldValue("CompilerToVM::Data::Universe_narrow_klass_base", Long.class, "address");
     public final int narrowKlassShift = getFieldValue("CompilerToVM::Data::Universe_narrow_klass_shift", Integer.class, "int");
     public final int logKlassAlignment = getConstant("LogKlassAlignmentInBytes", Integer.class);
@@ -290,7 +290,7 @@ public class GraalHotSpotVMConfig extends HotSpotVMConfigAccess {
         return (layoutHelperArrayTagTypeValue & ~layoutHelperArrayTagObjectValue) << layoutHelperArrayTagShift;
     }
 
-    public final int vtableEntrySize = getTypeSize("vtableEntry");
+    public final int vtableEntrySize = getFieldValue("CompilerToVM::Data::sizeof_vtableEntry", Integer.class, "int");
     public final int vtableEntryMethodOffset = getFieldOffset("vtableEntry::_method", Integer.class, "Method*");
 
     public final int instanceKlassInitStateOffset = getFieldOffset("InstanceKlass::_init_state", Integer.class, "u1");
@@ -302,7 +302,7 @@ public class GraalHotSpotVMConfig extends HotSpotVMConfigAccess {
     public final int instanceKlassStateLinked = getConstant("InstanceKlass::linked", Integer.class);
     public final int instanceKlassStateFullyInitialized = getConstant("InstanceKlass::fully_initialized", Integer.class);
 
-    public final int arrayOopDescSize = getTypeSize("arrayOopDesc");
+    public final int arrayOopDescSize = getFieldValue("CompilerToVM::Data::sizeof_arrayOopDesc", Integer.class, "int");
 
     /**
      * The offset of the array length word in an array object's header.
@@ -496,7 +496,7 @@ public class GraalHotSpotVMConfig extends HotSpotVMConfigAccess {
     public final int compilationLevelFullOptimization = getConstant("CompLevel_full_optimization",
                     Integer.class);
 
-    public final int constantPoolSize = getTypeSize("ConstantPool");
+    public final int constantPoolSize = getFieldValue("CompilerToVM::Data::sizeof_ConstantPool", Integer.class, "int");
     public final int constantPoolLengthOffset = getFieldOffset("ConstantPool::_length",
                     Integer.class, "int");
 
@@ -553,7 +553,7 @@ public class GraalHotSpotVMConfig extends HotSpotVMConfigAccess {
     public final int klassOffset = getFieldValue("java_lang_Class::_klass_offset", Integer.class, "int");
     public final int arrayKlassOffset = getFieldValue("java_lang_Class::_array_klass_offset", Integer.class, "int");
 
-    public final int basicLockSize = getTypeSize("BasicLock");
+    public final int basicLockSize = getFieldValue("CompilerToVM::Data::sizeof_BasicLock", Integer.class, "int");
     public final int basicLockDisplacedHeaderOffset = getFieldOffset("BasicLock::_displaced_header", Integer.class, "markOop");
 
     public final int threadAllocatedBytesOffset = getFieldOffset("Thread::_allocated_bytes", Integer.class, "jlong");
diff --git a/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp b/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp
index 2fe6b45b79e..3734ae14c83 100644
--- a/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp
+++ b/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp
@@ -53,6 +53,7 @@
 #include "runtime/vframe.hpp"
 #include "runtime/vframe_hp.hpp"
 #include "runtime/vmStructs.hpp"
+#include "utilities/resourceHash.hpp"
 
 
 // Entry to native method implementation that transitions current thread to '_thread_in_vm'.
@@ -120,6 +121,15 @@ int CompilerToVM::Data::cardtable_shift;
 
 int CompilerToVM::Data::vm_page_size;
 
+int CompilerToVM::Data::sizeof_vtableEntry = sizeof(vtableEntry);
+int CompilerToVM::Data::sizeof_ExceptionTableElement = sizeof(ExceptionTableElement);
+int CompilerToVM::Data::sizeof_LocalVariableTableElement = sizeof(LocalVariableTableElement);
+int CompilerToVM::Data::sizeof_ConstantPool = sizeof(ConstantPool);
+int CompilerToVM::Data::sizeof_SymbolPointer = sizeof(Symbol*);
+int CompilerToVM::Data::sizeof_narrowKlass = sizeof(narrowKlass);
+int CompilerToVM::Data::sizeof_arrayOopDesc = sizeof(arrayOopDesc);
+int CompilerToVM::Data::sizeof_BasicLock = sizeof(BasicLock);
+
 address CompilerToVM::Data::dsin;
 address CompilerToVM::Data::dcos;
 address CompilerToVM::Data::dtan;
@@ -128,7 +138,10 @@ address CompilerToVM::Data::dlog;
 address CompilerToVM::Data::dlog10;
 address CompilerToVM::Data::dpow;
 
-void CompilerToVM::Data::initialize() {
+address CompilerToVM::Data::symbol_init;
+address CompilerToVM::Data::symbol_clinit;
+
+void CompilerToVM::Data::initialize(TRAPS) {
   Klass_vtable_start_offset = in_bytes(Klass::vtable_start_offset());
   Klass_vtable_length_offset = in_bytes(Klass::vtable_length_offset());
 
@@ -160,6 +173,9 @@ void CompilerToVM::Data::initialize() {
   assert(OopMapValue::legal_vm_reg_name(VMRegImpl::stack2reg(max_oop_map_stack_index)), "should be valid");
   assert(!OopMapValue::legal_vm_reg_name(VMRegImpl::stack2reg(max_oop_map_stack_index + 1)), "should be invalid");
 
+  symbol_init = (address) vmSymbols::object_initializer_name();
+  symbol_clinit = (address) vmSymbols::class_initializer_name();
+
   BarrierSet* bs = Universe::heap()->barrier_set();
   switch (bs->kind()) {
   case BarrierSet::CardTableModRef:
@@ -179,7 +195,7 @@ void CompilerToVM::Data::initialize() {
     // No post barriers
     break;
   default:
-    ShouldNotReachHere();
+    JVMCI_ERROR("Unsupported BarrierSet kind %d", bs->kind());
     break;
   }
 
@@ -237,13 +253,114 @@ objArrayHandle CompilerToVM::initialize_intrinsics(TRAPS) {
   return vmIntrinsics;
 }
 
-C2V_VMENTRY(jobjectArray, readConfiguration, (JNIEnv *env))
-#define BOXED_LONG(name, value) oop name; do { jvalue p; p.j = (jlong) (value); name = java_lang_boxing_object::create(T_LONG, &p, CHECK_NULL);} while(0)
+/**
+ * The set of VM flags known to be used.
+ */
+#define PREDEFINED_CONFIG_FLAGS(do_bool_flag, do_intx_flag, do_uintx_flag) \
+  do_intx_flag(AllocateInstancePrefetchLines)                              \
+  do_intx_flag(AllocatePrefetchDistance)                                   \
+  do_intx_flag(AllocatePrefetchInstr)                                      \
+  do_intx_flag(AllocatePrefetchLines)                                      \
+  do_intx_flag(AllocatePrefetchStepSize)                                   \
+  do_intx_flag(AllocatePrefetchStyle)                                      \
+  do_intx_flag(BciProfileWidth)                                            \
+  do_bool_flag(BootstrapJVMCI)                                             \
+  do_bool_flag(CITime)                                                     \
+  do_bool_flag(CITimeEach)                                                 \
+  do_uintx_flag(CodeCacheSegmentSize)                                      \
+  do_intx_flag(CodeEntryAlignment)                                         \
+  do_bool_flag(CompactFields)                                              \
+  NOT_PRODUCT(do_intx_flag(CompileTheWorldStartAt))                        \
+  NOT_PRODUCT(do_intx_flag(CompileTheWorldStopAt))                         \
+  do_intx_flag(ContendedPaddingWidth)                                      \
+  do_bool_flag(DontCompileHugeMethods)                                     \
+  do_bool_flag(EnableContended)                                            \
+  do_intx_flag(FieldsAllocationStyle)                                      \
+  do_bool_flag(FoldStableValues)                                           \
+  do_bool_flag(ForceUnreachable)                                           \
+  do_intx_flag(HugeMethodLimit)                                            \
+  do_bool_flag(Inline)                                                     \
+  do_intx_flag(JVMCICounterSize)                                           \
+  do_bool_flag(JVMCIPrintProperties)                                       \
+  do_bool_flag(JVMCIUseFastLocking)                                        \
+  do_intx_flag(MethodProfileWidth)                                         \
+  do_intx_flag(ObjectAlignmentInBytes)                                     \
+  do_bool_flag(PrintInlining)                                              \
+  do_bool_flag(ReduceInitialCardMarks)                                     \
+  do_bool_flag(RestrictContended)                                          \
+  do_intx_flag(StackReservedPages)                                         \
+  do_intx_flag(StackShadowPages)                                           \
+  do_bool_flag(TLABStats)                                                  \
+  do_uintx_flag(TLABWasteIncrement)                                        \
+  do_intx_flag(TypeProfileWidth)                                           \
+  do_bool_flag(UseAESIntrinsics)                                           \
+  X86_ONLY(do_intx_flag(UseAVX))                                           \
+  do_bool_flag(UseBiasedLocking)                                           \
+  do_bool_flag(UseCRC32Intrinsics)                                         \
+  do_bool_flag(UseCompressedClassPointers)                                 \
+  do_bool_flag(UseCompressedOops)                                          \
+  do_bool_flag(UseConcMarkSweepGC)                                         \
+  X86_ONLY(do_bool_flag(UseCountLeadingZerosInstruction))                  \
+  X86_ONLY(do_bool_flag(UseCountTrailingZerosInstruction))                 \
+  do_bool_flag(UseG1GC)                                                    \
+  COMPILER2_PRESENT(do_bool_flag(UseMontgomeryMultiplyIntrinsic))          \
+  COMPILER2_PRESENT(do_bool_flag(UseMontgomerySquareIntrinsic))            \
+  COMPILER2_PRESENT(do_bool_flag(UseMulAddIntrinsic))                      \
+  COMPILER2_PRESENT(do_bool_flag(UseMultiplyToLenIntrinsic))               \
+  do_bool_flag(UsePopCountInstruction)                                     \
+  do_bool_flag(UseSHA1Intrinsics)                                          \
+  do_bool_flag(UseSHA256Intrinsics)                                        \
+  do_bool_flag(UseSHA512Intrinsics)                                        \
+  do_intx_flag(UseSSE)                                                     \
+  COMPILER2_PRESENT(do_bool_flag(UseSquareToLenIntrinsic))                 \
+  do_bool_flag(UseStackBanging)                                            \
+  do_bool_flag(UseTLAB)                                                    \
+  do_bool_flag(VerifyOops)                                                 \
+
+#define BOXED_BOOLEAN(name, value) oop name = ((jboolean)(value) ? boxedTrue() : boxedFalse())
 #define BOXED_DOUBLE(name, value) oop name; do { jvalue p; p.d = (jdouble) (value); name = java_lang_boxing_object::create(T_DOUBLE, &p, CHECK_NULL);} while(0)
+#define BOXED_LONG(name, value) \
+  oop name; \
+  do { \
+    jvalue p; p.j = (jlong) (value); \
+    Handle* e = longs.get(p.j); \
+    if (e == NULL) { \
+      Handle h = java_lang_boxing_object::create(T_LONG, &p, CHECK_NULL); \
+      longs.put(p.j, h); \
+      name = h(); \
+    } else { \
+      name = (*e)(); \
+    } \
+  } while (0)
+
+#define CSTRING_TO_JSTRING(name, value) \
+  Handle name; \
+  do { \
+    if (value != NULL) { \
+      Handle* e = strings.get(value); \
+      if (e == NULL) { \
+        Handle h = java_lang_String::create_from_str(value, CHECK_NULL); \
+        strings.put(value, h); \
+        name = h(); \
+      } else { \
+        name = (*e)(); \
+      } \
+    } \
+  } while (0)
+
+C2V_VMENTRY(jobjectArray, readConfiguration, (JNIEnv *env))
   ResourceMark rm;
   HandleMark hm;
 
-  CompilerToVM::Data::initialize();
+  // Used to canonicalize Long and String values.
+  ResourceHashtable longs;
+  ResourceHashtable strings;
+
+  jvalue prim;
+  prim.z = true;  Handle boxedTrue =  java_lang_boxing_object::create(T_BOOLEAN, &prim, CHECK_NULL);
+  prim.z = false; Handle boxedFalse = java_lang_boxing_object::create(T_BOOLEAN, &prim, CHECK_NULL);
+
+  CompilerToVM::Data::initialize(CHECK_NULL);
 
   VMField::klass()->initialize(CHECK_NULL);
   VMFlag::klass()->initialize(CHECK_NULL);
@@ -257,31 +374,31 @@ C2V_VMENTRY(jobjectArray, readConfiguration, (JNIEnv *env))
     size_t name_buf_len = strlen(vmField.typeName) + strlen(vmField.fieldName) + 2 /* "::" */;
     char* name_buf = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, name_buf_len + 1);
     sprintf(name_buf, "%s::%s", vmField.typeName, vmField.fieldName);
-    Handle name = java_lang_String::create_from_str(name_buf, CHECK_NULL);
-    Handle type = java_lang_String::create_from_str(vmField.typeString, CHECK_NULL);
+    CSTRING_TO_JSTRING(name, name_buf);
+    CSTRING_TO_JSTRING(type, vmField.typeString);
     VMField::set_name(vmFieldObj, name());
     VMField::set_type(vmFieldObj, type());
     VMField::set_offset(vmFieldObj, vmField.offset);
     VMField::set_address(vmFieldObj, (jlong) vmField.address);
-    if (vmField.isStatic) {
+    if (vmField.isStatic && vmField.typeString != NULL) {
       if (strcmp(vmField.typeString, "bool") == 0) {
-        BOXED_LONG(value, *(jbyte*) vmField.address);
-        VMField::set_value(vmFieldObj, value);
+        BOXED_BOOLEAN(box, *(jbyte*) vmField.address);
+        VMField::set_value(vmFieldObj, box);
       } else if (strcmp(vmField.typeString, "int") == 0 ||
                  strcmp(vmField.typeString, "jint") == 0) {
-        BOXED_LONG(value, *(jint*) vmField.address);
-        VMField::set_value(vmFieldObj, value);
+        BOXED_LONG(box, *(jint*) vmField.address);
+        VMField::set_value(vmFieldObj, box);
       } else if (strcmp(vmField.typeString, "uint64_t") == 0) {
-        BOXED_LONG(value, *(uint64_t*) vmField.address);
-        VMField::set_value(vmFieldObj, value);
+        BOXED_LONG(box, *(uint64_t*) vmField.address);
+        VMField::set_value(vmFieldObj, box);
       } else if (strcmp(vmField.typeString, "address") == 0 ||
                  strcmp(vmField.typeString, "intptr_t") == 0 ||
                  strcmp(vmField.typeString, "uintptr_t") == 0 ||
                  strcmp(vmField.typeString, "size_t") == 0 ||
                  // All foo* types are addresses.
                  vmField.typeString[strlen(vmField.typeString) - 1] == '*') {
-        BOXED_LONG(value, *((address*) vmField.address));
-        VMField::set_value(vmFieldObj, value);
+        BOXED_LONG(box, *((address*) vmField.address));
+        VMField::set_value(vmFieldObj, box);
       } else {
         JVMCI_ERROR_NULL("VM field %s has unsupported type %s", name_buf, vmField.typeString);
       }
@@ -289,16 +406,6 @@ C2V_VMENTRY(jobjectArray, readConfiguration, (JNIEnv *env))
     vmFields->obj_at_put(i, vmFieldObj());
   }
 
-  len = JVMCIVMStructs::localHotSpotVMTypes_count();
-  objArrayHandle vmTypes = oopFactory::new_objArray(SystemDictionary::Object_klass(), len * 2, CHECK_NULL);
-  for (int i = 0; i < len ; i++) {
-    VMTypeEntry vmType = JVMCIVMStructs::localHotSpotVMTypes[i];
-    Handle name = java_lang_String::create_from_str(vmType.typeName, CHECK_NULL);
-    BOXED_LONG(size, vmType.size);
-    vmTypes->obj_at_put(i * 2, name());
-    vmTypes->obj_at_put(i * 2 + 1, size);
-  }
-
   int ints_len = JVMCIVMStructs::localHotSpotVMIntConstants_count();
   int longs_len = JVMCIVMStructs::localHotSpotVMLongConstants_count();
   len = ints_len + longs_len;
@@ -306,14 +413,14 @@ C2V_VMENTRY(jobjectArray, readConfiguration, (JNIEnv *env))
   int insert = 0;
   for (int i = 0; i < ints_len ; i++) {
     VMIntConstantEntry c = JVMCIVMStructs::localHotSpotVMIntConstants[i];
-    Handle name = java_lang_String::create_from_str(c.name, CHECK_NULL);
+    CSTRING_TO_JSTRING(name, c.name);
     BOXED_LONG(value, c.value);
     vmConstants->obj_at_put(insert++, name());
     vmConstants->obj_at_put(insert++, value);
   }
   for (int i = 0; i < longs_len ; i++) {
     VMLongConstantEntry c = JVMCIVMStructs::localHotSpotVMLongConstants[i];
-    Handle name = java_lang_String::create_from_str(c.name, CHECK_NULL);
+    CSTRING_TO_JSTRING(name, c.name);
     BOXED_LONG(value, c.value);
     vmConstants->obj_at_put(insert++, name());
     vmConstants->obj_at_put(insert++, value);
@@ -324,69 +431,104 @@ C2V_VMENTRY(jobjectArray, readConfiguration, (JNIEnv *env))
   objArrayHandle vmAddresses = oopFactory::new_objArray(SystemDictionary::Object_klass(), len * 2, CHECK_NULL);
   for (int i = 0; i < len ; i++) {
     VMAddressEntry a = JVMCIVMStructs::localHotSpotVMAddresses[i];
-    Handle name = java_lang_String::create_from_str(a.name, CHECK_NULL);
+    CSTRING_TO_JSTRING(name, a.name);
     BOXED_LONG(value, a.value);
     vmAddresses->obj_at_put(i * 2, name());
     vmAddresses->obj_at_put(i * 2 + 1, value);
   }
 
-  // The last entry is the null entry.
-  len = (int) Flag::numFlags - 1;
+#define COUNT_FLAG(ignore) +1
+#ifdef ASSERT
+#define CHECK_FLAG(type, name) { \
+  Flag* flag = Flag::find_flag(#name, strlen(#name), /*allow_locked*/ true, /* return_flag */ true); \
+  assert(flag != NULL, "No such flag named " #name); \
+  assert(flag->is_##type(), "Flag " #name " is not of type " #type); \
+}
+#else
+#define CHECK_FLAG(type, name)
+#endif
+
+#define ADD_FLAG(type, name, convert) { \
+  CHECK_FLAG(type, name) \
+  instanceHandle vmFlagObj = InstanceKlass::cast(VMFlag::klass())->allocate_instance_handle(CHECK_NULL); \
+  CSTRING_TO_JSTRING(fname, #name); \
+  CSTRING_TO_JSTRING(ftype, #type); \
+  VMFlag::set_name(vmFlagObj, fname()); \
+  VMFlag::set_type(vmFlagObj, ftype()); \
+  convert(value, name); \
+  VMFlag::set_value(vmFlagObj, value); \
+  vmFlags->obj_at_put(i++, vmFlagObj()); \
+}
+#define ADD_BOOL_FLAG(name)  ADD_FLAG(bool, name, BOXED_BOOLEAN)
+#define ADD_INTX_FLAG(name)  ADD_FLAG(intx, name, BOXED_LONG)
+#define ADD_UINTX_FLAG(name) ADD_FLAG(uintx, name, BOXED_LONG)
+
+  len = 0 + PREDEFINED_CONFIG_FLAGS(COUNT_FLAG, COUNT_FLAG, COUNT_FLAG);
   objArrayHandle vmFlags = oopFactory::new_objArray(VMFlag::klass(), len, CHECK_NULL);
-  for (int i = 0; i < len; i++) {
-    Flag* flag = &Flag::flags[i];
-    instanceHandle vmFlagObj = InstanceKlass::cast(VMFlag::klass())->allocate_instance_handle(CHECK_NULL);
-    Handle name = java_lang_String::create_from_str(flag->_name, CHECK_NULL);
-    Handle type = java_lang_String::create_from_str(flag->_type, CHECK_NULL);
-    VMFlag::set_name(vmFlagObj, name());
-    VMFlag::set_type(vmFlagObj, type());
-    if (flag->is_bool()) {
-      BOXED_LONG(value, flag->get_bool());
-      VMFlag::set_value(vmFlagObj, value);
-    } else if (flag->is_ccstr()) {
-      Handle value = java_lang_String::create_from_str(flag->get_ccstr(), CHECK_NULL);
-      VMFlag::set_value(vmFlagObj, value());
-    } else if (flag->is_int()) {
-      BOXED_LONG(value, flag->get_int());
-      VMFlag::set_value(vmFlagObj, value);
-    } else if (flag->is_intx()) {
-      BOXED_LONG(value, flag->get_intx());
-      VMFlag::set_value(vmFlagObj, value);
-    } else if (flag->is_uint()) {
-      BOXED_LONG(value, flag->get_uint());
-      VMFlag::set_value(vmFlagObj, value);
-    } else if (flag->is_uint64_t()) {
-      BOXED_LONG(value, flag->get_uint64_t());
-      VMFlag::set_value(vmFlagObj, value);
-    } else if (flag->is_uintx()) {
-      BOXED_LONG(value, flag->get_uintx());
-      VMFlag::set_value(vmFlagObj, value);
-    } else if (flag->is_double()) {
-      BOXED_DOUBLE(value, flag->get_double());
-      VMFlag::set_value(vmFlagObj, value);
-    } else if (flag->is_size_t()) {
-      BOXED_LONG(value, flag->get_size_t());
-      VMFlag::set_value(vmFlagObj, value);
-    } else {
-      JVMCI_ERROR_NULL("VM flag %s has unsupported type %s", flag->_name, flag->_type);
-    }
-    vmFlags->obj_at_put(i, vmFlagObj());
-  }
+  int i = 0;
+  PREDEFINED_CONFIG_FLAGS(ADD_BOOL_FLAG, ADD_INTX_FLAG, ADD_UINTX_FLAG)
 
   objArrayHandle vmIntrinsics = CompilerToVM::initialize_intrinsics(CHECK_NULL);
 
-  objArrayOop data = oopFactory::new_objArray(SystemDictionary::Object_klass(), 6, CHECK_NULL);
+  objArrayOop data = oopFactory::new_objArray(SystemDictionary::Object_klass(), 5, CHECK_NULL);
   data->obj_at_put(0, vmFields());
-  data->obj_at_put(1, vmTypes());
-  data->obj_at_put(2, vmConstants());
-  data->obj_at_put(3, vmAddresses());
-  data->obj_at_put(4, vmFlags());
-  data->obj_at_put(5, vmIntrinsics());
+  data->obj_at_put(1, vmConstants());
+  data->obj_at_put(2, vmAddresses());
+  data->obj_at_put(3, vmFlags());
+  data->obj_at_put(4, vmIntrinsics());
 
   return (jobjectArray) JNIHandles::make_local(THREAD, data);
+#undef COUNT_FLAG
+#undef ADD_FLAG
+#undef ADD_BOOL_FLAG
+#undef ADD_INTX_FLAG
+#undef ADD_UINTX_FLAG
+#undef CHECK_FLAG
+C2V_END
+
+C2V_VMENTRY(jobject, getFlagValue, (JNIEnv *, jobject c2vm, jobject name_handle))
+#define RETURN_BOXED_LONG(value) oop box; jvalue p; p.j = (jlong) (value); box = java_lang_boxing_object::create(T_LONG, &p, CHECK_NULL); return JNIHandles::make_local(THREAD, box);
+#define RETURN_BOXED_DOUBLE(value) oop box; jvalue p; p.d = (jdouble) (value); box = java_lang_boxing_object::create(T_DOUBLE, &p, CHECK_NULL); return JNIHandles::make_local(THREAD, box);
+  Handle name = JNIHandles::resolve(name_handle);
+  if (name.is_null()) {
+    THROW_0(vmSymbols::java_lang_NullPointerException());
+  }
+  ResourceMark rm;
+  const char* cstring = java_lang_String::as_utf8_string(name());
+  Flag* flag = Flag::find_flag(cstring, strlen(cstring), /* allow_locked */ true, /* return_flag */ true);
+  if (flag == NULL) {
+    return c2vm;
+  }
+  if (flag->is_bool()) {
+    jvalue prim;
+    prim.z = flag->get_bool();
+    oop box = java_lang_boxing_object::create(T_BOOLEAN, &prim, CHECK_NULL);
+    return JNIHandles::make_local(THREAD, box);
+  } else if (flag->is_ccstr()) {
+    Handle value = java_lang_String::create_from_str(flag->get_ccstr(), CHECK_NULL);
+    return JNIHandles::make_local(THREAD, value());
+  } else if (flag->is_intx()) {
+    RETURN_BOXED_LONG(flag->get_intx());
+  } else if (flag->is_int()) {
+    RETURN_BOXED_LONG(flag->get_int());
+  } else if (flag->is_uint()) {
+    RETURN_BOXED_LONG(flag->get_uint());
+  } else if (flag->is_uint64_t()) {
+    RETURN_BOXED_LONG(flag->get_uint64_t());
+  } else if (flag->is_size_t()) {
+    RETURN_BOXED_LONG(flag->get_size_t());
+  } else if (flag->is_uintx()) {
+    RETURN_BOXED_LONG(flag->get_uintx());
+  } else if (flag->is_double()) {
+    RETURN_BOXED_DOUBLE(flag->get_double());
+  } else {
+    JVMCI_ERROR_NULL("VM flag %s has unsupported type %s", flag->_name, flag->_type);
+  }
+C2V_END
+
 #undef BOXED_LONG
 #undef BOXED_DOUBLE
-C2V_END
+#undef CSTRING_TO_JSTRING
 
 C2V_VMENTRY(jbyteArray, getBytecode, (JNIEnv *, jobject, jobject jvmci_method))
   methodHandle method = CompilerToVM::asMethod(jvmci_method);
@@ -743,7 +885,7 @@ C2V_VMENTRY(jint, constantPoolRemapInstructionOperandFromCache, (JNIEnv*, jobjec
   return cp->remap_instruction_operand_from_cache(index);
 C2V_END
 
-C2V_VMENTRY(jobject, resolveFieldInPool, (JNIEnv*, jobject, jobject jvmci_constant_pool, jint index, jobject jvmci_method, jbyte opcode, jlongArray info_handle))
+C2V_VMENTRY(jobject, resolveFieldInPool, (JNIEnv*, jobject, jobject jvmci_constant_pool, jint index, jobject jvmci_method, jbyte opcode, jintArray info_handle))
   ResourceMark rm;
   constantPoolHandle cp = CompilerToVM::asConstantPool(jvmci_constant_pool);
   Bytecodes::Code code = (Bytecodes::Code)(((int) opcode) & 0xFF);
@@ -751,9 +893,12 @@ C2V_VMENTRY(jobject, resolveFieldInPool, (JNIEnv*, jobject, jobject jvmci_consta
   LinkInfo link_info(cp, index, (jvmci_method != NULL) ? CompilerToVM::asMethod(jvmci_method) : NULL, CHECK_0);
   LinkResolver::resolve_field(fd, link_info, Bytecodes::java_code(code), false, CHECK_0);
   typeArrayOop info = (typeArrayOop) JNIHandles::resolve(info_handle);
-  assert(info != NULL && info->length() == 2, "must be");
-  info->long_at_put(0, (jlong) fd.access_flags().as_int());
-  info->long_at_put(1, (jlong) fd.offset());
+  if (info == NULL || info->length() != 3) {
+    JVMCI_ERROR_NULL("info must not be null and have a length of 3");
+  }
+  info->int_at_put(0, fd.access_flags().as_int());
+  info->int_at_put(1, fd.offset());
+  info->int_at_put(2, fd.index());
   oop field_holder = CompilerToVM::get_jvmci_type(fd.field_holder(), CHECK_NULL);
   return JNIHandles::make_local(THREAD, field_holder);
 C2V_END
@@ -1610,7 +1755,7 @@ JNINativeMethod CompilerToVM::methods[] = {
   {CC "resolveConstantInPool",                        CC "(" HS_CONSTANT_POOL "I)" OBJECT,                                                  FN_PTR(resolveConstantInPool)},
   {CC "resolvePossiblyCachedConstantInPool",          CC "(" HS_CONSTANT_POOL "I)" OBJECT,                                                  FN_PTR(resolvePossiblyCachedConstantInPool)},
   {CC "resolveTypeInPool",                            CC "(" HS_CONSTANT_POOL "I)" HS_RESOLVED_KLASS,                                       FN_PTR(resolveTypeInPool)},
-  {CC "resolveFieldInPool",                           CC "(" HS_CONSTANT_POOL "I" HS_RESOLVED_METHOD "B[J)" HS_RESOLVED_KLASS,              FN_PTR(resolveFieldInPool)},
+  {CC "resolveFieldInPool",                           CC "(" HS_CONSTANT_POOL "I" HS_RESOLVED_METHOD "B[I)" HS_RESOLVED_KLASS,              FN_PTR(resolveFieldInPool)},
   {CC "resolveInvokeDynamicInPool",                   CC "(" HS_CONSTANT_POOL "I)V",                                                        FN_PTR(resolveInvokeDynamicInPool)},
   {CC "resolveInvokeHandleInPool",                    CC "(" HS_CONSTANT_POOL "I)V",                                                        FN_PTR(resolveInvokeHandleInPool)},
   {CC "resolveMethod",                                CC "(" HS_RESOLVED_KLASS HS_RESOLVED_METHOD HS_RESOLVED_KLASS ")" HS_RESOLVED_METHOD, FN_PTR(resolveMethod)},
@@ -1648,6 +1793,7 @@ JNINativeMethod CompilerToVM::methods[] = {
   {CC "getFingerprint",                               CC "(J)J",                                                                            FN_PTR(getFingerprint)},
   {CC "interpreterFrameSize",                         CC "(" BYTECODE_FRAME ")I",                                                           FN_PTR(interpreterFrameSize)},
   {CC "compileToBytecode",                            CC "(" OBJECT ")V",                                                                   FN_PTR(compileToBytecode)},
+  {CC "getFlagValue",                                 CC "(" STRING ")" OBJECT,                                                             FN_PTR(getFlagValue)},
 };
 
 int CompilerToVM::methods_count() {
diff --git a/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.hpp b/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.hpp
index c0f21e2b8c2..500cdfec829 100644
--- a/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.hpp
+++ b/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.hpp
@@ -66,6 +66,15 @@ class CompilerToVM {
 
     static int vm_page_size;
 
+    static int sizeof_vtableEntry;
+    static int sizeof_ExceptionTableElement;
+    static int sizeof_LocalVariableTableElement;
+    static int sizeof_ConstantPool;
+    static int sizeof_SymbolPointer;
+    static int sizeof_narrowKlass;
+    static int sizeof_arrayOopDesc;
+    static int sizeof_BasicLock;
+
     static address dsin;
     static address dcos;
     static address dtan;
@@ -74,8 +83,11 @@ class CompilerToVM {
     static address dlog10;
     static address dpow;
 
+    static address symbol_init;
+    static address symbol_clinit;
+
    public:
-    static void initialize();
+    static void initialize(TRAPS);
 
     static int max_oop_map_stack_offset() {
       assert(_max_oop_map_stack_offset > 0, "must be initialized");
@@ -83,6 +95,20 @@ class CompilerToVM {
     }
   };
 
+  static bool cstring_equals(const char* const& s0, const char* const& s1) {
+    return strcmp(s0, s1) == 0;
+  }
+
+  static unsigned cstring_hash(const char* const& s) {
+    int h = 0;
+    const char* p = s;
+    while (*p != '\0') {
+      h = 31 * h + *p;
+      p++;
+    }
+    return h;
+  }
+
   static JNINativeMethod methods[];
 
   static objArrayHandle initialize_intrinsics(TRAPS);
diff --git a/hotspot/src/share/vm/jvmci/vmStructs_jvmci.cpp b/hotspot/src/share/vm/jvmci/vmStructs_jvmci.cpp
index a01651f55aa..1cfc1021b39 100644
--- a/hotspot/src/share/vm/jvmci/vmStructs_jvmci.cpp
+++ b/hotspot/src/share/vm/jvmci/vmStructs_jvmci.cpp
@@ -78,6 +78,15 @@
                                                                                                                                      \
   static_field(CompilerToVM::Data,             vm_page_size,                           int)                                          \
                                                                                                                                      \
+  static_field(CompilerToVM::Data,             sizeof_vtableEntry,                     int)                                          \
+  static_field(CompilerToVM::Data,             sizeof_ExceptionTableElement,           int)                                          \
+  static_field(CompilerToVM::Data,             sizeof_LocalVariableTableElement,       int)                                          \
+  static_field(CompilerToVM::Data,             sizeof_ConstantPool,                    int)                                          \
+  static_field(CompilerToVM::Data,             sizeof_SymbolPointer,                   int)                                          \
+  static_field(CompilerToVM::Data,             sizeof_narrowKlass,                     int)                                          \
+  static_field(CompilerToVM::Data,             sizeof_arrayOopDesc,                    int)                                          \
+  static_field(CompilerToVM::Data,             sizeof_BasicLock,                       int)                                          \
+                                                                                                                                     \
   static_field(CompilerToVM::Data,             dsin,                                   address)                                      \
   static_field(CompilerToVM::Data,             dcos,                                   address)                                      \
   static_field(CompilerToVM::Data,             dtan,                                   address)                                      \
@@ -86,6 +95,9 @@
   static_field(CompilerToVM::Data,             dlog10,                                 address)                                      \
   static_field(CompilerToVM::Data,             dpow,                                   address)                                      \
                                                                                                                                      \
+  static_field(CompilerToVM::Data,             symbol_init,                            address)                                      \
+  static_field(CompilerToVM::Data,             symbol_clinit,                          address)                                      \
+                                                                                                                                     \
   static_field(Abstract_VM_Version,            _features,                              uint64_t)                                     \
                                                                                                                                      \
   nonstatic_field(Array,                  _length,                                int)                                          \
@@ -293,7 +305,6 @@
   static_field(StubRoutines,                _crc32c_table_addr,                               address)                               \
   static_field(StubRoutines,                _updateBytesCRC32C,                               address)                               \
   static_field(StubRoutines,                _updateBytesAdler32,                              address)                               \
-  static_field(StubRoutines,                _multiplyToLen,                                   address)                               \
   static_field(StubRoutines,                _squareToLen,                                     address)                               \
   static_field(StubRoutines,                _mulAdd,                                          address)                               \
   static_field(StubRoutines,                _montgomeryMultiply,                              address)                               \
diff --git a/hotspot/test/compiler/jvmci/common/patches/jdk.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java b/hotspot/test/compiler/jvmci/common/patches/jdk.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java
index fc03353f76a..1cdee2d2974 100644
--- a/hotspot/test/compiler/jvmci/common/patches/jdk.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java
+++ b/hotspot/test/compiler/jvmci/common/patches/jdk.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java
@@ -48,6 +48,10 @@ public class CompilerToVMHelper {
         return CTVM.getExceptionTableStart((HotSpotResolvedJavaMethodImpl)method);
     }
 
+    public static Object getFlagValue(String name) {
+        return CTVM.getFlagValue(name);
+    }
+
     public static boolean isCompilable(HotSpotResolvedJavaMethod method) {
         return CTVM.isCompilable((HotSpotResolvedJavaMethodImpl)method);
     }
@@ -128,7 +132,7 @@ public class CompilerToVMHelper {
     }
 
     public static HotSpotResolvedObjectType resolveFieldInPool(
-            ConstantPool constantPool, int cpi, ResolvedJavaMethod method, byte opcode, long[] info) {
+            ConstantPool constantPool, int cpi, ResolvedJavaMethod method, byte opcode, int[] info) {
         return CTVM.resolveFieldInPool((HotSpotConstantPool) constantPool, cpi, (HotSpotResolvedJavaMethodImpl) method, opcode, info);
     }
 
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ConstantPoolTestCase.java b/hotspot/test/compiler/jvmci/compilerToVM/ConstantPoolTestCase.java
index 6f2ccb0f3c0..f799f0c2734 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/ConstantPoolTestCase.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/ConstantPoolTestCase.java
@@ -202,13 +202,13 @@ public class ConstantPoolTestCase {
         public final String type;
         public final ResolvedJavaMethod[] methods;
         public final byte[] opcodes;
-        public final long accFlags;
+        public final int accFlags;
 
-        public TestedCPEntry(String klass, String name, String type, byte[] opcodes, long accFlags) {
+        public TestedCPEntry(String klass, String name, String type, byte[] opcodes, int accFlags) {
                 this(klass, name, type, null, opcodes, accFlags);
         }
 
-        public TestedCPEntry(String klass, String name, String type, ResolvedJavaMethod[] methods, byte[] opcodes, long accFlags) {
+        public TestedCPEntry(String klass, String name, String type, ResolvedJavaMethod[] methods, byte[] opcodes, int accFlags) {
             this.klass = klass;
             this.name = name;
             this.type = type;
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ConstantPoolTestsHelper.java b/hotspot/test/compiler/jvmci/compilerToVM/ConstantPoolTestsHelper.java
index e0bb9d41c8e..0ac7f3d6a6f 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/ConstantPoolTestsHelper.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/ConstantPoolTestsHelper.java
@@ -206,7 +206,7 @@ public class ConstantPoolTestsHelper {
                                       "stringFieldEmpty",
                                       "Ljava/lang/String;",
                                       new byte[] {(byte) Opcodes.PUTFIELD | (byte) Opcodes.GETFIELD},
-                                      0L),
+                                      0),
                 }
         );
         CP_MAP_FOR_CLASS.put(CONSTANT_METHODREF,
@@ -362,7 +362,7 @@ public class ConstantPoolTestsHelper {
                                       "stringFieldEmpty",
                                       "Ljava/lang/String;",
                                       new byte[] {(byte) Opcodes.PUTFIELD | (byte) Opcodes.GETFIELD},
-                                      0L),
+                                      0),
                 }
         );
         CP_MAP_FOR_ABS_CLASS.put(CONSTANT_METHODREF,
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetFlagValueTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetFlagValueTest.java
new file mode 100644
index 00000000000..e1c46a18dee
--- /dev/null
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetFlagValueTest.java
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8173912
+ * @requires vm.jvmci
+ * @library / /test/lib
+ * @library ../common/patches
+ * @modules jdk.vm.ci/jdk.vm.ci.hotspot:+open
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                                sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
+ *                  -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
+ *                  compiler.jvmci.compilerToVM.GetFlagValueTest
+ */
+
+package compiler.jvmci.compilerToVM;
+
+import jdk.test.lib.Asserts;
+import jdk.vm.ci.hotspot.CompilerToVMHelper;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+import java.math.BigInteger;
+import java.util.Arrays;
+import java.util.regex.Pattern;
+import java.util.regex.Matcher;
+import sun.hotspot.WhiteBox;
+
+public class GetFlagValueTest {
+    public static void main(String[] args) throws Exception {
+        try {
+            CompilerToVMHelper.getFlagValue(null);
+            Asserts.fail("Expected NullPointerException when calling getFlagValue(null)");
+        } catch (NullPointerException e) {
+            // expected
+        }
+
+        Object missing = CompilerToVMHelper.getFlagValue("this is surely not a flag");
+        Asserts.assertEquals(CompilerToVMHelper.CTVM, missing);
+
+        ProcessBuilder pb;
+        OutputAnalyzer out;
+
+        String[] arguments = {"-XX:+UnlockExperimentalVMOptions", "-XX:+EnableJVMCI", "-XX:+PrintFlagsFinal", "-version"};
+        pb = ProcessTools.createJavaProcessBuilder(arguments);
+        out = new OutputAnalyzer(pb.start());
+
+        out.shouldHaveExitValue(0);
+        String[] lines = out.getStdout().split("\\r?\\n");
+        Asserts.assertTrue(lines.length > 1, "Expected output from -XX:+PrintFlagsFinal");
+
+        final WhiteBox wb = WhiteBox.getWhiteBox();
+
+        // Line example: ccstr PrintIdealGraphAddress = 127.0.0.1 {C2 notproduct} {default}
+        Pattern flagLine = Pattern.compile("(\\w+)\\s+(\\w+)\\s+:?= (?:(.+))\\{[^}]+\\}\\s+\\{[^}]+\\}");
+        for (String line : lines) {
+            if (line.indexOf('=') != -1) {
+                line = line.trim();
+                Matcher m = flagLine.matcher(line);
+                Asserts.assertTrue(m.matches(), "Unexpected line in -XX:+PrintFlagsFinal output: " + line);
+                String type = m.group(1);
+                String name = m.group(2);
+                String expect = m.group(3).trim();
+                Object value = CompilerToVMHelper.getFlagValue(name);
+                Object wbValue = wb.getVMFlag(name);
+                Asserts.assertEquals(value, wbValue, "Value of flag " + name);
+            }
+        }
+    }
+}
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java
index 2ee506ba4f9..640387a18c1 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java
@@ -103,7 +103,7 @@ public class ResolveFieldInPoolTest {
             cached = "cached ";
         }
         for (int j = 0; j < entry.opcodes.length; j++) {
-            long[] info = new long[2];
+            int[] info = new int[3];
             HotSpotResolvedObjectType fieldToVerify
                     = CompilerToVMHelper.resolveFieldInPool(constantPoolCTVM,
                                                            index,
@@ -147,11 +147,11 @@ public class ResolveFieldInPoolTest {
             } catch (Exception ex) {
                 throw new Error("Unexpected exception", ex);
             }
-            long offsetToRefer;
+            int offsetToRefer;
             if ((entry.accFlags & Opcodes.ACC_STATIC) != 0) {
-                offsetToRefer = UNSAFE.staticFieldOffset(fieldToRefer);
+                offsetToRefer = (int) UNSAFE.staticFieldOffset(fieldToRefer);
             } else {
-                offsetToRefer = UNSAFE.objectFieldOffset(fieldToRefer);
+                offsetToRefer = (int) UNSAFE.objectFieldOffset(fieldToRefer);
             }
             msg = String.format("Field offset returned by resolveFieldInPool"
                                         + " method is wrong for the field %s.%s"

From e05df4e05ff6497e401fa4d87d543703d3c5796e Mon Sep 17 00:00:00 2001
From: Jamsheed Mohammed C M 
Date: Mon, 6 Feb 2017 09:56:48 -0800
Subject: [PATCH 010/447] 8170455: C2: Access to [].clone from interfaces fails

Passed holder klass to LR for proper resolution.

Reviewed-by: vlivanov
---
 hotspot/src/share/vm/ci/ciEnv.cpp             |  27 ++--
 hotspot/src/share/vm/ci/ciEnv.hpp             |  17 +--
 hotspot/src/share/vm/jvmci/jvmciEnv.cpp       |  10 +-
 hotspot/src/share/vm/jvmci/jvmciEnv.hpp       |   2 +-
 .../TestDefaultMethodArrayCloneDeoptC2.java   | 117 ++++++++++++++++++
 5 files changed, 145 insertions(+), 28 deletions(-)
 create mode 100644 hotspot/test/compiler/arraycopy/TestDefaultMethodArrayCloneDeoptC2.java

diff --git a/hotspot/src/share/vm/ci/ciEnv.cpp b/hotspot/src/share/vm/ci/ciEnv.cpp
index e8587cf9646..c7801a12dc4 100644
--- a/hotspot/src/share/vm/ci/ciEnv.cpp
+++ b/hotspot/src/share/vm/ci/ciEnv.cpp
@@ -704,16 +704,17 @@ ciField* ciEnv::get_field_by_index(ciInstanceKlass* accessor,
 //
 // Perform an appropriate method lookup based on accessor, holder,
 // name, signature, and bytecode.
-Method* ciEnv::lookup_method(InstanceKlass*  accessor,
-                               InstanceKlass*  holder,
-                               Symbol*       name,
-                               Symbol*       sig,
-                               Bytecodes::Code bc,
-                               constantTag    tag) {
-  EXCEPTION_CONTEXT;
-  KlassHandle h_accessor(THREAD, accessor);
-  KlassHandle h_holder(THREAD, holder);
-  LinkResolver::check_klass_accessability(h_accessor, h_holder, KILL_COMPILE_ON_FATAL_(NULL));
+Method* ciEnv::lookup_method(ciInstanceKlass* accessor,
+                             ciKlass*         holder,
+                             Symbol*          name,
+                             Symbol*          sig,
+                             Bytecodes::Code  bc,
+                             constantTag      tag) {
+  // Accessibility checks are performed in ciEnv::get_method_by_index_impl.
+  assert(check_klass_accessibility(accessor, holder->get_Klass()), "holder not accessible");
+
+  KlassHandle h_accessor(accessor->get_instanceKlass());
+  KlassHandle h_holder(holder->get_Klass());
   methodHandle dest_method;
   LinkInfo link_info(h_holder, name, sig, h_accessor, LinkInfo::needs_access_check, tag);
   switch (bc) {
@@ -772,7 +773,6 @@ ciMethod* ciEnv::get_method_by_index_impl(const constantPoolHandle& cpool,
     const int holder_index = cpool->klass_ref_index_at(index);
     bool holder_is_accessible;
     ciKlass* holder = get_klass_by_index_impl(cpool, holder_index, holder_is_accessible, accessor);
-    ciInstanceKlass* declared_holder = get_instance_klass_for_declared_method_holder(holder);
 
     // Get the method's name and signature.
     Symbol* name_sym = cpool->name_ref_at(index);
@@ -800,10 +800,9 @@ ciMethod* ciEnv::get_method_by_index_impl(const constantPoolHandle& cpool,
     }
 
     if (holder_is_accessible) {  // Our declared holder is loaded.
-      InstanceKlass* lookup = declared_holder->get_instanceKlass();
       constantTag tag = cpool->tag_ref_at(index);
       assert(accessor->get_instanceKlass() == cpool->pool_holder(), "not the pool holder?");
-      Method* m = lookup_method(accessor->get_instanceKlass(), lookup, name_sym, sig_sym, bc, tag);
+      Method* m = lookup_method(accessor, holder, name_sym, sig_sym, bc, tag);
       if (m != NULL &&
           (bc == Bytecodes::_invokestatic
            ?  m->method_holder()->is_not_initialized()
@@ -826,7 +825,7 @@ ciMethod* ciEnv::get_method_by_index_impl(const constantPoolHandle& cpool,
     // lookup.
     ciSymbol* name      = get_symbol(name_sym);
     ciSymbol* signature = get_symbol(sig_sym);
-    return get_unloaded_method(declared_holder, name, signature, accessor);
+    return get_unloaded_method(holder, name, signature, accessor);
   }
 }
 
diff --git a/hotspot/src/share/vm/ci/ciEnv.hpp b/hotspot/src/share/vm/ci/ciEnv.hpp
index 36934010ef8..a7fbe0bd843 100644
--- a/hotspot/src/share/vm/ci/ciEnv.hpp
+++ b/hotspot/src/share/vm/ci/ciEnv.hpp
@@ -153,12 +153,12 @@ private:
   // Helper methods
   bool       check_klass_accessibility(ciKlass* accessing_klass,
                                       Klass* resolved_klass);
-  Method*    lookup_method(InstanceKlass*  accessor,
-                           InstanceKlass*  holder,
-                           Symbol*         name,
-                           Symbol*         sig,
-                           Bytecodes::Code bc,
-                           constantTag     tag);
+  Method*    lookup_method(ciInstanceKlass* accessor,
+                           ciKlass*         holder,
+                           Symbol*          name,
+                           Symbol*          sig,
+                           Bytecodes::Code  bc,
+                           constantTag      tag);
 
   // Get a ciObject from the object factory.  Ensures uniqueness
   // of ciObjects.
@@ -227,11 +227,12 @@ private:
   // Get a ciMethod representing either an unfound method or
   // a method with an unloaded holder.  Ensures uniqueness of
   // the result.
-  ciMethod* get_unloaded_method(ciInstanceKlass* holder,
+  ciMethod* get_unloaded_method(ciKlass*         holder,
                                 ciSymbol*        name,
                                 ciSymbol*        signature,
                                 ciInstanceKlass* accessor) {
-    return _factory->get_unloaded_method(holder, name, signature, accessor);
+    ciInstanceKlass* declared_holder = get_instance_klass_for_declared_method_holder(holder);
+    return _factory->get_unloaded_method(declared_holder, name, signature, accessor);
   }
 
   // Get a ciKlass representing an unloaded klass.
diff --git a/hotspot/src/share/vm/jvmci/jvmciEnv.cpp b/hotspot/src/share/vm/jvmci/jvmciEnv.cpp
index 9c5d98361e0..8fb1e8cbdbf 100644
--- a/hotspot/src/share/vm/jvmci/jvmciEnv.cpp
+++ b/hotspot/src/share/vm/jvmci/jvmciEnv.cpp
@@ -283,13 +283,14 @@ void JVMCIEnv::get_field_by_index(instanceKlassHandle accessor, fieldDescriptor&
 // Perform an appropriate method lookup based on accessor, holder,
 // name, signature, and bytecode.
 methodHandle JVMCIEnv::lookup_method(instanceKlassHandle h_accessor,
-                               instanceKlassHandle h_holder,
+                               KlassHandle   h_holder,
                                Symbol*       name,
                                Symbol*       sig,
                                Bytecodes::Code bc,
                                constantTag   tag) {
-  JVMCI_EXCEPTION_CONTEXT;
-  LinkResolver::check_klass_accessability(h_accessor, h_holder, KILL_COMPILE_ON_FATAL_(NULL));
+  // Accessibility checks are performed in JVMCIEnv::get_method_by_index_impl().
+  assert(check_klass_accessibility(h_accessor, h_holder), "holder not accessible");
+
   methodHandle dest_method;
   LinkInfo link_info(h_holder, name, sig, h_accessor, LinkInfo::needs_access_check, tag);
   switch (bc) {
@@ -363,9 +364,8 @@ methodHandle JVMCIEnv::get_method_by_index_impl(const constantPoolHandle& cpool,
   }
 
   if (holder_is_accessible) { // Our declared holder is loaded.
-    instanceKlassHandle lookup = get_instance_klass_for_declared_method_holder(holder);
     constantTag tag = cpool->tag_ref_at(index);
-    methodHandle m = lookup_method(accessor, lookup, name_sym, sig_sym, bc, tag);
+    methodHandle m = lookup_method(accessor, holder, name_sym, sig_sym, bc, tag);
     if (!m.is_null() &&
         (bc == Bytecodes::_invokestatic
          ?  InstanceKlass::cast(m->method_holder())->is_not_initialized()
diff --git a/hotspot/src/share/vm/jvmci/jvmciEnv.hpp b/hotspot/src/share/vm/jvmci/jvmciEnv.hpp
index 2c884494db8..1154a95d567 100644
--- a/hotspot/src/share/vm/jvmci/jvmciEnv.hpp
+++ b/hotspot/src/share/vm/jvmci/jvmciEnv.hpp
@@ -127,7 +127,7 @@ private:
   // Helper methods
   static bool       check_klass_accessibility(KlassHandle accessing_klass, KlassHandle resolved_klass);
   static methodHandle  lookup_method(instanceKlassHandle  accessor,
-                           instanceKlassHandle  holder,
+                           KlassHandle     holder,
                            Symbol*         name,
                            Symbol*         sig,
                            Bytecodes::Code bc,
diff --git a/hotspot/test/compiler/arraycopy/TestDefaultMethodArrayCloneDeoptC2.java b/hotspot/test/compiler/arraycopy/TestDefaultMethodArrayCloneDeoptC2.java
new file mode 100644
index 00000000000..c4100ad2f80
--- /dev/null
+++ b/hotspot/test/compiler/arraycopy/TestDefaultMethodArrayCloneDeoptC2.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8170455
+ * @summary C2: Access to [].clone from interfaces fails.
+ * @library /test/lib /
+ *
+ * @requires vm.flavor == "server" & !vm.emulatedClient
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm -Xcomp -Xbatch -Xbootclasspath/a:.  -XX:-TieredCompilation  -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
+ *                   -XX:CompileCommand=compileonly,*TestDefaultMethodArrayCloneDeoptC2Interface::test
+ *                   compiler.arraycopy.TestDefaultMethodArrayCloneDeoptC2
+ */
+
+package compiler.arraycopy;
+
+import sun.hotspot.WhiteBox;
+import java.lang.reflect.Method;
+import compiler.whitebox.CompilerWhiteBoxTest;
+
+
+
+interface TestDefaultMethodArrayCloneDeoptC2Interface {
+    default int[] test(int[] arr) {
+        return arr.clone();
+    }
+
+    default TDMACDC2InterfaceTypeTest[] test(TDMACDC2InterfaceTypeTest[] arr) {
+        return arr.clone();
+    }
+
+    default TDMACDC2ClassTypeTest[] test(TDMACDC2ClassTypeTest[] arr) {
+        return arr.clone();
+    }
+}
+
+public class TestDefaultMethodArrayCloneDeoptC2 implements TestDefaultMethodArrayCloneDeoptC2Interface {
+    private static final WhiteBox WB = WhiteBox.getWhiteBox();
+    public static TestDefaultMethodArrayCloneDeoptC2 a = new TestDefaultMethodArrayCloneDeoptC2();
+
+    public static void main(String[] args) throws Exception {
+        testPrimitiveArr();
+        testIntfArr();
+        testClassArr();
+    }
+
+    public static void testPrimitiveArr() throws Exception {
+        Method m = TestDefaultMethodArrayCloneDeoptC2Interface.class.getMethod("test", int[].class);
+        a.test(new int[1]); // Compiled
+        a.test(new int[1]);
+        if (!WB.isMethodCompiled(m)) {
+            WB.enqueueMethodForCompilation(m, CompilerWhiteBoxTest.COMP_LEVEL_FULL_OPTIMIZATION);
+        }
+        a.test(new int[1]);
+        if (!WB.isMethodCompiled(m)) {
+            throw new Exception("Method should be compiled");
+        }
+    }
+
+    public static void testIntfArr() throws Exception {
+        Method m = TestDefaultMethodArrayCloneDeoptC2Interface.class.getMethod("test", TDMACDC2InterfaceTypeTest[].class);
+        a.test(new TDMACDC2InterfaceTypeTest[1]); // Compiled, Decompile unloaded
+        a.test(new TDMACDC2InterfaceTypeTest[1]); // Compiled
+        a.test(new TDMACDC2InterfaceTypeTest[1]);
+        if (!WB.isMethodCompiled(m)) {
+            WB.enqueueMethodForCompilation(m, CompilerWhiteBoxTest.COMP_LEVEL_FULL_OPTIMIZATION);
+        }
+        a.test(new TDMACDC2InterfaceTypeTest[1]);
+        if (!WB.isMethodCompiled(m)) {
+            throw new Exception("Method should be compiled");
+        }
+    }
+
+    public static void testClassArr() throws Exception {
+        Method m = TestDefaultMethodArrayCloneDeoptC2Interface.class.getMethod("test", TDMACDC2ClassTypeTest[].class);
+        a.test(new TDMACDC2ClassTypeTest[1]); // Compiled, Decompile unloaded
+        a.test(new TDMACDC2ClassTypeTest[1]); // Compiled
+        a.test(new TDMACDC2ClassTypeTest[1]);
+        if (!WB.isMethodCompiled(m)) {
+            WB.enqueueMethodForCompilation(m, CompilerWhiteBoxTest.COMP_LEVEL_FULL_OPTIMIZATION);
+        }
+        a.test(new TDMACDC2ClassTypeTest[1]);
+        if (!WB.isMethodCompiled(m)) {
+            throw new Exception("Method should be compiled");
+        }
+    }
+}
+
+interface TDMACDC2InterfaceTypeTest {
+}
+
+class TDMACDC2ClassTypeTest {
+}
+

From 2b8e240088fe533cad587360aa10948602ce5dcb Mon Sep 17 00:00:00 2001
From: Igor Veresov 
Date: Mon, 6 Feb 2017 14:20:33 -0800
Subject: [PATCH 011/447] 8173673: Fix comparison input types in
 GraalHotSpotVMConfigNode.inlineContiguousAllocationSupported()

Make sure GraalHotSpotVMConfigNode has correct stamp

Reviewed-by: kvn, never, gdub
---
 .../amd64/AMD64HotSpotLIRGenerator.java       |  7 +-
 .../amd64/AMD64HotSpotLoadConfigValueOp.java  | 26 ++++++-
 .../compiler/hotspot/HotSpotLIRGenerator.java | 23 +++---
 .../nodes/GraalHotSpotVMConfigNode.java       | 72 ++++++++++++-------
 4 files changed, 90 insertions(+), 38 deletions(-)

diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRGenerator.java b/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRGenerator.java
index 850faa1c525..bd87349a2d4 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRGenerator.java
+++ b/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRGenerator.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -497,9 +497,8 @@ public class AMD64HotSpotLIRGenerator extends AMD64LIRGenerator implements HotSp
     }
 
     @Override
-    public Value emitLoadConfigValue(int markId) {
-        // Globals are always full-pointer width.
-        Variable result = newVariable(LIRKind.value(target().arch.getWordKind()));
+    public Value emitLoadConfigValue(int markId, LIRKind kind) {
+        Variable result = newVariable(kind);
         append(new AMD64HotSpotLoadConfigValueOp(markId, result));
         return result;
     }
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadConfigValueOp.java b/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadConfigValueOp.java
index 28e2c0d6ba6..24b11237bda 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadConfigValueOp.java
+++ b/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadConfigValueOp.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,8 +24,12 @@ package org.graalvm.compiler.hotspot.amd64;
 
 import static org.graalvm.compiler.core.common.GraalOptions.GeneratePIC;
 import static jdk.vm.ci.code.ValueUtil.asRegister;
+
+import jdk.vm.ci.amd64.AMD64Kind;
+import jdk.vm.ci.code.Register;
 import jdk.vm.ci.meta.AllocatableValue;
 
+import org.graalvm.compiler.asm.amd64.AMD64Address;
 import org.graalvm.compiler.asm.amd64.AMD64MacroAssembler;
 import org.graalvm.compiler.debug.GraalError;
 import org.graalvm.compiler.lir.LIRInstructionClass;
@@ -48,7 +52,25 @@ public final class AMD64HotSpotLoadConfigValueOp extends AMD64LIRInstruction {
     @Override
     public void emitCode(CompilationResultBuilder crb, AMD64MacroAssembler masm) {
         if (GeneratePIC.getValue()) {
-            masm.movq(asRegister(result), masm.getPlaceholder(-1));
+            AMD64Kind kind = (AMD64Kind) result.getPlatformKind();
+            Register reg = asRegister(result);
+            AMD64Address placeholder = masm.getPlaceholder(-1);
+            switch (kind) {
+                case BYTE:
+                    masm.movsbl(reg, placeholder);
+                    break;
+                case WORD:
+                    masm.movswl(reg, placeholder);
+                    break;
+                case DWORD:
+                    masm.movl(reg, placeholder);
+                    break;
+                case QWORD:
+                    masm.movq(reg, placeholder);
+                    break;
+                default:
+                    throw GraalError.unimplemented();
+            }
         } else {
             throw GraalError.unimplemented();
         }
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerator.java b/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerator.java
index d2c61d89a9d..f2f45e24fec 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerator.java
+++ b/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerator.java
@@ -22,6 +22,7 @@
  */
 package org.graalvm.compiler.hotspot;
 
+import org.graalvm.compiler.core.common.LIRKind;
 import org.graalvm.compiler.debug.GraalError;
 import org.graalvm.compiler.hotspot.meta.HotSpotConstantLoadAction;
 import org.graalvm.compiler.hotspot.meta.HotSpotProviders;
@@ -141,10 +142,10 @@ public interface HotSpotLIRGenerator extends LIRGeneratorTool {
     /**
      * Emits code for a {@link LoadConstantIndirectlyNode}.
      *
-     * @param constant
+     * @param constant original constant
+     * @param action action to perform on the metaspace object
      * @return Value of loaded address in register
      */
-    @SuppressWarnings("unused")
     default Value emitLoadMetaspaceAddress(Constant constant, HotSpotConstantLoadAction action) {
         throw GraalError.unimplemented();
     }
@@ -152,21 +153,23 @@ public interface HotSpotLIRGenerator extends LIRGeneratorTool {
     /**
      * Emits code for a {@link GraalHotSpotVMConfigNode}.
      *
-     * @param markId type of address to load
+     * @param markId id of the value to load
+     * @param kind type of the value to load
      * @return value of loaded global in register
      */
-    default Value emitLoadConfigValue(int markId) {
+    default Value emitLoadConfigValue(int markId, LIRKind kind) {
         throw GraalError.unimplemented();
     }
 
     /**
      * Emits code for a {@link ResolveConstantNode} to resolve a {@link HotSpotObjectConstant}.
      *
+     * @param constant original constant
      * @param constantDescription a description of the string that need to be materialized (and
      *            interned) as java.lang.String, generated with {@link EncodedSymbolConstant}
+     * @param frameState frame state for the runtime call
      * @return Returns the address of the requested constant.
      */
-    @SuppressWarnings("unused")
     default Value emitObjectConstantRetrieval(Constant constant, Value constantDescription, LIRFrameState frameState) {
         throw GraalError.unimplemented();
     }
@@ -174,11 +177,12 @@ public interface HotSpotLIRGenerator extends LIRGeneratorTool {
     /**
      * Emits code for a {@link ResolveConstantNode} to resolve a {@link HotSpotMetaspaceConstant}.
      *
+     * @param constant original constant
      * @param constantDescription a symbolic description of the {@link HotSpotMetaspaceConstant}
      *            generated by {@link EncodedSymbolConstant}
+     * @param frameState frame state for the runtime call
      * @return Returns the address of the requested constant.
      */
-    @SuppressWarnings("unused")
     default Value emitMetaspaceConstantRetrieval(Constant constant, Value constantDescription, LIRFrameState frameState) {
         throw GraalError.unimplemented();
     }
@@ -188,12 +192,13 @@ public interface HotSpotLIRGenerator extends LIRGeneratorTool {
      * {@link HotSpotMetaspaceConstant} that represents a {@link ResolvedJavaMethod} and return the
      * corresponding MethodCounters object.
      *
+     * @param method original constant
      * @param klassHint a klass in which the method is declared
      * @param methodDescription is symbolic description of the constant generated by
      *            {@link EncodedSymbolConstant}
+     * @param frameState frame state for the runtime call
      * @return Returns the address of the requested constant.
      */
-    @SuppressWarnings("unused")
     default Value emitResolveMethodAndLoadCounters(Constant method, Value klassHint, Value methodDescription, LIRFrameState frameState) {
         throw GraalError.unimplemented();
     }
@@ -202,11 +207,13 @@ public interface HotSpotLIRGenerator extends LIRGeneratorTool {
      * Emits code for a {@link ResolveConstantNode} to resolve a klass
      * {@link HotSpotMetaspaceConstant} and run static initializer.
      *
+     *
+     * @param constant original constant
      * @param constantDescription a symbolic description of the {@link HotSpotMetaspaceConstant}
      *            generated by {@link EncodedSymbolConstant}
+     * @param frameState frame state for the runtime call
      * @return Returns the address of the requested constant.
      */
-    @SuppressWarnings("unused")
     default Value emitKlassInitializationAndRetrieval(Constant constant, Value constantDescription, LIRFrameState frameState) {
         throw GraalError.unimplemented();
     }
diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GraalHotSpotVMConfigNode.java b/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GraalHotSpotVMConfigNode.java
index cdb8160632e..8d0575fe6b5 100644
--- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GraalHotSpotVMConfigNode.java
+++ b/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GraalHotSpotVMConfigNode.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -55,62 +55,86 @@ public class GraalHotSpotVMConfigNode extends FloatingNode implements LIRLowerab
     private final GraalHotSpotVMConfig config;
     protected final int markId;
 
+    /**
+     * Constructor for {@link #areConfigValuesConstant()}.
+     *
+     * @param config
+     */
+    public GraalHotSpotVMConfigNode(@InjectedNodeParameter GraalHotSpotVMConfig config) {
+        super(TYPE, StampFactory.forKind(JavaKind.Boolean));
+        this.config = config;
+        this.markId = 0;
+    }
+
+    /**
+     * Constructor for node intrinsics below.
+     *
+     * @param config
+     * @param markId id of the config value
+     */
+    public GraalHotSpotVMConfigNode(@InjectedNodeParameter GraalHotSpotVMConfig config, int markId) {
+        super(TYPE, StampFactory.forNodeIntrinsic());
+        this.config = config;
+        this.markId = markId;
+    }
+
+    /**
+     * Constructor with explicit type specification.
+     *
+     * @param config
+     * @param markId id of the config value
+     * @param kind explicit type of the node
+     */
     public GraalHotSpotVMConfigNode(@InjectedNodeParameter GraalHotSpotVMConfig config, int markId, JavaKind kind) {
         super(TYPE, StampFactory.forKind(kind));
         this.config = config;
         this.markId = markId;
     }
 
-    /**
-     * Constructor selected by {@link #loadConfigValue(int, JavaKind)}.
-     *
-     * @param config
-     * @param markId
-     */
-    public GraalHotSpotVMConfigNode(@InjectedNodeParameter GraalHotSpotVMConfig config, int markId) {
-        super(TYPE, StampFactory.forKind(JavaKind.Boolean));
-        this.config = config;
-        this.markId = 0;
-    }
-
     @Override
     public void generate(NodeLIRBuilderTool generator) {
-        Value res = ((HotSpotLIRGenerator) generator.getLIRGeneratorTool()).emitLoadConfigValue(markId);
+        Value res = ((HotSpotLIRGenerator) generator.getLIRGeneratorTool()).emitLoadConfigValue(markId, generator.getLIRGeneratorTool().getLIRKind(stamp));
         generator.setResult(this, res);
     }
 
     @NodeIntrinsic
-    private static native boolean isConfigValueConstant(@ConstantNodeParameter int markId);
+    private static native boolean areConfigValuesConstant();
 
-    @NodeIntrinsic
-    private static native long loadConfigValue(@ConstantNodeParameter int markId, @ConstantNodeParameter JavaKind kind);
+    @NodeIntrinsic(setStampFromReturnType = true)
+    private static native long loadLongConfigValue(@ConstantNodeParameter int markId);
+
+    @NodeIntrinsic(setStampFromReturnType = true)
+    private static native int loadIntConfigValue(@ConstantNodeParameter int markId);
+
+    @NodeIntrinsic(setStampFromReturnType = true)
+    private static native byte loadByteConfigValue(@ConstantNodeParameter int markId);
 
     public static long cardTableAddress() {
-        return loadConfigValue(cardTableAddressMark(INJECTED_VMCONFIG), JavaKind.Long);
+        return loadLongConfigValue(cardTableAddressMark(INJECTED_VMCONFIG));
     }
 
     public static boolean isCardTableAddressConstant() {
-        return isConfigValueConstant(cardTableAddressMark(INJECTED_VMCONFIG));
+        return areConfigValuesConstant();
     }
 
     public static long heapTopAddress() {
-        return loadConfigValue(heapTopAddressMark(INJECTED_VMCONFIG), JavaKind.Long);
+        return loadLongConfigValue(heapTopAddressMark(INJECTED_VMCONFIG));
     }
 
     public static long heapEndAddress() {
-        return loadConfigValue(heapEndAddressMark(INJECTED_VMCONFIG), JavaKind.Long);
+        return loadLongConfigValue(heapEndAddressMark(INJECTED_VMCONFIG));
     }
 
     public static long crcTableAddress() {
-        return loadConfigValue(crcTableAddressMark(INJECTED_VMCONFIG), JavaKind.Long);
+        return loadLongConfigValue(crcTableAddressMark(INJECTED_VMCONFIG));
     }
 
     public static int logOfHeapRegionGrainBytes() {
-        return (int) loadConfigValue(logOfHeapRegionGrainBytesMark(INJECTED_VMCONFIG), JavaKind.Byte);
+        return loadIntConfigValue(logOfHeapRegionGrainBytesMark(INJECTED_VMCONFIG));
     }
 
     public static boolean inlineContiguousAllocationSupported() {
-        return loadConfigValue(inlineContiguousAllocationSupportedMark(INJECTED_VMCONFIG), JavaKind.Byte) > 0;
+        return loadByteConfigValue(inlineContiguousAllocationSupportedMark(INJECTED_VMCONFIG)) != 0;
     }
 
     @Fold

From 4dd3138c5d047a477e5ce2d71373e553b6047172 Mon Sep 17 00:00:00 2001
From: Vladimir Kozlov 
Date: Wed, 18 Jan 2017 14:36:54 -0800
Subject: [PATCH 012/447] 8173794: [REDO] [AOT] Missing GC scan of
 _metaspace_got array containing Klass*

Added back _metaspace_got array scan.

Reviewed-by: dlong
---
 .../tools/jaotc/CallSiteRelocationSymbol.java |  6 ----
 .../jaotc/JavaCallSiteRelocationSymbol.java   | 16 +++++++--
 hotspot/src/share/vm/aot/aotCodeHeap.cpp      | 33 ++++---------------
 .../src/share/vm/aot/aotCompiledMethod.cpp    | 27 +++++++--------
 .../src/share/vm/aot/aotCompiledMethod.hpp    |  2 --
 .../src/share/vm/runtime/deoptimization.cpp   |  4 +--
 6 files changed, 35 insertions(+), 53 deletions(-)

diff --git a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/CallSiteRelocationSymbol.java b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/CallSiteRelocationSymbol.java
index 68f86ef65e3..5fce078a470 100644
--- a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/CallSiteRelocationSymbol.java
+++ b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/CallSiteRelocationSymbol.java
@@ -59,12 +59,6 @@ abstract class CallSiteRelocationSymbol {
         addExternalPltToGotRelocation(binaryContainer, symbol, relocationOffset);
     }
 
-    protected static void addMetaspaceGotRelocation(BinaryContainer binaryContainer, String symbolName, int symbolOffset, int relocationOffset) {
-        ByteContainer container = binaryContainer.getMetaspaceGotContainer();
-        Symbol symbol = container.createGotSymbol(symbolOffset, symbolName);
-        addExternalPltToGotRelocation(binaryContainer, symbol, relocationOffset);
-    }
-
     /**
      * Add an {@link RelocType#EXTERNAL_GOT_TO_PLT} relocation to the
      * {@link BinaryContainer#getExtLinkageGOTContainer()}.
diff --git a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/JavaCallSiteRelocationSymbol.java b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/JavaCallSiteRelocationSymbol.java
index a14049dd87f..f589610ded8 100644
--- a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/JavaCallSiteRelocationSymbol.java
+++ b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/JavaCallSiteRelocationSymbol.java
@@ -37,6 +37,7 @@ import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod;
 final class JavaCallSiteRelocationSymbol extends CallSiteRelocationSymbol {
 
     private static final byte[] zeroSlot = new byte[8];
+    // -1 represents Universe::non_oop_word() value
     private static final byte[] minusOneSlot = {-1, -1, -1, -1, -1, -1, -1, -1};
 
     public JavaCallSiteRelocationSymbol(CompiledMethodInfo mi, Call call, CallSiteRelocationInfo callSiteRelocation, BinaryContainer binaryContainer) {
@@ -79,30 +80,39 @@ final class JavaCallSiteRelocationSymbol extends CallSiteRelocationSymbol {
         }
 
         // Add relocation to GOT cell for call resolution jump.
+        // This GOT cell will be initialized during JVM startup with address
+        // of JVM runtime call resolution function.
         String gotSymbolName = "got." + getResolveSymbolName(binaryContainer, mi, call);
         Symbol gotSymbol = binaryContainer.getGotSymbol(gotSymbolName);
         addExternalPltToGotRelocation(binaryContainer, gotSymbol, stub.getResolveJumpOffset());
 
         // Add relocation to resolve call jump instruction address for GOT cell.
+        // This GOT cell will be initialized with address of resolution jump instruction and
+        // will be updated with call destination address by JVM runtime call resolution code.
         String pltJmpSymbolName = relocationSymbolName("plt.jmp", mi, call, callSiteRelocation);
         addCodeContainerRelocation(binaryContainer, pltJmpSymbolName, stub.getResolveJumpStart(), gotStartOffset);
 
         // Add relocation to GOT cell for dispatch jump.
+        // The dispatch jump loads destination address from this GOT cell.
         String gotEntrySymbolName = relocationSymbolName("got.entry", mi, call, callSiteRelocation);
         addExtLinkageGotContainerRelocation(binaryContainer, gotEntrySymbolName, gotStartOffset, stub.getDispatchJumpOffset());
 
-        // Virtual call needs initial -1 value.
+        // Virtual call needs initial -1 value for Klass pointer.
+        // Non virtual call needs initial 0 value for Method pointer to call c2i adapter.
         byte[] slot = isVirtualCall ? minusOneSlot : zeroSlot;
-        final int gotMetaOffset = binaryContainer.appendMetaspaceGotBytes(slot, 0, slot.length);
+        final int gotMetaOffset = binaryContainer.appendExtLinkageGotBytes(slot, 0, slot.length);
 
         // Add relocation to GOT cell for move instruction (Klass* for virtual, Method* otherwise).
         String gotMoveSymbolName = relocationSymbolName("got.move", mi, call, callSiteRelocation);
-        addMetaspaceGotRelocation(binaryContainer, gotMoveSymbolName, gotMetaOffset, stub.getMovOffset());
+        addExtLinkageGotContainerRelocation(binaryContainer, gotMoveSymbolName, gotMetaOffset, stub.getMovOffset());
 
         if (isVirtualCall) {
             // Nothing.
         } else {
             // Add relocation to GOT cell for c2i adapter jump.
+            // The c2i jump instruction loads destination address from this GOT cell.
+            // This GOT cell is initialized with -1 and will be updated
+            // by JVM runtime call resolution code.
             String gotC2ISymbolName = relocationSymbolName("got.c2i", mi, call, callSiteRelocation);
             addExtLinkageGotContainerRelocation(binaryContainer, gotC2ISymbolName, gotStartOffset + 8, stub.getC2IJumpOffset());
         }
diff --git a/hotspot/src/share/vm/aot/aotCodeHeap.cpp b/hotspot/src/share/vm/aot/aotCodeHeap.cpp
index 52e2c8d55b1..87d41f80777 100644
--- a/hotspot/src/share/vm/aot/aotCodeHeap.cpp
+++ b/hotspot/src/share/vm/aot/aotCodeHeap.cpp
@@ -830,38 +830,19 @@ void AOTCodeHeap::oops_do(OopClosure* f) {
   }
 }
 
-// Yes, this is faster than going through the relocations,
-// but there are two problems:
-// 1) GOT slots are sometimes patched with non-Metadata values
-// 2) We don't want to scan metadata for dead methods
-// Unfortunately we don't know if the metadata belongs to
-// live aot methods or not, so process them all.  If this
-// is for mark_on_stack, some old methods may stick around
-// forever instead of getting cleaned up.
+// Scan only metaspace_got cells which should have only Klass*,
+// metadata_got cells are scanned only for alive AOT methods
+// by AOTCompiledMethod::metadata_do().
 void AOTCodeHeap::got_metadata_do(void f(Metadata*)) {
   for (int i = 1; i < _metaspace_got_size; i++) {
     Metadata** p = &_metaspace_got[i];
     Metadata* md = *p;
     if (md == NULL)  continue;  // skip non-oops
-    intptr_t meta = (intptr_t)md;
-    if (meta == -1)  continue;  // skip non-oops
     if (Metaspace::contains(md)) {
       f(md);
-    }
-  }
-  for (int i = 1; i < _metadata_got_size; i++) {
-    Metadata** p = &_metadata_got[i];
-    Metadata* md = *p;
-    intptr_t meta = (intptr_t)md;
-    if ((meta & 1) == 1) {
-      // already resolved
-      md = (Metadata*)(meta & ~1);
     } else {
-      continue;
-    }
-    if (md == NULL)  continue;  // skip non-oops
-    if (Metaspace::contains(md)) {
-      f(md);
+      intptr_t meta = (intptr_t)md;
+      fatal("Invalid value in _metaspace_got[%d] = " INTPTR_FORMAT, i, meta);
     }
   }
 }
@@ -910,8 +891,6 @@ void AOTCodeHeap::metadata_do(void f(Metadata*)) {
       aot->metadata_do(f);
     }
   }
-#if 0
-  // With the marking above, this call doesn't seem to be needed
+  // Scan metaspace_got cells.
   got_metadata_do(f);
-#endif
 }
diff --git a/hotspot/src/share/vm/aot/aotCompiledMethod.cpp b/hotspot/src/share/vm/aot/aotCompiledMethod.cpp
index 1f40284da7e..c501ce12e69 100644
--- a/hotspot/src/share/vm/aot/aotCompiledMethod.cpp
+++ b/hotspot/src/share/vm/aot/aotCompiledMethod.cpp
@@ -71,15 +71,6 @@ static void metadata_oops_do(Metadata** metadata_begin, Metadata **metadata_end,
 }
 #endif
 
-void AOTCompiledMethod::oops_do(OopClosure* f) {
-  if (_oop != NULL) {
-    f->do_oop(&_oop);
-  }
-#if 0
-  metadata_oops_do(metadata_begin(), metadata_end(), f);
-#endif
-}
-
 bool AOTCompiledMethod::do_unloading_oops(address low_boundary, BoolObjectClosure* is_alive, bool unloading_occurred) {
   return false;
 }
@@ -161,9 +152,6 @@ Metadata* AOTCompiledMethod::metadata_at(int index) const {
       *entry = (Metadata*)meta; // Should be atomic on x64
       return (Metadata*)m;
     }
-    // need to resolve it here..., patching of GOT need to be CAS or atomic operation.
-    // FIXIT: need methods for debuginfo.
-    // return _method;
   }
   ShouldNotReachHere(); return NULL;
 }
@@ -288,11 +276,19 @@ void AOTCompiledMethod::metadata_do(void f(Metadata*)) {
           f(cichk->holder_method());
           f(cichk->holder_klass());
         } else {
+          // Get Klass* or NULL (if value is -1) from GOT cell of virtual call PLT stub.
           Metadata* ic_oop = ic->cached_metadata();
           if (ic_oop != NULL) {
             f(ic_oop);
           }
         }
+      } else if (iter.type() == relocInfo::static_call_type ||
+                 iter.type() == relocInfo::opt_virtual_call_type){
+        // Check Method* in AOT c2i stub for other calls.
+        Metadata* meta = (Metadata*)nativeLoadGot_at(nativePltCall_at(iter.addr())->plt_c2i_stub())->data();
+        if (meta != NULL) {
+          f(meta);
+        }
       }
     }
   }
@@ -332,7 +328,12 @@ void AOTCompiledMethod::print_on(outputStream* st, const char* msg) const {
     st->print("%4d ", _aot_id);    // print compilation number
     st->print("    aot[%2d]", _heap->dso_id());
     // Stubs have _method == NULL
-    st->print("   %s", (_method == NULL ? _name : _method->name_and_sig_as_C_string()));
+    if (_method == NULL) {
+      st->print("   %s", _name);
+    } else {
+      ResourceMark m;
+      st->print("   %s", _method->name_and_sig_as_C_string());
+    }
     if (Verbose) {
       st->print(" entry at " INTPTR_FORMAT, p2i(_code));
     }
diff --git a/hotspot/src/share/vm/aot/aotCompiledMethod.hpp b/hotspot/src/share/vm/aot/aotCompiledMethod.hpp
index 7fef6fdb433..723bbdb8d30 100644
--- a/hotspot/src/share/vm/aot/aotCompiledMethod.hpp
+++ b/hotspot/src/share/vm/aot/aotCompiledMethod.hpp
@@ -257,8 +257,6 @@ private:
     return (int) (*_state_adr);
   }
 
-  virtual void oops_do(OopClosure* f);
-
   // inlined and non-virtual for AOTCodeHeap::oops_do
   void do_oops(OopClosure* f) {
     assert(_is_alive(), "");
diff --git a/hotspot/src/share/vm/runtime/deoptimization.cpp b/hotspot/src/share/vm/runtime/deoptimization.cpp
index a656e89643a..7a8ee4253f1 100644
--- a/hotspot/src/share/vm/runtime/deoptimization.cpp
+++ b/hotspot/src/share/vm/runtime/deoptimization.cpp
@@ -1597,9 +1597,9 @@ JRT_ENTRY(void, Deoptimization::uncommon_trap_inner(JavaThread* thread, jint tra
       get_method_data(thread, profiled_method, create_if_missing);
 
     // Log a message
-    Events::log_deopt_message(thread, "Uncommon trap: reason=%s action=%s pc=" INTPTR_FORMAT " method=%s @ %d",
+    Events::log_deopt_message(thread, "Uncommon trap: reason=%s action=%s pc=" INTPTR_FORMAT " method=%s @ %d %s",
                               trap_reason_name(reason), trap_action_name(action), p2i(fr.pc()),
-                              trap_method->name_and_sig_as_C_string(), trap_bci);
+                              trap_method->name_and_sig_as_C_string(), trap_bci, nm->compiler_name());
 
     // Print a bunch of diagnostics, if requested.
     if (TraceDeoptimization || LogCompilation) {

From 005b41dab0728714175d7de41cef3d37abd1a0b8 Mon Sep 17 00:00:00 2001
From: Iris Clark 
Date: Wed, 25 Jan 2017 18:14:44 +0000
Subject: [PATCH 013/447] Added tag jdk-10+0 for changeset 55441f575d6a

---
 .hgtags-top-repo | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.hgtags-top-repo b/.hgtags-top-repo
index e54c4180d63..d5e38f8094b 100644
--- a/.hgtags-top-repo
+++ b/.hgtags-top-repo
@@ -396,3 +396,4 @@ b119012d1c2ab2570fe8718633840d0c1f1f441d jdk-9+149
 71a766d4c18041a7f833ee22823125b02e1a7f1e jdk-9+151
 ef056360ddf3977d7d2ddbeb456a4d612d19ea05 jdk-9+152
 816a6d03a7c44edfbd8780110529f1bdc3964fb9 jdk-9+153
+8d22611ffb6540bc1ace64a00c048c8b82d8c69a jdk-10+0

From 6e9b0c1b7065066b33b6ba73712adb0c5841a1dd Mon Sep 17 00:00:00 2001
From: Iris Clark 
Date: Wed, 25 Jan 2017 18:14:45 +0000
Subject: [PATCH 014/447] Added tag jdk-10+0 for changeset 870fe9d526c3

---
 corba/.hgtags | 1 +
 1 file changed, 1 insertion(+)

diff --git a/corba/.hgtags b/corba/.hgtags
index 49bf178f515..156cd2a3e96 100644
--- a/corba/.hgtags
+++ b/corba/.hgtags
@@ -396,3 +396,4 @@ f95cc86b6ac22ec1ade5d4f825dc7782adeea228 jdk-9+148
 77f827f5bbad3ef795664bc675f72d98d156b9f8 jdk-9+151
 ff8cb43c07c069b1debdee44cb88ca22db1ec757 jdk-9+152
 68a8e8658511093b322a46ed04b2a321e1da2a43 jdk-9+153
+d66f97a610a6beac987740edc2bf6a70f46ba574 jdk-10+0

From 393ecb73978f471232a17a3de9371e6961111e4b Mon Sep 17 00:00:00 2001
From: Iris Clark 
Date: Wed, 25 Jan 2017 18:14:48 +0000
Subject: [PATCH 015/447] Added tag jdk-10+0 for changeset c9c0f7be1ab8

---
 hotspot/.hgtags | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hotspot/.hgtags b/hotspot/.hgtags
index de59ae64925..9d6ed71e85c 100644
--- a/hotspot/.hgtags
+++ b/hotspot/.hgtags
@@ -556,3 +556,4 @@ a82cb5350cad96a0b4de496afebe3ded89f27efa jdk-9+146
 2a2ac7d9f52c8cb2b80077e515b5840b947e640c jdk-9+151
 31f1d26c60df7b2e516a4f84160d76ba017d4e09 jdk-9+152
 217ba81b9a4ce8698200370175aa2db86a39f66c jdk-9+153
+fc7e94cb748507366b839e859f865f724467446a jdk-10+0

From 18604b62e7f7bc395ecd3e426d7cb58741e4967f Mon Sep 17 00:00:00 2001
From: Iris Clark 
Date: Wed, 25 Jan 2017 18:14:49 +0000
Subject: [PATCH 016/447] Added tag jdk-10+0 for changeset e6fc8462d73b

---
 jaxp/.hgtags | 1 +
 1 file changed, 1 insertion(+)

diff --git a/jaxp/.hgtags b/jaxp/.hgtags
index 17b1b7612c8..f5008a4a5c3 100644
--- a/jaxp/.hgtags
+++ b/jaxp/.hgtags
@@ -396,3 +396,4 @@ f85154af719f99a3b4d81b67a8b4c18a650d10f9 jdk-9+150
 13c6906bfc861d99dc35a19c80b7a99f0b0ac58d jdk-9+151
 7e3da313b1746578da648155e37dd8526e83153d jdk-9+152
 1384504d2cd0e55c5e0becaeaf40ab05cae959d6 jdk-9+153
+0908877116d17c6e59092ec7d53ef687a96d3278 jdk-10+0

From f2059237aad08c83f5ffe859ef6db4ce9ea186e4 Mon Sep 17 00:00:00 2001
From: Iris Clark 
Date: Wed, 25 Jan 2017 18:14:50 +0000
Subject: [PATCH 017/447] Added tag jdk-10+0 for changeset fc31f9d07a66

---
 jaxws/.hgtags | 1 +
 1 file changed, 1 insertion(+)

diff --git a/jaxws/.hgtags b/jaxws/.hgtags
index 2b9c99ea42a..d6a26ad42f3 100644
--- a/jaxws/.hgtags
+++ b/jaxws/.hgtags
@@ -399,3 +399,4 @@ c8c9c334743caf8155c9809b6b4ac315d3a66476 jdk-9+148
 c48b4d4768b1c2b8fe5d1a844ca13732e5dfbe2a jdk-9+151
 6f8fb1cf7e5f61c40dcc3654f9a623c505f6de1f jdk-9+152
 7a532a9a227137155b905341d4b99939db51220e jdk-9+153
+34af95c7dbff74f3448fcdb7d745524e8a1cc88a jdk-10+0

From ffbc176b33eafad72f84977a8d680a82c4da38aa Mon Sep 17 00:00:00 2001
From: Iris Clark 
Date: Wed, 25 Jan 2017 18:14:52 +0000
Subject: [PATCH 018/447] Added tag jdk-10+0 for changeset dcd77ece46a9

---
 jdk/.hgtags | 1 +
 1 file changed, 1 insertion(+)

diff --git a/jdk/.hgtags b/jdk/.hgtags
index a73fb2ebf2a..34179e37ad0 100644
--- a/jdk/.hgtags
+++ b/jdk/.hgtags
@@ -396,3 +396,4 @@ c41140100bf1e5c10c7b8f3bde91c16eff7485f5 jdk-9+147
 d27bab22ff62823902d93d1d35ca397cfd50d059 jdk-9+151
 a20f2cf90762673e1bc4980fd6597e70a2578045 jdk-9+152
 1c4411322327aea3f91011ec3977a12a05b09629 jdk-9+153
+f2325d80b37c2817e15039bf64189a08e29c6d39 jdk-10+0

From c8ab7aceafc866f6d1d1b35c678289c6fa06665e Mon Sep 17 00:00:00 2001
From: Iris Clark 
Date: Wed, 25 Jan 2017 18:14:56 +0000
Subject: [PATCH 019/447] Added tag jdk-10+0 for changeset 3995afe22c68

---
 langtools/.hgtags | 1 +
 1 file changed, 1 insertion(+)

diff --git a/langtools/.hgtags b/langtools/.hgtags
index 649e286be02..5121bda9339 100644
--- a/langtools/.hgtags
+++ b/langtools/.hgtags
@@ -396,3 +396,4 @@ e5a42ddaf633fde14b983f740ae0e7e490741fd1 jdk-9+150
 4f348bd05341581df84ff1510d5b3a9b5b488367 jdk-9+151
 5b6f12de6f9167a582fa2c6ac54e69c591b09e68 jdk-9+152
 03f48cd283f5dd6b7153fd7e0cf2df8582b14391 jdk-9+153
+b670e95106f5327a29e2e2c4f18ee48a8d36e481 jdk-10+0

From 3e6d53c3bbb93fac34d1277410da52644ec72648 Mon Sep 17 00:00:00 2001
From: Iris Clark 
Date: Wed, 25 Jan 2017 18:14:57 +0000
Subject: [PATCH 020/447] Added tag jdk-10+0 for changeset 0d39b11bffb3

---
 nashorn/.hgtags | 1 +
 1 file changed, 1 insertion(+)

diff --git a/nashorn/.hgtags b/nashorn/.hgtags
index 7fe9710ae5c..009d408667a 100644
--- a/nashorn/.hgtags
+++ b/nashorn/.hgtags
@@ -387,3 +387,4 @@ ace1d994bca775d6545a4c874ae73d1dfc9ec18b jdk-9+150
 2a0437036a64853334e538044eb68d2df70075fa jdk-9+151
 ddc52e72757086a75a54371e8e7f56a3f89f1e55 jdk-9+152
 19aaaf2d02b7d6986538cd9a8c46901ecb50eebf jdk-9+153
+a84b49cfee63716975535abae2865ffef4dd6474 jdk-10+0

From 279afd654c2f6359b8719faf183b6e0e194d0a28 Mon Sep 17 00:00:00 2001
From: Iris Clark 
Date: Wed, 25 Jan 2017 22:32:45 +0000
Subject: [PATCH 021/447] 8173366: Update .jcheck/conf files for JDK 10

Reviewed-by: mr
---
 .jcheck/conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.jcheck/conf b/.jcheck/conf
index 5c6f62dc12c..b2581358014 100644
--- a/.jcheck/conf
+++ b/.jcheck/conf
@@ -1 +1 @@
-project=jdk9
+project=jdk10

From be8142d956c709c338520b3d2cb05afae5811597 Mon Sep 17 00:00:00 2001
From: Iris Clark 
Date: Wed, 25 Jan 2017 22:32:45 +0000
Subject: [PATCH 022/447] 8173366: Update .jcheck/conf files for JDK 10

Reviewed-by: mr
---
 corba/.jcheck/conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/corba/.jcheck/conf b/corba/.jcheck/conf
index 5c6f62dc12c..b2581358014 100644
--- a/corba/.jcheck/conf
+++ b/corba/.jcheck/conf
@@ -1 +1 @@
-project=jdk9
+project=jdk10

From be80dcdba99bfdcca34e5588f22f7dc68219367f Mon Sep 17 00:00:00 2001
From: Iris Clark 
Date: Wed, 25 Jan 2017 22:32:46 +0000
Subject: [PATCH 023/447] 8173366: Update .jcheck/conf files for JDK 10

Reviewed-by: mr
---
 hotspot/.jcheck/conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hotspot/.jcheck/conf b/hotspot/.jcheck/conf
index 5c6f62dc12c..b2581358014 100644
--- a/hotspot/.jcheck/conf
+++ b/hotspot/.jcheck/conf
@@ -1 +1 @@
-project=jdk9
+project=jdk10

From c0c6a01a22296939d1923c7582f44d8b6e649972 Mon Sep 17 00:00:00 2001
From: Iris Clark 
Date: Wed, 25 Jan 2017 22:32:48 +0000
Subject: [PATCH 024/447] 8173366: Update .jcheck/conf files for JDK 10

Reviewed-by: mr
---
 jaxp/.jcheck/conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jaxp/.jcheck/conf b/jaxp/.jcheck/conf
index 5c6f62dc12c..b2581358014 100644
--- a/jaxp/.jcheck/conf
+++ b/jaxp/.jcheck/conf
@@ -1 +1 @@
-project=jdk9
+project=jdk10

From 507a72d63bc3f3dd210441291a8f00e68d50493f Mon Sep 17 00:00:00 2001
From: Iris Clark 
Date: Wed, 25 Jan 2017 22:32:48 +0000
Subject: [PATCH 025/447] 8173366: Update .jcheck/conf files for JDK 10

Reviewed-by: mr
---
 jaxws/.jcheck/conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jaxws/.jcheck/conf b/jaxws/.jcheck/conf
index 5c6f62dc12c..b2581358014 100644
--- a/jaxws/.jcheck/conf
+++ b/jaxws/.jcheck/conf
@@ -1 +1 @@
-project=jdk9
+project=jdk10

From 0d7b68ec2302c63617e109871ce04854fad59d1d Mon Sep 17 00:00:00 2001
From: Iris Clark 
Date: Wed, 25 Jan 2017 22:32:51 +0000
Subject: [PATCH 026/447] 8173366: Update .jcheck/conf files for JDK 10

Reviewed-by: mr
---
 jdk/.jcheck/conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jdk/.jcheck/conf b/jdk/.jcheck/conf
index 5c6f62dc12c..b2581358014 100644
--- a/jdk/.jcheck/conf
+++ b/jdk/.jcheck/conf
@@ -1 +1 @@
-project=jdk9
+project=jdk10

From a4ed1aefb82c4a0b74fb8a7c810a569e74ef5607 Mon Sep 17 00:00:00 2001
From: Iris Clark 
Date: Wed, 25 Jan 2017 22:32:52 +0000
Subject: [PATCH 027/447] 8173366: Update .jcheck/conf files for JDK 10

Reviewed-by: mr
---
 langtools/.jcheck/conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/langtools/.jcheck/conf b/langtools/.jcheck/conf
index 5c6f62dc12c..b2581358014 100644
--- a/langtools/.jcheck/conf
+++ b/langtools/.jcheck/conf
@@ -1 +1 @@
-project=jdk9
+project=jdk10

From 1758a278c454bfbe35817519452f9cca137dcdbb Mon Sep 17 00:00:00 2001
From: Iris Clark 
Date: Wed, 25 Jan 2017 22:32:53 +0000
Subject: [PATCH 028/447] 8173366: Update .jcheck/conf files for JDK 10

Reviewed-by: mr
---
 nashorn/.jcheck/conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nashorn/.jcheck/conf b/nashorn/.jcheck/conf
index 5c6f62dc12c..b2581358014 100644
--- a/nashorn/.jcheck/conf
+++ b/nashorn/.jcheck/conf
@@ -1 +1 @@
-project=jdk9
+project=jdk10

From 30b20a3edbed1e5c1e4d57f80ab0a7fa94785475 Mon Sep 17 00:00:00 2001
From: Andrew Haley 
Date: Fri, 27 Jan 2017 09:50:15 +0000
Subject: [PATCH 029/447] 8173472: AArch64: C1 comparisons with null only use
 32-bit instructions

Reviewed-by: roland
---
 .../src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp    | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
index b139a44f9a1..0016aa9ba6a 100644
--- a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
@@ -1922,12 +1922,17 @@ void LIR_Assembler::comp_op(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2,
     }
 
     if (opr2->is_constant()) {
+      bool is_32bit = false; // width of register operand
       jlong imm;
+
       switch(opr2->type()) {
+      case T_INT:
+        imm = opr2->as_constant_ptr()->as_jint();
+        is_32bit = true;
+        break;
       case T_LONG:
         imm = opr2->as_constant_ptr()->as_jlong();
         break;
-      case T_INT:
       case T_ADDRESS:
         imm = opr2->as_constant_ptr()->as_jint();
         break;
@@ -1942,14 +1947,14 @@ void LIR_Assembler::comp_op(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2,
       }
 
       if (Assembler::operand_valid_for_add_sub_immediate(imm)) {
-        if (type2aelembytes(opr1->type()) <= 4)
+        if (is_32bit)
           __ cmpw(reg1, imm);
         else
           __ cmp(reg1, imm);
         return;
       } else {
         __ mov(rscratch1, imm);
-        if (type2aelembytes(opr1->type()) <= 4)
+        if (is_32bit)
           __ cmpw(reg1, rscratch1);
         else
           __ cmp(reg1, rscratch1);

From 6fb4d7356b09f61d683f38ab0e8fca26ad2fc0d3 Mon Sep 17 00:00:00 2001
From: Thomas Schatzl 
Date: Fri, 27 Jan 2017 13:12:53 +0100
Subject: [PATCH 030/447] 8173229: Wrong assert whether all remembered set
 entries have been iterated over in presence of coarsenings

Remove asserts as they are almost useless.

Reviewed-by: mgerdin, ehelin
---
 .../src/share/vm/gc/g1/heapRegionRemSet.cpp   | 29 +------------------
 .../src/share/vm/gc/g1/heapRegionRemSet.hpp   |  4 +--
 2 files changed, 2 insertions(+), 31 deletions(-)

diff --git a/hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp b/hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp
index 7967d6cf001..6015b16c3e2 100644
--- a/hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp
+++ b/hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -711,29 +711,6 @@ void HeapRegionRemSet::setup_remset_size() {
   guarantee(G1RSetSparseRegionEntries > 0 && G1RSetRegionEntries > 0 , "Sanity");
 }
 
-#ifndef PRODUCT
-void HeapRegionRemSet::print() {
-  HeapRegionRemSetIterator iter(this);
-  size_t card_index;
-  while (iter.has_next(card_index)) {
-    HeapWord* card_start = _bot->address_for_index(card_index);
-    tty->print_cr("  Card " PTR_FORMAT, p2i(card_start));
-  }
-  if (iter.n_yielded() != occupied()) {
-    tty->print_cr("Yielded disagrees with occupied:");
-    tty->print_cr("  " SIZE_FORMAT_W(6) " yielded (" SIZE_FORMAT_W(6)
-                  " coarse, " SIZE_FORMAT_W(6) " fine).",
-                  iter.n_yielded(),
-                  iter.n_yielded_coarse(), iter.n_yielded_fine());
-    tty->print_cr("  " SIZE_FORMAT_W(6) " occ     (" SIZE_FORMAT_W(6)
-                           " coarse, " SIZE_FORMAT_W(6) " fine).",
-                  occupied(), occ_coarse(), occ_fine());
-  }
-  guarantee(iter.n_yielded() == occupied(),
-            "We should have yielded all the represented cards.");
-}
-#endif
-
 void HeapRegionRemSet::cleanup() {
   SparsePRT::cleanup_all();
 }
@@ -917,10 +894,6 @@ bool HeapRegionRemSetIterator::has_next(size_t& card_index) {
     // Otherwise...
     break;
   }
-  assert(ParallelGCThreads > 1 ||
-         n_yielded() == _hrrs->occupied(),
-         "Should have yielded all the cards in the rem set "
-         "(in the non-par case).");
   return false;
 }
 
diff --git a/hotspot/src/share/vm/gc/g1/heapRegionRemSet.hpp b/hotspot/src/share/vm/gc/g1/heapRegionRemSet.hpp
index 7f740b692c8..97c7e0643ea 100644
--- a/hotspot/src/share/vm/gc/g1/heapRegionRemSet.hpp
+++ b/hotspot/src/share/vm/gc/g1/heapRegionRemSet.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -290,8 +290,6 @@ public:
   // consumed by the strong code roots.
   size_t strong_code_roots_mem_size();
 
-  void print() PRODUCT_RETURN;
-
   // Called during a stop-world phase to perform any deferred cleanups.
   static void cleanup();
 

From 54f50066eb19958adfc27ea63c852f655a2b2c63 Mon Sep 17 00:00:00 2001
From: Dmitrij Pochepko 
Date: Fri, 27 Jan 2017 18:44:15 +0300
Subject: [PATCH 031/447] 8173399: Jittester: sources should be aligned with
 latest product state

Reviewed-by: kvn
---
 hotspot/test/testlibrary/jittester/Makefile                | 2 +-
 .../src/jdk/test/lib/jittester/TestsGenerator.java         | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/hotspot/test/testlibrary/jittester/Makefile b/hotspot/test/testlibrary/jittester/Makefile
index 14f0cb3fba1..e4dd97cff23 100644
--- a/hotspot/test/testlibrary/jittester/Makefile
+++ b/hotspot/test/testlibrary/jittester/Makefile
@@ -108,7 +108,7 @@ INIT: $(DIST_DIR)
 	$(shell if [ ! -d $(CLASSES_DIR) ]; then mkdir -p $(CLASSES_DIR); fi)
 
 install: clean_testbase testgroup testroot copytestlibrary copyaot JAR cleantmp
-	$(JAVA) --add-exports=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED -ea -jar $(DIST_JAR) $(APPLICATION_ARGS)
+	$(JAVA) --add-exports=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED -ea -jar $(DIST_JAR) $(APPLICATION_ARGS)
 
 clean_testbase:
 	@rm -rf $(TESTBASE_DIR)
diff --git a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/TestsGenerator.java b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/TestsGenerator.java
index 3974f078d7b..952e34182a3 100644
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/TestsGenerator.java
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/TestsGenerator.java
@@ -43,6 +43,7 @@ public abstract class TestsGenerator implements BiConsumer {
     protected final Path generatorDir;
     protected final Function preRunActions;
     protected final String jtDriverOptions;
+    private static final String DISABLE_WARNINGS = "-XX:-PrintWarnings";
 
     protected TestsGenerator(String suffix) {
         this(suffix, s -> new String[0], "");
@@ -57,8 +58,8 @@ public abstract class TestsGenerator implements BiConsumer {
 
     protected void generateGoldenOut(String mainClassName) {
         String classPath = getRoot() + File.pathSeparator + generatorDir;
-        ProcessBuilder pb = new ProcessBuilder(JAVA, "-Xint", "-Xverify", "-cp", classPath,
-                mainClassName);
+        ProcessBuilder pb = new ProcessBuilder(JAVA, "-Xint", DISABLE_WARNINGS, "-Xverify",
+                "-cp", classPath, mainClassName);
         String goldFile = mainClassName + ".gold";
         try {
             runProcess(pb, generatorDir.resolve(goldFile).toString());
@@ -128,6 +129,8 @@ public abstract class TestsGenerator implements BiConsumer {
                   .append("\n");
         }
         header.append(" * @run driver jdk.test.lib.jittester.jtreg.JitTesterDriver ")
+              .append(DISABLE_WARNINGS)
+              .append(" ")
               .append(jtDriverOptions)
               .append(" ")
               .append(mainClassName)

From a6cc06162b7d2bb7e2215a239bca2585236ed550 Mon Sep 17 00:00:00 2001
From: Christoph Langer 
Date: Wed, 15 Feb 2017 14:51:16 +0100
Subject: [PATCH 032/447] 8174834: nio (ch): Remove #ifdef AF_INET6 guards in
 native coding

Reviewed-by: alanb, chegar
---
 .../native/libnio/ch/DatagramChannelImpl.c    | 28 +++++----------
 .../unix/native/libnio/ch/InheritedChannel.c  | 21 ++++-------
 jdk/src/java.base/unix/native/libnio/ch/Net.c | 36 +++++--------------
 3 files changed, 23 insertions(+), 62 deletions(-)

diff --git a/jdk/src/java.base/unix/native/libnio/ch/DatagramChannelImpl.c b/jdk/src/java.base/unix/native/libnio/ch/DatagramChannelImpl.c
index ef512a1a1f9..8ed0694d04f 100644
--- a/jdk/src/java.base/unix/native/libnio/ch/DatagramChannelImpl.c
+++ b/jdk/src/java.base/unix/native/libnio/ch/DatagramChannelImpl.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -90,29 +90,16 @@ Java_sun_nio_ch_DatagramChannelImpl_disconnect0(JNIEnv *env, jobject this,
 #if defined(__solaris__)
     rv = connect(fd, 0, 0);
 #else
-    int len;
     SOCKETADDRESS sa;
+    socklen_t len = isIPv6 ? sizeof(struct sockaddr_in6) :
+                             sizeof(struct sockaddr_in);
 
     memset(&sa, 0, sizeof(sa));
-
-#ifdef AF_INET6
-    if (isIPv6) {
 #if defined(_ALLBSD_SOURCE)
-        sa.sa6.sin6_family = AF_INET6;
+    sa.sa.sa_family = isIPv6 ? AF_INET6 : AF_INET;
 #else
-        sa.sa6.sin6_family = AF_UNSPEC;
+    sa.sa.sa_family = AF_UNSPEC;
 #endif
-        len = sizeof(struct sockaddr_in6);
-    } else
-#endif
-    {
-#if defined(_ALLBSD_SOURCE)
-        sa.sa4.sin_family = AF_INET;
-#else
-        sa.sa4.sin_family = AF_UNSPEC;
-#endif
-        len = sizeof(struct sockaddr_in);
-    }
 
     rv = connect(fd, &sa.sa, len);
 
@@ -126,8 +113,9 @@ Java_sun_nio_ch_DatagramChannelImpl_disconnect0(JNIEnv *env, jobject this,
      */
     if (rv < 0 && errno == EAFNOSUPPORT)
         rv = errno = 0;
-#endif
-#endif
+#endif // defined(_ALLBSD_SOURCE) || defined(_AIX)
+
+#endif // defined(__solaris__)
 
     if (rv < 0)
         handleSocketError(env, errno);
diff --git a/jdk/src/java.base/unix/native/libnio/ch/InheritedChannel.c b/jdk/src/java.base/unix/native/libnio/ch/InheritedChannel.c
index 37ed11a8937..817a38d66da 100644
--- a/jdk/src/java.base/unix/native/libnio/ch/InheritedChannel.c
+++ b/jdk/src/java.base/unix/native/libnio/ch/InheritedChannel.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,14 +37,8 @@
 
 #include "sun_nio_ch_InheritedChannel.h"
 
-static int matchFamily(struct sockaddr *sa) {
-    int family = sa->sa_family;
-#ifdef AF_INET6
-    if (ipv6_available()) {
-        return (family == AF_INET6);
-    }
-#endif
-    return (family == AF_INET);
+static int matchFamily(SOCKETADDRESS *sa) {
+    return (sa->sa.sa_family == (ipv6_available() ? AF_INET6 : AF_INET));
 }
 
 JNIEXPORT void JNICALL
@@ -63,7 +57,7 @@ Java_sun_nio_ch_InheritedChannel_peerAddress0(JNIEnv *env, jclass cla, jint fd)
     jint remote_port;
 
     if (getpeername(fd, &sa.sa, &len) == 0) {
-        if (matchFamily(&sa.sa)) {
+        if (matchFamily(&sa)) {
             remote_ia = NET_SockaddrToInetAddress(env, &sa, (int *)&remote_port);
         }
     }
@@ -71,7 +65,6 @@ Java_sun_nio_ch_InheritedChannel_peerAddress0(JNIEnv *env, jclass cla, jint fd)
     return remote_ia;
 }
 
-
 JNIEXPORT jint JNICALL
 Java_sun_nio_ch_InheritedChannel_peerPort0(JNIEnv *env, jclass cla, jint fd)
 {
@@ -80,7 +73,7 @@ Java_sun_nio_ch_InheritedChannel_peerPort0(JNIEnv *env, jclass cla, jint fd)
     jint remote_port = -1;
 
     if (getpeername(fd, &sa.sa, &len) == 0) {
-        if (matchFamily(&sa.sa)) {
+        if (matchFamily(&sa)) {
             NET_SockaddrToInetAddress(env, &sa, (int *)&remote_port);
         }
     }
@@ -92,7 +85,7 @@ JNIEXPORT jint JNICALL
 Java_sun_nio_ch_InheritedChannel_soType0(JNIEnv *env, jclass cla, jint fd)
 {
     int sotype;
-    socklen_t arglen=sizeof(sotype);
+    socklen_t arglen = sizeof(sotype);
     if (getsockopt(fd, SOL_SOCKET, SO_TYPE, (void *)&sotype, &arglen) == 0) {
         if (sotype == SOCK_STREAM)
             return sun_nio_ch_InheritedChannel_SOCK_STREAM;
@@ -123,7 +116,7 @@ Java_sun_nio_ch_InheritedChannel_dup2(JNIEnv *env, jclass cla, jint fd, jint fd2
 JNIEXPORT jint JNICALL
 Java_sun_nio_ch_InheritedChannel_open0(JNIEnv *env, jclass cla, jstring path, jint oflag)
 {
-    const char* str;
+    const char *str;
     int oflag_actual;
 
     /* convert to OS specific value */
diff --git a/jdk/src/java.base/unix/native/libnio/ch/Net.c b/jdk/src/java.base/unix/native/libnio/ch/Net.c
index dd9aedccdfa..11587114eb7 100644
--- a/jdk/src/java.base/unix/native/libnio/ch/Net.c
+++ b/jdk/src/java.base/unix/native/libnio/ch/Net.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -101,23 +101,21 @@
  * Copy IPv6 group, interface index, and IPv6 source address
  * into group_source_req structure.
  */
-#ifdef AF_INET6
 static void initGroupSourceReq(JNIEnv* env, jbyteArray group, jint index,
-                               jbyteArray source, struct group_source_req* req)
+                               jbyteArray source, struct group_source_req *req)
 {
     struct sockaddr_in6* sin6;
 
     req->gsr_interface = (uint32_t)index;
 
-    sin6 = (struct sockaddr_in6*)&(req->gsr_group);
+    sin6 = (struct sockaddr_in6 *)&(req->gsr_group);
     sin6->sin6_family = AF_INET6;
-    COPY_INET6_ADDRESS(env, group, (jbyte*)&(sin6->sin6_addr));
+    COPY_INET6_ADDRESS(env, group, (jbyte *)&(sin6->sin6_addr));
 
-    sin6 = (struct sockaddr_in6*)&(req->gsr_source);
+    sin6 = (struct sockaddr_in6 *)&(req->gsr_source);
     sin6->sin6_family = AF_INET6;
-    COPY_INET6_ADDRESS(env, source, (jbyte*)&(sin6->sin6_addr));
+    COPY_INET6_ADDRESS(env, source, (jbyte *)&(sin6->sin6_addr));
 }
-#endif
 
 #ifdef _AIX
 
@@ -199,18 +197,13 @@ Java_sun_nio_ch_Net_socket0(JNIEnv *env, jclass cl, jboolean preferIPv6,
 {
     int fd;
     int type = (stream ? SOCK_STREAM : SOCK_DGRAM);
-#ifdef AF_INET6
     int domain = (ipv6_available() && preferIPv6) ? AF_INET6 : AF_INET;
-#else
-    int domain = AF_INET;
-#endif
 
     fd = socket(domain, type, 0);
     if (fd < 0) {
         return handleSocketError(env, errno);
     }
 
-#ifdef AF_INET6
     /* Disable IPV6_V6ONLY to ensure dual-socket support */
     if (domain == AF_INET6) {
         int arg = 0;
@@ -223,7 +216,6 @@ Java_sun_nio_ch_Net_socket0(JNIEnv *env, jclass cl, jboolean preferIPv6,
             return -1;
         }
     }
-#endif
 
     if (reuse) {
         int arg = 1;
@@ -250,9 +242,7 @@ Java_sun_nio_ch_Net_socket0(JNIEnv *env, jclass cl, jboolean preferIPv6,
             return -1;
         }
     }
-#endif
 
-#if defined(__linux__) && defined(AF_INET6)
     /* By default, Linux uses the route default */
     if (domain == AF_INET6 && type == SOCK_DGRAM) {
         int arg = 1;
@@ -569,7 +559,6 @@ JNIEXPORT jint JNICALL
 Java_sun_nio_ch_Net_joinOrDrop6(JNIEnv *env, jobject this, jboolean join, jobject fdo,
                                 jbyteArray group, jint index, jbyteArray source)
 {
-#ifdef AF_INET6
     struct ipv6_mreq mreq6;
     struct group_source_req req;
     int opt, n, optlen;
@@ -600,21 +589,16 @@ Java_sun_nio_ch_Net_joinOrDrop6(JNIEnv *env, jobject this, jboolean join, jobjec
         handleSocketError(env, errno);
     }
     return 0;
-#else
-    JNU_ThrowInternalError(env, "Should not get here");
-    return IOS_THROWN;
-#endif  /* AF_INET6 */
 }
 
 JNIEXPORT jint JNICALL
 Java_sun_nio_ch_Net_blockOrUnblock6(JNIEnv *env, jobject this, jboolean block, jobject fdo,
                                     jbyteArray group, jint index, jbyteArray source)
 {
-#ifdef AF_INET6
-  #ifdef __APPLE__
+#ifdef __APPLE__
     /* no IPv6 exclude-mode filtering for now */
     return IOS_UNAVAILABLE;
-  #else
+#else
     struct group_source_req req;
     int n;
     int opt = (block) ? MCAST_BLOCK_SOURCE : MCAST_UNBLOCK_SOURCE;
@@ -629,10 +613,6 @@ Java_sun_nio_ch_Net_blockOrUnblock6(JNIEnv *env, jobject this, jboolean block, j
         handleSocketError(env, errno);
     }
     return 0;
-  #endif
-#else
-    JNU_ThrowInternalError(env, "Should not get here");
-    return IOS_THROWN;
 #endif
 }
 

From d28877e750d719d858930f8c8a640359b8f73f77 Mon Sep 17 00:00:00 2001
From: Matthias Baesken 
Date: Tue, 14 Feb 2017 16:56:12 +0100
Subject: [PATCH 033/447] 8174242: simplify jexec build settings

Reviewed-by: erikj
---
 jdk/make/launcher/Launcher-java.base.gmk      |  56 +---
 .../java.base/macosx/native/launcher/jexec.c  | 239 ------------------
 2 files changed, 6 insertions(+), 289 deletions(-)
 delete mode 100644 jdk/src/java.base/macosx/native/launcher/jexec.c

diff --git a/jdk/make/launcher/Launcher-java.base.gmk b/jdk/make/launcher/Launcher-java.base.gmk
index 0d2173c5d0f..06ccec771ea 100644
--- a/jdk/make/launcher/Launcher-java.base.gmk
+++ b/jdk/make/launcher/Launcher-java.base.gmk
@@ -71,64 +71,20 @@ $(eval $(call SetupBuildLauncher, keytool, \
 
 ################################################################################
 
-BUILD_JEXEC :=
-BUILD_JEXEC_SRC :=
-BUILD_JEXEC_INC :=
-BUILD_JEXEC_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base
-
-#
-# UNHANDLED:
-# - COMPILE_APPROACH = normal
-#
-
-#
-# jdk/make/java/Makefile
-#
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-  ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
-    BUILD_JEXEC := 1
-  endif
-endif
-
 ifeq ($(OPENJDK_TARGET_OS), linux)
-  BUILD_JEXEC := 1
-endif # OPENJDK_TARGET_OS
-
-#
-# jdk/make/java/jexec/Makefile
-#
-ifeq ($(BUILD_JEXEC), 1)
-
-  ifeq ($(OPENJDK_TARGET_OS), windows)
-  else ifeq ($(OPENJDK_TARGET_OS), macosx)
-    BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/java.base/macosx/native/launcher
-  else
-    BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/java.base/unix/native/launcher
-  endif
-
-  ifeq ($(OPENJDK_TARGET_OS), linux)
-    BUILD_JEXEC_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base
-    BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/java.base/share/native/libjli
-  endif
-endif
-
-#
-# Note that the two Makefile's seems to contradict each other,
-# and that src/macosx/bin/jexec.c seems unused
-#
-ifneq ($(BUILD_JEXEC_SRC), )
-  $(eval $(call SetupNativeCompilation,BUILD_JEXEC, \
-      SRC := $(BUILD_JEXEC_SRC), \
+  $(eval $(call SetupNativeCompilation, BUILD_JEXEC, \
+      SRC := $(JDK_TOPDIR)/src/$(MODULE)/unix/native/launcher, \
       INCLUDE_FILES := jexec.c, \
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKEXE) \
-          $(BUILD_JEXEC_INC), \
+          -I$(JDK_TOPDIR)/src/$(MODULE)/share/native/libjli, \
       CFLAGS_linux := -fPIC, \
       CFLAGS_solaris := -KPIC, \
       LDFLAGS := $(LDFLAGS_JDKEXE), \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jexec_obj, \
-      OUTPUT_DIR := $(BUILD_JEXEC_DST_DIR), \
-      PROGRAM := jexec))
+      OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
+      PROGRAM := jexec, \
+  ))
 
   TARGETS += $(BUILD_JEXEC)
 endif
diff --git a/jdk/src/java.base/macosx/native/launcher/jexec.c b/jdk/src/java.base/macosx/native/launcher/jexec.c
deleted file mode 100644
index 24df31f5288..00000000000
--- a/jdk/src/java.base/macosx/native/launcher/jexec.c
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * jexec for J2SE
- *
- * jexec is used by the system to allow execution of JAR files.
- *    Essentially jexec needs to run java and
- *    needs to be a native ISA executable (not a shell script), although
- *    this native ISA executable requirement was a mistake that will be fixed.
- *    ( is sparc or i386 or amd64).
- *
- *    When you execute a jar file, jexec is executed by the system as follows:
- *      /usr/java/jre/lib//jexec -jar JARFILENAME
- *    so this just needs to be turned into:
- *      /usr/java/jre/bin/java -jar JARFILENAME
- *
- * Solaris systems (new 7's and all 8's) will be looking for jexec at:
- *      /usr/java/jre/lib//jexec
- * Older systems may need to add this to their /etc/system file:
- *      set javaexec:jexec="/usr/java/jre/lib//jexec"
- *     and reboot the machine for this to work.
- *
- * This source should be compiled as:
- *      cc -o jexec jexec.c
- *
- * And jexec should be placed at the following location of the installation:
- *      /jre/lib//jexec  (for Solaris)
- *      /lib/jexec            (for Linux)
- *
- * NOTE: Unless  is the "default" JDK on the system
- *       (i.e. /usr/java -> ), this jexec will not be
- *       found.  The 1.2 java is only the default on Solaris 8 and
- *       on systems where the 1.2 packages were installed and no 1.1
- *       java was found.
- *
- * NOTE: You must use 1.2 jar to build your jar files. The system
- *       doesn't seem to pick up 1.1 jar files.
- *
- * NOTE: We don't need to set LD_LIBRARY_PATH here, even though we
- *       are running the actual java binary because the java binary will
- *       look for it's libraries through it's own runpath, which uses
- *       $ORIGIN.
- *
- * NOTE: This jexec should NOT have any special .so library needs because
- *       it appears that this executable will NOT get the $ORIGIN of jexec
- *       but the $ORIGIN of the jar file being executed. Be careful to keep
- *       this program simple and with no .so dependencies.
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-static const int CRAZY_EXEC = ENOEXEC;
-static const int BAD_MAGIC  = ENOEXEC;
-
-static const char * BAD_EXEC_MSG     = "jexec failed";
-static const char * CRAZY_EXEC_MSG   = "missing args";
-static const char * MISSING_JAVA_MSG = "can't locate java";
-static const char * UNKNOWN_ERROR    = "unknown error";
-
-/* Define a constant that represents the number of directories to pop off the
- * current location to find the java binary */
-static const int RELATIVE_DEPTH = 3;
-
-/* path to java after popping */
-static const char * BIN_PATH = "/bin/java";
-
-/* flag used when running JAR files */
-static const char * JAR_FLAG = "-jar";
-
-int main(int argc, const char * argv[]);
-void errorExit(int error, const char * message);
-int getJavaPath(const char * path, char * buf, int depth);
-
-/*
- * This is the main entry point.  This program (jexec) will attempt to execute
- * a JAR file by finding the Java program (java), relative to its own location.
- * The exact location of the Java program depends on the platform, i.e.
- *
- *      /jre/lib//jexec  (for Solaris)
- *      /lib/jexec            (for Linux JDK)
- *
- * Once the Java program is found, this program copies any remaining arguments
- * into another array, which is then used to exec the Java program.
- *
- * On Linux this program does some additional steps.  When copying the array of
- * args, it is necessary to insert the "-jar" flag between arg[0], the program
- * name, and the original arg[1], which is presumed to be a path to a JAR file.
- * It is also necessary to verify that the original arg[1] really is a JAR file.
- * (These steps are unnecessary on Solaris because they are taken care of by
- * the kernel.)
- */
-int main(int argc, const char * argv[]) {
-    /* We need to exec the original arguments using java, instead of jexec.
-     * Also, for Linux, it is necessary to add the "-jar" argument between
-     * the new arg[0], and the old arg[1].  To do this we will create a new
-     * args array. */
-    char          java[PATH_MAX + 1];    /* path to java binary  */
-    const char ** nargv = NULL;          /* new args array       */
-    int           nargc = 0;             /* new args array count */
-    int           argi  = 0;             /* index into old array */
-
-    /* Make sure we have something to work with */
-    if ((argc < 1) || (argv == NULL)) {
-        /* Shouldn't happen... */
-        errorExit(CRAZY_EXEC, CRAZY_EXEC_MSG);
-    }
-
-    /* Get the path to the java binary, which is in a known position relative
-     * to our current position, which is in argv[0]. */
-    if (getJavaPath(argv[argi++], java, RELATIVE_DEPTH) != 0) {
-        errorExit(errno, MISSING_JAVA_MSG);
-    }
-
-    nargv = (const char **) malloc((argc + 2) * (sizeof (const char *)));
-    nargv[nargc++] = java;
-
-    if (argc >= 2) {
-        const char * jarfile = argv[argi++];
-        const char * message = NULL;
-
-        /* the next argument is the path to the JAR file */
-        nargv[nargc++] = jarfile;
-    }
-
-    /* finally copy any remaining arguments */
-    while (argi < argc) {
-        nargv[nargc++] = argv[argi++];
-    }
-
-    /* finally add one last terminating null */
-    nargv[nargc++] = NULL;
-
-    /* It's time to exec the java binary with the new arguments.  It
-     * is possible that we've reached this point without actually
-     * having a JAR file argument (i.e. if argc < 2), but we still
-     * want to exec the java binary, since that will take care of
-     * displaying the correct usage. */
-    execv(java, (char * const *) nargv);
-
-    /* If the exec worked, this process would have been replaced
-     * by the new process.  So any code reached beyond this point
-     * implies an error in the exec. */
-    free(nargv);
-    errorExit(errno, BAD_EXEC_MSG);
-    return 0; // keep the compiler happy
-}
-
-
-/*
- * Exit the application by setting errno, and writing a message.
- *
- * Parameters:
- *     error   - errno is set to this value, and it is used to exit.
- *     message - the message to write.
- */
-void errorExit(int error, const char * message) {
-    if (error != 0) {
-        errno = error;
-        perror((message != NULL) ? message : UNKNOWN_ERROR);
-    }
-
-    exit((error == 0) ? 0 : 1);
-}
-
-
-/*
- * Get the path to the java binary that should be relative to the current path.
- *
- * Parameters:
- *     path  - the input path that the java binary that should be relative to.
- *     buf   - a buffer of size PATH_MAX or greater that the java path is
- *             copied to.
- *     depth - the number of names to trim off the current path, including the
- *             name of this program.
- *
- * Returns:
- *     This function returns 0 on success; otherwise it returns the value of
- *     errno.
- */
-int getJavaPath(const char * path, char * buf, int depth) {
-    int result = 0;
-
-    /* Get the full path to this program.  Depending on whether this is Solaris
-     * or Linux, this will be something like,
-     *
-     *     /jre/lib//jexec  (for Solaris)
-     *     /lib/jexec            (for Linux)
-     */
-    if (realpath(path, buf) != NULL) {
-        int count = 0;
-
-        /* Pop off the filename, and then subdirectories for each level of
-         * depth */
-        for (count = 0; count < depth; count++) {
-            *(strrchr(buf, '/')) = '\0';
-        }
-
-        /* Append the relative location of java, creating something like,
-         *
-         *     /jre/bin/java  (for Solaris)
-         *     /bin/java      (for Linux)
-         */
-        strcat(buf, BIN_PATH);
-    }
-    else {
-        /* Failed to get the path */
-        result = errno;
-    }
-
-    return (result);
-}

From 387a38df1d63a2718653c07d1cbf2998f903755a Mon Sep 17 00:00:00 2001
From: Joe Darcy 
Date: Thu, 16 Feb 2017 19:08:17 -0800
Subject: [PATCH 034/447] 8172928: Add doc link from System.identityHashCode to
 Object.hashCode

Reviewed-by: lancea
---
 jdk/src/java.base/share/classes/java/lang/System.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/jdk/src/java.base/share/classes/java/lang/System.java b/jdk/src/java.base/share/classes/java/lang/System.java
index 1577e215e35..65aa5391ff8 100644
--- a/jdk/src/java.base/share/classes/java/lang/System.java
+++ b/jdk/src/java.base/share/classes/java/lang/System.java
@@ -534,6 +534,8 @@ public final class System {
      * @param x object for which the hashCode is to be calculated
      * @return  the hashCode
      * @since   1.1
+     * @see Object#hashCode
+     * @see java.util.Objects#hashCode(Object)
      */
     @HotSpotIntrinsicCandidate
     public static native int identityHashCode(Object x);

From 3b50c5f35b4529e453a08636fcbdde9ea2c72c09 Mon Sep 17 00:00:00 2001
From: Paul Sandoz 
Date: Fri, 27 Jan 2017 13:17:13 -0800
Subject: [PATCH 035/447] 8172298: Reduce memory churn when linking VarHandles
 operations

Reviewed-by: shade, redestad
---
 .../java/lang/invoke/MethodHandleNatives.java | 59 +++++++++++--------
 1 file changed, 33 insertions(+), 26 deletions(-)

diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java
index 1065b8d1482..c655a071a0f 100644
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java
@@ -420,7 +420,7 @@ class MethodHandleNatives {
                                                              MethodType mtype,
                                                              Object[] appendixResult) {
         // Get the signature method type
-        MethodType sigType = mtype.basicType();
+        final MethodType sigType = mtype.basicType();
 
         // Get the access kind from the method name
         VarHandle.AccessMode ak;
@@ -430,32 +430,37 @@ class MethodHandleNatives {
             throw MethodHandleStatics.newInternalError(e);
         }
 
-        // If not polymorphic in the return type, such as the compareAndSet
-        // methods that return boolean
-        if (ak.at.isMonomorphicInReturnType) {
-            if (ak.at.returnType != mtype.returnType()) {
-                // The caller contains a different return type than that
-                // defined by the method
-                throw newNoSuchMethodErrorOnVarHandle(name, mtype);
-            }
-            // Adjust the return type of the signature method type
-            sigType = sigType.changeReturnType(ak.at.returnType);
-        }
-
-        // Get the guard method type for linking
-        MethodType guardType = sigType
-                // VarHandle at start
-                .insertParameterTypes(0, VarHandle.class)
-                // Access descriptor at end
-                .appendParameterTypes(VarHandle.AccessDescriptor.class);
-
         // Create the appendix descriptor constant
         VarHandle.AccessDescriptor ad = new VarHandle.AccessDescriptor(mtype, ak.at.ordinal(), ak.ordinal());
         appendixResult[0] = ad;
 
         if (MethodHandleStatics.VAR_HANDLE_GUARDS) {
+            // If not polymorphic in the return type, such as the compareAndSet
+            // methods that return boolean
+            Class guardReturnType = sigType.returnType();
+            if (ak.at.isMonomorphicInReturnType) {
+                if (ak.at.returnType != mtype.returnType()) {
+                    // The caller contains a different return type than that
+                    // defined by the method
+                    throw newNoSuchMethodErrorOnVarHandle(name, mtype);
+                }
+                // Adjust the return type of the signature method type
+                guardReturnType = ak.at.returnType;
+            }
+
+            // Get the guard method type for linking
+            final Class[] guardParams = new Class[sigType.parameterCount() + 2];
+            // VarHandle at start
+            guardParams[0] = VarHandle.class;
+            for (int i = 0; i < sigType.parameterCount(); i++) {
+                guardParams[i + 1] = sigType.parameterType(i);
+            }
+            // Access descriptor at end
+            guardParams[guardParams.length - 1] = VarHandle.AccessDescriptor.class;
+            MethodType guardType = MethodType.makeImpl(guardReturnType, guardParams, true);
+
             MemberName linker = new MemberName(
-                    VarHandleGuards.class, "guard_" + getVarHandleMethodSignature(sigType),
+                    VarHandleGuards.class, getVarHandleGuardMethodName(guardType),
                     guardType, REF_invokeStatic);
 
             linker = MemberName.getFactory().resolveOrNull(REF_invokeStatic, linker,
@@ -468,14 +473,16 @@ class MethodHandleNatives {
         }
         return Invokers.varHandleInvokeLinkerMethod(name, mtype);
     }
-    static String getVarHandleMethodSignature(MethodType mt) {
-        StringBuilder sb = new StringBuilder(mt.parameterCount() + 2);
+    static String getVarHandleGuardMethodName(MethodType guardType) {
+        String prefix = "guard_";
+        StringBuilder sb = new StringBuilder(prefix.length() + guardType.parameterCount());
 
-        for (int i = 0; i < mt.parameterCount(); i++) {
-            Class pt = mt.parameterType(i);
+        sb.append(prefix);
+        for (int i = 1; i < guardType.parameterCount() - 1; i++) {
+            Class pt = guardType.parameterType(i);
             sb.append(getCharType(pt));
         }
-        sb.append('_').append(getCharType(mt.returnType()));
+        sb.append('_').append(getCharType(guardType.returnType()));
         return sb.toString();
     }
     static char getCharType(Class pt) {

From 874b8cdc746f45feca9ca592d3ad4612a620da06 Mon Sep 17 00:00:00 2001
From: Joe Darcy 
Date: Fri, 27 Jan 2017 16:22:08 -0800
Subject: [PATCH 036/447] 8028544: Add SourceVersion.RELEASE_10 8028546: Add
 -source 10 and -target 10 to javac

Reviewed-by: jjg, smarks
---
 .../javax/lang/model/SourceVersion.java       | 17 ++++++++++---
 .../com/sun/tools/javac/code/Source.java      | 13 +++++++---
 .../com/sun/tools/javac/jvm/Profile.java      |  8 +++----
 .../com/sun/tools/javac/jvm/Target.java       | 11 +++++----
 .../javac/platform/JDKPlatformProvider.java   |  8 +++++--
 .../javac/processing/PrintingProcessor.java   |  4 ++--
 .../com/sun/tools/jdeprscan/LoadProc.java     |  6 ++---
 .../classes/com/sun/tools/jdeprscan/Main.java | 10 ++++----
 langtools/test/tools/javac/api/T6265137.java  |  4 ++--
 langtools/test/tools/javac/api/T6395981.java  |  6 ++---
 .../StopAfterError/StopAfterError.java        | 14 ++++-------
 .../model/LocalClasses/LocalClassesModel.java | 13 ++++------
 .../processing/model/TestSourceVersion.java   |  6 ++---
 .../model/nestedTypeVars/NestedTypeVars.java  | 14 ++++-------
 .../warnings/TestSourceVersionWarnings.java   |  3 ++-
 .../javac/profiles/ProfileOptionTest.java     |  3 ++-
 .../tools/javac/tree/ArrayTypeToString.java   |  8 +++----
 .../test/tools/javac/versions/Versions.java   | 24 +++++++++++++++----
 .../tests/jdk/jdeprscan/TestRelease.java      |  3 ++-
 19 files changed, 100 insertions(+), 75 deletions(-)

diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java b/langtools/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java
index 768c7ba4b45..46538f18f19 100644
--- a/langtools/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java
+++ b/langtools/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -56,6 +56,7 @@ public enum SourceVersion {
      * 1.7: diamond syntax, try-with-resources, etc.
      * 1.8: lambda expressions and default methods
      *   9: modules, small cleanups to 1.7 and 1.8 changes
+     *  10: to-be-determined changes
      */
 
     /**
@@ -150,7 +151,15 @@ public enum SourceVersion {
      *
      * @since 9
      */
-     RELEASE_9;
+     RELEASE_9,
+
+    /**
+     * The version recognized by the Java Platform, Standard Edition
+     * 10.
+     *
+     * @since 10
+     */
+     RELEASE_10;
 
     // Note that when adding constants for newer releases, the
     // behavior of latest() and latestSupported() must be updated too.
@@ -161,7 +170,7 @@ public enum SourceVersion {
      * @return the latest source version that can be modeled
      */
     public static SourceVersion latest() {
-        return RELEASE_9;
+        return RELEASE_10;
     }
 
     private static final SourceVersion latestSupported = getLatestSupported();
@@ -171,6 +180,8 @@ public enum SourceVersion {
             String specVersion = System.getProperty("java.specification.version");
 
             switch (specVersion) {
+                case "10":
+                    return RELEASE_10;
                 case "9":
                 case "1.9":
                     return RELEASE_9;
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java
index 91a4bdabec7..9be0a08c3a1 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -70,8 +70,11 @@ public enum Source {
     /** 1.8 lambda expressions and default methods. */
     JDK1_8("1.8"),
 
-    /** 1.9 covers the to be determined language features that will be added in JDK 9. */
-    JDK1_9("1.9");
+    /** 1.9 modularity. */
+    JDK1_9("1.9"),
+
+    /** 1.10 covers the to be determined language features that will be added in JDK 10. */
+    JDK1_10("1.10");
 
     private static final Context.Key sourceKey = new Context.Key<>();
 
@@ -99,6 +102,7 @@ public enum Source {
         tab.put("7", JDK1_7); // Make 7 an alias for 1.7
         tab.put("8", JDK1_8); // Make 8 an alias for 1.8
         tab.put("9", JDK1_9); // Make 9 an alias for 1.9
+        tab.put("10", JDK1_10); // Make 10 an alias for 1.10
     }
 
     private Source(String name) {
@@ -116,6 +120,7 @@ public enum Source {
     }
 
     public Target requiredTarget() {
+        if (this.compareTo(JDK1_10) >= 0) return Target.JDK1_10;
         if (this.compareTo(JDK1_9) >= 0) return Target.JDK1_9;
         if (this.compareTo(JDK1_8) >= 0) return Target.JDK1_8;
         if (this.compareTo(JDK1_7) >= 0) return Target.JDK1_7;
@@ -240,6 +245,8 @@ public enum Source {
             return RELEASE_8;
         case JDK1_9:
             return RELEASE_9;
+        case JDK1_10:
+            return RELEASE_10;
         default:
             return null;
         }
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Profile.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Profile.java
index cb7c714517d..1dceec9f725 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Profile.java
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Profile.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,9 +40,9 @@ import static com.sun.tools.javac.main.Option.PROFILE;
  *  deletion without notice.
  */
 public enum Profile {
-    COMPACT1("compact1", 1, Target.JDK1_8, Target.JDK1_9),
-    COMPACT2("compact2", 2, Target.JDK1_8, Target.JDK1_9),
-    COMPACT3("compact3", 3, Target.JDK1_8, Target.JDK1_9),
+    COMPACT1("compact1", 1, Target.JDK1_8, Target.JDK1_9, Target.JDK1_10),
+    COMPACT2("compact2", 2, Target.JDK1_8, Target.JDK1_9, Target.JDK1_10),
+    COMPACT3("compact3", 3, Target.JDK1_8, Target.JDK1_9, Target.JDK1_10),
 
     DEFAULT {
         @Override
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java
index b0737558596..1d1fdf1e11d 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -61,7 +61,10 @@ public enum Target {
     JDK1_8("1.8", 52, 0),
 
     /** JDK 9. */
-    JDK1_9("1.9", 53, 0);
+    JDK1_9("1.9", 53, 0),
+
+    /** JDK 10, initially an alias for 9 */
+    JDK1_10("1.10", 53, 0);
 
     private static final Context.Key targetKey = new Context.Key<>();
 
@@ -91,6 +94,7 @@ public enum Target {
         tab.put("7", JDK1_7);
         tab.put("8", JDK1_8);
         tab.put("9", JDK1_9);
+        tab.put("10", JDK1_10);
     }
 
     public final String name;
@@ -102,7 +106,7 @@ public enum Target {
         this.minorVersion = minorVersion;
     }
 
-    public static final Target DEFAULT = JDK1_9;
+    public static final Target DEFAULT = values()[values().length - 1];
 
     public static Target lookup(String name) {
         return tab.get(name);
@@ -146,5 +150,4 @@ public enum Target {
     public String multiReleaseValue() {
         return Integer.toString(this.ordinal() - Target.JDK1_1.ordinal() + 1);
     }
-
 }
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/JDKPlatformProvider.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/JDKPlatformProvider.java
index 07d020f2a93..42c7933b3a4 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/JDKPlatformProvider.java
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/JDKPlatformProvider.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -90,6 +90,8 @@ public class JDKPlatformProvider implements PlatformProvider {
             } catch (IOException | ProviderNotFoundException ex) {
             }
         }
+        // Workaround until full support for --release 9 distinct from --release 10
+        SUPPORTED_JAVA_PLATFORM_VERSIONS.add(targetNumericVersion(Target.JDK1_9));
         SUPPORTED_JAVA_PLATFORM_VERSIONS.add(targetNumericVersion(Target.DEFAULT));
     }
 
@@ -108,7 +110,9 @@ public class JDKPlatformProvider implements PlatformProvider {
 
         @Override
         public Collection getPlatformPath() {
-            if (Target.lookup(version) == Target.DEFAULT) {
+            // Comparison should be == Target.DEFAULT once --release 9
+            // is distinct from 10
+            if (Target.lookup(version).compareTo(Target.JDK1_9)  >=  0) {
                 return null;
             }
 
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java
index f5548bca151..a3e4837f5f9 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,7 +52,7 @@ import com.sun.tools.javac.util.StringUtils;
  * deletion without notice.
  */
 @SupportedAnnotationTypes("*")
-@SupportedSourceVersion(SourceVersion.RELEASE_9)
+@SupportedSourceVersion(SourceVersion.RELEASE_10)
 public class PrintingProcessor extends AbstractProcessor {
     PrintWriter writer;
 
diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/LoadProc.java b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/LoadProc.java
index 11978a22389..8f0c761d6cf 100644
--- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/LoadProc.java
+++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/LoadProc.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -50,7 +50,7 @@ import javax.lang.model.util.Elements;
 
 import javax.tools.Diagnostic;
 
-import static javax.lang.model.SourceVersion.RELEASE_9;
+import static javax.lang.model.SourceVersion.RELEASE_10;
 
 /**
  * Annotation processor for the Deprecation Scanner tool.
@@ -58,7 +58,7 @@ import static javax.lang.model.SourceVersion.RELEASE_9;
  *
  */
 @SupportedAnnotationTypes("java.lang.Deprecated")
-@SupportedSourceVersion(RELEASE_9)
+@SupportedSourceVersion(RELEASE_10)
 public class LoadProc extends AbstractProcessor {
     Elements elements;
     Messager messager;
diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java
index 175ac3fce89..155f1be1d90 100644
--- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java
+++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -101,7 +101,7 @@ public class Main implements DiagnosticListener {
     // Keep these updated manually until there's a compiler API
     // that allows querying of supported releases.
     final Set releasesWithoutForRemoval = Set.of("6", "7", "8");
-    final Set releasesWithForRemoval = Set.of("9");
+    final Set releasesWithForRemoval = Set.of("9", "10");
 
     final Set validReleases;
     {
@@ -353,14 +353,14 @@ public class Main implements DiagnosticListener {
      * Process classes from a particular JDK release, using only information
      * in this JDK.
      *
-     * @param release "6", "7", "8", or "9"
+     * @param release "6", "7", "8", "9", or "10"
      * @param classes collection of classes to process, may be empty
      * @return success value
      */
     boolean processRelease(String release, Collection classes) throws IOException {
         options.addAll(List.of("--release", release));
 
-        if (release.equals("9")) {
+        if (release.equals("9") || release.equals("10")) {
             List rootMods = List.of("java.se", "java.se.ee");
             TraverseProc proc = new TraverseProc(rootMods);
             JavaCompiler.CompilationTask task =
@@ -484,7 +484,7 @@ public class Main implements DiagnosticListener {
         String dir = null;
         String jar = null;
         String jdkHome = null;
-        String release = "9";
+        String release = "10";
         List loadClasses = new ArrayList<>();
         String csvFile = null;
 
diff --git a/langtools/test/tools/javac/api/T6265137.java b/langtools/test/tools/javac/api/T6265137.java
index d29ae4a99e3..fd7f02d3ed3 100644
--- a/langtools/test/tools/javac/api/T6265137.java
+++ b/langtools/test/tools/javac/api/T6265137.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,7 +52,7 @@ public class T6265137 {
             String srcdir = System.getProperty("test.src");
             Iterable files =
                 fm.getJavaFileObjectsFromFiles(Arrays.asList(new File(srcdir, "T6265137a.java")));
-            javac.getTask(null, fm, dl, Arrays.asList("-target","9"), null, files).call();
+            javac.getTask(null, fm, dl, Arrays.asList("-target","10"), null, files).call();
         }
     }
 }
diff --git a/langtools/test/tools/javac/api/T6395981.java b/langtools/test/tools/javac/api/T6395981.java
index 30cd4cb3475..7ac2a2ce11d 100644
--- a/langtools/test/tools/javac/api/T6395981.java
+++ b/langtools/test/tools/javac/api/T6395981.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug     6395981 6458819 7025784 8028543
+ * @bug     6395981 6458819 7025784 8028543 8028544
  * @summary JavaCompilerTool and Tool must specify version of JLS and JVMS
  * @author  Peter von der Ah\u00e9
  * @modules java.compiler
@@ -31,7 +31,7 @@
  * @run main/fail T6395981
  * @run main/fail T6395981 RELEASE_3 RELEASE_5 RELEASE_6
  * @run main/fail T6395981 RELEASE_0 RELEASE_1 RELEASE_2 RELEASE_3 RELEASE_4 RELEASE_5 RELEASE_6
- * @run main T6395981 RELEASE_3 RELEASE_4 RELEASE_5 RELEASE_6 RELEASE_7 RELEASE_8 RELEASE_9
+ * @run main T6395981 RELEASE_3 RELEASE_4 RELEASE_5 RELEASE_6 RELEASE_7 RELEASE_8 RELEASE_9 RELEASE_10
  */
 
 import java.util.EnumSet;
diff --git a/langtools/test/tools/javac/processing/StopAfterError/StopAfterError.java b/langtools/test/tools/javac/processing/StopAfterError/StopAfterError.java
index 6e6876f6f4e..65127b01220 100644
--- a/langtools/test/tools/javac/processing/StopAfterError/StopAfterError.java
+++ b/langtools/test/tools/javac/processing/StopAfterError/StopAfterError.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,8 @@
  * @summary If an error is produced by an annotation processor, the code should not be Attred, \
  *          unless requested
  * @modules jdk.compiler
- * @compile StopAfterError.java
+ * @library /tools/javac/lib
+ * @build StopAfterError JavacTestingAbstractProcessor
  * @compile/fail/ref=StopAfterError.out -XDrawDiagnostics -processor StopAfterError StopAfterErrorAux.java
  * @compile/fail/ref=StopAfterError.out -XDshould-stop.ifError=PROCESS -XDrawDiagnostics -processor StopAfterError StopAfterErrorAux.java
  * @compile/fail/ref=StopAfterErrorContinue.out -XDshould-stop.ifError=ATTR -XDrawDiagnostics -processor StopAfterError StopAfterErrorAux.java
@@ -42,8 +43,7 @@ import javax.lang.model.SourceVersion;
 import javax.lang.model.element.TypeElement;
 import javax.tools.Diagnostic.Kind;
 
-@SupportedAnnotationTypes("*")
-public class StopAfterError extends AbstractProcessor {
+public class StopAfterError extends JavacTestingAbstractProcessor {
 
     @Override
     public boolean process(Set annotations, RoundEnvironment roundEnv) {
@@ -52,10 +52,4 @@ public class StopAfterError extends AbstractProcessor {
         }
         return false;
     }
-
-    @Override
-    public SourceVersion getSupportedSourceVersion() {
-        return SourceVersion.latestSupported();
-    }
-
 }
diff --git a/langtools/test/tools/javac/processing/model/LocalClasses/LocalClassesModel.java b/langtools/test/tools/javac/processing/model/LocalClasses/LocalClassesModel.java
index a75305771e7..d91a84d58d2 100644
--- a/langtools/test/tools/javac/processing/model/LocalClasses/LocalClassesModel.java
+++ b/langtools/test/tools/javac/processing/model/LocalClasses/LocalClassesModel.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,8 @@
  * @bug 8166700
  * @summary Check that local classes originating in static initializer can be loaded properly.
  * @modules jdk.compiler
- * @build LocalTest$1Local LocalTest$2Local LocalTest$3Local LocalTest$4Local LocalTest$5Local LocalTest
+ * @library /tools/javac/lib
+ * @build LocalTest$1Local LocalTest$2Local LocalTest$3Local LocalTest$4Local LocalTest$5Local LocalTest JavacTestingAbstractProcessor
  * @compile LocalClassesModel.java
  * @compile/process/ref=LocalClassesModel.out -processor LocalClassesModel LocalTest$1Local LocalTest$2Local LocalTest$3Local LocalTest$4Local LocalTest$5Local LocalTest
  */
@@ -42,8 +43,7 @@ import javax.lang.model.element.TypeElement;
 import javax.lang.model.element.VariableElement;
 import javax.lang.model.util.ElementFilter;
 
-@SupportedAnnotationTypes("*")
-public class LocalClassesModel extends AbstractProcessor {
+public class LocalClassesModel extends JavacTestingAbstractProcessor {
 
     @Override
     public boolean process(Set annotations, RoundEnvironment roundEnv) {
@@ -65,9 +65,4 @@ public class LocalClassesModel extends AbstractProcessor {
 
         return false;
     }
-
-    @Override
-    public SourceVersion getSupportedSourceVersion() {
-        return SourceVersion.latestSupported();
-    }
 }
diff --git a/langtools/test/tools/javac/processing/model/TestSourceVersion.java b/langtools/test/tools/javac/processing/model/TestSourceVersion.java
index 396fe10b1b9..06b4ef61e95 100644
--- a/langtools/test/tools/javac/processing/model/TestSourceVersion.java
+++ b/langtools/test/tools/javac/processing/model/TestSourceVersion.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 7025809 8028543 6415644
+ * @bug 7025809 8028543 6415644 8028544
  * @summary Test latest, latestSupported, underscore as keyword, etc.
  * @author  Joseph D. Darcy
  * @modules java.compiler
@@ -44,7 +44,7 @@ public class TestSourceVersion {
     }
 
     private static void testLatestSupported() {
-        if (SourceVersion.latest() != RELEASE_9 ||
+        if (SourceVersion.latest() != RELEASE_10 ||
             SourceVersion.latestSupported() != RELEASE_9)
             throw new RuntimeException("Unexpected release value(s) found:\n" +
                                        "latest:\t" + SourceVersion.latest() + "\n" +
diff --git a/langtools/test/tools/javac/processing/model/nestedTypeVars/NestedTypeVars.java b/langtools/test/tools/javac/processing/model/nestedTypeVars/NestedTypeVars.java
index 24a62099efb..1332866c4e8 100644
--- a/langtools/test/tools/javac/processing/model/nestedTypeVars/NestedTypeVars.java
+++ b/langtools/test/tools/javac/processing/model/nestedTypeVars/NestedTypeVars.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,8 @@
 /**
  * @test
  * @modules jdk.compiler
- * @build NestedTypeVars
+ * @library /tools/javac/lib
+ * @build NestedTypeVars JavacTestingAbstractProcessor
  * @compile/process/ref=NestedTypeVars.out -processor NestedTypeVars Test$1L1$L2$1L3$L4$L5 Test$1L1$CCheck Test$1L1 Test$1CCheck Test$CCheck Test
  */
 
@@ -44,8 +45,7 @@ import javax.lang.model.type.TypeMirror;
 import javax.lang.model.type.TypeVariable;
 import javax.lang.model.util.ElementFilter;
 
-@SupportedAnnotationTypes("*")
-public class NestedTypeVars extends AbstractProcessor{
+public class NestedTypeVars extends JavacTestingAbstractProcessor {
 
     @Override
     public boolean process(Set annotations, RoundEnvironment roundEnv) {
@@ -102,12 +102,6 @@ public class NestedTypeVars extends AbstractProcessor{
                 throw new IllegalStateException("Unexpected element: " + el + "(" + el.getKind() + ")");
         }
     }
-    @Override
-    public SourceVersion getSupportedSourceVersion() {
-        return SourceVersion.latestSupported();
-    }
-
-
 }
 
 class Test {
diff --git a/langtools/test/tools/javac/processing/warnings/TestSourceVersionWarnings.java b/langtools/test/tools/javac/processing/warnings/TestSourceVersionWarnings.java
index 4e49da37fb1..5b9365ed1cb 100644
--- a/langtools/test/tools/javac/processing/warnings/TestSourceVersionWarnings.java
+++ b/langtools/test/tools/javac/processing/warnings/TestSourceVersionWarnings.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,7 @@
  * @compile/ref=gold_unsp_warn.out     -XDrawDiagnostics -processor TestSourceVersionWarnings -proc:only -ASourceVersion=RELEASE_6 -source 1.6 -Xlint:-options -Aunsupported HelloWorld.java
  * @compile/ref=gold_sv_none.out       -XDrawDiagnostics -processor TestSourceVersionWarnings -proc:only -ASourceVersion=RELEASE_7 -source 1.7 -Xlint:-options HelloWorld.java
  * @compile/ref=gold_sv_none.out       -XDrawDiagnostics -processor TestSourceVersionWarnings -proc:only -ASourceVersion=RELEASE_8 -source 1.8 -Xlint:-options HelloWorld.java
+ * @compile/ref=gold_sv_none.out       -XDrawDiagnostics -processor TestSourceVersionWarnings -proc:only -ASourceVersion=RELEASE_9 -source 1.9 -Xlint:-options HelloWorld.java
  */
 
 import java.util.Set;
diff --git a/langtools/test/tools/javac/profiles/ProfileOptionTest.java b/langtools/test/tools/javac/profiles/ProfileOptionTest.java
index af6a1183035..37c98fd715e 100644
--- a/langtools/test/tools/javac/profiles/ProfileOptionTest.java
+++ b/langtools/test/tools/javac/profiles/ProfileOptionTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -148,6 +148,7 @@ public class ProfileOptionTest {
                             error("unexpected exception from compiler: " + ise);
                         break;
                     case JDK1_9:
+                    case JDK1_10:
                         if (p == Profile.DEFAULT)
                             break;
                         if (ise == null)
diff --git a/langtools/test/tools/javac/tree/ArrayTypeToString.java b/langtools/test/tools/javac/tree/ArrayTypeToString.java
index a200f6d64c9..9de443a865b 100644
--- a/langtools/test/tools/javac/tree/ArrayTypeToString.java
+++ b/langtools/test/tools/javac/tree/ArrayTypeToString.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,8 @@
  * @bug 8068737
  * @summary Tests ArrayType.toString with type annotations present
  * @modules jdk.compiler/com.sun.tools.javac.code
- * @build ArrayTypeToString
+ * @library /tools/javac/lib
+ * @build ArrayTypeToString JavacTestingAbstractProcessor
  * @compile/ref=ArrayTypeToString.out -XDaccessInternalAPI -XDrawDiagnostics -processor ArrayTypeToString -proc:only ArrayTypeToString.java
  */
 
@@ -54,8 +55,7 @@ import com.sun.tools.javac.code.Symbol.VarSymbol;
 }
 
 @SupportedAnnotationTypes("Foo")
-@SupportedSourceVersion(SourceVersion.RELEASE_9)
-public class ArrayTypeToString extends AbstractProcessor {
+public class ArrayTypeToString extends JavacTestingAbstractProcessor {
     @Foo(0) String @Foo(1)[] @Foo(2)[] @Foo(3)[] field;
 
     public boolean process(Set tes, RoundEnvironment renv) {
diff --git a/langtools/test/tools/javac/versions/Versions.java b/langtools/test/tools/javac/versions/Versions.java
index f90f44935c9..9d6440038a0 100644
--- a/langtools/test/tools/javac/versions/Versions.java
+++ b/langtools/test/tools/javac/versions/Versions.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4981566 5028634 5094412 6304984 7025786 7025789 8001112 8028545 8000961 8030610
+ * @bug 4981566 5028634 5094412 6304984 7025786 7025789 8001112 8028545 8000961 8030610 8028546
  * @summary Check interpretation of -target and -source options
  * @modules java.compiler
  *          jdk.compiler
@@ -69,6 +69,7 @@ public class Versions {
         check("53.0", "-source 1.7");
         check("53.0", "-source 1.8");
         check("53.0", "-source 1.9");
+        check("53.0", "-source 1.10");
 
         check_source_target("50.0", "6", "6");
         check_source_target("51.0", "6", "7");
@@ -80,6 +81,7 @@ public class Versions {
         check_source_target("53.0", "7", "9");
         check_source_target("53.0", "8", "9");
         check_source_target("53.0", "9", "9");
+        check_source_target("53.0", "10", "10");
 
         checksrc16("-source 1.6");
         checksrc16("-source 6");
@@ -93,19 +95,26 @@ public class Versions {
         checksrc18("-source 8");
         checksrc18("-source 1.8", "-target 1.8");
         checksrc18("-source 8", "-target 8");
-        checksrc19();
         checksrc19("-source 1.9");
         checksrc19("-source 9");
         checksrc19("-source 1.9", "-target 1.9");
         checksrc19("-source 9", "-target 9");
-        checksrc19("-target 1.9");
-        checksrc19("-target 9");
+
+        checksrc110();
+        checksrc110("-source 1.10");
+        checksrc110("-source 10");
+        checksrc110("-source 1.10", "-target 1.10");
+        checksrc110("-source 10", "-target 10");
+        checksrc110("-target 1.10");
+        checksrc110("-target 10");
 
         fail("-source 7", "-target 1.6", "Base.java");
         fail("-source 8", "-target 1.6", "Base.java");
         fail("-source 8", "-target 1.7", "Base.java");
         fail("-source 9", "-target 1.7", "Base.java");
         fail("-source 9", "-target 1.8", "Base.java");
+        fail("-source 10", "-target 1.7", "Base.java");
+        fail("-source 10", "-target 1.8", "Base.java");
 
         fail("-source 1.5", "-target 1.5", "Base.java");
         fail("-source 1.4", "-target 1.4", "Base.java");
@@ -202,6 +211,11 @@ public class Versions {
         checksrc18(args);
     }
 
+    protected void checksrc110(String... args) {
+        printargs("checksrc110", args);
+        checksrc19(args);
+    }
+
     protected void pass(String... args) {
         printargs("pass", args);
 
diff --git a/langtools/test/tools/jdeprscan/tests/jdk/jdeprscan/TestRelease.java b/langtools/test/tools/jdeprscan/tests/jdk/jdeprscan/TestRelease.java
index d1c833e1684..c3c2d879431 100644
--- a/langtools/test/tools/jdeprscan/tests/jdk/jdeprscan/TestRelease.java
+++ b/langtools/test/tools/jdeprscan/tests/jdk/jdeprscan/TestRelease.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -49,6 +49,7 @@ public class TestRelease {
         assertTrue(invoke("7"));
         assertTrue(invoke("8"));
         assertTrue(invoke("9"));
+        assertTrue(invoke("10"));
     }
 
     @Test

From f02b7dfba7f4ac44216cc7a5f7191b5482945d8d Mon Sep 17 00:00:00 2001
From: Jini George 
Date: Mon, 30 Jan 2017 13:48:14 +0530
Subject: [PATCH 037/447] 8171084: heapdump/JMapHeapCore fails with
 java.lang.RuntimeException: Heap segment size overflow

Create a new heapdump segment and truncate huge arrays if required, to avoid overflow of the 32 bit value representing the size.

Reviewed-by: dholmes, dsamersoff
---
 .../linux/native/libsaproc/libproc_impl.c     |   4 +-
 .../utilities/AbstractHeapGraphWriter.java    |   4 +-
 .../hotspot/utilities/HeapHprofBinWriter.java | 162 ++++++++++++------
 .../sa/LingeredAppWithLargeArray.java         |  31 ++++
 .../sa/TestHeapDumpForLargeArray.java         | 117 +++++++++++++
 .../sa/jmap-hprof/JMapHProfLargeHeapTest.java |   5 +-
 6 files changed, 265 insertions(+), 58 deletions(-)
 create mode 100644 hotspot/test/serviceability/sa/LingeredAppWithLargeArray.java
 create mode 100644 hotspot/test/serviceability/sa/TestHeapDumpForLargeArray.java

diff --git a/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c b/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c
index c12f82d1bf6..3e3758b0cf6 100644
--- a/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c
+++ b/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -50,7 +50,7 @@ int pathmap_open(const char* name) {
   }
 
 
-  if (strlen(alt_root) + strlen(name) < PATH_MAX) {
+  if (strlen(alt_root) + strlen(name) > PATH_MAX) {
     // Buffer too small.
     return -1;
   }
diff --git a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/AbstractHeapGraphWriter.java b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/AbstractHeapGraphWriter.java
index 5dbf8984158..eb3aad9495a 100644
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/AbstractHeapGraphWriter.java
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/AbstractHeapGraphWriter.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -114,6 +114,8 @@ public abstract class AbstractHeapGraphWriter implements HeapGraphWriter {
                     }
                 });
 
+                writeHeapRecordPrologue();
+
                 // write JavaThreads
                 writeJavaThreads();
 
diff --git a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
index 9da43745388..5d23da01d51 100644
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,8 +45,8 @@ import sun.jvm.hotspot.classfile.*;
  * WARNING: This format is still under development, and is subject to
  * change without notice.
  *
- * header    "JAVA PROFILE 1.0.1" or "JAVA PROFILE 1.0.2" (0-terminated)
- * u4        size of identifiers. Identifiers are used to represent
+ * header     "JAVA PROFILE 1.0.2" (0-terminated)
+ * u4         size of identifiers. Identifiers are used to represent
  *            UTF8 strings, objects, stack traces, etc. They usually
  *            have the same size as host pointers. For example, on
  *            Solaris and Win32, the size is 4.
@@ -294,10 +294,9 @@ import sun.jvm.hotspot.classfile.*;
  *                u2        stack trace depth
  *
  *
- * When the header is "JAVA PROFILE 1.0.2" a heap dump can optionally
- * be generated as a sequence of heap dump segments. This sequence is
- * terminated by an end record. The additional tags allowed by format
- * "JAVA PROFILE 1.0.2" are:
+ * A heap dump can optionally be generated as a sequence of heap dump
+ * segments. This sequence is terminated by an end record. The additional
+ * tags allowed by format "JAVA PROFILE 1.0.2" are:
  *
  * HPROF_HEAP_DUMP_SEGMENT  denote a heap dump segment
  *
@@ -310,8 +309,6 @@ import sun.jvm.hotspot.classfile.*;
 
 public class HeapHprofBinWriter extends AbstractHeapGraphWriter {
 
-    // The heap size threshold used to determine if segmented format
-    // ("JAVA PROFILE 1.0.2") should be used.
     private static final long HPROF_SEGMENTED_HEAP_DUMP_THRESHOLD = 2L * 0x40000000;
 
     // The approximate size of a heap segment. Used to calculate when to create
@@ -319,7 +316,6 @@ public class HeapHprofBinWriter extends AbstractHeapGraphWriter {
     private static final long HPROF_SEGMENTED_HEAP_DUMP_SEGMENT_SIZE = 1L * 0x40000000;
 
     // hprof binary file header
-    private static final String HPROF_HEADER_1_0_1 = "JAVA PROFILE 1.0.1";
     private static final String HPROF_HEADER_1_0_2 = "JAVA PROFILE 1.0.2";
 
     // constants in enum HprofTag
@@ -380,6 +376,7 @@ public class HeapHprofBinWriter extends AbstractHeapGraphWriter {
     private static final int JVM_SIGNATURE_ARRAY   = '[';
     private static final int JVM_SIGNATURE_CLASS   = 'L';
 
+    private static final long MAX_U4_VALUE = 0xFFFFFFFFL;
     int serialNum = 1;
 
     public synchronized void write(String fileName) throws IOException {
@@ -469,7 +466,6 @@ public class HeapHprofBinWriter extends AbstractHeapGraphWriter {
             // length later - hprof format requires length.
             out.flush();
             currentSegmentStart = fos.getChannel().position();
-
             // write dummy length of 0 and we'll fix it later.
             out.writeInt(0);
         }
@@ -479,7 +475,7 @@ public class HeapHprofBinWriter extends AbstractHeapGraphWriter {
     protected void writeHeapRecordEpilogue() throws IOException {
         if (useSegmentedHeapDump) {
             out.flush();
-            if ((fos.getChannel().position() - currentSegmentStart - 4) >= HPROF_SEGMENTED_HEAP_DUMP_SEGMENT_SIZE) {
+            if ((fos.getChannel().position() - currentSegmentStart - 4L) >= HPROF_SEGMENTED_HEAP_DUMP_SEGMENT_SIZE) {
                 fillInHeapRecordLength();
                 currentSegmentStart = 0;
             }
@@ -488,14 +484,14 @@ public class HeapHprofBinWriter extends AbstractHeapGraphWriter {
 
     private void fillInHeapRecordLength() throws IOException {
 
-        // now get current position to calculate length
+        // now get the current position to calculate length
         long dumpEnd = fos.getChannel().position();
 
-        // calculate length of heap data
+        // calculate the length of heap data
         long dumpLenLong = (dumpEnd - currentSegmentStart - 4L);
 
         // Check length boundary, overflow could happen but is _very_ unlikely
-        if(dumpLenLong >= (4L * 0x40000000)){
+        if (dumpLenLong >= (4L * 0x40000000)) {
             throw new RuntimeException("Heap segment size overflow.");
         }
 
@@ -517,6 +513,71 @@ public class HeapHprofBinWriter extends AbstractHeapGraphWriter {
         fos.getChannel().position(currentPosition);
     }
 
+    // get the size in bytes for the requested type
+    private long getSizeForType(int type) throws IOException {
+        switch (type) {
+            case TypeArrayKlass.T_BOOLEAN:
+                return BOOLEAN_SIZE;
+            case TypeArrayKlass.T_INT:
+                return INT_SIZE;
+            case TypeArrayKlass.T_CHAR:
+                return CHAR_SIZE;
+            case TypeArrayKlass.T_SHORT:
+                return SHORT_SIZE;
+            case TypeArrayKlass.T_BYTE:
+                return BYTE_SIZE;
+            case TypeArrayKlass.T_LONG:
+                return LONG_SIZE;
+            case TypeArrayKlass.T_FLOAT:
+                return FLOAT_SIZE;
+            case TypeArrayKlass.T_DOUBLE:
+                return DOUBLE_SIZE;
+            default:
+                throw new RuntimeException(
+                    "Should not reach here: Unknown type: " + type);
+         }
+    }
+
+    private int getArrayHeaderSize(boolean isObjectAarray) {
+        return isObjectAarray?
+            ((int) BYTE_SIZE + 2 * (int) INT_SIZE + 2 * (int) OBJ_ID_SIZE):
+            (2 * (int) BYTE_SIZE + 2 * (int) INT_SIZE + (int) OBJ_ID_SIZE);
+    }
+
+    // Check if we need to truncate an array
+    private int calculateArrayMaxLength(long originalArrayLength,
+                                        int headerSize,
+                                        long typeSize,
+                                        String typeName) throws IOException {
+
+        long length = originalArrayLength;
+
+        // now get the current position to calculate length
+        long dumpEnd = fos.getChannel().position();
+        long originalLengthInBytes = originalArrayLength * typeSize;
+
+        // calculate the length of heap data
+        long currentRecordLength = (dumpEnd - currentSegmentStart - 4L);
+        if (currentRecordLength > 0 &&
+            (currentRecordLength + headerSize + originalLengthInBytes) > MAX_U4_VALUE) {
+            fillInHeapRecordLength();
+            currentSegmentStart = 0;
+            writeHeapRecordPrologue();
+            currentRecordLength = 0;
+        }
+
+        // Calculate the max bytes we can use.
+        long maxBytes = (MAX_U4_VALUE - (headerSize + currentRecordLength));
+
+        if (originalLengthInBytes > maxBytes) {
+            length = maxBytes/typeSize;
+            System.err.println("WARNING: Cannot dump array of type " + typeName
+                               + " with length " + originalArrayLength
+                               + "; truncating to length " + length);
+        }
+        return (int) length;
+    }
+
     private void writeClassDumpRecords() throws IOException {
         SystemDictionary sysDict = VM.getVM().getSystemDictionary();
         ClassLoaderDataGraph cldGraph = VM.getVM().getClassLoaderDataGraph();
@@ -694,12 +755,16 @@ public class HeapHprofBinWriter extends AbstractHeapGraphWriter {
     }
 
     protected void writeObjectArray(ObjArray array) throws IOException {
+        int headerSize = getArrayHeaderSize(true);
+        final int length = calculateArrayMaxLength(array.getLength(),
+                                                   headerSize,
+                                                   OBJ_ID_SIZE,
+                                                   "Object");
         out.writeByte((byte) HPROF_GC_OBJ_ARRAY_DUMP);
         writeObjectID(array);
         out.writeInt(DUMMY_STACK_TRACE_ID);
-        out.writeInt((int) array.getLength());
+        out.writeInt(length);
         writeObjectID(array.getKlass().getJavaMirror());
-        final int length = (int) array.getLength();
         for (int index = 0; index < length; index++) {
             OopHandle handle = array.getOopHandleAt(index);
             writeObjectID(getAddressValue(handle));
@@ -707,101 +772,101 @@ public class HeapHprofBinWriter extends AbstractHeapGraphWriter {
     }
 
     protected void writePrimitiveArray(TypeArray array) throws IOException {
+        int headerSize = getArrayHeaderSize(false);
+        TypeArrayKlass tak = (TypeArrayKlass) array.getKlass();
+        final int type = (int) tak.getElementType();
+        final String typeName = tak.getElementTypeName();
+        final long typeSize = getSizeForType(type);
+        final int length = calculateArrayMaxLength(array.getLength(),
+                                                   headerSize,
+                                                   typeSize,
+                                                   typeName);
         out.writeByte((byte) HPROF_GC_PRIM_ARRAY_DUMP);
         writeObjectID(array);
         out.writeInt(DUMMY_STACK_TRACE_ID);
-        out.writeInt((int) array.getLength());
-        TypeArrayKlass tak = (TypeArrayKlass) array.getKlass();
-        final int type = (int) tak.getElementType();
+        out.writeInt(length);
         out.writeByte((byte) type);
         switch (type) {
             case TypeArrayKlass.T_BOOLEAN:
-                writeBooleanArray(array);
+                writeBooleanArray(array, length);
                 break;
             case TypeArrayKlass.T_CHAR:
-                writeCharArray(array);
+                writeCharArray(array, length);
                 break;
             case TypeArrayKlass.T_FLOAT:
-                writeFloatArray(array);
+                writeFloatArray(array, length);
                 break;
             case TypeArrayKlass.T_DOUBLE:
-                writeDoubleArray(array);
+                writeDoubleArray(array, length);
                 break;
             case TypeArrayKlass.T_BYTE:
-                writeByteArray(array);
+                writeByteArray(array, length);
                 break;
             case TypeArrayKlass.T_SHORT:
-                writeShortArray(array);
+                writeShortArray(array, length);
                 break;
             case TypeArrayKlass.T_INT:
-                writeIntArray(array);
+                writeIntArray(array, length);
                 break;
             case TypeArrayKlass.T_LONG:
-                writeLongArray(array);
+                writeLongArray(array, length);
                 break;
             default:
-                throw new RuntimeException("should not reach here");
+                throw new RuntimeException(
+                    "Should not reach here: Unknown type: " + type);
         }
     }
 
-    private void writeBooleanArray(TypeArray array) throws IOException {
-        final int length = (int) array.getLength();
+    private void writeBooleanArray(TypeArray array, int length) throws IOException {
         for (int index = 0; index < length; index++) {
              long offset = BOOLEAN_BASE_OFFSET + index * BOOLEAN_SIZE;
              out.writeBoolean(array.getHandle().getJBooleanAt(offset));
         }
     }
 
-    private void writeByteArray(TypeArray array) throws IOException {
-        final int length = (int) array.getLength();
+    private void writeByteArray(TypeArray array, int length) throws IOException {
         for (int index = 0; index < length; index++) {
              long offset = BYTE_BASE_OFFSET + index * BYTE_SIZE;
              out.writeByte(array.getHandle().getJByteAt(offset));
         }
     }
 
-    private void writeShortArray(TypeArray array) throws IOException {
-        final int length = (int) array.getLength();
+    private void writeShortArray(TypeArray array, int length) throws IOException {
         for (int index = 0; index < length; index++) {
              long offset = SHORT_BASE_OFFSET + index * SHORT_SIZE;
              out.writeShort(array.getHandle().getJShortAt(offset));
         }
     }
 
-    private void writeIntArray(TypeArray array) throws IOException {
-        final int length = (int) array.getLength();
+    private void writeIntArray(TypeArray array, int length) throws IOException {
         for (int index = 0; index < length; index++) {
              long offset = INT_BASE_OFFSET + index * INT_SIZE;
              out.writeInt(array.getHandle().getJIntAt(offset));
         }
     }
 
-    private void writeLongArray(TypeArray array) throws IOException {
-        final int length = (int) array.getLength();
+    private void writeLongArray(TypeArray array, int length) throws IOException {
         for (int index = 0; index < length; index++) {
              long offset = LONG_BASE_OFFSET + index * LONG_SIZE;
              out.writeLong(array.getHandle().getJLongAt(offset));
         }
     }
 
-    private void writeCharArray(TypeArray array) throws IOException {
-        final int length = (int) array.getLength();
+    private void writeCharArray(TypeArray array, int length) throws IOException {
         for (int index = 0; index < length; index++) {
              long offset = CHAR_BASE_OFFSET + index * CHAR_SIZE;
              out.writeChar(array.getHandle().getJCharAt(offset));
         }
     }
 
-    private void writeFloatArray(TypeArray array) throws IOException {
-        final int length = (int) array.getLength();
+    private void writeFloatArray(TypeArray array, int length) throws IOException {
         for (int index = 0; index < length; index++) {
              long offset = FLOAT_BASE_OFFSET + index * FLOAT_SIZE;
              out.writeFloat(array.getHandle().getJFloatAt(offset));
         }
     }
 
-    private void writeDoubleArray(TypeArray array) throws IOException {
-        final int length = (int) array.getLength();
+    private void writeDoubleArray(TypeArray array, int length) throws IOException {
         for (int index = 0; index < length; index++) {
              long offset = DOUBLE_BASE_OFFSET + index * DOUBLE_SIZE;
              out.writeDouble(array.getHandle().getJDoubleAt(offset));
@@ -996,12 +1061,7 @@ public class HeapHprofBinWriter extends AbstractHeapGraphWriter {
     // writes hprof binary file header
     private void writeFileHeader() throws IOException {
         // version string
-        if(useSegmentedHeapDump) {
-            out.writeBytes(HPROF_HEADER_1_0_2);
-        }
-        else {
-            out.writeBytes(HPROF_HEADER_1_0_1);
-        }
+        out.writeBytes(HPROF_HEADER_1_0_2);
         out.writeByte((byte)'\0');
 
         // write identifier size. we use pointers as identifiers.
diff --git a/hotspot/test/serviceability/sa/LingeredAppWithLargeArray.java b/hotspot/test/serviceability/sa/LingeredAppWithLargeArray.java
new file mode 100644
index 00000000000..44929f05b15
--- /dev/null
+++ b/hotspot/test/serviceability/sa/LingeredAppWithLargeArray.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import jdk.test.lib.apps.LingeredApp;
+
+public class LingeredAppWithLargeArray extends LingeredApp {
+    public static void main(String args[]) {
+        int[] hugeArray = new int[Integer.MAX_VALUE/2];
+        LingeredApp.main(args);
+    }
+ }
diff --git a/hotspot/test/serviceability/sa/TestHeapDumpForLargeArray.java b/hotspot/test/serviceability/sa/TestHeapDumpForLargeArray.java
new file mode 100644
index 00000000000..70f26fb48eb
--- /dev/null
+++ b/hotspot/test/serviceability/sa/TestHeapDumpForLargeArray.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.util.ArrayList;
+import java.util.List;
+import java.io.File;
+import java.nio.file.Files;
+import java.io.IOException;
+import java.io.BufferedInputStream;
+import java.util.stream.Collectors;
+import java.io.FileInputStream;
+
+import sun.jvm.hotspot.HotSpotAgent;
+import sun.jvm.hotspot.debugger.*;
+
+import jdk.test.lib.apps.LingeredApp;
+import jdk.test.lib.JDKToolLauncher;
+import jdk.test.lib.JDKToolFinder;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Utils;
+import jdk.test.lib.Asserts;
+
+/*
+ * @test
+ * @library /test/lib
+ * @bug 8171084
+ * @requires (vm.bits == "64" & os.maxMemory > 8g)
+ * @modules java.base/jdk.internal.misc
+ *          jdk.hotspot.agent/sun.jvm.hotspot
+ *          jdk.hotspot.agent/sun.jvm.hotspot.utilities
+ *          jdk.hotspot.agent/sun.jvm.hotspot.oops
+ *          jdk.hotspot.agent/sun.jvm.hotspot.debugger
+ * @run main/timeout=1800/othervm -Xmx8g TestHeapDumpForLargeArray
+ */
+
+public class TestHeapDumpForLargeArray {
+
+    private static LingeredAppWithLargeArray theApp = null;
+
+    private static void attachAndDump(String heapDumpFileName,
+                                      long lingeredAppPid) throws Exception {
+
+        JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jhsdb");
+        launcher.addToolArg("jmap");
+        launcher.addToolArg("--binaryheap");
+        launcher.addToolArg("--dumpfile");
+        launcher.addToolArg(heapDumpFileName);
+        launcher.addToolArg("--pid");
+        launcher.addToolArg(Long.toString(lingeredAppPid));
+
+        ProcessBuilder processBuilder = new ProcessBuilder();
+        processBuilder.command(launcher.getCommand());
+        System.out.println(
+            processBuilder.command().stream().collect(Collectors.joining(" ")));
+
+        OutputAnalyzer SAOutput = ProcessTools.executeProcess(processBuilder);
+        SAOutput.shouldHaveExitValue(0);
+        SAOutput.shouldNotContain("Heap segment size overflow");
+        SAOutput.shouldContain("truncating to");
+        SAOutput.shouldContain("heap written to");
+        SAOutput.shouldContain(heapDumpFileName);
+        System.out.println(SAOutput.getOutput());
+
+    }
+
+    public static void main (String... args) throws Exception {
+
+        String heapDumpFileName = "LargeArrayHeapDump.bin";
+
+        if (!Platform.shouldSAAttach()) {
+            System.out.println(
+               "SA attach not expected to work - test skipped.");
+            return;
+        }
+
+        File heapDumpFile = new File(heapDumpFileName);
+        if (heapDumpFile.exists()) {
+            heapDumpFile.delete();
+        }
+
+        try {
+            List vmArgs = new ArrayList();
+            vmArgs.add("-XX:+UsePerfData");
+            vmArgs.add("-Xmx8g");
+            vmArgs.addAll(Utils.getVmOptions());
+
+            theApp = new LingeredAppWithLargeArray();
+            LingeredApp.startApp(vmArgs, theApp);
+            attachAndDump(heapDumpFileName, theApp.getPid());
+        } finally {
+            LingeredApp.stopApp(theApp);
+            heapDumpFile.delete();
+        }
+    }
+}
diff --git a/hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java b/hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java
index 2a46621d118..50531949002 100644
--- a/hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java
+++ b/hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java
@@ -53,7 +53,6 @@ import jdk.test.lib.process.ProcessTools;
 
 public class JMapHProfLargeHeapTest {
     private static final String HEAP_DUMP_FILE_NAME = "heap.bin";
-    private static final String HPROF_HEADER_1_0_1 = "JAVA PROFILE 1.0.1";
     private static final String HPROF_HEADER_1_0_2 = "JAVA PROFILE 1.0.2";
     private static final long M = 1024L;
     private static final long G = 1024L * M;
@@ -65,9 +64,7 @@ public class JMapHProfLargeHeapTest {
         }
 
         // All heap dumps should create 1.0.2 file format
-        // Hotspot internal heapdumper always use HPROF_HEADER_1_0_2 format,
-        // but SA heapdumper still use HPROF_HEADER_1_0_1 for small heaps
-        testHProfFileFormat("-Xmx1g", 22 * M, HPROF_HEADER_1_0_1);
+        testHProfFileFormat("-Xmx1g", 22 * M, HPROF_HEADER_1_0_2);
 
         /**
          * This test was deliberately commented out since the test system lacks

From 3f2d357f282eb48ffc627c42b2116435fcf1de27 Mon Sep 17 00:00:00 2001
From: Tom Rodriguez 
Date: Mon, 30 Jan 2017 10:30:24 -0800
Subject: [PATCH 038/447] 8173584: Add unit test for 8173309

Reviewed-by: kvn
---
 .../MaterializeVirtualObjectTest.java           | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/hotspot/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java b/hotspot/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java
index dee13cfef8d..ec463e11890 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java
@@ -44,6 +44,8 @@
  *                   -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  *                   -XX:CompileCommand=exclude,*::check
  *                   -XX:+DoEscapeAnalysis -XX:-UseCounterDecay
+ *                   -XX:CompileCommand=dontinline,compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest,testFrame
+ *                   -XX:CompileCommand=inline,compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest,recurse
  *                   -Xbatch
  *                   -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=false
  *                   compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest
@@ -119,14 +121,25 @@ public class MaterializeVirtualObjectTest {
         }
         Asserts.assertTrue(WB.isMethodCompiled(METHOD), getName()
                 + "Method unexpectedly not compiled");
+        Asserts.assertTrue(WB.getMethodCompilationLevel(METHOD) == 4, getName()
+                + "Method not compiled at level 4");
         testFrame("someString", COMPILE_THRESHOLD);
     }
 
     private void testFrame(String str, int iteration) {
         Helper helper = new Helper(str);
-        check(iteration);
+        recurse(2, iteration);
         Asserts.assertTrue((helper.string != null) && (this != null)
-                && (helper != null), getName() + " : some locals are null");
+                           && (helper != null), String.format("%s : some locals are null", getName()));
+    }
+    private void recurse(int depth, int iteration) {
+        if (depth == 0) {
+            check(iteration);
+        } else {
+            Integer s = new Integer(depth);
+            recurse(depth - 1, iteration);
+            Asserts.assertEQ(s.intValue(), depth, String.format("different values: %s != %s", s.intValue(), depth));
+        }
     }
 
     private void check(int iteration) {

From cdae3f8fbafbc3432a1aed050307b269056994ea Mon Sep 17 00:00:00 2001
From: Vladimir Ivanov 
Date: Mon, 30 Jan 2017 16:03:25 +0300
Subject: [PATCH 039/447] 8158546: C1 compilation fails with "Constant field
 loads are folded during parsing"

Reviewed-by: kvn
---
 hotspot/src/share/vm/c1/c1_Canonicalizer.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp b/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp
index e3a7af67742..095ac876292 100644
--- a/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp
+++ b/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp
@@ -248,7 +248,9 @@ void Canonicalizer::do_ArrayLength    (ArrayLength*     x) {
   } else if ((lf = x->array()->as_LoadField()) != NULL) {
     ciField* field = lf->field();
     if (field->is_static_constant()) {
-      assert(PatchALot || ScavengeRootsInCode < 2, "Constant field loads are folded during parsing");
+      // Constant field loads are usually folded during parsing.
+      // But it doesn't happen with PatchALot, ScavengeRootsInCode < 2, or when
+      // holder class is being initialized during parsing (for static fields).
       ciObject* c = field->constant_value().as_object();
       if (!c->is_null_object()) {
         set_constant(c->as_array()->length());

From 81e25c58fb8e15aad233cf45a7ac2c1087757c77 Mon Sep 17 00:00:00 2001
From: Vladimir Ivanov 
Date: Mon, 30 Jan 2017 16:04:22 +0300
Subject: [PATCH 040/447] 8173404: C2: wrong nmethod dependency can be recorded
 for CallSite.target

Reviewed-by: kvn
---
 hotspot/src/share/vm/opto/type.cpp            |   2 +-
 .../ContinuousCallSiteTargetChange.java       | 101 ++++++++++++++----
 2 files changed, 80 insertions(+), 23 deletions(-)

diff --git a/hotspot/src/share/vm/opto/type.cpp b/hotspot/src/share/vm/opto/type.cpp
index a8c68006020..6411307c517 100644
--- a/hotspot/src/share/vm/opto/type.cpp
+++ b/hotspot/src/share/vm/opto/type.cpp
@@ -373,7 +373,7 @@ const Type* Type::make_constant_from_field(ciField* field, ciInstance* holder,
   if (con_type != NULL && field->is_call_site_target()) {
     ciCallSite* call_site = holder->as_call_site();
     if (!call_site->is_constant_call_site()) {
-      ciMethodHandle* target = call_site->get_target();
+      ciMethodHandle* target = con.as_object()->as_method_handle();
       Compile::current()->dependencies()->assert_call_site_target_value(call_site, target);
     }
   }
diff --git a/hotspot/test/compiler/jsr292/ContinuousCallSiteTargetChange.java b/hotspot/test/compiler/jsr292/ContinuousCallSiteTargetChange.java
index d9f2ddb1721..7fdd282033d 100644
--- a/hotspot/test/compiler/jsr292/ContinuousCallSiteTargetChange.java
+++ b/hotspot/test/compiler/jsr292/ContinuousCallSiteTargetChange.java
@@ -23,7 +23,6 @@
 
 /**
  * @test
- * @modules java.base/jdk.internal.misc
  * @library /test/lib /
  *
  * @run driver compiler.jsr292.ContinuousCallSiteTargetChange
@@ -31,6 +30,7 @@
 
 package compiler.jsr292;
 
+import jdk.test.lib.Asserts;
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.process.ProcessTools;
 
@@ -39,15 +39,26 @@ import java.lang.invoke.MethodHandle;
 import java.lang.invoke.MethodHandles;
 import java.lang.invoke.MethodType;
 import java.lang.invoke.MutableCallSite;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
 
 public class ContinuousCallSiteTargetChange {
-    static void testServer() throws Exception {
+    static final int ITERATIONS = Integer.parseInt(System.getProperty("iterations", "50"));
+
+    static void runTest(Class test, String... extraArgs) throws Exception {
+        List argsList = new ArrayList<>(
+                List.of("-XX:+IgnoreUnrecognizedVMOptions",
+                    "-XX:PerBytecodeRecompilationCutoff=10", "-XX:PerMethodRecompilationCutoff=10",
+                    "-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintInlining"));
+
+        argsList.addAll(Arrays.asList(extraArgs));
+
+        argsList.add(test.getName());
+        argsList.add(Integer.toString(ITERATIONS));
+
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
-                "-XX:+IgnoreUnrecognizedVMOptions",
-                "-server", "-XX:-TieredCompilation", "-Xbatch",
-                "-XX:PerBytecodeRecompilationCutoff=10", "-XX:PerMethodRecompilationCutoff=10",
-                "-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintInlining",
-                Test.class.getName(), "100");
+                argsList.toArray(new String[argsList.size()]));
 
         OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
 
@@ -55,30 +66,42 @@ public class ContinuousCallSiteTargetChange {
 
         analyzer.shouldNotContain("made not compilable");
         analyzer.shouldNotContain("decompile_count > PerMethodRecompilationCutoff");
+
     }
 
-    static void testClient() throws Exception {
-        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
-                "-XX:+IgnoreUnrecognizedVMOptions",
-                "-client", "-XX:+TieredCompilation", "-XX:TieredStopAtLevel=1", "-Xbatch",
-                "-XX:PerBytecodeRecompilationCutoff=10", "-XX:PerMethodRecompilationCutoff=10",
-                "-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintInlining",
-                Test.class.getName(), "100");
+    static void testServer(Class test, String... args) throws Exception {
+        List extraArgsList = new ArrayList<>(
+                List.of("-server", "-XX:-TieredCompilation"));
+        extraArgsList.addAll(Arrays.asList(args));
 
-        OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
+        runTest(test, extraArgsList.toArray(new String[extraArgsList.size()]));
+    }
 
-        analyzer.shouldHaveExitValue(0);
+    static void testClient(Class test, String... args) throws Exception {
+        List extraArgsList = new ArrayList<>(
+                List.of("-client", "-XX:+TieredCompilation", "-XX:TieredStopAtLevel=1"));
+        extraArgsList.addAll(Arrays.asList(args));
 
-        analyzer.shouldNotContain("made not compilable");
-        analyzer.shouldNotContain("decompile_count > PerMethodRecompilationCutoff");
+        runTest(test, extraArgsList.toArray(new String[extraArgsList.size()]));
     }
 
     public static void main(String[] args) throws Exception {
-        testServer();
-        testClient();
+        testServer(RecompilationTest.class, "-Xbatch");
+        testClient(RecompilationTest.class, "-Xbatch");
+
+        testServer(PingPongTest.class);
+        testClient(PingPongTest.class);
     }
 
-    static class Test {
+    static MethodHandle findStatic(Class cls, String name, MethodType mt) {
+        try {
+            return MethodHandles.lookup().findStatic(cls, name, mt);
+        } catch (Exception e) {
+            throw new Error(e);
+        }
+    }
+
+    static class RecompilationTest {
         static final MethodType mt = MethodType.methodType(void.class);
         static final CallSite cs = new MutableCallSite(mt);
 
@@ -96,7 +119,7 @@ public class ContinuousCallSiteTargetChange {
         }
 
         static void iteration() throws Throwable {
-            MethodHandle mh1 = MethodHandles.lookup().findStatic(ContinuousCallSiteTargetChange.Test.class, "f", mt);
+            MethodHandle mh1 = findStatic(RecompilationTest.class, "f", mt);
             cs.setTarget(mh1);
             for (int i = 0; i < 20_000; i++) {
                 test1();
@@ -111,4 +134,38 @@ public class ContinuousCallSiteTargetChange {
             }
         }
     }
+
+    static class PingPongTest {
+        static final MethodType mt = MethodType.methodType(void.class);
+        static final CallSite cs = new MutableCallSite(mt);
+
+        static final MethodHandle mh = cs.dynamicInvoker();
+
+        static final MethodHandle ping = findStatic(PingPongTest.class, "ping", mt);
+        static final MethodHandle pong = findStatic(PingPongTest.class, "pong", mt);
+
+        static void ping() {
+            Asserts.assertEQ(cs.getTarget(), ping, "wrong call site target");
+            cs.setTarget(pong);
+        }
+
+        static void pong() {
+            Asserts.assertEQ(cs.getTarget(), pong, "wrong call site target");
+            cs.setTarget(ping);
+        }
+
+        static void iteration() throws Throwable {
+            cs.setTarget(ping);
+            for (int i = 0; i < 20_000; i++) {
+                mh.invokeExact();
+            }
+        }
+
+        public static void main(String[] args) throws Throwable {
+            int iterations = Integer.parseInt(args[0]);
+            for (int i = 0; i < iterations; i++) {
+                iteration();
+            }
+        }
+    }
 }

From 95ff3ccdb4777153fb13e5bf3c901869ad9bf83f Mon Sep 17 00:00:00 2001
From: Vladimir Ivanov 
Date: Tue, 31 Jan 2017 01:11:40 +0300
Subject: [PATCH 041/447] 8173338: C2: continuous CallSite relinkage eventually
 disables compilation for a method

Reviewed-by: jrose, dlong, kvn
---
 hotspot/src/share/vm/ci/ciEnv.cpp       | 11 +++++++++--
 hotspot/src/share/vm/ci/ciEnv.hpp       |  1 +
 hotspot/src/share/vm/code/codeCache.cpp |  2 +-
 hotspot/src/share/vm/code/nmethod.cpp   |  8 ++++++++
 4 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/hotspot/src/share/vm/ci/ciEnv.cpp b/hotspot/src/share/vm/ci/ciEnv.cpp
index 024909b1cbc..e8587cf9646 100644
--- a/hotspot/src/share/vm/ci/ciEnv.cpp
+++ b/hotspot/src/share/vm/ci/ciEnv.cpp
@@ -101,6 +101,7 @@ ciEnv::ciEnv(CompileTask* task, int system_dictionary_modification_counter)
   _debug_info = NULL;
   _dependencies = NULL;
   _failure_reason = NULL;
+  _inc_decompile_count_on_failure = true;
   _compilable = MethodCompilable;
   _break_at_compile = false;
   _compiler_data = NULL;
@@ -161,6 +162,7 @@ ciEnv::ciEnv(Arena* arena) : _ciEnv_arena(mtCompiler) {
   _debug_info = NULL;
   _dependencies = NULL;
   _failure_reason = NULL;
+  _inc_decompile_count_on_failure = true;
   _compilable = MethodCompilable_never;
   _break_at_compile = false;
   _compiler_data = NULL;
@@ -902,7 +904,12 @@ void ciEnv::validate_compile_task_dependencies(ciMethod* target) {
     if (deps.is_klass_type())  continue;  // skip klass dependencies
     Klass* witness = deps.check_dependency();
     if (witness != NULL) {
-      record_failure("invalid non-klass dependency");
+      if (deps.type() == Dependencies::call_site_target_value) {
+        _inc_decompile_count_on_failure = false;
+        record_failure("call site target change");
+      } else {
+        record_failure("invalid non-klass dependency");
+      }
       return;
     }
   }
@@ -1017,7 +1024,7 @@ void ciEnv::register_method(ciMethod* target,
     if (failing()) {
       // While not a true deoptimization, it is a preemptive decompile.
       MethodData* mdo = method()->method_data();
-      if (mdo != NULL) {
+      if (mdo != NULL && _inc_decompile_count_on_failure) {
         mdo->inc_decompile_count();
       }
 
diff --git a/hotspot/src/share/vm/ci/ciEnv.hpp b/hotspot/src/share/vm/ci/ciEnv.hpp
index e5a99e1a96a..36934010ef8 100644
--- a/hotspot/src/share/vm/ci/ciEnv.hpp
+++ b/hotspot/src/share/vm/ci/ciEnv.hpp
@@ -55,6 +55,7 @@ private:
   DebugInformationRecorder* _debug_info;
   Dependencies*    _dependencies;
   const char*      _failure_reason;
+  bool             _inc_decompile_count_on_failure;
   int              _compilable;
   bool             _break_at_compile;
   int              _num_inlined_bytecodes;
diff --git a/hotspot/src/share/vm/code/codeCache.cpp b/hotspot/src/share/vm/code/codeCache.cpp
index bfe643ab683..e1a2f6392b0 100644
--- a/hotspot/src/share/vm/code/codeCache.cpp
+++ b/hotspot/src/share/vm/code/codeCache.cpp
@@ -1211,7 +1211,7 @@ void CodeCache::make_marked_nmethods_not_entrant() {
   CompiledMethodIterator iter;
   while(iter.next_alive()) {
     CompiledMethod* nm = iter.method();
-    if (nm->is_marked_for_deoptimization()) {
+    if (nm->is_marked_for_deoptimization() && !nm->is_not_entrant()) {
       nm->make_not_entrant();
     }
   }
diff --git a/hotspot/src/share/vm/code/nmethod.cpp b/hotspot/src/share/vm/code/nmethod.cpp
index 71420040970..f82872baf1c 100644
--- a/hotspot/src/share/vm/code/nmethod.cpp
+++ b/hotspot/src/share/vm/code/nmethod.cpp
@@ -1146,6 +1146,14 @@ bool nmethod::make_not_entrant_or_zombie(unsigned int state) {
   assert(state == zombie || state == not_entrant, "must be zombie or not_entrant");
   assert(!is_zombie(), "should not already be a zombie");
 
+  if (_state == state) {
+    // Avoid taking the lock if already in required state.
+    // This is safe from races because the state is an end-state,
+    // which the nmethod cannot back out of once entered.
+    // No need for fencing either.
+    return false;
+  }
+
   // Make sure neither the nmethod nor the method is flushed in case of a safepoint in code below.
   nmethodLocker nml(this);
   methodHandle the_method(method());

From ecea08b5c23a5fc69341225691554ea4ad00f6cf Mon Sep 17 00:00:00 2001
From: Tobias Hartmann 
Date: Tue, 31 Jan 2017 18:42:45 +0100
Subject: [PATCH 042/447] 8173373: C1: NPE is thrown instead of LinkageError
 when accessing inaccessible field on NULL receiver

Deoptimize if receiver null check of unresolved field access fails to throw NoClassDefFoundError instead of NPE.

Reviewed-by: vlivanov
---
 hotspot/src/share/vm/c1/c1_LIR.cpp            | 11 +++++
 hotspot/src/share/vm/c1/c1_LIR.hpp            |  2 +-
 hotspot/src/share/vm/c1/c1_LIRGenerator.cpp   | 12 +++--
 .../test/compiler/c1/TestUnresolvedField.jasm | 38 +++++++++++++++
 .../compiler/c1/TestUnresolvedFieldMain.java  | 48 +++++++++++++++++++
 5 files changed, 106 insertions(+), 5 deletions(-)
 create mode 100644 hotspot/test/compiler/c1/TestUnresolvedField.jasm
 create mode 100644 hotspot/test/compiler/c1/TestUnresolvedFieldMain.java

diff --git a/hotspot/src/share/vm/c1/c1_LIR.cpp b/hotspot/src/share/vm/c1/c1_LIR.cpp
index 05f39476849..e6cdb5e7c03 100644
--- a/hotspot/src/share/vm/c1/c1_LIR.cpp
+++ b/hotspot/src/share/vm/c1/c1_LIR.cpp
@@ -1413,6 +1413,17 @@ void LIR_List::store_check(LIR_Opr object, LIR_Opr array, LIR_Opr tmp1, LIR_Opr
   append(c);
 }
 
+void LIR_List::null_check(LIR_Opr opr, CodeEmitInfo* info, bool deoptimize_on_null) {
+  if (deoptimize_on_null) {
+    // Emit an explicit null check and deoptimize if opr is null
+    CodeStub* deopt = new DeoptimizeStub(info, Deoptimization::Reason_null_check, Deoptimization::Action_none);
+    cmp(lir_cond_equal, opr, LIR_OprFact::oopConst(NULL));
+    branch(lir_cond_equal, T_OBJECT, deopt);
+  } else {
+    // Emit an implicit null check
+    append(new LIR_Op1(lir_null_check, opr, info));
+  }
+}
 
 void LIR_List::cas_long(LIR_Opr addr, LIR_Opr cmp_value, LIR_Opr new_value,
                         LIR_Opr t1, LIR_Opr t2, LIR_Opr result) {
diff --git a/hotspot/src/share/vm/c1/c1_LIR.hpp b/hotspot/src/share/vm/c1/c1_LIR.hpp
index 79d298d4cdf..5046a76b13f 100644
--- a/hotspot/src/share/vm/c1/c1_LIR.hpp
+++ b/hotspot/src/share/vm/c1/c1_LIR.hpp
@@ -2113,7 +2113,7 @@ class LIR_List: public CompilationResourceObj {
   void   pack64(LIR_Opr src, LIR_Opr dst) { append(new LIR_Op1(lir_pack64,   src, dst, T_LONG, lir_patch_none, NULL)); }
   void unpack64(LIR_Opr src, LIR_Opr dst) { append(new LIR_Op1(lir_unpack64, src, dst, T_LONG, lir_patch_none, NULL)); }
 
-  void null_check(LIR_Opr opr, CodeEmitInfo* info)         { append(new LIR_Op1(lir_null_check, opr, info)); }
+  void null_check(LIR_Opr opr, CodeEmitInfo* info, bool deoptimize_on_null = false);
   void throw_exception(LIR_Opr exceptionPC, LIR_Opr exceptionOop, CodeEmitInfo* info) {
     append(new LIR_Op2(lir_throw, exceptionPC, exceptionOop, LIR_OprFact::illegalOpr, info));
   }
diff --git a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp
index 0c10e864e3f..47c2b79fa89 100644
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp
@@ -1752,8 +1752,10 @@ void LIRGenerator::do_StoreField(StoreField* x) {
   if (x->needs_null_check() &&
       (needs_patching ||
        MacroAssembler::needs_explicit_null_check(x->offset()))) {
-    // emit an explicit null check because the offset is too large
-    __ null_check(object.result(), new CodeEmitInfo(info));
+    // Emit an explicit null check because the offset is too large.
+    // If the class is not loaded and the object is NULL, we need to deoptimize to throw a
+    // NoClassDefFoundError in the interpreter instead of an implicit NPE from compiled code.
+    __ null_check(object.result(), new CodeEmitInfo(info), /* deoptimize */ needs_patching);
   }
 
   LIR_Address* address;
@@ -1838,8 +1840,10 @@ void LIRGenerator::do_LoadField(LoadField* x) {
       obj = new_register(T_OBJECT);
       __ move(LIR_OprFact::oopConst(NULL), obj);
     }
-    // emit an explicit null check because the offset is too large
-    __ null_check(obj, new CodeEmitInfo(info));
+    // Emit an explicit null check because the offset is too large.
+    // If the class is not loaded and the object is NULL, we need to deoptimize to throw a
+    // NoClassDefFoundError in the interpreter instead of an implicit NPE from compiled code.
+    __ null_check(obj, new CodeEmitInfo(info), /* deoptimize */ needs_patching);
   }
 
   LIR_Opr reg = rlock_result(x, field_type);
diff --git a/hotspot/test/compiler/c1/TestUnresolvedField.jasm b/hotspot/test/compiler/c1/TestUnresolvedField.jasm
new file mode 100644
index 00000000000..e6c2ae4de2b
--- /dev/null
+++ b/hotspot/test/compiler/c1/TestUnresolvedField.jasm
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+public class compiler/c1/TestUnresolvedField version 52:0 {
+    public static Method testGetField:"()V" stack 1 locals 1 {
+        aconst_null;
+        getfield Field T.f:I; // T does not exist
+        return;
+    }
+
+    public static Method testPutField:"()V" stack 2 locals 1 {
+        aconst_null;
+        iconst_0;
+        putfield Field T.f:I; // T does not exist
+        return;
+    }
+}
diff --git a/hotspot/test/compiler/c1/TestUnresolvedFieldMain.java b/hotspot/test/compiler/c1/TestUnresolvedFieldMain.java
new file mode 100644
index 00000000000..040f1b17be6
--- /dev/null
+++ b/hotspot/test/compiler/c1/TestUnresolvedFieldMain.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8173373
+ * @compile TestUnresolvedField.jasm
+ * @run main/othervm -XX:TieredStopAtLevel=1 -Xcomp
+ *                   -XX:CompileCommand=compileonly,compiler.c1.TestUnresolvedField::test*
+ *                   compiler.c1.TestUnresolvedFieldMain
+ */
+
+package compiler.c1;
+
+public class TestUnresolvedFieldMain {
+    public static void main(String[] args) {
+        try {
+          TestUnresolvedField.testGetField();
+        } catch (java.lang.NoClassDefFoundError error) {
+          // Expected
+        }
+        try {
+          TestUnresolvedField.testPutField();
+        } catch (java.lang.NoClassDefFoundError error) {
+          // Expected
+        }
+    }
+}

From c38ccc4fb0e3145fa58ca7e7320a99710efbc5d6 Mon Sep 17 00:00:00 2001
From: Brent Christian 
Date: Tue, 31 Jan 2017 11:50:42 -0800
Subject: [PATCH 043/447] 8156073: 2-slot LiveStackFrame locals (long and
 double) are incorrect

Reviewed-by: coleenp, mchung
---
 .../src/share/vm/classfile/javaClasses.cpp    |  6 ++
 .../src/share/vm/classfile/javaClasses.hpp    |  2 +
 hotspot/src/share/vm/classfile/vmSymbols.hpp  | 11 +---
 hotspot/src/share/vm/prims/stackwalk.cpp      | 66 ++++++++++---------
 hotspot/src/share/vm/prims/stackwalk.hpp      |  9 ++-
 .../runtime/LocalLong/LocalLongHelper.java    | 36 ++++------
 6 files changed, 67 insertions(+), 63 deletions(-)

diff --git a/hotspot/src/share/vm/classfile/javaClasses.cpp b/hotspot/src/share/vm/classfile/javaClasses.cpp
index b7fe590eee1..84e618a4a50 100644
--- a/hotspot/src/share/vm/classfile/javaClasses.cpp
+++ b/hotspot/src/share/vm/classfile/javaClasses.cpp
@@ -2269,6 +2269,7 @@ void java_lang_LiveStackFrameInfo::compute_offsets() {
   compute_offset(_monitors_offset,   k, vmSymbols::monitors_name(),    vmSymbols::object_array_signature());
   compute_offset(_locals_offset,     k, vmSymbols::locals_name(),      vmSymbols::object_array_signature());
   compute_offset(_operands_offset,   k, vmSymbols::operands_name(),    vmSymbols::object_array_signature());
+  compute_offset(_mode_offset,       k, vmSymbols::mode_name(),        vmSymbols::int_signature());
 }
 
 void java_lang_reflect_AccessibleObject::compute_offsets() {
@@ -3658,6 +3659,7 @@ int java_lang_StackFrameInfo::_version_offset;
 int java_lang_LiveStackFrameInfo::_monitors_offset;
 int java_lang_LiveStackFrameInfo::_locals_offset;
 int java_lang_LiveStackFrameInfo::_operands_offset;
+int java_lang_LiveStackFrameInfo::_mode_offset;
 int java_lang_AssertionStatusDirectives::classes_offset;
 int java_lang_AssertionStatusDirectives::classEnabled_offset;
 int java_lang_AssertionStatusDirectives::packages_offset;
@@ -3728,6 +3730,10 @@ void java_lang_LiveStackFrameInfo::set_operands(oop element, oop value) {
   element->obj_field_put(_operands_offset, value);
 }
 
+void java_lang_LiveStackFrameInfo::set_mode(oop element, int value) {
+  element->int_field_put(_mode_offset, value);
+}
+
 // Support for java Assertions - java_lang_AssertionStatusDirectives.
 
 void java_lang_AssertionStatusDirectives::set_classes(oop o, oop val) {
diff --git a/hotspot/src/share/vm/classfile/javaClasses.hpp b/hotspot/src/share/vm/classfile/javaClasses.hpp
index f05db4c79b7..52dfe4590ab 100644
--- a/hotspot/src/share/vm/classfile/javaClasses.hpp
+++ b/hotspot/src/share/vm/classfile/javaClasses.hpp
@@ -1380,11 +1380,13 @@ class java_lang_LiveStackFrameInfo: AllStatic {
   static int _monitors_offset;
   static int _locals_offset;
   static int _operands_offset;
+  static int _mode_offset;
 
  public:
   static void set_monitors(oop info, oop value);
   static void set_locals(oop info, oop value);
   static void set_operands(oop info, oop value);
+  static void set_mode(oop info, int value);
 
   static void compute_offsets();
 
diff --git a/hotspot/src/share/vm/classfile/vmSymbols.hpp b/hotspot/src/share/vm/classfile/vmSymbols.hpp
index 3e902d9f18e..e6a8904901e 100644
--- a/hotspot/src/share/vm/classfile/vmSymbols.hpp
+++ b/hotspot/src/share/vm/classfile/vmSymbols.hpp
@@ -325,14 +325,8 @@
   template(java_lang_StackStreamFactory_AbstractStackWalker, "java/lang/StackStreamFactory$AbstractStackWalker") \
   template(doStackWalk_signature,                     "(JIIII)Ljava/lang/Object;")                \
   template(asPrimitive_name,                          "asPrimitive")                              \
-  template(asPrimitive_int_signature,                 "(I)Ljava/lang/LiveStackFrame$PrimitiveValue;") \
-  template(asPrimitive_long_signature,                "(J)Ljava/lang/LiveStackFrame$PrimitiveValue;") \
-  template(asPrimitive_short_signature,               "(S)Ljava/lang/LiveStackFrame$PrimitiveValue;") \
-  template(asPrimitive_byte_signature,                "(B)Ljava/lang/LiveStackFrame$PrimitiveValue;") \
-  template(asPrimitive_char_signature,                "(C)Ljava/lang/LiveStackFrame$PrimitiveValue;") \
-  template(asPrimitive_float_signature,               "(F)Ljava/lang/LiveStackFrame$PrimitiveValue;") \
-  template(asPrimitive_double_signature,              "(D)Ljava/lang/LiveStackFrame$PrimitiveValue;") \
-  template(asPrimitive_boolean_signature,             "(Z)Ljava/lang/LiveStackFrame$PrimitiveValue;") \
+  template(asPrimitive_int_signature,                 "(I)Ljava/lang/LiveStackFrame$PrimitiveSlot;") \
+  template(asPrimitive_long_signature,                "(J)Ljava/lang/LiveStackFrame$PrimitiveSlot;") \
                                                                                                   \
   /* common method and field names */                                                             \
   template(object_initializer_name,                   "")                                   \
@@ -444,6 +438,7 @@
   template(monitors_name,                             "monitors")                                 \
   template(locals_name,                               "locals")                                   \
   template(operands_name,                             "operands")                                 \
+  template(mode_name,                                 "mode")                                     \
   template(oop_size_name,                             "oop_size")                                 \
   template(static_oop_field_count_name,               "static_oop_field_count")                   \
   template(protection_domain_name,                    "protection_domain")                        \
diff --git a/hotspot/src/share/vm/prims/stackwalk.cpp b/hotspot/src/share/vm/prims/stackwalk.cpp
index e130127318a..9e3fc9a8464 100644
--- a/hotspot/src/share/vm/prims/stackwalk.cpp
+++ b/hotspot/src/share/vm/prims/stackwalk.cpp
@@ -173,7 +173,11 @@ void JavaFrameStream::fill_frame(int index, objArrayHandle  frames_array,
   }
 }
 
-oop LiveFrameStream::create_primitive_value_instance(StackValueCollection* values, int i, TRAPS) {
+// Create and return a LiveStackFrame.PrimitiveSlot (if needed) for the
+// StackValue at the given index. 'type' is expected to be T_INT, T_LONG,
+// T_OBJECT, or T_CONFLICT.
+oop LiveFrameStream::create_primitive_slot_instance(StackValueCollection* values,
+                                                    int i, BasicType type, TRAPS) {
   Klass* k = SystemDictionary::resolve_or_null(vmSymbols::java_lang_LiveStackFrameInfo(), CHECK_NULL);
   instanceKlassHandle ik (THREAD, k);
 
@@ -182,8 +186,8 @@ oop LiveFrameStream::create_primitive_value_instance(StackValueCollection* value
   Symbol* signature = NULL;
 
   // ## TODO: type is only available in LocalVariable table, if present.
-  // ## StackValue type is T_INT or T_OBJECT.
-  switch (values->at(i)->type()) {
+  // ## StackValue type is T_INT or T_OBJECT (or converted to T_LONG on 64-bit)
+  switch (type) {
     case T_INT:
       args.push_int(values->int_at(i));
       signature = vmSymbols::asPrimitive_int_signature();
@@ -195,42 +199,26 @@ oop LiveFrameStream::create_primitive_value_instance(StackValueCollection* value
       break;
 
     case T_FLOAT:
-      args.push_float(values->float_at(i));
-      signature = vmSymbols::asPrimitive_float_signature();
-      break;
-
     case T_DOUBLE:
-      args.push_double(values->double_at(i));
-      signature = vmSymbols::asPrimitive_double_signature();
-      break;
-
     case T_BYTE:
-      args.push_int(values->int_at(i));
-      signature = vmSymbols::asPrimitive_byte_signature();
-      break;
-
     case T_SHORT:
-      args.push_int(values->int_at(i));
-      signature = vmSymbols::asPrimitive_short_signature();
-      break;
-
     case T_CHAR:
-      args.push_int(values->int_at(i));
-      signature = vmSymbols::asPrimitive_char_signature();
-      break;
-
     case T_BOOLEAN:
-      args.push_int(values->int_at(i));
-      signature = vmSymbols::asPrimitive_boolean_signature();
-      break;
+      THROW_MSG_(vmSymbols::java_lang_InternalError(), "Unexpected StackValue type", NULL);
 
     case T_OBJECT:
       return values->obj_at(i)();
 
     case T_CONFLICT:
       // put a non-null slot
-      args.push_int(0);
-      signature = vmSymbols::asPrimitive_int_signature();
+      #ifdef _LP64
+        args.push_long(0);
+        signature = vmSymbols::asPrimitive_long_signature();
+      #else
+        args.push_int(0);
+        signature = vmSymbols::asPrimitive_int_signature();
+      #endif
+
       break;
 
     default: ShouldNotReachHere();
@@ -252,9 +240,19 @@ objArrayHandle LiveFrameStream::values_to_object_array(StackValueCollection* val
   objArrayHandle array_h(THREAD, array_oop);
   for (int i = 0; i < values->size(); i++) {
     StackValue* st = values->at(i);
-    oop obj = create_primitive_value_instance(values, i, CHECK_(empty));
-    if (obj != NULL)
+    BasicType type = st->type();
+    int index = i;
+#ifdef _LP64
+    if (type != T_OBJECT && type != T_CONFLICT) {
+        intptr_t ret = st->get_int(); // read full 64-bit slot
+        type = T_LONG;                // treat as long
+        index--;                      // undo +1 in StackValueCollection::long_at
+    }
+#endif
+    oop obj = create_primitive_slot_instance(values, index, type, CHECK_(empty));
+    if (obj != NULL) {
       array_h->obj_at_put(i, obj);
+    }
   }
   return array_h;
 }
@@ -286,6 +284,13 @@ void LiveFrameStream::fill_live_stackframe(Handle stackFrame,
     StackValueCollection* expressions = _jvf->expressions();
     GrowableArray* monitors = _jvf->monitors();
 
+    int mode = 0;
+    if (_jvf->is_interpreted_frame()) {
+      mode = MODE_INTERPRETED;
+    } else if (_jvf->is_compiled_frame()) {
+      mode = MODE_COMPILED;
+    }
+
     if (!locals->is_empty()) {
       objArrayHandle locals_h = values_to_object_array(locals, CHECK);
       java_lang_LiveStackFrameInfo::set_locals(stackFrame(), locals_h());
@@ -298,6 +303,7 @@ void LiveFrameStream::fill_live_stackframe(Handle stackFrame,
       objArrayHandle monitors_h = monitors_to_object_array(monitors, CHECK);
       java_lang_LiveStackFrameInfo::set_monitors(stackFrame(), monitors_h());
     }
+    java_lang_LiveStackFrameInfo::set_mode(stackFrame(), mode);
   }
 }
 
diff --git a/hotspot/src/share/vm/prims/stackwalk.hpp b/hotspot/src/share/vm/prims/stackwalk.hpp
index 161a74599c3..a0c4bede64a 100644
--- a/hotspot/src/share/vm/prims/stackwalk.hpp
+++ b/hotspot/src/share/vm/prims/stackwalk.hpp
@@ -92,11 +92,16 @@ public:
 
 class LiveFrameStream : public BaseFrameStream {
 private:
+  enum {
+    MODE_INTERPRETED = 0x01,
+    MODE_COMPILED    = 0x02
+  };
+
   javaVFrame*           _jvf;
 
   void fill_live_stackframe(Handle stackFrame, const methodHandle& method, TRAPS);
-  static oop create_primitive_value_instance(StackValueCollection* values,
-                                             int i, TRAPS);
+  static oop create_primitive_slot_instance(StackValueCollection* values,
+                                            int i, BasicType type, TRAPS);
   static objArrayHandle monitors_to_object_array(GrowableArray* monitors,
                                                  TRAPS);
   static objArrayHandle values_to_object_array(StackValueCollection* values, TRAPS);
diff --git a/hotspot/test/runtime/LocalLong/LocalLongHelper.java b/hotspot/test/runtime/LocalLong/LocalLongHelper.java
index 2134aee069e..065d7d8cbcb 100644
--- a/hotspot/test/runtime/LocalLong/LocalLongHelper.java
+++ b/hotspot/test/runtime/LocalLong/LocalLongHelper.java
@@ -30,10 +30,10 @@ import java.lang.StackWalker.StackFrame;
 
 public class LocalLongHelper {
     static StackWalker sw;
-    static Method intValue;
+    static Method longValue;
     static Method getLocals;
     static Class primitiveValueClass;
-    static Method primitiveType;
+    static Method primitiveSize;
     static Method getMethodType;
     static Field memberName;
     static Field offset;
@@ -43,27 +43,29 @@ public class LocalLongHelper {
         new LocalLongHelper().longArg(0xC0FFEE, 0x1234567890ABCDEFL);
     }
 
-    // locals[2] contains the high byte of the long argument.
+    // locals[2] contains the unused slot of the long argument.
     public long longArg(int i, long l) throws Throwable {
         List frames = sw.walk(s -> s.collect(Collectors.toList()));
         Object[] locals = (Object[]) getLocals.invoke(frames.get(0));
 
-        int locals_2 = (int) intValue.invoke(locals[2]);
-        if (locals_2 != 0){
-            throw new RuntimeException("Expected locals_2 == 0");
+        if (8 == (int) primitiveSize.invoke(locals[2])) { // Only test 64-bit
+            long locals_2 = (long) longValue.invoke(locals[2]);
+            if (locals_2 != 0){
+                throw new RuntimeException("Expected locals_2 == 0");
+            }
         }
         return l; // Don't want l to become a dead var
     }
 
     private static void setupReflectionStatics() throws Throwable {
         Class liveStackFrameClass = Class.forName("java.lang.LiveStackFrame");
-        primitiveValueClass = Class.forName("java.lang.LiveStackFrame$PrimitiveValue");
+        primitiveValueClass = Class.forName("java.lang.LiveStackFrame$PrimitiveSlot");
 
         getLocals = liveStackFrameClass.getDeclaredMethod("getLocals");
         getLocals.setAccessible(true);
 
-        intValue = primitiveValueClass.getDeclaredMethod("intValue");
-        intValue.setAccessible(true);
+        longValue = primitiveValueClass.getDeclaredMethod("longValue");
+        longValue.setAccessible(true);
 
         Class stackFrameInfoClass = Class.forName("java.lang.StackFrameInfo");
         memberName = stackFrameInfoClass.getDeclaredField("memberName");
@@ -80,20 +82,8 @@ public class LocalLongHelper {
         f.setAccessible(true);
         Object localsAndOperandsOption = f.get(null);
 
-        primitiveType = primitiveValueClass.getDeclaredMethod("type");
-        primitiveType.setAccessible(true);
-
+        primitiveSize = primitiveValueClass.getDeclaredMethod("size");
+        primitiveSize.setAccessible(true);
         sw = (StackWalker) ewsNI.invoke(null, java.util.Collections.emptySet(), localsAndOperandsOption);
     }
-
-    private static String type(Object o) throws Throwable {
-        if (primitiveValueClass.isInstance(o)) {
-            final char c = (char) primitiveType.invoke(o);
-            return String.valueOf(c);
-        } else if (o != null) {
-            return o.getClass().getName();
-        } else {
-            return "null";
-        }
-    }
 }

From 2132715a305d32de93bf055609ca1fd317fd3406 Mon Sep 17 00:00:00 2001
From: "Daniel D. Daugherty" 
Date: Tue, 31 Jan 2017 14:33:36 -0800
Subject: [PATCH 044/447] 8173693: disable post_class_unload() for non
 JavaThread initiators

Reviewed-by: sspitsyn, gthornbr
---
 hotspot/src/share/vm/prims/jvmtiExport.cpp | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/hotspot/src/share/vm/prims/jvmtiExport.cpp b/hotspot/src/share/vm/prims/jvmtiExport.cpp
index 52350da0cde..ad7984c4a8f 100644
--- a/hotspot/src/share/vm/prims/jvmtiExport.cpp
+++ b/hotspot/src/share/vm/prims/jvmtiExport.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1230,8 +1230,12 @@ void JvmtiExport::post_class_unload(Klass* klass) {
     assert(thread->is_VM_thread(), "wrong thread");
 
     // get JavaThread for whom we are proxy
-    JavaThread *real_thread =
-        (JavaThread *)((VMThread *)thread)->vm_operation()->calling_thread();
+    Thread *calling_thread = ((VMThread *)thread)->vm_operation()->calling_thread();
+    if (!calling_thread->is_Java_thread()) {
+      // cannot post an event to a non-JavaThread
+      return;
+    }
+    JavaThread *real_thread = (JavaThread *)calling_thread;
 
     JvmtiEnvIterator it;
     for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {

From 48341996cf7b2eb32cc21eaf0885c75d4c1dbc05 Mon Sep 17 00:00:00 2001
From: Tom Rodriguez 
Date: Mon, 30 Jan 2017 17:29:48 -0800
Subject: [PATCH 045/447] 8173227: [JVMCI]
 HotSpotJVMCIMetaAccessContext.fromClass is inefficient

Reviewed-by: dnsimon
---
 .../HotSpotJVMCIMetaAccessContext.java        | 31 +++++++++++++------
 1 file changed, 21 insertions(+), 10 deletions(-)

diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIMetaAccessContext.java b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIMetaAccessContext.java
index 529a561eb5e..cf5ef10ccf2 100644
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIMetaAccessContext.java
+++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIMetaAccessContext.java
@@ -27,8 +27,6 @@ import java.lang.ref.ReferenceQueue;
 import java.lang.ref.WeakReference;
 import java.util.Arrays;
 import java.util.Iterator;
-import java.util.Map;
-import java.util.WeakHashMap;
 
 import jdk.vm.ci.meta.JavaKind;
 import jdk.vm.ci.meta.ResolvedJavaType;
@@ -147,21 +145,34 @@ public class HotSpotJVMCIMetaAccessContext {
         }
     }
 
-    private final Map, WeakReference> typeMap = new WeakHashMap<>();
+    private final ClassValue> resolvedJavaType = new ClassValue>() {
+        @Override
+        protected WeakReference computeValue(Class type) {
+            return new WeakReference<>(createClass(type));
+        }
+    };
 
     /**
      * Gets the JVMCI mirror for a {@link Class} object.
      *
      * @return the {@link ResolvedJavaType} corresponding to {@code javaClass}
      */
-    public synchronized ResolvedJavaType fromClass(Class javaClass) {
-        WeakReference typeRef = typeMap.get(javaClass);
-        ResolvedJavaType type = typeRef != null ? typeRef.get() : null;
-        if (type == null) {
-            type = createClass(javaClass);
-            typeMap.put(javaClass, new WeakReference<>(type));
+    public ResolvedJavaType fromClass(Class javaClass) {
+        ResolvedJavaType javaType = null;
+        while (javaType == null) {
+            WeakReference type = resolvedJavaType.get(javaClass);
+            javaType = type.get();
+            if (javaType == null) {
+                /*
+                 * If the referent has become null, clear out the current value
+                 * and let computeValue above create a new value.  Reload the
+                 * value in a loop because in theory the WeakReference referent
+                 * can be reclaimed at any point.
+                 */
+                resolvedJavaType.remove(javaClass);
+            }
         }
-        return type;
+        return javaType;
     }
 
     /**

From ef7192a7b85aaf11c0ad3b9c6a41262da1a6bcc6 Mon Sep 17 00:00:00 2001
From: Sergey Bylokhov 
Date: Tue, 31 Jan 2017 19:22:35 +0300
Subject: [PATCH 046/447] 8143077: Deprecate InputEvent._MASK in favor of
 InputEvent._DOWN_MASK

Reviewed-by: prr, alexsch, azvegint, mchung, egahlin
---
 .../com/apple/laf/AquaComboBoxPopup.java      |  8 ++-
 .../laf/AquaInternalFrameDockIconUI.java      |  2 +
 .../com/apple/laf/AquaInternalFrameUI.java    | 10 ++-
 .../com/apple/laf/AquaMenuPainter.java        |  6 +-
 .../laf/AquaTabbedPaneCopyFromBasicUI.java    |  1 +
 .../classes/sun/lwawt/LWComponentPeer.java    |  1 +
 .../macosx/classes/sun/lwawt/LWListPeer.java  |  2 +
 .../lwawt/macosx/CDragSourceContextPeer.java  |  1 +
 .../classes/sun/lwawt/macosx/CMenuItem.java   |  2 +-
 .../classes/sun/lwawt/macosx/CPopupMenu.java  |  1 +
 .../sun/lwawt/macosx/CPrinterDialogPeer.java  |  1 +
 .../classes/sun/lwawt/macosx/LWCToolkit.java  |  3 +
 .../swing/plaf/motif/MotifDesktopIconUI.java  |  4 +-
 .../swing/plaf/motif/MotifGraphicsUtils.java  |  3 +-
 .../motif/MotifInternalFrameTitlePane.java    |  2 +-
 .../swing/plaf/motif/MotifLookAndFeel.java    |  6 +-
 .../swing/plaf/motif/MotifPopupMenuUI.java    |  1 +
 .../java/swing/plaf/motif/MotifTextUI.java    |  1 +
 .../plaf/windows/WindowsTabbedPaneUI.java     |  1 +
 .../share/classes/java/awt/AWTEvent.java      |  5 ++
 .../share/classes/java/awt/AWTKeyStroke.java  |  4 ++
 .../share/classes/java/awt/Component.java     |  1 +
 .../share/classes/java/awt/Container.java     |  2 +
 .../share/classes/java/awt/Event.java         |  8 ++-
 .../java/awt/KeyboardFocusManager.java        |  1 +
 .../share/classes/java/awt/MenuBar.java       |  1 +
 .../share/classes/java/awt/MenuComponent.java |  1 +
 .../share/classes/java/awt/MenuItem.java      |  1 +
 .../share/classes/java/awt/MenuShortcut.java  |  1 +
 .../share/classes/java/awt/PopupMenu.java     |  1 +
 .../share/classes/java/awt/Robot.java         |  1 +
 .../share/classes/java/awt/Toolkit.java       |  1 +
 .../java/awt/dnd/DragSourceDragEvent.java     |  2 +
 .../classes/java/awt/event/ActionEvent.java   | 10 +--
 .../classes/java/awt/event/InputEvent.java    | 61 ++++++++++++++-----
 .../classes/java/awt/event/KeyEvent.java      |  8 +++
 .../classes/java/awt/event/MouseEvent.java    |  6 ++
 .../classes/java/awt/peer/PopupMenuPeer.java  |  1 +
 .../classes/javax/swing/Autoscroller.java     |  2 +
 .../javax/swing/DefaultButtonModel.java       |  1 +
 .../share/classes/javax/swing/JComboBox.java  |  1 +
 .../share/classes/javax/swing/JComponent.java |  3 +
 .../classes/javax/swing/JFileChooser.java     |  1 +
 .../share/classes/javax/swing/JList.java      |  1 +
 .../share/classes/javax/swing/JMenuItem.java  |  2 +
 .../share/classes/javax/swing/JPopupMenu.java |  1 +
 .../share/classes/javax/swing/JTable.java     |  4 +-
 .../share/classes/javax/swing/JTextField.java |  1 +
 .../classes/javax/swing/JToggleButton.java    |  1 +
 .../share/classes/javax/swing/JTree.java      |  5 +-
 .../classes/javax/swing/KeyboardManager.java  |  1 +
 .../javax/swing/MenuSelectionManager.java     |  1 +
 .../classes/javax/swing/SwingUtilities.java   |  1 +
 .../classes/javax/swing/ToolTipManager.java   |  1 +
 .../swing/plaf/basic/BasicComboBoxUI.java     |  1 +
 .../swing/plaf/basic/BasicComboPopup.java     |  2 +
 .../swing/plaf/basic/BasicGraphicsUtils.java  |  1 +
 .../plaf/basic/BasicInternalFrameUI.java      |  2 +-
 .../swing/plaf/basic/BasicMenuItemUI.java     |  2 +
 .../javax/swing/plaf/basic/BasicMenuUI.java   |  1 +
 .../swing/plaf/basic/BasicPopupMenuUI.java    |  1 +
 .../swing/plaf/basic/BasicSplitPaneUI.java    |  1 +
 .../javax/swing/plaf/basic/BasicTableUI.java  |  1 +
 .../javax/swing/plaf/basic/BasicTextUI.java   |  2 +-
 .../swing/plaf/metal/MetalRootPaneUI.java     |  1 +
 .../swing/plaf/metal/MetalToolTipUI.java      |  1 +
 .../swing/plaf/synth/SynthSplitPaneUI.java    |  1 +
 .../javax/swing/table/JTableHeader.java       |  1 +
 .../javax/swing/text/DefaultCaret.java        |  3 +
 .../javax/swing/text/JTextComponent.java      |  1 +
 .../classes/sun/awt/NullComponentPeer.java    |  1 +
 .../share/classes/sun/awt/SunToolkit.java     |  2 +
 .../share/classes/sun/swing/FilePane.java     |  1 +
 .../sun/swing/MenuItemLayoutHelper.java       |  1 +
 .../classes/sun/swing/SwingUtilities2.java    |  3 +-
 .../unix/classes/sun/awt/X11/InfoWindow.java  |  2 +-
 .../unix/classes/sun/awt/X11/ListHelper.java  |  2 +-
 .../classes/sun/awt/X11/XBaseMenuWindow.java  |  8 ++-
 .../unix/classes/sun/awt/X11/XButtonPeer.java |  8 ++-
 .../unix/classes/sun/awt/X11/XChoicePeer.java |  2 +-
 .../sun/awt/X11/XEmbedServerTester.java       |  4 ++
 .../unix/classes/sun/awt/X11/XListPeer.java   |  6 +-
 .../classes/sun/awt/X11/XMenuBarPeer.java     |  1 +
 .../classes/sun/awt/X11/XPopupMenuPeer.java   |  1 +
 .../classes/sun/awt/X11/XScrollPanePeer.java  |  1 +
 .../unix/classes/sun/awt/X11/XScrollbar.java  |  1 +
 .../classes/sun/awt/X11/XScrollbarPeer.java   |  1 +
 .../classes/sun/awt/X11/XTextAreaPeer.java    |  1 +
 .../classes/sun/awt/X11/XTrayIconPeer.java    |  1 +
 .../unix/classes/sun/awt/X11/XWindow.java     |  2 +-
 .../classes/sun/awt/windows/WButtonPeer.java  |  1 +
 .../sun/awt/windows/WFileDialogPeer.java      |  1 +
 .../sun/awt/windows/WPopupMenuPeer.java       |  3 +
 .../sun/awt/windows/WPrintDialogPeer.java     |  1 +
 .../sun/awt/windows/WTextFieldPeer.java       |  1 +
 .../classes/sun/tools/jconsole/JConsole.java  |  8 +--
 .../classes/sun/tools/jconsole/VMPanel.java   |  4 +-
 .../sun/tools/jconsole/inspector/Utils.java   |  2 +-
 98 files changed, 233 insertions(+), 58 deletions(-)

diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxPopup.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxPopup.java
index 88faf6b06e8..8ec0d0ec9dc 100644
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxPopup.java
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxPopup.java
@@ -154,9 +154,15 @@ class AquaComboBoxPopup extends BasicComboPopup {
     protected JList createList() {
         return new JList(comboBox.getModel()) {
             @Override
+            @SuppressWarnings("deprecation")
             public void processMouseEvent(MouseEvent e) {
                 if (e.isMetaDown()) {
-                    e = new MouseEvent((Component)e.getSource(), e.getID(), e.getWhen(), e.getModifiers() ^ InputEvent.META_MASK, e.getX(), e.getY(), e.getXOnScreen(), e.getYOnScreen(), e.getClickCount(), e.isPopupTrigger(), MouseEvent.NOBUTTON);
+                    e = new MouseEvent((Component) e.getSource(), e.getID(),
+                                       e.getWhen(),
+                                       e.getModifiers() ^ InputEvent.META_MASK,
+                                       e.getX(), e.getY(), e.getXOnScreen(),
+                                       e.getYOnScreen(), e.getClickCount(),
+                                       e.isPopupTrigger(), MouseEvent.NOBUTTON);
                 }
                 super.processMouseEvent(e);
             }
diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java
index af2aaf05ed6..3a40c49ae3f 100644
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java
@@ -137,6 +137,7 @@ public final class AquaInternalFrameDockIconUI extends DesktopIconUI
     }
 
     @Override
+    @SuppressWarnings("deprecation")
     public void mouseEntered(final MouseEvent e) {
         if ((e.getModifiers() & InputEvent.BUTTON1_MASK) != 0) return;
         String title = fFrame.getTitle();
@@ -146,6 +147,7 @@ public final class AquaInternalFrameDockIconUI extends DesktopIconUI
     }
 
     @Override
+    @SuppressWarnings("deprecation")
     public void mouseExited(final MouseEvent e) {
         if (fDockLabel != null && (e.getModifiers() & InputEvent.BUTTON1_MASK) == 0) fDockLabel.hide();
     }
diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameUI.java
index fd6bccf2260..6cd82b55045 100644
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameUI.java
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameUI.java
@@ -555,6 +555,7 @@ public class AquaInternalFrameUI extends BasicInternalFrameUI implements SwingCo
         }
 
         @Override
+        @SuppressWarnings("deprecation")
         public void mouseDragged(final MouseEvent e) {
 // do not forward drags
 //            if (didForwardEvent(e)) return;
@@ -621,7 +622,7 @@ public class AquaInternalFrameUI extends BasicInternalFrameUI implements SwingCo
 
             return didForwardEvent;
         }
-
+        @SuppressWarnings("deprecation")
         boolean didForwardEventInternal(final MouseEvent e) {
             if (fDraggingFrame) return false;
 
@@ -927,11 +928,15 @@ public class AquaInternalFrameUI extends BasicInternalFrameUI implements SwingCo
             return (w - x) + (h - y) < 12;
         }
 
+        @SuppressWarnings("deprecation")
         void forwardEventToFrame(final MouseEvent e) {
             final Point pt = new Point();
             final Component c = getComponentToForwardTo(e, pt);
             if (c == null) return;
-            c.dispatchEvent(new MouseEvent(c, e.getID(), e.getWhen(), e.getModifiers(), pt.x, pt.y, e.getClickCount(), e.isPopupTrigger(), e.getButton()));
+            c.dispatchEvent(
+                    new MouseEvent(c, e.getID(), e.getWhen(), e.getModifiers(),
+                                   pt.x, pt.y, e.getClickCount(),
+                                   e.isPopupTrigger(), e.getButton()));
         }
 
         Component getComponentToForwardTo(final MouseEvent e, final Point dst) {
@@ -993,6 +998,7 @@ public class AquaInternalFrameUI extends BasicInternalFrameUI implements SwingCo
         public void mouseMoved(final MouseEvent e) { }
 
         @Override
+        @SuppressWarnings("deprecation")
         public void mouseWheelMoved(final MouseWheelEvent e) {
             final Point pt = new Point();
             final Component c = getComponentToForwardTo(e, pt);
diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuPainter.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuPainter.java
index 53feb4184be..f94e4e6c435 100644
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuPainter.java
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuPainter.java
@@ -74,7 +74,10 @@ public class AquaMenuPainter {
         kUCapsLockGlyph = 0x21EA;
 
     static final int ALT_GRAPH_MASK = 1 << 5; // New to Java2
-    static final int sUnsupportedModifiersMask = ~(InputEvent.CTRL_MASK | InputEvent.ALT_MASK | InputEvent.SHIFT_MASK | InputEvent.META_MASK | ALT_GRAPH_MASK);
+    @SuppressWarnings("deprecation")
+    static final int sUnsupportedModifiersMask =
+            ~(InputEvent.CTRL_MASK | InputEvent.ALT_MASK | InputEvent.SHIFT_MASK
+                    | InputEvent.META_MASK | ALT_GRAPH_MASK);
 
     interface Client {
         public void paintBackground(Graphics g, JComponent c, int menuWidth, int menuHeight);
@@ -86,6 +89,7 @@ public class AquaMenuPainter {
     }
 
     // Return a string with the proper modifier glyphs
+    @SuppressWarnings("deprecation")
     private static String getKeyModifiersUnicode(final int modifiers, final boolean isLeftToRight) {
         final StringBuilder buf = new StringBuilder(2);
         // Order (from StandardMenuDef.c): control, option(alt), shift, cmd
diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java
index ad78bc26ca3..b2d61560d20 100644
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java
@@ -515,6 +515,7 @@ public class AquaTabbedPaneCopyFromBasicUI extends TabbedPaneUI implements Swing
     /**
      * Adds the specified mnemonic at the specified index.
      */
+    @SuppressWarnings("deprecation")
     private void addMnemonic(final int index, final int mnemonic) {
         if (mnemonicToIndexMap == null) {
             initMnemonics();
diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWComponentPeer.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWComponentPeer.java
index a024da398b5..e43c4db68a0 100644
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWComponentPeer.java
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWComponentPeer.java
@@ -1224,6 +1224,7 @@ public abstract class LWComponentPeer
      * Changes the target of the AWTEvent from awt component to appropriate
      * swing delegate.
      */
+    @SuppressWarnings("deprecation")
     private AWTEvent createDelegateEvent(final AWTEvent e) {
         // TODO modifiers should be changed to getModifiers()|getModifiersEx()?
         AWTEvent delegateEvent = null;
diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWListPeer.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWListPeer.java
index e6e1ec38c3d..f9d7db6c862 100644
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWListPeer.java
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWListPeer.java
@@ -302,6 +302,7 @@ final class LWListPeer extends LWComponentPeer
             }
 
             @Override
+            @SuppressWarnings("deprecation")
             protected void processMouseEvent(final MouseEvent e) {
                 super.processMouseEvent(e);
                 if (e.getID() == MouseEvent.MOUSE_CLICKED && e.getClickCount() == 2) {
@@ -314,6 +315,7 @@ final class LWListPeer extends LWComponentPeer
             }
 
             @Override
+            @SuppressWarnings("deprecation")
             protected void processKeyEvent(final KeyEvent e) {
                 super.processKeyEvent(e);
                 if (e.getID() == KeyEvent.KEY_PRESSED && e.getKeyCode() == KeyEvent.VK_ENTER) {
diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDragSourceContextPeer.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDragSourceContextPeer.java
index 6a0f49a92b1..2d3ce3e9a10 100644
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDragSourceContextPeer.java
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDragSourceContextPeer.java
@@ -93,6 +93,7 @@ public final class CDragSourceContextPeer extends SunDragSourceContextPeer {
         InputEvent         triggerEvent = trigger.getTriggerEvent();
 
         Point dragOrigin = new Point(trigger.getDragOrigin());
+        @SuppressWarnings("deprecation")
         int extModifiers = (triggerEvent.getModifiers() | triggerEvent.getModifiersEx());
         long timestamp   = triggerEvent.getWhen();
         int clickCount   = ((triggerEvent instanceof MouseEvent) ? (((MouseEvent) triggerEvent).getClickCount()) : 1);
diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CMenuItem.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CMenuItem.java
index 0230c4e842f..a0d4e8f2b77 100644
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CMenuItem.java
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CMenuItem.java
@@ -63,7 +63,7 @@ public class CMenuItem extends CMenuComponent implements MenuItemPeer {
         CMenuComponent parent = (CMenuComponent)LWToolkit.targetToPeer(getTarget().getParent());
         return parent.executeGet(ptr->nativeCreate(ptr, isSeparator()));
     }
-
+    @SuppressWarnings("deprecation")
     public void setLabel(String label, char keyChar, int keyCode, int modifiers) {
         int keyMask = modifiers;
         if (keyCode == KeyEvent.VK_UNDEFINED) {
diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPopupMenu.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPopupMenu.java
index b73f67a0f79..95f83055cbc 100644
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPopupMenu.java
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPopupMenu.java
@@ -46,6 +46,7 @@ final class CPopupMenu extends CMenu implements PopupMenuPeer {
     private native long nativeShowPopupMenu(long modelPtr, int x, int y);
 
     @Override
+    @SuppressWarnings("deprecation")
     public void show(Event e) {
         Component origin = (Component)e.target;
         if (origin != null) {
diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterDialogPeer.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterDialogPeer.java
index cb1ee148707..1e492b9103c 100644
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterDialogPeer.java
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterDialogPeer.java
@@ -68,6 +68,7 @@ public class CPrinterDialogPeer extends LWWindowPeer {
     public void setResizable(boolean resizable) {}
     public void setEnabled(boolean enable) {}
     public void setBounds(int x, int y, int width, int height) {}
+    @SuppressWarnings("deprecation")
     public boolean handleEvent(Event e) { return false; }
     public void setForeground(Color c) {}
     public void setBackground(Color c) {}
diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java
index 9c463003a93..ff118685dbc 100644
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java
@@ -532,6 +532,7 @@ public final class LWCToolkit extends LWToolkit {
      * @since     1.1
      */
     @Override
+    @SuppressWarnings("deprecation")
     public int getMenuShortcutKeyMask() {
         return Event.META_MASK;
     }
@@ -768,6 +769,7 @@ public final class LWCToolkit extends LWToolkit {
      * stroke.
      */
     @Override
+    @SuppressWarnings("deprecation")
     public int getFocusAcceleratorKeyMask() {
         return InputEvent.CTRL_MASK | InputEvent.ALT_MASK;
     }
@@ -777,6 +779,7 @@ public final class LWCToolkit extends LWToolkit {
      * printable character.
      */
     @Override
+    @SuppressWarnings("deprecation")
     public boolean isPrintableCharacterModifiersMask(int mods) {
         return ((mods & (InputEvent.META_MASK | InputEvent.CTRL_MASK)) == 0);
     }
diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java
index 16f56e2f9c9..f4d6c8e5146 100644
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java
@@ -236,7 +236,7 @@ public class MotifDesktopIconUI extends BasicDesktopIconUI
                 }
             });
         }
-
+        @SuppressWarnings("deprecation")
         void forwardEventToParent(MouseEvent e) {
             getParent().dispatchEvent(new MouseEvent(
                 getParent(), e.getID(), e.getWhen(), e.getModifiers(),
@@ -329,7 +329,7 @@ public class MotifDesktopIconUI extends BasicDesktopIconUI
                 }
             });
         }
-
+        @SuppressWarnings("deprecation")
         void forwardEventToParent(MouseEvent e) {
             getParent().dispatchEvent(new MouseEvent(
                 getParent(), e.getID(), e.getWhen(), e.getModifiers(),
diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifGraphicsUtils.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifGraphicsUtils.java
index 47bed21ffb8..3748c529909 100644
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifGraphicsUtils.java
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifGraphicsUtils.java
@@ -139,10 +139,11 @@ public class MotifGraphicsUtils implements SwingConstants
     }
 
   /**
-   * This method is not being used to paint menu item since
+   * @deprecated This method is not being used to paint menu item since
    * 6.0 This code left for compatibility only. Do not use or
    * override it, this will not cause any visible effect.
    */
+  @Deprecated(since = "9")
   public static void paintMenuItem(Graphics g, JComponent c,
                                    Icon checkIcon, Icon arrowIcon,
                                    Color background, Color foreground,
diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java
index 3d38e3b4b71..a12485928f5 100644
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java
@@ -361,7 +361,7 @@ public class MotifInternalFrameTitlePane
                 }
             });
         }
-
+        @SuppressWarnings("deprecation")
         void forwardEventToParent(MouseEvent e) {
             getParent().dispatchEvent(new MouseEvent(
                 getParent(), e.getID(), e.getWhen(), e.getModifiers(),
diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java
index 7c8fd8a7bca..dc459e81be5 100644
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java
@@ -523,7 +523,8 @@ public class MotifLookAndFeel extends BasicLookAndFeel
 
         Object optionPaneMessageAreaBorder = new BorderUIResource.EmptyBorderUIResource(10,10,12,10);
 
-
+        @SuppressWarnings("deprecation")
+        final int metaMask = KeyEvent.META_MASK;
         Object[] defaults = {
 
             "Desktop.background", table.get("desktop"),
@@ -635,8 +636,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
             "Menu.submenuPopupOffsetX", -2,
             "Menu.submenuPopupOffsetY", 3,
             "Menu.shortcutKeys", new int[]{
-                SwingUtilities2.getSystemMnemonicKeyMask(),
-                KeyEvent.META_MASK
+                SwingUtilities2.getSystemMnemonicKeyMask(), metaMask
             },
             "Menu.cancelMode", "hideMenuTree",
 
diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifPopupMenuUI.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifPopupMenuUI.java
index 402bcc528b1..a0b182b8019 100644
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifPopupMenuUI.java
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifPopupMenuUI.java
@@ -107,6 +107,7 @@ public class MotifPopupMenuUI extends BasicPopupMenuUI {
         };
     }
 
+    @SuppressWarnings("deprecation")
     public boolean isPopupTrigger(MouseEvent e) {
         return ((e.getID()==MouseEvent.MOUSE_PRESSED)
                 && ((e.getModifiers() & MouseEvent.BUTTON3_MASK)!=0));
diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifTextUI.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifTextUI.java
index 208a96840f6..a2a85e9cbff 100644
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifTextUI.java
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifTextUI.java
@@ -155,6 +155,7 @@ public class MotifTextUI {
     /**
      * Default bindings all keymaps implementing the Motif feel.
      */
+    @SuppressWarnings("deprecation")
     static final JTextComponent.KeyBinding[] defaultBindings = {
         new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_INSERT,
                                                                     InputEvent.CTRL_MASK),
diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI.java
index 30f348d9770..eb8080ba3c9 100644
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI.java
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI.java
@@ -63,6 +63,7 @@ public class WindowsTabbedPaneUI extends BasicTabbedPaneUI {
 
     private boolean contentOpaque = true;
 
+    @SuppressWarnings("deprecation")
     protected void installDefaults() {
         super.installDefaults();
         contentOpaque = UIManager.getBoolean("TabbedPane.contentOpaque");
diff --git a/jdk/src/java.desktop/share/classes/java/awt/AWTEvent.java b/jdk/src/java.desktop/share/classes/java/awt/AWTEvent.java
index 9250597ac81..fe0b169b467 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/AWTEvent.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/AWTEvent.java
@@ -292,8 +292,12 @@ public abstract class AWTEvent extends EventObject {
 
     /**
      * Constructs an AWTEvent object from the parameters of a 1.0-style event.
+     *
      * @param event the old-style event
+     * @deprecated It is recommended that {@link #AWTEvent(Object, int)} be used
+     *             instead
      */
+    @Deprecated(since = "9")
     public AWTEvent(Event event) {
         this(event.target, event.id);
     }
@@ -436,6 +440,7 @@ public abstract class AWTEvent extends EventObject {
      * event class in java.awt.event because we don't want to make
      * it public and it needs to be called from java.awt.
      */
+    @SuppressWarnings("deprecation")
     Event convertToOld() {
         Object src = getSource();
         int newid = id;
diff --git a/jdk/src/java.desktop/share/classes/java/awt/AWTKeyStroke.java b/jdk/src/java.desktop/share/classes/java/awt/AWTKeyStroke.java
index 6e85f2b1bbf..075d5a6ebbc 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/AWTKeyStroke.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/AWTKeyStroke.java
@@ -350,6 +350,7 @@ public class AWTKeyStroke implements Serializable {
      * @throws NullPointerException if {@code anEvent} is null
      * @return the {@code AWTKeyStroke} that precipitated the event
      */
+    @SuppressWarnings("deprecation")
     public static AWTKeyStroke getAWTKeyStrokeForEvent(KeyEvent anEvent) {
         int id = anEvent.getID();
         switch(id) {
@@ -397,6 +398,7 @@ public class AWTKeyStroke implements Serializable {
      * @throws IllegalArgumentException if {@code s} is {@code null},
      *        or is formatted incorrectly
      */
+    @SuppressWarnings("deprecation")
     public static AWTKeyStroke getAWTKeyStroke(String s) {
         if (s == null) {
             throw new IllegalArgumentException("String cannot be null");
@@ -708,6 +710,7 @@ public class AWTKeyStroke implements Serializable {
         }
     }
 
+    @SuppressWarnings("deprecation")
     private static int mapOldModifiers(int modifiers) {
         if ((modifiers & InputEvent.SHIFT_MASK) != 0) {
             modifiers |= InputEvent.SHIFT_DOWN_MASK;
@@ -737,6 +740,7 @@ public class AWTKeyStroke implements Serializable {
         return modifiers;
     }
 
+    @SuppressWarnings("deprecation")
     private static int mapNewModifiers(int modifiers) {
         if ((modifiers & InputEvent.SHIFT_DOWN_MASK) != 0) {
             modifiers |= InputEvent.SHIFT_MASK;
diff --git a/jdk/src/java.desktop/share/classes/java/awt/Component.java b/jdk/src/java.desktop/share/classes/java/awt/Component.java
index dca2674c2fd..04247f8807c 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/Component.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/Component.java
@@ -5036,6 +5036,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
      *
      * Returns whether or not event was dispatched to an ancestor
      */
+    @SuppressWarnings("deprecation")
     boolean dispatchMouseWheelToAncestor(MouseWheelEvent e) {
         int newX, newY;
         newX = e.getX() + getX(); // Coordinates take into account at least
diff --git a/jdk/src/java.desktop/share/classes/java/awt/Container.java b/jdk/src/java.desktop/share/classes/java/awt/Container.java
index 13d5e23ed1c..e0bb5e0f5e7 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/Container.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/Container.java
@@ -4728,6 +4728,7 @@ class LightweightDispatcher implements java.io.Serializable, AWTEventListener {
      * Listen for drag events posted in other hw components so we can
      * track enter/exit regardless of where a drag originated
      */
+    @SuppressWarnings("deprecation")
     public void eventDispatched(AWTEvent e) {
         boolean isForeignDrag = (e instanceof MouseEvent) &&
                                 !(e instanceof SunDropTargetEvent) &&
@@ -4826,6 +4827,7 @@ class LightweightDispatcher implements java.io.Serializable, AWTEventListener {
      * If the target has been removed, we don't bother to send the
      * message.
      */
+    @SuppressWarnings("deprecation")
     void retargetMouseEvent(Component target, int id, MouseEvent e) {
         if (target == null) {
             return; // mouse is over another hw component or target is disabled
diff --git a/jdk/src/java.desktop/share/classes/java/awt/Event.java b/jdk/src/java.desktop/share/classes/java/awt/Event.java
index b00b09876ea..da33b237625 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/Event.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/Event.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,8 +24,7 @@
  */
 package java.awt;
 
-import java.awt.event.*;
-import java.io.*;
+import java.awt.event.KeyEvent;
 
 /**
  * NOTE: The {@code Event} class is obsolete and is
@@ -56,9 +55,12 @@ import java.io.*;
  * {@code Event} class ({@code PGUP},
  * {@code PGDN}, {@code F1}, {@code F2}, etc).
  *
+ * @deprecated It is recommended that {@code AWTEvent} and its subclasses be
+ *             used instead
  * @author     Sami Shaio
  * @since      1.0
  */
+@Deprecated(since = "9")
 public class Event implements java.io.Serializable {
     private transient long data;
 
diff --git a/jdk/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java b/jdk/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java
index 1e9e2f4bfd0..f2fb6d2b7af 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java
@@ -415,6 +415,7 @@ public abstract class KeyboardFocusManager
      * Initializes a KeyboardFocusManager.
      */
     public KeyboardFocusManager() {
+        @SuppressWarnings("deprecation")
         AWTKeyStroke[][] defaultFocusTraversalKeyStrokes = {
                 {
                         AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_TAB, 0, false),
diff --git a/jdk/src/java.desktop/share/classes/java/awt/MenuBar.java b/jdk/src/java.desktop/share/classes/java/awt/MenuBar.java
index 8d0d51d6360..17289c6a13f 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/MenuBar.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/MenuBar.java
@@ -375,6 +375,7 @@ public class MenuBar extends MenuComponent implements MenuContainer, Accessible
      * keydown).  Returns true if there is an associated
      * keyboard event.
      */
+    @SuppressWarnings("deprecation")
     boolean handleShortcut(KeyEvent e) {
         // Is it a key event?
         int id = e.getID();
diff --git a/jdk/src/java.desktop/share/classes/java/awt/MenuComponent.java b/jdk/src/java.desktop/share/classes/java/awt/MenuComponent.java
index fb3c72c617e..b4bc3c7fbfb 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/MenuComponent.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/MenuComponent.java
@@ -379,6 +379,7 @@ public abstract class MenuComponent implements java.io.Serializable {
             }
 
         } else { // backward compatibility
+            @SuppressWarnings("deprecation")
             Event olde = e.convertToOld();
             if (olde != null) {
                 postEvent(olde);
diff --git a/jdk/src/java.desktop/share/classes/java/awt/MenuItem.java b/jdk/src/java.desktop/share/classes/java/awt/MenuItem.java
index e0611ccba31..0d869c4ded7 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/MenuItem.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/MenuItem.java
@@ -435,6 +435,7 @@ public class MenuItem extends MenuComponent implements Accessible {
      * keydown) and the item is enabled.
      * Returns true if there is an associated shortcut.
      */
+    @SuppressWarnings("deprecation")
     boolean handleShortcut(KeyEvent e) {
         MenuShortcut s = new MenuShortcut(e.getKeyCode(),
                              (e.getModifiers() & InputEvent.SHIFT_MASK) > 0);
diff --git a/jdk/src/java.desktop/share/classes/java/awt/MenuShortcut.java b/jdk/src/java.desktop/share/classes/java/awt/MenuShortcut.java
index 57526ff4e6d..0704b32c000 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/MenuShortcut.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/MenuShortcut.java
@@ -180,6 +180,7 @@ public class MenuShortcut implements java.io.Serializable
      * @return a string representation of this MenuShortcut.
      * @since 1.1
      */
+    @SuppressWarnings("deprecation")
     public String toString() {
         int modifiers = 0;
         if (!GraphicsEnvironment.isHeadless()) {
diff --git a/jdk/src/java.desktop/share/classes/java/awt/PopupMenu.java b/jdk/src/java.desktop/share/classes/java/awt/PopupMenu.java
index 48460749d6e..7e8737a8310 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/PopupMenu.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/PopupMenu.java
@@ -154,6 +154,7 @@ public class PopupMenu extends Menu {
      *                parent's hierarchy
      * @exception RuntimeException if the parent is not showing on screen
      */
+    @SuppressWarnings("deprecation")
     public void show(Component origin, int x, int y) {
         // Use localParent for thread safety.
         MenuContainer localParent = parent;
diff --git a/jdk/src/java.desktop/share/classes/java/awt/Robot.java b/jdk/src/java.desktop/share/classes/java/awt/Robot.java
index 8483ed35297..d24ba5710b2 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/Robot.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/Robot.java
@@ -137,6 +137,7 @@ public class Robot {
         initLegalButtonMask();
     }
 
+    @SuppressWarnings("deprecation")
     private static synchronized void initLegalButtonMask() {
         if (LEGAL_BUTTON_MASK != 0) return;
 
diff --git a/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java b/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java
index f4bfd11072e..5d7e003b4b7 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java
@@ -1067,6 +1067,7 @@ public abstract class Toolkit {
      * @see       java.awt.MenuShortcut
      * @since     1.1
      */
+    @SuppressWarnings("deprecation")
     public int getMenuShortcutKeyMask() throws HeadlessException {
         GraphicsEnvironment.checkHeadless();
 
diff --git a/jdk/src/java.desktop/share/classes/java/awt/dnd/DragSourceDragEvent.java b/jdk/src/java.desktop/share/classes/java/awt/dnd/DragSourceDragEvent.java
index b8d89d2b575..141603f1320 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/dnd/DragSourceDragEvent.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/dnd/DragSourceDragEvent.java
@@ -281,6 +281,7 @@ public class DragSourceDragEvent extends DragSourceEvent {
      * The mouse modifiers have higher priority than overlaying key
      * modifiers.
      */
+    @SuppressWarnings("deprecation")
     private void setNewModifiers() {
         if ((gestureModifiers & InputEvent.BUTTON1_MASK) != 0) {
             gestureModifiers |= InputEvent.BUTTON1_DOWN_MASK;
@@ -305,6 +306,7 @@ public class DragSourceDragEvent extends DragSourceEvent {
     /**
      * Sets old modifiers by the new ones.
      */
+    @SuppressWarnings("deprecation")
     private void setOldModifiers() {
         if ((gestureModifiers & InputEvent.BUTTON1_DOWN_MASK) != 0) {
             gestureModifiers |= InputEvent.BUTTON1_MASK;
diff --git a/jdk/src/java.desktop/share/classes/java/awt/event/ActionEvent.java b/jdk/src/java.desktop/share/classes/java/awt/event/ActionEvent.java
index 6ce79554eeb..3d422453e51 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/event/ActionEvent.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/event/ActionEvent.java
@@ -26,7 +26,6 @@
 package java.awt.event;
 
 import java.awt.AWTEvent;
-import java.awt.Event;
 import java.lang.annotation.Native;
 
 /**
@@ -63,25 +62,25 @@ public class ActionEvent extends AWTEvent {
      * The shift modifier. An indicator that the shift key was held
      * down during the event.
      */
-    public static final int SHIFT_MASK          = Event.SHIFT_MASK;
+    public static final int SHIFT_MASK = 1 << 0;
 
     /**
      * The control modifier. An indicator that the control key was held
      * down during the event.
      */
-    public static final int CTRL_MASK           = Event.CTRL_MASK;
+    public static final int CTRL_MASK = 1 << 1;
 
     /**
      * The meta modifier. An indicator that the meta key was held
      * down during the event.
      */
-    public static final int META_MASK           = Event.META_MASK;
+    public static final int META_MASK = 1 << 2;
 
     /**
      * The alt modifier. An indicator that the alt key was held
      * down during the event.
      */
-    public static final int ALT_MASK            = Event.ALT_MASK;
+    public static final int ALT_MASK = 1 << 3;
 
 
     /**
@@ -274,6 +273,7 @@ public class ActionEvent extends AWTEvent {
      *
      * @return a string identifying the event and its associated command
      */
+    @SuppressWarnings("deprecation")
     public String paramString() {
         String typeStr;
         switch(id) {
diff --git a/jdk/src/java.desktop/share/classes/java/awt/event/InputEvent.java b/jdk/src/java.desktop/share/classes/java/awt/event/InputEvent.java
index ec9bd0be0a1..09a08a0d010 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/event/InputEvent.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/event/InputEvent.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -62,51 +62,76 @@ public abstract class InputEvent extends ComponentEvent {
 
     /**
      * The Shift key modifier constant.
-     * It is recommended that SHIFT_DOWN_MASK be used instead.
+     *
+     * @deprecated It is recommended that SHIFT_DOWN_MASK and
+     *             {@link #getModifiersEx()} be used instead
      */
+    @Deprecated(since = "9")
     public static final int SHIFT_MASK = Event.SHIFT_MASK;
 
     /**
      * The Control key modifier constant.
-     * It is recommended that CTRL_DOWN_MASK be used instead.
+     *
+     * @deprecated It is recommended that CTRL_DOWN_MASK and
+     *             {@link #getModifiersEx()} be used instead
      */
+    @Deprecated(since = "9")
     public static final int CTRL_MASK = Event.CTRL_MASK;
 
     /**
      * The Meta key modifier constant.
-     * It is recommended that META_DOWN_MASK be used instead.
+     *
+     * @deprecated It is recommended that META_DOWN_MASK and
+     *             {@link #getModifiersEx()} be used instead
      */
+    @Deprecated(since = "9")
     public static final int META_MASK = Event.META_MASK;
 
     /**
      * The Alt key modifier constant.
-     * It is recommended that ALT_DOWN_MASK be used instead.
+     *
+     * @deprecated It is recommended that ALT_DOWN_MASK and
+     *             {@link #getModifiersEx()} be used instead
      */
+    @Deprecated(since = "9")
     public static final int ALT_MASK = Event.ALT_MASK;
 
     /**
      * The AltGraph key modifier constant.
+     *
+     * @deprecated It is recommended that ALT_GRAPH_DOWN_MASK and
+     *             {@link #getModifiersEx()} be used instead
      */
+    @Deprecated(since = "9")
     public static final int ALT_GRAPH_MASK = 1 << 5;
 
     /**
      * The Mouse Button1 modifier constant.
-     * It is recommended that BUTTON1_DOWN_MASK be used instead.
+     *
+     * @deprecated It is recommended that BUTTON1_DOWN_MASK and
+     *             {@link #getModifiersEx()} be used instead
      */
+    @Deprecated(since = "9")
     public static final int BUTTON1_MASK = 1 << 4;
 
     /**
      * The Mouse Button2 modifier constant.
-     * It is recommended that BUTTON2_DOWN_MASK be used instead.
-     * Note that BUTTON2_MASK has the same value as ALT_MASK.
+     *
+     * @deprecated It is recommended that BUTTON2_DOWN_MASK and
+     *             {@link #getModifiersEx()} be used instead. Note that
+     *             BUTTON2_MASK has the same value as ALT_MASK.
      */
+    @Deprecated(since = "9")
     public static final int BUTTON2_MASK = Event.ALT_MASK;
 
     /**
      * The Mouse Button3 modifier constant.
-     * It is recommended that BUTTON3_DOWN_MASK be used instead.
-     * Note that BUTTON3_MASK has the same value as META_MASK.
+     *
+     * @deprecated It is recommended that BUTTON3_DOWN_MASK and
+     *             {@link #getModifiersEx()} be used instead. Note that
+     *             BUTTON3_MASK has the same value as META_MASK.
      */
+    @Deprecated(since = "9")
     public static final int BUTTON3_MASK = Event.META_MASK;
 
     /**
@@ -159,7 +184,7 @@ public abstract class InputEvent extends ComponentEvent {
 
     /**
      * An array of extended modifiers for additional buttons.
-     * @see getButtonDownMasks
+     * @see #getButtonDownMasks()
      * There are twenty buttons fit into 4byte space.
      * one more bit is reserved for FIRST_HIGH_BIT.
      * @since 1.7
@@ -382,7 +407,7 @@ public abstract class InputEvent extends ComponentEvent {
      * @return whether or not the Shift modifier is down on this event
      */
     public boolean isShiftDown() {
-        return (modifiers & SHIFT_MASK) != 0;
+        return (modifiers & SHIFT_DOWN_MASK) != 0;
     }
 
     /**
@@ -390,7 +415,7 @@ public abstract class InputEvent extends ComponentEvent {
      * @return whether or not the Control modifier is down on this event
      */
     public boolean isControlDown() {
-        return (modifiers & CTRL_MASK) != 0;
+        return (modifiers & CTRL_DOWN_MASK) != 0;
     }
 
     /**
@@ -398,7 +423,7 @@ public abstract class InputEvent extends ComponentEvent {
      * @return whether or not the Meta modifier is down on this event
      */
     public boolean isMetaDown() {
-        return (modifiers & META_MASK) != 0;
+        return (modifiers & META_DOWN_MASK) != 0;
     }
 
     /**
@@ -406,7 +431,7 @@ public abstract class InputEvent extends ComponentEvent {
      * @return whether or not the Alt modifier is down on this event
      */
     public boolean isAltDown() {
-        return (modifiers & ALT_MASK) != 0;
+        return (modifiers & ALT_DOWN_MASK) != 0;
     }
 
     /**
@@ -414,7 +439,7 @@ public abstract class InputEvent extends ComponentEvent {
      * @return whether or not the AltGraph modifier is down on this event
      */
     public boolean isAltGraphDown() {
-        return (modifiers & ALT_GRAPH_MASK) != 0;
+        return (modifiers & ALT_GRAPH_DOWN_MASK) != 0;
     }
 
     /**
@@ -428,8 +453,12 @@ public abstract class InputEvent extends ComponentEvent {
 
     /**
      * Returns the modifier mask for this event.
+     *
      * @return the modifier mask for this event
+     * @deprecated It is recommended that extended modifier keys and
+     *             {@link #getModifiersEx()} be used instead
      */
+    @Deprecated(since = "9")
     public int getModifiers() {
         return modifiers & (JDK_1_3_MODIFIERS | HIGH_MODIFIERS);
     }
diff --git a/jdk/src/java.desktop/share/classes/java/awt/event/KeyEvent.java b/jdk/src/java.desktop/share/classes/java/awt/event/KeyEvent.java
index 0ca378d556b..2c028901007 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/event/KeyEvent.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/event/KeyEvent.java
@@ -1169,6 +1169,7 @@ public class KeyEvent extends InputEvent {
      * @see #getKeyLocation()
      * @since 1.4
      */
+    @SuppressWarnings("deprecation")
     public KeyEvent(Component source, int id, long when, int modifiers,
                     int keyCode, char keyChar, int keyLocation) {
         super(source, id, when, modifiers);
@@ -1561,7 +1562,10 @@ public class KeyEvent extends InputEvent {
      * @return string a text description of the combination of modifier
      *                keys that were held down during the event
      * @see InputEvent#getModifiersExText(int)
+     * @deprecated It is recommended that extended modifier keys and
+     *             {@link InputEvent#getModifiersExText(int)} be used instead
      */
+    @Deprecated(since = "9")
     public static String getKeyModifiersText(int modifiers) {
         StringBuilder buf = new StringBuilder();
         if ((modifiers & InputEvent.META_MASK) != 0) {
@@ -1696,6 +1700,7 @@ public class KeyEvent extends InputEvent {
      *
      * @return a string identifying the event and its attributes
      */
+    @SuppressWarnings("deprecation")
     public String paramString() {
         StringBuilder str = new StringBuilder(100);
 
@@ -1821,6 +1826,7 @@ public class KeyEvent extends InputEvent {
      * Sets new modifiers by the old ones. The key modifiers
      * override overlapping mouse modifiers.
      */
+    @SuppressWarnings("deprecation")
     private void setNewModifiers() {
         if ((modifiers & SHIFT_MASK) != 0) {
             modifiers |= SHIFT_DOWN_MASK;
@@ -1845,6 +1851,7 @@ public class KeyEvent extends InputEvent {
     /**
      * Sets old modifiers by the new ones.
      */
+    @SuppressWarnings("deprecation")
     private void setOldModifiers() {
         if ((modifiers & SHIFT_DOWN_MASK) != 0) {
             modifiers |= SHIFT_MASK;
@@ -1871,6 +1878,7 @@ public class KeyEvent extends InputEvent {
      * override overlapping mouse modifiers.
      * @serial
      */
+    @SuppressWarnings("deprecation")
     private void readObject(ObjectInputStream s)
       throws IOException, ClassNotFoundException {
         s.defaultReadObject();
diff --git a/jdk/src/java.desktop/share/classes/java/awt/event/MouseEvent.java b/jdk/src/java.desktop/share/classes/java/awt/event/MouseEvent.java
index 2ae987b8144..a4e166844c0 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/event/MouseEvent.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/event/MouseEvent.java
@@ -733,6 +733,7 @@ public class MouseEvent extends InputEvent {
      * @see InputEvent#getMaskForButton(int)
      * @since 1.6
      */
+    @SuppressWarnings("deprecation")
     public MouseEvent(Component source, int id, long when, int modifiers,
                       int x, int y, int xAbs, int yAbs,
                       int clickCount, boolean popupTrigger, int button)
@@ -943,6 +944,7 @@ public class MouseEvent extends InputEvent {
      * @see InputEvent#getModifiersExText(int)
      * @since 1.4
      */
+    @SuppressWarnings("deprecation")
     public static String getMouseModifiersText(int modifiers) {
         StringBuilder buf = new StringBuilder();
         if ((modifiers & InputEvent.ALT_MASK) != 0) {
@@ -1007,6 +1009,7 @@ public class MouseEvent extends InputEvent {
      *
      * @return a string identifying the event and its attributes
      */
+    @SuppressWarnings("deprecation")
     public String paramString() {
         StringBuilder str = new StringBuilder(80);
 
@@ -1066,6 +1069,7 @@ public class MouseEvent extends InputEvent {
      * Sets new modifiers by the old ones.
      * Also sets button.
      */
+    @SuppressWarnings("deprecation")
     private void setNewModifiers() {
         if ((modifiers & BUTTON1_MASK) != 0) {
             modifiers |= BUTTON1_DOWN_MASK;
@@ -1120,6 +1124,7 @@ public class MouseEvent extends InputEvent {
     /**
      * Sets old modifiers by the new ones.
      */
+    @SuppressWarnings("deprecation")
     private void setOldModifiers() {
         if (id == MOUSE_PRESSED
             || id == MOUSE_RELEASED
@@ -1168,6 +1173,7 @@ public class MouseEvent extends InputEvent {
      * Sets new modifiers by the old ones.
      * @serial
      */
+    @SuppressWarnings("deprecation")
     private void readObject(ObjectInputStream s)
       throws IOException, ClassNotFoundException {
         s.defaultReadObject();
diff --git a/jdk/src/java.desktop/share/classes/java/awt/peer/PopupMenuPeer.java b/jdk/src/java.desktop/share/classes/java/awt/peer/PopupMenuPeer.java
index 3d3b677a19c..3e42310527d 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/peer/PopupMenuPeer.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/peer/PopupMenuPeer.java
@@ -46,5 +46,6 @@ public interface PopupMenuPeer extends MenuPeer {
      *
      * @see PopupMenu#show(java.awt.Component, int, int)
      */
+    @SuppressWarnings("deprecation")
     void show(Event e);
 }
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/Autoscroller.java b/jdk/src/java.desktop/share/classes/javax/swing/Autoscroller.java
index 6def2376145..979c359e560 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/Autoscroller.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/Autoscroller.java
@@ -82,6 +82,7 @@ class Autoscroller implements ActionListener {
     /**
      * Starts the timer targeting the passed in component.
      */
+    @SuppressWarnings("deprecation")
     private void start(JComponent c, MouseEvent e) {
         Point screenLocation = c.getLocationOnScreen();
 
@@ -156,6 +157,7 @@ class Autoscroller implements ActionListener {
      * ActionListener method. Invoked when the Timer fires. This will scroll
      * if necessary.
      */
+    @SuppressWarnings("deprecation")
     public void actionPerformed(ActionEvent x) {
         JComponent component = Autoscroller.component;
 
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/DefaultButtonModel.java b/jdk/src/java.desktop/share/classes/javax/swing/DefaultButtonModel.java
index ac8216af4a6..5bcf6efb407 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/DefaultButtonModel.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/DefaultButtonModel.java
@@ -239,6 +239,7 @@ public class DefaultButtonModel implements ButtonModel, Serializable {
     /**
      * {@inheritDoc}
      */
+    @SuppressWarnings("deprecation")
     public void setPressed(boolean b) {
         if((isPressed() == b) || !isEnabled()) {
             return;
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JComboBox.java b/jdk/src/java.desktop/share/classes/javax/swing/JComboBox.java
index cbaa3ef2845..3f824833c0d 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/JComboBox.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JComboBox.java
@@ -1235,6 +1235,7 @@ implements ItemSelectable,ListDataListener,ActionListener, Accessible {
      *
      * @see EventListenerList
      */
+    @SuppressWarnings("deprecation")
     protected void fireActionEvent() {
         if (!firingActionEvent) {
             // Set flag to ensure that an infinite loop is not created
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java b/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java
index 02813cbcbf3..0edf456ff03 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java
@@ -429,6 +429,7 @@ public abstract class JComponent extends Container implements Serializable,
      * Returns the Set of KeyStrokes to use if the component
      * is managing focus for forward focus traversal.
      */
+    @SuppressWarnings("deprecation")
     static Set getManagingFocusForwardTraversalKeys() {
         synchronized(JComponent.class) {
             if (managingFocusForwardTraversalKeys == null) {
@@ -445,6 +446,7 @@ public abstract class JComponent extends Container implements Serializable,
      * Returns the Set of KeyStrokes to use if the component
      * is managing focus for backward focus traversal.
      */
+    @SuppressWarnings("deprecation")
     static Set getManagingFocusBackwardTraversalKeys() {
         synchronized(JComponent.class) {
             if (managingFocusBackwardTraversalKeys == null) {
@@ -2886,6 +2888,7 @@ public abstract class JComponent extends Container implements Serializable,
      *
      * @since 1.3
      */
+    @SuppressWarnings("deprecation")
     protected boolean processKeyBinding(KeyStroke ks, KeyEvent e,
                                         int condition, boolean pressed) {
         InputMap map = getInputMap(condition, false);
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JFileChooser.java b/jdk/src/java.desktop/share/classes/javax/swing/JFileChooser.java
index b37dd05050a..04a1e76aeee 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/JFileChooser.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JFileChooser.java
@@ -1754,6 +1754,7 @@ public class JFileChooser extends JComponent implements Accessible {
      *                the event
      * @see EventListenerList
      */
+    @SuppressWarnings("deprecation")
     protected void fireActionPerformed(String command) {
         // Guaranteed to return a non-null array
         Object[] listeners = listenerList.getListenerList();
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JList.java b/jdk/src/java.desktop/share/classes/javax/swing/JList.java
index 5e9866356a0..4d966485b75 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/JList.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JList.java
@@ -1516,6 +1516,7 @@ public class JList extends JComponent implements Scrollable, Accessible
      * @see JComponent#setToolTipText
      * @see JComponent#getToolTipText
      */
+    @SuppressWarnings("deprecation")
     public String getToolTipText(MouseEvent event) {
         if(event != null) {
             Point p = event.getPoint();
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JMenuItem.java b/jdk/src/java.desktop/share/classes/javax/swing/JMenuItem.java
index cf80c9827a9..e449df3e65c 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/JMenuItem.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JMenuItem.java
@@ -412,6 +412,7 @@ public class JMenuItem extends AbstractButton implements Accessible,MenuElement
      * @param path  the MenuElement path array
      * @param manager   the MenuSelectionManager
      */
+    @SuppressWarnings("deprecation")
     public void processMouseEvent(MouseEvent e,MenuElement path[],MenuSelectionManager manager) {
         processMenuDragMouseEvent(
                  new MenuDragMouseEvent(e.getComponent(), e.getID(),
@@ -435,6 +436,7 @@ public class JMenuItem extends AbstractButton implements Accessible,MenuElement
      * @param path the MenuElement path array
      * @param manager   the MenuSelectionManager
      */
+    @SuppressWarnings("deprecation")
     public void processKeyEvent(KeyEvent e,MenuElement path[],MenuSelectionManager manager) {
         if (DEBUG) {
             System.out.println("in JMenuItem.processKeyEvent/3 for " + getText() +
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JPopupMenu.java b/jdk/src/java.desktop/share/classes/javax/swing/JPopupMenu.java
index f225b2d44ee..e793d76b399 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/JPopupMenu.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JPopupMenu.java
@@ -1385,6 +1385,7 @@ public class JPopupMenu extends JComponent implements Accessible,MenuElement {
      * @param path the MenuElement path array
      * @param manager   the MenuSelectionManager
      */
+    @SuppressWarnings("deprecation")
     public void processKeyEvent(KeyEvent e, MenuElement path[],
                                 MenuSelectionManager manager) {
         MenuKeyEvent mke = new MenuKeyEvent(e.getComponent(), e.getID(),
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JTable.java b/jdk/src/java.desktop/share/classes/javax/swing/JTable.java
index 94391d6e46b..e698994adf2 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/JTable.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JTable.java
@@ -3410,8 +3410,10 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
                 // Convert the event to the renderer's coordinate system
                 Rectangle cellRect = getCellRect(hitRowIndex, hitColumnIndex, false);
                 p.translate(-cellRect.x, -cellRect.y);
+                @SuppressWarnings("deprecation")
+                final int modifiers = event.getModifiers();
                 MouseEvent newEvent = new MouseEvent(component, event.getID(),
-                                          event.getWhen(), event.getModifiers(),
+                                          event.getWhen(), modifiers,
                                           p.x, p.y,
                                           event.getXOnScreen(),
                                           event.getYOnScreen(),
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JTextField.java b/jdk/src/java.desktop/share/classes/javax/swing/JTextField.java
index d3ec0dad46b..b8e3ffe0671 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/JTextField.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JTextField.java
@@ -485,6 +485,7 @@ public class JTextField extends JTextComponent implements SwingConstants {
      * first order.
      * @see EventListenerList
      */
+    @SuppressWarnings("deprecation")
     protected void fireActionPerformed() {
         // Guaranteed to return a non-null array
         Object[] listeners = listenerList.getListenerList();
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JToggleButton.java b/jdk/src/java.desktop/share/classes/javax/swing/JToggleButton.java
index 56de72a03fb..b66465d1bd9 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/JToggleButton.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JToggleButton.java
@@ -372,6 +372,7 @@ public class JToggleButton extends AbstractButton implements Accessible {
         /**
          * Sets the pressed state of the toggle button.
          */
+        @SuppressWarnings("deprecation")
         public void setPressed(boolean b) {
             if ((isPressed() == b) || !isEnabled()) {
                 return;
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JTree.java b/jdk/src/java.desktop/share/classes/javax/swing/JTree.java
index 7739b9bcd3e..34f779ab029 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/JTree.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JTree.java
@@ -1568,9 +1568,10 @@ public class JTree extends JComponent implements Scrollable, Accessible
                     Rectangle       pathBounds = getPathBounds(path);
 
                     p.translate(-pathBounds.x, -pathBounds.y);
+                    @SuppressWarnings("deprecation")
+                    final int modifiers = event.getModifiers();
                     newEvent = new MouseEvent(rComponent, event.getID(),
-                                          event.getWhen(),
-                                              event.getModifiers(),
+                                          event.getWhen(), modifiers,
                                               p.x, p.y,
                                               event.getXOnScreen(),
                                               event.getYOnScreen(),
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/KeyboardManager.java b/jdk/src/java.desktop/share/classes/javax/swing/KeyboardManager.java
index e083576d819..40cd7aebe4d 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/KeyboardManager.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/KeyboardManager.java
@@ -207,6 +207,7 @@ class KeyboardManager {
       * want a crack at the event.
       * If one of them wants it, then it will "DO-THE-RIGHT-THING"
       */
+    @SuppressWarnings("deprecation")
     public boolean fireKeyboardAction(KeyEvent e, boolean pressed, Container topAncestor) {
 
          if (e.isConsumed()) {
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/MenuSelectionManager.java b/jdk/src/java.desktop/share/classes/javax/swing/MenuSelectionManager.java
index 6df0d6701a1..bb9c66464f3 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/MenuSelectionManager.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/MenuSelectionManager.java
@@ -212,6 +212,7 @@ public class MenuSelectionManager {
      *
      * @param event  a MouseEvent object
      */
+    @SuppressWarnings("deprecation")
     public void processMouseEvent(MouseEvent event) {
         int screenX,screenY;
         Point p;
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/SwingUtilities.java b/jdk/src/java.desktop/share/classes/javax/swing/SwingUtilities.java
index abd6b055887..3f72d64c73f 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/SwingUtilities.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/SwingUtilities.java
@@ -346,6 +346,7 @@ public class SwingUtilities implements SwingConstants
      *
      * @return the new mouse event
      */
+    @SuppressWarnings("deprecation")
     public static MouseEvent convertMouseEvent(Component source,
                                                MouseEvent sourceEvent,
                                                Component destination) {
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/ToolTipManager.java b/jdk/src/java.desktop/share/classes/javax/swing/ToolTipManager.java
index c645d936b11..a751ad8e99a 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/ToolTipManager.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/ToolTipManager.java
@@ -89,6 +89,7 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
      */
     protected boolean heavyWeightPopupEnabled = false;
 
+    @SuppressWarnings("deprecation")
     ToolTipManager() {
         enterTimer = new Timer(750, new insideTimerAction());
         enterTimer.setRepeats(false);
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java
index b7f2ff6207b..403fe6abfdb 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java
@@ -1839,6 +1839,7 @@ public class BasicComboBoxUI extends ComboBoxUI {
         // key.  If it finds a key event that wasn't a navigation key it
         // dispatches it to JComboBox.selectWithKeyChar() so that it can do
         // type-ahead.
+        @SuppressWarnings("deprecation")
         public void keyPressed( KeyEvent e ) {
             if ( isNavigationKey(e.getKeyCode(), e.getModifiers()) ) {
                 lastTime = 0L;
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java
index f2b72e006b8..91afce1d5f3 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java
@@ -528,6 +528,7 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup {
      */
     protected JList createList() {
         return new JList( comboBox.getModel() ) {
+            @SuppressWarnings("deprecation")
             public void processMouseEvent(MouseEvent e)  {
                 if (BasicGraphicsUtils.isMenuShortcutKeyDown(e))  {
                     // Fix for 4234053. Filter out the Control Key from the list.
@@ -1238,6 +1239,7 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup {
     protected MouseEvent convertMouseEvent( MouseEvent e ) {
         Point convertedPoint = SwingUtilities.convertPoint( (Component)e.getSource(),
                                                             e.getPoint(), list );
+        @SuppressWarnings("deprecation")
         MouseEvent newEvent = new MouseEvent( (Component)e.getSource(),
                                               e.getID(),
                                               e.getWhen(),
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java
index 2760b1dcfd2..4122573a7d2 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java
@@ -382,6 +382,7 @@ public class BasicGraphicsUtils
         return c.getComponentOrientation().isLeftToRight();
     }
 
+    @SuppressWarnings("deprecation")
     static boolean isMenuShortcutKeyDown(InputEvent event) {
         return (event.getModifiers() &
                 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) != 0;
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java
index dbcfb308b7c..86d6686e41a 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java
@@ -1024,7 +1024,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
                 return;
             }
         }
-
+        @SuppressWarnings("deprecation")
         public void mouseDragged(MouseEvent e) {
 
             if ( startingBounds == null ) {
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java
index e797c937d33..44d062bf3a5 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java
@@ -1026,6 +1026,7 @@ public class BasicMenuItemUI extends MenuItemUI
                 manager.processMouseEvent(e);
             }
         }
+        @SuppressWarnings("deprecation")
         public void mouseEntered(MouseEvent e) {
             MenuSelectionManager manager = MenuSelectionManager.defaultManager();
             int modifiers = e.getModifiers();
@@ -1037,6 +1038,7 @@ public class BasicMenuItemUI extends MenuItemUI
             manager.setSelectedPath(getPath());
              }
         }
+        @SuppressWarnings("deprecation")
         public void mouseExited(MouseEvent e) {
             MenuSelectionManager manager = MenuSelectionManager.defaultManager();
 
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuUI.java
index 98afcc95679..01a38ce8804 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuUI.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuUI.java
@@ -123,6 +123,7 @@ public class BasicMenuUI extends BasicMenuItemUI
                                            getPropertyPrefix() + ".actionMap");
     }
 
+    @SuppressWarnings("deprecation")
     void updateMnemonicBinding() {
         int mnemonic = menuItem.getModel().getMnemonic();
         int[] shortcutKeys = (int[])DefaultLookup.get(menuItem, this,
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java
index 737d4d0d2b2..d98a5c703c8 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java
@@ -268,6 +268,7 @@ public class BasicPopupMenuUI extends PopupMenuUI {
         return list;
     }
 
+    @SuppressWarnings("deprecation")
     public boolean isPopupTrigger(MouseEvent e) {
         return ((e.getID()==MouseEvent.MOUSE_RELEASED)
                 && ((e.getModifiers() & MouseEvent.BUTTON3_MASK)!=0));
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java
index 5b0c9612486..79a41312374 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java
@@ -328,6 +328,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
     /**
      * Installs the UI defaults.
      */
+    @SuppressWarnings("deprecation")
     protected void installDefaults(){
         LookAndFeel.installBorder(splitPane, "SplitPane.border");
         LookAndFeel.installColors(splitPane, "SplitPane.background",
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java
index b80d7efa54a..a7985bd87a6 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java
@@ -868,6 +868,7 @@ public class BasicTableUI extends TableUI
 
         public void keyReleased(KeyEvent e) { }
 
+        @SuppressWarnings("deprecation")
         public void keyTyped(KeyEvent e) {
             KeyStroke keyStroke = KeyStroke.getKeyStroke(e.getKeyChar(),
                     e.getModifiers());
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java
index 8acc5d7298e..d9050b34006 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java
@@ -525,7 +525,7 @@ public abstract class BasicTextUI extends TextUI implements ViewFactory {
      * adding 'TAB' and 'SHIFT-TAB' to traversalKeysSet in case
      * editor is non editable
      */
-
+    @SuppressWarnings("deprecation")
     void updateFocusTraversalKeys() {
         /*
          * Fix for 4514331 Non-editable JTextArea and similar
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java
index 1d163f22bfa..5e2e330456b 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java
@@ -898,6 +898,7 @@ public class MetalRootPaneUI extends BasicRootPaneUI
             w.setCursor(lastCursor);
         }
 
+        @SuppressWarnings("deprecation")
         public void mouseClicked(MouseEvent ev) {
             Window w = (Window)ev.getSource();
             Frame f = null;
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java
index d851a162685..d753708bf56 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java
@@ -192,6 +192,7 @@ public class MetalToolTipUI extends BasicToolTipUI {
     // that subclasses that randomly invoke this method will see varying
     // results. If this becomes an issue, MetalToolTipUI should no longer be
     // shared.
+    @SuppressWarnings("deprecation")
     public String getAcceleratorString() {
         if (tip == null || isAcceleratorHidden()) {
             return "";
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthSplitPaneUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthSplitPaneUI.java
index 8e6c2898e3e..bc101d2f7c5 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthSplitPaneUI.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthSplitPaneUI.java
@@ -80,6 +80,7 @@ public class SynthSplitPaneUI extends BasicSplitPaneUI
      * Installs the UI defaults.
      */
     @Override
+    @SuppressWarnings("deprecation")
     protected void installDefaults() {
         updateStyle(splitPane);
 
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java b/jdk/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java
index 5d29fa945ab..5ba2838c432 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java
@@ -384,6 +384,7 @@ public class JTableHeader extends JComponent implements TableColumnModelListener
      *                          renderer and, therefore, the proper tip
      * @return the tool tip for this component
      */
+    @SuppressWarnings("deprecation")
     public String getToolTipText(MouseEvent event) {
         String tip = null;
         Point p = event.getPoint();
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java
index 50457771068..8d973e63b65 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java
@@ -372,6 +372,7 @@ public class DefaultCaret extends Rectangle implements Caret, FocusListener, Mou
     /**
      * Selects word based on the MouseEvent
      */
+    @SuppressWarnings("deprecation")
     private void selectWord(MouseEvent e) {
         if (selectedWordEvent != null
             && selectedWordEvent.getX() == e.getX()
@@ -405,6 +406,7 @@ public class DefaultCaret extends Rectangle implements Caret, FocusListener, Mou
      * @param e the mouse event
      * @see MouseListener#mouseClicked
      */
+    @SuppressWarnings("deprecation")
     public void mouseClicked(MouseEvent e) {
         if (getComponent() == null) {
             return;
@@ -513,6 +515,7 @@ public class DefaultCaret extends Rectangle implements Caret, FocusListener, Mou
     /**
      * Adjusts the caret location based on the MouseEvent.
      */
+    @SuppressWarnings("deprecation")
     private void adjustCaret(MouseEvent e) {
         if ((e.getModifiers() & ActionEvent.SHIFT_MASK) != 0 &&
             getDot() != -1) {
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java b/jdk/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java
index 241070327b2..d225c400c9d 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java
@@ -4103,6 +4103,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A
             get(FOCUSED_COMPONENT);
     }
 
+    @SuppressWarnings("deprecation")
     private int getCurrentEventModifiers() {
         int modifiers = 0;
         AWTEvent currentEvent = EventQueue.getCurrentEvent();
diff --git a/jdk/src/java.desktop/share/classes/sun/awt/NullComponentPeer.java b/jdk/src/java.desktop/share/classes/sun/awt/NullComponentPeer.java
index f95df58145f..90fdc124603 100644
--- a/jdk/src/java.desktop/share/classes/sun/awt/NullComponentPeer.java
+++ b/jdk/src/java.desktop/share/classes/sun/awt/NullComponentPeer.java
@@ -126,6 +126,7 @@ public class NullComponentPeer implements LightweightPeer,
     public void coalescePaintEvent(PaintEvent e) {
     }
 
+    @SuppressWarnings("deprecation")
     public boolean handleEvent(Event e) {
         return false;
     }
diff --git a/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java b/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java
index de1d303a1a9..f07f0eed6d9 100644
--- a/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java
+++ b/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java
@@ -1049,6 +1049,7 @@ public abstract class SunToolkit extends Toolkit
     /**
      * Returns key modifiers used by Swing to set up a focus accelerator key stroke.
      */
+    @SuppressWarnings("deprecation")
     public int getFocusAcceleratorKeyMask() {
         return InputEvent.ALT_MASK;
     }
@@ -1059,6 +1060,7 @@ public abstract class SunToolkit extends Toolkit
      * the way things work on Windows: here, pressing ctrl + alt allows user to enter
      * characters from the extended character set (like euro sign or math symbols)
      */
+    @SuppressWarnings("deprecation")
     public boolean isPrintableCharacterModifiersMask(int mods) {
         return ((mods & InputEvent.ALT_MASK) == (mods & InputEvent.CTRL_MASK));
     }
diff --git a/jdk/src/java.desktop/share/classes/sun/swing/FilePane.java b/jdk/src/java.desktop/share/classes/sun/swing/FilePane.java
index 1d7b69da8bf..2629e44c36a 100644
--- a/jdk/src/java.desktop/share/classes/sun/swing/FilePane.java
+++ b/jdk/src/java.desktop/share/classes/sun/swing/FilePane.java
@@ -1831,6 +1831,7 @@ public class FilePane extends JPanel implements PropertyChangeListener {
     private class Handler implements MouseListener {
         private MouseListener doubleClickListener;
 
+        @SuppressWarnings("deprecation")
         public void mouseClicked(MouseEvent evt) {
             JComponent source = (JComponent)evt.getSource();
 
diff --git a/jdk/src/java.desktop/share/classes/sun/swing/MenuItemLayoutHelper.java b/jdk/src/java.desktop/share/classes/sun/swing/MenuItemLayoutHelper.java
index e3012853966..f263f2b3b4d 100644
--- a/jdk/src/java.desktop/share/classes/sun/swing/MenuItemLayoutHelper.java
+++ b/jdk/src/java.desktop/share/classes/sun/swing/MenuItemLayoutHelper.java
@@ -175,6 +175,7 @@ public class MenuItemLayoutHelper {
         arrowSize.origWidth = arrowSize.width;
     }
 
+    @SuppressWarnings("deprecation")
     private String getAccText(String acceleratorDelimiter) {
         String accText = "";
         KeyStroke accelerator = mi.getAccelerator();
diff --git a/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java b/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java
index f55290b1ca1..015fb7e05b9 100644
--- a/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java
+++ b/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java
@@ -1460,7 +1460,7 @@ public class SwingUtilities2 {
      *
      * @param ie InputEvent to check
      */
-
+    @SuppressWarnings("deprecation")
     private static boolean isAccessClipboardGesture(InputEvent ie) {
         boolean allowedGesture = false;
         if (ie instanceof KeyEvent) { //we can validate only keyboard gestures
@@ -2129,6 +2129,7 @@ public class SwingUtilities2 {
         return -1;
     }
 
+    @SuppressWarnings("deprecation")
     public static int getSystemMnemonicKeyMask() {
         Toolkit toolkit = Toolkit.getDefaultToolkit();
         if (toolkit instanceof SunToolkit) {
diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/InfoWindow.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/InfoWindow.java
index 62658c7e92e..5bca207147f 100644
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/InfoWindow.java
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/InfoWindow.java
@@ -429,7 +429,7 @@ public abstract class InfoWindow extends Window {
                 gtkImagesLoaded = true;
             }
         }
-
+        @SuppressWarnings("deprecation")
         private class ActionPerformer extends MouseAdapter {
             public void mouseClicked(MouseEvent e) {
                 // hide the balloon by any click
diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java
index 2bb0fab22b5..5ef2e3ac0bf 100644
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java
@@ -385,7 +385,7 @@ final class ListHelper implements XScrollbarClient {
         }
         return false;
     }
-
+    @SuppressWarnings("deprecation")
     void handleVSBEvent(MouseEvent e, Rectangle bounds, int x, int y) {
         int sbHeight = hsbVis ? bounds.height - SCROLLBAR_WIDTH : bounds.height;
 
diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java
index bb74478d299..3a405ecc34f 100644
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java
@@ -1087,7 +1087,9 @@ public abstract class XBaseMenuWindow extends XWindow {
                       }
                   } else {
                       //Invoke action event
-                      item.action(mouseEvent.getWhen(), mouseEvent.getModifiers());
+                      @SuppressWarnings("deprecation")
+                      final int modifiers = mouseEvent.getModifiers();
+                      item.action(mouseEvent.getWhen(), modifiers);
                       ungrabInput();
                   }
               } else {
@@ -1200,7 +1202,9 @@ public abstract class XBaseMenuWindow extends XWindow {
               if (citem instanceof XMenuPeer) {
                   cwnd.selectItem(citem, true);
               } else if (citem != null) {
-                  citem.action(event.getWhen(), event.getModifiers());
+                  @SuppressWarnings("deprecation")
+                  final int modifiers = event.getModifiers();
+                  citem.action(event.getWhen(), modifiers);
                   ungrabInput();
               }
               break;
diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XButtonPeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XButtonPeer.java
index 2e2bd0ef2a7..604272c90f3 100644
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XButtonPeer.java
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XButtonPeer.java
@@ -120,7 +120,9 @@ public class XButtonPeer extends XComponentPeer implements ButtonPeer {
               if (XToolkit.isLeftMouseButton(e)) {
                   if (armed)
                   {
-                      action(e.getWhen(),e.getModifiers());
+                      @SuppressWarnings("deprecation")
+                      final int modifiers = e.getModifiers();
+                      action(e.getWhen(), modifiers);
                   }
                   pressed = false;
                   armed = false;
@@ -168,7 +170,9 @@ public class XButtonPeer extends XComponentPeer implements ButtonPeer {
                   pressed=true;
                   armed=true;
                   repaint();
-                  action(e.getWhen(),e.getModifiers());
+                  @SuppressWarnings("deprecation")
+                  final int modifiers = e.getModifiers();
+                  action(e.getWhen(), modifiers);
               }
 
               break;
diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XChoicePeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XChoicePeer.java
index 54155cf128e..cd367059dd6 100644
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XChoicePeer.java
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XChoicePeer.java
@@ -482,7 +482,7 @@ public class XChoicePeer extends XComponentPeer implements ChoicePeer, ToplevelS
         firstPress = false;
         dragStartIdx = -1;
     }
-
+    @SuppressWarnings("deprecation")
     public void mouseDragged(MouseEvent e) {
         /*
          * fix for 5003166. On Motif user are unable to drag
diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbedServerTester.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbedServerTester.java
index 1bbae4f91f9..ab85a33064c 100644
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbedServerTester.java
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbedServerTester.java
@@ -452,6 +452,7 @@ public class XEmbedServerTester implements XEventDispatcher {
         waitWindowActivated(res);
         return res;
     }
+    @SuppressWarnings("deprecation")
     private int activateServerNoWait(int prev) {
         xembedLog.fine("Activating server");
         int res = getEventPos();
@@ -467,6 +468,7 @@ public class XEmbedServerTester implements XEventDispatcher {
         robot.mouseRelease(InputEvent.BUTTON1_MASK);
         return res;
     }
+    @SuppressWarnings("deprecation")
     private int deactivateServer() {
         xembedLog.fine("Deactivating server");
         int res = getEventPos();
@@ -480,6 +482,7 @@ public class XEmbedServerTester implements XEventDispatcher {
         waitWindowDeactivated(res);
         return res;
     }
+    @SuppressWarnings("deprecation")
     private int focusServer() {
         xembedLog.fine("Focusing server");
         boolean weFocused = focused;
@@ -740,6 +743,7 @@ public class XEmbedServerTester implements XEventDispatcher {
     private void ungrabKey() {
         sendMessage(XEmbedHelper.NON_STANDARD_XEMBED_GTK_UNGRAB_KEY, 0, accel_keysym, accel_mods);
     }
+    @SuppressWarnings("deprecation")
     private int showModalDialog() {
         xembedLog.fine("Showing modal dialog");
         int res = getEventPos();
diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java
index e28817f06f8..cbebaee1525 100644
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java
@@ -573,7 +573,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
             repaint();
         }
     }
-
+    @SuppressWarnings("deprecation")
     void mousePressed(MouseEvent mouseEvent) {
         if (log.isLoggable(PlatformLogger.Level.FINER)) {
             log.finer(mouseEvent.toString() + ", hsb " + hsbVis + ", vsb " + vsbVis);
@@ -641,6 +641,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
             isMousePressed = true;
         }
     }
+    @SuppressWarnings("deprecation")
     void mouseReleased(MouseEvent mouseEvent) {
         if (isEnabled() && mouseEvent.getButton() == MouseEvent.BUTTON1) {
             //winReleaseCursorFocus();
@@ -685,6 +686,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
         }
     }
 
+    @SuppressWarnings("deprecation")
     void mouseDragged(MouseEvent mouseEvent) {
         // TODO: can you drag w/ any other buttons?  what about multiple buttons?
         if (isEnabled() &&
@@ -810,7 +812,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
               break;
         }
     }
-
+    @SuppressWarnings("deprecation")
     void keyPressed(KeyEvent e) {
         int keyCode = e.getKeyCode();
         if (log.isLoggable(PlatformLogger.Level.FINE)) {
diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuBarPeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuBarPeer.java
index 65dda8489f1..c74175b2596 100644
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuBarPeer.java
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuBarPeer.java
@@ -503,6 +503,7 @@ public class XMenuBarPeer extends XBaseMenuWindow implements MenuBarPeer {
      * This function is called from XWindow
      * @see XWindow.handleF10onEDT()
      */
+    @SuppressWarnings("deprecation")
     void handleF10KeyPress(KeyEvent event) {
         int keyState = event.getModifiers();
         if (((keyState & InputEvent.ALT_MASK) != 0) ||
diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XPopupMenuPeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XPopupMenuPeer.java
index b976a2d71b3..b4668812eb4 100644
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XPopupMenuPeer.java
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XPopupMenuPeer.java
@@ -131,6 +131,7 @@ public class XPopupMenuPeer extends XMenuWindow implements PopupMenuPeer {
     /*
      * From PopupMenuPeer
      */
+    @SuppressWarnings("deprecation")
     public void show(Event e) {
         target = (Component)e.target;
         // Get menus from the target.
diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollPanePeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollPanePeer.java
index 80156180b31..d6f1d23129c 100644
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollPanePeer.java
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollPanePeer.java
@@ -468,6 +468,7 @@ class XScrollPanePeer extends XComponentPeer implements ScrollPanePeer, XScrollb
      * MouseEvent.MOUSE_EXITED
      * MouseEvent.MOUSE_DRAGGED
      */
+    @SuppressWarnings("deprecation")
     public void handleJavaMouseEvent( MouseEvent mouseEvent ) {
         super.handleJavaMouseEvent(mouseEvent);
         int modifiers = mouseEvent.getModifiers();
diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbar.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbar.java
index ca43f7a501b..eece0075923 100644
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbar.java
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbar.java
@@ -457,6 +457,7 @@ abstract class XScrollbar {
      * MouseEvent.MOUSE_EXITED
      * MouseEvent.MOUSE_DRAGGED
      */
+    @SuppressWarnings("deprecation")
     public void handleMouseEvent(int id, int modifiers, int x, int y) {
         if ((modifiers & InputEvent.BUTTON1_MASK) == 0) {
             return;
diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbarPeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbarPeer.java
index cf32749eea8..f7de3576ee0 100644
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbarPeer.java
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbarPeer.java
@@ -126,6 +126,7 @@ class XScrollbarPeer extends XComponentPeer implements ScrollbarPeer, XScrollbar
      * MouseEvent.MOUSE_EXITED
      * MouseEvent.MOUSE_DRAGGED
      */
+    @SuppressWarnings("deprecation")
     public void handleJavaMouseEvent( MouseEvent mouseEvent ) {
         super.handleJavaMouseEvent(mouseEvent);
 
diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTextAreaPeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTextAreaPeer.java
index 5d769203159..78107842321 100644
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTextAreaPeer.java
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTextAreaPeer.java
@@ -1344,6 +1344,7 @@ final class XTextAreaPeer extends XComponentPeer implements TextAreaPeer {
             }
         }
 
+        @SuppressWarnings("deprecation")
         private static MouseEvent newMouseEvent(
             Component source, Point point, MouseEvent template )
         {
diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTrayIconPeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTrayIconPeer.java
index b4b949c513e..88dff8435a7 100644
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTrayIconPeer.java
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTrayIconPeer.java
@@ -477,6 +477,7 @@ public class XTrayIconPeer implements TrayIconPeer,
             e.setSource(xtiPeer.target);
             XToolkit.postEvent(XToolkit.targetToAppContext(e.getSource()), e);
         }
+        @SuppressWarnings("deprecation")
         public void mouseClicked(MouseEvent e) {
             if ((e.getClickCount() == 1 || xtiPeer.balloon.isVisible()) &&
                 e.getButton() == MouseEvent.BUTTON1)
diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java
index 0c5cc361c76..23b83aa7dbb 100644
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java
@@ -621,7 +621,7 @@ class XWindow extends XBaseWindow implements X11ComponentPeer {
         // 4 and 5 buttons are usually considered assigned to a first wheel
         return button == XConstants.buttons[3] || button == XConstants.buttons[4];
     }
-
+    @SuppressWarnings("deprecation")
     static int getXModifiers(AWTKeyStroke stroke) {
         int mods = stroke.getModifiers();
         int res = 0;
diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WButtonPeer.java b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WButtonPeer.java
index 36469af2eac..5479c431fe0 100644
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WButtonPeer.java
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WButtonPeer.java
@@ -95,6 +95,7 @@ final class WButtonPeer extends WComponentPeer implements ButtonPeer {
     private static native void initIDs();
 
     @Override
+    @SuppressWarnings("deprecation")
     public boolean handleJavaKeyEvent(KeyEvent e) {
          switch (e.getID()) {
             case KeyEvent.KEY_RELEASED:
diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WFileDialogPeer.java b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WFileDialogPeer.java
index 27a0c156187..a09b5ea06f2 100644
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WFileDialogPeer.java
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WFileDialogPeer.java
@@ -263,6 +263,7 @@ final class WFileDialogPeer extends WWindowPeer implements FileDialogPeer {
     void disable() {}
     @Override
     public void reshape(int x, int y, int width, int height) {}
+    @SuppressWarnings("deprecation")
     public boolean handleEvent(Event e) { return false; }
     @Override
     public void setForeground(Color c) {}
diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPopupMenuPeer.java b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPopupMenuPeer.java
index d37858dff6b..b9103c2b12c 100644
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPopupMenuPeer.java
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPopupMenuPeer.java
@@ -70,6 +70,7 @@ final class WPopupMenuPeer extends WMenuPeer implements PopupMenuPeer {
 
     private native void createMenu(WComponentPeer parent);
 
+    @SuppressWarnings("deprecation")
     public void show(Event e) {
         Component origin = (Component)e.target;
         WComponentPeer peer = (WComponentPeer) WToolkit.targetToPeer(origin);
@@ -97,6 +98,7 @@ final class WPopupMenuPeer extends WMenuPeer implements PopupMenuPeer {
      */
     void show(Component origin, Point p) {
         WComponentPeer peer = (WComponentPeer) WToolkit.targetToPeer(origin);
+        @SuppressWarnings("deprecation")
         Event e = new Event(origin, 0, Event.MOUSE_DOWN, p.x, p.y, 0, 0);
         if (peer == null) {
             Component nativeOrigin = WToolkit.getNativeContainer(origin);
@@ -107,5 +109,6 @@ final class WPopupMenuPeer extends WMenuPeer implements PopupMenuPeer {
         _show(e);
     }
 
+    @SuppressWarnings("deprecation")
     private native void _show(Event e);
 }
diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPrintDialogPeer.java b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPrintDialogPeer.java
index d4ae0eb491e..f2a0042e9cf 100644
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPrintDialogPeer.java
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPrintDialogPeer.java
@@ -135,6 +135,7 @@ class WPrintDialogPeer extends WWindowPeer implements DialogPeer {
     void disable() {}
     @Override
     public void reshape(int x, int y, int width, int height) {}
+    @SuppressWarnings("deprecation")
     public boolean handleEvent(Event e) { return false; }
     @Override
     public void setForeground(Color c) {}
diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WTextFieldPeer.java b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WTextFieldPeer.java
index 387fbfcb80e..6917d4d421c 100644
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WTextFieldPeer.java
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WTextFieldPeer.java
@@ -43,6 +43,7 @@ final class WTextFieldPeer extends WTextComponentPeer implements TextFieldPeer {
     }
 
     @Override
+    @SuppressWarnings("deprecation")
     public boolean handleJavaKeyEvent(KeyEvent e) {
         switch (e.getID()) {
            case KeyEvent.KEY_TYPED:
diff --git a/jdk/src/jdk.jconsole/share/classes/sun/tools/jconsole/JConsole.java b/jdk/src/jdk.jconsole/share/classes/sun/tools/jconsole/JConsole.java
index bc2b171978d..031d7e03833 100644
--- a/jdk/src/jdk.jconsole/share/classes/sun/tools/jconsole/JConsole.java
+++ b/jdk/src/jdk.jconsole/share/classes/sun/tools/jconsole/JConsole.java
@@ -128,7 +128,7 @@ public class JConsole extends JFrame
             hotspotMI.setMnemonic(Resources.getMnemonicInt(Messages.HOTSPOT_MBEANS_ELLIPSIS));
             hotspotMI.setAccelerator(KeyStroke.
                                      getKeyStroke(KeyEvent.VK_H,
-                                                  InputEvent.CTRL_MASK));
+                                                  InputEvent.CTRL_DOWN_MASK));
             hotspotMI.addActionListener(this);
             connectionMenu.add(hotspotMI);
 
@@ -138,7 +138,7 @@ public class JConsole extends JFrame
         connectMI = new JMenuItem(Messages.NEW_CONNECTION_ELLIPSIS);
         connectMI.setMnemonic(Resources.getMnemonicInt(Messages.NEW_CONNECTION_ELLIPSIS));
         connectMI.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N,
-                                                        InputEvent.CTRL_MASK));
+                                                        InputEvent.CTRL_DOWN_MASK));
         connectMI.addActionListener(this);
         connectionMenu.add(connectMI);
 
@@ -147,7 +147,7 @@ public class JConsole extends JFrame
         exitMI = new JMenuItem(Messages.EXIT);
         exitMI.setMnemonic(Resources.getMnemonicInt(Messages.EXIT));
         exitMI.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F4,
-                                                     InputEvent.ALT_MASK));
+                                                     InputEvent.ALT_DOWN_MASK));
         exitMI.addActionListener(this);
         connectionMenu.add(exitMI);
 
@@ -223,7 +223,7 @@ public class JConsole extends JFrame
             tileMI = new JMenuItem(Messages.TILE);
             tileMI.setMnemonic(Resources.getMnemonicInt(Messages.TILE));
             tileMI.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_T,
-                                                         InputEvent.CTRL_MASK));
+                                                         InputEvent.CTRL_DOWN_MASK));
             tileMI.addActionListener(JConsole.this);
             add(tileMI);
 
diff --git a/jdk/src/jdk.jconsole/share/classes/sun/tools/jconsole/VMPanel.java b/jdk/src/jdk.jconsole/share/classes/sun/tools/jconsole/VMPanel.java
index 1561b9cc5bb..f8c7632db0c 100644
--- a/jdk/src/jdk.jconsole/share/classes/sun/tools/jconsole/VMPanel.java
+++ b/jdk/src/jdk.jconsole/share/classes/sun/tools/jconsole/VMPanel.java
@@ -124,7 +124,9 @@ public class VMPanel extends JTabbedPane implements PropertyChangeListener {
         addMouseListener(new MouseAdapter() {
 
             public void mouseClicked(MouseEvent e) {
-                if (connectedIconBounds != null && (e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 && connectedIconBounds.contains(e.getPoint())) {
+                if (connectedIconBounds != null
+                        && (e.getModifiersEx() & MouseEvent.BUTTON1_DOWN_MASK) != 0
+                        && connectedIconBounds.contains(e.getPoint())) {
 
                     if (isConnected()) {
                         userDisconnected = true;
diff --git a/jdk/src/jdk.jconsole/share/classes/sun/tools/jconsole/inspector/Utils.java b/jdk/src/jdk.jconsole/share/classes/sun/tools/jconsole/inspector/Utils.java
index e706715fb0f..aec798c87da 100644
--- a/jdk/src/jdk.jconsole/share/classes/sun/tools/jconsole/inspector/Utils.java
+++ b/jdk/src/jdk.jconsole/share/classes/sun/tools/jconsole/inspector/Utils.java
@@ -438,7 +438,7 @@ public class Utils {
         public void keyPressed(KeyEvent e) {
             // Accept "copy" key strokes
             KeyStroke ks = KeyStroke.getKeyStroke(
-                    e.getKeyCode(), e.getModifiers());
+                    e.getKeyCode(), e.getModifiersEx());
             JComponent comp = (JComponent) e.getSource();
             for (int i = 0; i < 3; i++) {
                 InputMap im = comp.getInputMap(i);

From d0a0cdf7539c5f7a47a8a0e5475183138ea5bb78 Mon Sep 17 00:00:00 2001
From: Brent Christian 
Date: Tue, 31 Jan 2017 11:51:02 -0800
Subject: [PATCH 047/447] 8156073: 2-slot LiveStackFrame locals (long and
 double) are incorrect

Reviewed-by: coleenp, mchung
---
 .../classes/java/lang/LiveStackFrame.java     | 136 ++---
 .../classes/java/lang/LiveStackFrameInfo.java | 212 ++-----
 .../lang/StackWalker/CountLocalSlots.java     |  62 --
 .../lang/StackWalker/LocalsAndOperands.java   | 553 ++++++++++++------
 .../java/lang/StackWalker/LocalsCrash.java    |  75 ---
 5 files changed, 443 insertions(+), 595 deletions(-)
 delete mode 100644 jdk/test/java/lang/StackWalker/CountLocalSlots.java
 delete mode 100644 jdk/test/java/lang/StackWalker/LocalsCrash.java

diff --git a/jdk/src/java.base/share/classes/java/lang/LiveStackFrame.java b/jdk/src/java.base/share/classes/java/lang/LiveStackFrame.java
index 5be48729d5a..612ff09f138 100644
--- a/jdk/src/java.base/share/classes/java/lang/LiveStackFrame.java
+++ b/jdk/src/java.base/share/classes/java/lang/LiveStackFrame.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -55,14 +55,36 @@ interface LiveStackFrame extends StackFrame {
      *
      * 

A single local variable can hold a value of type boolean, byte, char, * short, int, float, reference or returnAddress. A pair of local variables - * can hold a value of type long or double. In other words, - * a value of type long or type double occupies two consecutive local - * variables. For a value of primitive type, the element in the - * local variable array is an {@link PrimitiveValue} object; - * otherwise, the element is an {@code Object}. + * can hold a value of type long or double (JVMS section 2.6.1). Primitive + * locals are represented in the returned array as {@code PrimitiveSlot}s, + * with longs and doubles occupying a pair of consecutive + * {@code PrimitiveSlot}s. * - *

The returned array may contain null entries if a local variable is not - * live. + *

The current VM implementation does not provide specific type + * information for primitive locals. This method simply returns the raw + * contents of the VM's primitive locals on a best-effort basis, without + * indicating a specific type. + * + *

The returned array may contain null entries for local variables that + * are not live. + * + * @implNote + *

The specific subclass of {@code PrimitiveSlot} will reflect the + * underlying architecture, and will be either {@code PrimitiveSlot32} or + * {@code PrimitiveSlot64}. + * + *

How a long or double value is stored in the pair of + * {@code PrimitiveSlot}s can vary based on the underlying architecture and + * VM implementation. On 32-bit architectures, long/double values are split + * between the two {@code PrimitiveSlot32}s. + * On 64-bit architectures, the entire value may be stored in one of the + * {@code PrimitiveSlot64}s, with the other {@code PrimitiveSlot64} being + * unused. + * + *

The contents of the unused, high-order portion of a + * {@code PrimitiveSlot64} (when storing a primitive other than a long or + * double) is unspecified. In particular, the unused bits are not + * necessarily zeroed out. * * @return the local variable array of this stack frame. */ @@ -78,7 +100,7 @@ interface LiveStackFrame extends StackFrame { *

Each entry on the operand stack can hold a value of any Java Virtual * Machine Type. * For a value of primitive type, the element in the returned array is - * an {@link PrimitiveValue} object; otherwise, the element is the {@code Object} + * a {@link PrimitiveSlot} object; otherwise, the element is the {@code Object} * on the operand stack. * * @return the operand stack of this stack frame. @@ -87,107 +109,37 @@ interface LiveStackFrame extends StackFrame { /** * UNSUPPORTED This interface is intended to be package-private - * or move to an internal package.

+ * or moved to an internal package.

* - * Represents a local variable or an entry on the operand whose value is + * Represents a local variable or an entry on the operand stack whose value is * of primitive type. */ - public abstract class PrimitiveValue { + public abstract class PrimitiveSlot { /** - * Returns the base type of this primitive value, one of - * {@code B, D, C, F, I, J, S, Z}. - * - * @return Name of a base type - * @jvms table 4.3-A + * Returns the size, in bytes, of the slot. */ - abstract char type(); + public abstract int size(); /** - * Returns the boolean value if this primitive value is of type boolean. - * @return the boolean value if this primitive value is of type boolean. + * Returns the int value if this primitive value is of size 4 + * @return the int value if this primitive value is of size 4 * * @throws UnsupportedOperationException if this primitive value is not - * of type boolean. - */ - public boolean booleanValue() { - throw new UnsupportedOperationException("this primitive of type " + type()); - } - - /** - * Returns the int value if this primitive value is of type int. - * @return the int value if this primitive value is of type int. - * - * @throws UnsupportedOperationException if this primitive value is not - * of type int. + * of size 4. */ public int intValue() { - throw new UnsupportedOperationException("this primitive of type " + type()); + throw new UnsupportedOperationException("this " + size() + "-byte primitive"); } /** - * Returns the long value if this primitive value is of type long. - * @return the long value if this primitive value is of type long. + * Returns the long value if this primitive value is of size 8 + * @return the long value if this primitive value is of size 8 * * @throws UnsupportedOperationException if this primitive value is not - * of type long. + * of size 8. */ public long longValue() { - throw new UnsupportedOperationException("this primitive of type " + type()); - } - - /** - * Returns the char value if this primitive value is of type char. - * @return the char value if this primitive value is of type char. - * - * @throws UnsupportedOperationException if this primitive value is not - * of type char. - */ - public char charValue() { - throw new UnsupportedOperationException("this primitive of type " + type()); - } - - /** - * Returns the byte value if this primitive value is of type byte. - * @return the byte value if this primitive value is of type byte. - * - * @throws UnsupportedOperationException if this primitive value is not - * of type byte. - */ - public byte byteValue() { - throw new UnsupportedOperationException("this primitive of type " + type()); - } - - /** - * Returns the short value if this primitive value is of type short. - * @return the short value if this primitive value is of type short. - * - * @throws UnsupportedOperationException if this primitive value is not - * of type short. - */ - public short shortValue() { - throw new UnsupportedOperationException("this primitive of type " + type()); - } - - /** - * Returns the float value if this primitive value is of type float. - * @return the float value if this primitive value is of type float. - * - * @throws UnsupportedOperationException if this primitive value is not - * of type float. - */ - public float floatValue() { - throw new UnsupportedOperationException("this primitive of type " + type()); - } - - /** - * Returns the double value if this primitive value is of type double. - * @return the double value if this primitive value is of type double. - * - * @throws UnsupportedOperationException if this primitive value is not - * of type double. - */ - public double doubleValue() { - throw new UnsupportedOperationException("this primitive of type " + type()); + throw new UnsupportedOperationException("this " + size() + "-byte primitive"); } } diff --git a/jdk/src/java.base/share/classes/java/lang/LiveStackFrameInfo.java b/jdk/src/java.base/share/classes/java/lang/LiveStackFrameInfo.java index db8901ea731..b6583adf559 100644 --- a/jdk/src/java.base/share/classes/java/lang/LiveStackFrameInfo.java +++ b/jdk/src/java.base/share/classes/java/lang/LiveStackFrameInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,15 +24,13 @@ */ package java.lang; -import java.lang.StackWalker.Option; -import java.util.EnumSet; -import java.util.Set; - -import static java.lang.StackWalker.ExtendedOption.*; - final class LiveStackFrameInfo extends StackFrameInfo implements LiveStackFrame { private static Object[] EMPTY_ARRAY = new Object[0]; + // These flags must match the values maintained in the VM + private static final int MODE_INTERPRETED = 0x01; + private static final int MODE_COMPILED = 0x02; + LiveStackFrameInfo(StackWalker walker) { super(walker); } @@ -41,6 +39,7 @@ final class LiveStackFrameInfo extends StackFrameInfo implements LiveStackFrame private Object[] monitors = EMPTY_ARRAY; private Object[] locals = EMPTY_ARRAY; private Object[] operands = EMPTY_ARRAY; + private int mode = 0; @Override public Object[] getMonitors() { @@ -57,51 +56,44 @@ final class LiveStackFrameInfo extends StackFrameInfo implements LiveStackFrame return operands; } + @Override + public String toString() { + StringBuilder retVal = new StringBuilder(super.toString()); + if (mode != 0) { + retVal.append("("); + if ((mode & MODE_INTERPRETED) == MODE_INTERPRETED) { + retVal.append(" interpreted "); + } + if ((mode & MODE_COMPILED) == MODE_COMPILED) { + retVal.append(" compiled "); + } + retVal.append(")"); + } + return retVal.toString(); + } + /* - * Convert primitive value to {@code Primitive} object to represent + * Convert primitive value to {@code PrimitiveSlot} object to represent * a local variable or an element on the operand stack of primitive type. */ - static PrimitiveValue asPrimitive(boolean value) { - return new BooleanPrimitive(value); + + static PrimitiveSlot asPrimitive(int value) { + return new PrimitiveSlot32(value); } - static PrimitiveValue asPrimitive(int value) { - return new IntPrimitive(value); + static PrimitiveSlot asPrimitive(long value) { + return new PrimitiveSlot64(value); } - static PrimitiveValue asPrimitive(short value) { - return new ShortPrimitive(value); - } - - static PrimitiveValue asPrimitive(char value) { - return new CharPrimitive(value); - } - - static PrimitiveValue asPrimitive(byte value) { - return new BytePrimitive(value); - } - - static PrimitiveValue asPrimitive(long value) { - return new LongPrimitive(value); - } - - static PrimitiveValue asPrimitive(float value) { - return new FloatPrimitive(value); - } - - static PrimitiveValue asPrimitive(double value) { - return new DoublePrimitive(value); - } - - private static class IntPrimitive extends PrimitiveValue { + private static class PrimitiveSlot32 extends PrimitiveSlot { final int value; - IntPrimitive(int value) { + PrimitiveSlot32(int value) { this.value = value; } @Override - public char type() { - return 'I'; + public int size() { + return 4; } @Override @@ -115,103 +107,15 @@ final class LiveStackFrameInfo extends StackFrameInfo implements LiveStackFrame } } - private static class ShortPrimitive extends PrimitiveValue { - final short value; - ShortPrimitive(short value) { - this.value = value; - } - - @Override - public char type() { - return 'S'; - } - - @Override - public short shortValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - } - - private static class BooleanPrimitive extends PrimitiveValue { - final boolean value; - BooleanPrimitive(boolean value) { - this.value = value; - } - - @Override - public char type() { - return 'Z'; - } - - @Override - public boolean booleanValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - } - - private static class CharPrimitive extends PrimitiveValue { - final char value; - CharPrimitive(char value) { - this.value = value; - } - - @Override - public char type() { - return 'C'; - } - - @Override - public char charValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - } - - private static class BytePrimitive extends PrimitiveValue { - final byte value; - BytePrimitive(byte value) { - this.value = value; - } - - @Override - public char type() { - return 'B'; - } - - @Override - public byte byteValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - } - - private static class LongPrimitive extends PrimitiveValue { + private static class PrimitiveSlot64 extends PrimitiveSlot { final long value; - LongPrimitive(long value) { + PrimitiveSlot64(long value) { this.value = value; } @Override - public char type() { - return 'J'; + public int size() { + return 8; } @Override @@ -224,48 +128,4 @@ final class LiveStackFrameInfo extends StackFrameInfo implements LiveStackFrame return String.valueOf(value); } } - - private static class FloatPrimitive extends PrimitiveValue { - final float value; - FloatPrimitive(float value) { - this.value = value; - } - - @Override - public char type() { - return 'F'; - } - - @Override - public float floatValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - } - - private static class DoublePrimitive extends PrimitiveValue { - final double value; - DoublePrimitive(double value) { - this.value = value; - } - - @Override - public char type() { - return 'D'; - } - - @Override - public double doubleValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - } } diff --git a/jdk/test/java/lang/StackWalker/CountLocalSlots.java b/jdk/test/java/lang/StackWalker/CountLocalSlots.java deleted file mode 100644 index dfb1698d188..00000000000 --- a/jdk/test/java/lang/StackWalker/CountLocalSlots.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 8147039 - * @summary Confirm locals[] always has expected length, even for "dead" locals - * @modules java.base/java.lang:open - * @compile LocalsAndOperands.java - * @run testng/othervm -Xcomp CountLocalSlots - */ - -import org.testng.annotations.Test; -import java.lang.StackWalker.StackFrame; - -public class CountLocalSlots { - final static boolean debug = true; - - @Test(dataProvider = "provider", dataProviderClass = LocalsAndOperands.class) - public void countLocalSlots(StackFrame... frames) { - for (StackFrame frame : frames) { - if (debug) { - System.out.println("Running countLocalSlots"); - LocalsAndOperands.dumpStackWithLocals(frames); - } - // Confirm expected number of locals - String methodName = frame.getMethodName(); - Integer expectedObj = (Integer) LocalsAndOperands.Tester.NUM_LOCALS.get(methodName); - if (expectedObj == null) { - if (!debug) { LocalsAndOperands.dumpStackWithLocals(frames); } - throw new RuntimeException("No NUM_LOCALS entry for " + - methodName + "(). Update test?"); - } - Object[] locals = (Object[]) LocalsAndOperands.invokeGetLocals(frame); - if (locals.length != expectedObj) { - if (!debug) { LocalsAndOperands.dumpStackWithLocals(frames); } - throw new RuntimeException(methodName + "(): number of locals (" + - locals.length + ") did not match expected (" + expectedObj + ")"); - } - } - } -} diff --git a/jdk/test/java/lang/StackWalker/LocalsAndOperands.java b/jdk/test/java/lang/StackWalker/LocalsAndOperands.java index ab07c7d9ad8..1b9d71b696b 100644 --- a/jdk/test/java/lang/StackWalker/LocalsAndOperands.java +++ b/jdk/test/java/lang/StackWalker/LocalsAndOperands.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,33 +23,54 @@ /* * @test - * @bug 8020968 8147039 + * @bug 8020968 8147039 8156073 * @summary Tests for locals and operands * @modules java.base/java.lang:open - * @run testng LocalsAndOperands + * @run testng/othervm -Xint -DtestUnused=true LocalsAndOperands + * @run testng/othervm -Xcomp LocalsAndOperands + * @run testng/othervm -Xcomp -XX:-TieredCompilation LocalsAndOperands */ import org.testng.annotations.*; +import static org.testng.Assert.*; import java.lang.StackWalker.StackFrame; +import static java.lang.StackWalker.Option.*; import java.lang.reflect.*; import java.util.*; import java.util.stream.*; public class LocalsAndOperands { - static final boolean debug = true; + static final boolean debug = false; + static final boolean is32bit; + static final boolean testUnused; static Class liveStackFrameClass; - static Class primitiveValueClass; + static Class primitiveSlotClass; + static Class primitiveSlot32Class; + static Class primitiveSlot64Class; + static StackWalker extendedWalker; static Method getLocals; static Method getOperands; static Method getMonitors; - static Method primitiveType; + static Method primitiveSize; + static Method primitiveLongValue; + static Method primitiveIntValue; + static Method getExtendedWalker; + + private static final long LOWER_LONG_VAL = 4L; // Lower bits + private static final long UPPER_LONG_VAL = 0x123400000000L; // Upper bits + private static final long NEG_LONG_VAL = Long.MIN_VALUE; + + private static final double LOWER_DOUBLE_VAL = Double.longBitsToDouble(0xABCDL); + private static final double UPPER_DOUBLE_VAL = Double.longBitsToDouble(0x432100000000L); static { try { liveStackFrameClass = Class.forName("java.lang.LiveStackFrame"); - primitiveValueClass = Class.forName("java.lang.LiveStackFrame$PrimitiveValue"); + primitiveSlotClass = Class.forName("java.lang.LiveStackFrame$PrimitiveSlot"); + primitiveSlot32Class = Class.forName("java.lang.LiveStackFrameInfo$PrimitiveSlot32"); + primitiveSlot64Class = Class.forName("java.lang.LiveStackFrameInfo$PrimitiveSlot64"); getLocals = liveStackFrameClass.getDeclaredMethod("getLocals"); getLocals.setAccessible(true); @@ -60,12 +81,31 @@ public class LocalsAndOperands { getMonitors = liveStackFrameClass.getDeclaredMethod("getMonitors"); getMonitors.setAccessible(true); - primitiveType = primitiveValueClass.getDeclaredMethod("type"); - primitiveType.setAccessible(true); + primitiveSize = primitiveSlotClass.getDeclaredMethod("size"); + primitiveSize.setAccessible(true); - Method method = liveStackFrameClass.getMethod("getStackWalker"); - method.setAccessible(true); - extendedWalker = (StackWalker) method.invoke(null); + primitiveLongValue = primitiveSlotClass.getDeclaredMethod("longValue"); + primitiveLongValue.setAccessible(true); + + primitiveIntValue = primitiveSlotClass.getDeclaredMethod("intValue"); + primitiveIntValue.setAccessible(true); + + getExtendedWalker = liveStackFrameClass.getMethod("getStackWalker", Set.class); + getExtendedWalker.setAccessible(true); + extendedWalker = (StackWalker) getExtendedWalker.invoke(null, + EnumSet.noneOf(StackWalker.Option.class)); + + String dataModel = System.getProperty("sun.arch.data.model"); + if ("32".equals(dataModel)) { + is32bit = true; + } else if ("64".equals(dataModel)) { + is32bit= false; + } else { + throw new RuntimeException("Weird data model:" + dataModel); + } + System.out.println("VM bits: " + dataModel); + + testUnused = System.getProperty("testUnused") != null; } catch (Throwable t) { throw new RuntimeException(t); } } @@ -80,47 +120,17 @@ public class LocalsAndOperands { * DataProviders * *****************/ - /** Calls testLocals() and provides LiveStackFrames for testLocals* methods */ + /** Calls KnownLocalsTester.testLocals* and provides LiveStackFrames */ @DataProvider - public static StackFrame[][] provider() { - return new StackFrame[][] { - new Tester().testLocals() - }; - } - - /** - * Calls testLocalsKeepAlive() and provides LiveStackFrames for testLocals* methods. - * Local variables in testLocalsKeepAlive() are ensured to not become dead. - */ - @DataProvider - public static StackFrame[][] keepAliveProvider() { - return new StackFrame[][] { - new Tester().testLocalsKeepAlive() - }; - } - - /** - * Provides StackFrames from a StackWalker without the LOCALS_AND_OPERANDS - * option. - */ - @DataProvider - public static StackFrame[][] noLocalsProvider() { - // Use default StackWalker - return new StackFrame[][] { - new Tester(StackWalker.getInstance(), true).testLocals() - }; - } - - /** - * Calls testLocals() and provides LiveStackFrames for *all* called methods, - * including test infrastructure (jtreg, testng, etc) - * - */ - @DataProvider - public static StackFrame[][] unfilteredProvider() { - return new StackFrame[][] { - new Tester(extendedWalker, false).testLocals() - }; + public static StackFrame[][] knownLocalsProvider() { + List list = new ArrayList<>(3); + list.add(new KnownLocalsTester().testLocalsKeepAlive()); + list.add(new KnownLocalsTester().testLocalsKeepAliveArgs(0xA, 'z', + "himom", 0x3FF00000000L + 0xFFFF, Math.PI)); + if (testUnused) { + list.add(new KnownLocalsTester().testLocalsUnused()); + } + return list.toArray(new StackFrame[1][1]); } /**************** @@ -128,135 +138,123 @@ public class LocalsAndOperands { ****************/ /** - * Check for expected local values and types in the LiveStackFrame + * Check for expected local values in the LiveStackFrame */ - @Test(dataProvider = "keepAliveProvider") + @Test(dataProvider = "knownLocalsProvider") public static void checkLocalValues(StackFrame... frames) { - if (debug) { - System.out.println("Running checkLocalValues"); - dumpStackWithLocals(frames); - } - Arrays.stream(frames).filter(f -> f.getMethodName() - .equals("testLocalsKeepAlive")) - .forEach( - f -> { - Object[] locals = invokeGetLocals(f); - for (int i = 0; i < locals.length; i++) { - // Value - String expected = Tester.LOCAL_VALUES[i]; - Object observed = locals[i]; - if (expected != null /* skip nulls in golden values */ && - !expected.equals(observed.toString())) { - System.err.println("Local value mismatch:"); - if (!debug) { dumpStackWithLocals(frames); } - throw new RuntimeException("local " + i + " value is " + - observed + ", expected " + expected); - } - - // Type - expected = Tester.LOCAL_TYPES[i]; - observed = type(locals[i]); - if (expected != null /* skip nulls in golden values */ && - !expected.equals(observed)) { - System.err.println("Local type mismatch:"); - if (!debug) { dumpStackWithLocals(frames); } - throw new RuntimeException("local " + i + " type is " + - observed + ", expected " + expected); - } - } - } - ); + dumpFramesIfDebug(frames); + try { + Stream.of(frames) + .filter(f -> KnownLocalsTester.TEST_METHODS.contains(f.getMethodName())) + .forEach(LocalsAndOperands::checkFrameLocals); + } catch (Exception e) { dumpFramesIfNotDebug(frames); throw e; } } /** - * Basic sanity check for locals and operands + * Check the locals in the given StackFrame against the expected values. */ - @Test(dataProvider = "provider") - public static void sanityCheck(StackFrame... frames) { - if (debug) { - System.out.println("Running sanityCheck"); - } - try { - Stream stream = Arrays.stream(frames); - if (debug) { - stream.forEach(LocalsAndOperands::printLocals); + private static void checkFrameLocals(StackFrame f) { + Object[] expectedArray = KnownLocalsTester.LOCAL_VALUES; + Object[] locals = invokeGetLocals(f); + + for (int i = 0; i < locals.length; i++) { + Object expected = expectedArray[i]; + Object observed = locals[i]; + + if (expected == null) { /* skip nulls in golden values */ + continue; + } else if (expected instanceof KnownLocalsTester.TwoSlotValue) { + // confirm integrity of expected values + assertEquals(expectedArray[i+1], null, + "Malformed array of expected values - slot after TwoSlotValue should be null"); + assertLongIsInSlots(locals[i], locals[i+1], + ((KnownLocalsTester.TwoSlotValue)expected).value); + i++; // skip following slot + } else if (primitiveSlotClass.isInstance(observed)) { // single slot primitive + assertTrue(primitiveValueEquals(observed, expected), + "Local value mismatch: local " + i + " value is " + + observed + ", expected " + expected); + } else if (expected instanceof Class) { + assertTrue(((Class)expected).isInstance(observed), + "Local value mismatch: local " + i + " expected instancof " + + expected + " but got " + observed); + } else if (expected instanceof String) { + assertEquals(expected, observed, "Local value mismatch: local " + + i + " value is " + observed + ", expected " + expected); } else { - System.out.println(stream.count() + " frames"); + throw new RuntimeException("Unrecognized expected local value " + + i + ": " + expected); } - } catch (Throwable t) { - dumpStackWithLocals(frames); - throw t; } } /** * Sanity check for locals and operands, including testng/jtreg frames + * using all StackWalker options. */ - @Test(dataProvider = "unfilteredProvider") - public static void unfilteredSanityCheck(StackFrame... frames) { + @Test + public synchronized void fullStackSanityCheck() throws Throwable { if (debug) { - System.out.println("Running unfilteredSanityCheck"); + System.out.println("Running fullStackSanityCheck"); } - try { - Stream stream = Arrays.stream(frames); + StackWalker sw = (StackWalker) getExtendedWalker.invoke(null, + EnumSet.of(SHOW_HIDDEN_FRAMES, SHOW_REFLECT_FRAMES, + RETAIN_CLASS_REFERENCE)); + sw.forEach(f -> { if (debug) { - stream.forEach(f -> { System.out.println(f + ": " + - invokeGetLocals(f).length + " locals"); } ); + printLocals(f); } else { - System.out.println(stream.count() + " frames"); + try { + System.out.println(" " + f + ": " + + ((Object[]) getLocals.invoke(f)).length + " locals, " + + ((Object[]) getOperands.invoke(f)).length + " operands, " + + ((Object[]) getMonitors.invoke(f)).length + " monitors"); + } catch (IllegalAccessException|InvocationTargetException t) { + throw new RuntimeException(t); + } } - } catch (Throwable t) { - dumpStackWithLocals(frames); - throw t; - } + }); } /** * Test that LiveStackFrames are not provided with the default StackWalker * options. */ - @Test(dataProvider = "noLocalsProvider") - public static void withoutLocalsAndOperands(StackFrame... frames) { - for (StackFrame frame : frames) { - if (liveStackFrameClass.isInstance(frame)) { - throw new RuntimeException("should not be LiveStackFrame"); - } - } + @Test + public static void noLocalsSanityCheck() { + StackWalker sw = StackWalker.getInstance(); + sw.forEach(f -> { + assertFalse(liveStackFrameClass.isInstance(f), + "should not be LiveStackFrame"); + }); } - static class Tester { + /** + * Class stack-walking methods with a known set of methods and local variables. + */ + static class KnownLocalsTester { private StackWalker walker; - private boolean filter = true; // Filter out testng/jtreg/etc frames? - Tester() { + KnownLocalsTester() { this.walker = extendedWalker; } - Tester(StackWalker walker, boolean filter) { - this.walker = walker; - this.filter = filter; - } - /** * Perform stackwalk without keeping local variables alive and return an * array of the collected StackFrames */ - private synchronized StackFrame[] testLocals() { + private synchronized StackFrame[] testLocalsUnused() { // Unused local variables will become dead - int x = 10; - char c = 'z'; + int x = 0xA; + char c = 'z'; // 0x7A String hi = "himom"; - long l = 1000000L; - double d = 3.1415926; + long l = 0x3FF00000000L + 0xFFFFL; + double d = Math.PI; - if (filter) { - return walker.walk(s -> s.filter(f -> TEST_METHODS.contains(f - .getMethodName())).collect(Collectors.toList())) - .toArray(new StackFrame[0]); - } else { - return walker.walk(s -> s.collect(Collectors.toList())) - .toArray(new StackFrame[0]); - } + return walker.walk(s -> + s.filter(f -> TEST_METHODS.contains(f.getMethodName())) + .toArray(StackFrame[]::new) + ); } /** @@ -264,64 +262,153 @@ public class LocalsAndOperands { * the collected StackFrames */ private synchronized StackFrame[] testLocalsKeepAlive() { - int x = 10; - char c = 'z'; + int x = 0xA; + char c = 'z'; // 0x7A String hi = "himom"; - long l = 1000000L; - double d = 3.1415926; + long l = 0x3FF00000000L + 0xFFFFL; + double d = Math.PI; - List frames; - if (filter) { - frames = walker.walk(s -> s.filter(f -> TEST_METHODS.contains(f - .getMethodName())).collect(Collectors.toList())); - } else { - frames = walker.walk(s -> s.collect(Collectors.toList())); - } + StackFrame[] frames = walker.walk(s -> + s.filter(f -> TEST_METHODS.contains(f.getMethodName())) + .toArray(StackFrame[]::new) + ); // Use local variables so they stay alive - System.out.println("Stayin' alive: "+x+" "+c+" "+hi+" "+l+" "+d); - return frames.toArray(new StackFrame[0]); // FIXME: convert to Array here + System.out.println("Stayin' alive: "+this+" "+x+" "+c+" "+hi+" "+l+" "+d); + return frames; } - // Expected values for locals in testLocals() & testLocalsKeepAlive() - // TODO: use real values instead of Strings, rebuild doubles & floats, etc - private final static String[] LOCAL_VALUES = new String[] { - null, // skip, LocalsAndOperands$Tester@XXX identity is different each run - "10", - "122", + /** + * Perform stackwalk, keeping method arguments alive, and return a list of + * the collected StackFrames + */ + private synchronized StackFrame[] testLocalsKeepAliveArgs(int x, char c, + String hi, long l, + double d) { + StackFrame[] frames = walker.walk(s -> + s.filter(f -> TEST_METHODS.contains(f.getMethodName())) + .toArray(StackFrame[]::new) + ); + + // Use local variables so they stay alive + System.out.println("Stayin' alive: "+this+" "+x+" "+c+" "+hi+" "+l+" "+d); + return frames; + } + + // An expected two-slot local (i.e. long or double) + static class TwoSlotValue { + public long value; + public TwoSlotValue(long value) { this.value = value; } + } + + // Expected values for locals in KnownLocalsTester.testLocals* methods + private final static Object[] LOCAL_VALUES = new Object[] { + LocalsAndOperands.KnownLocalsTester.class, + Integer.valueOf(0xA), + Integer.valueOf(0x7A), "himom", - "0", - null, // skip, fix in 8156073 - null, // skip, fix in 8156073 - null, // skip, fix in 8156073 - "0" + new TwoSlotValue(0x3FF00000000L + 0xFFFFL), + null, // 2nd slot + new TwoSlotValue(Double.doubleToRawLongBits(Math.PI)), + null, // 2nd slot + Integer.valueOf(0) }; - // Expected types for locals in testLocals() & testLocalsKeepAlive() - // TODO: use real types - private final static String[] LOCAL_TYPES = new String[] { - null, // skip - "I", - "I", - "java.lang.String", - "I", - "I", - "I", - "I", - "I" - }; - - final static Map NUM_LOCALS = Map.of("testLocals", 8, - "testLocalsKeepAlive", - LOCAL_VALUES.length); - private final static Collection TEST_METHODS = NUM_LOCALS.keySet(); + private final static List TEST_METHODS = + List.of("testLocalsUnused", + "testLocalsKeepAlive", + "testLocalsKeepAliveArgs"); } + /* Simpler tests of long & double arguments */ + + @Test + public static void testUsedLongArg() throws Exception { + usedLong(LOWER_LONG_VAL); + usedLong(UPPER_LONG_VAL); + usedLong(NEG_LONG_VAL); + } + + private static void usedLong(long longArg) throws Exception { + StackFrame[] frames = extendedWalker.walk(s -> + s.filter(f -> "usedLong".equals(f.getMethodName())) + .toArray(StackFrame[]::new) + ); + try { + dumpFramesIfDebug(frames); + + Object[] locals = (Object[]) getLocals.invoke(frames[0]); + assertLongIsInSlots(locals[0], locals[1], longArg); + System.out.println("Stayin' alive: " + longArg); + } catch (Exception t) { + dumpFramesIfNotDebug(frames); + throw t; + } + } + + @Test + public static void testUnusedLongArg() throws Exception { + if (testUnused) { + unusedLong(NEG_LONG_VAL); + } + } + + private static void unusedLong(long longArg) throws Exception { + StackFrame[] frames = extendedWalker.walk(s -> + s.filter(f -> "unusedLong".equals(f.getMethodName())) + .toArray(StackFrame[]::new) + ); + try { + dumpFramesIfDebug(frames); + + final Object[] locals = (Object[]) getLocals.invoke(frames[0]); + assertLongIsInSlots(locals[0], locals[1], NEG_LONG_VAL); + } catch (Exception t) { + dumpFramesIfNotDebug(frames); + throw t; + } + } + + @Test + public static void testUsedDoubleArg() throws Exception { + usedDouble(LOWER_DOUBLE_VAL); + usedDouble(UPPER_DOUBLE_VAL); + } + + private static void usedDouble(double doubleArg) throws Exception { + StackFrame[] frames = extendedWalker.walk(s -> + s.filter(f -> "usedDouble".equals(f.getMethodName())) + .toArray(StackFrame[]::new) + ); + try { + dumpFramesIfDebug(frames); + + Object[] locals = (Object[]) getLocals.invoke(frames[0]); + assertDoubleIsInSlots(locals[0], locals[1], doubleArg); + System.out.println("Stayin' alive: " + doubleArg); + } catch (Exception t) { + dumpFramesIfNotDebug(frames); + throw t; + } + } + + /******************* + * Utility Methods * + *******************/ + /** * Print stack trace with locals */ public static void dumpStackWithLocals(StackFrame...frames) { - Arrays.stream(frames).forEach(LocalsAndOperands::printLocals); + Stream.of(frames).forEach(LocalsAndOperands::printLocals); + } + + public static void dumpFramesIfDebug(StackFrame...frames) { + if (debug) { dumpStackWithLocals(frames); } + } + + public static void dumpFramesIfNotDebug(StackFrame...frames) { + if (!debug) { dumpStackWithLocals(frames); } } /** @@ -329,10 +416,21 @@ public class LocalsAndOperands { */ public static void printLocals(StackWalker.StackFrame frame) { try { - System.out.println(frame); + System.out.println("Locals for: " + frame); Object[] locals = (Object[]) getLocals.invoke(frame); for (int i = 0; i < locals.length; i++) { - System.out.format(" local %d: %s type %s\n", i, locals[i], type(locals[i])); + String localStr = null; + + if (primitiveSlot64Class.isInstance(locals[i])) { + localStr = String.format("0x%X", + (Long)primitiveLongValue.invoke(locals[i])); + } else if (primitiveSlot32Class.isInstance(locals[i])) { + localStr = String.format("0x%X", + (Integer)primitiveIntValue.invoke(locals[i])); + } else if (locals[i] != null) { + localStr = locals[i].toString(); + } + System.out.format(" local %d: %s type %s\n", i, localStr, type(locals[i])); } Object[] operands = (Object[]) getOperands.invoke(frame); @@ -352,12 +450,87 @@ public class LocalsAndOperands { try { if (o == null) { return "null"; - } else if (primitiveValueClass.isInstance(o)) { - char c = (char)primitiveType.invoke(o); - return String.valueOf(c); + } else if (primitiveSlotClass.isInstance(o)) { + int s = (int)primitiveSize.invoke(o); + return s + "-byte primitive"; } else { return o.getClass().getName(); } } catch(Exception e) { throw new RuntimeException(e); } } + + /* + * Check if the PrimitiveValue "primVal" contains the specified value, + * either a Long or an Integer. + */ + static boolean primitiveValueEquals(Object primVal, Object expectedVal) { + try { + if (expectedVal instanceof Long) { + assertFalse(is32bit); + assertTrue(primitiveSlot64Class.isInstance(primVal)); + assertTrue(8 == (int)primitiveSize.invoke(primVal)); + return Objects.equals(primitiveLongValue.invoke(primVal), expectedVal); + } else if (expectedVal instanceof Integer) { + int expectedInt = (Integer)expectedVal; + if (is32bit) { + assertTrue(primitiveSlot32Class.isInstance(primVal), + "expected a PrimitiveSlot32 on 32-bit VM"); + assertTrue(4 == (int)primitiveSize.invoke(primVal)); + return expectedInt == (int)primitiveIntValue.invoke(primVal); + } else { + assertTrue(primitiveSlot64Class.isInstance(primVal), + "expected a PrimitiveSlot64 on 64-bit VM"); + assertTrue(8 == (int)primitiveSize.invoke(primVal)); + // Look for int expectedVal in high- or low-order 32 bits + long primValLong = (long)primitiveLongValue.invoke(primVal); + return (int)(primValLong & 0x00000000FFFFFFFFL) == expectedInt || + (int)(primValLong >>> 32) == expectedInt; + } + } else { + throw new RuntimeException("Called with non-Integer/Long: " + expectedVal); + } + } catch (IllegalAccessException|InvocationTargetException e) { + throw new RuntimeException(e); + } + + } + + /* + * Assert that the expected 2-slot long value is stored somewhere in the + * pair of slots. + * Throw exception if long value isn't in the two slots given. + * Accounts for 32 vs 64 bit, but is lax on endianness (accepts either) + */ + static void assertLongIsInSlots(Object primVal0, Object primVal1, long expected) { + try { + if (is32bit) { + int upper = (int)(expected & 0xFFFFFFFFL); + int lower = (int)(expected >> 32); + + if (!((primitiveValueEquals(primVal0, upper) && + primitiveValueEquals(primVal1, lower)) || + (primitiveValueEquals(primVal0, lower) && + primitiveValueEquals(primVal1, upper)))) { + throw new RuntimeException(String.format("0x%X and 0x%X of 0x%016X not found in 0x%X and 0x%X", + upper, lower, expected, + (int)primitiveIntValue.invoke(primVal0), + (int)primitiveIntValue.invoke(primVal1))); + } + } else { + if (!(primitiveValueEquals(primVal0, expected) || + primitiveValueEquals(primVal1, expected))) { + throw new RuntimeException(String.format("0x%016X not found in 0x%016X or 0x%016X", + expected, + (long)primitiveLongValue.invoke(primVal0), + (long)primitiveLongValue.invoke(primVal1))); + } + } + } catch (IllegalAccessException|InvocationTargetException e) { + throw new RuntimeException(e); + } + } + + static void assertDoubleIsInSlots(Object primVal0, Object primVal1, double expected) { + assertLongIsInSlots(primVal0, primVal1, Double.doubleToRawLongBits(expected)); + } } diff --git a/jdk/test/java/lang/StackWalker/LocalsCrash.java b/jdk/test/java/lang/StackWalker/LocalsCrash.java deleted file mode 100644 index 178e07c34f3..00000000000 --- a/jdk/test/java/lang/StackWalker/LocalsCrash.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 8147039 - * @summary Test for -Xcomp crash that happened before 8147039 fix - * @modules java.base/java.lang:open - * @run testng/othervm -Xcomp LocalsCrash - */ - -import org.testng.annotations.*; -import java.lang.reflect.*; -import java.util.List; -import java.util.stream.Collectors; - -public class LocalsCrash { - static Class liveStackFrameClass; - static Method getStackWalker; - - static { - try { - liveStackFrameClass = Class.forName("java.lang.LiveStackFrame"); - getStackWalker = liveStackFrameClass.getMethod("getStackWalker"); - getStackWalker.setAccessible(true); - } catch (Throwable t) { throw new RuntimeException(t); } - } - - private StackWalker walker; - - LocalsCrash() { - try { - walker = (StackWalker) getStackWalker.invoke(null); - } catch (Exception e) { throw new RuntimeException(e); } - } - - @Test - public void test00() { doStackWalk(); } - - @Test - public void test01() { doStackWalk(); } - - private synchronized List doStackWalk() { - try { - // Unused local variables will become dead - int x = 10; - char c = 'z'; - String hi = "himom"; - long l = 1000000L; - double d = 3.1415926; - - return walker.walk(s -> s.collect(Collectors.toList())); - } catch (Exception e) { throw new RuntimeException(e); } - } -} From 3c01d5813da779037e0af62a775136b0ea5c5cef Mon Sep 17 00:00:00 2001 From: David Holmes Date: Tue, 31 Jan 2017 19:26:10 -0500 Subject: [PATCH 048/447] 8173421: Obsolete and expired flags for JDK 10 need to be removed and related tests updated Reviewed-by: mchung --- .../sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java | 6 +++--- .../java/lang/management/MemoryMXBean/LowMemoryTest.java | 3 +-- .../java/lang/management/MemoryMXBean/LowMemoryTest2.sh | 6 +++--- .../lang/management/MemoryMXBean/ResetPeakMemoryUsage.java | 3 +-- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java index 1f98e2b6709..9095e618d5c 100644 --- a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java +++ b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -62,7 +62,7 @@ public class CheckOrigin { ProcessBuilder pb = ProcessTools. createJavaProcessBuilder( "--add-exports", "jdk.attach/sun.tools.attach=ALL-UNNAMED", - "-XX:+UseConcMarkSweepGC", // this will cause UseParNewGC to be FLAG_SET_ERGO + "-XX:+UseConcMarkSweepGC", // this will cause MaxNewSize to be FLAG_SET_ERGO "-XX:+UseCodeAging", "-XX:+UseCerealGC", // Should be ignored. "-XX:Flags=" + flagsFile.getAbsolutePath(), @@ -109,7 +109,7 @@ public class CheckOrigin { // Set through j.l.m checkOrigin("HeapDumpOnOutOfMemoryError", Origin.MANAGEMENT); // Should be set by the VM, when we set UseConcMarkSweepGC - checkOrigin("UseParNewGC", Origin.ERGONOMIC); + checkOrigin("MaxNewSize", Origin.ERGONOMIC); // Set using attach checkOrigin("HeapDumpPath", Origin.ATTACH_ON_DEMAND); } diff --git a/jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest.java b/jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest.java index 6d4fae0b632..13bc563932a 100644 --- a/jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest.java +++ b/jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,7 +36,6 @@ * @run main/timeout=600 LowMemoryTest * @requires vm.gc == "null" * @requires vm.opt.ExplicitGCInvokesConcurrent != "true" - * @requires vm.opt.ExplicitGCInvokesConcurrentAndUnloadsClasses != "true" * @requires vm.opt.DisableExplicitGC != "true" */ diff --git a/jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest2.sh b/jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest2.sh index ee3a351dd68..49942bca900 100644 --- a/jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest2.sh +++ b/jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest2.sh @@ -1,5 +1,5 @@ # -# Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -53,12 +53,12 @@ go() { # Run test with each GC configuration # # Notes: To ensure that metaspace fills up we disable class unloading. -# Also we set the max metaspace to 8MB - otherwise the test takes too +# Also we set the max metaspace to 16MB - otherwise the test takes too # long to run. go -noclassgc -XX:MaxMetaspaceSize=16m -XX:+UseSerialGC LowMemoryTest2 go -noclassgc -XX:MaxMetaspaceSize=16m -XX:+UseParallelGC LowMemoryTest2 -go -noclassgc -XX:MaxMetaspaceSize=16m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC LowMemoryTest2 +go -noclassgc -XX:MaxMetaspaceSize=16m -XX:+UseConcMarkSweepGC LowMemoryTest2 # Test class metaspace - might hit MaxMetaspaceSize instead if # UseCompressedClassPointers is off or if 32 bit. diff --git a/jdk/test/java/lang/management/MemoryMXBean/ResetPeakMemoryUsage.java b/jdk/test/java/lang/management/MemoryMXBean/ResetPeakMemoryUsage.java index 2d52eeb4299..0d223c87dd6 100644 --- a/jdk/test/java/lang/management/MemoryMXBean/ResetPeakMemoryUsage.java +++ b/jdk/test/java/lang/management/MemoryMXBean/ResetPeakMemoryUsage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,7 +37,6 @@ * @build jdk.testlibrary.* ResetPeakMemoryUsage MemoryUtil RunUtil * @run main ResetPeakMemoryUsage * @requires vm.opt.ExplicitGCInvokesConcurrent != "true" - * @requires vm.opt.ExplicitGCInvokesConcurrentAndUnloadsClasses != "true" * @requires vm.opt.DisableExplicitGC != "true" */ From fe4d1bb6021ec7d315fb6b7a870e49f2c7e40721 Mon Sep 17 00:00:00 2001 From: David Holmes Date: Tue, 31 Jan 2017 19:26:50 -0500 Subject: [PATCH 049/447] 8173421: Obsolete and expired flags for JDK 10 need to be removed and related tests updated Reviewed-by: lfoltan, mikael, dcubed --- .../src/cpu/aarch64/vm/c1_globals_aarch64.hpp | 6 +- .../src/cpu/aarch64/vm/c2_globals_aarch64.hpp | 3 +- .../sun/jvm/hotspot/tools/HeapSummary.java | 10 +- hotspot/src/os/solaris/vm/os_solaris.cpp | 13 +-- .../gc/cms/concurrentMarkSweepGeneration.cpp | 17 +--- hotspot/src/share/vm/oops/method.cpp | 3 +- hotspot/src/share/vm/prims/jvm.cpp | 24 +---- hotspot/src/share/vm/runtime/arguments.cpp | 95 ++----------------- hotspot/src/share/vm/runtime/arguments.hpp | 5 +- hotspot/src/share/vm/runtime/globals.hpp | 28 +----- hotspot/test/TEST.groups | 5 +- ...tGCInvokesConcurrentAndUnloadsClasses.java | 48 ---------- .../gc/arguments/TestSelectDefaultGC.java | 3 +- .../gc/startup_warnings/TestDefNewCMS.java | 47 --------- .../gc/startup_warnings/TestParNewCMS.java | 48 ---------- .../startup_warnings/TestParNewSerialOld.java | 48 ---------- .../TestUseAutoGCSelectPolicy.java | 47 --------- .../CommandLine/ObsoleteFlagErrorMessage.java | 12 +-- .../runtime/CommandLine/VMAliasOptions.java | 7 +- .../CommandLine/VMDeprecatedOptions.java | 10 +- hotspot/test/runtime/NMT/AutoshutdownNMT.java | 47 --------- 21 files changed, 36 insertions(+), 490 deletions(-) delete mode 100644 hotspot/test/gc/arguments/TestExplicitGCInvokesConcurrentAndUnloadsClasses.java delete mode 100644 hotspot/test/gc/startup_warnings/TestDefNewCMS.java delete mode 100644 hotspot/test/gc/startup_warnings/TestParNewCMS.java delete mode 100644 hotspot/test/gc/startup_warnings/TestParNewSerialOld.java delete mode 100644 hotspot/test/gc/startup_warnings/TestUseAutoGCSelectPolicy.java delete mode 100644 hotspot/test/runtime/NMT/AutoshutdownNMT.java diff --git a/hotspot/src/cpu/aarch64/vm/c1_globals_aarch64.hpp b/hotspot/src/cpu/aarch64/vm/c1_globals_aarch64.hpp index 71d7819561e..3177a8980b9 100644 --- a/hotspot/src/cpu/aarch64/vm/c1_globals_aarch64.hpp +++ b/hotspot/src/cpu/aarch64/vm/c1_globals_aarch64.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, Red Hat Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -45,10 +45,8 @@ define_pd_global(bool, TieredCompilation, false); // We compile very aggressively with the builtin simulator because // doing so greatly reduces run times and tests more code. define_pd_global(intx, CompileThreshold, 150 ); -define_pd_global(intx, BackEdgeThreshold, 500); #else define_pd_global(intx, CompileThreshold, 1500 ); -define_pd_global(intx, BackEdgeThreshold, 100000); #endif define_pd_global(intx, OnStackReplacePercentage, 933 ); @@ -76,6 +74,4 @@ define_pd_global(bool, OptimizeSinglePrecision, true ); define_pd_global(bool, CSEArrayLength, false); define_pd_global(bool, TwoOperandLIRForm, false ); -define_pd_global(intx, SafepointPollOffset, 0 ); - #endif // CPU_AARCH64_VM_C1_GLOBALS_AARCH64_HPP diff --git a/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp b/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp index 9a16dd76967..5a5d8ac4f95 100644 --- a/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp +++ b/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, Red Hat Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -43,7 +43,6 @@ define_pd_global(bool, UseOnStackReplacement, true); define_pd_global(bool, ProfileInterpreter, true); define_pd_global(bool, TieredCompilation, trueInTiered); define_pd_global(intx, CompileThreshold, 10000); -define_pd_global(intx, BackEdgeThreshold, 100000); define_pd_global(intx, OnStackReplacePercentage, 140); define_pd_global(intx, ConditionalMoveLimit, 3); diff --git a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/HeapSummary.java b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/HeapSummary.java index 643109bc1e9..09a382f9439 100644 --- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/HeapSummary.java +++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/HeapSummary.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -150,13 +150,7 @@ public class HeapSummary extends Tool { // Helper methods private void printGCAlgorithm(Map flagMap) { - // print about new generation - long l = getFlagValue("UseParNewGC", flagMap); - if (l == 1L) { - System.out.println("using parallel threads in the new generation."); - } - - l = getFlagValue("UseTLAB", flagMap); + long l = getFlagValue("UseTLAB", flagMap); if (l == 1L) { System.out.println("using thread-local object allocation."); } diff --git a/hotspot/src/os/solaris/vm/os_solaris.cpp b/hotspot/src/os/solaris/vm/os_solaris.cpp index 527246dcc3d..adbec4e459e 100644 --- a/hotspot/src/os/solaris/vm/os_solaris.cpp +++ b/hotspot/src/os/solaris/vm/os_solaris.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -3050,15 +3050,12 @@ void os::naked_yield() { thr_yield(); } -// Interface for setting lwp priorities. If we are using T2 libthread, -// which forces the use of BoundThreads or we manually set UseBoundThreads, -// all of our threads will be assigned to real lwp's. Using the thr_setprio -// function is meaningless in this mode so we must adjust the real lwp's priority +// Interface for setting lwp priorities. We are using T2 libthread, +// which forces the use of bound threads, so all of our threads will +// be assigned to real lwp's. Using the thr_setprio function is +// meaningless in this mode so we must adjust the real lwp's priority. // The routines below implement the getting and setting of lwp priorities. // -// Note: T2 is now the only supported libthread. UseBoundThreads flag is -// being deprecated and all threads are now BoundThreads -// // Note: There are three priority scales used on Solaris. Java priotities // which range from 1 to 10, libthread "thr_setprio" scale which range // from 0 to 127, and the current scheduling class of the process we diff --git a/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp b/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp index 1cc6a5ea1e9..4effbf42d11 100644 --- a/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp +++ b/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -488,9 +488,6 @@ CMSCollector::CMSCollector(ConcurrentMarkSweepGeneration* cmsGen, _gc_timer_cm(new (ResourceObj::C_HEAP, mtGC) ConcurrentGCTimer()), _cms_start_registered(false) { - if (ExplicitGCInvokesConcurrentAndUnloadsClasses) { - ExplicitGCInvokesConcurrent = true; - } // Now expand the span and allocate the collection support structures // (MUT, marking bit map etc.) to cover both generations subject to // collection. @@ -2559,10 +2556,8 @@ void CMSCollector::verify_overflow_empty() const { // Decide if we want to enable class unloading as part of the // ensuing concurrent GC cycle. We will collect and // unload classes if it's the case that: -// (1) an explicit gc request has been made and the flag -// ExplicitGCInvokesConcurrentAndUnloadsClasses is set, OR -// (2) (a) class unloading is enabled at the command line, and -// (b) old gen is getting really full +// (a) class unloading is enabled at the command line, and +// (b) old gen is getting really full // NOTE: Provided there is no change in the state of the heap between // calls to this method, it should have idempotent results. Moreover, // its results should be monotonically increasing (i.e. going from 0 to 1, @@ -2575,11 +2570,7 @@ void CMSCollector::verify_overflow_empty() const { // below. void CMSCollector::update_should_unload_classes() { _should_unload_classes = false; - // Condition 1 above - if (_full_gc_requested && ExplicitGCInvokesConcurrentAndUnloadsClasses) { - _should_unload_classes = true; - } else if (CMSClassUnloadingEnabled) { // Condition 2.a above - // Disjuncts 2.b.(i,ii,iii) above + if (CMSClassUnloadingEnabled) { _should_unload_classes = (concurrent_cycles_since_last_unload() >= CMSClassUnloadingMaxInterval) || _cmsGen->is_too_full(); diff --git a/hotspot/src/share/vm/oops/method.cpp b/hotspot/src/share/vm/oops/method.cpp index 4e3dcf03bd8..6739975662d 100644 --- a/hotspot/src/share/vm/oops/method.cpp +++ b/hotspot/src/share/vm/oops/method.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2200,7 +2200,6 @@ void Method::print_on(outputStream* st) const { ResourceMark rm; assert(is_method(), "must be method"); st->print_cr("%s", internal_name()); - // get the effect of PrintOopAddress, always, for methods: st->print_cr(" - this oop: " INTPTR_FORMAT, p2i(this)); st->print (" - method holder: "); method_holder()->print_value_on(st); st->cr(); st->print (" - constants: " INTPTR_FORMAT " ", p2i(constants())); diff --git a/hotspot/src/share/vm/prims/jvm.cpp b/hotspot/src/share/vm/prims/jvm.cpp index 6a1b4dda087..68cba128660 100644 --- a/hotspot/src/share/vm/prims/jvm.cpp +++ b/hotspot/src/share/vm/prims/jvm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2972,14 +2972,7 @@ JVM_ENTRY(void, JVM_Yield(JNIEnv *env, jclass threadClass)) JVMWrapper("JVM_Yield"); if (os::dont_yield()) return; HOTSPOT_THREAD_YIELD(); - - // When ConvertYieldToSleep is off (default), this matches the classic VM use of yield. - // Critical for similar threading behaviour - if (ConvertYieldToSleep) { - os::sleep(thread, MinSleepInterval, false); - } else { - os::naked_yield(); - } + os::naked_yield(); JVM_END @@ -3003,18 +2996,7 @@ JVM_ENTRY(void, JVM_Sleep(JNIEnv* env, jclass threadClass, jlong millis)) EventThreadSleep event; if (millis == 0) { - // When ConvertSleepToYield is on, this matches the classic VM implementation of - // JVM_Sleep. Critical for similar threading behaviour (Win32) - // It appears that in certain GUI contexts, it may be beneficial to do a short sleep - // for SOLARIS - if (ConvertSleepToYield) { - os::naked_yield(); - } else { - ThreadState old_state = thread->osthread()->get_state(); - thread->osthread()->set_state(SLEEPING); - os::sleep(thread, MinSleepInterval, false); - thread->osthread()->set_state(old_state); - } + os::naked_yield(); } else { ThreadState old_state = thread->osthread()->get_state(); thread->osthread()->set_state(SLEEPING); diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp index e7e91083416..d84ea0a64bf 100644 --- a/hotspot/src/share/vm/runtime/arguments.cpp +++ b/hotspot/src/share/vm/runtime/arguments.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -375,53 +375,17 @@ static SpecialFlag const special_jvm_flags[] = { // -------------- Deprecated Flags -------------- // --- Non-alias flags - sorted by obsolete_in then expired_in: { "MaxGCMinorPauseMillis", JDK_Version::jdk(8), JDK_Version::undefined(), JDK_Version::undefined() }, - { "AutoGCSelectPauseMillis", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) }, - { "UseAutoGCSelectPolicy", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) }, - { "UseParNewGC", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) }, - { "ExplicitGCInvokesConcurrentAndUnloadsClasses", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) }, - { "ConvertSleepToYield", JDK_Version::jdk(9), JDK_Version::jdk(10), JDK_Version::jdk(11) }, - { "ConvertYieldToSleep", JDK_Version::jdk(9), JDK_Version::jdk(10), JDK_Version::jdk(11) }, // --- Deprecated alias flags (see also aliased_jvm_flags) - sorted by obsolete_in then expired_in: { "DefaultMaxRAMFraction", JDK_Version::jdk(8), JDK_Version::undefined(), JDK_Version::undefined() }, { "CreateMinidumpOnCrash", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::undefined() }, - { "CMSMarkStackSizeMax", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) }, - { "CMSMarkStackSize", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) }, - { "G1MarkStackSize", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) }, - { "ParallelMarkingThreads", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) }, - { "ParallelCMSThreads", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) }, // -------------- Obsolete Flags - sorted by expired_in -------------- - { "UseOldInlining", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "SafepointPollOffset", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "UseBoundThreads", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "DefaultThreadPriority", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "NoYieldsInMicrolock", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "BackEdgeThreshold", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "UseNewReflection", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "ReflectionWrapResolutionErrors",JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "VerifyReflectionBytecodes", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "AutoShutdownNMT", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "NmethodSweepFraction", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "NmethodSweepCheckInterval", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "CodeCacheMinimumFreeSpace", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, -#ifndef ZERO - { "UseFastAccessorMethods", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "UseFastEmptyMethods", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, -#endif // ZERO - { "UseCompilerSafepoints", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "AdaptiveSizePausePolicy", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "ParallelGCRetainPLAB", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "ThreadSafetyMargin", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "LazyBootClassLoader", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "StarvationMonitorInterval", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "PreInflateSpin", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "JNIDetachReleasesMonitors", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "UseAltSigs", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "SegmentedHeapDumpThreshold", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "PrintOopAddress", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) }, - { "PermSize", JDK_Version::undefined(), JDK_Version::jdk(8), JDK_Version::jdk(10) }, - { "MaxPermSize", JDK_Version::undefined(), JDK_Version::jdk(8), JDK_Version::jdk(10) }, + { "ConvertSleepToYield", JDK_Version::jdk(9), JDK_Version::jdk(10), JDK_Version::jdk(11) }, + { "ConvertYieldToSleep", JDK_Version::jdk(9), JDK_Version::jdk(10), JDK_Version::jdk(11) }, + { "MinSleepInterval", JDK_Version::jdk(9), JDK_Version::jdk(10), JDK_Version::jdk(11) }, + { "PermSize", JDK_Version::undefined(), JDK_Version::jdk(8), JDK_Version::undefined() }, + { "MaxPermSize", JDK_Version::undefined(), JDK_Version::jdk(8), JDK_Version::undefined() }, #ifdef TEST_VERIFY_SPECIAL_JVM_FLAGS { "dep > obs", JDK_Version::jdk(9), JDK_Version::jdk(8), JDK_Version::undefined() }, @@ -444,11 +408,6 @@ typedef struct { static AliasedFlag const aliased_jvm_flags[] = { { "DefaultMaxRAMFraction", "MaxRAMFraction" }, - { "CMSMarkStackSizeMax", "MarkStackSizeMax" }, - { "CMSMarkStackSize", "MarkStackSize" }, - { "G1MarkStackSize", "MarkStackSize" }, - { "ParallelMarkingThreads", "ConcGCThreads" }, - { "ParallelCMSThreads", "ConcGCThreads" }, { "CreateMinidumpOnCrash", "CreateCoredumpOnCrash" }, { NULL, NULL} }; @@ -1547,7 +1506,6 @@ void Arguments::set_parnew_gc_flags() { assert(!UseSerialGC && !UseParallelOldGC && !UseParallelGC && !UseG1GC, "control point invariant"); assert(UseConcMarkSweepGC, "CMS is expected to be on here"); - assert(UseParNewGC, "ParNew should always be used with CMS"); if (FLAG_IS_DEFAULT(ParallelGCThreads)) { FLAG_SET_DEFAULT(ParallelGCThreads, Abstract_VM_Version::parallel_worker_threads()); @@ -1588,7 +1546,6 @@ void Arguments::set_parnew_gc_flags() { void Arguments::set_cms_and_parnew_gc_flags() { assert(!UseSerialGC && !UseParallelOldGC && !UseParallelGC, "Error"); assert(UseConcMarkSweepGC, "CMS is expected to be on here"); - assert(UseParNewGC, "ParNew should always be used with CMS"); // Turn off AdaptiveSizePolicy by default for cms until it is complete. disable_adaptive_size_policy("UseConcMarkSweepGC"); @@ -1728,16 +1685,6 @@ size_t Arguments::max_heap_for_compressed_oops() { NOT_LP64(ShouldNotReachHere(); return 0); } -bool Arguments::should_auto_select_low_pause_collector() { - if (UseAutoGCSelectPolicy && - !FLAG_IS_DEFAULT(MaxGCPauseMillis) && - (MaxGCPauseMillis <= AutoGCSelectPauseMillis)) { - log_trace(gc)("Automatic selection of the low pause collector based on pause goal of %d (ms)", (int) MaxGCPauseMillis); - return true; - } - return false; -} - void Arguments::set_use_compressed_oops() { #ifndef ZERO #ifdef _LP64 @@ -1822,16 +1769,7 @@ bool Arguments::gc_selected() { void Arguments::select_gc_ergonomically() { #if INCLUDE_ALL_GCS if (os::is_server_class_machine()) { - if (!UseAutoGCSelectPolicy) { - FLAG_SET_ERGO_IF_DEFAULT(bool, UseG1GC, true); - } else { - if (should_auto_select_low_pause_collector()) { - FLAG_SET_ERGO_IF_DEFAULT(bool, UseConcMarkSweepGC, true); - FLAG_SET_ERGO_IF_DEFAULT(bool, UseParNewGC, true); - } else { - FLAG_SET_ERGO_IF_DEFAULT(bool, UseParallelGC, true); - } - } + FLAG_SET_ERGO_IF_DEFAULT(bool, UseG1GC, true); } else { FLAG_SET_ERGO_IF_DEFAULT(bool, UseSerialGC, true); } @@ -1840,7 +1778,6 @@ void Arguments::select_gc_ergonomically() { UNSUPPORTED_OPTION(UseParallelGC); UNSUPPORTED_OPTION(UseParallelOldGC); UNSUPPORTED_OPTION(UseConcMarkSweepGC); - UNSUPPORTED_OPTION(UseParNewGC); FLAG_SET_ERGO_IF_DEFAULT(bool, UseSerialGC, true); #endif // INCLUDE_ALL_GCS } @@ -2021,7 +1958,6 @@ void Arguments::set_gc_specific_flags() { if (!ClassUnloading) { FLAG_SET_CMDLINE(bool, CMSClassUnloadingEnabled, false); FLAG_SET_CMDLINE(bool, ClassUnloadingWithConcurrentMark, false); - FLAG_SET_CMDLINE(bool, ExplicitGCInvokesConcurrentAndUnloadsClasses, false); } #endif // INCLUDE_ALL_GCS } @@ -2376,18 +2312,6 @@ bool Arguments::check_gc_consistency() { return false; } - if (UseConcMarkSweepGC && !UseParNewGC) { - jio_fprintf(defaultStream::error_stream(), - "It is not possible to combine the DefNew young collector with the CMS collector.\n"); - return false; - } - - if (UseParNewGC && !UseConcMarkSweepGC) { - jio_fprintf(defaultStream::error_stream(), - "It is not possible to combine the ParNew young collector with any collector other than CMS.\n"); - return false; - } - return true; } @@ -3682,11 +3606,6 @@ jint Arguments::finalize_vm_init_args() { } } - if (UseConcMarkSweepGC && FLAG_IS_DEFAULT(UseParNewGC) && !UseParNewGC) { - // CMS can only be used with ParNew - FLAG_SET_ERGO(bool, UseParNewGC, true); - } - if (!check_vm_args_consistency()) { return JNI_ERR; } diff --git a/hotspot/src/share/vm/runtime/arguments.hpp b/hotspot/src/share/vm/runtime/arguments.hpp index ce94e553d04..5624f142a52 100644 --- a/hotspot/src/share/vm/runtime/arguments.hpp +++ b/hotspot/src/share/vm/runtime/arguments.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -476,9 +476,6 @@ class Arguments : AllStatic { static julong limit_by_allocatable_memory(julong size); // Setup heap size static void set_heap_size(); - // Based on automatic selection criteria, should the - // low pause collector be used. - static bool should_auto_select_low_pause_collector(); // Bytecode rewriting static void set_bytecode_flags(); diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp index 90b274e58a2..a6c23d02542 100644 --- a/hotspot/src/share/vm/runtime/globals.hpp +++ b/hotspot/src/share/vm/runtime/globals.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1159,13 +1159,6 @@ public: product_pd(bool, DontYieldALot, \ "Throw away obvious excess yield calls") \ \ - product(bool, ConvertSleepToYield, true, \ - "Convert sleep(0) to thread yield ") \ - \ - product(bool, ConvertYieldToSleep, false, \ - "Convert yield to a sleep of MinSleepInterval to simulate Win32 " \ - "behavior") \ - \ develop(bool, UseDetachedThreads, true, \ "Use detached threads that are recycled upon termination " \ "(for Solaris only)") \ @@ -1479,11 +1472,6 @@ public: "A System.gc() request invokes a concurrent collection; " \ "(effective only when using concurrent collectors)") \ \ - product(bool, ExplicitGCInvokesConcurrentAndUnloadsClasses, false, \ - "A System.gc() request invokes a concurrent collection and " \ - "also unloads classes during such a concurrent gc cycle " \ - "(effective only when UseConcMarkSweepGC)") \ - \ product(bool, GCLockerInvokesConcurrent, false, \ "The exit of a JNI critical section necessitating a scavenge, " \ "also kicks off a background concurrent collection") \ @@ -1501,9 +1489,6 @@ public: product(bool, UseCMSBestFit, true, \ "Use CMS best fit allocation strategy") \ \ - product(bool, UseParNewGC, false, \ - "Use parallel threads in the new generation") \ - \ product(uintx, ParallelGCBufferWastePct, 10, \ "Wasted fraction of parallel allocation buffer") \ range(0, 100) \ @@ -2059,13 +2044,6 @@ public: "Maximum fraction (1/n) of virtual memory used for ergonomically "\ "determining maximum heap size") \ \ - product(bool, UseAutoGCSelectPolicy, false, \ - "Use automatic collection selection policy") \ - \ - product(uintx, AutoGCSelectPauseMillis, 5000, \ - "Automatic GC selection pause threshold in milliseconds") \ - range(0, max_uintx) \ - \ product(bool, UseAdaptiveSizePolicy, true, \ "Use adaptive generation sizing policies") \ \ @@ -3003,10 +2981,6 @@ public: develop(intx, DontYieldALotInterval, 10, \ "Interval between which yields will be dropped (milliseconds)") \ \ - develop(intx, MinSleepInterval, 1, \ - "Minimum sleep() interval (milliseconds) when " \ - "ConvertSleepToYield is off (used for Solaris)") \ - \ develop(intx, ProfilerPCTickThreshold, 15, \ "Number of ticks in a PC buckets to be a hotspot") \ \ diff --git a/hotspot/test/TEST.groups b/hotspot/test/TEST.groups index c50c741f44d..8953467a9b2 100644 --- a/hotspot/test/TEST.groups +++ b/hotspot/test/TEST.groups @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -209,11 +209,8 @@ needs_full_vm_compact1 = \ gc/g1/TestShrinkToOneRegion.java \ gc/metaspace/G1AddMetaspaceDependency.java \ gc/startup_warnings/TestCMS.java \ - gc/startup_warnings/TestDefNewCMS.java \ gc/startup_warnings/TestParallelGC.java \ gc/startup_warnings/TestParallelScavengeSerialOld.java \ - gc/startup_warnings/TestParNewCMS.java \ - gc/startup_warnings/TestParNewSerialOld.java \ runtime/SharedArchiveFile/SharedArchiveFile.java # Minimal VM on Compact 2 adds in some compact2 tests diff --git a/hotspot/test/gc/arguments/TestExplicitGCInvokesConcurrentAndUnloadsClasses.java b/hotspot/test/gc/arguments/TestExplicitGCInvokesConcurrentAndUnloadsClasses.java deleted file mode 100644 index 83f075760d6..00000000000 --- a/hotspot/test/gc/arguments/TestExplicitGCInvokesConcurrentAndUnloadsClasses.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test TestExplicitGCInvokesConcurrentAndUnloadsClasses - * @summary Test that the flag ExplicitGCInvokesConcurrentAndUnloadsClasses is deprecated - * @bug 8170388 - * @key gc - * @library /test/lib - * @modules java.base/jdk.internal.misc - * java.management - * @run driver TestExplicitGCInvokesConcurrentAndUnloadsClasses - */ - -import jdk.test.lib.process.OutputAnalyzer; -import jdk.test.lib.process.ProcessTools; - -public class TestExplicitGCInvokesConcurrentAndUnloadsClasses { - public static void main(String[] args) throws Exception { - ProcessBuilder pb = - ProcessTools.createJavaProcessBuilder("-XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses", - "-Xlog:gc", - "-version"); - OutputAnalyzer output = new OutputAnalyzer(pb.start()); - output.shouldContain("ExplicitGCInvokesConcurrentAndUnloadsClasses was deprecated"); - output.shouldHaveExitValue(0); - } -} diff --git a/hotspot/test/gc/arguments/TestSelectDefaultGC.java b/hotspot/test/gc/arguments/TestSelectDefaultGC.java index de770b283b8..084ee04a86b 100644 --- a/hotspot/test/gc/arguments/TestSelectDefaultGC.java +++ b/hotspot/test/gc/arguments/TestSelectDefaultGC.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -66,7 +66,6 @@ public class TestSelectDefaultGC { assertVMOption(output, "UseSerialGC", !isServer); // CMS is never default assertVMOption(output, "UseConcMarkSweepGC", false); - assertVMOption(output, "UseParNewGC", false); } public static void main(String[] args) throws Exception { diff --git a/hotspot/test/gc/startup_warnings/TestDefNewCMS.java b/hotspot/test/gc/startup_warnings/TestDefNewCMS.java deleted file mode 100644 index f8780679733..00000000000 --- a/hotspot/test/gc/startup_warnings/TestDefNewCMS.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* -* @test TestDefNewCMS -* @key gc -* @bug 8065972 -* @summary Test that the unsupported DefNew+CMS combination does not start -* @library /test/lib -* @modules java.base/jdk.internal.misc -* java.management -*/ - -import jdk.test.lib.process.ProcessTools; -import jdk.test.lib.process.OutputAnalyzer; - -public class TestDefNewCMS { - - public static void main(String args[]) throws Exception { - ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:-UseParNewGC", "-XX:+UseConcMarkSweepGC", "-version"); - OutputAnalyzer output = new OutputAnalyzer(pb.start()); - output.shouldContain("It is not possible to combine the DefNew young collector with the CMS collector."); - output.shouldContain("Error"); - output.shouldHaveExitValue(1); - } - -} diff --git a/hotspot/test/gc/startup_warnings/TestParNewCMS.java b/hotspot/test/gc/startup_warnings/TestParNewCMS.java deleted file mode 100644 index 75dbe4bf7b3..00000000000 --- a/hotspot/test/gc/startup_warnings/TestParNewCMS.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* -* @test TestParNewCMS -* @key gc -* @bug 8065972 -* @summary Test that specifying -XX:+UseParNewGC on the command line logs a warning message -* @library /test/lib -* @modules java.base/jdk.internal.misc -* java.management -*/ - -import jdk.test.lib.process.ProcessTools; -import jdk.test.lib.process.OutputAnalyzer; - - -public class TestParNewCMS { - - public static void main(String args[]) throws Exception { - ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseParNewGC", "-XX:+UseConcMarkSweepGC", "-version"); - OutputAnalyzer output = new OutputAnalyzer(pb.start()); - output.shouldContain("warning: Option UseParNewGC was deprecated in version"); - output.shouldNotContain("error"); - output.shouldHaveExitValue(0); - } - -} diff --git a/hotspot/test/gc/startup_warnings/TestParNewSerialOld.java b/hotspot/test/gc/startup_warnings/TestParNewSerialOld.java deleted file mode 100644 index a4c8d5c31e1..00000000000 --- a/hotspot/test/gc/startup_warnings/TestParNewSerialOld.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* -* @test TestParNewSerialOld -* @key gc -* @bug 8065972 -* @summary Test that the unsupported ParNew+SerialOld combination does not start -* @library /test/lib -* @modules java.base/jdk.internal.misc -* java.management -*/ - -import jdk.test.lib.process.ProcessTools; -import jdk.test.lib.process.OutputAnalyzer; - - -public class TestParNewSerialOld { - - public static void main(String args[]) throws Exception { - ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseParNewGC", "-version"); - OutputAnalyzer output = new OutputAnalyzer(pb.start()); - output.shouldContain("It is not possible to combine the ParNew young collector with any collector other than CMS."); - output.shouldContain("Error"); - output.shouldHaveExitValue(1); - } - -} diff --git a/hotspot/test/gc/startup_warnings/TestUseAutoGCSelectPolicy.java b/hotspot/test/gc/startup_warnings/TestUseAutoGCSelectPolicy.java deleted file mode 100644 index 360e5e05970..00000000000 --- a/hotspot/test/gc/startup_warnings/TestUseAutoGCSelectPolicy.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test TestUseAutoGCSelectPolicy - * @key gc - * @bug 8166461 8167494 - * @summary Test that UseAutoGCSelectPolicy and AutoGCSelectPauseMillis do print a warning message - * @library /test/lib - * @modules java.base/jdk.internal.misc - * java.management - */ - -import jdk.test.lib.process.ProcessTools; -import jdk.test.lib.process.OutputAnalyzer; - -public class TestUseAutoGCSelectPolicy { - - public static void main(String args[]) throws Exception { - ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseAutoGCSelectPolicy", "-XX:AutoGCSelectPauseMillis=3000", "-version"); - OutputAnalyzer output = new OutputAnalyzer(pb.start()); - output.shouldContain("UseAutoGCSelectPolicy was deprecated in version 9.0"); - output.shouldContain("AutoGCSelectPauseMillis was deprecated in version 9.0"); - output.shouldNotContain("error"); - output.shouldHaveExitValue(0); - } -} diff --git a/hotspot/test/runtime/CommandLine/ObsoleteFlagErrorMessage.java b/hotspot/test/runtime/CommandLine/ObsoleteFlagErrorMessage.java index 31d8b47a2ba..59d245548a5 100644 --- a/hotspot/test/runtime/CommandLine/ObsoleteFlagErrorMessage.java +++ b/hotspot/test/runtime/CommandLine/ObsoleteFlagErrorMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,18 +37,18 @@ public class ObsoleteFlagErrorMessage { // Case 1: Newly obsolete flags with extra junk appended should not be treated as newly obsolete (8060449) ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( - "-XX:UseOldInliningPlusJunk", "-version"); + "-XX:ConvertSleepToYieldPlusJunk", "-version"); OutputAnalyzer output = new OutputAnalyzer(pb.start()); - output.shouldContain("Unrecognized VM option 'UseOldInliningPlusJunk'"); // Must identify bad option. + output.shouldContain("Unrecognized VM option 'ConvertSleepToYieldPlusJunk'"); // Must identify bad option. output.shouldHaveExitValue(1); - // Case 2: Newly obsolete integer-valued flags should be recognized as newly obsolete (8073989) + // Case 2: Newly obsolete flags should be recognized as newly obsolete (8073989) ProcessBuilder pb2 = ProcessTools.createJavaProcessBuilder( - "-XX:NmethodSweepFraction=10", "-version"); + "-XX:+ConvertSleepToYield", "-version"); OutputAnalyzer output2 = new OutputAnalyzer(pb2.start()); output2.shouldContain("Ignoring option").shouldContain("support was removed"); - output2.shouldContain("NmethodSweepFraction"); + output2.shouldContain("ConvertSleepToYield"); } } diff --git a/hotspot/test/runtime/CommandLine/VMAliasOptions.java b/hotspot/test/runtime/CommandLine/VMAliasOptions.java index eae37477c08..d82b4ae2274 100644 --- a/hotspot/test/runtime/CommandLine/VMAliasOptions.java +++ b/hotspot/test/runtime/CommandLine/VMAliasOptions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,6 @@ public class VMAliasOptions { */ public static final String[][] ALIAS_OPTIONS = { {"DefaultMaxRAMFraction", "MaxRAMFraction", "1032"}, - {"CMSMarkStackSizeMax", "MarkStackSizeMax", "1032"}, - {"CMSMarkStackSize", "MarkStackSize", "1032"}, - {"G1MarkStackSize", "MarkStackSize", "1032"}, - {"ParallelMarkingThreads", "ConcGCThreads", "2"}, - {"ParallelCMSThreads", "ConcGCThreads", "2"}, {"CreateMinidumpOnCrash", "CreateCoredumpOnCrash", "false" }, }; diff --git a/hotspot/test/runtime/CommandLine/VMDeprecatedOptions.java b/hotspot/test/runtime/CommandLine/VMDeprecatedOptions.java index 06f73568460..bbd2ea5c49f 100644 --- a/hotspot/test/runtime/CommandLine/VMDeprecatedOptions.java +++ b/hotspot/test/runtime/CommandLine/VMDeprecatedOptions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,17 +41,9 @@ public class VMDeprecatedOptions { public static final String[][] DEPRECATED_OPTIONS = { // deprecated non-alias flags: {"MaxGCMinorPauseMillis", "1032"}, - {"UseParNewGC", "false"}, - {"ConvertSleepToYield", "false" }, - {"ConvertYieldToSleep", "false" }, // deprecated alias flags (see also aliased_jvm_flags): {"DefaultMaxRAMFraction", "4"}, - {"CMSMarkStackSizeMax", "1032"}, - {"CMSMarkStackSize", "1032"}, - {"G1MarkStackSize", "1032"}, - {"ParallelMarkingThreads", "2"}, - {"ParallelCMSThreads", "2"}, {"CreateMinidumpOnCrash", "false"} }; diff --git a/hotspot/test/runtime/NMT/AutoshutdownNMT.java b/hotspot/test/runtime/NMT/AutoshutdownNMT.java deleted file mode 100644 index d07103e810c..00000000000 --- a/hotspot/test/runtime/NMT/AutoshutdownNMT.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @key nmt - * @summary Test for deprecated message if -XX:-AutoShutdownNMT is specified - * @library /test/lib - * @modules java.base/jdk.internal.misc - * java.management - */ - -import jdk.test.lib.process.ProcessTools; -import jdk.test.lib.process.OutputAnalyzer; - -public class AutoshutdownNMT { - - public static void main(String args[]) throws Exception { - - ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( - "-XX:NativeMemoryTracking=detail", - "-XX:-AutoShutdownNMT", - "-version"); - OutputAnalyzer output = new OutputAnalyzer(pb.start()); - output.shouldContain("Ignoring option AutoShutdownNMT"); - } -} From 63ff835a3fd2254681d4225c85c5e002ebd4ddef Mon Sep 17 00:00:00 2001 From: Erik Joelsson Date: Tue, 31 Jan 2017 19:31:05 -0500 Subject: [PATCH 050/447] 8029942: Update VERSION_MAJOR for JDK 10 Reviewed-by: iris, prr, dholmes --- common/autoconf/version-numbers | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/autoconf/version-numbers b/common/autoconf/version-numbers index 4cb54671183..dc6e06253d7 100644 --- a/common/autoconf/version-numbers +++ b/common/autoconf/version-numbers @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ # Default version numbers to use unless overridden by configure -DEFAULT_VERSION_MAJOR=9 +DEFAULT_VERSION_MAJOR=10 DEFAULT_VERSION_MINOR=0 DEFAULT_VERSION_SECURITY=0 DEFAULT_VERSION_PATCH=0 From a4a13f8a967611e47cb5e4bb54ae12f0d4564349 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Tue, 31 Jan 2017 17:35:53 -0800 Subject: [PATCH 051/447] 8173383: Update JDK build to use -source and -target 10 Reviewed-by: dholmes --- make/common/SetupJavaCompilers.gmk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make/common/SetupJavaCompilers.gmk b/make/common/SetupJavaCompilers.gmk index 5ac4b86fe23..b9419bf90e5 100644 --- a/make/common/SetupJavaCompilers.gmk +++ b/make/common/SetupJavaCompilers.gmk @@ -69,7 +69,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE, \ $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \ JVM := $(JAVA_JAVAC), \ JAVAC := $(NEW_JAVAC), \ - FLAGS := -source 9 -target 9 \ + FLAGS := -source 10 -target 10 \ -encoding ascii -XDignore.symbol.file=true $(JAVAC_WARNINGS), \ SERVER_DIR := $(SJAVAC_SERVER_DIR), \ SERVER_JVM := $(SJAVAC_SERVER_JAVA))) @@ -79,7 +79,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \ $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE_NOWARNINGS, \ JVM := $(JAVA_JAVAC), \ JAVAC := $(NEW_JAVAC), \ - FLAGS := -source 9 -target 9 \ + FLAGS := -source 10 -target 10 \ -encoding ascii -XDignore.symbol.file=true $(DISABLE_WARNINGS), \ SERVER_DIR := $(SJAVAC_SERVER_DIR), \ SERVER_JVM := $(SJAVAC_SERVER_JAVA))) From 2679fdea073fc59007e9b8137ceffc39d2ef092d Mon Sep 17 00:00:00 2001 From: Prasanta Sadhukhan Date: Thu, 2 Feb 2017 11:05:06 +0530 Subject: [PATCH 052/447] 8170578: CUPS Printing is broken with Ubuntu 16.10 (CUPS 2.2) Reviewed-by: prr --- .../unix/classes/sun/print/IPPPrintService.java | 14 ++++++++++++++ .../print/PrinterJob/PrintAttributeUpdateTest.java | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/jdk/src/java.desktop/unix/classes/sun/print/IPPPrintService.java b/jdk/src/java.desktop/unix/classes/sun/print/IPPPrintService.java index 4d1832801c6..aeb95e5fa8f 100644 --- a/jdk/src/java.desktop/unix/classes/sun/print/IPPPrintService.java +++ b/jdk/src/java.desktop/unix/classes/sun/print/IPPPrintService.java @@ -59,6 +59,7 @@ import java.nio.charset.Charset; import java.util.Iterator; import java.util.HashSet; +import java.util.Map; public class IPPPrintService implements PrintService, SunPrinterJobService { @@ -1758,6 +1759,19 @@ public class IPPPrintService implements PrintService, SunPrinterJobService { if (responseMap != null && responseMap.length > 0) { getAttMap = responseMap[0]; + // If there is extra hashmap created due to duplicate + // key/attribute present in IPPresponse, then use that + // map too by appending to getAttMap after removing the + // duplicate key/value + if (responseMap.length > 1) { + for (int i = 1; i < responseMap.length; i++) { + for (Map.Entry entry : responseMap[i].entrySet()) { + if (!getAttMap.containsKey(entry.getValue())) { + getAttMap.put(entry.getKey(), entry.getValue()); + } + } + } + } } } else { debug_println(debugPrefix+"opGetAttributes - null input stream"); diff --git a/jdk/test/java/awt/print/PrinterJob/PrintAttributeUpdateTest.java b/jdk/test/java/awt/print/PrinterJob/PrintAttributeUpdateTest.java index f068964c4e1..1b69e0b8b36 100644 --- a/jdk/test/java/awt/print/PrinterJob/PrintAttributeUpdateTest.java +++ b/jdk/test/java/awt/print/PrinterJob/PrintAttributeUpdateTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ /* @test - @bug 8042713 + @bug 8042713 8170578 @summary Print Dialog does not update attribute set with page range @run main/manual PrintAttributeUpdateTest */ From 5a470b0ba483b5d5552e97daf08b9917cb7199e8 Mon Sep 17 00:00:00 2001 From: Doug Simon Date: Thu, 2 Feb 2017 05:26:20 -0800 Subject: [PATCH 053/447] 8145337: [JVMCI] JVMCI initialization with SecurityManager installed fails: java.security.AccessControlException: access denied Reviewed-by: kvn, alanb, mchung, mullan --- jdk/src/java.base/share/lib/security/default.policy | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jdk/src/java.base/share/lib/security/default.policy b/jdk/src/java.base/share/lib/security/default.policy index 7f7ad4ff4b3..d9ab5c9425d 100644 --- a/jdk/src/java.base/share/lib/security/default.policy +++ b/jdk/src/java.base/share/lib/security/default.policy @@ -213,3 +213,7 @@ grant { permission java.lang.RuntimePermission "accessClassInPackage.com.sun.java.swing.plaf.*"; permission java.lang.RuntimePermission "accessClassInPackage.com.apple.*"; }; + +grant codeBase "jrt:/jdk.vm.compiler" { + permission java.security.AllPermission; +}; From efed5b0145e48341e38a8dfd173e26a735303842 Mon Sep 17 00:00:00 2001 From: Doug Simon Date: Thu, 2 Feb 2017 05:26:46 -0800 Subject: [PATCH 054/447] 8145337: [JVMCI] JVMCI initialization with SecurityManager installed fails: java.security.AccessControlException: access denied Reviewed-by: kvn, alanb, mchung, mullan --- make/common/Modules.gmk | 1 + 1 file changed, 1 insertion(+) diff --git a/make/common/Modules.gmk b/make/common/Modules.gmk index 49f301d9da8..81ad62fe973 100644 --- a/make/common/Modules.gmk +++ b/make/common/Modules.gmk @@ -113,6 +113,7 @@ PLATFORM_MODULES += \ jdk.scripting.nashorn \ jdk.security.auth \ jdk.security.jgss \ + jdk.vm.compiler \ jdk.xml.dom \ jdk.zipfs \ # From 6ab9df4607a87b4511522093366f04de5c2b4896 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Fri, 3 Feb 2017 12:36:42 -0800 Subject: [PATCH 055/447] 8173903: Update various tests to pass under JDK 10 Reviewed-by: lancea, psandoz --- .../java/lang/module/MultiReleaseJarTest.java | 20 +++++++++---------- .../Provider/ProviderVersionCheck.java | 4 ++-- .../multiRelease/MVJarSigningTest.java | 5 +++-- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/jdk/test/java/lang/module/MultiReleaseJarTest.java b/jdk/test/java/lang/module/MultiReleaseJarTest.java index 7daddb11993..1923a0b5391 100644 --- a/jdk/test/java/lang/module/MultiReleaseJarTest.java +++ b/jdk/test/java/lang/module/MultiReleaseJarTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -65,7 +65,7 @@ public class MultiReleaseJarTest { private static final String MODULE_INFO = "module-info.class"; - private static final int RELEASE = Runtime.version().major(); + private static final String RELEASE = "" + Runtime.version().major(); // are multi-release JARs enabled? private static final boolean MULTI_RELEASE; @@ -88,8 +88,8 @@ public class MultiReleaseJarTest { .moduleInfo("module-info.class", descriptor) .resource("p/Main.class") .resource("p/Helper.class") - .resource("META-INF/versions/9/p/Helper.class") - .resource("META-INF/versions/9/p/internal/Helper9.class") + .resource("META-INF/versions/" + RELEASE + "/p/Helper.class") + .resource("META-INF/versions/" + RELEASE + "/p/internal/HelperNew.class") .build(); // find the module @@ -131,9 +131,9 @@ public class MultiReleaseJarTest { .moduleInfo(MODULE_INFO, descriptor1) .resource("p/Main.class") .resource("p/Helper.class") - .moduleInfo("META-INF/versions/9/" + MODULE_INFO, descriptor2) - .resource("META-INF/versions/9/p/Helper.class") - .resource("META-INF/versions/9/p/internal/Helper9.class") + .moduleInfo("META-INF/versions/" + RELEASE + "/" + MODULE_INFO, descriptor2) + .resource("META-INF/versions/" + RELEASE + "/p/Helper.class") + .resource("META-INF/versions/" + RELEASE + "/p/internal/HelperNew.class") .build(); // find the module @@ -161,8 +161,8 @@ public class MultiReleaseJarTest { Path jar = new JarBuilder(name) .resource("p/Main.class") .resource("p/Helper.class") - .resource("META-INF/versions/9/p/Helper.class") - .resource("META-INF/versions/9/p/internal/Helper9.class") + .resource("META-INF/versions/" + RELEASE + "/p/Helper.class") + .resource("META-INF/versions/" + RELEASE + "/p/internal/HelperNew.class") .build(); // find the module @@ -200,7 +200,7 @@ public class MultiReleaseJarTest { Path jar = new JarBuilder(name) .moduleInfo(MODULE_INFO, descriptor1) - .moduleInfo("META-INF/versions/9/" + MODULE_INFO, descriptor2) + .moduleInfo("META-INF/versions/" + RELEASE + "/" + MODULE_INFO, descriptor2) .build(); // find the module diff --git a/jdk/test/java/security/Provider/ProviderVersionCheck.java b/jdk/test/java/security/Provider/ProviderVersionCheck.java index dab3ff80d31..9096b6406f6 100644 --- a/jdk/test/java/security/Provider/ProviderVersionCheck.java +++ b/jdk/test/java/security/Provider/ProviderVersionCheck.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,7 +42,7 @@ public class ProviderVersionCheck { for (Provider p: Security.getProviders()) { System.out.print(p.getName() + " "); - if (p.getVersion() != 9.0d) { + if (p.getVersion() != 10.0d) { System.out.println("failed. " + "Version received was " + p.getVersion()); failure = true; diff --git a/jdk/test/sun/security/tools/jarsigner/multiRelease/MVJarSigningTest.java b/jdk/test/sun/security/tools/jarsigner/multiRelease/MVJarSigningTest.java index 6afeb274a28..57b2623ee2b 100644 --- a/jdk/test/sun/security/tools/jarsigner/multiRelease/MVJarSigningTest.java +++ b/jdk/test/sun/security/tools/jarsigner/multiRelease/MVJarSigningTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -74,7 +74,8 @@ public class MVJarSigningTest { private static final String KEYPASS = "changeit"; private static final String SIGNED_JAR = "Signed.jar"; private static final String POLICY_FILE = "SignedJar.policy"; - private static final String VERSION_MESSAGE = "I am running on version 9"; + private static final String VERSION = "" + Runtime.version().major(); + private static final String VERSION_MESSAGE = "I am running on version " + VERSION; public static void main(String[] args) throws Throwable { // compile java files in jarContent directory From ef94596e36d22bbe70be46c8d0923ab301b704c8 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Fri, 3 Feb 2017 12:55:07 -0800 Subject: [PATCH 056/447] 8173908: Problem list tools/jar/multiRelease/RuntimeTest.java until JDK-8173905 is fixed Reviewed-by: lancea --- jdk/test/ProblemList.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt index 1f0a73a3a01..184e8313e04 100644 --- a/jdk/test/ProblemList.txt +++ b/jdk/test/ProblemList.txt @@ -260,6 +260,8 @@ tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java 8169971 windows- tools/jmod/JmodTest.java 8172870 windows-all +tools/jar/multiRelease/RuntimeTest.java 8173905 generic-all + ############################################################################ # jdk_jdi From c8776e9797c204449bbc7b08ac5612f73f726e21 Mon Sep 17 00:00:00 2001 From: Christoph Langer Date: Mon, 6 Feb 2017 09:58:17 +0100 Subject: [PATCH 057/447] 8167420: Fixes for InetAddressImpl native coding on Linux/Unix platforms Reviewed-by: michaelm --- .../unix/native/libnet/Inet4AddressImpl.c | 614 +++++++-------- .../unix/native/libnet/Inet6AddressImpl.c | 726 ++++++++---------- 2 files changed, 611 insertions(+), 729 deletions(-) diff --git a/jdk/src/java.base/unix/native/libnet/Inet4AddressImpl.c b/jdk/src/java.base/unix/native/libnet/Inet4AddressImpl.c index 385b319391b..829ad20c0a5 100644 --- a/jdk/src/java.base/unix/native/libnet/Inet4AddressImpl.c +++ b/jdk/src/java.base/unix/native/libnet/Inet4AddressImpl.c @@ -46,7 +46,13 @@ extern jobjectArray lookupIfLocalhost(JNIEnv *env, const char *hostname, jboolea #define NI_MAXHOST 1025 #endif -/************************************************************************ +#define SET_NONBLOCKING(fd) { \ + int flags = fcntl(fd, F_GETFL); \ + flags |= O_NONBLOCK; \ + fcntl(fd, F_SETFL, flags); \ +} + +/* * Inet4AddressImpl */ @@ -57,35 +63,26 @@ extern jobjectArray lookupIfLocalhost(JNIEnv *env, const char *hostname, jboolea */ JNIEXPORT jstring JNICALL Java_java_net_Inet4AddressImpl_getLocalHostName(JNIEnv *env, jobject this) { - char hostname[NI_MAXHOST+1]; + char hostname[NI_MAXHOST + 1]; hostname[0] = '\0'; - if (gethostname(hostname, NI_MAXHOST)) { - /* Something went wrong, maybe networking is not setup? */ + if (gethostname(hostname, NI_MAXHOST) != 0) { strcpy(hostname, "localhost"); } else { + // try to resolve hostname via nameservice + // if it is known but getnameinfo fails, hostname will still be the + // value from gethostname struct addrinfo hints, *res; - int error; + // make sure string is null-terminated hostname[NI_MAXHOST] = '\0'; memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_CANONNAME; hints.ai_family = AF_INET; - error = getaddrinfo(hostname, NULL, &hints, &res); - - if (error == 0) {/* host is known to name service */ - getnameinfo(res->ai_addr, - res->ai_addrlen, - hostname, - NI_MAXHOST, - NULL, - 0, - NI_NAMEREQD); - - /* if getnameinfo fails hostname is still the value - from gethostname */ - + if (getaddrinfo(hostname, NULL, &hints, &res) == 0) { + getnameinfo(res->ai_addr, res->ai_addrlen, hostname, NI_MAXHOST, + NULL, 0, NI_NAMEREQD); freeaddrinfo(res); } } @@ -93,89 +90,70 @@ Java_java_net_Inet4AddressImpl_getLocalHostName(JNIEnv *env, jobject this) { } /* - * Find an internet address for a given hostname. Note that this + * Find an internet address for a given hostname. Note that this * code only works for addresses of type INET. The translation * of %d.%d.%d.%d to an address (int) occurs in java now, so the - * String "host" shouldn't *ever* be a %d.%d.%d.%d string + * String "host" shouldn't be a %d.%d.%d.%d string. The only + * exception should be when any of the %d are out of range and + * we fallback to a lookup. * * Class: java_net_Inet4AddressImpl * Method: lookupAllHostAddr * Signature: (Ljava/lang/String;)[[B */ - JNIEXPORT jobjectArray JNICALL Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, - jstring host) { + jstring host) { + jobjectArray ret = NULL; const char *hostname; - jobjectArray ret = 0; - int retLen = 0; int error = 0; - struct addrinfo hints, *res, *resNew = NULL; + struct addrinfo hints, *res = NULL, *resNew = NULL, *last = NULL, + *iterator; initInetAddressIDs(env); JNU_CHECK_EXCEPTION_RETURN(env, NULL); if (IS_NULL(host)) { - JNU_ThrowNullPointerException(env, "host is null"); - return 0; + JNU_ThrowNullPointerException(env, "host argument is null"); + return NULL; } hostname = JNU_GetStringPlatformChars(env, host, JNI_FALSE); CHECK_NULL_RETURN(hostname, NULL); - /* Try once, with our static buffer. */ + // try once, with our static buffer memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_CANONNAME; hints.ai_family = AF_INET; -#ifdef __solaris__ - /* - * Workaround for Solaris bug 4160367 - if a hostname contains a - * white space then 0.0.0.0 is returned - */ - if (isspace((unsigned char)hostname[0])) { - JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException", - (char *)hostname); - JNU_ReleaseStringPlatformChars(env, host, hostname); - return NULL; - } -#endif - error = getaddrinfo(hostname, NULL, &hints, &res); -#ifdef MACOSX if (error) { +#if defined(MACOSX) // If getaddrinfo fails try getifaddrs, see bug 8170910. ret = lookupIfLocalhost(env, hostname, JNI_FALSE); if (ret != NULL || (*env)->ExceptionCheck(env)) { - JNU_ReleaseStringPlatformChars(env, host, hostname); - return ret; + goto cleanupAndReturn; } - } #endif - - if (error) { - /* report error */ + // report error NET_ThrowUnknownHostExceptionWithGaiError(env, hostname, error); - JNU_ReleaseStringPlatformChars(env, host, hostname); - return NULL; + goto cleanupAndReturn; } else { int i = 0; - struct addrinfo *itr, *last = NULL, *iterator = res; - + iterator = res; while (iterator != NULL) { - // remove the duplicate one + // skip duplicates int skip = 0; - itr = resNew; - while (itr != NULL) { + struct addrinfo *iteratorNew = resNew; + while (iteratorNew != NULL) { struct sockaddr_in *addr1, *addr2; addr1 = (struct sockaddr_in *)iterator->ai_addr; - addr2 = (struct sockaddr_in *)itr->ai_addr; - if (addr1->sin_addr.s_addr == - addr2->sin_addr.s_addr) { + addr2 = (struct sockaddr_in *)iteratorNew->ai_addr; + if (addr1->sin_addr.s_addr == addr2->sin_addr.s_addr) { skip = 1; break; } - itr = itr->ai_next; + iteratorNew = iteratorNew->ai_next; } if (!skip) { @@ -199,44 +177,37 @@ Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, iterator = iterator->ai_next; } - retLen = i; - iterator = resNew; - - ret = (*env)->NewObjectArray(env, retLen, ia_class, NULL); - + // allocate array - at this point i contains the number of addresses + ret = (*env)->NewObjectArray(env, i, ia_class, NULL); if (IS_NULL(ret)) { - /* we may have memory to free at the end of this */ goto cleanupAndReturn; } i = 0; + iterator = resNew; while (iterator != NULL) { jobject iaObj = (*env)->NewObject(env, ia4_class, ia4_ctrID); if (IS_NULL(iaObj)) { ret = NULL; goto cleanupAndReturn; } - setInetAddress_addr(env, iaObj, ntohl(((struct sockaddr_in*)iterator->ai_addr)->sin_addr.s_addr)); + setInetAddress_addr(env, iaObj, ntohl(((struct sockaddr_in *) + (iterator->ai_addr))->sin_addr.s_addr)); setInetAddress_hostName(env, iaObj, host); (*env)->SetObjectArrayElement(env, ret, i++, iaObj); iterator = iterator->ai_next; } } - cleanupAndReturn: - { - struct addrinfo *iterator, *tmp; - iterator = resNew; - while (iterator != NULL) { - tmp = iterator; - iterator = iterator->ai_next; - free(tmp); - } - JNU_ReleaseStringPlatformChars(env, host, hostname); + JNU_ReleaseStringPlatformChars(env, host, hostname); + while (resNew != NULL) { + last = resNew; + resNew = resNew->ai_next; + free(last); + } + if (res != NULL) { + freeaddrinfo(res); } - - freeaddrinfo(res); - return ret; } @@ -244,164 +215,243 @@ cleanupAndReturn: * Class: java_net_Inet4AddressImpl * Method: getHostByAddr * Signature: (I)Ljava/lang/String; + * + * Theoretically the UnknownHostException could be enriched with gai error + * information. But as it is silently ignored anyway, there's no need for this. + * It's only important that either a valid hostname is returned or an + * UnknownHostException is thrown. */ JNIEXPORT jstring JNICALL Java_java_net_Inet4AddressImpl_getHostByAddr(JNIEnv *env, jobject this, - jbyteArray addrArray) { + jbyteArray addrArray) { jstring ret = NULL; - - char host[NI_MAXHOST+1]; - int error = 0; - int len = 0; + char host[NI_MAXHOST + 1]; jbyte caddr[4]; - - struct sockaddr_in him4; - struct sockaddr *sa; - jint addr; + struct sockaddr_in sa; + + // construct a sockaddr_in structure + memset((char *)&sa, 0, sizeof(struct sockaddr_in)); (*env)->GetByteArrayRegion(env, addrArray, 0, 4, caddr); - addr = ((caddr[0]<<24) & 0xff000000); - addr |= ((caddr[1] <<16) & 0xff0000); - addr |= ((caddr[2] <<8) & 0xff00); + addr = ((caddr[0] << 24) & 0xff000000); + addr |= ((caddr[1] << 16) & 0xff0000); + addr |= ((caddr[2] << 8) & 0xff00); addr |= (caddr[3] & 0xff); - memset((void *) &him4, 0, sizeof(him4)); - him4.sin_addr.s_addr = htonl(addr); - him4.sin_family = AF_INET; - sa = (struct sockaddr *) &him4; - len = sizeof(him4); + sa.sin_addr.s_addr = htonl(addr); + sa.sin_family = AF_INET; - error = getnameinfo(sa, len, host, NI_MAXHOST, NULL, 0, NI_NAMEREQD); - - if (!error) { + if (getnameinfo((struct sockaddr *)&sa, sizeof(struct sockaddr_in), + host, NI_MAXHOST, NULL, 0, NI_NAMEREQD)) { + JNU_ThrowByName(env, "java/net/UnknownHostException", NULL); + } else { ret = (*env)->NewStringUTF(env, host); - } - - if (ret == NULL) { - JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException", NULL); + if (ret == NULL) { + JNU_ThrowByName(env, "java/net/UnknownHostException", NULL); + } } return ret; } -#define SET_NONBLOCKING(fd) { \ - int flags = fcntl(fd, F_GETFL); \ - flags |= O_NONBLOCK; \ - fcntl(fd, F_SETFL, flags); \ +/** + * ping implementation using tcp port 7 (echo) + */ +static jboolean +tcp_ping4(JNIEnv *env, SOCKETADDRESS *sa, SOCKETADDRESS *netif, jint timeout, + jint ttl) +{ + jint fd; + int connect_rv = -1; + + // open a TCP socket + fd = socket(AF_INET, SOCK_STREAM, 0); + if (fd == -1) { + // note: if you run out of fds, you may not be able to load + // the exception class, and get a NoClassDefFoundError instead. + NET_ThrowNew(env, errno, "Can't create socket"); + return JNI_FALSE; + } + + // set TTL + if (ttl > 0) { + setsockopt(fd, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl)); + } + + // A network interface was specified, so let's bind to it. + if (netif != NULL) { + if (bind(fd, &netif->sa, sizeof(struct sockaddr_in)) < 0) { + NET_ThrowNew(env, errno, "Can't bind socket"); + close(fd); + return JNI_FALSE; + } + } + + // Make the socket non blocking so we can use select/poll. + SET_NONBLOCKING(fd); + + sa->sa4.sin_port = htons(7); // echo port + connect_rv = NET_Connect(fd, &sa->sa, sizeof(struct sockaddr_in)); + + // connection established or refused immediately, either way it means + // we were able to reach the host! + if (connect_rv == 0 || errno == ECONNREFUSED) { + close(fd); + return JNI_TRUE; + } + + switch (errno) { + case ENETUNREACH: // Network Unreachable + case EAFNOSUPPORT: // Address Family not supported + case EADDRNOTAVAIL: // address is not available on the remote machine +#if defined(__linux__) || defined(_AIX) + // On some Linux versions, when a socket is bound to the loopback + // interface, connect will fail and errno will be set to EINVAL + // or EHOSTUNREACH. When that happens, don't throw an exception, + // just return false. + case EINVAL: + case EHOSTUNREACH: // No route to host +#endif + close(fd); + return JNI_FALSE; + case EINPROGRESS: // this is expected as we'll probably have to wait + break; + default: + NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "ConnectException", + "connect failed"); + close(fd); + return JNI_FALSE; + } + + timeout = NET_Wait(env, fd, NET_WAIT_CONNECT, timeout); + if (timeout >= 0) { + // connection has been established, check for error condition + socklen_t optlen = (socklen_t)sizeof(connect_rv); + if (getsockopt(fd, SOL_SOCKET, SO_ERROR, (void*)&connect_rv, + &optlen) <0) + { + connect_rv = errno; + } + if (connect_rv == 0 || connect_rv == ECONNREFUSED) { + close(fd); + return JNI_TRUE; + } + } + close(fd); + return JNI_FALSE; } /** * ping implementation. - * Send a ICMP_ECHO_REQUEST packet every second until either the timeout - * expires or a answer is received. - * Returns true is an ECHO_REPLY is received, otherwise, false. + * Send an ICMP_ECHO_REQUEST packet every second until either the timeout + * expires or an answer is received. + * Returns true if an ECHO_REPLY is received, false otherwise. */ static jboolean -ping4(JNIEnv *env, jint fd, struct sockaddr_in* him, jint timeout, - struct sockaddr_in* netif, jint ttl) { - jint size; - jint n, hlen1, icmplen; +ping4(JNIEnv *env, jint fd, SOCKETADDRESS *sa, SOCKETADDRESS *netif, + jint timeout, jint ttl) +{ + jint n, size = 60 * 1024, hlen, tmout2, seq = 1; socklen_t len; - char sendbuf[1500]; - char recvbuf[1500]; + unsigned char sendbuf[1500], recvbuf[1500]; struct icmp *icmp; struct ip *ip; struct sockaddr_in sa_recv; jchar pid; - jint tmout2, seq = 1; struct timeval tv; - size_t plen; + size_t plen = ICMP_ADVLENMIN + sizeof(tv); - /* icmp_id is a 16 bit data type, therefore down cast the pid */ - pid = (jchar)getpid(); - size = 60*1024; setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &size, sizeof(size)); - /* - * sets the ttl (max number of hops) - */ + + // sets the ttl (max number of hops) if (ttl > 0) { - setsockopt(fd, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl)); + setsockopt(fd, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl)); } - /* - * a specific interface was specified, so let's bind the socket - * to that interface to ensure the requests are sent only through it. - */ + + // a specific interface was specified, so let's bind the socket + // to that interface to ensure the requests are sent only through it. if (netif != NULL) { - if (bind(fd, (struct sockaddr*)netif, sizeof(struct sockaddr_in)) < 0) { - NET_ThrowNew(env, errno, "Can't bind socket"); - close(fd); - return JNI_FALSE; - } + if (bind(fd, &netif->sa, sizeof(struct sockaddr_in)) < 0) { + NET_ThrowNew(env, errno, "Can't bind socket"); + close(fd); + return JNI_FALSE; + } } - /* - * Make the socket non blocking so we can use select - */ + + // icmp_id is a 16 bit data type, therefore down cast the pid + pid = (jchar)getpid(); + + // Make the socket non blocking so we can use select SET_NONBLOCKING(fd); do { - /* - * create the ICMP request - */ - icmp = (struct icmp *) sendbuf; - icmp->icmp_type = ICMP_ECHO; - icmp->icmp_code = 0; - icmp->icmp_id = htons(pid); - icmp->icmp_seq = htons(seq); - seq++; - gettimeofday(&tv, NULL); - memcpy(icmp->icmp_data, &tv, sizeof(tv)); - plen = ICMP_ADVLENMIN + sizeof(tv); - icmp->icmp_cksum = 0; - icmp->icmp_cksum = in_cksum((u_short *)icmp, plen); - /* - * send it - */ - n = sendto(fd, sendbuf, plen, 0, (struct sockaddr *)him, - sizeof(struct sockaddr)); - if (n < 0 && errno != EINPROGRESS ) { -#ifdef __linux__ - if (errno != EINVAL && errno != EHOSTUNREACH) - /* - * On some Linux versions, when a socket is bound to the loopback - * interface, sendto will fail and errno will be set to - * EINVAL or EHOSTUNREACH. When that happens, don't throw an - * exception, just return false. - */ -#endif /*__linux__ */ - NET_ThrowNew(env, errno, "Can't send ICMP packet"); - close(fd); - return JNI_FALSE; - } - - tmout2 = timeout > 1000 ? 1000 : timeout; - do { - tmout2 = NET_Wait(env, fd, NET_WAIT_READ, tmout2); - if (tmout2 >= 0) { - len = sizeof(sa_recv); - n = recvfrom(fd, recvbuf, sizeof(recvbuf), 0, (struct sockaddr *)&sa_recv, &len); - ip = (struct ip*) recvbuf; - hlen1 = (ip->ip_hl) << 2; - icmp = (struct icmp *) (recvbuf + hlen1); - icmplen = n - hlen1; - /* - * We did receive something, but is it what we were expecting? - * I.E.: A ICMP_ECHOREPLY packet with the proper PID. - */ - if (icmplen >= 8 && icmp->icmp_type == ICMP_ECHOREPLY - && (ntohs(icmp->icmp_id) == pid)) { - if ((him->sin_addr.s_addr == sa_recv.sin_addr.s_addr)) { - close(fd); - return JNI_TRUE; + // create the ICMP request + icmp = (struct icmp *)sendbuf; + icmp->icmp_type = ICMP_ECHO; + icmp->icmp_code = 0; + // let's tag the ECHO packet with our pid so we can identify it + icmp->icmp_id = htons(pid); + icmp->icmp_seq = htons(seq); + seq++; + gettimeofday(&tv, NULL); + memcpy(icmp->icmp_data, &tv, sizeof(tv)); + icmp->icmp_cksum = 0; + // manually calculate checksum + icmp->icmp_cksum = in_cksum((u_short *)icmp, plen); + // send it + n = sendto(fd, sendbuf, plen, 0, &sa->sa, sizeof(struct sockaddr_in)); + if (n < 0 && errno != EINPROGRESS) { +#if defined(__linux__) + /* + * On some Linux versions, when a socket is bound to the loopback + * interface, sendto will fail and errno will be set to + * EINVAL or EHOSTUNREACH. When that happens, don't throw an + * exception, just return false. + */ + if (errno != EINVAL && errno != EHOSTUNREACH) { + NET_ThrowNew(env, errno, "Can't send ICMP packet"); } - - if (him->sin_addr.s_addr == 0) { - close(fd); - return JNI_TRUE; - } - } - +#else + NET_ThrowNew(env, errno, "Can't send ICMP packet"); +#endif + close(fd); + return JNI_FALSE; } - } while (tmout2 > 0); - timeout -= 1000; - } while (timeout >0); + + tmout2 = timeout > 1000 ? 1000 : timeout; + do { + tmout2 = NET_Wait(env, fd, NET_WAIT_READ, tmout2); + if (tmout2 >= 0) { + len = sizeof(sa_recv); + n = recvfrom(fd, recvbuf, sizeof(recvbuf), 0, + (struct sockaddr *)&sa_recv, &len); + // check if we received enough data + if (n < (jint)sizeof(struct ip)) { + continue; + } + ip = (struct ip *)recvbuf; + hlen = ((jint)(unsigned int)(ip->ip_hl)) << 2; + // check if we received enough data + if (n < (jint)(hlen + sizeof(struct icmp))) { + continue; + } + icmp = (struct icmp *)(recvbuf + hlen); + // We did receive something, but is it what we were expecting? + // I.E.: An ICMP_ECHO_REPLY packet with the proper PID and + // from the host that we are trying to determine is reachable. + if (icmp->icmp_type == ICMP_ECHOREPLY && + (ntohs(icmp->icmp_id) == pid)) + { + if (sa->sa4.sin_addr.s_addr == sa_recv.sin_addr.s_addr) { + close(fd); + return JNI_TRUE; + } else if (sa->sa4.sin_addr.s_addr == 0) { + close(fd); + return JNI_TRUE; + } + } + } + } while (tmout2 > 0); + timeout -= 1000; + } while (timeout > 0); close(fd); return JNI_FALSE; } @@ -413,149 +463,51 @@ ping4(JNIEnv *env, jint fd, struct sockaddr_in* him, jint timeout, */ JNIEXPORT jboolean JNICALL Java_java_net_Inet4AddressImpl_isReachable0(JNIEnv *env, jobject this, - jbyteArray addrArray, - jint timeout, - jbyteArray ifArray, - jint ttl) { - jint addr; + jbyteArray addrArray, jint timeout, + jbyteArray ifArray, jint ttl) +{ jbyte caddr[4]; - jint fd; - struct sockaddr_in him; - struct sockaddr_in* netif = NULL; - struct sockaddr_in inf; - int len = 0; - int connect_rv = -1; - int sz; + jint addr = 0, sz, fd; + SOCKETADDRESS sa, inf, *netif = NULL; - memset((char *) caddr, 0, sizeof(caddr)); - memset((char *) &him, 0, sizeof(him)); - memset((char *) &inf, 0, sizeof(inf)); + // check if address array size is 4 (IPv4 address) sz = (*env)->GetArrayLength(env, addrArray); if (sz != 4) { return JNI_FALSE; } + + // convert IP address from byte array to integer + memset((char *)caddr, 0, sizeof(caddr)); (*env)->GetByteArrayRegion(env, addrArray, 0, 4, caddr); - addr = ((caddr[0]<<24) & 0xff000000); - addr |= ((caddr[1] <<16) & 0xff0000); - addr |= ((caddr[2] <<8) & 0xff00); + addr = ((caddr[0] << 24) & 0xff000000); + addr |= ((caddr[1] << 16) & 0xff0000); + addr |= ((caddr[2] << 8) & 0xff00); addr |= (caddr[3] & 0xff); - addr = htonl(addr); - him.sin_addr.s_addr = addr; - him.sin_family = AF_INET; - len = sizeof(him); - /* - * If a network interface was specified, let's create the address - * for it. - */ + memset((char *)&sa, 0, sizeof(SOCKETADDRESS)); + sa.sa4.sin_addr.s_addr = htonl(addr); + sa.sa4.sin_family = AF_INET; + + // If a network interface was specified, let's convert its address as well. if (!(IS_NULL(ifArray))) { - memset((char *) caddr, 0, sizeof(caddr)); - (*env)->GetByteArrayRegion(env, ifArray, 0, 4, caddr); - addr = ((caddr[0]<<24) & 0xff000000); - addr |= ((caddr[1] <<16) & 0xff0000); - addr |= ((caddr[2] <<8) & 0xff00); - addr |= (caddr[3] & 0xff); - addr = htonl(addr); - inf.sin_addr.s_addr = addr; - inf.sin_family = AF_INET; - inf.sin_port = 0; - netif = &inf; + memset((char *)caddr, 0, sizeof(caddr)); + (*env)->GetByteArrayRegion(env, ifArray, 0, 4, caddr); + addr = ((caddr[0] << 24) & 0xff000000); + addr |= ((caddr[1] << 16) & 0xff0000); + addr |= ((caddr[2] << 8) & 0xff00); + addr |= (caddr[3] & 0xff); + memset((char *)&inf, 0, sizeof(SOCKETADDRESS)); + inf.sa4.sin_addr.s_addr = htonl(addr); + inf.sa4.sin_family = AF_INET; + netif = &inf; } - /* - * Let's try to create a RAW socket to send ICMP packets - * This usually requires "root" privileges, so it's likely to fail. - */ + // Let's try to create a RAW socket to send ICMP packets. + // This usually requires "root" privileges, so it's likely to fail. fd = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP); - if (fd != -1) { - /* - * It didn't fail, so we can use ICMP_ECHO requests. - */ - return ping4(env, fd, &him, timeout, netif, ttl); - } - - /* - * Can't create a raw socket, so let's try a TCP socket - */ - fd = socket(AF_INET, SOCK_STREAM, 0); if (fd == -1) { - /* note: if you run out of fds, you may not be able to load - * the exception class, and get a NoClassDefFoundError - * instead. - */ - NET_ThrowNew(env, errno, "Can't create socket"); - return JNI_FALSE; - } - if (ttl > 0) { - setsockopt(fd, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl)); - } - - /* - * A network interface was specified, so let's bind to it. - */ - if (netif != NULL) { - if (bind(fd, (struct sockaddr*)netif, sizeof(struct sockaddr_in)) < 0) { - NET_ThrowNew(env, errno, "Can't bind socket"); - close(fd); - return JNI_FALSE; - } - } - - /* - * Make the socket non blocking so we can use select/poll. - */ - SET_NONBLOCKING(fd); - - him.sin_port = htons(7); /* Echo */ - connect_rv = NET_Connect(fd, (struct sockaddr *)&him, len); - - /** - * connection established or refused immediately, either way it means - * we were able to reach the host! - */ - if (connect_rv == 0 || errno == ECONNREFUSED) { - close(fd); - return JNI_TRUE; + return tcp_ping4(env, &sa, netif, timeout, ttl); } else { - socklen_t optlen = (socklen_t)sizeof(connect_rv); - - switch (errno) { - case ENETUNREACH: /* Network Unreachable */ - case EAFNOSUPPORT: /* Address Family not supported */ - case EADDRNOTAVAIL: /* address is not available on the remote machine */ -#if defined(__linux__) || defined(_AIX) - case EINVAL: - case EHOSTUNREACH: /* No route to host */ - /* - * On some Linux versions, when a socket is bound to the loopback - * interface, connect will fail and errno will be set to EINVAL - * or EHOSTUNREACH. When that happens, don't throw an exception, - * just return false. - */ -#endif /* __linux__ */ - close(fd); - return JNI_FALSE; - } - - if (errno != EINPROGRESS) { - NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "ConnectException", - "connect failed"); - close(fd); - return JNI_FALSE; - } - - timeout = NET_Wait(env, fd, NET_WAIT_CONNECT, timeout); - if (timeout >= 0) { - /* has connection been established? */ - if (getsockopt(fd, SOL_SOCKET, SO_ERROR, (void*)&connect_rv, - &optlen) <0) { - connect_rv = errno; - } - if (connect_rv == 0 || connect_rv == ECONNREFUSED) { - close(fd); - return JNI_TRUE; - } - } - close(fd); - return JNI_FALSE; + // It didn't fail, so we can use ICMP_ECHO requests. + return ping4(env, fd, &sa, netif, timeout, ttl); } } diff --git a/jdk/src/java.base/unix/native/libnet/Inet6AddressImpl.c b/jdk/src/java.base/unix/native/libnet/Inet6AddressImpl.c index 15f984ebd34..2760baf9303 100644 --- a/jdk/src/java.base/unix/native/libnet/Inet6AddressImpl.c +++ b/jdk/src/java.base/unix/native/libnet/Inet6AddressImpl.c @@ -38,17 +38,22 @@ #include "net_util.h" +#include "java_net_InetAddress.h" #include "java_net_Inet4AddressImpl.h" #include "java_net_Inet6AddressImpl.h" -#include "java_net_InetAddress.h" /* the initial size of our hostent buffers */ #ifndef NI_MAXHOST #define NI_MAXHOST 1025 #endif +#define SET_NONBLOCKING(fd) { \ + int flags = fcntl(fd, F_GETFL); \ + flags |= O_NONBLOCK; \ + fcntl(fd, F_SETFL, flags); \ +} -/************************************************************************ +/* * Inet6AddressImpl */ @@ -59,58 +64,40 @@ */ JNIEXPORT jstring JNICALL Java_java_net_Inet6AddressImpl_getLocalHostName(JNIEnv *env, jobject this) { - int ret; - char hostname[NI_MAXHOST+1]; + char hostname[NI_MAXHOST + 1]; hostname[0] = '\0'; - ret = gethostname(hostname, NI_MAXHOST); - if (ret == -1) { - /* Something went wrong, maybe networking is not setup? */ + if (gethostname(hostname, NI_MAXHOST) != 0) { strcpy(hostname, "localhost"); - } else { - // ensure null-terminated - hostname[NI_MAXHOST] = '\0'; - } - #if defined(__solaris__) - if (ret == 0) { - /* Solaris doesn't want to give us a fully qualified domain name. - * We do a reverse lookup to try and get one. This works - * if DNS occurs before NIS in /etc/resolv.conf, but fails - * if NIS comes first (it still gets only a partial name). - * We use thread-safe system calls. - */ - struct addrinfo hints, *res; - int error; + } else { + // try to resolve hostname via nameservice + // if it is known but getnameinfo fails, hostname will still be the + // value from gethostname + struct addrinfo hints, *res; + // make sure string is null-terminated + hostname[NI_MAXHOST] = '\0'; memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_CANONNAME; hints.ai_family = AF_UNSPEC; - error = getaddrinfo(hostname, NULL, &hints, &res); - - if (error == 0) { - /* host is known to name service */ - error = getnameinfo(res->ai_addr, - res->ai_addrlen, - hostname, - NI_MAXHOST, - NULL, - 0, - NI_NAMEREQD); - - /* if getnameinfo fails hostname is still the value - from gethostname */ - + if (getaddrinfo(hostname, NULL, &hints, &res) == 0) { + getnameinfo(res->ai_addr, res->ai_addrlen, hostname, NI_MAXHOST, + NULL, 0, NI_NAMEREQD); freeaddrinfo(res); } } +#else + } else { + // make sure string is null-terminated + hostname[NI_MAXHOST] = '\0'; + } #endif - return (*env)->NewStringUTF(env, hostname); } -#ifdef MACOSX +#if defined(MACOSX) /* also called from Inet4AddressImpl.c */ __private_extern__ jobjectArray lookupIfLocalhost(JNIEnv *env, const char *hostname, jboolean includeV6) @@ -163,7 +150,7 @@ lookupIfLocalhost(JNIEnv *env, const char *hostname, jboolean includeV6) struct ifaddrs *iter = ifa; while (iter) { int family = iter->ifa_addr->sa_family; - if (iter->ifa_name[0] != '\0' && iter->ifa_addr) + if (iter->ifa_name[0] != '\0' && iter->ifa_addr) { jboolean isLoopback = iter->ifa_flags & IFF_LOOPBACK; if (family == AF_INET) { @@ -172,9 +159,7 @@ lookupIfLocalhost(JNIEnv *env, const char *hostname, jboolean includeV6) } else if (family == AF_INET6 && includeV6) { addrs6++; if (isLoopback) numV6Loopbacks++; - } else { - /* We don't care e.g. AF_LINK */ - } + } // else we don't care, e.g. AF_LINK } iter = iter->ifa_next; } @@ -205,9 +190,9 @@ lookupIfLocalhost(JNIEnv *env, const char *hostname, jboolean includeV6) jboolean isLoopback = iter->ifa_flags & IFF_LOOPBACK; int family = iter->ifa_addr->sa_family; - if (iter->ifa_name[0] != '\0' && iter->ifa_addr - && (family == AF_INET || (family == AF_INET6 && includeV6)) - && (!isLoopback || includeLoopback)) + if (iter->ifa_name[0] != '\0' && iter->ifa_addr && + (family == AF_INET || (family == AF_INET6 && includeV6)) && + (!isLoopback || includeLoopback)) { int port; int index = (family == AF_INET) ? i++ : j++; @@ -234,93 +219,65 @@ lookupIfLocalhost(JNIEnv *env, const char *hostname, jboolean includeV6) #endif /* - * Find an internet address for a given hostname. Note that this - * code only works for addresses of type INET. The translation - * of %d.%d.%d.%d to an address (int) occurs in java now, so the - * String "host" shouldn't *ever* be a %d.%d.%d.%d string - * * Class: java_net_Inet6AddressImpl * Method: lookupAllHostAddr * Signature: (Ljava/lang/String;)[[B */ - JNIEXPORT jobjectArray JNICALL Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, - jstring host) { + jstring host) { + jobjectArray ret = NULL; const char *hostname; - jobjectArray ret = 0; - int retLen = 0; - - int getaddrinfo_error=0; - struct addrinfo hints, *res, *resNew = NULL; + int error = 0; + struct addrinfo hints, *res = NULL, *resNew = NULL, *last = NULL, + *iterator; initInetAddressIDs(env); JNU_CHECK_EXCEPTION_RETURN(env, NULL); if (IS_NULL(host)) { - JNU_ThrowNullPointerException(env, "host is null"); - return 0; + JNU_ThrowNullPointerException(env, "host argument is null"); + return NULL; } hostname = JNU_GetStringPlatformChars(env, host, JNI_FALSE); CHECK_NULL_RETURN(hostname, NULL); - /* Try once, with our static buffer. */ + // try once, with our static buffer memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_CANONNAME; hints.ai_family = AF_UNSPEC; -#ifdef __solaris__ - /* - * Workaround for Solaris bug 4160367 - if a hostname contains a - * white space then 0.0.0.0 is returned - */ - if (isspace((unsigned char)hostname[0])) { - JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException", - hostname); - JNU_ReleaseStringPlatformChars(env, host, hostname); - return NULL; - } -#endif + error = getaddrinfo(hostname, NULL, &hints, &res); - getaddrinfo_error = getaddrinfo(hostname, NULL, &hints, &res); - -#ifdef MACOSX - if (getaddrinfo_error) { - /* - * If getaddrinfo fails looking up the local machine, attempt to get the - * address from getifaddrs. This ensures we get an IPv6 address for the - * local machine. - */ + if (error) { +#if defined(MACOSX) + // if getaddrinfo fails try getifaddrs ret = lookupIfLocalhost(env, hostname, JNI_TRUE); if (ret != NULL || (*env)->ExceptionCheck(env)) { - JNU_ReleaseStringPlatformChars(env, host, hostname); - return ret; + goto cleanupAndReturn; } - } #endif - - if (getaddrinfo_error) { - /* report error */ - NET_ThrowUnknownHostExceptionWithGaiError( - env, hostname, getaddrinfo_error); - JNU_ReleaseStringPlatformChars(env, host, hostname); - return NULL; + // report error + NET_ThrowUnknownHostExceptionWithGaiError(env, hostname, error); + goto cleanupAndReturn; } else { - int i = 0, addressPreference = -1; - int inetCount = 0, inet6Count = 0, inetIndex = 0, inet6Index = 0, originalIndex = 0; - struct addrinfo *itr, *last = NULL, *iterator = res; + int i = 0, inetCount = 0, inet6Count = 0, inetIndex = 0, + inet6Index = 0, originalIndex = 0; + int addressPreference = + (*env)->GetStaticIntField(env, ia_class, ia_preferIPv6AddressID);; + iterator = res; while (iterator != NULL) { + // skip duplicates int skip = 0; - itr = resNew; - while (itr != NULL) { - if (iterator->ai_family == itr->ai_family && - iterator->ai_addrlen == itr->ai_addrlen) { - if (itr->ai_family == AF_INET) { /* AF_INET */ + struct addrinfo *iteratorNew = resNew; + while (iteratorNew != NULL) { + if (iterator->ai_family == iteratorNew->ai_family && + iterator->ai_addrlen == iteratorNew->ai_addrlen) { + if (iteratorNew->ai_family == AF_INET) { /* AF_INET */ struct sockaddr_in *addr1, *addr2; addr1 = (struct sockaddr_in *)iterator->ai_addr; - addr2 = (struct sockaddr_in *)itr->ai_addr; - if (addr1->sin_addr.s_addr == - addr2->sin_addr.s_addr) { + addr2 = (struct sockaddr_in *)iteratorNew->ai_addr; + if (addr1->sin_addr.s_addr == addr2->sin_addr.s_addr) { skip = 1; break; } @@ -328,7 +285,7 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, int t; struct sockaddr_in6 *addr1, *addr2; addr1 = (struct sockaddr_in6 *)iterator->ai_addr; - addr2 = (struct sockaddr_in6 *)itr->ai_addr; + addr2 = (struct sockaddr_in6 *)iteratorNew->ai_addr; for (t = 0; t < 16; t++) { if (addr1->sin6_addr.s6_addr[t] != @@ -337,7 +294,7 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, } } if (t < 16) { - itr = itr->ai_next; + iteratorNew = iteratorNew->ai_next; continue; } else { skip = 1; @@ -346,16 +303,16 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, } } else if (iterator->ai_family != AF_INET && iterator->ai_family != AF_INET6) { - /* we can't handle other family types */ + // we can't handle other family types skip = 1; break; } - itr = itr->ai_next; + iteratorNew = iteratorNew->ai_next; } if (!skip) { struct addrinfo *next - = (struct addrinfo*) malloc(sizeof(struct addrinfo)); + = (struct addrinfo *)malloc(sizeof(struct addrinfo)); if (!next) { JNU_ThrowOutOfMemoryError(env, "Native heap allocation failed"); ret = NULL; @@ -371,39 +328,33 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, last = next; i++; if (iterator->ai_family == AF_INET) { - inetCount ++; + inetCount++; } else if (iterator->ai_family == AF_INET6) { - inet6Count ++; + inet6Count++; } } iterator = iterator->ai_next; } - retLen = i; - iterator = resNew; - - ret = (*env)->NewObjectArray(env, retLen, ia_class, NULL); + // allocate array - at this point i contains the number of addresses + ret = (*env)->NewObjectArray(env, i, ia_class, NULL); if (IS_NULL(ret)) { /* we may have memory to free at the end of this */ goto cleanupAndReturn; } - addressPreference = (*env)->GetStaticIntField(env, ia_class, ia_preferIPv6AddressID); - if (addressPreference == java_net_InetAddress_PREFER_IPV6_VALUE) { - /* AF_INET addresses will be offset by inet6Count */ inetIndex = inet6Count; inet6Index = 0; } else if (addressPreference == java_net_InetAddress_PREFER_IPV4_VALUE) { - /* AF_INET6 addresses will be offset by inetCount */ inetIndex = 0; inet6Index = inetCount; } else if (addressPreference == java_net_InetAddress_PREFER_SYSTEM_VALUE) { inetIndex = inet6Index = originalIndex = 0; } + iterator = resNew; while (iterator != NULL) { - jboolean ret1; if (iterator->ai_family == AF_INET) { jobject iaObj = (*env)->NewObject(env, ia4_class, ia4_ctrID); if (IS_NULL(iaObj)) { @@ -416,7 +367,7 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, inetIndex++; } else if (iterator->ai_family == AF_INET6) { jint scope = 0; - + jboolean ret1; jobject iaObj = (*env)->NewObject(env, ia6_class, ia6_ctrID); if (IS_NULL(iaObj)) { ret = NULL; @@ -427,9 +378,8 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, ret = NULL; goto cleanupAndReturn; } - - scope = ((struct sockaddr_in6*)iterator->ai_addr)->sin6_scope_id; - if (scope != 0) { /* zero is default value, no need to set */ + scope = ((struct sockaddr_in6 *)iterator->ai_addr)->sin6_scope_id; + if (scope != 0) { // zero is default value, no need to set setInet6Address_scopeid(env, iaObj, scope); } setInetAddress_hostName(env, iaObj, host); @@ -443,21 +393,16 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, iterator = iterator->ai_next; } } - - cleanupAndReturn: - { - struct addrinfo *iterator, *tmp; - iterator = resNew; - while (iterator != NULL) { - tmp = iterator; - iterator = iterator->ai_next; - free(tmp); - } - JNU_ReleaseStringPlatformChars(env, host, hostname); +cleanupAndReturn: + JNU_ReleaseStringPlatformChars(env, host, hostname); + while (resNew != NULL) { + last = resNew; + resNew = resNew->ai_next; + free(last); + } + if (res != NULL) { + freeaddrinfo(res); } - - freeaddrinfo(res); - return ret; } @@ -465,171 +410,252 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, * Class: java_net_Inet6AddressImpl * Method: getHostByAddr * Signature: (I)Ljava/lang/String; + * + * Theoretically the UnknownHostException could be enriched with gai error + * information. But as it is silently ignored anyway, there's no need for this. + * It's only important that either a valid hostname is returned or an + * UnknownHostException is thrown. */ JNIEXPORT jstring JNICALL Java_java_net_Inet6AddressImpl_getHostByAddr(JNIEnv *env, jobject this, - jbyteArray addrArray) { - + jbyteArray addrArray) { jstring ret = NULL; - - char host[NI_MAXHOST+1]; - int error = 0; + char host[NI_MAXHOST + 1]; int len = 0; jbyte caddr[16]; + SOCKETADDRESS sa; - struct sockaddr_in him4; - struct sockaddr_in6 him6; - struct sockaddr *sa; + memset((void *)&sa, 0, sizeof(SOCKETADDRESS)); - /* - * For IPv4 addresses construct a sockaddr_in structure. - */ + // construct a sockaddr_in structure (AF_INET or AF_INET6) if ((*env)->GetArrayLength(env, addrArray) == 4) { jint addr; (*env)->GetByteArrayRegion(env, addrArray, 0, 4, caddr); - addr = ((caddr[0]<<24) & 0xff000000); - addr |= ((caddr[1] <<16) & 0xff0000); - addr |= ((caddr[2] <<8) & 0xff00); + addr = ((caddr[0] << 24) & 0xff000000); + addr |= ((caddr[1] << 16) & 0xff0000); + addr |= ((caddr[2] << 8) & 0xff00); addr |= (caddr[3] & 0xff); - memset((void *) &him4, 0, sizeof(him4)); - him4.sin_addr.s_addr = htonl(addr); - him4.sin_family = AF_INET; - sa = (struct sockaddr *)&him4; - len = sizeof(him4); + sa.sa4.sin_addr.s_addr = htonl(addr); + sa.sa4.sin_family = AF_INET; + len = sizeof(struct sockaddr_in); } else { - /* - * For IPv6 address construct a sockaddr_in6 structure. - */ (*env)->GetByteArrayRegion(env, addrArray, 0, 16, caddr); - memset((void *)&him6, 0, sizeof(him6)); - memcpy((void *)&(him6.sin6_addr), caddr, sizeof(struct in6_addr)); - him6.sin6_family = AF_INET6; - sa = (struct sockaddr *)&him6; - len = sizeof(him6); + memcpy((void *)&sa.sa6.sin6_addr, caddr, sizeof(struct in6_addr)); + sa.sa6.sin6_family = AF_INET6; + len = sizeof(struct sockaddr_in6); } - error = getnameinfo(sa, len, host, NI_MAXHOST, NULL, 0, NI_NAMEREQD); - - if (!error) { + if (getnameinfo(&sa.sa, len, host, NI_MAXHOST, NULL, 0, NI_NAMEREQD)) { + JNU_ThrowByName(env, "java/net/UnknownHostException", NULL); + } else { ret = (*env)->NewStringUTF(env, host); - CHECK_NULL_RETURN(ret, NULL); - } - - if (ret == NULL) { - JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException", NULL); + if (ret == NULL) { + JNU_ThrowByName(env, "java/net/UnknownHostException", NULL); + } } return ret; } -#define SET_NONBLOCKING(fd) { \ - int flags = fcntl(fd, F_GETFL); \ - flags |= O_NONBLOCK; \ - fcntl(fd, F_SETFL, flags); \ +/** + * ping implementation using tcp port 7 (echo) + */ +static jboolean +tcp_ping6(JNIEnv *env, SOCKETADDRESS *sa, SOCKETADDRESS *netif, jint timeout, + jint ttl) +{ + jint fd; + int connect_rv = -1; + + // open a TCP socket + fd = socket(AF_INET6, SOCK_STREAM, 0); + if (fd == -1) { + // note: if you run out of fds, you may not be able to load + // the exception class, and get a NoClassDefFoundError instead. + NET_ThrowNew(env, errno, "Can't create socket"); + return JNI_FALSE; + } + + // set TTL + if (ttl > 0) { + setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &ttl, sizeof(ttl)); + } + + // A network interface was specified, so let's bind to it. + if (netif != NULL) { + if (bind(fd, &netif->sa, sizeof(struct sockaddr_in6)) <0) { + NET_ThrowNew(env, errno, "Can't bind socket"); + close(fd); + return JNI_FALSE; + } + } + + // Make the socket non blocking so we can use select/poll. + SET_NONBLOCKING(fd); + + sa->sa6.sin6_port = htons(7); // echo port + connect_rv = NET_Connect(fd, &sa->sa, sizeof(struct sockaddr_in6)); + + // connection established or refused immediately, either way it means + // we were able to reach the host! + if (connect_rv == 0 || errno == ECONNREFUSED) { + close(fd); + return JNI_TRUE; + } + + switch (errno) { + case ENETUNREACH: // Network Unreachable + case EAFNOSUPPORT: // Address Family not supported + case EADDRNOTAVAIL: // address is not available on the remote machine +#if defined(__linux__) || defined(_AIX) + // On some Linux versions, when a socket is bound to the loopback + // interface, connect will fail and errno will be set to EINVAL + // or EHOSTUNREACH. When that happens, don't throw an exception, + // just return false. + case EINVAL: + case EHOSTUNREACH: // No route to host +#endif + close(fd); + return JNI_FALSE; + case EINPROGRESS: // this is expected as we'll probably have to wait + break; + default: + NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "ConnectException", + "connect failed"); + close(fd); + return JNI_FALSE; + } + + timeout = NET_Wait(env, fd, NET_WAIT_CONNECT, timeout); + if (timeout >= 0) { + // connection has been established, check for error condition + socklen_t optlen = (socklen_t)sizeof(connect_rv); + if (getsockopt(fd, SOL_SOCKET, SO_ERROR, (void*)&connect_rv, + &optlen) <0) + { + connect_rv = errno; + } + if (connect_rv == 0 || connect_rv == ECONNREFUSED) { + close(fd); + return JNI_TRUE; + } + } + close(fd); + return JNI_FALSE; } +/** + * ping implementation. + * Send an ICMP_ECHO_REQUEST packet every second until either the timeout + * expires or an answer is received. + * Returns true if an ECHO_REPLY is received, false otherwise. + */ static jboolean -ping6(JNIEnv *env, jint fd, struct sockaddr_in6* him, jint timeout, - struct sockaddr_in6* netif, jint ttl) { - jint size; - jint n; +ping6(JNIEnv *env, jint fd, SOCKETADDRESS *sa, SOCKETADDRESS *netif, + jint timeout, jint ttl) +{ + jint n, size = 60 * 1024, tmout2, seq = 1; socklen_t len; - char sendbuf[1500]; - unsigned char recvbuf[1500]; + unsigned char sendbuf[1500], recvbuf[1500]; struct icmp6_hdr *icmp6; struct sockaddr_in6 sa_recv; - jbyte *caddr, *recv_caddr; jchar pid; - jint tmout2, seq = 1; struct timeval tv; - size_t plen; + size_t plen = sizeof(struct icmp6_hdr) + sizeof(tv); -#ifdef __linux__ - { - int csum_offset; +#if defined(__linux__) /** * For some strange reason, the linux kernel won't calculate the * checksum of ICMPv6 packets unless you set this socket option */ - csum_offset = 2; + int csum_offset = 2; setsockopt(fd, SOL_RAW, IPV6_CHECKSUM, &csum_offset, sizeof(int)); - } #endif - caddr = (jbyte *)&(him->sin6_addr); - - /* icmp_id is a 16 bit data type, therefore down cast the pid */ - pid = (jchar)getpid(); - size = 60*1024; setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &size, sizeof(size)); + + // sets the ttl (max number of hops) if (ttl > 0) { - setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &ttl, sizeof(ttl)); + setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &ttl, sizeof(ttl)); } + + // a specific interface was specified, so let's bind the socket + // to that interface to ensure the requests are sent only through it. if (netif != NULL) { - if (bind(fd, (struct sockaddr*)netif, sizeof(struct sockaddr_in6)) <0) { - NET_ThrowNew(env, errno, "Can't bind socket"); - close(fd); - return JNI_FALSE; - } - } - SET_NONBLOCKING(fd); - - do { - icmp6 = (struct icmp6_hdr *) sendbuf; - icmp6->icmp6_type = ICMP6_ECHO_REQUEST; - icmp6->icmp6_code = 0; - /* let's tag the ECHO packet with our pid so we can identify it */ - icmp6->icmp6_id = htons(pid); - icmp6->icmp6_seq = htons(seq); - seq++; - icmp6->icmp6_cksum = 0; - gettimeofday(&tv, NULL); - memcpy(sendbuf + sizeof(struct icmp6_hdr), &tv, sizeof(tv)); - plen = sizeof(struct icmp6_hdr) + sizeof(tv); - n = sendto(fd, sendbuf, plen, 0, (struct sockaddr*) him, sizeof(struct sockaddr_in6)); - if (n < 0 && errno != EINPROGRESS) { -#ifdef __linux__ - if (errno != EINVAL && errno != EHOSTUNREACH) - /* - * On some Linux versions, when a socket is bound to the - * loopback interface, sendto will fail and errno will be - * set to EINVAL or EHOSTUNREACH. - * When that happens, don't throw an exception, just return false. - */ -#endif /*__linux__ */ - NET_ThrowNew(env, errno, "Can't send ICMP packet"); - close(fd); - return JNI_FALSE; - } - - tmout2 = timeout > 1000 ? 1000 : timeout; - do { - tmout2 = NET_Wait(env, fd, NET_WAIT_READ, tmout2); - - if (tmout2 >= 0) { - len = sizeof(sa_recv); - n = recvfrom(fd, recvbuf, sizeof(recvbuf), 0, (struct sockaddr*) &sa_recv, &len); - icmp6 = (struct icmp6_hdr *) (recvbuf); - recv_caddr = (jbyte *)&(sa_recv.sin6_addr); - /* - * We did receive something, but is it what we were expecting? - * I.E.: An ICMP6_ECHO_REPLY packet with the proper PID and - * from the host that we are trying to determine is reachable. - */ - if (n >= 8 && icmp6->icmp6_type == ICMP6_ECHO_REPLY && - (ntohs(icmp6->icmp6_id) == pid)) { - if (NET_IsEqual(caddr, recv_caddr)) { - close(fd); - return JNI_TRUE; - } - if (NET_IsZeroAddr(caddr)) { - close(fd); - return JNI_TRUE; - } - } + if (bind(fd, &netif->sa, sizeof(struct sockaddr_in6)) <0) { + NET_ThrowNew(env, errno, "Can't bind socket"); + close(fd); + return JNI_FALSE; } - } while (tmout2 > 0); - timeout -= 1000; + } + + // icmp_id is a 16 bit data type, therefore down cast the pid + pid = (jchar)getpid(); + + // Make the socket non blocking so we can use select + SET_NONBLOCKING(fd); + do { + // create the ICMP request + icmp6 = (struct icmp6_hdr *)sendbuf; + icmp6->icmp6_type = ICMP6_ECHO_REQUEST; + icmp6->icmp6_code = 0; + // let's tag the ECHO packet with our pid so we can identify it + icmp6->icmp6_id = htons(pid); + icmp6->icmp6_seq = htons(seq); + seq++; + gettimeofday(&tv, NULL); + memcpy(sendbuf + sizeof(struct icmp6_hdr), &tv, sizeof(tv)); + icmp6->icmp6_cksum = 0; + // send it + n = sendto(fd, sendbuf, plen, 0, &sa->sa, sizeof(struct sockaddr_in6)); + if (n < 0 && errno != EINPROGRESS) { +#if defined(__linux__) + /* + * On some Linux versions, when a socket is bound to the loopback + * interface, sendto will fail and errno will be set to + * EINVAL or EHOSTUNREACH. When that happens, don't throw an + * exception, just return false. + */ + if (errno != EINVAL && errno != EHOSTUNREACH) { + NET_ThrowNew(env, errno, "Can't send ICMP packet"); + } +#else + NET_ThrowNew(env, errno, "Can't send ICMP packet"); +#endif + close(fd); + return JNI_FALSE; + } + + tmout2 = timeout > 1000 ? 1000 : timeout; + do { + tmout2 = NET_Wait(env, fd, NET_WAIT_READ, tmout2); + if (tmout2 >= 0) { + len = sizeof(sa_recv); + n = recvfrom(fd, recvbuf, sizeof(recvbuf), 0, + (struct sockaddr *)&sa_recv, &len); + // check if we received enough data + if (n < (jint)sizeof(struct icmp6_hdr)) { + continue; + } + icmp6 = (struct icmp6_hdr *)recvbuf; + // We did receive something, but is it what we were expecting? + // I.E.: An ICMP6_ECHO_REPLY packet with the proper PID and + // from the host that we are trying to determine is reachable. + if (icmp6->icmp6_type == ICMP6_ECHO_REPLY && + (ntohs(icmp6->icmp6_id) == pid)) + { + if (NET_IsEqual((jbyte *)&sa->sa6.sin6_addr, + (jbyte *)&sa_recv.sin6_addr)) { + close(fd); + return JNI_TRUE; + } else if (NET_IsZeroAddr((jbyte *)&sa->sa6.sin6_addr)) { + close(fd); + return JNI_TRUE; + } + } + } + } while (tmout2 > 0); + timeout -= 1000; } while (timeout > 0); close(fd); return JNI_FALSE; @@ -642,157 +668,61 @@ ping6(JNIEnv *env, jint fd, struct sockaddr_in6* him, jint timeout, */ JNIEXPORT jboolean JNICALL Java_java_net_Inet6AddressImpl_isReachable0(JNIEnv *env, jobject this, - jbyteArray addrArray, - jint scope, - jint timeout, - jbyteArray ifArray, - jint ttl, jint if_scope) { + jbyteArray addrArray, jint scope, + jint timeout, jbyteArray ifArray, + jint ttl, jint if_scope) +{ jbyte caddr[16]; - jint fd, sz; - struct sockaddr_in6 him6; - struct sockaddr_in6 inf6; - struct sockaddr_in6* netif = NULL; - int len = 0; - int connect_rv = -1; + jint sz, fd; + SOCKETADDRESS sa, inf, *netif = NULL; - /* - * If IPv6 is not enable, then we can't reach an IPv6 address, can we? - */ + // If IPv6 is not enabled, then we can't reach an IPv6 address, can we? + // Actually, we probably shouldn't even get here. if (!ipv6_available()) { - return JNI_FALSE; + return JNI_FALSE; } - /* - * If it's an IPv4 address, ICMP won't work with IPv4 mapped address, - * therefore, let's delegate to the Inet4Address method. - */ + + // If it's an IPv4 address, ICMP won't work with IPv4 mapped address, + // therefore, let's delegate to the Inet4Address method. sz = (*env)->GetArrayLength(env, addrArray); if (sz == 4) { - return Java_java_net_Inet4AddressImpl_isReachable0(env, this, - addrArray, - timeout, - ifArray, ttl); + return Java_java_net_Inet4AddressImpl_isReachable0(env, this, + addrArray, timeout, + ifArray, ttl); } - memset((void *) caddr, 0, 16); - memset((void *) &him6, 0, sizeof(him6)); + // load address to SOCKETADDRESS + memset((char *)caddr, 0, 16); (*env)->GetByteArrayRegion(env, addrArray, 0, 16, caddr); - memcpy((void *)&(him6.sin6_addr), caddr, sizeof(struct in6_addr) ); - him6.sin6_family = AF_INET6; -#ifdef __linux__ - if (scope > 0) - him6.sin6_scope_id = scope; - else - him6.sin6_scope_id = getDefaultIPv6Interface( &(him6.sin6_addr)); - len = sizeof(struct sockaddr_in6); -#else - if (scope > 0) - him6.sin6_scope_id = scope; - len = sizeof(struct sockaddr_in6); -#endif - /* - * If a network interface was specified, let's create the address - * for it. - */ - if (!(IS_NULL(ifArray))) { - memset((void *) caddr, 0, 16); - memset((void *) &inf6, 0, sizeof(inf6)); - (*env)->GetByteArrayRegion(env, ifArray, 0, 16, caddr); - memcpy((void *)&(inf6.sin6_addr), caddr, sizeof(struct in6_addr) ); - inf6.sin6_family = AF_INET6; - inf6.sin6_scope_id = if_scope; - netif = &inf6; - } - /* - * If we can create a RAW socket, then when can use the ICMP ECHO_REQUEST - * otherwise we'll try a tcp socket to the Echo port (7). - * Note that this is empiric, and not connecting could mean it's blocked - * or the echo service has been disabled. - */ - - fd = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6); - - if (fd != -1) { /* Good to go, let's do a ping */ - return ping6(env, fd, &him6, timeout, netif, ttl); - } - - /* No good, let's fall back on TCP */ - fd = socket(AF_INET6, SOCK_STREAM, 0); - if (fd == -1) { - /* note: if you run out of fds, you may not be able to load - * the exception class, and get a NoClassDefFoundError - * instead. - */ - NET_ThrowNew(env, errno, "Can't create socket"); - return JNI_FALSE; - } - if (ttl > 0) { - setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &ttl, sizeof(ttl)); - } - - /* - * A network interface was specified, so let's bind to it. - */ - if (netif != NULL) { - if (bind(fd, (struct sockaddr*)netif, sizeof(struct sockaddr_in6)) <0) { - NET_ThrowNew(env, errno, "Can't bind socket"); - close(fd); - return JNI_FALSE; - } - } - SET_NONBLOCKING(fd); - - him6.sin6_port = htons((short) 7); /* Echo port */ - connect_rv = NET_Connect(fd, (struct sockaddr *)&him6, len); - - /** - * connection established or refused immediately, either way it means - * we were able to reach the host! - */ - if (connect_rv == 0 || errno == ECONNREFUSED) { - close(fd); - return JNI_TRUE; + memset((char *)&sa, 0, sizeof(SOCKETADDRESS)); + memcpy((void *)&sa.sa6.sin6_addr, caddr, sizeof(struct in6_addr)); + sa.sa6.sin6_family = AF_INET6; + if (scope > 0) { + sa.sa6.sin6_scope_id = scope; +#if defined(__linux__) } else { - socklen_t optlen = (socklen_t)sizeof(connect_rv); + sa.sa6.sin6_scope_id = getDefaultIPv6Interface(&sa.sa6.sin6_addr); +#endif + } - switch (errno) { - case ENETUNREACH: /* Network Unreachable */ - case EAFNOSUPPORT: /* Address Family not supported */ - case EADDRNOTAVAIL: /* address is not available on the remote machine */ -#if defined(__linux__) || defined(_AIX) - case EINVAL: - case EHOSTUNREACH: /* No route to host */ - /* - * On some Linux versions, when a socket is bound to the - * loopback interface, connect will fail and errno will - * be set to EINVAL or EHOSTUNREACH. When that happens, - * don't throw an exception, just return false. - */ -#endif /* __linux__ */ - close(fd); - return JNI_FALSE; - } + // load network interface address to SOCKETADDRESS, if specified + if (!(IS_NULL(ifArray))) { + memset((char *)caddr, 0, 16); + (*env)->GetByteArrayRegion(env, ifArray, 0, 16, caddr); + memset((char *)&inf, 0, sizeof(SOCKETADDRESS)); + memcpy((void *)&inf.sa6.sin6_addr, caddr, sizeof(struct in6_addr)); + inf.sa6.sin6_family = AF_INET6; + inf.sa6.sin6_scope_id = if_scope; + netif = &inf; + } - if (errno != EINPROGRESS) { - NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "ConnectException", - "connect failed"); - close(fd); - return JNI_FALSE; - } - - timeout = NET_Wait(env, fd, NET_WAIT_CONNECT, timeout); - - if (timeout >= 0) { - /* has connection been established */ - if (getsockopt(fd, SOL_SOCKET, SO_ERROR, (void*)&connect_rv, - &optlen) <0) { - connect_rv = errno; - } - if (connect_rv == 0 || connect_rv == ECONNREFUSED) { - close(fd); - return JNI_TRUE; - } - } - close(fd); - return JNI_FALSE; + // Let's try to create a RAW socket to send ICMP packets. + // This usually requires "root" privileges, so it's likely to fail. + fd = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6); + if (fd == -1) { + return tcp_ping6(env, &sa, netif, timeout, ttl); + } else { + // It didn't fail, so we can use ICMP_ECHO requests. + return ping6(env, fd, &sa, netif, timeout, ttl); } } From 7a676b2b53907f25235ccb4ff8907b91f538f45a Mon Sep 17 00:00:00 2001 From: Christoph Langer Date: Mon, 6 Feb 2017 10:47:14 +0100 Subject: [PATCH 058/447] 8167457: Fixes for InetAddressImpl native coding on Windows Reviewed-by: michaelm --- .../windows/native/libnet/Inet4AddressImpl.c | 367 ++++---------- .../windows/native/libnet/Inet6AddressImpl.c | 462 ++++++++---------- 2 files changed, 305 insertions(+), 524 deletions(-) diff --git a/jdk/src/java.base/windows/native/libnet/Inet4AddressImpl.c b/jdk/src/java.base/windows/native/libnet/Inet4AddressImpl.c index 8a901af9af4..ea16f7bbc25 100644 --- a/jdk/src/java.base/windows/native/libnet/Inet4AddressImpl.c +++ b/jdk/src/java.base/windows/native/libnet/Inet4AddressImpl.c @@ -29,60 +29,6 @@ #include "java_net_InetAddress.h" #include "java_net_Inet4AddressImpl.h" -/* - * Returns true if hostname is in dotted IP address format. Note that this - * function performs a syntax check only. For each octet it just checks that - * the octet is at most 3 digits. - */ -jboolean isDottedIPAddress(const char *hostname, unsigned int *addrp) { - char *c = (char *)hostname; - int octets = 0; - unsigned int cur = 0; - int digit_cnt = 0; - - while (*c) { - if (*c == '.') { - if (digit_cnt == 0) { - return JNI_FALSE; - } else { - if (octets < 4) { - addrp[octets++] = cur; - cur = 0; - digit_cnt = 0; - } else { - return JNI_FALSE; - } - } - c++; - continue; - } - - if ((*c < '0') || (*c > '9')) { - return JNI_FALSE; - } - - digit_cnt++; - if (digit_cnt > 3) { - return JNI_FALSE; - } - - /* don't check if current octet > 255 */ - cur = cur*10 + (*c - '0'); - - /* Move onto next character and check for EOF */ - c++; - if (*c == '\0') { - if (octets < 4) { - addrp[octets++] = cur; - } else { - return JNI_FALSE; - } - } - } - - return (jboolean)(octets == 4); -} - /* * Inet4AddressImpl */ @@ -93,17 +39,17 @@ jboolean isDottedIPAddress(const char *hostname, unsigned int *addrp) { * Signature: ()Ljava/lang/String; */ JNIEXPORT jstring JNICALL -Java_java_net_Inet4AddressImpl_getLocalHostName (JNIEnv *env, jobject this) { +Java_java_net_Inet4AddressImpl_getLocalHostName(JNIEnv *env, jobject this) { char hostname[256]; - if (gethostname(hostname, sizeof hostname) == -1) { + if (gethostname(hostname, sizeof(hostname)) == -1) { strcpy(hostname, "localhost"); } return JNU_NewStringPlatform(env, hostname); } /* - * Find an internet address for a given hostname. Not this this + * Find an internet address for a given hostname. Note that this * code only works for addresses of type INET. The translation * of %d.%d.%d.%d to an address (int) occurs in java now, so the * String "host" shouldn't be a %d.%d.%d.%d string. The only @@ -120,7 +66,6 @@ Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, jobjectArray ret = NULL; const char *hostname; int error = 0; - unsigned int addr[4]; struct addrinfo hints, *res = NULL, *resNew = NULL, *last = NULL, *iterator; @@ -134,57 +79,6 @@ Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, hostname = JNU_GetStringPlatformChars(env, host, JNI_FALSE); CHECK_NULL_RETURN(hostname, NULL); - /* - * The NT/2000 resolver tolerates a space in front of localhost. This - * is not consistent with other implementations of gethostbyname. - * In addition we must do a white space check on Solaris to avoid a - * bug whereby 0.0.0.0 is returned if any host name has a white space. - */ - if (isspace(hostname[0])) { - JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException", hostname); - goto cleanupAndReturn; - } - - /* - * If the format is x.x.x.x then don't use gethostbyname as Windows - * is unable to handle octets which are out of range. - */ - if (isDottedIPAddress(hostname, &addr[0])) { - unsigned int address; - jobject iaObj; - - /* - * Are any of the octets out of range? - */ - if (addr[0] > 255 || addr[1] > 255 || addr[2] > 255 || addr[3] > 255) { - JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException", hostname); - goto cleanupAndReturn; - } - - /* - * Return an byte array with the populated address. - */ - address = (addr[3] << 24) & 0xff000000; - address |= (addr[2] << 16) & 0xff0000; - address |= (addr[1] << 8) & 0xff00; - address |= addr[0]; - - ret = (*env)->NewObjectArray(env, 1, ia_class, NULL); - - if (IS_NULL(ret)) { - goto cleanupAndReturn; - } - - iaObj = (*env)->NewObject(env, ia4_class, ia4_ctrID); - if (IS_NULL(iaObj)) { - ret = NULL; - goto cleanupAndReturn; - } - setInetAddress_addr(env, iaObj, ntohl(address)); - (*env)->SetObjectArrayElement(env, ret, 0, iaObj); - goto cleanupAndReturn; - } - // try once, with our static buffer memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_CANONNAME; @@ -193,6 +87,7 @@ Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, error = getaddrinfo(hostname, NULL, &hints, &res); if (error) { + // report error NET_ThrowByNameWithLastError(env, "java/net/UnknownHostException", hostname); goto cleanupAndReturn; @@ -311,145 +206,86 @@ Java_java_net_Inet4AddressImpl_getHostByAddr(JNIEnv *env, jobject this, return ret; } +/** + * ping implementation using tcp port 7 (echo) + */ static jboolean -tcp_ping4(JNIEnv *env, - jbyteArray addrArray, - jint timeout, - jbyteArray ifArray, +tcp_ping4(JNIEnv *env, SOCKETADDRESS *sa, SOCKETADDRESS *netif, jint timeout, jint ttl) { - jint addr; - jbyte caddr[4]; jint fd; - struct sockaddr_in him; - struct sockaddr_in* netif = NULL; - struct sockaddr_in inf; - int len = 0; - WSAEVENT hEvent; int connect_rv = -1; - int sz; + WSAEVENT hEvent; - /** - * Convert IP address from byte array to integer - */ - sz = (*env)->GetArrayLength(env, addrArray); - if (sz != 4) { - return JNI_FALSE; - } - memset((char *) &him, 0, sizeof(him)); - memset((char *) caddr, 0, sizeof(caddr)); - (*env)->GetByteArrayRegion(env, addrArray, 0, 4, caddr); - addr = ((caddr[0]<<24) & 0xff000000); - addr |= ((caddr[1] <<16) & 0xff0000); - addr |= ((caddr[2] <<8) & 0xff00); - addr |= (caddr[3] & 0xff); - addr = htonl(addr); - /** - * Socket address - */ - him.sin_addr.s_addr = addr; - him.sin_family = AF_INET; - len = sizeof(him); - - /** - * If a network interface was specified, let's convert its address - * as well. - */ - if (!(IS_NULL(ifArray))) { - memset((char *) caddr, 0, sizeof(caddr)); - (*env)->GetByteArrayRegion(env, ifArray, 0, 4, caddr); - addr = ((caddr[0]<<24) & 0xff000000); - addr |= ((caddr[1] <<16) & 0xff0000); - addr |= ((caddr[2] <<8) & 0xff00); - addr |= (caddr[3] & 0xff); - addr = htonl(addr); - inf.sin_addr.s_addr = addr; - inf.sin_family = AF_INET; - inf.sin_port = 0; - netif = &inf; - } - - /* - * Can't create a raw socket, so let's try a TCP socket - */ + // open a TCP socket fd = NET_Socket(AF_INET, SOCK_STREAM, 0); - if (fd == -1) { - /* note: if you run out of fds, you may not be able to load - * the exception class, and get a NoClassDefFoundError - * instead. - */ + if (fd == SOCKET_ERROR) { + // note: if you run out of fds, you may not be able to load + // the exception class, and get a NoClassDefFoundError instead. NET_ThrowNew(env, WSAGetLastError(), "Can't create socket"); return JNI_FALSE; } + + // set TTL if (ttl > 0) { setsockopt(fd, IPPROTO_IP, IP_TTL, (const char *)&ttl, sizeof(ttl)); } - /* - * A network interface was specified, so let's bind to it. - */ + + // A network interface was specified, so let's bind to it. if (netif != NULL) { - if (bind(fd, (struct sockaddr*)netif, sizeof(struct sockaddr_in)) < 0) { + if (bind(fd, &netif->sa, sizeof(struct sockaddr_in)) < 0) { NET_ThrowNew(env, WSAGetLastError(), "Can't bind socket"); closesocket(fd); return JNI_FALSE; } } - /* - * Make the socket non blocking so we can use select/poll. - */ + // Make the socket non blocking so we can use select/poll. hEvent = WSACreateEvent(); WSAEventSelect(fd, hEvent, FD_READ|FD_CONNECT|FD_CLOSE); - /* no need to use NET_Connect as non-blocking */ - him.sin_port = htons(7); /* Echo */ - connect_rv = connect(fd, (struct sockaddr *)&him, len); + sa->sa4.sin_port = htons(7); // echo port + connect_rv = connect(fd, &sa->sa, sizeof(struct sockaddr_in)); - /** - * connection established or refused immediately, either way it means - * we were able to reach the host! - */ + // connection established or refused immediately, either way it means + // we were able to reach the host! if (connect_rv == 0 || WSAGetLastError() == WSAECONNREFUSED) { WSACloseEvent(hEvent); closesocket(fd); return JNI_TRUE; - } else { - int optlen; + } - switch (WSAGetLastError()) { - case WSAEHOSTUNREACH: /* Host Unreachable */ - case WSAENETUNREACH: /* Network Unreachable */ - case WSAENETDOWN: /* Network is down */ - case WSAEPFNOSUPPORT: /* Protocol Family unsupported */ + switch (WSAGetLastError()) { + case WSAEHOSTUNREACH: // Host Unreachable + case WSAENETUNREACH: // Network Unreachable + case WSAENETDOWN: // Network is down + case WSAEPFNOSUPPORT: // Protocol Family unsupported + WSACloseEvent(hEvent); + closesocket(fd); + return JNI_FALSE; + case WSAEWOULDBLOCK: // this is expected as we'll probably have to wait + break; + default: + NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "ConnectException", + "connect failed"); + WSACloseEvent(hEvent); + closesocket(fd); + return JNI_FALSE; + } + + timeout = NET_Wait(env, fd, NET_WAIT_CONNECT, timeout); + if (timeout >= 0) { + // connection has been established, check for error condition + int optlen = sizeof(connect_rv); + if (getsockopt(fd, SOL_SOCKET, SO_ERROR, (void *)&connect_rv, + &optlen) < 0) + { + connect_rv = WSAGetLastError(); + } + if (connect_rv == 0 || connect_rv == WSAECONNREFUSED) { WSACloseEvent(hEvent); closesocket(fd); - return JNI_FALSE; - } - - if (WSAGetLastError() != WSAEWOULDBLOCK) { - NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "ConnectException", - "connect failed"); - WSACloseEvent(hEvent); - closesocket(fd); - return JNI_FALSE; - } - - timeout = NET_Wait(env, fd, NET_WAIT_CONNECT, timeout); - - /* has connection been established */ - - if (timeout >= 0) { - optlen = sizeof(connect_rv); - if (getsockopt(fd, SOL_SOCKET, SO_ERROR, (void*)&connect_rv, - &optlen) <0) { - connect_rv = WSAGetLastError(); - } - - if (connect_rv == 0 || connect_rv == WSAECONNREFUSED) { - WSACloseEvent(hEvent); - closesocket(fd); - return JNI_TRUE; - } + return JNI_TRUE; } } WSACloseEvent(hEvent); @@ -464,21 +300,17 @@ tcp_ping4(JNIEnv *env, * Returns true is an ECHO_REPLY is received, otherwise, false. */ static jboolean -ping4(JNIEnv *env, - unsigned long src_addr, - unsigned long dest_addr, - jint timeout, - HANDLE hIcmpFile) +ping4(JNIEnv *env, HANDLE hIcmpFile, SOCKETADDRESS *sa, + SOCKETADDRESS *netif, jint timeout) { - // See https://msdn.microsoft.com/en-us/library/aa366050%28VS.85%29.aspx - DWORD dwRetVal = 0; char SendData[32] = {0}; LPVOID ReplyBuffer = NULL; DWORD ReplySize = 0; jboolean ret = JNI_FALSE; - // https://msdn.microsoft.com/en-us/library/windows/desktop/aa366051%28v=vs.85%29.aspx + // See https://msdn.microsoft.com/en-us/library/aa366050%28VS.85%29.aspx + // or https://msdn.microsoft.com/en-us/library/windows/desktop/aa366051%28v=vs.85%29.aspx ReplySize = sizeof(ICMP_ECHO_REPLY) // The buffer should be large enough // to hold at least one ICMP_ECHO_REPLY // structure @@ -487,16 +319,16 @@ ping4(JNIEnv *env, // to also hold 8 more bytes of data // (the size of an ICMP error message) - ReplyBuffer = (VOID*) malloc(ReplySize); + ReplyBuffer = (VOID *)malloc(ReplySize); if (ReplyBuffer == NULL) { IcmpCloseHandle(hIcmpFile); NET_ThrowNew(env, WSAGetLastError(), "Unable to allocate memory"); return JNI_FALSE; } - if (src_addr == 0) { + if (netif == NULL) { dwRetVal = IcmpSendEcho(hIcmpFile, // HANDLE IcmpHandle, - dest_addr, // IPAddr DestinationAddress, + sa->sa4.sin_addr.s_addr, // IPAddr DestinationAddress, SendData, // LPVOID RequestData, sizeof(SendData), // WORD RequestSize, NULL, // PIP_OPTION_INFORMATION RequestOptions, @@ -506,20 +338,20 @@ ping4(JNIEnv *env, // seem to have an undocumented minimum // timeout of 1000ms below which the // api behaves inconsistently. - (timeout < 1000) ? 1000 : timeout); // DWORD Timeout + (timeout < 1000) ? 1000 : timeout); // DWORD Timeout } else { dwRetVal = IcmpSendEcho2Ex(hIcmpFile, // HANDLE IcmpHandle, NULL, // HANDLE Event NULL, // PIO_APC_ROUTINE ApcRoutine NULL, // ApcContext - src_addr, // IPAddr SourceAddress, - dest_addr, // IPAddr DestinationAddress, + netif->sa4.sin_addr.s_addr, // IPAddr SourceAddress, + sa->sa4.sin_addr.s_addr, // IPAddr DestinationAddress, SendData, // LPVOID RequestData, - sizeof(SendData), // WORD RequestSize, + sizeof(SendData), // WORD RequestSize, NULL, // PIP_OPTION_INFORMATION RequestOptions, ReplyBuffer,// LPVOID ReplyBuffer, ReplySize, // DWORD ReplySize, - (timeout < 1000) ? 1000 : timeout); // DWORD Timeout + (timeout < 1000) ? 1000 : timeout); // DWORD Timeout } if (dwRetVal == 0) { // if the call failed @@ -544,8 +376,8 @@ ping4(JNIEnv *env, break; default: FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, - NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR)&buf, 0, NULL); + NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPTSTR)&buf, 0, NULL); NET_ThrowNew(env, err, buf); LocalFree(buf); break; @@ -558,8 +390,8 @@ ping4(JNIEnv *env, // We perform an extra check to make sure that our // roundtrip time was less than our desired timeout // for cases where that timeout is < 1000ms. - if (pEchoReply->Status == IP_SUCCESS - && (int)pEchoReply->RoundTripTime <= timeout) + if (pEchoReply->Status == IP_SUCCESS && + (int)pEchoReply->RoundTripTime <= timeout) { ret = JNI_TRUE; } @@ -578,57 +410,58 @@ ping4(JNIEnv *env, */ JNIEXPORT jboolean JNICALL Java_java_net_Inet4AddressImpl_isReachable0(JNIEnv *env, jobject this, - jbyteArray addrArray, - jint timeout, - jbyteArray ifArray, - jint ttl) { - jint src_addr = 0; - jint dest_addr = 0; + jbyteArray addrArray, jint timeout, + jbyteArray ifArray, jint ttl) +{ jbyte caddr[4]; - int sz; + jint addr = 0, sz; + SOCKETADDRESS sa, inf, *netif = NULL; HANDLE hIcmpFile; - /** - * Convert IP address from byte array to integer - */ + // check if address array size is 4 (IPv4 address) sz = (*env)->GetArrayLength(env, addrArray); if (sz != 4) { return JNI_FALSE; } - memset((char *) caddr, 0, sizeof(caddr)); - (*env)->GetByteArrayRegion(env, addrArray, 0, 4, caddr); - dest_addr = ((caddr[0]<<24) & 0xff000000); - dest_addr |= ((caddr[1] <<16) & 0xff0000); - dest_addr |= ((caddr[2] <<8) & 0xff00); - dest_addr |= (caddr[3] & 0xff); - dest_addr = htonl(dest_addr); - /** - * If a network interface was specified, let's convert its address - * as well. - */ + // convert IP address from byte array to integer + memset((char *)caddr, 0, sizeof(caddr)); + (*env)->GetByteArrayRegion(env, addrArray, 0, 4, caddr); + addr = ((caddr[0] << 24) & 0xff000000); + addr |= ((caddr[1] << 16) & 0xff0000); + addr |= ((caddr[2] << 8) & 0xff00); + addr |= (caddr[3] & 0xff); + memset((char *)&sa, 0, sizeof(SOCKETADDRESS)); + sa.sa4.sin_addr.s_addr = htonl(addr); + sa.sa4.sin_family = AF_INET; + + // If a network interface was specified, let's convert its address as well. if (!(IS_NULL(ifArray))) { - memset((char *) caddr, 0, sizeof(caddr)); + memset((char *)caddr, 0, sizeof(caddr)); (*env)->GetByteArrayRegion(env, ifArray, 0, 4, caddr); - src_addr = ((caddr[0]<<24) & 0xff000000); - src_addr |= ((caddr[1] <<16) & 0xff0000); - src_addr |= ((caddr[2] <<8) & 0xff00); - src_addr |= (caddr[3] & 0xff); - src_addr = htonl(src_addr); + addr = ((caddr[0] << 24) & 0xff000000); + addr |= ((caddr[1] << 16) & 0xff0000); + addr |= ((caddr[2] << 8) & 0xff00); + addr |= (caddr[3] & 0xff); + memset((char *)&inf, 0, sizeof(SOCKETADDRESS)); + inf.sa4.sin_addr.s_addr = htonl(addr); + inf.sa4.sin_family = AF_INET; + netif = &inf; } + // Let's try to create an ICMP handle. hIcmpFile = IcmpCreateFile(); if (hIcmpFile == INVALID_HANDLE_VALUE) { int err = WSAGetLastError(); if (err == ERROR_ACCESS_DENIED) { // fall back to TCP echo if access is denied to ICMP - return tcp_ping4(env, addrArray, timeout, ifArray, ttl); + return tcp_ping4(env, &sa, netif, timeout, ttl); } else { NET_ThrowNew(env, err, "Unable to create ICMP file handle"); return JNI_FALSE; } } else { - return ping4(env, src_addr, dest_addr, timeout, hIcmpFile); + // It didn't fail, so we can use ICMP. + return ping4(env, hIcmpFile, &sa, netif, timeout); } } - diff --git a/jdk/src/java.base/windows/native/libnet/Inet6AddressImpl.c b/jdk/src/java.base/windows/native/libnet/Inet6AddressImpl.c index e07f8a3e46b..0b3fdb8b279 100644 --- a/jdk/src/java.base/windows/native/libnet/Inet6AddressImpl.c +++ b/jdk/src/java.base/windows/native/libnet/Inet6AddressImpl.c @@ -40,41 +40,40 @@ * Signature: ()Ljava/lang/String; */ JNIEXPORT jstring JNICALL -Java_java_net_Inet6AddressImpl_getLocalHostName (JNIEnv *env, jobject this) { - char hostname [256]; +Java_java_net_Inet6AddressImpl_getLocalHostName(JNIEnv *env, jobject this) { + char hostname[256]; - if (gethostname (hostname, sizeof (hostname)) == -1) { - strcpy (hostname, "localhost"); + if (gethostname(hostname, sizeof(hostname)) == -1) { + strcpy(hostname, "localhost"); } - return JNU_NewStringPlatform (env, hostname); + return JNU_NewStringPlatform(env, hostname); } +/* + * Class: java_net_Inet6AddressImpl + * Method: lookupAllHostAddr + * Signature: (Ljava/lang/String;)[[B + */ JNIEXPORT jobjectArray JNICALL Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, - jstring host) { + jstring host) { + jobjectArray ret = NULL; const char *hostname; - jobjectArray ret = 0; - int retLen = 0; - jboolean preferIPv6Address; - - int error=0; - struct addrinfo hints, *res = NULL, *resNew = NULL; + int error = 0; + struct addrinfo hints, *res = NULL, *resNew = NULL, *last = NULL, + *iterator; initInetAddressIDs(env); JNU_CHECK_EXCEPTION_RETURN(env, NULL); if (IS_NULL(host)) { - JNU_ThrowNullPointerException(env, "host is null"); - return 0; + JNU_ThrowNullPointerException(env, "host argument is null"); + return NULL; } hostname = JNU_GetStringPlatformChars(env, host, JNI_FALSE); CHECK_NULL_RETURN(hostname, NULL); - /* get the address preference */ - preferIPv6Address - = (*env)->GetStaticIntField(env, ia_class, ia_preferIPv6AddressID); - - /* Try once, with our static buffer. */ + // try once, with our static buffer memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_CANONNAME; hints.ai_family = AF_UNSPEC; @@ -82,35 +81,28 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, error = getaddrinfo(hostname, NULL, &hints, &res); if (error) { - if (WSAGetLastError() == WSATRY_AGAIN) { - NET_ThrowByNameWithLastError(env, - JNU_JAVANETPKG "UnknownHostException", - hostname); - JNU_ReleaseStringPlatformChars(env, host, hostname); - return NULL; - } else { - /* report error */ - JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException", - (char *)hostname); - JNU_ReleaseStringPlatformChars(env, host, hostname); - return NULL; - } + // report error + NET_ThrowByNameWithLastError(env, "java/net/UnknownHostException", + hostname); + goto cleanupAndReturn; } else { - int i = 0; - int inetCount = 0, inet6Count = 0, inetIndex = 0, inet6Index = 0, originalIndex = 0; - struct addrinfo *itr, *last, *iterator = res; + int i = 0, inetCount = 0, inet6Count = 0, inetIndex = 0, + inet6Index = 0, originalIndex = 0; + int addressPreference = + (*env)->GetStaticIntField(env, ia_class, ia_preferIPv6AddressID); + iterator = res; while (iterator != NULL) { + // skip duplicates int skip = 0; - itr = resNew; - while (itr != NULL) { - if (iterator->ai_family == itr->ai_family && - iterator->ai_addrlen == itr->ai_addrlen) { - if (itr->ai_family == AF_INET) { /* AF_INET */ + struct addrinfo *iteratorNew = resNew; + while (iteratorNew != NULL) { + if (iterator->ai_family == iteratorNew->ai_family && + iterator->ai_addrlen == iteratorNew->ai_addrlen) { + if (iteratorNew->ai_family == AF_INET) { /* AF_INET */ struct sockaddr_in *addr1, *addr2; addr1 = (struct sockaddr_in *)iterator->ai_addr; - addr2 = (struct sockaddr_in *)itr->ai_addr; - if (addr1->sin_addr.s_addr == - addr2->sin_addr.s_addr) { + addr2 = (struct sockaddr_in *)iteratorNew->ai_addr; + if (addr1->sin_addr.s_addr == addr2->sin_addr.s_addr) { skip = 1; break; } @@ -118,7 +110,7 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, int t; struct sockaddr_in6 *addr1, *addr2; addr1 = (struct sockaddr_in6 *)iterator->ai_addr; - addr2 = (struct sockaddr_in6 *)itr->ai_addr; + addr2 = (struct sockaddr_in6 *)iteratorNew->ai_addr; for (t = 0; t < 16; t++) { if (addr1->sin6_addr.s6_addr[t] != @@ -127,7 +119,7 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, } } if (t < 16) { - itr = itr->ai_next; + iteratorNew = iteratorNew->ai_next; continue; } else { skip = 1; @@ -136,16 +128,16 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, } } else if (iterator->ai_family != AF_INET && iterator->ai_family != AF_INET6) { - /* we can't handle other family types */ + // we can't handle other family types skip = 1; break; } - itr = itr->ai_next; + iteratorNew = iteratorNew->ai_next; } if (!skip) { struct addrinfo *next - = (struct addrinfo*) malloc(sizeof(struct addrinfo)); + = (struct addrinfo *)malloc(sizeof(struct addrinfo)); if (!next) { JNU_ThrowOutOfMemoryError(env, "Native heap allocation failed"); ret = NULL; @@ -161,87 +153,81 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, last = next; i++; if (iterator->ai_family == AF_INET) { - inetCount ++; + inetCount++; } else if (iterator->ai_family == AF_INET6) { - inet6Count ++; + inet6Count++; } } iterator = iterator->ai_next; } - retLen = i; - iterator = resNew; - i = 0; - ret = (*env)->NewObjectArray(env, retLen, ia_class, NULL); + // allocate array - at this point i contains the number of addresses + ret = (*env)->NewObjectArray(env, i, ia_class, NULL); if (IS_NULL(ret)) { /* we may have memory to free at the end of this */ goto cleanupAndReturn; } - if (preferIPv6Address == java_net_InetAddress_PREFER_IPV6_VALUE) { + if (addressPreference == java_net_InetAddress_PREFER_IPV6_VALUE) { inetIndex = inet6Count; inet6Index = 0; - } else if (preferIPv6Address == java_net_InetAddress_PREFER_IPV4_VALUE) { + } else if (addressPreference == java_net_InetAddress_PREFER_IPV4_VALUE) { inetIndex = 0; inet6Index = inetCount; - } else if (preferIPv6Address == java_net_InetAddress_PREFER_SYSTEM_VALUE) { + } else if (addressPreference == java_net_InetAddress_PREFER_SYSTEM_VALUE) { inetIndex = inet6Index = originalIndex = 0; } + iterator = resNew; while (iterator != NULL) { if (iterator->ai_family == AF_INET) { - jobject iaObj = (*env)->NewObject(env, ia4_class, ia4_ctrID); - if (IS_NULL(iaObj)) { - ret = NULL; - goto cleanupAndReturn; - } - setInetAddress_addr(env, iaObj, ntohl(((struct sockaddr_in*)iterator->ai_addr)->sin_addr.s_addr)); - setInetAddress_hostName(env, iaObj, host); - (*env)->SetObjectArrayElement(env, ret, (inetIndex | originalIndex), iaObj); - inetIndex ++; + jobject iaObj = (*env)->NewObject(env, ia4_class, ia4_ctrID); + if (IS_NULL(iaObj)) { + ret = NULL; + goto cleanupAndReturn; + } + setInetAddress_addr(env, iaObj, ntohl(((struct sockaddr_in*)iterator->ai_addr)->sin_addr.s_addr)); + setInetAddress_hostName(env, iaObj, host); + (*env)->SetObjectArrayElement(env, ret, (inetIndex | originalIndex), iaObj); + inetIndex++; } else if (iterator->ai_family == AF_INET6) { - jint scope = 0; - jboolean ret1; - jobject iaObj = (*env)->NewObject(env, ia6_class, ia6_ctrID); - if (IS_NULL(iaObj)) { - ret = NULL; - goto cleanupAndReturn; - } - ret1 = setInet6Address_ipaddress(env, iaObj, (jbyte *)&(((struct sockaddr_in6*)iterator->ai_addr)->sin6_addr)); - if (ret1 == JNI_FALSE) { - ret = NULL; - goto cleanupAndReturn; - } - scope = ((struct sockaddr_in6*)iterator->ai_addr)->sin6_scope_id; - if (scope != 0) { /* zero is default value, no need to set */ - setInet6Address_scopeid(env, iaObj, scope); - } - setInetAddress_hostName(env, iaObj, host); - (*env)->SetObjectArrayElement(env, ret, (inet6Index | originalIndex), iaObj); - inet6Index ++; + jint scope = 0; + jboolean ret1; + jobject iaObj = (*env)->NewObject(env, ia6_class, ia6_ctrID); + if (IS_NULL(iaObj)) { + ret = NULL; + goto cleanupAndReturn; + } + ret1 = setInet6Address_ipaddress(env, iaObj, (char *)&(((struct sockaddr_in6*)iterator->ai_addr)->sin6_addr)); + if (ret1 == JNI_FALSE) { + ret = NULL; + goto cleanupAndReturn; + } + scope = ((struct sockaddr_in6 *)iterator->ai_addr)->sin6_scope_id; + if (scope != 0) { // zero is default value, no need to set + setInet6Address_scopeid(env, iaObj, scope); + } + setInetAddress_hostName(env, iaObj, host); + (*env)->SetObjectArrayElement(env, ret, (inet6Index | originalIndex), iaObj); + inet6Index++; } - if (preferIPv6Address == java_net_InetAddress_PREFER_SYSTEM_VALUE) { + if (addressPreference == java_net_InetAddress_PREFER_SYSTEM_VALUE) { originalIndex++; inetIndex = inet6Index = 0; } iterator = iterator->ai_next; } } - cleanupAndReturn: - { - struct addrinfo *iterator, *tmp; - iterator = resNew; - while (iterator != NULL) { - tmp = iterator; - iterator = iterator->ai_next; - free(tmp); - } - JNU_ReleaseStringPlatformChars(env, host, hostname); + JNU_ReleaseStringPlatformChars(env, host, hostname); + while (resNew != NULL) { + last = resNew; + resNew = resNew->ai_next; + free(last); + } + if (res != NULL) { + freeaddrinfo(res); } - - freeaddrinfo(res); - return ret; } @@ -249,57 +235,48 @@ cleanupAndReturn: * Class: java_net_Inet6AddressImpl * Method: getHostByAddr * Signature: (I)Ljava/lang/String; + * + * Theoretically the UnknownHostException could be enriched with gai error + * information. But as it is silently ignored anyway, there's no need for this. + * It's only important that either a valid hostname is returned or an + * UnknownHostException is thrown. */ JNIEXPORT jstring JNICALL Java_java_net_Inet6AddressImpl_getHostByAddr(JNIEnv *env, jobject this, - jbyteArray addrArray) { + jbyteArray addrArray) { jstring ret = NULL; - - char host[NI_MAXHOST+1]; - int error = 0; + char host[NI_MAXHOST + 1]; int len = 0; jbyte caddr[16]; + SOCKETADDRESS sa; - struct sockaddr_in him4; - struct sockaddr_in6 him6; - struct sockaddr *sa; + memset((void *)&sa, 0, sizeof(SOCKETADDRESS)); - /* - * For IPv4 addresses construct a sockaddr_in structure. - */ + // construct a sockaddr_in structure (AF_INET or AF_INET6) if ((*env)->GetArrayLength(env, addrArray) == 4) { jint addr; (*env)->GetByteArrayRegion(env, addrArray, 0, 4, caddr); - addr = ((caddr[0]<<24) & 0xff000000); - addr |= ((caddr[1] <<16) & 0xff0000); - addr |= ((caddr[2] <<8) & 0xff00); + addr = ((caddr[0] << 24) & 0xff000000); + addr |= ((caddr[1] << 16) & 0xff0000); + addr |= ((caddr[2] << 8) & 0xff00); addr |= (caddr[3] & 0xff); - memset((char *) &him4, 0, sizeof(him4)); - him4.sin_addr.s_addr = htonl(addr); - him4.sin_family = AF_INET; - sa = (struct sockaddr *) &him4; - len = sizeof(him4); + sa.sa4.sin_addr.s_addr = htonl(addr); + sa.sa4.sin_family = AF_INET; + len = sizeof(struct sockaddr_in); } else { - /* - * For IPv6 address construct a sockaddr_in6 structure. - */ (*env)->GetByteArrayRegion(env, addrArray, 0, 16, caddr); - memset((char *) &him6, 0, sizeof(him6)); - memcpy((void *)&(him6.sin6_addr), caddr, sizeof(struct in6_addr) ); - him6.sin6_family = AF_INET6; - sa = (struct sockaddr *) &him6 ; - len = sizeof(him6) ; + memcpy((void *)&sa.sa6.sin6_addr, caddr, sizeof(struct in6_addr)); + sa.sa6.sin6_family = AF_INET6; + len = sizeof(struct sockaddr_in6); } - error = getnameinfo(sa, len, host, NI_MAXHOST, NULL, 0, NI_NAMEREQD); - - if (!error) { + if (getnameinfo(&sa.sa, len, host, NI_MAXHOST, NULL, 0, NI_NAMEREQD)) { + JNU_ThrowByName(env, "java/net/UnknownHostException", NULL); + } else { ret = (*env)->NewStringUTF(env, host); - CHECK_NULL_RETURN(ret, NULL); - } - - if (ret == NULL) { - JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException", NULL); + if (ret == NULL) { + JNU_ThrowByName(env, "java/net/UnknownHostException", NULL); + } } return ret; @@ -309,99 +286,82 @@ Java_java_net_Inet6AddressImpl_getHostByAddr(JNIEnv *env, jobject this, * ping implementation using tcp port 7 (echo) */ static jboolean -tcp_ping6(JNIEnv *env, - jint timeout, - jint ttl, - struct sockaddr_in6 him6, - struct sockaddr_in6* netif, - int len) +tcp_ping6(JNIEnv *env, SOCKETADDRESS *sa, SOCKETADDRESS *netif, jint timeout, + jint ttl) { jint fd; - WSAEVENT hEvent; int connect_rv = -1; + WSAEVENT hEvent; + // open a TCP socket fd = NET_Socket(AF_INET6, SOCK_STREAM, 0); if (fd == SOCKET_ERROR) { - /* note: if you run out of fds, you may not be able to load - * the exception class, and get a NoClassDefFoundError - * instead. - */ - NET_ThrowNew(env, errno, "Can't create socket"); + // note: if you run out of fds, you may not be able to load + // the exception class, and get a NoClassDefFoundError instead. + NET_ThrowNew(env, WSAGetLastError(), "Can't create socket"); return JNI_FALSE; } - /** - * A TTL was specified, let's set the socket option. - */ + // set TTL if (ttl > 0) { - setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, (const char *)&ttl, sizeof(ttl)); + setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, (const char *)&ttl, sizeof(ttl)); } - /** - * A network interface was specified, let's bind to it. - */ + // A network interface was specified, so let's bind to it. if (netif != NULL) { - if (NET_Bind(fd, (struct sockaddr*)netif, sizeof(struct sockaddr_in6)) < 0) { - NET_ThrowNew(env, WSAGetLastError(), "Can't bind socket to interface"); - closesocket(fd); - return JNI_FALSE; - } + if (bind(fd, &netif->sa, sizeof(struct sockaddr_in6)) < 0) { + NET_ThrowNew(env, WSAGetLastError(), "Can't bind socket to interface"); + closesocket(fd); + return JNI_FALSE; + } } - /** - * Make the socket non blocking. - */ + // Make the socket non blocking so we can use select/poll. hEvent = WSACreateEvent(); WSAEventSelect(fd, hEvent, FD_READ|FD_CONNECT|FD_CLOSE); - /* no need to use NET_Connect as non-blocking */ - him6.sin6_port = htons((short) 7); /* Echo port */ - connect_rv = connect(fd, (struct sockaddr *)&him6, len); + sa->sa6.sin6_port = htons(7); // echo port + connect_rv = connect(fd, &sa->sa, sizeof(struct sockaddr_in6)); - /** - * connection established or refused immediately, either way it means - * we were able to reach the host! - */ + // connection established or refused immediately, either way it means + // we were able to reach the host! if (connect_rv == 0 || WSAGetLastError() == WSAECONNREFUSED) { WSACloseEvent(hEvent); closesocket(fd); return JNI_TRUE; - } else { - int optlen; + } - switch (WSAGetLastError()) { - case WSAEHOSTUNREACH: /* Host Unreachable */ - case WSAENETUNREACH: /* Network Unreachable */ - case WSAENETDOWN: /* Network is down */ - case WSAEPFNOSUPPORT: /* Protocol Family unsupported */ - WSACloseEvent(hEvent); - closesocket(fd); - return JNI_FALSE; - } + switch (WSAGetLastError()) { + case WSAEHOSTUNREACH: // Host Unreachable + case WSAENETUNREACH: // Network Unreachable + case WSAENETDOWN: // Network is down + case WSAEPFNOSUPPORT: // Protocol Family unsupported + WSACloseEvent(hEvent); + closesocket(fd); + return JNI_FALSE; + case WSAEWOULDBLOCK: // this is expected as we'll probably have to wait + break; + default: + NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "ConnectException", + "connect failed"); + WSACloseEvent(hEvent); + closesocket(fd); + return JNI_FALSE; + } - if (WSAGetLastError() != WSAEWOULDBLOCK) { - NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "ConnectException", - "connect failed"); - WSACloseEvent(hEvent); - closesocket(fd); - return JNI_FALSE; - } - - timeout = NET_Wait(env, fd, NET_WAIT_CONNECT, timeout); - - if (timeout >= 0) { - /* has connection been established? */ - optlen = sizeof(connect_rv); - if (getsockopt(fd, SOL_SOCKET, SO_ERROR, (void*)&connect_rv, - &optlen) <0) { + timeout = NET_Wait(env, fd, NET_WAIT_CONNECT, timeout); + if (timeout >= 0) { + // connection has been established, check for error condition + int optlen = sizeof(connect_rv); + if (getsockopt(fd, SOL_SOCKET, SO_ERROR, (void *)&connect_rv, + &optlen) < 0) + { connect_rv = WSAGetLastError(); - } - - if (connect_rv == 0 || connect_rv == WSAECONNREFUSED) { + } + if (connect_rv == 0 || connect_rv == WSAECONNREFUSED) { WSACloseEvent(hEvent); closesocket(fd); return JNI_TRUE; - } } } WSACloseEvent(hEvent); @@ -416,21 +376,18 @@ tcp_ping6(JNIEnv *env, * Returns true is an ECHO_REPLY is received, otherwise, false. */ static jboolean -ping6(JNIEnv *env, - struct sockaddr_in6* src, - struct sockaddr_in6* dest, - jint timeout, - HANDLE hIcmpFile) +ping6(JNIEnv *env, HANDLE hIcmpFile, SOCKETADDRESS *sa, + SOCKETADDRESS *netif, jint timeout) { DWORD dwRetVal = 0; char SendData[32] = {0}; LPVOID ReplyBuffer = NULL; DWORD ReplySize = 0; IP_OPTION_INFORMATION ipInfo = {255, 0, 0, 0, NULL}; - struct sockaddr_in6 sa6Source; + SOCKETADDRESS dftNetif; ReplySize = sizeof(ICMPV6_ECHO_REPLY) + sizeof(SendData); - ReplyBuffer = (VOID*) malloc(ReplySize); + ReplyBuffer = (VOID *)malloc(ReplySize); if (ReplyBuffer == NULL) { IcmpCloseHandle(hIcmpFile); NET_ThrowNew(env, WSAGetLastError(), "Unable to allocate memory"); @@ -438,17 +395,20 @@ ping6(JNIEnv *env, } //define local source information - sa6Source.sin6_addr = in6addr_any; - sa6Source.sin6_family = AF_INET6; - sa6Source.sin6_flowinfo = 0; - sa6Source.sin6_port = 0; + if (netif == NULL) { + dftNetif.sa6.sin6_addr = in6addr_any; + dftNetif.sa6.sin6_family = AF_INET6; + dftNetif.sa6.sin6_flowinfo = 0; + dftNetif.sa6.sin6_port = 0; + netif = &dftNetif; + } dwRetVal = Icmp6SendEcho2(hIcmpFile, // HANDLE IcmpHandle, NULL, // HANDLE Event, NULL, // PIO_APC_ROUTINE ApcRoutine, NULL, // PVOID ApcContext, - &sa6Source, // struct sockaddr_in6 *SourceAddress, - dest, // struct sockaddr_in6 *DestinationAddress, + &netif->sa6, // struct sockaddr_in6 *SourceAddress, + &sa->sa6, // struct sockaddr_in6 *DestinationAddress, SendData, // LPVOID RequestData, sizeof(SendData), // WORD RequestSize, &ipInfo, // PIP_OPTION_INFORMATION RequestOptions, @@ -459,11 +419,10 @@ ping6(JNIEnv *env, free(ReplyBuffer); IcmpCloseHandle(hIcmpFile); - - if (dwRetVal != 0) { - return JNI_TRUE; - } else { + if (dwRetVal == 0) { // if the call failed return JNI_FALSE; + } else { + return JNI_TRUE; } } @@ -474,75 +433,64 @@ ping6(JNIEnv *env, */ JNIEXPORT jboolean JNICALL Java_java_net_Inet6AddressImpl_isReachable0(JNIEnv *env, jobject this, - jbyteArray addrArray, - jint scope, - jint timeout, - jbyteArray ifArray, - jint ttl, jint if_scope) { + jbyteArray addrArray, jint scope, + jint timeout, jbyteArray ifArray, + jint ttl, jint if_scope) +{ jbyte caddr[16]; jint sz; - struct sockaddr_in6 him6; - struct sockaddr_in6* netif = NULL; - struct sockaddr_in6 inf6; - int len = 0; + SOCKETADDRESS sa, inf, *netif = NULL; HANDLE hIcmpFile; - /* - * If IPv6 is not enable, then we can't reach an IPv6 address, can we? - * Actually, we probably shouldn't even get here. - */ + // If IPv6 is not enabled, then we can't reach an IPv6 address, can we? + // Actually, we probably shouldn't even get here. if (!ipv6_available()) { - return JNI_FALSE; + return JNI_FALSE; } - /* - * If it's an IPv4 address, ICMP won't work with IPv4 mapped address, - * therefore, let's delegate to the Inet4Address method. - */ + + // If it's an IPv4 address, ICMP won't work with IPv4 mapped address, + // therefore, let's delegate to the Inet4Address method. sz = (*env)->GetArrayLength(env, addrArray); if (sz == 4) { - return Java_java_net_Inet4AddressImpl_isReachable0(env, this, - addrArray, - timeout, - ifArray, ttl); + return Java_java_net_Inet4AddressImpl_isReachable0(env, this, + addrArray, timeout, + ifArray, ttl); } - memset((char *) caddr, 0, 16); - memset((char *) &him6, 0, sizeof(him6)); + // load address to SOCKETADDRESS + memset((char *)caddr, 0, 16); (*env)->GetByteArrayRegion(env, addrArray, 0, 16, caddr); - memcpy((void *)&(him6.sin6_addr), caddr, sizeof(struct in6_addr) ); - him6.sin6_family = AF_INET6; + memset((char *)&sa, 0, sizeof(SOCKETADDRESS)); + memcpy((void *)&sa.sa6.sin6_addr, caddr, sizeof(struct in6_addr)); + sa.sa6.sin6_family = AF_INET6; if (scope > 0) { - him6.sin6_scope_id = scope; + sa.sa6.sin6_scope_id = scope; } - len = sizeof(struct sockaddr_in6); - /** - * A network interface was specified, let's convert the address - */ + // load network interface address to SOCKETADDRESS, if specified if (!(IS_NULL(ifArray))) { - memset((char *) caddr, 0, 16); - memset((char *) &inf6, 0, sizeof(inf6)); - (*env)->GetByteArrayRegion(env, ifArray, 0, 16, caddr); - memcpy((void *)&(inf6.sin6_addr), caddr, sizeof(struct in6_addr) ); - inf6.sin6_family = AF_INET6; - inf6.sin6_port = 0; - inf6.sin6_scope_id = if_scope; - netif = &inf6; + memset((char *)caddr, 0, 16); + (*env)->GetByteArrayRegion(env, ifArray, 0, 16, caddr); + memset((char *)&inf, 0, sizeof(SOCKETADDRESS)); + memcpy((void *)&inf.sa6.sin6_addr, caddr, sizeof(struct in6_addr)); + inf.sa6.sin6_family = AF_INET6; + inf.sa6.sin6_scope_id = if_scope; + netif = &inf; } + // Let's try to create an ICMP handle. hIcmpFile = Icmp6CreateFile(); if (hIcmpFile == INVALID_HANDLE_VALUE) { int err = WSAGetLastError(); if (err == ERROR_ACCESS_DENIED) { // fall back to TCP echo if access is denied to ICMP - return tcp_ping6(env, timeout, ttl, him6, netif, len); + return tcp_ping6(env, &sa, netif, timeout, ttl); } else { NET_ThrowNew(env, err, "Unable to create ICMP file handle"); return JNI_FALSE; } } else { - return ping6(env, netif, &him6, timeout, hIcmpFile); + // It didn't fail, so we can use ICMP. + return ping6(env, hIcmpFile, &sa, netif, timeout); } - - return JNI_FALSE; } From a0a3fd1a2502ac77bbf41621ea462b178bd11a2c Mon Sep 17 00:00:00 2001 From: Matthias Baesken Date: Thu, 2 Feb 2017 17:13:46 +0100 Subject: [PATCH 059/447] 8173834: cleanup macosx jspawnhelper build settings Reviewed-by: erikj --- jdk/make/launcher/Launcher-java.base.gmk | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/jdk/make/launcher/Launcher-java.base.gmk b/jdk/make/launcher/Launcher-java.base.gmk index f70d90029a6..e2688a821f3 100644 --- a/jdk/make/launcher/Launcher-java.base.gmk +++ b/jdk/make/launcher/Launcher-java.base.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -146,10 +146,6 @@ ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), ) BUILD_JSPAWNHELPER := 1 endif -ifeq ($(OPENJDK_TARGET_OS), macosx) - BUILD_JSPAWNHELPER_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base -endif - ifeq ($(OPENJDK_TARGET_CPU_BITS), 64) BUILD_JSPAWNHELPER_LDFLAGS += $(COMPILER_TARGET_BITS_FLAG)64 endif From 632427880f17355c4c2763fc002ff713175850a9 Mon Sep 17 00:00:00 2001 From: Tom Rodriguez Date: Thu, 2 Feb 2017 16:57:01 -0800 Subject: [PATCH 060/447] 8173846: [AOT] Stubs hang onto intermediate compiler state forever Stub shouldn't keep alive the graph Reviewed-by: kvn --- .../src/jdk/tools/jaotc/AOTStub.java | 3 +- .../graalvm/compiler/hotspot/stubs/Stub.java | 95 ++++++++----------- 2 files changed, 44 insertions(+), 54 deletions(-) diff --git a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/AOTStub.java b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/AOTStub.java index b7ba5e87e72..1eabbdc3a78 100644 --- a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/AOTStub.java +++ b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/AOTStub.java @@ -25,6 +25,7 @@ package jdk.tools.jaotc; import org.graalvm.compiler.code.CompilationResult; import org.graalvm.compiler.core.target.Backend; +import org.graalvm.compiler.hotspot.HotSpotCompiledCodeBuilder; import org.graalvm.compiler.hotspot.stubs.Stub; import jdk.vm.ci.hotspot.HotSpotCompiledCode; @@ -48,7 +49,7 @@ public class AOTStub implements JavaMethodInfo { } public HotSpotCompiledCode compiledCode(CompilationResult result) { - return stub.getCompiledCode(backend); + return HotSpotCompiledCodeBuilder.createCompiledCode(null, null, result); } } diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/Stub.java b/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/Stub.java index 5d2eb3ee74b..8857bd417a6 100644 --- a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/Stub.java +++ b/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/Stub.java @@ -89,18 +89,11 @@ public abstract class Stub { */ protected InstalledCode code; - /** - * Compilation result from which {@link #code} was created. - */ - protected CompilationResult compResult; - /** * The registers destroyed by this stub (from the caller's perspective). */ private Set destroyedCallerRegisters; - private HotSpotCompiledCode compiledCode; - public void initDestroyedCallerRegisters(Set registers) { assert registers != null; assert destroyedCallerRegisters == null || registers.equals(destroyedCallerRegisters) : "cannot redefine"; @@ -184,35 +177,13 @@ public abstract class Stub { public synchronized InstalledCode getCode(final Backend backend) { if (code == null) { try (Scope d = Debug.sandbox("CompilingStub", DebugScope.getConfig(), providers.getCodeCache(), debugScopeContext())) { - final StructuredGraph graph = getGraph(getStubCompilationId()); - - // Stubs cannot be recompiled so they cannot be compiled with assumptions - assert graph.getAssumptions() == null; - - if (!(graph.start() instanceof StubStartNode)) { - StubStartNode newStart = graph.add(new StubStartNode(Stub.this)); - newStart.setStateAfter(graph.start().stateAfter()); - graph.replaceFixed(graph.start(), newStart); - } - CodeCacheProvider codeCache = providers.getCodeCache(); - - compResult = new CompilationResult(toString(), GeneratePIC.getValue()); - try (Scope s0 = Debug.scope("StubCompilation", graph, providers.getCodeCache())) { - Suites suites = createSuites(); - emitFrontEnd(providers, backend, graph, providers.getSuites().getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL, DefaultProfilingInfo.get(TriState.UNKNOWN), suites); - LIRSuites lirSuites = createLIRSuites(); - emitBackEnd(graph, Stub.this, getInstalledCodeOwner(), backend, compResult, CompilationResultBuilderFactory.Default, getRegisterConfig(), lirSuites); - assert checkStubInvariants(); - } catch (Throwable e) { - throw Debug.handle(e); - } - - assert destroyedCallerRegisters != null; + CompilationResult compResult = buildCompilationResult(backend); try (Scope s = Debug.scope("CodeInstall", compResult)) { + assert destroyedCallerRegisters != null; // Add a GeneratePIC check here later, we don't want to install // code if we don't have a corresponding VM global symbol. - compiledCode = HotSpotCompiledCodeBuilder.createCompiledCode(null, null, compResult); + HotSpotCompiledCode compiledCode = HotSpotCompiledCodeBuilder.createCompiledCode(null, null, compResult); code = codeCache.installCode(null, compiledCode, null, null, false); } catch (Throwable e) { throw Debug.handle(e); @@ -226,6 +197,44 @@ public abstract class Stub { return code; } + @SuppressWarnings("try") + private CompilationResult buildCompilationResult(final Backend backend) { + CompilationResult compResult = new CompilationResult(toString(), GeneratePIC.getValue()); + final StructuredGraph graph = getGraph(getStubCompilationId()); + + // Stubs cannot be recompiled so they cannot be compiled with assumptions + assert graph.getAssumptions() == null; + + if (!(graph.start() instanceof StubStartNode)) { + StubStartNode newStart = graph.add(new StubStartNode(Stub.this)); + newStart.setStateAfter(graph.start().stateAfter()); + graph.replaceFixed(graph.start(), newStart); + } + + try (Scope s0 = Debug.scope("StubCompilation", graph, providers.getCodeCache())) { + Suites suites = createSuites(); + emitFrontEnd(providers, backend, graph, providers.getSuites().getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL, DefaultProfilingInfo.get(TriState.UNKNOWN), suites); + LIRSuites lirSuites = createLIRSuites(); + emitBackEnd(graph, Stub.this, getInstalledCodeOwner(), backend, compResult, CompilationResultBuilderFactory.Default, getRegisterConfig(), lirSuites); + assert checkStubInvariants(compResult); + } catch (Throwable e) { + throw Debug.handle(e); + } + return compResult; + } + + /** + * Gets a {@link CompilationResult} that can be used for code generation. Required for AOT. + */ + @SuppressWarnings("try") + public CompilationResult getCompilationResult(final Backend backend) { + try (Scope d = Debug.sandbox("CompilingStub", DebugScope.getConfig(), providers.getCodeCache(), debugScopeContext())) { + return buildCompilationResult(backend); + } catch (Throwable e) { + throw Debug.handle(e); + } + } + public CompilationIdentifier getStubCompilationId() { return new StubCompilationIdentifier(this); } @@ -233,7 +242,7 @@ public abstract class Stub { /** * Checks the conditions a compilation must satisfy to be installed as a RuntimeStub. */ - private boolean checkStubInvariants() { + private boolean checkStubInvariants(CompilationResult compResult) { assert compResult.getExceptionHandlers().isEmpty() : this; // Stubs cannot be recompiled so they cannot be compiled with @@ -278,24 +287,4 @@ public abstract class Stub { } return lirSuites; } - - /** - * Gets the HotSpotCompiledCode that was created during installation. - */ - public synchronized HotSpotCompiledCode getCompiledCode(final Backend backend) { - getCompilationResult(backend); - assert compiledCode != null; - return compiledCode; - } - - /** - * Gets the compilation result for this stub, compiling it first if necessary, and installing it - * in code. - */ - public synchronized CompilationResult getCompilationResult(final Backend backend) { - if (code == null) { - getCode(backend); - } - return compResult; - } } From 9c9b1e05107cc26e6f2ae800ae5987c3e48722dd Mon Sep 17 00:00:00 2001 From: Stefan Sarne Date: Fri, 3 Feb 2017 16:03:17 +0100 Subject: [PATCH 061/447] 8173894: jib reports version "" in jdk10 Update getVersion function, missing \ in regexp when stripping trailing zeros. Reviewed-by: erikj --- common/conf/jib-profiles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/conf/jib-profiles.js b/common/conf/jib-profiles.js index dcbb3639cd0..cc384ba50bd 100644 --- a/common/conf/jib-profiles.js +++ b/common/conf/jib-profiles.js @@ -1067,7 +1067,7 @@ var getVersion = function (major, minor, security, patch) { + "." + (minor != null ? minor : version_numbers.get("DEFAULT_VERSION_MINOR")) + "." + (security != null ? security : version_numbers.get("DEFAULT_VERSION_SECURITY")) + "." + (patch != null ? patch : version_numbers.get("DEFAULT_VERSION_PATCH")); - while (version.match(".*\.0$")) { + while (version.match(".*\\.0$")) { version = version.substring(0, version.length - 2); } return version; From d2c5de915c28e533c83d0704a4e5f63b0f87be75 Mon Sep 17 00:00:00 2001 From: Phil Race Date: Fri, 3 Feb 2017 09:28:13 -0800 Subject: [PATCH 062/447] 8173409: make setMixingCutoutShape public and remove jdk.desktop Reviewed-by: serb, mchung, alexsch --- make/common/Modules.gmk | 1 - 1 file changed, 1 deletion(-) diff --git a/make/common/Modules.gmk b/make/common/Modules.gmk index 49f301d9da8..878b7ab0367 100644 --- a/make/common/Modules.gmk +++ b/make/common/Modules.gmk @@ -105,7 +105,6 @@ PLATFORM_MODULES += \ jdk.charsets \ jdk.crypto.ec \ jdk.crypto.cryptoki \ - jdk.desktop \ jdk.dynalink \ jdk.jsobject \ jdk.localedata \ From e9dd1485e65dbbb940eb439a4a0dff579669eaf1 Mon Sep 17 00:00:00 2001 From: Phil Race Date: Fri, 3 Feb 2017 09:28:34 -0800 Subject: [PATCH 063/447] 8173409: make setMixingCutoutShape public and remove jdk.desktop Reviewed-by: serb, mchung, alexsch --- .../classes/com/sun/awt/AWTUtilities.java | 3 +- .../share/classes/java/awt/Component.java | 15 ++- .../share/classes/javax/swing/JLayer.java | 3 +- .../share/classes/javax/swing/JRootPane.java | 3 +- .../share/classes/module-info.java | 3 - .../share/classes/sun/awt/AWTAccessor.java | 6 -- .../share/classes/jdk/awt/AWTUtils.java | 95 ------------------- .../share/classes/module-info.java | 34 ------- .../Mixing/AWT_Mixing/OpaqueOverlapping.java | 14 +-- jdk/test/java/awt/Mixing/OpaqueTest.java | 10 +- jdk/test/java/awt/jdk/TestJDKAWTUtils.java | 59 ------------ 11 files changed, 18 insertions(+), 227 deletions(-) delete mode 100644 jdk/src/jdk.desktop/share/classes/jdk/awt/AWTUtils.java delete mode 100644 jdk/src/jdk.desktop/share/classes/module-info.java delete mode 100644 jdk/test/java/awt/jdk/TestJDKAWTUtils.java diff --git a/jdk/src/java.desktop/share/classes/com/sun/awt/AWTUtilities.java b/jdk/src/java.desktop/share/classes/com/sun/awt/AWTUtilities.java index 1ba10acd72f..cc688975ed7 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/awt/AWTUtilities.java +++ b/jdk/src/java.desktop/share/classes/com/sun/awt/AWTUtilities.java @@ -456,8 +456,7 @@ public final class AWTUtilities { "The component argument should not be null."); } - AWTAccessor.getComponentAccessor().setMixingCutoutShape(component, - shape); + component.setMixingCutoutShape(shape); } } diff --git a/jdk/src/java.desktop/share/classes/java/awt/Component.java b/jdk/src/java.desktop/share/classes/java/awt/Component.java index 04247f8807c..1cbbc928065 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/Component.java +++ b/jdk/src/java.desktop/share/classes/java/awt/Component.java @@ -10380,7 +10380,11 @@ public abstract class Component implements ImageObserver, MenuContainer, } /** - * Sets a 'mixing-cutout' shape for the given component. + * Sets a 'mixing-cutout' shape for this lightweight component. + * + * This method is used exclusively for the purposes of the + * Heavyweight/Lightweight Components Mixing feature and will + * have no effect if applied to a heavyweight component. * * By default a lightweight component is treated as an opaque rectangle for * the purposes of the Heavyweight/Lightweight Components Mixing feature. @@ -10393,7 +10397,7 @@ public abstract class Component implements ImageObserver, MenuContainer, *

  • {@code null} - reverts the default cutout shape (the rectangle equal * to the component's {@code getBounds()}) *
  • empty-shape - does not cut out anything from heavyweight - * components. This makes the given lightweight component effectively + * components. This makes this lightweight component effectively * transparent. Note that descendants of the lightweight component still * affect the shapes of heavyweight components. An example of an * empty-shape is {@code new Rectangle()}. @@ -10407,16 +10411,11 @@ public abstract class Component implements ImageObserver, MenuContainer, * for the given glass pane component. If a developer needs some other * 'mixing-cutout' shape for the glass pane (which is rare), this must be * changed manually after installing the glass pane to the root pane. - *

    - * Note that the 'mixing-cutout' shape neither affects painting, nor the - * mouse events handling for the given component. It is used exclusively - * for the purposes of the Heavyweight/Lightweight Components Mixing - * feature. * * @param shape the new 'mixing-cutout' shape * @since 9 */ - void setMixingCutoutShape(Shape shape) { + public void setMixingCutoutShape(Shape shape) { Region region = shape == null ? null : Region.getInstance(shape, null); synchronized (getTreeLock()) { diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JLayer.java b/jdk/src/java.desktop/share/classes/javax/swing/JLayer.java index 833b09e6e73..1eca7759098 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JLayer.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JLayer.java @@ -286,8 +286,7 @@ public final class JLayer super.remove(oldGlassPane); } if (glassPane != null) { - AWTAccessor.getComponentAccessor().setMixingCutoutShape(glassPane, - new Rectangle()); + glassPane.setMixingCutoutShape(new Rectangle()); glassPane.setVisible(isGlassPaneVisible); super.addImpl(glassPane, null, 0); } diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JRootPane.java b/jdk/src/java.desktop/share/classes/javax/swing/JRootPane.java index 3228af034da..7407a099d5f 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JRootPane.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JRootPane.java @@ -663,8 +663,7 @@ public class JRootPane extends JComponent implements Accessible { throw new NullPointerException("glassPane cannot be set to null."); } - AWTAccessor.getComponentAccessor().setMixingCutoutShape(glass, - new Rectangle()); + glass.setMixingCutoutShape(new Rectangle()); boolean visible = false; if (glassPane != null && glassPane.getParent() == this) { diff --git a/jdk/src/java.desktop/share/classes/module-info.java b/jdk/src/java.desktop/share/classes/module-info.java index bb7abf11909..33ae0832d4d 100644 --- a/jdk/src/java.desktop/share/classes/module-info.java +++ b/jdk/src/java.desktop/share/classes/module-info.java @@ -88,9 +88,6 @@ module java.desktop { exports sun.awt to jdk.accessibility; - exports com.sun.awt to - jdk.desktop; - opens javax.swing.plaf.basic to jdk.jconsole; opens com.sun.java.swing.plaf.windows to diff --git a/jdk/src/java.desktop/share/classes/sun/awt/AWTAccessor.java b/jdk/src/java.desktop/share/classes/sun/awt/AWTAccessor.java index 29a435c96b9..39b14d8d7dc 100644 --- a/jdk/src/java.desktop/share/classes/sun/awt/AWTAccessor.java +++ b/jdk/src/java.desktop/share/classes/sun/awt/AWTAccessor.java @@ -93,12 +93,6 @@ public final class AWTAccessor { * its parent. */ Rectangle getBounds(Component comp); - /* - * Sets the shape of a lw component to cut out from hw components. - * - * See 6797587, 6776743, 6768307, and 6768332 for details - */ - void setMixingCutoutShape(Component comp, Shape shape); /** * Sets GraphicsConfiguration value for the component. diff --git a/jdk/src/jdk.desktop/share/classes/jdk/awt/AWTUtils.java b/jdk/src/jdk.desktop/share/classes/jdk/awt/AWTUtils.java deleted file mode 100644 index 93b493e6ccd..00000000000 --- a/jdk/src/jdk.desktop/share/classes/jdk/awt/AWTUtils.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package jdk.awt; - -import java.awt.Component; -import java.awt.Shape; - -import com.sun.awt.AWTUtilities; - -/** - * A class to allow access to JDK-specific utility methods. - * Methods in this class are always deprecated since a caller - * should be aware they may be removed and replaced in the future. - * Access using reflection is highly recommended. - * @since 9 - */ -public final class AWTUtils { - - /** - * No-one should be creating instances of this class. - */ - private AWTUtils() { - } - - /** - * Sets a 'mixing-cutout' shape for the given component. - * - * By default a lightweight component is treated as an opaque rectangle for - * the purposes of the Heavyweight/Lightweight Components Mixing feature. - * This method enables developers to set an arbitrary shape to be cut out - * from heavyweight components positioned underneath the lightweight - * component in the z-order. - *

    - * The {@code shape} argument may have the following values: - *

      - *
    • {@code null} - reverts the default cutout shape (the rectangle equal - * to the component's {@code getBounds()}) - *
    • empty-shape - does not cut out anything from heavyweight - * components. This makes the given lightweight component effectively - * transparent. Note that descendants of the lightweight component still - * affect the shapes of heavyweight components. An example of an - * empty-shape is {@code new Rectangle()}. - *
    • non-empty-shape - the given shape will be cut out from - * heavyweight components. - *
    - *

    - * The most common example when the 'mixing-cutout' shape is needed is a - * glass pane component. The {@link JRootPane#setGlassPane()} method - * automatically sets the empty-shape as the 'mixing-cutout' shape - * for the given glass pane component. If a developer needs some other - * 'mixing-cutout' shape for the glass pane (which is rare), this must be - * changed manually after installing the glass pane to the root pane. - *

    - * Note that the 'mixing-cutout' shape neither affects painting, nor the - * mouse events handling for the given component. It is used exclusively - * for the purposes of the Heavyweight/Lightweight Components Mixing - * feature. - * - * @param component the component that needs non-default - * 'mixing-cutout' shape - * @param shape the new 'mixing-cutout' shape - * @throws NullPointerException if the component argument is {@code null} - * @deprecated This API may be removed or replaced. - */ - @Deprecated - @SuppressWarnings("deprecation") - public static void setComponentMixingCutoutShape(Component component, - Shape shape) { - - AWTUtilities.setComponentMixingCutoutShape(component, shape); - } -} diff --git a/jdk/src/jdk.desktop/share/classes/module-info.java b/jdk/src/jdk.desktop/share/classes/module-info.java deleted file mode 100644 index 2aac00da299..00000000000 --- a/jdk/src/jdk.desktop/share/classes/module-info.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * Provides non-SE desktop APIs. - */ - -module jdk.desktop { - requires transitive java.desktop; - - exports jdk.awt; -} diff --git a/jdk/test/java/awt/Mixing/AWT_Mixing/OpaqueOverlapping.java b/jdk/test/java/awt/Mixing/AWT_Mixing/OpaqueOverlapping.java index de12271855a..8587454f301 100644 --- a/jdk/test/java/awt/Mixing/AWT_Mixing/OpaqueOverlapping.java +++ b/jdk/test/java/awt/Mixing/AWT_Mixing/OpaqueOverlapping.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,7 +22,6 @@ */ -import com.sun.awt.AWTUtilities; import java.awt.Frame; import java.awt.Panel; import java.awt.Point; @@ -44,11 +43,10 @@ import test.java.awt.regtesthelpers.Util; /* * @test * @key headful - * @bug 6776743 + * @bug 6776743 8173409 * @summary Opaque overlapping test for each AWT component * @library /java/awt/patchlib ../../regtesthelpers - * @modules java.desktop/com.sun.awt - * java.desktop/java.awt.peer + * @modules java.desktop/java.awt.peer * java.desktop/sun.awt * @build java.desktop/java.awt.Helper * @build Util @@ -134,12 +132,10 @@ public class OpaqueOverlapping extends OverlappingTestBase { // flag value. for (int i = 0; i < 9; ++i) { if (i == 3) { - AWTUtilities.setComponentMixingCutoutShape(light, - new Rectangle()); + light.setMixingCutoutShape(new Rectangle()); } if (i == 6) { - AWTUtilities.setComponentMixingCutoutShape(light, - null); + light.setMixingCutoutShape(null); } robot.mousePress(InputEvent.BUTTON1_MASK); diff --git a/jdk/test/java/awt/Mixing/OpaqueTest.java b/jdk/test/java/awt/Mixing/OpaqueTest.java index 2b4781b848a..1c7d44b9795 100644 --- a/jdk/test/java/awt/Mixing/OpaqueTest.java +++ b/jdk/test/java/awt/Mixing/OpaqueTest.java @@ -24,11 +24,10 @@ /* @test @key headful - @bug 4811096 + @bug 4811096 8173409 @summary Tests whether opaque and non-opaque components mix correctly @author anthony.petrov@...: area=awt.mixing @library ../regtesthelpers - @modules java.desktop/com.sun.awt @build Util @run main OpaqueTest */ @@ -44,7 +43,6 @@ import java.awt.*; import java.awt.event.*; import javax.swing.*; import test.java.awt.regtesthelpers.Util; -import com.sun.awt.AWTUtilities; @@ -125,12 +123,10 @@ public class OpaqueTest // flag value. for (int i = 0; i < 9; ++i) { if (i == 3) { - AWTUtilities.setComponentMixingCutoutShape(light, - new Rectangle()); + light.setMixingCutoutShape(new Rectangle()); } if (i == 6) { - AWTUtilities.setComponentMixingCutoutShape(light, - null); + light.setMixingCutoutShape(null); } robot.mousePress(InputEvent.BUTTON1_MASK); diff --git a/jdk/test/java/awt/jdk/TestJDKAWTUtils.java b/jdk/test/java/awt/jdk/TestJDKAWTUtils.java deleted file mode 100644 index 6f0439cc11a..00000000000 --- a/jdk/test/java/awt/jdk/TestJDKAWTUtils.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 8167126 - */ -import java.awt.BorderLayout; -import java.awt.Font; -import java.awt.Rectangle; -import javax.swing.JButton; -import javax.swing.JFrame; -import javax.swing.JPanel; -import javax.swing.SwingUtilities; - -public class TestJDKAWTUtils { - - static JFrame f; - public static void main(String[] args) throws Exception { - - SwingUtilities.invokeAndWait(() -> { - f = new JFrame("test"); - JPanel p = new JPanel(); - JButton b = new JButton("Hello"); - b.setFont(new Font(Font.DIALOG, Font.PLAIN, 80)); - p.setLayout(new BorderLayout()); - p.add("Center", b); - f.getContentPane().add(p); - f.pack(); - f.setVisible(true); - Rectangle r = new Rectangle(0, 0, 50, 50); - jdk.awt.AWTUtils.setComponentMixingCutoutShape(b, r); - }); - Thread.sleep(2000); - SwingUtilities.invokeAndWait(() -> f.dispose()); - } -} From 65ff124447a9e3b69d38828546d04a9ecb0b686d Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Fri, 3 Feb 2017 10:27:46 -0800 Subject: [PATCH 064/447] 8173383: Update JDK build to use -source and -target 10 Reviewed-by: dholmes --- .../test/tools/javac/processing/model/TestSourceVersion.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/langtools/test/tools/javac/processing/model/TestSourceVersion.java b/langtools/test/tools/javac/processing/model/TestSourceVersion.java index 06b4ef61e95..27da94d6252 100644 --- a/langtools/test/tools/javac/processing/model/TestSourceVersion.java +++ b/langtools/test/tools/javac/processing/model/TestSourceVersion.java @@ -23,7 +23,7 @@ /* * @test - * @bug 7025809 8028543 6415644 8028544 + * @bug 7025809 8028543 6415644 8028544 8029942 * @summary Test latest, latestSupported, underscore as keyword, etc. * @author Joseph D. Darcy * @modules java.compiler @@ -45,7 +45,7 @@ public class TestSourceVersion { private static void testLatestSupported() { if (SourceVersion.latest() != RELEASE_10 || - SourceVersion.latestSupported() != RELEASE_9) + SourceVersion.latestSupported() != RELEASE_10) throw new RuntimeException("Unexpected release value(s) found:\n" + "latest:\t" + SourceVersion.latest() + "\n" + "latestSupported:\t" + SourceVersion.latestSupported()); From 1d2bf95b12fb2f6f73e1e036afe39b0e265feeb4 Mon Sep 17 00:00:00 2001 From: Jamsheed Mohammed C M Date: Fri, 3 Feb 2017 19:26:48 -0800 Subject: [PATCH 065/447] 8173679: Disable ProfileTrap code and UseRTMLocking in emulated client Win32 Made emulatedVM related changes in cli verfiy*SameVM. Reviewed-by: kvn --- .../test/lib/cli/CommandLineOptionTest.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java b/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java index f794ef36090..8c574875f8a 100644 --- a/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java +++ b/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java @@ -199,6 +199,10 @@ public abstract class CommandLineOptionTest { throws Throwable { List finalOptions = new ArrayList<>(); finalOptions.add(CommandLineOptionTest.getVMTypeOption()); + String extraFlagForEmulated = CommandLineOptionTest.getVMTypeOptionForEmulated(); + if (extraFlagForEmulated != null) { + finalOptions.add(extraFlagForEmulated); + } Collections.addAll(finalOptions, options); CommandLineOptionTest.verifyJVMStartup(expectedMessages, @@ -390,6 +394,10 @@ public abstract class CommandLineOptionTest { String... additionalVMOpts) throws Throwable { List finalOptions = new ArrayList<>(); finalOptions.add(CommandLineOptionTest.getVMTypeOption()); + String extraFlagForEmulated = CommandLineOptionTest.getVMTypeOptionForEmulated(); + if (extraFlagForEmulated != null) { + finalOptions.add(extraFlagForEmulated); + } Collections.addAll(finalOptions, additionalVMOpts); CommandLineOptionTest.verifyOptionValue(optionName, expectedValue, @@ -497,6 +505,18 @@ public abstract class CommandLineOptionTest { throw new RuntimeException("Unknown VM mode."); } + /** + * @return addtional VMoptions(Emulated related) required to start a new VM with the same type as current. + */ + private static String getVMTypeOptionForEmulated() { + if (Platform.isServer() && !Platform.isEmulatedClient()) { + return "-XX:-NeverActAsServerClassMachine"; + } else if (Platform.isEmulatedClient()) { + return "-XX:+NeverActAsServerClassMachine"; + } + return null; + } + private final BooleanSupplier predicate; /** From 6720ad090e5004e87b3508374ea45c519e9124af Mon Sep 17 00:00:00 2001 From: Phil Race Date: Mon, 6 Feb 2017 09:32:41 -0800 Subject: [PATCH 066/447] 8170493: JNI exception pending in JavaComponentAccessibility.m Reviewed-by: serb, psadhukhan --- .../macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m index 5a91adf70b5..01b495be605 100644 --- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m +++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m @@ -136,7 +136,7 @@ static NSObject *sAttributeNamesLOCK = nil; fJavaRole = [javaRole retain]; fAccessible = (*env)->NewWeakGlobalRef(env, accessible); - + (*env)->ExceptionClear(env); // in case of OOME jobject jcomponent = [(AWTView *)fView awtComponent:env]; fComponent = (*env)->NewWeakGlobalRef(env, jcomponent); (*env)->DeleteLocalRef(env, jcomponent); From 184939a7e2c5baef195ce930d1e7dcd0185e9d21 Mon Sep 17 00:00:00 2001 From: Magnus Ihse Bursie Date: Tue, 7 Feb 2017 11:09:42 +0100 Subject: [PATCH 067/447] 8174064: Tab expansion broken for make Reviewed-by: erikj --- make/Init.gmk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/Init.gmk b/make/Init.gmk index 15d25b4136d..bf512e23d1e 100644 --- a/make/Init.gmk +++ b/make/Init.gmk @@ -66,7 +66,7 @@ ifeq ($(HAS_SPEC),) ifeq ($(CALLED_SPEC_TARGETS), ) ONLY_GLOBAL_TARGETS := true endif - ifneq ($(findstring qp, $(MAKEFLAGS)),) + ifeq ($(findstring p, $(MAKEFLAGS))$(findstring q, $(MAKEFLAGS)), pq) ONLY_GLOBAL_TARGETS := true endif From 2fd41316684f22b12cf08f0558d4ce7e34de6fa5 Mon Sep 17 00:00:00 2001 From: Magnus Ihse Bursie Date: Tue, 7 Feb 2017 12:17:59 +0100 Subject: [PATCH 068/447] 8174069: Verify that bash is at least version 3.2 Reviewed-by: erikj --- common/autoconf/basics.m4 | 12 ++++++++++++ common/autoconf/generated-configure.sh | 16 +++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/common/autoconf/basics.m4 b/common/autoconf/basics.m4 index 35e835c3994..eb5c5f85752 100644 --- a/common/autoconf/basics.m4 +++ b/common/autoconf/basics.m4 @@ -1202,6 +1202,18 @@ AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES], # Check for support for specific options in bash AC_DEFUN_ONCE([BASIC_CHECK_BASH_OPTIONS], [ + # Check bash version + # Extra [ ] to stop m4 mangling + [ BASH_VER=`$BASH --version | $SED -n -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'` ] + AC_MSG_CHECKING([bash version]) + AC_MSG_RESULT([$BASH_VER]) + + BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1` + BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2` + if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then + AC_MSG_ERROR([bash version 3.2 or better is required]) + fi + # Test if bash supports pipefail. AC_MSG_CHECKING([if bash supports pipefail]) if ${BASH} -c 'set -o pipefail'; then diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index 917181abf10..951688d0042 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -5170,7 +5170,7 @@ VS_SDK_PLATFORM_NAME_2013= #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1486175373 +DATE_WHEN_GENERATED=1486465953 ############################################################################### # @@ -24092,6 +24092,20 @@ $as_echo "$tool_specified" >&6; } fi + # Check bash version + # Extra [ ] to stop m4 mangling + BASH_VER=`$BASH --version | $SED -n -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5 +$as_echo_n "checking bash version... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5 +$as_echo "$BASH_VER" >&6; } + + BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1` + BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2` + if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then + as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5 + fi + # Test if bash supports pipefail. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5 $as_echo_n "checking if bash supports pipefail... " >&6; } From 24e521a020c453527d4a73efab202073b00b9d61 Mon Sep 17 00:00:00 2001 From: Mikhail Cherkasov Date: Tue, 7 Feb 2017 18:55:15 +0300 Subject: [PATCH 069/447] 8173145: Menu is activated after using mnemonic Alt/Key combination Reviewed-by: serb, ssadetsky --- .../swing/plaf/windows/WindowsRootPaneUI.java | 7 +- .../java/swing/plaf/windows/Test8173145.java | 123 ++++++++++++++++++ 2 files changed, 128 insertions(+), 2 deletions(-) create mode 100644 jdk/test/com/sun/java/swing/plaf/windows/Test8173145.java diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java index 8f730949684..be22c7300da 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java @@ -165,8 +165,11 @@ public class WindowsRootPaneUI extends BasicRootPaneUI { } public boolean postProcessKeyEvent(KeyEvent ev) { - if(ev.isConsumed()) { - // do not manage consumed event + if(ev.isConsumed() && ev.getKeyCode() != KeyEvent.VK_ALT) { + // mnemonic combination, it's consumed, but we need + // set altKeyPressed to false, otherwise after selection + // component by mnemonic combination a menu will be open + altKeyPressed = false; return false; } if (ev.getKeyCode() == KeyEvent.VK_ALT) { diff --git a/jdk/test/com/sun/java/swing/plaf/windows/Test8173145.java b/jdk/test/com/sun/java/swing/plaf/windows/Test8173145.java new file mode 100644 index 00000000000..cb7bb12abe8 --- /dev/null +++ b/jdk/test/com/sun/java/swing/plaf/windows/Test8173145.java @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + @bug 8173145 + @summary Menu is activated after using mnemonic Alt/Key combination + @modules java.desktop/com.sun.java.swing.plaf.windows + @run main Test8173145 +*/ + +import java.awt.*; +import java.awt.event.KeyEvent; +import java.lang.reflect.InvocationTargetException; + +import javax.swing.*; + +public class Test8173145 { + + private volatile static JButton btn; + private volatile static boolean uiCreated; + + public static void main(String[] args) throws InvocationTargetException, InterruptedException, AWTException { + SwingUtilities.invokeAndWait(new Runnable() { + @Override + public void run() { + try { + uiCreated = createGUI(); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + + if (uiCreated) { + test(); + } else { + //no windows l&f, skip the test + } + } + + private static void test() { + final Robot robot; + try { + robot = new Robot(); + } catch (AWTException e) { + throw new RuntimeException(e); + } + robot.setAutoDelay(100); + robot.waitForIdle(); + + robot.keyPress(KeyEvent.VK_ALT); + robot.keyPress(KeyEvent.VK_M); + robot.keyRelease(KeyEvent.VK_M); + robot.keyRelease(KeyEvent.VK_ALT); + + Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); + + if (focusOwner != btn) { + throw new RuntimeException("Wrong focus owner"); + } + } + + private static boolean createGUI() { + try { + UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); + } catch (Exception e) { + return false; + } + JFrame f = new JFrame(); + + JPanel panel = new JPanel(); + btn = new JButton("Mmmmm"); + btn.setMnemonic(KeyEvent.VK_M); + btn.setDisplayedMnemonicIndex(0); + panel.add(btn); + + JTextField tf = new JTextField(); + tf.setColumns(10); + panel.add(tf); + + f.setJMenuBar(getMenuBar()); + f.add(panel); + f.pack(); + f.setVisible(true); + tf.requestFocus(); + return true; + } + + static JMenuBar getMenuBar() { + JMenuBar menuBar; + JMenu menu; + + menuBar = new JMenuBar(); + + menu = new JMenu("Menu"); + menuBar.add(menu); + + JMenuItem mi = new JMenuItem("test"); + menu.add(mi); + + return menuBar; + } +} From d3b74dbcb7974055bc88a312f3366f6e9dc307bd Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Tue, 7 Feb 2017 11:01:04 -0800 Subject: [PATCH 070/447] 8173910: (fs) java/nio/file/FileSystem/Basic.java should conditionally check FileStores On Unix platforms, spawn a 'df' process and skip FileStore check if it hangs Reviewed-by: alanb --- jdk/test/java/nio/file/FileSystem/Basic.java | 61 +++++++++++++++++--- 1 file changed, 52 insertions(+), 9 deletions(-) diff --git a/jdk/test/java/nio/file/FileSystem/Basic.java b/jdk/test/java/nio/file/FileSystem/Basic.java index 4b02ff498e7..4e780aff2d3 100644 --- a/jdk/test/java/nio/file/FileSystem/Basic.java +++ b/jdk/test/java/nio/file/FileSystem/Basic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,11 +30,18 @@ */ import java.io.File; -import java.nio.file.*; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; +import java.nio.file.Files; +import java.nio.file.FileStore; +import java.nio.file.FileSystem; +import java.nio.file.FileSystems; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.ProviderNotFoundException; import java.util.HashMap; +import java.util.concurrent.TimeUnit; import jdk.testlibrary.FileUtils; /** @@ -47,6 +54,44 @@ public class Basic { throw new RuntimeException(msg); } + static void checkFileStores(String os, FileSystem fs) throws IOException { + boolean checkFileStores = true; + if (!os.equals("Windows")) { + // try to check whether 'df' hangs + System.out.println("\n--- Begin df output ---"); + System.out.flush(); + Process proc = new ProcessBuilder("df").inheritIO().start(); + try { + proc.waitFor(90, TimeUnit.SECONDS); + } catch (InterruptedException ignored) { + } + System.out.println("--- End df output ---\n"); + System.out.flush(); + try { + int exitValue = proc.exitValue(); + if (exitValue != 0) { + System.err.printf("df process exited with %d != 0%n", + exitValue); + checkFileStores = false; + } + } catch (IllegalThreadStateException ignored) { + System.err.println("df command apparently hung"); + checkFileStores = false; + } + } + + // sanity check method + if (checkFileStores) { + System.out.println("\n--- Begin FileStores ---"); + for (FileStore store: fs.getFileStores()) { + System.out.println(store); + } + System.out.println("--- EndFileStores ---\n"); + } else { + System.err.println("Skipping FileStore check due to df failure"); + } + } + static void checkSupported(FileSystem fs, String... views) { for (String view: views) { check(fs.supportedFileAttributeViews().contains(view), @@ -70,7 +115,9 @@ public class Basic { } } - public static void main(String[] args) throws IOException, URISyntaxException { + public static void main(String[] args) + throws IOException, URISyntaxException { + String os = System.getProperty("os.name"); FileSystem fs = FileSystems.getDefault(); // close should throw UOE @@ -85,15 +132,11 @@ public class Basic { check(fs.provider().getScheme().equals("file"), "should use 'file' scheme"); - // santity check method - need to re-visit this in future as I/O errors - // are possible - for (FileStore store: fs.getFileStores()) { - System.out.println(store); - } + // sanity check FileStores + checkFileStores(os, fs); // sanity check supportedFileAttributeViews checkSupported(fs, "basic"); - String os = System.getProperty("os.name"); if (os.equals("SunOS")) checkSupported(fs, "posix", "unix", "owner", "acl", "user"); if (os.equals("Linux")) From 6409218626267e2a5275f40e84eb6d275a9ef635 Mon Sep 17 00:00:00 2001 From: Lance Andersen Date: Tue, 7 Feb 2017 14:07:24 -0500 Subject: [PATCH 071/447] 8169313: java.xml.ws not granted NetPermission(getProxySelector) Reviewed-by: alanb, aefimov, mchung --- jdk/src/java.base/share/lib/security/default.policy | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jdk/src/java.base/share/lib/security/default.policy b/jdk/src/java.base/share/lib/security/default.policy index 7f7ad4ff4b3..75147a6ae14 100644 --- a/jdk/src/java.base/share/lib/security/default.policy +++ b/jdk/src/java.base/share/lib/security/default.policy @@ -102,6 +102,8 @@ grant codeBase "jrt:/java.xml.crypto" { }; grant codeBase "jrt:/java.xml.ws" { + permission java.net.NetPermission + "getProxySelector"; permission java.lang.RuntimePermission "accessClassInPackage.com.sun.org.apache.xml.internal.resolver"; permission java.lang.RuntimePermission From fc6ea4234fd6fa12e6753dad94904dfea9392878 Mon Sep 17 00:00:00 2001 From: Christoph Langer Date: Tue, 7 Feb 2017 20:29:24 +0100 Subject: [PATCH 072/447] 8174039: (ch) DefaultAsynchronousChannelProvider should be split into platform specific versions Reviewed-by: alanb, redestad, bpb --- .../DefaultAsynchronousChannelProvider.java | 34 ++------------ .../sun/nio/ch/DefaultSelectorProvider.java | 5 +- .../DefaultAsynchronousChannelProvider.java | 47 +++++++++++++++++++ .../sun/nio/ch/DefaultSelectorProvider.java | 5 +- .../DefaultAsynchronousChannelProvider.java | 47 +++++++++++++++++++ .../sun/nio/ch/DefaultSelectorProvider.java | 5 +- .../DefaultAsynchronousChannelProvider.java | 47 +++++++++++++++++++ .../sun/nio/ch/DefaultSelectorProvider.java | 5 +- 8 files changed, 152 insertions(+), 43 deletions(-) rename jdk/src/java.base/{unix => aix}/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java (51%) create mode 100644 jdk/src/java.base/linux/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java create mode 100644 jdk/src/java.base/macosx/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java create mode 100644 jdk/src/java.base/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java diff --git a/jdk/src/java.base/unix/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java b/jdk/src/java.base/aix/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java similarity index 51% rename from jdk/src/java.base/unix/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java rename to jdk/src/java.base/aix/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java index 248c6a154d2..1ba654eb28e 100644 --- a/jdk/src/java.base/unix/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java +++ b/jdk/src/java.base/aix/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,10 +26,9 @@ package sun.nio.ch; import java.nio.channels.spi.AsynchronousChannelProvider; -import sun.security.action.GetPropertyAction; /** - * Creates this platform's default asynchronous channel provider + * Creates this platform's default AsynchronousChannelProvider */ public class DefaultAsynchronousChannelProvider { @@ -39,37 +38,10 @@ public class DefaultAsynchronousChannelProvider { */ private DefaultAsynchronousChannelProvider() { } - @SuppressWarnings("unchecked") - private static AsynchronousChannelProvider createProvider(String cn) { - Class c; - try { - c = (Class)Class.forName(cn); - } catch (ClassNotFoundException x) { - throw new AssertionError(x); - } - try { - @SuppressWarnings("deprecation") - AsynchronousChannelProvider result = c.newInstance(); - return result; - } catch (IllegalAccessException | InstantiationException x) { - throw new AssertionError(x); - } - - } - /** * Returns the default AsynchronousChannelProvider. */ public static AsynchronousChannelProvider create() { - String osname = GetPropertyAction.privilegedGetProperty("os.name"); - if (osname.equals("SunOS")) - return createProvider("sun.nio.ch.SolarisAsynchronousChannelProvider"); - if (osname.equals("Linux")) - return createProvider("sun.nio.ch.LinuxAsynchronousChannelProvider"); - if (osname.contains("OS X")) - return createProvider("sun.nio.ch.BsdAsynchronousChannelProvider"); - if (osname.equals("AIX")) - return createProvider("sun.nio.ch.AixAsynchronousChannelProvider"); - throw new InternalError("platform not recognized"); + return new AixAsynchronousChannelProvider(); } } diff --git a/jdk/src/java.base/aix/classes/sun/nio/ch/DefaultSelectorProvider.java b/jdk/src/java.base/aix/classes/sun/nio/ch/DefaultSelectorProvider.java index 3f23cc4fa3b..dbc3ab61de8 100644 --- a/jdk/src/java.base/aix/classes/sun/nio/ch/DefaultSelectorProvider.java +++ b/jdk/src/java.base/aix/classes/sun/nio/ch/DefaultSelectorProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,7 +42,6 @@ public class DefaultSelectorProvider { * Returns the default SelectorProvider. */ public static SelectorProvider create() { - return new sun.nio.ch.PollSelectorProvider(); + return new PollSelectorProvider(); } - } diff --git a/jdk/src/java.base/linux/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java b/jdk/src/java.base/linux/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java new file mode 100644 index 00000000000..f2354103264 --- /dev/null +++ b/jdk/src/java.base/linux/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package sun.nio.ch; + +import java.nio.channels.spi.AsynchronousChannelProvider; + +/** + * Creates this platform's default AsynchronousChannelProvider + */ + +public class DefaultAsynchronousChannelProvider { + + /** + * Prevent instantiation. + */ + private DefaultAsynchronousChannelProvider() { } + + /** + * Returns the default AsynchronousChannelProvider. + */ + public static AsynchronousChannelProvider create() { + return new LinuxAsynchronousChannelProvider(); + } +} diff --git a/jdk/src/java.base/linux/classes/sun/nio/ch/DefaultSelectorProvider.java b/jdk/src/java.base/linux/classes/sun/nio/ch/DefaultSelectorProvider.java index 1278f1583ee..77531b283b3 100644 --- a/jdk/src/java.base/linux/classes/sun/nio/ch/DefaultSelectorProvider.java +++ b/jdk/src/java.base/linux/classes/sun/nio/ch/DefaultSelectorProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,7 +42,6 @@ public class DefaultSelectorProvider { * Returns the default SelectorProvider. */ public static SelectorProvider create() { - return new sun.nio.ch.EPollSelectorProvider(); + return new EPollSelectorProvider(); } - } diff --git a/jdk/src/java.base/macosx/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java b/jdk/src/java.base/macosx/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java new file mode 100644 index 00000000000..8bb368223e4 --- /dev/null +++ b/jdk/src/java.base/macosx/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package sun.nio.ch; + +import java.nio.channels.spi.AsynchronousChannelProvider; + +/** + * Creates this platform's default AsynchronousChannelProvider + */ + +public class DefaultAsynchronousChannelProvider { + + /** + * Prevent instantiation. + */ + private DefaultAsynchronousChannelProvider() { } + + /** + * Returns the default AsynchronousChannelProvider. + */ + public static AsynchronousChannelProvider create() { + return new BsdAsynchronousChannelProvider(); + } +} diff --git a/jdk/src/java.base/macosx/classes/sun/nio/ch/DefaultSelectorProvider.java b/jdk/src/java.base/macosx/classes/sun/nio/ch/DefaultSelectorProvider.java index e55f8e6bf34..c7d67b27ecd 100644 --- a/jdk/src/java.base/macosx/classes/sun/nio/ch/DefaultSelectorProvider.java +++ b/jdk/src/java.base/macosx/classes/sun/nio/ch/DefaultSelectorProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,7 +42,6 @@ public class DefaultSelectorProvider { * Returns the default SelectorProvider. */ public static SelectorProvider create() { - return new sun.nio.ch.KQueueSelectorProvider(); + return new KQueueSelectorProvider(); } - } diff --git a/jdk/src/java.base/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java b/jdk/src/java.base/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java new file mode 100644 index 00000000000..36e23bd7d6b --- /dev/null +++ b/jdk/src/java.base/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package sun.nio.ch; + +import java.nio.channels.spi.AsynchronousChannelProvider; + +/** + * Creates this platform's default AsynchronousChannelProvider + */ + +public class DefaultAsynchronousChannelProvider { + + /** + * Prevent instantiation. + */ + private DefaultAsynchronousChannelProvider() { } + + /** + * Returns the default AsynchronousChannelProvider. + */ + public static AsynchronousChannelProvider create() { + return new SolarisAsynchronousChannelProvider(); + } +} diff --git a/jdk/src/java.base/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java b/jdk/src/java.base/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java index 866d8d4c6bb..aa823e49378 100644 --- a/jdk/src/java.base/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java +++ b/jdk/src/java.base/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,7 +42,6 @@ public class DefaultSelectorProvider { * Returns the default SelectorProvider. */ public static SelectorProvider create() { - return new sun.nio.ch.DevPollSelectorProvider(); + return new DevPollSelectorProvider(); } - } From 18cb39a7746009e179d6cd4338b2fe15738b368b Mon Sep 17 00:00:00 2001 From: Lance Andersen Date: Tue, 7 Feb 2017 15:46:55 -0500 Subject: [PATCH 073/447] 8057795: Update of the mimestypes.default for JAF Reviewed-by: bpb --- .../src/java.activation/share/classes/META-INF/mimetypes.default | 1 + 1 file changed, 1 insertion(+) diff --git a/jaxws/src/java.activation/share/classes/META-INF/mimetypes.default b/jaxws/src/java.activation/share/classes/META-INF/mimetypes.default index 0c22eb2efb8..1b4056b194f 100644 --- a/jaxws/src/java.activation/share/classes/META-INF/mimetypes.default +++ b/jaxws/src/java.activation/share/classes/META-INF/mimetypes.default @@ -7,6 +7,7 @@ image/gif gif GIF image/ief ief image/jpeg jpeg jpg jpe JPG image/tiff tiff tif +image/png png PNG image/x-xwindowdump xwd application/postscript ai eps ps application/rtf rtf From b8e61b9b1cac0df6d476fcfddc29dc3b7c94ae1a Mon Sep 17 00:00:00 2001 From: Ramanand Patil Date: Wed, 8 Feb 2017 02:23:32 +0530 Subject: [PATCH 074/447] 8173943: Change error reporting of LauncherHelper to include actual Error class name Reviewed-by: alanb, ksrini --- .../share/classes/sun/launcher/LauncherHelper.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jdk/src/java.base/share/classes/sun/launcher/LauncherHelper.java b/jdk/src/java.base/share/classes/sun/launcher/LauncherHelper.java index ee8f311d2e4..c3367fb19f1 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/LauncherHelper.java +++ b/jdk/src/java.base/share/classes/sun/launcher/LauncherHelper.java @@ -591,8 +591,8 @@ public final class LauncherHelper { c = Class.forName(m, cn); } } catch (LinkageError le) { - abort(null, "java.launcher.module.error3", - mainClass, m.getName(), le.getLocalizedMessage()); + abort(null, "java.launcher.module.error3", mainClass, m.getName(), + le.getClass().getName() + ": " + le.getLocalizedMessage()); } if (c == null) { abort(null, "java.launcher.module.error2", mainClass, mainModule); @@ -645,7 +645,8 @@ public final class LauncherHelper { } } } catch (LinkageError le) { - abort(le, "java.launcher.cls.error6", cn, le.getLocalizedMessage()); + abort(le, "java.launcher.cls.error6", cn, + le.getClass().getName() + ": " + le.getLocalizedMessage()); } return mainClass; } From f87f7e44b74d88a5339da7c487370f72208661fa Mon Sep 17 00:00:00 2001 From: Stuart Marks Date: Tue, 7 Feb 2017 13:45:26 -0800 Subject: [PATCH 075/447] 8044626: Update RMI specifications to reflect modularization changes 8165649: Re-examine if Activatable object can be created from non-public class and/or constructor Reviewed-by: alanb, mchung --- .../rmi/activation/ActivationInstantiator.java | 15 ++++++++++++++- .../classes/java/rmi/activation/Activator.java | 2 +- .../java/rmi/server/UnicastRemoteObject.java | 18 ++++++++++++++---- 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/jdk/src/java.rmi/share/classes/java/rmi/activation/ActivationInstantiator.java b/jdk/src/java.rmi/share/classes/java/rmi/activation/ActivationInstantiator.java index 8652492670b..4e100fb9abb 100644 --- a/jdk/src/java.rmi/share/classes/java/rmi/activation/ActivationInstantiator.java +++ b/jdk/src/java.rmi/share/classes/java/rmi/activation/ActivationInstantiator.java @@ -60,7 +60,20 @@ public interface ActivationInstantiator extends Remote { * initialization data, and * *

  • returning a MarshalledObject containing the stub for the - * remote object it created + * remote object it created. + * + *

    In order for activation to be successful, one of the following requirements + * must be met, otherwise {@link ActivationException} is thrown: + * + *

    • The class to be activated and the special activation constructor are both public, + * and the class resides in a package that is + * {@linkplain java.lang.reflect.Module#isExported(String,java.lang.reflect.Module) exported} + * to at least the {@code java.rmi} module; or + * + *
    • The class to be activated resides in a package that is + * {@linkplain java.lang.reflect.Module#isOpen(String,java.lang.reflect.Module) open} + * to at least the {@code java.rmi} module. + *
    * * @param id the object's activation identifier * @param desc the object's descriptor diff --git a/jdk/src/java.rmi/share/classes/java/rmi/activation/Activator.java b/jdk/src/java.rmi/share/classes/java/rmi/activation/Activator.java index 18fd82ca3a1..dca2b69b089 100644 --- a/jdk/src/java.rmi/share/classes/java/rmi/activation/Activator.java +++ b/jdk/src/java.rmi/share/classes/java/rmi/activation/Activator.java @@ -48,7 +48,7 @@ import java.rmi.activation.UnknownObjectException; * The Activator works closely with * ActivationSystem, which provides a means for registering * groups and objects within those groups, and ActivationMonitor, - * which recives information about active and inactive objects and inactive + * which receives information about active and inactive objects and inactive * groups.

    * * The activator is responsible for monitoring and detecting when diff --git a/jdk/src/java.rmi/share/classes/java/rmi/server/UnicastRemoteObject.java b/jdk/src/java.rmi/share/classes/java/rmi/server/UnicastRemoteObject.java index f18c66eaf4a..ecc1b6590bd 100644 --- a/jdk/src/java.rmi/share/classes/java/rmi/server/UnicastRemoteObject.java +++ b/jdk/src/java.rmi/share/classes/java/rmi/server/UnicastRemoteObject.java @@ -107,8 +107,9 @@ import sun.rmi.transport.LiveRef; * the binary name of the root class with the suffix {@code _Stub}. * *

  • The stub class is loaded by name using the class loader of the root - * class. The stub class must extend {@link RemoteStub} and must have a - * public constructor that has one parameter of type {@link RemoteRef}. + * class. The stub class must be public, it must extend {@link RemoteStub}, it must + * reside in a package that is exported to at least the {@code java.rmi} module, and it + * must have a public constructor that has one parameter of type {@link RemoteRef}. * *
  • Finally, an instance of the stub class is constructed with a * {@link RemoteRef}. @@ -124,12 +125,21 @@ import sun.rmi.transport.LiveRef; * *
      * - *
    • The proxy's class is defined by the class loader of the remote - * object's class. + *
    • The proxy's class is defined according to the specifications for the + * + * {@code Proxy} + * + * class, using the class loader of the remote object's class. * *
    • The proxy implements all the remote interfaces implemented by the * remote object's class. * + *
    • Each remote interface must either be public and reside in a package that is + * {@linkplain java.lang.reflect.Module#isExported(String,java.lang.reflect.Module) exported} + * to at least the {@code java.rmi} module, or it must reside in a package that is + * {@linkplain java.lang.reflect.Module#isOpen(String,java.lang.reflect.Module) open} + * to at least the {@code java.rmi} module. + * *
    • The proxy's invocation handler is a {@link * RemoteObjectInvocationHandler} instance constructed with a * {@link RemoteRef}. From f7fbfc06c600530cecfb50bf5c14c74a955f8271 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Tue, 7 Feb 2017 16:19:50 -0800 Subject: [PATCH 076/447] 8174140: Move test files into package hierarchy Reviewed-by: darcy --- langtools/test/tools/javac/T4093617/T4093617.java | 4 ++-- .../javac/T4093617/java.base/{ => java/lang}/Object.java | 0 langtools/test/tools/javac/redefineObject/Object1-test.java | 4 ++-- langtools/test/tools/javac/redefineObject/Object2-test.java | 4 ++-- .../redefineObject/java.base/{ => java/lang}/Object1.java | 0 .../redefineObject/java.base/{ => java/lang}/Object2.java | 0 6 files changed, 6 insertions(+), 6 deletions(-) rename langtools/test/tools/javac/T4093617/java.base/{ => java/lang}/Object.java (100%) rename langtools/test/tools/javac/redefineObject/java.base/{ => java/lang}/Object1.java (100%) rename langtools/test/tools/javac/redefineObject/java.base/{ => java/lang}/Object2.java (100%) diff --git a/langtools/test/tools/javac/T4093617/T4093617.java b/langtools/test/tools/javac/T4093617/T4093617.java index 5162097a8cb..8fa7dfaca55 100644 --- a/langtools/test/tools/javac/T4093617/T4093617.java +++ b/langtools/test/tools/javac/T4093617/T4093617.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,6 @@ * @bug 4093617 * @summary Object has no superclass * @author Peter von der Ah\u00e9 - * @compile/module=java.base/fail/ref=T4093617.out -XDrawDiagnostics Object.java + * @compile/module=java.base/fail/ref=T4093617.out -XDrawDiagnostics java/lang/Object.java */ diff --git a/langtools/test/tools/javac/T4093617/java.base/Object.java b/langtools/test/tools/javac/T4093617/java.base/java/lang/Object.java similarity index 100% rename from langtools/test/tools/javac/T4093617/java.base/Object.java rename to langtools/test/tools/javac/T4093617/java.base/java/lang/Object.java diff --git a/langtools/test/tools/javac/redefineObject/Object1-test.java b/langtools/test/tools/javac/redefineObject/Object1-test.java index a654ecee5d5..dae9667452d 100644 --- a/langtools/test/tools/javac/redefineObject/Object1-test.java +++ b/langtools/test/tools/javac/redefineObject/Object1-test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,6 @@ * @summary java.lang.Object can't be redefined without crashing javac * @author gafter * - * @compile/module=java.base/fail/ref=Object1.out -XDrawDiagnostics Object1.java + * @compile/module=java.base/fail/ref=Object1.out -XDrawDiagnostics java/lang/Object1.java */ diff --git a/langtools/test/tools/javac/redefineObject/Object2-test.java b/langtools/test/tools/javac/redefineObject/Object2-test.java index 59eb4b670df..8eb033b5cfa 100644 --- a/langtools/test/tools/javac/redefineObject/Object2-test.java +++ b/langtools/test/tools/javac/redefineObject/Object2-test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,5 +27,5 @@ * @summary java.lang.Object can't be redefined without crashing javac * @author gafter * - * @compile/module=java.base/fail/ref=Object2.out -XDrawDiagnostics Object2.java + * @compile/module=java.base/fail/ref=Object2.out -XDrawDiagnostics java/lang/Object2.java */ diff --git a/langtools/test/tools/javac/redefineObject/java.base/Object1.java b/langtools/test/tools/javac/redefineObject/java.base/java/lang/Object1.java similarity index 100% rename from langtools/test/tools/javac/redefineObject/java.base/Object1.java rename to langtools/test/tools/javac/redefineObject/java.base/java/lang/Object1.java diff --git a/langtools/test/tools/javac/redefineObject/java.base/Object2.java b/langtools/test/tools/javac/redefineObject/java.base/java/lang/Object2.java similarity index 100% rename from langtools/test/tools/javac/redefineObject/java.base/Object2.java rename to langtools/test/tools/javac/redefineObject/java.base/java/lang/Object2.java From f24113bdb2cb5ea5f22ba61b56e4d5b9bb1781ec Mon Sep 17 00:00:00 2001 From: Kumar Srinivasan Date: Tue, 7 Feb 2017 13:45:29 -0800 Subject: [PATCH 077/447] 8173302: Move the Description up on module and package index page Reviewed-by: bpatel, jjg --- .../formats/html/ModuleIndexWriter.java | 36 ++------- .../formats/html/PackageIndexWriter.java | 36 ++------- .../doclet/testOverview/TestOverview.java | 81 +++++++++++++++++++ .../doclet/testOverview/msrc/module-info.java | 31 +++++++ .../doclet/testOverview/msrc/p1/C.java | 26 ++++++ .../doclet/testOverview/msrc/p2/C2.java | 26 ++++++ .../javadoc/doclet/testOverview/overview.html | 6 ++ .../javadoc/doclet/testOverview/src/p1/C.java | 26 ++++++ .../doclet/testOverview/src/p2/C2.java | 26 ++++++ 9 files changed, 238 insertions(+), 56 deletions(-) create mode 100644 langtools/test/jdk/javadoc/doclet/testOverview/TestOverview.java create mode 100644 langtools/test/jdk/javadoc/doclet/testOverview/msrc/module-info.java create mode 100644 langtools/test/jdk/javadoc/doclet/testOverview/msrc/p1/C.java create mode 100644 langtools/test/jdk/javadoc/doclet/testOverview/msrc/p2/C2.java create mode 100644 langtools/test/jdk/javadoc/doclet/testOverview/overview.html create mode 100644 langtools/test/jdk/javadoc/doclet/testOverview/src/p1/C.java create mode 100644 langtools/test/jdk/javadoc/doclet/testOverview/src/p2/C2.java diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleIndexWriter.java b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleIndexWriter.java index 2d8317780a3..40ffe1693dd 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleIndexWriter.java +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleIndexWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -144,6 +144,7 @@ public class ModuleIndexWriter extends AbstractModuleIndexWriter { Content div = HtmlTree.DIV(HtmlStyle.contentContainer, table); if (configuration.allowTag(HtmlTag.MAIN)) { htmlTree.addContent(div); + body.addContent(htmlTree); } else { body.addContent(div); } @@ -183,21 +184,12 @@ public class ModuleIndexWriter extends AbstractModuleIndexWriter { protected void addOverviewHeader(Content body) { addConfigurationTitle(body); if (!utils.getFullBody(configuration.overviewElement).isEmpty()) { - HtmlTree subTitleDiv = new HtmlTree(HtmlTag.DIV); - subTitleDiv.addStyle(HtmlStyle.subTitle); - addSummaryComment(configuration.overviewElement, subTitleDiv); - Content div = HtmlTree.DIV(HtmlStyle.header, subTitleDiv); - Content see = new ContentBuilder(); - see.addContent(contents.seeLabel); - see.addContent(" "); - Content descPara = HtmlTree.P(see); - Content descLink = getHyperLink(getDocLink( - SectionName.OVERVIEW_DESCRIPTION), - contents.descriptionLabel, "", ""); - descPara.addContent(descLink); - div.addContent(descPara); + HtmlTree div = new HtmlTree(HtmlTag.DIV); + div.addStyle(HtmlStyle.contentContainer); + addOverviewComment(div); if (configuration.allowTag(HtmlTag.MAIN)) { htmlTree.addContent(div); + body.addContent(htmlTree); } else { body.addContent(div); } @@ -213,29 +205,17 @@ public class ModuleIndexWriter extends AbstractModuleIndexWriter { */ protected void addOverviewComment(Content htmltree) { if (!utils.getFullBody(configuration.overviewElement).isEmpty()) { - htmltree.addContent(getMarkerAnchor(SectionName.OVERVIEW_DESCRIPTION)); addInlineComment(configuration.overviewElement, htmltree); } } /** - * Adds the tag information as provided in the file specified by the - * "-overview" option on the command line. + * Not required for this page. * * @param body the documentation tree to which the overview will be added */ @Override - protected void addOverview(Content body) { - HtmlTree div = new HtmlTree(HtmlTag.DIV); - div.addStyle(HtmlStyle.contentContainer); - addOverviewComment(div); - if (configuration.allowTag(HtmlTag.MAIN)) { - htmlTree.addContent(div); - body.addContent(htmlTree); - } else { - body.addContent(div); - } - } + protected void addOverview(Content body) {} /** * Adds the top text (from the -top option), the upper diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexWriter.java b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexWriter.java index cf5f1da6fbf..6e70ed19ce5 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexWriter.java +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -134,6 +134,7 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter { Content div = HtmlTree.DIV(HtmlStyle.contentContainer, table); if (configuration.allowTag(HtmlTag.MAIN)) { htmlTree.addContent(div); + body.addContent(htmlTree); } else { body.addContent(div); } @@ -176,21 +177,12 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter { protected void addOverviewHeader(Content body) { addConfigurationTitle(body); if (!utils.getFullBody(configuration.overviewElement).isEmpty()) { - HtmlTree subTitleDiv = new HtmlTree(HtmlTag.DIV); - subTitleDiv.addStyle(HtmlStyle.subTitle); - addSummaryComment(configuration.overviewElement, subTitleDiv); - Content div = HtmlTree.DIV(HtmlStyle.header, subTitleDiv); - Content descBody = new ContentBuilder(); - descBody.addContent(contents.seeLabel); - descBody.addContent(" "); - Content descPara = HtmlTree.P(descBody); - Content descLink = getHyperLink(getDocLink( - SectionName.OVERVIEW_DESCRIPTION), - contents.descriptionLabel, "", ""); - descPara.addContent(descLink); - div.addContent(descPara); + HtmlTree div = new HtmlTree(HtmlTag.DIV); + div.addStyle(HtmlStyle.contentContainer); + addOverviewComment(div); if (configuration.allowTag(HtmlTag.MAIN)) { htmlTree.addContent(div); + body.addContent(htmlTree); } else { body.addContent(div); } @@ -206,29 +198,17 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter { */ protected void addOverviewComment(Content htmltree) { if (!utils.getFullBody(configuration.overviewElement).isEmpty()) { - htmltree.addContent(getMarkerAnchor(SectionName.OVERVIEW_DESCRIPTION)); addInlineComment(configuration.overviewElement, htmltree); } } /** - * Adds the tag information as provided in the file specified by the - * "-overview" option on the command line. + * Not required for this page. * * @param body the documentation tree to which the overview will be added */ @Override - protected void addOverview(Content body) { - HtmlTree div = new HtmlTree(HtmlTag.DIV); - div.addStyle(HtmlStyle.contentContainer); - addOverviewComment(div); - if (configuration.allowTag(HtmlTag.MAIN)) { - htmlTree.addContent(div); - body.addContent(htmlTree); - } else { - body.addContent(div); - } - } + protected void addOverview(Content body) {} /** * Adds the top text (from the -top option), the upper diff --git a/langtools/test/jdk/javadoc/doclet/testOverview/TestOverview.java b/langtools/test/jdk/javadoc/doclet/testOverview/TestOverview.java new file mode 100644 index 00000000000..e4f105b8d86 --- /dev/null +++ b/langtools/test/jdk/javadoc/doclet/testOverview/TestOverview.java @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8173302 + * @summary make sure the overview-summary and module-summary pages don't + * don't have the See link, and the overview is copied correctly. + * @library ../lib + * @modules jdk.javadoc/jdk.javadoc.internal.tool + * @build JavadocTester + * @run main TestOverview + */ + +public class TestOverview extends JavadocTester { + + public static void main(String... args) throws Exception { + TestOverview tester = new TestOverview(); + tester.runTests(); + } + + @Test + void test1() { + javadoc("-d", "out-1", + "-doctitle", "Document Title", + "-windowtitle", "Window Title", + "-overview", testSrc("overview.html"), + "-sourcepath", testSrc("src"), + "p1", "p2"); + checkExit(Exit.OK); + checkOutput("overview-summary.html", true, + "
      \n" + + "

      Document Title

      \n" + + "
      \n" + + "
      \n" + + "
      This is line1. This is line 2.
      \n" + + "
      \n" + + "
      " + ); + } + + @Test + void test2() { + javadoc("-d", "out-2", + "-doctitle", "Document Title", + "-windowtitle", "Window Title", + "-overview", testSrc("overview.html"), + "-sourcepath", testSrc("msrc"), + "p1", "p2"); + checkExit(Exit.OK); + checkOutput("overview-summary.html", true, + "
      \n" + + "

      Document Title

      \n" + + "
      \n" + + "
      \n" + + "
      This is line1. This is line 2.
      \n" + + "
      \n" + + "
      " + ); + } +} diff --git a/langtools/test/jdk/javadoc/doclet/testOverview/msrc/module-info.java b/langtools/test/jdk/javadoc/doclet/testOverview/msrc/module-info.java new file mode 100644 index 00000000000..c5d6328c3da --- /dev/null +++ b/langtools/test/jdk/javadoc/doclet/testOverview/msrc/module-info.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Test module acme. + */ +module acme { + exports p1; +} diff --git a/langtools/test/jdk/javadoc/doclet/testOverview/msrc/p1/C.java b/langtools/test/jdk/javadoc/doclet/testOverview/msrc/p1/C.java new file mode 100644 index 00000000000..db9ab5db919 --- /dev/null +++ b/langtools/test/jdk/javadoc/doclet/testOverview/msrc/p1/C.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p1; + +public class C {} diff --git a/langtools/test/jdk/javadoc/doclet/testOverview/msrc/p2/C2.java b/langtools/test/jdk/javadoc/doclet/testOverview/msrc/p2/C2.java new file mode 100644 index 00000000000..65039aa6be7 --- /dev/null +++ b/langtools/test/jdk/javadoc/doclet/testOverview/msrc/p2/C2.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p2; + +public class C2 {} diff --git a/langtools/test/jdk/javadoc/doclet/testOverview/overview.html b/langtools/test/jdk/javadoc/doclet/testOverview/overview.html new file mode 100644 index 00000000000..07351cdc861 --- /dev/null +++ b/langtools/test/jdk/javadoc/doclet/testOverview/overview.html @@ -0,0 +1,6 @@ + + + + This is line1. This is line 2. + + diff --git a/langtools/test/jdk/javadoc/doclet/testOverview/src/p1/C.java b/langtools/test/jdk/javadoc/doclet/testOverview/src/p1/C.java new file mode 100644 index 00000000000..db9ab5db919 --- /dev/null +++ b/langtools/test/jdk/javadoc/doclet/testOverview/src/p1/C.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p1; + +public class C {} diff --git a/langtools/test/jdk/javadoc/doclet/testOverview/src/p2/C2.java b/langtools/test/jdk/javadoc/doclet/testOverview/src/p2/C2.java new file mode 100644 index 00000000000..65039aa6be7 --- /dev/null +++ b/langtools/test/jdk/javadoc/doclet/testOverview/src/p2/C2.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p2; + +public class C2 {} From 0c24be389f1ab755bc3921fc3cdf8b851cb1b9e3 Mon Sep 17 00:00:00 2001 From: Mandy Chung Date: Tue, 7 Feb 2017 16:41:26 -0800 Subject: [PATCH 078/447] 8173712: Rename JAVA_OPTIONS environment variable to JDK_JAVA_OPTIONS Reviewed-by: henryjen, psandoz --- jdk/src/java.base/share/native/launcher/main.c | 6 +++--- jdk/src/java.base/share/native/libjli/args.c | 7 +------ jdk/src/java.base/share/native/libjli/java.h | 2 +- .../java.base/windows/native/libjli/cmdtoargs.c | 4 ++-- jdk/test/ProblemList.txt | 1 - jdk/test/tools/launcher/ArgsEnvVar.java | 16 ++++++++-------- jdk/test/tools/launcher/I18NArgTest.java | 6 ++---- 7 files changed, 17 insertions(+), 25 deletions(-) diff --git a/jdk/src/java.base/share/native/launcher/main.c b/jdk/src/java.base/share/native/launcher/main.c index acbff5ff316..8e27a2a2ed9 100644 --- a/jdk/src/java.base/share/native/launcher/main.c +++ b/jdk/src/java.base/share/native/launcher/main.c @@ -130,10 +130,10 @@ main(int argc, char **argv) // Add first arg, which is the app name JLI_List_add(args, JLI_StringDup(argv[0])); - // Append JAVA_OPTIONS - if (JLI_AddArgsFromEnvVar(args, JAVA_OPTIONS)) { + // Append JDK_JAVA_OPTIONS + if (JLI_AddArgsFromEnvVar(args, JDK_JAVA_OPTIONS)) { // JLI_SetTraceLauncher is not called yet - // Show _JAVA_OPTIONS content along with JAVA_OPTIONS to aid diagnosis + // Show _JAVA_OPTIONS content along with JDK_JAVA_OPTIONS to aid diagnosis if (getenv(JLDEBUG_ENV_ENTRY)) { char *tmp = getenv("_JAVA_OPTIONS"); if (NULL != tmp) { diff --git a/jdk/src/java.base/share/native/libjli/args.c b/jdk/src/java.base/share/native/libjli/args.c index d24301c3db9..adbff674bf9 100644 --- a/jdk/src/java.base/share/native/libjli/args.c +++ b/jdk/src/java.base/share/native/libjli/args.c @@ -34,7 +34,7 @@ #define NO_JNI #endif #define JLI_ReportMessage(...) printf(__VA_ARGS__) - #define JAVA_OPTIONS "JAVA_OPTIONS" + #define JDK_JAVA_OPTIONS "JDK_JAVA_OPTIONS" int IsWhiteSpaceOption(const char* name) { return 1; } #else #include "java.h" @@ -429,10 +429,6 @@ int isTerminalOpt(char *arg) { } jboolean JLI_AddArgsFromEnvVar(JLI_List args, const char *var_name) { - -#ifndef ENABLE_JAVA_OPTIONS - return JNI_FALSE; -#else char *env = getenv(var_name); char *p, *arg; char quote; @@ -519,7 +515,6 @@ jboolean JLI_AddArgsFromEnvVar(JLI_List args, const char *var_name) { } return JNI_TRUE; -#endif } #ifdef DEBUG_ARGFILE diff --git a/jdk/src/java.base/share/native/libjli/java.h b/jdk/src/java.base/share/native/libjli/java.h index d035a080d9d..842dcc9cf9d 100644 --- a/jdk/src/java.base/share/native/libjli/java.h +++ b/jdk/src/java.base/share/native/libjli/java.h @@ -71,7 +71,7 @@ #define SPLASH_FILE_ENV_ENTRY "_JAVA_SPLASH_FILE" #define SPLASH_JAR_ENV_ENTRY "_JAVA_SPLASH_JAR" -#define JAVA_OPTIONS "JAVA_OPTIONS" +#define JDK_JAVA_OPTIONS "JDK_JAVA_OPTIONS" /* * Pointers to the needed JNI invocation API, initialized by LoadJavaVM. diff --git a/jdk/src/java.base/windows/native/libjli/cmdtoargs.c b/jdk/src/java.base/windows/native/libjli/cmdtoargs.c index f984885ed01..955775f9d42 100644 --- a/jdk/src/java.base/windows/native/libjli/cmdtoargs.c +++ b/jdk/src/java.base/windows/native/libjli/cmdtoargs.c @@ -205,9 +205,9 @@ void JLI_CmdToArgs(char* cmdline) { size_t i, cnt; JLI_List envArgs = JLI_List_new(1); - if (JLI_AddArgsFromEnvVar(envArgs, JAVA_OPTIONS)) { + if (JLI_AddArgsFromEnvVar(envArgs, JDK_JAVA_OPTIONS)) { // JLI_SetTraceLauncher is not called yet - // Show _JAVA_OPTIONS content along with JAVA_OPTIONS to aid diagnosis + // Show _JAVA_OPTIONS content along with JDK_JAVA_OPTIONS to aid diagnosis if (getenv(JLDEBUG_ENV_ENTRY)) { char *tmp = getenv("_JAVA_OPTIONS"); if (NULL != tmp) { diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt index f94c56a05e4..617ca7f902b 100644 --- a/jdk/test/ProblemList.txt +++ b/jdk/test/ProblemList.txt @@ -251,7 +251,6 @@ sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java 8157338 generic- tools/pack200/CommandLineTests.java 8059906 generic-all -tools/launcher/ArgsEnvVar.java 8173712 generic-all tools/launcher/FXLauncherTest.java 8068049 linux-all,macosx-all tools/jimage/JImageExtractTest.java 8169713 generic-all diff --git a/jdk/test/tools/launcher/ArgsEnvVar.java b/jdk/test/tools/launcher/ArgsEnvVar.java index 30644e19a70..fe18e1d256c 100644 --- a/jdk/test/tools/launcher/ArgsEnvVar.java +++ b/jdk/test/tools/launcher/ArgsEnvVar.java @@ -40,7 +40,7 @@ public class ArgsEnvVar extends TestHelper { private static File testJar = null; private static Map env = new HashMap<>(); - private static String JAVA_OPTIONS = "JAVA_OPTIONS"; + private static String JDK_JAVA_OPTIONS = "JDK_JAVA_OPTIONS"; static void init() throws IOException { if (testJar != null) { @@ -105,7 +105,7 @@ public class ArgsEnvVar extends TestHelper { File argFile2 = createArgFile("argFile2", List.of("-Darg.file2=TWO")); File argFile3 = createArgFile("argFile3", List.of("-Darg.file3=THREE")); - env.put(JAVA_OPTIONS, "@argFile1\n-Xint\r-cp @@escaped\t@argFile2"); + env.put(JDK_JAVA_OPTIONS, "@argFile1\n-Xint\r-cp @@escaped\t@argFile2"); TestResult tr = doExec(env, javaCmd, "@argFile3", "-cp", "test.jar", "Foo", "uarg1", "@uarg2"); @@ -133,13 +133,13 @@ public class ArgsEnvVar extends TestHelper { } private TestResult testInEnv(List options) { - env.put(JAVA_OPTIONS, String.join(" ", options)); + env.put(JDK_JAVA_OPTIONS, String.join(" ", options)); return doExec(env, javaCmd, "-jar", "test.jar"); } private TestResult testInEnvAsArgFile(List options) throws IOException { File argFile = createArgFile("argFile", options); - env.put(JAVA_OPTIONS, "@argFile"); + env.put(JDK_JAVA_OPTIONS, "@argFile"); TestResult tr = doExec(env, javaCmd, "-jar", "test.jar"); argFile.delete(); return tr; @@ -187,7 +187,7 @@ public class ArgsEnvVar extends TestHelper { File argFile1 = createArgFile("arg File 1", List.of("-Xint")); File argFile2 = createArgFile("arg File 2", List.of("-Dprop='value with spaces'")); File argFile3 = createArgFile("arg File 3", List.of("-Xmx32m")); - env.put(JAVA_OPTIONS, "'@arg File 1' @\"arg File 2\" @'arg File'\" 3\""); + env.put(JDK_JAVA_OPTIONS, "'@arg File 1' @\"arg File 2\" @'arg File'\" 3\""); TestResult tr = doExec(env, javaCmd, "-jar", "test.jar"); List options = new ArrayList<>(); @@ -204,7 +204,7 @@ public class ArgsEnvVar extends TestHelper { @Test public void openQuoteShouldFail() { - env.put(JAVA_OPTIONS, "-Dprop='value missing close quote"); + env.put(JDK_JAVA_OPTIONS, "-Dprop='value missing close quote"); TestResult tr = doExec(env, javaCmd, "-version"); tr.checkNegative(); if (!tr.testStatus) { @@ -215,11 +215,11 @@ public class ArgsEnvVar extends TestHelper { @Test public void noWildcard() { - env.put(JAVA_OPTIONS, "-cp *"); + env.put(JDK_JAVA_OPTIONS, "-cp *"); TestResult tr = doExec(env, javaCmd, "-jar", "test.jar"); verifyOptions(List.of("-cp", "*", "-jar", "test.jar"), tr); - env.put(JAVA_OPTIONS, "-p ?"); + env.put(JDK_JAVA_OPTIONS, "-p ?"); tr = doExec(env, javaCmd, "-jar", "test.jar", "one", "two"); verifyOptions(List.of("-p", "?", "-jar", "test.jar", "one", "two"), tr); } diff --git a/jdk/test/tools/launcher/I18NArgTest.java b/jdk/test/tools/launcher/I18NArgTest.java index 25f4ec113ba..fa09736da2f 100644 --- a/jdk/test/tools/launcher/I18NArgTest.java +++ b/jdk/test/tools/launcher/I18NArgTest.java @@ -95,21 +95,19 @@ public class I18NArgTest extends TestHelper { throw new RuntimeException("test fails"); } - // Test via JAVA_OPTIONS -/* + // Test via JDK_JAVA_OPTIONS Map env = new HashMap<>(); String cmd = "-Dtest.src=" + TEST_SOURCES_DIR.getAbsolutePath() + " -Dtest.classes=" + TEST_CLASSES_DIR.getAbsolutePath() + " -cp " + TEST_CLASSES_DIR.getAbsolutePath() + " I18NArgTest " + unicodeStr + " " + hexValue; - env.put("JAVA_OPTIONS", cmd); + env.put("JDK_JAVA_OPTIONS", cmd); tr = doExec(env, javaCmd); System.out.println(tr.testOutput); if (!tr.isOK()) { System.err.println(tr); throw new RuntimeException("test fails"); } -*/ } static void testCharacters(String... args) { From 822861408bbcfa36536202f081e24bfd00a38254 Mon Sep 17 00:00:00 2001 From: Anthony Scarpino Date: Tue, 7 Feb 2017 19:55:10 -0800 Subject: [PATCH 079/447] 8151116: Add extended key usage constraint to the jdk.certpath.disabledAlgorithms security property Reviewed-by: wetmore --- .../share/conf/security/java.security | 74 +++++++++++-------- 1 file changed, 44 insertions(+), 30 deletions(-) diff --git a/jdk/src/java.base/share/conf/security/java.security b/jdk/src/java.base/share/conf/security/java.security index 5e778810bb7..0b8863e641e 100644 --- a/jdk/src/java.base/share/conf/security/java.security +++ b/jdk/src/java.base/share/conf/security/java.security @@ -116,6 +116,13 @@ security.provider.tbd=SunPKCS11 # Example: # jdk.security.provider.preferred=AES/GCM/NoPadding:SunJCE, \ # MessageDigest.SHA-256:SUN, Group.HmacSHA2:SunJCE +# +#ifdef solaris-sparc +# Optional Solaris-SPARC configuration for non-FIPS 140 configurations. +# jdk.security.provider.preferred=AES:SunJCE, SHA1:SUN, Group.SHA2:SUN, \ +# HmacSHA1:SunJCE, Group.HmacSHA2:SunJCE +# +#endif #jdk.security.provider.preferred= @@ -240,6 +247,7 @@ securerandom.strongAlgorithms=NativePRNGBlocking:SUN,DRBG:SUN # # The default value is an empty string, which is equivalent to # securerandom.drbg.config=Hash_DRBG,SHA-256,128,none +# securerandom.drbg.config= # @@ -262,23 +270,27 @@ policy.provider=sun.security.provider.PolicyFile # The default is to have a single system-wide policy file, # and a policy file in the user's home directory. +# policy.url.1=file:${java.home}/conf/security/java.policy policy.url.2=file:${user.home}/.java.policy # whether or not we expand properties in the policy file # if this is set to false, properties (${...}) will not be expanded in policy # files. +# policy.expandProperties=true # whether or not we allow an extra policy to be passed on the command line # with -Djava.security.policy=somefile. Comment out this line to disable # this feature. +# policy.allowSystemProperty=true # whether or not we look into the IdentityScope for trusted Identities # when encountering a 1.1 signed JAR file. If the identity is found # and is trusted, we grant it AllPermission. Note: the default policy # provider (sun.security.provider.PolicyFile) does not support this property. +# policy.ignoreIdentityScope=false # @@ -360,7 +372,6 @@ ssl.TrustManagerFactory.algorithm=PKIX # For this reason the default caching policy is to maintain these # results for 10 seconds. # -# networkaddress.cache.negative.ttl=10 # @@ -460,8 +471,10 @@ networkaddress.cache.negative.ttl=10 # Example, # krb5.kdc.bad.policy = tryLast # krb5.kdc.bad.policy = tryLess:2,2000 +# krb5.kdc.bad.policy = tryLast +# # Algorithm restrictions for certification path (CertPath) processing # # In some environments, certain algorithms or key lengths may be undesirable @@ -572,35 +585,6 @@ jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & denyAfter 2017-01-01, \ RSA keySize < 1024, DSA keySize < 1024, EC keySize < 224 # -# RMI Registry Serial Filter -# -# The filter pattern uses the same format as jdk.serialFilter. -# This filter can override the builtin filter if additional types need to be -# allowed or rejected from the RMI Registry. -# -# Note: This property is currently used by the JDK Reference implementation. -# It is not guaranteed to be examined and used by other implementations. -# -#sun.rmi.registry.registryFilter=pattern;pattern -# -# RMI Distributed Garbage Collector (DGC) Serial Filter -# -# The filter pattern uses the same format as jdk.serialFilter. -# This filter can override the builtin filter if additional types need to be -# allowed or rejected from the RMI DGC. -# -# Note: This property is currently used by the JDK Reference implementation. -# It is not guaranteed to be examined and used by other implementations. -# -# The builtin DGC filter can approximately be represented as the filter pattern: -# -#sun.rmi.transport.dgcFilter=\ -# java.rmi.server.ObjID;\ -# java.rmi.server.UID;\ -# java.rmi.dgc.VMID;\ -# java.rmi.dgc.Lease;\ -# maxdepth=5;maxarray=10000 - # Algorithm restrictions for signed JAR files # # In some environments, certain algorithms or key lengths may be undesirable @@ -639,6 +623,7 @@ jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & denyAfter 2017-01-01, \ jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024, \ DSA keySize < 1024 +# # Algorithm restrictions for Secure Socket Layer/Transport Layer Security # (SSL/TLS/DTLS) processing # @@ -939,3 +924,32 @@ jdk.xml.dsig.secureValidationPolicy=\ # #jdk.serialFilter=pattern;pattern +# +# RMI Registry Serial Filter +# +# The filter pattern uses the same format as jdk.serialFilter. +# This filter can override the builtin filter if additional types need to be +# allowed or rejected from the RMI Registry. +# +# Note: This property is currently used by the JDK Reference implementation. +# It is not guaranteed to be examined and used by other implementations. +# +#sun.rmi.registry.registryFilter=pattern;pattern +# +# RMI Distributed Garbage Collector (DGC) Serial Filter +# +# The filter pattern uses the same format as jdk.serialFilter. +# This filter can override the builtin filter if additional types need to be +# allowed or rejected from the RMI DGC. +# +# Note: This property is currently used by the JDK Reference implementation. +# It is not guaranteed to be examined and used by other implementations. +# +# The builtin DGC filter can approximately be represented as the filter pattern: +# +#sun.rmi.transport.dgcFilter=\ +# java.rmi.server.ObjID;\ +# java.rmi.server.UID;\ +# java.rmi.dgc.VMID;\ +# java.rmi.dgc.Lease;\ +# maxdepth=5;maxarray=10000 From 35bad958c1a5f6eea6e85aa3bd4b72e8c208c799 Mon Sep 17 00:00:00 2001 From: Sean Coffey Date: Wed, 8 Feb 2017 08:40:25 +0000 Subject: [PATCH 080/447] 8173783: IllegalArgumentException: jdk.tls.namedGroups Reviewed-by: xuelei, wetmore --- .../security/ssl/EllipticCurvesExtension.java | 31 +- .../ServerHandshaker/HelloExtensionsTest.java | 287 ++++++++++++++++++ 2 files changed, 307 insertions(+), 11 deletions(-) create mode 100644 jdk/test/sun/security/ssl/ServerHandshaker/HelloExtensionsTest.java diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/EllipticCurvesExtension.java b/jdk/src/java.base/share/classes/sun/security/ssl/EllipticCurvesExtension.java index d4f2848c973..c91b25e72ef 100644 --- a/jdk/src/java.base/share/classes/sun/security/ssl/EllipticCurvesExtension.java +++ b/jdk/src/java.base/share/classes/sun/security/ssl/EllipticCurvesExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,6 +43,9 @@ import sun.security.action.GetPropertyAction; final class EllipticCurvesExtension extends HelloExtension { + /* Class and subclass dynamic debugging support */ + private static final Debug debug = Debug.getInstance("ssl"); + private static final int ARBITRARY_PRIME = 0xff01; private static final int ARBITRARY_CHAR2 = 0xff02; @@ -159,6 +162,11 @@ final class EllipticCurvesExtension extends HelloExtension { } // ignore unknown curves } } + if (idList.isEmpty() && JsseJce.isEcAvailable()) { + throw new IllegalArgumentException( + "System property jdk.tls.namedGroups(" + property + ") " + + "contains no supported elliptic curves"); + } } else { // default curves int[] ids; if (requireFips) { @@ -183,16 +191,17 @@ final class EllipticCurvesExtension extends HelloExtension { } } - if (idList.isEmpty()) { - throw new IllegalArgumentException( - "System property jdk.tls.namedGroups(" + property + ") " + - "contains no supported elliptic curves"); - } else { - supportedCurveIds = new int[idList.size()]; - int i = 0; - for (Integer id : idList) { - supportedCurveIds[i++] = id; - } + if (debug != null && idList.isEmpty()) { + Debug.log( + "Initialized [jdk.tls.namedGroups|default] list contains " + + "no available elliptic curves. " + + (property != null ? "(" + property + ")" : "[Default]")); + } + + supportedCurveIds = new int[idList.size()]; + int i = 0; + for (Integer id : idList) { + supportedCurveIds[i++] = id; } } diff --git a/jdk/test/sun/security/ssl/ServerHandshaker/HelloExtensionsTest.java b/jdk/test/sun/security/ssl/ServerHandshaker/HelloExtensionsTest.java new file mode 100644 index 00000000000..bb84d5f01f9 --- /dev/null +++ b/jdk/test/sun/security/ssl/ServerHandshaker/HelloExtensionsTest.java @@ -0,0 +1,287 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8173783 + * @summary 6u141 IllegalArgumentException: jdk.tls.namedGroups + * run main/othervm HelloExtensionsTest + * run main/othervm HelloExtensionsTest -Djdk.tls.namedGroups="bug, bug" + * run main/othervm HelloExtensionsTest -Djdk.tls.namedGroups="secp521r1" + * + */ +import javax.crypto.*; +import javax.net.ssl.*; +import javax.net.ssl.SSLEngineResult.*; +import java.io.*; +import java.nio.*; +import java.security.*; + +public class HelloExtensionsTest { + + private static boolean debug = false; + private static boolean proceed = true; + private static boolean EcAvailable = isEcAvailable(); + + static String pathToStores = "../../../../javax/net/ssl/etc"; + private static String keyStoreFile = "keystore"; + private static String trustStoreFile = "truststore"; + private static String passwd = "passphrase"; + + private static String keyFilename = + System.getProperty("test.src", "./") + "/" + pathToStores + + "/" + keyStoreFile; + private static String trustFilename = + System.getProperty("test.src", "./") + "/" + pathToStores + + "/" + trustStoreFile; + + private static void checkDone(SSLEngine ssle) throws Exception { + if (!ssle.isInboundDone()) { + throw new Exception("isInboundDone isn't done"); + } + if (!ssle.isOutboundDone()) { + throw new Exception("isOutboundDone isn't done"); + } + } + + private static void runTest(SSLEngine ssle) throws Exception { + + /* + + A client hello message captured via wireshark by selecting + a TLSv1.2 Client Hello record and clicking through to the + TLSv1.2 Record Layer line and then selecting the hex stream + via "copy -> bytes -> hex stream". + + For Record purposes, here's the ClientHello : + + *** ClientHello, TLSv1.2 + RandomCookie: GMT: 1469560450 bytes = { 108, 140, 12, 202, + 2, 213, 10, 236, 143, 223, 58, 162, 228, 155, 239, 3, 98, + 232, 89, 41, 116, 120, 13, 37, 105, 153, 97, 241 } + Session ID: {} + Cipher Suites: [TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, + TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, + TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, + TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, + TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, + TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, + TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, + TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, + TLS_RSA_WITH_AES_128_CBC_SHA, + TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, + TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, + TLS_DHE_RSA_WITH_AES_128_CBC_SHA, + TLS_DHE_DSS_WITH_AES_128_CBC_SHA, + TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, + TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, + TLS_RSA_WITH_AES_128_GCM_SHA256, + TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, + TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, + TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, + TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, + TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, + TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, + SSL_RSA_WITH_3DES_EDE_CBC_SHA, + TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, + TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, + SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, + SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, + TLS_EMPTY_RENEGOTIATION_INFO_SCSV] + Compression Methods: { 0 } + Extension elliptic_curves, curve names: {secp256r1, + sect163k1, sect163r2, secp192r1, secp224r1, sect233k1, sect233r1, + sect283k1, sect283r1, secp384r1, sect409k1, sect409r1, secp521r1, + sect571k1, sect571r1, secp160k1, secp160r1, secp160r2, sect163r1, + secp192k1, sect193r1, sect193r2, secp224k1, sect239k1, secp256k1} + Extension ec_point_formats, formats: [uncompressed] + Extension signature_algorithms, signature_algorithms: + SHA512withECDSA, SHA512withRSA, SHA384withECDSA, SHA384withRSA, + SHA256withECDSA, SHA256withRSA, Unknown (hash:0x3, signature:0x3), + Unknown (hash:0x3, signature:0x1), SHA1withECDSA, + SHA1withRSA, SHA1withDSA + Extension server_name, server_name: + [host_name: bugs.openjdk.java.net] + */ + + String hello = "16030300df010000db03035898b7826c8c0cc" + + "a02d50aec8fdf3aa2e49bef0362e8592974780d25699961f" + + "100003ac023c027003cc025c02900670040c009c013002fc" + + "004c00e00330032c02bc02f009cc02dc031009e00a2c008c" + + "012000ac003c00d0016001300ff01000078000a003400320" + + "0170001000300130015000600070009000a0018000b000c0" + + "019000d000e000f001000110002001200040005001400080" + + "016000b00020100000d00180016060306010503050104030" + + "401030303010203020102020000001a00180000156275677" + + "32e6f70656e6a646b2e6a6176612e6e6574"; + + byte[] msg_clihello = hexStringToByteArray(hello); + ByteBuffer bf_clihello = ByteBuffer.wrap(msg_clihello); + + SSLSession session = ssle.getSession(); + int appBufferMax = session.getApplicationBufferSize(); + int netBufferMax = session.getPacketBufferSize(); + + ByteBuffer serverIn = ByteBuffer.allocate(appBufferMax + 50); + ByteBuffer serverOut = ByteBuffer.wrap("I'm Server".getBytes()); + ByteBuffer sTOc = ByteBuffer.allocate(netBufferMax); + + ssle.beginHandshake(); + + // unwrap the clientHello message. + SSLEngineResult result = ssle.unwrap(bf_clihello, serverIn); + System.out.println("server unwrap " + result); + runDelegatedTasks(result, ssle); + + if (!proceed) { + //expected exception occurred. Don't process anymore + return; + } + + // one more step, ensure the clientHello message is parsed. + SSLEngineResult.HandshakeStatus status = ssle.getHandshakeStatus(); + if ( status == HandshakeStatus.NEED_UNWRAP) { + result = ssle.unwrap(bf_clihello, serverIn); + System.out.println("server unwrap " + result); + runDelegatedTasks(result, ssle); + } else if ( status == HandshakeStatus.NEED_WRAP) { + result = ssle.wrap(serverOut, sTOc); + System.out.println("server wrap " + result); + runDelegatedTasks(result, ssle); + } else { + throw new Exception("unexpected handshake status " + status); + } + + // enough, stop + } + + /* + * If the result indicates that we have outstanding tasks to do, + * go ahead and run them in this thread. + */ + private static void runDelegatedTasks(SSLEngineResult result, + SSLEngine engine) throws Exception { + + if (result.getHandshakeStatus() == HandshakeStatus.NEED_TASK) { + Runnable runnable; + try { + while ((runnable = engine.getDelegatedTask()) != null) { + log("\trunning delegated task..."); + runnable.run(); + } + } catch (ExceptionInInitializerError e) { + String v = System.getProperty("jdk.tls.namedGroups"); + if (!EcAvailable || v == null) { + // we weren't expecting this if no EC providers + throw new RuntimeException("Unexpected Error :" + e); + } + if (v != null && v.contains("bug")) { + // OK - we were expecting this Error + log("got expected error for bad jdk.tls.namedGroups"); + proceed = false; + return; + } else { + System.out.println("Unexpected error. " + + "jdk.tls.namedGroups value: " + v); + throw e; + } + } + HandshakeStatus hsStatus = engine.getHandshakeStatus(); + if (hsStatus == HandshakeStatus.NEED_TASK) { + throw new Exception( + "handshake shouldn't need additional tasks"); + } + log("\tnew HandshakeStatus: " + hsStatus); + } + } + + private static byte[] hexStringToByteArray(String s) { + int len = s.length(); + byte[] data = new byte[len / 2]; + for (int i = 0; i < len; i += 2) { + data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4) + + Character.digit(s.charAt(i+1), 16)); + } + return data; + } + + private static boolean isEcAvailable() { + try { + Signature.getInstance("SHA1withECDSA"); + Signature.getInstance("NONEwithECDSA"); + KeyAgreement.getInstance("ECDH"); + KeyFactory.getInstance("EC"); + KeyPairGenerator.getInstance("EC"); + AlgorithmParameters.getInstance("EC"); + } catch (Exception e) { + log("EC not available. Received: " + e); + return false; + } + return true; + } + + public static void main(String args[]) throws Exception { + SSLEngine ssle = createSSLEngine(keyFilename, trustFilename); + runTest(ssle); + System.out.println("Test Passed."); + } + + /* + * Create an initialized SSLContext to use for this test. + */ + static private SSLEngine createSSLEngine(String keyFile, String trustFile) + throws Exception { + + SSLEngine ssle; + + KeyStore ks = KeyStore.getInstance("JKS"); + KeyStore ts = KeyStore.getInstance("JKS"); + + char[] passphrase = "passphrase".toCharArray(); + + ks.load(new FileInputStream(keyFile), passphrase); + ts.load(new FileInputStream(trustFile), passphrase); + + KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); + kmf.init(ks, passphrase); + + TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); + tmf.init(ts); + + SSLContext sslCtx = SSLContext.getInstance("TLS"); + + sslCtx.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null); + + ssle = sslCtx.createSSLEngine(); + ssle.setUseClientMode(false); + + return ssle; + } + + + private static void log(String str) { + if (debug) { + System.out.println(str); + } + } +} From 95c98da26f3157c7f20d1f1e218943b54ee8c284 Mon Sep 17 00:00:00 2001 From: Rahul Singh Date: Wed, 8 Feb 2017 17:02:50 +0530 Subject: [PATCH 081/447] 8137087: [TEST_BUG] Cygwin failure of java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh Reviewed-by: yan, arapte --- .../IOExceptionIfEncodedURLTest.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/jdk/test/java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh b/jdk/test/java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh index 960c5bf219f..f2c50984d46 100644 --- a/jdk/test/java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh +++ b/jdk/test/java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh @@ -1,5 +1,5 @@ # -# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ #!/bin/ksh -p # # @test IOExceptionIfEncodedURLTest.sh -# @bug 6193279 6619458 +# @bug 6193279 6619458 8137087 # @summary REGRESSION: AppletViewer throws IOException when path is encoded URL # @author Dmitry Cherepanov: area=appletviewer # @modules java.base/sun.net.www @@ -56,7 +56,7 @@ pass() #Call this to run the test with a file name test() { - ${TESTJAVA}${FILESEP}bin${FILESEP}appletviewer -Xnosecurity ${URL} > err 2>&1 & + "${TESTJAVA}"${FILESEP}bin${FILESEP}appletviewer -Xnosecurity ${URL} > err 2>&1 & APPLET_ID=$! sleep 15 kill -9 $APPLET_ID @@ -134,7 +134,9 @@ case "$OS" in DEFAULT_JDK="/cygdrive/c/Program\ Files/Java/jdk1.8.0" FILESEP="/" PATHSEP=";" - TMP=`cd "${SystemRoot}/Temp"; echo ${PWD}` + TMP=`cd "${SYSTEMROOT}/Temp"; echo ${PWD}` + x="cygpath -m $PWD" + PWD=$(eval $x) ;; AIX ) From 25a8d5cb01625cd3354c0bca87c1554c6da65687 Mon Sep 17 00:00:00 2001 From: Vicente Romero Date: Wed, 8 Feb 2017 06:43:34 -0800 Subject: [PATCH 082/447] 8174027: error message should adapt to the corresponding top level element Reviewed-by: mcimadamore --- .../share/classes/com/sun/tools/javac/comp/Enter.java | 11 +++++++++-- .../com/sun/tools/javac/resources/compiler.properties | 4 ++-- langtools/test/tools/javac/T6234077.out | 2 +- .../tools/javac/T8173955/MessageForClassTest.java | 8 ++++++++ .../test/tools/javac/T8173955/MessageForClassTest.out | 2 ++ .../test/tools/javac/T8173955/MessageForEnumTest.java | 8 ++++++++ .../test/tools/javac/T8173955/MessageForEnumTest.out | 2 ++ .../tools/javac/T8173955/MessageForInterfaceTest.java | 8 ++++++++ .../tools/javac/T8173955/MessageForInterfaceTest.out | 2 ++ .../test/tools/javac/modules/ModuleInfoTest.java | 4 ++-- 10 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 langtools/test/tools/javac/T8173955/MessageForClassTest.java create mode 100644 langtools/test/tools/javac/T8173955/MessageForClassTest.out create mode 100644 langtools/test/tools/javac/T8173955/MessageForEnumTest.java create mode 100644 langtools/test/tools/javac/T8173955/MessageForEnumTest.out create mode 100644 langtools/test/tools/javac/T8173955/MessageForInterfaceTest.java create mode 100644 langtools/test/tools/javac/T8173955/MessageForInterfaceTest.out diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java index 63e84b91e4d..19208ffdca3 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,6 +32,7 @@ import javax.tools.JavaFileObject; import javax.tools.JavaFileManager; import com.sun.tools.javac.code.*; +import com.sun.tools.javac.code.Kinds.KindName; import com.sun.tools.javac.code.Kinds.KindSelector; import com.sun.tools.javac.code.Scope.*; import com.sun.tools.javac.code.Symbol.*; @@ -400,8 +401,14 @@ public class Enter extends JCTree.Visitor { c = syms.enterClass(env.toplevel.modle, tree.name, packge); packge.members().enterIfAbsent(c); if ((tree.mods.flags & PUBLIC) != 0 && !classNameMatchesFileName(c, env)) { + KindName topElement = KindName.CLASS; + if ((tree.mods.flags & ENUM) != 0) { + topElement = KindName.ENUM; + } else if ((tree.mods.flags & INTERFACE) != 0) { + topElement = KindName.INTERFACE; + } log.error(tree.pos(), - "class.public.should.be.in.file", tree.name); + "class.public.should.be.in.file", topElement, tree.name); } } else { if (!tree.name.isEmpty() && diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties index 48243052b3c..a7d479fcdbf 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties @@ -1246,9 +1246,9 @@ compiler.err.class.cant.write=\ # In the following string, {0} is the name of the class in the Java source. # It really should be used two times.. -# 0: name +# 0: kind name, 1: name compiler.err.class.public.should.be.in.file=\ - class {0} is public, should be declared in a file named {0}.java + {0} {1} is public, should be declared in a file named {1}.java ## All errors which do not refer to a particular line in the source code are ## preceded by this string. diff --git a/langtools/test/tools/javac/T6234077.out b/langtools/test/tools/javac/T6234077.out index 2a77ac7e7f7..930d00d452a 100644 --- a/langtools/test/tools/javac/T6234077.out +++ b/langtools/test/tools/javac/T6234077.out @@ -1,2 +1,2 @@ -T6234077.java:7:8: compiler.err.class.public.should.be.in.file: Foo +T6234077.java:7:8: compiler.err.class.public.should.be.in.file: kindname.class, Foo 1 error diff --git a/langtools/test/tools/javac/T8173955/MessageForClassTest.java b/langtools/test/tools/javac/T8173955/MessageForClassTest.java new file mode 100644 index 00000000000..5d2e256550a --- /dev/null +++ b/langtools/test/tools/javac/T8173955/MessageForClassTest.java @@ -0,0 +1,8 @@ +/* + * @test /nodynamiccopyright/ + * @bug 8174027 + * @summary error message should adapt to the corresponding top level element + * @compile/fail/ref=MessageForClassTest.out -XDrawDiagnostics MessageForClassTest.java + */ + +public class MessageForClassTest_ {} diff --git a/langtools/test/tools/javac/T8173955/MessageForClassTest.out b/langtools/test/tools/javac/T8173955/MessageForClassTest.out new file mode 100644 index 00000000000..454fca69ee8 --- /dev/null +++ b/langtools/test/tools/javac/T8173955/MessageForClassTest.out @@ -0,0 +1,2 @@ +MessageForClassTest.java:8:8: compiler.err.class.public.should.be.in.file: kindname.class, MessageForClassTest_ +1 error diff --git a/langtools/test/tools/javac/T8173955/MessageForEnumTest.java b/langtools/test/tools/javac/T8173955/MessageForEnumTest.java new file mode 100644 index 00000000000..343ef77b070 --- /dev/null +++ b/langtools/test/tools/javac/T8173955/MessageForEnumTest.java @@ -0,0 +1,8 @@ +/* + * @test /nodynamiccopyright/ + * @bug 8174027 + * @summary error message should adapt to the corresponding top level element + * @compile/fail/ref=MessageForEnumTest.out -XDrawDiagnostics MessageForEnumTest.java + */ + +public enum MessageForEnumTest_ {} diff --git a/langtools/test/tools/javac/T8173955/MessageForEnumTest.out b/langtools/test/tools/javac/T8173955/MessageForEnumTest.out new file mode 100644 index 00000000000..ae9f60e1f0d --- /dev/null +++ b/langtools/test/tools/javac/T8173955/MessageForEnumTest.out @@ -0,0 +1,2 @@ +MessageForEnumTest.java:8:8: compiler.err.class.public.should.be.in.file: kindname.enum, MessageForEnumTest_ +1 error diff --git a/langtools/test/tools/javac/T8173955/MessageForInterfaceTest.java b/langtools/test/tools/javac/T8173955/MessageForInterfaceTest.java new file mode 100644 index 00000000000..563c58bedb5 --- /dev/null +++ b/langtools/test/tools/javac/T8173955/MessageForInterfaceTest.java @@ -0,0 +1,8 @@ +/* + * @test /nodynamiccopyright/ + * @bug 8174027 + * @summary error message should adapt to the corresponding top level element + * @compile/fail/ref=MessageForInterfaceTest.out -XDrawDiagnostics MessageForInterfaceTest.java + */ + +public interface MessageForInterfaceTest_ {} diff --git a/langtools/test/tools/javac/T8173955/MessageForInterfaceTest.out b/langtools/test/tools/javac/T8173955/MessageForInterfaceTest.out new file mode 100644 index 00000000000..88cd9cd18ae --- /dev/null +++ b/langtools/test/tools/javac/T8173955/MessageForInterfaceTest.out @@ -0,0 +1,2 @@ +MessageForInterfaceTest.java:8:8: compiler.err.class.public.should.be.in.file: kindname.interface, MessageForInterfaceTest_ +1 error diff --git a/langtools/test/tools/javac/modules/ModuleInfoTest.java b/langtools/test/tools/javac/modules/ModuleInfoTest.java index 3d08be1cecc..0c816f40fbb 100644 --- a/langtools/test/tools/javac/modules/ModuleInfoTest.java +++ b/langtools/test/tools/javac/modules/ModuleInfoTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -94,7 +94,7 @@ public class ModuleInfoTest extends ModuleTestBase { .writeAll() .getOutput(Task.OutputKind.DIRECT); - if (!log.contains("module-info.java:1:8: compiler.err.class.public.should.be.in.file: C")) + if (!log.contains("module-info.java:1:8: compiler.err.class.public.should.be.in.file: kindname.class, C")) throw new Exception("expected output not found"); } From 6a0c29b77d02648d345536e89b4d08dc1a68beee Mon Sep 17 00:00:00 2001 From: Alexander Scherbatiy Date: Wed, 8 Feb 2017 18:10:13 +0300 Subject: [PATCH 083/447] 8147440: HiDPI (Windows) Swing components have incorrect sizes after changing display resolution Reviewed-by: serb, azvegint --- .../classes/sun/awt/Win32GraphicsDevice.java | 2 +- .../classes/sun/awt/windows/WWindowPeer.java | 26 +- .../native/libawt/windows/awt_Component.cpp | 10 +- .../native/libawt/windows/awt_Component.h | 1 + .../native/libawt/windows/awt_Window.cpp | 128 ++++++++ .../native/libawt/windows/awt_Window.h | 5 + .../WindowResizingOnDPIChangingTest.java | 278 ++++++++++++++++++ ...indowResizingOnMovingToAnotherDisplay.java | 274 +++++++++++++++++ 8 files changed, 716 insertions(+), 8 deletions(-) create mode 100644 jdk/test/java/awt/Window/WindowResizingOnDPIChanging/WindowResizingOnDPIChangingTest.java create mode 100644 jdk/test/java/awt/Window/WindowResizingOnDPIChanging/WindowResizingOnMovingToAnotherDisplay.java diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/Win32GraphicsDevice.java b/jdk/src/java.desktop/windows/classes/sun/awt/Win32GraphicsDevice.java index e7548a6f169..d873ad0cdac 100644 --- a/jdk/src/java.desktop/windows/classes/sun/awt/Win32GraphicsDevice.java +++ b/jdk/src/java.desktop/windows/classes/sun/awt/Win32GraphicsDevice.java @@ -523,9 +523,9 @@ public class Win32GraphicsDevice extends GraphicsDevice implements dynamicColorModel = null; defaultConfig = null; configs = null; + initScaleFactors(); // pass on to all top-level windows on this display topLevels.notifyListeners(); - initScaleFactors(); } /** diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java index 3aaca2b033c..8d3b0db04bb 100644 --- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java +++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java @@ -80,6 +80,8 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer, * WindowStateEvent is posted to the EventQueue. */ private WindowListener windowListener; + private float scaleX; + private float scaleY; /** * Initialize JNI field IDs @@ -190,7 +192,10 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer, // Express our interest in display changes GraphicsConfiguration gc = getGraphicsConfiguration(); - ((Win32GraphicsDevice)gc.getDevice()).addDisplayChangedListener(this); + Win32GraphicsDevice gd = (Win32GraphicsDevice) gc.getDevice(); + gd.addDisplayChangedListener(this); + scaleX = gd.getDefaultScaleX(); + scaleY = gd.getDefaultScaleY(); initActiveWindowsTracking((Window)target); @@ -539,6 +544,22 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer, AWTAccessor.getComponentAccessor(). setGraphicsConfiguration((Component)target, winGraphicsConfig); + + checkDPIChange(oldDev, newDev); + } + + private void checkDPIChange(Win32GraphicsDevice oldDev, + Win32GraphicsDevice newDev) { + float newScaleX = newDev.getDefaultScaleX(); + float newScaleY = newDev.getDefaultScaleY(); + + if (scaleX != newScaleX || scaleY != newScaleY) { + if (oldDev.getScreen() == newDev.getScreen()) { + windowDPIChange(scaleX, scaleY, newScaleX, newScaleY); + } + scaleX = newScaleX; + scaleY = newScaleY; + } } /** @@ -781,6 +802,9 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer, } } + native void windowDPIChange(float prevScaleX, float prevScaleY, + float newScaleX, float newScaleY); + /* * The method maps the list of the active windows to the window's AppContext, * then the method registers ActiveWindowListener, GuiDisposedListener listeners; diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp index edd513263d9..6345370e551 100644 --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp @@ -950,8 +950,11 @@ AwtComponent::SetWindowPos(HWND wnd, HWND after, return 1; } +void AwtComponent::Reshape(int x, int y, int w, int h) { + ReshapeNoScale(ScaleUpX(x), ScaleUpY(y), ScaleUpX(w), ScaleUpY(h)); +} -void AwtComponent::Reshape(int x, int y, int w, int h) +void AwtComponent::ReshapeNoScale(int x, int y, int w, int h) { #if defined(DEBUG) RECT rc; @@ -960,11 +963,6 @@ void AwtComponent::Reshape(int x, int y, int w, int h) DTRACE_PRINTLN4("AwtComponent::Reshape from %d, %d, %d, %d", rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top); #endif - x = ScaleUpX(x); - y = ScaleUpY(y); - w = ScaleUpX(w); - h = ScaleUpY(h); - AwtWindow* container = GetContainer(); AwtComponent* parent = GetParent(); if (container != NULL && container == parent) { diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.h b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.h index 0d6bf7a0079..f29aaf16a83 100644 --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.h +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.h @@ -275,6 +275,7 @@ public: virtual void Show(); virtual void Hide(); virtual void Reshape(int x, int y, int w, int h); + void ReshapeNoScale(int x, int y, int w, int h); /* * Fix for 4046446. diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp index 36501fdf0fd..893f9623b05 100644 --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp @@ -153,6 +153,14 @@ struct SetFullScreenExclusiveModeStateStruct { jboolean isFSEMState; }; +// struct for _WindowDPIChange() method +struct ScaleStruct { + jobject window; + jfloat prevScaleX; + jfloat prevScaleY; + jfloat scaleX; + jfloat scaleY; +}; /************************************************************************ * AwtWindow fields @@ -1753,6 +1761,9 @@ MsgRouting AwtWindow::WmMove(int x, int y) (env)->SetIntField(peer, AwtWindow::sysYID, ScaleDownY(rect.top)); SendComponentEvent(java_awt_event_ComponentEvent_COMPONENT_MOVED); + prevX = rect.left; + prevY = rect.top; + env->DeleteLocalRef(target); return AwtComponent::WmMove(x, y); } @@ -2053,6 +2064,8 @@ void AwtWindow::CheckIfOnNewScreen() { int curScrn = GetScreenImOn(); if (curScrn != m_screenNum) { // we've been moved + int prevScrn = m_screenNum; + JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); jclass peerCls = env->GetObjectClass(m_peerObject); @@ -2068,12 +2081,81 @@ void AwtWindow::CheckIfOnNewScreen() { } env->CallVoidMethod(m_peerObject, draggedID); + m_screenNum = curScrn; + WindowDPIChange(prevScrn, curScrn); env->DeleteLocalRef(peerCls); } } +int Disposition(int x1, int x2, int x) { + return x < x1 ? -1 : (x > x2 ? 1 : 0); +} + +void AwtWindow::WindowDPIChange(int prevScreen, int screen) { + Devices::InstanceAccess devices; + AwtWin32GraphicsDevice* prevDevice = devices->GetDevice(prevScreen); + AwtWin32GraphicsDevice* device = devices->GetDevice(screen); + + if (prevDevice && device) { + RECT prevBounds; + RECT bounds; + + if (MonitorBounds(prevDevice->GetMonitor(), &prevBounds) + && MonitorBounds(device->GetMonitor(), &bounds)) { + int x; + int y; + int dx; + int dy; + RECT rect; + + ::GetWindowRect(GetHWnd(), &rect); + x = rect.left; + y = rect.top; + dx = x - prevX; + dy = y - prevY; + + if (dx != 0 || dy != 0) { + int w = rect.right - rect.left; + int h = rect.bottom - rect.top; + int dispX = Disposition(prevBounds.left, prevBounds.right, + (bounds.left + bounds.right) / 2); + int dispY = Disposition(prevBounds.top, prevBounds.bottom, + (bounds.top + bounds.bottom) / 2); + + w = w * device->GetScaleX() / prevDevice->GetScaleX(); + h = h * device->GetScaleY() / prevDevice->GetScaleY(); + + prevX = x; + prevY = y; + + if (dx != 0 && dispX != 0) { + x = dispX > 0 ? bounds.left : bounds.right - w; + y = min(y, bounds.top); + ReshapeNoScale(x, y, w, h); + } else if (dy != 0 && dispY != 0) { + x = max(x, bounds.left); + y = dispY > 0 ? bounds.top : bounds.bottom - h; + ReshapeNoScale(x, y, w, h); + } + } + } + } +} + +void AwtWindow::WindowDPIChange(float prevScaleX, float prevScaleY, float scaleX, float scaleY) { + int w; + int h; + RECT rect; + + ::GetWindowRect(GetHWnd(), &rect); + + w = (rect.right - rect.left) * scaleX / prevScaleX; + h = (rect.bottom - rect.top) * scaleY / prevScaleY; + ReshapeNoScale(rect.left, rect.top, w, h); +} + BOOL AwtWindow::IsFocusableWindow() { /* * For Window/Frame/Dialog to accept focus it should: @@ -3102,6 +3184,29 @@ void AwtWindow::_GetNativeWindowSize(void* param) { env->DeleteGlobalRef(self); } + +void AwtWindow::_WindowDPIChange(void* param) +{ + JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); + + ScaleStruct *ss = (ScaleStruct *)param; + jobject self = ss->window; + jfloat prevScaleX = ss->prevScaleX; + jfloat prevScaleY = ss->prevScaleY; + jfloat scaleX = ss->scaleX; + jfloat scaleY = ss->scaleY; + + PDATA pData; + JNI_CHECK_PEER_GOTO(self, ret); + AwtWindow *window = (AwtWindow *)pData; + + window->WindowDPIChange(prevScaleX, prevScaleY, scaleX, scaleY); + +ret: + env->DeleteGlobalRef(self); + delete ss; +} + extern "C" int getSystemMetricValue(int msgType); extern "C" { @@ -3800,4 +3905,27 @@ Java_sun_awt_windows_WWindowPeer_repositionSecurityWarning(JNIEnv *env, CATCH_BAD_ALLOC; } +/* +* Class: sun_awt_windows_WWindowPeer +* Method: windowDPIChange +* Signature: (FFFF)V +*/ +JNIEXPORT void JNICALL +Java_sun_awt_windows_WWindowPeer_windowDPIChange(JNIEnv *env, jobject self, + jfloat prevScaleX, jfloat prevScaleY, jfloat scaleX, jfloat scaleY) +{ + TRY; + + ScaleStruct *ss = new ScaleStruct; + ss->window = env->NewGlobalRef(self); + ss->prevScaleX = prevScaleX; + ss->prevScaleY = prevScaleY; + ss->scaleX = scaleX; + ss->scaleY = scaleY; + + AwtToolkit::GetInstance().InvokeFunction(AwtWindow::_WindowDPIChange, ss); + // global refs and ss are deleted in _WindowDPIChange + + CATCH_BAD_ALLOC; +} } /* extern "C" */ diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Window.h b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Window.h index 9dd91a97423..193f1e837e2 100644 --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Window.h +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Window.h @@ -242,6 +242,7 @@ public: static void _RepositionSecurityWarning(void* param); static void _SetFullScreenExclusiveModeState(void* param); static void _GetNativeWindowSize(void* param); + static void _WindowDPIChange(void* param); inline static BOOL IsResizing() { return sm_resizing; @@ -383,8 +384,12 @@ protected: private: int m_screenNum; + int prevX; + int prevY; void InitOwner(AwtWindow *owner); + void WindowDPIChange(int prevScreen, int newScreen); + void WindowDPIChange(float prevScaleX, float prevScaleY, float scaleX, float scaleY); Type m_windowType; void InitType(JNIEnv *env, jobject peer); diff --git a/jdk/test/java/awt/Window/WindowResizingOnDPIChanging/WindowResizingOnDPIChangingTest.java b/jdk/test/java/awt/Window/WindowResizingOnDPIChanging/WindowResizingOnDPIChangingTest.java new file mode 100644 index 00000000000..e796359e764 --- /dev/null +++ b/jdk/test/java/awt/Window/WindowResizingOnDPIChanging/WindowResizingOnDPIChangingTest.java @@ -0,0 +1,278 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.awt.Color; +import java.awt.FlowLayout; +import java.awt.Font; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.HeadlessException; +import java.awt.Image; +import java.awt.Insets; +import java.awt.Panel; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.awt.geom.AffineTransform; +import java.awt.image.AbstractMultiResolutionImage; +import java.awt.image.BufferedImage; +import java.awt.image.ImageObserver; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.JTextArea; +import javax.swing.SwingUtilities; + +/* @test + * @bug 8147440 8147016 + * @summary HiDPI (Windows): Swing components have incorrect sizes after + * changing display resolution + * @run main/manual/othervm WindowResizingOnDPIChangingTest + */ +public class WindowResizingOnDPIChangingTest { + + private static volatile boolean testResult = false; + private static volatile CountDownLatch countDownLatch; + private static TestFrame undecoratedFrame; + private static TestFrame decoratedFrame; + private static JFrame mainFrame; + + private static final String INSTRUCTIONS = "INSTRUCTIONS:\n" + + "Verify that window is properly resized after the display DPI updating.\n" + + "\n" + + "The test is applicable for OSes that allows to change the display DPI\n" + + "without the system rebooting (like Windows 8.1 and higher). Press PASS for other\n" + + "systems. \n" + + "\n" + + "1. Set the display DPI size to 192 (DPI scale factor 200%)\n" + + "2. Press Show Frames button\n" + + "Two frames decorated and undecorated appear.\n" + + "3. Check that the string \"scale 2x\" is painted on the windows.\n" + + "4. Set the display DPI size to 96 (DPI scale factor 100%)\n" + + "5. Check that the string \"scale: 1x\" is painted on the windows.\n" + + "6. Check that the windows are properly resized in the same way as native applications\n" + + "7. Check that the windows are properly repainted and do not contain drawing artifacts\n" + + "If so, press PASS, else press FAIL.\n"; + + public static void main(String args[]) throws Exception { + + countDownLatch = new CountDownLatch(1); + SwingUtilities.invokeLater(WindowResizingOnDPIChangingTest::createUI); + countDownLatch.await(15, TimeUnit.MINUTES); + if (!testResult) { + throw new RuntimeException("Test fails!"); + } + } + + private static void createUI() { + + mainFrame = new JFrame("DPI change test"); + GridBagLayout layout = new GridBagLayout(); + JPanel mainControlPanel = new JPanel(layout); + JPanel resultButtonPanel = new JPanel(layout); + + GridBagConstraints gbc = new GridBagConstraints(); + + JPanel testPanel = new JPanel(new FlowLayout()); + JButton frameButton = new JButton("Show Frames"); + frameButton.addActionListener((e) -> { + int x = 20; + int y = 10; + int w = 400; + int h = 300; + + undecoratedFrame = new TestFrame(w, h, true); + undecoratedFrame.setLocation(x, y); + undecoratedFrame.setVisible(true); + + decoratedFrame = new TestFrame(w, h, false); + decoratedFrame.setLocation(x + w + 10, y); + decoratedFrame.setVisible(true); + + }); + testPanel.add(frameButton); + + gbc.gridx = 0; + gbc.gridy = 0; + gbc.fill = GridBagConstraints.HORIZONTAL; + mainControlPanel.add(testPanel, gbc); + + JTextArea instructionTextArea = new JTextArea(); + instructionTextArea.setText(INSTRUCTIONS); + instructionTextArea.setEditable(false); + instructionTextArea.setBackground(Color.white); + + gbc.gridx = 0; + gbc.gridy = 1; + gbc.fill = GridBagConstraints.HORIZONTAL; + mainControlPanel.add(instructionTextArea, gbc); + + JButton passButton = new JButton("Pass"); + passButton.setActionCommand("Pass"); + passButton.addActionListener((ActionEvent e) -> { + testResult = true; + disposeFrames(); + countDownLatch.countDown(); + + }); + + JButton failButton = new JButton("Fail"); + failButton.setActionCommand("Fail"); + failButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + disposeFrames(); + countDownLatch.countDown(); + } + }); + + gbc.gridx = 0; + gbc.gridy = 0; + resultButtonPanel.add(passButton, gbc); + + gbc.gridx = 1; + gbc.gridy = 0; + resultButtonPanel.add(failButton, gbc); + + gbc.gridx = 0; + gbc.gridy = 2; + mainControlPanel.add(resultButtonPanel, gbc); + + mainFrame.add(mainControlPanel); + mainFrame.pack(); + + mainFrame.addWindowListener(new WindowAdapter() { + + @Override + public void windowClosing(WindowEvent e) { + disposeFrames(); + countDownLatch.countDown(); + } + }); + mainFrame.setVisible(true); + } + + private static void disposeFrames() { + if (decoratedFrame != null && decoratedFrame.isVisible()) { + decoratedFrame.dispose(); + } + if (undecoratedFrame != null && undecoratedFrame.isVisible()) { + undecoratedFrame.dispose(); + } + if (mainFrame != null && mainFrame.isVisible()) { + mainFrame.dispose(); + } + } + + static class TestFrame extends Frame { + + private final TestMultiResolutionImage mrImage; + + public TestFrame(int width, int height, boolean undecorated) throws HeadlessException { + super("Test Frame. Undecorated: " + undecorated); + setSize(width, height); + mrImage = new TestMultiResolutionImage(width, height); + + setUndecorated(undecorated); + Panel panel = new Panel(new FlowLayout()) { + @Override + public void paint(Graphics g) { + super.paint(g); + AffineTransform tx = ((Graphics2D) g).getTransform(); + mrImage.scaleX = tx.getScaleX(); + mrImage.scaleY = tx.getScaleY(); + Insets insets = getInsets(); + g.drawImage(mrImage, insets.left, insets.bottom, null); + } + }; + add(panel); + } + } + + static class TestMultiResolutionImage extends AbstractMultiResolutionImage { + + final int width; + final int height; + double scaleX; + double scaleY; + + public TestMultiResolutionImage(int width, int height) { + this.width = width; + this.height = height; + } + + @Override + public int getWidth(ImageObserver observer) { + return width; + } + + @Override + public int getHeight(ImageObserver observer) { + return height; + } + + @Override + protected Image getBaseImage() { + return getResolutionVariant(width, height); + } + + @Override + public Image getResolutionVariant(double destImageWidth, double destImageHeight) { + + int w = (int) destImageWidth; + int h = (int) destImageHeight; + + BufferedImage img = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); + Graphics2D g = img.createGraphics(); + g.scale(scaleX, scaleY); + int red = (int) (255 / scaleX); + int green = (int) (250 / scaleX); + int blue = (int) (20 / scaleX); + g.setColor(new Color(red, green, blue)); + g.fillRect(0, 0, width, height); + + g.setColor(Color.decode("#87CEFA")); + Font f = g.getFont(); + g.setFont(new Font(f.getName(), Font.BOLD, 24)); + g.drawString(String.format("scales: [%1.2fx, %1.2fx]", scaleX, scaleY), + width / 6, height / 2); + + g.dispose(); + return img; + } + + @Override + public List getResolutionVariants() { + return Collections.unmodifiableList(Arrays.asList(getBaseImage())); + } + } +} diff --git a/jdk/test/java/awt/Window/WindowResizingOnDPIChanging/WindowResizingOnMovingToAnotherDisplay.java b/jdk/test/java/awt/Window/WindowResizingOnDPIChanging/WindowResizingOnMovingToAnotherDisplay.java new file mode 100644 index 00000000000..7c0035f4274 --- /dev/null +++ b/jdk/test/java/awt/Window/WindowResizingOnDPIChanging/WindowResizingOnMovingToAnotherDisplay.java @@ -0,0 +1,274 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.awt.Color; +import java.awt.FlowLayout; +import java.awt.Font; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.HeadlessException; +import java.awt.Image; +import java.awt.Insets; +import java.awt.Panel; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.awt.geom.AffineTransform; +import java.awt.image.AbstractMultiResolutionImage; +import java.awt.image.BufferedImage; +import java.awt.image.ImageObserver; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.JTextArea; +import javax.swing.SwingUtilities; + +/* @test + * @bug 8147440 8147016 + * @summary HiDPI (Windows): Swing components have incorrect sizes after + * changing display resolution + * @run main/manual/othervm WindowResizingOnMovingToAnotherDisplay + */ +public class WindowResizingOnMovingToAnotherDisplay { + + private static volatile boolean testResult = false; + private static volatile CountDownLatch countDownLatch; + private static TestFrame frame; + private static JFrame mainFrame; + + private static final String INSTRUCTIONS = "INSTRUCTIONS:\n" + + "Verify that a window is properly resized after moving to a display" + + " with different DPI.\n" + + "\n" + + "The test is applicable for a multi-monitor system where displays" + + " are configured to have different DPI\n" + + "\n" + + "1. Press Show Frame button\n" + + "The frame appear.\n" + + "2. Check that the string \"scales [ScaleX, ScaleY]\" is painted on the window" + + " where ScaleX and ScaleY are the scales for current display.\n" + + "The scales are calculated as DPI / 96 and are 1 for the DPI value 96" + + " and 2 for the DPI value 192.\n" + + "3. Move the frame to the second display.\n" + + "4. Check that the string \"scales [ScaleX, ScaleY]\" is updated" + + " to show the right display scales.\n" + + "5. Check that the window is properly resized.\n" + + "6. Check that the window is properly repainted and does not contain drawing artifacts\n" + + "Try different display positions (left, right, top, bottom).\n" + + "If all tests are passed, press PASS, else press FAIL.\n"; + + public static void main(String args[]) throws Exception { + + countDownLatch = new CountDownLatch(1); + SwingUtilities.invokeLater(WindowResizingOnMovingToAnotherDisplay::createUI); + countDownLatch.await(15, TimeUnit.MINUTES); + if (!testResult) { + throw new RuntimeException("Test fails!"); + } + } + + private static void createUI() { + + mainFrame = new JFrame("DPI change test"); + GridBagLayout layout = new GridBagLayout(); + JPanel mainControlPanel = new JPanel(layout); + JPanel resultButtonPanel = new JPanel(layout); + + GridBagConstraints gbc = new GridBagConstraints(); + + JPanel testPanel = new JPanel(new FlowLayout()); + JButton frameButton = new JButton("Show Frame"); + frameButton.addActionListener((e) -> { + int x = 20; + int y = 10; + int w = 400; + int h = 300; + + frame = new TestFrame(w, h); + frame.setLocation(x, y); + frame.setVisible(true); + + }); + testPanel.add(frameButton); + + gbc.gridx = 0; + gbc.gridy = 0; + gbc.fill = GridBagConstraints.HORIZONTAL; + mainControlPanel.add(testPanel, gbc); + + JTextArea instructionTextArea = new JTextArea(); + instructionTextArea.setText(INSTRUCTIONS); + instructionTextArea.setEditable(false); + instructionTextArea.setBackground(Color.white); + + gbc.gridx = 0; + gbc.gridy = 1; + gbc.fill = GridBagConstraints.HORIZONTAL; + mainControlPanel.add(instructionTextArea, gbc); + + JButton passButton = new JButton("Pass"); + passButton.setActionCommand("Pass"); + passButton.addActionListener((ActionEvent e) -> { + testResult = true; + disposeFrames(); + countDownLatch.countDown(); + + }); + + JButton failButton = new JButton("Fail"); + failButton.setActionCommand("Fail"); + failButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + disposeFrames(); + countDownLatch.countDown(); + } + }); + + gbc.gridx = 0; + gbc.gridy = 0; + resultButtonPanel.add(passButton, gbc); + + gbc.gridx = 1; + gbc.gridy = 0; + resultButtonPanel.add(failButton, gbc); + + gbc.gridx = 0; + gbc.gridy = 2; + mainControlPanel.add(resultButtonPanel, gbc); + + mainFrame.add(mainControlPanel); + mainFrame.pack(); + + mainFrame.addWindowListener(new WindowAdapter() { + + @Override + public void windowClosing(WindowEvent e) { + disposeFrames(); + countDownLatch.countDown(); + } + }); + mainFrame.setVisible(true); + } + + private static void disposeFrames() { + if (frame != null && frame.isVisible()) { + frame.dispose(); + } + + if (mainFrame != null && mainFrame.isVisible()) { + mainFrame.dispose(); + } + } + + static class TestFrame extends Frame { + + private final TestMultiResolutionImage mrImage; + + public TestFrame(int width, int height) throws HeadlessException { + super("Test Frame"); + setSize(width, height); + mrImage = new TestMultiResolutionImage(width, height); + + Panel panel = new Panel(new FlowLayout()) { + @Override + public void paint(Graphics g) { + super.paint(g); + AffineTransform tx = ((Graphics2D) g).getTransform(); + mrImage.scaleX = tx.getScaleX(); + mrImage.scaleY = tx.getScaleY(); + Insets insets = getInsets(); + g.drawImage(mrImage, insets.left, insets.bottom, null); + } + }; + add(panel); + } + } + + static class TestMultiResolutionImage extends AbstractMultiResolutionImage { + + final int width; + final int height; + double scaleX; + double scaleY; + + public TestMultiResolutionImage(int width, int height) { + this.width = width; + this.height = height; + } + + @Override + public int getWidth(ImageObserver observer) { + return width; + } + + @Override + public int getHeight(ImageObserver observer) { + return height; + } + + @Override + protected Image getBaseImage() { + return getResolutionVariant(width, height); + } + + @Override + public Image getResolutionVariant(double destImageWidth, double destImageHeight) { + + int w = (int) destImageWidth; + int h = (int) destImageHeight; + + BufferedImage img = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); + Graphics2D g = img.createGraphics(); + g.scale(scaleX, scaleY); + int red = (int) (255 / scaleX); + int green = (int) (250 / scaleX); + int blue = (int) (20 / scaleX); + g.setColor(new Color(red, green, blue)); + g.fillRect(0, 0, width, height); + + g.setColor(Color.decode("#87CEFA")); + Font f = g.getFont(); + g.setFont(new Font(f.getName(), Font.BOLD, 24)); + g.drawString(String.format("scales: [%1.2fx, %1.2fx]", scaleX, scaleY), + width / 6, height / 2); + + g.dispose(); + return img; + } + + @Override + public List getResolutionVariants() { + return Collections.unmodifiableList(Arrays.asList(getBaseImage())); + } + } +} From 46145bdcbfb2ed40848dada4d738047b56ec674c Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Wed, 8 Feb 2017 19:22:20 +0400 Subject: [PATCH 084/447] 8173876: Fast precise scrolling and DeltaAccumulator fix for macOS Sierra 10.12.2 Reviewed-by: serb, alexsch --- .../sun/lwawt/macosx/CPlatformResponder.java | 27 ++++++-------- .../classes/sun/lwawt/macosx/NSEvent.java | 4 +- .../macosx/native/libawt_lwawt/awt/AWTView.m | 11 +++++- .../native/libawt_lwawt/awt/CTrayIcon.m | 13 +++++-- .../native/libawt_lwawt/awt/LWCToolkit.h | 1 + .../native/libawt_lwawt/awt/LWCToolkit.m | 37 ++++++++++++++----- .../TooMuchWheelRotationEventsTest.java | 2 +- 7 files changed, 62 insertions(+), 33 deletions(-) diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java index de99473a176..c0172f60ff0 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java @@ -265,9 +265,8 @@ final class CPlatformResponder { static class DeltaAccumulator { - static final double MIN_THRESHOLD = 0.1; - static final double MAX_THRESHOLD = 0.5; double accumulatedDelta; + boolean accumulate; int getRoundedDelta(double delta, int scrollPhase) { @@ -278,25 +277,23 @@ final class CPlatformResponder { roundDelta = delta > 0 ? 1 : -1; } } else { // trackpad - boolean begin = scrollPhase == NSEvent.SCROLL_PHASE_BEGAN; - boolean end = scrollPhase == NSEvent.SCROLL_MASK_PHASE_ENDED - || scrollPhase == NSEvent.SCROLL_MASK_PHASE_CANCELLED; - - if (begin) { + if (scrollPhase == NSEvent.SCROLL_PHASE_BEGAN) { accumulatedDelta = 0; + accumulate = true; } + else if (scrollPhase == NSEvent.SCROLL_PHASE_MOMENTUM_BEGAN) { + accumulate = true; + } + if (accumulate) { - accumulatedDelta += delta; + accumulatedDelta += delta; - double absAccumulatedDelta = Math.abs(accumulatedDelta); - if (absAccumulatedDelta > MAX_THRESHOLD) { roundDelta = (int) Math.round(accumulatedDelta); - accumulatedDelta -= roundDelta; - } - if (end) { - if (roundDelta == 0 && absAccumulatedDelta > MIN_THRESHOLD) { - roundDelta = accumulatedDelta > 0 ? 1 : -1; + accumulatedDelta -= roundDelta; + + if (scrollPhase == NSEvent.SCROLL_PHASE_ENDED) { + accumulate = false; } } } diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/NSEvent.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/NSEvent.java index 5710988643d..252ce1122c9 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/NSEvent.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/NSEvent.java @@ -36,8 +36,8 @@ final class NSEvent { static final int SCROLL_PHASE_UNSUPPORTED = 1; static final int SCROLL_PHASE_BEGAN = 2; static final int SCROLL_PHASE_CONTINUED = 3; - static final int SCROLL_MASK_PHASE_CANCELLED = 4; - static final int SCROLL_MASK_PHASE_ENDED = 5; + static final int SCROLL_PHASE_MOMENTUM_BEGAN = 4; + static final int SCROLL_PHASE_ENDED = 5; private int type; private int modifierFlags; diff --git a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m index 208d22d69ff..186a002dd5f 100644 --- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m +++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m @@ -381,6 +381,13 @@ static BOOL shouldUsePressAndHold() { } else { clickCount = [event clickCount]; } + + jdouble deltaX = [event deltaX]; + jdouble deltaY = [event deltaY]; + if ([AWTToolkit hasPreciseScrollingDeltas: event]) { + deltaX = [event scrollingDeltaX] * 0.1; + deltaY = [event scrollingDeltaY] * 0.1; + } static JNF_CLASS_CACHE(jc_NSEvent, "sun/lwawt/macosx/NSEvent"); static JNF_CTOR_CACHE(jctor_NSEvent, jc_NSEvent, "(IIIIIIIIDDI)V"); @@ -391,8 +398,8 @@ static BOOL shouldUsePressAndHold() { [event buttonNumber], (jint)localPoint.x, (jint)localPoint.y, (jint)absP.x, (jint)absP.y, - [event deltaY], - [event deltaX], + deltaY, + deltaX, [AWTToolkit scrollStateWithEvent: event]); CHECK_NULL(jEvent); diff --git a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CTrayIcon.m b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CTrayIcon.m index 8057972d301..bfce2fde5c7 100644 --- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CTrayIcon.m +++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CTrayIcon.m @@ -139,7 +139,14 @@ static NSSize ScaledImageSizeForStatusBar(NSSize imageSize, BOOL autosize) { jint clickCount; clickCount = [event clickCount]; - + + jdouble deltaX = [event deltaX]; + jdouble deltaY = [event deltaY]; + if ([AWTToolkit hasPreciseScrollingDeltas: event]) { + deltaX = [event scrollingDeltaX] * 0.1; + deltaY = [event scrollingDeltaY] * 0.1; + } + static JNF_CLASS_CACHE(jc_NSEvent, "sun/lwawt/macosx/NSEvent"); static JNF_CTOR_CACHE(jctor_NSEvent, jc_NSEvent, "(IIIIIIIIDDI)V"); jobject jEvent = JNFNewObject(env, jctor_NSEvent, @@ -149,8 +156,8 @@ static NSSize ScaledImageSizeForStatusBar(NSSize imageSize, BOOL autosize) { [event buttonNumber], (jint)localPoint.x, (jint)localPoint.y, (jint)absP.x, (jint)absP.y, - [event deltaY], - [event deltaX], + deltaY, + deltaX, [AWTToolkit scrollStateWithEvent: event]); CHECK_NULL(jEvent); diff --git a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.h b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.h index c581cb45be1..34532ecb05f 100644 --- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.h +++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.h @@ -42,6 +42,7 @@ extern jint* gButtonDownMasks; + (long) getEventCount; + (void) eventCountPlusPlus; + (jint) scrollStateWithEvent: (NSEvent*) event; ++ (BOOL) hasPreciseScrollingDeltas: (NSEvent*) event; @end /* diff --git a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m index 41e966894ce..8cba8ccb8a9 100644 --- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m +++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m @@ -47,7 +47,7 @@ #define SCROLL_PHASE_UNSUPPORTED 1 #define SCROLL_PHASE_BEGAN 2 #define SCROLL_PHASE_CONTINUED 3 -#define SCROLL_PHASE_CANCELLED 4 +#define SCROLL_PHASE_MOMENTUM_BEGAN 4 #define SCROLL_PHASE_ENDED 5 int gNumberOfButtons; @@ -85,16 +85,33 @@ static long eventCount; return 0; } - NSEventPhase phase = [event phase]; - NSEventPhase momentumPhase = [event momentumPhase]; - - if (!phase && !momentumPhase) return SCROLL_PHASE_UNSUPPORTED; - switch (phase) { - case NSEventPhaseBegan: return SCROLL_PHASE_BEGAN; - case NSEventPhaseCancelled: return SCROLL_PHASE_CANCELLED; - case NSEventPhaseEnded: return SCROLL_PHASE_ENDED; - default: return SCROLL_PHASE_CONTINUED; + if ([event phase]) { + // process a phase of manual scrolling + switch ([event phase]) { + case NSEventPhaseBegan: return SCROLL_PHASE_BEGAN; + case NSEventPhaseCancelled: return SCROLL_PHASE_ENDED; + case NSEventPhaseEnded: return SCROLL_PHASE_ENDED; + default: return SCROLL_PHASE_CONTINUED; + } } + + if ([event momentumPhase]) { + // process a phase of automatic scrolling + switch ([event momentumPhase]) { + case NSEventPhaseBegan: return SCROLL_PHASE_MOMENTUM_BEGAN; + case NSEventPhaseCancelled: return SCROLL_PHASE_ENDED; + case NSEventPhaseEnded: return SCROLL_PHASE_ENDED; + default: return SCROLL_PHASE_CONTINUED; + } + } + // phase and momentum phase both are not set + return SCROLL_PHASE_UNSUPPORTED; +} + ++ (BOOL) hasPreciseScrollingDeltas: (NSEvent*) event { + return [event type] == NSScrollWheel + && [event respondsToSelector:@selector(hasPreciseScrollingDeltas)] + && [event hasPreciseScrollingDeltas]; } @end diff --git a/jdk/test/javax/swing/plaf/basic/BasicScrollPaneUI/8166591/TooMuchWheelRotationEventsTest.java b/jdk/test/javax/swing/plaf/basic/BasicScrollPaneUI/8166591/TooMuchWheelRotationEventsTest.java index 4504475d554..640cc055dff 100644 --- a/jdk/test/javax/swing/plaf/basic/BasicScrollPaneUI/8166591/TooMuchWheelRotationEventsTest.java +++ b/jdk/test/javax/swing/plaf/basic/BasicScrollPaneUI/8166591/TooMuchWheelRotationEventsTest.java @@ -40,7 +40,7 @@ import javax.swing.SwingUtilities; /* * @test - * @bug 8166591 + * @bug 8166591 8173876 * @key headful * @summary [macos 10.12] Trackpad scrolling of text on OS X 10.12 Sierra * is very fast (Trackpad, Retina only) From fcc0a083e4f47c8b3c1813525ff2a62fb32d909a Mon Sep 17 00:00:00 2001 From: Daniel Fuchs Date: Wed, 8 Feb 2017 16:33:52 +0000 Subject: [PATCH 085/447] 8173898: StackWalker.walk throws InternalError if called from a constructor invoked through reflection StackWalker is fixed to take into account constructor reflection frames. The specification of StackWalker.Option.SHOW_REFLECT_FRAMES is also clarified in this regard. Reviewed-by: bchristi, lancea, mchung, psandoz --- .../classes/java/lang/StackStreamFactory.java | 18 +- .../share/classes/java/lang/StackWalker.java | 26 +- jdk/test/java/lang/StackWalker/Basic.java | 62 +- .../lang/StackWalker/ReflectionFrames.java | 842 ++++++++++++++++++ 4 files changed, 930 insertions(+), 18 deletions(-) create mode 100644 jdk/test/java/lang/StackWalker/ReflectionFrames.java diff --git a/jdk/src/java.base/share/classes/java/lang/StackStreamFactory.java b/jdk/src/java.base/share/classes/java/lang/StackStreamFactory.java index 55976485d4f..7e64a6b543a 100644 --- a/jdk/src/java.base/share/classes/java/lang/StackStreamFactory.java +++ b/jdk/src/java.base/share/classes/java/lang/StackStreamFactory.java @@ -25,11 +25,13 @@ package java.lang; import jdk.internal.reflect.MethodAccessor; +import jdk.internal.reflect.ConstructorAccessor; import java.lang.StackWalker.Option; import java.lang.StackWalker.StackFrame; import java.lang.annotation.Native; import java.lang.reflect.Method; +import java.lang.reflect.Constructor; import java.util.HashSet; import java.util.NoSuchElementException; import java.util.Objects; @@ -922,7 +924,8 @@ final class StackStreamFactory { */ final void setBatch(int depth, int startIndex, int endIndex) { if (startIndex <= 0 || endIndex <= 0) - throw new IllegalArgumentException("startIndex=" + startIndex + " endIndex=" + endIndex); + throw new IllegalArgumentException("startIndex=" + startIndex + + " endIndex=" + endIndex); this.origin = startIndex; this.fence = endIndex; @@ -980,13 +983,18 @@ final class StackStreamFactory { private static boolean isReflectionFrame(Class c) { if (c.getName().startsWith("jdk.internal.reflect") && - !MethodAccessor.class.isAssignableFrom(c)) { - throw new InternalError("Not jdk.internal.reflect.MethodAccessor: " + c.toString()); + !MethodAccessor.class.isAssignableFrom(c) && + !ConstructorAccessor.class.isAssignableFrom(c)) { + throw new InternalError("Not jdk.internal.reflect.MethodAccessor" + + " or jdk.internal.reflect.ConstructorAccessor: " + + c.toString()); } // ## should filter all @Hidden frames? return c == Method.class || - MethodAccessor.class.isAssignableFrom(c) || - c.getName().startsWith("java.lang.invoke.LambdaForm"); + c == Constructor.class || + MethodAccessor.class.isAssignableFrom(c) || + ConstructorAccessor.class.isAssignableFrom(c) || + c.getName().startsWith("java.lang.invoke.LambdaForm"); } } diff --git a/jdk/src/java.base/share/classes/java/lang/StackWalker.java b/jdk/src/java.base/share/classes/java/lang/StackWalker.java index b5c43fd2d67..3f5ab6c39c1 100644 --- a/jdk/src/java.base/share/classes/java/lang/StackWalker.java +++ b/jdk/src/java.base/share/classes/java/lang/StackWalker.java @@ -29,6 +29,7 @@ import jdk.internal.reflect.CallerSensitive; import java.util.*; import java.util.function.Consumer; import java.util.function.Function; +import java.util.function.Predicate; import java.util.stream.Stream; /** @@ -207,13 +208,23 @@ public final class StackWalker { /** * Shows all reflection frames. * - *

      By default, reflection frames are hidden. This includes the - * {@link java.lang.reflect.Method#invoke} method - * and the reflection implementation classes. A {@code StackWalker} with - * this {@code SHOW_REFLECT_FRAMES} option will show all reflection frames. - * The {@link #SHOW_HIDDEN_FRAMES} option can also be used to show all + *

      By default, reflection frames are hidden. A {@code StackWalker} + * configured with this {@code SHOW_REFLECT_FRAMES} option + * will show all reflection frames that + * include {@link java.lang.reflect.Method#invoke} and + * {@link java.lang.reflect.Constructor#newInstance(Object...)} + * and their reflection implementation classes. + * + *

      The {@link #SHOW_HIDDEN_FRAMES} option can also be used to show all * reflection frames and it will also show other hidden frames that * are implementation-specific. + * + * @apiNote + * This option includes the stack frames representing the invocation of + * {@code Method} and {@code Constructor}. Any utility methods that + * are equivalent to calling {@code Method.invoke} or + * {@code Constructor.newInstance} such as {@code Class.newInstance} + * are not filtered or controlled by any stack walking option. */ SHOW_REFLECT_FRAMES, /** @@ -468,8 +479,9 @@ public final class StackWalker { * Gets the {@code Class} object of the caller invoking the method * that calls this {@code getCallerClass} method. * - *

      Reflection frames, {@link java.lang.invoke.MethodHandle}, and - * hidden frames are filtered regardless of the + *

      This method filters {@linkplain Option#SHOW_REFLECT_FRAMES reflection + * frames}, {@link java.lang.invoke.MethodHandle}, and + * {@linkplain Option#SHOW_HIDDEN_FRAMES hidden frames} regardless of the * {@link Option#SHOW_REFLECT_FRAMES SHOW_REFLECT_FRAMES} * and {@link Option#SHOW_HIDDEN_FRAMES SHOW_HIDDEN_FRAMES} options * this {@code StackWalker} has been configured with. diff --git a/jdk/test/java/lang/StackWalker/Basic.java b/jdk/test/java/lang/StackWalker/Basic.java index 37e51f08097..8dc7627a90d 100644 --- a/jdk/test/java/lang/StackWalker/Basic.java +++ b/jdk/test/java/lang/StackWalker/Basic.java @@ -23,18 +23,21 @@ /* * @test - * @bug 8140450 + * @bug 8140450 8173898 * @summary Basic test for the StackWalker::walk method * @run testng Basic */ import java.lang.StackWalker.StackFrame; import java.util.List; +import java.util.Objects; import java.util.stream.Collectors; +import java.util.stream.Stream; import static java.lang.StackWalker.Option.*; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import static org.testng.Assert.*; public class Basic { private static boolean verbose = false; @@ -60,6 +63,17 @@ public class Basic { } } + @Test + public static void testWalkFromConstructor() throws Exception { + System.out.println("testWalkFromConstructor:"); + List found = ((ConstructorNewInstance)ConstructorNewInstance.class.getMethod("create") + .invoke(null)).collectedFrames(); + assertEquals(List.of(ConstructorNewInstance.class.getName()+"::", + ConstructorNewInstance.class.getName()+"::create", + Basic.class.getName()+"::testWalkFromConstructor"), + found); + } + private final int depth; Basic(int depth) { this.depth = depth; @@ -77,6 +91,47 @@ public class Basic { assertEquals(limit, frames.size()); } + static class ConstructorNewInstance { + static final StackWalker walker = + StackWalker.getInstance(StackWalker.Option.RETAIN_CLASS_REFERENCE); + List testFramesOrReflectionFrames; + public ConstructorNewInstance() { + testFramesOrReflectionFrames = walker.walk(this::parse); + } + public List collectedFrames() { + return testFramesOrReflectionFrames; + } + public boolean accept(StackFrame f) { + // Frames whose class names don't contain "." + // are our own test frames. These are the ones + // we expect. + // Frames whose class names contain ".reflect." + // are reflection frames. None should be present, + // since they are supposed to be filtered by + // by StackWalker. If we find any, we want to fail. + if (!f.getClassName().contains(".") + || f.getClassName().contains(".reflect.")) { + System.out.println(" " + f); + return true; + } + // Filter out all other frames (in particular + // those from the test framework) in order to + // have predictable results. + return false; + } + public String frame(StackFrame f) { + return f.getClassName() + "::" + f.getMethodName(); + } + List parse(Stream s) { + return s.filter(this::accept) + .map(this::frame) + .collect(Collectors.toList()); + } + public static ConstructorNewInstance create() throws Exception { + return ConstructorNewInstance.class.getConstructor().newInstance(); + } + } + class StackBuilder { private final int stackDepth; private final int limit; @@ -131,9 +186,4 @@ public class Basic { } } - static void assertEquals(int x, int y) { - if (x != y) { - throw new RuntimeException(x + " != " + y); - } - } } diff --git a/jdk/test/java/lang/StackWalker/ReflectionFrames.java b/jdk/test/java/lang/StackWalker/ReflectionFrames.java new file mode 100644 index 00000000000..eacc55fe92b --- /dev/null +++ b/jdk/test/java/lang/StackWalker/ReflectionFrames.java @@ -0,0 +1,842 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8173898 + * @summary Basic test for checking filtering of reflection frames + * @run testng ReflectionFrames + */ + +import java.lang.StackWalker.StackFrame; +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.MethodHandles.Lookup; +import java.lang.invoke.MethodType; +import java.util.EnumSet; +import java.util.List; +import java.util.function.Supplier; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import static java.lang.StackWalker.Option.*; + +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +public class ReflectionFrames { + final static boolean verbose = false; + + /** + * This test invokes new StackInspector() directly from + * the caller StackInspector.Caller.create method. + * It checks that the caller is StackInspector.Caller. + * It also checks the expected frames collected + * by walking the stack from the default StackInspector() + * constructor. + * This is done twice, once using a default StackWalker + * that hides reflection frames, once using a StackWalker + * configured to show reflection frames. + */ + @Test + public static void testNewStackInspector() throws Exception { + // Sets the default walker which hides reflection + // frames. + StackInspector.walker.set(StackInspector.walkerHide); + + // Calls the StackInspector.create method through reflection + // and check the frames collected in the StackInspector + // default constructor. + // The create method invokes new StackInspector() directly. + // No reflection frame should appear. + System.out.println("testNewStackInspector: create"); + + StackInspector obj = ((StackInspector)StackInspector.Caller.class + .getMethod("create", How.class) + .invoke(null, How.NEW)); + assertEquals(obj.collectedFrames, + List.of(StackInspector.class.getName() + +"::", + StackInspector.Caller.class.getName() + +"::create", + ReflectionFrames.class.getName() + +"::testNewStackInspector")); + assertEquals(obj.cls, StackInspector.Caller.class); + assertEquals(obj.filtered, 0); + + // Calls the StackInspector.reflect method through reflection + // and check the frames collected in the StackInspector + // default constructor. + // The reflect method invokes the create method through + // reflection. + // The create method invokes new StackInspector() directly. + // No reflection frame should appear. + System.out.println("testNewStackInspector: reflect"); + + obj = ((StackInspector)StackInspector.Caller.class + .getMethod("reflect", How.class) + .invoke(null, How.NEW)); + assertEquals(obj.collectedFrames, + List.of(StackInspector.class.getName() + +"::", + StackInspector.Caller.class.getName() + +"::create", + StackInspector.Caller.class.getName() + +"::reflect", + ReflectionFrames.class.getName() + +"::testNewStackInspector")); + assertEquals(obj.cls, StackInspector.Caller.class); + assertEquals(obj.filtered, 0); + + // Calls the StackInspector.handle method through reflection + // and check the frames collected in the StackInspector + // default constructor. + // The handle method invokes the create method using + // a MethodHandle. + // The create method invokes new StackInspector() directly. + // No reflection frame should appear. + System.out.println("testNewStackInspector: handle"); + + obj = ((StackInspector)StackInspector.Caller.class + .getMethod("handle", How.class) + .invoke(null, How.NEW)); + assertEquals(obj.collectedFrames, + List.of(StackInspector.class.getName() + +"::", + StackInspector.Caller.class.getName() + +"::create", + StackInspector.Caller.class.getName() + +"::handle", + ReflectionFrames.class.getName() + +"::testNewStackInspector")); + assertEquals(obj.cls, StackInspector.Caller.class); + assertEquals(obj.filtered, 0); + + // Sets a non-default walker configured to show + // reflection frames + StackInspector.walker.set(StackInspector.walkerShow); + + // Calls the StackInspector.create method through reflection + // and check the frames collected in the StackInspector + // default constructor. + // The create method invokes new StackInspector() directly. + // We should see all reflection frames, except the + // jdk.internal.reflect frames which we are filtering + // out in StackInspector::filter. + System.out.println("testNewStackInspector: create: show reflect"); + + obj = ((StackInspector)StackInspector.Caller.class + .getMethod("create", How.class) + .invoke(null, How.NEW)); + assertEquals(obj.collectedFrames, + List.of(StackInspector.class.getName() + +"::", + StackInspector.Caller.class.getName() + +"::create", + Method.class.getName() + +"::invoke", + ReflectionFrames.class.getName() + +"::testNewStackInspector")); + assertEquals(obj.cls, StackInspector.Caller.class); + assertNotEquals(obj.filtered, 0); + + // Calls the StackInspector.reflect method through reflection + // and check the frames collected in the StackInspector + // default constructor. + // The reflect method invokes the create method through + // reflection. + // The create method invokes new StackInspector() directly. + // We should see all reflection frames, except the + // jdk.internal.reflect frames which we are filtering + // out in StackInspector::filter. + System.out.println("testNewStackInspector: reflect: show reflect"); + + obj = ((StackInspector)StackInspector.Caller.class + .getMethod("reflect", How.class) + .invoke(null, How.NEW)); + assertEquals(obj.collectedFrames, + List.of(StackInspector.class.getName() + +"::", + StackInspector.Caller.class.getName() + +"::create", + Method.class.getName() + +"::invoke", + StackInspector.Caller.class.getName() + +"::reflect", + Method.class.getName() + +"::invoke", + ReflectionFrames.class.getName() + +"::testNewStackInspector")); + assertEquals(obj.cls, StackInspector.Caller.class); + assertNotEquals(obj.filtered, 0); + + // Calls the StackInspector.handle method through reflection + // and check the frames collected in the StackInspector + // default constructor. + // The handle method invokes the create method using + // MethodHandle. + // The create method invokes new StackInspector() directly. + // We should see all reflection frames, except the + // jdk.internal.reflect frames which we are filtering + // out in StackInspector::filter. + System.out.println("testNewStackInspector: handle: show reflect"); + + obj = ((StackInspector)StackInspector.Caller.class + .getMethod("handle", How.class) + .invoke(null, How.NEW)); + assertEquals(obj.collectedFrames, + List.of(StackInspector.class.getName() + +"::", + StackInspector.Caller.class.getName() + +"::create", + // MethodHandle::invoke remains hidden + StackInspector.Caller.class.getName() + +"::handle", + Method.class.getName() + +"::invoke", + ReflectionFrames.class.getName() + +"::testNewStackInspector")); + assertEquals(obj.cls, StackInspector.Caller.class); + assertNotEquals(obj.filtered, 0); + } + + /** + * This test invokes Constructor.newInstance() from + * the caller StackInspector.Caller.create method. + * It checks that the caller is StackInspector.Caller. + * It also checks the expected frames collected + * by walking the stack from the default StackInspector() + * constructor. + * This is done twice, once using a default StackWalker + * that hides reflection frames, once using a StackWalker + * configured to show reflection frames. + */ + @Test + public static void testConstructor() throws Exception { + // Sets the default walker which hides reflection + // frames. + StackInspector.walker.set(StackInspector.walkerHide); + + // Calls the StackInspector.create method through reflection + // and check the frames collected in the StackInspector + // default constructor. + // The create method invokes Constructor.newInstance(). + // No reflection frame should appear. + System.out.println("testConstructor: create"); + + StackInspector obj = ((StackInspector)StackInspector.Caller.class + .getMethod("create", How.class) + .invoke(null, How.CONSTRUCTOR)); + assertEquals(obj.collectedFrames, + List.of(StackInspector.class.getName() + +"::", + StackInspector.Caller.class.getName() + +"::create", + ReflectionFrames.class.getName() + +"::testConstructor")); + assertEquals(obj.cls, StackInspector.Caller.class); + assertEquals(obj.filtered, 0); + + // Calls the StackInspector.reflect method through reflection + // and check the frames collected in the StackInspector + // default constructor. + // The reflect method invokes the create method through + // reflection. + // The create method invokes Constructor.newInstance(). + // No reflection frame should appear. + System.out.println("testConstructor: reflect"); + + obj = ((StackInspector)StackInspector.Caller.class + .getMethod("reflect", How.class) + .invoke(null, How.CONSTRUCTOR)); + assertEquals(obj.collectedFrames, + List.of(StackInspector.class.getName() + +"::", + StackInspector.Caller.class.getName() + +"::create", + StackInspector.Caller.class.getName() + +"::reflect", + ReflectionFrames.class.getName() + +"::testConstructor")); + assertEquals(obj.cls, StackInspector.Caller.class); + assertEquals(obj.filtered, 0); + + // Calls the StackInspector.handle method through reflection + // and check the frames collected in the StackInspector + // default constructor. + // The handle method invokes the create method using + // MethodHandle. + // The create method invokes Constructor.newInstance(). + // No reflection frame should appear. + System.out.println("testConstructor: handle"); + + obj = ((StackInspector)StackInspector.Caller.class + .getMethod("handle", How.class) + .invoke(null, How.CONSTRUCTOR)); + assertEquals(obj.collectedFrames, + List.of(StackInspector.class.getName() + +"::", + StackInspector.Caller.class.getName() + +"::create", + StackInspector.Caller.class.getName() + +"::handle", + ReflectionFrames.class.getName() + +"::testConstructor")); + assertEquals(obj.cls, StackInspector.Caller.class); + assertEquals(obj.filtered, 0); + + // Sets a non-default walker configured to show + // reflection frames + StackInspector.walker.set(StackInspector.walkerShow); + + // Calls the StackInspector.create method through reflection + // and check the frames collected in the StackInspector + // default constructor. + // The create method invokes Constructor.newInstance(). + // We should see all reflection frames, except the + // jdk.internal.reflect frames which we are filtering + // out in StackInspector::filter. + System.out.println("testConstructor: create: show reflect"); + + obj = ((StackInspector)StackInspector.Caller.class + .getMethod("create", How.class) + .invoke(null, How.CONSTRUCTOR)); + assertEquals(obj.collectedFrames, + List.of(StackInspector.class.getName() + +"::", + Constructor.class.getName() + +"::newInstance", + StackInspector.Caller.class.getName() + +"::create", + Method.class.getName() + +"::invoke", + ReflectionFrames.class.getName() + +"::testConstructor")); + assertEquals(obj.cls, StackInspector.Caller.class); + assertNotEquals(obj.filtered, 0); + + // Calls the StackInspector.reflect method through reflection + // and check the frames collected in the StackInspector + // default constructor. + // The reflect method invokes the create method through + // reflection. + // The create method invokes Constructor.newInstance(). + // We should see all reflection frames, except the + // jdk.internal.reflect frames which we are filtering + // out in StackInspector::filter. + System.out.println("testConstructor: reflect: show reflect"); + + obj = ((StackInspector)StackInspector.Caller.class + .getMethod("reflect", How.class) + .invoke(null, How.CONSTRUCTOR)); + assertEquals(obj.collectedFrames, + List.of(StackInspector.class.getName() + +"::", + Constructor.class.getName() + +"::newInstance", + StackInspector.Caller.class.getName() + +"::create", + Method.class.getName() + +"::invoke", + StackInspector.Caller.class.getName() + +"::reflect", + Method.class.getName() + +"::invoke", + ReflectionFrames.class.getName() + +"::testConstructor")); + assertEquals(obj.cls, StackInspector.Caller.class); + assertNotEquals(obj.filtered, 0); + + // Calls the StackInspector.handle method through reflection + // and check the frames collected in the StackInspector + // default constructor. + // The handle method invokes the create method using + // MethodHandle. + // The create method invokes Constructor.newInstance(). + // We should see all reflection frames, except the + // jdk.internal.reflect frames which we are filtering + // out in StackInspector::filter. + System.out.println("testConstructor: handle: show reflect"); + + obj = ((StackInspector)StackInspector.Caller.class + .getMethod("handle", How.class) + .invoke(null, How.CONSTRUCTOR)); + assertEquals(obj.collectedFrames, + List.of(StackInspector.class.getName() + +"::", + Constructor.class.getName() + +"::newInstance", + StackInspector.Caller.class.getName() + +"::create", + // MethodHandle::invoke remains hidden + StackInspector.Caller.class.getName() + +"::handle", + Method.class.getName() + +"::invoke", + ReflectionFrames.class.getName() + +"::testConstructor")); + assertEquals(obj.cls, StackInspector.Caller.class); + assertNotEquals(obj.filtered, 0); + } + + /** + * This test invokes StackInspector.class.newInstance() from + * the caller StackInspector.Caller.create method. Because + * Class.newInstance() is not considered as a + * reflection frame, the the caller returned by + * getCallerClass() should appear to be java.lang.Class + * and not StackInspector.Caller. + * It also checks the expected frames collected + * by walking the stack from the default StackInspector() + * constructor. + * This is done twice, once using a default StackWalker + * that hides reflection frames, once using a StackWalker + * configured to show reflection frames. + */ + @Test + public static void testNewInstance() throws Exception { + // Sets the default walker which hides reflection + // frames. + StackInspector.walker.set(StackInspector.walkerHide); + + // Calls the StackInspector.create method through reflection + // and check the frames collected in the StackInspector + // default constructor. + // The create method invokes StackInspector.class.newInstance(). + // No reflection frame should appear, except + // Class::newInstance which is not considered as + // a reflection frame. + System.out.println("testNewInstance: create"); + + StackInspector obj = ((StackInspector)StackInspector.Caller.class + .getMethod("create", How.class) + .invoke(null, How.CLASS)); + assertEquals(obj.collectedFrames, + List.of(StackInspector.class.getName() + +"::", + Class.class.getName() + +"::newInstance", + StackInspector.Caller.class.getName() + +"::create", + ReflectionFrames.class.getName() + +"::testNewInstance")); + // Because Class.newInstance is not filtered, then the + // caller is Class.class + assertEquals(obj.cls, Class.class); + assertEquals(obj.filtered, 0); + + // Calls the StackInspector.reflect method through reflection + // and check the frames collected in the StackInspector + // default constructor. + // The reflect method invokes the create method through + // reflection. + // The create method invokes StackInspector.class.newInstance(). + // No reflection frame should appear, except + // Class::newInstance which is not considered as + // a reflection frame. + System.out.println("testNewInstance: reflect"); + + obj = ((StackInspector)StackInspector.Caller.class + .getMethod("reflect", How.class) + .invoke(null, How.CLASS)); + assertEquals(obj.collectedFrames, + List.of(StackInspector.class.getName() + +"::", + Class.class.getName() + +"::newInstance", + StackInspector.Caller.class.getName() + +"::create", + StackInspector.Caller.class.getName() + +"::reflect", + ReflectionFrames.class.getName() + +"::testNewInstance")); + + // Because Class.newInstance is not filtered, then the + // caller is Class.class + assertEquals(obj.cls, Class.class); + assertEquals(obj.filtered, 0); + + // Calls the StackInspector.handle method through reflection + // and check the frames collected in the StackInspector + // default constructor. + // The handle method invokes the create method using + // reflection. + // The create method invokes StackInspector.class.newInstance(). + // No reflection frame should appear, except + // Class::newInstance which is not considered as + // a reflection frame. + System.out.println("testNewInstance: handle"); + + obj = ((StackInspector)StackInspector.Caller.class + .getMethod("handle", How.class) + .invoke(null, How.CLASS)); + assertEquals(obj.collectedFrames, + List.of(StackInspector.class.getName() + +"::", + Class.class.getName() + +"::newInstance", + StackInspector.Caller.class.getName() + +"::create", + StackInspector.Caller.class.getName() + +"::handle", + ReflectionFrames.class.getName() + +"::testNewInstance")); + + // Because Class.newInstance is not filtered, then the + // caller is Class.class + assertEquals(obj.cls, Class.class); + assertEquals(obj.filtered, 0); + + // Sets a non-default walker configured to show + // reflection frames + StackInspector.walker.set(StackInspector.walkerShow); + + // Calls the StackInspector.create method through reflection + // and check the frames collected in the StackInspector + // default constructor. + // The create method invokes StackInspector.class.newInstance(). + // We should see all reflection frames, except the + // jdk.internal.reflect frames which we are filtering + // out in StackInspector::filter. + System.out.println("testNewInstance: create: show reflect"); + + obj = ((StackInspector)StackInspector.Caller.class + .getMethod("create", How.class) + .invoke(null, How.CLASS)); + assertEquals(obj.collectedFrames, + List.of(StackInspector.class.getName() + +"::", + Constructor.class.getName() + +"::newInstance", + Class.class.getName() + +"::newInstance", + StackInspector.Caller.class.getName() + +"::create", + Method.class.getName() + +"::invoke", + ReflectionFrames.class.getName() + +"::testNewInstance")); + // Because Class.newInstance is not filtered, then the + // caller is Class.class + assertEquals(obj.cls, Class.class); + assertNotEquals(obj.filtered, 0); + + // Calls the StackInspector.reflect method through reflection + // and check the frames collected in the StackInspector + // default constructor. + // The reflect method invokes the create method through + // reflection. + // The create method invokes StackInspector.class.newInstance(). + // We should see all reflection frames, except the + // jdk.internal.reflect frames which we are filtering + // out in StackInspector::filter. + System.out.println("testNewInstance: reflect: show reflect"); + + obj = ((StackInspector)StackInspector.Caller.class + .getMethod("reflect", How.class) + .invoke(null, How.CLASS)); + assertEquals(obj.collectedFrames, + List.of(StackInspector.class.getName() + +"::", + Constructor.class.getName() + +"::newInstance", + Class.class.getName() + +"::newInstance", + StackInspector.Caller.class.getName() + +"::create", + Method.class.getName() + +"::invoke", + StackInspector.Caller.class.getName() + +"::reflect", + Method.class.getName() + +"::invoke", + ReflectionFrames.class.getName() + +"::testNewInstance")); + + // Because Class.newInstance is not filtered, then the + // caller is Class.class + assertEquals(obj.cls, Class.class); + assertNotEquals(obj.filtered, 0); + + // Calls the StackInspector.handle method through reflection + // and check the frames collected in the StackInspector + // default constructor. + // The handle method invokes the create method using + // MethodHandle. + // The create method invokes StackInspector.class.newInstance(). + // We should see all reflection frames, except the + // jdk.internal.reflect frames which we are filtering + // out in StackInspector::filter. + System.out.println("testNewInstance: handle: show reflect"); + + obj = ((StackInspector)StackInspector.Caller.class + .getMethod("handle", How.class) + .invoke(null, How.CLASS)); + assertEquals(obj.collectedFrames, + List.of(StackInspector.class.getName() + +"::", + Constructor.class.getName() + +"::newInstance", + Class.class.getName() + +"::newInstance", + StackInspector.Caller.class.getName() + +"::create", + // MethodHandle::invoke remains hidden + StackInspector.Caller.class.getName() + +"::handle", + Method.class.getName() + +"::invoke", + ReflectionFrames.class.getName() + +"::testNewInstance")); + + // Because Class.newInstance is not filtered, then the + // caller is Class.class + assertEquals(obj.cls, Class.class); + assertNotEquals(obj.filtered, 0); + } + + @Test + public static void testGetCaller() throws Exception { + // Sets the default walker which hides reflection + // frames. + StackInspector.walker.set(StackInspector.walkerHide); + + assertEquals(StackInspector.getCaller(), ReflectionFrames.class); + assertEquals(StackInspector.class.getMethod("getCaller").invoke(null), + ReflectionFrames.class); + + // Sets a non-default walker configured to show + // reflection frames + StackInspector.walker.set(StackInspector.walkerShow); + + assertEquals(StackInspector.getCaller(), ReflectionFrames.class); + assertEquals(StackInspector.class.getMethod("getCaller").invoke(null), + ReflectionFrames.class); + } + + @Test + public static void testReflectCaller() throws Exception { + // Sets the default walker which hides reflection + // frames. + StackInspector.walker.set(StackInspector.walkerHide); + + assertEquals(StackInspector.reflectCaller(), ReflectionFrames.class); + assertEquals(StackInspector.class.getMethod("reflectCaller").invoke(null), + ReflectionFrames.class); + + // Sets a non-default walker configured to show + // reflection frames + StackInspector.walker.set(StackInspector.walkerShow); + + assertEquals(StackInspector.reflectCaller(), ReflectionFrames.class); + assertEquals(StackInspector.class.getMethod("reflectCaller").invoke(null), + ReflectionFrames.class); + } + + @Test + public static void testSupplyCaller() throws Exception { + // Sets the default walker which hides reflection + // frames. + StackInspector.walker.set(StackInspector.walkerHide); + + assertEquals(StackInspector.supplyCaller(), ReflectionFrames.class); + assertEquals(StackInspector.class.getMethod("supplyCaller").invoke(null), + ReflectionFrames.class); + + // Sets a non-default walker configured to show + // reflection frames + StackInspector.walker.set(StackInspector.walkerShow); + + assertEquals(StackInspector.supplyCaller(), ReflectionFrames.class); + assertEquals(StackInspector.class.getMethod("supplyCaller").invoke(null), + ReflectionFrames.class); + } + + @Test + public static void testHandleCaller() throws Exception { + // Sets the default walker which hides reflection + // frames. + StackInspector.walker.set(StackInspector.walkerHide); + + assertEquals(StackInspector.handleCaller(), ReflectionFrames.class); + assertEquals(StackInspector.class.getMethod("handleCaller").invoke(null), + ReflectionFrames.class); + + // Sets a non-default walker configured to show + // reflection frames + StackInspector.walker.set(StackInspector.walkerShow); + + assertEquals(StackInspector.handleCaller(), ReflectionFrames.class); + assertEquals(StackInspector.class.getMethod("handleCaller").invoke(null), + ReflectionFrames.class); + } + + static enum How { NEW, CONSTRUCTOR, CLASS}; + + /** + * An object that collect stack frames by walking the stack + * (and calling getCallerClass()) from within its constructor. + * For the purpose of this test, StackInspector objects are + * always created from the nested StackInspector.Caller class, + * which should therefore appear as the caller of the + * StackInspector constructor. + */ + static class StackInspector { + static final StackWalker walkerHide = + StackWalker.getInstance(StackWalker.Option.RETAIN_CLASS_REFERENCE); + static final StackWalker walkerShow = + StackWalker.getInstance(EnumSet.of( + StackWalker.Option.RETAIN_CLASS_REFERENCE, + StackWalker.Option.SHOW_REFLECT_FRAMES)); + final static ThreadLocal walker = new ThreadLocal<>() { + protected StackWalker initialValue() { + return walkerHide; + } + }; + + List collectedFrames; + Class cls = null; + boolean stop; + int filtered; + final boolean filterImplFrames; + + public StackInspector() { + stop = false; + // if reflection frames are not hidden, we want to + // filter implementation frames before collecting + // to avoid depending on internal details. + filterImplFrames = walker.get() == walkerShow; + collectedFrames = walker.get().walk(this::parse); + cls = walker.get().getCallerClass(); + } + + public List collectedFrames() { + return collectedFrames; + } + + // The takeWhile method arrange for stopping frame collection + // as soon as a frame from ReflectionFrames.class is reached. + // The first such frame encountered is still included in the + // collected frames, but collection stops right after. + // This makes it possible to filter out anything above the + // the test method frame, such as frames from the test + // framework. + public boolean takeWhile(StackFrame f) { + if (stop) return false; + if (verbose) System.out.println(" " + f); + stop = stop || f.getDeclaringClass() == ReflectionFrames.class; + return true; + } + + // filter out implementation frames to avoid depending + // on implementation details. If present, Class::newInstance, + // Method::invoke and Constructor::newInstance will + // still appear in the collected frames, which is + // sufficient for the purpose of the test. + // In the case where the StackWalker itself is supposed to + // filter the reflection frames, then this filter will always + // return true. This way, if such a reflection frame appears when + // it sjould have been filtered by StackWalker, it will make the + // test fail. + public boolean filter(StackFrame f) { + if (filterImplFrames && + f.getClassName().startsWith("jdk.internal.reflect.")) { + filtered++; + return false; + } + if (!verbose) System.out.println(" " + f); + return true; + } + + public String frame(StackFrame f) { + return f.getClassName() + "::" + f.getMethodName(); + } + + List parse(Stream s) { + return s.takeWhile(this::takeWhile) + .filter(this::filter) + .map(this::frame) + .collect(Collectors.toList()); + } + + /** + * The Caller class is used to create instances of + * StackInspector, either direcltly, or throug reflection. + */ + public static class Caller { + public static StackInspector create(How how) throws Exception { + switch(how) { + case NEW: return new StackInspector(); + case CONSTRUCTOR: return StackInspector.class + .getConstructor().newInstance(); + case CLASS: return StackInspector.class.newInstance(); + default: throw new AssertionError(String.valueOf(how)); + } + } + public static StackInspector reflect(How how) throws Exception { + return (StackInspector) Caller.class.getMethod("create", How.class) + .invoke(null, how); + } + public static StackInspector handle(How how) throws Exception { + Lookup lookup = MethodHandles.lookup(); + MethodHandle mh = lookup.findStatic(Caller.class, "create", + MethodType.methodType(StackInspector.class, How.class)); + try { + return (StackInspector) mh.invoke(how); + } catch (Error | Exception x) { + throw x; + } catch(Throwable t) { + throw new AssertionError(t); + } + } + } + + public static Class getCaller() throws Exception { + return walker.get().getCallerClass(); + } + + public static Class reflectCaller() throws Exception { + return (Class)StackWalker.class.getMethod("getCallerClass") + .invoke(walker.get()); + } + + public static Class supplyCaller() throws Exception { + return ((Supplier>)StackInspector.walker.get()::getCallerClass).get(); + } + + public static Class handleCaller() throws Exception { + Lookup lookup = MethodHandles.lookup(); + MethodHandle mh = lookup.findVirtual(StackWalker.class, "getCallerClass", + MethodType.methodType(Class.class)); + try { + return (Class) mh.invoke(walker.get()); + } catch (Error | Exception x) { + throw x; + } catch(Throwable t) { + throw new AssertionError(t); + } + } + } +} From ee13abe59370c0272e7d7a35a66a04a9c7e481b8 Mon Sep 17 00:00:00 2001 From: Robert Field Date: Wed, 8 Feb 2017 09:12:45 -0800 Subject: [PATCH 086/447] 8173893: JShell: reduce memory leaks Reviewed-by: jlahoda --- .../jshell/debug/InternalDebugControl.java | 11 +++++ .../jdk/internal/jshell/tool/JShellTool.java | 42 ++++++++++++------- .../share/classes/jdk/jshell/JShell.java | 21 +++++----- 3 files changed, 47 insertions(+), 27 deletions(-) diff --git a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/debug/InternalDebugControl.java b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/debug/InternalDebugControl.java index 8aa204240d0..a5854d89c0c 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/debug/InternalDebugControl.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/debug/InternalDebugControl.java @@ -89,6 +89,17 @@ public class InternalDebugControl { debugMap.put(state, flags); } + /** + * Release a JShell instance. + * + * @param state the JShell instance + */ + public static void release(JShell state) { + if (debugMap != null) { + debugMap.remove(state); + } + } + /** * Tests if any of the specified debug flags are enabled. * diff --git a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java index 6cc516555fa..6031b3a6b0a 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java @@ -812,6 +812,12 @@ public class JShellTool implements MessageHandler { } } + /** + * The entry point into the JShell tool. + * + * @param args the command-line arguments + * @throws Exception catastrophic fatal exception + */ public void start(String[] args) throws Exception { OptionParserCommandLine commandLineArgs = new OptionParserCommandLine(); options = commandLineArgs.parse(args); @@ -842,30 +848,33 @@ public class JShellTool implements MessageHandler { hardmsg("jshell.msg.welcome", version()); } // Be sure history is always saved so that user code isn't lost - Runtime.getRuntime().addShutdownHook(new Thread() { + Thread shutdownHook = new Thread() { @Override public void run() { replayableHistory.storeHistory(prefs); } - }); + }; + Runtime.getRuntime().addShutdownHook(shutdownHook); // execute from user input try (IOContext in = new ConsoleIOContext(this, cmdin, console)) { - start(in); - } - } - } - - private void start(IOContext in) { - try { - while (regenerateOnDeath) { - if (!live) { - resetState(); + while (regenerateOnDeath) { + if (!live) { + resetState(); + } + run(in); + } + } finally { + replayableHistory.storeHistory(prefs); + closeState(); + try { + Runtime.getRuntime().removeShutdownHook(shutdownHook); + } catch (Exception ex) { + // ignore, this probably caused by VM aready being shutdown + // and this is the last act anyhow } - run(in); } - } finally { - closeState(); } + closeState(); } private EditorSetting configEditor() { @@ -1019,6 +1028,8 @@ public class JShellTool implements MessageHandler { live = false; JShell oldState = state; if (oldState != null) { + state = null; + analysis = null; oldState.unsubscribe(shutdownSubscription); // No notification oldState.close(); } @@ -2006,7 +2017,6 @@ public class JShellTool implements MessageHandler { private boolean cmdExit() { regenerateOnDeath = false; live = false; - replayableHistory.storeHistory(prefs); fluffmsg("jshell.msg.goodbye"); return true; } diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/JShell.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/JShell.java index f3348b11b5d..64e3c458747 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/JShell.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/JShell.java @@ -543,17 +543,7 @@ public class JShell implements AutoCloseable { */ @Override public void close() { - if (!closed) { - closeDown(); - try { - executionControl().close(); - } catch (Throwable ex) { - // don't care about exceptions on close - } - if (sourceCodeAnalysis != null) { - sourceCodeAnalysis.close(); - } - } + closeDown(); } /** @@ -826,6 +816,15 @@ public class JShell implements AutoCloseable { } catch (Throwable thr) { // Don't care about dying exceptions } + try { + executionControl().close(); + } catch (Throwable ex) { + // don't care about exceptions on close + } + if (sourceCodeAnalysis != null) { + sourceCodeAnalysis.close(); + } + InternalDebugControl.release(this); } } From d7c71b5a17b487a872ddb3f559bd316fa7f3abdb Mon Sep 17 00:00:00 2001 From: Roger Riggs Date: Wed, 8 Feb 2017 13:17:31 -0500 Subject: [PATCH 087/447] 8174128: [testbug] Remove implementation dependency from java.time TCK tests Reviewed-by: dfuchs, scolebourne --- jdk/test/java/time/TEST.properties | 3 +- .../time/tck/java/time/AbstractTCKTest.java | 37 ++++++++++++++----- .../time/tck/java/time/TCKOffsetDateTime.java | 20 ++-------- .../time/tck/java/time/TCKOffsetTime.java | 22 ++--------- .../time/serial/TCKZoneIdSerialization.java | 15 ++++---- .../java/time/test/java/time/TEST.properties | 2 + 6 files changed, 45 insertions(+), 54 deletions(-) create mode 100644 jdk/test/java/time/test/java/time/TEST.properties diff --git a/jdk/test/java/time/TEST.properties b/jdk/test/java/time/TEST.properties index f522b84681a..346e3e22580 100644 --- a/jdk/test/java/time/TEST.properties +++ b/jdk/test/java/time/TEST.properties @@ -1,6 +1,5 @@ -# Threeten test uses TestNG +# java.time tests use TestNG TestNG.dirs = . othervm.dirs = tck/java/time/chrono test/java/time/chrono test/java/time/format lib.dirs = ../../lib/testlibrary lib.build = jdk.testlibrary.RandomFactory -modules = java.base/java.time:open java.base/java.time.chrono:open java.base/java.time.zone:open diff --git a/jdk/test/java/time/tck/java/time/AbstractTCKTest.java b/jdk/test/java/time/tck/java/time/AbstractTCKTest.java index d96011469a5..6272ea723cb 100644 --- a/jdk/test/java/time/tck/java/time/AbstractTCKTest.java +++ b/jdk/test/java/time/tck/java/time/AbstractTCKTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -69,14 +69,35 @@ import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.ObjectStreamConstants; import java.io.Serializable; -import java.lang.reflect.Field; import java.util.Formatter; +import java.util.Map; /** * Base test class. */ public abstract class AbstractTCKTest { + /** + * Map from package name to the serialVersionUID of the .Ser class for the package. + */ + private static Map serialVersionUIDs = Map.of( + "java.time", -7683839454370182990L, + "java.time.chrono", -6103370247208168577L, + "java.time.zone", -8885321777449118786L + ); + + /** + * Returns the serialVersionUID for the class. + * The SUIDs are defined by the specification for each class. + * @param serClass the class to return the SUID of + * @return returns the serialVersionUID for the class + */ + public final static long getSUID(Class serClass) { + String pkgName = serClass.getPackageName(); + return serialVersionUIDs.get(pkgName); + } + + protected static boolean isIsoLeap(long year) { if (year % 4 != 0) { return false; @@ -111,10 +132,8 @@ public abstract class AbstractTCKTest { protected static void assertSerializedBySer(Object object, byte[] expectedBytes, byte[]... matches) throws Exception { String serClass = object.getClass().getPackage().getName() + ".Ser"; - Class serCls = Class.forName(serClass); - Field field = serCls.getDeclaredField("serialVersionUID"); - field.setAccessible(true); - long serVer = (Long) field.get(null); + long serVer = getSUID(object.getClass()); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); try (ObjectOutputStream oos = new ObjectOutputStream(baos) ) { oos.writeObject(object); @@ -172,9 +191,8 @@ public abstract class AbstractTCKTest { * @throws Exception if an unexpected condition occurs */ protected static void assertNotSerializable(Class serClass) throws Exception { - Field field = serClass.getDeclaredField("serialVersionUID"); - field.setAccessible(true); - long serVer = (Long) field.get(null); + long serVer = getSUID(serClass); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); try (DataOutputStream out = new DataOutputStream(baos)) { out.writeShort(ObjectStreamConstants.STREAM_MAGIC); @@ -201,7 +219,6 @@ public abstract class AbstractTCKTest { fail("Class should not be deserializable " + serClass.getName()); } - /** * Utility method to dump a byte array in a java syntax. * @param bytes and array of bytes diff --git a/jdk/test/java/time/tck/java/time/TCKOffsetDateTime.java b/jdk/test/java/time/tck/java/time/TCKOffsetDateTime.java index 991b447a506..1234083e297 100644 --- a/jdk/test/java/time/tck/java/time/TCKOffsetDateTime.java +++ b/jdk/test/java/time/tck/java/time/TCKOffsetDateTime.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -104,8 +104,6 @@ import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; import static org.testng.Assert.fail; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; import java.time.Clock; import java.time.DateTimeException; import java.time.Duration; @@ -470,24 +468,12 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- @Test(expectedExceptions=NullPointerException.class) public void constructor_nullTime() throws Throwable { - Constructor con = OffsetDateTime.class.getDeclaredConstructor(LocalDateTime.class, ZoneOffset.class); - con.setAccessible(true); - try { - con.newInstance(null, OFFSET_PONE); - } catch (InvocationTargetException ex) { - throw ex.getCause(); - } + OffsetDateTime.of(null, OFFSET_PONE); } @Test(expectedExceptions=NullPointerException.class) public void constructor_nullOffset() throws Throwable { - Constructor con = OffsetDateTime.class.getDeclaredConstructor(LocalDateTime.class, ZoneOffset.class); - con.setAccessible(true); - try { - con.newInstance(LocalDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30)), null); - } catch (InvocationTargetException ex) { - throw ex.getCause(); - } + OffsetDateTime.of(LocalDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30)), null); } //----------------------------------------------------------------------- diff --git a/jdk/test/java/time/tck/java/time/TCKOffsetTime.java b/jdk/test/java/time/tck/java/time/TCKOffsetTime.java index 016cfc3e9d8..738bb86c2f4 100644 --- a/jdk/test/java/time/tck/java/time/TCKOffsetTime.java +++ b/jdk/test/java/time/tck/java/time/TCKOffsetTime.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -89,8 +89,6 @@ import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; import static org.testng.Assert.fail; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; import java.time.Clock; import java.time.DateTimeException; import java.time.Instant; @@ -465,28 +463,16 @@ public class TCKOffsetTime extends AbstractDateTimeTest { } //----------------------------------------------------------------------- - // constructor + // constructor via factory //----------------------------------------------------------------------- @Test(expectedExceptions=NullPointerException.class) public void constructor_nullTime() throws Throwable { - Constructor con = OffsetTime.class.getDeclaredConstructor(LocalTime.class, ZoneOffset.class); - con.setAccessible(true); - try { - con.newInstance(null, OFFSET_PONE); - } catch (InvocationTargetException ex) { - throw ex.getCause(); - } + OffsetTime.of(null, OFFSET_PONE); } @Test(expectedExceptions=NullPointerException.class) public void constructor_nullOffset() throws Throwable { - Constructor con = OffsetTime.class.getDeclaredConstructor(LocalTime.class, ZoneOffset.class); - con.setAccessible(true); - try { - con.newInstance(LocalTime.of(11, 30, 0, 0), null); - } catch (InvocationTargetException ex) { - throw ex.getCause(); - } + OffsetTime.of(LocalTime.of(11, 30, 0, 0), null); } //----------------------------------------------------------------------- diff --git a/jdk/test/java/time/tck/java/time/serial/TCKZoneIdSerialization.java b/jdk/test/java/time/tck/java/time/serial/TCKZoneIdSerialization.java index c6f3abee38c..34c79c396e1 100644 --- a/jdk/test/java/time/tck/java/time/serial/TCKZoneIdSerialization.java +++ b/jdk/test/java/time/tck/java/time/serial/TCKZoneIdSerialization.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -63,8 +63,11 @@ import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import tck.java.time.AbstractTCKTest; -import java.io.*; -import java.lang.reflect.Field; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.DataOutputStream; +import java.io.ObjectInputStream; +import java.io.ObjectStreamConstants; import java.time.DateTimeException; import java.time.ZoneId; import java.time.zone.ZoneRulesException; @@ -153,10 +156,8 @@ public class TCKZoneIdSerialization extends AbstractTCKTest { private ZoneId deserialize(String id) throws Exception { String serClass = ZoneId.class.getPackage().getName() + ".Ser"; - Class serCls = Class.forName(serClass); - Field field = serCls.getDeclaredField("serialVersionUID"); - field.setAccessible(true); - long serVer = (Long) field.get(null); + long serVer = getSUID(ZoneId.class); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); try (DataOutputStream dos = new DataOutputStream(baos)) { dos.writeShort(ObjectStreamConstants.STREAM_MAGIC); diff --git a/jdk/test/java/time/test/java/time/TEST.properties b/jdk/test/java/time/test/java/time/TEST.properties new file mode 100644 index 00000000000..75b4dd4403f --- /dev/null +++ b/jdk/test/java/time/test/java/time/TEST.properties @@ -0,0 +1,2 @@ +# java.time test system clock +modules = java.base/java.time:open From 4593304c0780a9547fd1703a1099c41d1c42af5a Mon Sep 17 00:00:00 2001 From: Robert Field Date: Wed, 8 Feb 2017 10:43:16 -0800 Subject: [PATCH 088/447] 8173845: JShell API: not patch compatible Reviewed-by: jlahoda --- .../share/classes/jdk/jshell/JShell.java | 30 ++++- .../classes/jdk/jshell/MemoryFileManager.java | 6 +- .../execution/JdiDefaultExecutionControl.java | 4 +- .../jdk/jshell/execution/JdiInitiator.java | 13 +- .../test/jdk/jshell/FileManagerTest.java | 114 ++++++++++++++++++ .../test/jdk/jshell/MyExecutionControl.java | 3 +- 6 files changed, 162 insertions(+), 8 deletions(-) create mode 100644 langtools/test/jdk/jshell/FileManagerTest.java diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/JShell.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/JShell.java index 64e3c458747..b9c7b9a3439 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/JShell.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/JShell.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -44,8 +44,10 @@ import java.util.ResourceBundle; import java.util.function.BiFunction; import java.util.function.Consumer; +import java.util.function.Function; import java.util.function.Supplier; import java.util.stream.Stream; +import javax.tools.StandardJavaFileManager; import jdk.internal.jshell.debug.InternalDebugControl; import jdk.jshell.Snippet.Status; import jdk.jshell.spi.ExecutionControl.EngineTerminationException; @@ -92,6 +94,7 @@ public class JShell implements AutoCloseable { final BiFunction idGenerator; final List extraRemoteVMOptions; final List extraCompilerOptions; + final Function fileManagerMapping; private int nextKeyIndex = 1; @@ -115,6 +118,7 @@ public class JShell implements AutoCloseable { this.idGenerator = b.idGenerator; this.extraRemoteVMOptions = b.extraRemoteVMOptions; this.extraCompilerOptions = b.extraCompilerOptions; + this.fileManagerMapping = b.fileManagerMapping; try { if (b.executionControlProvider != null) { executionControl = b.executionControlProvider.generate(new ExecutionEnvImpl(), @@ -171,6 +175,7 @@ public class JShell implements AutoCloseable { ExecutionControlProvider executionControlProvider; Map executionControlParameters; String executionControlSpec; + Function fileManagerMapping; Builder() { } @@ -364,6 +369,28 @@ public class JShell implements AutoCloseable { return this; } + /** + * Configure the {@code FileManager} to be used by compilation and + * source analysis. + * If not set or passed null, the compiler's standard file manager will + * be used (identity mapping). + * For use in special applications where the compiler's normal file + * handling needs to be overridden. See the file manager APIs for more + * information. + * The file manager input enables forwarding file managers, if this + * is not needed, the incoming file manager can be ignored (constant + * function). + * + * @param mapping a function that given the compiler's standard file + * manager, returns a file manager to use + * @return the {@code Builder} instance (for use in chained + * initialization) + */ + public Builder fileManager(Function mapping) { + this.fileManagerMapping = mapping; + return this; + } + /** * Builds a JShell state engine. This is the entry-point to all JShell * functionality. This creates a remote process for execution. It is @@ -501,6 +528,7 @@ public class JShell implements AutoCloseable { * @throws IllegalStateException if this {@code JShell} instance is closed. */ public void addToClasspath(String path) { + checkIfAlive(); // Compiler taskFactory.addToClasspath(path); // Runtime diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/MemoryFileManager.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/MemoryFileManager.java index 82e1b954fdb..e426e0de29d 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/MemoryFileManager.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/MemoryFileManager.java @@ -165,7 +165,9 @@ class MemoryFileManager implements JavaFileManager { } public MemoryFileManager(StandardJavaFileManager standardManager, JShell proc) { - this.stdFileManager = standardManager; + this.stdFileManager = proc.fileManagerMapping != null + ? proc.fileManagerMapping.apply(standardManager) + : standardManager; this.proc = proc; } @@ -185,6 +187,7 @@ class MemoryFileManager implements JavaFileManager { } // Make compatible with Jigsaw + @Override public String inferModuleName(Location location) { try { if (inferModuleNameMethod == null) { @@ -203,6 +206,7 @@ class MemoryFileManager implements JavaFileManager { } // Make compatible with Jigsaw + @Override public Iterable> listLocationsForModules(Location location) throws IOException { try { if (listLocationsForModulesMethod == null) { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java index bce34fe1179..18e10aafee7 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java @@ -33,6 +33,7 @@ import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -97,7 +98,8 @@ public class JdiDefaultExecutionControl extends JdiExecutionControl { // Set-up the JDI connection JdiInitiator jdii = new JdiInitiator(port, - env.extraRemoteVMOptions(), remoteAgent, isLaunch, host, timeout); + env.extraRemoteVMOptions(), remoteAgent, isLaunch, host, + timeout, Collections.emptyMap()); VirtualMachine vm = jdii.vm(); Process process = jdii.process(); diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiInitiator.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiInitiator.java index 127b332a776..d53cc81ba43 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiInitiator.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiInitiator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016,2017 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -66,16 +66,20 @@ public class JdiInitiator { * Start the remote agent and establish a JDI connection to it. * * @param port the socket port for (non-JDI) commands - * @param remoteVMOptions any user requested VM options + * @param remoteVMOptions any user requested VM command-line options * @param remoteAgent full class name of remote agent to launch * @param isLaunch does JDI do the launch? That is, LaunchingConnector, * otherwise we start explicitly and use ListeningConnector * @param host explicit hostname to use, if null use discovered * hostname, applies to listening only (!isLaunch) - * @param timeout the start-up time-out in milliseconds + * @param timeout the start-up time-out in milliseconds. If zero or negative, + * will not wait thus will timeout immediately if not already started. + * @param customConnectorArgs custom arguments passed to the connector. + * These are JDI com.sun.jdi.connect.Connector arguments. */ public JdiInitiator(int port, List remoteVMOptions, String remoteAgent, - boolean isLaunch, String host, int timeout) { + boolean isLaunch, String host, int timeout, + Map customConnectorArgs) { this.remoteAgent = remoteAgent; this.connectTimeout = (int) (timeout * CONNECT_TIMEOUT_FACTOR); String connectorName @@ -96,6 +100,7 @@ public class JdiInitiator { argumentName2Value.put("localAddress", host); } } + argumentName2Value.putAll(customConnectorArgs); this.connectorArgs = mergeConnectorArgs(connector, argumentName2Value); this.vm = isLaunch ? launchTarget() diff --git a/langtools/test/jdk/jshell/FileManagerTest.java b/langtools/test/jdk/jshell/FileManagerTest.java new file mode 100644 index 00000000000..9e4f063da9d --- /dev/null +++ b/langtools/test/jdk/jshell/FileManagerTest.java @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test 8173845 + * @summary test custom file managers + * @build KullaTesting TestingInputStream + * @run testng FileManagerTest + */ + + +import java.io.File; +import java.io.IOException; + +import java.util.Set; +import javax.tools.ForwardingJavaFileManager; +import javax.tools.JavaFileObject; +import javax.tools.JavaFileObject.Kind; +import javax.tools.StandardJavaFileManager; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +import static org.testng.Assert.assertTrue; + +@Test +public class FileManagerTest extends KullaTesting { + + boolean encountered; + + class MyFileManager extends ForwardingJavaFileManager + implements StandardJavaFileManager { + + protected MyFileManager(StandardJavaFileManager fileManager) { + super(fileManager); + } + + @Override + public Iterable list(Location location, + String packageName, + Set kinds, + boolean recurse) + throws IOException { + //System.out.printf("list(%s, %s, %s, %b)\n", + // location, packageName, kinds, recurse); + if (packageName.equals("java.lang.reflect")) { + encountered = true; + } + return fileManager.list(location, packageName, kinds, recurse); + } + + @Override + public Iterable getJavaFileObjectsFromFiles(Iterable files) { + return fileManager.getJavaFileObjectsFromFiles(files); + } + + @Override + public Iterable getJavaFileObjects(File... files) { + return fileManager.getJavaFileObjects(files); + } + + @Override + public Iterable getJavaFileObjectsFromStrings(Iterable names) { + return fileManager.getJavaFileObjectsFromStrings(names); + } + + @Override + public Iterable getJavaFileObjects(String... names) { + return fileManager.getJavaFileObjects(names); + } + + @Override + public void setLocation(Location location, Iterable files) throws IOException { + fileManager.setLocation(location, files); + } + + @Override + public Iterable getLocation(Location location) { + return fileManager.getLocation(location); + } + + } + + @BeforeMethod + @Override + public void setUp() { + setUp(b -> b.fileManager(fm -> new MyFileManager(fm))); + } + + public void testSnippetMemberAssignment() { + assertEval("java.lang.reflect.Array.get(new String[1], 0) == null"); + assertTrue(encountered, "java.lang.reflect not encountered"); + } + +} diff --git a/langtools/test/jdk/jshell/MyExecutionControl.java b/langtools/test/jdk/jshell/MyExecutionControl.java index 15b0e94f5e2..8493638db57 100644 --- a/langtools/test/jdk/jshell/MyExecutionControl.java +++ b/langtools/test/jdk/jshell/MyExecutionControl.java @@ -29,6 +29,7 @@ import java.io.OutputStream; import java.net.ServerSocket; import java.net.Socket; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -78,7 +79,7 @@ class MyExecutionControl extends JdiExecutionControl { + System.getProperty("path.separator") + System.getProperty("user.dir")); JdiInitiator jdii = new JdiInitiator(port, - opts, REMOTE_AGENT, true, null, TIMEOUT); + opts, REMOTE_AGENT, true, null, TIMEOUT, Collections.emptyMap()); VirtualMachine vm = jdii.vm(); Process process = jdii.process(); From 90dd9890920e565ecffd4ada35940f6ccd827b6f Mon Sep 17 00:00:00 2001 From: Anthony Scarpino Date: Wed, 8 Feb 2017 10:56:59 -0800 Subject: [PATCH 089/447] 8174157: Backout 8151116 Reviewed-by: mullan --- .../share/conf/security/java.security | 74 ++++++++----------- 1 file changed, 30 insertions(+), 44 deletions(-) diff --git a/jdk/src/java.base/share/conf/security/java.security b/jdk/src/java.base/share/conf/security/java.security index 0b8863e641e..5e778810bb7 100644 --- a/jdk/src/java.base/share/conf/security/java.security +++ b/jdk/src/java.base/share/conf/security/java.security @@ -116,13 +116,6 @@ security.provider.tbd=SunPKCS11 # Example: # jdk.security.provider.preferred=AES/GCM/NoPadding:SunJCE, \ # MessageDigest.SHA-256:SUN, Group.HmacSHA2:SunJCE -# -#ifdef solaris-sparc -# Optional Solaris-SPARC configuration for non-FIPS 140 configurations. -# jdk.security.provider.preferred=AES:SunJCE, SHA1:SUN, Group.SHA2:SUN, \ -# HmacSHA1:SunJCE, Group.HmacSHA2:SunJCE -# -#endif #jdk.security.provider.preferred= @@ -247,7 +240,6 @@ securerandom.strongAlgorithms=NativePRNGBlocking:SUN,DRBG:SUN # # The default value is an empty string, which is equivalent to # securerandom.drbg.config=Hash_DRBG,SHA-256,128,none -# securerandom.drbg.config= # @@ -270,27 +262,23 @@ policy.provider=sun.security.provider.PolicyFile # The default is to have a single system-wide policy file, # and a policy file in the user's home directory. -# policy.url.1=file:${java.home}/conf/security/java.policy policy.url.2=file:${user.home}/.java.policy # whether or not we expand properties in the policy file # if this is set to false, properties (${...}) will not be expanded in policy # files. -# policy.expandProperties=true # whether or not we allow an extra policy to be passed on the command line # with -Djava.security.policy=somefile. Comment out this line to disable # this feature. -# policy.allowSystemProperty=true # whether or not we look into the IdentityScope for trusted Identities # when encountering a 1.1 signed JAR file. If the identity is found # and is trusted, we grant it AllPermission. Note: the default policy # provider (sun.security.provider.PolicyFile) does not support this property. -# policy.ignoreIdentityScope=false # @@ -372,6 +360,7 @@ ssl.TrustManagerFactory.algorithm=PKIX # For this reason the default caching policy is to maintain these # results for 10 seconds. # +# networkaddress.cache.negative.ttl=10 # @@ -471,10 +460,8 @@ networkaddress.cache.negative.ttl=10 # Example, # krb5.kdc.bad.policy = tryLast # krb5.kdc.bad.policy = tryLess:2,2000 -# krb5.kdc.bad.policy = tryLast -# # Algorithm restrictions for certification path (CertPath) processing # # In some environments, certain algorithms or key lengths may be undesirable @@ -585,6 +572,35 @@ jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & denyAfter 2017-01-01, \ RSA keySize < 1024, DSA keySize < 1024, EC keySize < 224 # +# RMI Registry Serial Filter +# +# The filter pattern uses the same format as jdk.serialFilter. +# This filter can override the builtin filter if additional types need to be +# allowed or rejected from the RMI Registry. +# +# Note: This property is currently used by the JDK Reference implementation. +# It is not guaranteed to be examined and used by other implementations. +# +#sun.rmi.registry.registryFilter=pattern;pattern +# +# RMI Distributed Garbage Collector (DGC) Serial Filter +# +# The filter pattern uses the same format as jdk.serialFilter. +# This filter can override the builtin filter if additional types need to be +# allowed or rejected from the RMI DGC. +# +# Note: This property is currently used by the JDK Reference implementation. +# It is not guaranteed to be examined and used by other implementations. +# +# The builtin DGC filter can approximately be represented as the filter pattern: +# +#sun.rmi.transport.dgcFilter=\ +# java.rmi.server.ObjID;\ +# java.rmi.server.UID;\ +# java.rmi.dgc.VMID;\ +# java.rmi.dgc.Lease;\ +# maxdepth=5;maxarray=10000 + # Algorithm restrictions for signed JAR files # # In some environments, certain algorithms or key lengths may be undesirable @@ -623,7 +639,6 @@ jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & denyAfter 2017-01-01, \ jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024, \ DSA keySize < 1024 -# # Algorithm restrictions for Secure Socket Layer/Transport Layer Security # (SSL/TLS/DTLS) processing # @@ -924,32 +939,3 @@ jdk.xml.dsig.secureValidationPolicy=\ # #jdk.serialFilter=pattern;pattern -# -# RMI Registry Serial Filter -# -# The filter pattern uses the same format as jdk.serialFilter. -# This filter can override the builtin filter if additional types need to be -# allowed or rejected from the RMI Registry. -# -# Note: This property is currently used by the JDK Reference implementation. -# It is not guaranteed to be examined and used by other implementations. -# -#sun.rmi.registry.registryFilter=pattern;pattern -# -# RMI Distributed Garbage Collector (DGC) Serial Filter -# -# The filter pattern uses the same format as jdk.serialFilter. -# This filter can override the builtin filter if additional types need to be -# allowed or rejected from the RMI DGC. -# -# Note: This property is currently used by the JDK Reference implementation. -# It is not guaranteed to be examined and used by other implementations. -# -# The builtin DGC filter can approximately be represented as the filter pattern: -# -#sun.rmi.transport.dgcFilter=\ -# java.rmi.server.ObjID;\ -# java.rmi.server.UID;\ -# java.rmi.dgc.VMID;\ -# java.rmi.dgc.Lease;\ -# maxdepth=5;maxarray=10000 From da9767e7163173079d3d6e00d657d0a4ffa93212 Mon Sep 17 00:00:00 2001 From: Anthony Scarpino Date: Wed, 8 Feb 2017 11:01:05 -0800 Subject: [PATCH 090/447] 8173410: Add commented config line for jdk.security.provider.preferred Reviewed-by: wetmore --- .../share/conf/security/java.security | 74 +++++++++++-------- 1 file changed, 44 insertions(+), 30 deletions(-) diff --git a/jdk/src/java.base/share/conf/security/java.security b/jdk/src/java.base/share/conf/security/java.security index 5e778810bb7..0b8863e641e 100644 --- a/jdk/src/java.base/share/conf/security/java.security +++ b/jdk/src/java.base/share/conf/security/java.security @@ -116,6 +116,13 @@ security.provider.tbd=SunPKCS11 # Example: # jdk.security.provider.preferred=AES/GCM/NoPadding:SunJCE, \ # MessageDigest.SHA-256:SUN, Group.HmacSHA2:SunJCE +# +#ifdef solaris-sparc +# Optional Solaris-SPARC configuration for non-FIPS 140 configurations. +# jdk.security.provider.preferred=AES:SunJCE, SHA1:SUN, Group.SHA2:SUN, \ +# HmacSHA1:SunJCE, Group.HmacSHA2:SunJCE +# +#endif #jdk.security.provider.preferred= @@ -240,6 +247,7 @@ securerandom.strongAlgorithms=NativePRNGBlocking:SUN,DRBG:SUN # # The default value is an empty string, which is equivalent to # securerandom.drbg.config=Hash_DRBG,SHA-256,128,none +# securerandom.drbg.config= # @@ -262,23 +270,27 @@ policy.provider=sun.security.provider.PolicyFile # The default is to have a single system-wide policy file, # and a policy file in the user's home directory. +# policy.url.1=file:${java.home}/conf/security/java.policy policy.url.2=file:${user.home}/.java.policy # whether or not we expand properties in the policy file # if this is set to false, properties (${...}) will not be expanded in policy # files. +# policy.expandProperties=true # whether or not we allow an extra policy to be passed on the command line # with -Djava.security.policy=somefile. Comment out this line to disable # this feature. +# policy.allowSystemProperty=true # whether or not we look into the IdentityScope for trusted Identities # when encountering a 1.1 signed JAR file. If the identity is found # and is trusted, we grant it AllPermission. Note: the default policy # provider (sun.security.provider.PolicyFile) does not support this property. +# policy.ignoreIdentityScope=false # @@ -360,7 +372,6 @@ ssl.TrustManagerFactory.algorithm=PKIX # For this reason the default caching policy is to maintain these # results for 10 seconds. # -# networkaddress.cache.negative.ttl=10 # @@ -460,8 +471,10 @@ networkaddress.cache.negative.ttl=10 # Example, # krb5.kdc.bad.policy = tryLast # krb5.kdc.bad.policy = tryLess:2,2000 +# krb5.kdc.bad.policy = tryLast +# # Algorithm restrictions for certification path (CertPath) processing # # In some environments, certain algorithms or key lengths may be undesirable @@ -572,35 +585,6 @@ jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & denyAfter 2017-01-01, \ RSA keySize < 1024, DSA keySize < 1024, EC keySize < 224 # -# RMI Registry Serial Filter -# -# The filter pattern uses the same format as jdk.serialFilter. -# This filter can override the builtin filter if additional types need to be -# allowed or rejected from the RMI Registry. -# -# Note: This property is currently used by the JDK Reference implementation. -# It is not guaranteed to be examined and used by other implementations. -# -#sun.rmi.registry.registryFilter=pattern;pattern -# -# RMI Distributed Garbage Collector (DGC) Serial Filter -# -# The filter pattern uses the same format as jdk.serialFilter. -# This filter can override the builtin filter if additional types need to be -# allowed or rejected from the RMI DGC. -# -# Note: This property is currently used by the JDK Reference implementation. -# It is not guaranteed to be examined and used by other implementations. -# -# The builtin DGC filter can approximately be represented as the filter pattern: -# -#sun.rmi.transport.dgcFilter=\ -# java.rmi.server.ObjID;\ -# java.rmi.server.UID;\ -# java.rmi.dgc.VMID;\ -# java.rmi.dgc.Lease;\ -# maxdepth=5;maxarray=10000 - # Algorithm restrictions for signed JAR files # # In some environments, certain algorithms or key lengths may be undesirable @@ -639,6 +623,7 @@ jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & denyAfter 2017-01-01, \ jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024, \ DSA keySize < 1024 +# # Algorithm restrictions for Secure Socket Layer/Transport Layer Security # (SSL/TLS/DTLS) processing # @@ -939,3 +924,32 @@ jdk.xml.dsig.secureValidationPolicy=\ # #jdk.serialFilter=pattern;pattern +# +# RMI Registry Serial Filter +# +# The filter pattern uses the same format as jdk.serialFilter. +# This filter can override the builtin filter if additional types need to be +# allowed or rejected from the RMI Registry. +# +# Note: This property is currently used by the JDK Reference implementation. +# It is not guaranteed to be examined and used by other implementations. +# +#sun.rmi.registry.registryFilter=pattern;pattern +# +# RMI Distributed Garbage Collector (DGC) Serial Filter +# +# The filter pattern uses the same format as jdk.serialFilter. +# This filter can override the builtin filter if additional types need to be +# allowed or rejected from the RMI DGC. +# +# Note: This property is currently used by the JDK Reference implementation. +# It is not guaranteed to be examined and used by other implementations. +# +# The builtin DGC filter can approximately be represented as the filter pattern: +# +#sun.rmi.transport.dgcFilter=\ +# java.rmi.server.ObjID;\ +# java.rmi.server.UID;\ +# java.rmi.dgc.VMID;\ +# java.rmi.dgc.Lease;\ +# maxdepth=5;maxarray=10000 From 907b393fe2467e12f9c2e185422c44f2ed7e8c4a Mon Sep 17 00:00:00 2001 From: Valerie Peng Date: Wed, 8 Feb 2017 19:20:09 +0000 Subject: [PATCH 091/447] 8173708: Re-enable AES cipher with CFB128 mode for Ucrypto provider Updated Ucrypto config file to remove the disabled mechanisms Reviewed-by: wetmore --- .../solaris/conf/security/ucrypto-solaris.cfg | 3 --- jdk/test/com/oracle/security/ucrypto/TestAES.java | 10 ++++++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/jdk/src/jdk.crypto.ucrypto/solaris/conf/security/ucrypto-solaris.cfg b/jdk/src/jdk.crypto.ucrypto/solaris/conf/security/ucrypto-solaris.cfg index 5ccefad1369..cba2ffc94f8 100644 --- a/jdk/src/jdk.crypto.ucrypto/solaris/conf/security/ucrypto-solaris.cfg +++ b/jdk/src/jdk.crypto.ucrypto/solaris/conf/security/ucrypto-solaris.cfg @@ -2,8 +2,5 @@ # Configuration file for the OracleUcrypto provider # disabledServices = { - # disabled due to Solaris bug 7121679 - Cipher.AES/CFB128/PKCS5Padding - Cipher.AES/CFB128/NoPadding } diff --git a/jdk/test/com/oracle/security/ucrypto/TestAES.java b/jdk/test/com/oracle/security/ucrypto/TestAES.java index 717e3186d97..bf460d420a6 100644 --- a/jdk/test/com/oracle/security/ucrypto/TestAES.java +++ b/jdk/test/com/oracle/security/ucrypto/TestAES.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ /* * @test - * @bug 7088989 8014374 8167512 + * @bug 7088989 8014374 8167512 8173708 * @summary Ensure the AES ciphers of OracleUcrypto provider works correctly * @key randomness * @run main TestAES @@ -177,6 +177,12 @@ public class TestAES extends UcryptoTest { k += c.doFinal(eout, firstPartLen+1, eout.length - firstPartLen - 1, dout, k); if (!checkArrays(in, in.length, dout, k)) testPassed = false; } catch(Exception ex) { + if (ex instanceof BadPaddingException && + algos[i].indexOf("CFB128") != -1 && + p.getName().equals("OracleUcrypto")) { + System.out.println("Ignore due to a pre-S11.3 bug: " + ex); + continue; + } System.out.println("Unexpected Exception: " + algos[i]); ex.printStackTrace(); testPassed = false; From 125d4ea7d0f5e370bb7ee98b363ad95b26d7a97f Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Wed, 8 Feb 2017 12:27:45 -0700 Subject: [PATCH 092/447] 8173587: LambdaMetafactory needs to validate descriptors and method name Reviewed-by: psandoz --- .../AbstractValidatingLambdaMetafactory.java | 52 +++- .../lambda/MetafactoryDescriptorTest.java | 269 ++++++++++++++++++ .../lambda/MetafactoryMethodNameTest.java | 197 +++++++++++++ .../lambda/MetafactorySamReturnTest.java | 167 ----------- 4 files changed, 505 insertions(+), 180 deletions(-) create mode 100644 jdk/test/java/lang/invoke/lambda/MetafactoryDescriptorTest.java create mode 100644 jdk/test/java/lang/invoke/lambda/MetafactoryMethodNameTest.java delete mode 100644 jdk/test/java/lang/invoke/lambda/MetafactorySamReturnTest.java diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java b/jdk/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java index 3f91060ccc8..0675c043185 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java @@ -141,6 +141,18 @@ import static sun.invoke.util.Wrapper.isWrapperType; this.markerInterfaces = markerInterfaces; this.additionalBridges = additionalBridges; + if (samMethodName.isEmpty() || + samMethodName.indexOf('.') >= 0 || + samMethodName.indexOf(';') >= 0 || + samMethodName.indexOf('[') >= 0 || + samMethodName.indexOf('/') >= 0 || + samMethodName.indexOf('<') >= 0 || + samMethodName.indexOf('>') >= 0) { + throw new LambdaConversionException(String.format( + "Method name '%s' is not legal", + samMethodName)); + } + if (!samBase.isInterface()) { throw new LambdaConversionException(String.format( "Functional interface %s is not an interface", @@ -275,25 +287,39 @@ import static sun.invoke.util.Wrapper.isWrapperType; (implKind == MethodHandleInfo.REF_newInvokeSpecial) ? implDefiningClass : implMethodType.returnType(); - Class samReturnType = samMethodType.returnType(); if (!isAdaptableToAsReturn(actualReturnType, expectedType)) { throw new LambdaConversionException( String.format("Type mismatch for lambda return: %s is not convertible to %s", actualReturnType, expectedType)); } - if (!isAdaptableToAsReturnStrict(expectedType, samReturnType)) { - throw new LambdaConversionException( - String.format("Type mismatch for lambda expected return: %s is not convertible to %s", - expectedType, samReturnType)); - } + + // Check descriptors of generated methods + checkDescriptor(samMethodType); for (MethodType bridgeMT : additionalBridges) { - if (!isAdaptableToAsReturnStrict(expectedType, bridgeMT.returnType())) { - throw new LambdaConversionException( - String.format("Type mismatch for lambda expected return: %s is not convertible to %s", - expectedType, bridgeMT.returnType())); + checkDescriptor(bridgeMT); + } + } + + /** Validate that the given descriptor's types are compatible with {@code instantiatedMethodType} **/ + private void checkDescriptor(MethodType descriptor) throws LambdaConversionException { + for (int i = 0; i < instantiatedMethodType.parameterCount(); i++) { + Class instantiatedParamType = instantiatedMethodType.parameterType(i); + Class descriptorParamType = descriptor.parameterType(i); + if (!descriptorParamType.isAssignableFrom(instantiatedParamType)) { + String msg = String.format("Type mismatch for instantiated parameter %d: %s is not a subtype of %s", + i, instantiatedParamType, descriptorParamType); + throw new LambdaConversionException(msg); } } - } + + Class instantiatedReturnType = instantiatedMethodType.returnType(); + Class descriptorReturnType = descriptor.returnType(); + if (!isAdaptableToAsReturnStrict(instantiatedReturnType, descriptorReturnType)) { + String msg = String.format("Type mismatch for lambda expected return: %s is not convertible to %s", + instantiatedReturnType, descriptorReturnType); + throw new LambdaConversionException(msg); + } + } /** * Check type adaptability for parameter types. @@ -345,8 +371,8 @@ import static sun.invoke.util.Wrapper.isWrapperType; || !fromType.equals(void.class) && isAdaptableTo(fromType, toType, false); } private boolean isAdaptableToAsReturnStrict(Class fromType, Class toType) { - if (fromType.equals(void.class)) return toType.equals(void.class); - return isAdaptableTo(fromType, toType, true); + if (fromType.equals(void.class) || toType.equals(void.class)) return fromType.equals(toType); + else return isAdaptableTo(fromType, toType, true); } diff --git a/jdk/test/java/lang/invoke/lambda/MetafactoryDescriptorTest.java b/jdk/test/java/lang/invoke/lambda/MetafactoryDescriptorTest.java new file mode 100644 index 00000000000..a22e5dac2df --- /dev/null +++ b/jdk/test/java/lang/invoke/lambda/MetafactoryDescriptorTest.java @@ -0,0 +1,269 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8035776 8173587 + * @summary metafactory should fail if instantiatedMethodType does not match sam/bridge descriptors + */ +import java.lang.invoke.*; +import java.util.*; + +public class MetafactoryDescriptorTest { + + static final MethodHandles.Lookup lookup = MethodHandles.lookup(); + + static MethodType mt(Class ret, Class... params) { + return MethodType.methodType(ret, params); + } + + public interface I {} + + public static class C { + public static void m_void(String arg) {} + public static boolean m_boolean(String arg) { return true; } + public static char m_char(String arg) { return 'x'; } + public static byte m_byte(String arg) { return 12; } + public static short m_short(String arg) { return 12; } + public static int m_int(String arg) { return 12; } + public static long m_long(String arg) { return 12; } + public static float m_float(String arg) { return 12; } + public static double m_double(String arg) { return 12; } + public static String m_String(String arg) { return ""; } + public static Integer m_Integer(String arg) { return 23; } + public static Object m_Object(String arg) { return new Object(); } + + public static String n_boolean(boolean arg) { return ""; } + public static String n_char(char arg) { return ""; } + public static String n_byte(byte arg) { return ""; } + public static String n_short(short arg) { return ""; } + public static String n_int(int arg) { return ""; } + public static String n_long(long arg) { return ""; } + public static String n_float(float arg) { return ""; } + public static String n_double(double arg) { return ""; } + public static String n_String(String arg) { return ""; } + public static String n_Integer(Integer arg) { return ""; } + public static String n_Object(Object arg) { return ""; } + + public static MethodHandle getM(Class c) { + try { + return lookup.findStatic(C.class, "m_" + c.getSimpleName(), mt(c, String.class)); + } + catch (NoSuchMethodException | IllegalAccessException e) { + throw new RuntimeException(e); + } + } + + public static MethodHandle getN(Class c) { + if (c == void.class) return null; + try { + return lookup.findStatic(C.class, "n_" + c.getSimpleName(), mt(String.class, c)); + } + catch (NoSuchMethodException | IllegalAccessException e) { + throw new RuntimeException(e); + } + } + + } + + public static void main(String... args) { + Class[] t = { void.class, boolean.class, char.class, + byte.class, short.class, int.class, long.class, float.class, double.class, + String.class, Integer.class, Object.class }; + + for (int i = 0; i < t.length; i++) { + MethodHandle m = C.getM(t[i]); + MethodHandle n = C.getN(t[i]); // null for void.class + for (int j = 0; j < t.length; j++) { + boolean correctRet = t[j].isAssignableFrom(t[i]) || conversions.contains(t[i], t[j]); + test(correctRet, m, mt(t[i], String.class), mt(t[j], String.class)); + testBridge(correctRet, m, mt(t[i], String.class), mt(t[i], String.class), + mt(t[j], Object.class)); + testBridge(correctRet, m, mt(t[i], String.class), mt(t[i], String.class), + mt(t[i], CharSequence.class), mt(t[j], Object.class)); + + if (t[i] != void.class && t[j] != void.class) { + boolean correctParam = t[j].isAssignableFrom(t[i]); + test(correctParam, n, mt(String.class, t[i]), mt(String.class, t[j])); + testBridge(correctParam, n, mt(String.class, t[i]), mt(String.class, t[i]), + mt(Object.class, t[j])); + testBridge(correctParam, n, mt(String.class, t[i]), mt(String.class, t[i]), + mt(CharSequence.class, t[i]), mt(Object.class, t[j])); + } + + } + } + } + + static void test(boolean correct, MethodHandle mh, MethodType instMT, MethodType samMT) { + tryMetafactory(correct, mh, instMT, samMT); + tryAltMetafactory(correct, mh, instMT, samMT); + } + + static void testBridge(boolean correct, MethodHandle mh, MethodType instMT, MethodType samMT, MethodType... bridgeMTs) { + tryAltMetafactory(correct, mh, instMT, samMT, bridgeMTs); + } + + static void tryMetafactory(boolean correct, MethodHandle mh, MethodType instMT, MethodType samMT) { + try { + LambdaMetafactory.metafactory(lookup, "run", mt(I.class), + samMT, mh, instMT); + if (!correct) { + throw new AssertionError("Unexpected linkage without error:" + + " impl=" + mh + + ", inst=" + instMT + + ", sam=" + samMT); + } + } + catch (LambdaConversionException e) { + if (correct) { + throw new AssertionError("Unexpected linkage error:" + + " e=" + e + + ", impl=" + mh + + ", inst=" + instMT + + ", sam=" + samMT); + } + } + } + + static void tryAltMetafactory(boolean correct, MethodHandle mh, MethodType instMT, MethodType samMT, + MethodType... bridgeMTs) { + boolean bridge = bridgeMTs.length > 0; + Object[] args = new Object[bridge ? 5+bridgeMTs.length : 4]; + args[0] = samMT; + args[1] = mh; + args[2] = instMT; + args[3] = bridge ? LambdaMetafactory.FLAG_BRIDGES : 0; + if (bridge) { + args[4] = bridgeMTs.length; + for (int i = 0; i < bridgeMTs.length; i++) args[5+i] = bridgeMTs[i]; + } + try { + LambdaMetafactory.altMetafactory(lookup, "run", mt(I.class), args); + if (!correct) { + throw new AssertionError("Unexpected linkage without error:" + + " impl=" + mh + + ", inst=" + instMT + + ", sam=" + samMT + + ", bridges=" + Arrays.toString(bridgeMTs)); + } + } + catch (LambdaConversionException e) { + if (correct) { + throw new AssertionError("Unexpected linkage error:" + + " e=" + e + + ", impl=" + mh + + ", inst=" + instMT + + ", sam=" + samMT + + ", bridges=" + Arrays.toString(bridgeMTs)); + } + } + } + + private static class ConversionTable { + private final Map, Set>> pairs = new HashMap<>(); + + public void put(Class from, Class to) { + Set> set = pairs.computeIfAbsent(from, f -> new HashSet<>()); + set.add(to); + } + + public boolean contains(Class from, Class to) { + return pairs.containsKey(from) && pairs.get(from).contains(to); + } + } + + private static ConversionTable conversions = new ConversionTable(); + static { + conversions.put(char.class, int.class); + conversions.put(char.class, long.class); + conversions.put(char.class, float.class); + conversions.put(char.class, double.class); + conversions.put(char.class, Character.class); + conversions.put(char.class, Object.class); + conversions.put(Character.class, char.class); + conversions.put(Character.class, int.class); + conversions.put(Character.class, long.class); + conversions.put(Character.class, float.class); + conversions.put(Character.class, double.class); + + conversions.put(byte.class, short.class); + conversions.put(byte.class, int.class); + conversions.put(byte.class, long.class); + conversions.put(byte.class, float.class); + conversions.put(byte.class, double.class); + conversions.put(byte.class, Byte.class); + conversions.put(byte.class, Object.class); + conversions.put(Byte.class, byte.class); + conversions.put(Byte.class, short.class); + conversions.put(Byte.class, int.class); + conversions.put(Byte.class, long.class); + conversions.put(Byte.class, float.class); + conversions.put(Byte.class, double.class); + + conversions.put(short.class, int.class); + conversions.put(short.class, long.class); + conversions.put(short.class, float.class); + conversions.put(short.class, double.class); + conversions.put(short.class, Short.class); + conversions.put(short.class, Object.class); + conversions.put(Short.class, short.class); + conversions.put(Short.class, int.class); + conversions.put(Short.class, long.class); + conversions.put(Short.class, float.class); + conversions.put(Short.class, double.class); + + conversions.put(int.class, long.class); + conversions.put(int.class, float.class); + conversions.put(int.class, double.class); + conversions.put(int.class, Integer.class); + conversions.put(int.class, Object.class); + conversions.put(Integer.class, int.class); + conversions.put(Integer.class, long.class); + conversions.put(Integer.class, float.class); + conversions.put(Integer.class, double.class); + + conversions.put(long.class, float.class); + conversions.put(long.class, double.class); + conversions.put(long.class, Long.class); + conversions.put(long.class, Object.class); + conversions.put(Long.class, long.class); + conversions.put(Long.class, float.class); + conversions.put(Long.class, double.class); + + conversions.put(float.class, double.class); + conversions.put(float.class, Float.class); + conversions.put(float.class, Object.class); + conversions.put(Float.class, float.class); + conversions.put(Float.class, double.class); + + conversions.put(double.class, Double.class); + conversions.put(double.class, Object.class); + conversions.put(Double.class, double.class); + + conversions.put(boolean.class, Boolean.class); + conversions.put(boolean.class, Object.class); + conversions.put(Boolean.class, boolean.class); + } + +} diff --git a/jdk/test/java/lang/invoke/lambda/MetafactoryMethodNameTest.java b/jdk/test/java/lang/invoke/lambda/MetafactoryMethodNameTest.java new file mode 100644 index 00000000000..64dd4b45d37 --- /dev/null +++ b/jdk/test/java/lang/invoke/lambda/MetafactoryMethodNameTest.java @@ -0,0 +1,197 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8173587 + * @summary metafactory should fail if the method name is not legal + */ +import java.lang.invoke.*; +import java.util.*; + +public class MetafactoryMethodNameTest { + + public static void main(String... args) { + goodName("x"); + goodName("xy"); + + goodName("]"); + goodName("x]"); + goodName("]y"); + goodName("x]y"); + + goodName("&"); + goodName("x&"); + goodName("&y"); + goodName("x&y"); + + badName("."); + badName("x."); + badName(".y"); + badName("x.y"); + + badName(";"); + badName("x;"); + badName(";y"); + badName("x;y"); + + badName("["); + badName("x["); + badName("[y"); + badName("x[y"); + + badName("/"); + badName("x/"); + badName("/y"); + badName("x/y"); + + badName("<"); + badName("x<"); + badName(""); + badName("x>"); + badName(">y"); + badName("x>y"); + + badName(""); + badName(""); + badName(""); + } + + static MethodType mt(Class ret, Class... params) { + return MethodType.methodType(ret, params); + } + + static MethodHandle smh(Class c, String name, MethodType desc) { + try { + return MethodHandles.lookup().findStatic(c, name, desc); + } catch (ReflectiveOperationException e) { + throw new RuntimeException(e); + } + } + + static Object[] arr(Object... args) { + return args; + } + + public static class C { + public static void m() {} + } + + public interface I {} + + private static MethodHandles.Lookup lookup = MethodHandles.lookup(); + private static MethodType toI = mt(I.class); + private static MethodType toVoid = mt(void.class); + private static MethodHandle mh = smh(C.class, "m", toVoid); + private static Class lce = LambdaConversionException.class; + + static void goodName(String name) { + succeedMFLinkage(lookup, name, toI, toVoid, mh, toVoid); + succeedAltMFLinkage(lookup, name, toI, arr(toVoid, mh, toVoid, LambdaMetafactory.FLAG_SERIALIZABLE)); + } + + static void badName(String name) { + failMFLinkage(lookup, name, toI, toVoid, mh, toVoid, lce); + failAltMFLinkage(lookup, name, toI, arr(toVoid, mh, toVoid, LambdaMetafactory.FLAG_SERIALIZABLE), lce); + } + + static CallSite succeedMFLinkage(MethodHandles.Lookup lookup, + String name, + MethodType capType, + MethodType desc, + MethodHandle impl, + MethodType checked) { + try { + return LambdaMetafactory.metafactory(lookup, name, capType, desc, impl, checked); + } catch (Throwable t) { + String msg = String.format("Unexpected exception during linkage for metafactory(%s, %s, %s, %s, %s, %s)", + lookup, name, capType, desc, impl, checked); + throw new AssertionError(msg, t); + } + } + + static void failMFLinkage(MethodHandles.Lookup lookup, + String name, + MethodType capType, + MethodType desc, + MethodHandle impl, + MethodType checked, + Class expectedExceptionType) { + try { + LambdaMetafactory.metafactory(lookup, name, capType, desc, impl, checked); + } catch (Throwable t) { + if (expectedExceptionType.isInstance(t)) { + return; + } else { + String msg = String.format("Unexpected exception: expected %s during linkage for metafactory(%s, %s, %s, %s, %s, %s)", + expectedExceptionType.getName(), + lookup, name, capType, desc, impl, checked); + throw new AssertionError(msg, t); + } + } + String msg = String.format("Unexpected success: expected %s during linkage for metafactory(%s, %s, %s, %s, %s, %s)", + expectedExceptionType.getName(), + lookup, name, capType, desc, impl, checked); + throw new AssertionError(msg); + } + + static CallSite succeedAltMFLinkage(MethodHandles.Lookup lookup, + String name, + MethodType capType, + Object[] args) { + try { + return LambdaMetafactory.altMetafactory(lookup, name, capType, args); + } catch (Throwable t) { + String msg = String.format("Unexpected exception during linkage for metafactory(%s, %s, %s, %s)", + lookup, name, capType, Arrays.asList(args)); + throw new AssertionError(msg, t); + } + } + + static void failAltMFLinkage(MethodHandles.Lookup lookup, + String name, + MethodType capType, + Object[] args, + Class expectedExceptionType) { + try { + LambdaMetafactory.altMetafactory(lookup, name, capType, args); + } catch (Throwable t) { + if (expectedExceptionType.isInstance(t)) { + return; + } else { + String msg = String.format("Unexpected exception: expected %s during linkage for metafactory(%s, %s, %s, %s)", + expectedExceptionType.getName(), + lookup, name, capType, Arrays.asList(args)); + throw new AssertionError(msg, t); + } + } + String msg = String.format("Unexpected success: expected %s during linkage for metafactory(%s, %s, %s, %s)", + expectedExceptionType.getName(), + lookup, name, capType, Arrays.asList(args)); + throw new AssertionError(msg); + } + +} diff --git a/jdk/test/java/lang/invoke/lambda/MetafactorySamReturnTest.java b/jdk/test/java/lang/invoke/lambda/MetafactorySamReturnTest.java deleted file mode 100644 index 4caf2624df9..00000000000 --- a/jdk/test/java/lang/invoke/lambda/MetafactorySamReturnTest.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 8035776 - * @summary metafactory should fail if impl return does not match sam/bridge returns - */ -import java.lang.invoke.*; -import java.util.Arrays; -import static java.lang.invoke.MethodType.methodType; - -public class MetafactorySamReturnTest { - - static final MethodHandles.Lookup lookup = MethodHandles.lookup(); - - public interface I {} - - public static class C { - public static void m_void(String arg) {} - public static boolean m_boolean(String arg) { return true; } - public static char m_char(String arg) { return 'x'; } - public static byte m_byte(String arg) { return 12; } - public static short m_short(String arg) { return 12; } - public static int m_int(String arg) { return 12; } - public static long m_long(String arg) { return 12; } - public static float m_float(String arg) { return 12; } - public static double m_double(String arg) { return 12; } - public static String m_String(String arg) { return ""; } - public static Integer m_Integer(String arg) { return 23; } - public static Object m_Object(String arg) { return new Object(); } - - public static MethodHandle getMH(Class c) { - try { - return lookup.findStatic(C.class, "m_" + c.getSimpleName(), methodType(c, String.class)); - } - catch (NoSuchMethodException | IllegalAccessException e) { - throw new RuntimeException(e); - } - } - } - - public static void main(String... args) { - Class[] t = { void.class, boolean.class, char.class, - byte.class, short.class, int.class, long.class, float.class, double.class, - String.class, Integer.class, Object.class }; - - for (int i = 0; i < t.length; i++) { - MethodHandle mh = C.getMH(t[i]); - for (int j = 0; j < t.length; j++) { - // TEMPORARY EXCEPTIONS - if (t[j] == void.class) continue; - if (t[i].isPrimitive() && t[j] == Object.class) continue; - if (t[i] == char.class && (t[j] == int.class || t[j] == long.class || t[j] == float.class || t[j] == double.class)) continue; - if (t[i] == byte.class && (t[j] == short.class || t[j] == int.class || t[j] == long.class || t[j] == float.class || t[j] == double.class)) continue; - if (t[i] == short.class && (t[j] == int.class || t[j] == long.class || t[j] == float.class || t[j] == double.class)) continue; - if (t[i] == int.class && (t[j] == long.class || t[j] == float.class || t[j] == double.class)) continue; - if (t[i] == long.class && (t[j] == float.class || t[j] == double.class)) continue; - if (t[i] == float.class && t[j] == double.class) continue; - if (t[i] == int.class && t[j] == Integer.class) continue; - if (t[i] == Integer.class && (t[j] == int.class || t[j] == long.class || t[j] == float.class || t[j] == double.class)) continue; - // END TEMPORARY EXCEPTIONS - boolean correct = (t[i].isPrimitive() || t[j].isPrimitive()) - ? t[i] == t[j] - : t[j].isAssignableFrom(t[i]); - MethodType mti = methodType(t[i], String.class); - MethodType mtiCS = methodType(t[i], CharSequence.class); - MethodType mtj = methodType(t[j], String.class); - MethodType mtjObj = methodType(t[j], Object.class); - test(correct, mh, mti, mtj); - testBridge(correct, mh, mti, mti, mtjObj); - testBridge(correct, mh, mti, mti, mtiCS, mtjObj); - } - } - } - - static void test(boolean correct, MethodHandle mh, MethodType instMT, MethodType samMT) { - tryMetafactory(correct, mh, new Class[]{}, instMT, samMT); - tryAltMetafactory(correct, mh, new Class[]{}, instMT, samMT); - } - - static void testBridge(boolean correct, MethodHandle mh, MethodType instMT, MethodType samMT, MethodType... bridgeMTs) { - tryAltMetafactory(correct, mh, new Class[]{}, instMT, samMT, bridgeMTs); - } - - static void tryMetafactory(boolean correct, MethodHandle mh, Class[] captured, - MethodType instMT, MethodType samMT) { - try { - LambdaMetafactory.metafactory(lookup, "run", methodType(I.class, captured), - samMT, mh, instMT); - if (!correct) { - throw new AssertionError("Uncaught linkage error:" + - " impl=" + mh + - ", captured=" + Arrays.toString(captured) + - ", inst=" + instMT + - ", sam=" + samMT); - } - } - catch (LambdaConversionException e) { - if (correct) { - throw new AssertionError("Unexpected linkage error:" + - " e=" + e + - ", impl=" + mh + - ", captured=" + Arrays.toString(captured) + - ", inst=" + instMT + - ", sam=" + samMT); - } - } - } - - static void tryAltMetafactory(boolean correct, MethodHandle mh, Class[] captured, - MethodType instMT, MethodType samMT, MethodType... bridgeMTs) { - boolean bridge = bridgeMTs.length > 0; - Object[] args = new Object[bridge ? 5+bridgeMTs.length : 4]; - args[0] = samMT; - args[1] = mh; - args[2] = instMT; - args[3] = bridge ? LambdaMetafactory.FLAG_BRIDGES : 0; - if (bridge) { - args[4] = bridgeMTs.length; - for (int i = 0; i < bridgeMTs.length; i++) args[5+i] = bridgeMTs[i]; - } - try { - LambdaMetafactory.altMetafactory(lookup, "run", methodType(I.class, captured), args); - if (!correct) { - throw new AssertionError("Uncaught linkage error:" + - " impl=" + mh + - ", captured=" + Arrays.toString(captured) + - ", inst=" + instMT + - ", sam=" + samMT + - ", bridges=" + Arrays.toString(bridgeMTs)); - } - } - catch (LambdaConversionException e) { - if (correct) { - throw new AssertionError("Unexpected linkage error:" + - " e=" + e + - ", impl=" + mh + - ", captured=" + Arrays.toString(captured) + - ", inst=" + instMT + - ", sam=" + samMT + - ", bridges=" + Arrays.toString(bridgeMTs)); - } - } - } - -} From ff277c8508b395d72c9717f0b1db1947a3e1111e Mon Sep 17 00:00:00 2001 From: Anthony Scarpino Date: Wed, 8 Feb 2017 12:08:28 -0800 Subject: [PATCH 093/447] 8160655: Fix denyAfter and usage types for security properties Reviewed-by: mullan, xuelei --- .../classes/sun/security/pkcs/SignerInfo.java | 27 +- .../provider/certpath/AlgorithmChecker.java | 240 +++++++--------- .../certpath/DistributionPointFetcher.java | 32 ++- .../sun/security/provider/certpath/OCSP.java | 67 ++--- .../provider/certpath/OCSPResponse.java | 11 +- .../sun/security/provider/certpath/PKIX.java | 12 +- .../certpath/PKIXCertPathValidator.java | 7 +- ...eters.java => PKIXExtendedParameters.java} | 18 +- .../provider/certpath/RevocationChecker.java | 10 +- .../provider/certpath/SunCertPathBuilder.java | 4 +- .../sun/security/ssl/SSLContextImpl.java | 13 +- .../sun/security/ssl/X509KeyManagerImpl.java | 18 +- .../util/CertConstraintParameters.java | 76 ----- .../security/util/ConstraintsParameters.java | 135 +++++++++ .../util/DisabledAlgorithmConstraints.java | 262 +++++++++++------- .../security/util/SignatureFileVerifier.java | 213 ++++++++++++-- .../sun/security/validator/PKIXValidator.java | 11 +- .../security/validator/SimpleValidator.java | 8 +- .../share/conf/security/java.security | 28 +- .../tools/jarsigner/TimestampCheck.java | 2 +- 20 files changed, 738 insertions(+), 456 deletions(-) rename jdk/src/java.base/share/classes/sun/security/provider/certpath/{PKIXTimestampParameters.java => PKIXExtendedParameters.java} (91%) delete mode 100644 jdk/src/java.base/share/classes/sun/security/util/CertConstraintParameters.java create mode 100644 jdk/src/java.base/share/classes/sun/security/util/ConstraintsParameters.java diff --git a/jdk/src/java.base/share/classes/sun/security/pkcs/SignerInfo.java b/jdk/src/java.base/share/classes/sun/security/pkcs/SignerInfo.java index ed69ba3d8b9..6efd90d0670 100644 --- a/jdk/src/java.base/share/classes/sun/security/pkcs/SignerInfo.java +++ b/jdk/src/java.base/share/classes/sun/security/pkcs/SignerInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,6 +37,7 @@ import java.security.PublicKey; import java.security.Signature; import java.security.SignatureException; import java.security.Timestamp; +import java.security.cert.CertPathValidatorException; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.CertPath; @@ -48,6 +49,7 @@ import java.util.EnumSet; import java.util.Set; import sun.security.timestamp.TimestampToken; +import sun.security.util.ConstraintsParameters; import sun.security.util.Debug; import sun.security.util.DerEncoder; import sun.security.util.DerInputStream; @@ -321,6 +323,8 @@ public class SignerInfo implements DerEncoder { data = content.getContentBytes(); } + ConstraintsParameters cparams = + new ConstraintsParameters(timestamp); String digestAlgname = getDigestAlgorithmId().getName(); byte[] dataSigned; @@ -347,11 +351,11 @@ public class SignerInfo implements DerEncoder { if (messageDigest == null) // fail if there is no message digest return null; - // check that algorithm is not restricted - if (!JAR_DISABLED_CHECK.permits(DIGEST_PRIMITIVE_SET, - digestAlgname, null)) { - throw new SignatureException("Digest check failed. " + - "Disabled algorithm used: " + digestAlgname); + // check that digest algorithm is not restricted + try { + JAR_DISABLED_CHECK.permits(digestAlgname, cparams); + } catch (CertPathValidatorException e) { + throw new SignatureException(e.getMessage(), e); } MessageDigest md = MessageDigest.getInstance(digestAlgname); @@ -385,17 +389,18 @@ public class SignerInfo implements DerEncoder { String algname = AlgorithmId.makeSigAlg( digestAlgname, encryptionAlgname); - // check that algorithm is not restricted - if (!JAR_DISABLED_CHECK.permits(SIG_PRIMITIVE_SET, algname, null)) { - throw new SignatureException("Signature check failed. " + - "Disabled algorithm used: " + algname); + // check that jar signature algorithm is not restricted + try { + JAR_DISABLED_CHECK.permits(algname, cparams); + } catch (CertPathValidatorException e) { + throw new SignatureException(e.getMessage(), e); } X509Certificate cert = getCertificate(block); - PublicKey key = cert.getPublicKey(); if (cert == null) { return null; } + PublicKey key = cert.getPublicKey(); // check if the public key is restricted if (!JAR_DISABLED_CHECK.permits(SIG_PRIMITIVE_SET, key)) { diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/AlgorithmChecker.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/AlgorithmChecker.java index 90559598aee..a12484d0e20 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/AlgorithmChecker.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/AlgorithmChecker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,6 +28,7 @@ package sun.security.provider.certpath; import java.security.AlgorithmConstraints; import java.security.CryptoPrimitive; import java.security.Timestamp; +import java.security.cert.CertPathValidator; import java.util.Collection; import java.util.Collections; import java.util.Date; @@ -53,9 +54,10 @@ import java.security.interfaces.DSAPublicKey; import java.security.spec.DSAPublicKeySpec; import sun.security.util.AnchorCertificates; -import sun.security.util.CertConstraintParameters; +import sun.security.util.ConstraintsParameters; import sun.security.util.Debug; import sun.security.util.DisabledAlgorithmConstraints; +import sun.security.validator.Validator; import sun.security.x509.X509CertImpl; import sun.security.x509.X509CRLImpl; import sun.security.x509.AlgorithmId; @@ -79,6 +81,7 @@ public final class AlgorithmChecker extends PKIXCertPathChecker { private final Date pkixdate; private PublicKey prevPubKey; private final Timestamp jarTimestamp; + private final String variant; private static final Set SIGNATURE_PRIMITIVE_SET = Collections.unmodifiableSet(EnumSet.of(CryptoPrimitive.SIGNATURE)); @@ -109,64 +112,36 @@ public final class AlgorithmChecker extends PKIXCertPathChecker { * * @param anchor the trust anchor selected to validate the target * certificate + * @param variant is the Validator variants of the operation. A null value + * passed will set it to Validator.GENERIC. */ - public AlgorithmChecker(TrustAnchor anchor) { - this(anchor, certPathDefaultConstraints, null); - } - - /** - * Create a new {@code AlgorithmChecker} with the - * given {@code TrustAnchor} and {@code AlgorithmConstraints}. - * - * @param anchor the trust anchor selected to validate the target - * certificate - * @param constraints the algorithm constraints (or null) - * - * @throws IllegalArgumentException if the {@code anchor} is null - */ - public AlgorithmChecker(TrustAnchor anchor, - AlgorithmConstraints constraints) { - this(anchor, constraints, null); - } - - /** - * Create a new {@code AlgorithmChecker} with the - * given {@code AlgorithmConstraints}. - *

      - * Note that this constructor will be used to check a certification - * path where the trust anchor is unknown, or a certificate list which may - * contain the trust anchor. This constructor is used by SunJSSE. - * - * @param constraints the algorithm constraints (or null) - */ - public AlgorithmChecker(AlgorithmConstraints constraints) { - this.prevPubKey = null; - this.trustedPubKey = null; - this.constraints = constraints; - this.pkixdate = null; - this.jarTimestamp = null; + public AlgorithmChecker(TrustAnchor anchor, String variant) { + this(anchor, certPathDefaultConstraints, null, variant); } /** * Create a new {@code AlgorithmChecker} with the given - * {@code Timestamp}. + * {@code AlgorithmConstraints}, {@code Timestamp}, and/or {@code Variant}. *

      - * Note that this constructor will be used to check a certification - * path for signed JAR files that are timestamped. + * Note that this constructor can initialize a variation of situations where + * the AlgorithmConstraints, Timestamp, or Variant maybe known. * + * @param constraints the algorithm constraints (or null) * @param jarTimestamp Timestamp passed for JAR timestamp constraint * checking. Set to null if not applicable. + * @param variant is the Validator variants of the operation. A null value + * passed will set it to Validator.GENERIC. */ - public AlgorithmChecker(Timestamp jarTimestamp) { + public AlgorithmChecker(AlgorithmConstraints constraints, + Timestamp jarTimestamp, String variant) { this.prevPubKey = null; this.trustedPubKey = null; - this.constraints = certPathDefaultConstraints; - if (jarTimestamp == null) { - throw new IllegalArgumentException( - "Timestamp cannot be null"); - } - this.pkixdate = jarTimestamp.getTimestamp(); + this.constraints = (constraints == null ? certPathDefaultConstraints : + constraints); + this.pkixdate = (jarTimestamp != null ? jarTimestamp.getTimestamp() : + null); this.jarTimestamp = jarTimestamp; + this.variant = (variant == null ? Validator.VAR_GENERIC : variant); } /** @@ -178,12 +153,13 @@ public final class AlgorithmChecker extends PKIXCertPathChecker { * @param constraints the algorithm constraints (or null) * @param pkixdate Date the constraints are checked against. The value is * either the PKIXParameter date or null for the current date. + * @param variant is the Validator variants of the operation. A null value + * passed will set it to Validator.GENERIC. * * @throws IllegalArgumentException if the {@code anchor} is null */ public AlgorithmChecker(TrustAnchor anchor, - AlgorithmConstraints constraints, - Date pkixdate) { + AlgorithmConstraints constraints, Date pkixdate, String variant) { if (anchor != null) { if (anchor.getTrustedCert() != null) { @@ -207,6 +183,7 @@ public final class AlgorithmChecker extends PKIXCertPathChecker { this.constraints = constraints; this.pkixdate = pkixdate; this.jarTimestamp = null; + this.variant = (variant == null ? Validator.VAR_GENERIC : variant); } /** @@ -217,11 +194,13 @@ public final class AlgorithmChecker extends PKIXCertPathChecker { * certificate * @param pkixdate Date the constraints are checked against. The value is * either the PKIXParameter date or null for the current date. + * @param variant is the Validator variants of the operation. A null value + * passed will set it to Validator.GENERIC. * * @throws IllegalArgumentException if the {@code anchor} is null */ - public AlgorithmChecker(TrustAnchor anchor, Date pkixdate) { - this(anchor, certPathDefaultConstraints, pkixdate); + public AlgorithmChecker(TrustAnchor anchor, Date pkixdate, String variant) { + this(anchor, certPathDefaultConstraints, pkixdate, variant); } // Check this 'cert' for restrictions in the AnchorCertificates @@ -286,6 +265,28 @@ public final class AlgorithmChecker extends PKIXCertPathChecker { null, null, -1, PKIXReason.INVALID_KEY_USAGE); } + X509CertImpl x509Cert; + AlgorithmId algorithmId; + try { + x509Cert = X509CertImpl.toImpl((X509Certificate)cert); + algorithmId = (AlgorithmId)x509Cert.get(X509CertImpl.SIG_ALG); + } catch (CertificateException ce) { + throw new CertPathValidatorException(ce); + } + + AlgorithmParameters currSigAlgParams = algorithmId.getParameters(); + PublicKey currPubKey = cert.getPublicKey(); + String currSigAlg = x509Cert.getSigAlgName(); + + // Check the signature algorithm and parameters against constraints. + if (!constraints.permits(SIGNATURE_PRIMITIVE_SET, currSigAlg, + currSigAlgParams)) { + throw new CertPathValidatorException( + "Algorithm constraints check failed on signature " + + "algorithm: " + currSigAlg, null, null, -1, + BasicReason.ALGORITHM_CONSTRAINED); + } + // Assume all key usage bits are set if key usage is not present Set primitives = KU_PRIMITIVE_SET; @@ -322,101 +323,74 @@ public final class AlgorithmChecker extends PKIXCertPathChecker { } } - PublicKey currPubKey = cert.getPublicKey(); + ConstraintsParameters cp = + new ConstraintsParameters((X509Certificate)cert, + trustedMatch, pkixdate, jarTimestamp, variant); + // Check against local constraints if it is DisabledAlgorithmConstraints if (constraints instanceof DisabledAlgorithmConstraints) { - // Check against DisabledAlgorithmConstraints certpath constraints. - // permits() will throw exception on failure. - ((DisabledAlgorithmConstraints)constraints).permits(primitives, - new CertConstraintParameters((X509Certificate)cert, - trustedMatch, pkixdate, jarTimestamp)); - // If there is no previous key, set one and exit - if (prevPubKey == null) { - prevPubKey = currPubKey; - return; - } - } - - X509CertImpl x509Cert; - AlgorithmId algorithmId; - try { - x509Cert = X509CertImpl.toImpl((X509Certificate)cert); - algorithmId = (AlgorithmId)x509Cert.get(X509CertImpl.SIG_ALG); - } catch (CertificateException ce) { - throw new CertPathValidatorException(ce); - } - - AlgorithmParameters currSigAlgParams = algorithmId.getParameters(); - String currSigAlg = x509Cert.getSigAlgName(); - - // If 'constraints' is not of DisabledAlgorithmConstraints, check all - // everything individually - if (!(constraints instanceof DisabledAlgorithmConstraints)) { - // Check the current signature algorithm - if (!constraints.permits( - SIGNATURE_PRIMITIVE_SET, - currSigAlg, currSigAlgParams)) { - throw new CertPathValidatorException( - "Algorithm constraints check failed on signature " + - "algorithm: " + currSigAlg, null, null, -1, - BasicReason.ALGORITHM_CONSTRAINED); - } + ((DisabledAlgorithmConstraints)constraints).permits(currSigAlg, cp); + // DisabledAlgorithmsConstraints does not check primitives, so key + // additional key check. + } else { + // Perform the default constraints checking anyway. + certPathDefaultConstraints.permits(currSigAlg, cp); + // Call locally set constraints to check key with primitives. if (!constraints.permits(primitives, currPubKey)) { throw new CertPathValidatorException( - "Algorithm constraints check failed on keysize: " + - sun.security.util.KeyUtil.getKeySize(currPubKey), + "Algorithm constraints check failed on key " + + currPubKey.getAlgorithm() + " with size of " + + sun.security.util.KeyUtil.getKeySize(currPubKey) + + "bits", null, null, -1, BasicReason.ALGORITHM_CONSTRAINED); } } + // If there is no previous key, set one and exit + if (prevPubKey == null) { + prevPubKey = currPubKey; + return; + } + // Check with previous cert for signature algorithm and public key - if (prevPubKey != null) { - if (!constraints.permits( - SIGNATURE_PRIMITIVE_SET, - currSigAlg, prevPubKey, currSigAlgParams)) { - throw new CertPathValidatorException( + if (!constraints.permits( + SIGNATURE_PRIMITIVE_SET, + currSigAlg, prevPubKey, currSigAlgParams)) { + throw new CertPathValidatorException( "Algorithm constraints check failed on " + "signature algorithm: " + currSigAlg, null, null, -1, BasicReason.ALGORITHM_CONSTRAINED); + } + + // Inherit key parameters from previous key + if (PKIX.isDSAPublicKeyWithoutParams(currPubKey)) { + // Inherit DSA parameters from previous key + if (!(prevPubKey instanceof DSAPublicKey)) { + throw new CertPathValidatorException("Input key is not " + + "of a appropriate type for inheriting parameters"); } - // Inherit key parameters from previous key - if (PKIX.isDSAPublicKeyWithoutParams(currPubKey)) { - // Inherit DSA parameters from previous key - if (!(prevPubKey instanceof DSAPublicKey)) { - throw new CertPathValidatorException("Input key is not " + - "of a appropriate type for inheriting parameters"); - } - - DSAParams params = ((DSAPublicKey)prevPubKey).getParams(); - if (params == null) { - throw new CertPathValidatorException( + DSAParams params = ((DSAPublicKey)prevPubKey).getParams(); + if (params == null) { + throw new CertPathValidatorException( "Key parameters missing from public key."); - } + } - try { - BigInteger y = ((DSAPublicKey)currPubKey).getY(); - KeyFactory kf = KeyFactory.getInstance("DSA"); - DSAPublicKeySpec ks = new DSAPublicKeySpec(y, - params.getP(), - params.getQ(), - params.getG()); - currPubKey = kf.generatePublic(ks); - } catch (GeneralSecurityException e) { - throw new CertPathValidatorException("Unable to generate " + + try { + BigInteger y = ((DSAPublicKey)currPubKey).getY(); + KeyFactory kf = KeyFactory.getInstance("DSA"); + DSAPublicKeySpec ks = new DSAPublicKeySpec(y, params.getP(), + params.getQ(), params.getG()); + currPubKey = kf.generatePublic(ks); + } catch (GeneralSecurityException e) { + throw new CertPathValidatorException("Unable to generate " + "key with inherited parameters: " + e.getMessage(), e); - } } } // reset the previous public key prevPubKey = currPubKey; - - // check the extended key usage, ignore the check now - // List extendedKeyUsages = x509Cert.getExtendedKeyUsage(); - - // DO NOT remove any unresolved critical extensions } /** @@ -456,8 +430,10 @@ public final class AlgorithmChecker extends PKIXCertPathChecker { * * @param key the public key to verify the CRL signature * @param crl the target CRL + * @param variant is the Validator variants of the operation. A null value + * passed will set it to Validator.GENERIC. */ - static void check(PublicKey key, X509CRL crl) + static void check(PublicKey key, X509CRL crl, String variant) throws CertPathValidatorException { X509CRLImpl x509CRLImpl = null; @@ -468,7 +444,7 @@ public final class AlgorithmChecker extends PKIXCertPathChecker { } AlgorithmId algorithmId = x509CRLImpl.getSigAlgId(); - check(key, algorithmId); + check(key, algorithmId, variant); } /** @@ -476,20 +452,16 @@ public final class AlgorithmChecker extends PKIXCertPathChecker { * * @param key the public key to verify the CRL signature * @param algorithmId signature algorithm Algorithm ID + * @param variant is the Validator variants of the operation. A null value + * passed will set it to Validator.GENERIC. */ - static void check(PublicKey key, AlgorithmId algorithmId) + static void check(PublicKey key, AlgorithmId algorithmId, String variant) throws CertPathValidatorException { String sigAlgName = algorithmId.getName(); AlgorithmParameters sigAlgParams = algorithmId.getParameters(); - if (!certPathDefaultConstraints.permits( - SIGNATURE_PRIMITIVE_SET, sigAlgName, key, sigAlgParams)) { - throw new CertPathValidatorException( - "Algorithm constraints check failed on signature algorithm: " + - sigAlgName + " is disabled", - null, null, -1, BasicReason.ALGORITHM_CONSTRAINED); - } + certPathDefaultConstraints.permits(new ConstraintsParameters( + sigAlgName, sigAlgParams, key, variant)); } - } diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java index 95ef350a9d3..0f16c646a9c 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,6 +33,7 @@ import javax.security.auth.x500.X500Principal; import java.util.*; import sun.security.util.Debug; +import sun.security.validator.Validator; import static sun.security.x509.PKIXExtensions.*; import sun.security.x509.*; @@ -65,6 +66,20 @@ public class DistributionPointFetcher { * Return the X509CRLs matching this selector. The selector must be * an X509CRLSelector with certificateChecking set. */ + public static Collection getCRLs(X509CRLSelector selector, + boolean signFlag, PublicKey prevKey, String provider, + List certStores, boolean[] reasonsMask, + Set trustAnchors, Date validity, String variant) + throws CertStoreException + { + return getCRLs(selector, signFlag, prevKey, null, provider, certStores, + reasonsMask, trustAnchors, validity, variant); + } + /** + * Return the X509CRLs matching this selector. The selector must be + * an X509CRLSelector with certificateChecking set. + */ + // Called by com.sun.deploy.security.RevocationChecker public static Collection getCRLs(X509CRLSelector selector, boolean signFlag, PublicKey prevKey, @@ -76,7 +91,7 @@ public class DistributionPointFetcher { throws CertStoreException { return getCRLs(selector, signFlag, prevKey, null, provider, certStores, - reasonsMask, trustAnchors, validity); + reasonsMask, trustAnchors, validity, Validator.VAR_GENERIC); } /** @@ -91,7 +106,8 @@ public class DistributionPointFetcher { List certStores, boolean[] reasonsMask, Set trustAnchors, - Date validity) + Date validity, + String variant) throws CertStoreException { X509Certificate cert = selector.getCertificateChecking(); @@ -120,7 +136,7 @@ public class DistributionPointFetcher { DistributionPoint point = t.next(); Collection crls = getCRLs(selector, certImpl, point, reasonsMask, signFlag, prevKey, prevCert, provider, - certStores, trustAnchors, validity); + certStores, trustAnchors, validity, variant); results.addAll(crls); } if (debug != null) { @@ -145,7 +161,7 @@ public class DistributionPointFetcher { X509CertImpl certImpl, DistributionPoint point, boolean[] reasonsMask, boolean signFlag, PublicKey prevKey, X509Certificate prevCert, String provider, List certStores, - Set trustAnchors, Date validity) + Set trustAnchors, Date validity, String variant) throws CertStoreException { // check for full name @@ -208,7 +224,7 @@ public class DistributionPointFetcher { selector.setIssuerNames(null); if (selector.match(crl) && verifyCRL(certImpl, point, crl, reasonsMask, signFlag, prevKey, prevCert, provider, - trustAnchors, certStores, validity)) { + trustAnchors, certStores, validity, variant)) { crls.add(crl); } } catch (IOException | CRLException e) { @@ -316,7 +332,7 @@ public class DistributionPointFetcher { X509CRL crl, boolean[] reasonsMask, boolean signFlag, PublicKey prevKey, X509Certificate prevCert, String provider, Set trustAnchors, List certStores, - Date validity) throws CRLException, IOException { + Date validity, String variant) throws CRLException, IOException { if (debug != null) { debug.println("DistributionPointFetcher.verifyCRL: " + @@ -663,7 +679,7 @@ public class DistributionPointFetcher { // check the crl signature algorithm try { - AlgorithmChecker.check(prevKey, crl); + AlgorithmChecker.check(prevKey, crl, variant); } catch (CertPathValidatorException cpve) { if (debug != null) { debug.println("CRL signature algorithm check failed: " + cpve); diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSP.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSP.java index 8753072e9d0..dce73028cd0 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSP.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSP.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -45,6 +45,7 @@ import java.util.Map; import sun.security.action.GetIntegerAction; import sun.security.util.Debug; +import sun.security.validator.Validator; import sun.security.x509.AccessDescription; import sun.security.x509.AuthorityInfoAccessExtension; import sun.security.x509.GeneralName; @@ -94,42 +95,6 @@ public final class OCSP { private OCSP() {} - /** - * Obtains the revocation status of a certificate using OCSP using the most - * common defaults. The OCSP responder URI is retrieved from the - * certificate's AIA extension. The OCSP responder certificate is assumed - * to be the issuer's certificate (or issued by the issuer CA). - * - * @param cert the certificate to be checked - * @param issuerCert the issuer certificate - * @return the RevocationStatus - * @throws IOException if there is an exception connecting to or - * communicating with the OCSP responder - * @throws CertPathValidatorException if an exception occurs while - * encoding the OCSP Request or validating the OCSP Response - */ - public static RevocationStatus check(X509Certificate cert, - X509Certificate issuerCert) - throws IOException, CertPathValidatorException { - CertId certId = null; - URI responderURI = null; - try { - X509CertImpl certImpl = X509CertImpl.toImpl(cert); - responderURI = getResponderURI(certImpl); - if (responderURI == null) { - throw new CertPathValidatorException - ("No OCSP Responder URI in certificate"); - } - certId = new CertId(issuerCert, certImpl.getSerialNumberObject()); - } catch (CertificateException | IOException e) { - throw new CertPathValidatorException - ("Exception while encoding OCSPRequest", e); - } - OCSPResponse ocspResponse = check(Collections.singletonList(certId), - responderURI, new OCSPResponse.IssuerInfo(issuerCert), null, null, - Collections.emptyList()); - return (RevocationStatus)ocspResponse.getSingleResponse(certId); - } /** * Obtains the revocation status of a certificate using OCSP. @@ -146,6 +111,8 @@ public final class OCSP { * @throws CertPathValidatorException if an exception occurs while * encoding the OCSP Request or validating the OCSP Response */ + + // Called by com.sun.deploy.security.TrustDecider public static RevocationStatus check(X509Certificate cert, X509Certificate issuerCert, URI responderURI, @@ -154,27 +121,27 @@ public final class OCSP { throws IOException, CertPathValidatorException { return check(cert, issuerCert, responderURI, responderCert, date, - Collections.emptyList()); + Collections.emptyList(), Validator.VAR_GENERIC); } - // Called by com.sun.deploy.security.TrustDecider + public static RevocationStatus check(X509Certificate cert, - X509Certificate issuerCert, - URI responderURI, - X509Certificate responderCert, - Date date, List extensions) + X509Certificate issuerCert, URI responderURI, + X509Certificate responderCert, Date date, List extensions, + String variant) throws IOException, CertPathValidatorException { - return check(cert, responderURI, null, issuerCert, responderCert, date, extensions); + return check(cert, responderURI, null, issuerCert, responderCert, date, + extensions, variant); } public static RevocationStatus check(X509Certificate cert, URI responderURI, TrustAnchor anchor, X509Certificate issuerCert, X509Certificate responderCert, Date date, - List extensions) + List extensions, String variant) throws IOException, CertPathValidatorException { - CertId certId = null; + CertId certId; try { X509CertImpl certImpl = X509CertImpl.toImpl(cert); certId = new CertId(issuerCert, certImpl.getSerialNumberObject()); @@ -184,7 +151,7 @@ public final class OCSP { } OCSPResponse ocspResponse = check(Collections.singletonList(certId), responderURI, new OCSPResponse.IssuerInfo(anchor, issuerCert), - responderCert, date, extensions); + responderCert, date, extensions, variant); return (RevocationStatus) ocspResponse.getSingleResponse(certId); } @@ -206,10 +173,10 @@ public final class OCSP { * @throws CertPathValidatorException if an exception occurs while * encoding the OCSP Request or validating the OCSP Response */ - static OCSPResponse check(List certIds, URI responderURI, + static OCSPResponse check(List certIds, URI responderURI, OCSPResponse.IssuerInfo issuerInfo, X509Certificate responderCert, Date date, - List extensions) + List extensions, String variant) throws IOException, CertPathValidatorException { byte[] nonce = null; @@ -226,7 +193,7 @@ public final class OCSP { // verify the response ocspResponse.verify(certIds, issuerInfo, responderCert, date, - nonce); + nonce, variant); } catch (IOException ioe) { throw new CertPathValidatorException( "Unable to determine revocation status due to network error", diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java index d1770da153a..11f1b0996db 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,7 +41,6 @@ import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Set; import javax.security.auth.x500.X500Principal; @@ -375,7 +374,8 @@ public final class OCSPResponse { } void verify(List certIds, IssuerInfo issuerInfo, - X509Certificate responderCert, Date date, byte[] nonce) + X509Certificate responderCert, Date date, byte[] nonce, + String variant) throws CertPathValidatorException { switch (responseStatus) { @@ -508,7 +508,8 @@ public final class OCSPResponse { // Check algorithm constraints specified in security property // "jdk.certpath.disabledAlgorithms". AlgorithmChecker algChecker = - new AlgorithmChecker(issuerInfo.getAnchor(), date); + new AlgorithmChecker(issuerInfo.getAnchor(), date, + variant); algChecker.init(false); algChecker.check(signerCert, Collections.emptySet()); @@ -568,7 +569,7 @@ public final class OCSPResponse { if (signerCert != null) { // Check algorithm constraints specified in security property // "jdk.certpath.disabledAlgorithms". - AlgorithmChecker.check(signerCert.getPublicKey(), sigAlgId); + AlgorithmChecker.check(signerCert.getPublicKey(), sigAlgId, variant); if (!verifySignature(signerCert)) { throw new CertPathValidatorException( diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIX.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIX.java index f6b0b2ed6f3..8a177c04fc1 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIX.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIX.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -87,6 +87,7 @@ class PKIX { private Set anchors; private List certs; private Timestamp timestamp; + private String variant; ValidatorParams(CertPath cp, PKIXParameters params) throws InvalidAlgorithmParameterException @@ -102,8 +103,9 @@ class PKIX { ValidatorParams(PKIXParameters params) throws InvalidAlgorithmParameterException { - if (params instanceof PKIXTimestampParameters) { - timestamp = ((PKIXTimestampParameters) params).getTimestamp(); + if (params instanceof PKIXExtendedParameters) { + timestamp = ((PKIXExtendedParameters) params).getTimestamp(); + variant = ((PKIXExtendedParameters) params).getVariant(); } this.anchors = params.getTrustAnchors(); @@ -199,6 +201,10 @@ class PKIX { Timestamp timestamp() { return timestamp; } + + String variant() { + return variant; + } } static class BuilderParams extends ValidatorParams { diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java index ac12fab75ab..b8e20e832f1 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -173,9 +173,10 @@ public final class PKIXCertPathValidator extends CertPathValidatorSpi { // add standard checkers that we will be using certPathCheckers.add(untrustedChecker); if (params.timestamp() == null) { - certPathCheckers.add(new AlgorithmChecker(anchor, params.date())); + certPathCheckers.add(new AlgorithmChecker(anchor, params.date(), null)); } else { - certPathCheckers.add(new AlgorithmChecker(params.timestamp())); + certPathCheckers.add(new AlgorithmChecker(null, + params.timestamp(), params.variant())); } certPathCheckers.add(new KeyChecker(certPathLen, params.targetCertConstraints())); diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXTimestampParameters.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXExtendedParameters.java similarity index 91% rename from jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXTimestampParameters.java rename to jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXExtendedParameters.java index 34b497188e0..42c2d1f9c4f 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXTimestampParameters.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXExtendedParameters.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,19 +39,23 @@ import java.util.Set; /** * This class is a wrapper for PKIXBuilderParameters so that a Timestamp object - * can be passed alone when PKIXCertPath is checking signed jar files. + * and a string for the variant type, can be passed when doing certpath + * checking. */ -public class PKIXTimestampParameters extends PKIXBuilderParameters { +public class PKIXExtendedParameters extends PKIXBuilderParameters { private final PKIXBuilderParameters p; private Timestamp jarTimestamp; + private final String variant; - public PKIXTimestampParameters(PKIXBuilderParameters params, - Timestamp timestamp) throws InvalidAlgorithmParameterException { + public PKIXExtendedParameters(PKIXBuilderParameters params, + Timestamp timestamp, String variant) + throws InvalidAlgorithmParameterException { super(params.getTrustAnchors(), null); p = params; jarTimestamp = timestamp; + this.variant = variant; } public Timestamp getTimestamp() { @@ -61,6 +65,10 @@ public class PKIXTimestampParameters extends PKIXBuilderParameters { jarTimestamp = t; } + public String getVariant() { + return variant; + } + @Override public void setDate(Date d) { p.setDate(d); diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java index 5fba1666119..9b443a733dd 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -579,7 +579,7 @@ class RevocationChecker extends PKIXRevocationChecker { approvedCRLs.addAll(DistributionPointFetcher.getCRLs( sel, signFlag, prevKey, prevCert, params.sigProvider(), certStores, - reasonsMask, anchors, null)); + reasonsMask, anchors, null, params.variant())); } } catch (CertStoreException e) { if (e instanceof CertStoreTypeException) { @@ -727,7 +727,7 @@ class RevocationChecker extends PKIXRevocationChecker { } } response.verify(Collections.singletonList(certId), issuerInfo, - responderCert, params.date(), nonce); + responderCert, params.date(), nonce, params.variant()); } else { URI responderURI = (this.responderURI != null) @@ -741,7 +741,7 @@ class RevocationChecker extends PKIXRevocationChecker { response = OCSP.check(Collections.singletonList(certId), responderURI, issuerInfo, responderCert, null, - ocspExtensions); + ocspExtensions, params.variant()); } } catch (IOException e) { throw new CertPathValidatorException( @@ -853,7 +853,7 @@ class RevocationChecker extends PKIXRevocationChecker { if (DistributionPointFetcher.verifyCRL( certImpl, point, crl, reasonsMask, signFlag, prevKey, null, params.sigProvider(), anchors, - certStores, params.date())) + certStores, params.date(), params.variant())) { results.add(crl); } diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/SunCertPathBuilder.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/SunCertPathBuilder.java index c0cc98a7a36..11d8a067329 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/SunCertPathBuilder.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/SunCertPathBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -344,7 +344,7 @@ public final class SunCertPathBuilder extends CertPathBuilderSpi { // add the algorithm checker checkers.add(new AlgorithmChecker(builder.trustAnchor, - buildParams.date())); + buildParams.date(), null)); BasicChecker basicChecker = null; if (nextState.keyParamsNeeded()) { diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java b/jdk/src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java index 46ae8d5281e..4f0a95ff80b 100644 --- a/jdk/src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java +++ b/jdk/src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,6 +37,7 @@ import javax.net.ssl.*; import sun.security.provider.certpath.AlgorithmChecker; import sun.security.action.GetPropertyAction; +import sun.security.validator.Validator; public abstract class SSLContextImpl extends SSLContextSpi { @@ -1436,7 +1437,7 @@ final class AbstractTrustManagerWrapper extends X509ExtendedTrustManager constraints = new SSLAlgorithmConstraints(sslSocket, true); } - checkAlgorithmConstraints(chain, constraints); + checkAlgorithmConstraints(chain, constraints, isClient); } } @@ -1478,12 +1479,12 @@ final class AbstractTrustManagerWrapper extends X509ExtendedTrustManager constraints = new SSLAlgorithmConstraints(engine, true); } - checkAlgorithmConstraints(chain, constraints); + checkAlgorithmConstraints(chain, constraints, isClient); } } private void checkAlgorithmConstraints(X509Certificate[] chain, - AlgorithmConstraints constraints) throws CertificateException { + AlgorithmConstraints constraints, boolean isClient) throws CertificateException { try { // Does the certificate chain end with a trusted certificate? @@ -1501,7 +1502,9 @@ final class AbstractTrustManagerWrapper extends X509ExtendedTrustManager // A forward checker, need to check from trust to target if (checkedLength >= 0) { - AlgorithmChecker checker = new AlgorithmChecker(constraints); + AlgorithmChecker checker = + new AlgorithmChecker(constraints, null, + (isClient ? Validator.VAR_TLS_CLIENT : Validator.VAR_TLS_SERVER)); checker.init(false); for (int i = checkedLength; i >= 0; i--) { Certificate cert = chain[i]; diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/X509KeyManagerImpl.java b/jdk/src/java.base/share/classes/sun/security/ssl/X509KeyManagerImpl.java index b6ed37cc5a3..954b90d15dd 100644 --- a/jdk/src/java.base/share/classes/sun/security/ssl/X509KeyManagerImpl.java +++ b/jdk/src/java.base/share/classes/sun/security/ssl/X509KeyManagerImpl.java @@ -39,6 +39,7 @@ import java.security.cert.Certificate; import javax.net.ssl.*; import sun.security.provider.certpath.AlgorithmChecker; +import sun.security.validator.Validator; /** * The new X509 key manager implementation. The main differences to the @@ -661,6 +662,15 @@ final class X509KeyManagerImpl extends X509ExtendedKeyManager return CheckResult.OK; } + + public String getValidator() { + if (this == CLIENT) { + return Validator.VAR_TLS_CLIENT; + } else if (this == SERVER) { + return Validator.VAR_TLS_SERVER; + } + return Validator.VAR_GENERIC; + } } // enum for the result of the extension check @@ -774,7 +784,8 @@ final class X509KeyManagerImpl extends X509ExtendedKeyManager // check the algorithm constraints if (constraints != null && - !conformsToAlgorithmConstraints(constraints, chain)) { + !conformsToAlgorithmConstraints(constraints, chain, + checkType.getValidator())) { if (useDebug) { debug.println("Ignoring alias " + alias + @@ -811,9 +822,10 @@ final class X509KeyManagerImpl extends X509ExtendedKeyManager } private static boolean conformsToAlgorithmConstraints( - AlgorithmConstraints constraints, Certificate[] chain) { + AlgorithmConstraints constraints, Certificate[] chain, + String variant) { - AlgorithmChecker checker = new AlgorithmChecker(constraints); + AlgorithmChecker checker = new AlgorithmChecker(constraints, null, variant); try { checker.init(false); } catch (CertPathValidatorException cpve) { diff --git a/jdk/src/java.base/share/classes/sun/security/util/CertConstraintParameters.java b/jdk/src/java.base/share/classes/sun/security/util/CertConstraintParameters.java deleted file mode 100644 index 23880f7c6aa..00000000000 --- a/jdk/src/java.base/share/classes/sun/security/util/CertConstraintParameters.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package sun.security.util; - -import java.security.Timestamp; -import java.security.cert.X509Certificate; -import java.util.Date; - -/** - * This class is a wrapper for keeping state and passing objects between PKIX, - * AlgorithmChecker, and DisabledAlgorithmConstraints. - */ -public class CertConstraintParameters { - // A certificate being passed to check against constraints. - private final X509Certificate cert; - // This is true if the trust anchor in the certificate chain matches a cert - // in AnchorCertificates - private final boolean trustedMatch; - // PKIXParameter date - private final Date pkixDate; - // Timestamp of the signed JAR file - private final Timestamp jarTimestamp; - - public CertConstraintParameters(X509Certificate c, boolean match, - Date pkixdate, Timestamp jarTime) { - cert = c; - trustedMatch = match; - pkixDate = pkixdate; - jarTimestamp = jarTime; - } - - public CertConstraintParameters(X509Certificate c) { - this(c, false, null, null); - } - - // Returns if the trust anchor has a match if anchor checking is enabled. - public boolean isTrustedMatch() { - return trustedMatch; - } - - public X509Certificate getCertificate() { - return cert; - } - - public Date getPKIXParamDate() { - return pkixDate; - } - - public Timestamp getJARTimestamp() { - return jarTimestamp; - } - -} diff --git a/jdk/src/java.base/share/classes/sun/security/util/ConstraintsParameters.java b/jdk/src/java.base/share/classes/sun/security/util/ConstraintsParameters.java new file mode 100644 index 00000000000..84318654557 --- /dev/null +++ b/jdk/src/java.base/share/classes/sun/security/util/ConstraintsParameters.java @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2016, 2017 Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package sun.security.util; + +import sun.security.validator.Validator; + +import java.security.AlgorithmParameters; +import java.security.Key; +import java.security.Timestamp; +import java.security.cert.X509Certificate; +import java.util.Date; + +/** + * This class contains parameters for checking against constraints that extend + * past the publicly available parameters in java.security.AlgorithmConstraints. + + * This is currently on passed between between PKIX, AlgorithmChecker, + * and DisabledAlgorithmConstraints. + */ +public class ConstraintsParameters { + /* + * The below 3 values are used the same as the permit() methods + * published in java.security.AlgorithmConstraints. + */ + // Algorithm string to be checked against constraints + private final String algorithm; + // AlgorithmParameters to the algorithm being checked + private final AlgorithmParameters algParams; + // Public Key being checked against constraints + private final Key publicKey; + + /* + * New values that are checked against constraints that the current public + * API does not support. + */ + // A certificate being passed to check against constraints. + private final X509Certificate cert; + // This is true if the trust anchor in the certificate chain matches a cert + // in AnchorCertificates + private final boolean trustedMatch; + // PKIXParameter date + private final Date pkixDate; + // Timestamp of the signed JAR file + private final Timestamp jarTimestamp; + private final String variant; + + public ConstraintsParameters(X509Certificate c, boolean match, + Date pkixdate, Timestamp jarTime, String variant) { + cert = c; + trustedMatch = match; + pkixDate = pkixdate; + jarTimestamp = jarTime; + this.variant = (variant == null ? Validator.VAR_GENERIC : variant); + algorithm = null; + algParams = null; + publicKey = null; + } + + public ConstraintsParameters(String algorithm, AlgorithmParameters params, + Key key, String variant) { + this.algorithm = algorithm; + algParams = params; + this.publicKey = key; + cert = null; + trustedMatch = false; + pkixDate = null; + jarTimestamp = null; + this.variant = (variant == null ? Validator.VAR_GENERIC : variant); + } + + + public ConstraintsParameters(X509Certificate c) { + this(c, false, null, null, + Validator.VAR_GENERIC); + } + + public ConstraintsParameters(Timestamp jarTime) { + this(null, false, null, jarTime, Validator.VAR_GENERIC); + } + + public String getAlgorithm() { + return algorithm; + } + + public AlgorithmParameters getAlgParams() { + return algParams; + } + + public Key getPublicKey() { + return publicKey; + } + // Returns if the trust anchor has a match if anchor checking is enabled. + public boolean isTrustedMatch() { + return trustedMatch; + } + + public X509Certificate getCertificate() { + return cert; + } + + public Date getPKIXParamDate() { + return pkixDate; + } + + public Timestamp getJARTimestamp() { + return jarTimestamp; + } + + public String getVariant() { + return variant; + } +} diff --git a/jdk/src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java b/jdk/src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java index 73914fe30ae..a8b4a6f0a40 100644 --- a/jdk/src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java +++ b/jdk/src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,8 @@ package sun.security.util; +import sun.security.validator.Validator; + import java.security.CryptoPrimitive; import java.security.AlgorithmParameters; import java.security.Key; @@ -32,10 +34,12 @@ import java.security.cert.CertPathValidatorException; import java.security.cert.CertPathValidatorException.BasicReason; import java.security.cert.X509Certificate; import java.text.SimpleDateFormat; +import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; @@ -100,12 +104,6 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { @Override public final boolean permits(Set primitives, String algorithm, AlgorithmParameters parameters) { - - if (primitives == null || primitives.isEmpty()) { - throw new IllegalArgumentException( - "No cryptographic primitive specified"); - } - return checkAlgorithm(disabledAlgorithms, algorithm, decomposer); } @@ -133,6 +131,18 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { return checkConstraints(primitives, algorithm, key, parameters); } + public final void permits(ConstraintsParameters cp) + throws CertPathValidatorException { + permits(cp.getAlgorithm(), cp); + } + + public final void permits(String algorithm, Key key, + AlgorithmParameters params, String variant) + throws CertPathValidatorException { + permits(algorithm, new ConstraintsParameters(algorithm, params, key, + (variant == null) ? Validator.VAR_GENERIC : variant)); + } + /* * Check if a x509Certificate object is permitted. Check if all * algorithms are allowed, certificate constraints, and the @@ -140,18 +150,10 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { * * Uses new style permit() which throws exceptions. */ - public final void permits(Set primitives, - CertConstraintParameters cp) throws CertPathValidatorException { - checkConstraints(primitives, cp); - } - /* - * Check if Certificate object is within the constraints. - * Uses new style permit() which throws exceptions. - */ - public final void permits(Set primitives, - X509Certificate cert) throws CertPathValidatorException { - checkConstraints(primitives, new CertConstraintParameters(cert)); + public final void permits(String algorithm, ConstraintsParameters cp) + throws CertPathValidatorException { + algorithmConstraints.permits(algorithm, cp); } // Check if a string is contained inside the property @@ -174,7 +176,7 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { throw new IllegalArgumentException("The key cannot be null"); } - // check the signature algorithm + // check the signature algorithm with parameters if (algorithm != null && algorithm.length() != 0) { if (!permits(primitives, algorithm, parameters)) { return false; @@ -190,36 +192,6 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { return algorithmConstraints.permits(key); } - /* - * Check algorithm constraints with Certificate - * Uses new style permit() which throws exceptions. - */ - private void checkConstraints(Set primitives, - CertConstraintParameters cp) throws CertPathValidatorException { - - X509Certificate cert = cp.getCertificate(); - String algorithm = cert.getSigAlgName(); - - // Check signature algorithm is not disabled - if (!permits(primitives, algorithm, null)) { - throw new CertPathValidatorException( - "Algorithm constraints check failed on disabled "+ - "signature algorithm: " + algorithm, - null, null, -1, BasicReason.ALGORITHM_CONSTRAINED); - } - - // Check key algorithm is not disabled - if (!permits(primitives, cert.getPublicKey().getAlgorithm(), null)) { - throw new CertPathValidatorException( - "Algorithm constraints check failed on disabled "+ - "public key algorithm: " + algorithm, - null, null, -1, BasicReason.ALGORITHM_CONSTRAINED); - } - - // Check the certificate and key constraints - algorithmConstraints.permits(cp); - - } /** * Key and Certificate Constraints @@ -234,13 +206,13 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { * 'true' means the operation is allowed. * 'false' means it failed the constraints and is disallowed. * - * When passing CertConstraintParameters through permit(), an exception + * When passing ConstraintsParameters through permit(), an exception * will be thrown on a failure to better identify why the operation was * disallowed. */ private static class Constraints { - private Map> constraintsMap = new HashMap<>(); + private Map> constraintsMap = new HashMap<>(); private static class Holder { private static final Pattern DENY_AFTER_PATTERN = Pattern.compile( @@ -260,23 +232,22 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { // Check if constraint is a complete disabling of an // algorithm or has conditions. - String algorithm; - String policy; int space = constraintEntry.indexOf(' '); - if (space > 0) { - algorithm = AlgorithmDecomposer.hashName( - constraintEntry.substring(0, space). - toUpperCase(Locale.ENGLISH)); - policy = constraintEntry.substring(space + 1); - } else { - algorithm = constraintEntry.toUpperCase(Locale.ENGLISH); - if (!constraintsMap.containsKey(algorithm)) { - constraintsMap.putIfAbsent(algorithm, - new HashSet<>()); - } + String algorithm = AlgorithmDecomposer.hashName( + ((space > 0 ? constraintEntry.substring(0, space) : + constraintEntry). + toUpperCase(Locale.ENGLISH))); + List constraintList = + constraintsMap.getOrDefault(algorithm, + new ArrayList<>(1)); + constraintsMap.putIfAbsent(algorithm, constraintList); + if (space <= 0) { + constraintList.add(new DisabledConstraint(algorithm)); continue; } + String policy = constraintEntry.substring(space + 1); + // Convert constraint conditions into Constraint classes Constraint c, lastConstraint = null; // Allow only one jdkCA entry per constraint entry @@ -315,7 +286,7 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { c = new jdkCAConstraint(algorithm); jdkCALimit = true; - } else if(entry.startsWith("denyAfter") && + } else if (entry.startsWith("denyAfter") && (matcher = Holder.DENY_AFTER_PATTERN.matcher(entry)) .matches()) { if (debug != null) { @@ -332,6 +303,12 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { c = new DenyAfterConstraint(algorithm, year, month, day); denyAfterLimit = true; + } else if (entry.startsWith("usage")) { + String s[] = (entry.substring(5)).trim().split(" "); + c = new UsageConstraint(algorithm, s); + if (debug != null) { + debug.println("Constraints usage length is " + s.length); + } } else { throw new IllegalArgumentException("Error in security" + " property. Constraint unknown: " + entry); @@ -340,11 +317,7 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { // Link multiple conditions for a single constraint // into a linked list. if (lastConstraint == null) { - if (!constraintsMap.containsKey(algorithm)) { - constraintsMap.putIfAbsent(algorithm, - new HashSet<>()); - } - constraintsMap.get(algorithm).add(c); + constraintList.add(c); } else { lastConstraint.nextConstraint = c; } @@ -354,17 +327,17 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { } // Get applicable constraints based off the signature algorithm - private Set getConstraints(String algorithm) { + private List getConstraints(String algorithm) { return constraintsMap.get(algorithm); } // Check if KeySizeConstraints permit the specified key public boolean permits(Key key) { - Set set = getConstraints(key.getAlgorithm()); - if (set == null) { + List list = getConstraints(key.getAlgorithm()); + if (list == null) { return true; } - for (Constraint constraint : set) { + for (Constraint constraint : list) { if (!constraint.permits(key)) { if (debug != null) { debug.println("keySizeConstraint: failed key " + @@ -377,31 +350,35 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { } // Check if constraints permit this cert. - public void permits(CertConstraintParameters cp) + public void permits(String algorithm, ConstraintsParameters cp) throws CertPathValidatorException { X509Certificate cert = cp.getCertificate(); if (debug != null) { - debug.println("Constraints.permits(): " + cert.getSigAlgName()); + debug.println("Constraints.permits(): " + algorithm + + " Variant: " + cp.getVariant()); } // Get all signature algorithms to check for constraints - Set algorithms = - AlgorithmDecomposer.decomposeOneHash(cert.getSigAlgName()); - if (algorithms == null || algorithms.isEmpty()) { - return; + Set algorithms = new HashSet<>(); + if (algorithm != null) { + algorithms.addAll(AlgorithmDecomposer.decomposeOneHash(algorithm)); } - // Attempt to add the public key algorithm to the set - algorithms.add(cert.getPublicKey().getAlgorithm()); - + // Attempt to add the public key algorithm if cert provided + if (cert != null) { + algorithms.add(cert.getPublicKey().getAlgorithm()); + } + if (cp.getPublicKey() != null) { + algorithms.add(cp.getPublicKey().getAlgorithm()); + } // Check all applicable constraints - for (String algorithm : algorithms) { - Set set = getConstraints(algorithm); - if (set == null) { + for (String alg : algorithms) { + List list = getConstraints(alg); + if (list == null) { continue; } - for (Constraint constraint : set) { + for (Constraint constraint : list) { constraint.permits(cp); } } @@ -467,17 +444,17 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { /** * Check if an algorithm constraint is permitted with a given - * CertConstraintParameters. + * ConstraintsParameters. * * If the check inside of {@code permits()} fails, it must call - * {@code next()} with the same {@code CertConstraintParameters} + * {@code next()} with the same {@code ConstraintsParameters} * parameter passed if multiple constraints need to be checked. * * @param cp CertConstraintParameter containing certificate info * @throws CertPathValidatorException if constraint disallows. * */ - public abstract void permits(CertConstraintParameters cp) + public abstract void permits(ConstraintsParameters cp) throws CertPathValidatorException; /** @@ -491,12 +468,12 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { * were disallowed, the last constraint will throw * {@code CertPathValidatorException}. * - * @param cp CertConstraintParameters + * @param cp ConstraintsParameters * @return 'true' if constraint allows the operation, 'false' if * we are at the end of the constraint list or, * {@code nextConstraint} is null. */ - boolean next(CertConstraintParameters cp) + boolean next(ConstraintsParameters cp) throws CertPathValidatorException { if (nextConstraint != null) { nextConstraint.permits(cp); @@ -525,6 +502,14 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { } return false; } + + String extendedMsg(ConstraintsParameters cp) { + return (cp.getCertificate() == null ? "." : + " used with certificate: " + + cp.getCertificate().getSubjectX500Principal() + + (cp.getVariant() != Validator.VAR_GENERIC ? + ". Usage was " + cp.getVariant() : ".")); + } } /* @@ -537,11 +522,11 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { } /* - * Check if CertConstraintParameters has a trusted match, if it does + * Check if ConstraintsParameters has a trusted match, if it does * call next() for any following constraints. If it does not, exit * as this constraint(s) does not restrict the operation. */ - public void permits(CertConstraintParameters cp) + public void permits(ConstraintsParameters cp) throws CertPathValidatorException { if (debug != null) { debug.println("jdkCAConstraints.permits(): " + algorithm); @@ -554,8 +539,7 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { } throw new CertPathValidatorException( "Algorithm constraints check failed on certificate " + - "anchor limits. " + algorithm + " used with " + - cp.getCertificate().getSubjectX500Principal(), + "anchor limits. " + algorithm + extendedMsg(cp), null, null, -1, BasicReason.ALGORITHM_CONSTRAINED); } } @@ -615,7 +599,7 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { * constraints. Throw an exception if this is the last constraint. */ @Override - public void permits(CertConstraintParameters cp) + public void permits(ConstraintsParameters cp) throws CertPathValidatorException { Date currentDate; String errmsg; @@ -628,7 +612,7 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { errmsg = "PKIXParameter date: "; } else { currentDate = new Date(); - errmsg = "Certificate date: "; + errmsg = "Current date: "; } if (!denyAfterDate.after(currentDate)) { @@ -637,9 +621,9 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { } throw new CertPathValidatorException( "denyAfter constraint check failed: " + algorithm + - " used with Constraint date: " + - dateFormat.format(denyAfterDate) + "; " - + errmsg + dateFormat.format(currentDate), + " used with Constraint date: " + + dateFormat.format(denyAfterDate) + "; " + errmsg + + dateFormat.format(currentDate) + extendedMsg(cp), null, null, -1, BasicReason.ALGORITHM_CONSTRAINED); } } @@ -660,6 +644,48 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { } } + /* + * The usage constraint is for the "usage" keyword. It checks against the + * variant value in ConstraintsParameters. + */ + private static class UsageConstraint extends Constraint { + String[] usages; + + UsageConstraint(String algorithm, String[] usages) { + this.algorithm = algorithm; + this.usages = usages; + } + + public void permits(ConstraintsParameters cp) + throws CertPathValidatorException { + for (String usage : usages) { + + String v = null; + if (usage.compareToIgnoreCase("TLSServer") == 0) { + v = Validator.VAR_TLS_SERVER; + } else if (usage.compareToIgnoreCase("TLSClient") == 0) { + v = Validator.VAR_TLS_CLIENT; + } else if (usage.compareToIgnoreCase("SignedJAR") == 0) { + v = Validator.VAR_PLUGIN_CODE_SIGNING; + } + + if (debug != null) { + debug.println("Checking if usage constraint " + v + + " matches " + cp.getVariant()); + } + if (cp.getVariant().compareTo(v) == 0) { + if (next(cp)) { + return; + } + throw new CertPathValidatorException("Usage constraint " + + usage + " check failed: " + algorithm + + extendedMsg(cp), + null, null, -1, BasicReason.ALGORITHM_CONSTRAINED); + } + } + } + } + /* * This class contains constraints dealing with the key size * support limits per algorithm. e.g. "keySize <= 1024" @@ -713,17 +739,22 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { * constraint Any permitted constraint will exit the linked list * to allow the operation. */ - public void permits(CertConstraintParameters cp) + public void permits(ConstraintsParameters cp) throws CertPathValidatorException { - if (!permitsImpl(cp.getCertificate().getPublicKey())) { + Key key = null; + if (cp.getPublicKey() != null) { + key = cp.getPublicKey(); + } else if (cp.getCertificate() != null) { + key = cp.getCertificate().getPublicKey(); + } + if (key != null && !permitsImpl(key)) { if (nextConstraint != null) { nextConstraint.permits(cp); return; } throw new CertPathValidatorException( "Algorithm constraints check failed on keysize limits. " - + algorithm + " " + size + "bit key used with " - + cp.getCertificate().getSubjectX500Principal(), + + algorithm + " " + size + "bit key" + extendedMsg(cp), null, null, -1, BasicReason.ALGORITHM_CONSTRAINED); } } @@ -762,5 +793,26 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints { return true; } } + + /* + * This constraint is used for the complete disabling of the algorithm. + */ + private static class DisabledConstraint extends Constraint { + DisabledConstraint(String algo) { + algorithm = algo; + } + + public void permits(ConstraintsParameters cp) + throws CertPathValidatorException { + throw new CertPathValidatorException( + "Algorithm constraints check failed on disabled " + + "algorithm: " + algorithm + extendedMsg(cp), + null, null, -1, BasicReason.ALGORITHM_CONSTRAINED); + } + + public boolean permits(Key key) { + return false; + } + } } diff --git a/jdk/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java b/jdk/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java index f8022c5ca94..2fe1c7ee91e 100644 --- a/jdk/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java +++ b/jdk/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,25 +28,23 @@ package sun.security.util; import java.io.ByteArrayInputStream; import java.io.IOException; import java.security.CodeSigner; -import java.security.CryptoPrimitive; +import java.security.GeneralSecurityException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.security.SignatureException; +import java.security.Timestamp; import java.security.cert.CertPath; import java.security.cert.X509Certificate; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.util.ArrayList; import java.util.Base64; -import java.util.Collections; -import java.util.EnumSet; import java.util.HashMap; import java.util.Hashtable; import java.util.Iterator; import java.util.List; import java.util.Locale; import java.util.Map; -import java.util.Set; import java.util.jar.Attributes; import java.util.jar.JarException; import java.util.jar.JarFile; @@ -61,9 +59,6 @@ public class SignatureFileVerifier { /* Are we debugging ? */ private static final Debug debug = Debug.getInstance("jar"); - private static final Set DIGEST_PRIMITIVE_SET = - Collections.unmodifiableSet(EnumSet.of(CryptoPrimitive.MESSAGE_DIGEST)); - private static final DisabledAlgorithmConstraints JAR_DISABLED_CHECK = new DisabledAlgorithmConstraints( DisabledAlgorithmConstraints.PROPERTY_JAR_DISABLED_ALGS); @@ -97,6 +92,14 @@ public class SignatureFileVerifier { /* for generating certpath objects */ private CertificateFactory certificateFactory = null; + /** Algorithms that have been checked if they are weak. */ + private Map permittedAlgs= new HashMap<>(); + + /** TSA timestamp of signed jar. The newest timestamp is used. If there + * was no TSA timestamp used when signed, current time is used ("null"). + */ + private Timestamp timestamp = null; + /** * Create the named SignatureFileVerifier. * @@ -222,15 +225,8 @@ public class SignatureFileVerifier { /** get digest from cache */ - private MessageDigest getDigest(String algorithm) throws SignatureException { - // check that algorithm is not restricted - if (!JAR_DISABLED_CHECK.permits(DIGEST_PRIMITIVE_SET, algorithm, null)) { - SignatureException e = - new SignatureException("SignatureFile check failed. " + - "Disabled algorithm used: " + algorithm); - throw e; - } - + private MessageDigest getDigest(String algorithm) + throws SignatureException { if (createdDigests == null) createdDigests = new HashMap<>(); @@ -302,6 +298,27 @@ public class SignatureFileVerifier { if (newSigners == null) return; + /* + * Look for the latest timestamp in the signature block. If an entry + * has no timestamp, use current time (aka null). + */ + for (CodeSigner s: newSigners) { + if (debug != null) { + debug.println("Gathering timestamp for: " + s.toString()); + } + if (s.getTimestamp() == null) { + timestamp = null; + break; + } else if (timestamp == null) { + timestamp = s.getTimestamp(); + } else { + if (timestamp.getTimestamp().before( + s.getTimestamp().getTimestamp())) { + timestamp = s.getTimestamp(); + } + } + } + Iterator> entries = sf.getEntries().entrySet().iterator(); @@ -344,6 +361,68 @@ public class SignatureFileVerifier { updateSigners(newSigners, signers, JarFile.MANIFEST_NAME); } + /** + * Check if algorithm is permitted using the permittedAlgs Map. + * If the algorithm is not in the map, check against disabled algorithms and + * store the result. If the algorithm is in the map use that result. + * False is returned for weak algorithm, true for good algorithms. + */ + boolean permittedCheck(String key, String algorithm) { + Boolean permitted = permittedAlgs.get(algorithm); + if (permitted == null) { + try { + JAR_DISABLED_CHECK.permits(algorithm, + new ConstraintsParameters(timestamp)); + } catch(GeneralSecurityException e) { + permittedAlgs.put(algorithm, Boolean.FALSE); + permittedAlgs.put(key.toUpperCase(), Boolean.FALSE); + if (debug != null) { + if (e.getMessage() != null) { + debug.println(key + ": " + e.getMessage()); + } else { + debug.println(key + ": " + algorithm + + " was disabled, no exception msg given."); + e.printStackTrace(); + } + } + return false; + } + + permittedAlgs.put(algorithm, Boolean.TRUE); + return true; + } + + // Algorithm has already been checked, return the value from map. + return permitted.booleanValue(); + } + + /** + * With a given header (*-DIGEST*), return a string that lists all the + * algorithms associated with the header. + * If there are none, return "Unknown Algorithm". + */ + String getWeakAlgorithms(String header) { + String w = ""; + try { + for (String key : permittedAlgs.keySet()) { + if (key.endsWith(header)) { + w += key.substring(0, key.length() - header.length()) + " "; + } + } + } catch (RuntimeException e) { + w = "Unknown Algorithm(s). Error processing " + header + ". " + + e.getMessage(); + } + + // This means we have an error in finding weak algorithms, run in + // debug mode to see permittedAlgs map's values. + if (w.length() == 0) { + return "Unknown Algorithm(s)"; + } + + return w; + } + /** * See if the whole manifest was signed. */ @@ -354,6 +433,7 @@ public class SignatureFileVerifier { { Attributes mattr = sf.getMainAttributes(); boolean manifestSigned = false; + boolean weakAlgs = true; // go through all the attributes and process *-Digest-Manifest entries for (Map.Entry se : mattr.entrySet()) { @@ -364,6 +444,15 @@ public class SignatureFileVerifier { // 16 is length of "-Digest-Manifest" String algorithm = key.substring(0, key.length()-16); + // Check if this algorithm is permitted, skip if false. + if (!permittedCheck(key, algorithm)) { + continue; + } + + // A non-weak algorithm was used, any weak algorithms found do + // not need to be reported. + weakAlgs = false; + manifestDigests.add(key); manifestDigests.add(se.getValue()); MessageDigest digest = getDigest(algorithm); @@ -373,15 +462,14 @@ public class SignatureFileVerifier { Base64.getMimeDecoder().decode((String)se.getValue()); if (debug != null) { - debug.println("Signature File: Manifest digest " + - digest.getAlgorithm()); - debug.println( " sigfile " + toHex(expectedHash)); - debug.println( " computed " + toHex(computedHash)); - debug.println(); + debug.println("Signature File: Manifest digest " + + algorithm); + debug.println( " sigfile " + toHex(expectedHash)); + debug.println( " computed " + toHex(computedHash)); + debug.println(); } - if (MessageDigest.isEqual(computedHash, - expectedHash)) { + if (MessageDigest.isEqual(computedHash, expectedHash)) { manifestSigned = true; } else { //XXX: we will continue and verify each section @@ -389,15 +477,31 @@ public class SignatureFileVerifier { } } } + + if (debug != null) { + debug.println("PermittedAlgs mapping: "); + for (String key : permittedAlgs.keySet()) { + debug.println(key + " : " + + permittedAlgs.get(key).toString()); + } + } + + // If there were only weak algorithms used, throw an exception. + if (weakAlgs) { + String weakAlgorithms = getWeakAlgorithms("-DIGEST-MANIFEST"); + throw new SignatureException("Manifest hash check failed " + + "(DIGEST-MANIFEST). Disabled algorithm(s) used: " + + weakAlgorithms); + } return manifestSigned; } - private boolean verifyManifestMainAttrs(Manifest sf, - ManifestDigester md) + private boolean verifyManifestMainAttrs(Manifest sf, ManifestDigester md) throws IOException, SignatureException { Attributes mattr = sf.getMainAttributes(); boolean attrsVerified = true; + boolean weakAlgs = true; // go through all the attributes and process // digest entries for the manifest main attributes @@ -408,6 +512,15 @@ public class SignatureFileVerifier { String algorithm = key.substring(0, key.length() - ATTR_DIGEST.length()); + // Check if this algorithm is permitted, skip if false. + if (!permittedCheck(key, algorithm)) { + continue; + } + + // A non-weak algorithm was used, any weak algorithms found do + // not need to be reported. + weakAlgs = false; + MessageDigest digest = getDigest(algorithm); if (digest != null) { ManifestDigester.Entry mde = @@ -425,8 +538,7 @@ public class SignatureFileVerifier { debug.println(); } - if (MessageDigest.isEqual(computedHash, - expectedHash)) { + if (MessageDigest.isEqual(computedHash, expectedHash)) { // good } else { // we will *not* continue and verify each section @@ -442,6 +554,23 @@ public class SignatureFileVerifier { } } + if (debug != null) { + debug.println("PermittedAlgs mapping: "); + for (String key : permittedAlgs.keySet()) { + debug.println(key + " : " + + permittedAlgs.get(key).toString()); + } + } + + // If there were only weak algorithms used, throw an exception. + if (weakAlgs) { + String weakAlgorithms = getWeakAlgorithms("-DIGEST-" + + ManifestDigester.MF_MAIN_ATTRS); + throw new SignatureException("Manifest Main Attribute check " + + "failed (DIGEST-" + ManifestDigester.MF_MAIN_ATTRS + + "). " + "Disabled algorithm(s) used: " + weakAlgorithms); + } + // this method returns 'true' if either: // . manifest main attributes were not signed, or // . manifest main attributes were signed and verified @@ -464,6 +593,7 @@ public class SignatureFileVerifier { { boolean oneDigestVerified = false; ManifestDigester.Entry mde = md.get(name,block.isOldStyle()); + boolean weakAlgs = true; if (mde == null) { throw new SecurityException( @@ -471,7 +601,6 @@ public class SignatureFileVerifier { } if (sfAttr != null) { - //sun.security.util.HexDumpEncoder hex = new sun.security.util.HexDumpEncoder(); //hex.encodeBuffer(data, System.out); @@ -483,6 +612,15 @@ public class SignatureFileVerifier { // 7 is length of "-Digest" String algorithm = key.substring(0, key.length()-7); + // Check if this algorithm is permitted, skip if false. + if (!permittedCheck(key, algorithm)) { + continue; + } + + // A non-weak algorithm was used, any weak algorithms found do + // not need to be reported. + weakAlgs = false; + MessageDigest digest = getDigest(algorithm); if (digest != null) { @@ -532,6 +670,23 @@ public class SignatureFileVerifier { } } } + + if (debug != null) { + debug.println("PermittedAlgs mapping: "); + for (String key : permittedAlgs.keySet()) { + debug.println(key + " : " + + permittedAlgs.get(key).toString()); + } + } + + // If there were only weak algorithms used, throw an exception. + if (weakAlgs) { + String weakAlgorithms = getWeakAlgorithms("DIGEST"); + throw new SignatureException("Manifest Main Attribute check " + + "failed (DIGEST). " + "Disabled algorithm(s) used: " + + weakAlgorithms); + } + return oneDigestVerified; } diff --git a/jdk/src/java.base/share/classes/sun/security/validator/PKIXValidator.java b/jdk/src/java.base/share/classes/sun/security/validator/PKIXValidator.java index 8d63ea2b8f5..0a7be5a31e0 100644 --- a/jdk/src/java.base/share/classes/sun/security/validator/PKIXValidator.java +++ b/jdk/src/java.base/share/classes/sun/security/validator/PKIXValidator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,7 @@ import java.security.cert.*; import javax.security.auth.x500.X500Principal; import sun.security.action.GetBooleanAction; import sun.security.provider.certpath.AlgorithmChecker; -import sun.security.provider.certpath.PKIXTimestampParameters; +import sun.security.provider.certpath.PKIXExtendedParameters; /** * Validator implementation built on the PKIX CertPath API. This @@ -199,9 +199,9 @@ public final class PKIXValidator extends Validator { PKIXBuilderParameters pkixParameters = null; if (parameter instanceof Timestamp && plugin) { try { - pkixParameters = new PKIXTimestampParameters( + pkixParameters = new PKIXExtendedParameters( (PKIXBuilderParameters) parameterTemplate.clone(), - (Timestamp) parameter); + (Timestamp) parameter, variant); } catch (InvalidAlgorithmParameterException e) { // ignore exception } @@ -211,7 +211,8 @@ public final class PKIXValidator extends Validator { // add new algorithm constraints checker if (constraints != null) { - pkixParameters.addCertPathChecker(new AlgorithmChecker(constraints)); + pkixParameters.addCertPathChecker( + new AlgorithmChecker(constraints, null, variant)); } // attach it to the PKIXBuilderParameters. diff --git a/jdk/src/java.base/share/classes/sun/security/validator/SimpleValidator.java b/jdk/src/java.base/share/classes/sun/security/validator/SimpleValidator.java index 58f7a5db419..7b7068fa9e6 100644 --- a/jdk/src/java.base/share/classes/sun/security/validator/SimpleValidator.java +++ b/jdk/src/java.base/share/classes/sun/security/validator/SimpleValidator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -155,12 +155,14 @@ public final class SimpleValidator extends Validator { // create default algorithm constraints checker TrustAnchor anchor = new TrustAnchor(anchorCert, null); - AlgorithmChecker defaultAlgChecker = new AlgorithmChecker(anchor); + AlgorithmChecker defaultAlgChecker = + new AlgorithmChecker(anchor, variant); // create application level algorithm constraints checker AlgorithmChecker appAlgChecker = null; if (constraints != null) { - appAlgChecker = new AlgorithmChecker(anchor, constraints); + appAlgChecker = new AlgorithmChecker(anchor, constraints, null, + variant); } // verify top down, starting at the certificate issued by diff --git a/jdk/src/java.base/share/conf/security/java.security b/jdk/src/java.base/share/conf/security/java.security index 0b8863e641e..e2fde354bd4 100644 --- a/jdk/src/java.base/share/conf/security/java.security +++ b/jdk/src/java.base/share/conf/security/java.security @@ -494,7 +494,8 @@ krb5.kdc.bad.policy = tryLast # (see below) # # Constraint: -# KeySizeConstraint | CAConstraint | DenyAfterConstraint +# KeySizeConstraint | CAConstraint | DenyAfterConstraint | +# UsageConstraint # # KeySizeConstraint: # keySize Operator KeyLength @@ -511,6 +512,9 @@ krb5.kdc.bad.policy = tryLast # DenyAfterConstraint: # denyAfter YYYY-MM-DD # +# UsageConstraint: +# usage [TLSServer] [TLSClient] [SignedJAR] +# # The "AlgorithmName" is the standard algorithm name of the disabled # algorithm. See "Java Cryptography Architecture Standard Algorithm Name # Documentation" for information about Standard Algorithm Names. Matching @@ -560,6 +564,19 @@ krb5.kdc.bad.policy = tryLast # Example: To deny usage of RSA 2048 bit certificates after Feb 3 2020, # use the following: "RSA keySize == 2048 & denyAfter 2020-02-03" # +# UsageConstraint: +# usage [TLSServer] [TLSClient] [SignedJAR] +# This constraint prohibits the specified algorithm for +# a specified usage. This should be used when disabling an algorithm +# for all usages is not practical. 'TLSServer' restricts the algorithm +# in TLS server certificate chains when server authentication is +# performed. 'TLSClient' restricts the algorithm in TLS client +# certificate chains when client authentication is performed. +# 'SignedJAR' constrains use of certificates in signed jar files. +# The usage type follows the keyword and more than one usage type can +# be specified with a whitespace delimiter. +# Example: "SHA1 usage TLSServer TLSClient" +# # When an algorithm must satisfy more than one constraint, it must be # delimited by an ampersand '&'. For example, to restrict certificates in a # chain that terminate at a distribution provided trust anchor and contain @@ -599,17 +616,20 @@ jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & denyAfter 2017-01-01, \ # " DisabledAlgorithm { , DisabledAlgorithm } " # # DisabledAlgorithm: -# AlgorithmName [Constraint] +# AlgorithmName [Constraint] { '&' Constraint } # # AlgorithmName: # (see below) # # Constraint: -# KeySizeConstraint +# KeySizeConstraint | DenyAfterConstraint # # KeySizeConstraint: # keySize Operator KeyLength # +# DenyAfterConstraint: +# denyAfter YYYY-MM-DD +# # Operator: # <= | < | == | != | >= | > # @@ -620,6 +640,8 @@ jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & denyAfter 2017-01-01, \ # implementation. It is not guaranteed to be examined and used by other # implementations. # +# See "jdk.certpath.disabledAlgorithms" for syntax descriptions. +# jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024, \ DSA keySize < 1024 diff --git a/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java b/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java index 9ba18ac0f05..8cb2541f151 100644 --- a/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java +++ b/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java @@ -456,7 +456,7 @@ public class TimestampCheck { .shouldMatch("Timestamp signature algorithm: .*key.*weak"); verify(file, "-J-Djava.security.debug=jar") .shouldHaveExitValue(0) - .shouldMatch("SignatureException:.*Disabled"); + .shouldMatch("SignatureException:.*disabled"); } static void checkHalfWeak(String file) throws Throwable { From 25179076dc0178f253b5dfe2dfe8d06fd9cdfae9 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Wed, 8 Feb 2017 14:23:59 -0700 Subject: [PATCH 094/447] 8033076: LambdaMetafactory should use types in implMethod.type() Reviewed-by: psandoz --- .../AbstractValidatingLambdaMetafactory.java | 48 +++++++------------ .../invoke/InnerClassLambdaMetafactory.java | 29 ++++------- 2 files changed, 26 insertions(+), 51 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java b/jdk/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java index 0675c043185..2a7641f5f54 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java @@ -56,11 +56,11 @@ import static sun.invoke.util.Wrapper.isWrapperType; final String samMethodName; // Name of the SAM method "foo" final MethodType samMethodType; // Type of the SAM method "(Object)Object" final MethodHandle implMethod; // Raw method handle for the implementation method + final MethodType implMethodType; // Type of the implMethod MethodHandle "(CC,int)String" final MethodHandleInfo implInfo; // Info about the implementation method handle "MethodHandleInfo[5 CC.impl(int)String]" final int implKind; // Invocation kind for implementation "5"=invokevirtual final boolean implIsInstanceMethod; // Is the implementation an instance method "true" - final Class implDefiningClass; // Type defining the implementation "class CC" - final MethodType implMethodType; // Type of the implementation method "(int)String" + final Class implClass; // Class for referencing the implementation method "class CC" final MethodType instantiatedMethodType; // Instantiated erased functional interface method type "(Integer)Object" final boolean isSerializable; // Should the returned instance be serializable final Class[] markerInterfaces; // Additional marker interfaces to be implemented @@ -128,14 +128,15 @@ import static sun.invoke.util.Wrapper.isWrapperType; this.samMethodType = samMethodType; this.implMethod = implMethod; + this.implMethodType = implMethod.type(); this.implInfo = caller.revealDirect(implMethod); this.implKind = implInfo.getReferenceKind(); this.implIsInstanceMethod = implKind == MethodHandleInfo.REF_invokeVirtual || implKind == MethodHandleInfo.REF_invokeSpecial || implKind == MethodHandleInfo.REF_invokeInterface; - this.implDefiningClass = implInfo.getDeclaringClass(); - this.implMethodType = implInfo.getMethodType(); + // JDK-8172817: statics should also use referenced class here, but API doesn't support it for now + this.implClass = implIsInstanceMethod ? implMethodType.parameterType(0) : implInfo.getDeclaringClass(); this.instantiatedMethodType = instantiatedMethodType; this.isSerializable = isSerializable; this.markerInterfaces = markerInterfaces; @@ -196,11 +197,10 @@ import static sun.invoke.util.Wrapper.isWrapperType; // Check arity: optional-receiver + captured + SAM == impl final int implArity = implMethodType.parameterCount(); - final int receiverArity = implIsInstanceMethod ? 1 : 0; final int capturedArity = invokedType.parameterCount(); final int samArity = samMethodType.parameterCount(); final int instantiatedArity = instantiatedMethodType.parameterCount(); - if (implArity + receiverArity != capturedArity + samArity) { + if (implArity != capturedArity + samArity) { throw new LambdaConversionException( String.format("Incorrect number of parameters for %s method %s; %d captured parameters, %d functional interface method parameters, %d implementation parameters", implIsInstanceMethod ? "instance" : "static", implInfo, @@ -221,8 +221,8 @@ import static sun.invoke.util.Wrapper.isWrapperType; } // If instance: first captured arg (receiver) must be subtype of class where impl method is defined - final int capturedStart; - final int samStart; + final int capturedStart; // index of first non-receiver capture parameter in implMethodType + final int samStart; // index of first non-receiver sam parameter in implMethodType if (implIsInstanceMethod) { final Class receiverClass; @@ -235,45 +235,36 @@ import static sun.invoke.util.Wrapper.isWrapperType; } else { // receiver is a captured variable capturedStart = 1; - samStart = 0; + samStart = capturedArity; receiverClass = invokedType.parameterType(0); } // check receiver type - if (!implDefiningClass.isAssignableFrom(receiverClass)) { + if (!implClass.isAssignableFrom(receiverClass)) { throw new LambdaConversionException( String.format("Invalid receiver type %s; not a subtype of implementation type %s", - receiverClass, implDefiningClass)); - } - - Class implReceiverClass = implMethod.type().parameterType(0); - if (implReceiverClass != implDefiningClass && !implReceiverClass.isAssignableFrom(receiverClass)) { - throw new LambdaConversionException( - String.format("Invalid receiver type %s; not a subtype of implementation receiver type %s", - receiverClass, implReceiverClass)); + receiverClass, implClass)); } } else { // no receiver capturedStart = 0; - samStart = 0; + samStart = capturedArity; } // Check for exact match on non-receiver captured arguments - final int implFromCaptured = capturedArity - capturedStart; - for (int i=0; i implParamType = implMethodType.parameterType(i); - Class capturedParamType = invokedType.parameterType(i + capturedStart); + Class capturedParamType = invokedType.parameterType(i); if (!capturedParamType.equals(implParamType)) { throw new LambdaConversionException( String.format("Type mismatch in captured lambda parameter %d: expecting %s, found %s", i, capturedParamType, implParamType)); } } - // Check for adaptation match on SAM arguments - final int samOffset = samStart - implFromCaptured; - for (int i=implFromCaptured; i implParamType = implMethodType.parameterType(i); - Class instantiatedParamType = instantiatedMethodType.parameterType(i + samOffset); + Class instantiatedParamType = instantiatedMethodType.parameterType(i - capturedArity); if (!isAdaptableTo(instantiatedParamType, implParamType, true)) { throw new LambdaConversionException( String.format("Type mismatch for lambda argument %d: %s is not convertible to %s", @@ -283,10 +274,7 @@ import static sun.invoke.util.Wrapper.isWrapperType; // Adaptation match: return type Class expectedType = instantiatedMethodType.returnType(); - Class actualReturnType = - (implKind == MethodHandleInfo.REF_newInvokeSpecial) - ? implDefiningClass - : implMethodType.returnType(); + Class actualReturnType = implMethodType.returnType(); if (!isAdaptableToAsReturn(actualReturnType, expectedType)) { throw new LambdaConversionException( String.format("Type mismatch for lambda return: %s is not convertible to %s", diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java b/jdk/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java index 0c814bdd470..35f91cc243b 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java @@ -96,7 +96,6 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; private final String implMethodClassName; // Name of type containing implementation "CC" private final String implMethodName; // Name of implementation method "impl" private final String implMethodDesc; // Type descriptor for implementation methods "(I)Ljava/lang/String;" - private final Class implMethodReturnClass; // class for implementation method return type "Ljava/lang/String;" private final MethodType constructorType; // Generated class constructor type "(CC)void" private final ClassWriter cw; // ASM class writer private final String[] argNames; // Generated names for the constructor arguments @@ -153,12 +152,9 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; super(caller, invokedType, samMethodName, samMethodType, implMethod, instantiatedMethodType, isSerializable, markerInterfaces, additionalBridges); - implMethodClassName = implDefiningClass.getName().replace('.', '/'); + implMethodClassName = implClass.getName().replace('.', '/'); implMethodName = implInfo.getName(); - implMethodDesc = implMethodType.toMethodDescriptorString(); - implMethodReturnClass = (implKind == MethodHandleInfo.REF_newInvokeSpecial) - ? implDefiningClass - : implMethodType.returnType(); + implMethodDesc = implInfo.getMethodType().toMethodDescriptorString(); constructorType = invokedType.changeReturnType(Void.TYPE); lambdaClassName = targetClass.getName().replace('.', '/') + "$$Lambda$" + counter.incrementAndGet(); cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); @@ -467,13 +463,14 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; // Invoke the method we want to forward to visitMethodInsn(invocationOpcode(), implMethodClassName, implMethodName, implMethodDesc, - implDefiningClass.isInterface()); + implClass.isInterface()); // Convert the return value (if any) and return it // Note: if adapting from non-void to void, the 'return' // instruction will pop the unneeded result + Class implReturnClass = implMethodType.returnType(); Class samReturnClass = methodType.returnType(); - convertType(implMethodReturnClass, samReturnClass, samReturnClass); + convertType(implReturnClass, samReturnClass, samReturnClass); visitInsn(getReturnOpcode(samReturnClass)); // Maxs computed by ClassWriter.COMPUTE_MAXS,these arguments ignored visitMaxs(-1, -1); @@ -482,23 +479,13 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; private void convertArgumentTypes(MethodType samType) { int lvIndex = 0; - boolean samIncludesReceiver = implIsInstanceMethod && - invokedType.parameterCount() == 0; - int samReceiverLength = samIncludesReceiver ? 1 : 0; - if (samIncludesReceiver) { - // push receiver - Class rcvrType = samType.parameterType(0); - visitVarInsn(getLoadOpcode(rcvrType), lvIndex + 1); - lvIndex += getParameterSize(rcvrType); - convertType(rcvrType, implDefiningClass, instantiatedMethodType.parameterType(0)); - } int samParametersLength = samType.parameterCount(); - int argOffset = implMethodType.parameterCount() - samParametersLength; - for (int i = samReceiverLength; i < samParametersLength; i++) { + int captureArity = invokedType.parameterCount(); + for (int i = 0; i < samParametersLength; i++) { Class argType = samType.parameterType(i); visitVarInsn(getLoadOpcode(argType), lvIndex + 1); lvIndex += getParameterSize(argType); - convertType(argType, implMethodType.parameterType(argOffset + i), instantiatedMethodType.parameterType(i)); + convertType(argType, implMethodType.parameterType(captureArity + i), instantiatedMethodType.parameterType(i)); } } From 52f0f390a886bd09cf6dbb4b2b9df361d4aa9d08 Mon Sep 17 00:00:00 2001 From: Robert Field Date: Wed, 8 Feb 2017 13:35:42 -0800 Subject: [PATCH 095/447] 8173916: jshell tool: /methods signature confusing/non-standard format 8174028: jshell tool: /method /type failed declaration listed (without indication) 8174041: jshell tool: --startup PRINTING references undeclared Locale class Reviewed-by: jlahoda --- .../jdk/internal/jshell/tool/Feedback.java | 17 ++++- .../jdk/internal/jshell/tool/JShellTool.java | 72 +++++++++++++------ .../jdk/jshell/tool/resources/PRINTING.jsh | 2 +- .../test/jdk/jshell/ReplToolTesting.java | 50 +++++++------ langtools/test/jdk/jshell/ToolReloadTest.java | 8 +-- langtools/test/jdk/jshell/ToolSimpleTest.java | 56 ++++++++++++--- 6 files changed, 149 insertions(+), 56 deletions(-) diff --git a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/Feedback.java b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/Feedback.java index 80641a57bdf..bbd919658eb 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/Feedback.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/Feedback.java @@ -116,6 +116,13 @@ class Feedback { name, type, value, unresolved, errorLines); } + public String format(String field, FormatCase fc, FormatAction fa, FormatWhen fw, + FormatResolve fr, FormatUnresolved fu, FormatErrors fe, + String name, String type, String value, String unresolved, List errorLines) { + return mode.format(field, fc, fa, fw, fr, fu, fe, + name, type, value, unresolved, errorLines); + } + public String truncateVarValue(String value) { return mode.truncateVarValue(value); } @@ -463,6 +470,14 @@ class Feedback { String format(FormatCase fc, FormatAction fa, FormatWhen fw, FormatResolve fr, FormatUnresolved fu, FormatErrors fe, String name, String type, String value, String unresolved, List errorLines) { + return format("display", fc, fa, fw, fr, fu, fe, + name, type, value, unresolved, errorLines); + } + + // Compute the display output given full context and values + String format(String field, FormatCase fc, FormatAction fa, FormatWhen fw, + FormatResolve fr, FormatUnresolved fu, FormatErrors fe, + String name, String type, String value, String unresolved, List errorLines) { // Convert the context into a bit representation used as selectors for store field formats long bits = bits(fc, fa, fw, fr, fu, fe); String fname = name==null? "" : name; @@ -476,7 +491,7 @@ class Feedback { fname, ftype, fvalue, funresolved, "*cannot-use-errors-here*", el)) .collect(joining()); return String.format( - format("display", bits), + format(field, bits), fname, ftype, fvalue, funresolved, errors, "*cannot-use-err-here*"); } diff --git a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java index 6031b3a6b0a..95c54aad2a7 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java @@ -36,12 +36,9 @@ import java.io.InputStreamReader; import java.io.PrintStream; import java.io.Reader; import java.io.StringReader; -import java.net.URL; import java.nio.charset.Charset; -import java.nio.file.AccessDeniedException; import java.nio.file.FileSystems; import java.nio.file.Files; -import java.nio.file.NoSuchFileException; import java.nio.file.Path; import java.nio.file.Paths; import java.text.MessageFormat; @@ -2624,9 +2621,16 @@ public class JShellTool implements MessageHandler { if (stream == null) { return false; } - stream.forEachOrdered(mk - -> hard(" %s %s", mk.name(), mk.signature()) - ); + stream.forEachOrdered(meth -> { + String sig = meth.signature(); + int i = sig.lastIndexOf(")") + 1; + if (i <= 0) { + hard(" %s", meth.name()); + } else { + hard(" %s %s%s", sig.substring(i), meth.name(), sig.substring(0, i)); + } + printSnippetStatus(meth, true); + }); return true; } @@ -2658,6 +2662,7 @@ public class JShellTool implements MessageHandler { break; } hard(" %s %s", kind, ck.name()); + printSnippetStatus(ck, true); }); return true; } @@ -2847,7 +2852,8 @@ public class JShellTool implements MessageHandler { return true; } } else { - new DisplayEvent(ste, false, ste.value(), diagnostics).displayDeclarationAndValue(); + new DisplayEvent(ste, FormatWhen.PRIMARY, ste.value(), diagnostics) + .displayDeclarationAndValue(); } } else { if (diagnostics.isEmpty()) { @@ -2861,7 +2867,8 @@ public class JShellTool implements MessageHandler { List other = errorsOnly(diagnostics); // display update information - new DisplayEvent(ste, true, ste.value(), other).displayDeclarationAndValue(); + new DisplayEvent(ste, FormatWhen.UPDATE, ste.value(), other) + .displayDeclarationAndValue(); } } return false; @@ -2899,10 +2906,7 @@ public class JShellTool implements MessageHandler { } //where void printUnresolvedException(UnresolvedReferenceException ex) { - DeclarationSnippet corralled = ex.getSnippet(); - List otherErrors = errorsOnly(state.diagnostics(corralled).collect(toList())); - new DisplayEvent(corralled, state.status(corralled), FormatAction.USED, true, null, otherErrors) - .displayDeclarationAndValue(); + printSnippetStatus(ex.getSnippet(), false); } //where void printEvalException(EvalException ex) { @@ -2944,23 +2948,38 @@ public class JShellTool implements MessageHandler { return act; } + void printSnippetStatus(DeclarationSnippet sn, boolean resolve) { + List otherErrors = errorsOnly(state.diagnostics(sn).collect(toList())); + new DisplayEvent(sn, state.status(sn), resolve, otherErrors) + .displayDeclarationAndValue(); + } + class DisplayEvent { private final Snippet sn; private final FormatAction action; - private final boolean update; + private final FormatWhen update; private final String value; private final List errorLines; private final FormatResolve resolution; private final String unresolved; private final FormatUnresolved unrcnt; private final FormatErrors errcnt; + private final boolean resolve; - DisplayEvent(SnippetEvent ste, boolean update, String value, List errors) { - this(ste.snippet(), ste.status(), toAction(ste.status(), ste.previousStatus(), ste.isSignatureChange()), update, value, errors); + DisplayEvent(SnippetEvent ste, FormatWhen update, String value, List errors) { + this(ste.snippet(), ste.status(), false, + toAction(ste.status(), ste.previousStatus(), ste.isSignatureChange()), + update, value, errors); } - DisplayEvent(Snippet sn, Status status, FormatAction action, boolean update, String value, List errors) { + DisplayEvent(Snippet sn, Status status, boolean resolve, List errors) { + this(sn, status, resolve, FormatAction.USED, FormatWhen.UPDATE, null, errors); + } + + private DisplayEvent(Snippet sn, Status status, boolean resolve, + FormatAction action, FormatWhen update, String value, List errors) { this.sn = sn; + this.resolve =resolve; this.action = action; this.update = update; this.value = value; @@ -2968,6 +2987,12 @@ public class JShellTool implements MessageHandler { for (Diag d : errors) { displayDiagnostics(sn.source(), d, errorLines); } + if (resolve) { + // resolve needs error lines indented + for (int i = 0; i < errorLines.size(); ++i) { + errorLines.set(i, " " + errorLines.get(i)); + } + } long unresolvedCount; if (sn instanceof DeclarationSnippet && (status == Status.RECOVERABLE_DEFINED || status == Status.RECOVERABLE_NOT_DEFINED)) { resolution = (status == Status.RECOVERABLE_NOT_DEFINED) @@ -3022,10 +3047,17 @@ public class JShellTool implements MessageHandler { } private void custom(FormatCase fcase, String name, String type) { - String display = feedback.format(fcase, action, (update ? FormatWhen.UPDATE : FormatWhen.PRIMARY), - resolution, unrcnt, errcnt, - name, type, value, unresolved, errorLines); - if (interactive()) { + if (resolve) { + String resolutionErrors = feedback.format("resolve", fcase, action, update, + resolution, unrcnt, errcnt, + name, type, value, unresolved, errorLines); + if (!resolutionErrors.trim().isEmpty()) { + hard(" %s", resolutionErrors); + } + } else if (interactive()) { + String display = feedback.format(fcase, action, update, + resolution, unrcnt, errcnt, + name, type, value, unresolved, errorLines); cmdout.print(display); } } diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/tool/resources/PRINTING.jsh b/langtools/src/jdk.jshell/share/classes/jdk/jshell/tool/resources/PRINTING.jsh index 52aaea48645..3c6e5f6d164 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/tool/resources/PRINTING.jsh +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/tool/resources/PRINTING.jsh @@ -17,5 +17,5 @@ void println(double d) { System.out.println(d); } void println(char s[]) { System.out.println(s); } void println(String s) { System.out.println(s); } void println(Object obj) { System.out.println(obj); } -void printf(Locale l, String format, Object... args) { System.out.printf(l, format, args); } +void printf(java.util.Locale l, String format, Object... args) { System.out.printf(l, format, args); } void printf(String format, Object... args) { System.out.printf(format, args); } diff --git a/langtools/test/jdk/jshell/ReplToolTesting.java b/langtools/test/jdk/jshell/ReplToolTesting.java index 3f776eebb21..5c31292fff3 100644 --- a/langtools/test/jdk/jshell/ReplToolTesting.java +++ b/langtools/test/jdk/jshell/ReplToolTesting.java @@ -72,27 +72,27 @@ public class ReplToolTesting { final static List START_UP_CMD_METHOD = Stream.of() .collect(toList()); final static List PRINTING_CMD_METHOD = Stream.of( - "| print (boolean)void", - "| print (char)void", - "| print (int)void", - "| print (long)void", - "| print (float)void", - "| print (double)void", - "| print (char s[])void", - "| print (String)void", - "| print (Object)void", - "| println ()void", - "| println (boolean)void", - "| println (char)void", - "| println (int)void", - "| println (long)void", - "| println (float)void", - "| println (double)void", - "| println (char s[])void", - "| println (String)void", - "| println (Object)void", - "| printf (Locale,String,Object...)void", - "| printf (String,Object...)void") + "| void print(boolean)", + "| void print(char)", + "| void print(int)", + "| void print(long)", + "| void print(float)", + "| void print(double)", + "| void print(char s[])", + "| void print(String)", + "| void print(Object)", + "| void println()", + "| void println(boolean)", + "| void println(char)", + "| void println(int)", + "| void println(long)", + "| void println(float)", + "| void println(double)", + "| void println(char s[])", + "| void println(String)", + "| void println(Object)", + "| void printf(java.util.Locale,String,Object...)", + "| void printf(String,Object...)") .collect(toList()); final static List START_UP = Collections.unmodifiableList( Stream.concat(START_UP_IMPORTS.stream(), START_UP_METHODS.stream()) @@ -152,6 +152,7 @@ public class ReplToolTesting { return s -> { List lines = Stream.of(s.split("\n")) .filter(l -> !l.isEmpty()) + .filter(l -> !l.startsWith("| ")) // error/unresolved info .collect(Collectors.toList()); assertEquals(lines.size(), set.size(), message + " : expected: " + set.keySet() + "\ngot:\n" + lines); for (String line : lines) { @@ -664,7 +665,12 @@ public class ReplToolTesting { @Override public String toString() { - return String.format("%s %s", name, signature); + int i = signature.lastIndexOf(")") + 1; + if (i <= 0) { + return String.format("%s", name); + } else { + return String.format("%s %s%s", signature.substring(i), name, signature.substring(0, i)); + } } } diff --git a/langtools/test/jdk/jshell/ToolReloadTest.java b/langtools/test/jdk/jshell/ToolReloadTest.java index 770b0170542..f3d008f0754 100644 --- a/langtools/test/jdk/jshell/ToolReloadTest.java +++ b/langtools/test/jdk/jshell/ToolReloadTest.java @@ -92,8 +92,8 @@ public class ToolReloadTest extends ReplToolTesting { test(false, new String[]{"--no-startup"}, a -> assertVariable(a, "int", "a"), a -> dropVariable(a, "/dr 1", "int a = 0", "| dropped variable a"), - a -> assertMethod(a, "int b() { return 0; }", "()I", "b"), - a -> dropMethod(a, "/drop b", "b ()I", "| dropped method b()"), + a -> assertMethod(a, "int b() { return 0; }", "()int", "b"), + a -> dropMethod(a, "/drop b", "int b()", "| dropped method b()"), a -> assertClass(a, "class A {}", "class", "A"), a -> dropClass(a, "/dr A", "class A", "| dropped class A"), a -> assertCommand(a, "/reload", @@ -115,8 +115,8 @@ public class ToolReloadTest extends ReplToolTesting { test(false, new String[]{"--no-startup"}, a -> assertVariable(a, "int", "a"), a -> dropVariable(a, "/dr 1", "int a = 0", "| dropped variable a"), - a -> assertMethod(a, "int b() { return 0; }", "()I", "b"), - a -> dropMethod(a, "/drop b", "b ()I", "| dropped method b()"), + a -> assertMethod(a, "int b() { return 0; }", "()int", "b"), + a -> dropMethod(a, "/drop b", "int b()", "| dropped method b()"), a -> assertClass(a, "class A {}", "class", "A"), a -> dropClass(a, "/dr A", "class A", "| dropped class A"), a -> assertCommand(a, "/reload -quiet", diff --git a/langtools/test/jdk/jshell/ToolSimpleTest.java b/langtools/test/jdk/jshell/ToolSimpleTest.java index ff29a47a92f..8655d049ac7 100644 --- a/langtools/test/jdk/jshell/ToolSimpleTest.java +++ b/langtools/test/jdk/jshell/ToolSimpleTest.java @@ -23,7 +23,7 @@ /* * @test - * @bug 8153716 8143955 8151754 8150382 8153920 8156910 8131024 8160089 8153897 8167128 8154513 8170015 8170368 8172102 8172103 8165405 8173073 8173848 + * @bug 8153716 8143955 8151754 8150382 8153920 8156910 8131024 8160089 8153897 8167128 8154513 8170015 8170368 8172102 8172103 8165405 8173073 8173848 8174041 8173916 8174028 * @summary Simple jshell tool tests * @modules jdk.compiler/com.sun.tools.javac.api * jdk.compiler/com.sun.tools.javac.main @@ -238,8 +238,8 @@ public class ToolSimpleTest extends ReplToolTesting { test(false, new String[]{"--no-startup"}, a -> assertVariable(a, "int", "a"), a -> dropVariable(a, "/drop 1", "int a = 0", "| dropped variable a"), - a -> assertMethod(a, "int b() { return 0; }", "()I", "b"), - a -> dropMethod(a, "/drop 2", "b ()I", "| dropped method b()"), + a -> assertMethod(a, "int b() { return 0; }", "()int", "b"), + a -> dropMethod(a, "/drop 2", "int b()", "| dropped method b()"), a -> assertClass(a, "class A {}", "class", "A"), a -> dropClass(a, "/drop 3", "class A", "| dropped class A"), a -> assertImport(a, "import java.util.stream.*;", "", "java.util.stream.*"), @@ -255,8 +255,8 @@ public class ToolSimpleTest extends ReplToolTesting { test(false, new String[]{"--no-startup"}, a -> assertVariable(a, "int", "a"), a -> dropVariable(a, "/drop a", "int a = 0", "| dropped variable a"), - a -> assertMethod(a, "int b() { return 0; }", "()I", "b"), - a -> dropMethod(a, "/drop b", "b ()I", "| dropped method b()"), + a -> assertMethod(a, "int b() { return 0; }", "()int", "b"), + a -> dropMethod(a, "/drop b", "int b()", "| dropped method b()"), a -> assertClass(a, "class A {}", "class", "A"), a -> dropClass(a, "/drop A", "class A", "| dropped class A"), a -> assertCommandCheckOutput(a, "/vars", assertVariables()), @@ -466,10 +466,50 @@ public class ToolSimpleTest extends ReplToolTesting { a -> assertCommandCheckOutput(a, "/methods print println printf", s -> checkLineToList(s, printingMethodList)), a -> assertCommandOutputStartsWith(a, "/methods g", - "| g ()void"), + "| void g()"), a -> assertCommandOutputStartsWith(a, "/methods f", - "| f ()int\n" + - "| f (int)void") + "| int f()\n" + + "| void f(int)") + ); + } + + @Test + public void testMethodsWithErrors() { + test(new String[]{"--no-startup"}, + a -> assertCommand(a, "double m(int x) { return x; }", + "| created method m(int)"), + a -> assertCommand(a, "GARBAGE junk() { return TRASH; }", + "| created method junk(), however, it cannot be referenced until class GARBAGE, and variable TRASH are declared"), + a -> assertCommand(a, "int w = 5;", + "w ==> 5"), + a -> assertCommand(a, "int tyer() { return w; }", + "| created method tyer()"), + a -> assertCommand(a, "String w = \"hi\";", + "w ==> \"hi\""), + a -> assertCommand(a, "/methods", + "| double m(int)\n" + + "| GARBAGE junk()\n" + + "| which cannot be referenced until class GARBAGE, and variable TRASH are declared\n" + + "| int tyer()\n" + + "| which cannot be invoked until this error is corrected: \n" + + "| incompatible types: java.lang.String cannot be converted to int\n" + + "| int tyer() { return w; }\n" + + "| ^\n") + ); + } + + @Test + public void testTypesWithErrors() { + test(new String[]{"--no-startup"}, + a -> assertCommand(a, "class C extends NONE { int x; }", + "| created class C, however, it cannot be referenced until class NONE is declared"), + a -> assertCommand(a, "class D { void m() { System.out.println(nada); } }", + "| created class D, however, it cannot be instanciated or its methods invoked until variable nada is declared"), + a -> assertCommand(a, "/types", + "| class C\n" + + "| which cannot be referenced until class NONE is declared\n" + + "| class D\n" + + "| which cannot be instanciated or its methods invoked until variable nada is declared\n") ); } From 1606e8a7b01f9717e86593ec0228c62eff735ded Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Wed, 8 Feb 2017 17:28:15 -0700 Subject: [PATCH 096/447] 8174226: Test failures after JDK-8033076 Reverting JDK-8033076 for now Reviewed-by: darcy --- .../AbstractValidatingLambdaMetafactory.java | 48 ++++++++++++------- .../invoke/InnerClassLambdaMetafactory.java | 29 +++++++---- 2 files changed, 51 insertions(+), 26 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java b/jdk/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java index 2a7641f5f54..0675c043185 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java @@ -56,11 +56,11 @@ import static sun.invoke.util.Wrapper.isWrapperType; final String samMethodName; // Name of the SAM method "foo" final MethodType samMethodType; // Type of the SAM method "(Object)Object" final MethodHandle implMethod; // Raw method handle for the implementation method - final MethodType implMethodType; // Type of the implMethod MethodHandle "(CC,int)String" final MethodHandleInfo implInfo; // Info about the implementation method handle "MethodHandleInfo[5 CC.impl(int)String]" final int implKind; // Invocation kind for implementation "5"=invokevirtual final boolean implIsInstanceMethod; // Is the implementation an instance method "true" - final Class implClass; // Class for referencing the implementation method "class CC" + final Class implDefiningClass; // Type defining the implementation "class CC" + final MethodType implMethodType; // Type of the implementation method "(int)String" final MethodType instantiatedMethodType; // Instantiated erased functional interface method type "(Integer)Object" final boolean isSerializable; // Should the returned instance be serializable final Class[] markerInterfaces; // Additional marker interfaces to be implemented @@ -128,15 +128,14 @@ import static sun.invoke.util.Wrapper.isWrapperType; this.samMethodType = samMethodType; this.implMethod = implMethod; - this.implMethodType = implMethod.type(); this.implInfo = caller.revealDirect(implMethod); this.implKind = implInfo.getReferenceKind(); this.implIsInstanceMethod = implKind == MethodHandleInfo.REF_invokeVirtual || implKind == MethodHandleInfo.REF_invokeSpecial || implKind == MethodHandleInfo.REF_invokeInterface; - // JDK-8172817: statics should also use referenced class here, but API doesn't support it for now - this.implClass = implIsInstanceMethod ? implMethodType.parameterType(0) : implInfo.getDeclaringClass(); + this.implDefiningClass = implInfo.getDeclaringClass(); + this.implMethodType = implInfo.getMethodType(); this.instantiatedMethodType = instantiatedMethodType; this.isSerializable = isSerializable; this.markerInterfaces = markerInterfaces; @@ -197,10 +196,11 @@ import static sun.invoke.util.Wrapper.isWrapperType; // Check arity: optional-receiver + captured + SAM == impl final int implArity = implMethodType.parameterCount(); + final int receiverArity = implIsInstanceMethod ? 1 : 0; final int capturedArity = invokedType.parameterCount(); final int samArity = samMethodType.parameterCount(); final int instantiatedArity = instantiatedMethodType.parameterCount(); - if (implArity != capturedArity + samArity) { + if (implArity + receiverArity != capturedArity + samArity) { throw new LambdaConversionException( String.format("Incorrect number of parameters for %s method %s; %d captured parameters, %d functional interface method parameters, %d implementation parameters", implIsInstanceMethod ? "instance" : "static", implInfo, @@ -221,8 +221,8 @@ import static sun.invoke.util.Wrapper.isWrapperType; } // If instance: first captured arg (receiver) must be subtype of class where impl method is defined - final int capturedStart; // index of first non-receiver capture parameter in implMethodType - final int samStart; // index of first non-receiver sam parameter in implMethodType + final int capturedStart; + final int samStart; if (implIsInstanceMethod) { final Class receiverClass; @@ -235,36 +235,45 @@ import static sun.invoke.util.Wrapper.isWrapperType; } else { // receiver is a captured variable capturedStart = 1; - samStart = capturedArity; + samStart = 0; receiverClass = invokedType.parameterType(0); } // check receiver type - if (!implClass.isAssignableFrom(receiverClass)) { + if (!implDefiningClass.isAssignableFrom(receiverClass)) { throw new LambdaConversionException( String.format("Invalid receiver type %s; not a subtype of implementation type %s", - receiverClass, implClass)); + receiverClass, implDefiningClass)); + } + + Class implReceiverClass = implMethod.type().parameterType(0); + if (implReceiverClass != implDefiningClass && !implReceiverClass.isAssignableFrom(receiverClass)) { + throw new LambdaConversionException( + String.format("Invalid receiver type %s; not a subtype of implementation receiver type %s", + receiverClass, implReceiverClass)); } } else { // no receiver capturedStart = 0; - samStart = capturedArity; + samStart = 0; } // Check for exact match on non-receiver captured arguments - for (int i=capturedStart; i implParamType = implMethodType.parameterType(i); - Class capturedParamType = invokedType.parameterType(i); + Class capturedParamType = invokedType.parameterType(i + capturedStart); if (!capturedParamType.equals(implParamType)) { throw new LambdaConversionException( String.format("Type mismatch in captured lambda parameter %d: expecting %s, found %s", i, capturedParamType, implParamType)); } } - // Check for adaptation match on non-receiver SAM arguments - for (int i=samStart; i implParamType = implMethodType.parameterType(i); - Class instantiatedParamType = instantiatedMethodType.parameterType(i - capturedArity); + Class instantiatedParamType = instantiatedMethodType.parameterType(i + samOffset); if (!isAdaptableTo(instantiatedParamType, implParamType, true)) { throw new LambdaConversionException( String.format("Type mismatch for lambda argument %d: %s is not convertible to %s", @@ -274,7 +283,10 @@ import static sun.invoke.util.Wrapper.isWrapperType; // Adaptation match: return type Class expectedType = instantiatedMethodType.returnType(); - Class actualReturnType = implMethodType.returnType(); + Class actualReturnType = + (implKind == MethodHandleInfo.REF_newInvokeSpecial) + ? implDefiningClass + : implMethodType.returnType(); if (!isAdaptableToAsReturn(actualReturnType, expectedType)) { throw new LambdaConversionException( String.format("Type mismatch for lambda return: %s is not convertible to %s", diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java b/jdk/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java index 35f91cc243b..0c814bdd470 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java @@ -96,6 +96,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; private final String implMethodClassName; // Name of type containing implementation "CC" private final String implMethodName; // Name of implementation method "impl" private final String implMethodDesc; // Type descriptor for implementation methods "(I)Ljava/lang/String;" + private final Class implMethodReturnClass; // class for implementation method return type "Ljava/lang/String;" private final MethodType constructorType; // Generated class constructor type "(CC)void" private final ClassWriter cw; // ASM class writer private final String[] argNames; // Generated names for the constructor arguments @@ -152,9 +153,12 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; super(caller, invokedType, samMethodName, samMethodType, implMethod, instantiatedMethodType, isSerializable, markerInterfaces, additionalBridges); - implMethodClassName = implClass.getName().replace('.', '/'); + implMethodClassName = implDefiningClass.getName().replace('.', '/'); implMethodName = implInfo.getName(); - implMethodDesc = implInfo.getMethodType().toMethodDescriptorString(); + implMethodDesc = implMethodType.toMethodDescriptorString(); + implMethodReturnClass = (implKind == MethodHandleInfo.REF_newInvokeSpecial) + ? implDefiningClass + : implMethodType.returnType(); constructorType = invokedType.changeReturnType(Void.TYPE); lambdaClassName = targetClass.getName().replace('.', '/') + "$$Lambda$" + counter.incrementAndGet(); cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); @@ -463,14 +467,13 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; // Invoke the method we want to forward to visitMethodInsn(invocationOpcode(), implMethodClassName, implMethodName, implMethodDesc, - implClass.isInterface()); + implDefiningClass.isInterface()); // Convert the return value (if any) and return it // Note: if adapting from non-void to void, the 'return' // instruction will pop the unneeded result - Class implReturnClass = implMethodType.returnType(); Class samReturnClass = methodType.returnType(); - convertType(implReturnClass, samReturnClass, samReturnClass); + convertType(implMethodReturnClass, samReturnClass, samReturnClass); visitInsn(getReturnOpcode(samReturnClass)); // Maxs computed by ClassWriter.COMPUTE_MAXS,these arguments ignored visitMaxs(-1, -1); @@ -479,13 +482,23 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; private void convertArgumentTypes(MethodType samType) { int lvIndex = 0; + boolean samIncludesReceiver = implIsInstanceMethod && + invokedType.parameterCount() == 0; + int samReceiverLength = samIncludesReceiver ? 1 : 0; + if (samIncludesReceiver) { + // push receiver + Class rcvrType = samType.parameterType(0); + visitVarInsn(getLoadOpcode(rcvrType), lvIndex + 1); + lvIndex += getParameterSize(rcvrType); + convertType(rcvrType, implDefiningClass, instantiatedMethodType.parameterType(0)); + } int samParametersLength = samType.parameterCount(); - int captureArity = invokedType.parameterCount(); - for (int i = 0; i < samParametersLength; i++) { + int argOffset = implMethodType.parameterCount() - samParametersLength; + for (int i = samReceiverLength; i < samParametersLength; i++) { Class argType = samType.parameterType(i); visitVarInsn(getLoadOpcode(argType), lvIndex + 1); lvIndex += getParameterSize(argType); - convertType(argType, implMethodType.parameterType(captureArity + i), instantiatedMethodType.parameterType(i)); + convertType(argType, implMethodType.parameterType(argOffset + i), instantiatedMethodType.parameterType(i)); } } From c3759775fbf546e50310754af4b1e6a7b407eafa Mon Sep 17 00:00:00 2001 From: Vicente Romero Date: Wed, 8 Feb 2017 19:42:24 -0800 Subject: [PATCH 097/447] 8174073: NPE caused by @link reference to class Reviewed-by: jjg, ksrini --- .../com/sun/tools/javac/api/JavacTrees.java | 4 +- .../com/sun/tools/javac/comp/Enter.java | 1 + .../doclint/NPEDuplicateClassNamesTest.java | 97 +++++++++++++++++++ 3 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 langtools/test/tools/javac/doclint/NPEDuplicateClassNamesTest.java diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java index 32b21139f40..beb39842621 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -418,6 +418,7 @@ public class JavacTrees extends DocTrees { private Symbol attributeDocReference(TreePath path, DCReference ref) { Env env = getAttrContext(path); + if (env == null) return null; Log.DeferredDiagnosticHandler deferredDiagnosticHandler = new Log.DeferredDiagnosticHandler(log); @@ -881,6 +882,7 @@ public class JavacTrees extends DocTrees { case INTERFACE: // System.err.println("CLASS: " + ((JCClassDecl)tree).sym.getSimpleName()); env = enter.getClassEnv(((JCClassDecl)tree).sym); + if (env == null) return null; break; case METHOD: // System.err.println("METHOD: " + ((JCMethodDecl)tree).sym.getSimpleName()); diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java index 19208ffdca3..4869ae36bae 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java @@ -156,6 +156,7 @@ public class Enter extends JCTree.Visitor { public Env getClassEnv(TypeSymbol sym) { Env localEnv = getEnv(sym); + if (localEnv == null) return null; Env lintEnv = localEnv; while (lintEnv.info.lint == null) lintEnv = lintEnv.next; diff --git a/langtools/test/tools/javac/doclint/NPEDuplicateClassNamesTest.java b/langtools/test/tools/javac/doclint/NPEDuplicateClassNamesTest.java new file mode 100644 index 00000000000..f55bf904952 --- /dev/null +++ b/langtools/test/tools/javac/doclint/NPEDuplicateClassNamesTest.java @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8174073 + * @summary NPE caused by link reference to class + * @modules jdk.compiler/com.sun.tools.javac.api + * jdk.compiler/com.sun.tools.javac.main + * @library /tools/lib + * @build toolbox.JavacTask toolbox.TestRunner toolbox.ToolBox + * @run main NPEDuplicateClassNamesTest + */ + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Arrays; +import java.util.List; +import java.util.Objects; + +import toolbox.JavacTask; +import toolbox.Task; +import toolbox.TestRunner; +import toolbox.ToolBox; + +public class NPEDuplicateClassNamesTest extends TestRunner { + + public static void main(String... args) throws Exception { + NPEDuplicateClassNamesTest t = new NPEDuplicateClassNamesTest(); + t.runTests(); + } + + private final ToolBox tb = new ToolBox(); + private final String class1 = + "package com;\n" + + "/***/\n" + + "public class MyClass {}"; + private final String class2 = + "package com;\n" + + "/**\n" + + " * The following link tag causes a NullPointerException: {@link Requirements}. \n" + + " */\n" + + "public class MyClass {}"; + + NPEDuplicateClassNamesTest() throws IOException { + super(System.err); + } + + @Test + public void testDuplicateClassNames() throws IOException { + Path src = Paths.get("src"); + Path one = src.resolve("one"); + Path two = src.resolve("two"); + Path classes = Paths.get("classes"); + Files.createDirectories(classes); + tb.writeJavaFiles(one, class1); + tb.writeJavaFiles(two, class2); + + List expected = Arrays.asList( + "MyClass.java:5:8: compiler.err.duplicate.class: com.MyClass", + "MyClass.java:3:65: compiler.err.proc.messager: reference not found", + "2 errors"); + List output = new JavacTask(tb) + .outdir(classes) + .options("-XDrawDiagnostics", "-Xdoclint:all", "-XDdev") + .files(tb.findJavaFiles(src)) + .run(Task.Expect.FAIL) + .writeAll() + .getOutputLines(Task.OutputKind.DIRECT); + + if (!Objects.equals(output, expected)) { + throw new IllegalStateException("incorrect output; actual=" + output + "; expected=" + expected); + } + } +} From c7ca17f498899d099b84eaadb56b2c272ab83491 Mon Sep 17 00:00:00 2001 From: Matthias Baesken Date: Thu, 9 Feb 2017 09:27:47 +0100 Subject: [PATCH 098/447] 8174086: jspawnhelper build settings cleanup Reviewed-by: erikj --- jdk/make/launcher/Launcher-java.base.gmk | 33 ++++++------------------ 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/jdk/make/launcher/Launcher-java.base.gmk b/jdk/make/launcher/Launcher-java.base.gmk index e2688a821f3..0d2173c5d0f 100644 --- a/jdk/make/launcher/Launcher-java.base.gmk +++ b/jdk/make/launcher/Launcher-java.base.gmk @@ -135,34 +135,17 @@ endif ################################################################################ -BUILD_JSPAWNHELPER := -BUILD_JSPAWNHELPER_SRC := $(JDK_TOPDIR)/src/java.base/unix/native/jspawnhelper -JSPAWNHELPER_CFLAGS := -I$(JDK_TOPDIR)/src/java.base/unix/native/libjava -BUILD_JSPAWNHELPER_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base -LINK_JSPAWNHELPER_OBJECTS := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc.o -BUILD_JSPAWNHELPER_LDFLAGS := - ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), ) - BUILD_JSPAWNHELPER := 1 -endif - -ifeq ($(OPENJDK_TARGET_CPU_BITS), 64) - BUILD_JSPAWNHELPER_LDFLAGS += $(COMPILER_TARGET_BITS_FLAG)64 -endif - -ifeq ($(BUILD_JSPAWNHELPER), 1) - $(eval $(call SetupNativeCompilation,BUILD_JSPAWNHELPER, \ - SRC := $(BUILD_JSPAWNHELPER_SRC), \ - INCLUDE_FILES := jspawnhelper.c, \ + $(eval $(call SetupNativeCompilation, BUILD_JSPAWNHELPER, \ + SRC := $(JDK_TOPDIR)/src/$(MODULE)/unix/native/jspawnhelper, \ OPTIMIZATION := LOW, \ - CFLAGS := $(CFLAGS_JDKEXE) $(JSPAWNHELPER_CFLAGS), \ - LDFLAGS := $(LDFLAGS_JDKEXE) $(BUILD_JSPAWNHELPER_LDFLAGS), \ - LIBS := $(LINK_JSPAWNHELPER_OBJECTS), \ + CFLAGS := $(CFLAGS_JDKEXE) -I$(JDK_TOPDIR)/src/$(MODULE)/unix/native/libjava, \ + EXTRA_OBJECT_FILES := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc.o, \ + LDFLAGS := $(LDFLAGS_JDKEXE), \ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jspawnhelper, \ - OUTPUT_DIR := $(BUILD_JSPAWNHELPER_DST_DIR), \ - PROGRAM := jspawnhelper)) - - $(BUILD_JSPAWNHELPER): $(LINK_JSPAWNHELPER_OBJECTS) + OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \ + PROGRAM := jspawnhelper, \ + )) TARGETS += $(BUILD_JSPAWNHELPER) endif From 100d9a59ad329b065e48acbfe0bf9f17156f46aa Mon Sep 17 00:00:00 2001 From: Frank Yuan Date: Thu, 9 Feb 2017 16:47:39 +0800 Subject: [PATCH 099/447] 8173290: 3% regression in SPECjvm2008-XML with b150 Reviewed-by: joehw --- .../xml/internal/serializer/ToHTMLStream.java | 52 +++--- .../xml/internal/serializer/ToStream.java | 155 ++++++++---------- .../xml/internal/serializer/ToXMLStream.java | 20 +-- 3 files changed, 99 insertions(+), 128 deletions(-) diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToHTMLStream.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToHTMLStream.java index 502a8b8debb..3d510286d63 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToHTMLStream.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToHTMLStream.java @@ -717,7 +717,9 @@ public final class ToHTMLStream extends ToStream */ public final void endDocument() throws org.xml.sax.SAXException { - flushCharactersBuffer(); + if (m_doIndent) { + flushCharactersBuffer(); + } flushPending(); if (m_doIndent && !m_isprevtext) { @@ -776,9 +778,11 @@ public final class ToHTMLStream extends ToStream Attributes atts) throws SAXException { - // will add extra one if having namespace but no matter - m_childNodeNum++; - flushCharactersBuffer(); + if (m_doIndent) { + // will add extra one if having namespace but no matter + m_childNodeNum++; + flushCharactersBuffer(); + } ElemContext elemContext = m_elemContext; // clean up any pending things first @@ -839,8 +843,10 @@ public final class ToHTMLStream extends ToStream writer.write('<'); writer.write(name); - m_childNodeNumStack.push(m_childNodeNum); - m_childNodeNum = 0; + if (m_doIndent) { + m_childNodeNumStack.add(m_childNodeNum); + m_childNodeNum = 0; + } if (m_tracer != null) firePseudoAttributes(); @@ -915,7 +921,9 @@ public final class ToHTMLStream extends ToStream final String name) throws org.xml.sax.SAXException { - flushCharactersBuffer(); + if (m_doIndent) { + flushCharactersBuffer(); + } // deal with any pending issues if (m_cdataTagOpen) closeCDATA(); @@ -997,12 +1005,11 @@ public final class ToHTMLStream extends ToStream } } - m_childNodeNum = m_childNodeNumStack.pop(); - // clean up because the element has ended - if ((elemFlags & ElemDesc.WHITESPACESENSITIVE) != 0) - m_ispreserve = true; - m_isprevtext = false; - + if (m_doIndent) { + m_childNodeNum = m_childNodeNumStack.remove(m_childNodeNumStack.size() - 1); + // clean up because the element has ended + m_isprevtext = false; + } // fire off the end element event if (m_tracer != null) super.fireEndElem(name); @@ -1018,11 +1025,6 @@ public final class ToHTMLStream extends ToStream } // some more clean because the element has ended. - if (!elemContext.m_startTagOpen) - { - if (m_doIndent && !m_preserves.isEmpty()) - m_preserves.pop(); - } m_elemContext = elemContext.m_prev; // m_isRawStack.pop(); } @@ -1525,7 +1527,6 @@ public final class ToHTMLStream extends ToStream closeStartTag(); m_elemContext.m_startTagOpen = false; } - m_ispreserve = true; // With m_ispreserve just set true it looks like shouldIndent() // will always return false, so drop any possible indentation. @@ -1602,8 +1603,6 @@ public final class ToHTMLStream extends ToStream m_elemContext.m_startTagOpen = false; } - m_ispreserve = true; - if (shouldIndent()) indent(); @@ -1640,8 +1639,10 @@ public final class ToHTMLStream extends ToStream public void processingInstruction(String target, String data) throws org.xml.sax.SAXException { - m_childNodeNum++; - flushCharactersBuffer(); + if (m_doIndent) { + m_childNodeNum++; + flushCharactersBuffer(); + } // Process any pending starDocument and startElement first. flushPending(); @@ -1790,11 +1791,6 @@ public final class ToHTMLStream extends ToStream */ if (m_StringOfCDATASections != null) m_elemContext.m_isCdataSection = isCdataSection(); - if (m_doIndent) - { - m_isprevtext = false; - m_preserves.push(m_ispreserve); - } } catch(IOException e) diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java index 994a7800d97..352ce1b8cc4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java @@ -20,34 +20,36 @@ package com.sun.org.apache.xml.internal.serializer; -import com.sun.org.apache.xalan.internal.utils.SecuritySupport; -import com.sun.org.apache.xml.internal.serializer.utils.MsgKey; -import com.sun.org.apache.xml.internal.serializer.utils.Utils; -import com.sun.org.apache.xml.internal.serializer.utils.WrappedRuntimeException; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.UnsupportedEncodingException; import java.io.Writer; -import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; -import java.util.Deque; import java.util.EmptyStackException; import java.util.Enumeration; +import java.util.Iterator; +import java.util.List; import java.util.Properties; -import java.util.Queue; import java.util.Set; import java.util.StringTokenizer; + import javax.xml.transform.ErrorListener; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; + import org.w3c.dom.Node; import org.xml.sax.Attributes; import org.xml.sax.ContentHandler; import org.xml.sax.SAXException; +import com.sun.org.apache.xalan.internal.utils.SecuritySupport; +import com.sun.org.apache.xml.internal.serializer.utils.MsgKey; +import com.sun.org.apache.xml.internal.serializer.utils.Utils; +import com.sun.org.apache.xml.internal.serializer.utils.WrappedRuntimeException; + /** * This abstract class is a base class for other stream * serializers (xml, html, text ...) that write output to a stream. @@ -103,7 +105,7 @@ abstract public class ToStream extends SerializerBase { * If m_childNodeNum > 1, the text node will be indented. * */ - protected Deque m_childNodeNumStack = new ArrayDeque<>(); + protected List m_childNodeNumStack = new ArrayList<>(); protected int m_childNodeNum = 0; @@ -115,26 +117,6 @@ abstract public class ToStream extends SerializerBase { protected boolean m_ispreserveSpace = false; - /** - * Stack to keep track of whether or not we need to - * preserve whitespace. - * - * Used to push/pop values used for the field m_ispreserve, but - * m_ispreserve is only relevant if m_doIndent is true. - * If m_doIndent is false this field has no impact. - * - */ - protected BoolStack m_preserves = new BoolStack(); - - /** - * State flag to tell if preservation of whitespace - * is important. - * - * Used only in shouldIndent() but only if m_doIndent is true. - * If m_doIndent is false this flag has no impact. - * - */ - protected boolean m_ispreserve = false; /** * State flag that tells if the previous node processed @@ -1267,7 +1249,6 @@ abstract public class ToStream extends SerializerBase { closeStartTag(); m_elemContext.m_startTagOpen = false; } - m_ispreserve = true; if (shouldIndent()) indent(); @@ -1357,8 +1338,6 @@ abstract public class ToStream extends SerializerBase { m_elemContext.m_startTagOpen = false; } - m_ispreserve = true; - m_writer.write(ch, start, length); } catch (IOException e) @@ -1405,8 +1384,8 @@ abstract public class ToStream extends SerializerBase { if (length == 0 || (isInEntityRef())) return; - final boolean shouldFormat = shouldFormatOutput(); - if (m_elemContext.m_startTagOpen && !shouldFormat) + final boolean shouldNotFormat = !shouldFormatOutput(); + if (m_elemContext.m_startTagOpen && shouldNotFormat) { closeStartTag(); m_elemContext.m_startTagOpen = false; @@ -1441,16 +1420,16 @@ abstract public class ToStream extends SerializerBase { return; } - if (m_elemContext.m_startTagOpen && !shouldFormat) + if (m_elemContext.m_startTagOpen && shouldNotFormat) { closeStartTag(); m_elemContext.m_startTagOpen = false; } - if (shouldFormat) { - m_charactersBuffer.addText(chars, start, length); - } else { + if (shouldNotFormat) { outputCharacters(chars, start, length); + } else { + m_charactersBuffer.addText(chars, start, length); } // time to fire off characters generation event @@ -1465,7 +1444,7 @@ abstract public class ToStream extends SerializerBase { * @return True if the content should be formatted. */ protected boolean shouldFormatOutput() { - return !m_ispreserveSpace && m_doIndent; + return m_doIndent && !m_ispreserveSpace; } /** @@ -1506,12 +1485,6 @@ abstract public class ToStream extends SerializerBase { i = lastDirty; } } - /* If there is some non-whitespace, mark that we may need - * to preserve this. This is only important if we have indentation on. - */ - if (i < end) - m_ispreserve = true; - // int lengthClean; // number of clean characters in a row // final boolean[] isAsciiClean = m_charInfo.getASCIIClean(); @@ -1858,8 +1831,10 @@ abstract public class ToStream extends SerializerBase { if (isInEntityRef()) return; - m_childNodeNum++; - flushCharactersBuffer(); + if (m_doIndent) { + m_childNodeNum++; + flushCharactersBuffer(); + } if (m_needToCallStartDocument) { @@ -1890,8 +1865,6 @@ abstract public class ToStream extends SerializerBase { if (namespaceURI != null) ensurePrefixIsDeclared(namespaceURI, name); - m_ispreserve = false; - if (shouldIndent() && m_startNewLine) { indent(); @@ -1912,11 +1885,13 @@ abstract public class ToStream extends SerializerBase { if (atts != null) addAttributes(atts); - m_ispreserveSpace = m_preserveSpaces.peekOrFalse(); - m_preserveSpaces.push(m_ispreserveSpace); + if (m_doIndent) { + m_ispreserveSpace = m_preserveSpaces.peekOrFalse(); + m_preserveSpaces.push(m_ispreserveSpace); - m_childNodeNumStack.push(m_childNodeNum); - m_childNodeNum = 0; + m_childNodeNumStack.add(m_childNodeNum); + m_childNodeNum = 0; + } m_elemContext = m_elemContext.push(namespaceURI,localName,name); m_isprevtext = false; @@ -2128,7 +2103,9 @@ abstract public class ToStream extends SerializerBase { if (isInEntityRef()) return; - flushCharactersBuffer(); + if (m_doIndent) { + flushCharactersBuffer(); + } // namespaces declared at the current depth are no longer valid // so get rid of them m_prefixMap.popNamespaces(m_elemContext.m_currentElemDepth, null); @@ -2175,16 +2152,13 @@ abstract public class ToStream extends SerializerBase { throw new SAXException(e); } - if (!m_elemContext.m_startTagOpen && m_doIndent) - { - m_ispreserve = m_preserves.isEmpty() ? false : m_preserves.pop(); + if (m_doIndent) { + m_ispreserveSpace = m_preserveSpaces.popAndTop(); + m_childNodeNum = m_childNodeNumStack.remove(m_childNodeNumStack.size() - 1); + + m_isprevtext = false; } - m_ispreserveSpace = m_preserveSpaces.popAndTop(); - m_childNodeNum = m_childNodeNumStack.pop(); - - m_isprevtext = false; - // fire off the end element event if (m_tracer != null) super.fireEndElem(name); @@ -2320,8 +2294,10 @@ abstract public class ToStream extends SerializerBase { int start_old = start; if (isInEntityRef()) return; - m_childNodeNum++; - flushCharactersBuffer(); + if (m_doIndent) { + m_childNodeNum++; + flushCharactersBuffer(); + } if (m_elemContext.m_startTagOpen) { closeStartTag(); @@ -2501,8 +2477,10 @@ abstract public class ToStream extends SerializerBase { */ public void startCDATA() throws org.xml.sax.SAXException { - m_childNodeNum++; - flushCharactersBuffer(); + if (m_doIndent) { + m_childNodeNum++; + flushCharactersBuffer(); + } m_cdataStartCalled = true; } @@ -2588,12 +2566,6 @@ abstract public class ToStream extends SerializerBase { */ if (m_StringOfCDATASections != null) m_elemContext.m_isCdataSection = isCdataSection(); - - if (m_doIndent) - { - m_isprevtext = false; - m_preserves.push(m_ispreserve); - } } } @@ -2943,7 +2915,9 @@ abstract public class ToStream extends SerializerBase { String value, boolean xslAttribute) { - if (m_charactersBuffer.isAnyCharactersBuffered()) { + if (m_charactersBuffer.isNoCharactersBuffered()) { + return doAddAttributeAlways(uri, localName, rawName, type, value, xslAttribute); + } else { /* * If stylesheet includes xsl:copy-of an attribute node, XSLTC will * fire an addAttribute event. When a text node is handling in @@ -2954,8 +2928,6 @@ abstract public class ToStream extends SerializerBase { * */ return m_attributes.getIndex(rawName) < 0; - } else { - return doAddAttributeAlways(uri, localName, rawName, type, value, xslAttribute); } } @@ -3086,7 +3058,7 @@ abstract public class ToStream extends SerializerBase { } } - if (rawName.equals("xml:space")) { + if (m_doIndent && rawName.equals("xml:space")) { if (value.equals("preserve")) { m_ispreserveSpace = true; if (m_preserveSpaces.size() > 0) @@ -3227,8 +3199,6 @@ abstract public class ToStream extends SerializerBase { // Leave m_format alone for now - Brian M. // this.m_format = null; this.m_inDoctype = false; - this.m_ispreserve = false; - this.m_preserves.clear(); this.m_ispreserveSpace = false; this.m_preserveSpaces.clear(); this.m_childNodeNum = 0; @@ -3411,6 +3381,7 @@ abstract public class ToStream extends SerializerBase { } } + /** * This inner class is used to buffer the text nodes and the entity * reference nodes if indentation is on. There is only one CharacterBuffer @@ -3438,7 +3409,7 @@ abstract public class ToStream extends SerializerBase { abstract char[] toChars(); } - private Queue bufferedCharacters = new ArrayDeque<>(); + private List bufferedCharacters = new ArrayList<>(); /** * Append a text node to the buffer. @@ -3495,35 +3466,44 @@ abstract public class ToStream extends SerializerBase { } /** - * @return True if any GenericCharacters is already buffered. + * @return True if no GenericCharacters are buffered. */ - public boolean isAnyCharactersBuffered() { - return !bufferedCharacters.isEmpty(); + public boolean isNoCharactersBuffered() { + return bufferedCharacters.isEmpty(); } /** * @return True if any buffered GenericCharacters has content. */ public boolean hasContent() { - return bufferedCharacters.stream().anyMatch(GenericCharacters::hasContent); + for (GenericCharacters element : bufferedCharacters) { + if (element.hasContent()) + return true; + } + return false; } /** * Flush all buffered GenericCharacters. */ public void flush() throws SAXException { - GenericCharacters element; - while ((element = bufferedCharacters.poll()) != null) + Iterator itr = bufferedCharacters.iterator(); + while (itr.hasNext()) { + GenericCharacters element = itr.next(); element.flush(); + itr.remove(); + } } /** * Converts all buffered GenericCharacters to a new character array. */ public char[] toChars() { - return bufferedCharacters.stream().map(GenericCharacters::toChars) - .collect(StringBuilder::new, StringBuilder::append, StringBuilder::append).toString() - .toCharArray(); + StringBuilder sb = new StringBuilder(); + for (GenericCharacters element : bufferedCharacters) { + sb.append(element.toChars()); + } + return sb.toString().toCharArray(); } /** @@ -3534,6 +3514,7 @@ abstract public class ToStream extends SerializerBase { } } + // Implement DTDHandler /** * If this method is called, the serializer is used as a diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToXMLStream.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToXMLStream.java index 681737ebc88..add764619ae 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToXMLStream.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToXMLStream.java @@ -88,8 +88,6 @@ public final class ToXMLStream extends ToStream setOmitXMLDeclaration(xmlListener.getOmitXMLDeclaration()); - m_ispreserve = xmlListener.m_ispreserve; - m_preserves = xmlListener.m_preserves; m_ispreserveSpace = xmlListener.m_ispreserveSpace; m_preserveSpaces = xmlListener.m_preserveSpaces; m_childNodeNum = xmlListener.m_childNodeNum; @@ -201,7 +199,9 @@ public final class ToXMLStream extends ToStream */ public void endDocument() throws org.xml.sax.SAXException { - flushCharactersBuffer(); + if (m_doIndent) { + flushCharactersBuffer(); + } flushPending(); if (m_doIndent && !m_isprevtext) { @@ -235,11 +235,6 @@ public final class ToXMLStream extends ToStream */ public void startPreserving() throws org.xml.sax.SAXException { - - // Not sure this is really what we want. -sb - m_preserves.push(true); - - m_ispreserve = true; } /** @@ -251,9 +246,6 @@ public final class ToXMLStream extends ToStream */ public void endPreserving() throws org.xml.sax.SAXException { - - // Not sure this is really what we want. -sb - m_ispreserve = m_preserves.isEmpty() ? false : m_preserves.pop(); } /** @@ -273,8 +265,10 @@ public final class ToXMLStream extends ToStream if (isInEntityRef()) return; - m_childNodeNum++; - flushCharactersBuffer(); + if (m_doIndent) { + m_childNodeNum++; + flushCharactersBuffer(); + } flushPending(); if (target.equals(Result.PI_DISABLE_OUTPUT_ESCAPING)) From 2396020e93dcdccaf7751bef400c42166776185b Mon Sep 17 00:00:00 2001 From: Erik Joelsson Date: Thu, 9 Feb 2017 09:51:24 +0100 Subject: [PATCH 100/447] 8174172: Race when building java.base.jmod Reviewed-by: alanb, mchung --- make/Main.gmk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/make/Main.gmk b/make/Main.gmk index 22f43c2317d..18cac690f96 100644 --- a/make/Main.gmk +++ b/make/Main.gmk @@ -654,8 +654,7 @@ else # When creating a BUILDJDK, we don't need to add hashes to java.base, thus # we don't need to depend on all other jmods ifneq ($(CREATING_BUILDJDK), true) - java.base-jmod: jrtfs-jar $(filter-out java.base-jmod \ - $(addsuffix -jmod, $(call FindAllUpgradeableModules)), $(JMOD_TARGETS)) + java.base-jmod: jrtfs-jar $(filter-out java.base-jmod, $(JMOD_TARGETS)) endif # Building java.base-jmod requires all of hotspot to be built. From f343f201a5b62d4398c92896bdf2971c87e12f19 Mon Sep 17 00:00:00 2001 From: Sibabrata Sahoo Date: Thu, 9 Feb 2017 05:19:48 -0800 Subject: [PATCH 101/447] 8168423: Test Task: Custom system class loader + security manager + malformed policy file = recursive initialization If a malformed policy file is encountered when running with a custom system class loader then it leads to a recursive initialization issue Reviewed-by: mullan --- .../securityManager/ClassLoaderTest.java | 297 ++++++++++++++++++ .../securityManager/TestClassLoader.java | 34 ++ .../securityManager/TestClient.java | 34 ++ .../securityManager/malformed.policy | 4 + .../ClassLoader/securityManager/valid.policy | 4 + 5 files changed, 373 insertions(+) create mode 100644 jdk/test/java/lang/ClassLoader/securityManager/ClassLoaderTest.java create mode 100644 jdk/test/java/lang/ClassLoader/securityManager/TestClassLoader.java create mode 100644 jdk/test/java/lang/ClassLoader/securityManager/TestClient.java create mode 100644 jdk/test/java/lang/ClassLoader/securityManager/malformed.policy create mode 100644 jdk/test/java/lang/ClassLoader/securityManager/valid.policy diff --git a/jdk/test/java/lang/ClassLoader/securityManager/ClassLoaderTest.java b/jdk/test/java/lang/ClassLoader/securityManager/ClassLoaderTest.java new file mode 100644 index 00000000000..d1f1c39ad1d --- /dev/null +++ b/jdk/test/java/lang/ClassLoader/securityManager/ClassLoaderTest.java @@ -0,0 +1,297 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + + /* + * @test + * @bug 8168423 + * @summary Different types of ClassLoader running with(out) SecurityManager and + * (in)valid security policy file. + * @library /lib/testlibrary + * @modules java.base/jdk.internal.module + * @build JarUtils CompilerUtils + * @run main/timeout=240 ClassLoaderTest + */ +import java.io.File; +import java.io.OutputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; +import java.util.Map; +import java.util.HashMap; +import java.lang.module.ModuleDescriptor; +import jdk.internal.module.ModuleInfoWriter; +import jdk.testlibrary.ProcessTools; + +public class ClassLoaderTest { + + private static final String SRC = System.getProperty("test.src"); + private static final Path CL_SRC = Paths.get(SRC, "TestClassLoader.java"); + private static final Path C_SRC = Paths.get(SRC, "TestClient.java"); + private static final Path CL_BIN = Paths.get("classes", "clbin"); + private static final Path C_BIN = Paths.get("classes", "cbin"); + private static final Path ARTIFACT_DIR = Paths.get("jars"); + private static final Path VALID_POLICY = Paths.get(SRC, "valid.policy"); + private static final Path INVALID_POLICY + = Paths.get(SRC, "malformed.policy"); + private static final Path NO_POLICY = null; + private static final String LOCALE = "-Duser.language=en -Duser.region=US"; + /* + * Here is the naming convention followed for each jar. + * cl.jar - Regular custom class loader jar. + * mcl.jar - Modular custom class loader jar. + * c.jar - Regular client jar. + * mc.jar - Modular client jar. + * amc.jar - Modular client referring automated custom class loader jar. + */ + private static final Path CL_JAR = ARTIFACT_DIR.resolve("cl.jar"); + private static final Path MCL_JAR = ARTIFACT_DIR.resolve("mcl.jar"); + private static final Path C_JAR = ARTIFACT_DIR.resolve("c.jar"); + private static final Path MC_JAR = ARTIFACT_DIR.resolve("mc.jar"); + private static final Path AMC_JAR = ARTIFACT_DIR.resolve("amc.jar"); + private static final Map MSG_MAP = new HashMap<>(); + + static { + // This mapping help process finding expected message based + // on the key passed as argument while executing java command. + MSG_MAP.put("MissingModule", "Module cl not found, required by mc"); + MSG_MAP.put("ErrorPolicy", "java.security.policy: error parsing file"); + MSG_MAP.put( + "SystemCL", "jdk.internal.loader.ClassLoaders$AppClassLoader"); + MSG_MAP.put("CustomCL", "cl.TestClassLoader"); + } + + public static void main(String[] args) throws Exception { + + // Generates regular and modular jars before start processing it. + setUp(); + processForEachPolicyFile(); + } + + /** + * Test cases are based on the following logic, + * for (policyFile : {"NO_POLICY", "VALID", "MALFORMED"}) { + * for (classLoader : {"SystemClassLoader", "CustomClassLoader"}){ + * for (clientModule : {"NAMED", "AUTOMATIC", "UNNAMED"}) { + * for (classLoaderModule : {"NAMED", "AUTOMATIC", "UNNAMED"}) { + * Create and run java command for each possible Test case + * } + * } + * } + * } + */ + private static void processForEachPolicyFile() throws Exception { + + final String regCLloc = CL_JAR.toFile().getAbsolutePath(); + final String modCLloc = MCL_JAR.toFile().getAbsolutePath(); + final String regCloc = C_JAR.toFile().getAbsolutePath(); + final String modCloc = MC_JAR.toFile().getAbsolutePath(); + final String autoModCloc = AMC_JAR.toFile().getAbsolutePath(); + final String separator = File.pathSeparator; + + for (Path policy + : new Path[]{NO_POLICY, VALID_POLICY, INVALID_POLICY}) { + final String policyFile = (policy != null) + ? policy.toFile().getAbsolutePath() : null; + final boolean malformedPolicy + = (policy == null) ? false : policy.equals(INVALID_POLICY); + + for (boolean useSCL : new boolean[]{true, false}) { + final String clVmArg = (useSCL) ? "" + : "-Djava.system.class.loader=cl.TestClassLoader"; + final String autoAddModArg + = (useSCL) ? "" : "--add-modules=cl"; + final String addmodArg = (useSCL) ? "" : "--add-modules=mcl"; + final String sMArg = (policy != null) ? String.format( + "-Djava.security.manager -Djava.security.policy=%s", + policyFile) : ""; + final String smMsg = (policy != null) ? "With SecurityManager" + : "Without SecurityManager"; + final String expectedResult = ((!malformedPolicy) + ? ((useSCL) ? "PASS SystemCL" : "PASS CustomCL") + : "FAIL ErrorPolicy"); + + // NAMED-NAMED, NAMED-AUTOMATIC, NAMED-UNNAMED + System.out.printf("Case:- Modular Client and %s %s%n", + ((useSCL) ? "SystemClassLoader" + : "Modular CustomClassLoader"), smMsg); + execute(new String[]{String.format( + "--module-path %s%s%s %s %s %s -m mc/c.TestClient", + modCloc, separator, modCLloc, LOCALE, clVmArg, sMArg), + expectedResult}); + System.out.printf("Case:- Modular Client and %s %s%n", ((useSCL) + ? "SystemClassLoader" + : "Automatic modular CustomClassLoader"), smMsg); + execute(new String[]{String.format( + "--module-path %s%s%s %s %s %s -m mc/c.TestClient", + autoModCloc, separator, regCLloc, LOCALE, clVmArg, sMArg), + expectedResult}); + System.out.printf("Case:- Modular Client and %s %s%n", ((useSCL) + ? "SystemClassLoader" + : "Unknown modular CustomClassLoader"), smMsg); + execute(new String[]{String.format( + "--module-path %s -cp %s %s %s %s -m mc/c.TestClient", + autoModCloc, regCLloc, LOCALE, clVmArg, sMArg), + "FAIL MissingModule"}); + + // AUTOMATIC-NAMED, AUTOMATIC-AUTOMATIC, AUTOMATIC-UNNAMED + System.out.printf("Case:- Automated modular Client and %s %s%n", + ((useSCL) ? "SystemClassLoader" + : "Modular CustomClassLoader"), smMsg); + execute(new String[]{String.format( + "--module-path %s%s%s %s %s %s %s -m c/c.TestClient", + regCloc, separator, modCLloc, addmodArg, LOCALE, clVmArg, + sMArg), expectedResult}); + System.out.printf("Case:- Automated modular Client and %s %s%n", + ((useSCL) ? "SystemClassLoader" + : "Automatic modular CustomClassLoader"), + smMsg); + execute(new String[]{String.format( + "--module-path %s%s%s %s %s %s %s -m c/c.TestClient", + regCloc, separator, regCLloc, autoAddModArg, LOCALE, + clVmArg, sMArg), expectedResult}); + System.out.printf("Case:- Automated modular Client and %s %s%n", + ((useSCL) ? "SystemClassLoader" + : "Unknown modular CustomClassLoader"), smMsg); + execute(new String[]{String.format( + "--module-path %s -cp %s %s %s %s -m c/c.TestClient", + regCloc, regCLloc, LOCALE, clVmArg, sMArg), + expectedResult}); + + // UNNAMED-NAMED, UNNAMED-AUTOMATIC, UNNAMED-UNNAMED + System.out.printf("Case:- Unknown modular Client and %s %s%n", + ((useSCL) ? "SystemClassLoader" + : "Modular CustomClassLoader"), smMsg); + execute(new String[]{String.format( + "-cp %s --module-path %s %s %s %s %s c.TestClient", + regCloc, modCLloc, addmodArg, LOCALE, clVmArg, sMArg), + expectedResult}); + System.out.printf("Case:- Unknown modular Client and %s %s%n", + ((useSCL) ? "SystemClassLoader" + : "Automatic modular CustomClassLoader"), + smMsg); + execute(new String[]{String.format( + "-cp %s --module-path %s %s %s %s %s c.TestClient", + regCloc, regCLloc, autoAddModArg, LOCALE, clVmArg, sMArg), + expectedResult}); + System.out.printf("Case:- Unknown modular Client and %s %s%n", + ((useSCL) ? "SystemClassLoader" + : "Unknown modular CustomClassLoader"), smMsg); + execute(new String[]{String.format( + "-cp %s%s%s %s %s %s c.TestClient", regCloc, separator, + regCLloc, LOCALE, clVmArg, sMArg), expectedResult}); + + // Regular jars in module-path and Modular jars in class-path. + System.out.printf("Case:- Regular Client and %s " + + "inside --module-path %s.%n", ((useSCL) + ? "SystemClassLoader" + : "Unknown modular CustomClassLoader"), smMsg); + execute(new String[]{String.format( + "--module-path %s%s%s %s %s %s %s -m c/c.TestClient", + regCloc, separator, regCLloc, autoAddModArg, LOCALE, + clVmArg, sMArg), expectedResult}); + System.out.printf("Case:- Modular Client and %s in -cp %s%n", + ((useSCL) ? "SystemClassLoader" + : "Modular CustomClassLoader"), smMsg); + execute(new String[]{String.format( + "-cp %s%s%s %s %s %s c.TestClient", modCloc, separator, + modCLloc, LOCALE, clVmArg, sMArg), expectedResult}); + } + } + } + + /** + * Execute with command arguments and process the result. + */ + private static void execute(String[] args) throws Exception { + + String status = null; + String msgKey = null; + if ((args != null && args.length > 1)) { + String[] secArgs = args[1].split("\\s+"); + status = (secArgs.length > 0) ? secArgs[0] : null; + msgKey = (secArgs.length > 1) ? secArgs[1] : null; + } + String out = ProcessTools.executeTestJvm(args[0].split("\\s+")) + .getOutput(); + // Handle response. + if ((status != null && "PASS".equals(status) && msgKey != null + && out.contains(MSG_MAP.get(msgKey)))) { + System.out.printf("PASS: Expected Result: %s.%n", + MSG_MAP.get(msgKey)); + } else if ((status != null && "FAIL".equals(status) && msgKey != null + && out.contains(MSG_MAP.get(msgKey)))) { + System.out.printf("PASS: Expected Failure: %s.%n", + MSG_MAP.get(msgKey)); + } else if (out.contains("Exception") || out.contains("Error")) { + System.out.printf("OUTPUT: %s", out); + throw new RuntimeException("FAIL: Unknown Exception."); + } else { + System.out.printf("OUTPUT: %s", out); + throw new RuntimeException("FAIL: Unknown Test case found"); + } + } + + /** + * Creates regular/modular jar files for TestClient and TestClassLoader. + */ + private static void setUp() throws Exception { + + boolean compiled = CompilerUtils.compile(CL_SRC, CL_BIN); + compiled &= CompilerUtils.compile(C_SRC, C_BIN); + if (!compiled) { + throw new RuntimeException("Test Setup failed."); + } + // Generate regular jar files for TestClient and TestClassLoader + JarUtils.createJarFile(CL_JAR, CL_BIN); + JarUtils.createJarFile(C_JAR, C_BIN); + // Generate modular jar files for TestClient and TestClassLoader with + // their corresponding ModuleDescriptor. + Files.copy(CL_JAR, MCL_JAR, StandardCopyOption.REPLACE_EXISTING); + updateModuleDescr(MCL_JAR, ModuleDescriptor.module("mcl") + .exports("cl").requires("java.base").build()); + Files.copy(C_JAR, MC_JAR, StandardCopyOption.REPLACE_EXISTING); + updateModuleDescr(MC_JAR, ModuleDescriptor.module("mc") + .exports("c").requires("java.base").requires("mcl").build()); + Files.copy(C_JAR, AMC_JAR, StandardCopyOption.REPLACE_EXISTING); + updateModuleDescr(AMC_JAR, ModuleDescriptor.module("mc") + .exports("c").requires("java.base").requires("cl").build()); + } + + /** + * Update regular jars and include module-info.class inside it to make + * modular jars. + */ + private static void updateModuleDescr(Path jar, ModuleDescriptor mDescr) + throws Exception { + if (mDescr != null) { + Path dir = Files.createTempDirectory("tmp"); + Path mi = dir.resolve("module-info.class"); + try (OutputStream out = Files.newOutputStream(mi)) { + ModuleInfoWriter.write(mDescr, out); + } + System.out.format("Adding 'module-info.class' to jar '%s'%n", jar); + JarUtils.updateJarFile(jar, dir); + } + } +} diff --git a/jdk/test/java/lang/ClassLoader/securityManager/TestClassLoader.java b/jdk/test/java/lang/ClassLoader/securityManager/TestClassLoader.java new file mode 100644 index 00000000000..64892ae0638 --- /dev/null +++ b/jdk/test/java/lang/ClassLoader/securityManager/TestClassLoader.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package cl; + +public class TestClassLoader extends ClassLoader { + + /** + * This constructor is used to set the parent ClassLoader + */ + public TestClassLoader(ClassLoader parent) { + super(parent); + } + +} diff --git a/jdk/test/java/lang/ClassLoader/securityManager/TestClient.java b/jdk/test/java/lang/ClassLoader/securityManager/TestClient.java new file mode 100644 index 00000000000..de0fe1039e8 --- /dev/null +++ b/jdk/test/java/lang/ClassLoader/securityManager/TestClient.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package c; + +public class TestClient { + + public static void main(String[] args) { + + // Initialize policy file. + System.getProperty("test.src"); + System.out.printf("ContextClassLoader: %s%n", + Thread.currentThread().getContextClassLoader().toString()); + } +} diff --git a/jdk/test/java/lang/ClassLoader/securityManager/malformed.policy b/jdk/test/java/lang/ClassLoader/securityManager/malformed.policy new file mode 100644 index 00000000000..8afdf6913dc --- /dev/null +++ b/jdk/test/java/lang/ClassLoader/securityManager/malformed.policy @@ -0,0 +1,4 @@ +grant { + xyz; + permission java.util.PropertyPermission "test.src", "read"; +} \ No newline at end of file diff --git a/jdk/test/java/lang/ClassLoader/securityManager/valid.policy b/jdk/test/java/lang/ClassLoader/securityManager/valid.policy new file mode 100644 index 00000000000..54ef7d0a6d0 --- /dev/null +++ b/jdk/test/java/lang/ClassLoader/securityManager/valid.policy @@ -0,0 +1,4 @@ +grant codeBase "file:./jars/*" { + permission java.lang.RuntimePermission "createClassLoader"; + permission java.util.PropertyPermission "test.src", "read"; +}; \ No newline at end of file From e05d91747c78b57a60da6a8526071656b2a9c16d Mon Sep 17 00:00:00 2001 From: Maurizio Cimadamore Date: Thu, 9 Feb 2017 15:19:05 +0000 Subject: [PATCH 102/447] 8174249: Regression in generic method unchecked calls Erasure for unchecked call occurs too early after JDK-8078093 Reviewed-by: vromero --- .../com/sun/tools/javac/comp/Attr.java | 14 +++-- .../com/sun/tools/javac/comp/Infer.java | 8 ++- .../generics/inference/8174249/T8174249a.java | 54 +++++++++++++++++ .../generics/inference/8174249/T8174249b.java | 59 +++++++++++++++++++ 4 files changed, 129 insertions(+), 6 deletions(-) create mode 100644 langtools/test/tools/javac/generics/inference/8174249/T8174249a.java create mode 100644 langtools/test/tools/javac/generics/inference/8174249/T8174249b.java diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java index 353bb1fb7a8..8e3430a271c 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java @@ -3994,10 +3994,16 @@ public class Attr extends JCTree.Visitor { rs.methodArguments(argtypes.map(checkDeferredMap)), kindName(sym.location()), sym.location()); - owntype = new MethodType(owntype.getParameterTypes(), - types.erasure(owntype.getReturnType()), - types.erasure(owntype.getThrownTypes()), - syms.methodClass); + if (resultInfo.pt != Infer.anyPoly || + !owntype.hasTag(METHOD) || + !owntype.isPartial()) { + //if this is not a partially inferred method type, erase return type. Otherwise, + //erasure is carried out in PartiallyInferredMethodType.check(). + owntype = new MethodType(owntype.getParameterTypes(), + types.erasure(owntype.getReturnType()), + types.erasure(owntype.getThrownTypes()), + syms.methodClass); + } } PolyKind pkind = (sym.type.hasTag(FORALL) && diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java index 184e43863aa..d2d299b1107 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java @@ -319,7 +319,8 @@ public class Infer { * need to use it several times: with several targets. */ saved_undet = inferenceContext.save(); - if (allowGraphInference && !warn.hasNonSilentLint(Lint.LintCategory.UNCHECKED)) { + boolean unchecked = warn.hasNonSilentLint(Lint.LintCategory.UNCHECKED); + if (allowGraphInference && !unchecked) { boolean shouldPropagate = shouldPropagate(getReturnType(), resultInfo, inferenceContext); InferenceContext minContext = shouldPropagate ? @@ -338,7 +339,10 @@ public class Infer { } } inferenceContext.solve(noWarnings); - return inferenceContext.asInstType(this).getReturnType(); + Type ret = inferenceContext.asInstType(this).getReturnType(); + //inline logic from Attr.checkMethod - if unchecked conversion was required, erase + //return type _after_ resolution + return unchecked ? types.erasure(ret) : ret; } catch (InferenceException ex) { resultInfo.checkContext.report(null, ex.getDiagnostic()); Assert.error(); //cannot get here (the above should throw) diff --git a/langtools/test/tools/javac/generics/inference/8174249/T8174249a.java b/langtools/test/tools/javac/generics/inference/8174249/T8174249a.java new file mode 100644 index 00000000000..80ebfa48d75 --- /dev/null +++ b/langtools/test/tools/javac/generics/inference/8174249/T8174249a.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8174249 + * @summary Regression in generic method unchecked calls + * @compile T8174249a.java + */ + +import java.util.ArrayList; +import java.util.Collection; + +class T8174249a { + static T foo(Class c, Collection baz) { +return null; + } + + static void bar(String c) { } + + void test() { + // this works + bar(foo(String.class, new ArrayList())); + + // this works with a warning + String s = foo(String.class, new ArrayList()); + bar(s); + + // this causes an error on JDK9 but should work + bar(foo(String.class, new ArrayList())); + } +} diff --git a/langtools/test/tools/javac/generics/inference/8174249/T8174249b.java b/langtools/test/tools/javac/generics/inference/8174249/T8174249b.java new file mode 100644 index 00000000000..a7f175fc0d8 --- /dev/null +++ b/langtools/test/tools/javac/generics/inference/8174249/T8174249b.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8174249 + * @summary Regression in generic method unchecked calls + * @compile T8174249b.java + */ + +import java.util.*; + +class T8174249b { + + static void cs(Collection cs) {} + + void test1(Collection c) { + cs(rawCollection((Class)null)); + Collection cs1 = rawCollection((Class)null); + } + + void test2(Collection c) { + cs(rawCollection2((Class)null)); + Collection cs2 = rawCollection2((Class)null); + } + + void test3(Collection c) { + cs(rawCollection3((Class)null)); + Collection cs3 = rawCollection2((Class)null); + } + + Collection rawCollection(Class cs) { return null; } + + Collection rawCollection2(Class cs) { return null; } + + Collection rawCollection3(Class cs) { return null; } +} From 1e4efa15be39a5be418071ad29d99037d5319383 Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Thu, 9 Feb 2017 07:48:19 -0800 Subject: [PATCH 103/447] 8173387: java/nio/channels/Selector/SelectTimeout.java failed with "Test timed out early with timeout 100000000999" Corrected timing problem with multiple threads setting static variables Reviewed-by: clanger, alanb --- .../nio/channels/Selector/SelectTimeout.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/jdk/test/java/nio/channels/Selector/SelectTimeout.java b/jdk/test/java/nio/channels/Selector/SelectTimeout.java index 797a36386ae..cc4de4bacf3 100644 --- a/jdk/test/java/nio/channels/Selector/SelectTimeout.java +++ b/jdk/test/java/nio/channels/Selector/SelectTimeout.java @@ -30,14 +30,13 @@ */ import java.io.IOException; import java.nio.channels.Selector; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicReference; public class SelectTimeout { private static final long BIG_TIMEOUT = 100_000_001_000L; // 8165000 private static final long BIGGER_TIMEOUT = 850_000_000_000_000L; // 8172547 - private static final long SLEEP_MILLIS = 10000; - - private static volatile Exception theException; - private static volatile boolean isTimedOut; + private static final long SLEEP_MILLIS = 10_000; public static void main(String[] args) throws IOException, InterruptedException { @@ -59,17 +58,18 @@ public class SelectTimeout { private static boolean test(final long timeout) throws InterruptedException, IOException { - theException = null; + AtomicReference theException = + new AtomicReference<>(); + AtomicBoolean isTimedOut = new AtomicBoolean(); Selector selector = Selector.open(); Thread t = new Thread(() -> { try { - isTimedOut = false; selector.select(timeout); - isTimedOut = true; + isTimedOut.set(true); } catch (IOException ioe) { - theException = ioe; + theException.set(ioe); } }); t.start(); @@ -77,8 +77,8 @@ public class SelectTimeout { t.join(SLEEP_MILLIS); boolean result; - if (theException == null) { - if (timeout > SLEEP_MILLIS && isTimedOut) { + if (theException.get() == null) { + if (timeout > SLEEP_MILLIS && isTimedOut.get()) { System.err.printf("Test timed out early with timeout %d%n", timeout); result = false; @@ -88,11 +88,12 @@ public class SelectTimeout { } } else { System.err.printf("Test failed with timeout %d%n", timeout); - theException.printStackTrace(); + theException.get().printStackTrace(); result = false; } t.interrupt(); + selector.close(); return result; } From 166d605e55afe3143cd0e64457db18e2cbeda55a Mon Sep 17 00:00:00 2001 From: Mark Sheppard Date: Thu, 9 Feb 2017 15:56:40 +0000 Subject: [PATCH 104/447] 8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties Reviewed-by: lancea, alanb --- jdk/test/TEST.groups | 1 + jdk/test/org/omg/CORBA/OrbPropertiesTest.java | 78 +++++++ jdk/test/org/omg/CORBA/TestOrbImpl.java | 203 ++++++++++++++++++ .../org/omg/CORBA/TestSingletonOrbImpl.java | 203 ++++++++++++++++++ jdk/test/org/omg/CORBA/jtreg.test.policy | 32 +++ 5 files changed, 517 insertions(+) create mode 100644 jdk/test/org/omg/CORBA/OrbPropertiesTest.java create mode 100644 jdk/test/org/omg/CORBA/TestOrbImpl.java create mode 100644 jdk/test/org/omg/CORBA/TestSingletonOrbImpl.java create mode 100644 jdk/test/org/omg/CORBA/jtreg.test.policy diff --git a/jdk/test/TEST.groups b/jdk/test/TEST.groups index 3c8b8c60caf..c682ce2c41b 100644 --- a/jdk/test/TEST.groups +++ b/jdk/test/TEST.groups @@ -273,6 +273,7 @@ jdk_other = \ jdk/internal/jline \ com/sun/jndi \ com/sun/corba \ + org/omg/CORBA \ lib/testlibrary \ sample diff --git a/jdk/test/org/omg/CORBA/OrbPropertiesTest.java b/jdk/test/org/omg/CORBA/OrbPropertiesTest.java new file mode 100644 index 00000000000..977b2e9b110 --- /dev/null +++ b/jdk/test/org/omg/CORBA/OrbPropertiesTest.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.BufferedWriter; +import java.io.FileWriter; +import java.io.IOException; +import java.io.PrintWriter; + +import org.omg.CORBA.ORB; + +/* + * @test + * @bug 8049375 + * @summary Extend how the org.omg.CORBA.ORB handles the search for orb.properties + * @library /lib/testlibrary + * @build jdk.testlibrary.* + * @modules java.corba + * @compile OrbPropertiesTest.java TestOrbImpl.java TestSingletonOrbImpl.java + * @run main/othervm + * -Djava.naming.provider.url=iiop://localhost:1050 + * -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory + * OrbPropertiesTest -port 1049 + * @run main/othervm/secure=java.lang.SecurityManager/policy=jtreg.test.policy + * -Djava.naming.provider.url=iiop://localhost:3050 + * -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory + * OrbPropertiesTest -port 3049 + */ +public class OrbPropertiesTest { + + public static void main(String[] args) throws Exception { + updateOrbPropertiesFile(); + // create and initialize the ORB + ORB orb = ORB.init(args, null); + if (!(orb instanceof TestOrbImpl)) { + throw new RuntimeException("org.omg.CORBA.ORBClass property not set as expected"); + } + ORB singletonOrb = ORB.init(); + System.out.println("singletonOrb class == " + singletonOrb.getClass().getName()); + if (!(singletonOrb instanceof TestSingletonOrbImpl)) { + throw new RuntimeException("org.omg.CORBA.ORBSingletonClass property not set as expected"); + } + + } + + private static void updateOrbPropertiesFile() throws Exception { + String orbPropertiesFile = System.getProperty("java.home", ".") + "/conf/orb.properties"; + String orbClassMapping = "org.omg.CORBA.ORBClass TestOrbImpl"; + String orbSingletonClassMapping = "org.omg.CORBA.ORBSingletonClass TestSingletonOrbImpl"; + String orbPropertiesMappings = orbClassMapping + "\n" + orbSingletonClassMapping +"\n"; + try (PrintWriter hfPWriter = new PrintWriter(new BufferedWriter( + new FileWriter(orbPropertiesFile, false)))) { + hfPWriter.println(orbPropertiesMappings); + } catch (IOException ioEx) { + ioEx.printStackTrace(); + throw ioEx; + } + } +} diff --git a/jdk/test/org/omg/CORBA/TestOrbImpl.java b/jdk/test/org/omg/CORBA/TestOrbImpl.java new file mode 100644 index 00000000000..1dd7d661b3a --- /dev/null +++ b/jdk/test/org/omg/CORBA/TestOrbImpl.java @@ -0,0 +1,203 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.applet.Applet; +import java.util.Properties; + +import org.omg.CORBA.Any; +import org.omg.CORBA.Context; +import org.omg.CORBA.ContextList; +import org.omg.CORBA.Environment; +import org.omg.CORBA.ExceptionList; +import org.omg.CORBA.NVList; +import org.omg.CORBA.NamedValue; +import org.omg.CORBA.ORB; +import org.omg.CORBA.Object; +import org.omg.CORBA.Request; +import org.omg.CORBA.StructMember; +import org.omg.CORBA.TCKind; +import org.omg.CORBA.TypeCode; +import org.omg.CORBA.UnionMember; +import org.omg.CORBA.WrongTransaction; +import org.omg.CORBA.ORBPackage.InvalidName; +import org.omg.CORBA.portable.OutputStream; + + +public class TestOrbImpl extends ORB{ + + @Override + protected void set_parameters(String[] args, Properties props) { + + } + + @Override + protected void set_parameters(Applet app, Properties props) { + + } + + @Override + public String[] list_initial_services() { + return null; + } + + @Override + public Object resolve_initial_references(String object_name) + throws InvalidName { + return null; + } + + @Override + public String object_to_string(Object obj) { + return null; + } + + @Override + public Object string_to_object(String str) { + return null; + } + + @Override + public NVList create_list(int count) { + return null; + } + + @Override + public NamedValue create_named_value(String s, Any any, int flags) { + return null; + } + + @Override + public ExceptionList create_exception_list() { + return null; + } + + @Override + public ContextList create_context_list() { + return null; + } + + @Override + public Context get_default_context() { + return null; + } + + @Override + public Environment create_environment() { + return null; + } + + @Override + public OutputStream create_output_stream() { + return null; + } + + @Override + public void send_multiple_requests_oneway(Request[] req) { + + } + + @Override + public void send_multiple_requests_deferred(Request[] req) { + + } + + @Override + public boolean poll_next_response() { + return false; + } + + @Override + public Request get_next_response() throws WrongTransaction { + return null; + } + + @Override + public TypeCode get_primitive_tc(TCKind tcKind) { + return null; + } + + @Override + public TypeCode create_struct_tc(String id, String name, + StructMember[] members) { + return null; + } + + @Override + public TypeCode create_union_tc(String id, String name, + TypeCode discriminator_type, UnionMember[] members) { + return null; + } + + @Override + public TypeCode create_enum_tc(String id, String name, String[] members) { + return null; + } + + @Override + public TypeCode create_alias_tc(String id, String name, + TypeCode original_type) { + return null; + } + + @Override + public TypeCode create_exception_tc(String id, String name, + StructMember[] members) { + return null; + } + + @Override + public TypeCode create_interface_tc(String id, String name) { + return null; + } + + @Override + public TypeCode create_string_tc(int bound) { + return null; + } + + @Override + public TypeCode create_wstring_tc(int bound) { + return null; + } + + @Override + public TypeCode create_sequence_tc(int bound, TypeCode element_type) { + return null; + } + + @Override + public TypeCode create_recursive_sequence_tc(int bound, int offset) { + return null; + } + + @Override + public TypeCode create_array_tc(int length, TypeCode element_type) { + return null; + } + + @Override + public Any create_any() { + return null; + } + +} diff --git a/jdk/test/org/omg/CORBA/TestSingletonOrbImpl.java b/jdk/test/org/omg/CORBA/TestSingletonOrbImpl.java new file mode 100644 index 00000000000..fb6a26f807a --- /dev/null +++ b/jdk/test/org/omg/CORBA/TestSingletonOrbImpl.java @@ -0,0 +1,203 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.applet.Applet; +import java.util.Properties; + +import org.omg.CORBA.Any; +import org.omg.CORBA.Context; +import org.omg.CORBA.ContextList; +import org.omg.CORBA.Environment; +import org.omg.CORBA.ExceptionList; +import org.omg.CORBA.NVList; +import org.omg.CORBA.NamedValue; +import org.omg.CORBA.ORB; +import org.omg.CORBA.Object; +import org.omg.CORBA.Request; +import org.omg.CORBA.StructMember; +import org.omg.CORBA.TCKind; +import org.omg.CORBA.TypeCode; +import org.omg.CORBA.UnionMember; +import org.omg.CORBA.WrongTransaction; +import org.omg.CORBA.ORBPackage.InvalidName; +import org.omg.CORBA.portable.OutputStream; + + +public class TestSingletonOrbImpl extends ORB { + + @Override + protected void set_parameters(String[] args, Properties props) { + + } + + @Override + protected void set_parameters(Applet app, Properties props) { + + } + + @Override + public String[] list_initial_services() { + return null; + } + + @Override + public Object resolve_initial_references(String object_name) + throws InvalidName { + return null; + } + + @Override + public String object_to_string(Object obj) { + return null; + } + + @Override + public Object string_to_object(String str) { + return null; + } + + @Override + public NVList create_list(int count) { + return null; + } + + @Override + public NamedValue create_named_value(String s, Any any, int flags) { + return null; + } + + @Override + public ExceptionList create_exception_list() { + return null; + } + + @Override + public ContextList create_context_list() { + return null; + } + + @Override + public Context get_default_context() { + return null; + } + + @Override + public Environment create_environment() { + return null; + } + + @Override + public OutputStream create_output_stream() { + return null; + } + + @Override + public void send_multiple_requests_oneway(Request[] req) { + + } + + @Override + public void send_multiple_requests_deferred(Request[] req) { + + } + + @Override + public boolean poll_next_response() { + return false; + } + + @Override + public Request get_next_response() throws WrongTransaction { + return null; + } + + @Override + public TypeCode get_primitive_tc(TCKind tcKind) { + return null; + } + + @Override + public TypeCode create_struct_tc(String id, String name, + StructMember[] members) { + return null; + } + + @Override + public TypeCode create_union_tc(String id, String name, + TypeCode discriminator_type, UnionMember[] members) { + return null; + } + + @Override + public TypeCode create_enum_tc(String id, String name, String[] members) { + return null; + } + + @Override + public TypeCode create_alias_tc(String id, String name, + TypeCode original_type) { + return null; + } + + @Override + public TypeCode create_exception_tc(String id, String name, + StructMember[] members) { + return null; + } + + @Override + public TypeCode create_interface_tc(String id, String name) { + return null; + } + + @Override + public TypeCode create_string_tc(int bound) { + return null; + } + + @Override + public TypeCode create_wstring_tc(int bound) { + return null; + } + + @Override + public TypeCode create_sequence_tc(int bound, TypeCode element_type) { + return null; + } + + @Override + public TypeCode create_recursive_sequence_tc(int bound, int offset) { + return null; + } + + @Override + public TypeCode create_array_tc(int length, TypeCode element_type) { + return null; + } + + @Override + public Any create_any() { + return null; + } + +} diff --git a/jdk/test/org/omg/CORBA/jtreg.test.policy b/jdk/test/org/omg/CORBA/jtreg.test.policy new file mode 100644 index 00000000000..0e24009f687 --- /dev/null +++ b/jdk/test/org/omg/CORBA/jtreg.test.policy @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +grant { + permission java.util.PropertyPermission "*", "read"; + permission java.io.FilePermission "<>", "read, write, execute"; +}; + +grant codeBase "file:${test.classes}/*" { + permission java.net.SocketPermission "*:*", "connect, accept, listen, resolve"; + permission java.lang.RuntimePermission "accessClassInPackage.com.sun.jndi.cosnaming"; +}; From 1acb3068594e182ee8b0dc29d3850f67cd967c78 Mon Sep 17 00:00:00 2001 From: Dmitry Chuyko Date: Thu, 9 Feb 2017 19:00:48 +0300 Subject: [PATCH 105/447] 8166110: Inlining through MH invokers/linkers in unreachable code is unsafe Reviewed-by: vlivanov --- hotspot/src/share/vm/opto/callGenerator.cpp | 107 ++++++++++++++++-- hotspot/src/share/vm/opto/callGenerator.hpp | 9 +- hotspot/src/share/vm/opto/doCall.cpp | 75 +----------- .../jsr292/InvokerSignatureMismatch.java | 58 ++++++++++ .../java/lang/invoke/MethodHandleHelper.java | 15 +++ 5 files changed, 179 insertions(+), 85 deletions(-) create mode 100644 hotspot/test/compiler/jsr292/InvokerSignatureMismatch.java diff --git a/hotspot/src/share/vm/opto/callGenerator.cpp b/hotspot/src/share/vm/opto/callGenerator.cpp index de9f44c359d..b1a68918486 100644 --- a/hotspot/src/share/vm/opto/callGenerator.cpp +++ b/hotspot/src/share/vm/opto/callGenerator.cpp @@ -46,7 +46,7 @@ const TypeFunc* CallGenerator::tf() const { return TypeFunc::make(method()); } -bool CallGenerator::is_inlined_mh_linker(JVMState* jvms, ciMethod* callee) { +bool CallGenerator::is_inlined_method_handle_intrinsic(JVMState* jvms, ciMethod* callee) { ciMethod* symbolic_info = jvms->method()->get_method_at_bci(jvms->bci()); return symbolic_info->is_method_handle_intrinsic() && !callee->is_method_handle_intrinsic(); } @@ -142,7 +142,7 @@ JVMState* DirectCallGenerator::generate(JVMState* jvms) { } CallStaticJavaNode *call = new CallStaticJavaNode(kit.C, tf(), target, method(), kit.bci()); - if (is_inlined_mh_linker(jvms, method())) { + if (is_inlined_method_handle_intrinsic(jvms, method())) { // To be able to issue a direct call and skip a call to MH.linkTo*/invokeBasic adapter, // additional information about the method being invoked should be attached // to the call site to make resolution logic work @@ -241,7 +241,7 @@ JVMState* VirtualCallGenerator::generate(JVMState* jvms) { address target = SharedRuntime::get_resolve_virtual_call_stub(); // Normal inline cache used for call CallDynamicJavaNode *call = new CallDynamicJavaNode(tf(), target, method(), _vtable_index, kit.bci()); - if (is_inlined_mh_linker(jvms, method())) { + if (is_inlined_method_handle_intrinsic(jvms, method())) { // To be able to issue a direct call (optimized virtual or virtual) // and skip a call to MH.linkTo*/invokeBasic adapter, additional information // about the method being invoked should be attached to the call site to @@ -785,8 +785,7 @@ JVMState* PredictedCallGenerator::generate(JVMState* jvms) { CallGenerator* CallGenerator::for_method_handle_call(JVMState* jvms, ciMethod* caller, ciMethod* callee, bool delayed_forbidden) { - assert(callee->is_method_handle_intrinsic() || - callee->is_compiled_lambda_form(), "for_method_handle_call mismatch"); + assert(callee->is_method_handle_intrinsic(), "for_method_handle_call mismatch"); bool input_not_const; CallGenerator* cg = CallGenerator::for_method_handle_inline(jvms, caller, callee, input_not_const); Compile* C = Compile::current(); @@ -810,6 +809,81 @@ CallGenerator* CallGenerator::for_method_handle_call(JVMState* jvms, ciMethod* c } } +static BasicType erase_to_word_type(BasicType bt) { + if (is_subword_type(bt)) return T_INT; + if (bt == T_ARRAY) return T_OBJECT; + return bt; +} + +static bool basic_types_match(ciType* t1, ciType* t2) { + if (t1 == t2) return true; + return erase_to_word_type(t1->basic_type()) == erase_to_word_type(t2->basic_type()); +} + +bool CallGenerator::ensure_mh_intrinsic_matches_target_method(ciMethod* linker, ciMethod* target) { + assert(linker->is_method_handle_intrinsic(), "sanity"); + assert(!target->is_method_handle_intrinsic(), "sanity"); + + // Linkers have appendix argument which is not passed to callee. + int has_appendix = MethodHandles::has_member_arg(linker->intrinsic_id()) ? 1 : 0; + if (linker->arg_size() != (target->arg_size() + has_appendix)) { + return false; // argument slot count mismatch + } + + ciSignature* linker_sig = linker->signature(); + ciSignature* target_sig = target->signature(); + + if (linker_sig->count() + (linker->is_static() ? 0 : 1) != + target_sig->count() + (target->is_static() ? 0 : 1) + has_appendix) { + return false; // argument count mismatch + } + + int sbase = 0, rbase = 0; + switch (linker->intrinsic_id()) { + case vmIntrinsics::_linkToVirtual: + case vmIntrinsics::_linkToInterface: + case vmIntrinsics::_linkToSpecial: { + if (target->is_static()) { + return false; + } + if (linker_sig->type_at(0)->is_primitive_type()) { + return false; // receiver should be an oop + } + sbase = 1; // skip receiver + break; + } + case vmIntrinsics::_linkToStatic: { + if (!target->is_static()) { + return false; + } + break; + } + case vmIntrinsics::_invokeBasic: { + if (target->is_static()) { + if (target_sig->type_at(0)->is_primitive_type()) { + return false; // receiver should be an oop + } + rbase = 1; // skip receiver + } + break; + } + } + assert(target_sig->count() - rbase == linker_sig->count() - sbase - has_appendix, "argument count mismatch"); + int arg_count = target_sig->count() - rbase; + for (int i = 0; i < arg_count; i++) { + if (!basic_types_match(linker_sig->type_at(sbase + i), target_sig->type_at(rbase + i))) { + return false; + } + } + // Only check the return type if the symbolic info has non-void return type. + // I.e. the return value of the resolved method can be dropped. + if (!linker->return_type()->is_void() && + !basic_types_match(linker->return_type(), target->return_type())) { + return false; + } + return true; // no mismatch found +} + CallGenerator* CallGenerator::for_method_handle_inline(JVMState* jvms, ciMethod* caller, ciMethod* callee, bool& input_not_const) { GraphKit kit(jvms); PhaseGVN& gvn = kit.gvn(); @@ -826,6 +900,13 @@ CallGenerator* CallGenerator::for_method_handle_inline(JVMState* jvms, ciMethod* const TypeOopPtr* oop_ptr = receiver->bottom_type()->is_oopptr(); ciMethod* target = oop_ptr->const_oop()->as_method_handle()->get_vmtarget(); const int vtable_index = Method::invalid_vtable_index; + + if (!ensure_mh_intrinsic_matches_target_method(callee, target)) { + print_inlining_failure(C, callee, jvms->depth() - 1, jvms->bci(), + "signatures mismatch"); + return NULL; + } + CallGenerator* cg = C->call_generator(target, vtable_index, false /* call_does_dispatch */, jvms, @@ -833,9 +914,8 @@ CallGenerator* CallGenerator::for_method_handle_inline(JVMState* jvms, ciMethod* PROB_ALWAYS); return cg; } else { - const char* msg = "receiver not constant"; - if (PrintInlining) C->print_inlining(callee, jvms->depth() - 1, jvms->bci(), msg); - C->log_inline_failure(msg); + print_inlining_failure(C, callee, jvms->depth() - 1, jvms->bci(), + "receiver not constant"); } } break; @@ -852,6 +932,12 @@ CallGenerator* CallGenerator::for_method_handle_inline(JVMState* jvms, ciMethod* const TypeOopPtr* oop_ptr = member_name->bottom_type()->is_oopptr(); ciMethod* target = oop_ptr->const_oop()->as_member_name()->get_vmtarget(); + if (!ensure_mh_intrinsic_matches_target_method(callee, target)) { + print_inlining_failure(C, callee, jvms->depth() - 1, jvms->bci(), + "signatures mismatch"); + return NULL; + } + // In lambda forms we erase signature types to avoid resolving issues // involving class loaders. When we optimize a method handle invoke // to a direct call we must cast the receiver and arguments to its @@ -912,9 +998,8 @@ CallGenerator* CallGenerator::for_method_handle_inline(JVMState* jvms, ciMethod* speculative_receiver_type); return cg; } else { - const char* msg = "member_name not constant"; - if (PrintInlining) C->print_inlining(callee, jvms->depth() - 1, jvms->bci(), msg); - C->log_inline_failure(msg); + print_inlining_failure(C, callee, jvms->depth() - 1, jvms->bci(), + "member_name not constant"); } } break; diff --git a/hotspot/src/share/vm/opto/callGenerator.hpp b/hotspot/src/share/vm/opto/callGenerator.hpp index 58e8fe9c614..80bc0d5466d 100644 --- a/hotspot/src/share/vm/opto/callGenerator.hpp +++ b/hotspot/src/share/vm/opto/callGenerator.hpp @@ -170,7 +170,14 @@ class CallGenerator : public ResourceObj { } } - static bool is_inlined_mh_linker(JVMState* jvms, ciMethod* m); + static void print_inlining_failure(Compile* C, ciMethod* callee, int inline_level, int bci, const char* msg) { + print_inlining(C, callee, inline_level, bci, msg); + C->log_inline_failure(msg); + } + + static bool is_inlined_method_handle_intrinsic(JVMState* jvms, ciMethod* m); + + static bool ensure_mh_intrinsic_matches_target_method(ciMethod* linker, ciMethod* target); }; diff --git a/hotspot/src/share/vm/opto/doCall.cpp b/hotspot/src/share/vm/opto/doCall.cpp index 97af80e61b0..b0ee744e17c 100644 --- a/hotspot/src/share/vm/opto/doCall.cpp +++ b/hotspot/src/share/vm/opto/doCall.cpp @@ -400,83 +400,12 @@ bool Parse::can_not_compile_call_site(ciMethod *dest_method, ciInstanceKlass* kl } #ifdef ASSERT -static bool check_type(ciType* t1, ciType* t2) { - // Either oop-oop or prim-prim pair. - if (t1->is_primitive_type() && t2->is_primitive_type()) { - return t1->size() == t2->size(); // argument sizes should match - } else { - return !t1->is_primitive_type() && !t2->is_primitive_type(); // oop-oop - } -} - -static bool check_inlined_mh_linker_info(ciMethod* symbolic_info, ciMethod* resolved_method) { - assert(symbolic_info->is_method_handle_intrinsic(), "sanity"); - assert(!resolved_method->is_method_handle_intrinsic(), "sanity"); - - if (!symbolic_info->is_loaded() || !resolved_method->is_loaded()) { - return true; // Don't compare unloaded methods. - } - // Linkers have appendix argument which is not passed to callee. - int has_appendix = MethodHandles::has_member_arg(symbolic_info->intrinsic_id()) ? 1 : 0; - if (symbolic_info->arg_size() != (resolved_method->arg_size() + has_appendix)) { - return false; // Total size of arguments on stack mismatch. - } - if (!symbolic_info->return_type()->is_void()) { - // Only check the return type if the symbolic method is not void - // i.e. the return value of the resolved method can be dropped - if (!check_type(symbolic_info->return_type(), resolved_method->return_type())) { - return false; // Return value size or type mismatch encountered. - } - } - - switch (symbolic_info->intrinsic_id()) { - case vmIntrinsics::_linkToVirtual: - case vmIntrinsics::_linkToInterface: - case vmIntrinsics::_linkToSpecial: { - if (resolved_method->is_static()) return false; - break; - } - case vmIntrinsics::_linkToStatic: { - if (!resolved_method->is_static()) return false; - break; - } - } - - ciSignature* symbolic_sig = symbolic_info->signature(); - ciSignature* resolved_sig = resolved_method->signature(); - - if (symbolic_sig->count() + (symbolic_info->is_static() ? 0 : 1) != - resolved_sig->count() + (resolved_method->is_static() ? 0 : 1) + has_appendix) { - return false; // Argument count mismatch - } - - int sbase = 0, rbase = 0; - int arg_count = MIN2(symbolic_sig->count() - has_appendix, resolved_sig->count()); - ciType* recv_type = NULL; - if (symbolic_info->is_static() && !resolved_method->is_static()) { - recv_type = symbolic_sig->type_at(0); - sbase = 1; - } else if (!symbolic_info->is_static() && resolved_method->is_static()) { - recv_type = resolved_sig->type_at(0); - rbase = 1; - } - if (recv_type != NULL && recv_type->is_primitive_type()) { - return false; // Receiver should be an oop. - } - for (int i = 0; i < arg_count; i++) { - if (!check_type(symbolic_sig->type_at(sbase + i), resolved_sig->type_at(rbase + i))) { - return false; // Argument size or type mismatch encountered. - } - } - return true; -} - static bool is_call_consistent_with_jvms(JVMState* jvms, CallGenerator* cg) { ciMethod* symbolic_info = jvms->method()->get_method_at_bci(jvms->bci()); ciMethod* resolved_method = cg->method(); - if (CallGenerator::is_inlined_mh_linker(jvms, resolved_method)) { - return check_inlined_mh_linker_info(symbolic_info, resolved_method); + if (CallGenerator::is_inlined_method_handle_intrinsic(jvms, resolved_method)) { + return CallGenerator::ensure_mh_intrinsic_matches_target_method(symbolic_info, resolved_method); } else { // Method name & descriptor should stay the same. return (symbolic_info->get_Method()->name() == resolved_method->get_Method()->name()) && diff --git a/hotspot/test/compiler/jsr292/InvokerSignatureMismatch.java b/hotspot/test/compiler/jsr292/InvokerSignatureMismatch.java new file mode 100644 index 00000000000..65a2728bb25 --- /dev/null +++ b/hotspot/test/compiler/jsr292/InvokerSignatureMismatch.java @@ -0,0 +1,58 @@ +package compiler.jsr292; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.MethodType; +import java.lang.invoke.MethodHandleHelper; +import jdk.internal.vm.annotation.ForceInline; + +/* + * @test + * @bug 8166110 + * @library /test/lib / patches + * @modules java.base/jdk.internal.misc + * java.base/jdk.internal.vm.annotation + * + * @build java.base/java.lang.invoke.MethodHandleHelper + * @run main/bootclasspath/othervm -XX:+IgnoreUnrecognizedVMOptions -Xbatch -XX:-TieredCompilation + * compiler.jsr292.InvokerSignatureMismatch + */ +public class InvokerSignatureMismatch { + + static final MethodHandle INT_MH; + + static { + MethodHandle mhI = null; + try { + mhI = MethodHandles.lookup().findStatic(InvokerSignatureMismatch.class, "bodyI", MethodType.methodType(void.class, int.class)); + } catch (Throwable e) { + } + INT_MH = mhI; + } + + public static void main(String[] args) throws Throwable { + mainLink(); + mainInvoke(); + } + + static void mainLink() throws Throwable { + for (int i = 0; i < 50_000; i++) { // OSR + Object name = MethodHandleHelper.internalMemberName(INT_MH); + MethodHandleHelper.linkToStatic(INT_MH, (float) i, name); + } + } + + static void mainInvoke() throws Throwable { + for (int i = 0; i < 50_000; i++) { // OSR + MethodHandleHelper.invokeBasicV(INT_MH, (float) i); + } + } + + static int cnt = 0; + static void bodyI(int x) { + if ((x & 1023) == 0) { // already optimized x % 1024 == 0 + ++cnt; + } + } + +} diff --git a/hotspot/test/compiler/jsr292/patches/java.base/java/lang/invoke/MethodHandleHelper.java b/hotspot/test/compiler/jsr292/patches/java.base/java/lang/invoke/MethodHandleHelper.java index a4732624a3a..f19244b8388 100644 --- a/hotspot/test/compiler/jsr292/patches/java.base/java/lang/invoke/MethodHandleHelper.java +++ b/hotspot/test/compiler/jsr292/patches/java.base/java/lang/invoke/MethodHandleHelper.java @@ -43,6 +43,21 @@ public class MethodHandleHelper { mh.customize(); } + @ForceInline + public static Object internalMemberName(MethodHandle mh) throws Throwable { + return mh.internalMemberName(); + } + + @ForceInline + public static void linkToStatic(MethodHandle mh, float arg, Object name) throws Throwable { + MethodHandle.linkToStatic(mh, arg, name); + } + + @ForceInline + public static void invokeBasicV(MethodHandle mh, float arg) throws Throwable { + mh.invokeBasic(arg); + } + @ForceInline public static Object invokeBasicL(MethodHandle mh) throws Throwable { return mh.invokeBasic(); From a55e3cd16bddd3606f55587b64c0ab7a6480f926 Mon Sep 17 00:00:00 2001 From: Michel Trudeau Date: Thu, 9 Feb 2017 08:01:19 -0800 Subject: [PATCH 106/447] 8168965: search items are not listed in any sensible order Reviewed-by: jjg, ksrini --- .../doclets/formats/html/resources/search.js | 67 ++++++++++++++----- .../javadoc/doclet/testSearch/TestSearch.java | 7 +- 2 files changed, 56 insertions(+), 18 deletions(-) diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js index 6e4ea9bc6f9..ea8678af719 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -169,11 +169,42 @@ $(function() { var tresult = new Array(); var mresult = new Array(); var tgresult = new Array(); + var secondaryresult = new Array(); var displayCount = 0; var exactMatcher = new RegExp("^" + $.ui.autocomplete.escapeRegex(request.term) + "$", "i"); camelCaseRegexp = ($.ui.autocomplete.escapeRegex(request.term)).split(/(?=[A-Z])/).join("([a-z0-9_$]*?)"); var camelCaseMatcher = new RegExp("^" + camelCaseRegexp); secondaryMatcher = new RegExp($.ui.autocomplete.escapeRegex(request.term), "i"); + + // Return the nested innermost name from the specified object + function nestedName(e) { + return e.l.substring(e.l.lastIndexOf(".") + 1); + } + + // Sort array items by short name (as opposed to fully qualified name). + // Additionally, sort by the nested type name, when present, + // as opposed to top level short name. + function sortAndConcatResults(a1, a2) { + var sortingKey; + var sortArray = function(e1, e2) { + var l = sortingKey(e1); + var m = sortingKey(e2); + if (l < m) + return -1; + if (l > m) + return 1; + return 0; + }; + sortingKey = function(e) { + return nestedName(e).toUpperCase(); + }; + a1.sort(sortArray); + a2.sort(sortArray); + a1 = a1.concat(a2); + a2.length = 0; + return a1; + } + if (moduleSearchIndex) { var mdleCount = 0; $.each(moduleSearchIndex, function(index, item) { @@ -184,10 +215,11 @@ $(function() { } else if (camelCaseMatcher.test(item.l)) { result.unshift(item); } else if (secondaryMatcher.test(item.l)) { - result.push(item); + secondaryresult.push(item); } }); displayCount = mdleCount; + result = sortAndConcatResults(result, secondaryresult); } if (packageSearchIndex) { var pCount = 0; @@ -197,48 +229,51 @@ $(function() { pkg = (item.m) ? (item.m + "/" + item.l) : item.l; - if (exactMatcher.test(item.l)) { + var s = nestedName(item); + if (exactMatcher.test(s)) { presult.unshift(item); pCount++; } else if (camelCaseMatcher.test(pkg)) { presult.unshift(item); } else if (secondaryMatcher.test(pkg)) { - presult.push(item); + secondaryresult.push(item); } }); - result = result.concat(presult); + result = result.concat(sortAndConcatResults(presult, secondaryresult)); displayCount = (pCount > displayCount) ? pCount : displayCount; } if (typeSearchIndex) { var tCount = 0; $.each(typeSearchIndex, function(index, item) { item[category] = catTypes; - if (exactMatcher.test(item.l)) { + var s = nestedName(item); + if (exactMatcher.test(s)) { tresult.unshift(item); tCount++; - } else if (camelCaseMatcher.test(item.l)) { + } else if (camelCaseMatcher.test(s)) { tresult.unshift(item); } else if (secondaryMatcher.test(item.p + "." + item.l)) { - tresult.push(item); + secondaryresult.push(item); } }); - result = result.concat(tresult); + result = result.concat(sortAndConcatResults(tresult, secondaryresult)); displayCount = (tCount > displayCount) ? tCount : displayCount; } if (memberSearchIndex) { var mCount = 0; $.each(memberSearchIndex, function(index, item) { item[category] = catMembers; - if (exactMatcher.test(item.l)) { + var s = nestedName(item); + if (exactMatcher.test(s)) { mresult.unshift(item); mCount++; - } else if (camelCaseMatcher.test(item.l)) { + } else if (camelCaseMatcher.test(s)) { mresult.unshift(item); } else if (secondaryMatcher.test(item.c + "." + item.l)) { - mresult.push(item); + secondaryresult.push(item); } }); - result = result.concat(mresult); + result = result.concat(sortAndConcatResults(mresult, secondaryresult)); displayCount = (mCount > displayCount) ? mCount : displayCount; } if (tagSearchIndex) { @@ -249,10 +284,10 @@ $(function() { tgresult.unshift(item); tgCount++; } else if (secondaryMatcher.test(item.l)) { - tgresult.push(item); + secondaryresult.push(item); } }); - result = result.concat(tgresult); + result = result.concat(sortAndConcatResults(tgresult, secondaryresult)); displayCount = (tgCount > displayCount) ? tgCount : displayCount; } displayCount = (displayCount > 500) ? displayCount : 500; @@ -312,4 +347,4 @@ $(function() { } } }); -}); \ No newline at end of file +}); diff --git a/langtools/test/jdk/javadoc/doclet/testSearch/TestSearch.java b/langtools/test/jdk/javadoc/doclet/testSearch/TestSearch.java index daceff16a6f..7f58063694e 100644 --- a/langtools/test/jdk/javadoc/doclet/testSearch/TestSearch.java +++ b/langtools/test/jdk/javadoc/doclet/testSearch/TestSearch.java @@ -23,7 +23,7 @@ /* * @test - * @bug 8141492 8071982 8141636 8147890 8166175 + * @bug 8141492 8071982 8141636 8147890 8166175 8168965 * @summary Test the search feature of javadoc. * @author bpatel * @library ../lib @@ -486,6 +486,9 @@ public class TestSearch extends JavadocTester { checkOutput("search.js", true, "camelCaseRegexp = ($.ui.autocomplete.escapeRegex(request.term)).split(/(?=[A-Z])/).join(\"([a-z0-9_$]*?)\");", "var camelCaseMatcher = new RegExp(\"^\" + camelCaseRegexp);", - "camelCaseMatcher.test(item.l)"); + "camelCaseMatcher.test(item.l)", + "var secondaryresult = new Array();", + "function nestedName(e) {", + "function sortAndConcatResults(a1, a2) {"); } } From 6ae128f2d3e24dff25b5dd490c911c80e580f8dc Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Thu, 9 Feb 2017 14:49:09 -0800 Subject: [PATCH 107/447] 8174127: (ch) Add instrumentation to java/nio/channels/FileChannel/Transfer.java Convert to TestNG and add some debugging output for large file creation time Reviewed-by: alanb --- .../nio/channels/FileChannel/Transfer.java | 183 ++++++++++-------- 1 file changed, 107 insertions(+), 76 deletions(-) diff --git a/jdk/test/java/nio/channels/FileChannel/Transfer.java b/jdk/test/java/nio/channels/FileChannel/Transfer.java index 04a0f3251b2..b05fffdb869 100644 --- a/jdk/test/java/nio/channels/FileChannel/Transfer.java +++ b/jdk/test/java/nio/channels/FileChannel/Transfer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,43 +24,53 @@ /* @test * @bug 4434723 4482726 4559072 4638365 4795550 5081340 5103988 6253145 * 6984545 - * @summary Test FileChannel.transferFrom and transferTo + * @summary Test FileChannel.transferFrom and transferTo (use -Dseed=X to set PRNG seed) * @library .. + * @library /lib/testlibrary/ + * @build jdk.testlibrary.* + * @run testng Transfer * @key randomness */ -import java.io.*; -import java.net.*; -import java.nio.*; -import java.nio.channels.*; +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.InputStreamReader; +import java.io.IOException; +import java.io.OutputStreamWriter; +import java.io.PrintStream; +import java.io.RandomAccessFile; +import java.io.Reader; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.nio.ByteBuffer; +import java.nio.channels.FileChannel; +import java.nio.channels.NonReadableChannelException; +import java.nio.channels.Pipe; +import java.nio.channels.ServerSocketChannel; +import java.nio.channels.SocketChannel; import java.nio.channels.spi.SelectorProvider; import java.nio.file.StandardOpenOption; import java.nio.file.FileAlreadyExistsException; import java.util.Random; +import java.util.concurrent.TimeUnit; +import jdk.testlibrary.RandomFactory; + +import org.testng.annotations.Test; public class Transfer { - private static Random generator = new Random(); + private static Random generator = RandomFactory.getRandom(); + private static PrintStream err = System.err; + private static PrintStream out = System.out; - private static int[] testSizes = { - 0, 10, 1023, 1024, 1025, 2047, 2048, 2049 }; - - public static void main(String[] args) throws Exception { - testFileChannel(); - for (int i=0; i Date: Fri, 10 Feb 2017 10:07:42 +0800 Subject: [PATCH 108/447] 8174241: ProblemList update for TestWsImport, JdbMethodExitTest and jimage tests Reviewed-by: lancea --- jdk/test/ProblemList.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt index 617ca7f902b..0001c05b334 100644 --- a/jdk/test/ProblemList.txt +++ b/jdk/test/ProblemList.txt @@ -253,9 +253,9 @@ tools/pack200/CommandLineTests.java 8059906 generic- tools/launcher/FXLauncherTest.java 8068049 linux-all,macosx-all -tools/jimage/JImageExtractTest.java 8169713 generic-all -tools/jimage/JImageListTest.java 8169713 generic-all -tools/jimage/JImageVerifyTest.java 8169713 generic-all +tools/jimage/JImageExtractTest.java 8170120 generic-all +tools/jimage/JImageListTest.java 8170120 generic-all +tools/jimage/JImageVerifyTest.java 8170120 generic-all tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java 8169971 windows-x64 @@ -266,7 +266,7 @@ tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java 8169971 windows- com/sun/jdi/RedefineImplementor.sh 8004127 generic-all -com/sun/jdi/JdbMethodExitTest.sh 6902121 generic-all +com/sun/jdi/JdbMethodExitTest.sh 8171483 generic-all com/sun/jdi/RepStep.java 8043571 generic-all @@ -307,6 +307,6 @@ com/sun/jndi/ldap/DeadSSLLdapTimeoutTest.java 8169942 linux-i5 javax/rmi/PortableRemoteObject/8146975/RmiIiopReturnValueTest.java 8169737 linux-all -javax/xml/ws/clientjar/TestWsImport.java 8170370 generic-all +javax/xml/ws/clientjar/TestWsImport.java 8173317 generic-all ############################################################################ From de146b6a36295e669ade44b257d9475f368902ac Mon Sep 17 00:00:00 2001 From: Hamlin Li Date: Thu, 9 Feb 2017 18:33:28 -0800 Subject: [PATCH 109/447] 8173957: Fix @since in module-info.java in dev/jdk repo Reviewed-by: alanb, lancea --- jdk/src/java.base/share/classes/module-info.java | 2 ++ jdk/src/java.datatransfer/share/classes/module-info.java | 2 ++ jdk/src/java.desktop/share/classes/module-info.java | 2 ++ jdk/src/java.instrument/share/classes/module-info.java | 2 ++ jdk/src/java.logging/share/classes/module-info.java | 2 ++ jdk/src/java.management.rmi/share/classes/module-info.java | 1 + jdk/src/java.management/share/classes/module-info.java | 2 ++ jdk/src/java.naming/share/classes/module-info.java | 2 ++ jdk/src/java.prefs/share/classes/module-info.java | 2 ++ jdk/src/java.rmi/share/classes/module-info.java | 2 ++ jdk/src/java.scripting/share/classes/module-info.java | 2 ++ jdk/src/java.se.ee/share/classes/module-info.java | 2 ++ jdk/src/java.se/share/classes/module-info.java | 2 ++ jdk/src/java.security.jgss/share/classes/module-info.java | 2 ++ jdk/src/java.security.sasl/share/classes/module-info.java | 2 ++ jdk/src/java.smartcardio/share/classes/module-info.java | 2 ++ jdk/src/java.sql.rowset/share/classes/module-info.java | 2 ++ jdk/src/java.sql/share/classes/module-info.java | 2 ++ jdk/src/java.transaction/share/classes/module-info.java | 2 ++ jdk/src/java.xml.crypto/share/classes/module-info.java | 2 ++ jdk/src/jdk.attach/share/classes/module-info.java | 2 ++ jdk/src/jdk.desktop/share/classes/module-info.java | 2 ++ jdk/src/jdk.editpad/share/classes/module-info.java | 2 ++ jdk/src/jdk.incubator.httpclient/share/classes/module-info.java | 2 ++ jdk/src/jdk.internal.ed/share/classes/module-info.java | 2 ++ jdk/src/jdk.internal.le/share/classes/module-info.java | 2 ++ jdk/src/jdk.internal.opt/share/classes/module-info.java | 2 ++ jdk/src/jdk.jdi/share/classes/module-info.java | 2 ++ jdk/src/jdk.jdwp.agent/share/classes/module-info.java | 2 ++ jdk/src/jdk.security.auth/share/classes/module-info.java | 2 ++ jdk/src/jdk.security.jgss/share/classes/module-info.java | 2 ++ 31 files changed, 61 insertions(+) diff --git a/jdk/src/java.base/share/classes/module-info.java b/jdk/src/java.base/share/classes/module-info.java index 185f8f2a1d1..3ad3f4a096c 100644 --- a/jdk/src/java.base/share/classes/module-info.java +++ b/jdk/src/java.base/share/classes/module-info.java @@ -25,6 +25,8 @@ /** * Defines the foundational APIs of the Java SE Platform. + * + * @since 9 */ module java.base { diff --git a/jdk/src/java.datatransfer/share/classes/module-info.java b/jdk/src/java.datatransfer/share/classes/module-info.java index ea3f9c2a53c..35b7571fb92 100644 --- a/jdk/src/java.datatransfer/share/classes/module-info.java +++ b/jdk/src/java.datatransfer/share/classes/module-info.java @@ -25,6 +25,8 @@ /** * Defines an API for transferring data between and within applications. + * + * @since 9 */ module java.datatransfer { exports java.awt.datatransfer; diff --git a/jdk/src/java.desktop/share/classes/module-info.java b/jdk/src/java.desktop/share/classes/module-info.java index bb7abf11909..f49f9772eae 100644 --- a/jdk/src/java.desktop/share/classes/module-info.java +++ b/jdk/src/java.desktop/share/classes/module-info.java @@ -26,6 +26,8 @@ /** * Defines the AWT and Swing user interface toolkits, plus APIs for * accessibility, audio, imaging, printing, and JavaBeans. + * + * @since 9 */ module java.desktop { requires transitive java.datatransfer; diff --git a/jdk/src/java.instrument/share/classes/module-info.java b/jdk/src/java.instrument/share/classes/module-info.java index 27587d2c250..4a7f2199e1d 100644 --- a/jdk/src/java.instrument/share/classes/module-info.java +++ b/jdk/src/java.instrument/share/classes/module-info.java @@ -26,6 +26,8 @@ /** * Defines services that allow agents to * instrument programs running on the JVM. + * + * @since 9 */ module java.instrument { exports java.lang.instrument; diff --git a/jdk/src/java.logging/share/classes/module-info.java b/jdk/src/java.logging/share/classes/module-info.java index 293d3873da1..a8120deeedb 100644 --- a/jdk/src/java.logging/share/classes/module-info.java +++ b/jdk/src/java.logging/share/classes/module-info.java @@ -25,6 +25,8 @@ /** * Defines the Java Logging API. + * + * @since 9 */ module java.logging { exports java.util.logging; diff --git a/jdk/src/java.management.rmi/share/classes/module-info.java b/jdk/src/java.management.rmi/share/classes/module-info.java index ae6fc006c99..fca14d540a8 100644 --- a/jdk/src/java.management.rmi/share/classes/module-info.java +++ b/jdk/src/java.management.rmi/share/classes/module-info.java @@ -46,6 +46,7 @@ * and load the appropriate {@code JMXConnectorServerProvider} service * implementation for the given protocol. * + * @since 9 */ module java.management.rmi { diff --git a/jdk/src/java.management/share/classes/module-info.java b/jdk/src/java.management/share/classes/module-info.java index ef7940a10ab..fd8ec495098 100644 --- a/jdk/src/java.management/share/classes/module-info.java +++ b/jdk/src/java.management/share/classes/module-info.java @@ -28,6 +28,8 @@ *

      * The JMX API consists of interfaces for monitoring and management of the * JVM and other components in the Java runtime. + * + * @since 9 */ module java.management { diff --git a/jdk/src/java.naming/share/classes/module-info.java b/jdk/src/java.naming/share/classes/module-info.java index f524a4c0bcd..bd1332a5f7b 100644 --- a/jdk/src/java.naming/share/classes/module-info.java +++ b/jdk/src/java.naming/share/classes/module-info.java @@ -25,6 +25,8 @@ /** * Defines the Java Naming and Directory Interface (JNDI) API. + * + * @since 9 */ module java.naming { requires java.security.sasl; diff --git a/jdk/src/java.prefs/share/classes/module-info.java b/jdk/src/java.prefs/share/classes/module-info.java index 4826cd2241b..15c47ad206b 100644 --- a/jdk/src/java.prefs/share/classes/module-info.java +++ b/jdk/src/java.prefs/share/classes/module-info.java @@ -25,6 +25,8 @@ /** * Defines the Preferences API. + * + * @since 9 */ module java.prefs { requires java.xml; diff --git a/jdk/src/java.rmi/share/classes/module-info.java b/jdk/src/java.rmi/share/classes/module-info.java index 7b975859f12..b10be8aee8e 100644 --- a/jdk/src/java.rmi/share/classes/module-info.java +++ b/jdk/src/java.rmi/share/classes/module-info.java @@ -25,6 +25,8 @@ /** * Defines the Remote Method Invocation (RMI) API. + * + * @since 9 */ module java.rmi { requires java.logging; diff --git a/jdk/src/java.scripting/share/classes/module-info.java b/jdk/src/java.scripting/share/classes/module-info.java index b0a5baffc39..0ee7a489b1f 100644 --- a/jdk/src/java.scripting/share/classes/module-info.java +++ b/jdk/src/java.scripting/share/classes/module-info.java @@ -25,6 +25,8 @@ /** * Defines the Scripting API. + * + * @since 9 */ module java.scripting { exports javax.script; diff --git a/jdk/src/java.se.ee/share/classes/module-info.java b/jdk/src/java.se.ee/share/classes/module-info.java index a9caf752162..0156b7abe68 100644 --- a/jdk/src/java.se.ee/share/classes/module-info.java +++ b/jdk/src/java.se.ee/share/classes/module-info.java @@ -28,6 +28,8 @@ *

      * This module requires {@code java.se} and supplements it with modules * that define CORBA and Java EE APIs. These modules are upgradeable. + * + * @since 9 */ @SuppressWarnings("deprecation") module java.se.ee { diff --git a/jdk/src/java.se/share/classes/module-info.java b/jdk/src/java.se/share/classes/module-info.java index 1e1c0ed6abd..4d0d87869f3 100644 --- a/jdk/src/java.se/share/classes/module-info.java +++ b/jdk/src/java.se/share/classes/module-info.java @@ -28,6 +28,8 @@ *

      * The modules defining CORBA and Java EE APIs are not required by * this module, but they are required by {@code java.se.ee}. + * + * @since 9 */ module java.se { requires transitive java.compiler; diff --git a/jdk/src/java.security.jgss/share/classes/module-info.java b/jdk/src/java.security.jgss/share/classes/module-info.java index 78a72496ace..4bb35fd807d 100644 --- a/jdk/src/java.security.jgss/share/classes/module-info.java +++ b/jdk/src/java.security.jgss/share/classes/module-info.java @@ -27,6 +27,8 @@ * Defines the Java binding of the IETF Generic Security Services API (GSS-API). *

      * This module also contains GSS-API mechanisms including Kerberos v5 and SPNEGO. + * + * @since 9 */ module java.security.jgss { requires java.naming; diff --git a/jdk/src/java.security.sasl/share/classes/module-info.java b/jdk/src/java.security.sasl/share/classes/module-info.java index 70f860b3ce9..0f4e1fd9f1f 100644 --- a/jdk/src/java.security.sasl/share/classes/module-info.java +++ b/jdk/src/java.security.sasl/share/classes/module-info.java @@ -29,6 +29,8 @@ *

      * This module also contains SASL mechanisms including DIGEST-MD5, * CRAM-MD5, and NTLM. + * + * @since 9 */ module java.security.sasl { requires java.logging; diff --git a/jdk/src/java.smartcardio/share/classes/module-info.java b/jdk/src/java.smartcardio/share/classes/module-info.java index 05f4588cbf6..1b3f717e374 100644 --- a/jdk/src/java.smartcardio/share/classes/module-info.java +++ b/jdk/src/java.smartcardio/share/classes/module-info.java @@ -25,6 +25,8 @@ /** * Defines the Java Smart Card I/O API. + * + * @since 9 */ module java.smartcardio { exports javax.smartcardio; diff --git a/jdk/src/java.sql.rowset/share/classes/module-info.java b/jdk/src/java.sql.rowset/share/classes/module-info.java index b2c27bc40cb..5ba5fc96ecd 100644 --- a/jdk/src/java.sql.rowset/share/classes/module-info.java +++ b/jdk/src/java.sql.rowset/share/classes/module-info.java @@ -25,6 +25,8 @@ /** * Defines the JDBC RowSet API. + * + * @since 9 */ module java.sql.rowset { requires transitive java.logging; diff --git a/jdk/src/java.sql/share/classes/module-info.java b/jdk/src/java.sql/share/classes/module-info.java index 14491db0b56..9f3c08106c1 100644 --- a/jdk/src/java.sql/share/classes/module-info.java +++ b/jdk/src/java.sql/share/classes/module-info.java @@ -25,6 +25,8 @@ /** * Defines the JDBC API. + * + * @since 9 */ module java.sql { requires transitive java.logging; diff --git a/jdk/src/java.transaction/share/classes/module-info.java b/jdk/src/java.transaction/share/classes/module-info.java index 4e245123b4b..f6918b0a130 100644 --- a/jdk/src/java.transaction/share/classes/module-info.java +++ b/jdk/src/java.transaction/share/classes/module-info.java @@ -28,6 +28,8 @@ *

      * The subset consists of RMI exception types which are mapped to CORBA system * exceptions by the 'Java Language to IDL Mapping Specification'. + * + * @since 9 */ module java.transaction { requires transitive java.rmi; diff --git a/jdk/src/java.xml.crypto/share/classes/module-info.java b/jdk/src/java.xml.crypto/share/classes/module-info.java index 4bd55f98b59..ad2f50e9570 100644 --- a/jdk/src/java.xml.crypto/share/classes/module-info.java +++ b/jdk/src/java.xml.crypto/share/classes/module-info.java @@ -25,6 +25,8 @@ /** * Defines an API for XML cryptography. + * + * @since 9 */ module java.xml.crypto { requires transitive java.xml; diff --git a/jdk/src/jdk.attach/share/classes/module-info.java b/jdk/src/jdk.attach/share/classes/module-info.java index d87b33904ce..c23210ab3e8 100644 --- a/jdk/src/jdk.attach/share/classes/module-info.java +++ b/jdk/src/jdk.attach/share/classes/module-info.java @@ -25,6 +25,8 @@ /** * Defines the attach API. + * + * @since 9 */ module jdk.attach { requires jdk.internal.jvmstat; diff --git a/jdk/src/jdk.desktop/share/classes/module-info.java b/jdk/src/jdk.desktop/share/classes/module-info.java index 2aac00da299..c477804f8fa 100644 --- a/jdk/src/jdk.desktop/share/classes/module-info.java +++ b/jdk/src/jdk.desktop/share/classes/module-info.java @@ -25,6 +25,8 @@ /* * Provides non-SE desktop APIs. + * + * @since 9 */ module jdk.desktop { diff --git a/jdk/src/jdk.editpad/share/classes/module-info.java b/jdk/src/jdk.editpad/share/classes/module-info.java index ddf4bee6212..0d674bbae56 100644 --- a/jdk/src/jdk.editpad/share/classes/module-info.java +++ b/jdk/src/jdk.editpad/share/classes/module-info.java @@ -25,6 +25,8 @@ /** * Implementation of the edit pad service. + * + * @since 9 */ module jdk.editpad { requires jdk.internal.ed; diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/module-info.java b/jdk/src/jdk.incubator.httpclient/share/classes/module-info.java index 5b8f0c5ac3d..a9a16dfe3d1 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/module-info.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/module-info.java @@ -26,6 +26,8 @@ /** * Defines the high-level HTTP and WebSocket API. * {@Incubating} + * + * @since 9 */ module jdk.incubator.httpclient { requires java.base; diff --git a/jdk/src/jdk.internal.ed/share/classes/module-info.java b/jdk/src/jdk.internal.ed/share/classes/module-info.java index f6beda70a0b..0e0ea99c9d9 100644 --- a/jdk/src/jdk.internal.ed/share/classes/module-info.java +++ b/jdk/src/jdk.internal.ed/share/classes/module-info.java @@ -26,6 +26,8 @@ /** * Internal editor support for JDK tools. Includes the Service Provider * Interface to built-in editors. + * + * @since 9 */ module jdk.internal.ed { diff --git a/jdk/src/jdk.internal.le/share/classes/module-info.java b/jdk/src/jdk.internal.le/share/classes/module-info.java index db859df2a8c..d45879d7587 100644 --- a/jdk/src/jdk.internal.le/share/classes/module-info.java +++ b/jdk/src/jdk.internal.le/share/classes/module-info.java @@ -25,6 +25,8 @@ /** * Internal API for line editing + * + * @since 9 */ module jdk.internal.le { exports jdk.internal.jline to diff --git a/jdk/src/jdk.internal.opt/share/classes/module-info.java b/jdk/src/jdk.internal.opt/share/classes/module-info.java index be862b7d532..2bc55831c78 100644 --- a/jdk/src/jdk.internal.opt/share/classes/module-info.java +++ b/jdk/src/jdk.internal.opt/share/classes/module-info.java @@ -25,6 +25,8 @@ /** * Internal option processing API + * + * @since 9 */ module jdk.internal.opt { exports jdk.internal.joptsimple to jdk.jlink, jdk.jshell; diff --git a/jdk/src/jdk.jdi/share/classes/module-info.java b/jdk/src/jdk.jdi/share/classes/module-info.java index 0dd61c61c49..e2cb439d8c0 100644 --- a/jdk/src/jdk.jdi/share/classes/module-info.java +++ b/jdk/src/jdk.jdi/share/classes/module-info.java @@ -25,6 +25,8 @@ /** * Defines the Java Debugger Interface. + * + * @since 9 */ module jdk.jdi { requires jdk.attach; diff --git a/jdk/src/jdk.jdwp.agent/share/classes/module-info.java b/jdk/src/jdk.jdwp.agent/share/classes/module-info.java index ee7a047fa3f..b78275fab92 100644 --- a/jdk/src/jdk.jdwp.agent/share/classes/module-info.java +++ b/jdk/src/jdk.jdwp.agent/share/classes/module-info.java @@ -25,6 +25,8 @@ /** * Java Debug Wire Protocol. + * + * @since 9 */ module jdk.jdwp.agent { } diff --git a/jdk/src/jdk.security.auth/share/classes/module-info.java b/jdk/src/jdk.security.auth/share/classes/module-info.java index 4675b238e19..1f6eea6537b 100644 --- a/jdk/src/jdk.security.auth/share/classes/module-info.java +++ b/jdk/src/jdk.security.auth/share/classes/module-info.java @@ -26,6 +26,8 @@ /** * Contains the implementation of the javax.security.auth.* interfaces and * various authentication modules. + * + * @since 9 */ module jdk.security.auth { requires transitive java.naming; diff --git a/jdk/src/jdk.security.jgss/share/classes/module-info.java b/jdk/src/jdk.security.jgss/share/classes/module-info.java index e66017f0102..f43fdd49296 100644 --- a/jdk/src/jdk.security.jgss/share/classes/module-info.java +++ b/jdk/src/jdk.security.jgss/share/classes/module-info.java @@ -26,6 +26,8 @@ /** * Defines Java extensions to the GSS-API and an implementation of the SASL * GSSAPI mechanism. + * + * @since 9 */ module jdk.security.jgss { requires transitive java.security.jgss; From a4693ee7d292d066a4e7f363d084ec31bdecb6c8 Mon Sep 17 00:00:00 2001 From: Alan Bateman Date: Fri, 10 Feb 2017 09:04:39 +0000 Subject: [PATCH 110/447] 8173393: Module system implementation refresh (2/2017) Co-authored-by: Mandy Chung Co-authored-by: Claes Redestad Co-authored-by: Alex Buckley Co-authored-by: Mark Reinhold Co-authored-by: John Rose Reviewed-by: dfuchs, psandoz, mchung, alanb --- .../classes/build/tools/jigsaw/GenGraphs.java | 6 +- .../build/tools/jigsaw/ModuleSummary.java | 6 +- .../share/classes/java/lang/Class.java | 65 +- .../share/classes/java/lang/ClassLoader.java | 52 +- .../java/lang/IllegalCallerException.java | 76 + .../share/classes/java/lang/Package.java | 11 + .../classes/java/lang/SecurityManager.java | 12 + .../classes/java/lang/StackStreamFactory.java | 2 +- .../classes/java/lang/StackTraceElement.java | 11 + .../share/classes/java/lang/StackWalker.java | 26 +- .../share/classes/java/lang/System.java | 7 +- .../java/lang/invoke/MethodHandles.java | 220 ++- .../java/lang/module/Configuration.java | 318 ++-- .../java/lang/module/FindException.java | 10 +- .../InvalidModuleDescriptorException.java | 1 + .../java/lang/module/ModuleDescriptor.java | 1442 ++++++++++------- .../java/lang/module/ModuleFinder.java | 86 +- .../java/lang/module/ModuleReader.java | 15 +- .../java/lang/module/ModuleReference.java | 3 +- .../java/lang/module/ResolutionException.java | 6 +- .../java/lang/module/ResolvedModule.java | 1 + .../classes/java/lang/module/Resolver.java | 416 +++-- .../java/lang/module/package-info.java | 109 +- .../java/lang/reflect/AccessibleObject.java | 401 ++++- .../java/lang/reflect/Constructor.java | 7 + .../classes/java/lang/reflect/Field.java | 4 + .../reflect/InaccessibleObjectException.java | 1 + .../classes/java/lang/reflect/Layer.java | 98 +- .../reflect/LayerInstantiationException.java | 1 + .../classes/java/lang/reflect/Method.java | 4 + .../classes/java/lang/reflect/Module.java | 219 +-- .../classes/java/lang/reflect/Proxy.java | 46 +- .../java/lang/reflect/package-info.java | 2 + .../classes/java/net/URLClassLoader.java | 5 + .../java/security/SecureClassLoader.java | 1 + .../share/classes/java/security/Security.java | 44 +- .../classes/java/util/ResourceBundle.java | 18 + .../classes/java/util/ServiceLoader.java | 57 +- .../spi/AbstractResourceBundleProvider.java | 1 + .../spi/ResourceBundleControlProvider.java | 2 + .../java/util/spi/ResourceBundleProvider.java | 1 + .../classes/jdk/internal/jmod/JmodFile.java | 4 +- .../internal/loader/BuiltinClassLoader.java | 9 +- .../jdk/internal/loader/ResourceHelper.java | 75 +- .../jdk/internal/misc/JavaLangAccess.java | 5 + .../internal/misc/JavaLangModuleAccess.java | 41 +- .../classes/jdk/internal/module/Builder.java | 59 +- .../classes/jdk/internal/module/Checks.java | 60 +- .../internal/module/ClassFileAttributes.java | 35 +- .../internal/module/ClassFileConstants.java | 6 +- .../jdk/internal/module/ModuleBootstrap.java | 92 +- .../jdk/internal/module/ModuleInfo.java | 99 +- .../internal/module/ModuleInfoExtender.java | 15 +- .../jdk/internal/module/ModuleLoaderMap.java | 13 +- .../jdk/internal/module/ModulePatcher.java | 68 +- .../jdk/internal/module/ModulePath.java | 180 +- .../internal/module/ModuleReferenceImpl.java | 9 +- .../jdk/internal/module/ModuleReferences.java | 81 +- .../classes/jdk/internal/module/Modules.java | 7 +- .../internal/module/SystemModuleFinder.java | 29 +- .../jdk/internal/reflect/Reflection.java | 28 +- .../classes/sun/invoke/util/VerifyAccess.java | 22 +- .../classes/sun/launcher/LauncherHelper.java | 4 + .../jrt/JavaRuntimeURLConnection.java | 8 +- .../lang/instrument/ClassFileTransformer.java | 1 + .../java/lang/instrument/Instrumentation.java | 1 + .../management/remote/rmi/RMIConnector.java | 13 +- .../sun/tools/jar/GNUStyleOptions.java | 3 +- .../share/classes/sun/tools/jar/Main.java | 4 +- .../jdk/tools/jlink/internal/JlinkTask.java | 19 +- .../internal/ResourcePoolConfiguration.java | 11 +- .../jdk/tools/jlink/internal/TaskHelper.java | 8 +- .../internal/plugins/SystemModulesPlugin.java | 5 +- .../classes/jdk/tools/jmod/JmodTask.java | 7 +- jdk/test/ProblemList.txt | 2 + .../io/FilePermission/ReadFileOnPath.java | 2 +- .../lang/Class/forName/modules/TestLayer.java | 6 +- .../forName/modules/src/m3/p3/NoAccess.java | 6 +- .../java/lang/Class/getPackageName/Basic.java | 16 +- .../java/lang/StackWalker/CallerFromMain.java | 2 +- .../java/lang/invoke/AccessControlTest.java | 83 +- .../java/lang/invoke/DropLookupModeTest.java | 10 +- .../MethodHandles/privateLookupIn/Driver.java | 2 +- .../privateLookupIn/Unnamed.java | 24 + .../test/p/PrivateLookupInTests.java | 22 +- jdk/test/java/lang/invoke/modules/Driver.java | 29 + .../modules/ModuleAccessControlTest.java | 81 - .../java/lang/invoke/modules/Unnamed.java | 24 + .../modules/{src => }/m1/module-info.java | 1 + .../java/lang/invoke/modules/m1/p1/Main.java | 367 +++++ .../invoke/modules/{src => }/m1/p1/Type1.java | 0 .../invoke/modules/{src => }/m1/p2/Type2.java | 0 .../modules/{src => }/m2/module-info.java | 0 .../invoke/modules/{src => }/m2/q1/Type1.java | 0 .../invoke/modules/{src => }/m2/q2/Type2.java | 0 .../lang/invoke/modules/src/m1/p1/Main.java | 225 --- .../lang/module/AutomaticModulesTest.java | 170 +- .../java/lang/module/ConfigurationTest.java | 782 ++++----- .../lang/module/ModuleDescriptorTest.java | 736 ++++++--- .../java/lang/module/ModuleFinderTest.java | 48 +- .../java/lang/module/ModuleNamesTest.java | 2 +- .../module/ModuleReader/ModuleReaderTest.java | 61 +- .../java/lang/module/ModuleReferenceTest.java | 7 +- .../java/lang/module/MultiReleaseJarTest.java | 30 +- .../AccessibleObject/CanAccessTest.java | 138 ++ .../ModuleSetAccessibleTest.java | 1 - .../TrySetAccessibleTest.java | 201 +++ .../lang/reflect/Layer/BasicLayerTest.java | 193 +-- .../reflect/Layer/LayerAndLoadersTest.java | 56 +- .../reflect/Layer/LayerControllerTest.java | 12 +- .../lang/reflect/Module/AnnotationsTest.java | 2 +- .../lang/reflect/Module/BasicModuleTest.java | 119 +- .../reflect/Module/WithSecurityManager.java | 2 +- .../lang/reflect/Module/addXXX/Driver.java | 29 + .../reflect/Module/addXXX/m1/module-info.java | 25 + .../lang/reflect/Module/addXXX/m1/p1/C.java | 27 + .../reflect/Module/addXXX/m2/module-info.java | 25 + .../lang/reflect/Module/addXXX/m2/p2/C.java | 32 + .../Module/addXXX/m2/p2/internal/C.java | 26 + .../reflect/Module/addXXX/m3/module-info.java | 26 + .../lang/reflect/Module/addXXX/m3/p3/C.java | 26 + .../reflect/Module/addXXX/m4/module-info.java | 25 + .../lang/reflect/Module/addXXX/m4/p4/C.java | 32 + .../Module/addXXX/test/module-info.java | 30 + .../reflect/Module/addXXX/test/test/C.java | 26 + .../reflect/Module/addXXX/test/test/Main.java | 196 +++ .../Module/addXXX/test/test/Service.java | 29 + .../reflect/Proxy/ProxyClassAccessTest.java | 2 +- .../lang/reflect/Proxy/ProxyLayerTest.java | 6 +- .../java/security/modules/ModularTest.java | 4 +- .../modules/BadProvidersTest.java | 2 +- .../util/ServiceLoader/modules/Basic.java | 8 +- .../reflect/CallerSensitive/CheckCSMs.java | 251 +++ .../modules/etc/VerifyModuleDelegation.java | 2 +- .../src/container/container/Main.java | 6 +- .../jdp/JdpJmxRemoteDynamicPortTest.java | 2 +- jdk/test/tools/jar/mmrjar/Basic.java | 10 +- jdk/test/tools/jar/modularJar/Basic.java | 2 +- jdk/test/tools/jlink/JLinkNegativeTest.java | 4 +- jdk/test/tools/jmod/hashes/HashesTest.java | 8 +- .../jdk/internal/modules/SystemModules.java | 2 + 141 files changed, 5961 insertions(+), 3198 deletions(-) create mode 100644 jdk/src/java.base/share/classes/java/lang/IllegalCallerException.java create mode 100644 jdk/test/java/lang/invoke/MethodHandles/privateLookupIn/Unnamed.java create mode 100644 jdk/test/java/lang/invoke/modules/Driver.java delete mode 100644 jdk/test/java/lang/invoke/modules/ModuleAccessControlTest.java create mode 100644 jdk/test/java/lang/invoke/modules/Unnamed.java rename jdk/test/java/lang/invoke/modules/{src => }/m1/module-info.java (98%) create mode 100644 jdk/test/java/lang/invoke/modules/m1/p1/Main.java rename jdk/test/java/lang/invoke/modules/{src => }/m1/p1/Type1.java (100%) rename jdk/test/java/lang/invoke/modules/{src => }/m1/p2/Type2.java (100%) rename jdk/test/java/lang/invoke/modules/{src => }/m2/module-info.java (100%) rename jdk/test/java/lang/invoke/modules/{src => }/m2/q1/Type1.java (100%) rename jdk/test/java/lang/invoke/modules/{src => }/m2/q2/Type2.java (100%) delete mode 100644 jdk/test/java/lang/invoke/modules/src/m1/p1/Main.java create mode 100644 jdk/test/java/lang/reflect/AccessibleObject/CanAccessTest.java create mode 100644 jdk/test/java/lang/reflect/AccessibleObject/TrySetAccessibleTest.java create mode 100644 jdk/test/java/lang/reflect/Module/addXXX/Driver.java create mode 100644 jdk/test/java/lang/reflect/Module/addXXX/m1/module-info.java create mode 100644 jdk/test/java/lang/reflect/Module/addXXX/m1/p1/C.java create mode 100644 jdk/test/java/lang/reflect/Module/addXXX/m2/module-info.java create mode 100644 jdk/test/java/lang/reflect/Module/addXXX/m2/p2/C.java create mode 100644 jdk/test/java/lang/reflect/Module/addXXX/m2/p2/internal/C.java create mode 100644 jdk/test/java/lang/reflect/Module/addXXX/m3/module-info.java create mode 100644 jdk/test/java/lang/reflect/Module/addXXX/m3/p3/C.java create mode 100644 jdk/test/java/lang/reflect/Module/addXXX/m4/module-info.java create mode 100644 jdk/test/java/lang/reflect/Module/addXXX/m4/p4/C.java create mode 100644 jdk/test/java/lang/reflect/Module/addXXX/test/module-info.java create mode 100644 jdk/test/java/lang/reflect/Module/addXXX/test/test/C.java create mode 100644 jdk/test/java/lang/reflect/Module/addXXX/test/test/Main.java create mode 100644 jdk/test/java/lang/reflect/Module/addXXX/test/test/Service.java create mode 100644 jdk/test/jdk/internal/reflect/CallerSensitive/CheckCSMs.java diff --git a/jdk/make/src/classes/build/tools/jigsaw/GenGraphs.java b/jdk/make/src/classes/build/tools/jigsaw/GenGraphs.java index 4de7b5c719a..ac1f9b86090 100644 --- a/jdk/make/src/classes/build/tools/jigsaw/GenGraphs.java +++ b/jdk/make/src/classes/build/tools/jigsaw/GenGraphs.java @@ -153,9 +153,9 @@ public class GenGraphs { */ void genDotFile(String name, Set roots) throws IOException { Configuration cf = - Configuration.empty().resolveRequires(ModuleFinder.ofSystem(), - ModuleFinder.of(), - roots); + Configuration.empty().resolve(ModuleFinder.ofSystem(), + ModuleFinder.of(), + roots); Set mds = cf.modules().stream() .map(ResolvedModule::reference) diff --git a/jdk/make/src/classes/build/tools/jigsaw/ModuleSummary.java b/jdk/make/src/classes/build/tools/jigsaw/ModuleSummary.java index e55a1c04855..520fb1b96b0 100644 --- a/jdk/make/src/classes/build/tools/jigsaw/ModuleSummary.java +++ b/jdk/make/src/classes/build/tools/jigsaw/ModuleSummary.java @@ -291,9 +291,9 @@ public class ModuleSummary { static Configuration resolve(Set roots) { return Configuration.empty() - .resolveRequires(ModuleFinder.ofSystem(), - ModuleFinder.of(), - roots); + .resolve(ModuleFinder.ofSystem(), + ModuleFinder.of(), + roots); } static class HtmlDocument { diff --git a/jdk/src/java.base/share/classes/java/lang/Class.java b/jdk/src/java.base/share/classes/java/lang/Class.java index b0e3d3af0cd..0a3b1da91a1 100644 --- a/jdk/src/java.base/share/classes/java/lang/Class.java +++ b/jdk/src/java.base/share/classes/java/lang/Class.java @@ -425,6 +425,7 @@ public final class Class implements java.io.Serializable, *

    * * @since 9 + * @spec JPMS */ @CallerSensitive public static Class forName(Module module, String name) { @@ -819,6 +820,7 @@ public final class Class implements java.io.Serializable, * @return the module that this class or interface is a member of * * @since 9 + * @spec JPMS */ public Module getModule() { return module; @@ -924,6 +926,8 @@ public final class Class implements java.io.Serializable, * this method returns {@code null}. * * @return the package of this class. + * @revised 9 + * @spec JPMS */ public Package getPackage() { if (isPrimitive() || isArray()) { @@ -951,20 +955,30 @@ public final class Class implements java.io.Serializable, * declaring class} of the {@link #getEnclosingMethod enclosing method} or * {@link #getEnclosingConstructor enclosing constructor}. * - *

    This method returns {@code null} if this class represents an array type, - * a primitive type or void. + *

    If this class represents an array type then this method returns the + * package name of the element type. If this class represents a primitive + * type or void then the package name "{@code java.lang}" is returned. * * @return the fully qualified package name * * @since 9 + * @spec JPMS * @jls 6.7 Fully Qualified Names */ public String getPackageName() { String pn = this.packageName; - if (pn == null && !isArray() && !isPrimitive()) { - String cn = getName(); - int dot = cn.lastIndexOf('.'); - pn = (dot != -1) ? cn.substring(0, dot).intern() : ""; + if (pn == null) { + Class c = this; + while (c.isArray()) { + c = c.getComponentType(); + } + if (c.isPrimitive()) { + pn = "java.lang"; + } else { + String cn = c.getName(); + int dot = cn.lastIndexOf('.'); + pn = (dot != -1) ? cn.substring(0, dot).intern() : ""; + } this.packageName = pn; } return pn; @@ -2491,10 +2505,16 @@ public final class Class implements java.io.Serializable, * Finds a resource with a given name. * *

    If this class is in a named {@link Module Module} then this method - * will attempt to find the resource in the module by means of the absolute - * resource name, subject to the rules for encapsulation specified in the - * {@code Module} {@link Module#getResourceAsStream getResourceAsStream} - * method. + * will attempt to find the resource in the module. This is done by + * delegating to the module's class loader {@link + * ClassLoader#findResource(String,String) findResource(String,String)} + * method, invoking it with the module name and the absolute name of the + * resource. Resources in named modules are subject to the rules for + * encapsulation specified in the {@code Module} {@link + * Module#getResourceAsStream getResourceAsStream} method and so this + * method returns {@code null} when the resource is a + * non-"{@code .class}" resource in a package that is not open to the + * caller's module. * *

    Otherwise, if this class is not in a named module then the rules for * searching resources associated with a given class are implemented by the @@ -2503,9 +2523,8 @@ public final class Class implements java.io.Serializable, * the bootstrap class loader, the method delegates to {@link * ClassLoader#getSystemResourceAsStream}. * - *

    Before finding a resource in the caller's module or delegation to a - * class loader, an absolute resource name is constructed from the given - * resource name using this algorithm: + *

    Before delegation, an absolute resource name is constructed from the + * given resource name using this algorithm: * *

      * @@ -2532,7 +2551,11 @@ public final class Class implements java.io.Serializable, * least the caller module, or access to the resource is denied * by the security manager. * @throws NullPointerException If {@code name} is {@code null} + * + * @see Module#getResourceAsStream(String) * @since 1.1 + * @revised 9 + * @spec JPMS */ @CallerSensitive public InputStream getResourceAsStream(String name) { @@ -2585,10 +2608,16 @@ public final class Class implements java.io.Serializable, * Finds a resource with a given name. * *

      If this class is in a named {@link Module Module} then this method - * will attempt to find the resource in the module by means of the absolute - * resource name, subject to the rules for encapsulation specified in the - * {@code Module} {@link Module#getResourceAsStream getResourceAsStream} - * method. + * will attempt to find the resource in the module. This is done by + * delegating to the module's class loader {@link + * ClassLoader#findResource(String,String) findResource(String,String)} + * method, invoking it with the module name and the absolute name of the + * resource. Resources in named modules are subject to the rules for + * encapsulation specified in the {@code Module} {@link + * Module#getResourceAsStream getResourceAsStream} method and so this + * method returns {@code null} when the resource is a + * non-"{@code .class}" resource in a package that is not open to the + * caller's module. * *

      Otherwise, if this class is not in a named module then the rules for * searching resources associated with a given class are implemented by the @@ -2627,6 +2656,8 @@ public final class Class implements java.io.Serializable, * manager. * @throws NullPointerException If {@code name} is {@code null} * @since 1.1 + * @revised 9 + * @spec JPMS */ @CallerSensitive public URL getResource(String name) { diff --git a/jdk/src/java.base/share/classes/java/lang/ClassLoader.java b/jdk/src/java.base/share/classes/java/lang/ClassLoader.java index fb771c29a10..06da4a983e1 100644 --- a/jdk/src/java.base/share/classes/java/lang/ClassLoader.java +++ b/jdk/src/java.base/share/classes/java/lang/ClassLoader.java @@ -207,6 +207,8 @@ import sun.security.util.SecurityConstants; * @jls 13.1 The Form of a Binary * @see #resolveClass(Class) * @since 1.0 + * @revised 9 + * @spec JPMS */ public abstract class ClassLoader { @@ -380,12 +382,12 @@ public abstract class ClassLoader { * method doesn't allow creation of a new class loader. * * @since 9 + * @spec JPMS */ protected ClassLoader(String name, ClassLoader parent) { this(checkCreateClassLoader(name), name, parent); } - /** * Creates a new class loader using the specified parent class loader for * delegation. @@ -440,6 +442,7 @@ public abstract class ClassLoader { * this class loader is not named. * * @since 9 + * @spec JPMS */ public String getName() { return name; @@ -710,6 +713,7 @@ public abstract class ClassLoader { * if the class could not be found. * * @since 9 + * @spec JPMS */ protected Class findClass(String moduleName, String name) { if (moduleName == null) { @@ -834,6 +838,8 @@ public abstract class ClassLoader { * @see java.security.SecureClassLoader * * @since 1.1 + * @revised 9 + * @spec JPMS */ protected final Class defineClass(String name, byte[] b, int off, int len) throws ClassFormatError @@ -967,6 +973,9 @@ public abstract class ClassLoader { * certificates than this class, or if {@code name} begins with * "{@code java.}" and this class loader is not the platform * class loader or its ancestor. + * + * @revised 9 + * @spec JPMS */ protected final Class defineClass(String name, byte[] b, int off, int len, ProtectionDomain protectionDomain) @@ -1041,6 +1050,8 @@ public abstract class ClassLoader { * @see #defineClass(String, byte[], int, int, ProtectionDomain) * * @since 1.5 + * @revised 9 + * @spec JPMS */ protected final Class defineClass(String name, java.nio.ByteBuffer b, ProtectionDomain protectionDomain) @@ -1264,11 +1275,11 @@ public abstract class ClassLoader { * Class loader implementations that support the loading from modules * should override this method. * - * @apiNote This method is the basis for the {@code Class} {@link - * Class#getResource getResource} and {@link Class#getResourceAsStream - * getResourceAsStream} methods. It is not subject to the rules for - * encapsulation specified by {@code Module} {@link - * Module#getResourceAsStream getResourceAsStream}. + * @apiNote This method is the basis for the {@link + * Class#getResource Class.getResource}, {@link Class#getResourceAsStream + * Class.getResourceAsStream}, and {@link Module#getResourceAsStream + * Module.getResourceAsStream} methods. It is not subject to the rules for + * encapsulation specified by {@code Module.getResourceAsStream}. * * @implSpec The default implementation attempts to find the resource by * invoking {@link #findResource(String)} when the {@code moduleName} is @@ -1292,6 +1303,7 @@ public abstract class ClassLoader { * * @see java.lang.module.ModuleReader#find(String) * @since 9 + * @spec JPMS */ protected URL findResource(String moduleName, String name) throws IOException { if (moduleName == null) { @@ -1342,6 +1354,8 @@ public abstract class ClassLoader { * @throws NullPointerException If {@code name} is {@code null} * * @since 1.1 + * @revised 9 + * @spec JPMS */ public URL getResource(String name) { Objects.requireNonNull(name); @@ -1403,6 +1417,8 @@ public abstract class ClassLoader { * @see #findResources(String) * * @since 1.2 + * @revised 9 + * @spec JPMS */ public Enumeration getResources(String name) throws IOException { Objects.requireNonNull(name); @@ -1499,6 +1515,8 @@ public abstract class ClassLoader { * denied by the security manager. * * @since 1.2 + * @revised 9 + * @spec JPMS */ protected URL findResource(String name) { return null; @@ -1531,6 +1549,8 @@ public abstract class ClassLoader { * If I/O errors occur * * @since 1.2 + * @revised 9 + * @spec JPMS */ protected Enumeration findResources(String name) throws IOException { return Collections.emptyEnumeration(); @@ -1601,6 +1621,8 @@ public abstract class ClassLoader { * denied by the security manager. * * @since 1.1 + * @revised 9 + * @spec JPMS */ public static URL getSystemResource(String name) { return getSystemClassLoader().getResource(name); @@ -1636,6 +1658,8 @@ public abstract class ClassLoader { * If I/O errors occur * * @since 1.2 + * @revised 9 + * @spec JPMS */ public static Enumeration getSystemResources(String name) throws IOException @@ -1667,6 +1691,8 @@ public abstract class ClassLoader { * @throws NullPointerException If {@code name} is {@code null} * * @since 1.1 + * @revised 9 + * @spec JPMS */ public InputStream getResourceAsStream(String name) { Objects.requireNonNull(name); @@ -1699,6 +1725,8 @@ public abstract class ClassLoader { * denied by the security manager. * * @since 1.1 + * @revised 9 + * @spec JPMS */ public static InputStream getSystemResourceAsStream(String name) { URL url = getSystemResource(name); @@ -1749,6 +1777,7 @@ public abstract class ClassLoader { * * @see Module#isNamed() * @since 9 + * @spec JPMS */ public final Module getUnnamedModule() { return unnamedModule; @@ -1772,6 +1801,7 @@ public abstract class ClassLoader { * {@link RuntimePermission}{@code ("getClassLoader")} * * @since 9 + * @spec JPMS */ @CallerSensitive public static ClassLoader getPlatformClassLoader() { @@ -1847,6 +1877,8 @@ public abstract class ClassLoader { * {@link Throwable#getCause()} method. * * @revised 1.4 + * @revised 9 + * @spec JPMS */ @CallerSensitive public static ClassLoader getSystemClassLoader() { @@ -2101,6 +2133,8 @@ public abstract class ClassLoader { * defined by this class loader * * @since 1.2 + * @revised 9 + * @spec JPMS * * @see * The JAR File Specification: Package Versioning @@ -2138,6 +2172,7 @@ public abstract class ClassLoader { * if {@code name} is {@code null}. * * @since 9 + * @spec JPMS */ public final Package getDefinedPackage(String name) { Objects.requireNonNull(name, "name cannot be null"); @@ -2160,6 +2195,7 @@ public abstract class ClassLoader { * or an zero length array if no package has been defined by this class loader. * * @since 9 + * @spec JPMS */ public final Package[] getDefinedPackages() { return packages().toArray(Package[]::new); @@ -2196,6 +2232,8 @@ public abstract class ClassLoader { * a {@code Package} for the specified class loader. * * @since 1.2 + * @revised 9 + * @spec JPMS */ @Deprecated(since="9") protected Package getPackage(String name) { @@ -2220,6 +2258,8 @@ public abstract class ClassLoader { * class loader and its ancestors * * @since 1.2 + * @revised 9 + * @spec JPMS */ protected Package[] getPackages() { Stream pkgs = packages(); diff --git a/jdk/src/java.base/share/classes/java/lang/IllegalCallerException.java b/jdk/src/java.base/share/classes/java/lang/IllegalCallerException.java new file mode 100644 index 00000000000..f882fb21591 --- /dev/null +++ b/jdk/src/java.base/share/classes/java/lang/IllegalCallerException.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package java.lang; + +/** + * Thrown to indicate that a method has been called by an inappropriate caller. + * + * @since 9 + * @spec JPMS + * @see StackWalker#getCallerClass + */ +public class IllegalCallerException extends RuntimeException { + /** + * Constructs an IllegalCallerException with no detail message. + */ + public IllegalCallerException() { + super(); + } + + /** + * Constructs an IllegalCallerException with the specified detail + * message. + * + * @param s the String that contains a detailed message (can be null) + */ + public IllegalCallerException(String s) { + super(s); + } + + /** + * Constructs a new exception with the specified detail message and + * cause. + * + * @param message the detail message (can be null) + * @param cause the cause (can be null) + */ + public IllegalCallerException(String message, Throwable cause) { + super(message, cause); + } + + /** + * Constructs a new exception with the specified cause and a detail + * message of {@code (cause==null ? null : cause.toString())} (which + * typically contains the class and detail message of {@code cause}). + * + * @param cause the cause (can be null) + */ + public IllegalCallerException(Throwable cause) { + super(cause); + } + + static final long serialVersionUID = -2349421918363102232L; +} diff --git a/jdk/src/java.base/share/classes/java/lang/Package.java b/jdk/src/java.base/share/classes/java/lang/Package.java index 5a19f9771f1..0dcc5e1c12c 100644 --- a/jdk/src/java.base/share/classes/java/lang/Package.java +++ b/jdk/src/java.base/share/classes/java/lang/Package.java @@ -111,6 +111,8 @@ import jdk.internal.reflect.Reflection; * @see ClassLoader#definePackage(String, String, String, String, String, String, String, URL) * * @since 1.2 + * @revised 9 + * @spec JPMS */ public class Package extends NamedPackage implements java.lang.reflect.AnnotatedElement { /** @@ -207,6 +209,9 @@ public class Package extends NamedPackage implements java.lang.reflect.Annotated * is returned if it is not known. * @return the vendor that implemented this package, {@code null} * is returned if it is not known. + * + * @revised 9 + * @spec JPMS */ public String getImplementationVendor() { return versionInfo.implVendor; @@ -334,6 +339,9 @@ public class Package extends NamedPackage implements java.lang.reflect.Annotated * a {@code Package} for the specified class loader. * * @see ClassLoader#getDefinedPackage + * + * @revised 9 + * @spec JPMS */ @CallerSensitive @Deprecated(since="9") @@ -356,6 +364,9 @@ public class Package extends NamedPackage implements java.lang.reflect.Annotated * class loader and its ancestors * * @see ClassLoader#getDefinedPackages + * + * @revised 9 + * @spec JPMS */ @CallerSensitive public static Package[] getPackages() { diff --git a/jdk/src/java.base/share/classes/java/lang/SecurityManager.java b/jdk/src/java.base/share/classes/java/lang/SecurityManager.java index 8a819ee6db7..084d4661700 100644 --- a/jdk/src/java.base/share/classes/java/lang/SecurityManager.java +++ b/jdk/src/java.base/share/classes/java/lang/SecurityManager.java @@ -1457,6 +1457,18 @@ class SecurityManager { .collect(Collectors.toSet()); } + /** + * Called by java.security.Security + */ + static void invalidatePackageAccessCache() { + synchronized (packageAccessLock) { + packageAccessValid = false; + } + synchronized (packageDefinitionLock) { + packageDefinitionValid = false; + } + } + /** * Returns true if the module's loader is the boot or platform loader. */ diff --git a/jdk/src/java.base/share/classes/java/lang/StackStreamFactory.java b/jdk/src/java.base/share/classes/java/lang/StackStreamFactory.java index 55976485d4f..781ee52c25f 100644 --- a/jdk/src/java.base/share/classes/java/lang/StackStreamFactory.java +++ b/jdk/src/java.base/share/classes/java/lang/StackStreamFactory.java @@ -684,7 +684,7 @@ final class StackStreamFactory { frames[n++] = caller; } if (frames[1] == null) { - throw new IllegalStateException("no caller frame"); + throw new IllegalCallerException("no caller frame"); } return n; } diff --git a/jdk/src/java.base/share/classes/java/lang/StackTraceElement.java b/jdk/src/java.base/share/classes/java/lang/StackTraceElement.java index d95ea5ef826..79b4c7299f6 100644 --- a/jdk/src/java.base/share/classes/java/lang/StackTraceElement.java +++ b/jdk/src/java.base/share/classes/java/lang/StackTraceElement.java @@ -92,6 +92,8 @@ public final class StackTraceElement implements java.io.Serializable { * @throws NullPointerException if {@code declaringClass} or * {@code methodName} is null * @since 1.5 + * @revised 9 + * @spec JPMS */ public StackTraceElement(String declaringClass, String methodName, String fileName, int lineNumber) { @@ -128,6 +130,7 @@ public final class StackTraceElement implements java.io.Serializable { * or {@code methodName} is {@code null} * * @since 9 + * @spec JPMS */ public StackTraceElement(String classLoaderName, String moduleName, String moduleVersion, @@ -187,6 +190,7 @@ public final class StackTraceElement implements java.io.Serializable { * point represented by this stack trace element; {@code null} * if the module name is not available. * @since 9 + * @spec JPMS * @see java.lang.reflect.Module#getName() */ public String getModuleName() { @@ -201,6 +205,7 @@ public final class StackTraceElement implements java.io.Serializable { * point represented by this stack trace element; {@code null} * if the module version is not available. * @since 9 + * @spec JPMS * @see java.lang.module.ModuleDescriptor.Version */ public String getModuleVersion() { @@ -216,6 +221,7 @@ public final class StackTraceElement implements java.io.Serializable { * if the class loader is not named. * * @since 9 + * @spec JPMS * @see java.lang.ClassLoader#getName() */ public String getClassLoaderName() { @@ -329,6 +335,8 @@ public final class StackTraceElement implements java.io.Serializable { * {@link java.lang.StackWalker.StackFrame}, where an implementation may * choose to omit some element in the returned string. * + * @revised 9 + * @spec JPMS * @see Throwable#printStackTrace() */ public String toString() { @@ -376,6 +384,9 @@ public final class StackTraceElement implements java.io.Serializable { * @return true if the specified object is another * {@code StackTraceElement} instance representing the same * execution point as this instance. + * + * @revised 9 + * @spec JPMS */ public boolean equals(Object obj) { if (obj==this) diff --git a/jdk/src/java.base/share/classes/java/lang/StackWalker.java b/jdk/src/java.base/share/classes/java/lang/StackWalker.java index b5c43fd2d67..72461baf9cd 100644 --- a/jdk/src/java.base/share/classes/java/lang/StackWalker.java +++ b/jdk/src/java.base/share/classes/java/lang/StackWalker.java @@ -465,8 +465,8 @@ public final class StackWalker { } /** - * Gets the {@code Class} object of the caller invoking the method - * that calls this {@code getCallerClass} method. + * Gets the {@code Class} object of the caller who invoked the method + * that invoked {@code getCallerClass}. * *

      Reflection frames, {@link java.lang.invoke.MethodHandle}, and * hidden frames are filtered regardless of the @@ -474,19 +474,21 @@ public final class StackWalker { * and {@link Option#SHOW_HIDDEN_FRAMES SHOW_HIDDEN_FRAMES} options * this {@code StackWalker} has been configured with. * + *

      This method should be called when a caller frame is present. If + * it is called from the bottom most frame on the stack, + * {@code IllegalCallerException} will be thrown. + * *

      This method throws {@code UnsupportedOperationException} * if this {@code StackWalker} is not configured with the * {@link Option#RETAIN_CLASS_REFERENCE RETAIN_CLASS_REFERENCE} option. - * This method should be called when a caller frame is present. If - * it is called from the last frame on the stack, - * {@code IllegalStateException} will be thrown. * * @apiNote * For example, {@code Util::getResourceBundle} loads a resource bundle - * on behalf of the caller. It calls this {@code getCallerClass} method - * to find the method calling {@code Util::getResourceBundle} and uses the caller's - * class loader to load the resource bundle. The caller class in this example - * is the {@code MyTool} class. + * on behalf of the caller. It invokes {@code getCallerClass} to identify + * the class whose method called {@code Util::getResourceBundle}. + * Then, it obtains the class loader of that class, and uses + * the class loader to load the resource bundle. The caller class + * in this example is {@code MyTool}. * *

      {@code
            * class Util {
      @@ -517,17 +519,17 @@ public final class StackWalker {
            * }
      * * When the {@code getCallerClass} method is called from a method that - * is the last frame on the stack, + * is the bottom most frame on the stack, * for example, {@code static public void main} method launched by the * {@code java} launcher, or a method invoked from a JNI attached thread, - * {@code IllegalStateException} is thrown. + * {@code IllegalCallerException} is thrown. * * @return {@code Class} object of the caller's caller invoking this method. * * @throws UnsupportedOperationException if this {@code StackWalker} * is not configured with {@link Option#RETAIN_CLASS_REFERENCE * Option.RETAIN_CLASS_REFERENCE}. - * @throws IllegalStateException if there is no caller frame, i.e. + * @throws IllegalCallerException if there is no caller frame, i.e. * when this {@code getCallerClass} method is called from a method * which is the last frame on the stack. */ diff --git a/jdk/src/java.base/share/classes/java/lang/System.java b/jdk/src/java.base/share/classes/java/lang/System.java index 1577e215e35..c086071df0e 100644 --- a/jdk/src/java.base/share/classes/java/lang/System.java +++ b/jdk/src/java.base/share/classes/java/lang/System.java @@ -1942,10 +1942,6 @@ public final class System { * the application classpath or modulepath. */ private static void initPhase3() { - // Initialize publicLookup early, to avoid bootstrapping circularities - // with security manager using java.lang.invoke infrastructure. - java.lang.invoke.MethodHandles.publicLookup(); - // set security manager String cn = System.getProperty("java.security.manager"); if (cn != null) { @@ -2053,6 +2049,9 @@ public final class System { public String fastUUID(long lsb, long msb) { return Long.fastUUID(lsb, msb); } + public void invalidatePackageAccessCache() { + SecurityManager.invalidatePackageAccessCache(); + } }); } } diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java index 16a9e8a941d..98f02d0f19f 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java @@ -25,8 +25,6 @@ package java.lang.invoke; -import jdk.internal.org.objectweb.asm.ClassWriter; -import jdk.internal.org.objectweb.asm.Opcodes; import jdk.internal.reflect.CallerSensitive; import jdk.internal.reflect.Reflection; import jdk.internal.vm.annotation.ForceInline; @@ -111,13 +109,17 @@ public class MethodHandles { /** * Returns a {@link Lookup lookup object} which is trusted minimally. - * It can only be used to create method handles to public members in + * The lookup has the {@code PUBLIC} and {@code UNCONDITIONAL} modes. + * It can only be used to create method handles to public members of * public classes in packages that are exported unconditionally. *

      - * For now, the {@linkplain Lookup#lookupClass lookup class} of this lookup - * object is in an unnamed module. - * Consequently, the lookup context of this lookup object will be the bootstrap - * class loader, which means it cannot find user classes. + * As a matter of pure convention, the {@linkplain Lookup#lookupClass lookup class} + * of this lookup object will be {@link java.lang.Object}. + * + * @apiNote The use of Object is conventional, and because the lookup modes are + * limited, there is no special access provided to the internals of Object, its package + * or its module. Consequently, the lookup context of this lookup object will be the + * bootstrap class loader, which means it cannot find user classes. * *

      * Discussion: @@ -129,17 +131,12 @@ public class MethodHandles { * Also, it cannot access * caller sensitive methods. * @return a lookup object which is trusted minimally + * + * @revised 9 + * @spec JPMS */ public static Lookup publicLookup() { - // During VM startup then only classes in the java.base module can be - // loaded and linked. This is because java.base exports aren't setup until - // the module system is initialized, hence types in the unnamed module - // (or any named module) can't link to java/lang/Object. - if (!jdk.internal.misc.VM.isModuleSystemInited()) { - return new Lookup(Object.class, Lookup.PUBLIC); - } else { - return LookupHelper.PUBLIC_LOOKUP; - } + return Lookup.PUBLIC_LOOKUP; } /** @@ -172,6 +169,7 @@ public class MethodHandles { * @throws IllegalAccessException if the access check specified above fails * @throws SecurityException if denied by the security manager * @since 9 + * @spec JPMS * @see Lookup#dropLookupMode */ public static Lookup privateLookupIn(Class targetClass, Lookup lookup) throws IllegalAccessException { @@ -183,11 +181,11 @@ public class MethodHandles { throw new IllegalArgumentException(targetClass + " is an array class"); Module targetModule = targetClass.getModule(); Module callerModule = lookup.lookupClass().getModule(); - if (callerModule != targetModule && targetModule.isNamed()) { - if (!callerModule.canRead(targetModule)) - throw new IllegalAccessException(callerModule + " does not read " + targetModule); + if (!callerModule.canRead(targetModule)) + throw new IllegalAccessException(callerModule + " does not read " + targetModule); + if (targetModule.isNamed()) { String pn = targetClass.getPackageName(); - assert pn != null && pn.length() > 0 : "unnamed package cannot be in named module"; + assert pn.length() > 0 : "unnamed package cannot be in named module"; if (!targetModule.isOpen(pn, callerModule)) throw new IllegalAccessException(targetModule + " does not open " + pn + " to " + callerModule); } @@ -601,6 +599,8 @@ public class MethodHandles { * so that there can be a secure foundation for lookups. * Nearly all other methods in the JSR 292 API rely on lookup * objects to check access requests. + * + * @revised 9 */ public static final class Lookup { @@ -647,15 +647,33 @@ public class MethodHandles { * lookup class and public types in packages exported by other modules * to the module of the lookup class. * @since 9 + * @spec JPMS */ public static final int MODULE = PACKAGE << 1; - private static final int ALL_MODES = (PUBLIC | PRIVATE | PROTECTED | PACKAGE | MODULE); + /** A single-bit mask representing {@code unconditional} access + * which may contribute to the result of {@link #lookupModes lookupModes}. + * The value is {@code 0x20}, which does not correspond meaningfully to + * any particular {@linkplain java.lang.reflect.Modifier modifier bit}. + * A {@code Lookup} with this lookup mode assumes {@linkplain + * java.lang.reflect.Module#canRead(java.lang.reflect.Module) readability}. + * In conjunction with the {@code PUBLIC} modifier bit, a {@code Lookup} + * with this lookup mode can access all public members of public types + * of all modules where the type is in a package that is {@link + * java.lang.reflect.Module#isExported(String) exported unconditionally}. + * @since 9 + * @spec JPMS + * @see #publicLookup() + */ + public static final int UNCONDITIONAL = PACKAGE << 2; + + private static final int ALL_MODES = (PUBLIC | PRIVATE | PROTECTED | PACKAGE | MODULE | UNCONDITIONAL); + private static final int FULL_POWER_MODES = (ALL_MODES & ~UNCONDITIONAL); private static final int TRUSTED = -1; private static int fixmods(int mods) { - mods &= (ALL_MODES - PACKAGE - MODULE); - return (mods != 0) ? mods : (PACKAGE | MODULE); + mods &= (ALL_MODES - PACKAGE - MODULE - UNCONDITIONAL); + return (mods != 0) ? mods : (PACKAGE | MODULE | UNCONDITIONAL); } /** Tells which class is performing the lookup. It is this class against @@ -682,13 +700,14 @@ public class MethodHandles { * {@linkplain #PRIVATE PRIVATE (0x02)}, * {@linkplain #PROTECTED PROTECTED (0x04)}, * {@linkplain #PACKAGE PACKAGE (0x08)}, - * and {@linkplain #MODULE MODULE (0x10)}. + * {@linkplain #MODULE MODULE (0x10)}, + * and {@linkplain #UNCONDITIONAL UNCONDITIONAL (0x20)}. *

      * A freshly-created lookup object - * on the {@linkplain java.lang.invoke.MethodHandles#lookup() caller's class} - * has all possible bits set, since the caller class can access all its own members, - * all public types in the caller's module, and all public types in packages exported - * by other modules to the caller's module. + * on the {@linkplain java.lang.invoke.MethodHandles#lookup() caller's class} has + * all possible bits set, except {@code UNCONDITIONAL}. The lookup can be used to + * access all members of the caller's class, all public types in the caller's module, + * and all public types in packages exported by other modules to the caller's module. * A lookup object on a new lookup class * {@linkplain java.lang.invoke.MethodHandles.Lookup#in created from a previous lookup object} * may have some mode bits set to zero. @@ -701,6 +720,9 @@ public class MethodHandles { * @return the lookup modes, which limit the kinds of access performed by this lookup object * @see #in * @see #dropLookupMode + * + * @revised 9 + * @spec JPMS */ public int lookupModes() { return allowedModes & ALL_MODES; @@ -712,9 +734,9 @@ public class MethodHandles { * which in turn is called by a method not in this package. */ Lookup(Class lookupClass) { - this(lookupClass, ALL_MODES); + this(lookupClass, FULL_POWER_MODES); // make sure we haven't accidentally picked up a privileged class: - checkUnprivilegedlookupClass(lookupClass, ALL_MODES); + checkUnprivilegedlookupClass(lookupClass, FULL_POWER_MODES); } private Lookup(Class lookupClass, int allowedModes) { @@ -730,19 +752,20 @@ public class MethodHandles { * However, the resulting {@code Lookup} object is guaranteed * to have no more access capabilities than the original. * In particular, access capabilities can be lost as follows:

        - *
      • If the lookup class for this {@code Lookup} is not in a named module, - * and the new lookup class is in a named module {@code M}, then no members in - * {@code M}'s non-exported packages will be accessible. - *
      • If the lookup for this {@code Lookup} is in a named module, and the - * new lookup class is in a different module {@code M}, then no members, not even - * public members in {@code M}'s exported packages, will be accessible. - *
      • If the new lookup class differs from the old one, - * protected members will not be accessible by virtue of inheritance. - * (Protected members may continue to be accessible because of package sharing.) + *
      • If the old lookup class is in a {@link Module#isNamed() named} module, and + * the new lookup class is in a different module {@code M}, then no members, not + * even public members in {@code M}'s exported packages, will be accessible. + * The exception to this is when this lookup is {@link #publicLookup() + * publicLookup}, in which case {@code PUBLIC} access is not lost. + *
      • If the old lookup class is in an unnamed module, and the new lookup class + * is a different module then {@link #MODULE MODULE} access is lost. + *
      • If the new lookup class differs from the old one then {@code UNCONDITIONAL} is lost. *
      • If the new lookup class is in a different package * than the old one, protected and default (package) members will not be accessible. *
      • If the new lookup class is not within the same package member - * as the old one, private members will not be accessible. + * as the old one, private members will not be accessible, and protected members + * will not be accessible by virtue of inheritance. + * (Protected members may continue to be accessible because of package sharing.) *
      • If the new lookup class is not accessible to the old lookup class, * then no members, not even public members, will be accessible. * (In all other cases, public members will continue to be accessible.) @@ -757,32 +780,34 @@ public class MethodHandles { * @return a lookup object which reports the desired lookup class, or the same object * if there is no change * @throws NullPointerException if the argument is null + * + * @revised 9 + * @spec JPMS */ public Lookup in(Class requestedLookupClass) { Objects.requireNonNull(requestedLookupClass); if (allowedModes == TRUSTED) // IMPL_LOOKUP can make any lookup at all - return new Lookup(requestedLookupClass, ALL_MODES); + return new Lookup(requestedLookupClass, FULL_POWER_MODES); if (requestedLookupClass == this.lookupClass) return this; // keep same capabilities - - int newModes = (allowedModes & (ALL_MODES & ~PROTECTED)); + int newModes = (allowedModes & FULL_POWER_MODES); if (!VerifyAccess.isSameModule(this.lookupClass, requestedLookupClass)) { - // Allowed to teleport from an unnamed to a named module but resulting - // Lookup has no access to module private members - if (this.lookupClass.getModule().isNamed()) { + // Need to drop all access when teleporting from a named module to another + // module. The exception is publicLookup where PUBLIC is not lost. + if (this.lookupClass.getModule().isNamed() + && (this.allowedModes & UNCONDITIONAL) == 0) newModes = 0; - } else { - newModes &= ~MODULE; - } + else + newModes &= ~(MODULE|PACKAGE|PRIVATE|PROTECTED); } if ((newModes & PACKAGE) != 0 && !VerifyAccess.isSamePackage(this.lookupClass, requestedLookupClass)) { - newModes &= ~(PACKAGE|PRIVATE); + newModes &= ~(PACKAGE|PRIVATE|PROTECTED); } // Allow nestmate lookups to be created without special privilege: if ((newModes & PRIVATE) != 0 && !VerifyAccess.isSamePackageMember(this.lookupClass, requestedLookupClass)) { - newModes &= ~PRIVATE; + newModes &= ~(PRIVATE|PROTECTED); } if ((newModes & PUBLIC) != 0 && !VerifyAccess.isClassAccessible(requestedLookupClass, this.lookupClass, allowedModes)) { @@ -801,28 +826,29 @@ public class MethodHandles { * finds members, but with a lookup mode that has lost the given lookup mode. * The lookup mode to drop is one of {@link #PUBLIC PUBLIC}, {@link #MODULE * MODULE}, {@link #PACKAGE PACKAGE}, {@link #PROTECTED PROTECTED} or {@link #PRIVATE PRIVATE}. - * {@link #PROTECTED PROTECTED} is always dropped and so the resulting lookup - * mode will never have this access capability. When dropping {@code PACKAGE} - * then the resulting lookup will not have {@code PACKAGE} or {@code PRIVATE} - * access. When dropping {@code MODULE} then the resulting lookup will not - * have {@code MODULE}, {@code PACKAGE}, or {@code PRIVATE} access. If {@code - * PUBLIC} is dropped then the resulting lookup has no access. + * {@link #PROTECTED PROTECTED} and {@link #UNCONDITIONAL UNCONDITIONAL} are always + * dropped and so the resulting lookup mode will never have these access capabilities. + * When dropping {@code PACKAGE} then the resulting lookup will not have {@code PACKAGE} + * or {@code PRIVATE} access. When dropping {@code MODULE} then the resulting lookup will + * not have {@code MODULE}, {@code PACKAGE}, or {@code PRIVATE} access. If {@code PUBLIC} + * is dropped then the resulting lookup has no access. * @param modeToDrop the lookup mode to drop * @return a lookup object which lacks the indicated mode, or the same object if there is no change * @throws IllegalArgumentException if {@code modeToDrop} is not one of {@code PUBLIC}, - * {@code MODULE}, {@code PACKAGE}, {@code PROTECTED} or {@code PRIVATE} - * @since 9 + * {@code MODULE}, {@code PACKAGE}, {@code PROTECTED}, {@code PRIVATE} or {@code UNCONDITIONAL} * @see MethodHandles#privateLookupIn + * @since 9 */ public Lookup dropLookupMode(int modeToDrop) { int oldModes = lookupModes(); - int newModes = oldModes & ~(modeToDrop | PROTECTED); + int newModes = oldModes & ~(modeToDrop | PROTECTED | UNCONDITIONAL); switch (modeToDrop) { case PUBLIC: newModes &= ~(ALL_MODES); break; case MODULE: newModes &= ~(PACKAGE | PRIVATE); break; case PACKAGE: newModes &= ~(PRIVATE); break; case PROTECTED: - case PRIVATE: break; + case PRIVATE: + case UNCONDITIONAL: break; default: throw new IllegalArgumentException(modeToDrop + " is not a valid mode to drop"); } if (newModes == oldModes) return this; // return self if no change @@ -835,6 +861,12 @@ public class MethodHandles { /** Package-private version of lookup which is trusted. */ static final Lookup IMPL_LOOKUP = new Lookup(Object.class, TRUSTED); + /** Version of lookup which is trusted minimally. + * It can only be used to create method handles to publicly accessible + * members in packages that are exported unconditionally. + */ + static final Lookup PUBLIC_LOOKUP = new Lookup(Object.class, (PUBLIC|UNCONDITIONAL)); + private static void checkUnprivilegedlookupClass(Class lookupClass, int allowedModes) { String name = lookupClass.getName(); if (name.startsWith("java.lang.invoke.")) @@ -845,7 +877,7 @@ public class MethodHandles { // TODO replace with a more formal and less fragile mechanism // that does not bluntly restrict classes under packages within // java.base from looking up MethodHandles or VarHandles. - if (allowedModes == ALL_MODES && lookupClass.getClassLoader() == null) { + if (allowedModes == FULL_POWER_MODES && lookupClass.getClassLoader() == null) { if ((name.startsWith("java.") && !name.equals("java.lang.Thread") && !name.startsWith("java.util.concurrent.")) || @@ -866,6 +898,7 @@ public class MethodHandles { *
          *
        • If no access is allowed, the suffix is "/noaccess". *
        • If only public access to types in exported packages is allowed, the suffix is "/public". + *
        • If only public access and unconditional access are allowed, the suffix is "/publicLookup". *
        • If only public and module access are allowed, the suffix is "/module". *
        • If only public, module and package access are allowed, the suffix is "/package". *
        • If only public, module, package, and private access are allowed, the suffix is "/private". @@ -884,6 +917,9 @@ public class MethodHandles { * because it requires a direct subclass relationship between * caller and callee.) * @see #in + * + * @revised 9 + * @spec JPMS */ @Override public String toString() { @@ -893,13 +929,15 @@ public class MethodHandles { return cname + "/noaccess"; case PUBLIC: return cname + "/public"; + case PUBLIC|UNCONDITIONAL: + return cname + "/publicLookup"; case PUBLIC|MODULE: return cname + "/module"; case PUBLIC|MODULE|PACKAGE: return cname + "/package"; - case ALL_MODES & ~PROTECTED: + case FULL_POWER_MODES & ~PROTECTED: return cname + "/private"; - case ALL_MODES: + case FULL_POWER_MODES: return cname; case TRUSTED: return "/trusted"; // internal only; not exported @@ -1580,6 +1618,7 @@ return mh1; if (refKind == REF_invokeSpecial) refKind = REF_invokeVirtual; assert(method.isMethod()); + @SuppressWarnings("deprecation") Lookup lookup = m.isAccessible() ? IMPL_LOOKUP : this; return lookup.getDirectMethodNoSecurityManager(refKind, method.getDeclaringClass(), method, findBoundCallerClass(method)); } @@ -1662,6 +1701,7 @@ return mh1; public MethodHandle unreflectConstructor(Constructor c) throws IllegalAccessException { MemberName ctor = new MemberName(c); assert(ctor.isConstructor()); + @SuppressWarnings("deprecation") Lookup lookup = c.isAccessible() ? IMPL_LOOKUP : this; return lookup.getDirectConstructorNoSecurityManager(ctor.getDeclaringClass(), ctor); } @@ -1692,6 +1732,7 @@ return mh1; assert(isSetter ? MethodHandleNatives.refKindIsSetter(field.getReferenceKind()) : MethodHandleNatives.refKindIsGetter(field.getReferenceKind())); + @SuppressWarnings("deprecation") Lookup lookup = f.isAccessible() ? IMPL_LOOKUP : this; return lookup.getDirectFieldNoSecurityManager(field.getReferenceKind(), f.getDeclaringClass(), field); } @@ -2033,9 +2074,9 @@ return mh1; (defc == refc || Modifier.isPublic(refc.getModifiers()))); if (!classOK && (allowedModes & PACKAGE) != 0) { - classOK = (VerifyAccess.isClassAccessible(defc, lookupClass(), ALL_MODES) && + classOK = (VerifyAccess.isClassAccessible(defc, lookupClass(), FULL_POWER_MODES) && (defc == refc || - VerifyAccess.isClassAccessible(refc, lookupClass(), ALL_MODES))); + VerifyAccess.isClassAccessible(refc, lookupClass(), FULL_POWER_MODES))); } if (!classOK) return "class is not public"; @@ -2347,53 +2388,6 @@ return mh1; static ConcurrentHashMap LOOKASIDE_TABLE = new ConcurrentHashMap<>(); } - /** - * Helper class used to lazily create PUBLIC_LOOKUP with a lookup class - * in an unnamed module. - * - * @see Lookup#publicLookup - */ - private static class LookupHelper { - private static final String UNNAMED = "Unnamed"; - private static final String OBJECT = "java/lang/Object"; - - private static Class createClass() { - try { - ClassWriter cw = new ClassWriter(0); - cw.visit(Opcodes.V1_8, - Opcodes.ACC_FINAL + Opcodes.ACC_SUPER, - UNNAMED, - null, - OBJECT, - null); - cw.visitSource(UNNAMED, null); - cw.visitEnd(); - byte[] bytes = cw.toByteArray(); - ClassLoader loader = new ClassLoader(null) { - @Override - protected Class findClass(String cn) throws ClassNotFoundException { - if (cn.equals(UNNAMED)) - return super.defineClass(UNNAMED, bytes, 0, bytes.length); - throw new ClassNotFoundException(cn); - } - }; - return loader.loadClass(UNNAMED); - } catch (Exception e) { - throw new InternalError(e); - } - } - - private static final Class PUBLIC_LOOKUP_CLASS = createClass(); - - /** - * Lookup that is trusted minimally. It can only be used to create - * method handles to publicly accessible members in exported packages. - * - * @see MethodHandles#publicLookup - */ - static final Lookup PUBLIC_LOOKUP = new Lookup(PUBLIC_LOOKUP_CLASS, Lookup.PUBLIC); - } - /** * Produces a method handle constructing arrays of a desired type. * The return type of the method handle will be the array type. diff --git a/jdk/src/java.base/share/classes/java/lang/module/Configuration.java b/jdk/src/java.base/share/classes/java/lang/module/Configuration.java index 9753569374d..6203b1277ff 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/Configuration.java +++ b/jdk/src/java.base/share/classes/java/lang/module/Configuration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,126 +42,48 @@ import java.util.stream.Collectors; import java.util.stream.Stream; /** - * The configuration that is the result of resolution or resolution with - * service binding. + * A configuration that is the result of + * resolution or resolution with + * service binding. * - *

          Resolution

          + *

          A configuration encapsulates the readability graph that is the + * output of resolution. A readability graph is a directed graph where the nodes + * are of type {@link ResolvedModule} and the edges represent the readability + * amongst the modules. {@code Configuration} defines the {@link #modules() + * modules()} method to get the set of resolved modules in the graph. {@code + * ResolvedModule} defines the {@link ResolvedModule#reads() reads()} method to + * get the set of modules that a resolved module reads. The modules that are + * read may be in the same configuration or may be in {@link #parents() parent} + * configurations.

          * - *

          Resolution is the process of computing the transitive closure of a set - * of root modules over a set of observable modules by resolving the - * dependences expressed by {@code requires} clauses. + *

          Configuration defines the {@link #resolve(ModuleFinder,List,ModuleFinder,Collection) + * resolve} method to resolve a collection of root modules, and the {@link + * #resolveAndBind(ModuleFinder,List,ModuleFinder,Collection) resolveAndBind} + * method to do resolution with service binding. There are instance and + * static variants of both methods. The instance methods create a configuration + * with the receiver as the parent configuration. The static methods are for + * more advanced cases where there can be more than one parent configuration.

          * - * The dependence graph is augmented with edges that take account of - * implicitly declared dependences ({@code requires transitive}) to create a - * readability graph. A {@code Configuration} encapsulates the - * resulting graph of {@link ResolvedModule resolved modules}. - * - *

          Suppose we have the following observable modules:

          - *
           {@code
          - *     module m1 { requires m2; }
          - *     module m2 { requires transitive m3; }
          - *     module m3 { }
          - *     module m4 { }
          - * } 
          - * - *

          If the module {@code m1} is resolved then the resulting configuration - * contains three modules ({@code m1}, {@code m2}, {@code m3}). The edges in - * its readability graph are:

          - *
           {@code
          - *     m1 --> m2  (meaning m1 reads m2)
          - *     m1 --> m3
          - *     m2 --> m3
          - * } 
          - * - *

          Resolution is an additive process. When computing the transitive closure - * then the dependence relation may include dependences on modules in parent - * configurations. The result is a relative configuration that is - * relative to one or more parent configurations and where the readability graph - * may have edges from modules in the configuration to modules in parent - * configurations. - * - *

          - * - *

          Suppose we have the following observable modules:

          - *
           {@code
          - *     module m1 { requires m2; requires java.xml; }
          - *     module m2 { }
          - * } 
          - * - *

          If module {@code m1} is resolved with the configuration for the {@link - * java.lang.reflect.Layer#boot() boot} layer as the parent then the resulting - * configuration contains two modules ({@code m1}, {@code m2}). The edges in - * its readability graph are: - *

           {@code
          - *     m1 --> m2
          - *     m1 --> java.xml
          - * } 
          - * where module {@code java.xml} is in the parent configuration. For - * simplicity, this example omits the implicitly declared dependence on the - * {@code java.base} module. - * - * - *

          {@link ModuleDescriptor#isAutomatic() Automatic} modules receive special - * treatment during resolution. Each automatic module is resolved so that it - * reads all other modules in the configuration and all parent configurations. - * Each automatic module is also resolved as if it {@code requires transitive} - * all other automatic modules in the configuration (and all automatic modules - * in parent configurations).

          - - *

          Service binding

          - * - *

          Service binding is the process of augmenting a graph of resolved modules - * from the set of observable modules induced by the service-use dependence - * ({@code uses} and {@code provides} clauses). Any module that was not - * previously in the graph requires resolution to compute its transitive - * closure. Service binding is an iterative process in that adding a module - * that satisfies some service-use dependence may introduce new service-use - * dependences.

          - * - *

          Suppose we have the following observable modules:

          - *
           {@code
          - *     module m1 { exports p; uses p.S; }
          - *     module m2 { requires m1; provides p.S with p2.S2; }
          - *     module m3 { requires m1; requires m4; provides p.S with p3.S3; }
          - *     module m4 { }
          - * } 
          - * - *

          If the module {@code m1} is resolved then the resulting graph of modules - * has one module ({@code m1}). If the graph is augmented with modules induced - * by the service-use dependence relation then the configuration will contain - * four modules ({@code m1}, {@code m2}, {@code m3}, {@code m4}). The edges in - * its readability graph are:

          - *
           {@code
          - *     m2 --> m1
          - *     m3 --> m1
          - *     m3 --> m4
          - * } 
          - *

          The edges in the conceptual service-use graph are:

          - *
           {@code
          - *     m1 --> m2  (meaning m1 uses a service that is provided by m2)
          - *     m1 --> m3
          - * } 
          - * - *

          If this configuration is instantiated as a {@code Layer}, and if code in - * module {@code m1} uses {@link java.util.ServiceLoader ServiceLoader} to - * iterate over implementations of {@code p.S.class}, then it will iterate over - * an instance of {@code p2.S2} and {@code p3.S3}.

          + *

          Each {@link java.lang.reflect.Layer layer} of modules in the Java virtual + * machine is created from a configuration. The configuration for the {@link + * java.lang.reflect.Layer#boot() boot} layer is obtained by invoking {@code + * Layer.boot().configuration()}. The configuration for the boot layer will + * often be the parent when creating new configurations.

          * *

          Example

          * - *

          The following example uses the {@code resolveRequires} method to resolve - * a module named myapp with the configuration for the boot layer as - * the parent configuration. It prints the name of each resolved module and - * the names of the modules that each module reads.

          + *

          The following example uses the {@link + * #resolve(ModuleFinder,ModuleFinder,Collection) resolve} method to resolve a + * module named myapp with the configuration for the boot layer as the + * parent configuration. It prints the name of each resolved module and the + * names of the modules that each module reads.

          * *
          {@code
            *    ModuleFinder finder = ModuleFinder.of(dir1, dir2, dir3);
            *
            *    Configuration parent = Layer.boot().configuration();
            *
          - *    Configuration cf = parent.resolveRequires(finder,
          - *                                              ModuleFinder.of(),
          - *                                              Set.of("myapp"));
          + *    Configuration cf = parent.resolve(finder, ModuleFinder.of(), Set.of("myapp"));
            *    cf.modules().forEach(m -> {
            *        System.out.format("%s -> %s%n",
            *            m.name(),
          @@ -172,6 +94,7 @@ import java.util.stream.Stream;
            * }
          * * @since 9 + * @spec JPMS * @see java.lang.reflect.Layer */ public final class Configuration { @@ -186,11 +109,23 @@ public final class Configuration { private final Set modules; private final Map nameToModule; + // module constraints on target + private final String osName; + private final String osArch; + private final String osVersion; + + String osName() { return osName; } + String osArch() { return osArch; } + String osVersion() { return osVersion; } + private Configuration() { this.parents = Collections.emptyList(); this.graph = Collections.emptyMap(); this.modules = Collections.emptySet(); this.nameToModule = Collections.emptyMap(); + this.osName = null; + this.osArch = null; + this.osVersion = null; } private Configuration(List parents, @@ -214,27 +149,30 @@ public final class Configuration { this.graph = g; this.modules = Set.of(moduleArray); this.nameToModule = Map.ofEntries(nameEntries); - } + this.osName = resolver.osName(); + this.osArch = resolver.osArch(); + this.osVersion = resolver.osVersion(); + } /** * Resolves a collection of root modules, with this configuration as its * parent, to create a new configuration. This method works exactly as * specified by the static {@link - * #resolveRequires(ModuleFinder,List,ModuleFinder,Collection) resolveRequires} + * #resolve(ModuleFinder,List,ModuleFinder,Collection) resolve} * method when invoked with this configuration as the parent. In other words, * if this configuration is {@code cf} then this method is equivalent to * invoking: *
           {@code
          -     *     Configuration.resolveRequires(before, List.of(cf), after, roots);
          +     *     Configuration.resolve(before, List.of(cf), after, roots);
                * }
          * * @param before * The before module finder to find modules * @param after - * The after module finder to locate modules when a - * module cannot be located by the {@code before} module finder - * and the module is not in this configuration + * The after module finder to locate modules when not + * located by the {@code before} module finder or in parent + * configurations * @param roots * The possibly-empty collection of module names of the modules * to resolve @@ -242,16 +180,20 @@ public final class Configuration { * @return The configuration that is the result of resolving the given * root modules * + * @throws FindException + * If resolution fails for any of the observability-related reasons + * specified by the static {@code resolve} method * @throws ResolutionException - * If resolution or the post-resolution checks fail + * If any of the post-resolution consistency checks specified by + * the static {@code resolve} method fail * @throws SecurityException * If locating a module is denied by the security manager */ - public Configuration resolveRequires(ModuleFinder before, - ModuleFinder after, - Collection roots) + public Configuration resolve(ModuleFinder before, + ModuleFinder after, + Collection roots) { - return resolveRequires(before, List.of(this), after, roots); + return resolve(before, List.of(this), after, roots); } @@ -259,12 +201,12 @@ public final class Configuration { * Resolves a collection of root modules, with service binding, and with * this configuration as its parent, to create a new configuration. * This method works exactly as specified by the static {@link - * #resolveRequiresAndUses(ModuleFinder,List,ModuleFinder,Collection) - * resolveRequiresAndUses} method when invoked with this configuration + * #resolveAndBind(ModuleFinder,List,ModuleFinder,Collection) + * resolveAndBind} method when invoked with this configuration * as the parent. In other words, if this configuration is {@code cf} then * this method is equivalent to invoking: *
           {@code
          -     *     Configuration.resolveRequiresAndUses(before, List.of(cf), after, roots);
          +     *     Configuration.resolveAndBind(before, List.of(cf), after, roots);
                * }
          * * @@ -272,25 +214,29 @@ public final class Configuration { * The before module finder to find modules * @param after * The after module finder to locate modules when not - * located by the {@code before} module finder and this - * configuration + * located by the {@code before} module finder or in parent + * configurations * @param roots * The possibly-empty collection of module names of the modules * to resolve * - * @return The configuration that is the result of resolving the given - * root modules + * @return The configuration that is the result of resolving, with service + * binding, the given root modules * + * @throws FindException + * If resolution fails for any of the observability-related reasons + * specified by the static {@code resolve} method * @throws ResolutionException - * If resolution or the post-resolution checks fail + * If any of the post-resolution consistency checks specified by + * the static {@code resolve} method fail * @throws SecurityException * If locating a module is denied by the security manager */ - public Configuration resolveRequiresAndUses(ModuleFinder before, - ModuleFinder after, - Collection roots) + public Configuration resolveAndBind(ModuleFinder before, + ModuleFinder after, + Collection roots) { - return resolveRequiresAndUses(before, List.of(this), after, roots); + return resolveAndBind(before, List.of(this), after, roots); } @@ -301,14 +247,14 @@ public final class Configuration { * * This method is used to create the configuration for the boot layer. */ - static Configuration resolveRequiresAndUses(ModuleFinder finder, - Collection roots, - boolean check, - PrintStream traceOutput) + static Configuration resolveAndBind(ModuleFinder finder, + Collection roots, + boolean check, + PrintStream traceOutput) { List parents = List.of(empty()); Resolver resolver = new Resolver(finder, parents, ModuleFinder.of(), traceOutput); - resolver.resolveRequires(roots).resolveUses(); + resolver.resolve(roots).bind(); return new Configuration(parents, resolver, check); } @@ -328,11 +274,11 @@ public final class Configuration { * *

          When all modules have been resolved then the resulting dependency * graph is checked to ensure that it does not contain cycles. A - * readability graph is constructed and in conjunction with the module + * readability graph is constructed, and in conjunction with the module * exports and service use, checked for consistency.

          * - *

          Resolution and the (post-resolution) consistency checks may fail for - * following reasons:

          + *

          Resolution may fail with {@code FindException} for the following + * observability-related reasons:

          * *
            *
          • A root module, or a direct or transitive dependency, is not @@ -343,6 +289,20 @@ public final class Configuration { * descriptor ({@code module-info.class}) or two versions of the same * module are found in the same directory.

          • * + *
          • A module with the required name is found but the module + * requires a different {@link ModuleDescriptor#osName() operating + * system}, {@link ModuleDescriptor#osArch() architecture}, or {@link + * ModuleDescriptor#osVersion() version} to other modules that have + * been resolved for the new configuration or modules in the parent + * configurations.

          • + * + *
          + * + *

          Post-resolution consistency checks may fail with {@code + * ResolutionException} for the following reasons:

          + * + *
            + * *
          • A cycle is detected, say where module {@code m1} requires * module {@code m2} and {@code m2} requires {@code m1}.

          • * @@ -356,21 +316,12 @@ public final class Configuration { * module {@code M} nor exported to {@code M} by any module that * {@code M} reads.

            * - *
          • A module {@code M} declares that it - * "{@code provides ... with q.T}" but package {@code q} is not in - * module {@code M}.

          • - * - *
          • Two or more modules in the configuration are specific to - * different {@link ModuleDescriptor#osName() operating systems}, - * {@link ModuleDescriptor#osArch() architectures}, or {@link - * ModuleDescriptor#osVersion() versions}.

          • - * - *
          • Other implementation specific checks, for example referential - * integrity checks to ensure that different versions of tighly coupled - * modules cannot be combined in the same configuration.

          • - * *
          * + * @implNote In the implementation then observability of modules may depend + * on referential integrity checks that ensure different builds of tightly + * coupled modules are not combined in the same configuration. + * * @param before * The before module finder to find modules * @param parents @@ -386,17 +337,22 @@ public final class Configuration { * @return The configuration that is the result of resolving the given * root modules * + * @throws FindException + * If resolution fails for an observability-related reason * @throws ResolutionException - * If resolution or the post-resolution checks fail + * If a post-resolution consistency checks fails * @throws IllegalArgumentException - * If the list of parents is empty + * If the list of parents is empty, or the list has two or more + * parents with modules for different target operating systems, + * architectures, or versions + * * @throws SecurityException * If locating a module is denied by the security manager */ - public static Configuration resolveRequires(ModuleFinder before, - List parents, - ModuleFinder after, - Collection roots) + public static Configuration resolve(ModuleFinder before, + List parents, + ModuleFinder after, + Collection roots) { Objects.requireNonNull(before); Objects.requireNonNull(after); @@ -407,7 +363,7 @@ public final class Configuration { throw new IllegalArgumentException("'parents' is empty"); Resolver resolver = new Resolver(before, parentList, after, null); - resolver.resolveRequires(roots); + resolver.resolve(roots); return new Configuration(parentList, resolver, true); } @@ -417,24 +373,24 @@ public final class Configuration { * configuration. * *

          This method works exactly as specified by {@link - * #resolveRequires(ModuleFinder,List,ModuleFinder,Collection) - * resolveRequires} except that the graph of resolved modules is augmented + * #resolve(ModuleFinder,List,ModuleFinder,Collection) + * resolve} except that the graph of resolved modules is augmented * with modules induced by the service-use dependence relation.

          * *

          More specifically, the root modules are resolved as if by calling - * {@code resolveRequires}. The resolved modules, and all modules in the + * {@code resolve}. The resolved modules, and all modules in the * parent configurations, with {@link ModuleDescriptor#uses() service * dependences} are then examined. All modules found by the given module * finders that {@link ModuleDescriptor#provides() provide} an * implementation of one or more of the service types are added to the * module graph and then resolved as if by calling the {@code - * resolveRequires} method. Adding modules to the module graph may - * introduce new service-use dependences and so the process works - * iteratively until no more modules are added.

          + * resolve} method. Adding modules to the module graph may introduce new + * service-use dependences and so the process works iteratively until no + * more modules are added.

          * - *

          As service binding involves resolution then it may fail with {@link - * ResolutionException} for exactly the same reasons specified in - * {@code resolveRequires}.

          + *

          As service binding involves resolution then it may fail with {@code + * FindException} or {@code ResolutionException} for exactly the same + * reasons specified in {@code resolve}.

          * * @param before * The before module finder to find modules @@ -448,20 +404,26 @@ public final class Configuration { * The possibly-empty collection of module names of the modules * to resolve * - * @return The configuration that is the result of resolving the given - * root modules + * @return The configuration that is the result of resolving, with service + * binding, the given root modules * + * @throws FindException + * If resolution fails for any of the observability-related reasons + * specified by the static {@code resolve} method * @throws ResolutionException - * If resolution or the post-resolution checks fail + * If any of the post-resolution consistency checks specified by + * the static {@code resolve} method fail * @throws IllegalArgumentException - * If the list of parents is empty + * If the list of parents is empty, or the list has two or more + * parents with modules for different target operating systems, + * architectures, or versions * @throws SecurityException * If locating a module is denied by the security manager */ - public static Configuration resolveRequiresAndUses(ModuleFinder before, - List parents, - ModuleFinder after, - Collection roots) + public static Configuration resolveAndBind(ModuleFinder before, + List parents, + ModuleFinder after, + Collection roots) { Objects.requireNonNull(before); Objects.requireNonNull(after); @@ -472,7 +434,7 @@ public final class Configuration { throw new IllegalArgumentException("'parents' is empty"); Resolver resolver = new Resolver(before, parentList, after, null); - resolver.resolveRequires(roots).resolveUses(); + resolver.resolve(roots).bind(); return new Configuration(parentList, resolver, true); } diff --git a/jdk/src/java.base/share/classes/java/lang/module/FindException.java b/jdk/src/java.base/share/classes/java/lang/module/FindException.java index d76f2935e7e..411959eb418 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/FindException.java +++ b/jdk/src/java.base/share/classes/java/lang/module/FindException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,10 +26,14 @@ package java.lang.module; /** - * Thrown by module finders when finding a module fails. + * Thrown by a {@link ModuleFinder ModuleFinder} when an error occurs finding + * a module. Also thrown by {@link + * Configuration#resolve(ModuleFinder,java.util.List,ModuleFinder,java.util.Collection) + * Configuration.resolve} when resolution fails for observability-related + * reasons. * - * @see ModuleFinder * @since 9 + * @spec JPMS */ public class FindException extends RuntimeException { diff --git a/jdk/src/java.base/share/classes/java/lang/module/InvalidModuleDescriptorException.java b/jdk/src/java.base/share/classes/java/lang/module/InvalidModuleDescriptorException.java index 981f23a5189..3e306886fb2 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/InvalidModuleDescriptorException.java +++ b/jdk/src/java.base/share/classes/java/lang/module/InvalidModuleDescriptorException.java @@ -31,6 +31,7 @@ package java.lang.module; * * @see ModuleDescriptor#read * @since 9 + * @spec JPMS */ public class InvalidModuleDescriptorException extends RuntimeException { private static final long serialVersionUID = 4863390386809347380L; diff --git a/jdk/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java b/jdk/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java index b10d986ade9..6c05e821026 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java +++ b/jdk/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,6 +32,7 @@ import java.io.UncheckedIOException; import java.nio.ByteBuffer; import java.nio.file.Path; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.EnumSet; @@ -56,29 +57,83 @@ import jdk.internal.module.ModuleInfo; /** * A module descriptor. * - *

          A {@code ModuleDescriptor} is typically created from the binary form - * of a module declaration. Alternatively, the {@link ModuleDescriptor.Builder} - * class can be used to create a {@code ModuleDescriptor} from its components. - * The {@link #module module}, {@link #openModule openModule}, and {@link - * #automaticModule automaticModule} methods create builders for building - * different kinds of modules.

          + *

          A module descriptor describes a named module and defines methods to + * obtain each of its components. The module descriptor for a named module + * in the Java virtual machine is obtained by invoking the {@link + * java.lang.reflect.Module Module}'s {@link java.lang.reflect.Module#getDescriptor + * getDescriptor} method. Module descriptors can also be created using the + * {@link ModuleDescriptor.Builder} class or by reading the binary form of a + * module declaration ({@code module-info.class}) using the {@link + * #read(InputStream,Supplier) read} methods defined here.

          + * + *

          A module descriptor describes a normal, open, or automatic + * module. Normal modules and open modules describe their {@link + * #requires() dependences}, {@link #exports() exported-packages}, the services + * that they {@link #uses() use} or {@link #provides() provide}, and other + * components. Normal modules may {@link #opens() open} specific + * packages. The module descriptor for an open modules does not declare any + * open packages (its {@code opens} method returns an empty set) but when + * instantiated in the Java virtual machine then it is treated as if all + * packages are open. The module descriptor for an automatic module does not + * declare any dependences (except for the mandatory dependency on {@code + * java.base}), and does not declare any exported or open packages. Automatic + * module receive special treatment during resolution so that they read all + * other modules in the configuration. When an automatic module is instantiated + * in the Java virtual machine then it reads every unnamed module and is + * treated as if all packages are exported and open.

          * *

          {@code ModuleDescriptor} objects are immutable and safe for use by * multiple concurrent threads.

          * - * @since 9 * @see java.lang.reflect.Module + * @since 9 + * @spec JPMS */ public class ModuleDescriptor implements Comparable { + /** + * A modifier on a module. + * + * @see ModuleDescriptor#modifiers() + * @since 9 + */ + public static enum Modifier { + /** + * An open module. An open module does not declare any open packages + * but the resulting module is treated as if all packages are open. + */ + OPEN, + + /** + * An automatic module. An automatic module is treated as if it exports + * and opens all packages. + * + * @apiNote This modifier does not correspond to a module flag in the + * binary form of a module declaration ({@code module-info.class}). + */ + AUTOMATIC, + + /** + * The module was not explicitly or implicitly declared. + */ + SYNTHETIC, + + /** + * The module was implicitly declared. + */ + MANDATED; + } + + /** *

          A dependence upon a module

          * * @see ModuleDescriptor#requires() * @since 9 + * @spec JPMS */ public final static class Requires @@ -88,7 +143,9 @@ public class ModuleDescriptor /** * A modifier on a module dependence. * + * @see Requires#modifiers() * @since 9 + * @spec JPMS */ public static enum Modifier { @@ -171,14 +228,18 @@ public class ModuleDescriptor * Compares this module dependence to another. * *

          Two {@code Requires} objects are compared by comparing their - * module name lexicographically. Where the module names are equal then - * the sets of modifiers are compared based on a value computed from the - * ordinal of each modifier. Where the module names are equal and the - * set of modifiers are equal then the version of the modules recorded - * at compile-time are compared. When comparing the versions recorded - * at compile-time then a dependence that has a recorded version is - * considered to succeed a dependence that does not have a recorded - * version.

          + * module names lexicographically. Where the module names are equal + * then the sets of modifiers are compared in the same way that + * module modifiers are compared (see {@link ModuleDescriptor#compareTo + * ModuleDescriptor.compareTo}). Where the module names are equal and + * the set of modifiers are equal then the version of the modules + * recorded at compile-time are compared. When comparing the versions + * recorded at compile-time then a dependence that has a recorded + * version is considered to succeed a dependence that does not have a + * recorded version.

          + * + * @param that + * The module dependence to compare * * @return A negative integer, zero, or a positive integer if this module * dependence is less than, equal to, or greater than the given @@ -186,39 +247,22 @@ public class ModuleDescriptor */ @Override public int compareTo(Requires that) { + if (this == that) return 0; + int c = this.name().compareTo(that.name()); - if (c != 0) - return c; + if (c != 0) return c; // modifiers - c = Long.compare(this.modsValue(), that.modsValue()); - if (c != 0) - return c; + long v1 = modsValue(this.modifiers()); + long v2 = modsValue(that.modifiers()); + c = Long.compare(v1, v2); + if (c != 0) return c; // compiledVersion - if (this.compiledVersion != null) { - if (that.compiledVersion != null) - c = this.compiledVersion.compareTo(that.compiledVersion); - else - c = 1; - } else { - if (that.compiledVersion != null) - c = -1; - } + c = compare(this.compiledVersion, that.compiledVersion); + if (c != 0) return c; - return c; - } - - /** - * Return a value for the modifiers to allow sets of modifiers to be - * compared. - */ - private long modsValue() { - long value = 0; - for (Modifier m : mods) { - value += 1 << m.ordinal(); - } - return value; + return 0; } /** @@ -266,9 +310,9 @@ public class ModuleDescriptor } /** - * Returns a string describing module dependence. + * Returns a string describing this module dependence. * - * @return A string describing module dependence + * @return A string describing this module dependence */ @Override public String toString() { @@ -285,18 +329,23 @@ public class ModuleDescriptor /** - *

          A module export, may be qualified or unqualified.

          + *

          A package exported by a module, may be qualified or unqualified.

          * * @see ModuleDescriptor#exports() * @since 9 + * @spec JPMS */ - public final static class Exports { + public final static class Exports + implements Comparable + { /** - * A modifier on a module export. + * A modifier on an exported package. * + * @see Exports#modifiers() * @since 9 + * @spec JPMS */ public static enum Modifier { @@ -380,6 +429,52 @@ public class ModuleDescriptor return targets; } + /** + * Compares this module export to another. + * + *

          Two {@code Exports} objects are compared by comparing the package + * names lexicographically. Where the packages names are equal then the + * sets of modifiers are compared in the same way that module modifiers + * are compared (see {@link ModuleDescriptor#compareTo + * ModuleDescriptor.compareTo}). Where the package names are equal and + * the set of modifiers are equal then the set of target modules are + * compared. This is done by sorting the names of the target modules + * in ascending order, and according to their natural ordering, and then + * comparing the corresponding elements lexicographically. Where the + * sets differ in size, and the larger set contains all elements of the + * smaller set, then the larger set is considered to succeed the smaller + * set.

          + * + * @param that + * The module export to compare + * + * @return A negative integer, zero, or a positive integer if this module + * export is less than, equal to, or greater than the given + * export dependence + */ + @Override + public int compareTo(Exports that) { + if (this == that) return 0; + + int c = source.compareTo(that.source); + if (c != 0) + return c; + + // modifiers + long v1 = modsValue(this.modifiers()); + long v2 = modsValue(that.modifiers()); + c = Long.compare(v1, v2); + if (c != 0) + return c; + + // targets + c = compare(targets, that.targets); + if (c != 0) + return c; + + return 0; + } + /** * Computes a hash code for this module export. * @@ -425,9 +520,9 @@ public class ModuleDescriptor } /** - * Returns a string describing module export. + * Returns a string describing the exported package. * - * @return A string describing module export + * @return A string describing the exported package */ @Override public String toString() { @@ -441,8 +536,7 @@ public class ModuleDescriptor /** - *

          Represents a module opens directive, may be qualified or - * unqualified.

          + *

          A package opened by a module, may be qualified or unqualified.

          * *

          The opens directive in a module declaration declares a * package to be open to allow all types in the package, and all their @@ -452,26 +546,30 @@ public class ModuleDescriptor * * @see ModuleDescriptor#opens() * @since 9 + * @spec JPMS */ - public final static class Opens { - + public final static class Opens + implements Comparable + { /** - * A modifier on a module opens directive. + * A modifier on an open package. * + * @see Opens#modifiers() * @since 9 + * @spec JPMS */ public static enum Modifier { /** - * The opens was not explicitly or implicitly declared in the - * source of the module declaration. + * The open package was not explicitly or implicitly declared in + * the source of the module declaration. */ SYNTHETIC, /** - * The opens was implicitly declared in the source of the module - * declaration. + * The open package was implicitly declared in the source of the + * module declaration. */ MANDATED; @@ -543,6 +641,52 @@ public class ModuleDescriptor return targets; } + /** + * Compares this module opens to another. + * + *

          Two {@code Opens} objects are compared by comparing the package + * names lexicographically. Where the packages names are equal then the + * sets of modifiers are compared in the same way that module modifiers + * are compared (see {@link ModuleDescriptor#compareTo + * ModuleDescriptor.compareTo}). Where the package names are equal and + * the set of modifiers are equal then the set of target modules are + * compared. This is done by sorting the names of the target modules + * in ascending order, and according to their natural ordering, and then + * comparing the corresponding elements lexicographically. Where the + * sets differ in size, and the larger set contains all elements of the + * smaller set, then the larger set is considered to succeed the smaller + * set.

          + * + * @param that + * The module opens to compare + * + * @return A negative integer, zero, or a positive integer if this module + * opens is less than, equal to, or greater than the given + * module opens + */ + @Override + public int compareTo(Opens that) { + if (this == that) return 0; + + int c = source.compareTo(that.source); + if (c != 0) + return c; + + // modifiers + long v1 = modsValue(this.modifiers()); + long v2 = modsValue(that.modifiers()); + c = Long.compare(v1, v2); + if (c != 0) + return c; + + // targets + c = compare(targets, that.targets); + if (c != 0) + return c; + + return 0; + } + /** * Computes a hash code for this module opens. * @@ -588,9 +732,9 @@ public class ModuleDescriptor } /** - * Returns a string describing module opens. + * Returns a string describing the open package. * - * @return A string describing module opens + * @return A string describing the open package */ @Override public String toString() { @@ -608,10 +752,12 @@ public class ModuleDescriptor * * @see ModuleDescriptor#provides() * @since 9 + * @spec JPMS */ - public final static class Provides { - + public final static class Provides + implements Comparable + { private final String service; private final List providers; @@ -641,6 +787,46 @@ public class ModuleDescriptor */ public List providers() { return providers; } + /** + * Compares this provides to another. + * + *

          Two {@code Provides} objects are compared by comparing the fully + * qualified class name of the service type lexicographically. Where the + * class names are equal then the list of the provider class names are + * compared by comparing the corresponding elements of both lists + * lexicographically and in sequence. Where the lists differ in size, + * {@code N} is the size of the shorter list, and the first {@code N} + * corresponding elements are equal, then the longer list is considered + * to succeed the shorter list.

          + * + * @param that + * The {@code Provides} to compare + * + * @return A negative integer, zero, or a positive integer if this provides + * is less than, equal to, or greater than the given provides + */ + public int compareTo(Provides that) { + if (this == that) return 0; + + int c = service.compareTo(that.service); + if (c != 0) return c; + + // compare provider class names in sequence + int size1 = this.providers.size(); + int size2 = that.providers.size(); + for (int index=0; index size2) ? 1 : -1; + } + } + /** * Computes a hash code for this provides. * @@ -699,7 +885,7 @@ public class ModuleDescriptor * *

          A version string has three components: The version number itself, an * optional pre-release version, and an optional build version. Each - * component is sequence of tokens; each token is either a non-negative + * component is a sequence of tokens; each token is either a non-negative * integer or a string. Tokens are separated by the punctuation characters * {@code '.'}, {@code '-'}, or {@code '+'}, or by transitions from a * sequence of digits to a sequence of characters that are neither digits @@ -740,6 +926,7 @@ public class ModuleDescriptor * * @see ModuleDescriptor#version() * @since 9 + * @spec JPMS */ public final static class Version @@ -1009,36 +1196,26 @@ public class ModuleDescriptor } - + private final String name; private final Version version; - private final boolean open; - - // Indicates if synthesised for a JAR file found on the module path - private final boolean automatic; - - // Not generated from a module-info.java - private final boolean synthetic; - + private final Set modifiers; + private final boolean open; // true if modifiers contains OPEN + private final boolean automatic; // true if modifiers contains AUTOMATIC private final Set requires; private final Set exports; private final Set opens; private final Set uses; private final Set provides; - - // Added post-compilation by tools private final Set packages; private final String mainClass; private final String osName; private final String osArch; private final String osVersion; - private ModuleDescriptor(String name, Version version, - boolean open, - boolean automatic, - boolean synthetic, + Set modifiers, Set requires, Set exports, Set opens, @@ -1052,10 +1229,9 @@ public class ModuleDescriptor { this.name = name; this.version = version; - this.open = open; - this.automatic = automatic; - this.synthetic = synthetic; - + this.modifiers = emptyOrUnmodifiableSet(modifiers); + this.open = modifiers.contains(Modifier.OPEN); + this.automatic = modifiers.contains(Modifier.AUTOMATIC); assert (requires.stream().map(Requires::name).distinct().count() == requires.size()); this.requires = emptyOrUnmodifiableSet(requires); @@ -1071,41 +1247,13 @@ public class ModuleDescriptor this.osVersion = osVersion; } - /** - * Clones the given module descriptor with an augmented set of packages - */ - ModuleDescriptor(ModuleDescriptor md, Set pkgs) { - this.name = md.name; - this.version = md.version; - this.open = md.open; - this.automatic = md.automatic; - this.synthetic = md.synthetic; - - this.requires = md.requires; - this.exports = md.exports; - this.opens = md.opens; - this.uses = md.uses; - this.provides = md.provides; - - Set packages = new HashSet<>(md.packages); - packages.addAll(pkgs); - this.packages = emptyOrUnmodifiableSet(packages); - - this.mainClass = md.mainClass; - this.osName = md.osName; - this.osArch = md.osArch; - this.osVersion = md.osVersion; - } - /** * Creates a module descriptor from its components. * The arguments are pre-validated and sets are unmodifiable sets. */ ModuleDescriptor(String name, Version version, - boolean open, - boolean automatic, - boolean synthetic, + Set modifiers, Set requires, Set exports, Set opens, @@ -1120,9 +1268,9 @@ public class ModuleDescriptor boolean unused) { this.name = name; this.version = version; - this.open = open; - this.automatic = automatic; - this.synthetic = synthetic; + this.modifiers = modifiers; + this.open = modifiers.contains(Modifier.OPEN); + this.automatic = modifiers.contains(Modifier.AUTOMATIC); this.requires = requires; this.exports = exports; this.opens = opens; @@ -1137,7 +1285,7 @@ public class ModuleDescriptor } /** - *

          The module name.

          + *

          Returns the module name.

          * * @return The module name */ @@ -1145,12 +1293,20 @@ public class ModuleDescriptor return name; } + /** + *

          Returns the set of module modifiers.

          + * + * @return A possibly-empty unmodifiable set of modifiers + */ + public Set modifiers() { + return modifiers; + } + /** *

          Returns {@code true} if this is an open module.

          * - *

          An open module does not declare any open packages (the {@link #opens() - * opens} method returns an empty set) but the resulting module is treated - * as if all packages are open.

          + *

          This method is equivalent to testing if the set of {@link #modifiers + * modifiers} contains the {@link Modifier#OPEN OPEN} modifier.

          * * @return {@code true} if this is an open module */ @@ -1161,12 +1317,8 @@ public class ModuleDescriptor /** *

          Returns {@code true} if this is an automatic module.

          * - *

          An automatic module is defined implicitly rather than explicitly - * and therefore does not have a module declaration. JAR files located on - * the application module path, or by the {@link ModuleFinder} returned by - * {@link ModuleFinder#of(java.nio.file.Path[]) ModuleFinder.of}, are - * treated as automatic modules if they do have not have a module - * declaration.

          + *

          This method is equivalent to testing if the set of {@link #modifiers + * modifiers} contains the {@link Modifier#OPEN AUTOMATIC} modifier.

          * * @return {@code true} if this is an automatic module */ @@ -1175,20 +1327,13 @@ public class ModuleDescriptor } /** - *

          Returns {@code true} if this module descriptor was not generated - * from an explicit module declaration ({@code module-info.java}) - * or an implicit module declaration (an {@link #isAutomatic() automatic} - * module).

          + *

          Returns the set of {@code Requires} objects representing the module + * dependences.

          * - * @return {@code true} if this module descriptor was not generated by - * an explicit or implicit module declaration - */ - public boolean isSynthetic() { - return synthetic; - } - - /** - *

          The dependences of this module.

          + *

          The set includes a dependency on "{@code java.base}" when this + * module is not named "{@code java.base}". If this module is an automatic + * module then it does not have a dependency on any module other than + * "{@code java.base}".

          * * @return A possibly-empty unmodifiable set of {@link Requires} objects */ @@ -1197,7 +1342,11 @@ public class ModuleDescriptor } /** - *

          The module exports.

          + *

          Returns the set of {@code Exports} objects representing the exported + * packages.

          + * + *

          If this module is an automatic module then the set of exports + * is empty.

          * * @return A possibly-empty unmodifiable set of exported packages */ @@ -1206,16 +1355,11 @@ public class ModuleDescriptor } /** - *

          The module opens directives.

          + *

          Returns the set of {@code Opens} objects representing the open + * packages.

          * - *

          Each {@code Opens} object in the set represents a package (and - * the set of target module names when qualified) where all types in the - * package, and all their members, not just public types and their public - * members, can be reflected on when using APIs that bypass or suppress - * default Java language access control checks.

          - * - *

          This method returns an empty set when invoked on {@link #isOpen() - * open} module.

          + *

          If this module is an open module or an automatic module then the + * set of open packages is empty.

          * * @return A possibly-empty unmodifiable set of open packages */ @@ -1224,7 +1368,10 @@ public class ModuleDescriptor } /** - *

          The service dependences of this module.

          + *

          Returns the set of service dependences.

          + * + *

          If this module is an automatic module then the set of service + * dependences is empty.

          * * @return A possibly-empty unmodifiable set of the fully qualified class * names of the service types used @@ -1234,7 +1381,8 @@ public class ModuleDescriptor } /** - *

          The services that this module provides.

          + *

          Returns the set of {@code Provides} objects representing the + * services that the module provides.

          * * @return The possibly-empty unmodifiable set of the services that this * module provides @@ -1244,7 +1392,7 @@ public class ModuleDescriptor } /** - * Returns this module's version. + *

          Returns the module version.

          * * @return This module's version */ @@ -1253,10 +1401,10 @@ public class ModuleDescriptor } /** - * Returns a string containing this module's name and, if present, its - * version. + *

          Returns a string containing the module name and, if present, its + * version.

          * - * @return A string containing this module's name and, if present, its + * @return A string containing the module name and, if present, its * version. */ public String toNameAndVersion() { @@ -1268,51 +1416,51 @@ public class ModuleDescriptor } /** - * Returns the module's main class. + *

          Returns the module main class.

          * - * @return The fully qualified class name of this module's main class + * @return The fully qualified class name of the module's main class */ public Optional mainClass() { return Optional.ofNullable(mainClass); } /** - * Returns the operating system name if this module is operating system + * Returns the operating system name if the module is operating system * specific. * * @return The operating system name or an empty {@code Optional} - * if this module is not operating system specific + * if the module is not operating system specific */ public Optional osName() { return Optional.ofNullable(osName); } /** - * Returns the operating system architecture if this module is operating + * Returns the operating system architecture if the module is operating * system architecture specific. * * @return The operating system architecture or an empty {@code Optional} - * if this module is not operating system architecture specific + * if the module is not operating system architecture specific */ public Optional osArch() { return Optional.ofNullable(osArch); } /** - * Returns the operating system version if this module is operating + * Returns the operating system version if the module is operating * system version specific. * * @return The operating system version or an empty {@code Optional} - * if this module is not operating system version specific + * if the module is not operating system version specific */ public Optional osVersion() { return Optional.ofNullable(osVersion); } /** - * Returns the names of all packages in this module. + * Returns the set of packages in the module. * - * @return A possibly-empty unmodifiable set of all packages in the module + * @return A possibly-empty unmodifiable set of the packages in the module */ public Set packages() { return packages; @@ -1320,37 +1468,53 @@ public class ModuleDescriptor /** - * A builder used for building {@link ModuleDescriptor} objects. + * A builder for building {@link ModuleDescriptor} objects. * - *

          {@code ModuleDescriptor} defines the {@link #module module}, {@link - * #openModule openModule}, and {@link #automaticModule automaticModule} - * methods to create builders for building different kinds of modules.

          + *

          {@code ModuleDescriptor} defines the {@link #newModule newModule}, + * {@link #newOpenModule newOpenModule}, and {@link #newAutomaticModule + * newAutomaticModule} methods to create builders for building + * normal, open, and automatic modules.

          + * + *

          The set of packages in the module are accumulated by the {@code + * Builder} as the {@link ModuleDescriptor.Builder#exports(String) exports}, + * {@link ModuleDescriptor.Builder#opens(String) opens}, + * {@link ModuleDescriptor.Builder#packages(Set) packages}, + * {@link ModuleDescriptor.Builder#provides(String,List) provides}, and + * {@link ModuleDescriptor.Builder#mainClass(String) mainClass} methods are + * invoked.

          + * + *

          The module names, package names, and class names that are parameters + * specified to the builder methods are the module names, package names, + * and qualified names of classes (in named packages) as defined in the + * The Java™ Language Specification.

          * *

          Example usage:

          - *
          {@code    ModuleDescriptor descriptor = ModuleDescriptor.module("m1")
          -     *         .exports("p")
          -     *         .requires("m2")
          +     * 
          {@code    ModuleDescriptor descriptor = ModuleDescriptor.newModule("stats.core")
          +     *         .requires("java.base")
          +     *         .exports("org.acme.stats.core.clustering")
          +     *         .exports("org.acme.stats.core.regression")
          +     *         .packages(Set.of("org.acme.stats.core.internal"))
                *         .build();
                * }
          * * @apiNote A {@code Builder} checks the components and invariants as - * components are added to the builder. The rational for this is to detect + * components are added to the builder. The rationale for this is to detect * errors as early as possible and not defer all validation to the - * {@link #build build} method. A {@code Builder} cannot be used to create - * a {@link ModuleDescriptor#isSynthetic() synthetic} module. + * {@link #build build} method. * * @since 9 + * @spec JPMS */ public static final class Builder { final String name; - final boolean strict; // true if module names are checked + final boolean strict; + final Set modifiers; final boolean open; - final boolean synthetic; - boolean automatic; + final boolean automatic; + final Set packages = new HashSet<>(); final Map requires = new HashMap<>(); final Map exports = new HashMap<>(); final Map opens = new HashMap<>(); - final Set concealedPackages = new HashSet<>(); final Set uses = new HashSet<>(); final Map provides = new HashMap<>(); Version version; @@ -1362,35 +1526,25 @@ public class ModuleDescriptor /** * Initializes a new builder with the given module name. * - * @param strict - * Indicates whether module names are checked or not + * If {@code strict} is {@code true} then module, package, and class + * names are checked to ensure they are legal names. In addition, the + * {@link #build buid} method will add "{@code requires java.base}" if + * the dependency is not declared. */ - Builder(String name, boolean strict, boolean open, boolean synthetic) { + Builder(String name, boolean strict, Set modifiers) { this.name = (strict) ? requireModuleName(name) : name; this.strict = strict; - this.open = open; - this.synthetic = synthetic; - } - - /* package */ Builder automatic(boolean automatic) { - this.automatic = automatic; - return this; + this.modifiers = modifiers; + this.open = modifiers.contains(Modifier.OPEN); + this.automatic = modifiers.contains(Modifier.AUTOMATIC); + assert !open || !automatic; } /** - * Returns the set of packages that are exported (unconditionally or - * unconditionally). + * Returns a snapshot of the packages in the module. */ - /* package */ Set exportedPackages() { - return exports.keySet(); - } - - /** - * Returns the set of packages that are opened (unconditionally or - * unconditionally). - */ - /* package */Set openPackages() { - return opens.keySet(); + /* package */ Set packages() { + return Collections.unmodifiableSet(packages); } /** @@ -1406,8 +1560,12 @@ public class ModuleDescriptor * initialized to build * @throws IllegalStateException * If the dependence on the module has already been declared + * or this builder is for an automatic module */ public Builder requires(Requires req) { + if (automatic) + throw new IllegalStateException("Automatic modules cannot declare" + + " dependences"); String mn = req.name(); if (name.equals(mn)) throw new IllegalArgumentException("Dependence on self"); @@ -1433,11 +1591,12 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalArgumentException - * If the module name is {@code null}, is not a legal Java - * identifier, or is equal to the module name that this builder + * If the module name is {@code null}, is not a legal module + * name, or is equal to the module name that this builder * was initialized to build * @throws IllegalStateException * If the dependence on the module has already been declared + * or this builder is for an automatic module */ public Builder requires(Set ms, String mn, @@ -1448,6 +1607,23 @@ public class ModuleDescriptor return requires(new Requires(ms, mn, compiledVersion)); } + /* package */Builder requires(Set ms, + String mn, + String compiledVersion) { + Version v = null; + try { + v = Version.parse(compiledVersion); + } catch (IllegalArgumentException e) { + // for now, drop un-parsable version when non-strict + if (strict) throw e; + } + if (v == null) { + return requires(ms, mn); + } else { + return requires(ms, mn, v); + } + } + /** * Adds a dependence on a module with the given (and possibly empty) * set of modifiers. @@ -1460,11 +1636,12 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalArgumentException - * If the module name is {@code null}, is not a legal Java - * identifier, or is equal to the module name that this builder + * If the module name is {@code null}, is not a legal module + * name, or is equal to the module name that this builder * was initialized to build * @throws IllegalStateException * If the dependence on the module has already been declared + * or this builder is for an automatic module */ public Builder requires(Set ms, String mn) { if (strict) @@ -1481,18 +1658,19 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalArgumentException - * If the module name is {@code null}, is not a legal Java - * identifier, or is equal to the module name that this builder + * If the module name is {@code null}, is not a legal module + * name, or is equal to the module name that this builder * was initialized to build * @throws IllegalStateException * If the dependence on the module has already been declared + * or this builder is for an automatic module */ public Builder requires(String mn) { return requires(EnumSet.noneOf(Requires.Modifier.class), mn); } /** - * Adds an export. + * Adds an exported package. * * @param e * The export @@ -1500,29 +1678,27 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalStateException - * If the package is already declared as a package with the - * {@link #contains contains} method or the package is already - * declared as exported + * If the {@link Exports#source package} is already declared as + * exported or this builder is for an automatic module */ public Builder exports(Exports e) { - // can't be exported and concealed - String source = e.source(); - if (concealedPackages.contains(source)) { - throw new IllegalStateException("Package " + source - + " already declared"); + if (automatic) { + throw new IllegalStateException("Automatic modules cannot declare" + + " exported packages"); } + String source = e.source(); if (exports.containsKey(source)) { throw new IllegalStateException("Exported package " + source + " already declared"); } - exports.put(source, e); + packages.add(source); return this; } /** - * Adds an export, with the given (and possibly empty) set of modifiers, - * to export a package to a set of target modules. + * Adds an exported package with the given (and possibly empty) set of + * modifiers. The package is exported to a set of target modules. * * @param ms * The set of modifiers @@ -1534,33 +1710,34 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalArgumentException - * If the package name or any of the target modules is {@code - * null} or is not a legal Java identifier, or the set of - * targets is empty + * If the package name is {@code null} or is not a legal + * package name, the set of target modules is empty, or the set + * of target modules contains a name that is not a legal module + * name * @throws IllegalStateException - * If the package is already declared as a package with the - * {@link #contains contains} method or the package is already - * declared as exported + * If the package is already declared as exported + * or this builder is for an automatic module */ public Builder exports(Set ms, String pn, Set targets) { - Exports e = new Exports(ms, requirePackageName(pn), targets); + Exports e = new Exports(ms, pn, targets); // check targets targets = e.targets(); if (targets.isEmpty()) throw new IllegalArgumentException("Empty target set"); - if (strict) + if (strict) { + requirePackageName(e.source()); targets.stream().forEach(Checks::requireModuleName); - + } return exports(e); } /** - * Adds an unqualified export with the given (and possibly empty) set - * of modifiers. + * Adds an exported package with the given (and possibly empty) set of + * modifiers. The package is exported to all modules. * * @param ms * The set of modifiers @@ -1570,160 +1747,22 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalArgumentException - * If the package name is {@code null} or is not a legal Java - * identifier + * If the package name is {@code null} or is not a legal + * package name * @throws IllegalStateException - * If the package is already declared as a package with the - * {@link #contains contains} method or the package is already - * declared as exported + * If the package is already declared as exported + * or this builder is for an automatic module */ public Builder exports(Set ms, String pn) { - Exports e = new Exports(ms, requirePackageName(pn), Collections.emptySet()); + if (strict) { + requirePackageName(pn); + } + Exports e = new Exports(ms, pn, Collections.emptySet()); return exports(e); } /** - * Adds an export to export a package to a set of target modules. - * - * @param pn - * The package name - * @param targets - * The set of target modules names - * - * @return This builder - * - * @throws IllegalArgumentException - * If the package name or any of the target modules is {@code - * null} or is not a legal Java identifier, or the set of - * targets is empty - * @throws IllegalStateException - * If the package is already declared as a package with the - * {@link #contains contains} method or the package is already - * declared as exported - */ - public Builder exports(String pn, Set targets) { - return exports(Collections.emptySet(), pn, targets); - } - - /** - * Adds an unqualified export. - * - * @param pn - * The package name - * - * @return This builder - * - * @throws IllegalArgumentException - * If the package name is {@code null} or is not a legal Java - * identifier - * @throws IllegalStateException - * If the package is already declared as a package with the - * {@link #contains contains} method or the package is already - * declared as exported - */ - public Builder exports(String pn) { - return exports(Collections.emptySet(), pn); - } - - /** - * Adds an opens directive. - * - * @param obj - * The {@code Opens} object - * - * @return This builder - * - * @throws IllegalStateException - * If the package is already declared as a package with the - * {@link #contains contains} method, the package is already - * declared as open, or this is a builder for an open module - */ - public Builder opens(Opens obj) { - if (open) { - throw new IllegalStateException("open modules cannot declare" - + " open packages"); - } - - // can't be open and concealed - String source = obj.source(); - if (concealedPackages.contains(source)) { - throw new IllegalStateException("Package " + source - + " already declared"); - } - if (opens.containsKey(source)) { - throw new IllegalStateException("Open package " + source - + " already declared"); - } - - opens.put(source, obj); - return this; - } - - - /** - * Adds an opens directive, with the given (and possibly empty) - * set of modifiers, to open a package to a set of target modules. - * - * @param ms - * The set of modifiers - * @param pn - * The package name - * @param targets - * The set of target modules names - * - * @return This builder - * - * @throws IllegalArgumentException - * If the package name or any of the target modules is {@code - * null} or is not a legal Java identifier, or the set of - * targets is empty - * @throws IllegalStateException - * If the package is already declared as a package with the - * {@link #contains contains} method, the package is already - * declared as open, or this is a builder for an open module - */ - public Builder opens(Set ms, - String pn, - Set targets) - { - Opens e = new Opens(ms, requirePackageName(pn), targets); - - // check targets - targets = e.targets(); - if (targets.isEmpty()) - throw new IllegalArgumentException("Empty target set"); - if (strict) - targets.stream().forEach(Checks::requireModuleName); - - return opens(e); - } - - /** - * Adds an opens directive to open a package with the given (and - * possibly empty) set of modifiers. - * - * @param ms - * The set of modifiers - * @param pn - * The package name - * - * @return This builder - * - * @throws IllegalArgumentException - * If the package name is {@code null} or is not a legal Java - * identifier - * @throws IllegalStateException - * If the package is already declared as a package with the - * {@link #contains contains} method, the package is already - * declared as open, or this is a builder for an open module - */ - public Builder opens(Set ms, String pn) { - Opens e = new Opens(ms, requirePackageName(pn), Collections.emptySet()); - return opens(e); - } - - /** - * Adds an opens directive to open a package to a set of target + * Adds an exported package. The package is exported to a set of target * modules. * * @param pn @@ -1734,20 +1773,20 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalArgumentException - * If the package name or any of the target modules is {@code - * null} or is not a legal Java identifier, or the set of - * targets is empty + * If the package name is {@code null} or is not a legal + * package name, the set of target modules is empty, or the set + * of target modules contains a name that is not a legal module + * name * @throws IllegalStateException - * If the package is already declared as a package with the - * {@link #contains contains} method, the package is already - * declared as open, or this is a builder for an open module + * If the package is already declared as exported + * or this builder is for an automatic module */ - public Builder opens(String pn, Set targets) { - return opens(Collections.emptySet(), pn, targets); + public Builder exports(String pn, Set targets) { + return exports(Collections.emptySet(), pn, targets); } /** - * Adds an opens directive to open a package. + * Adds an exported package. The package is exported to all modules. * * @param pn * The package name @@ -1755,12 +1794,146 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalArgumentException - * If the package name is {@code null} or is not a legal Java - * identifier + * If the package name is {@code null} or is not a legal + * package name * @throws IllegalStateException - * If the package is already declared as a package with the - * {@link #contains contains} method, the package is already - * declared as open, or this is a builder for an open module + * If the package is already declared as exported + * or this builder is for an automatic module + */ + public Builder exports(String pn) { + return exports(Collections.emptySet(), pn); + } + + /** + * Adds an open package. + * + * @param obj + * The {@code Opens} object + * + * @return This builder + * + * @throws IllegalStateException + * If the package is already declared as open, or this is a + * builder for an open module or automatic module + */ + public Builder opens(Opens obj) { + if (open || automatic) { + throw new IllegalStateException("Open or automatic modules cannot" + + " declare open packages"); + } + String source = obj.source(); + if (opens.containsKey(source)) { + throw new IllegalStateException("Open package " + source + + " already declared"); + } + opens.put(source, obj); + packages.add(source); + return this; + } + + + /** + * Adds an open package with the given (and possibly empty) set of + * modifiers. The package is open to a set of target modules. + * + * @param ms + * The set of modifiers + * @param pn + * The package name + * @param targets + * The set of target modules names + * + * @return This builder + * + * @throws IllegalArgumentException + * If the package name is {@code null} or is not a legal + * package name, the set of target modules is empty, or the set + * of target modules contains a name that is not a legal module + * name + * @throws IllegalStateException + * If the package is already declared as open, or this is a + * builder for an open module or automatic module + */ + public Builder opens(Set ms, + String pn, + Set targets) + { + Opens opens = new Opens(ms, pn, targets); + + // check targets + targets = opens.targets(); + if (targets.isEmpty()) + throw new IllegalArgumentException("Empty target set"); + if (strict) { + requirePackageName(opens.source()); + targets.stream().forEach(Checks::requireModuleName); + } + return opens(opens); + } + + /** + * Adds an open package with the given (and possibly empty) set of + * modifiers. The package is open to all modules. + * + * @param ms + * The set of modifiers + * @param pn + * The package name + * + * @return This builder + * + * @throws IllegalArgumentException + * If the package name is {@code null} or is not a legal + * package name + * @throws IllegalStateException + * If the package is already declared as open, or this is a + * builder for an open module or automatic module + */ + public Builder opens(Set ms, String pn) { + if (strict) { + requirePackageName(pn); + } + Opens e = new Opens(ms, pn, Collections.emptySet()); + return opens(e); + } + + /** + * Adds an open package. The package is open to a set of target modules. + * + * @param pn + * The package name + * @param targets + * The set of target modules names + * + * @return This builder + * + * @throws IllegalArgumentException + * If the package name is {@code null} or is not a legal + * package name, the set of target modules is empty, or the set + * of target modules contains a name that is not a legal module + * name + * @throws IllegalStateException + * If the package is already declared as open, or this is a + * builder for an open module or automatic module + */ + public Builder opens(String pn, Set targets) { + return opens(Collections.emptySet(), pn, targets); + } + + /** + * Adds an open package. The package is open to all modules. + * + * @param pn + * The package name + * + * @return This builder + * + * @throws IllegalArgumentException + * If the package name is {@code null} or is not a legal + * package name + * @throws IllegalStateException + * If the package is already declared as open, or this is a + * builder for an open module or automatic module */ public Builder opens(String pn) { return opens(Collections.emptySet(), pn); @@ -1775,12 +1948,16 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalArgumentException - * If the service type is {@code null} or is not a legal Java - * identifier + * If the service type is {@code null} or not a qualified name of + * a class in a named package * @throws IllegalStateException * If a dependency on the service type has already been declared + * or this is a builder for an an automatic module */ public Builder uses(String service) { + if (automatic) + throw new IllegalStateException("Automatic modules can not declare" + + " service dependences"); if (uses.contains(requireServiceTypeName(service))) throw new IllegalStateException("Dependence upon service " + service + " already declared"); @@ -1789,7 +1966,9 @@ public class ModuleDescriptor } /** - * Provides a service with one or more implementations. + * Provides a service with one or more implementations. The package for + * each {@link Provides#providers provider} (or provider factory) is + * added to the module if not already added. * * @param p * The provides @@ -1801,16 +1980,18 @@ public class ModuleDescriptor * declared */ public Builder provides(Provides p) { - String st = p.service(); - if (provides.containsKey(st)) + String service = p.service(); + if (provides.containsKey(service)) throw new IllegalStateException("Providers of service " - + st + " already declared"); - provides.put(st, p); + + service + " already declared"); + provides.put(service, p); + p.providers().forEach(name -> packages.add(packageName(name))); return this; } /** - * Provides implementations of a service. + * Provides implementations of a service. The package for each provider + * (or provider factory) is added to the module if not already added. * * @param service * The service type @@ -1821,103 +2002,59 @@ public class ModuleDescriptor * * @throws IllegalArgumentException * If the service type or any of the provider class names is - * {@code null} or is not a legal Java identifier, or the list - * of provider class names is empty + * {@code null} or not a qualified name of a class in a named + * package, or the list of provider class names is empty * @throws IllegalStateException * If the providers for the service type have already been * declared */ public Builder provides(String service, List providers) { - if (provides.containsKey(service)) - throw new IllegalStateException("Providers of service " - + service + " already declared by " + name); - - Provides p = new Provides(requireServiceTypeName(service), providers); + Provides p = new Provides(service, providers); // check providers after the set has been copied. List providerNames = p.providers(); if (providerNames.isEmpty()) throw new IllegalArgumentException("Empty providers set"); - providerNames.forEach(Checks::requireServiceProviderName); - provides.put(service, p); - return this; + if (strict) { + requireServiceTypeName(p.service()); + providerNames.forEach(Checks::requireServiceProviderName); + } else { + // Disallow service/providers in unnamed package + String pn = packageName(service); + if (pn.isEmpty()) { + throw new IllegalArgumentException(service + + ": unnamed package"); + } + for (String name : providerNames) { + pn = packageName(name); + if (pn.isEmpty()) { + throw new IllegalArgumentException(name + + ": unnamed package"); + } + } + } + return provides(p); } /** - * Provides an implementation of a service. - * - * @param service - * The service type - * @param provider - * The provider or provider factory class name - * - * @return This builder - * - * @throws IllegalArgumentException - * If the service type or the provider class name is {@code - * null} or is not a legal Java identifier - * @throws IllegalStateException - * If the providers for the service type have already been - * declared - */ - public Builder provides(String service, String provider) { - if (provider == null) - throw new IllegalArgumentException("'provider' is null"); - return provides(service, List.of(provider)); - } - - /** - * Adds a (possible empty) set of packages to the module + * Adds packages to the module. All packages in the set of package names + * that are not in the module are added to module. * * @param pns - * The set of package names + * The (possibly empty) set of package names * * @return This builder * * @throws IllegalArgumentException * If any of the package names is {@code null} or is not a - * legal Java identifier - * @throws IllegalStateException - * If any of packages are already declared as packages in - * the module. This includes packages that are already - * declared as exported or open packages. + * legal package name */ - public Builder contains(Set pns) { - pns.forEach(this::contains); - return this; - } - - /** - * Adds a package to the module. - * - * @param pn - * The package name - * - * @return This builder - * - * @throws IllegalArgumentException - * If the package name is {@code null}, or is not a legal Java - * identifier - * @throws IllegalStateException - * If the package is already declared as a package in the - * module. This includes the package already declared as an - * exported or open package. - */ - public Builder contains(String pn) { - Checks.requirePackageName(pn); - if (concealedPackages.contains(pn)) { - throw new IllegalStateException("Package " + pn - + " already declared"); + public Builder packages(Set pns) { + if (strict) { + pns = new HashSet<>(pns); + pns.forEach(Checks::requirePackageName); } - if (exports.containsKey(pn)) { - throw new IllegalStateException("Exported package " - + pn + " already declared"); - } - if (opens.containsKey(pn)) { - throw new IllegalStateException("Open package " - + pn + " already declared"); - } - concealedPackages.add(pn); + this.packages.addAll(pns); return this; } @@ -1937,22 +2074,35 @@ public class ModuleDescriptor /** * Sets the module version. * - * @param v + * @param vs * The version string to parse * * @return This builder * * @throws IllegalArgumentException - * If {@code v} is null or cannot be parsed as a version string + * If {@code vs} is {@code null} or cannot be parsed as a + * version string * * @see Version#parse(String) */ - public Builder version(String v) { - return version(Version.parse(v)); + public Builder version(String vs) { + Version v; + if (strict) { + v = Version.parse(vs); + } else { + try { + v = Version.parse(vs); + } catch (IllegalArgumentException ignore) { + // for now, ignore when non-strict + return this; + } + } + return version(v); } /** - * Sets the module main class. + * Sets the module main class. The package for the main class is added + * to the module if not already added. * * @param mc * The module main class @@ -1960,10 +2110,24 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalArgumentException - * If {@code mainClass} is null or is not a legal Java identifier + * If {@code mainClass} is {@code null} or not a qualified + * name of a class in a named package */ public Builder mainClass(String mc) { - mainClass = requireBinaryName("main class name", mc); + String pn; + if (strict) { + mc = requireQualifiedClassName("main class name", mc); + pn = packageName(mc); + assert !pn.isEmpty(); + } else { + // Disallow main class in unnamed package + pn = packageName(mc); + if (pn.isEmpty()) { + throw new IllegalArgumentException(mc + ": unnamed package"); + } + } + mainClass = mc; + packages.add(pn); return this; } @@ -1976,7 +2140,7 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalArgumentException - * If {@code name} is null or the empty String + * If {@code name} is {@code null} or the empty String */ public Builder osName(String name) { if (name == null || name.isEmpty()) @@ -1994,7 +2158,7 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalArgumentException - * If {@code name} is null or the empty String + * If {@code name} is {@code null} or the empty String */ public Builder osArch(String arch) { if (arch == null || arch.isEmpty()) @@ -2012,7 +2176,7 @@ public class ModuleDescriptor * @return This builder * * @throws IllegalArgumentException - * If {@code name} is null or the empty String + * If {@code name} is {@code null} or the empty String */ public Builder osVersion(String version) { if (version == null || version.isEmpty()) @@ -2024,26 +2188,34 @@ public class ModuleDescriptor /** * Builds and returns a {@code ModuleDescriptor} from its components. * + *

          The module will require "{@code java.base}" even if the dependence + * has not been declared (the exception is when building a module named + * "{@code java.base}" as it cannot require itself). The dependence on + * "{@code java.base}" will have the {@link + * java.lang.module.ModuleDescriptor.Requires.Modifier#MANDATED MANDATED} + * modifier if the dependence was not declared.

          + * * @return The module descriptor */ public ModuleDescriptor build() { Set requires = new HashSet<>(this.requires.values()); - - Set packages = new HashSet<>(); - packages.addAll(exports.keySet()); - packages.addAll(opens.keySet()); - packages.addAll(concealedPackages); - Set exports = new HashSet<>(this.exports.values()); Set opens = new HashSet<>(this.opens.values()); + // add dependency on java.base + if (strict + && !name.equals("java.base") + && !this.requires.containsKey("java.base")) { + requires.add(new Requires(Set.of(Requires.Modifier.MANDATED), + "java.base", + null)); + } + Set provides = new HashSet<>(this.provides.values()); return new ModuleDescriptor(name, version, - open, - automatic, - synthetic, + modifiers, requires, exports, opens, @@ -2062,16 +2234,20 @@ public class ModuleDescriptor * Compares this module descriptor to another. * *

          Two {@code ModuleDescriptor} objects are compared by comparing their - * module name lexicographically. Where the module names are equal then - * the versions, if present, are compared.

          - * - * @apiNote For now, the natural ordering is not consistent with equals. - * If two module descriptors have equal module names, equal versions if - * present, but their corresponding components are not equal, then they - * will be considered equal by this method. + * module names lexicographically. Where the module names are equal then the + * module versions are compared. When comparing the module versions then a + * module descriptor with a version is considered to succeed a module + * descriptor that does not have a version. Where the module names are equal + * and the versions are equal (or not present in both), then the set of + * modifiers are compared. Sets of modifiers are compared by comparing + * a binary value computed for each set. If a modifier is present + * in the set then the bit at the position of its ordinal is {@code 1} + * in the binary value, otherwise {@code 0}. If the two set of modifiers + * are also equal then the other components of the module descriptors are + * compared in a manner that is consistent with {@code equals}.

          * * @param that - * The object to which this module descriptor is to be compared + * The module descriptor to compare * * @return A negative integer, zero, or a positive integer if this module * descriptor is less than, equal to, or greater than the given @@ -2079,16 +2255,50 @@ public class ModuleDescriptor */ @Override public int compareTo(ModuleDescriptor that) { + if (this == that) return 0; + int c = this.name().compareTo(that.name()); if (c != 0) return c; - if (version == null) { - if (that.version == null) - return 0; - return -1; - } - if (that.version == null) - return +1; - return version.compareTo(that.version); + + c = compare(this.version, that.version); + if (c != 0) return c; + + long v1 = modsValue(this.modifiers()); + long v2 = modsValue(that.modifiers()); + c = Long.compare(v1, v2); + if (c != 0) return c; + + c = compare(this.requires, that.requires); + if (c != 0) return c; + + c = compare(this.packages, that.packages); + if (c != 0) return c; + + c = compare(this.exports, that.exports); + if (c != 0) return c; + + c = compare(this.opens, that.opens); + if (c != 0) return c; + + c = compare(this.uses, that.uses); + if (c != 0) return c; + + c = compare(this.provides, that.provides); + if (c != 0) return c; + + c = compare(this.mainClass, that.mainClass); + if (c != 0) return c; + + c = compare(this.osName, that.osName); + if (c != 0) return c; + + c = compare(this.osArch, that.osArch); + if (c != 0) return c; + + c = compare(this.osVersion, that.osVersion); + if (c != 0) return c; + + return 0; } /** @@ -2115,10 +2325,9 @@ public class ModuleDescriptor return false; ModuleDescriptor that = (ModuleDescriptor)ob; return (name.equals(that.name) - && open == that.open - && automatic == that.automatic - && synthetic == that.synthetic + && modifiers.equals(that.modifiers) && requires.equals(that.requires) + && Objects.equals(packages, that.packages) && exports.equals(that.exports) && opens.equals(that.opens) && uses.equals(that.uses) @@ -2127,12 +2336,9 @@ public class ModuleDescriptor && Objects.equals(mainClass, that.mainClass) && Objects.equals(osName, that.osName) && Objects.equals(osArch, that.osArch) - && Objects.equals(osVersion, that.osVersion) - && Objects.equals(packages, that.packages)); + && Objects.equals(osVersion, that.osVersion)); } - private transient int hash; // cached hash code - /** * Computes a hash code for this module descriptor. * @@ -2147,10 +2353,9 @@ public class ModuleDescriptor int hc = hash; if (hc == 0) { hc = name.hashCode(); - hc = hc * 43 + Boolean.hashCode(open); - hc = hc * 43 + Boolean.hashCode(automatic); - hc = hc * 43 + Boolean.hashCode(synthetic); + hc = hc * 43 + Objects.hashCode(modifiers); hc = hc * 43 + requires.hashCode(); + hc = hc * 43 + Objects.hashCode(packages); hc = hc * 43 + exports.hashCode(); hc = hc * 43 + opens.hashCode(); hc = hc * 43 + uses.hashCode(); @@ -2160,18 +2365,18 @@ public class ModuleDescriptor hc = hc * 43 + Objects.hashCode(osName); hc = hc * 43 + Objects.hashCode(osArch); hc = hc * 43 + Objects.hashCode(osVersion); - hc = hc * 43 + Objects.hashCode(packages); if (hc == 0) hc = -1; hash = hc; } return hc; } + private transient int hash; // cached hash code /** - * Returns a string describing this descriptor. + *

          Returns a string describing the module.

          * - * @return A string describing this descriptor + * @return A string describing the module */ @Override public String toString() { @@ -2201,31 +2406,50 @@ public class ModuleDescriptor * * @param name * The module name + * @param ms + * The set of module modifiers * * @return A new builder * * @throws IllegalArgumentException - * If the module name is {@code null} or is not a legal Java - * identifier + * If the module name is {@code null} or is not a legal module + * name, or the set of modifiers contains {@link + * Modifier#AUTOMATIC AUTOMATIC} with other modifiers */ - public static Builder module(String name) { - return new Builder(name, true, false, false); + public static Builder newModule(String name, Set ms) { + Set mods = new HashSet<>(ms); + if (mods.contains(Modifier.AUTOMATIC) && mods.size() > 1) + throw new IllegalArgumentException("AUTOMATIC cannot be used with" + + " other modifiers"); + + return new Builder(name, true, mods); + } + + /** + * Instantiates a builder to build a module descriptor for a normal + * module. This method is equivalent to invoking {@link #newModule(String,Set) + * newModule} with an empty set of {@link ModuleDescriptor.Modifier modifiers}. + * + * @param name + * The module name + * + * @return A new builder + * + * @throws IllegalArgumentException + * If the module name is {@code null} or is not a legal module + * name + */ + public static Builder newModule(String name) { + return new Builder(name, true, Set.of()); } /** * Instantiates a builder to build a module descriptor for an open module. - * An open module does not declare any open packages but the resulting - * module is treated as if all packages are open. + * This method is equivalent to invoking {@link #newModule(String,Set) + * newModule} with the {@link ModuleDescriptor.Modifier#OPEN OPEN} modifier. * - *

          As an example, the following creates a module descriptor for an open - * name "{@code m}" containing two packages, one of which is exported.

          - *
          {@code
          -     *     ModuleDescriptor descriptor = ModuleDescriptor.openModule("m")
          -     *         .requires("java.base")
          -     *         .exports("p")
          -     *         .contains("q")
          -     *         .build();
          -     * }
          + *

          The builder for an open module cannot be used to declare any open + * packages.

          * * @param name * The module name @@ -2233,19 +2457,22 @@ public class ModuleDescriptor * @return A new builder that builds an open module * * @throws IllegalArgumentException - * If the module name is {@code null} or is not a legal Java - * identifier + * If the module name is {@code null} or is not a legal module + * name */ - public static Builder openModule(String name) { - return new Builder(name, true, true, false); + public static Builder newOpenModule(String name) { + return new Builder(name, true, Set.of(Modifier.OPEN)); } /** * Instantiates a builder to build a module descriptor for an automatic - * module. Automatic modules receive special treatment during resolution - * (see {@link Configuration}) so that they read all other modules. When - * Instantiated in the Java virtual machine as a {@link java.lang.reflect.Module} - * then the Module reads every unnamed module in the Java virtual machine. + * module. This method is equivalent to invoking {@link #newModule(String,Set) + * newModule} with the {@link ModuleDescriptor.Modifier#AUTOMATIC AUTOMATIC} + * modifier. + * + *

          The builder for an automatic module cannot be used to declare module + * or service dependences. It also cannot be used to declare any exported + * or open packages.

          * * @param name * The module name @@ -2253,13 +2480,13 @@ public class ModuleDescriptor * @return A new builder that builds an automatic module * * @throws IllegalArgumentException - * If the module name is {@code null} or is not a legal Java - * identifier + * If the module name is {@code null} or is not a legal module + * name * * @see ModuleFinder#of(Path[]) */ - public static Builder automaticModule(String name) { - return new Builder(name, true, false, false).automatic(true); + public static Builder newAutomaticModule(String name) { + return new Builder(name, true, Set.of(Modifier.AUTOMATIC)); } @@ -2269,8 +2496,12 @@ public class ModuleDescriptor * *

          If the descriptor encoded in the input stream does not indicate a * set of packages in the module then the {@code packageFinder} will be - * invoked. If the {@code packageFinder} throws an {@link UncheckedIOException} - * then {@link IOException} cause will be re-thrown.

          + * invoked. The set of packages that the {@code packageFinder} returns + * must include all the packages that the module exports, opens, as well + * as the packages of the service implementations that the module provides, + * and the package of the main class (if the module has a main class). If + * the {@code packageFinder} throws an {@link UncheckedIOException} then + * {@link IOException} cause will be re-thrown.

          * *

          If there are bytes following the module descriptor then it is * implementation specific as to whether those bytes are read, ignored, @@ -2292,7 +2523,9 @@ public class ModuleDescriptor * @return The module descriptor * * @throws InvalidModuleDescriptorException - * If an invalid module descriptor is detected + * If an invalid module descriptor is detected or the set of + * packages returned by the {@code packageFinder} does not include + * all of the packages obtained from the module descriptor * @throws IOException * If an I/O error occurs reading from the input stream or {@code * UncheckedIOException} is thrown by the package finder @@ -2305,8 +2538,12 @@ public class ModuleDescriptor } /** - * Reads the binary form of a module declaration from an input stream - * as a module descriptor. + * Reads the binary form of a module declaration from an input stream as a + * module descriptor. This method works exactly as specified by the 2-arg + * {@link #read(InputStream,Supplier) read} method with the exception that + * a packager finder is not used to find additional packages when the + * module descriptor read from the stream does not indicate the set of + * packages. * * @param in * The input stream @@ -2327,7 +2564,13 @@ public class ModuleDescriptor * as a module descriptor. * *

          If the descriptor encoded in the byte buffer does not indicate a - * set of packages then the {@code packageFinder} will be invoked.

          + * set of packages in the module then the {@code packageFinder} will be + * invoked. The set of packages that the {@code packageFinder} returns + * must include all the packages that the module exports, opens, as well + * as the packages of the service implementations that the module provides, + * and the package of the main class (if the module has a main class). If + * the {@code packageFinder} throws an {@link UncheckedIOException} then + * {@link IOException} cause will be re-thrown.

          * *

          The module descriptor is read from the buffer stating at index * {@code p}, where {@code p} is the buffer's {@link ByteBuffer#position() @@ -2353,7 +2596,9 @@ public class ModuleDescriptor * @return The module descriptor * * @throws InvalidModuleDescriptorException - * If an invalid module descriptor is detected + * If an invalid module descriptor is detected or the set of + * packages returned by the {@code packageFinder} does not include + * all of the packages obtained from the module descriptor */ public static ModuleDescriptor read(ByteBuffer bb, Supplier> packageFinder) @@ -2362,8 +2607,11 @@ public class ModuleDescriptor } /** - * Reads the binary form of a module declaration from a byte buffer - * as a module descriptor. + * Reads the binary form of a module declaration from a byte buffer as a + * module descriptor. This method works exactly as specified by the 2-arg + * {@link #read(ByteBuffer,Supplier) read} method with the exception that a + * packager finder is not used to find additional packages when the module + * descriptor encoded in the buffer does not indicate the set of packages. * * @param bb * The byte buffer @@ -2398,6 +2646,11 @@ public class ModuleDescriptor } } + private static String packageName(String cn) { + int index = cn.lastIndexOf('.'); + return (index == -1) ? "" : cn.substring(0, index); + } + /** * Returns a string containing the given set of modifiers and label. */ @@ -2407,6 +2660,36 @@ public class ModuleDescriptor .collect(Collectors.joining(" ")); } + private static > + int compare(T obj1, T obj2) { + if (obj1 != null) { + return (obj2 != null) ? obj1.compareTo(obj2) : 1; + } else { + return (obj2 == null) ? 0 : -1; + } + } + + /** + * Compares two sets of {@code Comparable} objects. + */ + @SuppressWarnings("unchecked") + private static > + int compare(Set s1, Set s2) { + T[] a1 = (T[]) s1.toArray(); + T[] a2 = (T[]) s2.toArray(); + Arrays.sort(a1); + Arrays.sort(a2); + return Arrays.compare(a1, a2); + } + + private static > long modsValue(Set set) { + long value = 0; + for (Enum e : set) { + value += 1 << e.ordinal(); + } + return value; + } + static { /** * Setup the shared secret to allow code in other packages access @@ -2417,19 +2700,21 @@ public class ModuleDescriptor @Override public Builder newModuleBuilder(String mn, boolean strict, - boolean open, - boolean synthetic) { - return new Builder(mn, strict, open, synthetic); + Set modifiers) { + return new Builder(mn, strict, modifiers); } @Override - public Set exportedPackages(ModuleDescriptor.Builder builder) { - return builder.exportedPackages(); + public Set packages(ModuleDescriptor.Builder builder) { + return builder.packages(); } @Override - public Set openPackages(ModuleDescriptor.Builder builder) { - return builder.openPackages(); + public void requires(ModuleDescriptor.Builder builder, + Set ms, + String mn, + String compiledVersion) { + builder.requires(ms, mn, compiledVersion); } @Override @@ -2466,23 +2751,10 @@ public class ModuleDescriptor return new Provides(service, providers, true); } - @Override - public Version newVersion(String v) { - return new Version(v); - } - - @Override - public ModuleDescriptor newModuleDescriptor(ModuleDescriptor md, - Set pkgs) { - return new ModuleDescriptor(md, pkgs); - } - @Override public ModuleDescriptor newModuleDescriptor(String name, Version version, - boolean open, - boolean automatic, - boolean synthetic, + Set modifiers, Set requires, Set exports, Set opens, @@ -2496,9 +2768,7 @@ public class ModuleDescriptor int hashCode) { return new ModuleDescriptor(name, version, - open, - automatic, - synthetic, + modifiers, requires, exports, opens, @@ -2514,12 +2784,12 @@ public class ModuleDescriptor } @Override - public Configuration resolveRequiresAndUses(ModuleFinder finder, - Collection roots, - boolean check, - PrintStream traceOutput) + public Configuration resolveAndBind(ModuleFinder finder, + Collection roots, + boolean check, + PrintStream traceOutput) { - return Configuration.resolveRequiresAndUses(finder, roots, check, traceOutput); + return Configuration.resolveAndBind(finder, roots, check, traceOutput); } }); } diff --git a/jdk/src/java.base/share/classes/java/lang/module/ModuleFinder.java b/jdk/src/java.base/share/classes/java/lang/module/ModuleFinder.java index 5d01f698806..9fc03dc87b5 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/ModuleFinder.java +++ b/jdk/src/java.base/share/classes/java/lang/module/ModuleFinder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,14 +42,15 @@ import java.util.Objects; import java.util.Optional; import java.util.Set; +import jdk.internal.module.ModuleBootstrap; import jdk.internal.module.ModulePath; import jdk.internal.module.SystemModuleFinder; import sun.security.action.GetPropertyAction; /** * A finder of modules. A {@code ModuleFinder} is used to find modules during - * resolution or - * service binding. + * resolution or + * service binding. * *

          A {@code ModuleFinder} can only find one module with a given name. A * {@code ModuleFinder} that finds modules in a sequence of directories, for @@ -85,6 +86,7 @@ import sun.security.action.GetPropertyAction; *

          A {@code ModuleFinder} is not required to be thread safe.

          * * @since 9 + * @spec JPMS */ public interface ModuleFinder { @@ -124,8 +126,8 @@ public interface ModuleFinder { * to find that module.

          * * @apiNote This is important to have for methods such as {@link - * Configuration#resolveRequiresAndUses resolveRequiresAndUses} that need - * to scan the module path to find modules that provide a specific service. + * Configuration#resolveAndBind resolveAndBind} that need to scan the + * module path to find modules that provide a specific service. * * @return The set of all module references that this finder locates * @@ -172,7 +174,8 @@ public interface ModuleFinder { } else { Path mlib = Paths.get(home, "modules"); if (Files.isDirectory(mlib)) { - return of(mlib); + // exploded build may be patched + return ModulePath.of(ModuleBootstrap.patcher(), mlib); } else { throw new InternalError("Unable to detect the run-time image"); } @@ -198,13 +201,9 @@ public interface ModuleFinder { * *

          If an element is a path to a directory of modules then each entry in * the directory is a packaged module or the top-level directory of an - * exploded module. The module finder's {@link #find(String) find} or - * {@link #findAll() findAll} methods throw {@link FindException} if a - * directory containing more than one module with the same name is - * encountered.

          - * - *

          If an element in the array is a path to a directory, and that - * directory contains a file named {@code module-info.class}, then the + * exploded module. It it an error if a directory contains more than one + * module with the same name. If an element is a path to a directory, and + * that directory contains a file named {@code module-info.class}, then the * directory is treated as an exploded module rather than a directory of * modules.

          * @@ -214,9 +213,8 @@ public interface ModuleFinder { * entry in a {@link java.util.jar.JarFile#isMultiRelease() multi-release} * JAR file) is a modular JAR and is an explicit module. * A JAR file that does not have a {@code module-info.class} in the - * top-level directory is an {@link ModuleDescriptor#isAutomatic automatic} - * module. The {@link ModuleDescriptor} for an automatic module is created as - * follows: + * top-level directory is created as an automatic module. The components + * for the automatic module are derived as follows: * *
            * @@ -248,46 +246,48 @@ public interface ModuleFinder { * *
        • * - *
        • It {@link ModuleDescriptor#requires() requires} {@code - * java.base}.

        • - * - *
        • The set of packages in the module is derived from the names - * of non-directory entries in the JAR file. A candidate package name - * is derived from an entry using the characters up to, but not - * including, the last forward slash. All remaining forward slashes are - * replaced with dot ({@code "."}). If the resulting string is a valid - * Java identifier then it is assumed to be a package name. For example, - * if the JAR file contains an entry "{@code p/q/Foo.class}" then the - * package name derived is "{@code p.q}". All packages are {@link - * ModuleDescriptor#exports() exported}.

        • + *
        • The set of packages in the module is derived from the + * non-directory entries in the JAR file that have names ending in + * "{@code .class}". A candidate package name is derived from the name + * using the characters up to, but not including, the last forward slash. + * All remaining forward slashes are replaced with dot ({@code "."}). If + * the resulting string is a legal package name then it is assumed to be + * a package name. For example, if the JAR file contains the entry + * "{@code p/q/Foo.class}" then the package name derived is + * "{@code p.q}".

        • * *
        • The contents of entries starting with {@code * META-INF/services/} are assumed to be service configuration files * (see {@link java.util.ServiceLoader}). If the name of a file - * (that follows {@code META-INF/services/}) is a legal Java identifier - * then it is assumed to be the fully-qualified binary name of a - * service type. The entries in the file are assumed to be the - * fully-qualified binary names of provider classes.

        • + * (that follows {@code META-INF/services/}) is a legal class name + * then it is assumed to be the fully-qualified class name of a service + * type. The entries in the file are assumed to be the fully-qualified + * class names of provider classes.

          * *
        • If the JAR file has a {@code Main-Class} attribute in its - * main manifest then its value is the {@link + * main manifest then its value is the module {@link * ModuleDescriptor#mainClass() main class}.

        • * *
        * *

        If a {@code ModuleDescriptor} cannot be created (by means of the * {@link ModuleDescriptor.Builder ModuleDescriptor.Builder} API) for an - * automatic module then {@code FindException} is thrown. This can arise, - * for example, when a legal Java identifier name cannot be derived from - * the file name of the JAR file or where the JAR file contains a {@code - * .class} in the top-level directory of the JAR file.

        + * automatic module then {@code FindException} is thrown. This can arise + * when a legal module name cannot be derived from the file name of the JAR + * file, where the JAR file contains a {@code .class} in the top-level + * directory of the JAR file, where an entry in a service configuration + * file is not a legal class name or its package name is not in the set of + * packages derived for the module, or where the module main class is not + * a legal class name or its package is not in the module.

        * *

        In addition to JAR files, an implementation may also support modules - * that are packaged in other implementation specific module formats. When - * a file is encountered that is not recognized as a packaged module then - * {@code FindException} is thrown. An implementation may choose to ignore - * some files, {@link java.nio.file.Files#isHidden hidden} files for - * example. Paths to files that do not exist are always ignored.

        + * that are packaged in other implementation specific module formats. If + * an element in the array specified to this method is a path to a directory + * of modules then entries in the directory that not recognized as modules + * are ignored. If an element in the array is a path to a packaged module + * that is not recognized then a {@code FindException} is thrown when the + * file is encountered. Paths to files that do not exist are always ignored. + *

        * *

        As with automatic modules, the contents of a packaged or exploded * module may need to be scanned in order to determine the packages @@ -325,7 +325,7 @@ public interface ModuleFinder { }; } - return new ModulePath(entries); + return ModulePath.of(entries); } /** diff --git a/jdk/src/java.base/share/classes/java/lang/module/ModuleReader.java b/jdk/src/java.base/share/classes/java/lang/module/ModuleReader.java index d79d210edd0..c5a7b61c695 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/ModuleReader.java +++ b/jdk/src/java.base/share/classes/java/lang/module/ModuleReader.java @@ -45,7 +45,7 @@ import java.util.stream.Stream; * module. A module reader is also intended to be used by {@code ClassLoader} * implementations that load classes and resources from modules.

        * - *

        A resource in a module is identified by a name that is a + *

        A resource in a module is identified by an abstract name that is a * '{@code /}'-separated path string. For example, module {@code java.base} may * have a resource "{@code java/lang/Object.class}" that, by convention, is the * class file for {@code java.lang.Object}.

        @@ -61,8 +61,18 @@ import java.util.stream.Stream; * open}, {@link #read read}, and {@link #list list} methods may throw {@code * SecurityException} if access is denied by the security manager.

        * + * @implSpec Implementations of {@code ModuleReader} should take great care + * when translating an abstract resource name to the location of a resource in + * a packaged module or on the file system. Implementations are advised to + * treat resource names with elements such as '{@code .}, '{@code ..}', + * elements containing file separators, or empty elements as "not found". More + * generally, if the resource name is not in the stream of elements that the + * {@code list} method returns then the resource should be treated as "not + * found" to avoid inconsistencies. + * * @see ModuleReference * @since 9 + * @spec JPMS */ public interface ModuleReader extends Closeable { @@ -148,6 +158,9 @@ public interface ModuleReader extends Closeable { * If an I/O error occurs or the module reader is closed * @throws SecurityException * If denied by the security manager + * @throws OutOfMemoryError + * If the resource is larger than {@code Integer.MAX_VALUE}, + * the maximum capacity of a byte buffer * * @see ClassLoader#defineClass(String, ByteBuffer, java.security.ProtectionDomain) */ diff --git a/jdk/src/java.base/share/classes/java/lang/module/ModuleReference.java b/jdk/src/java.base/share/classes/java/lang/module/ModuleReference.java index 09a5acec219..54291e78dcc 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/ModuleReference.java +++ b/jdk/src/java.base/share/classes/java/lang/module/ModuleReference.java @@ -44,6 +44,7 @@ import java.util.Optional; * @see ModuleFinder * @see ModuleReader * @since 9 + * @spec JPMS */ public abstract class ModuleReference { @@ -76,7 +77,7 @@ public abstract class ModuleReference { /** * Returns the location of this module's content, if known. * - *

        This URI, when present, is used as the {@linkplain + *

        This URI, when present, can be used as the {@linkplain * java.security.CodeSource#getLocation location} value of a {@link * java.security.CodeSource CodeSource} so that a module's classes can be * granted specific permissions when loaded by a {@link diff --git a/jdk/src/java.base/share/classes/java/lang/module/ResolutionException.java b/jdk/src/java.base/share/classes/java/lang/module/ResolutionException.java index fb14cfe8200..69cc71f3466 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/ResolutionException.java +++ b/jdk/src/java.base/share/classes/java/lang/module/ResolutionException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,10 +26,12 @@ package java.lang.module; /** - * Thrown when resolving a set of modules or binding fails. + * Thrown when resolving a set of modules, or resolving a set of modules with + * service binding, fails. * * @see Configuration * @since 9 + * @spec JPMS */ public class ResolutionException extends RuntimeException { private static final long serialVersionUID = -1031186845316729450L; diff --git a/jdk/src/java.base/share/classes/java/lang/module/ResolvedModule.java b/jdk/src/java.base/share/classes/java/lang/module/ResolvedModule.java index 05ef3c4dc1c..a3858ef6c13 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/ResolvedModule.java +++ b/jdk/src/java.base/share/classes/java/lang/module/ResolvedModule.java @@ -37,6 +37,7 @@ import java.util.Set; * module's content. * * @since 9 + * @spec JPMS * @see Configuration#modules() */ public final class ResolvedModule { diff --git a/jdk/src/java.base/share/classes/java/lang/module/Resolver.java b/jdk/src/java.base/share/classes/java/lang/module/Resolver.java index d2aafdc5d87..1a44475b442 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/Resolver.java +++ b/jdk/src/java.base/share/classes/java/lang/module/Resolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -49,8 +49,8 @@ import jdk.internal.module.ModuleHashes; import jdk.internal.module.ModuleReferenceImpl; /** - * The resolver used by {@link Configuration#resolveRequires} and - * {@link Configuration#resolveRequiresAndUses}. + * The resolver used by {@link Configuration#resolve} and {@link + * Configuration#resolveAndBind}. * * @implNote The resolver is used at VM startup and so deliberately avoids * using lambda and stream usages in code paths used during startup. @@ -66,7 +66,19 @@ final class Resolver { // maps module name to module reference private final Map nameToReference = new HashMap<>(); + // module constraints on target platform + private String osName; + private String osArch; + private String osVersion; + String osName() { return osName; } + String osArch() { return osArch; } + String osVersion() { return osVersion; } + + /** + * @throws IllegalArgumentException if there are more than one parent and + * the constraints on the target platform conflict + */ Resolver(ModuleFinder beforeFinder, List parents, ModuleFinder afterFinder, @@ -75,15 +87,54 @@ final class Resolver { this.parents = parents; this.afterFinder = afterFinder; this.traceOutput = traceOutput; + + // record constraints on target platform, checking that they don't conflict + for (Configuration parent : parents) { + String value = parent.osName(); + if (value != null) { + if (osName == null) { + osName = value; + } else { + if (!value.equals(osName)) { + failParentConflict("Operating System", osName, value); + } + } + } + value = parent.osArch(); + if (value != null) { + if (osArch == null) { + osArch = value; + } else { + if (!value.equals(osArch)) { + failParentConflict("OS architecture", osArch, value); + } + } + } + value = parent.osVersion(); + if (value != null) { + if (osVersion == null) { + osVersion = value; + } else { + if (!value.equals(osVersion)) { + failParentConflict("OS version", osVersion, value); + } + } + } + } } + private void failParentConflict(String constraint, String s1, String s2) { + String msg = "Parents have conflicting constraints on target " + + constraint + ": " + s1 + ", " + s2; + throw new IllegalArgumentException(msg); + } /** * Resolves the given named modules. * * @throws ResolutionException */ - Resolver resolveRequires(Collection roots) { + Resolver resolve(Collection roots) { // create the visit stack to get us started Deque q = new ArrayDeque<>(); @@ -100,7 +151,7 @@ final class Resolver { mref = findWithAfterFinder(root); if (mref == null) { - fail("Module %s not found", root); + findFail("Module %s not found", root); } } @@ -109,8 +160,7 @@ final class Resolver { mref.location().ifPresent(uri -> trace(" (%s)", uri)); } - assert mref.descriptor().name().equals(root); - nameToReference.put(root, mref); + addFoundModule(mref); q.push(mref.descriptor()); } @@ -152,19 +202,19 @@ final class Resolver { mref = findWithAfterFinder(dn); if (mref == null) { - fail("Module %s not found, required by %s", - dn, descriptor.name()); + findFail("Module %s not found, required by %s", + dn, descriptor.name()); } } if (!nameToReference.containsKey(dn)) { - nameToReference.put(dn, mref); + addFoundModule(mref); q.offer(mref.descriptor()); resolved.add(mref.descriptor()); if (isTracing()) { trace("Module %s located, required by %s", - dn, descriptor.name()); + dn, descriptor.name()); mref.location().ifPresent(uri -> trace(" (%s)", uri)); } } @@ -181,7 +231,7 @@ final class Resolver { * Augments the set of resolved modules with modules induced by the * service-use relation. */ - Resolver resolveUses() { + Resolver bind() { // Scan the finders for all available service provider modules. As // java.base uses services then then module finders will be scanned @@ -246,7 +296,7 @@ final class Resolver { mref.location() .ifPresent(uri -> trace(" (%s)", uri)); } - nameToReference.put(pn, mref); + addFoundModule(mref); q.push(provider); } } @@ -263,6 +313,81 @@ final class Resolver { } + /** + * Add the module to the nameToReference map. Also check any constraints on + * the target platform with the constraints of other modules. + */ + private void addFoundModule(ModuleReference mref) { + ModuleDescriptor descriptor = mref.descriptor(); + nameToReference.put(descriptor.name(), mref); + + if (descriptor.osName().isPresent() + || descriptor.osArch().isPresent() + || descriptor.osVersion().isPresent()) + checkTargetConstraints(descriptor); + } + + /** + * Check that the module's constraints on the target platform do not + * conflict with the constraints of other modules resolved so far or + * modules in parent configurations. + */ + private void checkTargetConstraints(ModuleDescriptor descriptor) { + String value = descriptor.osName().orElse(null); + if (value != null) { + if (osName == null) { + osName = value; + } else { + if (!value.equals(osName)) { + failTargetConstraint(descriptor); + } + } + } + value = descriptor.osArch().orElse(null); + if (value != null) { + if (osArch == null) { + osArch = value; + } else { + if (!value.equals(osArch)) { + failTargetConstraint(descriptor); + } + } + } + value = descriptor.osVersion().orElse(null); + if (value != null) { + if (osVersion == null) { + osVersion = value; + } else { + if (!value.equals(osVersion)) { + failTargetConstraint(descriptor); + } + } + } + } + + private void failTargetConstraint(ModuleDescriptor md) { + String s1 = targetAsString(osName, osArch, osVersion); + String s2 = targetAsString(md); + findFail("Module %s has constraints on target platform that conflict" + + " with other modules: %s, %s", md.name(), s1, s2); + } + + private String targetAsString(ModuleDescriptor descriptor) { + String osName = descriptor.osName().orElse(null); + String osArch = descriptor.osArch().orElse(null); + String osVersion = descriptor.osVersion().orElse(null); + return targetAsString(osName, osArch, osVersion); + } + + private String targetAsString(String osName, String osArch, String osVersion) { + return new StringJoiner("-") + .add(Objects.toString(osName, "*")) + .add(Objects.toString(osArch, "*")) + .add(Objects.toString(osVersion, "*")) + .toString(); + } + + /** * Execute post-resolution checks and returns the module graph of resolved * modules as {@code Map}. The resolved modules will be in the given @@ -281,7 +406,6 @@ final class Resolver { if (check) { detectCycles(); - checkPlatformConstraints(); checkHashes(); } @@ -319,8 +443,7 @@ final class Resolver { if (!visited.contains(descriptor)) { boolean added = visitPath.add(descriptor); if (!added) { - throw new ResolutionException("Cycle detected: " + - cycleAsString(descriptor)); + resolveFail("Cycle detected: %s", cycleAsString(descriptor)); } for (ModuleDescriptor.Requires requires : descriptor.requires()) { String dn = requires.name(); @@ -353,86 +476,6 @@ final class Resolver { } - /** - * If there are platform specific modules then check that the OS name, - * architecture and version match. - * - * @apiNote This method does not currently check if the OS matches - * platform specific modules in parent configurations. - */ - private void checkPlatformConstraints() { - - // first module encountered that is platform specific - String savedModuleName = null; - String savedOsName = null; - String savedOsArch = null; - String savedOsVersion = null; - - for (ModuleReference mref : nameToReference.values()) { - ModuleDescriptor descriptor = mref.descriptor(); - - String osName = descriptor.osName().orElse(null); - String osArch = descriptor.osArch().orElse(null); - String osVersion = descriptor.osVersion().orElse(null); - - if (osName != null || osArch != null || osVersion != null) { - - if (savedModuleName == null) { - - savedModuleName = descriptor.name(); - savedOsName = osName; - savedOsArch = osArch; - savedOsVersion = osVersion; - - } else { - - boolean matches = platformMatches(osName, savedOsName) - && platformMatches(osArch, savedOsArch) - && platformMatches(osVersion, savedOsVersion); - - if (!matches) { - String s1 = platformAsString(savedOsName, - savedOsArch, - savedOsVersion); - - String s2 = platformAsString(osName, osArch, osVersion); - fail("Mismatching constraints on target platform: " - + savedModuleName + ": " + s1 - + ", " + descriptor.name() + ": " + s2); - } - - } - - } - } - - } - - /** - * Returns true if the s1 and s2 are equal or one of them is null. - */ - private boolean platformMatches(String s1, String s2) { - if (s1 == null || s2 == null) - return true; - else - return Objects.equals(s1, s2); - } - - /** - * Return a string that encodes the OS name/arch/version. - */ - private String platformAsString(String osName, - String osArch, - String osVersion) { - - return new StringJoiner("-") - .add(Objects.toString(osName, "*")) - .add(Objects.toString(osArch, "*")) - .add(Objects.toString(osVersion, "*")) - .toString(); - - } - /** * Checks the hashes in the module descriptor to ensure that they match * any recorded hashes. @@ -460,7 +503,7 @@ final class Resolver { continue; if (!(mref2 instanceof ModuleReferenceImpl)) { - fail("Unable to compute the hash of module %s", dn); + findFail("Unable to compute the hash of module %s", dn); } // skip checking the hash if the module has been patched @@ -469,11 +512,11 @@ final class Resolver { byte[] recordedHash = hashes.hashFor(dn); byte[] actualHash = other.computeHash(algorithm); if (actualHash == null) - fail("Unable to compute the hash of module %s", dn); + findFail("Unable to compute the hash of module %s", dn); if (!Arrays.equals(recordedHash, actualHash)) { - fail("Hash of %s (%s) differs to expected hash (%s)" + - " recorded in %s", dn, toHexString(actualHash), - toHexString(recordedHash), descriptor.name()); + findFail("Hash of %s (%s) differs to expected hash (%s)" + + " recorded in %s", dn, toHexString(actualHash), + toHexString(recordedHash), descriptor.name()); } } } @@ -694,37 +737,38 @@ final class Resolver { for (ResolvedModule endpoint : reads) { ModuleDescriptor descriptor2 = endpoint.descriptor(); - for (ModuleDescriptor.Exports export : descriptor2.exports()) { + if (descriptor2.isAutomatic()) { + // automatic modules read self and export all packages + if (descriptor2 != descriptor1){ + for (String source : descriptor2.packages()) { + ModuleDescriptor supplier + = packageToExporter.putIfAbsent(source, descriptor2); - if (export.isQualified()) { - if (!export.targets().contains(descriptor1.name())) - continue; - } - - // source is exported to descriptor2 - String source = export.source(); - ModuleDescriptor other - = packageToExporter.putIfAbsent(source, descriptor2); - - if (other != null && other != descriptor2) { - // package might be local to descriptor1 - if (other == descriptor1) { - fail("Module %s contains package %s" - + ", module %s exports package %s to %s", - descriptor1.name(), - source, - descriptor2.name(), - source, - descriptor1.name()); - } else { - fail("Modules %s and %s export package %s to module %s", - descriptor2.name(), - other.name(), - source, - descriptor1.name()); + // descriptor2 and 'supplier' export source to descriptor1 + if (supplier != null) { + failTwoSuppliers(descriptor1, source, descriptor2, supplier); + } } } + } else { + for (ModuleDescriptor.Exports export : descriptor2.exports()) { + if (export.isQualified()) { + if (!export.targets().contains(descriptor1.name())) + continue; + } + + // source is exported by descriptor2 + String source = export.source(); + ModuleDescriptor supplier + = packageToExporter.putIfAbsent(source, descriptor2); + + // descriptor2 and 'supplier' export source to descriptor1 + if (supplier != null) { + failTwoSuppliers(descriptor1, source, descriptor2, supplier); + } + } + } } @@ -735,8 +779,8 @@ final class Resolver { for (String service : descriptor1.uses()) { String pn = packageName(service); if (!packageToExporter.containsKey(pn)) { - fail("Module %s does not read a module that exports %s", - descriptor1.name(), pn); + resolveFail("Module %s does not read a module that exports %s", + descriptor1.name(), pn); } } @@ -744,15 +788,8 @@ final class Resolver { for (ModuleDescriptor.Provides provides : descriptor1.provides()) { String pn = packageName(provides.service()); if (!packageToExporter.containsKey(pn)) { - fail("Module %s does not read a module that exports %s", - descriptor1.name(), pn); - } - - for (String provider : provides.providers()) { - if (!packages.contains(packageName(provider))) { - fail("Provider %s not in module %s", - provider, descriptor1.name()); - } + resolveFail("Module %s does not read a module that exports %s", + descriptor1.name(), pn); } } @@ -762,6 +799,42 @@ final class Resolver { } + /** + * Fail because a module in the configuration exports the same package to + * a module that reads both. This includes the case where a module M + * containing a package p reads another module that exports p to at least + * module M. + */ + private void failTwoSuppliers(ModuleDescriptor descriptor, + String source, + ModuleDescriptor supplier1, + ModuleDescriptor supplier2) { + + if (supplier2 == descriptor) { + ModuleDescriptor tmp = supplier1; + supplier1 = supplier2; + supplier2 = tmp; + } + + if (supplier1 == descriptor) { + resolveFail("Module %s contains package %s" + + ", module %s exports package %s to %s", + descriptor.name(), + source, + supplier2.name(), + source, + descriptor.name()); + } else { + resolveFail("Modules %s and %s export package %s to module %s", + supplier1.name(), + supplier2.name(), + source, + descriptor.name()); + } + + } + + /** * Find a module of the given name in the parent configurations */ @@ -779,24 +852,16 @@ final class Resolver { * Invokes the beforeFinder to find method to find the given module. */ private ModuleReference findWithBeforeFinder(String mn) { - try { - return beforeFinder.find(mn).orElse(null); - } catch (FindException e) { - // unwrap - throw new ResolutionException(e.getMessage(), e.getCause()); - } + + return beforeFinder.find(mn).orElse(null); + } /** * Invokes the afterFinder to find method to find the given module. */ private ModuleReference findWithAfterFinder(String mn) { - try { - return afterFinder.find(mn).orElse(null); - } catch (FindException e) { - // unwrap - throw new ResolutionException(e.getMessage(), e.getCause()); - } + return afterFinder.find(mn).orElse(null); } /** @@ -804,34 +869,27 @@ final class Resolver { * and after ModuleFinders. */ private Set findAll() { - try { + Set beforeModules = beforeFinder.findAll(); + Set afterModules = afterFinder.findAll(); - Set beforeModules = beforeFinder.findAll(); - Set afterModules = afterFinder.findAll(); + if (afterModules.isEmpty()) + return beforeModules; - if (afterModules.isEmpty()) - return beforeModules; + if (beforeModules.isEmpty() + && parents.size() == 1 + && parents.get(0) == Configuration.empty()) + return afterModules; - if (beforeModules.isEmpty() - && parents.size() == 1 - && parents.get(0) == Configuration.empty()) - return afterModules; - - Set result = new HashSet<>(beforeModules); - for (ModuleReference mref : afterModules) { - String name = mref.descriptor().name(); - if (!beforeFinder.find(name).isPresent() - && findInParent(name) == null) { - result.add(mref); - } + Set result = new HashSet<>(beforeModules); + for (ModuleReference mref : afterModules) { + String name = mref.descriptor().name(); + if (!beforeFinder.find(name).isPresent() + && findInParent(name) == null) { + result.add(mref); } - - return result; - - } catch (FindException e) { - // unwrap - throw new ResolutionException(e.getMessage(), e.getCause()); } + + return result; } /** @@ -842,10 +900,18 @@ final class Resolver { return (index == -1) ? "" : cn.substring(0, index); } + /** + * Throw FindException with the given format string and arguments + */ + private static void findFail(String fmt, Object ... args) { + String msg = String.format(fmt, args); + throw new FindException(msg); + } + /** * Throw ResolutionException with the given format string and arguments */ - private static void fail(String fmt, Object ... args) { + private static void resolveFail(String fmt, Object ... args) { String msg = String.format(fmt, args); throw new ResolutionException(msg); } diff --git a/jdk/src/java.base/share/classes/java/lang/module/package-info.java b/jdk/src/java.base/share/classes/java/lang/module/package-info.java index f641638cb2c..1d830079cab 100644 --- a/jdk/src/java.base/share/classes/java/lang/module/package-info.java +++ b/jdk/src/java.base/share/classes/java/lang/module/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,112 @@ * Classes to support module descriptors and creating configurations of modules * by means of resolution and service binding. * + *

        Resolution

        + * + *

        Resolution is the process of computing the transitive closure of a set + * of root modules over a set of observable modules by resolving the + * dependences expressed by {@link + * java.lang.module.ModuleDescriptor.Requires requires} clauses. + * The dependence graph is augmented with edges that take account of + * implicitly declared dependences ({@code requires transitive}) to create a + * readability graph. The result of resolution is a {@link + * java.lang.module.Configuration Configuration} that encapsulates the + * readability graph.

        + * + *

        As an example, suppose we have the following observable modules:

        + *
         {@code
        + *     module m1 { requires m2; }
        + *     module m2 { requires transitive m3; }
        + *     module m3 { }
        + *     module m4 { }
        + * } 
        + * + *

        If the module {@code m1} is resolved then the resulting configuration + * contains three modules ({@code m1}, {@code m2}, {@code m3}). The edges in + * its readability graph are:

        + *
         {@code
        + *     m1 --> m2  (meaning m1 reads m2)
        + *     m1 --> m3
        + *     m2 --> m3
        + * } 
        + * + *

        Resolution is an additive process. When computing the transitive closure + * then the dependence relation may include dependences on modules in {@link + * java.lang.module.Configuration#parents() parent} configurations. The result + * is a relative configuration that is relative to one or more parent + * configurations and where the readability graph may have edges from modules + * in the configuration to modules in parent configurations.

        + * + *

        As an example, suppose we have the following observable modules:

        + *
         {@code
        + *     module m1 { requires m2; requires java.xml; }
        + *     module m2 { }
        + * } 
        + * + *

        If module {@code m1} is resolved with the configuration for the {@link + * java.lang.reflect.Layer#boot() boot} layer as the parent then the resulting + * configuration contains two modules ({@code m1}, {@code m2}). The edges in + * its readability graph are: + *

         {@code
        + *     m1 --> m2
        + *     m1 --> java.xml
        + * } 
        + * where module {@code java.xml} is in the parent configuration. For + * simplicity, this example omits the implicitly declared dependence on the + * {@code java.base} module. + * + *

        Requires clauses that are "{@code requires static}" express an optional + * dependence (except at compile-time). If a module declares that it + * "{@code requires static M}" then resolution does not search the observable + * modules for "{@code M}". However, if "{@code M}" is resolved (because resolution + * resolves a module that requires "{@code M}" without the {@link + * java.lang.module.ModuleDescriptor.Requires.Modifier#STATIC static} modifier) + * then the readability graph will contain read edges for each module that + * "{@code requires static M}".

        + * + *

        {@link java.lang.module.ModuleDescriptor#isAutomatic() Automatic} modules + * receive special treatment during resolution. Each automatic module is resolved + * so that it reads all other modules in the configuration and all parent + * configurations. Each automatic module is also resolved as if it + * "{@code requires transitive}" all other automatic modules in the configuration + * (and all automatic modules in parent configurations).

        + * + *

        Service binding

        + * + *

        Service binding is the process of augmenting a graph of resolved modules + * from the set of observable modules induced by the service-use dependence + * ({@code uses} and {@code provides} clauses). Any module that was not + * previously in the graph requires resolution to compute its transitive + * closure. Service binding is an iterative process in that adding a module + * that satisfies some service-use dependence may introduce new service-use + * dependences.

        + * + *

        Suppose we have the following observable modules:

        + *
         {@code
        + *     module m1 { exports p; uses p.S; }
        + *     module m2 { requires m1; provides p.S with p2.S2; }
        + *     module m3 { requires m1; requires m4; provides p.S with p3.S3; }
        + *     module m4 { }
        + * } 
        + * + *

        If the module {@code m1} is resolved then the resulting graph of modules + * has one module ({@code m1}). If the graph is augmented with modules induced + * by the service-use dependence relation then the configuration will contain + * four modules ({@code m1}, {@code m2}, {@code m3}, {@code m4}). The edges in + * its readability graph are:

        + *
         {@code
        + *     m2 --> m1
        + *     m3 --> m1
        + *     m3 --> m4
        + * } 
        + *

        The edges in the conceptual service-use graph are:

        + *
         {@code
        + *     m1 --> m2  (meaning m1 uses a service that is provided by m2)
        + *     m1 --> m3
        + * } 
        + * + *

        General Exceptions

        + * *

        Unless otherwise noted, passing a {@code null} argument to a constructor * or method of any class or interface in this package will cause a {@link * java.lang.NullPointerException NullPointerException} to be thrown. Additionally, @@ -34,6 +140,7 @@ * will cause a {@code NullPointerException}, unless otherwise specified.

        * * @since 9 + * @spec JPMS */ package java.lang.module; diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/AccessibleObject.java b/jdk/src/java.base/share/classes/java/lang/reflect/AccessibleObject.java index f585b476504..503ce8dfb1e 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/AccessibleObject.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/AccessibleObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,38 +28,44 @@ package java.lang.reflect; import java.lang.annotation.Annotation; import java.security.AccessController; -import jdk.internal.misc.VM; import jdk.internal.reflect.CallerSensitive; import jdk.internal.reflect.Reflection; import jdk.internal.reflect.ReflectionFactory; -import sun.security.action.GetPropertyAction; /** - * The AccessibleObject class is the base class for Field, Method and - * Constructor objects. It provides the ability to flag a reflected - * object as suppressing default Java language access control checks - * when it is used. The access checks -- module boundaries, - * public, default (package) access, protected, and private members -- - * are performed when Fields, Methods or Constructors are used to set - * or get fields, to invoke methods or to create and initialize new - * instances of classes, respectively. Unlike access control specified - * in the The Java™ Language Specification and - * The Java Virtual Machine Specification, access checks - * with reflected objects assume {@link Module#canRead readability}. + * The {@code AccessibleObject} class is the base class for {@code Field}, + * {@code Method}, and {@code Constructor} objects (known as reflected + * objects). It provides the ability to flag a reflected object as + * suppressing checks for Java language access control when it is used. This + * permits sophisticated applications with sufficient privilege, such as Java + * Object Serialization or other persistence mechanisms, to manipulate objects + * in a manner that would normally be prohibited. * - *

        Setting the {@code accessible} flag in a reflected object - * permits sophisticated applications with sufficient privilege, such - * as Java Object Serialization or other persistence mechanisms, to - * manipulate objects in a manner that would normally be prohibited. + *

        Java language access control prevents use of private members outside + * their class; package access members outside their package; protected members + * outside their package or subclasses; and public members outside their + * module unless they are declared in an {@link Module#isExported(String,Module) + * exported} package and the user {@link Module#canRead reads} their module. By + * default, Java language access control is enforced (with one variation) when + * {@code Field}s, {@code Method}s, or {@code Constructor}s are used to get or + * set fields, to invoke methods, or to create and initialize new instances of + * classes, respectively. Every reflected object checks that the code using it + * is in an appropriate class, package, or module.

        * - *

        By default, a reflected object is not accessible. + *

        The one variation from Java language access control is that the checks + * by reflected objects assume readability. That is, the module containing + * the use of a reflected object is assumed to read the module in which + * the underlying field, method, or constructor is declared.

        * - * @see Field - * @see Method - * @see Constructor - * @see ReflectPermission + *

        Whether the checks for Java language access control can be suppressed + * (and thus, whether access can be enabled) depends on whether the reflected + * object corresponds to a member in an exported or open package + * (see {@link #setAccessible(boolean)}).

        * + * @jls 6.6 Access Control * @since 1.2 + * @revised 9 + * @spec JPMS */ public class AccessibleObject implements AnnotatedElement { @@ -78,15 +84,11 @@ public class AccessibleObject implements AnnotatedElement { /** * Convenience method to set the {@code accessible} flag for an - * array of objects with a single security check (for efficiency). + * array of reflected objects with a single security check (for efficiency). * - *

        This method cannot be used to enable access to an object that is a - * {@link Member member} of a class in a different module to the caller and - * where the class is in a package that is not exported to the caller's - * module. Additionally, if the member is non-public or its declaring - * class is non-public, then this method can only be used to enable access - * if the package is {@link Module#isOpen(String,Module) open} to at least - * the caller's module. + *

        This method may be used to enable access to all reflected objects in + * the array when access to each reflected object can be enabled as + * specified by {@link #setAccessible(boolean) setAccessible(boolean)}.

        * *

        If there is a security manager, its * {@code checkPermission} method is first called with a @@ -99,10 +101,15 @@ public class AccessibleObject implements AnnotatedElement { * @param array the array of AccessibleObjects * @param flag the new value for the {@code accessible} flag * in each object - * @throws InaccessibleObjectException if access cannot be enabled - * @throws SecurityException if the request is denied. + * @throws InaccessibleObjectException if access cannot be enabled for all + * objects in the array + * @throws SecurityException if the request is denied by the security manager + * or an element in the array is a constructor for {@code + * java.lang.Class} * @see SecurityManager#checkPermission * @see ReflectPermission + * @revised 9 + * @spec JPMS */ @CallerSensitive public static void setAccessible(AccessibleObject[] array, boolean flag) { @@ -120,41 +127,143 @@ public class AccessibleObject implements AnnotatedElement { } /** - * Set the {@code accessible} flag for this object to + * Set the {@code accessible} flag for this reflected object to * the indicated boolean value. A value of {@code true} indicates that - * the reflected object should suppress Java language access - * checking when it is used. A value of {@code false} indicates - * that the reflected object should enforce Java language access checks - * while assuming readability (as noted in the class description). + * the reflected object should suppress checks for Java language access + * control when it is used. A value of {@code false} indicates that + * the reflected object should enforce checks for Java language access + * control when it is used, with the variation noted in the class description. * - *

        This method cannot be used to enable access to an object that is a - * {@link Member member} of a class in a different module to the caller and - * where the class is in a package that is not exported to the caller's - * module. Additionally, if the member is non-public or its declaring - * class is non-public, then this method can only be used to enable access - * if the package is {@link Module#isOpen(String,Module) open} to at least - * the caller's module. + *

        This method may be used by a caller in class {@code C} to enable + * access to a {@link Member member} of {@link Member#getDeclaringClass() + * declaring class} {@code D} if any of the following hold:

        * - *

        If there is a security manager, its + *

          + *
        • {@code C} and {@code D} are in the same module.
        • + * + *
        • The member is {@code public} and {@code D} is {@code public} in + * a package that the module containing {@code D} {@link + * Module#isExported(String,Module) exports} to at least the module + * containing {@code C}.
        • + * + *
        • The member is {@code protected} {@code static}, {@code D} is + * {@code public} in a package that the module containing {@code D} + * exports to at least the module containing {@code C}, and {@code C} + * is a subclass of {@code D}.
        • + * + *
        • {@code D} is in a package that the module containing {@code D} + * {@link Module#isOpen(String,Module) opens} to at least the module + * containing {@code C}. + * All packages in unnamed and open modules are open to all modules and + * so this method always succeeds when {@code D} is in an unnamed or + * open module.
        • + *
        + * + *

        This method cannot be used to enable access to private members, + * members with default (package) access, protected instance members, or + * protected constructors when the declaring class is in a different module + * to the caller and the package containing the declaring class is not open + * to the caller's module.

        + * + *

        If there is a security manager, its * {@code checkPermission} method is first called with a * {@code ReflectPermission("suppressAccessChecks")} permission. * * @param flag the new value for the {@code accessible} flag * @throws InaccessibleObjectException if access cannot be enabled - * @throws SecurityException if the request is denied - * @see SecurityManager#checkPermission - * @see ReflectPermission + * @throws SecurityException if the request is denied by the security manager + * @see #trySetAccessible * @see java.lang.invoke.MethodHandles#privateLookupIn + * @revised 9 + * @spec JPMS */ public void setAccessible(boolean flag) { AccessibleObject.checkPermission(); setAccessible0(flag); } - void setAccessible0(boolean flag) { + /** + * Sets the accessible flag and returns the new value + */ + boolean setAccessible0(boolean flag) { this.override = flag; + return flag; } + /** + * Set the {@code accessible} flag for this reflected object to {@code true} + * if possible. This method sets the {@code accessible} flag, as if by + * invoking {@link #setAccessible(boolean) setAccessible(true)}, and returns + * the possibly-updated value for the {@code accessible} flag. If access + * cannot be enabled, i.e. the checks or Java language access control cannot + * be suppressed, this method returns {@code false} (as opposed to {@code + * setAccessible(true)} throwing {@code InaccessibleObjectException} when + * it fails). + * + *

        This method is a no-op if the {@code accessible} flag for + * this reflected object is {@code true}. + * + *

        For example, a caller can invoke {@code trySetAccessible} + * on a {@code Method} object for a private instance method + * {@code p.T::privateMethod} to suppress the checks for Java language access + * control when the {@code Method} is invoked. + * If {@code p.T} class is in a different module to the caller and + * package {@code p} is open to at least the caller's module, + * the code below successfully sets the {@code accessible} flag + * to {@code true}. + * + *

        +     * {@code
        +     *     p.T obj = ....;  // instance of p.T
        +     *     :
        +     *     Method m = p.T.class.getDeclaredMethod("privateMethod");
        +     *     if (m.trySetAccessible()) {
        +     *         m.invoke(obj);
        +     *     } else {
        +     *         // package p is not opened to the caller to access private member of T
        +     *         ...
        +     *     }
        +     * }
        + * + *

        If there is a security manager, its {@code checkPermission} method + * is first called with a {@code ReflectPermission("suppressAccessChecks")} + * permission.

        + * + * @return {@code true} if the {@code accessible} flag is set to {@code true}; + * {@code false} if access cannot be enabled. + * @throws SecurityException if the request is denied by the security manager + * + * @since 9 + * @spec JPMS + * @see java.lang.invoke.MethodHandles#privateLookupIn + */ + @CallerSensitive + public final boolean trySetAccessible() { + AccessibleObject.checkPermission(); + + if (override == true) return true; + + // if it's not a Constructor, Method, Field then no access check + if (!Member.class.isInstance(this)) { + return setAccessible0(true); + } + + // does not allow to suppress access check for Class's constructor + Class declaringClass = ((Member) this).getDeclaringClass(); + if (declaringClass == Class.class && this instanceof Constructor) { + return false; + } + + if (checkCanSetAccessible(Reflection.getCallerClass(), + declaringClass, + false)) { + return setAccessible0(true); + } else { + return false; + } + } + + /** * If the given AccessibleObject is a {@code Constructor}, {@code Method} * or {@code Field} then checks that its declaring class is in a package @@ -164,22 +273,29 @@ public class AccessibleObject implements AnnotatedElement { // do nothing, needs to be overridden by Constructor, Method, Field } + void checkCanSetAccessible(Class caller, Class declaringClass) { + checkCanSetAccessible(caller, declaringClass, true); + } + + private boolean checkCanSetAccessible(Class caller, + Class declaringClass, + boolean throwExceptionIfDenied) { Module callerModule = caller.getModule(); Module declaringModule = declaringClass.getModule(); - if (callerModule == declaringModule) return; - if (callerModule == Object.class.getModule()) return; - if (!declaringModule.isNamed()) return; + if (callerModule == declaringModule) return true; + if (callerModule == Object.class.getModule()) return true; + if (!declaringModule.isNamed()) return true; // package is open to caller String pn = packageName(declaringClass); if (declaringModule.isOpen(pn, callerModule)) { - printStackTraceIfOpenedReflectively(declaringModule, pn, callerModule); - return; + dumpStackIfOpenedReflectively(declaringModule, pn, callerModule); + return true; } - // package is exported to caller and class/member is public + // package is exported to caller boolean isExported = declaringModule.isExported(pn, callerModule); boolean isClassPublic = Modifier.isPublic(declaringClass.getModifiers()); int modifiers; @@ -188,48 +304,72 @@ public class AccessibleObject implements AnnotatedElement { } else { modifiers = ((Field) this).getModifiers(); } - boolean isMemberPublic = Modifier.isPublic(modifiers); - if (isExported && isClassPublic && isMemberPublic) { - printStackTraceIfExportedReflectively(declaringModule, pn, callerModule); - return; + if (isExported && isClassPublic) { + + // member is public + if (Modifier.isPublic(modifiers)) { + dumpStackIfExportedReflectively(declaringModule, pn, callerModule); + return true; + } + + // member is protected-static + if (Modifier.isProtected(modifiers) + && Modifier.isStatic(modifiers) + && isSubclassOf(caller, declaringClass)) { + dumpStackIfExportedReflectively(declaringModule, pn, callerModule); + return true; + } } - // not accessible - String msg = "Unable to make "; - if (this instanceof Field) - msg += "field "; - msg += this + " accessible: " + declaringModule + " does not \""; - if (isClassPublic && isMemberPublic) - msg += "exports"; - else - msg += "opens"; - msg += " " + pn + "\" to " + callerModule; - InaccessibleObjectException e = new InaccessibleObjectException(msg); - if (Reflection.printStackTraceWhenAccessFails()) { - e.printStackTrace(System.err); + if (throwExceptionIfDenied) { + // not accessible + String msg = "Unable to make "; + if (this instanceof Field) + msg += "field "; + msg += this + " accessible: " + declaringModule + " does not \""; + if (isClassPublic && Modifier.isPublic(modifiers)) + msg += "exports"; + else + msg += "opens"; + msg += " " + pn + "\" to " + callerModule; + InaccessibleObjectException e = new InaccessibleObjectException(msg); + if (Reflection.printStackTraceWhenAccessFails()) { + e.printStackTrace(System.err); + } + throw e; } - throw e; + return false; } - private void printStackTraceIfOpenedReflectively(Module module, - String pn, - Module other) { - printStackTraceIfExposedReflectively(module, pn, other, true); + private boolean isSubclassOf(Class queryClass, Class ofClass) { + while (queryClass != null) { + if (queryClass == ofClass) { + return true; + } + queryClass = queryClass.getSuperclass(); + } + return false; } - private void printStackTraceIfExportedReflectively(Module module, - String pn, - Module other) { - printStackTraceIfExposedReflectively(module, pn, other, false); + private void dumpStackIfOpenedReflectively(Module module, + String pn, + Module other) { + dumpStackIfExposedReflectively(module, pn, other, true); } - private void printStackTraceIfExposedReflectively(Module module, - String pn, - Module other, - boolean open) + private void dumpStackIfExportedReflectively(Module module, + String pn, + Module other) { + dumpStackIfExposedReflectively(module, pn, other, false); + } + + private void dumpStackIfExposedReflectively(Module module, + String pn, + Module other, + boolean open) { if (Reflection.printStackTraceWhenAccessSucceeds() - && !module.isStaticallyExportedOrOpen(pn, other, open)) + && !module.isStaticallyExportedOrOpen(pn, other, open)) { String msg = other + " allowed to invoke setAccessible on "; if (this instanceof Field) @@ -256,14 +396,99 @@ public class AccessibleObject implements AnnotatedElement { } /** - * Get the value of the {@code accessible} flag for this object. + * Get the value of the {@code accessible} flag for this reflected object. * * @return the value of the object's {@code accessible} flag + * + * @deprecated + * This method is deprecated because its name hints that it checks + * if the reflected object is accessible when it actually indicates + * if the checks for Java language access control are suppressed. + * This method may return {@code false} on a reflected object that is + * accessible to the caller. To test if this reflected object is accessible, + * it should use {@link #canAccess(Object)}. + * + * @revised 9 */ + @Deprecated(since="9") public boolean isAccessible() { return override; } + /** + * Test if the caller can access this reflected object. If this reflected + * object corresponds to an instance method or field then this method tests + * if the caller can access the given {@code obj} with the reflected object. + * For instance methods or fields then the {@code obj} argument must be an + * instance of the {@link Member#getDeclaringClass() declaring class}. For + * static members and constructors then {@code obj} must be {@code null}. + * + *

        This method returns {@code true} if the {@code accessible} flag + * is set to {@code true}, i.e. the checks for Java language access control + * are suppressed, or if the caller can access the member as + * specified in The Java™ Language Specification, + * with the variation noted in the class description.

        + * + * @param obj an instance object of the declaring class of this reflected + * object if it is an instance method or field + * + * @return {@code true} if the caller can access this reflected object. + * + * @throws IllegalArgumentException + *
          + *
        • if this reflected object is a static member or constructor and + * the given {@code obj} is non-{@code null}, or
        • + *
        • if this reflected object is an instance method or field + * and the given {@code obj} is {@code null} or of type + * that is not a subclass of the {@link Member#getDeclaringClass() + * declaring class} of the member.
        • + *
        + * + * @since 9 + * @spec JPMS + * @jls 6.6 Access Control + * @see #trySetAccessible + * @see #setAccessible(boolean) + */ + @CallerSensitive + public final boolean canAccess(Object obj) { + if (!Member.class.isInstance(this)) { + return override; + } + + Class declaringClass = ((Member) this).getDeclaringClass(); + int modifiers = ((Member) this).getModifiers(); + if (!Modifier.isStatic(modifiers) && + (this instanceof Method || this instanceof Field)) { + if (obj == null) { + throw new IllegalArgumentException("null object for " + this); + } + // if this object is an instance member, the given object + // must be a subclass of the declaring class of this reflected object + if (!declaringClass.isAssignableFrom(obj.getClass())) { + throw new IllegalArgumentException("object is not an instance of " + + declaringClass.getName()); + } + } else if (obj != null) { + throw new IllegalArgumentException("non-null object for " + this); + } + + // access check is suppressed + if (override) return true; + + Class caller = Reflection.getCallerClass(); + Class targetClass; + if (this instanceof Constructor) { + targetClass = declaringClass; + } else { + targetClass = Modifier.isStatic(modifiers) ? null : obj.getClass(); + } + return Reflection.verifyMemberAccess(caller, + declaringClass, + targetClass, + modifiers); + } + /** * Constructor: only used by the Java Virtual Machine. */ diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java b/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java index f64e84f7f37..968e3f30af4 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java @@ -168,6 +168,13 @@ public final class Constructor extends Executable { * is true.

        * * @param flag {@inheritDoc} + * + * @throws InaccessibleObjectException {@inheritDoc} + * @throws SecurityException if the request is denied by the security manager + * or this is a constructor for {@code java.lang.Class} + * + * @since 9 + * @spec JPMS */ @Override @CallerSensitive diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/Field.java b/jdk/src/java.base/share/classes/java/lang/reflect/Field.java index 05b71785ffa..ef892714b03 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/Field.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/Field.java @@ -158,6 +158,10 @@ class Field extends AccessibleObject implements Member { return res; } + /** + * @throws InaccessibleObjectException {@inheritDoc} + * @throws SecurityException {@inheritDoc} + */ @Override @CallerSensitive public void setAccessible(boolean flag) { diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/InaccessibleObjectException.java b/jdk/src/java.base/share/classes/java/lang/reflect/InaccessibleObjectException.java index 34db5150f85..b03d449fecc 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/InaccessibleObjectException.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/InaccessibleObjectException.java @@ -30,6 +30,7 @@ package java.lang.reflect; * * @see AccessibleObject#setAccessible(boolean) * @since 9 + * @spec JPMS */ public class InaccessibleObjectException extends RuntimeException { diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/Layer.java b/jdk/src/java.base/share/classes/java/lang/reflect/Layer.java index 9eaf90d0ca8..d6d89980aae 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/Layer.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/Layer.java @@ -56,20 +56,19 @@ import sun.security.util.SecurityConstants; /** * A layer of modules in the Java virtual machine. * - *

        A layer is created from a graph of modules that is the {@link - * Configuration} and a function that maps each module to a {@link ClassLoader}. + *

        A layer is created from a graph of modules in a {@link Configuration} + * and a function that maps each module to a {@link ClassLoader}. * Creating a layer informs the Java virtual machine about the classes that - * may be loaded from modules so that the Java virtual machine knows which - * module that each class is a member of. Each layer, except the {@link - * #empty() empty} layer, has at least one {@link #parents() parent}.

        + * may be loaded from the modules so that the Java virtual machine knows which + * module that each class is a member of.

        * *

        Creating a layer creates a {@link Module} object for each {@link * ResolvedModule} in the configuration. For each resolved module that is * {@link ResolvedModule#reads() read}, the {@code Module} {@link * Module#canRead reads} the corresponding run-time {@code Module}, which may - * be in the same layer or a parent layer. The {@code Module} {@link - * Module#isExported(String) exports} the packages described by its {@link - * ModuleDescriptor}.

        + * be in the same layer or a {@link #parents() parent} layer. The {@code Module} + * {@link Module#isExported(String) exports} and {@link Module#isOpen(String) + * opens} the packages described by its {@link ModuleDescriptor}.

        * *

        The {@link #defineModulesWithOneLoader defineModulesWithOneLoader} and * {@link #defineModulesWithManyLoaders defineModulesWithManyLoaders} methods @@ -80,7 +79,7 @@ import sun.security.util.SecurityConstants; * a function specified to the method. Each of these methods has an instance * and static variant. The instance methods create a layer with the receiver * as the parent layer. The static methods are for more advanced cases where - * there can be more than one parent layer or a {@link Layer.Controller + * there can be more than one parent layer or where a {@link Layer.Controller * Controller} is needed to control modules in the layer.

        * *

        A Java virtual machine has at least one non-empty layer, the {@link @@ -93,9 +92,8 @@ import sun.security.util.SecurityConstants; * the {@link #parents() parent} when creating additional layers.

        * *

        As when creating a {@code Configuration}, - * {@link ModuleDescriptor#isAutomatic() automatic} modules receive - * special - * treatment when creating a layer. An automatic module is created in the + * {@link ModuleDescriptor#isAutomatic() automatic} modules receive special + * treatment when creating a layer. An automatic module is created in the * Java virtual machine as a {@code Module} that reads every unnamed {@code * Module} in the Java virtual machine.

        * @@ -115,8 +113,7 @@ import sun.security.util.SecurityConstants; * * Layer parent = Layer.boot(); * - * Configuration cf = parent.configuration() - * .resolveRequires(finder, ModuleFinder.of(), Set.of("myapp")); + * Configuration cf = parent.configuration().resolve(finder, ModuleFinder.of(), Set.of("myapp")); * * ClassLoader scl = ClassLoader.getSystemClassLoader(); * @@ -126,6 +123,7 @@ import sun.security.util.SecurityConstants; * } * * @since 9 + * @spec JPMS * @see Module#getLayer() */ @@ -168,10 +166,15 @@ public final class Layer { * module layers return a {@code Controller} that can be used to control * modules in the layer. * + *

        Unless otherwise specified, passing a {@code null} argument to a + * method in this class causes a {@link NullPointerException + * NullPointerException} to be thrown.

        + * * @apiNote Care should be taken with {@code Controller} objects, they * should never be shared with untrusted code. * * @since 9 + * @spec JPMS */ public static final class Controller { private final Layer layer; @@ -281,10 +284,8 @@ public final class Layer { * If the parent of the given configuration is not the configuration * for this layer * @throws LayerInstantiationException - * If all modules cannot be defined to the same class loader for any - * of the reasons listed above or the layer cannot be created because - * the configuration contains a module named "{@code java.base}" or - * a module with a package name starting with "{@code java.}" + * If the layer cannot be created for any of the reasons specified + * by the static {@code defineModulesWithOneLoader} method * @throws SecurityException * If {@code RuntimePermission("createClassLoader")} or * {@code RuntimePermission("getClassLoader")} is denied by @@ -325,9 +326,8 @@ public final class Layer { * If the parent of the given configuration is not the configuration * for this layer * @throws LayerInstantiationException - * If the layer cannot be created because the configuration contains - * a module named "{@code java.base}" or a module with a package - * name starting with "{@code java.}" + * If the layer cannot be created for any of the reasons specified + * by the static {@code defineModulesWithManyLoaders} method * @throws SecurityException * If {@code RuntimePermission("createClassLoader")} or * {@code RuntimePermission("getClassLoader")} is denied by @@ -365,14 +365,8 @@ public final class Layer { * If the parent of the given configuration is not the configuration * for this layer * @throws LayerInstantiationException - * If creating the {@code Layer} fails for any of the reasons - * listed above, the layer cannot be created because the - * configuration contains a module named "{@code java.base}", - * a module with a package name starting with "{@code java.}" is - * mapped to a class loader other than the {@link - * ClassLoader#getPlatformClassLoader() platform class loader}, - * or the function to map a module name to a class loader returns - * {@code null} + * If the layer cannot be created for any of the reasons specified + * by the static {@code defineModules} method * @throws SecurityException * If {@code RuntimePermission("getClassLoader")} is denied by * the security manager @@ -396,7 +390,6 @@ public final class Layer { * exported to one or more of the modules in this layer. The class * loader delegates to the class loader of the module, throwing {@code * ClassNotFoundException} if not found by that class loader. - * * When {@code loadClass} is invoked to load classes that do not map to a * module then it delegates to the parent class loader.

        * @@ -414,6 +407,10 @@ public final class Layer { * *
      * + *

      In addition, a layer cannot be created if the configuration contains + * a module named "{@code java.base}" or a module with a package name + * starting with "{@code java.}".

      + * *

      If there is a security manager then the class loader created by * this method will load classes and resources with privileges that are * restricted by the calling context of this method.

      @@ -433,9 +430,7 @@ public final class Layer { * the parent layers, including order * @throws LayerInstantiationException * If all modules cannot be defined to the same class loader for any - * of the reasons listed above or the layer cannot be created because - * the configuration contains a module named "{@code java.base}" or - * a module with a package name starting with "{@code java.}" + * of the reasons listed above * @throws SecurityException * If {@code RuntimePermission("createClassLoader")} or * {@code RuntimePermission("getClassLoader")} is denied by @@ -480,7 +475,6 @@ public final class Layer { * module in a parent layer. The class loader delegates to the class loader * of the module, throwing {@code ClassNotFoundException} if not found by * that class loader. - * * When {@code loadClass} is invoked to load classes that do not map to a * module then it delegates to the parent class loader.

      * @@ -533,15 +527,19 @@ public final class Layer { /** * Creates a new layer by defining the modules in the given {@code - * Configuration} to the Java virtual machine. - * Each module is mapped, by name, to its class loader by means of the - * given function. The class loader delegation implemented by these class - * loaders must respect module readability. The class loaders should be + * Configuration} to the Java virtual machine. The given function maps each + * module in the configuration, by name, to a class loader. Creating the + * layer informs the Java virtual machine about the classes that may be + * loaded so that the Java virtual machine knows which module that each + * class is a member of. + * + *

      The class loader delegation implemented by the class loaders must + * respect module readability. The class loaders should be * {@link ClassLoader#registerAsParallelCapable parallel-capable} so as to * avoid deadlocks during class loading. In addition, the entity creating - * a new layer with this method should arrange that the class loaders are + * a new layer with this method should arrange that the class loaders be * ready to load from these modules before there are any attempts to load - * classes or resources. + * classes or resources.

      * *

      Creating a {@code Layer} can fail for the following reasons:

      * @@ -558,6 +556,13 @@ public final class Layer { * *
    * + *

    In addition, a layer cannot be created if the configuration contains + * a module named "{@code java.base}", a configuration contains a module + * with a package name starting with "{@code java.}" is mapped to a class + * loader other than the {@link ClassLoader#getPlatformClassLoader() + * platform class loader}, or the function to map a module name to a class + * loader returns {@code null}.

    + * *

    If the function to map a module name to class loader throws an error * or runtime exception then it is propagated to the caller of this method. *

    @@ -565,7 +570,7 @@ public final class Layer { * @apiNote It is implementation specific as to whether creating a Layer * with this method is an atomic operation or not. Consequentially it is * possible for this method to fail with some modules, but not all, defined - * to Java virtual machine. + * to the Java virtual machine. * * @param cf * The configuration for the layer @@ -580,14 +585,7 @@ public final class Layer { * If the parent configurations do not match the configuration of * the parent layers, including order * @throws LayerInstantiationException - * If creating the {@code Layer} fails for any of the reasons - * listed above, the layer cannot be created because the - * configuration contains a module named "{@code java.base}", - * a module with a package name starting with "{@code java.}" is - * mapped to a class loader other than the {@link - * ClassLoader#getPlatformClassLoader() platform class loader}, - * or the function to map a module name to a class loader returns - * {@code null} + * If creating the layer fails for any of the reasons listed above * @throws SecurityException * If {@code RuntimePermission("getClassLoader")} is denied by * the security manager @@ -763,7 +761,7 @@ public final class Layer { /** * Returns the module with the given name in this layer, or if not in this - * layer, the {@linkplain #parents parents} layers. Finding a module in + * layer, the {@linkplain #parents parent} layers. Finding a module in * parent layers is equivalent to invoking {@code findModule} on each * parent, in search order, until the module is found or all parents have * been searched. In a tree of layers then this is equivalent to diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/LayerInstantiationException.java b/jdk/src/java.base/share/classes/java/lang/reflect/LayerInstantiationException.java index ff61c41590f..fbd0de0ac85 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/LayerInstantiationException.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/LayerInstantiationException.java @@ -31,6 +31,7 @@ package java.lang.reflect; * @see Layer * * @since 9 + * @spec JPMS */ public class LayerInstantiationException extends RuntimeException { private static final long serialVersionUID = -906239691613568347L; diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/Method.java b/jdk/src/java.base/share/classes/java/lang/reflect/Method.java index 027a711d3e1..2208a5cbd81 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/Method.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/Method.java @@ -179,6 +179,10 @@ public final class Method extends Executable { return res; } + /** + * @throws InaccessibleObjectException {@inheritDoc} + * @throws SecurityException {@inheritDoc} + */ @Override @CallerSensitive public void setAccessible(boolean flag) { diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/Module.java b/jdk/src/java.base/share/classes/java/lang/reflect/Module.java index 5134b64caf8..e70d9fbb872 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/Module.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/Module.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,7 +39,6 @@ import java.net.URI; import java.net.URL; import java.security.AccessController; import java.security.PrivilegedAction; -import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Map; @@ -74,16 +73,15 @@ import sun.security.util.SecurityConstants; * Java Virtual Machine when a graph of modules is defined to the Java virtual * machine to create a module {@link Layer Layer}.

    * - *

    An unnamed module does not have a name. There is an unnamed module - * per {@link ClassLoader ClassLoader} that is obtained by invoking the class - * loader's {@link ClassLoader#getUnnamedModule() getUnnamedModule} method. The - * {@link Class#getModule() getModule} method of all types defined by a class - * loader that are not in a named module return the class loader's unnamed + *

    An unnamed module does not have a name. There is an unnamed module for + * each {@link ClassLoader ClassLoader}, obtained by invoking its {@link + * ClassLoader#getUnnamedModule() getUnnamedModule} method. All types that are + * not in a named module are members of their defining class loader's unnamed * module.

    * *

    The package names that are parameters or returned by methods defined in * this class are the fully-qualified names of the packages as defined in - * section 6.5.3 of The Java™ Language Specification , for + * section 6.5.3 of The Java™ Language Specification, for * example, {@code "java.lang"}.

    * *

    Unless otherwise specified, passing a {@code null} argument to a method @@ -91,6 +89,7 @@ import sun.security.util.SecurityConstants; * be thrown.

    * * @since 9 + * @spec JPMS * @see java.lang.Class#getModule */ @@ -327,8 +326,9 @@ public final class Module implements AnnotatedElement { * * @return this module * - * @throws IllegalStateException - * If this is a named module and the caller is not this module + * @throws IllegalCallerException + * If this is a named module and the caller's module is not this + * module * * @see #canRead */ @@ -338,7 +338,7 @@ public final class Module implements AnnotatedElement { if (this.isNamed()) { Module caller = Reflection.getCallerClass().getModule(); if (caller != this) { - throw new IllegalStateException(caller + " != " + this); + throw new IllegalCallerException(caller + " != " + this); } implAddReads(other, true); } @@ -533,8 +533,8 @@ public final class Module implements AnnotatedElement { if (other == this && containsPackage(pn)) return true; - // all packages in open modules are open - if (descriptor.isOpen()) + // all packages in open and automatic modules are open + if (descriptor.isOpen() || descriptor.isAutomatic()) return containsPackage(pn); // exported/opened via module declaration/descriptor @@ -634,8 +634,7 @@ public final class Module implements AnnotatedElement { * the given package to the given module. * *

    This method has no effect if the package is already exported (or - * open) to the given module. It also has no effect if - * invoked on an {@link ModuleDescriptor#isOpen open} module.

    + * open) to the given module.

    * * @apiNote As specified in section 5.4.3 of the The Java™ * Virtual Machine Specification , if an attempt to resolve a @@ -653,8 +652,9 @@ public final class Module implements AnnotatedElement { * @throws IllegalArgumentException * If {@code pn} is {@code null}, or this is a named module and the * package {@code pn} is not a package in this module - * @throws IllegalStateException - * If this is a named module and the caller is not this module + * @throws IllegalCallerException + * If this is a named module and the caller's module is not this + * module * * @jvms 5.4.3 Resolution * @see #isExported(String,Module) @@ -665,10 +665,10 @@ public final class Module implements AnnotatedElement { throw new IllegalArgumentException("package is null"); Objects.requireNonNull(other); - if (isNamed() && !descriptor.isOpen()) { + if (isNamed()) { Module caller = Reflection.getCallerClass().getModule(); if (caller != this) { - throw new IllegalStateException(caller + " != " + this); + throw new IllegalCallerException(caller + " != " + this); } implAddExportsOrOpens(pn, other, /*open*/false, /*syncVM*/true); } @@ -686,8 +686,7 @@ public final class Module implements AnnotatedElement { * access control checks. * *

    This method has no effect if the package is already open - * to the given module. It also has no effect if invoked on an {@link - * ModuleDescriptor#isOpen open} module.

    + * to the given module.

    * * @param pn * The package name @@ -699,9 +698,9 @@ public final class Module implements AnnotatedElement { * @throws IllegalArgumentException * If {@code pn} is {@code null}, or this is a named module and the * package {@code pn} is not a package in this module - * @throws IllegalStateException + * @throws IllegalCallerException * If this is a named module and this module has not opened the - * package to at least the caller + * package to at least the caller's module * * @see #isOpen(String,Module) * @see AccessibleObject#setAccessible(boolean) @@ -713,10 +712,10 @@ public final class Module implements AnnotatedElement { throw new IllegalArgumentException("package is null"); Objects.requireNonNull(other); - if (isNamed() && !descriptor.isOpen()) { + if (isNamed()) { Module caller = Reflection.getCallerClass().getModule(); if (caller != this && !isOpen(pn, caller)) - throw new IllegalStateException(pn + " is not open to " + caller); + throw new IllegalCallerException(pn + " is not open to " + caller); implAddExportsOrOpens(pn, other, /*open*/true, /*syncVM*/true); } @@ -767,8 +766,8 @@ public final class Module implements AnnotatedElement { Objects.requireNonNull(other); Objects.requireNonNull(pn); - // all packages are open in unnamed and open modules - if (!isNamed() || descriptor.isOpen()) + // all packages are open in unnamed, open, and automatic modules + if (!isNamed() || descriptor.isOpen() || descriptor.isAutomatic()) return; // nothing to do if already exported/open to other @@ -819,17 +818,17 @@ public final class Module implements AnnotatedElement { * passed a reference to the service type by other code. This method is * a no-op when invoked on an unnamed module or an automatic module. * - *

    This method does not cause {@link - * Configuration#resolveRequiresAndUses resolveRequiresAndUses} to be - * re-run.

    + *

    This method does not cause {@link Configuration#resolveAndBind + * resolveAndBind} to be re-run.

    * * @param service * The service type * * @return this module * - * @throws IllegalStateException - * If this is a named module and the caller is not this module + * @throws IllegalCallerException + * If this is a named module and the caller's module is not this + * module * * @see #canUse(Class) * @see ModuleDescriptor#uses() @@ -841,7 +840,7 @@ public final class Module implements AnnotatedElement { if (isNamed() && !descriptor.isAutomatic()) { Module caller = Reflection.getCallerClass().getModule(); if (caller != this) { - throw new IllegalStateException(caller + " != " + this); + throw new IllegalCallerException(caller + " != " + this); } implAddUses(service); } @@ -894,14 +893,13 @@ public final class Module implements AnnotatedElement { // -- packages -- // Additional packages that are added to the module at run-time. - // The field is volatile as it may be replaced at run-time - private volatile Set extraPackages; + private volatile Map extraPackages; private boolean containsPackage(String pn) { if (descriptor.packages().contains(pn)) return true; - Set extraPackages = this.extraPackages; - if (extraPackages != null && extraPackages.contains(pn)) + Map extraPackages = this.extraPackages; + if (extraPackages != null && extraPackages.containsKey(pn)) return true; return false; } @@ -915,7 +913,7 @@ public final class Module implements AnnotatedElement { * added to the module, dynamic modules * for example, after it was loaded. * - *

    For unnamed modules, this method is the equivalent of invoking the + *

    For unnamed modules, this method is the equivalent to invoking the * {@link ClassLoader#getDefinedPackages() getDefinedPackages} method of * this module's class loader and returning the array of package names.

    * @@ -930,12 +928,12 @@ public final class Module implements AnnotatedElement { if (isNamed()) { Set packages = descriptor.packages(); - Set extraPackages = this.extraPackages; + Map extraPackages = this.extraPackages; if (extraPackages == null) { return packages.toArray(new String[0]); } else { return Stream.concat(packages.stream(), - extraPackages.stream()) + extraPackages.keySet().stream()) .toArray(String[]::new); } @@ -955,10 +953,6 @@ public final class Module implements AnnotatedElement { * Add a package to this module. * * @apiNote This method is for Proxy use. - * - * @apiNote This is an expensive operation, not expected to be used often. - * At this time then it does not validate that the package name is a - * valid java identifier. */ void addPackage(String pn) { implAddPackage(pn, true); @@ -976,49 +970,52 @@ public final class Module implements AnnotatedElement { /** * Add a package to this module. * - * If {@code syncVM} is {@code true} then the VM is notified. + * If {@code syncVM} is {@code true} then the VM is notified. This method is + * a no-op if this is an unnamed module or the module already contains the + * package. + * + * @throws IllegalArgumentException if the package name is not legal + * @throws IllegalStateException if the package is defined to another module */ private void implAddPackage(String pn, boolean syncVM) { + // no-op if unnamed module if (!isNamed()) - throw new InternalError("adding package to unnamed module?"); - if (descriptor.isOpen()) - throw new InternalError("adding package to open module?"); + return; + + // no-op if module contains the package + if (containsPackage(pn)) + return; + + // check package name is legal for named modules if (pn.isEmpty()) - throw new InternalError("adding package to module?"); - - if (descriptor.packages().contains(pn)) { - // already in module - return; - } - - Set extraPackages = this.extraPackages; - if (extraPackages != null && extraPackages.contains(pn)) { - // already added - return; - } - synchronized (this) { - // recheck under lock - extraPackages = this.extraPackages; - if (extraPackages != null) { - if (extraPackages.contains(pn)) { - // already added - return; - } - - // copy the set - extraPackages = new HashSet<>(extraPackages); - extraPackages.add(pn); - } else { - extraPackages = Collections.singleton(pn); + throw new IllegalArgumentException("Cannot add package"); + for (int i=0; i extraPackages = this.extraPackages; + if (extraPackages == null) { + synchronized (this) { + extraPackages = this.extraPackages; + if (extraPackages == null) + this.extraPackages = extraPackages = new ConcurrentHashMap<>(); + } + } + + // update VM first in case it fails. This is a no-op if another thread + // beats us to add the package first + if (syncVM) { + // throws IllegalStateException if defined to another module + addPackage0(this, pn); + if (descriptor.isOpen() || descriptor.isAutomatic()) { + addExportsToAll0(this, pn); + } + } + extraPackages.putIfAbsent(pn, Boolean.TRUE); } @@ -1169,8 +1166,9 @@ public final class Module implements AnnotatedElement { Map nameToModule, Module m) { - // The VM doesn't know about open modules so need to export all packages - if (descriptor.isOpen()) { + // The VM doesn't special case open or automatic modules so need to + // export all packages + if (descriptor.isOpen() || descriptor.isAutomatic()) { assert descriptor.opens().isEmpty(); for (String source : descriptor.packages()) { addExportsToAll0(m, source); @@ -1375,35 +1373,44 @@ public final class Module implements AnnotatedElement { /** - * Returns an input stream for reading a resource in this module. The - * {@code name} parameter is a {@code '/'}-separated path name that - * identifies the resource. + * Returns an input stream for reading a resource in this module. + * The {@code name} parameter is a {@code '/'}-separated path name that + * identifies the resource. As with {@link Class#getResourceAsStream + * Class.getResourceAsStream}, this method delegates to the module's class + * loader {@link ClassLoader#findResource(String,String) + * findResource(String,String)} method, invoking it with the module name + * (or {@code null} when the module is unnamed) and the name of the + * resource. If the resource name has a leading slash then it is dropped + * before delegation. * - *

    A resource in a named modules may be encapsulated so that + *

    A resource in a named module may be encapsulated so that * it cannot be located by code in other modules. Whether a resource can be - * located or not is determined as follows: + * located or not is determined as follows:

    * *
      - *
    • The package name of the resource is derived from the - * subsequence of characters that precedes the last {@code '/'} and then - * replacing each {@code '/'} character in the subsequence with - * {@code '.'}. For example, the package name derived for a resource - * named "{@code a/b/c/foo.properties}" is "{@code a.b.c}".
    • + *
    • If the resource name ends with "{@code .class}" then it is not + * encapsulated.
    • * - *
    • If the package name is a package in the module then the package - * must be {@link #isOpen open} the module of the caller of this method. - * If the package is not in the module then the resource is not - * encapsulated. Resources in the unnamed package or "{@code META-INF}", - * for example, are never encapsulated because they can never be - * packages in a named module.
    • - * - *
    • As a special case, resources ending with "{@code .class}" are - * never encapsulated.
    • + *
    • A package name is derived from the resource name. If + * the package name is a {@link #getPackages() package} in the module + * then the resource can only be located by the caller of this method + * when the package is {@link #isOpen(String,Module) open} to at least + * the caller's module. If the resource is not in a package in the module + * then the resource is not encapsulated.
    • *
    * + *

    In the above, the package name for a resource is derived + * from the subsequence of characters that precedes the last {@code '/'} in + * the name and then replacing each {@code '/'} character in the subsequence + * with {@code '.'}. A leading slash is ignored when deriving the package + * name. As an example, the package name derived for a resource named + * "{@code a/b/c/foo.properties}" is "{@code a.b.c}". A resource name + * with the name "{@code META-INF/MANIFEST.MF}" is never encapsulated + * because "{@code META-INF}" is not a legal package name.

    + * *

    This method returns {@code null} if the resource is not in this * module, the resource is encapsulated and cannot be located by the caller, - * or access to the resource is denied by the security manager. + * or access to the resource is denied by the security manager.

    * * @param name * The resource name @@ -1413,11 +1420,13 @@ public final class Module implements AnnotatedElement { * @throws IOException * If an I/O error occurs * - * @see java.lang.module.ModuleReader#open(String) + * @see Class#getResourceAsStream(String) */ @CallerSensitive public InputStream getResourceAsStream(String name) throws IOException { - Objects.requireNonNull(name); + if (name.startsWith("/")) { + name = name.substring(1); + } if (isNamed() && !ResourceHelper.isSimpleResource(name)) { Module caller = Reflection.getCallerClass().getModule(); diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/Proxy.java b/jdk/src/java.base/share/classes/java/lang/reflect/Proxy.java index 15d41a4101d..685aebff39a 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/Proxy.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/Proxy.java @@ -25,6 +25,7 @@ package java.lang.reflect; +import java.lang.module.ModuleDescriptor; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.Arrays; @@ -52,6 +53,9 @@ import sun.reflect.misc.ReflectUtil; import sun.security.action.GetPropertyAction; import sun.security.util.SecurityConstants; +import static java.lang.module.ModuleDescriptor.Modifier.SYNTHETIC; + + /** * * {@code Proxy} provides static methods for creating objects that act like instances @@ -164,7 +168,8 @@ import sun.security.util.SecurityConstants; * methods is specified as follows: * *
      - *
    1. If all the proxy interfaces are in exported packages: + *
    2. If all the proxy interfaces are in exported or open + * packages: *
        *
      1. if all the proxy interfaces are public, then the proxy class is * public in a package exported by the @@ -178,10 +183,11 @@ import sun.security.util.SecurityConstants; * not possible.
      2. *
      *
    3. - *
    4. If at least one proxy interface is a non-exported package: + *
    5. If at least one proxy interface is in a package that is + * non-exported and non-open: *
        *
      1. if all the proxy interfaces are public, then the proxy class is - * public in a non-exported package of + * public in a non-exported, non-open package of * dynamic module. * The names of the package and the module are unspecified.
      2. * @@ -195,21 +201,22 @@ import sun.security.util.SecurityConstants; *
      * *

      - * Note that if proxy interfaces with a mix of accessibilities -- - * exported public, exported non-public, non-exported public, non-exported non-public -- - * are proxied by the same instance, then the proxy class's accessibility is + * Note that if proxy interfaces with a mix of accessibilities -- for example, + * an exported public interface and a non-exported non-public interface -- are + * proxied by the same instance, then the proxy class's accessibility is * governed by the least accessible proxy interface. *

      * Note that it is possible for arbitrary code to obtain access to a proxy class - * in an exported package with {@link AccessibleObject#setAccessible setAccessible}, - * whereas a proxy class in a non-exported package is never accessible to + * in an open package with {@link AccessibleObject#setAccessible setAccessible}, + * whereas a proxy class in a non-open package is never accessible to * code outside the module of the proxy class. * *

      - * Throughout this specification, a "non-exported package" refers to a package that - * is not exported to all modules. Specifically, it refers to a package that - * either is not exported at all by its containing module or is exported in a - * qualified fashion by its containing module. + * Throughout this specification, a "non-exported package" refers to a package + * that is not exported to all modules, and a "non-open package" refers to + * a package that is not open to all modules. Specifically, these terms refer to + * a package that either is not exported/open by its containing module or is + * exported/open in a qualified fashion by its containing module. * *

      Dynamic Modules

      *

      @@ -272,6 +279,8 @@ import sun.security.util.SecurityConstants; * @author Peter Jones * @see InvocationHandler * @since 1.3 + * @revised 9 + * @spec JPMS */ public class Proxy implements java.io.Serializable { private static final long serialVersionUID = -2222568056686623797L; @@ -358,6 +367,8 @@ public class Proxy implements java.io.Serializable { * to create a proxy instance instead. * * @see Package and Module Membership of Proxy Class + * @revised 9 + * @spec JPMS */ @Deprecated @CallerSensitive @@ -855,7 +866,11 @@ public class Proxy implements java.io.Serializable { // create a dynamic module and setup module access String mn = "jdk.proxy" + counter.incrementAndGet(); String pn = PROXY_PACKAGE_PREFIX + "." + mn; - Module m = Modules.defineModule(ld, mn, Collections.singleton(pn)); + ModuleDescriptor descriptor = + ModuleDescriptor.newModule(mn, Set.of(SYNTHETIC)) + .packages(Set.of(pn)) + .build(); + Module m = Modules.defineModule(ld, descriptor, null); Modules.addReads(m, Proxy.class.getModule()); // java.base to create proxy instance Modules.addExports(m, pn, Object.class.getModule()); @@ -955,6 +970,8 @@ public class Proxy implements java.io.Serializable { * {@code null} * * @see Package and Module Membership of Proxy Class + * @revised 9 + * @spec JPMS */ @CallerSensitive public static Object newProxyInstance(ClassLoader loader, @@ -1039,6 +1056,9 @@ public class Proxy implements java.io.Serializable { * @return {@code true} if the class is a proxy class and * {@code false} otherwise * @throws NullPointerException if {@code cl} is {@code null} + * + * @revised 9 + * @spec JPMS */ public static boolean isProxyClass(Class cl) { return Proxy.class.isAssignableFrom(cl) && ProxyBuilder.isProxyClass(cl); diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/package-info.java b/jdk/src/java.base/share/classes/java/lang/reflect/package-info.java index c8cb0257b2a..97800b1ce13 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/package-info.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/package-info.java @@ -45,5 +45,7 @@ * members declared by a given class. * * @since 1.1 + * @revised 9 + * @spec JPMS */ package java.lang.reflect; diff --git a/jdk/src/java.base/share/classes/java/net/URLClassLoader.java b/jdk/src/java.base/share/classes/java/net/URLClassLoader.java index 2e52fe2b4e9..d6bd9546750 100644 --- a/jdk/src/java.base/share/classes/java/net/URLClassLoader.java +++ b/jdk/src/java.base/share/classes/java/net/URLClassLoader.java @@ -228,6 +228,7 @@ public class URLClassLoader extends SecureClassLoader implements Closeable { * allow creation of a class loader. * * @since 9 + * @spec JPMS */ public URLClassLoader(String name, URL[] urls, @@ -262,6 +263,7 @@ public class URLClassLoader extends SecureClassLoader implements Closeable { * creation of a class loader. * * @since 9 + * @spec JPMS */ public URLClassLoader(String name, URL[] urls, ClassLoader parent, URLStreamHandlerFactory factory) { @@ -558,6 +560,9 @@ public class URLClassLoader extends SecureClassLoader implements Closeable { * @throws IllegalArgumentException if the package name is * already defined by this class loader * @return the newly defined {@code Package} object + * + * @revised 9 + * @spec JPMS */ protected Package definePackage(String name, Manifest man, URL url) { String path = name.replace('.', '/').concat("/"); diff --git a/jdk/src/java.base/share/classes/java/security/SecureClassLoader.java b/jdk/src/java.base/share/classes/java/security/SecureClassLoader.java index 8f84e10324e..4f0bfa4c27f 100644 --- a/jdk/src/java.base/share/classes/java/security/SecureClassLoader.java +++ b/jdk/src/java.base/share/classes/java/security/SecureClassLoader.java @@ -125,6 +125,7 @@ public class SecureClassLoader extends ClassLoader { * doesn't allow creation of a class loader. * * @since 9 + * @spec JPMS */ protected SecureClassLoader(String name, ClassLoader parent) { super(name, parent); diff --git a/jdk/src/java.base/share/classes/java/security/Security.java b/jdk/src/java.base/share/classes/java/security/Security.java index 49b7e991b40..1076b1d7da7 100644 --- a/jdk/src/java.base/share/classes/java/security/Security.java +++ b/jdk/src/java.base/share/classes/java/security/Security.java @@ -25,11 +25,12 @@ package java.security; -import java.lang.reflect.*; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.io.*; import java.net.URL; + +import jdk.internal.misc.SharedSecrets; import sun.security.util.Debug; import sun.security.util.PropertyExpander; @@ -800,9 +801,6 @@ public final class Security { * "package.definition", we need to signal to the SecurityManager * class that the value has just changed, and that it should * invalidate it's local cache values. - * - * Rather than create a new API entry for this function, - * we use reflection to set a private variable. */ private static void invalidateSMCache(String key) { @@ -810,42 +808,8 @@ public final class Security { final boolean pd = key.equals("package.definition"); if (pa || pd) { - AccessController.doPrivileged(new PrivilegedAction<>() { - public Void run() { - try { - /* Get the class via the bootstrap class loader. */ - Class cl = Class.forName( - "java.lang.SecurityManager", false, null); - Field f = null; - boolean accessible = false; - - if (pa) { - f = cl.getDeclaredField("packageAccessValid"); - accessible = f.isAccessible(); - f.setAccessible(true); - } else { - f = cl.getDeclaredField("packageDefinitionValid"); - accessible = f.isAccessible(); - f.setAccessible(true); - } - f.setBoolean(f, false); - f.setAccessible(accessible); - } - catch (Exception e1) { - /* If we couldn't get the class, it hasn't - * been loaded yet. If there is no such - * field, we shouldn't try to set it. There - * shouldn't be a security execption, as we - * are loaded by boot class loader, and we - * are inside a doPrivileged() here. - * - * NOOP: don't do anything... - */ - } - return null; - } /* run */ - }); /* PrivilegedAction */ - } /* if */ + SharedSecrets.getJavaLangAccess().invalidatePackageAccessCache(); + } } private static void check(String directive) { diff --git a/jdk/src/java.base/share/classes/java/util/ResourceBundle.java b/jdk/src/java.base/share/classes/java/util/ResourceBundle.java index 600b1810a2e..b587da9b9e3 100644 --- a/jdk/src/java.base/share/classes/java/util/ResourceBundle.java +++ b/jdk/src/java.base/share/classes/java/util/ResourceBundle.java @@ -350,6 +350,8 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION; * @see MissingResourceException * @see ResourceBundleProvider * @since 1.1 + * @revised 9 + * @spec JPMS */ public abstract class ResourceBundle { @@ -870,6 +872,8 @@ public abstract class ResourceBundle { * @throws UnsupportedOperationException * if this method is called in a named module * @since 1.6 + * @revised 9 + * @spec JPMS */ @CallerSensitive public static final ResourceBundle getBundle(String baseName, @@ -938,6 +942,7 @@ public abstract class ResourceBundle { * specified module * @return a resource bundle for the given base name and the default locale * @since 9 + * @spec JPMS * @see ResourceBundleProvider */ @CallerSensitive @@ -991,6 +996,7 @@ public abstract class ResourceBundle { * be found in the specified {@code module} * @return a resource bundle for the given base name and locale in the module * @since 9 + * @spec JPMS */ @CallerSensitive public static ResourceBundle getBundle(String baseName, Locale targetLocale, Module module) { @@ -1036,6 +1042,8 @@ public abstract class ResourceBundle { * @throws UnsupportedOperationException * if this method is called in a named module * @since 1.6 + * @revised 9 + * @spec JPMS */ @CallerSensitive public static final ResourceBundle getBundle(String baseName, Locale targetLocale, @@ -1243,6 +1251,8 @@ public abstract class ResourceBundle { * @exception MissingResourceException * if no resource bundle for the specified base name can be found * @since 1.2 + * @revised 9 + * @spec JPMS */ @CallerSensitive public static ResourceBundle getBundle(String baseName, Locale locale, @@ -1465,6 +1475,8 @@ public abstract class ResourceBundle { * @throws UnsupportedOperationException * if this method is called in a named module * @since 1.6 + * @revised 9 + * @spec JPMS */ @CallerSensitive public static ResourceBundle getBundle(String baseName, Locale targetLocale, @@ -2194,6 +2206,8 @@ public abstract class ResourceBundle { * by the caller's module. * * @since 1.6 + * @revised 9 + * @spec JPMS * @see ResourceBundle.Control#getTimeToLive(String,Locale) */ @CallerSensitive @@ -2475,6 +2489,8 @@ public abstract class ResourceBundle { * of {@link ResourceBundleControlProvider} are ignored in named modules. * * @since 1.6 + * @revised 9 + * @spec JPMS * @see java.util.spi.ResourceBundleProvider */ public static class Control { @@ -3103,6 +3119,8 @@ public abstract class ResourceBundle { * if an error occurred when reading resources using * any I/O operations * @see java.util.spi.ResourceBundleProvider#getBundle(String, Locale) + * @revised 9 + * @spec JPMS */ public ResourceBundle newBundle(String baseName, Locale locale, String format, ClassLoader loader, boolean reload) diff --git a/jdk/src/java.base/share/classes/java/util/ServiceLoader.java b/jdk/src/java.base/share/classes/java/util/ServiceLoader.java index 0b437d44e2e..6ffb6177e39 100644 --- a/jdk/src/java.base/share/classes/java/util/ServiceLoader.java +++ b/jdk/src/java.base/share/classes/java/util/ServiceLoader.java @@ -119,7 +119,7 @@ import jdk.internal.reflect.Reflection; * and deployed as an explicit module must have an appropriate uses * clause in its module descriptor to declare that the module uses * implementations of the service. A corresponding requirement is that a - * provider deployed as a named module must have an appropriate + * provider deployed as an explicit module must have an appropriate * provides clause in its module descriptor to declare that the module * provides an implementation of the service. The uses and * provides allow consumers of a service to be linked to modules @@ -203,8 +203,11 @@ import jdk.internal.reflect.Reflection; * ordering of modules in a layer, is not defined.

    6. * *
    7. If a named module declares more than one provider then the providers - * are located in the order that they appear in the {@code provides} table of - * the {@code Module} class file attribute ({@code module-info.class}).
    8. + * are located in the iteration order of the {@link + * java.lang.module.ModuleDescriptor.Provides#providers() providers} list. + * Providers added dynamically by instrumentation agents ({@link + * java.lang.instrument.Instrumentation#redefineModule redefineModule}) + * are always located after providers declared by the module. * *
    9. When locating providers in unnamed modules then the ordering is * based on the order that the class loader's {@link @@ -335,6 +338,8 @@ import jdk.internal.reflect.Reflection; * * @author Mark Reinhold * @since 1.6 + * @revised 9 + * @spec JPMS */ public final class ServiceLoader @@ -386,6 +391,7 @@ public final class ServiceLoader * * @param The service type * @since 9 + * @spec JPMS */ public static interface Provider extends Supplier { /** @@ -927,26 +933,28 @@ public final class ServiceLoader } else { catalog = ServicesCatalog.getServicesCatalogOrNull(loader); } - Stream stream1; + List providers; if (catalog == null) { - stream1 = Stream.empty(); + providers = List.of(); } else { - stream1 = catalog.findServices(serviceName).stream(); + providers = catalog.findServices(serviceName); } // modules in custom layers that define modules to the class loader - Stream stream2; if (loader == null) { - stream2 = Stream.empty(); + return providers.iterator(); } else { + List allProviders = new ArrayList<>(providers); Layer bootLayer = Layer.boot(); - stream2 = JLRM_ACCESS.layers(loader) - .filter(l -> (l != bootLayer)) - .map(l -> providers(l)) - .flatMap(List::stream); + Iterator iterator = JLRM_ACCESS.layers(loader).iterator(); + while (iterator.hasNext()) { + Layer layer = iterator.next(); + if (layer != bootLayer) { + allProviders.addAll(providers(layer)); + } + } + return allProviders.iterator(); } - - return Stream.concat(stream1, stream2).iterator(); } @Override @@ -1214,6 +1222,9 @@ public final class ServiceLoader * * @return An iterator that lazily loads providers for this loader's * service + * + * @revised 9 + * @spec JPMS */ public Iterator iterator() { @@ -1279,8 +1290,10 @@ public final class ServiceLoader * provider to be loaded.

      * *

      If this loader's provider caches are cleared by invoking the {@link - * #reload() reload} method then existing streams for this service - * loader should be discarded.

      + * #reload() reload} method then existing streams for this service loader + * should be discarded. The returned stream's source {@code Spliterator} is + * fail-fast and will throw {@link ConcurrentModificationException} + * if the provider cache has been cleared.

      * *

      The following examples demonstrate usage. The first example * creates a stream of providers, the second example is the same except @@ -1300,6 +1313,7 @@ public final class ServiceLoader * @return A stream that lazily loads providers for this loader's service * * @since 9 + * @spec JPMS */ public Stream> stream() { // use cached providers as the source when all providers loaded @@ -1414,6 +1428,9 @@ public final class ServiceLoader * if the service type is not accessible to the caller or the * caller is in an explicit module and its module descriptor does * not declare that it uses {@code service} + * + * @revised 9 + * @spec JPMS */ @CallerSensitive public static ServiceLoader load(Class service, @@ -1457,6 +1474,9 @@ public final class ServiceLoader * if the service type is not accessible to the caller or the * caller is in an explicit module and its module descriptor does * not declare that it uses {@code service} + * + * @revised 9 + * @spec JPMS */ @CallerSensitive public static ServiceLoader load(Class service) { @@ -1490,6 +1510,9 @@ public final class ServiceLoader * if the service type is not accessible to the caller or the * caller is in an explicit module and its module descriptor does * not declare that it uses {@code service} + * + * @revised 9 + * @spec JPMS */ @CallerSensitive public static ServiceLoader loadInstalled(Class service) { @@ -1522,6 +1545,7 @@ public final class ServiceLoader * not declare that it uses {@code service} * * @since 9 + * @spec JPMS */ @CallerSensitive public static ServiceLoader load(Layer layer, Class service) { @@ -1551,6 +1575,7 @@ public final class ServiceLoader * or error is thrown when locating or instantiating the provider. * * @since 9 + * @spec JPMS */ public Optional findFirst() { Iterator iterator = iterator(); diff --git a/jdk/src/java.base/share/classes/java/util/spi/AbstractResourceBundleProvider.java b/jdk/src/java.base/share/classes/java/util/spi/AbstractResourceBundleProvider.java index 06b6c266c89..b0cba4f4915 100644 --- a/jdk/src/java.base/share/classes/java/util/spi/AbstractResourceBundleProvider.java +++ b/jdk/src/java.base/share/classes/java/util/spi/AbstractResourceBundleProvider.java @@ -81,6 +81,7 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION; * ResourceBundleProvider Service Providers * * @since 9 + * @spec JPMS */ public abstract class AbstractResourceBundleProvider implements ResourceBundleProvider { private static final JavaUtilResourceBundleAccess RB_ACCESS = diff --git a/jdk/src/java.base/share/classes/java/util/spi/ResourceBundleControlProvider.java b/jdk/src/java.base/share/classes/java/util/spi/ResourceBundleControlProvider.java index f74830b4d6a..871d9192ec0 100644 --- a/jdk/src/java.base/share/classes/java/util/spi/ResourceBundleControlProvider.java +++ b/jdk/src/java.base/share/classes/java/util/spi/ResourceBundleControlProvider.java @@ -44,6 +44,8 @@ import java.util.ResourceBundle; * * @author Masayoshi Okutsu * @since 1.8 + * @revised 9 + * @spec JPMS * @see ResourceBundle#getBundle(String, java.util.Locale, ClassLoader, ResourceBundle.Control) * ResourceBundle.getBundle * @see java.util.ServiceLoader#load(Class) diff --git a/jdk/src/java.base/share/classes/java/util/spi/ResourceBundleProvider.java b/jdk/src/java.base/share/classes/java/util/spi/ResourceBundleProvider.java index 0074ae32090..251831f1dcb 100644 --- a/jdk/src/java.base/share/classes/java/util/spi/ResourceBundleProvider.java +++ b/jdk/src/java.base/share/classes/java/util/spi/ResourceBundleProvider.java @@ -57,6 +57,7 @@ import java.util.ResourceBundle; * @see * ResourceBundleProvider Service Providers * @since 9 + * @spec JPMS */ public interface ResourceBundleProvider { /** diff --git a/jdk/src/java.base/share/classes/jdk/internal/jmod/JmodFile.java b/jdk/src/java.base/share/classes/jdk/internal/jmod/JmodFile.java index 34e99dfdd9b..289a80fdca6 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/jmod/JmodFile.java +++ b/jdk/src/java.base/share/classes/jdk/internal/jmod/JmodFile.java @@ -186,7 +186,7 @@ public class JmodFile implements AutoCloseable { public Entry getEntry(Section section, String name) { String entry = section.jmodDir() + "/" + name; ZipEntry ze = zipfile.getEntry(entry); - return (ze != null) ? new Entry(ze) : null; + return (ze == null || ze.isDirectory()) ? null : new Entry(ze); } /** @@ -201,7 +201,7 @@ public class JmodFile implements AutoCloseable { { String entry = section.jmodDir() + "/" + name; ZipEntry e = zipfile.getEntry(entry); - if (e == null) { + if (e == null || e.isDirectory()) { throw new IOException(name + " not found: " + file); } return zipfile.getInputStream(e); diff --git a/jdk/src/java.base/share/classes/jdk/internal/loader/BuiltinClassLoader.java b/jdk/src/java.base/share/classes/jdk/internal/loader/BuiltinClassLoader.java index ab052ec0b30..a0886e82080 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/loader/BuiltinClassLoader.java +++ b/jdk/src/java.base/share/classes/jdk/internal/loader/BuiltinClassLoader.java @@ -57,8 +57,9 @@ import java.util.jar.Attributes; import java.util.jar.Manifest; import java.util.stream.Stream; -import jdk.internal.module.ModulePatcher.PatchedModuleReader; import jdk.internal.misc.VM; +import jdk.internal.module.ModulePatcher.PatchedModuleReader; +import jdk.internal.module.SystemModules; /** @@ -135,7 +136,7 @@ public class BuiltinClassLoader // maps package name to loaded module for modules in the boot layer private static final Map packageToModule - = new ConcurrentHashMap<>(1024); + = new ConcurrentHashMap<>(SystemModules.PACKAGES_IN_BOOT_LAYER); // maps a module name to a module reference private final Map nameToModule; @@ -922,13 +923,13 @@ public class BuiltinClassLoader * Returns the ModuleReader for the given module. */ private ModuleReader moduleReaderFor(ModuleReference mref) { - return moduleToReader.computeIfAbsent(mref, m -> createModuleReader(mref)); + return moduleToReader.computeIfAbsent(mref, BuiltinClassLoader::createModuleReader); } /** * Creates a ModuleReader for the given module. */ - private ModuleReader createModuleReader(ModuleReference mref) { + private static ModuleReader createModuleReader(ModuleReference mref) { try { return mref.open(); } catch (IOException e) { diff --git a/jdk/src/java.base/share/classes/jdk/internal/loader/ResourceHelper.java b/jdk/src/java.base/share/classes/jdk/internal/loader/ResourceHelper.java index a9e0750391a..18a42b7b6f3 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/loader/ResourceHelper.java +++ b/jdk/src/java.base/share/classes/jdk/internal/loader/ResourceHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,6 +24,10 @@ */ package jdk.internal.loader; +import java.io.File; +import java.nio.file.Path; +import java.nio.file.Paths; + import jdk.internal.module.Checks; /** @@ -34,7 +38,8 @@ public final class ResourceHelper { private ResourceHelper() { } /** - * Returns the package name for a resource. + * Returns the package name for a resource or the empty package if + * the resource name does not contain a slash. */ public static String getPackageName(String name) { int index = name.lastIndexOf('/'); @@ -46,19 +51,75 @@ public final class ResourceHelper { } /** - * Returns true if the resource is a simple resource that can - * never be encapsulated. Resources ending in "{@code .class}" or where - * the package name is not a Java identifier are resources that can - * never be encapsulated. + * Returns true if the resource is a simple resource. Simple + * resources can never be encapsulated. Resources ending in "{@code .class}" + * or where the package name is not a legal package name can not be + * encapsulated. */ public static boolean isSimpleResource(String name) { int len = name.length(); if (len > 6 && name.endsWith(".class")) { return true; } - if (!Checks.isJavaIdentifier(getPackageName(name))) { + if (!Checks.isPackageName(getPackageName(name))) { return true; } return false; } + + /** + * Converts a resource name to a file path. Returns {@code null} if the + * resource name cannot be converted into a file path. Resource names + * with empty elements, or elements that are "." or ".." are rejected, + * as is a resource name that translates to a file path with a root + * component. + */ + public static Path toFilePath(String name) { + // scan the resource name to eagerly reject obviously invalid names + int next; + int off = 0; + while ((next = name.indexOf('/', off)) != -1) { + int len = next - off; + if (!mayTranslate(name, off, len)) { + return null; + } + off = next + 1; + } + int rem = name.length() - off; + if (!mayTranslate(name, off, rem)) { + return null; + } + + // convert to file path + Path path; + if (File.separatorChar == '/') { + path = Paths.get(name); + } else { + // not allowed to embed file separators + if (name.contains(File.separator)) + return null; + path = Paths.get(name.replace('/', File.separatorChar)); + } + + // file path not allowed to have root component + return (path.getRoot() == null) ? path : null; + } + + /** + * Returns {@code true} if the element in a resource name is a candidate + * to translate to the element of a file path. + */ + private static boolean mayTranslate(String name, int off, int len) { + if (len <= 2) { + if (len == 0) + return false; + boolean starsWithDot = (name.charAt(off) == '.'); + if (len == 1 && starsWithDot) + return false; + if (len == 2 && starsWithDot && (name.charAt(off+1) == '.')) + return false; + } + return true; + } + } diff --git a/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangAccess.java b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangAccess.java index 6838111c35d..7cb2c1e74a4 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangAccess.java +++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangAccess.java @@ -174,4 +174,9 @@ public interface JavaLangAccess { * Invokes Long.fastUUID */ String fastUUID(long lsb, long msb); + + /** + * Invalidate package access cache + */ + void invalidatePackageAccessCache(); } diff --git a/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangModuleAccess.java b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangModuleAccess.java index eed7a2d2aff..53e8b4c82c7 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangModuleAccess.java +++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangModuleAccess.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -59,20 +59,21 @@ public interface JavaLangModuleAccess { */ ModuleDescriptor.Builder newModuleBuilder(String mn, boolean strict, - boolean open, - boolean synthetic); + Set ms); /** - * Returns the set of packages that are exported (unconditionally or - * unconditionally). + * Returns a snapshot of the packages in the module. */ - Set exportedPackages(ModuleDescriptor.Builder builder); + Set packages(ModuleDescriptor.Builder builder); /** - * Returns the set of packages that are opened (unconditionally or - * unconditionally). + * Adds a dependence on a module with the given (possibly un-parsable) + * version string. */ - Set openPackages(ModuleDescriptor.Builder builder); + void requires(ModuleDescriptor.Builder builder, + Set ms, + String mn, + String compiledVersion); /** * Returns a {@code ModuleDescriptor.Requires} of the given modifiers @@ -113,24 +114,12 @@ public interface JavaLangModuleAccess { */ Provides newProvides(String service, List providers); - /** - * Returns a {@code ModuleDescriptor.Version} of the given version. - */ - Version newVersion(String v); - - /** - * Clones the given module descriptor with an augmented set of packages - */ - ModuleDescriptor newModuleDescriptor(ModuleDescriptor md, Set pkgs); - /** * Returns a new {@code ModuleDescriptor} instance. */ ModuleDescriptor newModuleDescriptor(String name, Version version, - boolean open, - boolean automatic, - boolean synthetic, + Set ms, Set requires, Set exports, Set opens, @@ -148,9 +137,9 @@ public interface JavaLangModuleAccess { * and the empty configuration as the parent. The post resolution * checks are optionally run. */ - Configuration resolveRequiresAndUses(ModuleFinder finder, - Collection roots, - boolean check, - PrintStream traceOutput); + Configuration resolveAndBind(ModuleFinder finder, + Collection roots, + boolean check, + PrintStream traceOutput); } diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/Builder.java b/jdk/src/java.base/share/classes/jdk/internal/module/Builder.java index 2ef9c11d248..9196f39ff77 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/Builder.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/Builder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,7 +38,7 @@ import jdk.internal.misc.JavaLangModuleAccess; import jdk.internal.misc.SharedSecrets; /** - * This builder is optimized for reconstituting ModuleDescriptor + * This builder is optimized for reconstituting the {@code ModuleDescriptor}s * for system modules. The validation should be done at jlink time. * * 1. skip name validation @@ -136,9 +136,7 @@ final class Builder { } final String name; - boolean open; - boolean automatic; - boolean synthetic; + boolean open, synthetic, mandated; Set requires; Set exports; Set opens; @@ -165,13 +163,13 @@ final class Builder { return this; } - Builder automatic(boolean value) { - this.automatic = value; + Builder synthetic(boolean value) { + this.synthetic = value; return this; } - Builder synthetic(boolean value) { - this.synthetic = value; + Builder mandated(boolean value) { + this.mandated = value; return this; } @@ -228,13 +226,10 @@ final class Builder { * * @throws IllegalArgumentException if {@code v} is null or cannot be * parsed as a version string - * @throws IllegalStateException if the module version is already set * * @see Version#parse(String) */ public Builder version(String v) { - if (version != null) - throw new IllegalStateException("module version already set"); Version ver = cachedVersion; if (ver != null && v.equals(ver.toString())) { version = ver; @@ -246,63 +241,63 @@ final class Builder { /** * Sets the module main class. - * - * @throws IllegalStateException if already set */ public Builder mainClass(String mc) { - if (mainClass != null) - throw new IllegalStateException("main class already set"); mainClass = mc; return this; } /** * Sets the OS name. - * - * @throws IllegalStateException if already set */ public Builder osName(String name) { - if (osName != null) - throw new IllegalStateException("OS name already set"); this.osName = name; return this; } /** * Sets the OS arch. - * - * @throws IllegalStateException if already set */ public Builder osArch(String arch) { - if (osArch != null) - throw new IllegalStateException("OS arch already set"); this.osArch = arch; return this; } /** * Sets the OS version. - * - * @throws IllegalStateException if already set */ public Builder osVersion(String version) { - if (osVersion != null) - throw new IllegalStateException("OS version already set"); this.osVersion = version; return this; } + /** + * Returns an immutable set of the module modifiers derived from the flags. + */ + private Set modifiers() { + int n = 0; + if (open) n++; + if (synthetic) n++; + if (mandated) n++; + if (n == 0) { + return Collections.emptySet(); + } else { + ModuleDescriptor.Modifier[] mods = new ModuleDescriptor.Modifier[n]; + if (open) mods[--n] = ModuleDescriptor.Modifier.OPEN; + if (synthetic) mods[--n] = ModuleDescriptor.Modifier.SYNTHETIC; + if (mandated) mods[--n] = ModuleDescriptor.Modifier.MANDATED; + return Set.of(mods); + } + } + /** * Builds a {@code ModuleDescriptor} from the components. */ public ModuleDescriptor build(int hashCode) { assert name != null; - return JLMA.newModuleDescriptor(name, version, - open, - automatic, - synthetic, + modifiers(), requires, exports, opens, diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/Checks.java b/jdk/src/java.base/share/classes/jdk/internal/module/Checks.java index 2fdeaab6211..e19e6528ce0 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/Checks.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/Checks.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,7 +26,7 @@ package jdk.internal.module; /** - * Utility class for checking module name and binary names. + * Utility class for checking module, package, and class names. */ public final class Checks { @@ -58,8 +58,6 @@ public final class Checks { throw new IllegalArgumentException(name + ": Invalid module name" + ": '" + id + "' is not a Java identifier"); } - //if (!Character.isJavaIdentifierStart(last)) - // throw new IllegalArgumentException(name + ": Module name ends in digit"); return name; } @@ -77,8 +75,6 @@ public final class Checks { int last = isJavaIdentifier(name, off, name.length() - off); if (last == -1) return false; - //if (!Character.isJavaIdentifierStart(last)) - // return false; return true; } @@ -89,40 +85,62 @@ public final class Checks { * package name */ public static String requirePackageName(String name) { - return requireBinaryName("package name", name); + return requireTypeName("package name", name); } /** - * Checks a name to ensure that it's a legal type name. + * Returns {@code true} if the given name is a legal package name. + */ + public static boolean isPackageName(String name) { + return isTypeName(name); + } + + /** + * Checks a name to ensure that it's a legal qualified class name * * @throws IllegalArgumentException if name is null or not a legal - * type name + * qualified class name */ public static String requireServiceTypeName(String name) { - return requireBinaryName("service type name", name); + return requireQualifiedClassName("service type name", name); } /** - * Checks a name to ensure that it's a legal type name. + * Checks a name to ensure that it's a legal qualified class name. * * @throws IllegalArgumentException if name is null or not a legal - * type name + * qualified class name */ public static String requireServiceProviderName(String name) { - return requireBinaryName("service provider name", name); + return requireQualifiedClassName("service provider name", name); } /** - * Returns {@code true} if the given name is a legal binary name. + * Checks a name to ensure that it's a legal qualified class name in + * a named package. + * + * @throws IllegalArgumentException if name is null or not a legal + * qualified class name in a named package */ - public static boolean isJavaIdentifier(String name) { - return isBinaryName(name); + public static String requireQualifiedClassName(String what, String name) { + requireTypeName(what, name); + if (name.indexOf('.') == -1) + throw new IllegalArgumentException(name + ": is not a qualified name of" + + " a Java class in a named package"); + return name; } /** - * Returns {@code true} if the given name is a legal binary name. + * Returns {@code true} if the given name is a legal class name. */ - public static boolean isBinaryName(String name) { + public static boolean isClassName(String name) { + return isTypeName(name); + } + + /** + * Returns {@code true} if the given name is a legal type name. + */ + private static boolean isTypeName(String name) { int next; int off = 0; while ((next = name.indexOf('.', off)) != -1) { @@ -135,12 +153,12 @@ public final class Checks { } /** - * Checks if the given name is a legal binary name. + * Checks if the given name is a legal type name. * * @throws IllegalArgumentException if name is null or not a legal - * binary name + * type name */ - public static String requireBinaryName(String what, String name) { + private static String requireTypeName(String what, String name) { if (name == null) throw new IllegalArgumentException("Null " + what); int next; diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ClassFileAttributes.java b/jdk/src/java.base/share/classes/jdk/internal/module/ClassFileAttributes.java index 69c7ee670dd..fc3c3904850 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ClassFileAttributes.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ClassFileAttributes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,7 @@ package jdk.internal.module; import java.lang.module.ModuleDescriptor; +import java.lang.module.ModuleDescriptor.Builder; import java.lang.module.ModuleDescriptor.Requires; import java.lang.module.ModuleDescriptor.Exports; import java.lang.module.ModuleDescriptor.Opens; @@ -98,14 +99,17 @@ public final class ClassFileAttributes { // module_flags int module_flags = cr.readUnsignedShort(off); - boolean open = ((module_flags & ACC_OPEN) != 0); - boolean synthetic = ((module_flags & ACC_SYNTHETIC) != 0); off += 2; - ModuleDescriptor.Builder builder = JLMA.newModuleBuilder(mn, - false, - open, - synthetic); + Set modifiers = new HashSet<>(); + if ((module_flags & ACC_OPEN) != 0) + modifiers.add(ModuleDescriptor.Modifier.OPEN); + if ((module_flags & ACC_SYNTHETIC) != 0) + modifiers.add(ModuleDescriptor.Modifier.SYNTHETIC); + if ((module_flags & ACC_MANDATED) != 0) + modifiers.add(ModuleDescriptor.Modifier.MANDATED); + + Builder builder = JLMA.newModuleBuilder(mn, false, modifiers); // module_version String module_version = cr.readUTF8(off, buf); @@ -142,19 +146,13 @@ public final class ClassFileAttributes { mods.add(Requires.Modifier.MANDATED); } - // requires_version - Version compiledVersion = null; String requires_version = cr.readUTF8(off, buf); off += 2; - if (requires_version != null) { - compiledVersion = Version.parse(requires_version); - } - - if (compiledVersion == null) { + if (requires_version == null) { builder.requires(mods, dn); } else { - builder.requires(mods, dn, compiledVersion); + JLMA.requires(builder, mods, dn, requires_version); } } @@ -283,11 +281,14 @@ public final class ClassFileAttributes { attr.putShort(module_name_index); // module_flags + Set modifiers = descriptor.modifiers(); int module_flags = 0; - if (descriptor.isOpen()) + if (modifiers.contains(ModuleDescriptor.Modifier.OPEN)) module_flags |= ACC_OPEN; - if (descriptor.isSynthetic()) + if (modifiers.contains(ModuleDescriptor.Modifier.SYNTHETIC)) module_flags |= ACC_SYNTHETIC; + if (modifiers.contains(ModuleDescriptor.Modifier.MANDATED)) + module_flags |= ACC_MANDATED; attr.putShort(module_flags); // module_version diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ClassFileConstants.java b/jdk/src/java.base/share/classes/jdk/internal/module/ClassFileConstants.java index 48fe536c7aa..66e241ee555 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ClassFileConstants.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ClassFileConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -46,8 +46,8 @@ public class ClassFileConstants { // access, requires, exports, and opens flags public static final int ACC_MODULE = 0x8000; public static final int ACC_OPEN = 0x0020; - public static final int ACC_TRANSITIVE = 0x0010; - public static final int ACC_STATIC_PHASE = 0x0020; + public static final int ACC_TRANSITIVE = 0x0020; + public static final int ACC_STATIC_PHASE = 0x0040; public static final int ACC_SYNTHETIC = 0x1000; public static final int ACC_MANDATED = 0x8000; diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java index 71406460c41..833b1cf5e24 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java @@ -26,7 +26,9 @@ package jdk.internal.module; import java.io.File; +import java.io.IOException; import java.io.PrintStream; +import java.io.UncheckedIOException; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; @@ -35,6 +37,7 @@ import java.lang.module.ResolvedModule; import java.lang.reflect.Layer; import java.lang.reflect.Module; import java.net.URI; +import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; @@ -46,6 +49,7 @@ import java.util.Map; import java.util.Optional; import java.util.Set; import java.util.function.Function; +import java.util.stream.Stream; import jdk.internal.loader.BootLoader; import jdk.internal.loader.BuiltinClassLoader; @@ -114,7 +118,12 @@ public final class ModuleBootstrap { long t0 = System.nanoTime(); // system modules (may be patched) - ModuleFinder systemModules = ModuleFinder.ofSystem(); + ModuleFinder systemModules; + if (SystemModules.MODULE_NAMES.length > 0) { + systemModules = SystemModuleFinder.getInstance(); + } else { + systemModules = ModuleFinder.ofSystem(); + } PerfCounters.systemModulesTime.addElapsedTimeFrom(t0); @@ -275,10 +284,10 @@ public final class ModuleBootstrap { // run the resolver to create the configuration Configuration cf = SharedSecrets.getJavaLangModuleAccess() - .resolveRequiresAndUses(finder, - roots, - needPostResolutionChecks, - traceOutput); + .resolveAndBind(finder, + roots, + needPostResolutionChecks, + traceOutput); // time to create configuration PerfCounters.resolveTime.addElapsedTimeFrom(t3); @@ -318,20 +327,20 @@ public final class ModuleBootstrap { // if needed check that there are no split packages in the set of // resolved modules for the boot layer if (SystemModules.hasSplitPackages() || needPostResolutionChecks) { - Map packageToModule = new HashMap<>(); - for (ResolvedModule resolvedModule : cf.modules()) { - ModuleDescriptor descriptor = - resolvedModule.reference().descriptor(); - String name = descriptor.name(); - for (String p : descriptor.packages()) { - String other = packageToModule.putIfAbsent(p, name); - if (other != null) { - fail("Package " + p + " in both module " - + name + " and module " + other); - } + Map packageToModule = new HashMap<>(); + for (ResolvedModule resolvedModule : cf.modules()) { + ModuleDescriptor descriptor = + resolvedModule.reference().descriptor(); + String name = descriptor.name(); + for (String p : descriptor.packages()) { + String other = packageToModule.putIfAbsent(p, name); + if (other != null) { + fail("Package " + p + " in both module " + + name + " and module " + other); } } } + } long t4 = System.nanoTime(); @@ -380,10 +389,9 @@ public final class ModuleBootstrap { Set otherMods) { // resolve all root modules - Configuration cf = Configuration.empty() - .resolveRequires(finder, - ModuleFinder.of(), - roots); + Configuration cf = Configuration.empty().resolve(finder, + ModuleFinder.of(), + roots); // module name -> reference Map map = new HashMap<>(); @@ -416,7 +424,7 @@ public final class ModuleBootstrap { /** * Creates a finder from the module path that is the value of the given - * system property. + * system property and optionally patched by --patch-module */ private static ModuleFinder createModulePathFinder(String prop) { String s = System.getProperty(prop); @@ -429,7 +437,7 @@ public final class ModuleBootstrap { for (String dir: dirs) { paths[i++] = Paths.get(dir); } - return ModuleFinder.of(paths); + return ModulePath.of(patcher, paths); } } @@ -528,8 +536,48 @@ public final class ModuleBootstrap { if (!extraOpens.isEmpty()) { addExtraExportsOrOpens(bootLayer, extraOpens, true); } + + // DEBUG_ADD_OPENS is for debugging purposes only + String home = System.getProperty("java.home"); + Path file = Paths.get(home, "conf", "DEBUG_ADD_OPENS"); + if (Files.exists(file)) { + warn(file + " detected; may break encapsulation"); + try (Stream lines = Files.lines(file)) { + lines.map(line -> line.trim()) + .filter(line -> (!line.isEmpty() && !line.startsWith("#"))) + .forEach(line -> { + String[] s = line.split("/"); + if (s.length != 2) { + fail("Unable to parse as /: " + line); + } else { + String mn = s[0]; + String pkg = s[1]; + openPackage(bootLayer, mn, pkg); + } + }); + } catch (IOException ioe) { + throw new UncheckedIOException(ioe); + } + } } + private static void openPackage(Layer bootLayer, String mn, String pkg) { + if (mn.equals("ALL-RESOLVED") && pkg.equals("ALL-PACKAGES")) { + bootLayer.modules().stream().forEach(m -> + m.getDescriptor().packages().forEach(pn -> openPackage(m, pn))); + } else { + bootLayer.findModule(mn) + .filter(m -> m.getDescriptor().packages().contains(pkg)) + .ifPresent(m -> openPackage(m, pkg)); + } + } + + private static void openPackage(Module m, String pn) { + Modules.addOpensToAllUnnamed(m, pn); + warn("Opened for deep reflection: " + m.getName() + "/" + pn); + } + + private static void addExtraExportsOrOpens(Layer bootLayer, Map> map, boolean opens) diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java index 3aac651577c..b58c717affe 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,7 +37,6 @@ import java.lang.module.ModuleDescriptor.Builder; import java.lang.module.ModuleDescriptor.Requires; import java.lang.module.ModuleDescriptor.Exports; import java.lang.module.ModuleDescriptor.Opens; -import java.lang.module.ModuleDescriptor.Version; import java.nio.ByteBuffer; import java.nio.BufferUnderflowException; import java.util.ArrayList; @@ -51,7 +50,6 @@ import java.util.function.Supplier; import jdk.internal.misc.JavaLangModuleAccess; import jdk.internal.misc.SharedSecrets; -import jdk.internal.module.ModuleResolution; import static jdk.internal.module.ClassFileConstants.*; @@ -221,7 +219,7 @@ public final class ModuleInfo { Set attributes = new HashSet<>(); Builder builder = null; - Set packages = null; + Set allPackages = null; String mainClass = null; String[] osValues = null; ModuleHashes hashes = null; @@ -245,7 +243,7 @@ public final class ModuleInfo { break; case MODULE_PACKAGES : - packages = readModulePackagesAttribute(in, cpool); + allPackages = readModulePackagesAttribute(in, cpool); break; case MODULE_MAIN_CLASS : @@ -284,51 +282,44 @@ public final class ModuleInfo { throw invalidModuleDescriptor(MODULE + " attribute not found"); } + // ModuleMainClass and ModuleTarget attributes + if (mainClass != null) { + builder.mainClass(mainClass); + } + if (osValues != null) { + if (osValues[0] != null) builder.osName(osValues[0]); + if (osValues[1] != null) builder.osArch(osValues[1]); + if (osValues[2] != null) builder.osVersion(osValues[2]); + } + // If the ModulePackages attribute is not present then the packageFinder // is used to find the set of packages boolean usedPackageFinder = false; - if (packages == null && packageFinder != null) { + if (allPackages == null && packageFinder != null) { try { - packages = new HashSet<>(packageFinder.get()); + allPackages = packageFinder.get(); } catch (UncheckedIOException x) { throw x.getCause(); } usedPackageFinder = true; } - if (packages != null) { - Set exportedPackages = JLMA.exportedPackages(builder); - Set openPackages = JLMA.openPackages(builder); - if (packages.containsAll(exportedPackages) - && packages.containsAll(openPackages)) { - packages.removeAll(exportedPackages); - packages.removeAll(openPackages); - } else { - // the set of packages is not complete - Set exportedAndOpenPackages = new HashSet<>(); - exportedAndOpenPackages.addAll(exportedPackages); - exportedAndOpenPackages.addAll(openPackages); - for (String pn : exportedAndOpenPackages) { - if (!packages.contains(pn)) { - String tail; - if (usedPackageFinder) { - tail = " not found by package finder"; - } else { - tail = " missing from ModulePackages attribute"; - } - throw invalidModuleDescriptor("Package " + pn + tail); - } + if (allPackages != null) { + Set knownPackages = JLMA.packages(builder); + if (!allPackages.containsAll(knownPackages)) { + Set missingPackages = new HashSet<>(knownPackages); + missingPackages.removeAll(allPackages); + assert !missingPackages.isEmpty(); + String missingPackage = missingPackages.iterator().next(); + String tail; + if (usedPackageFinder) { + tail = " not found in module"; + } else { + tail = " missing from ModulePackages class file attribute"; } - assert false; // should not get here - } - builder.contains(packages); - } + throw invalidModuleDescriptor("Package " + missingPackage + tail); - if (mainClass != null) - builder.mainClass(mainClass); - if (osValues != null) { - if (osValues[0] != null) builder.osName(osValues[0]); - if (osValues[1] != null) builder.osArch(osValues[1]); - if (osValues[2] != null) builder.osVersion(osValues[2]); + } + builder.packages(allPackages); } ModuleDescriptor descriptor = builder.build(); @@ -347,10 +338,17 @@ public final class ModuleInfo { String mn = cpool.getModuleName(module_name_index); int module_flags = in.readUnsignedShort(); - boolean open = ((module_flags & ACC_OPEN) != 0); - boolean synthetic = ((module_flags & ACC_SYNTHETIC) != 0); - Builder builder = JLMA.newModuleBuilder(mn, false, open, synthetic); + Set modifiers = new HashSet<>(); + boolean open = ((module_flags & ACC_OPEN) != 0); + if (open) + modifiers.add(ModuleDescriptor.Modifier.OPEN); + if ((module_flags & ACC_SYNTHETIC) != 0) + modifiers.add(ModuleDescriptor.Modifier.SYNTHETIC); + if ((module_flags & ACC_MANDATED) != 0) + modifiers.add(ModuleDescriptor.Modifier.MANDATED); + + Builder builder = JLMA.newModuleBuilder(mn, false, modifiers); int module_version_index = in.readUnsignedShort(); if (module_version_index != 0) { @@ -381,16 +379,11 @@ public final class ModuleInfo { } int requires_version_index = in.readUnsignedShort(); - Version compiledVersion = null; - if (requires_version_index != 0) { - String vs = cpool.getUtf8(requires_version_index); - compiledVersion = Version.parse(vs); - } - - if (compiledVersion == null) { + if (requires_version_index == 0) { builder.requires(mods, dn); } else { - builder.requires(mods, dn, compiledVersion); + String vs = cpool.getUtf8(requires_version_index); + JLMA.requires(builder, mods, dn, vs); } if (dn.equals("java.base")) @@ -629,10 +622,7 @@ public final class ModuleInfo { /** * Return true if the given attribute name is the name of a pre-defined - * attribute that is not allowed in the class file. - * - * Except for Module, InnerClasses, SourceFile, SourceDebugExtension, and - * Deprecated, none of the pre-defined attributes in JVMS 4.7 may appear. + * attribute in JVMS 4.7 that is not allowed in a module-info class. */ private static boolean isAttributeDisallowed(String name) { Set notAllowed = predefinedNotAllowed; @@ -640,6 +630,7 @@ public final class ModuleInfo { notAllowed = Set.of( "ConstantValue", "Code", + "Deprecated", "StackMapTable", "Exceptions", "EnclosingMethod", diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java index 0d05ad296e9..73fb660ed7f 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java @@ -56,7 +56,7 @@ public final class ModuleInfoExtender { // the packages in the ModulePackages attribute private Set packages; - // the value of the module_version in Module attribute + // the value for the module version in the Module attribute private Version version; // the value of the ModuleMainClass attribute @@ -78,7 +78,11 @@ public final class ModuleInfoExtender { } /** - * Sets the set of packages for the ModulePackages attribute + * Sets the packages for the ModulePackages attribute + * + * @apiNote This method does not check that the package names are legal + * package names or that the set of packages is a super set of the + * packages in the module. */ public ModuleInfoExtender packages(Set packages) { this.packages = Collections.unmodifiableSet(packages); @@ -86,7 +90,7 @@ public final class ModuleInfoExtender { } /** - * Sets the value of the module_version in Module attribute. + * Sets the value for the module version in the Module attribute */ public ModuleInfoExtender version(Version version) { this.version = version; @@ -95,6 +99,9 @@ public final class ModuleInfoExtender { /** * Sets the value of the ModuleMainClass attribute. + * + * @apiNote This method does not check that the main class is a legal + * class name in a named package. */ public ModuleInfoExtender mainClass(String mainClass) { this.mainClass = mainClass; @@ -133,7 +140,7 @@ public final class ModuleInfoExtender { /** * A ClassVisitor that supports adding class file attributes. If an - * attribute already exists then the first occurence of the attribute + * attribute already exists then the first occurrence of the attribute * is replaced. */ private static class AttributeAddingClassVisitor extends ClassVisitor { diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java index 9c3308f97a0..15e60d0d611 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,13 +41,6 @@ import jdk.internal.loader.ClassLoaders; * are generated at build time. */ final class ModuleLoaderMap { - /* - * The list of boot modules and platform modules are generated at build time. - */ - private static final String[] BOOT_MODULES - = new String[] { "@@BOOT_MODULE_NAMES@@" }; - private static final String[] PLATFORM_MODULES - = new String[] { "@@PLATFORM_MODULE_NAMES@@" }; /** * Returns the function to map modules in the given configuration to the @@ -55,6 +48,10 @@ final class ModuleLoaderMap { */ static Function mappingFunction(Configuration cf) { + // The list of boot modules and platform modules are generated at build time. + final String[] BOOT_MODULES = new String[] { "@@BOOT_MODULE_NAMES@@" }; + final String[] PLATFORM_MODULES = new String[] { "@@PLATFORM_MODULE_NAMES@@" }; + Set bootModules = new HashSet<>(BOOT_MODULES.length); for (String mn : BOOT_MODULES) { bootModules.add(mn); diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ModulePatcher.java b/jdk/src/java.base/share/classes/jdk/internal/module/ModulePatcher.java index 5bd7ef5ed04..fe3f8930ad2 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ModulePatcher.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModulePatcher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.UncheckedIOException; import java.lang.module.ModuleDescriptor; +import java.lang.module.ModuleDescriptor.Builder; import java.lang.module.ModuleReader; import java.lang.module.ModuleReference; import java.net.MalformedURLException; @@ -54,6 +55,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import jdk.internal.loader.Resource; +import jdk.internal.loader.ResourceHelper; import jdk.internal.misc.JavaLangModuleAccess; import jdk.internal.misc.SharedSecrets; import sun.net.www.ParseUtil; @@ -108,8 +110,11 @@ public final class ModulePatcher { if (paths == null) return mref; - // scan the JAR file or directory tree to get the set of packages + // Scan the JAR file or directory tree to get the set of packages. + // For automatic modules then packages that do not contain class files + // must be ignored. Set packages = new HashSet<>(); + boolean isAutomatic = descriptor.isAutomatic(); try { for (Path file : paths) { if (Files.isRegularFile(file)) { @@ -118,8 +123,10 @@ public final class ModulePatcher { // is not supported by the boot class loader try (JarFile jf = new JarFile(file.toFile())) { jf.stream() + .filter(e -> !e.isDirectory() + && (!isAutomatic || e.getName().endsWith(".class"))) .map(e -> toPackageName(file, e)) - .filter(Checks::isJavaIdentifier) + .filter(Checks::isPackageName) .forEach(packages::add); } @@ -129,8 +136,10 @@ public final class ModulePatcher { Path top = file; Files.find(top, Integer.MAX_VALUE, ((path, attrs) -> attrs.isRegularFile())) + .filter(path -> !isAutomatic + || path.toString().endsWith(".class")) .map(path -> toPackageName(top, path)) - .filter(Checks::isJavaIdentifier) + .filter(Checks::isPackageName) .forEach(packages::add); } @@ -141,10 +150,30 @@ public final class ModulePatcher { } // if there are new packages then we need a new ModuleDescriptor - Set original = descriptor.packages(); - packages.addAll(original); - if (packages.size() > original.size()) { - descriptor = JLMA.newModuleDescriptor(descriptor, packages); + packages.removeAll(descriptor.packages()); + if (!packages.isEmpty()) { + Builder builder = JLMA.newModuleBuilder(descriptor.name(), + /*strict*/ false, + descriptor.modifiers()); + if (!descriptor.isAutomatic()) { + descriptor.requires().forEach(builder::requires); + descriptor.exports().forEach(builder::exports); + descriptor.opens().forEach(builder::opens); + descriptor.uses().forEach(builder::uses); + } + descriptor.provides().forEach(builder::provides); + + descriptor.version().ifPresent(builder::version); + descriptor.mainClass().ifPresent(builder::mainClass); + descriptor.osName().ifPresent(builder::osName); + descriptor.osArch().ifPresent(builder::osArch); + descriptor.osVersion().ifPresent(builder::osVersion); + + // original + new packages + builder.packages(descriptor.packages()); + builder.packages(packages); + + descriptor = builder.build(); } // return a module reference to the patched module @@ -471,23 +500,14 @@ public final class ModulePatcher { @Override public Resource find(String name) throws IOException { - Path file = Paths.get(name.replace('/', File.separatorChar)); - if (file.getRoot() == null) { - file = dir.resolve(file); - } else { - // drop the root component so that the resource is - // located relative to the module directory - int n = file.getNameCount(); - if (n == 0) - return null; - file = dir.resolve(file.subpath(0, n)); - } - - if (Files.isRegularFile(file)) { - return newResource(name, dir, file); - } else { - return null; + Path path = ResourceHelper.toFilePath(name); + if (path != null) { + Path file = dir.resolve(path); + if (Files.isRegularFile(file)) { + return newResource(name, dir, file); + } } + return null; } private Resource newResource(String name, Path top, Path file) { diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ModulePath.java b/jdk/src/java.base/share/classes/jdk/internal/module/ModulePath.java index fb7871d3c31..ae337423965 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ModulePath.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModulePath.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,7 +35,6 @@ import java.io.UncheckedIOException; import java.lang.module.FindException; import java.lang.module.InvalidModuleDescriptorException; import java.lang.module.ModuleDescriptor; -import java.lang.module.ModuleDescriptor.Requires; import java.lang.module.ModuleFinder; import java.lang.module.ModuleReference; import java.net.URI; @@ -70,12 +69,11 @@ import jdk.internal.util.jar.VersionedStream; /** * A {@code ModuleFinder} that locates modules on the file system by searching - * a sequence of directories or packaged modules. - * - * The {@code ModuleFinder} can be created to work in either the run-time - * or link-time phases. In both cases it locates modular JAR and exploded - * modules. When created for link-time then it additionally locates - * modules in JMOD files. + * a sequence of directories or packaged modules. The ModuleFinder can be + * created to work in either the run-time or link-time phases. In both cases it + * locates modular JAR and exploded modules. When created for link-time then it + * additionally locates modules in JMOD files. The ModuleFinder can also + * optionally patch any modules that it locates with a ModulePatcher. */ public class ModulePath implements ModuleFinder { @@ -87,6 +85,9 @@ public class ModulePath implements ModuleFinder { // true for the link phase (supports modules packaged in JMOD format) private final boolean isLinkPhase; + // for patching modules, can be null + private final ModulePatcher patcher; + // the entries on this module path private final Path[] entries; private int next; @@ -94,19 +95,51 @@ public class ModulePath implements ModuleFinder { // map of module name to module reference map for modules already located private final Map cachedModules = new HashMap<>(); - public ModulePath(Runtime.Version version, boolean isLinkPhase, Path... entries) { + + private ModulePath(Runtime.Version version, + boolean isLinkPhase, + ModulePatcher patcher, + Path... entries) { this.releaseVersion = version; this.isLinkPhase = isLinkPhase; + this.patcher = patcher; this.entries = entries.clone(); for (Path entry : this.entries) { Objects.requireNonNull(entry); } } - public ModulePath(Path... entries) { - this(JarFile.runtimeVersion(), false, entries); + /** + * Returns a ModuleFinder that that locates modules on the file system by + * searching a sequence of directories and/or packaged modules. The modules + * may be patched by the given ModulePatcher. + */ + public static ModuleFinder of(ModulePatcher patcher, Path... entries) { + return new ModulePath(JarFile.runtimeVersion(), false, patcher, entries); } + /** + * Returns a ModuleFinder that that locates modules on the file system by + * searching a sequence of directories and/or packaged modules. + */ + public static ModuleFinder of(Path... entries) { + return of((ModulePatcher)null, entries); + } + + /** + * Returns a ModuleFinder that that locates modules on the file system by + * searching a sequence of directories and/or packaged modules. + * + * @param version The release version to use for multi-release JAR files + * @param isLinkPhase {@code true} if the link phase to locate JMOD files + */ + public static ModuleFinder of(Runtime.Version version, + boolean isLinkPhase, + Path... entries) { + return new ModulePath(version, isLinkPhase, null, entries); + } + + @Override public Optional find(String name) { Objects.requireNonNull(name); @@ -195,8 +228,7 @@ public class ModulePath implements ModuleFinder { if (attrs.isDirectory()) { Path mi = entry.resolve(MODULE_INFO); if (!Files.exists(mi)) { - // does not exist or unable to determine so assume a - // directory of modules + // assume a directory of modules return scanDirectory(entry); } } @@ -206,11 +238,17 @@ public class ModulePath implements ModuleFinder { if (mref != null) { String name = mref.descriptor().name(); return Collections.singletonMap(name, mref); - } else { - // skipped - return Collections.emptyMap(); } + // not recognized + String msg; + if (!isLinkPhase && entry.toString().endsWith(".jmod")) { + msg = "JMOD format not supported at execution time"; + } else { + msg = "Module format not recognized"; + } + throw new FindException(msg + ": " + entry); + } catch (IOException ioe) { throw new FindException(ioe); } @@ -266,14 +304,11 @@ public class ModulePath implements ModuleFinder { /** - * Locates a packaged or exploded module, returning a {@code ModuleReference} - * to the module. Returns {@code null} if the entry is skipped because it is - * to a directory that does not contain a module-info.class or it's a hidden - * file. + * Reads a packaged or exploded module, returning a {@code ModuleReference} + * to the module. Returns {@code null} if the entry is not recognized. * * @throws IOException if an I/O error occurs - * @throws FindException if the file is not recognized as a module or an - * error occurs parsing its module descriptor + * @throws FindException if an error occurs parsing its module descriptor */ private ModuleReference readModule(Path entry, BasicFileAttributes attrs) throws IOException @@ -282,24 +317,16 @@ public class ModulePath implements ModuleFinder { if (attrs.isDirectory()) { return readExplodedModule(entry); // may return null - } - - String fn = entry.getFileName().toString(); - if (attrs.isRegularFile()) { - if (fn.endsWith(".jar")) { - return readJar(entry); - } else if (fn.endsWith(".jmod")) { - if (isLinkPhase) - return readJMod(entry); - throw new FindException("JMOD files not supported: " + entry); - } - } - - // skip hidden files - if (fn.startsWith(".") || Files.isHidden(entry)) { - return null; } else { - throw new FindException("Unrecognized module: " + entry); + String fn = entry.getFileName().toString(); + if (attrs.isRegularFile()) { + if (fn.endsWith(".jar")) { + return readJar(entry); + } else if (isLinkPhase && fn.endsWith(".jmod")) { + return readJMod(entry); + } + } + return null; } } catch (InvalidModuleDescriptorException e) { @@ -327,7 +354,7 @@ public class ModulePath implements ModuleFinder { } } - // -- jmod files -- + // -- JMOD files -- private Set jmodPackages(JmodFile jf) { return jf.stream() @@ -339,7 +366,7 @@ public class ModulePath implements ModuleFinder { } /** - * Returns a {@code ModuleReference} to a module in jmod file on the + * Returns a {@code ModuleReference} to a module in JMOD file on the * file system. * * @throws IOException @@ -362,7 +389,7 @@ public class ModulePath implements ModuleFinder { /** * Returns the service type corresponding to the name of a services - * configuration file if it is a valid Java identifier. + * configuration file if it is a legal type name. * * For example, if called with "META-INF/services/p.S" then this method * returns a container with the value "p.S". @@ -374,7 +401,7 @@ public class ModulePath implements ModuleFinder { String prefix = cf.substring(0, index); if (prefix.equals(SERVICES_PREFIX)) { String sn = cf.substring(index); - if (Checks.isJavaIdentifier(sn)) + if (Checks.isClassName(sn)) return Optional.of(sn); } } @@ -403,11 +430,10 @@ public class ModulePath implements ModuleFinder { * * 1. The module name (and optionally the version) is derived from the file * name of the JAR file - * 2. All packages are exported and open - * 3. It has no non-exported/non-open packages - * 4. The contents of any META-INF/services configuration files are mapped + * 2. All packages are derived from the .class files in the JAR file + * 3. The contents of any META-INF/services configuration files are mapped * to "provides" declarations - * 5. The Main-Class attribute in the main attributes of the JAR manifest + * 4. The Main-Class attribute in the main attributes of the JAR manifest * is mapped to the module descriptor mainClass */ private ModuleDescriptor deriveModuleDescriptor(JarFile jf) @@ -443,9 +469,7 @@ public class ModulePath implements ModuleFinder { mn = cleanModuleName(mn); // Builder throws IAE if module name is empty or invalid - ModuleDescriptor.Builder builder - = ModuleDescriptor.automaticModule(mn) - .requires(Set.of(Requires.Modifier.MANDATED), "java.base"); + ModuleDescriptor.Builder builder = ModuleDescriptor.newAutomaticModule(mn); if (vs != null) builder.version(vs); @@ -453,17 +477,22 @@ public class ModulePath implements ModuleFinder { Map> map = VersionedStream.stream(jf) .filter(e -> !e.isDirectory()) .map(JarEntry::getName) + .filter(e -> (e.endsWith(".class") ^ e.startsWith(SERVICES_PREFIX))) .collect(Collectors.partitioningBy(e -> e.startsWith(SERVICES_PREFIX), Collectors.toSet())); - Set resources = map.get(Boolean.FALSE); + Set classFiles = map.get(Boolean.FALSE); Set configFiles = map.get(Boolean.TRUE); - // all packages are exported and open - resources.stream() + + // the packages containing class files + Set packages = classFiles.stream() .map(this::toPackageName) .flatMap(Optional::stream) .distinct() - .forEach(pn -> builder.exports(pn).opens(pn)); + .collect(Collectors.toSet()); + + // all packages are exported and open + builder.packages(packages); // map names of service configuration files to service names Set serviceNames = configFiles.stream() @@ -481,6 +510,11 @@ public class ModulePath implements ModuleFinder { String cn; while ((cn = nextLine(reader)) != null) { if (cn.length() > 0) { + String pn = packageName(cn); + if (!packages.contains(pn)) { + String msg = "Provider class " + cn + " not in module"; + throw new IOException(msg); + } providerClasses.add(cn); } } @@ -494,8 +528,15 @@ public class ModulePath implements ModuleFinder { if (man != null) { Attributes attrs = man.getMainAttributes(); String mainClass = attrs.getValue(Attributes.Name.MAIN_CLASS); - if (mainClass != null) - builder.mainClass(mainClass.replace("/", ".")); + if (mainClass != null) { + mainClass = mainClass.replace("/", "."); + String pn = packageName(mainClass); + if (!packages.contains(pn)) { + String msg = "Main-Class " + mainClass + " not in module"; + throw new IOException(msg); + } + builder.mainClass(mainClass); + } } return builder.build(); @@ -569,10 +610,10 @@ public class ModulePath implements ModuleFinder { try { ModuleDescriptor md = deriveModuleDescriptor(jf); attrs = new ModuleInfo.Attributes(md, null, null); - } catch (IllegalArgumentException iae) { + } catch (IllegalArgumentException e) { throw new FindException( "Unable to derive module descriptor for: " - + jf.getName(), iae); + + jf.getName(), e); } } else { @@ -580,7 +621,7 @@ public class ModulePath implements ModuleFinder { () -> jarPackages(jf)); } - return ModuleReferences.newJarModule(attrs, file); + return ModuleReferences.newJarModule(attrs, patcher, file); } } @@ -617,7 +658,15 @@ public class ModulePath implements ModuleFinder { // for now return null; } - return ModuleReferences.newExplodedModule(attrs, dir); + return ModuleReferences.newExplodedModule(attrs, patcher, dir); + } + + /** + * Maps a type name to its package name. + */ + private static String packageName(String cn) { + int index = cn.lastIndexOf('.'); + return (index == -1) ? "" : cn.substring(0, index); } /** @@ -629,19 +678,18 @@ public class ModulePath implements ModuleFinder { */ private Optional toPackageName(String name) { assert !name.endsWith("/"); - int index = name.lastIndexOf("/"); if (index == -1) { if (name.endsWith(".class") && !name.equals(MODULE_INFO)) { throw new IllegalArgumentException(name - + " found in top-level directory:" + + " found in top-level directory" + " (unnamed package not allowed in module)"); } return Optional.empty(); } String pn = name.substring(0, index).replace('/', '.'); - if (Checks.isJavaIdentifier(pn)) { + if (Checks.isPackageName(pn)) { return Optional.of(pn); } else { // not a valid package name @@ -654,7 +702,7 @@ public class ModulePath implements ModuleFinder { * name. * * @throws IllegalArgumentException if the name is a class file in - * the top-level directory (and it's not module-info.class) + * the top-level directory (and it's not module-info.class) */ private Optional toPackageName(Path file) { assert file.getRoot() == null; @@ -664,14 +712,14 @@ public class ModulePath implements ModuleFinder { String name = file.toString(); if (name.endsWith(".class") && !name.equals(MODULE_INFO)) { throw new IllegalArgumentException(name - + " found in in top-level directory" + + " found in top-level directory" + " (unnamed package not allowed in module)"); } return Optional.empty(); } String pn = parent.toString().replace(File.separatorChar, '.'); - if (Checks.isJavaIdentifier(pn)) { + if (Checks.isPackageName(pn)) { return Optional.of(pn); } else { // not a valid package name diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferenceImpl.java b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferenceImpl.java index 2ab42bdb4a2..f861b294aef 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferenceImpl.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferenceImpl.java @@ -163,7 +163,14 @@ public class ModuleReferenceImpl extends ModuleReference { @Override public String toString() { - return super.toString(); + StringBuilder sb = new StringBuilder(); + sb.append("[module "); + sb.append(descriptor().name()); + sb.append(", location="); + sb.append(location().orElseThrow(() -> new InternalError())); + if (isPatched()) sb.append(" (patched)"); + sb.append("]"); + return sb.toString(); } } diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java index a2aff8f76be..2e2af727599 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java @@ -36,7 +36,6 @@ import java.net.URI; import java.nio.ByteBuffer; import java.nio.file.Files; import java.nio.file.Path; -import java.nio.file.Paths; import java.util.List; import java.util.Objects; import java.util.Optional; @@ -51,7 +50,7 @@ import java.util.stream.Stream; import java.util.zip.ZipFile; import jdk.internal.jmod.JmodFile; -import jdk.internal.misc.JavaLangAccess; +import jdk.internal.loader.ResourceHelper; import jdk.internal.misc.SharedSecrets; import jdk.internal.module.ModuleHashes.HashSupplier; import jdk.internal.util.jar.VersionedStream; @@ -65,20 +64,16 @@ import sun.net.www.ParseUtil; */ class ModuleReferences { - - private static final JavaLangAccess JLA = SharedSecrets.getJavaLangAccess(); - private ModuleReferences() { } /** - * Creates a ModuleReference to a module or to patched module when - * creating modules for the boot Layer and --patch-module is specified. + * Creates a ModuleReference to a possibly-patched module */ private static ModuleReference newModule(ModuleInfo.Attributes attrs, URI uri, Supplier supplier, + ModulePatcher patcher, HashSupplier hasher) { - ModuleReference mref = new ModuleReferenceImpl(attrs.descriptor(), uri, supplier, @@ -86,38 +81,42 @@ class ModuleReferences { attrs.recordedHashes(), hasher, attrs.moduleResolution()); - if (JLA.getBootLayer() == null) - mref = ModuleBootstrap.patcher().patchIfNeeded(mref); + if (patcher != null) + mref = patcher.patchIfNeeded(mref); return mref; } /** - * Creates a ModuleReference to a module packaged as a modular JAR. + * Creates a ModuleReference to a possibly-patched module in a modular JAR. */ - static ModuleReference newJarModule(ModuleInfo.Attributes attrs, Path file) { + static ModuleReference newJarModule(ModuleInfo.Attributes attrs, + ModulePatcher patcher, + Path file) { URI uri = file.toUri(); Supplier supplier = () -> new JarModuleReader(file, uri); HashSupplier hasher = (a) -> ModuleHashes.computeHash(file, a); - return newModule(attrs, uri, supplier, hasher); + return newModule(attrs, uri, supplier, patcher, hasher); } /** - * Creates a ModuleReference to a module packaged as a JMOD. + * Creates a ModuleReference to a module in a JMOD file. */ static ModuleReference newJModModule(ModuleInfo.Attributes attrs, Path file) { URI uri = file.toUri(); Supplier supplier = () -> new JModModuleReader(file, uri); HashSupplier hasher = (a) -> ModuleHashes.computeHash(file, a); - return newModule(attrs, uri, supplier, hasher); + return newModule(attrs, uri, supplier, null, hasher); } /** - * Creates a ModuleReference to an exploded module. + * Creates a ModuleReference to a possibly-patched exploded module. */ - static ModuleReference newExplodedModule(ModuleInfo.Attributes attrs, Path dir) { + static ModuleReference newExplodedModule(ModuleInfo.Attributes attrs, + ModulePatcher patcher, + Path dir) { Supplier supplier = () -> new ExplodedModuleReader(dir); - return newModule(attrs, dir.toUri(), supplier, null); + return newModule(attrs, dir.toUri(), supplier, patcher, null); } @@ -243,7 +242,8 @@ class ModuleReferences { } private JarEntry getEntry(String name) { - return jf.getJarEntry(Objects.requireNonNull(name)); + JarEntry entry = jf.getJarEntry(Objects.requireNonNull(name)); + return (entry == null || entry.isDirectory()) ? null : entry; } @Override @@ -369,21 +369,6 @@ class ModuleReferences { } } - /** - * Returns a Path to access to the given resource. - */ - private Path toPath(String name) { - Path path = Paths.get(name.replace('/', File.separatorChar)); - if (path.getRoot() == null) { - return dir.resolve(path); - } else { - // drop the root component so that the resource is - // located relative to the module directory - int n = path.getNameCount(); - return (n > 0) ? dir.resolve(path.subpath(0, n)) : null; - } - } - /** * Throws IOException if the module reader is closed; */ @@ -391,11 +376,27 @@ class ModuleReferences { if (closed) throw new IOException("ModuleReader is closed"); } + /** + * Returns a Path to access the given resource. Returns null if the + * resource name does not convert to a file path that locates a regular + * file in the module. + */ + private Path toFilePath(String name) { + Path path = ResourceHelper.toFilePath(name); + if (path != null) { + Path file = dir.resolve(path); + if (Files.isRegularFile(file)) { + return file; + } + } + return null; + } + @Override public Optional find(String name) throws IOException { ensureOpen(); - Path path = toPath(name); - if (path != null && Files.isRegularFile(path)) { + Path path = toFilePath(name); + if (path != null) { try { return Optional.of(path.toUri()); } catch (IOError e) { @@ -409,8 +410,8 @@ class ModuleReferences { @Override public Optional open(String name) throws IOException { ensureOpen(); - Path path = toPath(name); - if (path != null && Files.isRegularFile(path)) { + Path path = toFilePath(name); + if (path != null) { return Optional.of(Files.newInputStream(path)); } else { return Optional.empty(); @@ -420,8 +421,8 @@ class ModuleReferences { @Override public Optional read(String name) throws IOException { ensureOpen(); - Path path = toPath(name); - if (path != null && Files.isRegularFile(path)) { + Path path = toFilePath(name); + if (path != null) { return Optional.of(ByteBuffer.wrap(Files.readAllBytes(path))); } else { return Optional.empty(); diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/Modules.java b/jdk/src/java.base/share/classes/jdk/internal/module/Modules.java index 9f68cfbc421..485d2e130b5 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/Modules.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/Modules.java @@ -82,8 +82,8 @@ public class Modules { String name, Set packages) { - ModuleDescriptor descriptor = ModuleDescriptor.module(name) - .contains(packages) + ModuleDescriptor descriptor = ModuleDescriptor.newModule(name) + .packages(packages) .build(); return JLRMA.defineModule(loader, descriptor, null); @@ -185,7 +185,8 @@ public class Modules { /** * Adds a package to a module's content. * - * This method is a no-op if the module already contains the package. + * This method is a no-op if the module already contains the package or the + * module is an unnamed module. */ public static void addPackage(Module m, String pn) { JLRMA.addPackage(m, pn); diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/SystemModuleFinder.java b/jdk/src/java.base/share/classes/jdk/internal/module/SystemModuleFinder.java index 5ec0a62ca69..a7ee7ffe74f 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/SystemModuleFinder.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/SystemModuleFinder.java @@ -80,8 +80,6 @@ public class SystemModuleFinder implements ModuleFinder { = PerfCounter.newPerfCounter("jdk.module.finder.jimage.packages"); private static final PerfCounter exportsCount = PerfCounter.newPerfCounter("jdk.module.finder.jimage.exports"); - // ImageReader used to access all modules in the image - private static final ImageReader imageReader; // singleton finder to find modules in the run-time images private static final SystemModuleFinder INSTANCE; @@ -96,13 +94,28 @@ public class SystemModuleFinder implements ModuleFinder { */ static { long t0 = System.nanoTime(); - imageReader = ImageReaderFactory.getImageReader(); INSTANCE = new SystemModuleFinder(); initTime.addElapsedTimeFrom(t0); } + /** + * Holder class for the ImageReader + */ + private static class SystemImage { + static final ImageReader READER; + static { + long t0 = System.nanoTime(); + READER = ImageReaderFactory.getImageReader(); + initTime.addElapsedTimeFrom(t0); + } + + static ImageReader reader() { + return READER; + } + } + private static boolean isFastPathSupported() { return SystemModules.MODULE_NAMES.length > 0; } @@ -114,7 +127,7 @@ public class SystemModuleFinder implements ModuleFinder { // this happens when java.base is patched with java.base // from an exploded image - return imageReader.getModuleNames(); + return SystemImage.reader().getModuleNames(); } // the set of modules in the run-time image @@ -151,6 +164,7 @@ public class SystemModuleFinder implements ModuleFinder { descriptors = new ModuleDescriptor[n]; recordedHashes = new ModuleHashes[n]; moduleResolutions = new ModuleResolution[n]; + ImageReader imageReader = SystemImage.reader(); for (int i = 0; i < names.length; i++) { String mn = names[i]; ImageLocation loc = imageReader.findLocation(mn, "module-info.class"); @@ -291,6 +305,7 @@ public class SystemModuleFinder implements ModuleFinder { Objects.requireNonNull(name); if (closed) throw new IOException("ModuleReader is closed"); + ImageReader imageReader = SystemImage.reader(); if (imageReader != null) { return imageReader.findLocation(module, name); } else { @@ -330,7 +345,7 @@ public class SystemModuleFinder implements ModuleFinder { public Optional read(String name) throws IOException { ImageLocation location = findImageLocation(name); if (location != null) { - return Optional.of(imageReader.getResourceBuffer(location)); + return Optional.of(SystemImage.reader().getResourceBuffer(location)); } else { return Optional.empty(); } @@ -372,7 +387,7 @@ public class SystemModuleFinder implements ModuleFinder { stack = new ArrayDeque<>(); // push the root node to the stack to get started - ImageReader.Node dir = imageReader.findNode(moduleRoot); + ImageReader.Node dir = SystemImage.reader().findNode(moduleRoot); if (dir == null || !dir.isDirectory()) throw new IOException(moduleRoot + " not a directory"); stack.push(dir); @@ -390,7 +405,7 @@ public class SystemModuleFinder implements ModuleFinder { String name = node.getName(); if (node.isDirectory()) { // build node - ImageReader.Node dir = imageReader.findNode(name); + ImageReader.Node dir = SystemImage.reader().findNode(name); assert dir.isDirectory(); stack.push(dir); } else { diff --git a/jdk/src/java.base/share/classes/jdk/internal/reflect/Reflection.java b/jdk/src/java.base/share/classes/jdk/internal/reflect/Reflection.java index 9a410049188..61969590d92 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/reflect/Reflection.java +++ b/jdk/src/java.base/share/classes/jdk/internal/reflect/Reflection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -211,15 +211,7 @@ public class Reflection { if (currentModule == memberModule) return true; // same module (named or unnamed) - // memberClass may be primitive or array class - Class c = memberClass; - while (c.isArray()) { - c = c.getComponentType(); - } - if (c.isPrimitive()) - return true; - - String pkg = c.getPackageName(); + String pkg = memberClass.getPackageName(); boolean allowed = memberModule.isExported(pkg, currentModule); if (allowed && memberModule.isNamed() && printStackTraceWhenAccessSucceeds()) { if (!SharedSecrets.getJavaLangReflectModuleAccess() @@ -237,10 +229,6 @@ public class Reflection { private static boolean isSameClassPackage(Class c1, Class c2) { if (c1.getClassLoader() != c2.getClassLoader()) return false; - while (c1.isArray()) - c1 = c1.getComponentType(); - while (c2.isArray()) - c2 = c2.getComponentType(); return Objects.equals(c1.getPackageName(), c2.getPackageName()); } @@ -378,12 +366,6 @@ public class Reflection { } } - public static void enableStackTraces() { - printStackWhenAccessFails = true; - printStackWhenAccessSucceeds = true; - printStackPropertiesSet = true; - } - public static boolean printStackTraceWhenAccessFails() { ensurePrintStackPropertiesSet(); return printStackWhenAccessFails; @@ -413,11 +395,7 @@ public class Reflection { if (m2.isNamed()) memberSuffix = " (in " + m2 + ")"; - Class c = memberClass; - while (c.isArray()) { - c = c.getComponentType(); - } - String memberPackageName = c.getPackageName(); + String memberPackageName = memberClass.getPackageName(); String msg = currentClass + currentSuffix + " cannot access "; if (m2.isExported(memberPackageName, m1)) { diff --git a/jdk/src/java.base/share/classes/sun/invoke/util/VerifyAccess.java b/jdk/src/java.base/share/classes/sun/invoke/util/VerifyAccess.java index 9c46aad018f..c3633ff8aab 100644 --- a/jdk/src/java.base/share/classes/sun/invoke/util/VerifyAccess.java +++ b/jdk/src/java.base/share/classes/sun/invoke/util/VerifyAccess.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,6 +39,7 @@ public class VerifyAccess { private VerifyAccess() { } // cannot instantiate + private static final int UNCONDITIONAL_ALLOWED = java.lang.invoke.MethodHandles.Lookup.UNCONDITIONAL; private static final int MODULE_ALLOWED = java.lang.invoke.MethodHandles.Lookup.MODULE; private static final int PACKAGE_ONLY = 0; private static final int PACKAGE_ALLOWED = java.lang.invoke.MethodHandles.Lookup.PACKAGE; @@ -92,7 +93,7 @@ public class VerifyAccess { int allowedModes) { if (allowedModes == 0) return false; assert((allowedModes & PUBLIC) != 0 && - (allowedModes & ~(ALL_ACCESS_MODES|PACKAGE_ALLOWED|MODULE_ALLOWED)) == 0); + (allowedModes & ~(ALL_ACCESS_MODES|PACKAGE_ALLOWED|MODULE_ALLOWED|UNCONDITIONAL_ALLOWED)) == 0); // The symbolic reference class (refc) must always be fully verified. if (!isClassAccessible(refc, lookupClass, allowedModes)) { return false; @@ -173,7 +174,7 @@ public class VerifyAccess { int allowedModes) { if (allowedModes == 0) return false; assert((allowedModes & PUBLIC) != 0 && - (allowedModes & ~(ALL_ACCESS_MODES|PACKAGE_ALLOWED|MODULE_ALLOWED)) == 0); + (allowedModes & ~(ALL_ACCESS_MODES|PACKAGE_ALLOWED|MODULE_ALLOWED|UNCONDITIONAL_ALLOWED)) == 0); int mods = getClassModifiers(refc); if (isPublic(mods)) { @@ -191,22 +192,17 @@ public class VerifyAccess { (lookupModule == refModule)) return true; - // check readability - if (lookupModule.canRead(refModule)) { + // check readability when UNCONDITIONAL not allowed + if (((allowedModes & UNCONDITIONAL_ALLOWED) != 0) + || lookupModule.canRead(refModule)) { // check that refc is in an exported package - Class c = refc; - while (c.isArray()) { - c = c.getComponentType(); - } - if (c.isPrimitive()) - return true; if ((allowedModes & MODULE_ALLOWED) != 0) { - if (refModule.isExported(c.getPackageName(), lookupModule)) + if (refModule.isExported(refc.getPackageName(), lookupModule)) return true; } else { // exported unconditionally - if (refModule.isExported(c.getPackageName())) + if (refModule.isExported(refc.getPackageName())) return true; } diff --git a/jdk/src/java.base/share/classes/sun/launcher/LauncherHelper.java b/jdk/src/java.base/share/classes/sun/launcher/LauncherHelper.java index ee8f311d2e4..9e60d9e9081 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/LauncherHelper.java +++ b/jdk/src/java.base/share/classes/sun/launcher/LauncherHelper.java @@ -966,6 +966,10 @@ public final class LauncherHelper { ostream.print("open "); if (md.isAutomatic()) ostream.print("automatic "); + if (md.modifiers().contains(ModuleDescriptor.Modifier.SYNTHETIC)) + ostream.print("synthetic "); + if (md.modifiers().contains(ModuleDescriptor.Modifier.MANDATED)) + ostream.print("mandated "); ostream.println("module " + midAndLocation(md, mref.location())); // unqualified exports (sorted by package) diff --git a/jdk/src/java.base/share/classes/sun/net/www/protocol/jrt/JavaRuntimeURLConnection.java b/jdk/src/java.base/share/classes/sun/net/www/protocol/jrt/JavaRuntimeURLConnection.java index 88e6f5b7caa..893bb55c10a 100644 --- a/jdk/src/java.base/share/classes/sun/net/www/protocol/jrt/JavaRuntimeURLConnection.java +++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/jrt/JavaRuntimeURLConnection.java @@ -32,7 +32,9 @@ import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; +import java.security.AccessController; import java.security.Permission; +import java.security.PrivilegedAction; import jdk.internal.jimage.ImageLocation; import jdk.internal.jimage.ImageReader; @@ -51,7 +53,11 @@ import sun.security.action.GetPropertyAction; public class JavaRuntimeURLConnection extends URLConnection { // ImageReader to access resources in jimage - private static final ImageReader reader = ImageReaderFactory.getImageReader(); + private static final ImageReader reader; + static { + PrivilegedAction pa = ImageReaderFactory::getImageReader; + reader = AccessController.doPrivileged(pa); + } // the module and resource name in the URL private final String module; diff --git a/jdk/src/java.instrument/share/classes/java/lang/instrument/ClassFileTransformer.java b/jdk/src/java.instrument/share/classes/java/lang/instrument/ClassFileTransformer.java index 17c5bede590..ab0d540f9c8 100644 --- a/jdk/src/java.instrument/share/classes/java/lang/instrument/ClassFileTransformer.java +++ b/jdk/src/java.instrument/share/classes/java/lang/instrument/ClassFileTransformer.java @@ -229,6 +229,7 @@ public interface ClassFileTransformer { * or {@code null} if no transform is performed * * @since 9 + * @spec JPMS */ default byte[] transform( Module module, diff --git a/jdk/src/java.instrument/share/classes/java/lang/instrument/Instrumentation.java b/jdk/src/java.instrument/share/classes/java/lang/instrument/Instrumentation.java index 97986c2e610..bc4170d3af2 100644 --- a/jdk/src/java.instrument/share/classes/java/lang/instrument/Instrumentation.java +++ b/jdk/src/java.instrument/share/classes/java/lang/instrument/Instrumentation.java @@ -714,6 +714,7 @@ public interface Instrumentation { * @throws NullPointerException if any of the arguments are {@code null} or * any of the Sets or Maps contains a {@code null} key or value * @since 9 + * @spec JPMS */ void redefineModule(Module module, Set extraReads, diff --git a/jdk/src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnector.java b/jdk/src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnector.java index 7684567c1ca..7c5cd32811f 100644 --- a/jdk/src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnector.java +++ b/jdk/src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnector.java @@ -38,6 +38,7 @@ import java.io.InvalidObjectException; import java.io.ObjectInputStream; import java.io.ObjectStreamClass; import java.io.Serializable; +import java.lang.module.ModuleDescriptor; import java.lang.ref.WeakReference; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationHandler; @@ -107,6 +108,8 @@ import sun.rmi.server.UnicastRef2; import sun.rmi.transport.LiveRef; import java.io.NotSerializableException; +import static java.lang.module.ModuleDescriptor.Modifier.SYNTHETIC; + /** *

      A connection to a remote RMI connector. Usually, such * connections are made using {@link @@ -2020,8 +2023,14 @@ public class RMIConnector implements JMXConnector, Serializable, JMXAddressable Module rmiModule = RemoteRef.class.getModule(); String pkg = packageOf(pRefClassName); - assert pkg != null && pkg.length() > 0 && !pkg.equals(packageOf(proxyRefCName)); - Module m = Modules.defineModule(cl, "jdk.remoteref", Collections.singleton(pkg)); + assert pkg != null && pkg.length() > 0 && + !pkg.equals(packageOf(proxyRefCName)); + + ModuleDescriptor descriptor = + ModuleDescriptor.newModule("jdk.remoteref", Set.of(SYNTHETIC)) + .packages(Set.of(pkg)) + .build(); + Module m = Modules.defineModule(cl, descriptor, null); // jdk.remoteref needs to read to java.base and jmxModule Modules.addReads(m, Object.class.getModule()); diff --git a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/GNUStyleOptions.java b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/GNUStyleOptions.java index 601a5371932..a95ccd8e116 100644 --- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/GNUStyleOptions.java +++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/GNUStyleOptions.java @@ -157,8 +157,7 @@ class GNUStyleOptions { for (String dir : dirs) { paths[i++] = Paths.get(dir); } - jartool.moduleFinder = - new ModulePath(Runtime.version(), true, paths); + jartool.moduleFinder = ModulePath.of(Runtime.version(), true, paths); } }, new Option(false, OptionType.CREATE_UPDATE, "--do-not-resolve-by-default") { diff --git a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/Main.java b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/Main.java index 36e2ad3b78b..e0d617bd029 100644 --- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/Main.java +++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/Main.java @@ -699,7 +699,7 @@ public class Main { } String pn = toPackageName(name); // add if this is a class or resource in a package - if (Checks.isJavaIdentifier(pn)) { + if (Checks.isPackageName(pn)) { packages.add(pn); } } @@ -1995,7 +1995,7 @@ public class Main { } // get a resolved module graph Configuration config = - Configuration.empty().resolveRequires(system, finder, roots); + Configuration.empty().resolve(system, finder, roots); // filter modules resolved from the system module finder this.modules = config.modules().stream() diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java index 0eb7ade59fa..40413d491ca 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java @@ -29,6 +29,7 @@ import java.io.IOException; import java.io.PrintWriter; import java.io.UncheckedIOException; import java.lang.module.Configuration; +import java.lang.module.FindException; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; import java.lang.module.ModuleReference; @@ -232,7 +233,7 @@ public class JlinkTask { return EXIT_OK; } catch (PluginException | IllegalArgumentException | - UncheckedIOException |IOException | ResolutionException e) { + UncheckedIOException |IOException | FindException | ResolutionException e) { log.println(taskHelper.getMessage("error.prefix") + " " + e.getMessage()); if (DEBUG) { e.printStackTrace(log); @@ -370,7 +371,7 @@ public class JlinkTask { */ private ModuleFinder modulePathFinder() { Path[] entries = options.modulePath.toArray(new Path[0]); - ModuleFinder finder = new ModulePath(Runtime.version(), true, entries); + ModuleFinder finder = ModulePath.of(Runtime.version(), true, entries); if (!options.limitMods.isEmpty()) { finder = limitFinder(finder, options.limitMods, Collections.emptySet()); } @@ -388,7 +389,7 @@ public class JlinkTask { Set roots) { Path[] entries = paths.toArray(new Path[0]); - ModuleFinder finder = new ModulePath(Runtime.version(), true, entries); + ModuleFinder finder = ModulePath.of(Runtime.version(), true, entries); // if limitmods is specified then limit the universe if (!limitMods.isEmpty()) { @@ -418,9 +419,9 @@ public class JlinkTask { } Configuration cf = Configuration.empty() - .resolveRequires(finder, - ModuleFinder.of(), - roots); + .resolve(finder, + ModuleFinder.of(), + roots); // emit warning for modules that end with a digit cf.modules().stream() @@ -458,9 +459,9 @@ public class JlinkTask { // resolve all root modules Configuration cf = Configuration.empty() - .resolveRequires(finder, - ModuleFinder.of(), - roots); + .resolve(finder, + ModuleFinder.of(), + roots); // module name -> reference Map map = new HashMap<>(); diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ResourcePoolConfiguration.java b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ResourcePoolConfiguration.java index 9c81c7740c6..37d96c64413 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ResourcePoolConfiguration.java +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ResourcePoolConfiguration.java @@ -51,7 +51,7 @@ final class ResourcePoolConfiguration { ModuleDescriptor md = mod.descriptor(); // drop hashes - ModuleDescriptor.Builder builder = ModuleDescriptor.module(md.name()); + ModuleDescriptor.Builder builder = ModuleDescriptor.newModule(md.name()); md.requires().stream() .forEach(builder::requires); md.exports().stream() @@ -62,12 +62,7 @@ final class ResourcePoolConfiguration { .forEach(builder::uses); md.provides().stream() .forEach(builder::provides); - - // build the proper concealed packages - Set concealed = new HashSet<>(mod.packages()); - md.exports().stream().map(ModuleDescriptor.Exports::source).forEach(concealed::remove); - md.opens().stream().map(ModuleDescriptor.Opens::source).forEach(concealed::remove); - concealed.stream().forEach(builder::contains); + builder.packages(md.packages()); md.version().ifPresent(builder::version); md.mainClass().ifPresent(builder::mainClass); @@ -124,7 +119,7 @@ final class ResourcePoolConfiguration { } }; - return Configuration.empty().resolveRequires( + return Configuration.empty().resolve( finder, ModuleFinder.of(), nameToModRef.keySet()); } } diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java index 7c60d79657e..2f45403a27c 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java @@ -718,13 +718,13 @@ public final class TaskHelper { static Layer createPluginsLayer(List paths) { Path[] dirs = paths.toArray(new Path[0]); - ModuleFinder finder = new ModulePath(Runtime.version(), true, dirs); + ModuleFinder finder = ModulePath.of(Runtime.version(), true, dirs); Configuration bootConfiguration = Layer.boot().configuration(); try { Configuration cf = bootConfiguration - .resolveRequiresAndUses(ModuleFinder.of(), - finder, - Collections.emptySet()); + .resolveAndBind(ModuleFinder.of(), + finder, + Collections.emptySet()); ClassLoader scl = ClassLoader.getSystemClassLoader(); return Layer.boot().defineModulesWithOneLoader(cf, scl); } catch (Exception ex) { diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java index 8c3f3ea114e..14cd3f501a4 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java @@ -771,9 +771,12 @@ public final class SystemModulesPlugin implements Plugin { if (md.isOpen()) { setModuleBit("open", true); } - if (md.isSynthetic()) { + if (md.modifiers().contains(ModuleDescriptor.Modifier.SYNTHETIC)) { setModuleBit("synthetic", true); } + if (md.modifiers().contains(ModuleDescriptor.Modifier.MANDATED)) { + setModuleBit("mandated", true); + } } /* diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java b/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java index 3ed482b7d99..be88c492297 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java @@ -34,6 +34,7 @@ import java.io.OutputStream; import java.io.PrintWriter; import java.io.UncheckedIOException; import java.lang.module.Configuration; +import java.lang.module.FindException; import java.lang.module.ModuleReader; import java.lang.module.ModuleReference; import java.lang.module.ModuleFinder; @@ -851,8 +852,8 @@ public class JmodTask { // get a resolved module graph Configuration config = null; try { - config = Configuration.empty().resolveRequires(system, finder, roots); - } catch (ResolutionException e) { + config = Configuration.empty().resolve(system, finder, roots); + } catch (FindException | ResolutionException e) { throw new CommandException("err.module.resolution.fail", e.getMessage()); } @@ -1392,7 +1393,7 @@ public class JmodTask { options.legalNotices = getLastElement(opts.valuesOf(legalNotices)); if (opts.has(modulePath)) { Path[] dirs = getLastElement(opts.valuesOf(modulePath)).toArray(new Path[0]); - options.moduleFinder = new ModulePath(Runtime.version(), true, dirs); + options.moduleFinder = ModulePath.of(Runtime.version(), true, dirs); } if (opts.has(moduleVersion)) options.moduleVersion = getLastElement(opts.valuesOf(moduleVersion)); diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt index f94c56a05e4..c2105dbdbb1 100644 --- a/jdk/test/ProblemList.txt +++ b/jdk/test/ProblemList.txt @@ -296,6 +296,8 @@ java/util/BitSet/BitSetStreamTest.java 8079538 generic- sun/tools/jcmd/TestJcmdSanity.java 8031482 windows-all +sun/tools/jstat/jstatClassloadOutput1.sh 8173942 generic-all + sun/jvmstat/monitor/MonitoredVm/MonitorVmStartTerminate.java 8057732 generic-all demo/jvmti/compiledMethodLoad/CompiledMethodLoadTest.java 8151899 generic-all diff --git a/jdk/test/java/io/FilePermission/ReadFileOnPath.java b/jdk/test/java/io/FilePermission/ReadFileOnPath.java index 42ed7542030..9ce8fb9b006 100644 --- a/jdk/test/java/io/FilePermission/ReadFileOnPath.java +++ b/jdk/test/java/io/FilePermission/ReadFileOnPath.java @@ -57,7 +57,7 @@ public class ReadFileOnPath { "module-info.class", "base", "p/App.class", "p/child"); // exploded module - test("--module-path", "modules", "-m", "m/p.App", "SS+++++"); + test("--module-path", "modules", "-m", "m/p.App", "SS++++0"); // module in jar test("--module-path", "new.jar", "-m", "m/p.App", "SSSS++0"); diff --git a/jdk/test/java/lang/Class/forName/modules/TestLayer.java b/jdk/test/java/lang/Class/forName/modules/TestLayer.java index 645e04d7e9b..ff9a772ceeb 100644 --- a/jdk/test/java/lang/Class/forName/modules/TestLayer.java +++ b/jdk/test/java/lang/Class/forName/modules/TestLayer.java @@ -46,9 +46,9 @@ public class TestLayer { ModuleFinder finder = ModuleFinder.of(MODS_DIR); Configuration parent = Layer.boot().configuration(); - Configuration cf = parent.resolveRequiresAndUses(ModuleFinder.of(), - finder, - modules); + Configuration cf = parent.resolveAndBind(ModuleFinder.of(), + finder, + modules); ClassLoader scl = ClassLoader.getSystemClassLoader(); Layer layer = Layer.boot().defineModulesWithManyLoaders(cf, scl); diff --git a/jdk/test/java/lang/Class/forName/modules/src/m3/p3/NoAccess.java b/jdk/test/java/lang/Class/forName/modules/src/m3/p3/NoAccess.java index 618b2fde67a..25e8779ab48 100644 --- a/jdk/test/java/lang/Class/forName/modules/src/m3/p3/NoAccess.java +++ b/jdk/test/java/lang/Class/forName/modules/src/m3/p3/NoAccess.java @@ -50,9 +50,9 @@ public class NoAccess { Layer bootLayer = Layer.boot(); Configuration parent = bootLayer.configuration(); - Configuration cf = parent.resolveRequiresAndUses(finder, - ModuleFinder.of(), - Set.of("m1", "m2")); + Configuration cf = parent.resolveAndBind(finder, + ModuleFinder.of(), + Set.of("m1", "m2")); ClassLoader scl = ClassLoader.getSystemClassLoader(); Layer layer = bootLayer.defineModulesWithManyLoaders(cf, scl); diff --git a/jdk/test/java/lang/Class/getPackageName/Basic.java b/jdk/test/java/lang/Class/getPackageName/Basic.java index e0c0bd17d3c..c079d653205 100644 --- a/jdk/test/java/lang/Class/getPackageName/Basic.java +++ b/jdk/test/java/lang/Class/getPackageName/Basic.java @@ -154,8 +154,8 @@ public class Basic { return new Object[][] { { Basic.class, TEST_PACKAGE }, - { Basic[].class, null }, - { Basic[][].class, null }, + { Basic[].class, TEST_PACKAGE }, + { Basic[][].class, TEST_PACKAGE }, { getNestedClass1(), TEST_PACKAGE }, { getNestedClass2(), TEST_PACKAGE }, @@ -174,14 +174,14 @@ public class Basic { { getAnonymousClass6(), TEST_PACKAGE }, { Object.class, "java.lang" }, - { Object[].class, null }, - { Object[][].class, null }, + { Object[].class, "java.lang" }, + { Object[][].class, "java.lang" }, - { int.class, null }, - { int[].class, null }, - { int[][].class, null }, + { int.class, "java.lang" }, + { int[].class, "java.lang" }, + { int[][].class, "java.lang" }, - { void.class, null }, + { void.class, "java.lang" }, }; } diff --git a/jdk/test/java/lang/StackWalker/CallerFromMain.java b/jdk/test/java/lang/StackWalker/CallerFromMain.java index 9bc289a7f38..0eb0b2bdc46 100644 --- a/jdk/test/java/lang/StackWalker/CallerFromMain.java +++ b/jdk/test/java/lang/StackWalker/CallerFromMain.java @@ -51,7 +51,7 @@ public class CallerFromMain { try { Class c = sw.getCallerClass(); throw new RuntimeException("UOE not thrown. Caller: " + c); - } catch (IllegalStateException e) {} + } catch (IllegalCallerException e) {} // StackWalker::getCallerClass // Runnable::run diff --git a/jdk/test/java/lang/invoke/AccessControlTest.java b/jdk/test/java/lang/invoke/AccessControlTest.java index 57cec50b2ec..616ba798ba6 100644 --- a/jdk/test/java/lang/invoke/AccessControlTest.java +++ b/jdk/test/java/lang/invoke/AccessControlTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -118,6 +118,8 @@ public class AccessControlTest { suffix = "/noaccess"; else if (lookupModes == PUBLIC) suffix = "/public"; + else if (lookupModes == (PUBLIC|UNCONDITIONAL)) + suffix = "/publicLookup"; else if (lookupModes == (PUBLIC|MODULE)) suffix = "/module"; else if (lookupModes == (PUBLIC|MODULE|PACKAGE)) @@ -140,23 +142,24 @@ public class AccessControlTest { * [A2] However, the resulting {@code Lookup} object is guaranteed * to have no more access capabilities than the original. * In particular, access capabilities can be lost as follows:

        - *
      • [A3] If the new lookup class differs from the old one, - * protected members will not be accessible by virtue of inheritance. + *
      • [A3] If the old lookup class is in a named module, and the new + * lookup class is in a different module {@code M}, then no members, not + * even public members in {@code M}'s exported packages, will be accessible. + * The exception to this is when this lookup is publicLookup, in which case + * public access is not lost. + *
      • [A4] If the old lookup class is in an unnamed module, and the new + * lookup class is a different module then module access is lost. + *
      • [A5] If the new lookup class differs from the old one then UNCONDITIONAL + * is lost. If the new lookup class is not within the same package member as the + * old one, protected members will not be accessible by virtue of inheritance. * (Protected members may continue to be accessible because of package sharing.) - *
      • [A4] If the new lookup class is in a different package - * than the old one, protected and default (package) members will not be accessible. - *
      • [A5] If the new lookup class is not within the same package member + *
      • [A6] If the new lookup class is in a different package than the old one, + * protected and default (package) members will not be accessible. + *
      • [A7] If the new lookup class is not within the same package member * as the old one, private members will not be accessible. - *
      • [A6] If the new lookup class is not accessible to the old lookup class, - * using the original access modes, + *
      • [A8] If the new lookup class is not accessible to the old lookup class, * then no members, not even public members, will be accessible. - *
      • [A7] If the new lookup class for this {@code Lookup} is in the unnamed module, - * and the new lookup class is in a named module {@code M}, then no members in - * {@code M}'s non-exported packages will be accessible. - *
      • [A8] If the lookup for this {@code Lookup} is in a named module, and the - * new lookup class is in a different module, then no members, not even - * public members in {@code M}'s exported packages, will be accessible. - * [A8] (In all other cases, public members will continue to be accessible.) + *
      • [A9] (In all other cases, public members will continue to be accessible.) *
      * Other than the above cases, the new lookup will have the same * access capabilities as the original. [A10] @@ -171,36 +174,35 @@ public class AccessControlTest { boolean sameModule = (c1.getModule() == c2.getModule()) || (!c1.getModule().isNamed() && !c2.getModule().isNamed()); boolean samePackage = (c1.getClassLoader() == c2.getClassLoader() && - packagePrefix(c1).equals(packagePrefix(c2))); + c1.getPackageName().equals(c2.getPackageName())); boolean sameTopLevel = (topLevelClass(c1) == topLevelClass(c2)); boolean sameClass = (c1 == c2); assert(samePackage || !sameTopLevel); assert(sameTopLevel || !sameClass); - boolean accessible = sameClass; // [A6] + boolean accessible = sameClass; if ((m1 & PACKAGE) != 0) accessible |= samePackage; if ((m1 & PUBLIC ) != 0) accessible |= (c2.getModifiers() & PUBLIC) != 0; if (!sameModule) { - if (c1.getModule().isNamed()) { - accessible = false; // [A8] + if (c1.getModule().isNamed() && (m1 & UNCONDITIONAL) == 0) { + accessible = false; // [A3] } else { - // Different module; loose MODULE and lower access. - changed |= (MODULE|PACKAGE|PRIVATE|PROTECTED); // [A7] + changed |= (MODULE|PACKAGE|PRIVATE|PROTECTED); // [A3] [A4] } } if (!accessible) { // Different package and no access to c2; lose all access. - changed |= (PUBLIC|MODULE|PACKAGE|PRIVATE|PROTECTED); // [A6] + changed |= (PUBLIC|MODULE|PACKAGE|PRIVATE|PROTECTED); // [A8] } if (!samePackage) { // Different package; loose PACKAGE and lower access. - changed |= (PACKAGE|PRIVATE|PROTECTED); // [A4] + changed |= (PACKAGE|PRIVATE|PROTECTED); // [A6] } if (!sameTopLevel) { - // Different top-level class. Lose PRIVATE and lower access. - changed |= (PRIVATE|PROTECTED); // [A5] + // Different top-level class. Lose PRIVATE and PROTECTED access. + changed |= (PRIVATE|PROTECTED); // [A5] [A7] } if (!sameClass) { - changed |= (PROTECTED); // [A3] + changed |= (UNCONDITIONAL); // [A5] } else { assert(changed == 0); // [A10] (no deprivation if same class) } @@ -228,11 +230,10 @@ public class AccessControlTest { Class c1 = lookupClass(); Class c2 = m.getDeclaringClass(); - // if the lookup class is in a loose module with PUBLIC access then - // public members of public types in all unnamed modules can be accessed - if (isLooseModule(c1.getModule()) + // publicLookup has access to all public types/members of types in unnamed modules + if ((lookupModes & UNCONDITIONAL) != 0 && (lookupModes & PUBLIC) != 0 - && (!c2.getModule().isNamed()) + && !c2.getModule().isNamed() && Modifier.isPublic(c2.getModifiers()) && Modifier.isPublic(m.getModifiers())) return true; @@ -261,17 +262,12 @@ public class AccessControlTest { if (load && c2.getClassLoader() != null) { if (c1.getClassLoader() == null) { // not visible - return false; - } - if (c1 == publicLookup().lookupClass()) { - // not visible as lookup class is defined by child of the boot loader return false; } } - // if the lookup class is in a loose module with PUBLIC access then - // public types in all unnamed modules can be accessed - if (isLooseModule(c1.getModule()) + // publicLookup has access to all public types/members of types in unnamed modules + if ((lookupModes & UNCONDITIONAL) != 0 && (lookupModes & PUBLIC) != 0 && (!c2.getModule().isNamed()) && Modifier.isPublic(c2.getModifiers())) @@ -295,11 +291,6 @@ public class AccessControlTest { } return r; } - - private boolean isLooseModule(Module m) { - ClassLoader cl = new ClassLoader() { }; - return m.canRead(cl.getUnnamedModule()); - } } private static Class topLevelClass(Class cls) { @@ -311,14 +302,6 @@ public class AccessControlTest { return c; } - private static String packagePrefix(Class c) { - while (c.isArray()) c = c.getComponentType(); - String s = c.getName(); - assert(s.indexOf('/') < 0); - return s.substring(0, s.lastIndexOf('.')+1); - } - - private final TreeSet CASES = new TreeSet<>(); private final TreeMap> CASE_EDGES = new TreeMap<>(); private final ArrayList LOADERS = new ArrayList<>(); diff --git a/jdk/test/java/lang/invoke/DropLookupModeTest.java b/jdk/test/java/lang/invoke/DropLookupModeTest.java index be7d0a60e54..64cb99e15e7 100644 --- a/jdk/test/java/lang/invoke/DropLookupModeTest.java +++ b/jdk/test/java/lang/invoke/DropLookupModeTest.java @@ -65,6 +65,10 @@ public class DropLookupModeTest { lookup = fullPowerLookup.dropLookupMode(PUBLIC); assertTrue(lookup.lookupClass() == lc); assertTrue(lookup.lookupModes() == 0); + + lookup = fullPowerLookup.dropLookupMode(UNCONDITIONAL); + assertTrue(lookup.lookupClass() == lc); + assertTrue(lookup.lookupModes() == (PUBLIC|MODULE|PACKAGE|PRIVATE)); } /** @@ -108,7 +112,7 @@ public class DropLookupModeTest { public void testPublicLookup() { final Lookup publicLookup = MethodHandles.publicLookup(); final Class lc = publicLookup.lookupClass(); - assertTrue(publicLookup.lookupModes() == PUBLIC); + assertTrue(publicLookup.lookupModes() == (PUBLIC|UNCONDITIONAL)); Lookup lookup = publicLookup.dropLookupMode(PRIVATE); assertTrue(lookup.lookupClass() == lc); @@ -129,6 +133,10 @@ public class DropLookupModeTest { lookup = publicLookup.dropLookupMode(PUBLIC); assertTrue(lookup.lookupClass() == lc); assertTrue(lookup.lookupModes() == 0); + + lookup = publicLookup.dropLookupMode(UNCONDITIONAL); + assertTrue(lookup.lookupClass() == lc); + assertTrue(lookup.lookupModes() == PUBLIC); } @DataProvider(name = "badInput") diff --git a/jdk/test/java/lang/invoke/MethodHandles/privateLookupIn/Driver.java b/jdk/test/java/lang/invoke/MethodHandles/privateLookupIn/Driver.java index 5abe4eb2383..810351bae3e 100644 --- a/jdk/test/java/lang/invoke/MethodHandles/privateLookupIn/Driver.java +++ b/jdk/test/java/lang/invoke/MethodHandles/privateLookupIn/Driver.java @@ -23,7 +23,7 @@ /** * @test - * @build test/* m1/* m2/* m3/* + * @build test/* m1/* m2/* m3/* Unnamed * @run testng/othervm test/p.PrivateLookupInTests * @summary Unit tests for MethodHandles.privateLookupIn */ diff --git a/jdk/test/java/lang/invoke/MethodHandles/privateLookupIn/Unnamed.java b/jdk/test/java/lang/invoke/MethodHandles/privateLookupIn/Unnamed.java new file mode 100644 index 00000000000..9bb0ff042a3 --- /dev/null +++ b/jdk/test/java/lang/invoke/MethodHandles/privateLookupIn/Unnamed.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +public class Unnamed { } diff --git a/jdk/test/java/lang/invoke/MethodHandles/privateLookupIn/test/p/PrivateLookupInTests.java b/jdk/test/java/lang/invoke/MethodHandles/privateLookupIn/test/p/PrivateLookupInTests.java index 823ae8797b5..f2391743bd0 100644 --- a/jdk/test/java/lang/invoke/MethodHandles/privateLookupIn/test/p/PrivateLookupInTests.java +++ b/jdk/test/java/lang/invoke/MethodHandles/privateLookupIn/test/p/PrivateLookupInTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -126,6 +126,26 @@ public class PrivateLookupInTests { Object obj = mh.invokeExact(); } + // test target class in unnamed module + public void testTargetClassInUnnamedModule() throws Throwable { + Class clazz = Class.forName("Unnamed"); + assertFalse(clazz.getModule().isNamed()); + + // thisModule does not read the unnamed module + Module thisModule = getClass().getModule(); + assertFalse(thisModule.canRead(clazz.getModule())); + try { + MethodHandles.privateLookupIn(clazz, MethodHandles.lookup()); + assertTrue(false); + } catch (IllegalAccessException expected) { } + + // thisModule reads the unnamed module + thisModule.addReads(clazz.getModule()); + Lookup lookup = MethodHandles.privateLookupIn(clazz, MethodHandles.lookup()); + assertTrue(lookup.lookupClass() == clazz); + assertTrue(lookup.hasPrivateAccess()); + } + // test does not read m2, m2 opens p2 to test @Test(expectedExceptions = {IllegalAccessException.class}) public void testCallerDoesNotRead() throws Throwable { diff --git a/jdk/test/java/lang/invoke/modules/Driver.java b/jdk/test/java/lang/invoke/modules/Driver.java new file mode 100644 index 00000000000..5c00de3ad47 --- /dev/null +++ b/jdk/test/java/lang/invoke/modules/Driver.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @build m1/* m2/* Unnamed + * @run testng/othervm m1/p1.Main + * @summary Basic test case for module access checks and Lookup.in. + */ diff --git a/jdk/test/java/lang/invoke/modules/ModuleAccessControlTest.java b/jdk/test/java/lang/invoke/modules/ModuleAccessControlTest.java deleted file mode 100644 index 32adfd9d5e0..00000000000 --- a/jdk/test/java/lang/invoke/modules/ModuleAccessControlTest.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.Arrays; -import java.util.List; - -import static jdk.testlibrary.ProcessTools.executeTestJava; - -import org.testng.annotations.BeforeTest; -import org.testng.annotations.Test; -import static org.testng.Assert.*; - -/** - * @test - * @library /lib/testlibrary - * @modules jdk.compiler - * @build CompilerUtils jdk.testlibrary.* - * @run testng ModuleAccessControlTest - * @summary Driver for testing module access checking by MethodHandles.Lookup - */ - -public class ModuleAccessControlTest { - - private static final String TEST_SRC = System.getProperty("test.src"); - - private static final Path SRC_DIR = Paths.get(TEST_SRC, "src"); - private static final Path MODS_DIR = Paths.get("mods"); - - // the names of the modules in this test - private static List modules = Arrays.asList("m1", "m2"); - - - /** - * Compiles all modules used by the test - */ - @BeforeTest - public void compileAll() throws Exception { - for (String mn : modules) { - Path msrc = SRC_DIR.resolve(mn); - assertTrue(CompilerUtils - .compile(msrc, MODS_DIR, "--module-source-path", SRC_DIR.toString())); - } - } - - /** - * Launch the test - */ - @Test - public void runTest() throws Exception { - int exitValue = executeTestJava("--module-path", MODS_DIR.toString(), - "-m", "m1/p1.Main") - .outputTo(System.out) - .errorTo(System.out) - .getExitValue(); - - assertTrue(exitValue == 0); - } - -} diff --git a/jdk/test/java/lang/invoke/modules/Unnamed.java b/jdk/test/java/lang/invoke/modules/Unnamed.java new file mode 100644 index 00000000000..9bb0ff042a3 --- /dev/null +++ b/jdk/test/java/lang/invoke/modules/Unnamed.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +public class Unnamed { } diff --git a/jdk/test/java/lang/invoke/modules/src/m1/module-info.java b/jdk/test/java/lang/invoke/modules/m1/module-info.java similarity index 98% rename from jdk/test/java/lang/invoke/modules/src/m1/module-info.java rename to jdk/test/java/lang/invoke/modules/m1/module-info.java index 175c7727611..9c09afcf7e1 100644 --- a/jdk/test/java/lang/invoke/modules/src/m1/module-info.java +++ b/jdk/test/java/lang/invoke/modules/m1/module-info.java @@ -22,5 +22,6 @@ */ module m1 { requires m2; + requires testng; exports p1; } diff --git a/jdk/test/java/lang/invoke/modules/m1/p1/Main.java b/jdk/test/java/lang/invoke/modules/m1/p1/Main.java new file mode 100644 index 00000000000..7a10022d78f --- /dev/null +++ b/jdk/test/java/lang/invoke/modules/m1/p1/Main.java @@ -0,0 +1,367 @@ +/* + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p1; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.MethodHandles.Lookup; +import java.lang.invoke.MethodType; +import java.lang.reflect.Layer; +import java.lang.reflect.Module; + +import static java.lang.invoke.MethodHandles.Lookup.*; + +import org.testng.annotations.BeforeTest; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +/** + * Basic test case for module access checks and Lookup.in. + */ + +@Test +public class Main { + + private Class p1_Type1; // m1, exported + private Class p2_Type2; // m1, not exported + private Class q1_Type1; // m2, exported + private Class q2_Type2; // m2, not exported + private Class x500NameClass; // java.base, not exported + private Class unnamedClass; // class in unnamed module + + @BeforeTest + public void setup() throws Exception { + try { + p1_Type1 = Class.forName("p1.Type1"); + p2_Type2 = Class.forName("p2.Type2"); + q1_Type1 = Class.forName("q1.Type1"); + q2_Type2 = Class.forName("q2.Type2"); + x500NameClass = Class.forName("sun.security.x509.X500Name"); + unnamedClass = Class.forName("Unnamed"); + } catch (ClassNotFoundException e) { + throw new AssertionError(e); + } + + // check setup + Module m1 = Layer.boot().findModule("m1").orElse(null); + assertNotNull(m1); + assertTrue(p1_Type1.getModule() == m1); + assertTrue(p2_Type2.getModule() == m1); + assertTrue(m1.isExported("p1")); + assertFalse(m1.isExported("p2")); + + Module m2 = Layer.boot().findModule("m2").orElse(null); + assertNotNull(m2); + assertTrue(q1_Type1.getModule() == m2); + assertTrue(q2_Type2.getModule() == m2); + assertTrue(m2.isExported("q1")); + assertFalse(m2.isExported("q2")); + + Module unnamedModule = unnamedClass.getModule(); + assertFalse(unnamedModule.isNamed()); + + // m1 needs to read unnamed module + Main.class.getModule().addReads(unnamedModule); + } + + /** + * MethodHandles.lookup() + * + * [A0] has module access + * [A1] can access all public types in m1 + * [A2] can access public types in packages exported by modules that m1 reads + * [A3] cannot access public types in non-exported modules of modules that m1 reads + */ + public void testLookup() throws Exception { + Lookup lookup = MethodHandles.lookup(); + assertTrue((lookup.lookupModes() & MODULE) == MODULE); // [A0] + + // m1 + findConstructor(lookup, p1_Type1, void.class); // [A1] + findConstructor(lookup, p2_Type2, void.class); // [A1] + + // m2 + findConstructor(lookup, q1_Type1, void.class); // [A2] + findConstructorExpectingIAE(lookup, q2_Type2, void.class); // [A3] + + // java.base + findConstructor(lookup, Object.class, void.class); // [A2] + findConstructorExpectingIAE(lookup, x500NameClass, void.class, String.class); // [A3] + + // unnamed + findConstructor(lookup, unnamedClass, void.class); // [A3] + } + + /** + * Hop to lookup class in the same module + * + * [A0] module and public access is not lost + */ + public void testToSameModule() throws Exception { + Lookup lookup = MethodHandles.lookup().in(p2_Type2); + assertTrue(lookup.lookupModes() == (MODULE|PUBLIC)); // [A0] + + // m1 + findConstructor(lookup, p1_Type1, void.class); + findConstructor(lookup, p2_Type2, void.class); + + // m2 + findConstructor(lookup, q1_Type1, void.class); + findConstructorExpectingIAE(lookup, q2_Type2, void.class); + + // java.base + findConstructor(lookup, Object.class, void.class); + findConstructorExpectingIAE(lookup, x500NameClass, void.class, String.class); + + // unnamed + findConstructor(lookup, unnamedClass, void.class); + } + + /** + * Hop to lookup class in another named module + * + * [A0] has no access + */ + public void testFromNamedToNamedModule() throws Exception { + Lookup lookup = MethodHandles.lookup().in(q1_Type1); + assertTrue(lookup.lookupModes() == 0); // [A0] + + // m1 + findConstructorExpectingIAE(lookup, p1_Type1, void.class); + findConstructorExpectingIAE(lookup, p2_Type2, void.class); + + // m2 + findConstructorExpectingIAE(lookup, q1_Type1, void.class); + findConstructorExpectingIAE(lookup, q2_Type2, void.class); + + // java.base + findConstructorExpectingIAE(lookup, Object.class, void.class); + findConstructorExpectingIAE(lookup, x500NameClass, void.class, String.class); + + // unnamed + findConstructorExpectingIAE(lookup, unnamedClass, void.class); + } + + /** + * Hop to lookup class in an unnamed module + * + * [A0] has no access + */ + public void testFromNamedToUnnamedModule() throws Exception { + Lookup lookup = MethodHandles.lookup().in(unnamedClass); + assertTrue(lookup.lookupModes() == 0); // [A0] + + // m1 + findConstructorExpectingIAE(lookup, p1_Type1, void.class); + findConstructorExpectingIAE(lookup, p2_Type2, void.class); + + // m2 + findConstructorExpectingIAE(lookup, q1_Type1, void.class); + findConstructorExpectingIAE(lookup, q2_Type2, void.class); + + // java.base + findConstructorExpectingIAE(lookup, Object.class, void.class); + findConstructorExpectingIAE(lookup, x500NameClass, void.class, String.class); + + // unnamed + findConstructorExpectingIAE(lookup, unnamedClass, void.class); + } + + /** + * Hop from unnamed to named module. + * + * [A0] retains PUBLIC access + */ + public void testFromUnnamedToNamedModule() throws Exception { + Lookup lookup = MethodHandles.lookup(); + lookup = MethodHandles.privateLookupIn(unnamedClass, lookup).in(p1_Type1); + assertTrue(lookup.lookupModes() == PUBLIC); // A0 + + // m1 + findConstructor(lookup, p1_Type1, void.class); + findConstructorExpectingIAE(lookup, p2_Type2, void.class); + + // m2 + findConstructor(lookup, q1_Type1, void.class); + findConstructorExpectingIAE(lookup, q2_Type2, void.class); + + // java.base + findConstructor(lookup, Object.class, void.class); + findConstructorExpectingIAE(lookup, x500NameClass, void.class, String.class); + + // unnamed + findConstructor(lookup, unnamedClass, void.class); + } + + /** + * MethodHandles.publicLookup() + * + * [A0] has PUBLIC|UNCONDITIONAL access + */ + public void testPublicLookup() throws Exception { + Lookup lookup = MethodHandles.publicLookup(); + assertTrue(lookup.lookupModes() == (PUBLIC|UNCONDITIONAL)); // A0 + + // m1 + findConstructor(lookup, p1_Type1, void.class); + findConstructorExpectingIAE(lookup, p2_Type2, void.class); + + // m2 + findConstructor(lookup, q1_Type1, void.class); + findConstructorExpectingIAE(lookup, q2_Type2, void.class); + + // java.base + findConstructor(lookup, Object.class, void.class); + findConstructorExpectingIAE(lookup, x500NameClass, void.class, String.class); + + // unnamed + findConstructor(lookup, unnamedClass, void.class); + } + + /** + * Hop from publicLookup to accessible type in java.base + */ + public void testPublicLookupToBaseModule() throws Exception { + Lookup lookup = MethodHandles.publicLookup().in(String.class); + assertTrue(lookup.lookupModes() == PUBLIC); // A0 + + // m1 + findConstructorExpectingIAE(lookup, p1_Type1, void.class); + findConstructorExpectingIAE(lookup, p2_Type2, void.class); + + // m2 + findConstructorExpectingIAE(lookup, q1_Type1, void.class); + findConstructorExpectingIAE(lookup, q2_Type2, void.class); + + // java.base + findConstructor(lookup, Object.class, void.class); + findConstructorExpectingIAE(lookup, x500NameClass, void.class, String.class); + + // unnamed + findConstructorExpectingIAE(lookup, unnamedClass, void.class); + } + + + /** + * Hop from publicLookup to accessible type in named module. + * + * [A0] has PUBLIC access + */ + public void testPublicLookupToAccessibleTypeInNamedModule() throws Exception { + Lookup lookup = MethodHandles.publicLookup().in(p1_Type1); + assertTrue(lookup.lookupModes() == PUBLIC); // A0 + + // m1 + findConstructor(lookup, p1_Type1, void.class); + findConstructorExpectingIAE(lookup, p2_Type2, void.class); + + // m2 + findConstructor(lookup, q1_Type1, void.class); + findConstructorExpectingIAE(lookup, q2_Type2, void.class); + + // java.base + findConstructor(lookup, Object.class, void.class); + findConstructorExpectingIAE(lookup, x500NameClass, void.class, String.class); + + // unnamed + findConstructor(lookup, unnamedClass, void.class); + } + + /** + * Teleport from publicLookup to inaccessible type in named module. + * + * [A0] has no access + */ + public void testPublicLookupToInaccessibleTypeInNamedModule() throws Exception { + Lookup lookup = MethodHandles.publicLookup().in(p2_Type2); + assertTrue(lookup.lookupModes() == 0); // A0 + + // m1 + findConstructorExpectingIAE(lookup, p1_Type1, void.class); + findConstructorExpectingIAE(lookup, p2_Type2, void.class); + + // m2 + findConstructorExpectingIAE(lookup, q1_Type1, void.class); + findConstructorExpectingIAE(lookup, q2_Type2, void.class); + + // java.base + findConstructorExpectingIAE(lookup, Object.class, void.class); + findConstructorExpectingIAE(lookup, x500NameClass, void.class, String.class); + + // unnamed + findConstructorExpectingIAE(lookup, unnamedClass, void.class); + } + + /** + * Teleport from publicLookup to public type in unnamed module + * + * [A0] has PUBLIC access + */ + public void testPublicLookupToUnnamedModule() throws Exception { + Lookup lookup = MethodHandles.publicLookup().in(unnamedClass); + assertTrue(lookup.lookupModes() == PUBLIC); // A0 + + // m1 + findConstructor(lookup, p1_Type1, void.class); + findConstructorExpectingIAE(lookup, p2_Type2, void.class); + + // m2 + findConstructor(lookup, q1_Type1, void.class); + findConstructorExpectingIAE(lookup, q2_Type2, void.class); + + // java.base + findConstructor(lookup, Object.class, void.class); + findConstructorExpectingIAE(lookup, x500NameClass, void.class, String.class); + + // unnamed + findConstructor(lookup, unnamedClass, void.class); + } + + /** + * Invokes Lookup findConstructor with a method type constructored from the + * given return and parameter types, expecting IllegalAccessException to be + * thrown. + */ + static void findConstructorExpectingIAE(Lookup lookup, + Class clazz, + Class rtype, + Class... ptypes) throws Exception { + try { + findConstructor(lookup, clazz, rtype, ptypes); + assertTrue(false); + } catch (IllegalAccessException expected) { } + } + + /** + * Invokes Lookup findConstructor with a method type constructored from the + * given return and parameter types. + */ + static MethodHandle findConstructor(Lookup lookup, + Class clazz, + Class rtype, + Class... ptypes) throws Exception { + MethodType mt = MethodType.methodType(rtype, ptypes); + return lookup.findConstructor(clazz, mt); + } +} diff --git a/jdk/test/java/lang/invoke/modules/src/m1/p1/Type1.java b/jdk/test/java/lang/invoke/modules/m1/p1/Type1.java similarity index 100% rename from jdk/test/java/lang/invoke/modules/src/m1/p1/Type1.java rename to jdk/test/java/lang/invoke/modules/m1/p1/Type1.java diff --git a/jdk/test/java/lang/invoke/modules/src/m1/p2/Type2.java b/jdk/test/java/lang/invoke/modules/m1/p2/Type2.java similarity index 100% rename from jdk/test/java/lang/invoke/modules/src/m1/p2/Type2.java rename to jdk/test/java/lang/invoke/modules/m1/p2/Type2.java diff --git a/jdk/test/java/lang/invoke/modules/src/m2/module-info.java b/jdk/test/java/lang/invoke/modules/m2/module-info.java similarity index 100% rename from jdk/test/java/lang/invoke/modules/src/m2/module-info.java rename to jdk/test/java/lang/invoke/modules/m2/module-info.java diff --git a/jdk/test/java/lang/invoke/modules/src/m2/q1/Type1.java b/jdk/test/java/lang/invoke/modules/m2/q1/Type1.java similarity index 100% rename from jdk/test/java/lang/invoke/modules/src/m2/q1/Type1.java rename to jdk/test/java/lang/invoke/modules/m2/q1/Type1.java diff --git a/jdk/test/java/lang/invoke/modules/src/m2/q2/Type2.java b/jdk/test/java/lang/invoke/modules/m2/q2/Type2.java similarity index 100% rename from jdk/test/java/lang/invoke/modules/src/m2/q2/Type2.java rename to jdk/test/java/lang/invoke/modules/m2/q2/Type2.java diff --git a/jdk/test/java/lang/invoke/modules/src/m1/p1/Main.java b/jdk/test/java/lang/invoke/modules/src/m1/p1/Main.java deleted file mode 100644 index 3fd1a0eb43d..00000000000 --- a/jdk/test/java/lang/invoke/modules/src/m1/p1/Main.java +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package p1; - -import java.lang.invoke.MethodHandle; -import java.lang.invoke.MethodHandles; -import java.lang.invoke.MethodHandles.Lookup; -import java.lang.invoke.MethodType; - -/** - * Basic test case for module access check, supplements AccessControlTest. - * - * The tests consists of two modules: - * - * module m1 { requires m2; exports p1; } - * module m2 { exports q1; } - * - * Both modules read java.base (as every module reads java.base) - * - * module m1 has public types in packages p1 and p2, p2 is not exported. - * module m2 has public types in packages q1 and q2, q2 is not exported. - */ - -public class Main { - - static final int MODULE = Lookup.MODULE; - - // Use Class.forName to get classes for test because some - // are not accessible at compile-time - - static final Class p1_Type1; // m1, exported - static final Class p2_Type2; // m1, not exported - static final Class q1_Type1; // m2, exported, m1 reads m2 - static final Class q2_Type2; // m2, not exported, m1 reads m2 - static final Class x500NameClass; // java.base, not exported - - static { - try { - p1_Type1 = Class.forName("p1.Type1"); - p2_Type2 = Class.forName("p2.Type2"); - q1_Type1 = Class.forName("q1.Type1"); - q2_Type2 = Class.forName("q2.Type2"); - x500NameClass = Class.forName("sun.security.x509.X500Name"); - } catch (ClassNotFoundException e) { - throw new AssertionError(e); - } - } - - public static void main(String[] args) throws Exception { - Lookup lookup, lookup2; - - /** - * MethodHandles.lookup() - * has module access [A0] - * can access all public types in m1 [A1] - * can access public types in packages exported by modules that m1 reads [A2] - * cannot access public types in non-exported modules of modules that m1 reads [A3] - */ - lookup = MethodHandles.lookup(); - assertTrue((lookup.lookupModes() & MODULE) == MODULE); // [A0] - findConstructor(lookup, p1_Type1, void.class); // [A1] - findConstructor(lookup, p2_Type2, void.class); // [A1] - findConstructor(lookup, q1_Type1, void.class); // [A2] - findConstructorExpectingIAE(lookup, q2_Type2, void.class); // [A3] - findConstructor(lookup, Object.class, void.class); // [A2] - findConstructorExpectingIAE(lookup, x500NameClass, void.class, String.class); // [A3] - - /** - * Teleport from MethodHandles.lookup() to lookup class in the same module - * module access is retained [A0] - * can access all public types in m1 [A1] - * can access public types in packages exported by modules that m1 reads [A2] - * cannot access public types in non-exported modules of modules that m1 reads [A3] - */ - lookup2 = lookup.in(p2_Type2); - assertTrue((lookup2.lookupModes() & MODULE) == MODULE); // [A0] - findConstructor(lookup2, p1_Type1, void.class); // [A1] - findConstructor(lookup2, p2_Type2, void.class); // [A1] - findConstructor(lookup2, q1_Type1, void.class); // [A2] - findConstructorExpectingIAE(lookup2, q2_Type2, void.class); // [A3] - findConstructor(lookup2, Object.class, void.class); // [A2] - findConstructorExpectingIAE(lookup2, x500NameClass, void.class, String.class); // [A3] - - /** - * Teleport from MethodHandles.lookup() to lookup class in another named module - * has no access [A0] - */ - lookup2 = lookup.in(Object.class); - assertTrue(lookup2.lookupModes() == 0); // [A0] - findConstructorExpectingIAE(lookup2, Object.class, void.class); // [A0] - - /** - * Teleport from MethodHandles.lookup() to lookup class in an unnamed module - * has no access [A0] - */ - Class c = MethodHandles.publicLookup().lookupClass(); - assertTrue(!c.getModule().isNamed()); - lookup2 = lookup.in(c); - assertTrue(lookup2.lookupModes() == 0); // [A0] - findConstructorExpectingIAE(lookup2, Object.class, void.class); - - /** - * MethodHandles.publicLookup() - * has no module access [A0] - * can access public types in exported packages [A1] - * cannot access public types in non-exported packages [A2] - */ - lookup = MethodHandles.publicLookup(); - assertTrue((lookup.lookupModes() & MODULE) == 0); // [A0] - findConstructor(lookup, p1_Type1, void.class); // [A1] - findConstructorExpectingIAE(lookup, p2_Type2, void.class); // [A1] - findConstructor(lookup, q1_Type1, void.class); // [A1] - findConstructorExpectingIAE(lookup, q2_Type2, void.class); // [A2] - findConstructor(lookup, Object.class, void.class); // [A1] - findConstructorExpectingIAE(lookup, x500NameClass, void.class); // [A2] - - /** - * Teleport from MethodHandles.publicLookup() to lookup class in java.base - * has no module access [A0] - * can access public types in packages exported by java.base [A1] - * cannot access public types in non-exported packages [A2] - * no access to types in other named modules [A3] - */ - lookup2 = lookup.in(Object.class); - assertTrue((lookup2.lookupModes() & MODULE) == 0); // [A0] - findConstructor(lookup2, String.class, void.class); // [A1] - findConstructorExpectingIAE(lookup2, x500NameClass, void.class, String.class); // [A2] - findConstructorExpectingIAE(lookup2, p1_Type1, void.class); // [A3] - findConstructorExpectingIAE(lookup2, q1_Type1, void.class); // [A3] - - /** - * Teleport from MethodHandles.publicLookup() to lookup class in m1 - * has no module access [A0] - * can access public types in packages exported by m1, m2 and java.base [A1] - * cannot access public types is non-exported packages [A2] - */ - lookup2 = lookup.in(p1_Type1); - assertTrue((lookup2.lookupModes() & MODULE) == 0); // [A0] - findConstructor(lookup2, p1_Type1, void.class); // [A1] - findConstructor(lookup2, q1_Type1, void.class); // [A1] - findConstructor(lookup2, Object.class, void.class); // [A1] - findConstructorExpectingIAE(lookup, p2_Type2, void.class); // [A2] - findConstructorExpectingIAE(lookup, q2_Type2, void.class); // [A2] - findConstructorExpectingIAE(lookup2, x500NameClass, void.class, String.class); // [A2] - - /** - * Teleport from MethodHandles.publicLookup() to lookup class in m2 - * has no module access [A0] - * can access public types in packages exported by m2 and java.base [A1] - * cannot access public types is non-exported packages or modules that m2 does - * not read [A2] - */ - lookup2 = lookup.in(q1_Type1); - assertTrue((lookup2.lookupModes() & MODULE) == 0); // [A0] - findConstructor(lookup2, q1_Type1, void.class); // [A1] - findConstructor(lookup2, Object.class, void.class); // [A1] - findConstructorExpectingIAE(lookup2, p1_Type1, void.class); // [A2] - findConstructorExpectingIAE(lookup, q2_Type2, void.class); // [A2] - findConstructorExpectingIAE(lookup2, x500NameClass, void.class, String.class); // [A2] - - /** - * Teleport from MethodHandles.publicLookup() to lookup class that is not - * in an exported package, should get no access [A0] - */ - lookup2 = lookup.in(p2_Type2); - assertTrue(lookup2.lookupModes() == 0); // [A0] - findConstructorExpectingIAE(lookup, q2_Type2, void.class); // [A0] - } - - /** - * Invokes Lookup findConstructor with a method type constructored from the - * given return and parameter types, expecting IllegalAccessException to be - * thrown. - */ - static MethodHandle findConstructorExpectingIAE(Lookup lookup, - Class clazz, - Class rtype, - Class... ptypes) throws Exception { - try { - findConstructor(lookup, clazz, rtype, ptypes); - throw new RuntimeException("IllegalAccessError expected"); - } catch (IllegalAccessException expected) { - return null; - } - } - - /** - * Invokes Lookup findConstructor with a method type constructored from the - * given return and parameter types. - */ - static MethodHandle findConstructor(Lookup lookup, - Class clazz, - Class rtype, - Class... ptypes) throws Exception { - MethodType mt = MethodType.methodType(rtype, ptypes); - return lookup.findConstructor(clazz, mt); - } - - static void assertTrue(boolean condition) { - if (!condition) - throw new RuntimeException(); - } - -} diff --git a/jdk/test/java/lang/module/AutomaticModulesTest.java b/jdk/test/java/lang/module/AutomaticModulesTest.java index 07d25b9be85..1c020c309f2 100644 --- a/jdk/test/java/lang/module/AutomaticModulesTest.java +++ b/jdk/test/java/lang/module/AutomaticModulesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,10 +33,10 @@ import java.io.IOException; import java.lang.module.Configuration; import java.lang.module.FindException; import java.lang.module.ModuleDescriptor; -import java.lang.module.ModuleDescriptor.Exports; import java.lang.module.ModuleDescriptor.Requires.Modifier; import java.lang.module.ModuleFinder; import java.lang.module.ModuleReference; +import java.lang.module.ResolutionException; import java.lang.module.ResolvedModule; import java.lang.reflect.Layer; import java.lang.reflect.Module; @@ -137,6 +137,7 @@ public class AutomaticModulesTest { assertTrue(mref.isPresent(), mn + " not found"); ModuleDescriptor descriptor = mref.get().descriptor(); + assertTrue(descriptor.isAutomatic()); assertEquals(descriptor.name(), mn); if (vs == null) { assertFalse(descriptor.version().isPresent()); @@ -175,17 +176,14 @@ public class AutomaticModulesTest { assertTrue(mref.isPresent(), "m not found"); ModuleDescriptor descriptor = mref.get().descriptor(); + assertTrue(descriptor.isAutomatic()); assertTrue(descriptor.packages().size() == 2); assertTrue(descriptor.packages().contains("p")); assertTrue(descriptor.packages().contains("q")); - Set exports = descriptor.exports().stream() - .map(Exports::source) - .collect(Collectors.toSet()); - assertTrue(exports.size() == 2); - assertTrue(exports.contains("p")); - assertTrue(exports.contains("q")); + assertTrue(descriptor.exports().isEmpty()); + assertTrue(descriptor.opens().isEmpty()); } /** @@ -201,15 +199,13 @@ public class AutomaticModulesTest { assertTrue(mref.isPresent(), "m not found"); ModuleDescriptor descriptor = mref.get().descriptor(); + assertTrue(descriptor.isAutomatic()); assertTrue(descriptor.packages().size() == 1); assertTrue(descriptor.packages().contains("p")); - Set exports = descriptor.exports().stream() - .map(Exports::source) - .collect(Collectors.toSet()); - assertTrue(exports.size() == 1); - assertTrue(exports.contains("p")); + assertTrue(descriptor.exports().isEmpty()); + assertTrue(descriptor.opens().isEmpty()); } /** @@ -229,10 +225,10 @@ public class AutomaticModulesTest { assertTrue(mref.isPresent(), "m not found"); ModuleDescriptor descriptor = mref.get().descriptor(); + assertTrue(descriptor.isAutomatic()); - assertTrue(descriptor.packages().size() == 2); + assertTrue(descriptor.packages().size() == 1); assertTrue(descriptor.packages().contains("p")); - assertTrue(descriptor.packages().contains("p.resources")); } /** @@ -254,9 +250,17 @@ public class AutomaticModulesTest { String provider = "p.S1"; Path tmpdir = Files.createTempDirectory(USER_DIR, "tmp"); + + // provider class + Path providerClass = tmpdir.resolve(provider.replace('.', '/') + ".class"); + Files.createDirectories(providerClass.getParent()); + Files.createFile(providerClass); + + // services configuration file Path services = tmpdir.resolve("META-INF").resolve("services"); Files.createDirectories(services); Files.write(services.resolve(service), Set.of(provider)); + Path dir = Files.createTempDirectory(USER_DIR, "mods"); JarUtils.createJarFile(dir.resolve("m.jar"), tmpdir); @@ -314,7 +318,7 @@ public class AutomaticModulesTest { // service type provider type { "p.S", "-" }, - { "p.S", ".S1" }, + { "p.S", "p..S1" }, { "p.S", "S1." }, }; } @@ -324,13 +328,41 @@ public class AutomaticModulesTest { * values or names. */ @Test(dataProvider = "badproviders", expectedExceptions = FindException.class) - public void testBadProvideNames(String service, String provider) + public void testBadProviderNames(String service, String provider) throws IOException { Path tmpdir = Files.createTempDirectory(USER_DIR, "tmp"); + + // provider class + Path providerClass = tmpdir.resolve(provider.replace('.', '/') + ".class"); + Files.createDirectories(providerClass.getParent()); + Files.createFile(providerClass); + + // services configuration file Path services = tmpdir.resolve("META-INF").resolve("services"); Files.createDirectories(services); Files.write(services.resolve(service), Set.of(provider)); + + Path dir = Files.createTempDirectory(USER_DIR, "mods"); + JarUtils.createJarFile(dir.resolve("m.jar"), tmpdir); + + // should throw FindException + ModuleFinder.of(dir).findAll(); + } + + /** + * Test JAR file with META-INF/services configuration file listing a + * provider that is not in the module. + */ + @Test(expectedExceptions = FindException.class) + public void testMissingProviderPackage() throws IOException { + Path tmpdir = Files.createTempDirectory(USER_DIR, "tmp"); + + // services configuration file + Path services = tmpdir.resolve("META-INF").resolve("services"); + Files.createDirectories(services); + Files.write(services.resolve("p.S"), Set.of("q.P")); + Path dir = Files.createTempDirectory(USER_DIR, "mods"); JarUtils.createJarFile(dir.resolve("m.jar"), tmpdir); @@ -352,7 +384,8 @@ public class AutomaticModulesTest { attrs.put(Attributes.Name.MAIN_CLASS, mainClass); Path dir = Files.createTempDirectory(USER_DIR, "mods"); - createDummyJarFile(dir.resolve("m.jar"), man); + String entry = mainClass.replace('.', '/') + ".class"; + createDummyJarFile(dir.resolve("m.jar"), man, entry); ModuleFinder finder = ModuleFinder.of(dir); @@ -366,20 +399,21 @@ public class AutomaticModulesTest { } - // Main-Class files that do not map to a legal Java identifier + // Main-Class files that do not map to a legal qualified type name @DataProvider(name = "badmainclass") public Object[][] createBadMainClass() { return new Object[][]{ + { "Main", null }, + { "p..Main", null }, { "p-.Main", null }, - { ".Main", null } }; } /** - * Test that a JAR file with a Main-Class attribute that is not a valid - * Java identifier + * Test that a JAR file with a Main-Class attribute that is not a qualified + * type name. */ @Test(dataProvider = "badmainclass", expectedExceptions = FindException.class) public void testBadMainClass(String mainClass, String ignore) throws IOException { @@ -388,6 +422,24 @@ public class AutomaticModulesTest { attrs.put(Attributes.Name.MANIFEST_VERSION, "1.0.0"); attrs.put(Attributes.Name.MAIN_CLASS, mainClass); + Path dir = Files.createTempDirectory(USER_DIR, "mods"); + String entry = mainClass.replace('.', '/') + ".class"; + createDummyJarFile(dir.resolve("m.jar"), man, entry); + + // should throw FindException + ModuleFinder.of(dir).findAll(); + } + + /** + * Test that a JAR file with a Main-Class attribute that is not in the module + */ + @Test(expectedExceptions = FindException.class) + public void testMissingMainClassPackage() throws IOException { + Manifest man = new Manifest(); + Attributes attrs = man.getMainAttributes(); + attrs.put(Attributes.Name.MANIFEST_VERSION, "1.0.0"); + attrs.put(Attributes.Name.MAIN_CLASS, "p.Main"); + Path dir = Files.createTempDirectory(USER_DIR, "mods"); createDummyJarFile(dir.resolve("m.jar"), man); @@ -405,7 +457,7 @@ public class AutomaticModulesTest { */ public void testConfiguration1() throws Exception { ModuleDescriptor descriptor1 - = ModuleDescriptor.module("a") + = ModuleDescriptor.newModule("a") .requires("b") .requires("c") .requires("java.base") @@ -465,13 +517,13 @@ public class AutomaticModulesTest { */ public void testInConfiguration2() throws IOException { ModuleDescriptor descriptor1 - = ModuleDescriptor.module("a") + = ModuleDescriptor.newModule("a") .requires("b") .requires("java.base") .build(); ModuleDescriptor descriptor2 - = ModuleDescriptor.module("b") + = ModuleDescriptor.newModule("b") .requires("c") .requires("java.base") .build(); @@ -538,13 +590,13 @@ public class AutomaticModulesTest { */ public void testInConfiguration3() throws IOException { ModuleDescriptor descriptor1 - = ModuleDescriptor.module("a") + = ModuleDescriptor.newModule("a") .requires("b") .requires("java.base") .build(); ModuleDescriptor descriptor2 - = ModuleDescriptor.module("b") + = ModuleDescriptor.newModule("b") .requires(Set.of(Modifier.TRANSITIVE), "c") .requires("java.base") .build(); @@ -608,12 +660,68 @@ public class AutomaticModulesTest { } + /** + * Basic test of a configuration created with automatic modules + * a requires b* and c* + * b* contains p + * c* contains p + */ + @Test(expectedExceptions = { ResolutionException.class }) + public void testDuplicateSuppliers1() throws IOException { + ModuleDescriptor descriptor + = ModuleDescriptor.newModule("a") + .requires("b") + .requires("c") + .build(); + + // c and d are automatic modules with the same package + Path dir = Files.createTempDirectory(USER_DIR, "mods"); + createDummyJarFile(dir.resolve("b.jar"), "p/T.class"); + createDummyJarFile(dir.resolve("c.jar"), "p/T.class"); + + // module finder locates 'a' and the modules in the directory + ModuleFinder finder + = ModuleFinder.compose(ModuleUtils.finderOf(descriptor), + ModuleFinder.of(dir)); + + Configuration parent = Layer.boot().configuration(); + resolve(parent, finder, "a"); + } + + + /** + * Basic test of a configuration created with automatic modules + * a contains p, requires b* + * b* contains p + */ + @Test(expectedExceptions = { ResolutionException.class }) + public void testDuplicateSuppliers2() throws IOException { + ModuleDescriptor descriptor + = ModuleDescriptor.newModule("a") + .packages(Set.of("p")) + .requires("b") + .build(); + + // c and d are automatic modules with the same package + Path dir = Files.createTempDirectory(USER_DIR, "mods"); + createDummyJarFile(dir.resolve("b.jar"), "p/T.class"); + + // module finder locates 'a' and the modules in the directory + ModuleFinder finder + = ModuleFinder.compose(ModuleUtils.finderOf(descriptor), + ModuleFinder.of(dir)); + + Configuration parent = Layer.boot().configuration(); + resolve(parent, finder, "a"); + } + + /** * Basic test of Layer containing automatic modules */ public void testInLayer() throws IOException { ModuleDescriptor descriptor - = ModuleDescriptor.module("a") + = ModuleDescriptor.newModule("a") .requires("b") .requires("c") .build(); @@ -664,7 +772,7 @@ public class AutomaticModulesTest { // test miscellaneous methods assertTrue(m.isAutomatic()); - assertFalse(m.isSynthetic()); + assertFalse(m.modifiers().contains(ModuleDescriptor.Modifier.SYNTHETIC)); assertFalse(m.osName().isPresent()); assertFalse(m.osArch().isPresent()); assertFalse(m.osVersion().isPresent()); @@ -672,12 +780,12 @@ public class AutomaticModulesTest { /** - * Invokes parent.resolveRequires to resolve the given root modules. + * Invokes parent.resolve to resolve the given root modules. */ static Configuration resolve(Configuration parent, ModuleFinder finder, String... roots) { - return parent.resolveRequires(finder, ModuleFinder.of(), Set.of(roots)); + return parent.resolve(finder, ModuleFinder.of(), Set.of(roots)); } /** diff --git a/jdk/test/java/lang/module/ConfigurationTest.java b/jdk/test/java/lang/module/ConfigurationTest.java index 7ae867217c6..28f414736b1 100644 --- a/jdk/test/java/lang/module/ConfigurationTest.java +++ b/jdk/test/java/lang/module/ConfigurationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,23 +24,26 @@ /** * @test * @library /lib/testlibrary + * @modules java.base/jdk.internal.misc * @build ConfigurationTest ModuleUtils * @run testng ConfigurationTest * @summary Basic tests for java.lang.module.Configuration */ import java.lang.module.Configuration; +import java.lang.module.FindException; import java.lang.module.ModuleDescriptor; +import java.lang.module.ModuleDescriptor.Builder; import java.lang.module.ModuleDescriptor.Requires; import java.lang.module.ModuleFinder; import java.lang.module.ResolutionException; import java.lang.module.ResolvedModule; import java.lang.reflect.Layer; -import java.util.HashSet; import java.util.List; import java.util.Optional; import java.util.Set; +import jdk.internal.misc.SharedSecrets; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import static org.testng.Assert.*; @@ -48,30 +51,35 @@ import static org.testng.Assert.*; @Test public class ConfigurationTest { + /** + * Creates a "non-strict" builder for building a module. This allows the + * test the create ModuleDescriptor objects that do not require java.base. + */ + private static ModuleDescriptor.Builder newBuilder(String mn) { + return SharedSecrets.getJavaLangModuleAccess() + .newModuleBuilder(mn, false, Set.of()); + } /** * Basic test of resolver * m1 requires m2, m2 requires m3 */ public void testBasic() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .requires("m2") .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires("m3") .build(); - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2, descriptor3); - Configuration cf = resolveRequires(finder, "m1"); + Configuration cf = resolve(finder, "m1"); assertTrue(cf.modules().size() == 3); @@ -110,24 +118,21 @@ public class ConfigurationTest { */ public void testRequiresTransitive1() { // m1 requires m2, m2 requires transitive m3 - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .requires("m2") .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires(Set.of(Requires.Modifier.TRANSITIVE), "m3") .build(); - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2, descriptor3); - Configuration cf = resolveRequires(finder, "m1"); + Configuration cf = resolve(finder, "m1"); assertTrue(cf.modules().size() == 3); @@ -167,18 +172,16 @@ public class ConfigurationTest { // cf1: m1 and m2, m2 requires transitive m1 - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires(Set.of(Requires.Modifier.TRANSITIVE), "m1") .build(); ModuleFinder finder1 = ModuleUtils.finderOf(descriptor1, descriptor2); - Configuration cf1 = resolveRequires(finder1, "m2"); + Configuration cf1 = resolve(finder1, "m2"); assertTrue(cf1.modules().size() == 2); assertTrue(cf1.findModule("m1").isPresent()); @@ -196,14 +199,13 @@ public class ConfigurationTest { // cf2: m3, m3 requires m2 - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .requires("m2") .build(); ModuleFinder finder2 = ModuleUtils.finderOf(descriptor3); - Configuration cf2 = resolveRequires(cf1, finder2, "m3"); + Configuration cf2 = resolve(cf1, finder2, "m3"); assertTrue(cf2.modules().size() == 1); assertTrue(cf2.findModule("m1").isPresent()); // in parent @@ -231,13 +233,11 @@ public class ConfigurationTest { // cf1: m1 - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") - .build(); + ModuleDescriptor descriptor1 = newBuilder("m1").build(); ModuleFinder finder1 = ModuleUtils.finderOf(descriptor1); - Configuration cf1 = resolveRequires(finder1, "m1"); + Configuration cf1 = resolve(finder1, "m1"); assertTrue(cf1.modules().size() == 1); assertTrue(cf1.findModule("m1").isPresent()); @@ -250,19 +250,17 @@ public class ConfigurationTest { // cf2: m2, m3: m2 requires transitive m1, m3 requires m2 - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires(Set.of(Requires.Modifier.TRANSITIVE), "m1") .build(); - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .requires("m2") .build(); ModuleFinder finder2 = ModuleUtils.finderOf(descriptor2, descriptor3); - Configuration cf2 = resolveRequires(cf1, finder2, "m3"); + Configuration cf2 = resolve(cf1, finder2, "m3"); assertTrue(cf2.modules().size() == 2); assertTrue(cf2.findModule("m1").isPresent()); // in parent @@ -297,13 +295,11 @@ public class ConfigurationTest { // cf1: m1 - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") - .build(); + ModuleDescriptor descriptor1 = newBuilder("m1").build(); ModuleFinder finder1 = ModuleUtils.finderOf(descriptor1); - Configuration cf1 = resolveRequires(finder1, "m1"); + Configuration cf1 = resolve(finder1, "m1"); assertTrue(cf1.modules().size() == 1); assertTrue(cf1.findModule("m1").isPresent()); @@ -316,14 +312,13 @@ public class ConfigurationTest { // cf2: m2 requires transitive m1 - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires(Set.of(Requires.Modifier.TRANSITIVE), "m1") .build(); ModuleFinder finder2 = ModuleUtils.finderOf(descriptor2); - Configuration cf2 = resolveRequires(cf1, finder2, "m2"); + Configuration cf2 = resolve(cf1, finder2, "m2"); assertTrue(cf2.modules().size() == 1); assertTrue(cf2.findModule("m1").isPresent()); // in parent @@ -340,14 +335,13 @@ public class ConfigurationTest { // cf3: m3 requires m2 - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .requires("m2") .build(); ModuleFinder finder3 = ModuleUtils.finderOf(descriptor3); - Configuration cf3 = resolveRequires(cf2, finder3, "m3"); + Configuration cf3 = resolve(cf2, finder3, "m3"); assertTrue(cf3.modules().size() == 1); assertTrue(cf3.findModule("m1").isPresent()); // in parent @@ -376,18 +370,16 @@ public class ConfigurationTest { // cf1: m1, m2 requires transitive m1 - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires(Set.of(Requires.Modifier.TRANSITIVE), "m1") .build(); ModuleFinder finder1 = ModuleUtils.finderOf(descriptor1, descriptor2); - Configuration cf1 = resolveRequires(finder1, "m2"); + Configuration cf1 = resolve(finder1, "m2"); assertTrue(cf1.modules().size() == 2); assertTrue(cf1.findModule("m1").isPresent()); @@ -408,20 +400,18 @@ public class ConfigurationTest { // cf2: m3 requires transitive m2, m4 requires m3 - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .requires(Set.of(Requires.Modifier.TRANSITIVE), "m2") .build(); - ModuleDescriptor descriptor4 - = ModuleDescriptor.module("m4") + ModuleDescriptor descriptor4 = newBuilder("m4") .requires("m3") .build(); ModuleFinder finder2 = ModuleUtils.finderOf(descriptor3, descriptor4); - Configuration cf2 = resolveRequires(cf1, finder2, "m3", "m4"); + Configuration cf2 = resolve(cf1, finder2, "m3", "m4"); assertTrue(cf2.modules().size() == 2); assertTrue(cf2.findModule("m1").isPresent()); // in parent @@ -456,28 +446,24 @@ public class ConfigurationTest { * - Configuration cf3(cf1,cf2): m4 requires m2, m3 */ public void testRequiresTransitive6() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires(Set.of(Requires.Modifier.TRANSITIVE), "m1") .build(); - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .requires(Set.of(Requires.Modifier.TRANSITIVE), "m1") .build(); - ModuleDescriptor descriptor4 - = ModuleDescriptor.module("m4") + ModuleDescriptor descriptor4 = newBuilder("m4") .requires("m2") .requires("m3") .build(); ModuleFinder finder1 = ModuleUtils.finderOf(descriptor1, descriptor2); - Configuration cf1 = resolveRequires(finder1, "m2"); + Configuration cf1 = resolve(finder1, "m2"); assertTrue(cf1.modules().size() == 2); assertTrue(cf1.findModule("m1").isPresent()); assertTrue(cf1.findModule("m2").isPresent()); @@ -485,7 +471,7 @@ public class ConfigurationTest { assertTrue(cf1.parents().get(0) == Configuration.empty()); ModuleFinder finder2 = ModuleUtils.finderOf(descriptor1, descriptor3); - Configuration cf2 = resolveRequires(finder2, "m3"); + Configuration cf2 = resolve(finder2, "m3"); assertTrue(cf2.modules().size() == 2); assertTrue(cf2.findModule("m3").isPresent()); assertTrue(cf2.findModule("m1").isPresent()); @@ -493,7 +479,7 @@ public class ConfigurationTest { assertTrue(cf2.parents().get(0) == Configuration.empty()); ModuleFinder finder3 = ModuleUtils.finderOf(descriptor4); - Configuration cf3 = Configuration.resolveRequires(finder3, + Configuration cf3 = Configuration.resolve(finder3, List.of(cf1, cf2), ModuleFinder.of(), Set.of("m4")); @@ -522,14 +508,13 @@ public class ConfigurationTest { * resolve m1 */ public void testRequiresStatic1() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .requires(Set.of(Requires.Modifier.STATIC), "m2") .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1); - Configuration cf = resolveRequires(finder, "m1"); + Configuration cf = resolve(finder, "m1"); assertTrue(cf.modules().size() == 1); @@ -545,18 +530,16 @@ public class ConfigurationTest { * resolve m1 */ public void testRequiresStatic2() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .requires(Set.of(Requires.Modifier.STATIC), "m2") .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2); - Configuration cf = resolveRequires(finder, "m1"); + Configuration cf = resolve(finder, "m1"); assertTrue(cf.modules().size() == 1); @@ -572,18 +555,16 @@ public class ConfigurationTest { * resolve m1, m2 */ public void testRequiresStatic3() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .requires(Set.of(Requires.Modifier.STATIC), "m2") .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2); - Configuration cf = resolveRequires(finder, "m1", "m2"); + Configuration cf = resolve(finder, "m1", "m2"); assertTrue(cf.modules().size() == 2); @@ -604,25 +585,22 @@ public class ConfigurationTest { * m3 */ public void testRequiresStatic4() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .requires("m2") .requires("m3") .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires(Set.of(Requires.Modifier.STATIC), "m3") .build(); - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .build(); ModuleFinder finder - = ModuleUtils.finderOf(descriptor1, descriptor2, descriptor3); + = ModuleUtils.finderOf(descriptor1, descriptor2, descriptor3); - Configuration cf = resolveRequires(finder, "m1"); + Configuration cf = resolve(finder, "m1"); assertTrue(cf.modules().size() == 3); @@ -648,31 +626,28 @@ public class ConfigurationTest { * - Configuration cf2: m3 requires m1, requires static m2 */ public void testRequiresStatic5() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .build(); ModuleFinder finder1 = ModuleUtils.finderOf(descriptor1, descriptor2); - Configuration cf1 = resolveRequires(finder1, "m1", "m2"); + Configuration cf1 = resolve(finder1, "m1", "m2"); assertTrue(cf1.modules().size() == 2); assertTrue(cf1.findModule("m1").isPresent()); assertTrue(cf1.findModule("m2").isPresent()); - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .requires("m1") .requires(Set.of(Requires.Modifier.STATIC), "m2") .build(); ModuleFinder finder2 = ModuleUtils.finderOf(descriptor3); - Configuration cf2 = resolveRequires(cf1, finder2, "m3"); + Configuration cf2 = resolve(cf1, finder2, "m3"); assertTrue(cf2.modules().size() == 1); assertTrue(cf2.findModule("m3").isPresent()); @@ -694,26 +669,24 @@ public class ConfigurationTest { * - Configuration cf2: m3 requires m1, requires static m2 */ public void testRequiresStatic6() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .build(); ModuleFinder finder1 = ModuleUtils.finderOf(descriptor1); - Configuration cf1 = resolveRequires(finder1, "m1"); + Configuration cf1 = resolve(finder1, "m1"); assertTrue(cf1.modules().size() == 1); assertTrue(cf1.findModule("m1").isPresent()); - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .requires("m1") .requires(Set.of(Requires.Modifier.STATIC), "m2") .build(); ModuleFinder finder2 = ModuleUtils.finderOf(descriptor3); - Configuration cf2 = resolveRequires(cf1, finder2, "m3"); + Configuration cf2 = resolve(cf1, finder2, "m3"); assertTrue(cf2.modules().size() == 1); assertTrue(cf2.findModule("m3").isPresent()); @@ -735,21 +708,19 @@ public class ConfigurationTest { public void testRequiresStatic7() { ModuleDescriptor descriptor1 = null; // not observable - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires(Set.of(Requires.Modifier.TRANSITIVE, Requires.Modifier.STATIC), "m1") .build(); - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .requires("m2") .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor2, descriptor3); - Configuration cf = resolveRequires(finder, "m3"); + Configuration cf = resolve(finder, "m3"); assertTrue(cf.modules().size() == 2); assertTrue(cf.findModule("m2").isPresent()); @@ -770,8 +741,7 @@ public class ConfigurationTest { public void testRequiresStatic8() { ModuleDescriptor descriptor1 = null; // not observable - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires(Set.of(Requires.Modifier.TRANSITIVE, Requires.Modifier.STATIC), "m1") @@ -779,21 +749,20 @@ public class ConfigurationTest { ModuleFinder finder1 = ModuleUtils.finderOf(descriptor2); - Configuration cf1 = resolveRequires(finder1, "m2"); + Configuration cf1 = resolve(finder1, "m2"); assertTrue(cf1.modules().size() == 1); assertTrue(cf1.findModule("m2").isPresent()); ResolvedModule m2 = cf1.findModule("m2").get(); assertTrue(m2.reads().isEmpty()); - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .requires("m2") .build(); ModuleFinder finder2 = ModuleUtils.finderOf(descriptor3); - Configuration cf2 = resolveRequires(cf1, finder2, "m3"); + Configuration cf2 = resolve(cf1, finder2, "m3"); assertTrue(cf2.modules().size() == 1); assertTrue(cf2.findModule("m3").isPresent()); @@ -810,22 +779,19 @@ public class ConfigurationTest { */ public void testServiceBinding1() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .exports("p") .uses("p.S") .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires("m1") - .contains("q") - .provides("p.S", "q.T") + .provides("p.S", List.of("q.T")) .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2); - Configuration cf = resolveRequiresAndUses(finder, "m1"); + Configuration cf = resolveAndBind(finder, "m1"); assertTrue(cf.modules().size() == 2); assertTrue(cf.findModule("m1").isPresent()); @@ -853,31 +819,26 @@ public class ConfigurationTest { */ public void testServiceBinding2() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .exports("p") .uses("p.S1") .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires("m1") .uses("p.S2") - .contains("q") - .provides("p.S1", "q.Service1Impl") + .provides("p.S1", List.of("q.Service1Impl")) .build(); - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .requires("m1") - .contains("q") - .provides("p.S2", "q.Service2Impl") + .provides("p.S2", List.of("q.Service2Impl")) .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2, descriptor3); - Configuration cf = resolveRequiresAndUses(finder, "m1"); + Configuration cf = resolveAndBind(finder, "m1"); assertTrue(cf.modules().size() == 3); assertTrue(cf.findModule("m1").isPresent()); @@ -912,29 +873,26 @@ public class ConfigurationTest { */ public void testServiceBindingWithConfigurations1() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .exports("p") .uses("p.S") .build(); ModuleFinder finder1 = ModuleUtils.finderOf(descriptor1); - Configuration cf1 = resolveRequires(finder1, "m1"); + Configuration cf1 = resolve(finder1, "m1"); assertTrue(cf1.modules().size() == 1); assertTrue(cf1.findModule("m1").isPresent()); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires("m1") - .contains("q") - .provides("p.S", "q.T") + .provides("p.S", List.of("q.T")) .build(); ModuleFinder finder2 = ModuleUtils.finderOf(descriptor2); - Configuration cf2 = resolveRequiresAndUses(cf1, finder2); // no roots + Configuration cf2 = resolveAndBind(cf1, finder2); // no roots assertTrue(cf2.parents().size() == 1); assertTrue(cf2.parents().get(0) == cf1); @@ -961,47 +919,39 @@ public class ConfigurationTest { */ public void testServiceBindingWithConfigurations2() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .exports("p") .uses("p.S") - .contains("p1") - .provides("p.S", "p1.ServiceImpl") + .provides("p.S", List.of("p1.ServiceImpl")) .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires("m1") - .contains("p2") - .provides("p.S", "p2.ServiceImpl") + .provides("p.S", List.of("p2.ServiceImpl")) .build(); ModuleFinder finder1 = ModuleUtils.finderOf(descriptor1, descriptor2); - Configuration cf1 = resolveRequiresAndUses(finder1, "m1"); + Configuration cf1 = resolveAndBind(finder1, "m1"); assertTrue(cf1.modules().size() == 2); assertTrue(cf1.findModule("m1").isPresent()); assertTrue(cf1.findModule("m2").isPresent()); - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .requires("m1") - .contains("p3") - .provides("p.S", "p3.ServiceImpl") + .provides("p.S", List.of("p3.ServiceImpl")) .build(); - ModuleDescriptor descriptor4 - = ModuleDescriptor.module("m4") + ModuleDescriptor descriptor4 = newBuilder("m4") .requires("m1") - .contains("p4") - .provides("p.S", "p4.ServiceImpl") + .provides("p.S", List.of("p4.ServiceImpl")) .build(); ModuleFinder finder2 = ModuleUtils.finderOf(descriptor3, descriptor4); - Configuration cf2 = resolveRequiresAndUses(cf1, finder2); // no roots + Configuration cf2 = resolveAndBind(cf1, finder2); // no roots assertTrue(cf2.parents().size() == 1); assertTrue(cf2.parents().get(0) == cf1); @@ -1037,22 +987,19 @@ public class ConfigurationTest { */ public void testServiceBindingWithConfigurations3() { - ModuleDescriptor service - = ModuleDescriptor.module("s") + ModuleDescriptor service = newBuilder("s") .exports("p") .build(); - ModuleDescriptor provider_v1 - = ModuleDescriptor.module("p") + ModuleDescriptor provider_v1 = newBuilder("p") .version("1.0") .requires("s") - .contains("q") - .provides("p.S", "q.T") + .provides("p.S", List.of("q.T")) .build(); ModuleFinder finder1 = ModuleUtils.finderOf(service, provider_v1); - Configuration cf1 = resolveRequires(finder1, "p"); + Configuration cf1 = resolve(finder1, "p"); assertTrue(cf1.modules().size() == 2); assertTrue(cf1.findModule("s").isPresent()); @@ -1063,18 +1010,15 @@ public class ConfigurationTest { assertEquals(p.reference().descriptor(), provider_v1); - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .requires("s") .uses("p.S") .build(); - ModuleDescriptor provider_v2 - = ModuleDescriptor.module("p") + ModuleDescriptor provider_v2 = newBuilder("p") .version("2.0") .requires("s") - .contains("q") - .provides("p.S", "q.T") + .provides("p.S", List.of("q.T")) .build(); ModuleFinder finder2 = ModuleUtils.finderOf(descriptor1, provider_v2); @@ -1082,7 +1026,7 @@ public class ConfigurationTest { // finder2 is the before ModuleFinder and so p@2.0 should be located - Configuration cf2 = resolveRequiresAndUses(cf1, finder2, "m1"); + Configuration cf2 = resolveAndBind(cf1, finder2, "m1"); assertTrue(cf2.parents().size() == 1); assertTrue(cf2.parents().get(0) == cf1); @@ -1097,7 +1041,7 @@ public class ConfigurationTest { // finder2 is the after ModuleFinder and so p@2.0 should not be located // as module p is in parent configuration. - cf2 = resolveRequiresAndUses(cf1, ModuleFinder.of(), finder2, "m1"); + cf2 = resolveAndBind(cf1, ModuleFinder.of(), finder2, "m1"); assertTrue(cf2.parents().size() == 1); assertTrue(cf2.parents().get(0) == cf1); @@ -1117,25 +1061,22 @@ public class ConfigurationTest { */ public void testWithTwoFinders1() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .requires("m2") .build(); - ModuleDescriptor descriptor2_v1 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2_v1 = newBuilder("m2") .version("1.0") .build(); - ModuleDescriptor descriptor2_v2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2_v2 = newBuilder("m2") .version("2.0") .build(); ModuleFinder finder1 = ModuleUtils.finderOf(descriptor2_v1); ModuleFinder finder2 = ModuleUtils.finderOf(descriptor1, descriptor2_v2); - Configuration cf = resolveRequires(finder1, finder2, "m1"); + Configuration cf = resolve(finder1, finder2, "m1"); assertTrue(cf.modules().size() == 2); assertTrue(cf.findModule("m1").isPresent()); @@ -1157,30 +1098,25 @@ public class ConfigurationTest { */ public void testWithTwoFinders2() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .exports("p") .uses("p.S") .build(); - ModuleDescriptor descriptor2_v1 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2_v1 = newBuilder("m2") .requires("m1") - .contains("q") - .provides("p.S", "q.T") + .provides("p.S", List.of("q.T")) .build(); - ModuleDescriptor descriptor2_v2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2_v2 = newBuilder("m2") .requires("m1") - .contains("q") - .provides("p.S", "q.T") + .provides("p.S", List.of("q.T")) .build(); ModuleFinder finder1 = ModuleUtils.finderOf(descriptor1, descriptor2_v1); ModuleFinder finder2 = ModuleUtils.finderOf(descriptor2_v2); - Configuration cf = resolveRequiresAndUses(finder1, finder2, "m1"); + Configuration cf = resolveAndBind(finder1, finder2, "m1"); assertTrue(cf.modules().size() == 2); assertTrue(cf.findModule("m1").isPresent()); @@ -1200,18 +1136,17 @@ public class ConfigurationTest { */ public void testResolvedInParent1() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1); - Configuration cf1 = resolveRequires(finder, "m1"); + Configuration cf1 = resolve(finder, "m1"); assertTrue(cf1.modules().size() == 1); assertTrue(cf1.findModule("m1").isPresent()); - Configuration cf2 = resolveRequires(cf1, finder, "m1"); + Configuration cf2 = resolve(cf1, finder, "m1"); assertTrue(cf2.modules().size() == 1); } @@ -1223,26 +1158,23 @@ public class ConfigurationTest { */ public void testResolvedInParent2() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") - .build(); + ModuleDescriptor descriptor1 = newBuilder("m1").build(); ModuleFinder finder1 = ModuleUtils.finderOf(descriptor1); - Configuration cf1 = resolveRequires(finder1, "m1"); + Configuration cf1 = resolve(finder1, "m1"); assertTrue(cf1.modules().size() == 1); assertTrue(cf1.findModule("m1").isPresent()); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires("m1") .build(); ModuleFinder finder2 = ModuleUtils.finderOf(descriptor2); - Configuration cf2 = resolveRequires(cf1, ModuleFinder.of(), finder2, "m2"); + Configuration cf2 = resolve(cf1, ModuleFinder.of(), finder2, "m2"); assertTrue(cf2.modules().size() == 1); assertTrue(cf2.findModule("m2").isPresent()); @@ -1268,29 +1200,28 @@ public class ConfigurationTest { public void testResolvedInMultipleParents1() { // Configuration cf1: m1 - ModuleDescriptor descriptor1 = ModuleDescriptor.module("m1").build(); - Configuration cf1 = resolveRequires(ModuleUtils.finderOf(descriptor1), "m1"); + ModuleDescriptor descriptor1 = newBuilder("m1").build(); + Configuration cf1 = resolve(ModuleUtils.finderOf(descriptor1), "m1"); assertEquals(cf1.parents(), List.of(Configuration.empty())); assertTrue(cf1.findModule("m1").isPresent()); ResolvedModule m1 = cf1.findModule("m1").get(); assertTrue(m1.configuration() == cf1); // Configuration cf2: m2 - ModuleDescriptor descriptor2 = ModuleDescriptor.module("m2").build(); - Configuration cf2 = resolveRequires(ModuleUtils.finderOf(descriptor2), "m2"); + ModuleDescriptor descriptor2 = newBuilder("m2").build(); + Configuration cf2 = resolve(ModuleUtils.finderOf(descriptor2), "m2"); assertEquals(cf2.parents(), List.of(Configuration.empty())); assertTrue(cf2.findModule("m2").isPresent()); ResolvedModule m2 = cf2.findModule("m2").get(); assertTrue(m2.configuration() == cf2); // Configuration cf3(cf1,cf2): m3 requires m1 and m2 - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .requires("m1") .requires("m2") .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor3); - Configuration cf3 = Configuration.resolveRequires( + Configuration cf3 = Configuration.resolve( finder, List.of(cf1, cf2), // parents ModuleFinder.of(), @@ -1319,19 +1250,18 @@ public class ConfigurationTest { */ public void testResolvedInMultipleParents2() { // Configuration cf1: m1 - ModuleDescriptor descriptor1 = ModuleDescriptor.module("m1").build(); - Configuration cf1 = resolveRequires(ModuleUtils.finderOf(descriptor1), "m1"); + ModuleDescriptor descriptor1 = newBuilder("m1").build(); + Configuration cf1 = resolve(ModuleUtils.finderOf(descriptor1), "m1"); assertEquals(cf1.parents(), List.of(Configuration.empty())); assertTrue(cf1.findModule("m1").isPresent()); ResolvedModule m1 = cf1.findModule("m1").get(); assertTrue(m1.configuration() == cf1); // Configuration cf2(cf1): m2 requires m1 - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires("m1") .build(); - Configuration cf2 = Configuration.resolveRequires( + Configuration cf2 = Configuration.resolve( ModuleUtils.finderOf(descriptor2), List.of(cf1), // parents ModuleFinder.of(), @@ -1342,11 +1272,10 @@ public class ConfigurationTest { assertTrue(m2.configuration() == cf2); // Configuration cf3(cf1): m3 requires m1 - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .requires("m1") .build(); - Configuration cf3 = Configuration.resolveRequires( + Configuration cf3 = Configuration.resolve( ModuleUtils.finderOf(descriptor3), List.of(cf1), // parents ModuleFinder.of(), @@ -1357,13 +1286,12 @@ public class ConfigurationTest { assertTrue(m3.configuration() == cf3); // Configuration cf4(cf2,cf3): m4 requires m1,m2,m3 - ModuleDescriptor descriptor4 - = ModuleDescriptor.module("m4") + ModuleDescriptor descriptor4 = newBuilder("m4") .requires("m1") .requires("m2") .requires("m3") .build(); - Configuration cf4 = Configuration.resolveRequires( + Configuration cf4 = Configuration.resolve( ModuleUtils.finderOf(descriptor4), List.of(cf2, cf3), // parents ModuleFinder.of(), @@ -1395,35 +1323,34 @@ public class ConfigurationTest { ModuleDescriptor descriptor1, descriptor2, descriptor3; // Configuration cf1: m1@1 - descriptor1 = ModuleDescriptor.module("m1").version("1").build(); - Configuration cf1 = resolveRequires(ModuleUtils.finderOf(descriptor1), "m1"); + descriptor1 = newBuilder("m1").version("1").build(); + Configuration cf1 = resolve(ModuleUtils.finderOf(descriptor1), "m1"); assertEquals(cf1.parents(), List.of(Configuration.empty())); // Configuration cf2: m1@2, m2@2 - descriptor1 = ModuleDescriptor.module("m1").version("2").build(); - descriptor2 = ModuleDescriptor.module("m2").version("2").build(); - Configuration cf2 = resolveRequires( + descriptor1 = newBuilder("m1").version("2").build(); + descriptor2 = newBuilder("m2").version("2").build(); + Configuration cf2 = resolve( ModuleUtils.finderOf(descriptor1, descriptor2), "m1", "m2"); assertEquals(cf2.parents(), List.of(Configuration.empty())); // Configuration cf3: m1@3, m2@3, m3@3 - descriptor1 = ModuleDescriptor.module("m1").version("3").build(); - descriptor2 = ModuleDescriptor.module("m2").version("3").build(); - descriptor3 = ModuleDescriptor.module("m3").version("3").build(); - Configuration cf3 = resolveRequires( + descriptor1 = newBuilder("m1").version("3").build(); + descriptor2 = newBuilder("m2").version("3").build(); + descriptor3 = newBuilder("m3").version("3").build(); + Configuration cf3 = resolve( ModuleUtils.finderOf(descriptor1, descriptor2, descriptor3), "m1", "m2", "m3"); assertEquals(cf3.parents(), List.of(Configuration.empty())); // Configuration cf4(cf1,cf2,cf3): m4 requires m1,m2,m3 - ModuleDescriptor descriptor4 - = ModuleDescriptor.module("m4") + ModuleDescriptor descriptor4 = newBuilder("m4") .requires("m1") .requires("m2") .requires("m3") .build(); - Configuration cf4 = Configuration.resolveRequires( + Configuration cf4 = Configuration.resolve( ModuleUtils.finderOf(descriptor4), List.of(cf1, cf2, cf3), // parents ModuleFinder.of(), @@ -1470,17 +1397,15 @@ public class ConfigurationTest { * configuration. */ public void testOverriding1() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") - .build(); + ModuleDescriptor descriptor1 = newBuilder("m1").build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1); - Configuration cf1 = resolveRequires(finder, "m1"); + Configuration cf1 = resolve(finder, "m1"); assertTrue(cf1.modules().size() == 1); assertTrue(cf1.findModule("m1").isPresent()); - Configuration cf2 = resolveRequires(cf1, finder, "m1"); + Configuration cf2 = resolve(cf1, finder, "m1"); assertTrue(cf2.modules().size() == 1); assertTrue(cf2.findModule("m1").isPresent()); } @@ -1490,24 +1415,24 @@ public class ConfigurationTest { * configuration. */ public void testOverriding2() { - ModuleDescriptor descriptor1 = ModuleDescriptor.module("m1").build(); - Configuration cf1 = resolveRequires(ModuleUtils.finderOf(descriptor1), "m1"); + ModuleDescriptor descriptor1 = newBuilder("m1").build(); + Configuration cf1 = resolve(ModuleUtils.finderOf(descriptor1), "m1"); assertTrue(cf1.modules().size() == 1); assertTrue(cf1.findModule("m1").isPresent()); - ModuleDescriptor descriptor2 = ModuleDescriptor.module("m2").build(); - Configuration cf2 = resolveRequires(ModuleUtils.finderOf(descriptor2), "m2"); + ModuleDescriptor descriptor2 = newBuilder("m2").build(); + Configuration cf2 = resolve(ModuleUtils.finderOf(descriptor2), "m2"); assertTrue(cf2.modules().size() == 1); assertTrue(cf2.findModule("m2").isPresent()); - ModuleDescriptor descriptor3 = ModuleDescriptor.module("m3").build(); - Configuration cf3 = resolveRequires(ModuleUtils.finderOf(descriptor3), "m3"); + ModuleDescriptor descriptor3 = newBuilder("m3").build(); + Configuration cf3 = resolve(ModuleUtils.finderOf(descriptor3), "m3"); assertTrue(cf3.modules().size() == 1); assertTrue(cf3.findModule("m3").isPresent()); // override m2, m1 and m3 should be found in parent configurations ModuleFinder finder = ModuleUtils.finderOf(descriptor2); - Configuration cf4 = Configuration.resolveRequires( + Configuration cf4 = Configuration.resolve( finder, List.of(cf1, cf2, cf3), ModuleFinder.of(), @@ -1530,18 +1455,16 @@ public class ConfigurationTest { */ public void testOverriding3() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires(Set.of(Requires.Modifier.TRANSITIVE), "m1") .build(); ModuleFinder finder1 = ModuleUtils.finderOf(descriptor1, descriptor2); - Configuration cf1 = resolveRequires(finder1, "m2"); + Configuration cf1 = resolve(finder1, "m2"); assertTrue(cf1.modules().size() == 2); assertTrue(cf1.findModule("m1").isPresent()); @@ -1549,14 +1472,13 @@ public class ConfigurationTest { // cf2: m3 requires m2, m1 - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .requires("m2") .build(); ModuleFinder finder2 = ModuleUtils.finderOf(descriptor1, descriptor3); - Configuration cf2 = resolveRequires(cf1, finder2, "m1", "m3"); + Configuration cf2 = resolve(cf1, finder2, "m1", "m3"); assertTrue(cf2.parents().size() == 1); assertTrue(cf2.parents().get(0) == cf1); @@ -1585,64 +1507,58 @@ public class ConfigurationTest { /** * Root module not found */ - @Test(expectedExceptions = { ResolutionException.class }) + @Test(expectedExceptions = { FindException.class }) public void testRootNotFound() { - resolveRequires(ModuleFinder.of(), "m1"); + resolve(ModuleFinder.of(), "m1"); } /** * Direct dependency not found */ - @Test(expectedExceptions = { ResolutionException.class }) + @Test(expectedExceptions = { FindException.class }) public void testDirectDependencyNotFound() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1").requires("m2").build(); + ModuleDescriptor descriptor1 = newBuilder("m1").requires("m2").build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1); - resolveRequires(finder, "m1"); + resolve(finder, "m1"); } /** * Transitive dependency not found */ - @Test(expectedExceptions = { ResolutionException.class }) + @Test(expectedExceptions = { FindException.class }) public void testTransitiveDependencyNotFound() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1").requires("m2").build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2").requires("m3").build(); + ModuleDescriptor descriptor1 = newBuilder("m1").requires("m2").build(); + ModuleDescriptor descriptor2 = newBuilder("m2").requires("m3").build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2); - resolveRequires(finder, "m1"); + resolve(finder, "m1"); } /** * Service provider dependency not found */ - @Test(expectedExceptions = { ResolutionException.class }) + @Test(expectedExceptions = { FindException.class }) public void testServiceProviderDependencyNotFound() { // service provider dependency (on m3) not found - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .exports("p") .uses("p.S") .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires("m1") .requires("m3") - .contains("q") - .provides("p.S", "q.T") + .provides("p.S", List.of("q.T")) .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2); // should throw ResolutionException because m3 is not found - Configuration cf = resolveRequiresAndUses(finder, "m1"); + Configuration cf = resolveAndBind(finder, "m1"); } @@ -1651,15 +1567,12 @@ public class ConfigurationTest { */ @Test(expectedExceptions = { ResolutionException.class }) public void testSimpleCycle() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1").requires("m2").build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2").requires("m3").build(); - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3").requires("m1").build(); + ModuleDescriptor descriptor1 = newBuilder("m1").requires("m2").build(); + ModuleDescriptor descriptor2 = newBuilder("m2").requires("m3").build(); + ModuleDescriptor descriptor3 = newBuilder("m3").requires("m1").build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2, descriptor3); - resolveRequires(finder, "m1"); + resolve(finder, "m1"); } /** @@ -1668,20 +1581,16 @@ public class ConfigurationTest { @Test(expectedExceptions = { ResolutionException.class }) public void testCycleInProvider() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .exports("p") .uses("p.S") .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires("m1") .requires("m3") - .contains("q") - .provides("p.S", "q.T") + .provides("p.S", List.of("q.T")) .build(); - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .requires("m2") .build(); @@ -1689,7 +1598,7 @@ public class ConfigurationTest { = ModuleUtils.finderOf(descriptor1, descriptor2, descriptor3); // should throw ResolutionException because of the m2 <--> m3 cycle - resolveRequiresAndUses(finder, "m1"); + resolveAndBind(finder, "m1"); } @@ -1699,19 +1608,16 @@ public class ConfigurationTest { @Test(expectedExceptions = { ResolutionException.class }) public void testPackageSuppliedByTwoOthers() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .requires("m2") .requires("m3") .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .exports("p") .build(); - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .exports("p", Set.of("m1")) .build(); @@ -1719,7 +1625,7 @@ public class ConfigurationTest { = ModuleUtils.finderOf(descriptor1, descriptor2, descriptor3); // m2 and m3 export package p to module m1 - resolveRequires(finder, "m1"); + resolve(finder, "m1"); } @@ -1730,21 +1636,19 @@ public class ConfigurationTest { @Test(expectedExceptions = { ResolutionException.class }) public void testPackageSuppliedBySelfAndOther() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .requires("m2") - .contains("p") + .packages(Set.of("p")) .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .exports("p") .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2); // m1 contains package p, module m2 exports package p to m1 - resolveRequires(finder, "m1"); + resolve(finder, "m1"); } @@ -1753,20 +1657,18 @@ public class ConfigurationTest { * a module that also contains a package p. */ public void testContainsPackageInSelfAndOther() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .requires("m2") - .contains("p") + .packages(Set.of("p")) .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") - .contains("p") + ModuleDescriptor descriptor2 = newBuilder("m2") + .packages(Set.of("p")) .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2); - Configuration cf = resolveRequires(finder, "m1"); + Configuration cf = resolve(finder, "m1"); assertTrue(cf.modules().size() == 2); assertTrue(cf.findModule("m1").isPresent()); @@ -1787,8 +1689,7 @@ public class ConfigurationTest { */ @Test(expectedExceptions = { ResolutionException.class }) public void testExportSamePackageAsBootLayer() { - ModuleDescriptor descriptor - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor = newBuilder("m1") .requires("java.base") .exports("java.lang") .build(); @@ -1798,7 +1699,7 @@ public class ConfigurationTest { Configuration bootConfiguration = Layer.boot().configuration(); // m1 contains package java.lang, java.base exports package java.lang to m1 - resolveRequires(bootConfiguration, finder, "m1"); + resolve(bootConfiguration, finder, "m1"); } @@ -1806,15 +1707,14 @@ public class ConfigurationTest { * Test "uses p.S" where p is contained in the same module. */ public void testContainsService1() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") - .contains("p") + ModuleDescriptor descriptor1 = newBuilder("m1") + .packages(Set.of("p")) .uses("p.S") .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1); - Configuration cf = resolveRequires(finder, "m1"); + Configuration cf = resolve(finder, "m1"); assertTrue(cf.modules().size() == 1); assertTrue(cf.findModule("m1").isPresent()); @@ -1826,13 +1726,11 @@ public class ConfigurationTest { */ @Test(expectedExceptions = { ResolutionException.class }) public void testContainsService2() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") - .contains("p") + ModuleDescriptor descriptor1 = newBuilder("m1") + .packages(Set.of("p")) .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires("m1") .uses("p.S") .build(); @@ -1840,7 +1738,7 @@ public class ConfigurationTest { ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2); // m2 does not read a module that exports p - resolveRequires(finder, "m2"); + resolve(finder, "m2"); } @@ -1848,16 +1746,14 @@ public class ConfigurationTest { * Test "provides p.S" where p is contained in the same module. */ public void testContainsService3() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") - .contains("p") - .contains("q") - .provides("p.S", "q.S1") + ModuleDescriptor descriptor1 = newBuilder("m1") + .packages(Set.of("p", "q")) + .provides("p.S", List.of("q.S1")) .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1); - Configuration cf = resolveRequires(finder, "m1"); + Configuration cf = resolve(finder, "m1"); assertTrue(cf.modules().size() == 1); assertTrue(cf.findModule("m1").isPresent()); @@ -1869,22 +1765,19 @@ public class ConfigurationTest { */ @Test(expectedExceptions = { ResolutionException.class }) public void testContainsService4() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") - .contains("p") + ModuleDescriptor descriptor1 = newBuilder("m1") + .packages(Set.of("p")) .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires("m1") - .contains("q") - .provides("p.S", "q.S1") + .provides("p.S", List.of("q.S1")) .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2); // m2 does not read a module that exports p - resolveRequires(finder, "m2"); + resolve(finder, "m2"); } @@ -1893,15 +1786,14 @@ public class ConfigurationTest { */ @Test(expectedExceptions = { ResolutionException.class }) public void testServiceTypePackageNotExported1() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .uses("p.S") .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1); // m1 does not read a module that exports p - resolveRequires(finder, "m1"); + resolve(finder, "m1"); } @@ -1910,40 +1802,14 @@ public class ConfigurationTest { */ @Test(expectedExceptions = { ResolutionException.class }) public void testServiceTypePackageNotExported2() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") - .contains("q") - .provides("p.S", "q.T") + ModuleDescriptor descriptor1 = newBuilder("m1") + .provides("p.S", List.of("q.T")) .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1); // m1 does not read a module that exports p - resolveRequires(finder, "m1"); - } - - - /** - * Test "provides p.S with q.T" where q.T is not local - */ - @Test(expectedExceptions = { ResolutionException.class }) - public void testProviderPackageNotLocal() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") - .exports("p") - .exports("q") - .build(); - - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") - .requires("m1") - .provides("p.S", "q.T") - .build(); - - ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2); - - // q.T not in module m2 - resolveRequires(finder, "m2"); + resolve(finder, "m1"); } @@ -2007,34 +1873,17 @@ public class ConfigurationTest { @Test(dataProvider = "platformmatch") public void testPlatformMatch(String s1, String s2) { - ModuleDescriptor.Builder builder - = ModuleDescriptor.module("m1").requires("m2"); - - String[] s = s1.split("-"); - if (!s[0].equals("*")) - builder.osName(s[0]); - if (!s[1].equals("*")) - builder.osArch(s[1]); - if (!s[2].equals("*")) - builder.osVersion(s[2]); - + Builder builder = newBuilder("m1").requires("m2"); + addPlatformConstraints(builder, s1); ModuleDescriptor descriptor1 = builder.build(); - builder = ModuleDescriptor.module("m2"); - - s = s2.split("-"); - if (!s[0].equals("*")) - builder.osName(s[0]); - if (!s[1].equals("*")) - builder.osArch(s[1]); - if (!s[2].equals("*")) - builder.osVersion(s[2]); - + builder = newBuilder("m2"); + addPlatformConstraints(builder, s2); ModuleDescriptor descriptor2 = builder.build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2); - Configuration cf = resolveRequires(finder, "m1"); + Configuration cf = resolve(finder, "m1"); assertTrue(cf.modules().size() == 2); assertTrue(cf.findModule("m1").isPresent()); @@ -2046,7 +1895,7 @@ public class ConfigurationTest { * platforms. */ @Test(dataProvider = "platformmismatch", - expectedExceptions = ResolutionException.class ) + expectedExceptions = FindException.class ) public void testPlatformMisMatch(String s1, String s2) { testPlatformMatch(s1, s2); } @@ -2057,16 +1906,67 @@ public class ConfigurationTest { @Test(expectedExceptions = { IllegalArgumentException.class }) public void testResolveRequiresWithNoParents() { ModuleFinder empty = ModuleFinder.of(); - Configuration.resolveRequires(empty, List.of(), empty, Set.of()); + Configuration.resolve(empty, List.of(), empty, Set.of()); } @Test(expectedExceptions = { IllegalArgumentException.class }) public void testResolveRequiresAndUsesWithNoParents() { ModuleFinder empty = ModuleFinder.of(); - Configuration.resolveRequiresAndUses(empty, List.of(), empty, Set.of()); + Configuration.resolveAndBind(empty, List.of(), empty, Set.of()); } + // parents with modules for specific platforms + + @Test(dataProvider = "platformmatch") + public void testResolveRequiresWithCompatibleParents(String s1, String s2) { + Builder builder = newBuilder("m1"); + addPlatformConstraints(builder, s1); + ModuleDescriptor descriptor1 = builder.build(); + + builder = newBuilder("m2"); + addPlatformConstraints(builder, s2); + ModuleDescriptor descriptor2 = builder.build(); + + ModuleFinder finder1 = ModuleUtils.finderOf(descriptor1); + Configuration cf1 = resolve(finder1, "m1"); + + ModuleFinder finder2 = ModuleUtils.finderOf(descriptor2); + Configuration cf2 = resolve(finder2, "m2"); + + Configuration cf3 = Configuration.resolve(ModuleFinder.of(), + List.of(cf1, cf2), + ModuleFinder.of(), + Set.of()); + assertTrue(cf3.parents().size() == 2); + } + + @Test(dataProvider = "platformmismatch", + expectedExceptions = IllegalArgumentException.class ) + public void testResolveRequiresWithConflictingParents(String s1, String s2) { + Builder builder = newBuilder("m1"); + addPlatformConstraints(builder, s1); + ModuleDescriptor descriptor1 = builder.build(); + + builder = newBuilder("m2"); + addPlatformConstraints(builder, s2); + ModuleDescriptor descriptor2 = builder.build(); + + ModuleFinder finder1 = ModuleUtils.finderOf(descriptor1); + Configuration cf1 = resolve(finder1, "m1"); + + ModuleFinder finder2 = ModuleUtils.finderOf(descriptor2); + Configuration cf2 = resolve(finder2, "m2"); + + // should throw IAE + Configuration.resolve(ModuleFinder.of(), + List.of(cf1, cf2), + ModuleFinder.of(), + Set.of()); + } + + + // null handling // finder1, finder2, roots @@ -2074,72 +1974,72 @@ public class ConfigurationTest { @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresWithNull1() { - resolveRequires((ModuleFinder)null, ModuleFinder.of()); + resolve((ModuleFinder)null, ModuleFinder.of()); } @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresWithNull2() { - resolveRequires(ModuleFinder.of(), (ModuleFinder)null); + resolve(ModuleFinder.of(), (ModuleFinder)null); } @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresWithNull3() { Configuration empty = Configuration.empty(); - Configuration.resolveRequires(null, List.of(empty), ModuleFinder.of(), Set.of()); + Configuration.resolve(null, List.of(empty), ModuleFinder.of(), Set.of()); } @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresWithNull4() { ModuleFinder empty = ModuleFinder.of(); - Configuration.resolveRequires(empty, null, empty, Set.of()); + Configuration.resolve(empty, null, empty, Set.of()); } @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresWithNull5() { Configuration cf = Layer.boot().configuration(); - Configuration.resolveRequires(ModuleFinder.of(), List.of(cf), null, Set.of()); + Configuration.resolve(ModuleFinder.of(), List.of(cf), null, Set.of()); } @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresWithNull6() { ModuleFinder empty = ModuleFinder.of(); Configuration cf = Layer.boot().configuration(); - Configuration.resolveRequires(empty, List.of(cf), empty, null); + Configuration.resolve(empty, List.of(cf), empty, null); } @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresAndUsesWithNull1() { - resolveRequiresAndUses((ModuleFinder) null, ModuleFinder.of()); + resolveAndBind((ModuleFinder) null, ModuleFinder.of()); } @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresAndUsesWithNull2() { - resolveRequiresAndUses(ModuleFinder.of(), (ModuleFinder) null); + resolveAndBind(ModuleFinder.of(), (ModuleFinder) null); } @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresAndUsesWithNull3() { Configuration empty = Configuration.empty(); - Configuration.resolveRequiresAndUses(null, List.of(empty), ModuleFinder.of(), Set.of()); + Configuration.resolveAndBind(null, List.of(empty), ModuleFinder.of(), Set.of()); } @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresAndUsesWithNull4() { ModuleFinder empty = ModuleFinder.of(); - Configuration.resolveRequiresAndUses(empty, null, empty, Set.of()); + Configuration.resolveAndBind(empty, null, empty, Set.of()); } @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresAndUsesWithNull5() { Configuration cf = Layer.boot().configuration(); - Configuration.resolveRequiresAndUses(ModuleFinder.of(), List.of(cf), null, Set.of()); + Configuration.resolveAndBind(ModuleFinder.of(), List.of(cf), null, Set.of()); } @Test(expectedExceptions = { NullPointerException.class }) public void testResolveRequiresAndUsesWithNull6() { ModuleFinder empty = ModuleFinder.of(); Configuration cf = Layer.boot().configuration(); - Configuration.resolveRequiresAndUses(empty, List.of(cf), empty, null); + Configuration.resolveAndBind(empty, List.of(cf), empty, null); } @Test(expectedExceptions = { NullPointerException.class }) @@ -2165,58 +2065,58 @@ public class ConfigurationTest { /** - * Invokes parent.resolveRequires(...) + * Invokes parent.resolve(...) */ - private Configuration resolveRequires(Configuration parent, - ModuleFinder before, - ModuleFinder after, - String... roots) { - return parent.resolveRequires(before, after, Set.of(roots)); + private Configuration resolve(Configuration parent, + ModuleFinder before, + ModuleFinder after, + String... roots) { + return parent.resolve(before, after, Set.of(roots)); } - private Configuration resolveRequires(Configuration parent, - ModuleFinder before, - String... roots) { - return resolveRequires(parent, before, ModuleFinder.of(), roots); + private Configuration resolve(Configuration parent, + ModuleFinder before, + String... roots) { + return resolve(parent, before, ModuleFinder.of(), roots); } - private Configuration resolveRequires(ModuleFinder before, - ModuleFinder after, - String... roots) { - return resolveRequires(Configuration.empty(), before, after, roots); + private Configuration resolve(ModuleFinder before, + ModuleFinder after, + String... roots) { + return resolve(Configuration.empty(), before, after, roots); } - private Configuration resolveRequires(ModuleFinder before, - String... roots) { - return resolveRequires(Configuration.empty(), before, roots); + private Configuration resolve(ModuleFinder before, + String... roots) { + return resolve(Configuration.empty(), before, roots); } /** - * Invokes parent.resolveRequiresAndUses(...) + * Invokes parent.resolveAndBind(...) */ - private Configuration resolveRequiresAndUses(Configuration parent, - ModuleFinder before, - ModuleFinder after, - String... roots) { - return parent.resolveRequiresAndUses(before, after, Set.of(roots)); + private Configuration resolveAndBind(Configuration parent, + ModuleFinder before, + ModuleFinder after, + String... roots) { + return parent.resolveAndBind(before, after, Set.of(roots)); } - private Configuration resolveRequiresAndUses(Configuration parent, - ModuleFinder before, - String... roots) { - return resolveRequiresAndUses(parent, before, ModuleFinder.of(), roots); + private Configuration resolveAndBind(Configuration parent, + ModuleFinder before, + String... roots) { + return resolveAndBind(parent, before, ModuleFinder.of(), roots); } - private Configuration resolveRequiresAndUses(ModuleFinder before, - ModuleFinder after, - String... roots) { - return resolveRequiresAndUses(Configuration.empty(), before, after, roots); + private Configuration resolveAndBind(ModuleFinder before, + ModuleFinder after, + String... roots) { + return resolveAndBind(Configuration.empty(), before, after, roots); } - private Configuration resolveRequiresAndUses(ModuleFinder before, - String... roots) { - return resolveRequiresAndUses(Configuration.empty(), before, roots); + private Configuration resolveAndBind(ModuleFinder before, + String... roots) { + return resolveAndBind(Configuration.empty(), before, roots); } @@ -2234,5 +2134,17 @@ public class ConfigurationTest { .anyMatch(mn2::equals); } - + /** + * Decodes the platform string and calls the builder osName/osArch/osVersion + * methods to set the platform constraints. + */ + static void addPlatformConstraints(Builder builder, String platformString) { + String[] s = platformString.split("-"); + if (!s[0].equals("*")) + builder.osName(s[0]); + if (!s[1].equals("*")) + builder.osArch(s[1]); + if (!s[2].equals("*")) + builder.osVersion(s[2]); + } } diff --git a/jdk/test/java/lang/module/ModuleDescriptorTest.java b/jdk/test/java/lang/module/ModuleDescriptorTest.java index 276ecf71048..b16b9e66e92 100644 --- a/jdk/test/java/lang/module/ModuleDescriptorTest.java +++ b/jdk/test/java/lang/module/ModuleDescriptorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,6 +24,7 @@ /** * @test * @modules java.base/jdk.internal.module + * java.base/jdk.internal.misc * @run testng ModuleDescriptorTest * @summary Basic test for java.lang.module.ModuleDescriptor and its builder */ @@ -42,14 +43,19 @@ import java.lang.module.ModuleDescriptor.Requires.Modifier; import java.lang.module.ModuleDescriptor.Version; import java.lang.reflect.Module; import java.nio.ByteBuffer; +import java.util.ArrayList; import java.util.Collections; import java.util.EnumSet; import java.util.HashSet; +import java.util.Iterator; import java.util.List; +import java.util.Objects; import java.util.Set; +import java.util.stream.Collectors; import static java.lang.module.ModuleDescriptor.Requires.Modifier.*; +import jdk.internal.misc.SharedSecrets; import jdk.internal.module.ModuleInfoWriter; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -84,21 +90,27 @@ public class ModuleDescriptorTest { // requires private Requires requires(Set mods, String mn) { - return ModuleDescriptor.module("m") - .requires(mods, mn) - .build() - .requires() - .iterator() - .next(); + return requires(mods, mn, null); } private Requires requires(Set mods, String mn, Version v) { - return ModuleDescriptor.module("m") - .requires(mods, mn, v) - .build() - .requires() - .iterator() - .next(); + Builder builder = ModuleDescriptor.newModule("m"); + if (v == null) { + builder.requires(mods, mn); + } else { + builder.requires(mods, mn, v); + } + Set requires = builder.build().requires(); + assertTrue(requires.size() == 2); + Iterator iterator = requires.iterator(); + Requires r = iterator.next(); + if (r.name().equals("java.base")) { + r = iterator.next(); + } else { + Requires other = iterator.next(); + assertEquals(other.name(), "java.base"); + } + return r; } private Requires requires(String mn) { @@ -107,7 +119,7 @@ public class ModuleDescriptorTest { public void testRequiresWithRequires() { Requires r1 = requires("foo"); - ModuleDescriptor descriptor = ModuleDescriptor.module("m").requires(r1).build(); + ModuleDescriptor descriptor = ModuleDescriptor.newModule("m").requires(r1).build(); Requires r2 = descriptor.requires().iterator().next(); assertEquals(r1, r2); } @@ -162,28 +174,28 @@ public class ModuleDescriptorTest { @Test(expectedExceptions = IllegalStateException.class) public void testRequiresWithDuplicatesRequires() { Requires r = requires("foo"); - ModuleDescriptor.module("m").requires(r).requires(r); + ModuleDescriptor.newModule("m").requires(r).requires(r); } @Test(expectedExceptions = IllegalArgumentException.class) public void testRequiresSelfWithRequires() { Requires r = requires("foo"); - ModuleDescriptor.module("foo").requires(r); + ModuleDescriptor.newModule("foo").requires(r); } @Test(expectedExceptions = IllegalArgumentException.class) public void testRequiresSelfWithNoModifier() { - ModuleDescriptor.module("m").requires("m"); + ModuleDescriptor.newModule("m").requires("m"); } @Test(expectedExceptions = IllegalArgumentException.class) public void testRequiresSelfWithOneModifier() { - ModuleDescriptor.module("m").requires(Set.of(TRANSITIVE), "m"); + ModuleDescriptor.newModule("m").requires(Set.of(TRANSITIVE), "m"); } @Test(expectedExceptions = IllegalArgumentException.class) public void testRequiresSelfWithAllModifiers() { - ModuleDescriptor.module("m").requires(EnumSet.allOf(Modifier.class), "m"); + ModuleDescriptor.newModule("m").requires(EnumSet.allOf(Modifier.class), "m"); } @Test(dataProvider = "invalidjavaidentifiers", @@ -194,17 +206,17 @@ public class ModuleDescriptorTest { @Test(expectedExceptions = NullPointerException.class) public void testRequiresWithNullRequires() { - ModuleDescriptor.module("m").requires((Requires) null); + ModuleDescriptor.newModule("m").requires((Requires) null); } @Test(expectedExceptions = NullPointerException.class) public void testRequiresWithNullModifiers() { - ModuleDescriptor.module("m").requires(null, "foo"); + ModuleDescriptor.newModule("m").requires(null, "foo"); } @Test(expectedExceptions = NullPointerException.class) public void testRequiresWithNullVersion() { - ModuleDescriptor.module("m").requires(Set.of(), "foo", null); + ModuleDescriptor.newModule("m").requires(Set.of(), "foo", null); } public void testRequiresCompare() { @@ -284,7 +296,7 @@ public class ModuleDescriptorTest { // exports private Exports exports(Set mods, String pn) { - return ModuleDescriptor.module("foo") + return ModuleDescriptor.newModule("foo") .exports(mods, pn) .build() .exports() @@ -297,7 +309,7 @@ public class ModuleDescriptorTest { } private Exports exports(Set mods, String pn, String target) { - return ModuleDescriptor.module("foo") + return ModuleDescriptor.newModule("foo") .exports(mods, pn, Set.of(target)) .build() .exports() @@ -312,7 +324,7 @@ public class ModuleDescriptorTest { public void testExportsExports() { Exports e1 = exports("p"); - ModuleDescriptor descriptor = ModuleDescriptor.module("m").exports(e1).build(); + ModuleDescriptor descriptor = ModuleDescriptor.newModule("m").exports(e1).build(); Exports e2 = descriptor.exports().iterator().next(); assertEquals(e1, e2); } @@ -341,7 +353,7 @@ public class ModuleDescriptorTest { targets.add("bar"); targets.add("gus"); Exports e - = ModuleDescriptor.module("foo") + = ModuleDescriptor.newModule("foo") .exports("p", targets) .build() .exports() @@ -380,69 +392,80 @@ public class ModuleDescriptorTest { @Test(expectedExceptions = IllegalStateException.class) public void testExportsWithDuplicate1() { Exports e = exports("p"); - ModuleDescriptor.module("foo").exports(e).exports(e); + ModuleDescriptor.newModule("foo").exports(e).exports(e); } @Test(expectedExceptions = IllegalStateException.class) public void testExportsWithDuplicate2() { - ModuleDescriptor.module("foo").exports("p").exports("p"); - } - - @Test(expectedExceptions = IllegalStateException.class) - public void testExportsOnContainedPackage() { - ModuleDescriptor.module("foo").contains("p").exports("p"); - } - - @Test(expectedExceptions = IllegalStateException.class) - public void testExportsToTargetOnContainedPackage() { - ModuleDescriptor.module("foo").contains("p").exports("p", Set.of("bar")); + ModuleDescriptor.newModule("foo").exports("p").exports("p"); } @Test(expectedExceptions = IllegalArgumentException.class ) public void testExportsWithEmptySet() { - ModuleDescriptor.module("foo").exports("p", Collections.emptySet()); + ModuleDescriptor.newModule("foo").exports("p", Collections.emptySet()); } @Test(dataProvider = "invalidjavaidentifiers", expectedExceptions = IllegalArgumentException.class ) public void testExportsWithBadName(String pn, String ignore) { - ModuleDescriptor.module("foo").exports(pn); + ModuleDescriptor.newModule("foo").exports(pn); } @Test(expectedExceptions = NullPointerException.class ) public void testExportsWithNullExports() { - ModuleDescriptor.module("foo").exports((Exports) null); + ModuleDescriptor.newModule("foo").exports((Exports) null); } @Test(expectedExceptions = NullPointerException.class ) public void testExportsWithNullTargets() { - ModuleDescriptor.module("foo").exports("p", (Set) null); + ModuleDescriptor.newModule("foo").exports("p", (Set) null); } - public void testExportsEqualsAndHashCode() { - Exports e1, e2; - - e1 = exports("p"); - e2 = exports("p"); + public void testExportsCompare() { + Exports e1 = exports("p"); + Exports e2 = exports("p"); assertEquals(e1, e2); assertTrue(e1.hashCode() == e2.hashCode()); + assertTrue(e1.compareTo(e2) == 0); + assertTrue(e2.compareTo(e1) == 0); + } - e1 = exports(Set.of(Exports.Modifier.SYNTHETIC), "p"); - e2 = exports(Set.of(Exports.Modifier.SYNTHETIC), "p"); + public void testExportsCompareWithSameModifiers() { + Exports e1 = exports(Set.of(Exports.Modifier.SYNTHETIC), "p"); + Exports e2 = exports(Set.of(Exports.Modifier.SYNTHETIC), "p"); assertEquals(e1, e2); assertTrue(e1.hashCode() == e2.hashCode()); + assertTrue(e1.compareTo(e2) == 0); + assertTrue(e2.compareTo(e1) == 0); + } - e1 = exports("p"); - e2 = exports("q"); + public void testExportsCompareWithDifferentModifiers() { + Exports e1 = exports(Set.of(Exports.Modifier.SYNTHETIC), "p"); + Exports e2 = exports("p"); assertNotEquals(e1, e2); + assertTrue(e1.compareTo(e2) == 1); + assertTrue(e2.compareTo(e1) == -1); + } - e1 = exports(Set.of(Exports.Modifier.SYNTHETIC), "p"); - e2 = exports(Set.of(), "p"); + public void testExportsCompareWithSameTargets() { + Exports e1 = exports("p", "x"); + Exports e2 = exports("p", "x"); + assertEquals(e1, e2); + assertTrue(e1.hashCode() == e2.hashCode()); + assertTrue(e1.compareTo(e2) == 0); + assertTrue(e2.compareTo(e1) == 0); + } + + public void testExportsCompareWithDifferentTargets() { + Exports e1 = exports("p", "y"); + Exports e2 = exports("p", "x"); assertNotEquals(e1, e2); + assertTrue(e1.compareTo(e2) == 1); + assertTrue(e2.compareTo(e1) == -1); } public void testExportsToString() { - String s = ModuleDescriptor.module("foo") + String s = ModuleDescriptor.newModule("foo") .exports("p1", Set.of("bar")) .build() .exports() @@ -457,7 +480,7 @@ public class ModuleDescriptorTest { // opens private Opens opens(Set mods, String pn) { - return ModuleDescriptor.module("foo") + return ModuleDescriptor.newModule("foo") .opens(mods, pn) .build() .opens() @@ -470,7 +493,7 @@ public class ModuleDescriptorTest { } private Opens opens(Set mods, String pn, String target) { - return ModuleDescriptor.module("foo") + return ModuleDescriptor.newModule("foo") .opens(mods, pn, Set.of(target)) .build() .opens() @@ -484,7 +507,7 @@ public class ModuleDescriptorTest { public void testOpensOpens() { Opens o1 = opens("p"); - ModuleDescriptor descriptor = ModuleDescriptor.module("m").opens(o1).build(); + ModuleDescriptor descriptor = ModuleDescriptor.newModule("m").opens(o1).build(); Opens o2 = descriptor.opens().iterator().next(); assertEquals(o1, o2); } @@ -513,7 +536,7 @@ public class ModuleDescriptorTest { Set targets = new HashSet<>(); targets.add("bar"); targets.add("gus"); - Opens o = ModuleDescriptor.module("foo") + Opens o = ModuleDescriptor.newModule("foo") .opens("p", targets) .build() .opens() @@ -528,98 +551,83 @@ public class ModuleDescriptorTest { assertTrue(o.targets().contains("gus")); } - /* - - public void testOpensToAllWithModifier() { - Exports e = exports(Set.of(Exports.Modifier.SYNTHETIC), "p"); - assertEquals(e, e); - assertTrue(e.modifiers().size() == 1); - assertTrue(e.modifiers().contains(Exports.Modifier.SYNTHETIC)); - assertEquals(e.source(), "p"); - assertFalse(e.isQualified()); - assertTrue(e.targets().isEmpty()); - } - - public void testOpensToTargetWithModifier() { - Exports e = exports(Set.of(Exports.Modifier.SYNTHETIC), "p", Set.of("bar")); - assertEquals(e, e); - assertTrue(e.modifiers().size() == 1); - assertTrue(e.modifiers().contains(Exports.Modifier.SYNTHETIC)); - assertEquals(e.source(), "p"); - assertTrue(e.isQualified()); - assertTrue(e.targets().size() == 1); - assertTrue(e.targets().contains("bar")); - } - - - */ - @Test(expectedExceptions = IllegalStateException.class) public void testOpensWithDuplicate1() { Opens o = opens("p"); - ModuleDescriptor.module("foo").opens(o).opens(o); + ModuleDescriptor.newModule("foo").opens(o).opens(o); } @Test(expectedExceptions = IllegalStateException.class) public void testOpensWithDuplicate2() { - ModuleDescriptor.module("foo").opens("p").opens("p"); - } - - @Test(expectedExceptions = IllegalStateException.class) - public void testOpensOnContainedPackage() { - ModuleDescriptor.module("foo").contains("p").opens("p"); - } - - @Test(expectedExceptions = IllegalStateException.class) - public void testOpensToTargetOnContainedPackage() { - ModuleDescriptor.module("foo").contains("p").opens("p", Set.of("bar")); + ModuleDescriptor.newModule("foo").opens("p").opens("p"); } @Test(expectedExceptions = IllegalArgumentException.class ) public void testOpensWithEmptySet() { - ModuleDescriptor.module("foo").opens("p", Collections.emptySet()); + ModuleDescriptor.newModule("foo").opens("p", Collections.emptySet()); } @Test(dataProvider = "invalidjavaidentifiers", expectedExceptions = IllegalArgumentException.class ) public void testOpensWithBadName(String pn, String ignore) { - ModuleDescriptor.module("foo").opens(pn); + ModuleDescriptor.newModule("foo").opens(pn); } @Test(expectedExceptions = NullPointerException.class ) public void testOpensWithNullExports() { - ModuleDescriptor.module("foo").opens((Opens) null); + ModuleDescriptor.newModule("foo").opens((Opens) null); } @Test(expectedExceptions = NullPointerException.class ) public void testOpensWithNullTargets() { - ModuleDescriptor.module("foo").opens("p", (Set) null); + ModuleDescriptor.newModule("foo").opens("p", (Set) null); } - public void testOpensEqualsAndHashCode() { - Opens o1, o2; - - o1 = opens("p"); - o2 = opens("p"); - assertEquals(o1, o2); - assertTrue(o1.hashCode() == o1.hashCode()); - - o1 = opens(Set.of(Opens.Modifier.SYNTHETIC), "p"); - o2 = opens(Set.of(Opens.Modifier.SYNTHETIC), "p"); + public void testOpensCompare() { + Opens o1 = opens("p"); + Opens o2 = opens("p"); assertEquals(o1, o2); assertTrue(o1.hashCode() == o2.hashCode()); + assertTrue(o1.compareTo(o2) == 0); + assertTrue(o2.compareTo(o1) == 0); + } - o1 = opens("p"); - o2 = opens("q"); - assertNotEquals(o1, o2); + public void testOpensCompareWithSameModifiers() { + Opens o1 = opens(Set.of(Opens.Modifier.SYNTHETIC), "p"); + Opens o2 = opens(Set.of(Opens.Modifier.SYNTHETIC), "p"); + assertEquals(o1, o2); + assertTrue(o1.hashCode() == o2.hashCode()); + assertTrue(o1.compareTo(o2) == 0); + assertTrue(o2.compareTo(o1) == 0); + } - o1 = opens(Set.of(Opens.Modifier.SYNTHETIC), "p"); - o2 = opens(Set.of(), "p"); + public void testOpensCompareWithDifferentModifiers() { + Opens o1 = opens(Set.of(Opens.Modifier.SYNTHETIC), "p"); + Opens o2 = opens("p"); assertNotEquals(o1, o2); + assertTrue(o1.compareTo(o2) == 1); + assertTrue(o2.compareTo(o1) == -1); + } + + public void testOpensCompareWithSameTargets() { + Opens o1 = opens("p", "x"); + Opens o2 = opens("p", "x"); + assertEquals(o1, o2); + assertTrue(o1.hashCode() == o2.hashCode()); + assertTrue(o1.compareTo(o2) == 0); + assertTrue(o2.compareTo(o1) == 0); + } + + public void testOpensCompareWithDifferentTargets() { + Opens o1 = opens("p", "y"); + Opens o2 = opens("p", "x"); + assertNotEquals(o1, o2); + assertTrue(o1.compareTo(o2) == 1); + assertTrue(o2.compareTo(o1) == -1); } public void testOpensToString() { - String s = ModuleDescriptor.module("foo") + String s = ModuleDescriptor.newModule("foo") .opens("p1", Set.of("bar")) .build() .opens() @@ -635,7 +643,7 @@ public class ModuleDescriptorTest { public void testUses() { Set uses - = ModuleDescriptor.module("foo") + = ModuleDescriptor.newModule("foo") .uses("p.S") .uses("q.S") .build() @@ -647,30 +655,44 @@ public class ModuleDescriptorTest { @Test(expectedExceptions = IllegalStateException.class) public void testUsesWithDuplicate() { - ModuleDescriptor.module("foo").uses("p.S").uses("p.S"); + ModuleDescriptor.newModule("foo").uses("p.S").uses("p.S"); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testUsesWithSimpleIdentifier() { + ModuleDescriptor.newModule("foo").uses("S"); } @Test(dataProvider = "invalidjavaidentifiers", expectedExceptions = IllegalArgumentException.class ) public void testUsesWithBadName(String service, String ignore) { - ModuleDescriptor.module("foo").uses(service); + ModuleDescriptor.newModule("foo").uses(service); } // provides private Provides provides(String st, String pc) { - return ModuleDescriptor.module("foo") - .provides(st, pc) + return ModuleDescriptor.newModule("foo") + .provides(st, List.of(pc)) .build() .provides() .iterator() .next(); } + private Provides provides(String st, List pns) { + return ModuleDescriptor.newModule("foo") + .provides(st, pns) + .build() + .provides() + .iterator() + .next(); + } + public void testProvidesWithProvides() { Provides p1 = provides("p.S", "q.S1"); - ModuleDescriptor descriptor = ModuleDescriptor.module("m") + ModuleDescriptor descriptor = ModuleDescriptor.newModule("m") .provides(p1) .build(); Provides p2 = descriptor.provides().iterator().next(); @@ -679,7 +701,7 @@ public class ModuleDescriptorTest { public void testProvides() { - Set set = ModuleDescriptor.module("foo") + Set set = ModuleDescriptor.newModule("foo") .provides("p.S", List.of("q.P1", "q.P2")) .build() .provides(); @@ -696,59 +718,86 @@ public class ModuleDescriptorTest { @Test(expectedExceptions = IllegalStateException.class ) public void testProvidesWithDuplicateProvides() { Provides p = provides("p.S", "q.S2"); - ModuleDescriptor.module("m").provides("p.S", "q.S1").provides(p); + ModuleDescriptor.newModule("m").provides("p.S", List.of("q.S1")).provides(p); } @Test(expectedExceptions = IllegalArgumentException.class ) public void testProvidesWithEmptySet() { - ModuleDescriptor.module("foo").provides("p.Service", Collections.emptyList()); + ModuleDescriptor.newModule("foo").provides("p.Service", Collections.emptyList()); + } + + @Test(expectedExceptions = IllegalArgumentException.class ) + public void testProvidesWithSimpleIdentifier1() { + ModuleDescriptor.newModule("foo").provides("S", List.of("q.P")); + } + + @Test(expectedExceptions = IllegalArgumentException.class ) + public void testProvidesWithSimpleIdentifier2() { + ModuleDescriptor.newModule("foo").provides("p.S", List.of("P")); } @Test(dataProvider = "invalidjavaidentifiers", expectedExceptions = IllegalArgumentException.class ) public void testProvidesWithBadService(String service, String ignore) { - ModuleDescriptor.module("foo").provides(service, "p.Provider"); + ModuleDescriptor.newModule("foo").provides(service, List.of("p.Provider")); } @Test(dataProvider = "invalidjavaidentifiers", expectedExceptions = IllegalArgumentException.class ) public void testProvidesWithBadProvider(String provider, String ignore) { - ModuleDescriptor.module("foo").provides("p.Service", provider); + List names = new ArrayList<>(); // allows nulls + names.add(provider); + ModuleDescriptor.newModule("foo").provides("p.Service", names); } @Test(expectedExceptions = NullPointerException.class ) public void testProvidesWithNullProvides() { - ModuleDescriptor.module("foo").provides((Provides) null); + ModuleDescriptor.newModule("foo").provides((Provides) null); } @Test(expectedExceptions = NullPointerException.class ) public void testProvidesWithNullProviders() { - ModuleDescriptor.module("foo").provides("p.S", (List) null); + ModuleDescriptor.newModule("foo").provides("p.S", (List) null); } - public void testProvidesEqualsAndHashCode() { - Provides p1, p2; - - p1 = provides("p.S", "q.S1"); - p2 = provides("p.S", "q.S1"); + public void testProvidesCompare() { + Provides p1 = provides("p.S", "q.S1"); + Provides p2 = provides("p.S", "q.S1"); assertEquals(p1, p2); assertTrue(p1.hashCode() == p2.hashCode()); - - p1 = provides("p.S", "q.S1"); - p2 = provides("p.S", "q.S2"); - assertNotEquals(p1, p2); - - p1 = provides("p.S", "q.S1"); - p2 = provides("p.S2", "q.S1"); - assertNotEquals(p1, p2); + assertTrue(p1.compareTo(p2) == 0); + assertTrue(p2.compareTo(p1) == 0); } - // contains + public void testProvidesCompareWithDifferentService() { + Provides p1 = provides("p.S2", "q.S1"); + Provides p2 = provides("p.S1", "q.S1"); + assertNotEquals(p1, p2); + assertTrue(p1.compareTo(p2) == 1); + assertTrue(p2.compareTo(p1) == -1); + } - public void testContains() { - Set packages = ModuleDescriptor.module("foo") - .contains("p") - .contains("q") + public void testProvidesCompareWithDifferentProviders1() { + Provides p1 = provides("p.S", "q.S2"); + Provides p2 = provides("p.S", "q.S1"); + assertNotEquals(p1, p2); + assertTrue(p1.compareTo(p2) == 1); + assertTrue(p2.compareTo(p1) == -1); + } + + public void testProvidesCompareWithDifferentProviders2() { + Provides p1 = provides("p.S", List.of("q.S1", "q.S2")); + Provides p2 = provides("p.S", "q.S1"); + assertNotEquals(p1, p2); + assertTrue(p1.compareTo(p2) == 1); + assertTrue(p2.compareTo(p1) == -1); + } + + // packages + + public void testPackages1() { + Set packages = ModuleDescriptor.newModule("foo") + .packages(Set.of("p", "q")) .build() .packages(); assertTrue(packages.size() == 2); @@ -756,56 +805,147 @@ public class ModuleDescriptorTest { assertTrue(packages.contains("q")); } - public void testContainsWithEmptySet() { - Set packages = ModuleDescriptor.module("foo") - .contains(Collections.emptySet()) + public void testPackages2() { + Set packages = ModuleDescriptor.newModule("foo") + .packages(Set.of("p")) + .packages(Set.of("q")) + .build() + .packages(); + assertTrue(packages.size() == 2); + assertTrue(packages.contains("p")); + assertTrue(packages.contains("q")); + } + + + public void testPackagesWithEmptySet() { + Set packages = ModuleDescriptor.newModule("foo") + .packages(Collections.emptySet()) .build() .packages(); assertTrue(packages.size() == 0); } - @Test(expectedExceptions = IllegalStateException.class) - public void testContainsWithDuplicate() { - ModuleDescriptor.module("foo").contains("p").contains("p"); + public void testPackagesDuplicate() { + Set packages = ModuleDescriptor.newModule("foo") + .packages(Set.of("p")) + .packages(Set.of("p")) + .build() + .packages(); + assertTrue(packages.size() == 1); + assertTrue(packages.contains("p")); } - @Test(expectedExceptions = IllegalStateException.class) - public void testContainsWithExportedPackage() { - ModuleDescriptor.module("foo").exports("p").contains("p"); + public void testPackagesAndExportsPackage1() { + Set packages = ModuleDescriptor.newModule("foo") + .packages(Set.of("p")) + .exports("p") + .build() + .packages(); + assertTrue(packages.size() == 1); + assertTrue(packages.contains("p")); + } + + public void testPackagesAndExportsPackage2() { + Set packages = ModuleDescriptor.newModule("foo") + .exports("p") + .packages(Set.of("p")) + .build() + .packages(); + assertTrue(packages.size() == 1); + assertTrue(packages.contains("p")); + } + + public void testPackagesAndOpensPackage1() { + Set packages = ModuleDescriptor.newModule("foo") + .packages(Set.of("p")) + .opens("p") + .build() + .packages(); + assertTrue(packages.size() == 1); + assertTrue(packages.contains("p")); + } + + public void testPackagesAndOpensPackage2() { + Set packages = ModuleDescriptor.newModule("foo") + .opens("p") + .packages(Set.of("p")) + .build() + .packages(); + assertTrue(packages.size() == 1); + assertTrue(packages.contains("p")); + } + + public void testPackagesAndProvides1() { + Set packages = ModuleDescriptor.newModule("foo") + .packages(Set.of("p")) + .provides("q.S", List.of("p.T")) + .build() + .packages(); + assertTrue(packages.size() == 1); + assertTrue(packages.contains("p")); + } + + public void testPackagesAndProvides2() { + Set packages = ModuleDescriptor.newModule("foo") + .provides("q.S", List.of("p.T")) + .packages(Set.of("p")) + .build() + .packages(); + assertTrue(packages.size() == 1); + assertTrue(packages.contains("p")); + } + + public void testPackagesAndMainClass1() { + Set packages = ModuleDescriptor.newModule("foo") + .packages(Set.of("p")) + .mainClass("p.Main") + .build() + .packages(); + assertTrue(packages.size() == 1); + assertTrue(packages.contains("p")); + } + + public void testPackagesAndMainClass2() { + Set packages = ModuleDescriptor.newModule("foo") + .mainClass("p.Main") + .packages(Set.of("p")) + .build() + .packages(); + assertTrue(packages.size() == 1); + assertTrue(packages.contains("p")); + } + + public void testPackagesAndAll() { + Set packages = ModuleDescriptor.newModule("foo") + .exports("p1") + .opens("p2") + .packages(Set.of("p3")) + .provides("q.S", List.of("p4.T")) + .mainClass("p5.Main") + .build() + .packages(); + assertTrue(Objects.equals(packages, Set.of("p1", "p2", "p3", "p4", "p5"))); } @Test(dataProvider = "invalidjavaidentifiers", expectedExceptions = IllegalArgumentException.class ) - public void testContainsWithBadName(String pn, String ignore) { - ModuleDescriptor.module("foo").contains(pn); + public void testPackagesWithBadName(String pn, String ignore) { + Set pkgs = new HashSet<>(); // allows nulls + pkgs.add(pn); + ModuleDescriptor.newModule("foo").packages(pkgs); } - - // packages - - public void testPackages() { - Set packages = ModuleDescriptor.module("foo") - .exports("p") - .contains("q") - .build() - .packages(); - assertTrue(packages.size() == 2); - assertTrue(packages.contains("p")); - assertTrue(packages.contains("q")); - } - - // name public void testModuleName() { - String mn = ModuleDescriptor.module("foo").build().name(); + String mn = ModuleDescriptor.newModule("foo").build().name(); assertEquals(mn, "foo"); } @Test(dataProvider = "invalidjavaidentifiers", expectedExceptions = IllegalArgumentException.class ) public void testBadModuleName(String mn, String ignore) { - ModuleDescriptor.module(mn); + ModuleDescriptor.newModule(mn); } @@ -813,7 +953,7 @@ public class ModuleDescriptorTest { public void testVersion1() { Version v1 = Version.parse("1.0"); - Version v2 = ModuleDescriptor.module("foo") + Version v2 = ModuleDescriptor.newModule("foo") .version(v1) .build() .version() @@ -823,7 +963,7 @@ public class ModuleDescriptorTest { public void testVersion2() { String vs = "1.0"; - Version v1 = ModuleDescriptor.module("foo") + Version v1 = ModuleDescriptor.newModule("foo") .version(vs) .build() .version() @@ -834,86 +974,178 @@ public class ModuleDescriptorTest { @Test(expectedExceptions = NullPointerException.class ) public void testNullVersion1() { - ModuleDescriptor.module("foo").version((Version) null); + ModuleDescriptor.newModule("foo").version((Version) null); } @Test(expectedExceptions = IllegalArgumentException.class ) public void testNullVersion2() { - ModuleDescriptor.module("foo").version((String) null); + ModuleDescriptor.newModule("foo").version((String) null); } @Test(expectedExceptions = IllegalArgumentException.class ) public void testEmptyVersion() { - ModuleDescriptor.module("foo").version(""); + ModuleDescriptor.newModule("foo").version(""); } // toNameAndVersion public void testToNameAndVersion() { - ModuleDescriptor md1 = ModuleDescriptor.module("foo").build(); + ModuleDescriptor md1 = ModuleDescriptor.newModule("foo").build(); assertEquals(md1.toNameAndVersion(), "foo"); - ModuleDescriptor md2 = ModuleDescriptor.module("foo").version("1.0").build(); + ModuleDescriptor md2 = ModuleDescriptor.newModule("foo").version("1.0").build(); assertEquals(md2.toNameAndVersion(), "foo@1.0"); } // open modules - public void testOpenModules() { - ModuleDescriptor descriptor = ModuleDescriptor.openModule("m") - .requires("java.base") - .contains("p") + public void testOpenModule() { + ModuleDescriptor descriptor = ModuleDescriptor.newOpenModule("foo") + .requires("bar") + .exports("p") + .provides("p.Service", List.of("q.ServiceImpl")) .build(); + + // modifiers + assertTrue(descriptor.modifiers().contains(ModuleDescriptor.Modifier.OPEN)); assertTrue(descriptor.isOpen()); - assertTrue(descriptor.packages().size() == 1); - assertTrue(descriptor.packages().contains("p")); - assertTrue(descriptor.exports().isEmpty()); + + // requires + assertTrue(descriptor.requires().size() == 2); + Set names = descriptor.requires() + .stream() + .map(Requires::name) + .collect(Collectors.toSet()); + assertEquals(names, Set.of("bar", "java.base")); + + // packages + assertEquals(descriptor.packages(), Set.of("p", "q")); + + // exports + assertTrue(descriptor.exports().size() == 1); + names = descriptor.exports() + .stream() + .map(Exports::source) + .collect(Collectors.toSet()); + assertEquals(names, Set.of("p")); + + // opens + assertTrue(descriptor.opens().isEmpty()); } @Test(expectedExceptions = IllegalStateException.class) - public void testOpensOnWeakModule1() { - ModuleDescriptor.openModule("foo").opens("p"); + public void testOpensOnOpenModule1() { + ModuleDescriptor.newOpenModule("foo").opens("p"); } @Test(expectedExceptions = IllegalStateException.class) - public void testOpensOnWeakModule2() { - ModuleDescriptor.openModule("foo").opens("p", Set.of("bar")); + public void testOpensOnOpenModule2() { + ModuleDescriptor.newOpenModule("foo").opens("p", Set.of("bar")); } public void testIsOpen() { - assertFalse(ModuleDescriptor.module("m").build().isOpen()); - assertFalse(ModuleDescriptor.automaticModule("m").build().isOpen()); - assertTrue(ModuleDescriptor.openModule("m").build().isOpen()); + assertFalse(ModuleDescriptor.newModule("m").build().isOpen()); + assertFalse(ModuleDescriptor.newAutomaticModule("m").build().isOpen()); + assertTrue(ModuleDescriptor.newOpenModule("m").build().isOpen()); } // automatic modules + public void testAutomaticModule() { + ModuleDescriptor descriptor = ModuleDescriptor.newAutomaticModule("foo") + .packages(Set.of("p")) + .provides("p.Service", List.of("q.ServiceImpl")) + .build(); + + // modifiers + assertTrue(descriptor.modifiers().contains(ModuleDescriptor.Modifier.AUTOMATIC)); + assertTrue(descriptor.isAutomatic()); + + // requires + assertTrue(descriptor.requires().size() == 1); + Set names = descriptor.requires() + .stream() + .map(Requires::name) + .collect(Collectors.toSet()); + assertEquals(names, Set.of("java.base")); + + // packages + assertEquals(descriptor.packages(), Set.of("p", "q")); + assertTrue(descriptor.exports().isEmpty()); + assertTrue(descriptor.opens().isEmpty()); + } + + @Test(expectedExceptions = IllegalStateException.class) + public void testRequiresOnAutomaticModule() { + ModuleDescriptor.newAutomaticModule("foo").requires("java.base"); + } + + @Test(expectedExceptions = IllegalStateException.class) + public void testExportsOnAutomaticModule1() { + ModuleDescriptor.newAutomaticModule("foo").exports("p"); + } + + @Test(expectedExceptions = IllegalStateException.class) + public void testExportsOnAutomaticModule2() { + ModuleDescriptor.newAutomaticModule("foo").exports("p", Set.of("bar")); + } + + @Test(expectedExceptions = IllegalStateException.class) + public void testOpensOnAutomaticModule1() { + ModuleDescriptor.newAutomaticModule("foo").opens("p"); + } + + @Test(expectedExceptions = IllegalStateException.class) + public void testOpensOnAutomaticModule2() { + ModuleDescriptor.newAutomaticModule("foo").opens("p", Set.of("bar")); + } + + @Test(expectedExceptions = IllegalStateException.class) + public void testUsesOnAutomaticModule() { + ModuleDescriptor.newAutomaticModule("foo").uses("p.Service"); + } + public void testIsAutomatic() { - ModuleDescriptor descriptor1 = ModuleDescriptor.module("foo").build(); + ModuleDescriptor descriptor1 = ModuleDescriptor.newModule("foo").build(); assertFalse(descriptor1.isAutomatic()); - ModuleDescriptor descriptor2 = ModuleDescriptor.openModule("foo").build(); + ModuleDescriptor descriptor2 = ModuleDescriptor.newOpenModule("foo").build(); assertFalse(descriptor2.isAutomatic()); - ModuleDescriptor descriptor3 = ModuleDescriptor.automaticModule("foo").build(); + ModuleDescriptor descriptor3 = ModuleDescriptor.newAutomaticModule("foo").build(); assertTrue(descriptor3.isAutomatic()); } - // isSynthetic - public void testIsSynthetic() { - assertFalse(Object.class.getModule().getDescriptor().isSynthetic()); - ModuleDescriptor descriptor1 = ModuleDescriptor.module("foo").build(); - assertFalse(descriptor1.isSynthetic()); + // newModule with modifiers - ModuleDescriptor descriptor2 = ModuleDescriptor.openModule("foo").build(); - assertFalse(descriptor2.isSynthetic()); + public void testNewModuleToBuildAutomaticModule() { + Set ms = Set.of(ModuleDescriptor.Modifier.AUTOMATIC); + ModuleDescriptor descriptor = ModuleDescriptor.newModule("foo", ms).build(); + assertTrue(descriptor.modifiers().equals(ms)); + assertTrue(descriptor.isAutomatic()); + } - ModuleDescriptor descriptor3 = ModuleDescriptor.automaticModule("foo").build(); - assertFalse(descriptor3.isSynthetic()); + public void testNewModuleToBuildOpenModule() { + Set ms = Set.of(ModuleDescriptor.Modifier.OPEN); + ModuleDescriptor descriptor = ModuleDescriptor.newModule("foo", ms).build(); + assertTrue(descriptor.modifiers().equals(ms)); + assertTrue(descriptor.isOpen()); + + ms = Set.of(ModuleDescriptor.Modifier.OPEN, ModuleDescriptor.Modifier.SYNTHETIC); + descriptor = ModuleDescriptor.newModule("foo", ms).build(); + assertTrue(descriptor.modifiers().equals(ms)); + assertTrue(descriptor.isOpen()); + } + + @Test(expectedExceptions = IllegalArgumentException.class) + public void testNewModuleToBuildAutomaticAndOpenModule() { + Set ms = Set.of(ModuleDescriptor.Modifier.AUTOMATIC, + ModuleDescriptor.Modifier.OPEN); + ModuleDescriptor.newModule("foo", ms); } @@ -921,14 +1153,19 @@ public class ModuleDescriptorTest { public void testMainClass() { String mainClass - = ModuleDescriptor.module("foo").mainClass("p.Main").build().mainClass().get(); + = ModuleDescriptor.newModule("foo").mainClass("p.Main").build().mainClass().get(); assertEquals(mainClass, "p.Main"); } + @Test(expectedExceptions = IllegalArgumentException.class) + public void testMainClassWithSimpleIdentifier() { + ModuleDescriptor.newModule("foo").mainClass("Main"); + } + @Test(dataProvider = "invalidjavaidentifiers", expectedExceptions = IllegalArgumentException.class ) public void testMainClassWithBadName(String mainClass, String ignore) { - Builder builder = ModuleDescriptor.module("foo"); + Builder builder = ModuleDescriptor.newModule("foo"); builder.mainClass(mainClass); } @@ -936,54 +1173,54 @@ public class ModuleDescriptorTest { // osName public void testOsName() { - String osName = ModuleDescriptor.module("foo").osName("Linux").build().osName().get(); + String osName = ModuleDescriptor.newModule("foo").osName("Linux").build().osName().get(); assertEquals(osName, "Linux"); } @Test(expectedExceptions = IllegalArgumentException.class) public void testNullOsName() { - ModuleDescriptor.module("foo").osName(null); + ModuleDescriptor.newModule("foo").osName(null); } @Test(expectedExceptions = IllegalArgumentException.class) public void testEmptyOsName() { - ModuleDescriptor.module("foo").osName(""); + ModuleDescriptor.newModule("foo").osName(""); } // osArch public void testOsArch() { - String osArch = ModuleDescriptor.module("foo").osName("arm").build().osName().get(); + String osArch = ModuleDescriptor.newModule("foo").osName("arm").build().osName().get(); assertEquals(osArch, "arm"); } @Test(expectedExceptions = IllegalArgumentException.class) public void testNullOsArch() { - ModuleDescriptor.module("foo").osArch(null); + ModuleDescriptor.newModule("foo").osArch(null); } @Test(expectedExceptions = IllegalArgumentException.class) public void testEmptyOsArch() { - ModuleDescriptor.module("foo").osArch(""); + ModuleDescriptor.newModule("foo").osArch(""); } // osVersion public void testOsVersion() { - String osVersion = ModuleDescriptor.module("foo").osName("11.2").build().osName().get(); + String osVersion = ModuleDescriptor.newModule("foo").osName("11.2").build().osName().get(); assertEquals(osVersion, "11.2"); } @Test(expectedExceptions = IllegalArgumentException.class) public void testNullOsVersion() { - ModuleDescriptor.module("foo").osVersion(null); + ModuleDescriptor.newModule("foo").osVersion(null); } @Test(expectedExceptions = IllegalArgumentException.class) public void testEmptyOsVersion() { - ModuleDescriptor.module("foo").osVersion(""); + ModuleDescriptor.newModule("foo").osVersion(""); } // reads @@ -1023,7 +1260,7 @@ public class ModuleDescriptorTest { * Test ModuleDescriptor with a packager finder */ public void testReadsWithPackageFinder() throws Exception { - ModuleDescriptor descriptor = ModuleDescriptor.module("foo") + ModuleDescriptor descriptor = ModuleDescriptor.newModule("foo") .requires("java.base") .build(); @@ -1044,7 +1281,7 @@ public class ModuleDescriptorTest { */ @Test(expectedExceptions = InvalidModuleDescriptorException.class) public void testReadsWithBadPackageFinder() throws Exception { - ModuleDescriptor descriptor = ModuleDescriptor.module("foo") + ModuleDescriptor descriptor = ModuleDescriptor.newModule("foo") .requires("java.base") .exports("p") .build(); @@ -1077,7 +1314,7 @@ public class ModuleDescriptorTest { @Test(expectedExceptions = InvalidModuleDescriptorException.class) public void testReadOfJavaBaseWithRequires() { ModuleDescriptor descriptor - = ModuleDescriptor.module("java.base") + = ModuleDescriptor.newModule("java.base") .requires("other") .build(); ByteBuffer bb = ModuleInfoWriter.toByteBuffer(descriptor); @@ -1087,7 +1324,8 @@ public class ModuleDescriptorTest { // The requires table must have an entry for java.base @Test(expectedExceptions = InvalidModuleDescriptorException.class) public void testReadWithEmptyRequires() { - ModuleDescriptor descriptor = ModuleDescriptor.module("m1").build(); + ModuleDescriptor descriptor = SharedSecrets.getJavaLangModuleAccess() + .newModuleBuilder("m1", false, Set.of()).build(); ByteBuffer bb = ModuleInfoWriter.toByteBuffer(descriptor); ModuleDescriptor.read(bb); } @@ -1095,10 +1333,8 @@ public class ModuleDescriptorTest { // The requires table must have an entry for java.base @Test(expectedExceptions = InvalidModuleDescriptorException.class) public void testReadWithNoRequiresBase() { - ModuleDescriptor descriptor - = ModuleDescriptor.module("m1") - .requires("m2") - .build(); + ModuleDescriptor descriptor = SharedSecrets.getJavaLangModuleAccess() + .newModuleBuilder("m1", false, Set.of()).requires("m2").build(); ByteBuffer bb = ModuleInfoWriter.toByteBuffer(descriptor); ModuleDescriptor.read(bb); } @@ -1138,22 +1374,50 @@ public class ModuleDescriptorTest { // equals/hashCode/compareTo/toString public void testEqualsAndHashCode() { - ModuleDescriptor md1 = ModuleDescriptor.module("foo").build(); - ModuleDescriptor md2 = ModuleDescriptor.module("foo").build(); + ModuleDescriptor md1 = ModuleDescriptor.newModule("m").build(); + ModuleDescriptor md2 = ModuleDescriptor.newModule("m").build(); assertEquals(md1, md1); assertEquals(md1.hashCode(), md2.hashCode()); + assertTrue(md1.compareTo(md2) == 0); + assertTrue(md2.compareTo(md1) == 0); } - public void testCompare() { - ModuleDescriptor md1 = ModuleDescriptor.module("foo").build(); - ModuleDescriptor md2 = ModuleDescriptor.module("bar").build(); - int n = "foo".compareTo("bar"); - assertTrue(md1.compareTo(md2) == n); - assertTrue(md2.compareTo(md1) == -n); + @DataProvider(name = "sortedModuleDescriptors") + public Object[][] sortedModuleDescriptors() { + return new Object[][]{ + + { ModuleDescriptor.newModule("m2").build(), + ModuleDescriptor.newModule("m1").build() + }, + + { ModuleDescriptor.newModule("m").version("2").build(), + ModuleDescriptor.newModule("m").version("1").build() + }, + + { ModuleDescriptor.newModule("m").version("1").build(), + ModuleDescriptor.newModule("m").build() + }, + + { ModuleDescriptor.newOpenModule("m").build(), + ModuleDescriptor.newModule("m").build() + }, + + }; + } + + @Test(dataProvider = "sortedModuleDescriptors") + public void testCompare(ModuleDescriptor md1, ModuleDescriptor md2) { + assertNotEquals(md1, md2); + assertTrue(md1.compareTo(md2) == 1); + assertTrue(md2.compareTo(md1) == -1); } public void testToString() { - String s = ModuleDescriptor.module("m1").requires("m2").exports("p1").build().toString(); + String s = ModuleDescriptor.newModule("m1") + .requires("m2") + .exports("p1") + .build() + .toString(); assertTrue(s.contains("m1")); assertTrue(s.contains("m2")); assertTrue(s.contains("p1")); diff --git a/jdk/test/java/lang/module/ModuleFinderTest.java b/jdk/test/java/lang/module/ModuleFinderTest.java index 278b4b98714..29d8f234c8b 100644 --- a/jdk/test/java/lang/module/ModuleFinderTest.java +++ b/jdk/test/java/lang/module/ModuleFinderTest.java @@ -471,36 +471,10 @@ public class ModuleFinderTest { * Test ModuleFinder.of with a file path to a directory containing a file * that will not be recognized as a module. */ - public void testOfWithUnrecognizedEntryInDirectory() throws Exception { + public void testOfWithUnrecognizedEntryInDirectory1() throws Exception { Path dir = Files.createTempDirectory(USER_DIR, "mods"); Files.createTempFile(dir, "m", ".junk"); - ModuleFinder finder = ModuleFinder.of(dir); - try { - finder.find("java.rhubarb"); - assertTrue(false); - } catch (FindException e) { - // expected - } - - finder = ModuleFinder.of(dir); - try { - finder.findAll(); - assertTrue(false); - } catch (FindException e) { - // expected - } - } - - - /** - * Test ModuleFinder.of with a file path to a directory containing a file - * starting with ".", the file should be ignored. - */ - public void testOfWithHiddenEntryInDirectory() throws Exception { - Path dir = Files.createTempDirectory(USER_DIR, "mods"); - Files.createTempFile(dir, ".marker", ""); - ModuleFinder finder = ModuleFinder.of(dir); assertFalse(finder.find("java.rhubarb").isPresent()); @@ -509,6 +483,24 @@ public class ModuleFinderTest { } + /** + * Test ModuleFinder.of with a file path to a directory containing a file + * that will not be recognized as a module. + */ + public void testOfWithUnrecognizedEntryInDirectory2() throws Exception { + Path dir = Files.createTempDirectory(USER_DIR, "mods"); + createModularJar(dir.resolve("m1.jar"), "m1"); + Files.createTempFile(dir, "m2", ".junk"); + + ModuleFinder finder = ModuleFinder.of(dir); + assertTrue(finder.find("m1").isPresent()); + assertFalse(finder.find("m2").isPresent()); + + finder = ModuleFinder.of(dir); + assertTrue(finder.findAll().size() == 1); + } + + /** * Test ModuleFinder.of with a directory that contains two * versions of the same module @@ -748,7 +740,7 @@ public class ModuleFinderTest { vs = mid.substring(i+1); } ModuleDescriptor.Builder builder - = ModuleDescriptor.module(mn).requires("java.base"); + = ModuleDescriptor.newModule(mn).requires("java.base"); if (vs != null) builder.version(vs); return builder.build(); diff --git a/jdk/test/java/lang/module/ModuleNamesTest.java b/jdk/test/java/lang/module/ModuleNamesTest.java index c0790eab202..afeadacec86 100644 --- a/jdk/test/java/lang/module/ModuleNamesTest.java +++ b/jdk/test/java/lang/module/ModuleNamesTest.java @@ -235,7 +235,7 @@ public class ModuleNamesTest { */ private Builder newBuilder(String mn) { return SharedSecrets.getJavaLangModuleAccess() - .newModuleBuilder(mn, false, false, false); + .newModuleBuilder(mn, false, Set.of()); } /** diff --git a/jdk/test/java/lang/module/ModuleReader/ModuleReaderTest.java b/jdk/test/java/lang/module/ModuleReader/ModuleReaderTest.java index d956c249651..12e53b0f5fb 100644 --- a/jdk/test/java/lang/module/ModuleReader/ModuleReaderTest.java +++ b/jdk/test/java/lang/module/ModuleReader/ModuleReaderTest.java @@ -79,14 +79,52 @@ public class ModuleReaderTest { "java/lang/Object.class" }; + // resource names that should not be found in the base module + private static final String[] BAD_BASE_RESOURCES = { + "NotFound", + "java", + "/java", + "//java", + "java/", + "java/lang", + "/java/lang", + "//java/lang", + "java/lang/", + "java//lang", + "/java/lang/Object.class", + "//java/lang/Object.class", + "java/lang/Object.class/", + "java//lang//Object.class", + "./java/lang/Object.class", + "java/./lang/Object.class", + "java/lang/./Object.class", + "../java/lang/Object.class", + "java/../lang/Object.class", + "java/lang/../Object.class", + }; + // resources in test module (can't use module-info.class as a test // resource as it will be modified by the jmod tool) private static final String[] TEST_RESOURCES = { "p/Main.class" }; - // a resource that is not in the base or test module - private static final String NOT_A_RESOURCE = "NotAResource"; + // resource names that should not be found in the test module + private static final String[] BAD_TEST_RESOURCES = { + "NotFound", + "p", + "/p", + "//p", + "p/", + "/p/Main.class", + "//p/Main.class", + "p/Main.class/", + "p//Main.class", + "./p/Main.class", + "p/./Main.class", + "../p/Main.class", + "p/../p/Main.class" + }; @BeforeTest @@ -126,10 +164,11 @@ public class ModuleReaderTest { } // test "not found" - assertFalse(reader.find(NOT_A_RESOURCE).isPresent()); - assertFalse(reader.open(NOT_A_RESOURCE).isPresent()); - assertFalse(reader.read(NOT_A_RESOURCE).isPresent()); - + for (String name : BAD_BASE_RESOURCES) { + assertFalse(reader.find(name).isPresent()); + assertFalse(reader.open(name).isPresent()); + assertFalse(reader.read(name).isPresent()); + } // test nulls try { @@ -216,7 +255,7 @@ public class ModuleReaderTest { */ void test(Path mp) throws IOException { - ModuleFinder finder = new ModulePath(Runtime.version(), true, mp); + ModuleFinder finder = ModulePath.of(Runtime.version(), true, mp); ModuleReference mref = finder.find(TEST_MODULE).get(); ModuleReader reader = mref.open(); @@ -236,9 +275,11 @@ public class ModuleReaderTest { } // test "not found" - assertFalse(reader.find(NOT_A_RESOURCE).isPresent()); - assertFalse(reader.open(NOT_A_RESOURCE).isPresent()); - assertFalse(reader.read(NOT_A_RESOURCE).isPresent()); + for (String name : BAD_TEST_RESOURCES) { + assertFalse(reader.find(name).isPresent()); + assertFalse(reader.open(name).isPresent()); + assertFalse(reader.read(name).isPresent()); + } // test nulls try { diff --git a/jdk/test/java/lang/module/ModuleReferenceTest.java b/jdk/test/java/lang/module/ModuleReferenceTest.java index bf2db124de5..f3cbb28babd 100644 --- a/jdk/test/java/lang/module/ModuleReferenceTest.java +++ b/jdk/test/java/lang/module/ModuleReferenceTest.java @@ -31,6 +31,7 @@ import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleReader; import java.lang.module.ModuleReference; import java.net.URI; +import java.util.Set; import org.testng.annotations.Test; import static org.testng.Assert.*; @@ -49,10 +50,10 @@ public class ModuleReferenceTest { public void testBasic() throws Exception { ModuleDescriptor descriptor - = ModuleDescriptor.module("m") + = ModuleDescriptor.newModule("m") .exports("p") .exports("q") - .contains("p.internal") + .packages(Set.of("p.internal")) .build(); URI uri = URI.create("module:/m"); @@ -71,7 +72,7 @@ public class ModuleReferenceTest { public void testNullLocation() { ModuleDescriptor descriptor - = ModuleDescriptor.module("m") + = ModuleDescriptor.newModule("m") .exports("p") .build(); ModuleReference mref = newModuleReference(descriptor, null); diff --git a/jdk/test/java/lang/module/MultiReleaseJarTest.java b/jdk/test/java/lang/module/MultiReleaseJarTest.java index 7daddb11993..4c58e930b08 100644 --- a/jdk/test/java/lang/module/MultiReleaseJarTest.java +++ b/jdk/test/java/lang/module/MultiReleaseJarTest.java @@ -65,7 +65,7 @@ public class MultiReleaseJarTest { private static final String MODULE_INFO = "module-info.class"; - private static final int RELEASE = Runtime.version().major(); + private static final int VERSION = Runtime.version().major(); // are multi-release JARs enabled? private static final boolean MULTI_RELEASE; @@ -80,7 +80,7 @@ public class MultiReleaseJarTest { public void testBasic() throws Exception { String name = "m1"; - ModuleDescriptor descriptor = ModuleDescriptor.module(name) + ModuleDescriptor descriptor = ModuleDescriptor.newModule(name) .requires("java.base") .build(); @@ -88,8 +88,8 @@ public class MultiReleaseJarTest { .moduleInfo("module-info.class", descriptor) .resource("p/Main.class") .resource("p/Helper.class") - .resource("META-INF/versions/9/p/Helper.class") - .resource("META-INF/versions/9/p/internal/Helper9.class") + .resource("META-INF/versions/" + VERSION + "/p/Helper.class") + .resource("META-INF/versions/" + VERSION + "/p/internal/Helper.class") .build(); // find the module @@ -117,12 +117,12 @@ public class MultiReleaseJarTest { public void testModuleInfoInVersionedSection() throws Exception { String name = "m1"; - ModuleDescriptor descriptor1 = ModuleDescriptor.module(name) + ModuleDescriptor descriptor1 = ModuleDescriptor.newModule(name) .requires("java.base") .build(); // module descriptor for versioned section - ModuleDescriptor descriptor2 = ModuleDescriptor.module(name) + ModuleDescriptor descriptor2 = ModuleDescriptor.newModule(name) .requires("java.base") .requires("jdk.unsupported") .build(); @@ -131,9 +131,9 @@ public class MultiReleaseJarTest { .moduleInfo(MODULE_INFO, descriptor1) .resource("p/Main.class") .resource("p/Helper.class") - .moduleInfo("META-INF/versions/9/" + MODULE_INFO, descriptor2) - .resource("META-INF/versions/9/p/Helper.class") - .resource("META-INF/versions/9/p/internal/Helper9.class") + .moduleInfo("META-INF/versions/" + VERSION + "/" + MODULE_INFO, descriptor2) + .resource("META-INF/versions/" + VERSION + "/p/Helper.class") + .resource("META-INF/versions/" + VERSION + "/p/internal/Helper.class") .build(); // find the module @@ -161,8 +161,8 @@ public class MultiReleaseJarTest { Path jar = new JarBuilder(name) .resource("p/Main.class") .resource("p/Helper.class") - .resource("META-INF/versions/9/p/Helper.class") - .resource("META-INF/versions/9/p/internal/Helper9.class") + .resource("META-INF/versions/" + VERSION + "/p/Helper.class") + .resource("META-INF/versions/" + VERSION + "/p/internal/Helper.class") .build(); // find the module @@ -188,19 +188,19 @@ public class MultiReleaseJarTest { public void testModuleReader() throws Exception { String name = "m1"; - ModuleDescriptor descriptor1 = ModuleDescriptor.module(name) + ModuleDescriptor descriptor1 = ModuleDescriptor.newModule(name) .requires("java.base") .build(); // module descriptor for versioned section - ModuleDescriptor descriptor2 = ModuleDescriptor.module(name) + ModuleDescriptor descriptor2 = ModuleDescriptor.newModule(name) .requires("java.base") .requires("jdk.unsupported") .build(); Path jar = new JarBuilder(name) .moduleInfo(MODULE_INFO, descriptor1) - .moduleInfo("META-INF/versions/9/" + MODULE_INFO, descriptor2) + .moduleInfo("META-INF/versions/" + VERSION + "/" + MODULE_INFO, descriptor2) .build(); // find the module @@ -243,7 +243,7 @@ public class MultiReleaseJarTest { String expectedTail = "!/"; if (MULTI_RELEASE) - expectedTail += "META-INF/versions/" + RELEASE + "/"; + expectedTail += "META-INF/versions/" + VERSION + "/"; expectedTail += MODULE_INFO; assertTrue(uri.toString().endsWith(expectedTail)); diff --git a/jdk/test/java/lang/reflect/AccessibleObject/CanAccessTest.java b/jdk/test/java/lang/reflect/AccessibleObject/CanAccessTest.java new file mode 100644 index 00000000000..c73eb795b26 --- /dev/null +++ b/jdk/test/java/lang/reflect/AccessibleObject/CanAccessTest.java @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @build CanAccessTest + * @modules java.base/jdk.internal.misc:+open + * @run testng CanAccessTest + * @summary Test AccessibleObject::canAccess method + */ + +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; +import java.security.SecureClassLoader; + +import jdk.internal.misc.Unsafe; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +@Test +public class CanAccessTest { + private static Unsafe INSTANCE = Unsafe.getUnsafe(); + + /** + * null object parameter for Constructor + */ + public void testConstructor() throws Exception { + Constructor ctor = Unsafe.class.getDeclaredConstructor(); + assertFalse(ctor.canAccess(null)); + assertTrue(ctor.trySetAccessible()); + + try { + // non-null object parameter + ctor.canAccess(INSTANCE); + assertTrue(false); + } catch (IllegalArgumentException expected) {} + } + + /** + * Test protected constructors + */ + public void testProtectedConstructor() throws Exception { + TestLoader.testProtectedConstructorNonOpenedPackage(); + + Constructor ctor = TestLoader.class.getDeclaredConstructor(); + assertTrue(ctor.canAccess(null)); + } + + /** + * null object parameter for static members + */ + public void testStaticMember() throws Exception { + Method m = Unsafe.class.getDeclaredMethod("throwIllegalAccessError"); + assertFalse(m.canAccess(null)); + assertTrue(m.trySetAccessible()); + + try { + // non-null object parameter + m.canAccess(INSTANCE); + assertTrue(false); + } catch (IllegalArgumentException expected) { } + } + + /** + * Test protected static + */ + public void testProtectedStatic() throws Exception { + Method m = TestLoader.testProtectedStatic(); + assertFalse(m.canAccess(null)); + } + + /** + * the specified object must be an instance of the declaring class + * for instance members + */ + public void testInstanceMethod() throws Exception { + Method m = Unsafe.class.getDeclaredMethod("addressSize0"); + assertFalse(m.canAccess(INSTANCE)); + + try { + m.canAccess(null); + assertTrue(false); + } catch (IllegalArgumentException expected) { } + } + + /** + * the specified object must be an instance of the declaring class + * for instance members + */ + public void testInvalidInstanceObject() throws Exception { + Class clazz = Class.forName("sun.security.x509.X500Name"); + Method m = clazz.getDeclaredMethod("size"); + + try { + m.canAccess(INSTANCE); + assertTrue(false); + } catch (IllegalArgumentException expected) { } + } + + + static class TestLoader extends SecureClassLoader { + public static Method testProtectedStatic() throws Exception { + Method m = ClassLoader.class.getDeclaredMethod("registerAsParallelCapable"); + assertTrue(m.canAccess(null)); + return m; + } + + protected TestLoader() throws Exception { + Constructor ctor = SecureClassLoader.class.getDeclaredConstructor(); + assertFalse(ctor.canAccess(null)); + assertFalse(ctor.trySetAccessible()); + } + + public static void testProtectedConstructorNonOpenedPackage() throws Exception { + new TestLoader(); + } + } +} diff --git a/jdk/test/java/lang/reflect/AccessibleObject/ModuleSetAccessibleTest.java b/jdk/test/java/lang/reflect/AccessibleObject/ModuleSetAccessibleTest.java index da5d264b1fd..3e2bf3911c7 100644 --- a/jdk/test/java/lang/reflect/AccessibleObject/ModuleSetAccessibleTest.java +++ b/jdk/test/java/lang/reflect/AccessibleObject/ModuleSetAccessibleTest.java @@ -30,7 +30,6 @@ * @summary Test java.lang.reflect.AccessibleObject with modules */ -import java.lang.module.ModuleDescriptor; import java.lang.reflect.AccessibleObject; import java.lang.reflect.Constructor; import java.lang.reflect.Field; diff --git a/jdk/test/java/lang/reflect/AccessibleObject/TrySetAccessibleTest.java b/jdk/test/java/lang/reflect/AccessibleObject/TrySetAccessibleTest.java new file mode 100644 index 00000000000..340e7d00613 --- /dev/null +++ b/jdk/test/java/lang/reflect/AccessibleObject/TrySetAccessibleTest.java @@ -0,0 +1,201 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @build TrySetAccessibleTest + * @modules java.base/java.lang:open + * java.base/jdk.internal.perf + * java.base/jdk.internal.misc:+open + * @run testng TrySetAccessibleTest + * @summary Test AccessibleObject::trySetAccessible method + */ + +import java.lang.reflect.AccessibleObject; +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import jdk.internal.misc.Unsafe; +import jdk.internal.perf.Perf; + +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +@Test +public class TrySetAccessibleTest { + /** + * Invoke a private constructor on a public class in an exported package + */ + public void testPrivateConstructorInExportedPackage() throws Exception { + Constructor ctor = Perf.class.getDeclaredConstructor(); + + try { + ctor.newInstance(); + assertTrue(false); + } catch (IllegalAccessException expected) { } + + assertFalse(ctor.trySetAccessible()); + assertFalse(ctor.canAccess(null)); + } + + /** + * Invoke a private constructor on a public class in an open package + */ + public void testPrivateConstructorInOpenedPackage() throws Exception { + Constructor ctor = Unsafe.class.getDeclaredConstructor(); + + try { + ctor.newInstance(); + assertTrue(false); + } catch (IllegalAccessException expected) { } + + assertTrue(ctor.trySetAccessible()); + assertTrue(ctor.canAccess(null)); + Unsafe unsafe = (Unsafe) ctor.newInstance(); + } + + /** + * Invoke a private method on a public class in an exported package + */ + public void testPrivateMethodInExportedPackage() throws Exception { + Method m = Perf.class.getDeclaredMethod("getBytes", String.class); + try { + m.invoke(null); + assertTrue(false); + } catch (IllegalAccessException expected) { } + + assertFalse(m.trySetAccessible()); + assertFalse(m.canAccess(null)); + } + + + /** + * Invoke a private method on a public class in an open package + */ + public void testPrivateMethodInOpenedPackage() throws Exception { + Method m = Unsafe.class.getDeclaredMethod("throwIllegalAccessError"); + assertFalse(m.canAccess(null)); + + try { + m.invoke(null); + assertTrue(false); + } catch (IllegalAccessException expected) { } + + assertTrue(m.trySetAccessible()); + assertTrue(m.canAccess(null)); + try { + m.invoke(null); + assertTrue(false); + } catch (InvocationTargetException e) { + // thrown by throwIllegalAccessError + assertTrue(e.getCause() instanceof IllegalAccessError); + } + } + + /** + * Invoke a private method on a public class in an exported package + */ + public void testPrivateFieldInExportedPackage() throws Exception { + Field f = Perf.class.getDeclaredField("instance"); + try { + f.get(null); + assertTrue(false); + } catch (IllegalAccessException expected) { } + + assertFalse(f.trySetAccessible()); + assertFalse(f.canAccess(null)); + try { + f.get(null); + assertTrue(false); + } catch (IllegalAccessException expected) {} + } + + /** + * Access a private field in a public class that is an exported package + */ + public void testPrivateFieldInOpenedPackage() throws Exception { + Field f = Unsafe.class.getDeclaredField("theUnsafe"); + + try { + f.get(null); + assertTrue(false); + } catch (IllegalAccessException expected) { } + + assertTrue(f.trySetAccessible()); + assertTrue(f.canAccess(null)); + Unsafe unsafe = (Unsafe) f.get(null); + } + + + /** + * Invoke a public constructor on a public class in a non-exported package + */ + public void testPublicConstructorInNonExportedPackage() throws Exception { + Class clazz = Class.forName("sun.security.x509.X500Name"); + Constructor ctor = clazz.getConstructor(String.class); + + try { + ctor.newInstance("cn=duke"); + assertTrue(false); + } catch (IllegalAccessException expected) { } + + assertFalse(ctor.trySetAccessible()); + assertFalse(ctor.canAccess(null)); + assertTrue(ctor.trySetAccessible() == ctor.isAccessible()); + } + + + /** + * Access a public field in a public class that in a non-exported package + */ + public void testPublicFieldInNonExportedPackage() throws Exception { + Class clazz = Class.forName("sun.security.x509.X500Name"); + Field f = clazz.getField("SERIALNUMBER_OID"); + + try { + f.get(null); + assertTrue(false); + } catch (IllegalAccessException expected) { } + + assertFalse(f.trySetAccessible()); + assertFalse(f.canAccess(null)); + } + + + /** + * Test that the Class constructor cannot be make accessible. + */ + public void testJavaLangClass() throws Exception { + + // non-public constructor + Constructor ctor + = Class.class.getDeclaredConstructor(ClassLoader.class, Class.class); + AccessibleObject[] ctors = { ctor }; + + assertFalse(ctor.trySetAccessible()); + assertFalse(ctor.canAccess(null)); + } + +} diff --git a/jdk/test/java/lang/reflect/Layer/BasicLayerTest.java b/jdk/test/java/lang/reflect/Layer/BasicLayerTest.java index 8f14171ce87..1bb04d9c12e 100644 --- a/jdk/test/java/lang/reflect/Layer/BasicLayerTest.java +++ b/jdk/test/java/lang/reflect/Layer/BasicLayerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,6 +24,7 @@ /** * @test * @library /lib/testlibrary + * @modules java.base/jdk.internal.misc * @build BasicLayerTest ModuleUtils * @compile layertest/Test.java * @run testng BasicLayerTest @@ -43,12 +44,22 @@ import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; +import jdk.internal.misc.SharedSecrets; import org.testng.annotations.Test; import static org.testng.Assert.*; @Test public class BasicLayerTest { + /** + * Creates a "non-strict" builder for building a module. This allows the + * test the create ModuleDescriptor objects that do not require java.base. + */ + private static ModuleDescriptor.Builder newBuilder(String mn) { + return SharedSecrets.getJavaLangModuleAccess() + .newModuleBuilder(mn, false, Set.of()); + } + /** * Exercise Layer.empty() */ @@ -109,25 +120,22 @@ public class BasicLayerTest { * Exercise Layer defineModules, created with empty layer as parent */ public void testLayerOnEmpty() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .requires("m2") .exports("p1") .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires("m3") .build(); - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2, descriptor3); - Configuration cf = resolveRequires(finder, "m1"); + Configuration cf = resolve(finder, "m1"); // map each module to its own class loader for this test ClassLoader loader1 = new ClassLoader() { }; @@ -191,15 +199,13 @@ public class BasicLayerTest { * Exercise Layer defineModules, created with boot layer as parent */ public void testLayerOnBoot() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .requires("m2") .requires("java.base") .exports("p1") .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires("java.base") .build(); @@ -207,7 +213,7 @@ public class BasicLayerTest { = ModuleUtils.finderOf(descriptor1, descriptor2); Configuration parent = Layer.boot().configuration(); - Configuration cf = resolveRequires(parent, finder, "m1"); + Configuration cf = resolve(parent, finder, "m1"); ClassLoader loader = new ClassLoader() { }; @@ -256,21 +262,19 @@ public class BasicLayerTest { * have the same module-private package. */ public void testPackageContainedInSelfAndOther() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .requires("m2") - .contains("p") + .packages(Set.of("p")) .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") - .contains("p") + ModuleDescriptor descriptor2 = newBuilder("m2") + .packages(Set.of("p")) .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2); - Configuration cf = resolveRequires(finder, "m1"); + Configuration cf = resolve(finder, "m1"); assertTrue(cf.modules().size() == 2); // one loader per module, should be okay @@ -292,22 +296,18 @@ public class BasicLayerTest { public void testSameExportInPartitionedGraph() { // m1 reads m2, m2 exports p to m1 - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .requires("m2") .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .exports("p", Set.of("m1")) .build(); // m3 reads m4, m4 exports p to m3 - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .requires("m4") .build(); - ModuleDescriptor descriptor4 - = ModuleDescriptor.module("m4") + ModuleDescriptor descriptor4 = newBuilder("m4") .exports("p", Set.of("m3")) .build(); @@ -317,7 +317,7 @@ public class BasicLayerTest { descriptor3, descriptor4); - Configuration cf = resolveRequires(finder, "m1", "m3"); + Configuration cf = resolve(finder, "m1", "m3"); assertTrue(cf.modules().size() == 4); // one loader per module @@ -353,16 +353,15 @@ public class BasicLayerTest { ModuleDescriptor base = Object.class.getModule().getDescriptor(); assertTrue(base.packages().contains("sun.launcher")); - ModuleDescriptor descriptor - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor = newBuilder("m1") .requires("java.base") - .contains("sun.launcher") + .packages(Set.of("sun.launcher")) .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor); Configuration parent = Layer.boot().configuration(); - Configuration cf = parent.resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + Configuration cf = parent.resolve(finder, ModuleFinder.of(), Set.of("m1")); assertTrue(cf.modules().size() == 1); ClassLoader loader = new ClassLoader() { }; @@ -382,18 +381,16 @@ public class BasicLayerTest { // cf1: m1 and m2, m2 requires transitive m1 - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires(Set.of(Requires.Modifier.TRANSITIVE), "m1") .build(); ModuleFinder finder1 = ModuleUtils.finderOf(descriptor1, descriptor2); - Configuration cf1 = resolveRequires(finder1, "m2"); + Configuration cf1 = resolve(finder1, "m2"); ClassLoader cl1 = new ClassLoader() { }; Layer layer1 = Layer.empty().defineModules(cf1, mn -> cl1); @@ -401,14 +398,13 @@ public class BasicLayerTest { // cf2: m3, m3 requires m2 - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .requires("m2") .build(); ModuleFinder finder2 = ModuleUtils.finderOf(descriptor3); - Configuration cf2 = resolveRequires(cf1, finder2, "m3"); + Configuration cf2 = resolve(cf1, finder2, "m3"); ClassLoader cl2 = new ClassLoader() { }; Layer layer2 = layer1.defineModules(cf2, mn -> cl2); @@ -456,13 +452,11 @@ public class BasicLayerTest { // cf1: m1 - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") - .build(); + ModuleDescriptor descriptor1 = newBuilder("m1").build(); ModuleFinder finder1 = ModuleUtils.finderOf(descriptor1); - Configuration cf1 = resolveRequires(finder1, "m1"); + Configuration cf1 = resolve(finder1, "m1"); ClassLoader cl1 = new ClassLoader() { }; Layer layer1 = Layer.empty().defineModules(cf1, mn -> cl1); @@ -470,19 +464,17 @@ public class BasicLayerTest { // cf2: m2, m3: m2 requires transitive m1, m3 requires m2 - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires(Set.of(Requires.Modifier.TRANSITIVE), "m1") .build(); - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .requires("m2") .build(); ModuleFinder finder2 = ModuleUtils.finderOf(descriptor2, descriptor3); - Configuration cf2 = resolveRequires(cf1, finder2, "m3"); + Configuration cf2 = resolve(cf1, finder2, "m3"); ClassLoader cl2 = new ClassLoader() { }; Layer layer2 = layer1.defineModules(cf2, mn -> cl2); @@ -527,13 +519,11 @@ public class BasicLayerTest { // cf1: m1 - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") - .build(); + ModuleDescriptor descriptor1 = newBuilder("m1").build(); ModuleFinder finder1 = ModuleUtils.finderOf(descriptor1); - Configuration cf1 = resolveRequires(finder1, "m1"); + Configuration cf1 = resolve(finder1, "m1"); ClassLoader cl1 = new ClassLoader() { }; Layer layer1 = Layer.empty().defineModules(cf1, mn -> cl1); @@ -541,14 +531,13 @@ public class BasicLayerTest { // cf2: m2 requires transitive m1 - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires(Set.of(Requires.Modifier.TRANSITIVE), "m1") .build(); ModuleFinder finder2 = ModuleUtils.finderOf(descriptor2); - Configuration cf2 = resolveRequires(cf1, finder2, "m2"); + Configuration cf2 = resolve(cf1, finder2, "m2"); ClassLoader cl2 = new ClassLoader() { }; Layer layer2 = layer1.defineModules(cf2, mn -> cl2); @@ -556,14 +545,13 @@ public class BasicLayerTest { // cf3: m3 requires m2 - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .requires("m2") .build(); ModuleFinder finder3 = ModuleUtils.finderOf(descriptor3); - Configuration cf3 = resolveRequires(cf2, finder3, "m3"); + Configuration cf3 = resolve(cf2, finder3, "m3"); ClassLoader cl3 = new ClassLoader() { }; Layer layer3 = layer2.defineModules(cf3, mn -> cl3); @@ -610,18 +598,16 @@ public class BasicLayerTest { // cf1: m1, m2 requires transitive m1 - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .build(); - ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + ModuleDescriptor descriptor2 = newBuilder("m2") .requires(Set.of(Requires.Modifier.TRANSITIVE), "m1") .build(); ModuleFinder finder1 = ModuleUtils.finderOf(descriptor1, descriptor2); - Configuration cf1 = resolveRequires(finder1, "m2"); + Configuration cf1 = resolve(finder1, "m2"); ClassLoader cl1 = new ClassLoader() { }; Layer layer1 = Layer.empty().defineModules(cf1, mn -> cl1); @@ -629,20 +615,18 @@ public class BasicLayerTest { // cf2: m3 requires transitive m2, m4 requires m3 - ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3") + ModuleDescriptor descriptor3 = newBuilder("m3") .requires(Set.of(Requires.Modifier.TRANSITIVE), "m2") .build(); - ModuleDescriptor descriptor4 - = ModuleDescriptor.module("m4") + ModuleDescriptor descriptor4 = newBuilder("m4") .requires("m3") .build(); ModuleFinder finder2 = ModuleUtils.finderOf(descriptor3, descriptor4); - Configuration cf2 = resolveRequires(cf1, finder2, "m3", "m4"); + Configuration cf2 = resolve(cf1, finder2, "m3", "m4"); ClassLoader cl2 = new ClassLoader() { }; Layer layer2 = layer1.defineModules(cf2, mn -> cl2); @@ -693,8 +677,7 @@ public class BasicLayerTest { @Test(expectedExceptions = { LayerInstantiationException.class }) public void testModuleAlreadyDefinedToLoader() { - ModuleDescriptor md - = ModuleDescriptor.module("m") + ModuleDescriptor md = newBuilder("m") .requires("java.base") .build(); @@ -702,7 +685,7 @@ public class BasicLayerTest { Configuration parent = Layer.boot().configuration(); - Configuration cf = parent.resolveRequires(finder, ModuleFinder.of(), Set.of("m")); + Configuration cf = parent.resolve(finder, ModuleFinder.of(), Set.of("m")); ClassLoader loader = new ClassLoader() { }; @@ -722,15 +705,13 @@ public class BasicLayerTest { @Test(expectedExceptions = { LayerInstantiationException.class }) public void testPackageAlreadyInNamedModule() { - ModuleDescriptor md1 - = ModuleDescriptor.module("m1") - .contains("p") + ModuleDescriptor md1 = newBuilder("m1") + .packages(Set.of("p")) .requires("java.base") .build(); - ModuleDescriptor md2 - = ModuleDescriptor.module("m2") - .contains("p") + ModuleDescriptor md2 = newBuilder("m2") + .packages(Set.of("p")) .requires("java.base") .build(); @@ -742,13 +723,13 @@ public class BasicLayerTest { Configuration parent = Layer.boot().configuration(); - Configuration cf1 = parent.resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + Configuration cf1 = parent.resolve(finder, ModuleFinder.of(), Set.of("m1")); Layer layer1 = Layer.boot().defineModules(cf1, mn -> loader); // attempt to define m2 containing package p to class loader - Configuration cf2 = parent.resolveRequires(finder, ModuleFinder.of(), Set.of("m2")); + Configuration cf2 = parent.resolve(finder, ModuleFinder.of(), Set.of("m2")); // should throw exception because p already in m1 Layer layer2 = Layer.boot().defineModules(cf2, mn -> loader); @@ -767,16 +748,15 @@ public class BasicLayerTest { Class c = layertest.Test.class; assertFalse(c.getModule().isNamed()); // in unnamed module - ModuleDescriptor md - = ModuleDescriptor.module("m") - .contains(c.getPackageName()) + ModuleDescriptor md = newBuilder("m") + .packages(Set.of(c.getPackageName())) .requires("java.base") .build(); ModuleFinder finder = ModuleUtils.finderOf(md); Configuration parent = Layer.boot().configuration(); - Configuration cf = parent.resolveRequires(finder, ModuleFinder.of(), Set.of("m")); + Configuration cf = parent.resolve(finder, ModuleFinder.of(), Set.of("m")); Layer.boot().defineModules(cf, mn -> c.getClassLoader()); } @@ -786,8 +766,7 @@ public class BasicLayerTest { * Attempt to create a Layer with a module named "java.base". */ public void testLayerWithJavaBase() { - ModuleDescriptor descriptor - = ModuleDescriptor.module("java.base") + ModuleDescriptor descriptor = newBuilder("java.base") .exports("java.lang") .build(); @@ -795,7 +774,7 @@ public class BasicLayerTest { Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("java.base")); + .resolve(finder, ModuleFinder.of(), Set.of("java.base")); assertTrue(cf.modules().size() == 1); ClassLoader scl = ClassLoader.getSystemClassLoader(); @@ -824,16 +803,15 @@ public class BasicLayerTest { */ @Test(enabled = false) public void testLayerWithJavaPackage() { - ModuleDescriptor descriptor - = ModuleDescriptor.module("foo") - .contains("java.foo") + ModuleDescriptor descriptor = newBuilder("foo") + .packages(Set.of("java.foo")) .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor); Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("foo")); + .resolve(finder, ModuleFinder.of(), Set.of("foo")); assertTrue(cf.modules().size() == 1); ClassLoader pcl = ClassLoader.getPlatformClassLoader(); @@ -870,15 +848,14 @@ public class BasicLayerTest { */ @Test(expectedExceptions = { LayerInstantiationException.class }) public void testLayerWithBootLoader() { - ModuleDescriptor descriptor - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor = newBuilder("m1") .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor); Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1")); assertTrue(cf.modules().size() == 1); Layer.boot().defineModules(cf, mn -> null ); @@ -891,15 +868,14 @@ public class BasicLayerTest { @Test(expectedExceptions = { IllegalArgumentException.class }) public void testIncorrectParent1() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .requires("java.base") .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1); Configuration parent = Layer.boot().configuration(); - Configuration cf = parent.resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + Configuration cf = parent.resolve(finder, ModuleFinder.of(), Set.of("m1")); ClassLoader loader = new ClassLoader() { }; Layer.empty().defineModules(cf, mn -> loader); @@ -912,13 +888,12 @@ public class BasicLayerTest { @Test(expectedExceptions = { IllegalArgumentException.class }) public void testIncorrectParent2() { - ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") + ModuleDescriptor descriptor1 = newBuilder("m1") .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1); - Configuration cf = resolveRequires(finder, "m1"); + Configuration cf = resolve(finder, "m1"); ClassLoader loader = new ClassLoader() { }; Layer.boot().defineModules(cf, mn -> loader); @@ -935,7 +910,7 @@ public class BasicLayerTest { @Test(expectedExceptions = { NullPointerException.class }) public void testCreateWithNull2() { - Configuration cf = resolveRequires(Layer.boot().configuration(), ModuleFinder.of()); + Configuration cf = resolve(Layer.boot().configuration(), ModuleFinder.of()); Layer.boot().defineModules(cf, null); } @@ -975,14 +950,14 @@ public class BasicLayerTest { * Resolve the given modules, by name, and returns the resulting * Configuration. */ - private static Configuration resolveRequires(Configuration cf, - ModuleFinder finder, - String... roots) { - return cf.resolveRequires(finder, ModuleFinder.of(), Set.of(roots)); + private static Configuration resolve(Configuration cf, + ModuleFinder finder, + String... roots) { + return cf.resolve(finder, ModuleFinder.of(), Set.of(roots)); } - private static Configuration resolveRequires(ModuleFinder finder, - String... roots) { - return resolveRequires(Configuration.empty(), finder, roots); + private static Configuration resolve(ModuleFinder finder, + String... roots) { + return resolve(Configuration.empty(), finder, roots); } } diff --git a/jdk/test/java/lang/reflect/Layer/LayerAndLoadersTest.java b/jdk/test/java/lang/reflect/Layer/LayerAndLoadersTest.java index 23c7d06d15d..ac6c035c297 100644 --- a/jdk/test/java/lang/reflect/Layer/LayerAndLoadersTest.java +++ b/jdk/test/java/lang/reflect/Layer/LayerAndLoadersTest.java @@ -81,7 +81,7 @@ public class LayerAndLoadersTest { */ public void testWithOneLoader() throws Exception { - Configuration cf = resolveRequires("m1"); + Configuration cf = resolve("m1"); ClassLoader scl = ClassLoader.getSystemClassLoader(); @@ -110,7 +110,7 @@ public class LayerAndLoadersTest { */ public void testWithManyLoaders() throws Exception { - Configuration cf = resolveRequires("m1"); + Configuration cf = resolve("m1"); ClassLoader scl = ClassLoader.getSystemClassLoader(); @@ -145,7 +145,7 @@ public class LayerAndLoadersTest { */ public void testServicesWithOneLoader() throws Exception { - Configuration cf = resolveRequiresAndUses("m1"); + Configuration cf = resolveAndBind("m1"); ClassLoader scl = ClassLoader.getSystemClassLoader(); @@ -186,7 +186,7 @@ public class LayerAndLoadersTest { */ public void testServicesWithManyLoaders() throws Exception { - Configuration cf = resolveRequiresAndUses("m1"); + Configuration cf = resolveAndBind("m1"); ClassLoader scl = ClassLoader.getSystemClassLoader(); @@ -233,7 +233,7 @@ public class LayerAndLoadersTest { */ public void testDelegationToParent() throws Exception { - Configuration cf = resolveRequires("m1"); + Configuration cf = resolve("m1"); ClassLoader parent = this.getClass().getClassLoader(); String cn = this.getClass().getName(); @@ -267,16 +267,16 @@ public class LayerAndLoadersTest { public void testOverlappingPackages() { ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1").exports("p").build(); + = ModuleDescriptor.newModule("m1").exports("p").build(); ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2").exports("p").build(); + = ModuleDescriptor.newModule("m2").exports("p").build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2); Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1", "m2")); + .resolve(finder, ModuleFinder.of(), Set.of("m1", "m2")); // cannot define both module m1 and m2 to the same class loader try { @@ -301,29 +301,29 @@ public class LayerAndLoadersTest { public void testSplitDelegation() { ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1").exports("p").build(); + = ModuleDescriptor.newModule("m1").exports("p").build(); ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2").exports("p").build(); + = ModuleDescriptor.newModule("m2").exports("p").build(); ModuleFinder finder1 = ModuleUtils.finderOf(descriptor1, descriptor2); Configuration cf1 = Layer.boot() .configuration() - .resolveRequires(finder1, ModuleFinder.of(), Set.of("m1", "m2")); + .resolve(finder1, ModuleFinder.of(), Set.of("m1", "m2")); Layer layer1 = Layer.boot().defineModulesWithManyLoaders(cf1, null); checkLayer(layer1, "m1", "m2"); ModuleDescriptor descriptor3 - = ModuleDescriptor.module("m3").requires("m1").build(); + = ModuleDescriptor.newModule("m3").requires("m1").build(); ModuleDescriptor descriptor4 - = ModuleDescriptor.module("m4").requires("m2").build(); + = ModuleDescriptor.newModule("m4").requires("m2").build(); ModuleFinder finder2 = ModuleUtils.finderOf(descriptor3, descriptor4); - Configuration cf2 = cf1.resolveRequires(finder2, ModuleFinder.of(), + Configuration cf2 = cf1.resolve(finder2, ModuleFinder.of(), Set.of("m3", "m4")); // package p cannot be supplied by two class loaders @@ -349,13 +349,13 @@ public class LayerAndLoadersTest { */ public void testOverriding1() throws Exception { - Configuration cf1 = resolveRequires("m1"); + Configuration cf1 = resolve("m1"); Layer layer1 = Layer.boot().defineModulesWithOneLoader(cf1, null); checkLayer(layer1, "m1", "m2", "m3"); ModuleFinder finder = ModuleFinder.of(MODS_DIR); - Configuration cf2 = cf1.resolveRequires(finder, ModuleFinder.of(), + Configuration cf2 = cf1.resolve(finder, ModuleFinder.of(), Set.of("m1")); Layer layer2 = layer1.defineModulesWithOneLoader(cf2, null); @@ -398,13 +398,13 @@ public class LayerAndLoadersTest { */ public void testOverriding2() throws Exception { - Configuration cf1 = resolveRequires("m1"); + Configuration cf1 = resolve("m1"); Layer layer1 = Layer.boot().defineModulesWithManyLoaders(cf1, null); checkLayer(layer1, "m1", "m2", "m3"); ModuleFinder finder = ModuleFinder.of(MODS_DIR); - Configuration cf2 = cf1.resolveRequires(finder, ModuleFinder.of(), + Configuration cf2 = cf1.resolve(finder, ModuleFinder.of(), Set.of("m1")); Layer layer2 = layer1.defineModulesWithManyLoaders(cf2, null); @@ -492,14 +492,14 @@ public class LayerAndLoadersTest { */ public void testOverriding3() throws Exception { - Configuration cf1 = resolveRequires("m1"); + Configuration cf1 = resolve("m1"); Layer layer1 = Layer.boot().defineModulesWithOneLoader(cf1, null); checkLayer(layer1, "m1", "m2", "m3"); ModuleFinder finder = finderFor("m1", "m3"); - Configuration cf2 = cf1.resolveRequires(finder, ModuleFinder.of(), + Configuration cf2 = cf1.resolve(finder, ModuleFinder.of(), Set.of("m1")); Layer layer2 = layer1.defineModulesWithOneLoader(cf2, null); @@ -529,14 +529,14 @@ public class LayerAndLoadersTest { */ public void testOverriding4() throws Exception { - Configuration cf1 = resolveRequires("m1"); + Configuration cf1 = resolve("m1"); Layer layer1 = Layer.boot().defineModulesWithManyLoaders(cf1, null); checkLayer(layer1, "m1", "m2", "m3"); ModuleFinder finder = finderFor("m1", "m3"); - Configuration cf2 = cf1.resolveRequires(finder, ModuleFinder.of(), + Configuration cf2 = cf1.resolve(finder, ModuleFinder.of(), Set.of("m1")); Layer layer2 = layer1.defineModulesWithManyLoaders(cf2, null); @@ -577,7 +577,7 @@ public class LayerAndLoadersTest { * Layer.defineModulesWithOneLoader. */ public void testResourcesOneLoader() throws Exception { - Configuration cf = resolveRequires("m1"); + Configuration cf = resolve("m1"); ClassLoader scl = ClassLoader.getSystemClassLoader(); Layer layer = Layer.boot().defineModulesWithOneLoader(cf, scl); ClassLoader loader = layer.findLoader("m1"); @@ -589,7 +589,7 @@ public class LayerAndLoadersTest { * Layer.defineModulesWithOneLoader. */ public void testResourcesManyLoaders() throws Exception { - Configuration cf = resolveRequires("m1"); + Configuration cf = resolve("m1"); ClassLoader scl = ClassLoader.getSystemClassLoader(); Layer layer = Layer.boot().defineModulesWithManyLoaders(cf, scl); ClassLoader loader = layer.findLoader("m1"); @@ -621,22 +621,22 @@ public class LayerAndLoadersTest { * Resolve the given modules, by name, and returns the resulting * Configuration. */ - private static Configuration resolveRequires(String... roots) { + private static Configuration resolve(String... roots) { ModuleFinder finder = ModuleFinder.of(MODS_DIR); return Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of(roots)); + .resolve(finder, ModuleFinder.of(), Set.of(roots)); } /** * Resolve the given modules, by name, and returns the resulting * Configuration. */ - private static Configuration resolveRequiresAndUses(String... roots) { + private static Configuration resolveAndBind(String... roots) { ModuleFinder finder = ModuleFinder.of(MODS_DIR); return Layer.boot() .configuration() - .resolveRequiresAndUses(finder, ModuleFinder.of(), Set.of(roots)); + .resolveAndBind(finder, ModuleFinder.of(), Set.of(roots)); } diff --git a/jdk/test/java/lang/reflect/Layer/LayerControllerTest.java b/jdk/test/java/lang/reflect/Layer/LayerControllerTest.java index 6582e493c07..4e4a0dbd5bd 100644 --- a/jdk/test/java/lang/reflect/Layer/LayerControllerTest.java +++ b/jdk/test/java/lang/reflect/Layer/LayerControllerTest.java @@ -50,22 +50,22 @@ public class LayerControllerTest { */ private Layer.Controller createTestLayer() { ModuleDescriptor descriptor1 - = ModuleDescriptor.module("m1") - .contains("p1") + = ModuleDescriptor.newModule("m1") + .packages(Set.of("p1")) .requires("java.base") .build(); ModuleDescriptor descriptor2 - = ModuleDescriptor.module("m2") + = ModuleDescriptor.newModule("m2") .requires("java.base") - .contains("p2") + .packages(Set.of("p2")) .build(); ModuleFinder finder = ModuleUtils.finderOf(descriptor1, descriptor2); Layer bootLayer = Layer.boot(); Configuration cf = bootLayer.configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1", "m2")); + .resolve(finder, ModuleFinder.of(), Set.of("m1", "m2")); ClassLoader scl = ClassLoader.getSystemClassLoader(); @@ -193,4 +193,4 @@ public class LayerControllerTest { assertTrue(false); } catch (NullPointerException expected) { } } -} \ No newline at end of file +} diff --git a/jdk/test/java/lang/reflect/Module/AnnotationsTest.java b/jdk/test/java/lang/reflect/Module/AnnotationsTest.java index 0390698b282..d30a0c07779 100644 --- a/jdk/test/java/lang/reflect/Module/AnnotationsTest.java +++ b/jdk/test/java/lang/reflect/Module/AnnotationsTest.java @@ -144,7 +144,7 @@ public class AnnotationsTest { Layer bootLayer = Layer.boot(); Configuration cf = bootLayer.configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of(name)); + .resolve(finder, ModuleFinder.of(), Set.of(name)); ClassLoader scl = ClassLoader.getSystemClassLoader(); Layer layer = bootLayer.defineModulesWithOneLoader(cf, scl); diff --git a/jdk/test/java/lang/reflect/Module/BasicModuleTest.java b/jdk/test/java/lang/reflect/Module/BasicModuleTest.java index bafa57ba3a8..90fb62b4a2e 100644 --- a/jdk/test/java/lang/reflect/Module/BasicModuleTest.java +++ b/jdk/test/java/lang/reflect/Module/BasicModuleTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,10 @@ import java.lang.module.ModuleDescriptor.Exports; import java.lang.module.ResolvedModule; import java.lang.reflect.Layer; import java.lang.reflect.Module; +import java.nio.file.spi.FileSystemProvider; // service type in java.base import java.util.function.Predicate; import java.util.stream.Stream; +import javax.print.PrintServiceLookup; // service type in java.desktop import org.testng.annotations.Test; import static org.testng.Assert.*; @@ -170,6 +172,14 @@ public class BasicModuleTest { // canRead assertTrue(base.canRead(base)); + assertFalse(base.canRead(thisModule)); + + // addReads + try { + base.addReads(thisModule); + assertTrue(false); + } catch (IllegalCallerException expected) { } + assertFalse(base.canRead(thisModule)); // isExported assertTrue(base.isExported("java.lang")); @@ -182,6 +192,18 @@ public class BasicModuleTest { assertFalse(base.isExported("java.wombat", thisModule)); assertFalse(base.isExported("java.wombat", base)); + // addExports + try { + base.addExports("java.lang", thisModule); + assertTrue(false); + } catch (IllegalCallerException expected) { } + try { + base.addExports("jdk.internal.misc", thisModule); + assertTrue(false); + } catch (IllegalCallerException expected) { } + assertFalse(base.isExported("jdk.internal.misc")); + assertFalse(base.isExported("jdk.internal.misc", thisModule)); + // isOpen assertFalse(base.isOpen("java.lang")); assertFalse(base.isOpen("java.lang", thisModule)); @@ -192,6 +214,29 @@ public class BasicModuleTest { assertFalse(base.isOpen("java.wombat")); assertFalse(base.isOpen("java.wombat", thisModule)); assertFalse(base.isOpen("java.wombat", base)); + + // addOpens + try { + base.addOpens("jdk.internal.misc", thisModule); + assertTrue(false); + } catch (IllegalCallerException expected) { } + assertFalse(base.isOpen("jdk.internal.misc")); + assertFalse(base.isOpen("jdk.internal.misc", thisModule)); + + // canUse + assertTrue(base.canUse(FileSystemProvider.class)); + assertFalse(base.canUse(Thread.class)); + + // addUses + try { + base.addUses(FileSystemProvider.class); + assertTrue(false); + } catch (IllegalCallerException expected) { } + try { + base.addUses(Thread.class); + assertTrue(false); + } catch (IllegalCallerException expected) { } + assertFalse(base.canUse(Thread.class)); } @@ -226,26 +271,68 @@ public class BasicModuleTest { assertTrue(desktop.canRead(base)); assertTrue(desktop.canRead(xml)); + // addReads + try { + desktop.addReads(thisModule); + assertTrue(false); + } catch (IllegalCallerException expected) { } + assertFalse(desktop.canRead(thisModule)); + // isExported assertTrue(desktop.isExported("java.awt")); assertTrue(desktop.isExported("java.awt", thisModule)); + assertFalse(desktop.isExported("sun.awt")); + assertFalse(desktop.isExported("sun.awt", thisModule)); + assertTrue(desktop.isExported("sun.awt", desktop)); assertFalse(desktop.isExported("java.wombat")); assertFalse(desktop.isExported("java.wombat", thisModule)); + assertFalse(desktop.isExported("java.wombat", base)); + + // addExports + try { + desktop.addExports("java.awt", thisModule); + assertTrue(false); + } catch (IllegalCallerException expected) { } + try { + desktop.addExports("sun.awt", thisModule); + assertTrue(false); + } catch (IllegalCallerException expected) { } + assertFalse(desktop.isExported("sun.awt")); + assertFalse(desktop.isExported("sun.awt", thisModule)); + + // isOpen + assertFalse(desktop.isOpen("java.awt")); + assertFalse(desktop.isOpen("java.awt", thisModule)); + assertTrue(desktop.isOpen("java.awt", desktop)); + assertFalse(desktop.isOpen("sun.awt")); + assertFalse(desktop.isOpen("sun.awt", thisModule)); + assertTrue(desktop.isOpen("sun.awt", desktop)); + assertFalse(desktop.isOpen("java.wombat")); + assertFalse(desktop.isOpen("java.wombat", thisModule)); + assertFalse(desktop.isOpen("java.wombat", desktop)); + + // addOpens + try { + base.addOpens("sun.awt", thisModule); + assertTrue(false); + } catch (IllegalCallerException expected) { } + assertFalse(desktop.isOpen("sun.awt")); + assertFalse(desktop.isOpen("sun.awt", thisModule)); + + // canUse + assertTrue(base.canUse(FileSystemProvider.class)); + assertFalse(base.canUse(Thread.class)); + + // addUses + try { + desktop.addUses(PrintServiceLookup.class); + assertTrue(false); + } catch (IllegalCallerException expected) { } + try { + desktop.addUses(Thread.class); + assertTrue(false); + } catch (IllegalCallerException expected) { } + assertFalse(desktop.canUse(Thread.class)); } - - @Test(expectedExceptions = { NullPointerException.class }) - public void testIsExportedNull() { - Module thisModule = this.getClass().getModule(); - thisModule.isExported(null, thisModule); - } - - - @Test(expectedExceptions = { NullPointerException.class }) - public void testIsExportedToNull() { - Module thisModule = this.getClass().getModule(); - thisModule.isExported("", null); - } - - } diff --git a/jdk/test/java/lang/reflect/Module/WithSecurityManager.java b/jdk/test/java/lang/reflect/Module/WithSecurityManager.java index dfb6b760f10..794ebf00e44 100644 --- a/jdk/test/java/lang/reflect/Module/WithSecurityManager.java +++ b/jdk/test/java/lang/reflect/Module/WithSecurityManager.java @@ -126,7 +126,7 @@ public class WithSecurityManager { Layer bootLayer = Layer.boot(); Configuration cf = bootLayer .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of(ANOTHER_MODULE)); + .resolve(finder, ModuleFinder.of(), Set.of(ANOTHER_MODULE)); Layer layer = bootLayer.defineModulesWithOneLoader(cf, null); Optional om = layer.findModule(mn); diff --git a/jdk/test/java/lang/reflect/Module/addXXX/Driver.java b/jdk/test/java/lang/reflect/Module/addXXX/Driver.java new file mode 100644 index 00000000000..0daf09ffe2a --- /dev/null +++ b/jdk/test/java/lang/reflect/Module/addXXX/Driver.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @build test/* m1/* m2/* m3/* m4/* + * @run testng/othervm test/test.Main + * @summary Basic test case for Module::addXXX methods + */ diff --git a/jdk/test/java/lang/reflect/Module/addXXX/m1/module-info.java b/jdk/test/java/lang/reflect/Module/addXXX/m1/module-info.java new file mode 100644 index 00000000000..a34a266ef57 --- /dev/null +++ b/jdk/test/java/lang/reflect/Module/addXXX/m1/module-info.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +module m1 { + exports p1; +} diff --git a/jdk/test/java/lang/reflect/Module/addXXX/m1/p1/C.java b/jdk/test/java/lang/reflect/Module/addXXX/m1/p1/C.java new file mode 100644 index 00000000000..86357613dc5 --- /dev/null +++ b/jdk/test/java/lang/reflect/Module/addXXX/m1/p1/C.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package p1; + +public class C { + public C() { } +} diff --git a/jdk/test/java/lang/reflect/Module/addXXX/m2/module-info.java b/jdk/test/java/lang/reflect/Module/addXXX/m2/module-info.java new file mode 100644 index 00000000000..918d72aac64 --- /dev/null +++ b/jdk/test/java/lang/reflect/Module/addXXX/m2/module-info.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +module m2 { + exports p2; +} diff --git a/jdk/test/java/lang/reflect/Module/addXXX/m2/p2/C.java b/jdk/test/java/lang/reflect/Module/addXXX/m2/p2/C.java new file mode 100644 index 00000000000..6a87a2eba87 --- /dev/null +++ b/jdk/test/java/lang/reflect/Module/addXXX/m2/p2/C.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package p2; + +import java.lang.reflect.Module; + +public class C { + + public static void export(String pn, Module m) { + C.class.getModule().addExports(pn, m); + } +} diff --git a/jdk/test/java/lang/reflect/Module/addXXX/m2/p2/internal/C.java b/jdk/test/java/lang/reflect/Module/addXXX/m2/p2/internal/C.java new file mode 100644 index 00000000000..b3009610032 --- /dev/null +++ b/jdk/test/java/lang/reflect/Module/addXXX/m2/p2/internal/C.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package p2.internal; + +public class C { +} diff --git a/jdk/test/java/lang/reflect/Module/addXXX/m3/module-info.java b/jdk/test/java/lang/reflect/Module/addXXX/m3/module-info.java new file mode 100644 index 00000000000..75d5c1664be --- /dev/null +++ b/jdk/test/java/lang/reflect/Module/addXXX/m3/module-info.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +module m3 { + exports p3 to test; + opens p3 to test; +} diff --git a/jdk/test/java/lang/reflect/Module/addXXX/m3/p3/C.java b/jdk/test/java/lang/reflect/Module/addXXX/m3/p3/C.java new file mode 100644 index 00000000000..c1013ce13db --- /dev/null +++ b/jdk/test/java/lang/reflect/Module/addXXX/m3/p3/C.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package p3; + +public class C { +} diff --git a/jdk/test/java/lang/reflect/Module/addXXX/m4/module-info.java b/jdk/test/java/lang/reflect/Module/addXXX/m4/module-info.java new file mode 100644 index 00000000000..313ea941316 --- /dev/null +++ b/jdk/test/java/lang/reflect/Module/addXXX/m4/module-info.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +module m4 { + exports p4; +} diff --git a/jdk/test/java/lang/reflect/Module/addXXX/m4/p4/C.java b/jdk/test/java/lang/reflect/Module/addXXX/m4/p4/C.java new file mode 100644 index 00000000000..a5e9a127f8c --- /dev/null +++ b/jdk/test/java/lang/reflect/Module/addXXX/m4/p4/C.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package p4; + +import java.lang.reflect.Constructor; + +public class C { + public static Object tryNewInstance(Class clazz) throws Exception { + Constructor ctor = clazz.getDeclaredConstructor(); + return ctor.newInstance(); + } +} diff --git a/jdk/test/java/lang/reflect/Module/addXXX/test/module-info.java b/jdk/test/java/lang/reflect/Module/addXXX/test/module-info.java new file mode 100644 index 00000000000..ebfab744dec --- /dev/null +++ b/jdk/test/java/lang/reflect/Module/addXXX/test/module-info.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +module test { + exports test to testng; + + requires m2; + requires m3; + requires m4; + requires testng; +} diff --git a/jdk/test/java/lang/reflect/Module/addXXX/test/test/C.java b/jdk/test/java/lang/reflect/Module/addXXX/test/test/C.java new file mode 100644 index 00000000000..e031680445c --- /dev/null +++ b/jdk/test/java/lang/reflect/Module/addXXX/test/test/C.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package test; + +public class C { } diff --git a/jdk/test/java/lang/reflect/Module/addXXX/test/test/Main.java b/jdk/test/java/lang/reflect/Module/addXXX/test/test/Main.java new file mode 100644 index 00000000000..924f0a87de4 --- /dev/null +++ b/jdk/test/java/lang/reflect/Module/addXXX/test/test/Main.java @@ -0,0 +1,196 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package test; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.MethodType; +import java.lang.reflect.Constructor; +import java.lang.reflect.Module; +import java.util.ServiceConfigurationError; +import java.util.ServiceLoader; + +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +/** + * Basic test case for Module::addXXXX methods + */ + +@Test +public class Main { + + /** + * Test Module::addReads + * + * module test { } + * + * module m1 { + * exports p1; + * } + */ + public void testAddReads() throws Throwable { + Module thisModule = Main.class.getModule(); + Class clazz = Class.forName("p1.C"); + Module m1 = clazz.getModule(); + + // test does not read m1 + assertFalse(thisModule.canRead(m1)); + MethodHandles.Lookup lookup = MethodHandles.lookup(); + MethodType mt = MethodType.methodType(void.class); + try { + lookup.findConstructor(clazz, mt); + assertTrue(false); + } catch (IllegalAccessException expected) { } + + // update test to read m1 + Module result = thisModule.addReads(m1); + assertTrue(result== thisModule); + assertTrue(thisModule.canRead(m1)); + MethodHandle mh = lookup.findConstructor(clazz, mt); + Object obj = mh.invoke(); + + // attempt to update m1 to read test + try { + m1.addReads(thisModule); + assertTrue(false); + } catch (IllegalCallerException expected) { } + } + + + /** + * Test Module::addExports + * + * module test { + * requires m2; + * } + * module m2 { + * exports p2; + * contains package p2.internal; + * } + */ + public void testAddExports() throws Exception { + Module thisModule = Main.class.getModule(); + Module m2 = p2.C.class.getModule(); + Class targetClass = Class.forName("p2.internal.C"); + String p2Internal = targetClass.getPackageName(); + assertTrue(targetClass.getModule() == m2); + + // m2 does not export p2.internal to test + assertFalse(m2.isExported(p2Internal, thisModule)); + Constructor ctor = targetClass.getDeclaredConstructor(); + try { + ctor.newInstance(); + assertTrue(false); + } catch (IllegalAccessException expected) { } + + // update m2 to export p2.internal to test + p2.C.export(p2Internal, thisModule); + assertTrue(m2.isExported(p2Internal, thisModule)); + ctor.newInstance(); // should succeed + + // attempt to update m2 to export a package to test + try { + m2.addExports("p2.other", thisModule); + assertTrue(false); + } catch (IllegalCallerException expected) { } + } + + /** + * Test Module::addOpens + * + * module test { + * requires m3; + * requires m4; + * } + * + * module m3 { + * exports p3 to test; + * opens p3 to test; + * } + * + * module m4 { + * exports p4; + * } + */ + public void testAddOpens() throws Exception { + Module thisModule = Main.class.getModule(); + Module m3 = p3.C.class.getModule(); + Module m4 = p4.C.class.getModule(); + + // test does not open package test to m4 + assertFalse(thisModule.isOpen("test", m4)); + try { + p4.C.tryNewInstance(test.C.class); + assertTrue(false); + } catch (IllegalAccessException expected) { } + + // open test to m4 + thisModule.addOpens("test", m4); + p4.C.tryNewInstance(test.C.class); // should succeed + + + // m3 does not open p3 to m4 + assertFalse(m3.isOpen("p3", m4)); + try { + p4.C.tryNewInstance(p3.C.class); + assertTrue(false); + } catch (IllegalAccessException expected) { } + + + // m3 opens p3 to test => test allowed to open m3/p3 to m4 + assertTrue(m3.isOpen("p3", thisModule)); + m3.addOpens("p3", m4); + assertTrue(m3.isOpen("p3", m4)); + p4.C.tryNewInstance(p3.C.class); // should succeed + + + // attempt to update m4 to open package to m3 + try { + m4.addOpens("p4", m3); + assertTrue(false); + } catch (IllegalCallerException expected) { } + } + + + /** + * Test Module::addUses + */ + public void testAddUses() { + Module thisModule = Main.class.getModule(); + + assertFalse(thisModule.canUse(Service.class)); + try { + ServiceLoader.load(Service.class); + assertTrue(false); + } catch (ServiceConfigurationError expected) { } + + Module result = thisModule.addUses(Service.class); + assertTrue(result== thisModule); + + assertTrue(thisModule.canUse(Service.class)); + ServiceLoader.load(Service.class); // no exception + } + +} diff --git a/jdk/test/java/lang/reflect/Module/addXXX/test/test/Service.java b/jdk/test/java/lang/reflect/Module/addXXX/test/test/Service.java new file mode 100644 index 00000000000..9fd5b8d862a --- /dev/null +++ b/jdk/test/java/lang/reflect/Module/addXXX/test/test/Service.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package test; + +/** + * Simple service type + */ +public interface Service { } diff --git a/jdk/test/java/lang/reflect/Proxy/ProxyClassAccessTest.java b/jdk/test/java/lang/reflect/Proxy/ProxyClassAccessTest.java index 55e11f1b3ec..3ef48cd79fa 100644 --- a/jdk/test/java/lang/reflect/Proxy/ProxyClassAccessTest.java +++ b/jdk/test/java/lang/reflect/Proxy/ProxyClassAccessTest.java @@ -91,7 +91,7 @@ public class ProxyClassAccessTest { Layer bootLayer = Layer.boot(); Configuration cf = bootLayer .configuration() - .resolveRequiresAndUses(ModuleFinder.of(), finder, modules); + .resolveAndBind(ModuleFinder.of(), finder, modules); ClassLoader parentLoader = this.getClass().getClassLoader(); Layer layer = bootLayer.defineModulesWithOneLoader(cf, parentLoader); diff --git a/jdk/test/java/lang/reflect/Proxy/ProxyLayerTest.java b/jdk/test/java/lang/reflect/Proxy/ProxyLayerTest.java index 5b04c93596b..767afd23323 100644 --- a/jdk/test/java/lang/reflect/Proxy/ProxyLayerTest.java +++ b/jdk/test/java/lang/reflect/Proxy/ProxyLayerTest.java @@ -79,7 +79,7 @@ public class ProxyLayerTest { Layer bootLayer = Layer.boot(); Configuration cf = bootLayer .configuration() - .resolveRequiresAndUses(ModuleFinder.of(), finder, Arrays.asList(modules)); + .resolveAndBind(ModuleFinder.of(), finder, Arrays.asList(modules)); ClassLoader scl = ClassLoader.getSystemClassLoader(); Layer layer = bootLayer.defineModulesWithOneLoader(cf, scl); @@ -113,7 +113,7 @@ public class ProxyLayerTest { Layer bootLayer = Layer.boot(); Configuration cf = bootLayer .configuration() - .resolveRequiresAndUses(ModuleFinder.of(), finder, Arrays.asList(modules)); + .resolveAndBind(ModuleFinder.of(), finder, Arrays.asList(modules)); ClassLoader scl = ClassLoader.getSystemClassLoader(); Layer layer = bootLayer.defineModulesWithOneLoader(cf, scl); @@ -143,7 +143,7 @@ public class ProxyLayerTest { Layer bootLayer = Layer.boot(); Configuration cf = bootLayer .configuration() - .resolveRequiresAndUses(ModuleFinder.of(), finder, Arrays.asList(modules)); + .resolveAndBind(ModuleFinder.of(), finder, Arrays.asList(modules)); ClassLoader scl = ClassLoader.getSystemClassLoader(); Layer layer = bootLayer.defineModulesWithOneLoader(cf, scl); diff --git a/jdk/test/java/security/modules/ModularTest.java b/jdk/test/java/security/modules/ModularTest.java index 9e67094944f..56635c99b8d 100644 --- a/jdk/test/java/security/modules/ModularTest.java +++ b/jdk/test/java/security/modules/ModularTest.java @@ -164,9 +164,9 @@ public abstract class ModularTest { final Builder builder; if (moduleType == MODULE_TYPE.EXPLICIT) { System.out.format(" %nGenerating ModuleDescriptor object"); - builder = ModuleDescriptor.module(moduleName).exports(pkg); + builder = ModuleDescriptor.newModule(moduleName).exports(pkg); if (isService && serviceInterface != null && serviceImpl != null) { - builder.provides(serviceInterface, serviceImpl); + builder.provides(serviceInterface, List.of(serviceImpl)); } else { if (serviceInterface != null) { builder.uses(serviceInterface); diff --git a/jdk/test/java/util/ServiceLoader/modules/BadProvidersTest.java b/jdk/test/java/util/ServiceLoader/modules/BadProvidersTest.java index c28e3b91911..8d3c2d27d3a 100644 --- a/jdk/test/java/util/ServiceLoader/modules/BadProvidersTest.java +++ b/jdk/test/java/util/ServiceLoader/modules/BadProvidersTest.java @@ -90,7 +90,7 @@ public class BadProvidersTest { Layer bootLayer = Layer.boot(); Configuration cf = bootLayer.configuration() - .resolveRequiresAndUses(finder, ModuleFinder.of(), Set.of(moduleName)); + .resolveAndBind(finder, ModuleFinder.of(), Set.of(moduleName)); ClassLoader scl = ClassLoader.getSystemClassLoader(); diff --git a/jdk/test/java/util/ServiceLoader/modules/Basic.java b/jdk/test/java/util/ServiceLoader/modules/Basic.java index 7833c0e2771..4dca546ea36 100644 --- a/jdk/test/java/util/ServiceLoader/modules/Basic.java +++ b/jdk/test/java/util/ServiceLoader/modules/Basic.java @@ -311,17 +311,17 @@ public class Basic { ModuleFinder finder = ModuleFinder.of(dir); // layer1 - Configuration cf1 = cf0.resolveRequiresAndUses(finder, ModuleFinder.of(), Set.of()); + Configuration cf1 = cf0.resolveAndBind(finder, ModuleFinder.of(), Set.of()); Layer layer1 = bootLayer.defineModulesWithOneLoader(cf1, scl); assertTrue(layer1.modules().size() == 1); // layer2 - Configuration cf2 = cf0.resolveRequiresAndUses(finder, ModuleFinder.of(), Set.of()); + Configuration cf2 = cf0.resolveAndBind(finder, ModuleFinder.of(), Set.of()); Layer layer2 = bootLayer.defineModulesWithOneLoader(cf2, scl); assertTrue(layer2.modules().size() == 1); // layer3 with layer1 and layer2 as parents - Configuration cf3 = Configuration.resolveRequiresAndUses(finder, + Configuration cf3 = Configuration.resolveAndBind(finder, List.of(cf1, cf2), ModuleFinder.of(), Set.of()); @@ -413,7 +413,7 @@ public class Basic { Collections.addAll(roots, modules); Layer bootLayer = Layer.boot(); Configuration parent = bootLayer.configuration(); - Configuration cf = parent.resolveRequires(finder, ModuleFinder.of(), roots); + Configuration cf = parent.resolve(finder, ModuleFinder.of(), roots); ClassLoader scl = ClassLoader.getSystemClassLoader(); Layer layer = bootLayer.defineModulesWithOneLoader(cf, scl); assertTrue(layer.modules().size() == 1); diff --git a/jdk/test/jdk/internal/reflect/CallerSensitive/CheckCSMs.java b/jdk/test/jdk/internal/reflect/CallerSensitive/CheckCSMs.java new file mode 100644 index 00000000000..126df3a75e6 --- /dev/null +++ b/jdk/test/jdk/internal/reflect/CallerSensitive/CheckCSMs.java @@ -0,0 +1,251 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import com.sun.tools.classfile.*; +import com.sun.tools.jdeps.ClassFileReader; +import static com.sun.tools.classfile.ConstantPool.*; +import java.io.File; +import java.io.IOException; +import java.io.UncheckedIOException; +import java.net.URI; +import java.nio.file.FileSystem; +import java.nio.file.FileSystems; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.concurrent.Callable; +import java.util.concurrent.ConcurrentSkipListSet; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.FutureTask; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +/* + * @test + * @summary CallerSensitive methods should be static or final instance + * methods except the known list of non-final instance methods + * @modules jdk.jdeps/com.sun.tools.classfile + * jdk.jdeps/com.sun.tools.jdeps + * @build CheckCSMs + * @run main/othervm/timeout=900 CheckCSMs + */ +public class CheckCSMs { + private static int numThreads = 3; + private static boolean listCSMs = false; + private final ExecutorService pool; + + // The goal is to remove this list of Non-final instance @CS methods + // over time. Do not add any new one to this list. + private static Set KNOWN_NON_FINAL_CSMS = + Set.of("java/io/ObjectStreamField#getType ()Ljava/lang/Class;", + "java/io/ObjectStreamClass#forClass ()Ljava/lang/Class;", + "java/lang/Runtime#load (Ljava/lang/String;)V", + "java/lang/Runtime#loadLibrary (Ljava/lang/String;)V", + "java/lang/Thread#getContextClassLoader ()Ljava/lang/ClassLoader;", + "javax/sql/rowset/serial/SerialJavaObject#getFields ()[Ljava/lang/reflect/Field;" + ); + + public static void main(String[] args) throws Exception { + if (args.length > 0 && args[0].equals("--list")) { + listCSMs = true; + } + + CheckCSMs checkCSMs = new CheckCSMs(); + Set result = checkCSMs.run(getPlatformClasses()); + if (!KNOWN_NON_FINAL_CSMS.equals(result)) { + Set diff = new HashSet<>(result); + diff.removeAll(KNOWN_NON_FINAL_CSMS); + throw new RuntimeException("Unexpected non-final instance method: " + + result.stream().sorted() + .collect(Collectors.joining("\n", "\n", ""))); + } + } + + private final Set nonFinalCSMs = new ConcurrentSkipListSet<>(); + private final ReferenceFinder finder; + public CheckCSMs() { + this.finder = new ReferenceFinder(getFilter(), getVisitor()); + pool = Executors.newFixedThreadPool(numThreads); + + } + + public Set run(Stream classes) + throws IOException, InterruptedException, ExecutionException, + ConstantPoolException + { + classes.forEach(this::processPath); + waitForCompletion(); + pool.shutdown(); + return nonFinalCSMs; + } + + + private ReferenceFinder.Filter getFilter() { + final String classname = "jdk/internal/reflect/Reflection"; + final String method = "getCallerClass"; + return new ReferenceFinder.Filter() { + public boolean accept(ConstantPool cpool, CPRefInfo cpref) { + try { + CONSTANT_NameAndType_info nat = cpref.getNameAndTypeInfo(); + return cpref.getClassName().equals(classname) && nat.getName().equals(method); + } catch (ConstantPoolException ex) { + throw new RuntimeException(ex); + } + } + }; + } + + private ReferenceFinder.Visitor getVisitor() { + return new ReferenceFinder.Visitor() { + public void visit(ClassFile cf, Method m, List refs) { + try { + // ignore jdk.unsupported/sun.reflect.Reflection.getCallerClass + // which is a "special" delegate to the internal getCallerClass + if (cf.getName().equals("sun/reflect/Reflection") && + m.getName(cf.constant_pool).equals("getCallerClass")) + return; + + String name = String.format("%s#%s %s", cf.getName(), + m.getName(cf.constant_pool), + m.descriptor.getValue(cf.constant_pool)); + if (!CheckCSMs.isStaticOrFinal(cf, m, cf.constant_pool)) { + System.err.println("Unsupported @CallerSensitive: " + name); + nonFinalCSMs.add(name); + } else { + if (listCSMs) { + System.out.format("@CS %s%n", name); + } + } + } catch (ConstantPoolException ex) { + throw new RuntimeException(ex); + } + } + }; + } + + void processPath(Path path) { + try { + ClassFileReader reader = ClassFileReader.newInstance(path); + for (ClassFile cf : reader.getClassFiles()) { + if (cf.access_flags.is(AccessFlags.ACC_MODULE)) + continue; + + String classFileName = cf.getName(); + // for each ClassFile + // parse constant pool to find matching method refs + // parse each method (caller) + // - visit and find method references matching the given method name + pool.submit(getTask(cf)); + } + } catch (IOException x) { + throw new UncheckedIOException(x); + } catch (ConstantPoolException x) { + throw new RuntimeException(x); + } + } + + private static final String CALLER_SENSITIVE_ANNOTATION + = "Ljdk/internal/reflect/CallerSensitive;"; + + private static boolean isCallerSensitive(Method m, ConstantPool cp) + throws ConstantPoolException + { + RuntimeAnnotations_attribute attr = + (RuntimeAnnotations_attribute)m.attributes.get(Attribute.RuntimeVisibleAnnotations); + if (attr != null) { + for (int i = 0; i < attr.annotations.length; i++) { + Annotation ann = attr.annotations[i]; + String annType = cp.getUTF8Value(ann.type_index); + if (CALLER_SENSITIVE_ANNOTATION.equals(annType)) { + return true; + } + } + } + return false; + } + + private static boolean isStaticOrFinal(ClassFile cf, Method m, ConstantPool cp) + throws ConstantPoolException + { + if (!isCallerSensitive(m, cp)) + return false; + + // either a static method or a final instance method + return m.access_flags.is(AccessFlags.ACC_STATIC) || + m.access_flags.is(AccessFlags.ACC_FINAL) || + cf.access_flags.is(AccessFlags.ACC_FINAL); + } + + private final List> tasks = new ArrayList>(); + private FutureTask getTask(final ClassFile cf) { + FutureTask task = new FutureTask(new Callable() { + public Void call() throws Exception { + finder.parse(cf); + return null; + } + }); + tasks.add(task); + return task; + } + + private void waitForCompletion() throws InterruptedException, ExecutionException { + for (FutureTask t : tasks) { + t.get(); + } + if (tasks.isEmpty()) { + throw new RuntimeException("No classes found, or specified."); + } + System.out.println("Parsed " + tasks.size() + " classfiles"); + } + + static Stream getPlatformClasses() throws IOException { + Path home = Paths.get(System.getProperty("java.home")); + + // Either an exploded build or an image. + File classes = home.resolve("modules").toFile(); + if (classes.isDirectory()) { + return Stream.of(classes.toPath()); + } else { + return jrtPaths(); + } + } + + static Stream jrtPaths() { + FileSystem jrt = FileSystems.getFileSystem(URI.create("jrt:/")); + Path root = jrt.getPath("/"); + + try { + return Files.walk(root) + .filter(p -> p.getNameCount() > 1) + .filter(p -> p.toString().endsWith(".class")); + } catch (IOException x) { + throw new UncheckedIOException(x); + } + } +} diff --git a/jdk/test/jdk/modules/etc/VerifyModuleDelegation.java b/jdk/test/jdk/modules/etc/VerifyModuleDelegation.java index 72e337066cb..182fb4ee985 100644 --- a/jdk/test/jdk/modules/etc/VerifyModuleDelegation.java +++ b/jdk/test/jdk/modules/etc/VerifyModuleDelegation.java @@ -46,7 +46,7 @@ public class VerifyModuleDelegation { private static final String JAVA_BASE = "java.base"; private static final ModuleDescriptor BASE - = ModuleDescriptor.module(JAVA_BASE).build(); + = ModuleDescriptor.newModule(JAVA_BASE).build(); private static final Set MREFS = Layer.boot().modules().stream().map(Module::getDescriptor) diff --git a/jdk/test/jdk/modules/scenarios/container/src/container/container/Main.java b/jdk/test/jdk/modules/scenarios/container/src/container/container/Main.java index 67f2416187f..ca3f0f3a0d2 100644 --- a/jdk/test/jdk/modules/scenarios/container/src/container/container/Main.java +++ b/jdk/test/jdk/modules/scenarios/container/src/container/container/Main.java @@ -71,9 +71,9 @@ public class Main { ModuleFinder finder = ModuleFinder.of(paths); Configuration cf = Layer.boot().configuration() - .resolveRequiresAndUses(finder, - ModuleFinder.of(), - Set.of(appModuleName)); + .resolveAndBind(finder, + ModuleFinder.of(), + Set.of(appModuleName)); System.out.println("Resolved"); cf.modules().stream() diff --git a/jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java b/jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java index 9ee4a0cd820..4e628995c18 100644 --- a/jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java +++ b/jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java @@ -27,7 +27,7 @@ * @summary Verify a non-zero value is assigned to jmxremote.port * when VM is started with jmxremote.port=0. * @library /lib/testlibrary - * @modules java.management/sun.management.jdp + * @modules jdk.management.agent/sun.management.jdp * @build jdk.testlibrary.* ClientConnection JdpTestUtil JdpTestCase JdpJmxRemoteDynamicPortTestCase DynamicLauncher * @run main JdpJmxRemoteDynamicPortTest */ diff --git a/jdk/test/tools/jar/mmrjar/Basic.java b/jdk/test/tools/jar/mmrjar/Basic.java index 6b0ad843641..0e83508b74d 100644 --- a/jdk/test/tools/jar/mmrjar/Basic.java +++ b/jdk/test/tools/jar/mmrjar/Basic.java @@ -331,7 +331,7 @@ public class Basic { ModuleInfoExtender mie = ModuleInfoExtender.newExtender( new ByteArrayInputStream(mdBytes)); - mie.mainClass("foo.main"); + mie.mainClass("p.Main"); mie.version(Version.parse("1.0")); ByteArrayOutputStream baos = new ByteArrayOutputStream(); @@ -345,7 +345,7 @@ public class Basic { // different main-class mie = ModuleInfoExtender.newExtender(new ByteArrayInputStream(mdBytes)); - mie.mainClass("foo.main2"); + mie.mainClass("p.Main2"); mie.version(Version.parse("1.0")); baos.reset(); mie.write(baos); @@ -360,7 +360,7 @@ public class Basic { // different version mie = ModuleInfoExtender.newExtender(new ByteArrayInputStream(mdBytes)); - mie.mainClass("foo.main"); + mie.mainClass("p.Main"); mie.version(Version.parse("2.0")); baos.reset(); mie.write(baos); @@ -395,7 +395,7 @@ public class Basic { Files.copy(Paths.get("test7-v9", "module-info.class"), Paths.get("test7-v10", "module-info.class")); - int rc = jar("--create --file mmr.jar --main-class=foo.main -C test7 . --release 9 -C test7-v9 . --release 10 -C test7-v10 ."); + int rc = jar("--create --file mmr.jar --main-class=p.Main -C test7 . --release 9 -C test7-v9 . --release 10 -C test7-v10 ."); System.out.println("-----------------------"); System.out.println( new String(errbytes.toByteArray())); @@ -409,7 +409,7 @@ System.out.println( new String(errbytes.toByteArray())); System.out.println("-----------------------"); System.out.println( new String(outbytes.toByteArray())); - Optional exp = Optional.of("foo.main"); + Optional exp = Optional.of("p.Main"); try (ZipFile zf = new ZipFile("mmr.jar")) { Assert.assertTrue(zf.getEntry("module-info.class") == null); diff --git a/jdk/test/tools/jar/modularJar/Basic.java b/jdk/test/tools/jar/modularJar/Basic.java index 8a9d44132fc..497853b769e 100644 --- a/jdk/test/tools/jar/modularJar/Basic.java +++ b/jdk/test/tools/jar/modularJar/Basic.java @@ -328,7 +328,7 @@ public class Basic { .resultChecker(r -> assertModuleData(r, FOO)); } - @Test + @Test(enabled = false) public void partialUpdateFooMainClass() throws IOException { Path mp = Paths.get("partialUpdateFooMainClass"); createTestDir(mp); diff --git a/jdk/test/tools/jlink/JLinkNegativeTest.java b/jdk/test/tools/jlink/JLinkNegativeTest.java index f8ac8093f33..b97092e4bac 100644 --- a/jdk/test/tools/jlink/JLinkNegativeTest.java +++ b/jdk/test/tools/jlink/JLinkNegativeTest.java @@ -274,7 +274,7 @@ public class JLinkNegativeTest { helper.getJmodSrcDir(), helper.getJmodClassesDir(), moduleName2, classNames); try (OutputStream out = Files.newOutputStream(module2.resolve("module-info.class"))) { - ModuleInfoWriter.write(ModuleDescriptor.module(moduleName1) + ModuleInfoWriter.write(ModuleDescriptor.newModule(moduleName1) .requires("java.base").build(), out); } @@ -332,7 +332,7 @@ public class JLinkNegativeTest { helper.getJarSrcDir(), helper.getJarClassesDir(), moduleName2, classNames); try (OutputStream out = Files.newOutputStream(module2.resolve("module-info.class"))) { - ModuleInfoWriter.write(ModuleDescriptor.module(moduleName1) + ModuleInfoWriter.write(ModuleDescriptor.newModule(moduleName1) .requires("java.base").build(), out); } diff --git a/jdk/test/tools/jmod/hashes/HashesTest.java b/jdk/test/tools/jmod/hashes/HashesTest.java index 3700554983f..10680927c19 100644 --- a/jdk/test/tools/jmod/hashes/HashesTest.java +++ b/jdk/test/tools/jmod/hashes/HashesTest.java @@ -312,9 +312,7 @@ public class HashesTest { assertTrue(ht.hashes("m2") == null); // should not override any JDK packaged modules - ModuleFinder finder = new ModulePath(Runtime.version(), - true, - mpath); + ModuleFinder finder = ModulePath.of(Runtime.version(), true, mpath); assertTrue(ht.hashes(finder,"jdk.compiler") == null); assertTrue(ht.hashes(finder,"jdk.attach") == null); } @@ -325,9 +323,7 @@ public class HashesTest { } private ModuleHashes hashes(String name) { - ModuleFinder finder = new ModulePath(Runtime.version(), - true, - lib); + ModuleFinder finder = ModulePath.of(Runtime.version(), true, lib); return hashes(finder, name); } diff --git a/jdk/test/tools/launcher/modules/patch/systemmodules/src1/java.base/jdk/internal/modules/SystemModules.java b/jdk/test/tools/launcher/modules/patch/systemmodules/src1/java.base/jdk/internal/modules/SystemModules.java index a774fc7427f..0eef57b33fb 100644 --- a/jdk/test/tools/launcher/modules/patch/systemmodules/src1/java.base/jdk/internal/modules/SystemModules.java +++ b/jdk/test/tools/launcher/modules/patch/systemmodules/src1/java.base/jdk/internal/modules/SystemModules.java @@ -30,6 +30,8 @@ package jdk.internal.module; public final class SystemModules { public static final String[] MODULE_NAMES = new String[0]; + public static int PACKAGES_IN_BOOT_LAYER = 1024; + public static boolean hasSplitPackages() { return true; } From a7c0fa1045c663550135d5e3635a04771d58cbd0 Mon Sep 17 00:00:00 2001 From: Michael McMahon Date: Fri, 10 Feb 2017 09:55:19 +0000 Subject: [PATCH 111/447] 8174716: java/net/httpclient/security/Driver.java failing in JDK 9 Reviewed-by: alanb --- jdk/test/java/net/httpclient/security/Driver.java | 1 + 1 file changed, 1 insertion(+) diff --git a/jdk/test/java/net/httpclient/security/Driver.java b/jdk/test/java/net/httpclient/security/Driver.java index 64b56084d41..5b58757adc3 100644 --- a/jdk/test/java/net/httpclient/security/Driver.java +++ b/jdk/test/java/net/httpclient/security/Driver.java @@ -127,6 +127,7 @@ public class Driver { cmd.add("-Dtest.src=" + testSrc); cmd.add("-Dtest.classes=" + testClasses); cmd.add("-Djava.security.manager"); + cmd.add("--add-modules=jdk.incubator.httpclient"); cmd.add("-Djava.security.policy=" + testSrc + sep + policy); cmd.add("-Dport.number=" + Integer.toString(Utils.getFreePort())); cmd.add("-Dport.number1=" + Integer.toString(Utils.getFreePort())); From f3847cff6214828fcb31e634249694fcbdca553e Mon Sep 17 00:00:00 2001 From: Denis Kononenko Date: Thu, 9 Feb 2017 19:43:53 +0300 Subject: [PATCH 112/447] 8170113: jimage extract to readonly directory causes MissingResourceException Added a missing resource. Reviewed-by: alanb, anazarov --- .../share/classes/jdk/tools/jimage/resources/jimage.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jimage/resources/jimage.properties b/jdk/src/jdk.jlink/share/classes/jdk/tools/jimage/resources/jimage.properties index 13faa3b40e4..2bc96bd30af 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jimage/resources/jimage.properties +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jimage/resources/jimage.properties @@ -98,3 +98,4 @@ err.not.a.jimage=not a jimage file: {0} err.no.jimage=no jimage provided err.option.unsupported={0} not supported: {1} err.unknown.option=unknown option: {0} +err.cannot.create.dir=cannot create directory {0} From b356b504d84c79743143178ec976260b083cb4e6 Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 9 Feb 2017 17:21:44 +0000 Subject: [PATCH 113/447] Added tag jdk-9+156 for changeset 3cecfaef55fe --- .hgtags-top-repo | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags-top-repo b/.hgtags-top-repo index 3d81f131af0..57426de99cb 100644 --- a/.hgtags-top-repo +++ b/.hgtags-top-repo @@ -398,3 +398,4 @@ ef056360ddf3977d7d2ddbeb456a4d612d19ea05 jdk-9+152 816a6d03a7c44edfbd8780110529f1bdc3964fb9 jdk-9+153 8d26916eaa21b689835ffc1c0dbf12470aa9be61 jdk-9+154 688a3863c00ebc089ab17ee1fc46272cbbd96815 jdk-9+155 +783ec7542cf7154e5d2b87f55bb97d28f81e9ada jdk-9+156 From 27dc8df66b7dbdc8e072cfad2a5509281d887c8c Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 9 Feb 2017 17:21:46 +0000 Subject: [PATCH 114/447] Added tag jdk-9+156 for changeset 656a9525a59c --- hotspot/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/hotspot/.hgtags b/hotspot/.hgtags index 66afb5ed54b..328609950e1 100644 --- a/hotspot/.hgtags +++ b/hotspot/.hgtags @@ -558,3 +558,4 @@ a82cb5350cad96a0b4de496afebe3ded89f27efa jdk-9+146 217ba81b9a4ce8698200370175aa2db86a39f66c jdk-9+153 a9fdfd55835ef9dccb7f317b07249bd66653b874 jdk-9+154 f3b3d77a1751897413aae43ac340a130b6fa2ae1 jdk-9+155 +43139c588ea48b6504e52b6c3dec530b17b1fdb4 jdk-9+156 From a5ab73192c2a14f5e31b0b0d4cc19c0fc1ac94fa Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 9 Feb 2017 17:21:47 +0000 Subject: [PATCH 115/447] Added tag jdk-9+156 for changeset 3d5314988315 --- jaxws/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jaxws/.hgtags b/jaxws/.hgtags index b130a70170d..237bdacc027 100644 --- a/jaxws/.hgtags +++ b/jaxws/.hgtags @@ -401,3 +401,4 @@ c48b4d4768b1c2b8fe5d1a844ca13732e5dfbe2a jdk-9+151 7a532a9a227137155b905341d4b99939db51220e jdk-9+153 34af95c7dbff74f3448fcdb7d745524e8a1cc88a jdk-9+154 9b9918656c97724fd89c04a8547043bbd37f5935 jdk-9+155 +7c829eba781409b4fe15392639289af1553dcf63 jdk-9+156 From b793624138e6733502846646c962e04d65a78066 Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 9 Feb 2017 17:21:47 +0000 Subject: [PATCH 116/447] Added tag jdk-9+156 for changeset fdecd1d14d53 --- jdk/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jdk/.hgtags b/jdk/.hgtags index 5a7c6ba2850..e6379a2ee4f 100644 --- a/jdk/.hgtags +++ b/jdk/.hgtags @@ -398,3 +398,4 @@ a20f2cf90762673e1bc4980fd6597e70a2578045 jdk-9+152 1c4411322327aea3f91011ec3977a12a05b09629 jdk-9+153 c97e7a8b8da062b9070df442f9cf308e10845fb7 jdk-9+154 e170c858888e83d5c0994504599b6ed7a1fb0cfc jdk-9+155 +7d64e541a6c04c714bcad4c8b553db912f827cd5 jdk-9+156 From e0379987e763095cb608fe27906d21c3f18a6f01 Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 9 Feb 2017 17:21:47 +0000 Subject: [PATCH 117/447] Added tag jdk-9+156 for changeset 08175b460862 --- jaxp/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jaxp/.hgtags b/jaxp/.hgtags index 9804e10e82f..3edeb788b0e 100644 --- a/jaxp/.hgtags +++ b/jaxp/.hgtags @@ -398,3 +398,4 @@ f85154af719f99a3b4d81b67a8b4c18a650d10f9 jdk-9+150 1384504d2cd0e55c5e0becaeaf40ab05cae959d6 jdk-9+153 7fa738305436d14c0926df0f04892890cacc766b jdk-9+154 48fa77af153288b08ba794e1616a7b0685f3b67e jdk-9+155 +e930c373aaa4e0e712c9a25ba4b03d473b48c294 jdk-9+156 From 6563321674473b46d6d6b2c5ef0c2e522a883208 Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 9 Feb 2017 17:21:49 +0000 Subject: [PATCH 118/447] Added tag jdk-9+156 for changeset 62824732af55 --- langtools/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/langtools/.hgtags b/langtools/.hgtags index b0dfd872ddc..7776525787b 100644 --- a/langtools/.hgtags +++ b/langtools/.hgtags @@ -398,3 +398,4 @@ e5a42ddaf633fde14b983f740ae0e7e490741fd1 jdk-9+150 03f48cd283f5dd6b7153fd7e0cf2df8582b14391 jdk-9+153 6a9dd3d893b0a493a3e5d8d392815b5ee76a02d9 jdk-9+154 dfcfdb2db85f1bb434209f56ca557ea6f9830aa8 jdk-9+155 +6f91e41163bc09e9b3ec72e8d1185f39296ee5d4 jdk-9+156 From 120212f4b645fdc46b97a7cf7c063e970a70e0b9 Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 9 Feb 2017 17:21:49 +0000 Subject: [PATCH 119/447] Added tag jdk-9+156 for changeset 1bb10bccf057 --- nashorn/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/nashorn/.hgtags b/nashorn/.hgtags index 22c28403722..08ec4aa8a02 100644 --- a/nashorn/.hgtags +++ b/nashorn/.hgtags @@ -389,3 +389,4 @@ ddc52e72757086a75a54371e8e7f56a3f89f1e55 jdk-9+152 19aaaf2d02b7d6986538cd9a8c46901ecb50eebf jdk-9+153 a84b49cfee63716975535abae2865ffef4dd6474 jdk-9+154 f9bb37a817b3cd3b758a60f3c68258a6554eb382 jdk-9+155 +d577398d31111be4bdaa08008247cf4242eaea94 jdk-9+156 From 9db79d57c8488d43fd9580473e8450fa5f8cabd4 Mon Sep 17 00:00:00 2001 From: Alan Bateman Date: Fri, 10 Feb 2017 09:03:55 +0000 Subject: [PATCH 120/447] 8173393: Module system implementation refresh (2/2017) Co-authored-by: George Triantafillou Reviewed-by: lfoltan, acorn, mchung --- hotspot/src/share/vm/prims/methodHandles.cpp | 9 +- hotspot/test/ProblemList.txt | 1 + .../AccessCheck/AccessExportTwice.java | 6 +- .../modules/AccessCheck/AccessReadTwice.java | 8 +- .../modules/AccessCheck/CheckRead.java | 74 +++++++-------- .../modules/AccessCheck/DiffCL_CheckRead.java | 74 +++++++-------- .../AccessCheck/DiffCL_ExpQualOther.java | 80 ++++++++-------- .../AccessCheck/DiffCL_ExpQualToM1.java | 56 +++++------ .../modules/AccessCheck/DiffCL_ExpUnqual.java | 54 +++++------ .../modules/AccessCheck/DiffCL_PkgNotExp.java | 52 +++++------ .../modules/AccessCheck/DiffCL_Umod.java | 92 +++++++++---------- .../modules/AccessCheck/DiffCL_UmodUpkg.java | 60 ++++++------ .../modules/AccessCheck/ExpQualOther.java | 78 ++++++++-------- .../modules/AccessCheck/ExpQualToM1.java | 44 ++++----- .../modules/AccessCheck/ExpUnqual.java | 38 ++++---- .../modules/AccessCheck/ExportAllUnnamed.java | 58 ++++++------ .../modules/AccessCheck/PkgNotExp.java | 52 +++++------ .../runtime/modules/AccessCheck/Umod.java | 92 +++++++++---------- .../AccessCheck/UmodDiffCL_ExpQualOther.java | 54 +++++------ .../AccessCheck/UmodDiffCL_ExpUnqual.java | 54 +++++------ .../AccessCheck/UmodDiffCL_PkgNotExp.java | 56 +++++------ .../runtime/modules/AccessCheck/UmodUPkg.java | 60 ++++++------ .../UmodUpkgDiffCL_ExpQualOther.java | 56 +++++------ .../AccessCheck/UmodUpkgDiffCL_NotExp.java | 56 +++++------ .../AccessCheck/UmodUpkg_ExpQualOther.java | 70 +++++++------- .../modules/AccessCheck/UmodUpkg_NotExp.java | 52 +++++------ .../AccessCheck/Umod_ExpQualOther.java | 70 +++++++------- .../modules/AccessCheck/Umod_ExpUnqual.java | 50 +++++----- .../modules/AccessCheck/Umod_PkgNotExp.java | 52 +++++------ .../modules/AccessCheck/p1/c1Loose.java | 4 +- .../modules/AccessCheck/p1/c1ReadEdge.java | 8 +- .../AccessCheck/p1/c1ReadEdgeDiffLoader.java | 24 ++--- .../modules/AccessCheck/p3/c3ReadEdge.jcod | 8 +- .../AccessCheck/p3/c3ReadEdgeDiffLoader.jcod | 24 ++--- .../modules/AccessCheckAllUnnamed.java | 30 +++--- .../test/runtime/modules/AccessCheckExp.java | 32 +++---- .../runtime/modules/AccessCheckJavaBase.java | 10 +- .../test/runtime/modules/AccessCheckRead.java | 30 +++--- .../runtime/modules/AccessCheckSuper.java | 18 ++-- .../runtime/modules/AccessCheckUnnamed.java | 14 +-- .../runtime/modules/AccessCheckWorks.java | 32 +++---- .../test/runtime/modules/CCE_module_msg.java | 16 ++-- hotspot/test/runtime/modules/ExportTwice.java | 44 ++++----- .../modules/IgnoreModulePropertiesTest.java | 4 +- .../JVMAddModuleExportToAllUnnamed.java | 18 ++-- .../modules/JVMAddModuleExportsToAll.java | 40 ++++---- .../runtime/modules/JVMAddModulePackage.java | 48 +++++----- .../test/runtime/modules/JVMDefineModule.java | 4 +- .../modules/JVMGetModuleByPkgName.java | 10 +- .../test/runtime/modules/ModuleHelper.java | 2 +- .../runtime/modules/ModuleOptionsTest.java | 2 +- .../ModuleStress/CustomSystemClassLoader.java | 4 +- .../ModuleStress/ModuleNonBuiltinCLMain.java | 70 +++++++------- .../ModuleStress/ModuleSameCLMain.java | 52 +++++------ .../modules/ModuleStress/ModuleStress.java | 18 ++-- .../ModuleStress/src/jdk.test/test/Main.java | 2 +- .../src/jdk.test/test/MainGC.java | 2 +- .../PatchModule/PatchModuleDupModule.java | 6 +- .../JvmtiGetAllModulesTest.java | 5 +- 59 files changed, 1070 insertions(+), 1069 deletions(-) diff --git a/hotspot/src/share/vm/prims/methodHandles.cpp b/hotspot/src/share/vm/prims/methodHandles.cpp index 717c1fe00ad..abde0dd02ed 100644 --- a/hotspot/src/share/vm/prims/methodHandles.cpp +++ b/hotspot/src/share/vm/prims/methodHandles.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1208,9 +1208,10 @@ JVM_ENTRY(jobject, MHN_resolve_Mem(JNIEnv *env, jobject igcls, jobject mname_jh, if (reference_klass != NULL && reference_klass->is_instance_klass()) { // Emulate LinkResolver::check_klass_accessability. Klass* caller = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(caller_jh)); - if (Reflection::verify_class_access(caller, - reference_klass, - true) != Reflection::ACCESS_OK) { + if (caller != SystemDictionary::Object_klass() + && Reflection::verify_class_access(caller, + reference_klass, + true) != Reflection::ACCESS_OK) { THROW_MSG_NULL(vmSymbols::java_lang_InternalError(), reference_klass->external_name()); } } diff --git a/hotspot/test/ProblemList.txt b/hotspot/test/ProblemList.txt index bf6811efb15..31e5703c376 100644 --- a/hotspot/test/ProblemList.txt +++ b/hotspot/test/ProblemList.txt @@ -73,6 +73,7 @@ runtime/SharedArchiveFile/DefaultUseWithClient.java 8154204 generic-all serviceability/jdwp/AllModulesCommandTest.java 8168478 generic-all serviceability/sa/sadebugd/SADebugDTest.java 8163805 generic-all +serviceability/jvmti/ModuleAwareAgents/ClassFileLoadHook/MAAClassFileLoadHook.java 8173936 generic-all ############################################################################# diff --git a/hotspot/test/runtime/modules/AccessCheck/AccessExportTwice.java b/hotspot/test/runtime/modules/AccessCheck/AccessExportTwice.java index a1eb2cce85d..5f9d716892f 100644 --- a/hotspot/test/runtime/modules/AccessCheck/AccessExportTwice.java +++ b/hotspot/test/runtime/modules/AccessCheck/AccessExportTwice.java @@ -68,7 +68,7 @@ public class AccessExportTwice { // Packages: none // Packages exported: none ModuleDescriptor descriptor_first_mod = - ModuleDescriptor.module("first_mod") + ModuleDescriptor.newModule("first_mod") .requires("java.base") .requires("second_mod") .build(); @@ -78,7 +78,7 @@ public class AccessExportTwice { // Packages: p2 // Packages exported: p2 is exported to first_mod ModuleDescriptor descriptor_second_mod = - ModuleDescriptor.module("second_mod") + ModuleDescriptor.newModule("second_mod") .requires("java.base") .exports("p2", Set.of("first_mod")) .build(); @@ -89,7 +89,7 @@ public class AccessExportTwice { // Resolves "first_mod" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("first_mod")); + .resolve(finder, ModuleFinder.of(), Set.of("first_mod")); // Map each module to the same class loader Map map = new HashMap<>(); diff --git a/hotspot/test/runtime/modules/AccessCheck/AccessReadTwice.java b/hotspot/test/runtime/modules/AccessCheck/AccessReadTwice.java index 5d1a690a740..5e21a9335fc 100644 --- a/hotspot/test/runtime/modules/AccessCheck/AccessReadTwice.java +++ b/hotspot/test/runtime/modules/AccessCheck/AccessReadTwice.java @@ -66,9 +66,9 @@ public class AccessReadTwice { // Packages: p1, p4 // Packages exported: none ModuleDescriptor descriptor_first_mod = - ModuleDescriptor.module("first_mod") + ModuleDescriptor.newModule("first_mod") .requires("java.base") - .contains(Set.of("p1", "p4")) + .packages(Set.of("p1", "p4")) .build(); // Define module: second_mod @@ -76,7 +76,7 @@ public class AccessReadTwice { // Packages: p2 // Packages exported: p2 is exported to first_mod ModuleDescriptor descriptor_second_mod = - ModuleDescriptor.module("second_mod") + ModuleDescriptor.newModule("second_mod") .requires("java.base") .exports("p2", Set.of("first_mod")) .build(); @@ -87,7 +87,7 @@ public class AccessReadTwice { // Resolves "first_mod" and "second_mod" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("first_mod", "second_mod")); + .resolve(finder, ModuleFinder.of(), Set.of("first_mod", "second_mod")); // Map each module to this class loader Map map = new HashMap<>(); diff --git a/hotspot/test/runtime/modules/AccessCheck/CheckRead.java b/hotspot/test/runtime/modules/AccessCheck/CheckRead.java index 6143f0b94b0..0d507cb7f16 100644 --- a/hotspot/test/runtime/modules/AccessCheck/CheckRead.java +++ b/hotspot/test/runtime/modules/AccessCheck/CheckRead.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ /* * @test - * @summary Test that if module m1 can not read module m2, then class p1.c1 - * in module m1 can not access p2.c2 in module m2. + * @summary Test that if module m1x can not read module m2x, then class p1.c1 + * in module m1x can not access p2.c2 in module m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MySameClassLoader.java @@ -47,15 +47,15 @@ import java.util.Set; import myloaders.MySameClassLoader; // -// ClassLoader1 --> defines m1 --> packages p1 -// defines m2 --> packages p2 -// defines m3 --> packages p3 +// ClassLoader1 --> defines m1x --> packages p1 +// defines m2x --> packages p2 +// defines m3x --> packages p3 // -// m1 can not read m2 -// package p2 in m2 is exported to m1 +// m1x can not read m2x +// package p2 in m2x is exported to m1x // -// class p1.c1 defined in m1 tries to access p2.c2 defined in m2. -// Access denied since m1 can not read m2. +// class p1.c1 defined in m1x tries to access p2.c2 defined in m2x. +// Access denied since m1x can not read m2x. // public class CheckRead { @@ -64,65 +64,65 @@ public class CheckRead { // publicly defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m3 + // Define module: m1x + // Can read: java.base, m3x // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m3") + .requires("m3x") .exports("p1") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 - // Packages exported: p2 is exported to m1 - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + // Packages exported: p2 is exported to m1x + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p2", Set.of("m1")) + .exports("p2", Set.of("m1x")) .build(); - // Define module: m3 - // Can read: java.base, m2 + // Define module: m3x + // Can read: java.base, m2x // Packages: p3 // Packages exported: none - ModuleDescriptor descriptor_m3 = - ModuleDescriptor.module("m3") + ModuleDescriptor descriptor_m3x = + ModuleDescriptor.newModule("m3x") .requires("java.base") - .requires("m2") - .contains("p3") + .requires("m2x") + .packages(Set.of("p3")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2, descriptor_m3); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x, descriptor_m3x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MySameClassLoader.loader1); - map.put("m2", MySameClassLoader.loader1); - map.put("m3", MySameClassLoader.loader1); + map.put("m1x", MySameClassLoader.loader1); + map.put("m2x", MySameClassLoader.loader1); + map.put("m3x", MySameClassLoader.loader1); - // Create Layer that contains m1, m2 and m3 + // Create Layer that contains m1x, m2x and m3x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m3") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m3x") == MySameClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 Class p1_c1_class = MySameClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is exported to m1 but m2 is not readable from m1)"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is exported to m1x but m2x is not readable from m1x)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("cannot access")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/DiffCL_CheckRead.java b/hotspot/test/runtime/modules/AccessCheck/DiffCL_CheckRead.java index b0b64a46d95..d02959fd06f 100644 --- a/hotspot/test/runtime/modules/AccessCheck/DiffCL_CheckRead.java +++ b/hotspot/test/runtime/modules/AccessCheck/DiffCL_CheckRead.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ /* * @test - * @summary Test that if module m1 can not read module m2, then class p1.c1 - * in module m1 can not access p2.c2 in module m2. + * @summary Test that if module m1x can not read module m2x, then class p1.c1 + * in module m1x can not access p2.c2 in module m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MyDiffClassLoader.java @@ -47,15 +47,15 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> packages p1 -// ClassLoader2 --> defines m2 --> packages p2 -// defines m3 --> packages p3 +// ClassLoader1 --> defines m1x --> packages p1 +// ClassLoader2 --> defines m2x --> packages p2 +// defines m3x --> packages p3 // -// m1 can not read m2 -// package p2 in m2 is exported to m1 +// m1x can not read m2x +// package p2 in m2x is exported to m1x // -// class p1.c1 defined in m1 tries to access p2.c2 defined in m2. -// Access denied since m1 can not read m2. +// class p1.c1 defined in m1x tries to access p2.c2 defined in m2x. +// Access denied since m1x can not read m2x. // public class DiffCL_CheckRead { @@ -64,65 +64,65 @@ public class DiffCL_CheckRead { // publicly defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m3 + // Define module: m1x + // Can read: java.base, m3x // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m3") + .requires("m3x") .exports("p1") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 - // Packages exported: p2 is exported to m1 - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + // Packages exported: p2 is exported to m1x + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p2", Set.of("m1")) + .exports("p2", Set.of("m1x")) .build(); - // Define module: m3 - // Can read: java.base, m2 + // Define module: m3x + // Can read: java.base, m2x // Packages: p3 // Packages exported: none - ModuleDescriptor descriptor_m3 = - ModuleDescriptor.module("m3") + ModuleDescriptor descriptor_m3x = + ModuleDescriptor.newModule("m3x") .requires("java.base") - .requires("m2") - .contains("p3") + .requires("m2x") + .packages(Set.of("p3")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2, descriptor_m3); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x, descriptor_m3x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); - map.put("m2", MyDiffClassLoader.loader2); - map.put("m3", MyDiffClassLoader.loader2); + map.put("m1x", MyDiffClassLoader.loader1); + map.put("m2x", MyDiffClassLoader.loader2); + map.put("m3x", MyDiffClassLoader.loader2); - // Create Layer that contains m1, m2 and m3 + // Create Layer that contains m1x, m2x and m3x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MyDiffClassLoader.loader2); - assertTrue(layer.findLoader("m3") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m3x") == MyDiffClassLoader.loader2); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 Class p1_c1_class = MyDiffClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is exported to m1 but m2 is not readable from m1)"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is exported to m1x but m2x is not readable from m1x)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("cannot access")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualOther.java b/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualOther.java index b7088553bad..3ffb591ff57 100644 --- a/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualOther.java +++ b/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualOther.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,9 +25,9 @@ /* * @test - * @summary Test that if module m1 can read module m2, but package p2 in m2 - * is exported specifically to module m3, then class p1.c1 in m1 can not - * access p2.c2 in m2. + * @summary Test that if module m1x can read module m2x, but package p2 in m2x + * is exported specifically to module m3x, then class p1.c1 in m1x can not + * access p2.c2 in m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MyDiffClassLoader.java @@ -48,15 +48,15 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> packages p1 -// ClassLoader2 --> defines m2 --> packages p2 -// defines m3 --> packages p3 +// ClassLoader1 --> defines m1x --> packages p1 +// ClassLoader2 --> defines m2x --> packages p2 +// defines m3x --> packages p3 // -// m1 can read m2 -// package p2 in m2 is exported to m3 +// m1x can read m2x +// package p2 in m2x is exported to m3x // -// class p1.c1 defined in m1 tries to access p2.c2 defined in m2 -// Access denied since although m1 can read m2, p2 is exported only to m3. +// class p1.c1 defined in m1x tries to access p2.c2 defined in m2x +// Access denied since although m1x can read m2x, p2 is exported only to m3x. // public class DiffCL_ExpQualOther { @@ -65,66 +65,66 @@ public class DiffCL_ExpQualOther { // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2, m3 + // Define module: m1x + // Can read: java.base, m2x, m3x // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") - .requires("m3") + .requires("m2x") + .requires("m3x") .exports("p1") .build(); - // Define module: m2 - // Can read: java.base, m3 + // Define module: m2x + // Can read: java.base, m3x // Packages: p2 - // Packages exported: p2 is exported to m3 - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + // Packages exported: p2 is exported to m3x + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p2", Set.of("m3")) + .exports("p2", Set.of("m3x")) .build(); - // Define module: m3 - // Can read: java.base, m2 + // Define module: m3x + // Can read: java.base, m2x // Packages: p3 // Packages exported: none - ModuleDescriptor descriptor_m3 = - ModuleDescriptor.module("m3") + ModuleDescriptor descriptor_m3x = + ModuleDescriptor.newModule("m3x") .requires("java.base") - .requires("m2") - .contains("p3") + .requires("m2x") + .packages(Set.of("p3")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2, descriptor_m3); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x, descriptor_m3x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); - map.put("m2", MyDiffClassLoader.loader2); - map.put("m3", MyDiffClassLoader.loader2); + map.put("m1x", MyDiffClassLoader.loader1); + map.put("m2x", MyDiffClassLoader.loader2); + map.put("m3x", MyDiffClassLoader.loader2); - // Create Layer that contains m1 & m2 + // Create Layer that contains m1x & m2x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MyDiffClassLoader.loader2); - assertTrue(layer.findLoader("m3") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m3x") == MyDiffClassLoader.loader2); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 Class p1_c1_class = MyDiffClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is exported to m3 not to m1)"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is exported to m3x not to m1x)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualToM1.java b/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualToM1.java index 8ca888b312f..1a86434be85 100644 --- a/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualToM1.java +++ b/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualToM1.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ /* * @test - * @summary class p1.c1 defined in m1 tries to access p2.c2 defined in m2. - * Access allowed since m1 can read m2 and package p2 is exported to m1. + * @summary class p1.c1 defined in m1x tries to access p2.c2 defined in m2x. + * Access allowed since m1x can read m2x and package p2 is exported to m1x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MyDiffClassLoader.java @@ -47,14 +47,14 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> packages p1 -// ClassLoader2 --> defines m2 --> packages p2 +// ClassLoader1 --> defines m1x --> packages p1 +// ClassLoader2 --> defines m2x --> packages p2 // -// m1 can read m2 -// package p2 in m2 is exported to m1 +// m1x can read m2x +// package p2 in m2x is exported to m1x // -// class p1.c1 defined in m1 tries to access p2.c2 defined in m2 -// Access allowed since m1 can read m2 and package p2 is exported to m1. +// class p1.c1 defined in m1x tries to access p2.c2 defined in m2x +// Access allowed since m1x can read m2x and package p2 is exported to m1x. // public class DiffCL_ExpQualToM1 { @@ -63,45 +63,45 @@ public class DiffCL_ExpQualToM1 { // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: p1 // Packages exported: p1 is exported to unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .exports("p1") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 - // Packages exported: package p2 is exported to m1 - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + // Packages exported: package p2 is exported to m1x + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p2", Set.of("m1")) + .exports("p2", Set.of("m1x")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); - map.put("m2", MyDiffClassLoader.loader2); + map.put("m1x", MyDiffClassLoader.loader1); + map.put("m2x", MyDiffClassLoader.loader2); - // Create Layer that contains m1 & m2 + // Create Layer that contains m1x & m2x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 @@ -109,7 +109,7 @@ public class DiffCL_ExpQualToM1 { try { p1_c1_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, an IAE should not be thrown since p2 is exported qualifiedly to m1"); + throw new RuntimeException("Test Failed, an IAE should not be thrown since p2 is exported qualifiedly to m1x"); } } diff --git a/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpUnqual.java b/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpUnqual.java index e38d54166ed..cb8c3f2b682 100644 --- a/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpUnqual.java +++ b/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpUnqual.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ /* * @test - * @summary Test that if module m1 can read module m2, and package p2 in m2 is - * exported unqualifiedly, then class p1.c1 in m1 can read p2.c2 in m2. + * @summary Test that if module m1x can read module m2x, and package p2 in m2x is + * exported unqualifiedly, then class p1.c1 in m1x can read p2.c2 in m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MyDiffClassLoader.java @@ -47,14 +47,14 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> packages p1 -// ClassLoader2 --> defines m2 --> packages p2 +// ClassLoader1 --> defines m1x --> packages p1 +// ClassLoader2 --> defines m2x --> packages p2 // -// m1 can read m2 -// package p2 in m2 is exported to m1 +// m1x can read m2x +// package p2 in m2x is exported to m1x // -// class p1.c1 defined in m1 tries to access p2.c2 defined in m2 -// Access allowed since m1 can read m2 and package p2 is exported +// class p1.c1 defined in m1x tries to access p2.c2 defined in m2x +// Access allowed since m1x can read m2x and package p2 is exported // unqualifiedly. // public class DiffCL_ExpUnqual { @@ -64,45 +64,45 @@ public class DiffCL_ExpUnqual { // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .exports("p1") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 - // Packages exported: package p2 is exported to m1 - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + // Packages exported: package p2 is exported to m1x + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") .exports("p2") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); - map.put("m2", MyDiffClassLoader.loader2); + map.put("m1x", MyDiffClassLoader.loader1); + map.put("m2x", MyDiffClassLoader.loader2); - // Create Layer that contains m1 & m2 + // Create Layer that contains m1x & m2x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 @@ -110,7 +110,7 @@ public class DiffCL_ExpUnqual { try { p1_c1_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, an IAE should not be thrown since p2 is exported qualifiedly to m1"); + throw new RuntimeException("Test Failed, an IAE should not be thrown since p2 is exported qualifiedly to m1x"); } } diff --git a/hotspot/test/runtime/modules/AccessCheck/DiffCL_PkgNotExp.java b/hotspot/test/runtime/modules/AccessCheck/DiffCL_PkgNotExp.java index 0cc88f7a69b..5b18038a16d 100644 --- a/hotspot/test/runtime/modules/AccessCheck/DiffCL_PkgNotExp.java +++ b/hotspot/test/runtime/modules/AccessCheck/DiffCL_PkgNotExp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ /* * @test - * @summary Test that if module m1 can read module m2, but package p2 in m2 is not - * exported, then class p1.c1 in m1 can not read p2.c2 in m2. + * @summary Test that if module m1x can read module m2x, but package p2 in m2x is not + * exported, then class p1.c1 in m1x can not read p2.c2 in m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MyDiffClassLoader.java @@ -47,13 +47,13 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> packages p1 -// ClassLoader2 --> defines m2 --> packages p2 +// ClassLoader1 --> defines m1x --> packages p1 +// ClassLoader2 --> defines m2x --> packages p2 // -// m1 can read m2 -// package p2 in m2 is not exported +// m1x can read m2x +// package p2 in m2x is not exported // -// class p1.c1 defined in m1 tries to access p2.c2 defined in m2 +// class p1.c1 defined in m1x tries to access p2.c2 defined in m2x // Access denied since p2 is not exported. // public class DiffCL_PkgNotExp { @@ -63,52 +63,52 @@ public class DiffCL_PkgNotExp { // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .exports("p1") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 // Packages exported: none - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .contains("p2") + .packages(Set.of("p2")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); - map.put("m2", MyDiffClassLoader.loader2); + map.put("m1x", MyDiffClassLoader.loader1); + map.put("m2x", MyDiffClassLoader.loader2); - // Create Layer that contains m1 & m2 + // Create Layer that contains m1x & m2x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 Class p1_c1_class = MyDiffClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is not exported)"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is not exported)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/DiffCL_Umod.java b/hotspot/test/runtime/modules/AccessCheck/DiffCL_Umod.java index 2a5c723c76f..8b3d098e815 100644 --- a/hotspot/test/runtime/modules/AccessCheck/DiffCL_Umod.java +++ b/hotspot/test/runtime/modules/AccessCheck/DiffCL_Umod.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ /* * @test - * @summary class p1.c1 defined in m1 tries to access p2.c2 defined in unnamed module. + * @summary class p1.c1 defined in m1x tries to access p2.c2 defined in unnamed module. * @library /test/lib * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.module @@ -50,10 +50,10 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> packages p1 -// package p1 in m1 is exported unqualifiedly +// ClassLoader1 --> defines m1x --> packages p1 +// package p1 in m1x is exported unqualifiedly // -// class p1.c1 defined in m1 tries to access p2.c2 defined in +// class p1.c1 defined in m1x tries to access p2.c2 defined in // in unnamed module. // // Three access attempts occur in this test: @@ -62,7 +62,7 @@ import myloaders.MyDiffClassLoader; // 2. In this scenario a strict module establishes readability // to the particular unnamed module it is trying to access. // Access is allowed. -// 3. Module m1 in the test_looseModuleLayer() method +// 3. Module m1x in the test_looseModuleLayer() method // is transitioned to a loose module, access // to all unnamed modules is allowed. // @@ -71,41 +71,41 @@ public class DiffCL_Umod { // Create Layers over the boot layer to test different // accessing scenarios of a named module to an unnamed module. - // Module m1 is a strict module and has not established + // Module m1x is a strict module and has not established // readability to an unnamed module that p2.c2 is defined in. public void test_strictModuleLayer() throws Throwable { - // Define module: m1 + // Define module: m1x // Can read: java.base // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") .exports("p1") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); MyDiffClassLoader.loader1 = new MyDiffClassLoader(); MyDiffClassLoader.loader2 = new MyDiffClassLoader(); - // map module m1 to class loader. + // map module m1x to class loader. // class c2 will be loaded in an unnamed module/loader2 // to achieve differing class loaders. Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); + map.put("m1x", MyDiffClassLoader.loader1); - // Create Layer that contains m1 + // Create Layer that contains m1x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 @@ -114,109 +114,109 @@ public class DiffCL_Umod { // Attempt access try { p1_c1_class.newInstance(); - throw new RuntimeException("Test Failed, strict module m1 should not be able " + + throw new RuntimeException("Test Failed, strict module m1x should not be able " + "to access public type p2.c2 defined in unnamed module"); } catch (IllegalAccessError e) { } } - // Module m1 is a strict module and has established + // Module m1x is a strict module and has established // readability to an unnamed module that p2.c2 is defined in. public void test_strictModuleUnnamedReadableLayer() throws Throwable { - // Define module: m1 + // Define module: m1x // Can read: java.base // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") .exports("p1") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); MyDiffClassLoader.loader1 = new MyDiffClassLoader(); MyDiffClassLoader.loader2 = new MyDiffClassLoader(); - // map module m1 to class loader. + // map module m1x to class loader. // class c2 will be loaded in an unnamed module/loader2 // to achieve differing class loaders. Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); + map.put("m1x", MyDiffClassLoader.loader1); - // Create Layer that contains m1 + // Create Layer that contains m1x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1ReadEdgeDiffLoader Class p1_c1_class = MyDiffClassLoader.loader1.loadClass("p1.c1ReadEdgeDiffLoader"); try { - // Read edge between m1 and the unnamed module that loads p2.c2 is established in + // Read edge between m1x and the unnamed module that loads p2.c2 is established in // c1ReadEdgeDiffLoader's ctor before attempting access. p1_c1_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, module m1 has established readability to p2/c2 loader's " + + throw new RuntimeException("Test Failed, module m1x has established readability to p2/c2 loader's " + "unnamed module, access should be allowed: " + e.getMessage()); } } - // Module m1 is a loose module and thus can read all unnamed modules. + // Module m1x is a loose module and thus can read all unnamed modules. public void test_looseModuleLayer() throws Throwable { - // Define module: m1 + // Define module: m1x // Can read: java.base // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") .exports("p1") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); MyDiffClassLoader.loader1 = new MyDiffClassLoader(); MyDiffClassLoader.loader2 = new MyDiffClassLoader(); - // map module m1 to class loader. + // map module m1x to class loader. // class c2 will be loaded in an unnamed module/loader2 // to achieve differing class loaders. Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); + map.put("m1x", MyDiffClassLoader.loader1); - // Create Layer that contains m1 + // Create Layer that contains m1x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1Loose Class p1_c1_class = MyDiffClassLoader.loader1.loadClass("p1.c1Loose"); - // change m1 to read all unnamed modules - Module m1 = layer.findModule("m1").get(); - jdk.internal.module.Modules.addReadsAllUnnamed(m1); + // change m1x to read all unnamed modules + Module m1x = layer.findModule("m1x").get(); + jdk.internal.module.Modules.addReadsAllUnnamed(m1x); try { p1_c1_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, loose module m1 should be able to access " + + throw new RuntimeException("Test Failed, loose module m1x should be able to access " + "public type p2.c2 defined in unnamed module: " + e.getMessage()); } } diff --git a/hotspot/test/runtime/modules/AccessCheck/DiffCL_UmodUpkg.java b/hotspot/test/runtime/modules/AccessCheck/DiffCL_UmodUpkg.java index b8420c2e5c6..8b3c600ca0a 100644 --- a/hotspot/test/runtime/modules/AccessCheck/DiffCL_UmodUpkg.java +++ b/hotspot/test/runtime/modules/AccessCheck/DiffCL_UmodUpkg.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ /* * @test - * @summary class p3.c3 defined in module m1 tries to access c4 defined in an unnamed package + * @summary class p3.c3 defined in module m1x tries to access c4 defined in an unnamed package * and an unnamed module. * @modules java.base/jdk.internal.misc * @library /test/lib @@ -48,10 +48,10 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> packages p3 -// package p3 in m1 is exported unqualifiedly +// ClassLoader1 --> defines m1x --> packages p3 +// package p3 in m1x is exported unqualifiedly // -// class p3.c3 defined in m1 tries to access c4 defined in +// class p3.c3 defined in m1x tries to access c4 defined in // in unnamed module. // // Two access attempts occur in this test: @@ -66,41 +66,41 @@ public class DiffCL_UmodUpkg { // Create Layers over the boot layer to test different // accessing scenarios of a named module to an unnamed module. - // Module m1 is a strict module and has not established + // Module m1x is a strict module and has not established // readability to an unnamed module that c4 is defined in. public void test_strictModuleLayer() throws Throwable { - // Define module: m1 + // Define module: m1x // Can read: java.base // Packages: p3 // Packages exported: p3 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") .exports("p3") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); MyDiffClassLoader.loader1 = new MyDiffClassLoader(); MyDiffClassLoader.loader2 = new MyDiffClassLoader(); - // map module m1 to class loader. + // map module m1x to class loader. // class c2 will be loaded in an unnamed module/loader2 // to achieve differing class loaders. Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); + map.put("m1x", MyDiffClassLoader.loader1); - // Create Layer that contains m1 + // Create Layer that contains m1x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p3.c3 @@ -109,58 +109,58 @@ public class DiffCL_UmodUpkg { // Attempt access try { p3_c3_class.newInstance(); - throw new RuntimeException("Test Failed, strict module m1 should not be able to access " + + throw new RuntimeException("Test Failed, strict module m1x should not be able to access " + "public type c4 defined in unnamed module"); } catch (IllegalAccessError e) { } } - // Module m1 is a strict module and has established + // Module m1x is a strict module and has established // readability to an unnamed module that c4 is defined in. public void test_strictModuleUnnamedReadableLayer() throws Throwable { - // Define module: m1 + // Define module: m1x // Can read: java.base // Packages: p3 // Packages exported: p3 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") .exports("p3") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); MyDiffClassLoader.loader1 = new MyDiffClassLoader(); MyDiffClassLoader.loader2 = new MyDiffClassLoader(); - // map module m1 to class loader. + // map module m1x to class loader. // class c2 will be loaded in an unnamed module/loader2 // to achieve differing class loaders. Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); + map.put("m1x", MyDiffClassLoader.loader1); - // Create Layer that contains m1 + // Create Layer that contains m1x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p3.c3ReadEdgeDiffLoader Class p3_c3_class = MyDiffClassLoader.loader1.loadClass("p3.c3ReadEdgeDiffLoader"); try { - // Read edge between m1 and the unnamed module that loads c4 is established in + // Read edge between m1x and the unnamed module that loads c4 is established in // C3ReadEdgeDiffLoader's ctor before attempting access. p3_c3_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, module m1 has established readability to " + + throw new RuntimeException("Test Failed, module m1x has established readability to " + "c4 loader's unnamed module, access should be allowed: " + e.getMessage()); } } diff --git a/hotspot/test/runtime/modules/AccessCheck/ExpQualOther.java b/hotspot/test/runtime/modules/AccessCheck/ExpQualOther.java index 330d7239f3a..14da2aac213 100644 --- a/hotspot/test/runtime/modules/AccessCheck/ExpQualOther.java +++ b/hotspot/test/runtime/modules/AccessCheck/ExpQualOther.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,9 +25,9 @@ /* * @test - * @summary Test that if module m1 can read module m2, but package p2 in m2 - * is exported specifically to module m3, then class p1.c1 in m1 can not - * access p2.c2 in m2. + * @summary Test that if module m1x can read module m2x, but package p2 in m2x + * is exported specifically to module m3x, then class p1.c1 in m1x can not + * access p2.c2 in m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MySameClassLoader.java @@ -48,15 +48,15 @@ import java.util.Set; import myloaders.MySameClassLoader; // -// ClassLoader1 --> defines m1 --> packages p1 -// defines m2 --> packages p2 -// defines m3 --> packages p3 +// ClassLoader1 --> defines m1x --> packages p1 +// defines m2x --> packages p2 +// defines m3x --> packages p3 // -// m1 can read m2 -// package p2 in m2 is exported to m3 +// m1x can read m2x +// package p2 in m2x is exported to m3x // -// class p1.c1 defined in m1 tries to access p2.c2 defined in m2 -// Access denied since although m1 can read m2, p2 is exported only to m3. +// class p1.c1 defined in m1x tries to access p2.c2 defined in m2x +// Access denied since although m1x can read m2x, p2 is exported only to m3x. // public class ExpQualOther { @@ -65,66 +65,66 @@ public class ExpQualOther { // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2, m3 + // Define module: m1x + // Can read: java.base, m2x, m3x // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") - .requires("m3") + .requires("m2x") + .requires("m3x") .exports("p1") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 - // Packages exported: p2 is exported to m3 - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + // Packages exported: p2 is exported to m3x + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p2", Set.of("m3")) + .exports("p2", Set.of("m3x")) .build(); - // Define module: m3 - // Can read: java.base, m2 + // Define module: m3x + // Can read: java.base, m2x // Packages: p3 // Packages exported: none - ModuleDescriptor descriptor_m3 = - ModuleDescriptor.module("m3") + ModuleDescriptor descriptor_m3x = + ModuleDescriptor.newModule("m3x") .requires("java.base") - .requires("m2") - .contains("p3") + .requires("m2x") + .packages(Set.of("p3")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2, descriptor_m3); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x, descriptor_m3x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MySameClassLoader.loader1); - map.put("m2", MySameClassLoader.loader1); - map.put("m3", MySameClassLoader.loader1); + map.put("m1x", MySameClassLoader.loader1); + map.put("m2x", MySameClassLoader.loader1); + map.put("m3x", MySameClassLoader.loader1); - // Create Layer that contains m1 & m2 + // Create Layer that contains m1x & m2x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m3") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m3x") == MySameClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 Class p1_c1_class = MySameClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is exported to m3 not to m1)"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is exported to m3x not to m1x)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/ExpQualToM1.java b/hotspot/test/runtime/modules/AccessCheck/ExpQualToM1.java index 31de4576d90..ede47809f7a 100644 --- a/hotspot/test/runtime/modules/AccessCheck/ExpQualToM1.java +++ b/hotspot/test/runtime/modules/AccessCheck/ExpQualToM1.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ /* * @test - * @summary Test that if module m1 can read module m2, AND package p2 in m2 is - * exported qualifiedly to m1, then class p1.c1 in m1 can read p2.c2 in m2. + * @summary Test that if module m1x can read module m2x, AND package p2 in m2x is + * exported qualifiedly to m1x, then class p1.c1 in m1x can read p2.c2 in m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MySameClassLoader.java @@ -53,52 +53,52 @@ public class ExpQualToM1 { // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .exports("p1") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 - // Packages exported: p2 is exported qualifiedly to m1 - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + // Packages exported: p2 is exported qualifiedly to m1x + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p2", Set.of("m1")) + .exports("p2", Set.of("m1x")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to the same class loader for this test Map map = new HashMap<>(); - map.put("m1", MySameClassLoader.loader1); - map.put("m2", MySameClassLoader.loader1); + map.put("m1x", MySameClassLoader.loader1); + map.put("m2x", MySameClassLoader.loader1); - // Create Layer that contains m1 & m2 + // Create Layer that contains m1x & m2x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1); // now use the same loader to load class p1.c1 Class p1_c1_class = MySameClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, an IAE should not be thrown since p2 is exported qualifiedly to m1"); + throw new RuntimeException("Test Failed, an IAE should not be thrown since p2 is exported qualifiedly to m1x"); } } diff --git a/hotspot/test/runtime/modules/AccessCheck/ExpUnqual.java b/hotspot/test/runtime/modules/AccessCheck/ExpUnqual.java index 03a377027de..0ded845e90d 100644 --- a/hotspot/test/runtime/modules/AccessCheck/ExpUnqual.java +++ b/hotspot/test/runtime/modules/AccessCheck/ExpUnqual.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ /* * @test - * @summary Test that if module m1 can read module m2, AND package p2 in module2 is - * exported unqualifiedly, then class p1.c1 in m1 can read p2.c2 in m2. + * @summary Test that if module m1x can read module m2x, AND package p2 in module_two is + * exported unqualifiedly, then class p1.c1 in m1x can read p2.c2 in m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MySameClassLoader.java @@ -53,45 +53,45 @@ public class ExpUnqual { // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .exports("p1") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 // Packages exported: p2 is exported unqualifiedly - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") .exports("p2") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to the same class loader for this test Map map = new HashMap<>(); - map.put("m1", MySameClassLoader.loader1); - map.put("m2", MySameClassLoader.loader1); + map.put("m1x", MySameClassLoader.loader1); + map.put("m2x", MySameClassLoader.loader1); - // Create Layer that contains m1 & m2 + // Create Layer that contains m1x & m2x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1); // now use the same loader to load class p1.c1 Class p1_c1_class = MySameClassLoader.loader1.loadClass("p1.c1"); diff --git a/hotspot/test/runtime/modules/AccessCheck/ExportAllUnnamed.java b/hotspot/test/runtime/modules/AccessCheck/ExportAllUnnamed.java index c9a89c8ba9f..35857f695cc 100644 --- a/hotspot/test/runtime/modules/AccessCheck/ExportAllUnnamed.java +++ b/hotspot/test/runtime/modules/AccessCheck/ExportAllUnnamed.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ /* * @test - * @summary Test if package p2 in module m2 is exported to all unnamed, - * then class p1.c1 in an unnamed module can read p2.c2 in module m2. + * @summary Test if package p2 in module m2x is exported to all unnamed, + * then class p1.c1 in an unnamed module can read p2.c2 in module m2x. * @library /test/lib * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.module @@ -49,15 +49,15 @@ import java.util.Set; import myloaders.MySameClassLoader; // -// ClassLoader1 --> defines m1 --> no packages -// defines m2 --> packages p2 +// ClassLoader1 --> defines m1x --> no packages +// defines m2x --> packages p2 // -// m1 can read m2 -// package p2 in m2 is exported unqualifiedly +// m1x can read m2x +// package p2 in m2x is exported unqualifiedly // -// class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2 +// class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2x // Access allowed, an unnamed module can read all modules and p2 in module -// m2 is exported to all unnamed modules. +// m2x is exported to all unnamed modules. public class ExportAllUnnamed { @@ -66,51 +66,51 @@ public class ExportAllUnnamed { // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: none // Packages exported: none - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 // Packages exported: p2 is exported unqualifiedly - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p2", Set.of("m1")) + .exports("p2", Set.of("m1x")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MySameClassLoader.loader1); - map.put("m2", MySameClassLoader.loader1); + map.put("m1x", MySameClassLoader.loader1); + map.put("m2x", MySameClassLoader.loader1); - // Create Layer that contains m1 & m2 + // Create Layer that contains m1x & m2x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); Class p2_c2_class = MySameClassLoader.loader1.loadClass("p2.c2"); - Module m2 = p2_c2_class.getModule(); + Module m2x = p2_c2_class.getModule(); - // Export m2/p2 to all unnamed modules. - jdk.internal.module.Modules.addExportsToAllUnnamed(m2, "p2"); + // Export m2x/p2 to all unnamed modules. + jdk.internal.module.Modules.addExportsToAllUnnamed(m2x, "p2"); // now use the same loader to load class p1.c1 Class p1_c1_class = MySameClassLoader.loader1.loadClass("p1.c1"); diff --git a/hotspot/test/runtime/modules/AccessCheck/PkgNotExp.java b/hotspot/test/runtime/modules/AccessCheck/PkgNotExp.java index 4f592a19002..990d08cc8b8 100644 --- a/hotspot/test/runtime/modules/AccessCheck/PkgNotExp.java +++ b/hotspot/test/runtime/modules/AccessCheck/PkgNotExp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ /* * @test - * @summary Test that if module m1 can read module m2, but package p2 in m2 is not - * exported, then class p1.c1 in m1 can not read p2.c2 in m2. + * @summary Test that if module m1x can read module m2x, but package p2 in m2x is not + * exported, then class p1.c1 in m1x can not read p2.c2 in m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MySameClassLoader.java @@ -47,13 +47,13 @@ import java.util.Set; import myloaders.MySameClassLoader; // -// ClassLoader1 --> defines m1 --> packages p1 -// defines m2 --> packages p2 +// ClassLoader1 --> defines m1x --> packages p1 +// defines m2x --> packages p2 // -// m1 can read m2 -// package p2 in m2 is not exported +// m1x can read m2x +// package p2 in m2x is not exported // -// class p1.c1 defined in m1 tries to access p2.c2 defined in m2 +// class p1.c1 defined in m1x tries to access p2.c2 defined in m2x // Access denied since p2 is not exported. // public class PkgNotExp { @@ -63,51 +63,51 @@ public class PkgNotExp { // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .exports("p1") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 // Packages exported: none - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .contains("p2") + .packages(Set.of("p2")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to the same class loader for this test Map map = new HashMap<>(); - map.put("m1", MySameClassLoader.loader1); - map.put("m2", MySameClassLoader.loader1); + map.put("m1x", MySameClassLoader.loader1); + map.put("m2x", MySameClassLoader.loader1); - // Create Layer that contains m1 and m2 + // Create Layer that contains m1x and m2x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1); // now use the same loader to load class p1.c1 Class p1_c1_class = MySameClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is not exported)"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is not exported)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/Umod.java b/hotspot/test/runtime/modules/AccessCheck/Umod.java index 255950c7f37..edce6ac4a3f 100644 --- a/hotspot/test/runtime/modules/AccessCheck/Umod.java +++ b/hotspot/test/runtime/modules/AccessCheck/Umod.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ /* * @test - * @summary class p1.c1 defined in m1 tries to access p2.c2 defined in unnamed module. + * @summary class p1.c1 defined in m1x tries to access p2.c2 defined in unnamed module. * @library /test/lib * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.module @@ -50,10 +50,10 @@ import java.util.Set; import myloaders.MySameClassLoader; // -// ClassLoader1 --> defines m1 --> packages p1 -// package p1 in m1 is exported unqualifiedly +// ClassLoader1 --> defines m1x --> packages p1 +// package p1 in m1x is exported unqualifiedly // -// class p1.c1 defined in m1 tries to access p2.c2 defined in +// class p1.c1 defined in m1x tries to access p2.c2 defined in // in unnamed module. // // Three access attempts occur in this test: @@ -62,7 +62,7 @@ import myloaders.MySameClassLoader; // 2. In this scenario a strict module establishes readability // to the particular unnamed module it is trying to access. // Access is allowed. -// 3. Module m1 in the test_looseModuleLayer() method +// 3. Module m1x in the test_looseModuleLayer() method // is transitioned to a loose module, access // to all unnamed modules is allowed. // @@ -71,38 +71,38 @@ public class Umod { // Create Layers over the boot layer to test different // accessing scenarios of a named module to an unnamed module. - // Module m1 is a strict module and has not established + // Module m1x is a strict module and has not established // readability to an unnamed module that p2.c2 is defined in. public void test_strictModuleLayer() throws Throwable { - // Define module: m1 + // Define module: m1x // Can read: java.base // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") .exports("p1") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); - // map module m1 to class loader. + // map module m1x to class loader. // class c2 will be loaded in an unnamed module/loader. MySameClassLoader loader = new MySameClassLoader(); Map map = new HashMap<>(); - map.put("m1", loader); + map.put("m1x", loader); - // Create Layer that contains m1 + // Create Layer that contains m1x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == loader); + assertTrue(layer.findLoader("m1x") == loader); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 @@ -111,103 +111,103 @@ public class Umod { // Attempt access try { p1_c1_class.newInstance(); - throw new RuntimeException("Test Failed, strict module m1, type p1.c1, should not be able " + + throw new RuntimeException("Test Failed, strict module m1x, type p1.c1, should not be able " + "to access public type p2.c2 defined in unnamed module"); } catch (IllegalAccessError e) { } } - // Module m1 is a strict module and has established + // Module m1x is a strict module and has established // readability to an unnamed module that p2.c2 is defined in. public void test_strictModuleUnnamedReadableLayer() throws Throwable { - // Define module: m1 + // Define module: m1x // Can read: java.base // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") .exports("p1") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); MySameClassLoader loader = new MySameClassLoader(); - // map module m1 to class loader. + // map module m1x to class loader. // class c2 will be loaded in an unnamed module/loader. Map map = new HashMap<>(); - map.put("m1", loader); + map.put("m1x", loader); - // Create Layer that contains m1 + // Create Layer that contains m1x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == loader); + assertTrue(layer.findLoader("m1x") == loader); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1ReadEdge Class p1_c1_class = loader.loadClass("p1.c1ReadEdge"); try { - // Read edge between m1 and the unnamed module that loads p2.c2 is established in + // Read edge between m1x and the unnamed module that loads p2.c2 is established in // c1ReadEdge's ctor before attempting access. p1_c1_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, strict module m1, type p1.c1ReadEdge, should be able to acccess public type " + + throw new RuntimeException("Test Failed, strict module m1x, type p1.c1ReadEdge, should be able to acccess public type " + "p2.c2 defined in unnamed module: " + e.getMessage()); } } - // Module m1 is a loose module and thus can read all unnamed modules. + // Module m1x is a loose module and thus can read all unnamed modules. public void test_looseModuleLayer() throws Throwable { - // Define module: m1 + // Define module: m1x // Can read: java.base // Packages: p1 // Packages exported: p1 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") .exports("p1") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); MySameClassLoader loader = new MySameClassLoader(); - // map module m1 to class loader. + // map module m1x to class loader. // class c2 will be loaded in an unnamed module/loader. Map map = new HashMap<>(); - map.put("m1", loader); + map.put("m1x", loader); - // Create Layer that contains m1 + // Create Layer that contains m1x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == loader); + assertTrue(layer.findLoader("m1x") == loader); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1Loose Class p1_c1_class = loader.loadClass("p1.c1Loose"); - // change m1 to read all unnamed modules - Module m1 = layer.findModule("m1").get(); - jdk.internal.module.Modules.addReadsAllUnnamed(m1); + // change m1x to read all unnamed modules + Module m1x = layer.findModule("m1x").get(); + jdk.internal.module.Modules.addReadsAllUnnamed(m1x); try { p1_c1_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, strict module m1, type p1.c1Loose, should be able to acccess public type " + + throw new RuntimeException("Test Failed, strict module m1x, type p1.c1Loose, should be able to acccess public type " + "p2.c2 defined in unnamed module: " + e.getMessage()); } } diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpQualOther.java b/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpQualOther.java index 5fcc629096c..ecdda73f41c 100644 --- a/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpQualOther.java +++ b/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpQualOther.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,9 +25,9 @@ /* * @test - * @summary class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2. + * @summary class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2x. * Access is denied, since an unnamed module can read all modules but p2 in module - * m2 is exported specifically to module m1, not to all modules. + * m2x is exported specifically to module m1x, not to all modules. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MyDiffClassLoader.java @@ -48,15 +48,15 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> no packages -// ClassLoader2 --> defines m2 --> packages p2 +// ClassLoader1 --> defines m1x --> no packages +// ClassLoader2 --> defines m2x --> packages p2 // -// m1 can read m2 -// package p2 in m2 is not exported +// m1x can read m2x +// package p2 in m2x is not exported // -// class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2 +// class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2x // Access denied, an unnamed module can read all modules but p2 in module -// m2 is exported specifically to module m1 not to all modules. +// m2x is exported specifically to module m1x not to all modules. // public class UmodDiffCL_ExpQualOther { @@ -65,53 +65,53 @@ public class UmodDiffCL_ExpQualOther { // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 + // Define module: m1x // Can read: java.base // Packages: none // Packages exported: none - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 // Packages exported: none - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p2", Set.of("m1")) + .exports("p2", Set.of("m1x")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); - map.put("m2", MyDiffClassLoader.loader2); + map.put("m1x", MyDiffClassLoader.loader1); + map.put("m2x", MyDiffClassLoader.loader2); - // Create Layer that contains m1 & m2 + // Create Layer that contains m1x & m2x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 - // NOTE: module m1 does not define a package named p1. + // NOTE: module m1x does not define a package named p1. // p1 will be loaded in an unnamed module. Class p1_c1_class = MyDiffClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is exported to m1, not unqualifiedly"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is exported to m1x, not unqualifiedly"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpUnqual.java b/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpUnqual.java index ade483acd46..c05fccc1a1c 100644 --- a/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpUnqual.java +++ b/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpUnqual.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ /* * @test - * @summary class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2. - * Access allowed, an unnamed module can read all modules and p2 in module m2 + * @summary class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2x. + * Access allowed, an unnamed module can read all modules and p2 in module m2x * which is exported unqualifiedly. * @modules java.base/jdk.internal.misc * @library /test/lib @@ -48,15 +48,15 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> no packages -// ClassLoader2 --> defines m2 --> packages p2 +// ClassLoader1 --> defines m1x --> no packages +// ClassLoader2 --> defines m2x --> packages p2 // -// m1 can read m2 -// package p2 in m2 is exported unqualifiedly. +// m1x can read m2x +// package p2 in m2x is exported unqualifiedly. // -// class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2 +// class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2x // Access allowed, an unnamed module can read all modules and p2 in module -// m2 which is exported unqualifiedly. +// m2x which is exported unqualifiedly. // public class UmodDiffCL_ExpUnqual { @@ -65,53 +65,53 @@ public class UmodDiffCL_ExpUnqual { // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: none // Packages exported: none - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 // Packages exported: none - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") .exports("p2") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); - map.put("m2", MyDiffClassLoader.loader2); + map.put("m1x", MyDiffClassLoader.loader1); + map.put("m2x", MyDiffClassLoader.loader2); - // Create Layer that contains m1 & m2 + // Create Layer that contains m1x & m2x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2); assertTrue(layer.findLoader("java.base") == null); - // NOTE: module m1 does not define a package named p1. + // NOTE: module m1x does not define a package named p1. // p1 will be loaded in an unnamed module. Class p1_c1_class = MyDiffClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, p1.c1 defined in unnamed module can access p2.c2 in module m2"); + throw new RuntimeException("Test Failed, p1.c1 defined in unnamed module can access p2.c2 in module m2x"); } } diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_PkgNotExp.java b/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_PkgNotExp.java index b5ec6c6a6b0..67732ac89bc 100644 --- a/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_PkgNotExp.java +++ b/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_PkgNotExp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,9 +25,9 @@ /* * @test - * @summary class p1.c1 defined in unnamed module tries to access p2.c2 defined in m2. + * @summary class p1.c1 defined in unnamed module tries to access p2.c2 defined in m2x. * Access is denied since even though unnamed module can read all modules, p2 - * in module m2 is not exported at all. + * in module m2x is not exported at all. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MyDiffClassLoader.java @@ -47,15 +47,15 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> no packages -// ClassLoader2 --> defines m2 --> packages p2 +// ClassLoader1 --> defines m1x --> no packages +// ClassLoader2 --> defines m2x --> packages p2 // -// m1 can read m2 -// package p2 in m2 is not exported +// m1x can read m2x +// package p2 in m2x is not exported // -// class p1.c1 defined in unnamed module tries to access p2.c2 defined in m2 +// class p1.c1 defined in unnamed module tries to access p2.c2 defined in m2x // Access denied since even though unnamed module can read all modules, p2 -// in module m2 is not exported at all. +// in module m2x is not exported at all. // public class UmodDiffCL_PkgNotExp { @@ -64,53 +64,53 @@ public class UmodDiffCL_PkgNotExp { // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: none // Packages exported: none - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 // Packages exported: none - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .contains("p2") + .packages(Set.of("p2")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); - map.put("m2", MyDiffClassLoader.loader2); + map.put("m1x", MyDiffClassLoader.loader1); + map.put("m2x", MyDiffClassLoader.loader2); - // Create Layer that contains m1 & m2 + // Create Layer that contains m1x & m2x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 - // NOTE: module m1 does not define a package named p1. + // NOTE: module m1x does not define a package named p1. // p1 will be loaded in an unnamed module. Class p1_c1_class = MyDiffClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is not exported to an unnamed module)"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is not exported to an unnamed module)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodUPkg.java b/hotspot/test/runtime/modules/AccessCheck/UmodUPkg.java index 7cfcdabe42b..fed0ad4382c 100644 --- a/hotspot/test/runtime/modules/AccessCheck/UmodUPkg.java +++ b/hotspot/test/runtime/modules/AccessCheck/UmodUPkg.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ /* * @test - * @summary class p3.c3 defined in module m1 tries to access c4 defined in unnamed module. + * @summary class p3.c3 defined in module m1x tries to access c4 defined in unnamed module. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MySameClassLoader.java @@ -48,10 +48,10 @@ import java.util.Set; import myloaders.MySameClassLoader; // -// ClassLoader1 --> defines m1 --> packages p3 -// package p3 in m1 is exported unqualifiedly +// ClassLoader1 --> defines m1x --> packages p3 +// package p3 in m1x is exported unqualifiedly // -// class p3.c3 defined in m1 tries to access c4 defined in +// class p3.c3 defined in m1x tries to access c4 defined in // in unnamed module. // // Two access attempts occur in this test: @@ -66,38 +66,38 @@ public class UmodUPkg { // Create Layers over the boot layer to test different // accessing scenarios of a named module to an unnamed module. - // Module m1 is a strict module and has not established + // Module m1x is a strict module and has not established // readability to an unnamed module that c4 is defined in. public void test_strictModuleLayer() throws Throwable { - // Define module: m1 + // Define module: m1x // Can read: java.base // Packages: p3 // Packages exported: p3 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") .exports("p3") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); - // map module m1 to class loader. + // map module m1x to class loader. // class c4 will be loaded in an unnamed module/loader. MySameClassLoader loader = new MySameClassLoader(); Map map = new HashMap<>(); - map.put("m1", loader); + map.put("m1x", loader); - // Create Layer that contains m1 + // Create Layer that contains m1x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == loader); + assertTrue(layer.findLoader("m1x") == loader); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p3.c3 @@ -106,55 +106,55 @@ public class UmodUPkg { // Attempt access try { p3_c3_class.newInstance(); - throw new RuntimeException("Test Failed, strict module m1, type p3.c3, should not be able to access " + + throw new RuntimeException("Test Failed, strict module m1x, type p3.c3, should not be able to access " + "public type c4 defined in unnamed module"); } catch (IllegalAccessError e) { } } - // Module m1 is a strict module and has established + // Module m1x is a strict module and has established // readability to an unnamed module that c4 is defined in. public void test_strictModuleUnnamedReadableLayer() throws Throwable { - // Define module: m1 + // Define module: m1x // Can read: java.base // Packages: p3 // Packages exported: p3 is exported unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") .exports("p3") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); MySameClassLoader loader = new MySameClassLoader(); - // map module m1 to class loader. + // map module m1x to class loader. // class c4 will be loaded in an unnamed module/loader. Map map = new HashMap<>(); - map.put("m1", loader); + map.put("m1x", loader); - // Create Layer that contains m1 + // Create Layer that contains m1x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == loader); + assertTrue(layer.findLoader("m1x") == loader); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p3.c3ReadEdge Class p3_c3_class = loader.loadClass("p3.c3ReadEdge"); try { - // Read edge between m1 and the unnamed module that loads c4 is established in + // Read edge between m1x and the unnamed module that loads c4 is established in // c3ReadEdge's ctor before attempting access. p3_c3_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, module m1, type p3.c3ReadEdge, has established readability to " + + throw new RuntimeException("Test Failed, module m1x, type p3.c3ReadEdge, has established readability to " + "c4 loader's unnamed module, access should be allowed: " + e.getMessage()); } } diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_ExpQualOther.java b/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_ExpQualOther.java index 01ec39aa1a5..b8c48da4b4a 100644 --- a/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_ExpQualOther.java +++ b/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_ExpQualOther.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,9 +25,9 @@ /* * @test - * @summary class c5 defined in an unnamed module tries to access p6.c6 defined in m2. + * @summary class c5 defined in an unnamed module tries to access p6.c6 defined in m2x. * Access is denied, since an unnamed module can read all modules but p6 in module - * m2 is exported specifically to module m1, not to all modules. + * m2x is exported specifically to module m1x, not to all modules. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MyDiffClassLoader.java @@ -48,15 +48,15 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> no packages -// ClassLoader2 --> defines m2 --> packages p6 +// ClassLoader1 --> defines m1x --> no packages +// ClassLoader2 --> defines m2x --> packages p6 // -// m1 can read m2 -// package p6 in m2 is not exported +// m1x can read m2x +// package p6 in m2x is not exported // -// class c5 defined in an unnamed module tries to access p6.c6 defined in m2 +// class c5 defined in an unnamed module tries to access p6.c6 defined in m2x // Access denied, an unnamed module can read all modules but p6 in module -// m2 is exported specifically to module m1 not to all modules. +// m2x is exported specifically to module m1x not to all modules. // public class UmodUpkgDiffCL_ExpQualOther { @@ -65,51 +65,51 @@ public class UmodUpkgDiffCL_ExpQualOther { // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: none // Packages exported: none - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p6 - // Packages exported: p6 exported to m1 - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + // Packages exported: p6 exported to m1x + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p6", Set.of("m1")) + .exports("p6", Set.of("m1x")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); - map.put("m2", MyDiffClassLoader.loader2); + map.put("m1x", MyDiffClassLoader.loader1); + map.put("m2x", MyDiffClassLoader.loader2); - // Create Layer that contains m1 & m2 + // Create Layer that contains m1x & m2x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class c5 Class c5_class = MyDiffClassLoader.loader1.loadClass("c5"); try { c5_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p6 in m2 is exported to m1, not unqualifiedly"); + throw new RuntimeException("Failed to get IAE (p6 in m2x is exported to m1x, not unqualifiedly"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_NotExp.java b/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_NotExp.java index 68dd3778b5c..134a9d64e91 100644 --- a/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_NotExp.java +++ b/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_NotExp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ /* * @test - * @summary class c5 in an unnamed module can read module m2, but package p6 in module m2 is not exported. - * Access denied since even though unnamed module can read all modules, p6 in module m2 is not exported at all. + * @summary class c5 in an unnamed module can read module m2x, but package p6 in module m2x is not exported. + * Access denied since even though unnamed module can read all modules, p6 in module m2x is not exported at all. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MyDiffClassLoader.java @@ -47,15 +47,15 @@ import java.util.Set; import myloaders.MyDiffClassLoader; // -// ClassLoader1 --> defines m1 --> no packages -// ClassLoader2 --> defines m2 --> packages p6 +// ClassLoader1 --> defines m1x --> no packages +// ClassLoader2 --> defines m2x --> packages p6 // -// m1 can read m2 -// package p6 in m2 is not exported +// m1x can read m2x +// package p6 in m2x is not exported // -// class c5 defined in unnamed module tries to access p6.c6 defined in m2 +// class c5 defined in unnamed module tries to access p6.c6 defined in m2x // Access denied since even though unnamed module can read all modules, p6 -// in module m2 is not exported at all. +// in module m2x is not exported at all. // public class UmodUpkgDiffCL_NotExp { @@ -64,53 +64,53 @@ public class UmodUpkgDiffCL_NotExp { // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: none // Packages exported: none - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p6 // Packages exported: none - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .contains("p6") + .packages(Set.of("p6")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MyDiffClassLoader.loader1); - map.put("m2", MyDiffClassLoader.loader2); + map.put("m1x", MyDiffClassLoader.loader1); + map.put("m2x", MyDiffClassLoader.loader2); - // Create Layer that contains m1 & m2 + // Create Layer that contains m1x & m2x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MyDiffClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MyDiffClassLoader.loader2); + assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class c5 - // NOTE: module m1 does not define any packages. + // NOTE: module m1x does not define any packages. // c5 will be loaded in an unnamed module. Class c5_class = MyDiffClassLoader.loader1.loadClass("c5"); try { c5_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p6 in m2 is not exported to " + + throw new RuntimeException("Failed to get IAE (p6 in m2x is not exported to " + "an unnamed module that c5 is defined within)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_ExpQualOther.java b/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_ExpQualOther.java index 68abe56b7a1..c6f2dd8be4a 100644 --- a/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_ExpQualOther.java +++ b/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_ExpQualOther.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ /* * @test - * @summary Test that if class c5 in an unnamed module can read package p6 in module m2, but package p6 in module m2 is - * exported qualifiedly to module m3, then class c5 in an unnamed module can not read p6.c6 in module m2. + * @summary Test that if class c5 in an unnamed module can read package p6 in module m2x, but package p6 in module m2x is + * exported qualifiedly to module m3x, then class c5 in an unnamed module can not read p6.c6 in module m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MySameClassLoader.java @@ -47,15 +47,15 @@ import java.util.Set; import myloaders.MySameClassLoader; // -// ClassLoader1 --> defines m1 --> no packages -// defines m2 --> packages p6 -// defines m3 --> packages p3 +// ClassLoader1 --> defines m1x --> no packages +// defines m2x --> packages p6 +// defines m3x --> packages p3 // -// m1 can read m2 -// package p6 in m2 is exported to m3 +// m1x can read m2x +// package p6 in m2x is exported to m3x // -// class c5 defined in m1 tries to access p6.c6 defined in m2 -// Access denied since although m1 can read m2, p6 is exported only to m3. +// class c5 defined in m1x tries to access p6.c6 defined in m2x +// Access denied since although m1x can read m2x, p6 is exported only to m3x. // public class UmodUpkg_ExpQualOther { @@ -64,63 +64,63 @@ public class UmodUpkg_ExpQualOther { // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 (need to define m1 to establish the Layer successfully) - // Can read: java.base, m2, m3 + // Define module: m1x (need to define m1x to establish the Layer successfully) + // Can read: java.base, m2x, m3x // Packages: none // Packages exported: none - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") - .requires("m3") + .requires("m2x") + .requires("m3x") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p6 - // Packages exported: p6 is exported to m3 - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + // Packages exported: p6 is exported to m3x + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p6", Set.of("m3")) + .exports("p6", Set.of("m3x")) .build(); - // Define module: m3 + // Define module: m3x // Can read: java.base // Packages: p3 // Packages exported: none - ModuleDescriptor descriptor_m3 = - ModuleDescriptor.module("m3") + ModuleDescriptor descriptor_m3x = + ModuleDescriptor.newModule("m3x") .requires("java.base") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2, descriptor_m3); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x, descriptor_m3x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MySameClassLoader.loader1); - map.put("m2", MySameClassLoader.loader1); - map.put("m3", MySameClassLoader.loader1); + map.put("m1x", MySameClassLoader.loader1); + map.put("m2x", MySameClassLoader.loader1); + map.put("m3x", MySameClassLoader.loader1); - // Create Layer that contains m1, m2 and m3 + // Create Layer that contains m1x, m2x and m3x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m3") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m3x") == MySameClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class c5 Class c5_class = MySameClassLoader.loader1.loadClass("c5"); try { c5_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p6 in m2 is exported to m3, not unqualifiedly to everyone)"); + throw new RuntimeException("Failed to get IAE (p6 in m2x is exported to m3x, not unqualifiedly to everyone)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_NotExp.java b/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_NotExp.java index da69805e580..69a768a8a07 100644 --- a/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_NotExp.java +++ b/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_NotExp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ /* * @test - * @summary Test if package p6 in module m2 is not exported, then class c5 - * in an unnamed module can not access p6.c2 in module m2. + * @summary Test if package p6 in module m2x is not exported, then class c5 + * in an unnamed module can not access p6.c2 in module m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MySameClassLoader.java @@ -46,13 +46,13 @@ import java.util.Map; import java.util.Set; import myloaders.MySameClassLoader; -// ClassLoader1 --> defines m1 --> no packages -// defines m2 --> packages p6 +// ClassLoader1 --> defines m1x --> no packages +// defines m2x --> packages p6 // -// m1 can read m2 -// package p6 in m2 is not exported +// m1x can read m2x +// package p6 in m2x is not exported // -// class c5 defined in an unnamed module tries to access p6.c2 defined in m2 +// class c5 defined in an unnamed module tries to access p6.c2 defined in m2x // Access denied since p6 is not exported. // public class UmodUpkg_NotExp { @@ -62,51 +62,51 @@ public class UmodUpkg_NotExp { // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: none // Packages exported: none - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p6 // Packages exported: none - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .contains("p6") + .packages(Set.of("p6")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to the same class loader for this test Map map = new HashMap<>(); - map.put("m1", MySameClassLoader.loader1); - map.put("m2", MySameClassLoader.loader1); + map.put("m1x", MySameClassLoader.loader1); + map.put("m2x", MySameClassLoader.loader1); - // Create Layer that contains m1 and m2 + // Create Layer that contains m1x and m2x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class c5 Class c5_class = MySameClassLoader.loader1.loadClass("c5"); try { c5_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p6 in m2 is not exported)"); + throw new RuntimeException("Failed to get IAE (p6 in m2x is not exported)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/Umod_ExpQualOther.java b/hotspot/test/runtime/modules/AccessCheck/Umod_ExpQualOther.java index 0f5aaf21585..4ca29861c69 100644 --- a/hotspot/test/runtime/modules/AccessCheck/Umod_ExpQualOther.java +++ b/hotspot/test/runtime/modules/AccessCheck/Umod_ExpQualOther.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ /* * @test - * @summary Test that if package p2 in module m2 is exported to module m3, - * then class p1.c1 in an unnamed module can not read p2.c2 in module m2. + * @summary Test that if package p2 in module m2x is exported to module m3x, + * then class p1.c1 in an unnamed module can not read p2.c2 in module m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MySameClassLoader.java @@ -47,15 +47,15 @@ import java.util.Set; import myloaders.MySameClassLoader; // -// ClassLoader1 --> defines m1 --> no packages -// defines m2 --> packages p2 -// defines m3 --> packages p3 +// ClassLoader1 --> defines m1x --> no packages +// defines m2x --> packages p2 +// defines m3x --> packages p3 // -// m1 can read m2 -// package p2 in m2 is exported to m3 +// m1x can read m2x +// package p2 in m2x is exported to m3x // -// class p1.c1 defined in m1 tries to access p2.c2 defined in m2 -// Access denied since although m1 can read m2, p2 is exported only to m3. +// class p1.c1 defined in m1x tries to access p2.c2 defined in m2x +// Access denied since although m1x can read m2x, p2 is exported only to m3x. // public class Umod_ExpQualOther { @@ -64,63 +64,63 @@ public class Umod_ExpQualOther { // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 (need to define m1 to establish the Layer successfully) - // Can read: java.base, m2, m3 + // Define module: m1x (need to define m1x to establish the Layer successfully) + // Can read: java.base, m2x, m3x // Packages: none // Packages exported: none - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") - .requires("m3") + .requires("m2x") + .requires("m3x") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 - // Packages exported: p2 is exported to m3 - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + // Packages exported: p2 is exported to m3x + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p2", Set.of("m3")) + .exports("p2", Set.of("m3x")) .build(); - // Define module: m3 + // Define module: m3x // Can read: java.base // Packages: p3 // Packages exported: none - ModuleDescriptor descriptor_m3 = - ModuleDescriptor.module("m3") + ModuleDescriptor descriptor_m3x = + ModuleDescriptor.newModule("m3x") .requires("java.base") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2, descriptor_m3); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x, descriptor_m3x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MySameClassLoader.loader1); - map.put("m2", MySameClassLoader.loader1); - map.put("m3", MySameClassLoader.loader1); + map.put("m1x", MySameClassLoader.loader1); + map.put("m2x", MySameClassLoader.loader1); + map.put("m3x", MySameClassLoader.loader1); - // Create Layer that contains m1, m2 and m3 + // Create Layer that contains m1x, m2x and m3x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m3") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m3x") == MySameClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 Class p1_c1_class = MySameClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is exported to m3, not unqualifiedly to everyone)"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is exported to m3x, not unqualifiedly to everyone)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/Umod_ExpUnqual.java b/hotspot/test/runtime/modules/AccessCheck/Umod_ExpUnqual.java index db90a08bd44..4430341308f 100644 --- a/hotspot/test/runtime/modules/AccessCheck/Umod_ExpUnqual.java +++ b/hotspot/test/runtime/modules/AccessCheck/Umod_ExpUnqual.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ /* * @test - * @summary Test if package p2 in module m2 is exported unqualifiedly, - * then class p1.c1 in an unnamed module can read p2.c2 in module m2. + * @summary Test if package p2 in module m2x is exported unqualifiedly, + * then class p1.c1 in an unnamed module can read p2.c2 in module m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MySameClassLoader.java @@ -47,15 +47,15 @@ import java.util.Set; import myloaders.MySameClassLoader; // -// ClassLoader1 --> defines m1 --> no packages -// defines m2 --> packages p2 +// ClassLoader1 --> defines m1x --> no packages +// defines m2x --> packages p2 // -// m1 can read m2 -// package p2 in m2 is exported unqualifiedly +// m1x can read m2x +// package p2 in m2x is exported unqualifiedly // -// class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2 +// class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2x // Access allowed, an unnamed module can read all modules and p2 in module -// m2 which is exported unqualifiedly. +// m2x which is exported unqualifiedly. public class Umod_ExpUnqual { @@ -64,44 +64,44 @@ public class Umod_ExpUnqual { // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: none // Packages exported: none - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 // Packages exported: p2 is exported unqualifiedly - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") .exports("p2") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing class loaders for this test Map map = new HashMap<>(); - map.put("m1", MySameClassLoader.loader1); - map.put("m2", MySameClassLoader.loader1); + map.put("m1x", MySameClassLoader.loader1); + map.put("m2x", MySameClassLoader.loader1); - // Create Layer that contains m1 & m2 + // Create Layer that contains m1x & m2x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 diff --git a/hotspot/test/runtime/modules/AccessCheck/Umod_PkgNotExp.java b/hotspot/test/runtime/modules/AccessCheck/Umod_PkgNotExp.java index d140cf84d69..4990a379bb4 100644 --- a/hotspot/test/runtime/modules/AccessCheck/Umod_PkgNotExp.java +++ b/hotspot/test/runtime/modules/AccessCheck/Umod_PkgNotExp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ /* * @test - * @summary Test if package p2 in module m2 is not exported, then class p1.c1 - * in an unnamed module can not access p2.c2 in module m2. + * @summary Test if package p2 in module m2x is not exported, then class p1.c1 + * in an unnamed module can not access p2.c2 in module m2x. * @modules java.base/jdk.internal.misc * @library /test/lib * @compile myloaders/MySameClassLoader.java @@ -46,13 +46,13 @@ import java.util.Map; import java.util.Set; import myloaders.MySameClassLoader; -// ClassLoader1 --> defines m1 --> no packages -// defines m2 --> packages p2 +// ClassLoader1 --> defines m1x --> no packages +// defines m2x --> packages p2 // -// m1 can read m2 -// package p2 in m2 is not exported +// m1x can read m2x +// package p2 in m2x is not exported // -// class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2 +// class p1.c1 defined in an unnamed module tries to access p2.c2 defined in m2x // Access denied since p2 is not exported. // public class Umod_PkgNotExp { @@ -62,51 +62,51 @@ public class Umod_PkgNotExp { // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: none // Packages exported: none - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 // Packages exported: none - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .contains("p2") + .packages(Set.of("p2")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to the same class loader for this test Map map = new HashMap<>(); - map.put("m1", MySameClassLoader.loader1); - map.put("m2", MySameClassLoader.loader1); + map.put("m1x", MySameClassLoader.loader1); + map.put("m2x", MySameClassLoader.loader1); - // Create Layer that contains m1 and m2 + // Create Layer that contains m1x and m2x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == MySameClassLoader.loader1); - assertTrue(layer.findLoader("m2") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1); + assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 Class p1_c1_class = MySameClassLoader.loader1.loadClass("p1.c1"); try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is not exported)"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is not exported)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheck/p1/c1Loose.java b/hotspot/test/runtime/modules/AccessCheck/p1/c1Loose.java index 3722927e1b4..ab03e5de9c0 100644 --- a/hotspot/test/runtime/modules/AccessCheck/p1/c1Loose.java +++ b/hotspot/test/runtime/modules/AccessCheck/p1/c1Loose.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,7 +26,7 @@ import p2.c2; public class c1Loose { public c1Loose() { - // Attempt access - access should succeed since m1 is a loose module + // Attempt access - access should succeed since m1x is a loose module p2.c2 c2_obj = new p2.c2(); c2_obj.method2(); } diff --git a/hotspot/test/runtime/modules/AccessCheck/p1/c1ReadEdge.java b/hotspot/test/runtime/modules/AccessCheck/p1/c1ReadEdge.java index 55d4a8b7d13..fdceb569684 100644 --- a/hotspot/test/runtime/modules/AccessCheck/p1/c1ReadEdge.java +++ b/hotspot/test/runtime/modules/AccessCheck/p1/c1ReadEdge.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,12 +27,12 @@ import p2.c2; public class c1ReadEdge { public c1ReadEdge() { - // Establish read edge from module m1, where c1ReadEdge is defined, + // Establish read edge from module m1x, where c1ReadEdge is defined, // to the unnamed module, where p2.c2 will be defined. - Module m1 = c1ReadEdge.class.getModule(); + Module m1x = c1ReadEdge.class.getModule(); ClassLoader loader = c1ReadEdge.class.getClassLoader(); Module unnamed_module = loader.getUnnamedModule(); - m1.addReads(unnamed_module); + m1x.addReads(unnamed_module); // Attempt access - access should succeed p2.c2 c2_obj = new p2.c2(); diff --git a/hotspot/test/runtime/modules/AccessCheck/p1/c1ReadEdgeDiffLoader.java b/hotspot/test/runtime/modules/AccessCheck/p1/c1ReadEdgeDiffLoader.java index daaee5843c8..03c444172b6 100644 --- a/hotspot/test/runtime/modules/AccessCheck/p1/c1ReadEdgeDiffLoader.java +++ b/hotspot/test/runtime/modules/AccessCheck/p1/c1ReadEdgeDiffLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,32 +28,32 @@ import p2.c2; public class c1ReadEdgeDiffLoader { public c1ReadEdgeDiffLoader() { - // The goal is to establish a read edge between module m1 + // The goal is to establish a read edge between module m1x // which is the module where p1.c1ReadEdgeDiffLoader is defined, // and the unnamed module that defines p2.c2. This must be // done in 2 steps: // - // Step #1: Establish a read edge between m1, where c1ReadEdgeDiffLoader + // Step #1: Establish a read edge between m1x, where c1ReadEdgeDiffLoader // is defined, and the System ClassLoader's unnamed module, // where MyDiffClassLoader is defined. This read edge // is needed before we can obtain MyDiffClassLoader.loader2's unnamed module. // - // Step #2: Establish a read edge between m1, where c1ReadEdgeDiffLoader + // Step #2: Establish a read edge between m1x, where c1ReadEdgeDiffLoader // is defined, and the MyDiffClassLoader.loader2's unnamed module, // where p2.c2 will be defined. - // Step #1: read edge m1 -> System ClassLoader's unnamed module - Module m1 = c1ReadEdgeDiffLoader.class.getModule(); + // Step #1: read edge m1x -> System ClassLoader's unnamed module + Module m1x = c1ReadEdgeDiffLoader.class.getModule(); ClassLoader system_loader = ClassLoader.getSystemClassLoader(); - Module unnamed_module1 = system_loader.getUnnamedModule(); - m1.addReads(unnamed_module1); + Module unnamed_module_one = system_loader.getUnnamedModule(); + m1x.addReads(unnamed_module_one); - // Step #2: read edge m1 -> MyDiffClassLoader.loader2's unnamed module + // Step #2: read edge m1x -> MyDiffClassLoader.loader2's unnamed module ClassLoader loader2 = MyDiffClassLoader.loader2; - Module unnamed_module2 = loader2.getUnnamedModule(); - m1.addReads(unnamed_module2); + Module unnamed_module_two = loader2.getUnnamedModule(); + m1x.addReads(unnamed_module_two); - // Attempt access - access should succeed since m1 can read + // Attempt access - access should succeed since m1x can read // MyDiffClassLoader.loader2's unnamed module p2.c2 c2_obj = new p2.c2(); c2_obj.method2(); diff --git a/hotspot/test/runtime/modules/AccessCheck/p3/c3ReadEdge.jcod b/hotspot/test/runtime/modules/AccessCheck/p3/c3ReadEdge.jcod index 50df6180233..466d675f220 100644 --- a/hotspot/test/runtime/modules/AccessCheck/p3/c3ReadEdge.jcod +++ b/hotspot/test/runtime/modules/AccessCheck/p3/c3ReadEdge.jcod @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,12 +26,12 @@ * import java.lang.reflect.*; * public class c3ReadEdge { * public c3ReadEdge() { - * // Establish read edge from module m1, where c3ReadEdge is defined, + * // Establish read edge from module m1x, where c3ReadEdge is defined, * // to the unnamed module, where c4 will be defined. - * Module m1 = c3ReadEdge.class.getModule(); + * Module m1x = c3ReadEdge.class.getModule(); * ClassLoader loader = c3ReadEdge.class.getClassLoader(); * Module unnamed_module = loader.getUnnamedModule(); - * m1.addReads(unnamed_module); + * m1x.addReads(unnamed_module); * // Attempt access - access should succeed * c4 c4_obj = new c4(); * c4_obj.method4(); diff --git a/hotspot/test/runtime/modules/AccessCheck/p3/c3ReadEdgeDiffLoader.jcod b/hotspot/test/runtime/modules/AccessCheck/p3/c3ReadEdgeDiffLoader.jcod index 103f7eea2c7..3229c7a2054 100644 --- a/hotspot/test/runtime/modules/AccessCheck/p3/c3ReadEdgeDiffLoader.jcod +++ b/hotspot/test/runtime/modules/AccessCheck/p3/c3ReadEdgeDiffLoader.jcod @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,32 +28,32 @@ * * public class c3ReadEdgeDiffLoader { * public c3ReadEdgeDiffLoader() { - * // The goal is to establish a read edge between module m1 + * // The goal is to establish a read edge between module m1x * // which is the module where p3.c3ReadEdgeDiffLoader is defined, * // and the unnamed module that defines c4. This must be * // done in 2 steps: * // - * // Step #1: Establish a read edge between m1, where c3ReadEdgeDiffLoader + * // Step #1: Establish a read edge between m1x, where c3ReadEdgeDiffLoader * // is defined, and the System ClassLoader's unnamed module, * // where MyDiffClassLoader is defined. This read edge * // is needed before we can obtain MyDiffClassLoader.loader2's unnamed module. * // - * // Step #2: Establish a read edge between m1, where c3ReadEdgeDiffLoader + * // Step #2: Establish a read edge between m1x, where c3ReadEdgeDiffLoader * // is defined, and the MyDiffClassLoader.loader2's unnamed module, * // where c4 will be defined. * - * // Step #1: read edge m1 -> System ClassLoader's unnamed module - * Module m1 = c3ReadEdgeDiffLoader.class.getModule(); + * // Step #1: read edge m1x -> System ClassLoader's unnamed module + * Module m1x = c3ReadEdgeDiffLoader.class.getModule(); * ClassLoader system_loader = ClassLoader.getSystemClassLoader(); - * Module unnamed_module1 = system_loader.getUnnamedModule(); - * m1.addReads(unnamed_module1); + * Module unnamed_module_one = system_loader.getUnnamedModule(); + * m1x.addReads(unnamed_module_one); * - * // Step #2: read edge m1 -> MyDiffClassLoader.loader2's unnamed module + * // Step #2: read edge m1x -> MyDiffClassLoader.loader2's unnamed module * ClassLoader loader2 = MyDiffClassLoader.loader2; - * Module unnamed_module2 = loader2.getUnnamedModule(); - * m1.addReads(unnamed_module2); + * Module unnamed_module_two = loader2.getUnnamedModule(); + * m1x.addReads(unnamed_module_two); * - * // Attempt access - should succeed since m1 can read + * // Attempt access - should succeed since m1x can read * // MyDiffClassLoader.loader2's unnamed module * c4 c4_obj = new c4(); * c4_obj.method4(); diff --git a/hotspot/test/runtime/modules/AccessCheckAllUnnamed.java b/hotspot/test/runtime/modules/AccessCheckAllUnnamed.java index 7872d0d3306..1ce5fdcc4db 100644 --- a/hotspot/test/runtime/modules/AccessCheckAllUnnamed.java +++ b/hotspot/test/runtime/modules/AccessCheckAllUnnamed.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,7 +43,7 @@ public class AccessCheckAllUnnamed { // and then test that a class in the unnamed module can access a package in a // named module that has been exported to all unnamed modules. public static void main(String args[]) throws Throwable { - Object m1, m2; + Object m1x, m2x; // Get the java.lang.reflect.Module object for module java.base. Class jlObject = Class.forName("java.lang.Object"); @@ -55,16 +55,16 @@ public class AccessCheckAllUnnamed { ClassLoader this_cldr = AccessCheckAllUnnamed.class.getClassLoader(); // Define a module for p3. - m1 = ModuleHelper.ModuleObject("module1", this_cldr, new String[] { "p3" }); - assertNotNull(m1, "Module should not be null"); - ModuleHelper.DefineModule(m1, "9.0", "m1/there", new String[] { "p3" }); - ModuleHelper.AddReadsModule(m1, jlObject_jlrM); + m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p3" }); + assertNotNull(m1x, "Module should not be null"); + ModuleHelper.DefineModule(m1x, "9.0", "m1x/there", new String[] { "p3" }); + ModuleHelper.AddReadsModule(m1x, jlObject_jlrM); // Define a module for p2. - m2 = ModuleHelper.ModuleObject("module2", this_cldr, new String[] { "p2" }); - assertNotNull(m2, "Module should not be null"); - ModuleHelper.DefineModule(m2, "9.0", "m2/there", new String[] { "p2" }); - ModuleHelper.AddReadsModule(m2, jlObject_jlrM); + m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" }); + assertNotNull(m2x, "Module should not be null"); + ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" }); + ModuleHelper.AddReadsModule(m2x, jlObject_jlrM); try { ModuleHelper.AddModuleExportsToAllUnnamed((Module)null, "p2"); @@ -74,7 +74,7 @@ public class AccessCheckAllUnnamed { } try { - ModuleHelper.AddModuleExportsToAllUnnamed(m2, null); + ModuleHelper.AddModuleExportsToAllUnnamed(m2x, null); throw new RuntimeException("Failed to get the expected NPE for null package"); } catch(NullPointerException e) { // Expected @@ -88,21 +88,21 @@ public class AccessCheckAllUnnamed { } try { - ModuleHelper.AddModuleExportsToAllUnnamed(m2, "p3"); + ModuleHelper.AddModuleExportsToAllUnnamed(m2x, "p3"); throw new RuntimeException("Failed to get the expected IAE for package in other module"); } catch(IllegalArgumentException e) { // Expected } try { - ModuleHelper.AddModuleExportsToAllUnnamed(m2, "p4"); + ModuleHelper.AddModuleExportsToAllUnnamed(m2x, "p4"); throw new RuntimeException("Failed to get the expected IAE for package not in module"); } catch(IllegalArgumentException e) { // Expected } - // Export package p2 in m2 to allUnnamed. - ModuleHelper.AddModuleExportsToAllUnnamed(m2, "p2"); + // Export package p2 in m2x to allUnnamed. + ModuleHelper.AddModuleExportsToAllUnnamed(m2x, "p2"); // p1.c1's ctor tries to call a method in p2.c2. This should succeed because // p1 is in an unnamed module and p2.c2 is exported to all unnamed modules. diff --git a/hotspot/test/runtime/modules/AccessCheckExp.java b/hotspot/test/runtime/modules/AccessCheckExp.java index fa624b0783a..6c3cb07fff8 100644 --- a/hotspot/test/runtime/modules/AccessCheckExp.java +++ b/hotspot/test/runtime/modules/AccessCheckExp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,10 +39,10 @@ import static jdk.test.lib.Asserts.*; public class AccessCheckExp { - // Test that if module1 can read module2, but package p2 in module2 is not - // exported then class p1.c1 in module1 can not read p2.c2 in module2. + // Test that if module_one can read module_two, but package p2 in module_two is not + // exported then class p1.c1 in module_one can not read p2.c2 in module_two. public static void main(String args[]) throws Throwable { - Object m1, m2; + Object m1x, m2x; // Get the java.lang.reflect.Module object for module java.base. Class jlObject = Class.forName("java.lang.Object"); @@ -54,28 +54,28 @@ public class AccessCheckExp { ClassLoader this_cldr = AccessCheckExp.class.getClassLoader(); // Define a module for p1. - m1 = ModuleHelper.ModuleObject("module1", this_cldr, new String[] { "p1" }); - assertNotNull(m1, "Module should not be null"); - ModuleHelper.DefineModule(m1, "9.0", "m1/here", new String[] { "p1" }); - ModuleHelper.AddReadsModule(m1, jlObject_jlrM); + m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p1" }); + assertNotNull(m1x, "Module should not be null"); + ModuleHelper.DefineModule(m1x, "9.0", "m1x/here", new String[] { "p1" }); + ModuleHelper.AddReadsModule(m1x, jlObject_jlrM); // Define a module for p2. - m2 = ModuleHelper.ModuleObject("module2", this_cldr, new String[] { "p2" }); - assertNotNull(m2, "Module should not be null"); - ModuleHelper.DefineModule(m2, "9.0", "m2/there", new String[] { "p2" }); - ModuleHelper.AddReadsModule(m2, jlObject_jlrM); + m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" }); + assertNotNull(m2x, "Module should not be null"); + ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" }); + ModuleHelper.AddReadsModule(m2x, jlObject_jlrM); - // Make package p1 in m1 visible to everyone. - ModuleHelper.AddModuleExportsToAll(m1, "p1"); + // Make package p1 in m1x visible to everyone. + ModuleHelper.AddModuleExportsToAll(m1x, "p1"); // p1.c1's ctor tries to call a method in p2.c2, but p2.c2 is not // exported. So should get IllegalAccessError. - ModuleHelper.AddReadsModule(m1, m2); + ModuleHelper.AddReadsModule(m1x, m2x); Class p1_c1_class = Class.forName("p1.c1"); try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is not exported"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is not exported"); } catch (IllegalAccessError f) { System.out.println(f.getMessage()); if (!f.getMessage().contains("does not export")) { diff --git a/hotspot/test/runtime/modules/AccessCheckJavaBase.java b/hotspot/test/runtime/modules/AccessCheckJavaBase.java index 24f2f77e115..aea13270267 100644 --- a/hotspot/test/runtime/modules/AccessCheckJavaBase.java +++ b/hotspot/test/runtime/modules/AccessCheckJavaBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,16 +38,16 @@ import static jdk.test.lib.Asserts.*; public class AccessCheckJavaBase { - // Test that a class defined to module2 always can read java.base. + // Test that a class defined to module_two always can read java.base. public static void main(String args[]) throws Throwable { // Get the class loader for AccessCheckJavaBase and assume it's also used to // load class p2.c2. ClassLoader this_cldr = AccessCheckJavaBase.class.getClassLoader(); // Define a module for p2. - Object m2 = ModuleHelper.ModuleObject("module2", this_cldr, new String[] { "p2" }); - assertNotNull(m2, "Module should not be null"); - ModuleHelper.DefineModule(m2, "9.0", "m2/there", new String[] { "p2" }); + Object m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" }); + assertNotNull(m2x, "Module should not be null"); + ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" }); // p2.c2 can read its superclass java.lang.Object defined within java.base try { diff --git a/hotspot/test/runtime/modules/AccessCheckRead.java b/hotspot/test/runtime/modules/AccessCheckRead.java index a36268ace02..193388dbade 100644 --- a/hotspot/test/runtime/modules/AccessCheckRead.java +++ b/hotspot/test/runtime/modules/AccessCheckRead.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,10 +39,10 @@ import static jdk.test.lib.Asserts.*; public class AccessCheckRead { - // Test that a class in a package in module1 cannot access a class in - // a package n module2 if module1 cannot read module2. + // Test that a class in a package in module_one cannot access a class in + // a package in module_two if module_one cannot read module_two. public static void main(String args[]) throws Throwable { - Object m1, m2; + Object m1x, m2x; // Get the java.lang.reflect.Module object for module java.base. Class jlObject = Class.forName("java.lang.Object"); @@ -54,19 +54,19 @@ public class AccessCheckRead { ClassLoader this_cldr = AccessCheckRead.class.getClassLoader(); // Define a module for p1. - m1 = ModuleHelper.ModuleObject("module1", this_cldr, new String[] { "p1" }); - assertNotNull(m1, "Module should not be null"); - ModuleHelper.DefineModule(m1, "9.0", "m1/here", new String[] { "p1" }); - ModuleHelper.AddReadsModule(m1, jlObject_jlrM); + m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p1" }); + assertNotNull(m1x, "Module should not be null"); + ModuleHelper.DefineModule(m1x, "9.0", "m1x/here", new String[] { "p1" }); + ModuleHelper.AddReadsModule(m1x, jlObject_jlrM); // Define a module for p2. - m2 = ModuleHelper.ModuleObject("module2", this_cldr, new String[] { "p2" }); - assertNotNull(m2, "Module should not be null"); - ModuleHelper.DefineModule(m2, "9.0", "m2/there", new String[] { "p2" }); - ModuleHelper.AddReadsModule(m2, jlObject_jlrM); + m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" }); + assertNotNull(m2x, "Module should not be null"); + ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" }); + ModuleHelper.AddReadsModule(m2x, jlObject_jlrM); - // Make package p1 in m1 visible to everyone. - ModuleHelper.AddModuleExportsToAll(m1, "p1"); + // Make package p1 in m1x visible to everyone. + ModuleHelper.AddModuleExportsToAll(m1x, "p1"); Class p1_c1_class = Class.forName("p1.c1"); @@ -74,7 +74,7 @@ public class AccessCheckRead { // cannot read p2's module. So should get IllegalAccessError. try { p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (m1 can't read m2)"); + throw new RuntimeException("Failed to get IAE (m1x can't read m2x)"); } catch (IllegalAccessError e) { System.out.println(e.getMessage()); if (!e.getMessage().contains("does not read") || diff --git a/hotspot/test/runtime/modules/AccessCheckSuper.java b/hotspot/test/runtime/modules/AccessCheckSuper.java index 594c1921e0f..240d79c0ab9 100644 --- a/hotspot/test/runtime/modules/AccessCheckSuper.java +++ b/hotspot/test/runtime/modules/AccessCheckSuper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -48,17 +48,17 @@ public class AccessCheckSuper { ClassLoader this_cldr = AccessCheckSuper.class.getClassLoader(); // Define a module for p2. - Object m2 = ModuleHelper.ModuleObject("module2", this_cldr, new String[] { "p2" }); - assertNotNull(m2, "Module should not be null"); - ModuleHelper.DefineModule(m2, "9.0", "m2/there", new String[] { "p2" }); + Object m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" }); + assertNotNull(m2x, "Module should not be null"); + ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" }); // Define a module for p3. - Object m3 = ModuleHelper.ModuleObject("module3", this_cldr, new String[] { "p3" }); - assertNotNull(m3, "Module should not be null"); - ModuleHelper.DefineModule(m3, "9.0", "m3/there", new String[] { "p3" }); + Object m3x = ModuleHelper.ModuleObject("module_three", this_cldr, new String[] { "p3" }); + assertNotNull(m3x, "Module should not be null"); + ModuleHelper.DefineModule(m3x, "9.0", "m3x/there", new String[] { "p3" }); - // Since a readability edge has not been established between module2 - // and module3, p3.c3 cannot read its superclass p2.c2. + // Since a readability edge has not been established between module_two + // and module_three, p3.c3 cannot read its superclass p2.c2. try { Class p3_c3_class = Class.forName("p3.c3"); throw new RuntimeException("Failed to get IAE (can't read superclass)"); diff --git a/hotspot/test/runtime/modules/AccessCheckUnnamed.java b/hotspot/test/runtime/modules/AccessCheckUnnamed.java index 4a2ab3e4951..79a685d4c43 100644 --- a/hotspot/test/runtime/modules/AccessCheckUnnamed.java +++ b/hotspot/test/runtime/modules/AccessCheckUnnamed.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,7 +42,7 @@ public class AccessCheckUnnamed { // Test that a class in the unnamed module can not access a package in a // named module that has not been unqualifiedly exported. public static void main(String args[]) throws Throwable { - Object m1, m2; + Object m1x, m2x; // Get the java.lang.reflect.Module object for module java.base. Class jlObject = Class.forName("java.lang.Object"); @@ -54,17 +54,17 @@ public class AccessCheckUnnamed { ClassLoader this_cldr = AccessCheckUnnamed.class.getClassLoader(); // Define a module for p2. - m2 = ModuleHelper.ModuleObject("module2", this_cldr, new String[] { "p2" }); - assertNotNull(m2, "Module should not be null"); - ModuleHelper.DefineModule(m2, "9.0", "m2/there", new String[] { "p2" }); - ModuleHelper.AddReadsModule(m2, jlObject_jlrM); + m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" }); + assertNotNull(m2x, "Module should not be null"); + ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" }); + ModuleHelper.AddReadsModule(m2x, jlObject_jlrM); // p1.c1's ctor tries to call a method in p2.c2. This should fail because // p1 is in the unnamed module and p2.c2 is not unqualifiedly exported. Class p1_c1_class = Class.forName("p1.c1"); try { Object c1_obj = p1_c1_class.newInstance(); - throw new RuntimeException("Failed to get IAE (p2 in m2 is not exported to unnamed module)"); + throw new RuntimeException("Failed to get IAE (p2 in m2x is not exported to unnamed module)"); } catch (IllegalAccessError f) { System.out.println(f.getMessage()); if (!f.getMessage().contains("does not export p2 to unnamed module")) { diff --git a/hotspot/test/runtime/modules/AccessCheckWorks.java b/hotspot/test/runtime/modules/AccessCheckWorks.java index 48d6660f195..0cc9cb981e0 100644 --- a/hotspot/test/runtime/modules/AccessCheckWorks.java +++ b/hotspot/test/runtime/modules/AccessCheckWorks.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,11 +39,11 @@ import static jdk.test.lib.Asserts.*; public class AccessCheckWorks { - // Check that a class in a package in module1 can successfully access a - // class in module2 when module1 can read module2 and the class's package + // Check that a class in a package in module_one can successfully access a + // class in module_two when module_one can read module_two and the class's package // has been exported. public static void main(String args[]) throws Throwable { - Object m1, m2; + Object m1x, m2x; // Get the java.lang.reflect.Module object for module java.base. Class jlObject = Class.forName("java.lang.Object"); @@ -55,24 +55,24 @@ public class AccessCheckWorks { ClassLoader this_cldr = AccessCheckWorks.class.getClassLoader(); // Define a module for p1. - m1 = ModuleHelper.ModuleObject("module1", this_cldr, new String[] { "p1" }); - assertNotNull(m1, "Module should not be null"); - ModuleHelper.DefineModule(m1, "9.0", "m1/here", new String[] { "p1" }); - ModuleHelper.AddReadsModule(m1, jlObject_jlrM); + m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p1" }); + assertNotNull(m1x, "Module should not be null"); + ModuleHelper.DefineModule(m1x, "9.0", "m1x/here", new String[] { "p1" }); + ModuleHelper.AddReadsModule(m1x, jlObject_jlrM); // Define a module for p2. - m2 = ModuleHelper.ModuleObject("module2", this_cldr, new String[] { "p2" }); - assertNotNull(m2, "Module should not be null"); - ModuleHelper.DefineModule(m2, "9.0", "m2/there", new String[] { "p2" }); - ModuleHelper.AddReadsModule(m2, jlObject_jlrM); + m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" }); + assertNotNull(m2x, "Module should not be null"); + ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" }); + ModuleHelper.AddReadsModule(m2x, jlObject_jlrM); - // Make package p1 in m1 visible to everyone. - ModuleHelper.AddModuleExportsToAll(m1, "p1"); + // Make package p1 in m1x visible to everyone. + ModuleHelper.AddModuleExportsToAll(m1x, "p1"); // p1.c1's ctor tries to call a method in p2.c2. This should work because // p1's module can read p2's module and p2 is exported to p1's module. - ModuleHelper.AddReadsModule(m1, m2); - ModuleHelper.AddModuleExports(m2, "p2", m1); + ModuleHelper.AddReadsModule(m1x, m2x); + ModuleHelper.AddModuleExports(m2x, "p2", m1x); Class p1_c1_class = Class.forName("p1.c1"); p1_c1_class.newInstance(); } diff --git a/hotspot/test/runtime/modules/CCE_module_msg.java b/hotspot/test/runtime/modules/CCE_module_msg.java index 38ff41fde2d..0cca61bef86 100644 --- a/hotspot/test/runtime/modules/CCE_module_msg.java +++ b/hotspot/test/runtime/modules/CCE_module_msg.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -83,21 +83,21 @@ public class CCE_module_msg { ClassLoader this_cldr = CCE_module_msg.class.getClassLoader(); // Define a module for p2. - Object m2 = ModuleHelper.ModuleObject("module2", this_cldr, new String[] { "p2" }); - assertNotNull(m2, "Module should not be null"); - ModuleHelper.DefineModule(m2, "9.0", "m2/there", new String[] { "p2" }); - ModuleHelper.AddReadsModule(m2, jlObject_jlrM); + Object m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" }); + assertNotNull(m2x, "Module should not be null"); + ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" }); + ModuleHelper.AddReadsModule(m2x, jlObject_jlrM); try { - ModuleHelper.AddModuleExportsToAll(m2, "p2"); + ModuleHelper.AddModuleExportsToAll(m2x, "p2"); Object p2Obj = new p2.c2(); System.out.println((String)p2Obj); throw new RuntimeException("ClassCastException wasn't thrown, test failed."); } catch (ClassCastException cce) { String exception = cce.getMessage(); System.out.println(exception); - if (exception.contains("module2/p2.c2") || - !(exception.contains("module2@") && + if (exception.contains("module_two/p2.c2") || + !(exception.contains("module_two@") && exception.contains("/p2.c2 cannot be cast to java.base/java.lang.String"))) { throw new RuntimeException("Wrong message: " + exception); } diff --git a/hotspot/test/runtime/modules/ExportTwice.java b/hotspot/test/runtime/modules/ExportTwice.java index 538c65926c0..82cefa939e2 100644 --- a/hotspot/test/runtime/modules/ExportTwice.java +++ b/hotspot/test/runtime/modules/ExportTwice.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -44,7 +44,7 @@ public class ExportTwice { // Also, check that a package can be exported to a specific package and then // exported unqualifiedly. public static void main(String args[]) throws Throwable { - Object m1, m2, m3; + Object m1x, m2x, m3x; // Get the java.lang.reflect.Module object for module java.base. Class jlObject = Class.forName("java.lang.Object"); @@ -56,37 +56,37 @@ public class ExportTwice { ClassLoader this_cldr = ExportTwice.class.getClassLoader(); // Define a module for p1. - m1 = ModuleHelper.ModuleObject("module1", this_cldr, new String[] { "p1" }); - assertNotNull(m1, "Module should not be null"); - ModuleHelper.DefineModule(m1, "9.0", "m1/here", new String[] { "p1" }); - ModuleHelper.AddReadsModule(m1, jlObject_jlrM); + m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p1" }); + assertNotNull(m1x, "Module should not be null"); + ModuleHelper.DefineModule(m1x, "9.0", "m1x/here", new String[] { "p1" }); + ModuleHelper.AddReadsModule(m1x, jlObject_jlrM); // Define a module for p2. - m2 = ModuleHelper.ModuleObject("module2", this_cldr, new String[] { "p2" }); - assertNotNull(m2, "Module should not be null"); - ModuleHelper.DefineModule(m2, "9.0", "m2/there", new String[] { "p2" }); - ModuleHelper.AddReadsModule(m2, jlObject_jlrM); + m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" }); + assertNotNull(m2x, "Module should not be null"); + ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" }); + ModuleHelper.AddReadsModule(m2x, jlObject_jlrM); // Define a module for p3. - m3 = ModuleHelper.ModuleObject("module3", this_cldr, new String[] { "p3" }); - assertNotNull(m3, "Module should not be null"); - ModuleHelper.DefineModule(m3, "9.0", "m3/there", new String[] { "p3" }); - ModuleHelper.AddReadsModule(m3, jlObject_jlrM); + m3x = ModuleHelper.ModuleObject("module_three", this_cldr, new String[] { "p3" }); + assertNotNull(m3x, "Module should not be null"); + ModuleHelper.DefineModule(m3x, "9.0", "m3x/there", new String[] { "p3" }); + ModuleHelper.AddReadsModule(m3x, jlObject_jlrM); - // Make package p1 in m1 visible to everyone. - ModuleHelper.AddModuleExportsToAll(m1, "p1"); + // Make package p1 in m1x visible to everyone. + ModuleHelper.AddModuleExportsToAll(m1x, "p1"); - // Try to export p1 only to m2 after it was exported unqualifiedly. It + // Try to export p1 only to m2x after it was exported unqualifiedly. It // should silently succeed. - ModuleHelper.AddModuleExports(m1, "p1", m2); + ModuleHelper.AddModuleExports(m1x, "p1", m2x); - // Export p2 to m3 then export it again unqualifiedly. - ModuleHelper.AddModuleExports(m2, "p2", m3); - ModuleHelper.AddModuleExportsToAll(m2, "p2"); + // Export p2 to m3x then export it again unqualifiedly. + ModuleHelper.AddModuleExports(m2x, "p2", m3x); + ModuleHelper.AddModuleExportsToAll(m2x, "p2"); // p1.c1's ctor tries to call a method in p2.c2. This should work because // p1's module can read p2's module and p2 is now exported unqualifiedly. - ModuleHelper.AddReadsModule(m1, m2); + ModuleHelper.AddReadsModule(m1x, m2x); Class p1_c1_class = Class.forName("p1.c1"); p1_c1_class.newInstance(); } diff --git a/hotspot/test/runtime/modules/IgnoreModulePropertiesTest.java b/hotspot/test/runtime/modules/IgnoreModulePropertiesTest.java index e3748530fa7..c00a7104191 100644 --- a/hotspot/test/runtime/modules/IgnoreModulePropertiesTest.java +++ b/hotspot/test/runtime/modules/IgnoreModulePropertiesTest.java @@ -67,8 +67,8 @@ public class IgnoreModulePropertiesTest { } public static void main(String[] args) throws Exception { - testOption("--add-modules", "java.sqlx", "jdk.module.addmods.0", "java.lang.module.ResolutionException"); - testOption("--limit-modules", "java.sqlx", "jdk.module.limitmods", "java.lang.module.ResolutionException"); + testOption("--add-modules", "java.sqlx", "jdk.module.addmods.0", "java.lang.module.FindException"); + testOption("--limit-modules", "java.sqlx", "jdk.module.limitmods", "java.lang.module.FindException"); testOption("--add-reads", "xyzz=yyzd", "jdk.module.addreads.0", "WARNING: Unknown module: xyzz"); testOption("--add-exports", "java.base/xyzz=yyzd", "jdk.module.addexports.0", "WARNING: package xyzz not in java.base"); diff --git a/hotspot/test/runtime/modules/JVMAddModuleExportToAllUnnamed.java b/hotspot/test/runtime/modules/JVMAddModuleExportToAllUnnamed.java index 7a08787c696..99f47ad4227 100644 --- a/hotspot/test/runtime/modules/JVMAddModuleExportToAllUnnamed.java +++ b/hotspot/test/runtime/modules/JVMAddModuleExportToAllUnnamed.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,10 +39,10 @@ import static jdk.test.lib.Asserts.*; public class JVMAddModuleExportToAllUnnamed { - // Check that a class in a package in module1 cannot access a class + // Check that a class in a package in module_one cannot access a class // that is in the unnamed module if the accessing package is strict. public static void main(String args[]) throws Throwable { - Object m1; + Object m1x; // Get the java.lang.reflect.Module object for module java.base. Class jlObject = Class.forName("java.lang.Object"); @@ -54,13 +54,13 @@ public class JVMAddModuleExportToAllUnnamed { ClassLoader this_cldr = JVMAddModuleExportToAllUnnamed.class.getClassLoader(); // Define a module for p1. - m1 = ModuleHelper.ModuleObject("module1", this_cldr, new String[] { "p1" }); - assertNotNull(m1, "Module should not be null"); - ModuleHelper.DefineModule(m1, "9.0", "m1/here", new String[] { "p1" }); - ModuleHelper.AddReadsModule(m1, jlObject_jlrM); + m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p1" }); + assertNotNull(m1x, "Module should not be null"); + ModuleHelper.DefineModule(m1x, "9.0", "m1x/here", new String[] { "p1" }); + ModuleHelper.AddReadsModule(m1x, jlObject_jlrM); - // Make package p1 in m1 visible to everyone. - ModuleHelper.AddModuleExportsToAll(m1, "p1"); + // Make package p1 in m1x visible to everyone. + ModuleHelper.AddModuleExportsToAll(m1x, "p1"); // p1.c1's ctor tries to call a method in p2.c2. This should not work // because p2 is in the unnamed module and p1.c1 is strict. diff --git a/hotspot/test/runtime/modules/JVMAddModuleExportsToAll.java b/hotspot/test/runtime/modules/JVMAddModuleExportsToAll.java index 80db658a99d..ec4672327c3 100644 --- a/hotspot/test/runtime/modules/JVMAddModuleExportsToAll.java +++ b/hotspot/test/runtime/modules/JVMAddModuleExportsToAll.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,7 +43,7 @@ public class JVMAddModuleExportsToAll { // and then test that a class in the unnamed module can access a package in // a named module that has been exported unqualifiedly. public static void main(String args[]) throws Throwable { - Object m1, m2, m3; + Object m1x, m2x, m3x; // Get the java.lang.reflect.Module object for module java.base. Class jlObject = Class.forName("java.lang.Object"); @@ -55,16 +55,16 @@ public class JVMAddModuleExportsToAll { ClassLoader this_cldr = JVMAddModuleExportsToAll.class.getClassLoader(); // Define a module for p3. - m1 = ModuleHelper.ModuleObject("module1", this_cldr, new String[] { "p3" }); - assertNotNull(m1, "Module should not be null"); - ModuleHelper.DefineModule(m1, "9.0", "m1/there", new String[] { "p3" }); - ModuleHelper.AddReadsModule(m1, jlObject_jlrM); + m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p3" }); + assertNotNull(m1x, "Module should not be null"); + ModuleHelper.DefineModule(m1x, "9.0", "m1x/there", new String[] { "p3" }); + ModuleHelper.AddReadsModule(m1x, jlObject_jlrM); // Define a module for p2. - m2 = ModuleHelper.ModuleObject("module2", this_cldr, new String[] { "p2" }); - assertNotNull(m2, "Module should not be null"); - ModuleHelper.DefineModule(m2, "9.0", "m2/there", new String[] { "p2" }); - ModuleHelper.AddReadsModule(m2, jlObject_jlrM); + m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" }); + assertNotNull(m2x, "Module should not be null"); + ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" }); + ModuleHelper.AddReadsModule(m2x, jlObject_jlrM); try { ModuleHelper.AddModuleExportsToAll((Module)null, "p2"); @@ -74,7 +74,7 @@ public class JVMAddModuleExportsToAll { } try { - ModuleHelper.AddModuleExportsToAll(m2, null); + ModuleHelper.AddModuleExportsToAll(m2x, null); throw new RuntimeException("Failed to get the expected NPE for null package"); } catch(NullPointerException e) { // Expected @@ -88,26 +88,26 @@ public class JVMAddModuleExportsToAll { } try { - ModuleHelper.AddModuleExportsToAll(m2, "p3"); + ModuleHelper.AddModuleExportsToAll(m2x, "p3"); throw new RuntimeException("Failed to get the expected IAE for package that is in another module"); } catch(IllegalArgumentException e) { // Expected } try { - ModuleHelper.AddModuleExportsToAll(m2, "p4"); + ModuleHelper.AddModuleExportsToAll(m2x, "p4"); throw new RuntimeException("Failed to get the expected IAE for package not in any module"); } catch(IllegalArgumentException e) { // Expected } - // Export package p2 in m2 unqualifiedly. Then, do a qualified export - // of p2 in m2 to m3. This should not affect the unqualified export. - m3 = ModuleHelper.ModuleObject("module3", this_cldr, new String[] { "p4" }); - assertNotNull(m3, "Module m3 should not be null"); - ModuleHelper.DefineModule(m3, "9.0", "m3/there", new String[] { "p4" }); - ModuleHelper.AddModuleExportsToAll(m2, "p2"); - ModuleHelper.AddModuleExports(m2, "p2", m3); + // Export package p2 in m2x unqualifiedly. Then, do a qualified export + // of p2 in m2x to m3x. This should not affect the unqualified export. + m3x = ModuleHelper.ModuleObject("module_three", this_cldr, new String[] { "p4" }); + assertNotNull(m3x, "Module m3x should not be null"); + ModuleHelper.DefineModule(m3x, "9.0", "m3x/there", new String[] { "p4" }); + ModuleHelper.AddModuleExportsToAll(m2x, "p2"); + ModuleHelper.AddModuleExports(m2x, "p2", m3x); // p1.c1's ctor tries to call a method in p2.c2. This should succeed because // p1 is in an unnamed module and p2.c2 is exported unqualifiedly. diff --git a/hotspot/test/runtime/modules/JVMAddModulePackage.java b/hotspot/test/runtime/modules/JVMAddModulePackage.java index 3f7f2fd29a0..e109e728607 100644 --- a/hotspot/test/runtime/modules/JVMAddModulePackage.java +++ b/hotspot/test/runtime/modules/JVMAddModulePackage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,25 +40,25 @@ public class JVMAddModulePackage { public static void main(String args[]) throws Throwable { MyClassLoader cl1 = new MyClassLoader(); MyClassLoader cl3 = new MyClassLoader(); - Object module1, module2, module3; + Object module_one, module_two, module_three; boolean result; - module1 = ModuleHelper.ModuleObject("module1", cl1, new String[] { "mypackage" }); - assertNotNull(module1, "Module should not be null"); - ModuleHelper.DefineModule(module1, "9.0", "module1/here", new String[] { "mypackage" }); - module2 = ModuleHelper.ModuleObject("module2", cl1, new String[] { "yourpackage" }); - assertNotNull(module2, "Module should not be null"); - ModuleHelper.DefineModule(module2, "9.0", "module2/here", new String[] { "yourpackage" }); - module3 = ModuleHelper.ModuleObject("module3", cl3, new String[] { "package/num3" }); - assertNotNull(module3, "Module should not be null"); - ModuleHelper.DefineModule(module3, "9.0", "module3/here", new String[] { "package/num3" }); + module_one = ModuleHelper.ModuleObject("module_one", cl1, new String[] { "mypackage" }); + assertNotNull(module_one, "Module should not be null"); + ModuleHelper.DefineModule(module_one, "9.0", "module_one/here", new String[] { "mypackage" }); + module_two = ModuleHelper.ModuleObject("module_two", cl1, new String[] { "yourpackage" }); + assertNotNull(module_two, "Module should not be null"); + ModuleHelper.DefineModule(module_two, "9.0", "module_two/here", new String[] { "yourpackage" }); + module_three = ModuleHelper.ModuleObject("module_three", cl3, new String[] { "package/num3" }); + assertNotNull(module_three, "Module should not be null"); + ModuleHelper.DefineModule(module_three, "9.0", "module_three/here", new String[] { "package/num3" }); // Simple call - ModuleHelper.AddModulePackage(module1, "new_package"); + ModuleHelper.AddModulePackage(module_one, "new_package"); // Add a package and export it - ModuleHelper.AddModulePackage(module1, "package/num3"); - ModuleHelper.AddModuleExportsToAll(module1, "package/num3"); + ModuleHelper.AddModulePackage(module_one, "package/num3"); + ModuleHelper.AddModuleExportsToAll(module_one, "package/num3"); // Null module argument, expect an NPE try { @@ -78,7 +78,7 @@ public class JVMAddModulePackage { // Null package argument, expect an NPE try { - ModuleHelper.AddModulePackage(module1, null); + ModuleHelper.AddModulePackage(module_one, null); throw new RuntimeException("Failed to get the expected NPE"); } catch(NullPointerException e) { // Expected @@ -86,7 +86,7 @@ public class JVMAddModulePackage { // Existing package, expect an ISE try { - ModuleHelper.AddModulePackage(module1, "yourpackage"); + ModuleHelper.AddModulePackage(module_one, "yourpackage"); throw new RuntimeException("Failed to get the expected ISE"); } catch(IllegalStateException e) { // Expected @@ -94,7 +94,7 @@ public class JVMAddModulePackage { // Invalid package name, expect an IAE try { - ModuleHelper.AddModulePackage(module1, "your.package"); + ModuleHelper.AddModulePackage(module_one, "your.package"); throw new RuntimeException("Failed to get the expected IAE"); } catch(IllegalArgumentException e) { // Expected @@ -102,7 +102,7 @@ public class JVMAddModulePackage { // Invalid package name, expect an IAE try { - ModuleHelper.AddModulePackage(module1, ";your/package"); + ModuleHelper.AddModulePackage(module_one, ";your/package"); throw new RuntimeException("Failed to get the expected IAE"); } catch(IllegalArgumentException e) { // Expected @@ -110,7 +110,7 @@ public class JVMAddModulePackage { // Invalid package name, expect an IAE try { - ModuleHelper.AddModulePackage(module1, "7[743"); + ModuleHelper.AddModulePackage(module_one, "7[743"); throw new RuntimeException("Failed to get the expected IAE"); } catch(IllegalArgumentException e) { // Expected @@ -118,7 +118,7 @@ public class JVMAddModulePackage { // Empty package name, expect an IAE try { - ModuleHelper.AddModulePackage(module1, ""); + ModuleHelper.AddModulePackage(module_one, ""); throw new RuntimeException("Failed to get the expected IAE"); } catch(IllegalArgumentException e) { // Expected @@ -126,8 +126,8 @@ public class JVMAddModulePackage { // Add package named "java" to an module defined to a class loader other than the boot or platform loader. try { - // module1 is defined to a MyClassLoader class loader. - ModuleHelper.AddModulePackage(module1, "java/foo"); + // module_one is defined to a MyClassLoader class loader. + ModuleHelper.AddModulePackage(module_one, "java/foo"); throw new RuntimeException("Failed to get the expected IAE"); } catch(IllegalArgumentException e) { if (!e.getMessage().contains("prohibited package name")) { @@ -136,10 +136,10 @@ public class JVMAddModulePackage { } // Package "javabar" should be ok - ModuleHelper.AddModulePackage(module1, "javabar"); + ModuleHelper.AddModulePackage(module_one, "javabar"); // Package named "java" defined to the boot class loader, should be ok - Object module_javabase = module1.getClass().getModule(); + Object module_javabase = module_one.getClass().getModule(); ModuleHelper.AddModulePackage(module_javabase, "java/foo"); // Package named "java" defined to the platform class loader, should be ok diff --git a/hotspot/test/runtime/modules/JVMDefineModule.java b/hotspot/test/runtime/modules/JVMDefineModule.java index 9e44878490d..5ef669ed93b 100644 --- a/hotspot/test/runtime/modules/JVMDefineModule.java +++ b/hotspot/test/runtime/modules/JVMDefineModule.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -49,7 +49,7 @@ public class JVMDefineModule { /* Invalid test, won't compile. // Invalid classloader argument, expect an IAE try { - m = ModuleHelper.ModuleObject("mymodule1", new Object(), new String[] { "mypackage1" }); + m = ModuleHelper.ModuleObject("mymodule_one", new Object(), new String[] { "mypackage1" }); ModuleHelper.DefineModule(m, "9.0", "mymodule/here", new String[] { "mypackage1" }); throw new RuntimeException("Failed to get expected IAE for bad loader"); } catch(IllegalArgumentException e) { diff --git a/hotspot/test/runtime/modules/JVMGetModuleByPkgName.java b/hotspot/test/runtime/modules/JVMGetModuleByPkgName.java index 1f58193c676..ce94bb19536 100644 --- a/hotspot/test/runtime/modules/JVMGetModuleByPkgName.java +++ b/hotspot/test/runtime/modules/JVMGetModuleByPkgName.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -79,10 +79,10 @@ public class JVMGetModuleByPkgName { } MyClassLoader cl1 = new MyClassLoader(); - Module module1 = (Module)ModuleHelper.ModuleObject("module1", cl1, new String[] { "mypackage" }); - assertNotNull(module1, "Module should not be null"); - ModuleHelper.DefineModule(module1, "9.0", "module1/here", new String[] { "mypackage" }); - if (ModuleHelper.GetModuleByPackageName(cl1, "mypackage") != module1) { + Module module_one = (Module)ModuleHelper.ModuleObject("module_one", cl1, new String[] { "mypackage" }); + assertNotNull(module_one, "Module should not be null"); + ModuleHelper.DefineModule(module_one, "9.0", "module_one/here", new String[] { "mypackage" }); + if (ModuleHelper.GetModuleByPackageName(cl1, "mypackage") != module_one) { throw new RuntimeException("Wrong module returned for cl1 mypackage"); } } diff --git a/hotspot/test/runtime/modules/ModuleHelper.java b/hotspot/test/runtime/modules/ModuleHelper.java index 2f0d7f6ec11..26febc2a75e 100644 --- a/hotspot/test/runtime/modules/ModuleHelper.java +++ b/hotspot/test/runtime/modules/ModuleHelper.java @@ -84,7 +84,7 @@ public class ModuleHelper { } ModuleDescriptor descriptor = - ModuleDescriptor.module(name).contains(pkg_set).build(); + ModuleDescriptor.newModule(name).packages(pkg_set).build(); URI uri = URI.create("module:/" + name); return java.lang.reflect.ModuleHelper.newModule(loader, descriptor); diff --git a/hotspot/test/runtime/modules/ModuleOptionsTest.java b/hotspot/test/runtime/modules/ModuleOptionsTest.java index 28064bddc27..e526e06abe1 100644 --- a/hotspot/test/runtime/modules/ModuleOptionsTest.java +++ b/hotspot/test/runtime/modules/ModuleOptionsTest.java @@ -43,7 +43,7 @@ public class ModuleOptionsTest { ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( "--add-modules=i_dont_exist", "--add-modules=java.base", "-version"); OutputAnalyzer output = new OutputAnalyzer(pb.start()); - output.shouldContain("ResolutionException"); + output.shouldContain("FindException"); output.shouldContain("i_dont_exist"); output.shouldHaveExitValue(1); diff --git a/hotspot/test/runtime/modules/ModuleStress/CustomSystemClassLoader.java b/hotspot/test/runtime/modules/ModuleStress/CustomSystemClassLoader.java index dca359f6458..643e4bfd547 100644 --- a/hotspot/test/runtime/modules/ModuleStress/CustomSystemClassLoader.java +++ b/hotspot/test/runtime/modules/ModuleStress/CustomSystemClassLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,7 +22,7 @@ */ /** - * A custom system ClassLoader to define the module "m2" to during iterations of + * A custom system ClassLoader to define the module "m2x" to during iterations of * differing test runs within the test ModuleStress.java */ public class CustomSystemClassLoader extends ClassLoader { diff --git a/hotspot/test/runtime/modules/ModuleStress/ModuleNonBuiltinCLMain.java b/hotspot/test/runtime/modules/ModuleStress/ModuleNonBuiltinCLMain.java index 79e56f2a457..6186727606f 100644 --- a/hotspot/test/runtime/modules/ModuleStress/ModuleNonBuiltinCLMain.java +++ b/hotspot/test/runtime/modules/ModuleStress/ModuleNonBuiltinCLMain.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,15 +35,15 @@ import java.util.Map; import java.util.Set; // -// ClassLoader1 --> defines m1 --> packages p1 -// ClassLoader2 --> defines m2 --> packages p2 -// Java System Class Loader --> defines m3 --> packages p3 +// ClassLoader1 --> defines m1x --> packages p1 +// ClassLoader2 --> defines m2x --> packages p2 +// Java System Class Loader --> defines m3x --> packages p3 // -// m1 can read m2 -// package p2 in m2 is exported to m1 and m3 +// m1x can read m2x +// package p2 in m2x is exported to m1x and m3x // -// class p1.c1 defined in m1 tries to access p2.c2 defined in m2 -// Access allowed since m1 can read m2 and package p2 is exported to m1. +// class p1.c1 defined in m1x tries to access p2.c2 defined in m2x +// Access allowed since m1x can read m2x and package p2 is exported to m1x. // public class ModuleNonBuiltinCLMain { @@ -52,62 +52,62 @@ public class ModuleNonBuiltinCLMain { // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: p1 // Packages exported: p1 is exported to unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .exports("p1") .build(); - // Define module: m2 - // Can read: java.base, m3 + // Define module: m2x + // Can read: java.base, m3x // Packages: p2 - // Packages exported: package p2 is exported to m1 and m3 + // Packages exported: package p2 is exported to m1x and m3x Set targets = new HashSet<>(); - targets.add("m1"); - targets.add("m3"); - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + targets.add("m1x"); + targets.add("m3x"); + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .requires("m3") + .requires("m3x") .exports("p2", targets) .build(); - // Define module: m3 + // Define module: m3x // Can read: java.base // Packages: p3 // Packages exported: none - ModuleDescriptor descriptor_m3 = - ModuleDescriptor.module("m3") + ModuleDescriptor descriptor_m3x = + ModuleDescriptor.newModule("m3x") .requires("java.base") .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2, descriptor_m3); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x, descriptor_m3x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to differing user defined class loaders for this test Map map = new HashMap<>(); Loader1 cl1 = new Loader1(); Loader2 cl2 = new Loader2(); ClassLoader cl3 = ClassLoader.getSystemClassLoader(); - map.put("m1", cl1); - map.put("m2", cl2); - map.put("m3", cl3); + map.put("m1x", cl1); + map.put("m2x", cl2); + map.put("m3x", cl3); - // Create Layer that contains m1 & m2 + // Create Layer that contains m1x & m2x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == cl1); - assertTrue(layer.findLoader("m2") == cl2); - assertTrue(layer.findLoader("m3") == cl3); + assertTrue(layer.findLoader("m1x") == cl1); + assertTrue(layer.findLoader("m2x") == cl2); + assertTrue(layer.findLoader("m3x") == cl3); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 @@ -115,7 +115,7 @@ public class ModuleNonBuiltinCLMain { try { p1_c1_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, an IAE should not be thrown since p2 is exported qualifiedly to m1"); + throw new RuntimeException("Test Failed, an IAE should not be thrown since p2 is exported qualifiedly to m1x"); } } diff --git a/hotspot/test/runtime/modules/ModuleStress/ModuleSameCLMain.java b/hotspot/test/runtime/modules/ModuleStress/ModuleSameCLMain.java index cdbc9002405..c2f859e3817 100644 --- a/hotspot/test/runtime/modules/ModuleStress/ModuleSameCLMain.java +++ b/hotspot/test/runtime/modules/ModuleStress/ModuleSameCLMain.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,14 +34,14 @@ import java.util.Map; import java.util.Set; // -// ClassLoader1 --> defines m1 --> packages p1 -// ClassLoader1 --> defines m2 --> packages p2 +// ClassLoader1 --> defines m1x --> packages p1 +// ClassLoader1 --> defines m2x --> packages p2 // -// m1 can read m2 -// package p2 in m2 is exported to m1 +// m1x can read m2x +// package p2 in m2x is exported to m1x // -// class p1.c1 defined in m1 tries to access p2.c2 defined in m2 -// Access allowed since m1 can read m2 and package p2 is exported to m1. +// class p1.c1 defined in m1x tries to access p2.c2 defined in m2x +// Access allowed since m1x can read m2x and package p2 is exported to m1x. // public class ModuleSameCLMain { @@ -50,45 +50,45 @@ public class ModuleSameCLMain { // publically defined classes within packages of those modules. public void createLayerOnBoot() throws Throwable { - // Define module: m1 - // Can read: java.base, m2 + // Define module: m1x + // Can read: java.base, m2x // Packages: p1 // Packages exported: p1 is exported to unqualifiedly - ModuleDescriptor descriptor_m1 = - ModuleDescriptor.module("m1") + ModuleDescriptor descriptor_m1x = + ModuleDescriptor.newModule("m1x") .requires("java.base") - .requires("m2") + .requires("m2x") .exports("p1") .build(); - // Define module: m2 + // Define module: m2x // Can read: java.base // Packages: p2 - // Packages exported: package p2 is exported to m1 - ModuleDescriptor descriptor_m2 = - ModuleDescriptor.module("m2") + // Packages exported: package p2 is exported to m1x + ModuleDescriptor descriptor_m2x = + ModuleDescriptor.newModule("m2x") .requires("java.base") - .exports("p2", Set.of("m1")) + .exports("p2", Set.of("m1x")) .build(); // Set up a ModuleFinder containing all modules for this layer. - ModuleFinder finder = ModuleLibrary.of(descriptor_m1, descriptor_m2); + ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x); - // Resolves "m1" + // Resolves "m1x" Configuration cf = Layer.boot() .configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of("m1")); + .resolve(finder, ModuleFinder.of(), Set.of("m1x")); // map each module to the same class loader for this test Map map = new HashMap<>(); Loader1 cl1 = new Loader1(); - map.put("m1", cl1); - map.put("m2", cl1); + map.put("m1x", cl1); + map.put("m2x", cl1); - // Create Layer that contains m1 & m2 + // Create Layer that contains m1x & m2x Layer layer = Layer.boot().defineModules(cf, map::get); - assertTrue(layer.findLoader("m1") == cl1); - assertTrue(layer.findLoader("m2") == cl1); + assertTrue(layer.findLoader("m1x") == cl1); + assertTrue(layer.findLoader("m2x") == cl1); assertTrue(layer.findLoader("java.base") == null); // now use the same loader to load class p1.c1 @@ -96,7 +96,7 @@ public class ModuleSameCLMain { try { p1_c1_class.newInstance(); } catch (IllegalAccessError e) { - throw new RuntimeException("Test Failed, an IAE should not be thrown since p2 is exported qualifiedly to m1"); + throw new RuntimeException("Test Failed, an IAE should not be thrown since p2 is exported qualifiedly to m1x"); } } diff --git a/hotspot/test/runtime/modules/ModuleStress/ModuleStress.java b/hotspot/test/runtime/modules/ModuleStress/ModuleStress.java index 2da921d4d8c..83f706d7092 100644 --- a/hotspot/test/runtime/modules/ModuleStress/ModuleStress.java +++ b/hotspot/test/runtime/modules/ModuleStress/ModuleStress.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -83,7 +83,7 @@ public class ModuleStress { InMemoryJavaCompiler.compile("p1.c1", source1), System.getProperty("test.classes")); // Test #2: Load two modules defined to the same customer class loader. - // m1's module readability list and package p2's exportability should + // m1x's module readability list and package p2's exportability should // not be walked at a GC safepoint since both modules are defined to // the same loader and thus have the exact same life cycle. pb = ProcessTools.createJavaProcessBuilder( @@ -97,7 +97,7 @@ public class ModuleStress { .shouldHaveExitValue(0); // Test #3: Load two modules in differing custom class loaders. - // m1's module readability list and package p2's exportability list must + // m1x's module readability list and package p2's exportability list must // be walked at a GC safepoint since both modules are defined to non-builtin // class loaders which could die and thus be unloaded. pb = ProcessTools.createJavaProcessBuilder( @@ -106,15 +106,15 @@ public class ModuleStress { "ModuleNonBuiltinCLMain"); oa = new OutputAnalyzer(pb.start()); - oa.shouldContain("module m1 reads list must be walked") - .shouldContain("package p2 defined in module m2, exports list must be walked") - .shouldNotContain("module m2 reads list must be walked") + oa.shouldContain("module m1x reads list must be walked") + .shouldContain("package p2 defined in module m2x, exports list must be walked") + .shouldNotContain("module m2x reads list must be walked") .shouldHaveExitValue(0); // Test #4: Load two modules in differing custom class loaders, // of which one has been designated as the custom system class loader // via -Djava.system.class.loader=CustomSystemClassLoader. Since - // m3 is defined to the system class loader, m2's module readability + // m3x is defined to the system class loader, m2x's module readability // list does not have to be walked at a GC safepoint, but package p2's // exportability list does. pb = ProcessTools.createJavaProcessBuilder( @@ -124,8 +124,8 @@ public class ModuleStress { "ModuleNonBuiltinCLMain"); oa = new OutputAnalyzer(pb.start()); - oa.shouldContain("package p2 defined in module m2, exports list must be walked") - .shouldNotContain("module m2 reads list must be walked") + oa.shouldContain("package p2 defined in module m2x, exports list must be walked") + .shouldNotContain("module m2x reads list must be walked") .shouldHaveExitValue(0); } diff --git a/hotspot/test/runtime/modules/ModuleStress/src/jdk.test/test/Main.java b/hotspot/test/runtime/modules/ModuleStress/src/jdk.test/test/Main.java index 16e8dbc79e1..6ce8823db25 100644 --- a/hotspot/test/runtime/modules/ModuleStress/src/jdk.test/test/Main.java +++ b/hotspot/test/runtime/modules/ModuleStress/src/jdk.test/test/Main.java @@ -48,7 +48,7 @@ public class Main { Configuration cf = layerBoot .configuration() - .resolveRequires(ModuleFinder.of(), finder, Set.of(MODULE_NAME)); + .resolve(ModuleFinder.of(), finder, Set.of(MODULE_NAME)); Module testModule = Main.class.getModule(); ClassLoader scl = ClassLoader.getSystemClassLoader(); diff --git a/hotspot/test/runtime/modules/ModuleStress/src/jdk.test/test/MainGC.java b/hotspot/test/runtime/modules/ModuleStress/src/jdk.test/test/MainGC.java index 25c121d3625..45e592f9d62 100644 --- a/hotspot/test/runtime/modules/ModuleStress/src/jdk.test/test/MainGC.java +++ b/hotspot/test/runtime/modules/ModuleStress/src/jdk.test/test/MainGC.java @@ -48,7 +48,7 @@ public class MainGC { Configuration cf = layerBoot .configuration() - .resolveRequires(ModuleFinder.of(), finder, Set.of(MODULE_NAME)); + .resolve(ModuleFinder.of(), finder, Set.of(MODULE_NAME)); Module testModule = MainGC.class.getModule(); ClassLoader scl = ClassLoader.getSystemClassLoader(); diff --git a/hotspot/test/runtime/modules/PatchModule/PatchModuleDupModule.java b/hotspot/test/runtime/modules/PatchModule/PatchModuleDupModule.java index f87a582d30a..75489a665fb 100644 --- a/hotspot/test/runtime/modules/PatchModule/PatchModuleDupModule.java +++ b/hotspot/test/runtime/modules/PatchModule/PatchModuleDupModule.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,8 +38,8 @@ public class PatchModuleDupModule { public static void main(String args[]) throws Exception { ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( - "--patch-module=module1=module1_dir", - "--patch-module=module1=module1_dir", + "--patch-module=module_one=module_one_dir", + "--patch-module=module_one=module_one_dir", "-version"); OutputAnalyzer output = new OutputAnalyzer(pb.start()); output.shouldContain("java.lang.ExceptionInInitializerError"); diff --git a/hotspot/test/serviceability/jvmti/GetModulesInfo/JvmtiGetAllModulesTest.java b/hotspot/test/serviceability/jvmti/GetModulesInfo/JvmtiGetAllModulesTest.java index 7c682b5dfa0..dd0105a135f 100644 --- a/hotspot/test/serviceability/jvmti/GetModulesInfo/JvmtiGetAllModulesTest.java +++ b/hotspot/test/serviceability/jvmti/GetModulesInfo/JvmtiGetAllModulesTest.java @@ -82,12 +82,11 @@ public class JvmtiGetAllModulesTest { Asserts.assertEquals(Layer.boot().modules(), getModulesJVMTI()); // Load a new named module - ModuleDescriptor descriptor - = ModuleDescriptor.module(MY_MODULE_NAME).build(); + ModuleDescriptor descriptor = ModuleDescriptor.newModule(MY_MODULE_NAME).build(); ModuleFinder finder = finderOf(descriptor); ClassLoader loader = new ClassLoader() {}; Configuration parent = Layer.boot().configuration(); - Configuration cf = parent.resolveRequires(finder, ModuleFinder.of(), Set.of(MY_MODULE_NAME)); + Configuration cf = parent.resolve(finder, ModuleFinder.of(), Set.of(MY_MODULE_NAME)); Layer my = Layer.boot().defineModules(cf, m -> loader); // Verify that the loaded module is indeed reported by JVMTI From ee816fd1c93ba18a13546221b9e328a0c9c45f41 Mon Sep 17 00:00:00 2001 From: Robert Field Date: Thu, 9 Feb 2017 14:37:42 -0800 Subject: [PATCH 121/447] 8174672: JShell tests: jdk/jshell/UserJdiUserRemoteTest.java problem listed with wrong bug number Reviewed-by: jjg --- langtools/test/ProblemList.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/langtools/test/ProblemList.txt b/langtools/test/ProblemList.txt index 182deac3d0b..f5a6f78e32c 100644 --- a/langtools/test/ProblemList.txt +++ b/langtools/test/ProblemList.txt @@ -36,7 +36,7 @@ jdk/javadoc/doclet/testIOException/TestIOException.java # # jshell -jdk/jshell/UserJdiUserRemoteTest.java 8173204 linux-all +jdk/jshell/UserJdiUserRemoteTest.java 8173079 linux-all jdk/jshell/UserInputTest.java 8169536 generic-all ########################################################################### From 9c79170aed81ea0cd424a4bdd17cdebc3e018d4b Mon Sep 17 00:00:00 2001 From: Vicente Romero Date: Thu, 9 Feb 2017 16:30:30 -0800 Subject: [PATCH 122/447] 8169200: Gen has a reference to Flow that is not used, should be removed Reviewed-by: jjg --- .../share/classes/com/sun/tools/javac/jvm/Gen.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java index 7a9ad623d93..2230fc7579f 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,7 +38,6 @@ import com.sun.tools.javac.code.Symbol.*; import com.sun.tools.javac.code.Type.*; import com.sun.tools.javac.jvm.Code.*; import com.sun.tools.javac.jvm.Items.*; -import com.sun.tools.javac.main.Option; import com.sun.tools.javac.tree.EndPosTable; import com.sun.tools.javac.tree.JCTree.*; @@ -67,10 +66,9 @@ public class Gen extends JCTree.Visitor { private final TreeMaker make; private final Names names; private final Target target; - private Name accessDollar; + private final Name accessDollar; private final Types types; private final Lower lower; - private final Flow flow; private final Annotate annotate; private final StringConcat concat; @@ -95,7 +93,7 @@ public class Gen extends JCTree.Visitor { /** Constant pool, reset by genClass. */ - private Pool pool; + private final Pool pool; protected Gen(Context context) { context.put(genKey, this); @@ -113,7 +111,6 @@ public class Gen extends JCTree.Visitor { methodType = new MethodType(null, null, null, syms.methodClass); accessDollar = names. fromString("access" + target.syntheticNameChar()); - flow = Flow.instance(context); lower = Lower.instance(context); Options options = Options.instance(context); From 11edcefaa2f36eed2362ffc96b3f233e99ffe931 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Thu, 9 Feb 2017 18:09:00 -0800 Subject: [PATCH 123/447] 8174693: Problem list MultiReleaseJarTest.java tests until JDK-8174692 is fixed Reviewed-by: psandoz --- jdk/test/ProblemList.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt index 6df0909bd00..b57afc2298e 100644 --- a/jdk/test/ProblemList.txt +++ b/jdk/test/ProblemList.txt @@ -263,6 +263,9 @@ tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java 8169971 windows- tools/jar/multiRelease/RuntimeTest.java 8173905 generic-all +tools/schemagen/MultiReleaseJarTest.java 8174692 generic-all +tools/wsgen/MultiReleaseJarTest.java 8174692 generic-all + ############################################################################ # jdk_jdi From 6d73f9fae9ff040be6447f2b73687b021029c5bb Mon Sep 17 00:00:00 2001 From: Robert Field Date: Thu, 9 Feb 2017 18:58:36 -0800 Subject: [PATCH 124/447] 8174262: Error message misspelling: "instanciated" Reviewed-by: jjg --- .../jdk/internal/jshell/tool/resources/l10n.properties | 4 ++-- .../jdk.jshell/share/classes/jdk/jshell/execution/Util.java | 2 +- langtools/test/jdk/jshell/ToolSimpleTest.java | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties index b743f15321a..4afc5359073 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties +++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties @@ -845,12 +845,12 @@ startup.feedback = \ /set format verbose action ' update overwrote' overwrote-update \n\ /set format verbose action ' update dropped' dropped-update \n\ \n\ -/set format verbose until ', however, it cannot be instanciated or its methods invoked until' defined-class-primary \n\ +/set format verbose until ', however, it cannot be instantiated or its methods invoked until' defined-class-primary \n\ /set format verbose until ', however, its methods cannot be invoked until' defined-interface-primary \n\ /set format verbose until ', however, it cannot be used until' defined-enum,annotation-primary \n\ /set format verbose until ', however, it cannot be invoked until' defined-method-primary \n\ /set format verbose until ', however, it cannot be referenced until' notdefined-primary \n\ -/set format verbose until ' which cannot be instanciated or its methods invoked until' defined-class-update \n\ +/set format verbose until ' which cannot be instantiated or its methods invoked until' defined-class-update \n\ /set format verbose until ' whose methods cannot be invoked until' defined-interface-update \n\ /set format verbose until ' which cannot be invoked until' defined-method-update \n\ /set format verbose until ' which cannot be referenced until' notdefined-update \n\ diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java index e5e7ea80a56..4005decf440 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java @@ -60,7 +60,7 @@ public class Util { private static final int TAG_CLOSED = 1; private static final int TAG_EXCEPTION = 2; - // never instanciated + // never instantiated private Util() {} /** diff --git a/langtools/test/jdk/jshell/ToolSimpleTest.java b/langtools/test/jdk/jshell/ToolSimpleTest.java index 8655d049ac7..44711345046 100644 --- a/langtools/test/jdk/jshell/ToolSimpleTest.java +++ b/langtools/test/jdk/jshell/ToolSimpleTest.java @@ -23,7 +23,7 @@ /* * @test - * @bug 8153716 8143955 8151754 8150382 8153920 8156910 8131024 8160089 8153897 8167128 8154513 8170015 8170368 8172102 8172103 8165405 8173073 8173848 8174041 8173916 8174028 + * @bug 8153716 8143955 8151754 8150382 8153920 8156910 8131024 8160089 8153897 8167128 8154513 8170015 8170368 8172102 8172103 8165405 8173073 8173848 8174041 8173916 8174028 8174262 * @summary Simple jshell tool tests * @modules jdk.compiler/com.sun.tools.javac.api * jdk.compiler/com.sun.tools.javac.main @@ -504,12 +504,12 @@ public class ToolSimpleTest extends ReplToolTesting { a -> assertCommand(a, "class C extends NONE { int x; }", "| created class C, however, it cannot be referenced until class NONE is declared"), a -> assertCommand(a, "class D { void m() { System.out.println(nada); } }", - "| created class D, however, it cannot be instanciated or its methods invoked until variable nada is declared"), + "| created class D, however, it cannot be instantiated or its methods invoked until variable nada is declared"), a -> assertCommand(a, "/types", "| class C\n" + "| which cannot be referenced until class NONE is declared\n" + "| class D\n" + - "| which cannot be instanciated or its methods invoked until variable nada is declared\n") + "| which cannot be instantiated or its methods invoked until variable nada is declared\n") ); } From 7b93ee904b75e6e635833619eef9aff4e8f77678 Mon Sep 17 00:00:00 2001 From: Sangheon Kim Date: Thu, 9 Feb 2017 19:08:32 -0800 Subject: [PATCH 125/447] 8173013: JVMTI tagged object access needs G1 pre-barrier Add missing G1 pre-barrier at TagObjectCollector::do_entry Reviewed-by: kbarrett, tschatzl --- hotspot/src/share/vm/prims/jvmtiTagMap.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp index b2cf5660865..e90420d03b8 100644 --- a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp +++ b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -51,6 +51,7 @@ #include "services/serviceUtil.hpp" #include "utilities/macros.hpp" #if INCLUDE_ALL_GCS +#include "gc/g1/g1SATBCardTableModRefBS.hpp" #include "gc/parallel/parallelScavengeHeap.hpp" #endif // INCLUDE_ALL_GCS @@ -1534,6 +1535,14 @@ class TagObjectCollector : public JvmtiTagHashmapEntryClosure { if (_tags[i] == entry->tag()) { oop o = entry->object(); assert(o != NULL && Universe::heap()->is_in_reserved(o), "sanity check"); +#if INCLUDE_ALL_GCS + if (UseG1GC) { + // The reference in this tag map could be the only (implicitly weak) + // reference to that object. If we hand it out, we need to keep it live wrt + // SATB marking similar to other j.l.ref.Reference referents. + G1SATBCardTableModRefBS::enqueue(o); + } +#endif jobject ref = JNIHandles::make_local(JavaThread::current(), o); _object_results->append(ref); _tag_results->append((uint64_t)entry->tag()); From ecee7fc84bf9c1975177717d19d39bff084479ee Mon Sep 17 00:00:00 2001 From: Zoltan Majo Date: Fri, 10 Feb 2017 08:16:49 +0100 Subject: [PATCH 126/447] 8173151: Code heap corruption due to incorrect inclusion test Change inclusion test to use CodeBlob::code_begin() for AOT methods and start of CodeBlob otherwise. Added regression test. Reviewed-by: thartmann, dlong, kvn --- hotspot/src/share/vm/aot/aotCodeHeap.hpp | 5 ++ hotspot/src/share/vm/code/codeCache.cpp | 2 +- hotspot/src/share/vm/code/codeCache.hpp | 5 +- hotspot/src/share/vm/memory/heap.cpp | 12 +++ hotspot/src/share/vm/memory/heap.hpp | 4 +- hotspot/src/share/vm/runtime/globals.hpp | 2 +- .../stress/ReturnBlobToWrongHeapTest.java | 89 +++++++++++++++++++ 7 files changed, 113 insertions(+), 6 deletions(-) create mode 100644 hotspot/test/compiler/codecache/stress/ReturnBlobToWrongHeapTest.java diff --git a/hotspot/src/share/vm/aot/aotCodeHeap.hpp b/hotspot/src/share/vm/aot/aotCodeHeap.hpp index 0e0d0038d10..5c803cc0903 100644 --- a/hotspot/src/share/vm/aot/aotCodeHeap.hpp +++ b/hotspot/src/share/vm/aot/aotCodeHeap.hpp @@ -240,6 +240,11 @@ public: assert(result == CodeHeap::contains(p), ""); return result; } + + bool contains_blob(const CodeBlob* blob) const { + return CodeHeap::contains(blob->code_begin()); + } + AOTCompiledMethod* find_aot(address p) const; virtual void* find_start(void* p) const; diff --git a/hotspot/src/share/vm/code/codeCache.cpp b/hotspot/src/share/vm/code/codeCache.cpp index e1a2f6392b0..549535b7aa0 100644 --- a/hotspot/src/share/vm/code/codeCache.cpp +++ b/hotspot/src/share/vm/code/codeCache.cpp @@ -417,7 +417,7 @@ void CodeCache::add_heap(ReservedSpace rs, const char* name, int code_blob_type) CodeHeap* CodeCache::get_code_heap(const CodeBlob* cb) { assert(cb != NULL, "CodeBlob is null"); FOR_ALL_HEAPS(heap) { - if ((*heap)->contains(cb->code_begin())) { + if ((*heap)->contains_blob(cb)) { return *heap; } } diff --git a/hotspot/src/share/vm/code/codeCache.hpp b/hotspot/src/share/vm/code/codeCache.hpp index 99209dc3c66..469ac0af329 100644 --- a/hotspot/src/share/vm/code/codeCache.hpp +++ b/hotspot/src/share/vm/code/codeCache.hpp @@ -304,11 +304,10 @@ template class CodeBlobIterator : public StackObj { // If set to NULL, initialized by first call to next() _code_blob = (CodeBlob*)nm; if (nm != NULL) { - address start = nm->code_begin(); - while(!(*_heap)->contains(start)) { + while(!(*_heap)->contains_blob(_code_blob)) { ++_heap; } - assert((*_heap)->contains(start), "match not found"); + assert((*_heap)->contains_blob(_code_blob), "match not found"); } } diff --git a/hotspot/src/share/vm/memory/heap.cpp b/hotspot/src/share/vm/memory/heap.cpp index 9d2179d5cf7..8db869ca8ce 100644 --- a/hotspot/src/share/vm/memory/heap.cpp +++ b/hotspot/src/share/vm/memory/heap.cpp @@ -190,6 +190,10 @@ void* CodeHeap::allocate(size_t instance_size) { if (block != NULL) { assert(block->length() >= number_of_segments && block->length() < number_of_segments + CodeCacheMinBlockLength, "sanity check"); assert(!block->free(), "must be marked free"); + guarantee((char*) block >= _memory.low_boundary() && (char*) block < _memory.high(), + "The newly allocated block " INTPTR_FORMAT " is not within the heap " + "starting with " INTPTR_FORMAT " and ending with " INTPTR_FORMAT, + p2i(block), p2i(_memory.low_boundary()), p2i(_memory.high())); DEBUG_ONLY(memset((void*)block->allocated_space(), badCodeHeapNewVal, instance_size)); _max_allocated_capacity = MAX2(_max_allocated_capacity, allocated_capacity()); _blob_count++; @@ -204,6 +208,10 @@ void* CodeHeap::allocate(size_t instance_size) { HeapBlock* b = block_at(_next_segment); b->initialize(number_of_segments); _next_segment += number_of_segments; + guarantee((char*) b >= _memory.low_boundary() && (char*) block < _memory.high(), + "The newly allocated block " INTPTR_FORMAT " is not within the heap " + "starting with " INTPTR_FORMAT " and ending with " INTPTR_FORMAT, + p2i(b), p2i(_memory.low_boundary()), p2i(_memory.high())); DEBUG_ONLY(memset((void *)b->allocated_space(), badCodeHeapNewVal, instance_size)); _max_allocated_capacity = MAX2(_max_allocated_capacity, allocated_capacity()); _blob_count++; @@ -219,6 +227,10 @@ void CodeHeap::deallocate(void* p) { // Find start of HeapBlock HeapBlock* b = (((HeapBlock *)p) - 1); assert(b->allocated_space() == p, "sanity check"); + guarantee((char*) b >= _memory.low_boundary() && (char*) b < _memory.high(), + "The block to be deallocated " INTPTR_FORMAT " is not within the heap " + "starting with " INTPTR_FORMAT " and ending with " INTPTR_FORMAT, + p2i(b), p2i(_memory.low_boundary()), p2i(_memory.high())); DEBUG_ONLY(memset((void *)b->allocated_space(), badCodeHeapFreeVal, segments_to_size(b->length()) - sizeof(HeapBlock))); add_to_freelist(b); diff --git a/hotspot/src/share/vm/memory/heap.hpp b/hotspot/src/share/vm/memory/heap.hpp index d75559695e1..6fe3391d6f0 100644 --- a/hotspot/src/share/vm/memory/heap.hpp +++ b/hotspot/src/share/vm/memory/heap.hpp @@ -153,7 +153,9 @@ class CodeHeap : public CHeapObj { char* high() const { return _memory.high(); } char* high_boundary() const { return _memory.high_boundary(); } - virtual bool contains(const void* p) const { return low_boundary() <= p && p < high(); } + virtual bool contains(const void* p) const { return low_boundary() <= p && p < high(); } + virtual bool contains_blob(const CodeBlob* blob) const { return low_boundary() <= (char*) blob && (char*) blob < high(); } + virtual void* find_start(void* p) const; // returns the block containing p or NULL virtual CodeBlob* find_blob_unsafe(void* start) const; size_t alignment_unit() const; // alignment of any block diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp index 5282a6b9e17..8209f62efc6 100644 --- a/hotspot/src/share/vm/runtime/globals.hpp +++ b/hotspot/src/share/vm/runtime/globals.hpp @@ -3374,7 +3374,7 @@ public: "Code cache expansion size (in bytes)") \ range(0, max_uintx) \ \ - develop_pd(uintx, CodeCacheMinBlockLength, \ + diagnostic_pd(uintx, CodeCacheMinBlockLength, \ "Minimum number of segments in a code cache block") \ range(1, 100) \ \ diff --git a/hotspot/test/compiler/codecache/stress/ReturnBlobToWrongHeapTest.java b/hotspot/test/compiler/codecache/stress/ReturnBlobToWrongHeapTest.java new file mode 100644 index 00000000000..52ccab6aff8 --- /dev/null +++ b/hotspot/test/compiler/codecache/stress/ReturnBlobToWrongHeapTest.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test ReturnBlobToWrongHeapTest + * @key stress + * @summary Test if VM attempts to return code blobs to an incorrect code heap or to outside of the code cache. + * @library /test/lib / + * @modules java.base/jdk.internal.misc + * java.management + * + * @build sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox + * sun.hotspot.WhiteBox$WhiteBoxPermission + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions + * -XX:+WhiteBoxAPI + * -XX:CompileCommand=dontinline,compiler.codecache.stress.Helper$TestCase::method + * -XX:+SegmentedCodeCache + * -XX:ReservedCodeCacheSize=16M + * -XX:CodeCacheMinBlockLength=1 + * compiler.codecache.stress.ReturnBlobToWrongHeapTest + */ + +package compiler.codecache.stress; + +import sun.hotspot.code.BlobType; + +import java.util.ArrayList; + +public class ReturnBlobToWrongHeapTest { + private static final long largeBlobSize = Helper.WHITE_BOX.getUintxVMFlag("ReservedCodeCacheSize") >> 6; + private static final long codeCacheMinBlockLength = Helper.WHITE_BOX.getUintxVMFlag("CodeCacheMinBlockLength"); + private static final BlobType[] BLOB_TYPES = BlobType.getAvailable().toArray(new BlobType[0]); + + // Allocate blob in first code heap (the code heap with index 0). + private static long allocate(int size) { + return Helper.WHITE_BOX.allocateCodeBlob(size, BLOB_TYPES[0].id); + } + + // Free blob. + private static void free(long address) { + Helper.WHITE_BOX.freeCodeBlob(address); + } + + public static void main(String[] args) { + if (codeCacheMinBlockLength == 1) { + // Fill first code heap with large blobs until allocation fails. + long address; + while ((address = allocate((int)largeBlobSize)) != 0) { + } + + // Allocate segment-sized blocks in first code heap. + long lastSegmentSizedAddress = 0; // Address of the last segment-sized blob allocated + while ((address = allocate(0)) != 0) { + lastSegmentSizedAddress = address; + } + + if (lastSegmentSizedAddress == 0) { + throw new RuntimeException("Test failed: Not possible to allocate segment-sized blob"); + } + + // Remove last segment-sized block from the first code heap. + free(lastSegmentSizedAddress); + } else { + throw new RuntimeException("Test requires CodeCacheMinBlockLength==1; CodeCacheMinBlockLength is " + + codeCacheMinBlockLength); + } + } +} From bfe5d05b1c7b4c887b40902c765d852a9f496059 Mon Sep 17 00:00:00 2001 From: Xueming Shen Date: Sat, 11 Feb 2017 21:31:43 -0800 Subject: [PATCH 127/447] 8165640: Enhance jar tool to allow module-info in versioned directories but not in base in modular multi-release jar files Reviewed-by: psandoz, mchung --- .../share/classes/sun/tools/jar/Main.java | 47 ++++--- .../classes/sun/tools/jar/Validator.java | 130 +++++++++--------- jdk/test/tools/jar/mmrjar/Basic.java | 24 ++-- jdk/test/tools/jar/modularJar/Basic.java | 56 +++++++- .../modularJar/src/baz/jdk/test/baz/Baz.java | 34 +++++ 5 files changed, 192 insertions(+), 99 deletions(-) create mode 100644 jdk/test/tools/jar/modularJar/src/baz/jdk/test/baz/Baz.java diff --git a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/Main.java b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/Main.java index e0d617bd029..ecfae238f24 100644 --- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/Main.java +++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/Main.java @@ -158,7 +158,7 @@ public class Main { static final String MANIFEST_DIR = "META-INF/"; static final String VERSIONS_DIR = MANIFEST_DIR + "versions/"; static final String VERSION = "1.0"; - + static final int VERSIONS_DIR_LENGTH = VERSIONS_DIR.length(); private static ResourceBundle rsrc; /** @@ -681,7 +681,7 @@ public class Main { void addPackageIfNamed(Set packages, String name) { if (name.startsWith(VERSIONS_DIR)) { // trim the version dir prefix - int i0 = VERSIONS_DIR.length(); + int i0 = VERSIONS_DIR_LENGTH; int i = name.indexOf('/', i0); if (i <= 0) { warn(formatMsg("warn.release.unexpected.versioned.entry", name)); @@ -1727,12 +1727,16 @@ public class Main { private boolean printModuleDescriptor(ZipFile zipFile) throws IOException { - ZipEntry entry = zipFile.getEntry(MODULE_INFO); - if (entry == null) + ZipEntry[] zes = zipFile.stream() + .filter(e -> isModuleInfoEntry(e.getName())) + .sorted(Validator.ENTRY_COMPARATOR) + .toArray(ZipEntry[]::new); + if (zes.length == 0) return false; - - try (InputStream is = zipFile.getInputStream(entry)) { - printModuleDescriptor(is); + for (ZipEntry ze : zes) { + try (InputStream is = zipFile.getInputStream(ze)) { + printModuleDescriptor(is, ze.getName()); + } } return true; } @@ -1742,16 +1746,23 @@ public class Main { { try (BufferedInputStream bis = new BufferedInputStream(fis); ZipInputStream zis = new ZipInputStream(bis)) { - ZipEntry e; while ((e = zis.getNextEntry()) != null) { - if (e.getName().equals(MODULE_INFO)) { - printModuleDescriptor(zis); - return true; + String ename = e.getName(); + if (isModuleInfoEntry(ename)){ + moduleInfos.put(ename, zis.readAllBytes()); } } } - return false; + if (moduleInfos.size() == 0) + return false; + String[] names = moduleInfos.keySet().stream() + .sorted(Validator.ENTRYNAME_COMPARATOR) + .toArray(String[]::new); + for (String name : names) { + printModuleDescriptor(new ByteArrayInputStream(moduleInfos.get(name)), name); + } + return true; } static String toString(Collection set) { @@ -1760,7 +1771,7 @@ public class Main { .collect(joining(" ")); } - private void printModuleDescriptor(InputStream entryInputStream) + private void printModuleDescriptor(InputStream entryInputStream, String ename) throws IOException { ModuleInfo.Attributes attrs = ModuleInfo.read(entryInputStream, null); @@ -1768,10 +1779,12 @@ public class Main { ModuleHashes hashes = attrs.recordedHashes(); StringBuilder sb = new StringBuilder(); - sb.append("\n"); + sb.append("\nmodule ") + .append(md.toNameAndVersion()) + .append(" (").append(ename).append(")"); + if (md.isOpen()) - sb.append("open "); - sb.append(md.toNameAndVersion()); + sb.append("\n open "); md.requires().stream() .sorted(Comparator.comparing(Requires::name)) @@ -1879,7 +1892,7 @@ public class Main { if (end == 0) return true; if (name.startsWith(VERSIONS_DIR)) { - int off = VERSIONS_DIR.length(); + int off = VERSIONS_DIR_LENGTH; if (off == end) // meta-inf/versions/module-info.class return false; while (off < end - 1) { diff --git a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/Validator.java b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/Validator.java index 691fd7770bd..491d09380fd 100644 --- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/Validator.java +++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/Validator.java @@ -49,6 +49,7 @@ import java.util.zip.ZipEntry; import static java.util.jar.JarFile.MANIFEST_NAME; import static sun.tools.jar.Main.VERSIONS_DIR; +import static sun.tools.jar.Main.VERSIONS_DIR_LENGTH; import static sun.tools.jar.Main.MODULE_INFO; import static sun.tools.jar.Main.getMsg; import static sun.tools.jar.Main.formatMsg; @@ -59,19 +60,19 @@ import static sun.tools.jar.Main.isModuleInfoEntry; final class Validator { private final static boolean DEBUG = Boolean.getBoolean("jar.debug"); private final Map fps = new HashMap<>(); - private static final int vdlen = VERSIONS_DIR.length(); private final Main main; private final JarFile jf; private int oldVersion = -1; private String currentTopLevelName; private boolean isValid = true; - private Set concealedPkgs; + private Set concealedPkgs = Collections.emptySet(); private ModuleDescriptor md; + private String mdName; private Validator(Main main, JarFile jf) { this.main = main; this.jf = jf; - loadModuleDescriptor(); + checkModuleDescriptor(MODULE_INFO); } static boolean validate(Main main, JarFile jf) throws IOException { @@ -83,7 +84,7 @@ final class Validator { jf.stream() .filter(e -> !e.isDirectory() && !e.getName().equals(MANIFEST_NAME)) - .sorted(entryComparator) + .sorted(ENTRY_COMPARATOR) .forEachOrdered(e -> validate(e)); return isValid; } catch (InvalidJarException e) { @@ -102,9 +103,8 @@ final class Validator { // sort base entries before versioned entries, and sort entry classes with // nested classes so that the top level class appears before the associated // nested class - private static Comparator entryComparator = (je1, je2) -> { - String s1 = je1.getName(); - String s2 = je2.getName(); + static Comparator ENTRYNAME_COMPARATOR = (s1, s2) -> { + if (s1.equals(s2)) return 0; boolean b1 = s1.startsWith(VERSIONS_DIR); boolean b2 = s2.startsWith(VERSIONS_DIR); @@ -140,6 +140,9 @@ final class Validator { return l1 - l2; }; + static Comparator ENTRY_COMPARATOR = + Comparator.comparing(ZipEntry::getName, ENTRYNAME_COMPARATOR); + /* * Validator has state and assumes entries provided to accept are ordered * from base entries first and then through the versioned entries in @@ -158,24 +161,25 @@ final class Validator { // validate the versioned module-info if (isModuleInfoEntry(entryName)) { - if (entryName.length() != MODULE_INFO.length()) - checkModuleDescriptor(je); + if (!entryName.equals(mdName)) + checkModuleDescriptor(entryName); return; } // figure out the version and basename from the JarEntry int version; String basename; + String versionStr = null;; if (entryName.startsWith(VERSIONS_DIR)) { - int n = entryName.indexOf("/", vdlen); + int n = entryName.indexOf("/", VERSIONS_DIR_LENGTH); if (n == -1) { error(formatMsg("error.validator.version.notnumber", entryName)); isValid = false; return; } - String v = entryName.substring(vdlen, n); + versionStr = entryName.substring(VERSIONS_DIR_LENGTH, n); try { - version = Integer.parseInt(v); + version = Integer.parseInt(versionStr); } catch (NumberFormatException x) { error(formatMsg("error.validator.version.notnumber", entryName)); isValid = false; @@ -196,6 +200,11 @@ final class Validator { if (oldVersion != version) { oldVersion = version; currentTopLevelName = null; + if (md == null && versionStr != null) { + // don't have a base module-info.class yet, try to see if + // a versioned one exists + checkModuleDescriptor(VERSIONS_DIR + versionStr + "/" + MODULE_INFO); + } } // analyze the entry, keeping key attributes @@ -308,61 +317,52 @@ final class Validator { return; } - private void loadModuleDescriptor() { - ZipEntry je = jf.getEntry(MODULE_INFO); - if (je != null) { - try (InputStream jis = jf.getInputStream(je)) { - md = ModuleDescriptor.read(jis); - concealedPkgs = new HashSet<>(md.packages()); - md.exports().stream().map(Exports::source).forEach(concealedPkgs::remove); - md.opens().stream().map(Opens::source).forEach(concealedPkgs::remove); - return; - } catch (Exception x) { - error(x.getMessage() + " : " + je.getName()); - this.isValid = false; - } - } - md = null; - concealedPkgs = Collections.emptySet(); - } - - private static boolean isPlatformModule(String name) { - return name.startsWith("java.") || name.startsWith("jdk."); - } - /** * Checks whether or not the given versioned module descriptor's attributes - * are valid when compared against the root module descriptor. + * are valid when compared against the root/base module descriptor. * - * A versioned module descriptor must be identical to the root module + * A versioned module descriptor must be identical to the root/base module * descriptor, with two exceptions: * - A versioned descriptor can have different non-public `requires` * clauses of platform ( `java.*` and `jdk.*` ) modules, and * - A versioned descriptor can have different `uses` clauses, even of * service types defined outside of the platform modules. */ - private void checkModuleDescriptor(JarEntry je) { - try (InputStream is = jf.getInputStream(je)) { - ModuleDescriptor root = this.md; - ModuleDescriptor md = null; - try { - md = ModuleDescriptor.read(is); - } catch (InvalidModuleDescriptorException x) { - error(x.getMessage()); - isValid = false; - return; - } - if (root == null) { - this.md = md; - } else { - if (!root.name().equals(md.name())) { + private void checkModuleDescriptor(String miName) { + ZipEntry je = jf.getEntry(miName); + if (je != null) { + try (InputStream jis = jf.getInputStream(je)) { + ModuleDescriptor md = ModuleDescriptor.read(jis); + // Initialize the base md if it's not yet. A "base" md can be either the + // root module-info.class or the first versioned module-info.class + ModuleDescriptor base = this.md; + + if (base == null) { + concealedPkgs = new HashSet<>(md.packages()); + md.exports().stream().map(Exports::source).forEach(concealedPkgs::remove); + md.opens().stream().map(Opens::source).forEach(concealedPkgs::remove); + // must have the implementation class of the services it 'provides'. + if (md.provides().stream().map(Provides::providers) + .flatMap(List::stream) + .filter(p -> jf.getEntry(toBinaryName(p)) == null) + .peek(p -> error(formatMsg("error.missing.provider", p))) + .count() != 0) { + isValid = false; + return; + } + this.md = md; + this.mdName = miName; + return; + } + + if (!base.name().equals(md.name())) { error(getMsg("error.validator.info.name.notequal")); isValid = false; } - if (!root.requires().equals(md.requires())) { - Set rootRequires = root.requires(); + if (!base.requires().equals(md.requires())) { + Set baseRequires = base.requires(); for (Requires r : md.requires()) { - if (rootRequires.contains(r)) + if (baseRequires.contains(r)) continue; if (r.modifiers().contains(Requires.Modifier.TRANSITIVE)) { error(getMsg("error.validator.info.requires.transitive")); @@ -372,7 +372,7 @@ final class Validator { isValid = false; } } - for (Requires r : rootRequires) { + for (Requires r : baseRequires) { Set mdRequires = md.requires(); if (mdRequires.contains(r)) continue; @@ -382,33 +382,37 @@ final class Validator { } } } - if (!root.exports().equals(md.exports())) { + if (!base.exports().equals(md.exports())) { error(getMsg("error.validator.info.exports.notequal")); isValid = false; } - if (!root.opens().equals(md.opens())) { + if (!base.opens().equals(md.opens())) { error(getMsg("error.validator.info.opens.notequal")); isValid = false; } - if (!root.provides().equals(md.provides())) { + if (!base.provides().equals(md.provides())) { error(getMsg("error.validator.info.provides.notequal")); isValid = false; } - if (!root.mainClass().equals(md.mainClass())) { + if (!base.mainClass().equals(md.mainClass())) { error(formatMsg("error.validator.info.manclass.notequal", je.getName())); isValid = false; } - if (!root.version().equals(md.version())) { + if (!base.version().equals(md.version())) { error(formatMsg("error.validator.info.version.notequal", je.getName())); isValid = false; } + } catch (Exception x) { + error(x.getMessage() + " : " + miName); + this.isValid = false; } - } catch (IOException x) { - error(x.getMessage()); - isValid = false; } } + private static boolean isPlatformModule(String name) { + return name.startsWith("java.") || name.startsWith("jdk."); + } + private boolean checkInternalName(String entryName, String basename, String internalName) { String className = className(basename); if (internalName.equals(className)) { diff --git a/jdk/test/tools/jar/mmrjar/Basic.java b/jdk/test/tools/jar/mmrjar/Basic.java index 0e83508b74d..5716d53ac65 100644 --- a/jdk/test/tools/jar/mmrjar/Basic.java +++ b/jdk/test/tools/jar/mmrjar/Basic.java @@ -268,7 +268,7 @@ public class Basic { actual = lines(outbytes); expected = Set.of( - "hi", + "module hi (module-info.class)", "requires mandated java.base", "contains p", "contains p.internal" @@ -304,7 +304,7 @@ public class Basic { actual = lines(outbytes); expected = Set.of( - "hi", + "module hi (module-info.class)", "requires mandated java.base", "contains p", "contains p.internal", @@ -396,18 +396,18 @@ public class Basic { Paths.get("test7-v10", "module-info.class")); int rc = jar("--create --file mmr.jar --main-class=p.Main -C test7 . --release 9 -C test7-v9 . --release 10 -C test7-v10 ."); - -System.out.println("-----------------------"); -System.out.println( new String(errbytes.toByteArray())); - - Assert.assertEquals(rc, 0); - - jar("-tf mmr.jar"); - -System.out.println("-----------------------"); -System.out.println( new String(outbytes.toByteArray())); + jar("-d --file=mmr.jar"); + System.out.println("-----------------------"); + System.out.println( new String(outbytes.toByteArray())); + Assert.assertEquals(lines(outbytes), + Set.of( + "module m1 (META-INF/versions/9/module-info.class)", + "module m1 (META-INF/versions/10/module-info.class)", + "requires mandated java.base", + "exports p", + "main-class p.Main")); Optional exp = Optional.of("p.Main"); try (ZipFile zf = new ZipFile("mmr.jar")) { diff --git a/jdk/test/tools/jar/modularJar/Basic.java b/jdk/test/tools/jar/modularJar/Basic.java index 497853b769e..c45188cad9b 100644 --- a/jdk/test/tools/jar/modularJar/Basic.java +++ b/jdk/test/tools/jar/modularJar/Basic.java @@ -46,7 +46,7 @@ import static java.lang.System.out; /* * @test - * @bug 8167328 8171830 + * @bug 8167328 8171830 8165640 * @library /lib/testlibrary * @modules jdk.compiler * jdk.jartool @@ -241,11 +241,6 @@ public class Basic { java(mp, FOO.moduleName + "/" + FOO.mainClass) .assertSuccess() -.resultChecker(r -> { - System.out.println("==================================="); - System.out.println(r.output); - System.out.println("==================================="); -}) .resultChecker(r -> assertModuleData(r, FOO)); try (InputStream fis = Files.newInputStream(modularJar); JarInputStream jis = new JarInputStream(fis)) { @@ -484,7 +479,7 @@ public class Basic { .resultChecker(r -> { // Expect similar output: "bar, requires mandated foo, ... // conceals jdk.test.foo, conceals jdk.test.foo.internal" - Pattern p = Pattern.compile("\\s+bar\\s+requires\\s++foo"); + Pattern p = Pattern.compile("module bar \\(module-info.class\\)\\s+requires\\s++foo"); assertTrue(p.matcher(r.output).find(), "Expecting to find \"bar, requires foo,...\"", "in output, but did not: [" + r.output + "]"); @@ -739,6 +734,53 @@ public class Basic { .assertSuccess(); } + @Test + public void servicesCreateWithoutFailureNonRootMRMJAR() throws IOException { + // without a root module-info.class + Path mp = Paths.get("servicesCreateWithoutFailureNonRootMRMJAR"); + createTestDir(mp); + Path modClasses = MODULE_CLASSES.resolve("baz"); + Path mrjarDir = MRJAR_DIR.resolve("baz"); + Path modularJar = mp.resolve("baz.jar"); + + jar("--create", + "--file=" + modularJar.toString(), + "--main-class=" + "jdk.test.baz.Baz", + "-m", mrjarDir.resolve("META-INF/MANIFEST.MF").toRealPath().toString(), + "-C", mrjarDir.toString(), "META-INF/versions/9/module-info.class", + "-C", modClasses.toString(), "jdk/test/baz/BazService.class", + "-C", modClasses.toString(), "jdk/test/baz/Baz.class", + "-C", modClasses.toString(), "jdk/test/baz/internal/BazServiceImpl.class") + .assertSuccess(); + + + for (String option : new String[] {"--print-module-descriptor", "-d" }) { + + jar(option, + "--file=" + modularJar.toString()) + .assertSuccess() + .resultChecker(r -> + assertTrue(r.output.contains("main-class jdk.test.baz.Baz"), + "Expected to find ", "main-class jdk.test.baz.Baz", + " in [", r.output, "]")); + + jarWithStdin(modularJar.toFile(), option) + .assertSuccess() + .resultChecker(r -> + assertTrue(r.output.contains("main-class jdk.test.baz.Baz"), + "Expected to find ", "main-class jdk.test.baz.Baz", + " in [", r.output, "]")); + + } + // run module maain class + java(mp, "baz/jdk.test.baz.Baz") + .assertSuccess() + .resultChecker(r -> + assertTrue(r.output.contains("mainClass:jdk.test.baz.Baz"), + "Expected to find ", "mainClass:jdk.test.baz.Baz", + " in [", r.output, "]")); + } + @Test public void exportCreateWithMissingPkg() throws IOException { diff --git a/jdk/test/tools/jar/modularJar/src/baz/jdk/test/baz/Baz.java b/jdk/test/tools/jar/modularJar/src/baz/jdk/test/baz/Baz.java new file mode 100644 index 00000000000..e2bb5a3e4fa --- /dev/null +++ b/jdk/test/tools/jar/modularJar/src/baz/jdk/test/baz/Baz.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.test.baz; + +import java.lang.module.ModuleDescriptor; + +public class Baz { + public static void main(String[] args) { + ModuleDescriptor md = Baz.class.getModule().getDescriptor(); + System.out.println("nameAndVersion:" + md.toNameAndVersion()); + md.mainClass().ifPresent(mc -> System.out.println("mainClass:" + mc)); + } +} From 9d0a07ff25be2ac6c03280a03878499df87b77eb Mon Sep 17 00:00:00 2001 From: Mandy Chung Date: Sun, 12 Feb 2017 16:45:00 -0800 Subject: [PATCH 128/447] 8174740: RuntimeException: Module m's descriptor returns inconsistent package set Reviewed-by: alanb --- .../internal/plugins/SystemModulesPlugin.java | 105 ++++++++++++------ .../UserModuleTest.java | 4 +- .../src/m1/module-info.java | 6 +- 3 files changed, 77 insertions(+), 38 deletions(-) diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java index 14cd3f501a4..c5819a65f08 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -46,11 +46,16 @@ import java.util.TreeSet; import java.util.function.IntSupplier; import jdk.internal.module.Checks; +import jdk.internal.module.ClassFileAttributes; +import jdk.internal.module.ClassFileConstants; import jdk.internal.module.ModuleHashes; import jdk.internal.module.ModuleInfo.Attributes; import jdk.internal.module.ModuleInfoExtender; import jdk.internal.module.ModuleResolution; import jdk.internal.module.SystemModules; +import jdk.internal.org.objectweb.asm.Attribute; +import jdk.internal.org.objectweb.asm.ClassReader; +import jdk.internal.org.objectweb.asm.ClassVisitor; import jdk.internal.org.objectweb.asm.ClassWriter; import jdk.internal.org.objectweb.asm.MethodVisitor; import jdk.internal.org.objectweb.asm.Opcodes; @@ -108,6 +113,11 @@ public final class SystemModulesPlugin implements Plugin { return true; } + @Override + public String getArgumentsDescription() { + return PluginsResourceBundle.getArgument(NAME); + } + @Override public void configure(Map config) { String arg = config.get(NAME); @@ -171,10 +181,11 @@ public final class SystemModulesPlugin implements Plugin { } static class ModuleInfo { + private final ByteArrayInputStream bain; private final Attributes attrs; private final Set packages; - private final ByteArrayInputStream bain; private final boolean dropModuleTarget; + private final boolean addModulePackages; private ModuleDescriptor descriptor; // may be different that the original one ModuleInfo(byte[] bytes, Set packages, boolean dropModuleTarget) @@ -182,15 +193,21 @@ public final class SystemModulesPlugin implements Plugin { { this.bain = new ByteArrayInputStream(bytes); this.packages = packages; - this.attrs = jdk.internal.module.ModuleInfo.read(bain, null); + // If ModulePackages attribute is present, the packages from this + // module descriptor returns the packages in that attribute. + // If it's not present, ModuleDescriptor::packages only contains + // the exported and open packages from module-info.class this.descriptor = attrs.descriptor(); if (descriptor.isAutomatic()) { throw new InternalError("linking automatic module is not supported"); } + // add ModulePackages attribute if this module contains some packages + // and ModulePackages is not present + this.addModulePackages = packages.size() > 0 && !hasModulePackages(); + // drop target attribute only if any OS property is present if (dropModuleTarget) { - // drop target attribute only if any OS property is present this.dropModuleTarget = descriptor.osName().isPresent() || descriptor.osArch().isPresent() || @@ -276,53 +293,71 @@ public final class SystemModulesPlugin implements Plugin { } } + boolean hasModulePackages() throws IOException { + Set attrTypes = new HashSet<>(); + ClassVisitor cv = new ClassVisitor(Opcodes.ASM5) { + @Override + public void visitAttribute(Attribute attr) { + attrTypes.add(attr.type); + } + }; + + // prototype of attributes that should be parsed + Attribute[] attrs = new Attribute[] { + new ClassFileAttributes.ModulePackagesAttribute() + }; + + try (InputStream in = getInputStream()) { + // parse module-info.class + ClassReader cr = new ClassReader(in); + cr.accept(cv, attrs, 0); + return attrTypes.contains(ClassFileConstants.MODULE_PACKAGES); + } + } + /** * Returns true if module-info.class should be written * 1. add ModulePackages attribute if not present; or * 2. drop ModuleTarget attribute except java.base */ boolean shouldRewrite() { - return shouldAddModulePackages() || shouldDropModuleTarget(); - } - - boolean shouldAddModulePackages() { - return (descriptor.packages().isEmpty() && packages.size() > 0); - } - - boolean shouldDropModuleTarget() { - return dropModuleTarget && - (descriptor.osName().isPresent() || - descriptor.osArch().isPresent() || - descriptor.osVersion().isPresent()); + return addModulePackages || dropModuleTarget; } /** * Returns the bytes for the module-info.class with ModulePackages - * if it contains at least one package + * attribute added and/or with ModuleTarget attribute dropped. */ byte[] getBytes() throws IOException { - bain.reset(); - - // add ModulePackages attribute if not exist - if (shouldRewrite()) { - ModuleInfoRewriter rewriter = new ModuleInfoRewriter(bain); - if (shouldAddModulePackages()) { - rewriter.addModulePackages(packages); + try (InputStream in = getInputStream()) { + if (shouldRewrite()) { + ModuleInfoRewriter rewriter = new ModuleInfoRewriter(in); + if (addModulePackages) { + rewriter.addModulePackages(packages); + } + if (dropModuleTarget) { + rewriter.dropModuleTarget(); + } + // rewritten module descriptor + byte[] bytes = rewriter.getBytes(); + try (ByteArrayInputStream bain = new ByteArrayInputStream(bytes)) { + this.descriptor = ModuleDescriptor.read(bain); + } + return bytes; + } else { + return in.readAllBytes(); } - if (shouldDropModuleTarget()) { - rewriter.dropModuleTarget(); - } - // rewritten module descriptor - byte[] bytes = rewriter.getBytes(); - try (ByteArrayInputStream bain = new ByteArrayInputStream(bytes)) { - this.descriptor = ModuleDescriptor.read(bain); - } - return bytes; - } else { - return bain.readAllBytes(); } } + /* + * Returns the input stream of the module-info.class + */ + InputStream getInputStream() { + bain.reset(); + return bain; + } + class ModuleInfoRewriter extends ByteArrayOutputStream { final ModuleInfoExtender extender; ModuleInfoRewriter(InputStream in) { diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java index 3c58d2a3e6d..81f0320b32c 100644 --- a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -45,7 +45,7 @@ import static org.testng.Assert.*; /** * @test - * @bug 8142968 8173381 + * @bug 8142968 8173381 8174740 * @library /lib/testlibrary * @modules jdk.compiler jdk.jlink * @build UserModuleTest CompilerUtils jdk.testlibrary.FileUtils jdk.testlibrary.ProcessTools diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m1/module-info.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m1/module-info.java index f6ecf6b2bf5..870680b482c 100644 --- a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m1/module-info.java +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m1/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,5 +21,9 @@ * questions. */ +/* + * m1 has an exported package and also internal package + */ module m1 { + exports p1; } From 73a2915d5799a6478f97e05dbe04db71c996a2f4 Mon Sep 17 00:00:00 2001 From: Sergei Kovalev Date: Fri, 10 Feb 2017 11:00:41 +0300 Subject: [PATCH 129/447] 8174194: Several java/lang tests failing due to undeclared module dependencies Reviewed-by: dfuchs, mchung --- .../SecurityManager/CheckPackageAccess.java | 35 ++++++++++++------- .../WithClassLoaderName.java | 3 +- .../LFCaching/LFMultiThreadCachingTest.java | 4 +-- .../LFCaching/LFSingleThreadCachingTest.java | 3 +- .../DefaultManagementProviderTest.java | 3 +- .../PublicMethods/PublicMethodsTest.java | 3 ++ 6 files changed, 33 insertions(+), 18 deletions(-) diff --git a/jdk/test/java/lang/SecurityManager/CheckPackageAccess.java b/jdk/test/java/lang/SecurityManager/CheckPackageAccess.java index 1cf7c484f29..1df260bc412 100644 --- a/jdk/test/java/lang/SecurityManager/CheckPackageAccess.java +++ b/jdk/test/java/lang/SecurityManager/CheckPackageAccess.java @@ -33,6 +33,7 @@ import java.lang.module.ModuleFinder; import java.lang.module.ModuleReference; +import java.lang.reflect.Layer; import java.util.Arrays; import java.util.List; import java.util.Optional; @@ -80,25 +81,33 @@ public class CheckPackageAccess { } void test() { - System.out.println("Testing module " + moduleName); + final boolean isModulePresent = + Layer.boot().findModule(moduleName).isPresent(); + System.out.format("Testing module: %1$s. Module is%2$s present.\n", + moduleName, isModulePresent ? "" : " NOT"); - // access to exported pkg should pass - testNonRestricted(exports); + if (isModulePresent) { - // access to opened pkg should pass - opens.ifPresent(Test::testNonRestricted); + // access to exported pkg should pass + testNonRestricted(exports); - // access to concealed pkg should fail - testRestricted(conceals); + // access to opened pkg should pass + opens.ifPresent(Test::testNonRestricted); - // access to qualified export pkg should fail - qualExports.ifPresent(Test::testRestricted); + // access to concealed pkg should fail + testRestricted(conceals); - // access to qualified open pkg should fail - qualOpens.ifPresent(Test::testRestricted); + // access to qualified export pkg should fail + qualExports.ifPresent(Test::testRestricted); - // access to qualified opened pkg that is also exported should pass - qualOpensAndExports.ifPresent(Test::testNonRestricted); + // access to qualified open pkg should fail + qualOpens.ifPresent(Test::testRestricted); + + // access to qualified opened pkg that is also exported should pass + qualOpensAndExports.ifPresent(Test::testNonRestricted); + } else { + System.out.println("Skipping tests for module."); + } } private static void testRestricted(String pkg) { diff --git a/jdk/test/java/lang/StackTraceElement/WithClassLoaderName.java b/jdk/test/java/lang/StackTraceElement/WithClassLoaderName.java index 85f21555b4d..c58e9d6a326 100644 --- a/jdk/test/java/lang/StackTraceElement/WithClassLoaderName.java +++ b/jdk/test/java/lang/StackTraceElement/WithClassLoaderName.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,7 @@ * @bug 6479237 * @summary Basic test StackTraceElement with class loader names * @library lib /lib/testlibrary + * @modules jdk.compiler * @build m1/* WithClassLoaderName * @run main/othervm m1/com.app.Main * @run main/othervm WithClassLoaderName diff --git a/jdk/test/java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java b/jdk/test/java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java index d453caf18f8..84e1dd54ffe 100644 --- a/jdk/test/java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java +++ b/jdk/test/java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,7 +30,7 @@ * @library /lib/testlibrary/jsr292 /lib/testlibrary * @modules java.base/java.lang.invoke:open * java.base/java.lang.ref:open - * jdk.management + * java.management * @build TestMethods * @build LambdaFormTestCase * @build LFCachingTestCase diff --git a/jdk/test/java/lang/invoke/LFCaching/LFSingleThreadCachingTest.java b/jdk/test/java/lang/invoke/LFCaching/LFSingleThreadCachingTest.java index bef4d5ebc27..bc674b0dbd2 100644 --- a/jdk/test/java/lang/invoke/LFCaching/LFSingleThreadCachingTest.java +++ b/jdk/test/java/lang/invoke/LFCaching/LFSingleThreadCachingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,6 +30,7 @@ * @library /lib/testlibrary/jsr292 /lib/testlibrary * @modules java.base/java.lang.ref:open * java.base/java.lang.invoke:open + * java.management * @build TestMethods * @build LambdaFormTestCase * @build LFCachingTestCase diff --git a/jdk/test/java/lang/management/ManagementFactory/DefaultManagementProviderTest.java b/jdk/test/java/lang/management/ManagementFactory/DefaultManagementProviderTest.java index 70c41098eb3..e9ccd515a88 100644 --- a/jdk/test/java/lang/management/ManagementFactory/DefaultManagementProviderTest.java +++ b/jdk/test/java/lang/management/ManagementFactory/DefaultManagementProviderTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,7 @@ * @bug 8151099 * @summary Verify platform MXBeans initialized properly with java.management * module only. No other management provider + * @modules java.management * @run main/othervm --limit-modules=java.management DefaultManagementProviderTest */ import java.lang.management.ManagementFactory; diff --git a/jdk/test/java/lang/reflect/PublicMethods/PublicMethodsTest.java b/jdk/test/java/lang/reflect/PublicMethods/PublicMethodsTest.java index 0859c8d7747..875ca637cd3 100644 --- a/jdk/test/java/lang/reflect/PublicMethods/PublicMethodsTest.java +++ b/jdk/test/java/lang/reflect/PublicMethods/PublicMethodsTest.java @@ -57,6 +57,9 @@ import static java.util.stream.Collectors.toMap; /* * @test * @bug 8062389 + * @modules java.compiler + * jdk.compiler + * jdk.zipfs * @summary Nearly exhaustive test of Class.getMethod() and Class.getMethods() * @run main PublicMethodsTest */ From 24827583cc160b367de762432d262b46fd86172d Mon Sep 17 00:00:00 2001 From: Prasanta Sadhukhan Date: Fri, 10 Feb 2017 13:32:11 +0530 Subject: [PATCH 130/447] 8147002: [macosx] Arabic character cannot be rendered on MacOS X Co-authored-by: Prahalad Narayanan Reviewed-by: prr, pnarayanan, jdv --- .../macosx/classes/sun/font/CFont.java | 6 +- .../awt/font/Fallback/MissingGlyphTest.java | 162 ++++++++++++++++++ 2 files changed, 167 insertions(+), 1 deletion(-) create mode 100644 jdk/test/java/awt/font/Fallback/MissingGlyphTest.java diff --git a/jdk/src/java.desktop/macosx/classes/sun/font/CFont.java b/jdk/src/java.desktop/macosx/classes/sun/font/CFont.java index 049dbb58619..c8c3f5b1fae 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/font/CFont.java +++ b/jdk/src/java.desktop/macosx/classes/sun/font/CFont.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -211,6 +211,10 @@ public final class CFont extends PhysicalFont implements FontSubstitution { ArrayList listOfString = new ArrayList(); getCascadeList(nativeFontPtr, listOfString); + // add JRE "Lucida Sans Regular" to the cascade list to enable fallback + // to happen to this JRE font in case the intended glyph is missing in + // fonts provided in the CoreText provided cascaded list + listOfString.add("Lucida Sans Regular"); FontManager fm = FontManagerFactory.getInstance(); int numFonts = 1 + listOfString.size(); PhysicalFont[] fonts = new PhysicalFont[numFonts]; diff --git a/jdk/test/java/awt/font/Fallback/MissingGlyphTest.java b/jdk/test/java/awt/font/Fallback/MissingGlyphTest.java new file mode 100644 index 00000000000..564c58702f1 --- /dev/null +++ b/jdk/test/java/awt/font/Fallback/MissingGlyphTest.java @@ -0,0 +1,162 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +/* + * @test + * @bug 8147002 + * @summary Verifies if Arabic character alef is rendered in osx + * @run main/manual MissingGlyphTest + */ +import java.awt.Font; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.FlowLayout; +import java.awt.Graphics; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.JTextArea; +import javax.swing.JComponent; +import javax.swing.SwingUtilities; +import javax.swing.WindowConstants; + +public class MissingGlyphTest { + private static Thread mainThread; + private static boolean testPassed; + private static boolean testGeneratedInterrupt; + private static JFrame frame; + + public static void main(String[] args) throws Exception { + if (!System.getProperty("os.name").startsWith("Mac")) { + return; + } + SwingUtilities.invokeAndWait(() -> { + doTest(MissingGlyphTest::glyphTest); + }); + mainThread = Thread.currentThread(); + try { + Thread.sleep(180000); + } catch (InterruptedException e) { + if (!testPassed && testGeneratedInterrupt) { + throw new RuntimeException("Alef character is not rendered"); + } + } + if (!testGeneratedInterrupt) { + throw new RuntimeException("user has not executed the test"); + } + } + + private static void glyphTest() { + frame = new JFrame("Test"); + frame.add(new MyComponent()); + frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); + frame.setSize(200, 200); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + } + + public static synchronized void pass() { + testPassed = true; + testGeneratedInterrupt = true; + mainThread.interrupt(); + } + + public static synchronized void fail() { + testPassed = false; + testGeneratedInterrupt = true; + mainThread.interrupt(); + } + + private static void doTest(Runnable action) { + String description + = " The test is supposed to display arabic alef character.\n" + + " If it resembles like the one shown in\n " + + " www.fileformat.info/info/unicode/char/0627/index.htm\n " + + " in Italic style ,press PASS.\n" + + " If the glyph is not shown or empty rectangle is shown, press FAIL"; + + final JDialog dialog = new JDialog(); + dialog.setTitle("printBannerTest"); + JTextArea textArea = new JTextArea(description); + textArea.setEditable(false); + final JButton testButton = new JButton("Start Test"); + final JButton passButton = new JButton("PASS"); + passButton.setEnabled(false); + passButton.addActionListener((e) -> { + dialog.dispose(); + frame.dispose(); + pass(); + }); + final JButton failButton = new JButton("FAIL"); + failButton.setEnabled(false); + failButton.addActionListener((e) -> { + dialog.dispose(); + frame.dispose(); + fail(); + }); + testButton.addActionListener((e) -> { + testButton.setEnabled(false); + action.run(); + passButton.setEnabled(true); + failButton.setEnabled(true); + }); + JPanel mainPanel = new JPanel(new BorderLayout()); + mainPanel.add(textArea, BorderLayout.CENTER); + JPanel buttonPanel = new JPanel(new FlowLayout()); + buttonPanel.add(testButton); + buttonPanel.add(passButton); + buttonPanel.add(failButton); + mainPanel.add(buttonPanel, BorderLayout.SOUTH); + dialog.add(mainPanel); + dialog.pack(); + dialog.setVisible(true); + dialog.addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent e) { + System.out.println("main dialog closing"); + testGeneratedInterrupt = false; + mainThread.interrupt(); + } + }); + } +} + +class MyComponent extends JComponent { + private final Font font = new Font("Menlo", Font.ITALIC, 100); + private final String text = "\u0627"; // Arabic letter alef + + @Override + protected void paintComponent(Graphics g) { + if (font.canDisplayUpTo(text) == -1) { + g.setColor(Color.black); + g.setFont(font); + g.drawString(text, 70, 110); + } + } +} + + + + From 8e17a4ac1d99e7caa86f0956e601e21fbc1fde78 Mon Sep 17 00:00:00 2001 From: Hamlin Li Date: Fri, 10 Feb 2017 00:37:20 -0800 Subject: [PATCH 131/447] 8174696: Fix @since in module-info.java in dev/jaxp repo Reviewed-by: alanb --- jaxp/src/java.xml/share/classes/module-info.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jaxp/src/java.xml/share/classes/module-info.java b/jaxp/src/java.xml/share/classes/module-info.java index d9259677564..ec5d44f2edd 100644 --- a/jaxp/src/java.xml/share/classes/module-info.java +++ b/jaxp/src/java.xml/share/classes/module-info.java @@ -26,6 +26,8 @@ /** * Defines the Java API for XML Processing (JAXP), the Streaming API for XML (StAX), * the Simple API for XML (SAX), and the W3C Document Object Model (DOM) API. + * + * @since 9 */ module java.xml { exports javax.xml; From 480d90b74fa53bb164b031052cd4637a719597e6 Mon Sep 17 00:00:00 2001 From: Hamlin Li Date: Fri, 10 Feb 2017 00:39:51 -0800 Subject: [PATCH 132/447] 8174697: Fix @since in module-info.java in dev/jaxws repo Reviewed-by: alanb --- jaxws/src/java.activation/share/classes/module-info.java | 2 ++ jaxws/src/java.xml.bind/share/classes/module-info.java | 2 ++ jaxws/src/java.xml.ws.annotation/share/classes/module-info.java | 2 ++ jaxws/src/java.xml.ws/share/classes/module-info.java | 2 ++ 4 files changed, 8 insertions(+) diff --git a/jaxws/src/java.activation/share/classes/module-info.java b/jaxws/src/java.activation/share/classes/module-info.java index 00d40e18550..9477d19acc9 100644 --- a/jaxws/src/java.activation/share/classes/module-info.java +++ b/jaxws/src/java.activation/share/classes/module-info.java @@ -25,6 +25,8 @@ /** * Defines the JavaBeans Activation Framework (JAF) API. + * + * @since 9 */ module java.activation { requires transitive java.datatransfer; diff --git a/jaxws/src/java.xml.bind/share/classes/module-info.java b/jaxws/src/java.xml.bind/share/classes/module-info.java index 1a6abaf0bf0..ccf09cfbd9b 100644 --- a/jaxws/src/java.xml.bind/share/classes/module-info.java +++ b/jaxws/src/java.xml.bind/share/classes/module-info.java @@ -25,6 +25,8 @@ /** * Defines the Java Architecture for XML Binding (JAXB) API. + * + * @since 9 */ module java.xml.bind { requires transitive java.activation; diff --git a/jaxws/src/java.xml.ws.annotation/share/classes/module-info.java b/jaxws/src/java.xml.ws.annotation/share/classes/module-info.java index 58a625918fe..821e87e42c2 100644 --- a/jaxws/src/java.xml.ws.annotation/share/classes/module-info.java +++ b/jaxws/src/java.xml.ws.annotation/share/classes/module-info.java @@ -26,6 +26,8 @@ /** * Defines a subset of the Common Annotations API to support programs running * on the Java SE Platform. + * + * @since 9 */ module java.xml.ws.annotation { exports javax.annotation; diff --git a/jaxws/src/java.xml.ws/share/classes/module-info.java b/jaxws/src/java.xml.ws/share/classes/module-info.java index 4a0175eeae2..e8e43947623 100644 --- a/jaxws/src/java.xml.ws/share/classes/module-info.java +++ b/jaxws/src/java.xml.ws/share/classes/module-info.java @@ -26,6 +26,8 @@ /** * Defines the Java API for XML-Based Web Services (JAX-WS), and * the Web Services Metadata API. + * + * @since 9 */ module java.xml.ws { requires transitive java.activation; From 4dab8f4fee2c6f5f5d8e195544a74831f1a23c84 Mon Sep 17 00:00:00 2001 From: Alan Bateman Date: Fri, 10 Feb 2017 09:04:28 +0000 Subject: [PATCH 133/447] 8173393: Module system implementation refresh (2/2017) Co-authored-by: Mandy Chung Reviewed-by: mchung, alanb --- .../xalan/internal/xsltc/trax/TemplatesImpl.java | 11 ++++++----- .../LayerModularXMLParserTest.java | 10 +++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java index e5fac8b7395..d0ddbe10f54 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java @@ -438,7 +438,7 @@ public final class TemplatesImpl implements Templates, Serializable { Layer bootLayer = Layer.boot(); Configuration cf = bootLayer.configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of(mn)); + .resolve(finder, ModuleFinder.of(), Set.of(mn)); PrivilegedAction pa = () -> bootLayer.defineModules(cf, name -> loader); Layer layer = AccessController.doPrivileged(pa); @@ -483,10 +483,11 @@ public final class TemplatesImpl implements Templates, Serializable { String pn = _tfactory.getPackageName(); assert pn != null && pn.length() > 0; - ModuleDescriptor descriptor = ModuleDescriptor.module(mn) - .requires("java.xml") - .exports(pn) - .build(); + ModuleDescriptor descriptor = + ModuleDescriptor.newModule(mn, Set.of(ModuleDescriptor.Modifier.SYNTHETIC)) + .requires("java.xml") + .exports(pn) + .build(); Module m = createModule(descriptor, loader); diff --git a/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/LayerModularXMLParserTest.java b/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/LayerModularXMLParserTest.java index 74f051ac04d..fcfba1955ae 100644 --- a/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/LayerModularXMLParserTest.java +++ b/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/LayerModularXMLParserTest.java @@ -96,7 +96,7 @@ public class LayerModularXMLParserTest { public void testOneLayer() throws Exception { ModuleFinder finder1 = ModuleFinder.of(MOD_DIR1); Configuration cf1 = Layer.boot().configuration() - .resolveRequiresAndUses(finder1, ModuleFinder.of(), Set.of("test")); + .resolveAndBind(finder1, ModuleFinder.of(), Set.of("test")); ClassLoader scl = ClassLoader.getSystemClassLoader(); Layer layer1 = Layer.boot().defineModulesWithManyLoaders(cf1, scl); ClassLoader cl1 = layer1.findLoader("test"); @@ -126,12 +126,12 @@ public class LayerModularXMLParserTest { public void testTwoLayer() throws Exception { ModuleFinder finder1 = ModuleFinder.of(MOD_DIR1); Configuration cf1 = Layer.boot().configuration() - .resolveRequiresAndUses(finder1, ModuleFinder.of(), Set.of("test")); + .resolveAndBind(finder1, ModuleFinder.of(), Set.of("test")); ClassLoader scl = ClassLoader.getSystemClassLoader(); Layer layer1 = Layer.boot().defineModulesWithManyLoaders(cf1, scl); ModuleFinder finder2 = ModuleFinder.of(MOD_DIR2); - Configuration cf2 = cf1.resolveRequiresAndUses(finder2, ModuleFinder.of(), Set.of("test")); + Configuration cf2 = cf1.resolveAndBind(finder2, ModuleFinder.of(), Set.of("test")); Layer layer2 = layer1.defineModulesWithOneLoader(cf2, layer1.findLoader("test")); ClassLoader cl2 = layer2.findLoader("test"); @@ -160,12 +160,12 @@ public class LayerModularXMLParserTest { public void testTwoLayerWithDuplicate() throws Exception { ModuleFinder finder1 = ModuleFinder.of(MOD_DIR1, MOD_DIR2); Configuration cf1 = Layer.boot().configuration() - .resolveRequiresAndUses(finder1, ModuleFinder.of(), Set.of("test")); + .resolveAndBind(finder1, ModuleFinder.of(), Set.of("test")); ClassLoader scl = ClassLoader.getSystemClassLoader(); Layer layer1 = Layer.boot().defineModulesWithManyLoaders(cf1, scl); ModuleFinder finder2 = ModuleFinder.of(MOD_DIR2); - Configuration cf2 = cf1.resolveRequiresAndUses(finder2, ModuleFinder.of(), Set.of("test")); + Configuration cf2 = cf1.resolveAndBind(finder2, ModuleFinder.of(), Set.of("test")); Layer layer2 = layer1.defineModulesWithOneLoader(cf2, layer1.findLoader("test")); ClassLoader cl2 = layer2.findLoader("test"); From d6fbe2b113b51df6279b45bf6c07736096f6673b Mon Sep 17 00:00:00 2001 From: Alan Bateman Date: Fri, 10 Feb 2017 09:06:10 +0000 Subject: [PATCH 134/447] 8173393: Module system implementation refresh (2/2017) Co-authored-by: Mandy Chung Reviewed-by: mcimadamore, mchung, alanb --- .../tools/crules/MutableFieldsAnalyzer.java | 2 +- .../javax/lang/model/element/Element.java | 6 ++ .../javax/lang/model/element/ElementKind.java | 1 + .../lang/model/element/ElementVisitor.java | 1 + .../lang/model/element/ModuleElement.java | 8 ++ .../lang/model/element/PackageElement.java | 3 + .../javax/lang/model/type/TypeKind.java | 1 + .../model/util/AbstractElementVisitor6.java | 1 + .../model/util/AbstractElementVisitor9.java | 1 + .../javax/lang/model/util/ElementFilter.java | 6 ++ .../lang/model/util/ElementKindVisitor9.java | 1 + .../lang/model/util/ElementScanner9.java | 1 + .../javax/lang/model/util/Elements.java | 2 + .../model/util/SimpleElementVisitor9.java | 1 + .../tools/ForwardingJavaFileManager.java | 20 ++++ .../classes/javax/tools/JavaFileManager.java | 6 ++ .../classes/javax/tools/StandardLocation.java | 8 ++ .../com/sun/tools/javac/code/Directive.java | 4 +- .../tools/javac/file/JavacFileManager.java | 2 +- .../sun/tools/javac/util/JDK9Wrappers.java | 8 +- .../sun/tools/classfile/Module_attribute.java | 4 +- .../sun/tools/jdeps/JdepsConfiguration.java | 13 +-- .../classes/com/sun/tools/jdeps/Module.java | 99 ++++++++++++------- .../com/sun/tools/jdeps/ModuleAnalyzer.java | 2 +- .../tools/jdeps/ModuleExportsAnalyzer.java | 2 +- .../sun/tools/jdeps/ModuleInfoBuilder.java | 48 +++++---- langtools/test/jdk/jshell/KullaTesting.java | 2 +- .../T8003967/DetectMutableStaticFields.java | 2 +- 28 files changed, 177 insertions(+), 78 deletions(-) diff --git a/langtools/make/tools/crules/MutableFieldsAnalyzer.java b/langtools/make/tools/crules/MutableFieldsAnalyzer.java index 1e14e39e1a7..b5c0dd74469 100644 --- a/langtools/make/tools/crules/MutableFieldsAnalyzer.java +++ b/langtools/make/tools/crules/MutableFieldsAnalyzer.java @@ -102,7 +102,7 @@ public class MutableFieldsAnalyzer extends AbstractCodingRulesAnalyzer { ignoreFields("com.sun.tools.javac.util.JDK9Wrappers$ModuleFinder", "moduleFinderClass", "ofMethod"); ignoreFields("com.sun.tools.javac.util.JDK9Wrappers$Configuration", - "configurationClass", "resolveRequiresAndUsesMethod"); + "configurationClass", "resolveAndBindMethod"); ignoreFields("com.sun.tools.javac.util.JDK9Wrappers$Layer", "layerClass", "bootMethod", "defineModulesWithOneLoaderMethod", "configurationMethod"); ignoreFields("com.sun.tools.javac.util.JDK9Wrappers$Module", diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/element/Element.java b/langtools/src/java.compiler/share/classes/javax/lang/model/element/Element.java index e1b7502ae0c..7d93d1523d6 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/element/Element.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/element/Element.java @@ -123,6 +123,8 @@ public interface Element extends javax.lang.model.AnnotatedConstruct { * @see TypeElement#getSimpleName * @see VariableElement#getSimpleName * @see ModuleElement#getSimpleName + * @revised 9 + * @spec JPMS */ Name getSimpleName(); @@ -158,6 +160,8 @@ public interface Element extends javax.lang.model.AnnotatedConstruct { * * @return the enclosing element, or {@code null} if there is none * @see Elements#getPackageOf + * @revised 9 + * @spec JPMS */ Element getEnclosingElement(); @@ -193,6 +197,8 @@ public interface Element extends javax.lang.model.AnnotatedConstruct { * @see Elements#getAllMembers * @jls 8.8.9 Default Constructor * @jls 8.9 Enums + * @revised 9 + * @spec JPMS */ List getEnclosedElements(); diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/element/ElementKind.java b/langtools/src/java.compiler/share/classes/javax/lang/model/element/ElementKind.java index e98d454ceb7..d8af1caa6f6 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/element/ElementKind.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/element/ElementKind.java @@ -99,6 +99,7 @@ public enum ElementKind { /** * A module. * @since 9 + * @spec JPMS */ MODULE; diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/element/ElementVisitor.java b/langtools/src/java.compiler/share/classes/javax/lang/model/element/ElementVisitor.java index 290c36fedda..955c3647fa6 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/element/ElementVisitor.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/element/ElementVisitor.java @@ -159,6 +159,7 @@ public interface ElementVisitor { * @param p a visitor-specified parameter * @return a visitor-specified result * @since 9 + * @spec JPMS */ default R visitModule(ModuleElement e, P p) { return visitUnknown(e, p); diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java b/langtools/src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java index cf3f6b1992a..8a241770e94 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java @@ -33,6 +33,7 @@ import java.util.List; * * @see javax.lang.model.util.Elements#getModuleOf * @since 9 + * @spec JPMS */ // TODO: add @jls to module section public interface ModuleElement extends Element, QualifiedNameable { @@ -104,6 +105,7 @@ public interface ModuleElement extends Element, QualifiedNameable { * future versions of the Java™ programming language. * * @since 9 + * @spec JPMS */ enum DirectiveKind { /** A "requires (static|transitive)* module-name" directive. */ @@ -122,6 +124,7 @@ public interface ModuleElement extends Element, QualifiedNameable { * Represents a "module statement" within the declaration of this module. * * @since 9 + * @spec JPMS * */ // TODO: add jls to Module Statement interface Directive { @@ -136,6 +139,7 @@ public interface ModuleElement extends Element, QualifiedNameable { /** * A dependency of a module. * @since 9 + * @spec JPMS */ interface RequiresDirective extends Directive { /** @@ -160,6 +164,7 @@ public interface ModuleElement extends Element, QualifiedNameable { /** * An exported package of a module. * @since 9 + * @spec JPMS */ interface ExportsDirective extends Directive { @@ -181,6 +186,7 @@ public interface ModuleElement extends Element, QualifiedNameable { /** * An opened package of a module. * @since 9 + * @spec JPMS */ interface OpensDirective extends Directive { @@ -202,6 +208,7 @@ public interface ModuleElement extends Element, QualifiedNameable { /** * An implementation of a service provided by a module. * @since 9 + * @spec JPMS */ interface ProvidesDirective extends Directive { /** @@ -220,6 +227,7 @@ public interface ModuleElement extends Element, QualifiedNameable { /** * A reference to a service used by a module. * @since 9 + * @spec JPMS */ interface UsesDirective extends Directive { /** diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/element/PackageElement.java b/langtools/src/java.compiler/share/classes/javax/lang/model/element/PackageElement.java index 6535c00e8de..ad2fc6b0519 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/element/PackageElement.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/element/PackageElement.java @@ -93,6 +93,9 @@ public interface PackageElement extends Element, QualifiedNameable { * source version} without modules. * * @return the enclosing module or {@code null} if no such module exists + * + * @revised 9 + * @spec JPMS */ @Override Element getEnclosingElement(); diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/type/TypeKind.java b/langtools/src/java.compiler/share/classes/javax/lang/model/type/TypeKind.java index b0a1b625d16..4618757da2e 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/type/TypeKind.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/type/TypeKind.java @@ -157,6 +157,7 @@ public enum TypeKind { * A pseudo-type corresponding to a module element. * @see NoType * @since 9 + * @spec JPMS */ MODULE; diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java b/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java index 0db2e75549f..e2f076975c2 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java @@ -136,6 +136,7 @@ public abstract class AbstractElementVisitor6 implements ElementVisitor extends AbstractElementVisitor8 { diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/util/ElementFilter.java b/langtools/src/java.compiler/share/classes/javax/lang/model/util/ElementFilter.java index db5c9873aca..c3429744a67 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/util/ElementFilter.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/util/ElementFilter.java @@ -189,6 +189,7 @@ public class ElementFilter { * @return a list of modules in {@code elements} * @param elements the elements to filter * @since 9 + * @spec JPMS */ public static List modulesIn(Iterable elements) { @@ -200,6 +201,7 @@ public class ElementFilter { * @return a set of modules in {@code elements} * @param elements the elements to filter * @since 9 + * @spec JPMS */ public static Set modulesIn(Set elements) { @@ -236,6 +238,7 @@ public class ElementFilter { * @return a list of {@code exports} directives in {@code directives} * @param directives the directives to filter * @since 9 + * @spec JPMS */ public static List exportsIn(Iterable directives) { @@ -258,6 +261,7 @@ public class ElementFilter { * @return a list of {@code provides} directives in {@code directives} * @param directives the directives to filter * @since 9 + * @spec JPMS */ public static List providesIn(Iterable directives) { @@ -269,6 +273,7 @@ public class ElementFilter { * @return a list of {@code requires} directives in {@code directives} * @param directives the directives to filter * @since 9 + * @spec JPMS */ public static List requiresIn(Iterable directives) { @@ -280,6 +285,7 @@ public class ElementFilter { * @return a list of {@code uses} directives in {@code directives} * @param directives the directives to filter * @since 9 + * @spec JPMS */ public static List usesIn(Iterable directives) { diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java b/langtools/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java index fc5a9851104..d40971ed6e1 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java @@ -75,6 +75,7 @@ import javax.lang.model.SourceVersion; * @see ElementKindVisitor7 * @see ElementKindVisitor8 * @since 9 + * @spec JPMS */ @SupportedSourceVersion(RELEASE_9) public class ElementKindVisitor9 extends ElementKindVisitor8 { diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java b/langtools/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java index b7dd53bd9c8..8cab8fde6a9 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java @@ -88,6 +88,7 @@ import static javax.lang.model.SourceVersion.*; * @see ElementScanner7 * @see ElementScanner8 * @since 9 + * @spec JPMS */ @SupportedSourceVersion(RELEASE_9) public class ElementScanner9 extends ElementScanner8 { diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/util/Elements.java b/langtools/src/java.compiler/share/classes/javax/lang/model/util/Elements.java index c8038b7b39b..65f302c4793 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/util/Elements.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/util/Elements.java @@ -111,6 +111,7 @@ public interface Elements { * @param name the name * @return the named module element, or {@code null} if it cannot be found * @since 9 + * @spec JPMS */ default ModuleElement getModuleElement(CharSequence name) { return null; @@ -359,6 +360,7 @@ public interface Elements { * @param type the element being examined * @return the module of an element * @since 9 + * @spec JPMS */ default ModuleElement getModuleOf(Element type) { return null; diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java b/langtools/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java index 3b9f3f0df3e..dad6c4e21bf 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java @@ -71,6 +71,7 @@ import static javax.lang.model.SourceVersion.*; * @see SimpleElementVisitor7 * @see SimpleElementVisitor8 * @since 9 + * @spec JPMS */ @SupportedSourceVersion(RELEASE_9) public class SimpleElementVisitor9 extends SimpleElementVisitor8 { diff --git a/langtools/src/java.compiler/share/classes/javax/tools/ForwardingJavaFileManager.java b/langtools/src/java.compiler/share/classes/javax/tools/ForwardingJavaFileManager.java index 040a8438c9b..54bcc224d9f 100644 --- a/langtools/src/java.compiler/share/classes/javax/tools/ForwardingJavaFileManager.java +++ b/langtools/src/java.compiler/share/classes/javax/tools/ForwardingJavaFileManager.java @@ -165,22 +165,42 @@ public class ForwardingJavaFileManager implements Jav fileManager.close(); } + /** + * @since 9 + * @spec JPMS + */ public Location getLocationForModule(Location location, String moduleName) throws IOException { return fileManager.getLocationForModule(location, moduleName); } + /** + * @since 9 + * @spec JPMS + */ public Location getLocationForModule(Location location, JavaFileObject fo, String pkgName) throws IOException { return fileManager.getLocationForModule(location, fo, pkgName); } + /** + * @since 9 + * @spec JPMS + */ public ServiceLoader getServiceLoader(Location location, Class service) throws IOException { return fileManager.getServiceLoader(location, service); } + /** + * @since 9 + * @spec JPMS + */ public String inferModuleName(Location location) throws IOException { return fileManager.inferModuleName(location); } + /** + * @since 9 + * @spec JPMS + */ public Iterable> listLocationsForModules(Location location) throws IOException { return fileManager.listLocationsForModules(location); } diff --git a/langtools/src/java.compiler/share/classes/javax/tools/JavaFileManager.java b/langtools/src/java.compiler/share/classes/javax/tools/JavaFileManager.java index 3f1122aff38..fc3cb01f257 100644 --- a/langtools/src/java.compiler/share/classes/javax/tools/JavaFileManager.java +++ b/langtools/src/java.compiler/share/classes/javax/tools/JavaFileManager.java @@ -165,6 +165,7 @@ public interface JavaFileManager extends Closeable, Flushable, OptionChecker { * * @return true if this location is expected to contain modules * @since 9 + * @spec JPMS */ default boolean isModuleOrientedLocation() { return getName().matches("\\bMODULE\\b"); @@ -472,6 +473,7 @@ public interface JavaFileManager extends Closeable, Flushable, OptionChecker { * @throws IllegalArgumentException if the location is neither an output location nor a * module-oriented location * @since 9 + * @spec JPMS */ // TODO: describe failure modes default Location getLocationForModule(Location location, String moduleName) throws IOException { throw new UnsupportedOperationException(); @@ -499,6 +501,7 @@ public interface JavaFileManager extends Closeable, Flushable, OptionChecker { * @throws IllegalArgumentException if the location is neither an output location nor a * module-oriented location * @since 9 + * @spec JPMS */ default Location getLocationForModule(Location location, JavaFileObject fo, String pkgName) throws IOException { throw new UnsupportedOperationException(); @@ -522,6 +525,7 @@ public interface JavaFileManager extends Closeable, Flushable, OptionChecker { * @throws IOException if an I/O error occurred * @throws UnsupportedOperationException if this operation if not supported by this file manager * @since 9 + * @spec JPMS */ // TODO: describe failure modes default ServiceLoader getServiceLoader(Location location, Class service) throws IOException { throw new UnsupportedOperationException(); @@ -540,6 +544,7 @@ public interface JavaFileManager extends Closeable, Flushable, OptionChecker { * @throws UnsupportedOperationException if this operation if not supported by this file manager * @throws IllegalArgumentException if the location is not one known to this file manager * @since 9 + * @spec JPMS */ // TODO: describe failure modes default String inferModuleName(Location location) throws IOException { throw new UnsupportedOperationException(); @@ -559,6 +564,7 @@ public interface JavaFileManager extends Closeable, Flushable, OptionChecker { * @throws UnsupportedOperationException if this operation if not supported by this file manager * @throws IllegalArgumentException if the location is not a module-oriented location * @since 9 + * @spec JPMS */ // TODO: describe failure modes default Iterable> listLocationsForModules(Location location) throws IOException { throw new UnsupportedOperationException(); diff --git a/langtools/src/java.compiler/share/classes/javax/tools/StandardLocation.java b/langtools/src/java.compiler/share/classes/javax/tools/StandardLocation.java index b90f01684df..9cc9ab3113f 100644 --- a/langtools/src/java.compiler/share/classes/javax/tools/StandardLocation.java +++ b/langtools/src/java.compiler/share/classes/javax/tools/StandardLocation.java @@ -64,6 +64,7 @@ public enum StandardLocation implements Location { /** * Location to search for modules containing annotation processors. + * @spec JPMS * @since 9 */ ANNOTATION_PROCESSOR_MODULE_PATH, @@ -82,24 +83,28 @@ public enum StandardLocation implements Location { /** * Location to search for the source code of modules. + * @spec JPMS * @since 9 */ MODULE_SOURCE_PATH, /** * Location to search for upgradeable system modules. + * @spec JPMS * @since 9 */ UPGRADE_MODULE_PATH, /** * Location to search for system modules. + * @spec JPMS * @since 9 */ SYSTEM_MODULES, /** * Location to search for precompiled user modules. + * @spec JPMS * @since 9 */ MODULE_PATH; @@ -115,6 +120,9 @@ public enum StandardLocation implements Location { * * @param name a name * @return a location + * + * @revised 9 + * @spec JPMS */ public static Location locationFor(final String name) { if (locations.isEmpty()) { diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Directive.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Directive.java index e8ae0be7edb..b3a0ed52d01 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Directive.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Directive.java @@ -53,8 +53,8 @@ public abstract class Directive implements ModuleElement.Directive { /** Flags for RequiresDirective. */ public enum RequiresFlag { - TRANSITIVE(0x0010), - STATIC_PHASE(0x0020), + TRANSITIVE(0x0020), + STATIC_PHASE(0x0040), SYNTHETIC(0x1000), MANDATED(0x8000), EXTRA(0x10000); diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java index b5a200f14d6..a42aa379c4e 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java @@ -968,7 +968,7 @@ public class JavacFileManager extends BaseFileManager implements StandardJavaFil Collection paths = locations.getLocation(location); ModuleFinder finder = ModuleFinder.of(paths.toArray(new Path[paths.size()])); Layer bootLayer = Layer.boot(); - Configuration cf = bootLayer.configuration().resolveRequiresAndUses(ModuleFinder.of(), finder, Collections.emptySet()); + Configuration cf = bootLayer.configuration().resolveAndBind(ModuleFinder.of(), finder, Collections.emptySet()); Layer layer = bootLayer.defineModulesWithOneLoader(cf, ClassLoader.getSystemClassLoader()); return ServiceLoaderHelper.load(layer, service); } else { diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JDK9Wrappers.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JDK9Wrappers.java index fe28731f9ca..f7b3a82146f 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JDK9Wrappers.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JDK9Wrappers.java @@ -272,12 +272,12 @@ public class JDK9Wrappers { init(); } - public Configuration resolveRequiresAndUses( + public Configuration resolveAndBind( ModuleFinder beforeFinder, ModuleFinder afterFinder, Collection roots) { try { - Object result = resolveRequiresAndUsesMethod.invoke(theRealConfiguration, + Object result = resolveAndBindMethod.invoke(theRealConfiguration, beforeFinder.theRealModuleFinder, afterFinder.theRealModuleFinder, roots @@ -293,7 +293,7 @@ public class JDK9Wrappers { // ----------------------------------------------------------------------------------------- private static Class configurationClass = null; - private static Method resolveRequiresAndUsesMethod; + private static Method resolveAndBindMethod; static final Class getConfigurationClass() { init(); @@ -305,7 +305,7 @@ public class JDK9Wrappers { try { configurationClass = Class.forName("java.lang.module.Configuration", false, null); Class moduleFinderInterface = ModuleFinder.getModuleFinderClass(); - resolveRequiresAndUsesMethod = configurationClass.getDeclaredMethod("resolveRequiresAndUses", + resolveAndBindMethod = configurationClass.getDeclaredMethod("resolveAndBind", moduleFinderInterface, moduleFinderInterface, Collection.class diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/classfile/Module_attribute.java b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/classfile/Module_attribute.java index 67f9c755c9c..6b0b525b50c 100644 --- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/classfile/Module_attribute.java +++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/classfile/Module_attribute.java @@ -38,8 +38,8 @@ import com.sun.tools.classfile.ConstantPool.CONSTANT_Module_info; * deletion without notice. */ public class Module_attribute extends Attribute { - public static final int ACC_TRANSITIVE = 0x10; - public static final int ACC_STATIC_PHASE = 0x20; + public static final int ACC_TRANSITIVE = 0x20; + public static final int ACC_STATIC_PHASE = 0x40; public static final int ACC_OPEN = 0x20; public static final int ACC_SYNTHETIC = 0x1000; public static final int ACC_MANDATED = 0x8000; diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsConfiguration.java b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsConfiguration.java index b34d740d300..aa32ce307ad 100644 --- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsConfiguration.java +++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsConfiguration.java @@ -118,7 +118,7 @@ public class JdepsConfiguration implements AutoCloseable { } this.configuration = Configuration.empty() - .resolveRequires(finder, ModuleFinder.of(), mods); + .resolve(finder, ModuleFinder.of(), mods); this.configuration.modules().stream() .map(ResolvedModule::reference) @@ -272,7 +272,7 @@ public class JdepsConfiguration implements AutoCloseable { return nameToModule.values().stream(); } else { return Configuration.empty() - .resolveRequires(finder, ModuleFinder.of(), roots) + .resolve(finder, ModuleFinder.of(), roots) .modules().stream() .map(ResolvedModule::name) .map(nameToModule::get); @@ -422,18 +422,13 @@ public class JdepsConfiguration implements AutoCloseable { } private ModuleDescriptor dropHashes(ModuleDescriptor md) { - ModuleDescriptor.Builder builder = ModuleDescriptor.module(md.name()); + ModuleDescriptor.Builder builder = ModuleDescriptor.newModule(md.name()); md.requires().forEach(builder::requires); md.exports().forEach(builder::exports); md.opens().forEach(builder::opens); md.provides().stream().forEach(builder::provides); md.uses().stream().forEach(builder::uses); - - Set concealed = new HashSet<>(md.packages()); - md.exports().stream().map(Exports::source).forEach(concealed::remove); - md.opens().stream().map(Opens::source).forEach(concealed::remove); - concealed.forEach(builder::contains); - + builder.packages(md.packages()); return builder.build(); } diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/Module.java b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/Module.java index e49a7f7d47e..b5d77c088d1 100644 --- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/Module.java +++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/Module.java @@ -26,8 +26,6 @@ package com.sun.tools.jdeps; import java.lang.module.ModuleDescriptor; -import java.lang.module.ModuleDescriptor.Exports; -import java.lang.module.ModuleDescriptor.Opens; import java.net.URI; import java.util.Collections; import java.util.HashMap; @@ -55,6 +53,7 @@ class Module extends Archive { private final ModuleDescriptor descriptor; private final Map> exports; + private final Map> opens; private final boolean isSystem; private final URI location; @@ -63,6 +62,7 @@ class Module extends Archive { this.descriptor = null; this.location = null; this.exports = Collections.emptyMap(); + this.opens = Collections.emptyMap(); this.isSystem = true; } @@ -70,12 +70,14 @@ class Module extends Archive { URI location, ModuleDescriptor descriptor, Map> exports, + Map> opens, boolean isSystem, ClassFileReader reader) { super(name, location, reader); this.descriptor = descriptor; this.location = location; this.exports = Collections.unmodifiableMap(exports); + this.opens = Collections.unmodifiableMap(opens); this.isSystem = isSystem; } @@ -124,35 +126,52 @@ class Module extends Archive { return descriptor.packages(); } - /** - * Tests if the package of the given name is exported. - */ - public boolean isExported(String pn) { - return exports.containsKey(pn) ? exports.get(pn).isEmpty() : false; - } - public boolean isJDKUnsupported() { return JDK_UNSUPPORTED.equals(this.name()); } /** - * Converts this module to a strict module with the given dependences + * Converts this module to a normal module with the given dependences * * @throws IllegalArgumentException if this module is not an automatic module */ - public Module toStrictModule(Map requires) { + public Module toNormalModule(Map requires) { if (!isAutomatic()) { - throw new IllegalArgumentException(name() + " already a strict module"); + throw new IllegalArgumentException(name() + " not an automatic module"); } - return new StrictModule(this, requires); + return new NormalModule(this, requires); } /** - * Tests if the package of the given name is qualifiedly exported - * to the target. + * Tests if the package of the given name is exported. + */ + public boolean isExported(String pn) { + return exports.containsKey(pn) && exports.get(pn).isEmpty(); + } + + /** + * Tests if the package of the given name is exported to the target + * in a qualified fashion. */ public boolean isExported(String pn, String target) { - return isExported(pn) || exports.containsKey(pn) && exports.get(pn).contains(target); + return isExported(pn) + || exports.containsKey(pn) && exports.get(pn).contains(target); + } + + /** + * Tests if the package of the given name is open. + */ + public boolean isOpen(String pn) { + return opens.containsKey(pn) && opens.get(pn).isEmpty(); + } + + /** + * Tests if the package of the given name is open to the target + * in a qualified fashion. + */ + public boolean isOpen(String pn, String target) { + return isOpen(pn) + || opens.containsKey(pn) && opens.get(pn).contains(target); } @Override @@ -193,19 +212,28 @@ class Module extends Archive { } Map> exports = new HashMap<>(); + Map> opens = new HashMap<>(); - descriptor.exports().stream() - .forEach(exp -> exports.computeIfAbsent(exp.source(), _k -> new HashSet<>()) - .addAll(exp.targets())); - - return new Module(name, location, descriptor, exports, isSystem, reader); + if (descriptor.isAutomatic()) { + // ModuleDescriptor::exports and opens returns an empty set + descriptor.packages().forEach(pn -> exports.put(pn, Collections.emptySet())); + descriptor.packages().forEach(pn -> opens.put(pn, Collections.emptySet())); + } else { + descriptor.exports().stream() + .forEach(exp -> exports.computeIfAbsent(exp.source(), _k -> new HashSet<>()) + .addAll(exp.targets())); + descriptor.opens().stream() + .forEach(exp -> opens.computeIfAbsent(exp.source(), _k -> new HashSet<>()) + .addAll(exp.targets())); + } + return new Module(name, location, descriptor, exports, opens, isSystem, reader); } } private static class UnnamedModule extends Module { private UnnamedModule() { super("unnamed", null, null, - Collections.emptyMap(), + Collections.emptyMap(), Collections.emptyMap(), false, null); } @@ -230,19 +258,22 @@ class Module extends Archive { } } - private static class StrictModule extends Module { + /** + * A normal module has a module-info.class + */ + private static class NormalModule extends Module { private final ModuleDescriptor md; /** - * Converts the given automatic module to a strict module. + * Converts the given automatic module to a normal module. * * Replace this module's dependences with the given requires and also * declare service providers, if specified in META-INF/services configuration file */ - private StrictModule(Module m, Map requires) { - super(m.name(), m.location, m.descriptor, m.exports, m.isSystem, m.reader()); + private NormalModule(Module m, Map requires) { + super(m.name(), m.location, m.descriptor, m.exports, m.opens, m.isSystem, m.reader()); - ModuleDescriptor.Builder builder = ModuleDescriptor.module(m.name()); + ModuleDescriptor.Builder builder = ModuleDescriptor.newModule(m.name()); requires.keySet().forEach(mn -> { if (requires.get(mn).equals(Boolean.TRUE)) { builder.requires(Set.of(ModuleDescriptor.Requires.Modifier.TRANSITIVE), mn); @@ -250,16 +281,10 @@ class Module extends Archive { builder.requires(mn); } }); - m.descriptor.exports().forEach(e -> builder.exports(e)); - m.descriptor.opens().forEach(o -> builder.opens(o)); - m.descriptor.uses().forEach(s -> builder.uses(s)); - m.descriptor.provides().forEach(p -> builder.provides(p)); - - Set concealed = new HashSet<>(m.descriptor.packages()); - m.descriptor.exports().stream().map(Exports::source).forEach(concealed::remove); - m.descriptor.opens().stream().map(Opens::source).forEach(concealed::remove); - concealed.forEach(builder::contains); - + // exports all packages + m.descriptor.packages().forEach(builder::exports); + m.descriptor.uses().forEach(builder::uses); + m.descriptor.provides().forEach(builder::provides); this.md = builder.build(); } diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModuleAnalyzer.java b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModuleAnalyzer.java index 6da162878cd..dfbe55d89bc 100644 --- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModuleAnalyzer.java +++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModuleAnalyzer.java @@ -150,7 +150,7 @@ public class ModuleAnalyzer { private ModuleDescriptor descriptor(Set requiresTransitive, Set requires) { - ModuleDescriptor.Builder builder = ModuleDescriptor.module(root.name()); + ModuleDescriptor.Builder builder = ModuleDescriptor.newModule(root.name()); if (!root.name().equals(JAVA_BASE)) builder.requires(Set.of(MANDATED), JAVA_BASE); diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModuleExportsAnalyzer.java b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModuleExportsAnalyzer.java index d760d1b0d37..723ac198a88 100644 --- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModuleExportsAnalyzer.java +++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModuleExportsAnalyzer.java @@ -181,7 +181,7 @@ public class ModuleExportsAnalyzer extends DepsAnalyzer { RootModule(String name) { super(name); - ModuleDescriptor.Builder builder = ModuleDescriptor.module(name); + ModuleDescriptor.Builder builder = ModuleDescriptor.newModule(name); this.descriptor = builder.build(); } diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModuleInfoBuilder.java b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModuleInfoBuilder.java index 06a31cd6f45..1843ea0ffb5 100644 --- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModuleInfoBuilder.java +++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModuleInfoBuilder.java @@ -43,10 +43,12 @@ import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.Optional; import java.util.Set; import java.util.function.Function; +import java.util.stream.Collectors; import java.util.stream.Stream; import static java.util.stream.Collectors.*; @@ -60,8 +62,8 @@ public class ModuleInfoBuilder { final Analyzer analyzer; // an input JAR file (loaded as an automatic module for analysis) - // maps to an explicit module to generate module-info.java - final Map automaticToExplicitModule; + // maps to a normal module to generate module-info.java + final Map automaticToNormalModule; public ModuleInfoBuilder(JdepsConfiguration configuration, List args, Path outputdir, @@ -78,20 +80,20 @@ public class ModuleInfoBuilder { .map(fn -> Paths.get(fn)) .collect(toList()); - // automatic module to convert to explicit module - this.automaticToExplicitModule = ModuleFinder.of(paths.toArray(new Path[0])) + // automatic module to convert to normal module + this.automaticToNormalModule = ModuleFinder.of(paths.toArray(new Path[0])) .findAll().stream() .map(configuration::toModule) .collect(toMap(Function.identity(), Function.identity())); - Optional om = automaticToExplicitModule.keySet().stream() + Optional om = automaticToNormalModule.keySet().stream() .filter(m -> !m.descriptor().isAutomatic()) .findAny(); if (om.isPresent()) { throw new UncheckedBadArgs(new BadArgs("err.genmoduleinfo.not.jarfile", om.get().getPathName())); } - if (automaticToExplicitModule.isEmpty()) { + if (automaticToNormalModule.isEmpty()) { throw new UncheckedBadArgs(new BadArgs("err.invalid.path", args)); } } @@ -115,13 +117,13 @@ public class ModuleInfoBuilder { Path file = outputdir.resolve(m.name()).resolve("module-info.java"); // computes requires and requires transitive - Module explicitModule = toExplicitModule(m, apiDeps); - if (explicitModule != null) { - automaticToExplicitModule.put(m, explicitModule); + Module normalModule = toNormalModule(m, apiDeps); + if (normalModule != null) { + automaticToNormalModule.put(m, normalModule); // generate module-info.java System.out.format("writing to %s%n", file); - writeModuleInfo(file, explicitModule.descriptor()); + writeModuleInfo(file, normalModule.descriptor()); } else { // find missing dependences System.out.format("Missing dependence: %s not generated%n", file); @@ -139,7 +141,7 @@ public class ModuleInfoBuilder { return m == NOT_FOUND || m == REMOVED_JDK_INTERNALS; } - private Module toExplicitModule(Module module, Set requiresTransitive) + private Module toNormalModule(Module module, Set requiresTransitive) throws IOException { // done analysis @@ -159,21 +161,21 @@ public class ModuleInfoBuilder { .map(Archive::getModule) .forEach(d -> requires.putIfAbsent(d.name(), Boolean.FALSE)); - return module.toStrictModule(requires); + return module.toNormalModule(requires); } /** * Returns the stream of resulting modules */ Stream modules() { - return automaticToExplicitModule.values().stream(); + return automaticToNormalModule.values().stream(); } /** * Returns the stream of resulting ModuleDescriptors */ public Stream descriptors() { - return automaticToExplicitModule.entrySet().stream() + return automaticToNormalModule.entrySet().stream() .map(Map.Entry::getValue) .map(Module::descriptor); } @@ -205,13 +207,14 @@ public class ModuleInfoBuilder { md.requires().stream() .filter(req -> !req.name().equals("java.base")) // implicit requires .sorted(Comparator.comparing(Requires::name)) - .forEach(req -> writer.format(" requires %s;%n", req)); + .forEach(req -> writer.format(" requires %s;%n", + toString(req.modifiers(), req.name()))); if (!open) { md.exports().stream() .peek(exp -> { - if (exp.targets().size() > 0) - throw new InternalError(md.name() + " qualified exports: " + exp); + if (exp.isQualified()) + throw new InternalError(md.name() + " qualified exports: " + exp); }) .sorted(Comparator.comparing(Exports::source)) .forEach(exp -> writer.format(" exports %s;%n", exp.source())); @@ -231,7 +234,16 @@ public class ModuleInfoBuilder { } private Set automaticModules() { - return automaticToExplicitModule.keySet(); + return automaticToNormalModule.keySet(); + } + + /** + * Returns a string containing the given set of modifiers and label. + */ + private static String toString(Set mods, String what) { + return (Stream.concat(mods.stream().map(e -> e.toString().toLowerCase(Locale.US)), + Stream.of(what))) + .collect(Collectors.joining(" ")); } /** diff --git a/langtools/test/jdk/jshell/KullaTesting.java b/langtools/test/jdk/jshell/KullaTesting.java index 1197d0399a0..b8cc5de931d 100644 --- a/langtools/test/jdk/jshell/KullaTesting.java +++ b/langtools/test/jdk/jshell/KullaTesting.java @@ -213,7 +213,7 @@ public class KullaTesting { ModuleFinder finder = ModuleFinder.of(modPath); Layer parent = Layer.boot(); Configuration cf = parent.configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of(moduleName)); + .resolve(finder, ModuleFinder.of(), Set.of(moduleName)); ClassLoader scl = ClassLoader.getSystemClassLoader(); Layer layer = parent.defineModulesWithOneLoader(cf, scl); ClassLoader loader = layer.findLoader(moduleName); diff --git a/langtools/test/tools/javac/T8003967/DetectMutableStaticFields.java b/langtools/test/tools/javac/T8003967/DetectMutableStaticFields.java index a47dd2a9581..4a4c25da9fa 100644 --- a/langtools/test/tools/javac/T8003967/DetectMutableStaticFields.java +++ b/langtools/test/tools/javac/T8003967/DetectMutableStaticFields.java @@ -107,7 +107,7 @@ public class DetectMutableStaticFields { // by reflective lookup, to avoid explicit references that are not available // when running javac on JDK 8. ignore("com/sun/tools/javac/util/JDK9Wrappers$Configuration", - "resolveRequiresAndUsesMethod", "configurationClass"); + "resolveAndBindMethod", "configurationClass"); ignore("com/sun/tools/javac/util/JDK9Wrappers$Layer", "bootMethod", "defineModulesWithOneLoaderMethod", "configurationMethod", "layerClass"); ignore("com/sun/tools/javac/util/JDK9Wrappers$Module", From 287e05b579aad026c88a0b968e4c9b03472458e0 Mon Sep 17 00:00:00 2001 From: Alan Bateman Date: Fri, 10 Feb 2017 09:06:27 +0000 Subject: [PATCH 135/447] 8173393: Module system implementation refresh (2/2017) Co-authored-by: Mandy Chung Reviewed-by: mchung, alanb --- .../jdk/nashorn/internal/runtime/Context.java | 4 ++-- .../jdk/nashorn/internal/runtime/ScriptLoader.java | 7 ++++--- .../nashorn/internal/runtime/StructureLoader.java | 13 +++++++------ 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Context.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Context.java index a40ed5f22ce..d64a02aa60a 100644 --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Context.java +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Context.java @@ -1372,7 +1372,7 @@ public final class Context { }; final Configuration cf = parent.configuration() - .resolveRequires(finder, ModuleFinder.of(), Set.of(mn)); + .resolve(finder, ModuleFinder.of(), Set.of(mn)); final PrivilegedAction pa = () -> parent.defineModules(cf, name -> loader); final Layer layer = AccessController.doPrivileged(pa, GET_LOADER_ACC_CTXT); @@ -1798,7 +1798,7 @@ public final class Context { final Layer boot = Layer.boot(); final Configuration conf = boot.configuration(). - resolveRequires(mf, ModuleFinder.of(), rootMods); + resolve(mf, ModuleFinder.of(), rootMods); final String firstMod = rootMods.iterator().next(); return boot.defineModulesWithOneLoader(conf, cl).findLoader(firstMod); } diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptLoader.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptLoader.java index 4a223527876..24e8cc884ea 100644 --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptLoader.java +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptLoader.java @@ -26,9 +26,11 @@ package jdk.nashorn.internal.runtime; import java.lang.module.ModuleDescriptor; +import java.lang.module.ModuleDescriptor.Modifier; import java.lang.reflect.Module; import java.security.CodeSource; import java.util.Objects; +import java.util.Set; /** * Responsible for loading script generated classes. @@ -69,12 +71,11 @@ final class ScriptLoader extends NashornLoader { private Module createModule(final String moduleName) { final Module structMod = context.getStructLoader().getModule(); final ModuleDescriptor.Builder builder = - ModuleDescriptor.module(moduleName) - .requires("java.base") + ModuleDescriptor.newModule(moduleName, Set.of(Modifier.SYNTHETIC)) .requires("java.logging") .requires(NASHORN_MODULE.getName()) .requires(structMod.getName()) - .contains(SCRIPTS_PKG); + .packages(Set.of(SCRIPTS_PKG)); if (Context.javaSqlFound) { builder.requires("java.sql"); diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/StructureLoader.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/StructureLoader.java index 075540a4eda..55335ba0a68 100644 --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/StructureLoader.java +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/StructureLoader.java @@ -31,8 +31,10 @@ import static jdk.nashorn.internal.codegen.CompilerConstants.JS_OBJECT_DUAL_FIEL import static jdk.nashorn.internal.codegen.CompilerConstants.JS_OBJECT_SINGLE_FIELD_PREFIX; import java.lang.module.ModuleDescriptor; +import java.lang.module.ModuleDescriptor.Modifier; import java.lang.reflect.Module; import java.security.ProtectionDomain; +import java.util.Set; import jdk.nashorn.internal.codegen.ObjectClassGenerator; /** @@ -62,12 +64,11 @@ final class StructureLoader extends NashornLoader { } private Module createModule(final String moduleName) { - final ModuleDescriptor descriptor - = ModuleDescriptor.module(moduleName) - .requires("java.base") - .requires(NASHORN_MODULE.getName()) - .contains(SCRIPTS_PKG) - .build(); + final ModuleDescriptor descriptor = + ModuleDescriptor.newModule(moduleName, Set.of(Modifier.SYNTHETIC)) + .requires(NASHORN_MODULE.getName()) + .packages(Set.of(SCRIPTS_PKG)) + .build(); final Module mod = Context.createModuleTrusted(descriptor, this); loadModuleManipulator(); From 6935e878c60cabaeccd247dc1028ce116c915f22 Mon Sep 17 00:00:00 2001 From: Yasumasa Suenaga Date: Sat, 11 Feb 2017 00:17:31 +0900 Subject: [PATCH 136/447] 8173941: SA does not work if executable is DSO Reviewed-by: aph, dsamersoff --- .../linux/native/libsaproc/elfmacros.h | 2 ++ .../linux/native/libsaproc/ps_core.c | 25 ++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/elfmacros.h b/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/elfmacros.h index 15bf64032f7..2dc0b611c2e 100644 --- a/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/elfmacros.h +++ b/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/elfmacros.h @@ -33,6 +33,7 @@ #define ELF_NHDR Elf64_Nhdr #define ELF_DYN Elf64_Dyn #define ELF_ADDR Elf64_Addr +#define ELF_AUXV Elf64_auxv_t #define ELF_ST_TYPE ELF64_ST_TYPE @@ -45,6 +46,7 @@ #define ELF_NHDR Elf32_Nhdr #define ELF_DYN Elf32_Dyn #define ELF_ADDR Elf32_Addr +#define ELF_AUXV Elf32_auxv_t #define ELF_ST_TYPE ELF32_ST_TYPE diff --git a/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c b/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c index 6c39d0c43f5..12a6347b366 100644 --- a/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c +++ b/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c @@ -642,6 +642,18 @@ static bool core_handle_note(struct ps_prochandle* ph, ELF_PHDR* note_phdr) { if (core_handle_prstatus(ph, descdata, notep->n_descsz) != true) { return false; } + } else if (notep->n_type == NT_AUXV) { + // Get first segment from entry point + ELF_AUXV *auxv = (ELF_AUXV *)descdata; + while (auxv->a_type != AT_NULL) { + if (auxv->a_type == AT_ENTRY) { + // Set entry point address to address of dynamic section. + // We will adjust it in read_exec_segments(). + ph->core->dynamic_addr = auxv->a_un.a_val; + break; + } + auxv++; + } } p = descdata + ROUNDUP(notep->n_descsz, 4); } @@ -832,7 +844,13 @@ static bool read_exec_segments(struct ps_prochandle* ph, ELF_EHDR* exec_ehdr) { // from PT_DYNAMIC we want to read address of first link_map addr case PT_DYNAMIC: { - ph->core->dynamic_addr = exec_php->p_vaddr; + if (exec_ehdr->e_type == ET_EXEC) { + ph->core->dynamic_addr = exec_php->p_vaddr; + } else { // ET_DYN + // dynamic_addr has entry point of executable. + // Thus we should substract it. + ph->core->dynamic_addr += exec_php->p_vaddr - exec_ehdr->e_entry; + } print_debug("address of _DYNAMIC is 0x%lx\n", ph->core->dynamic_addr); break; } @@ -1030,8 +1048,9 @@ struct ps_prochandle* Pgrab_core(const char* exec_file, const char* core_file) { goto err; } - if (read_elf_header(ph->core->exec_fd, &exec_ehdr) != true || exec_ehdr.e_type != ET_EXEC) { - print_debug("executable file is not a valid ELF ET_EXEC file\n"); + if (read_elf_header(ph->core->exec_fd, &exec_ehdr) != true || + ((exec_ehdr.e_type != ET_EXEC) && (exec_ehdr.e_type != ET_DYN))) { + print_debug("executable file is not a valid ELF file\n"); goto err; } From 0a9f00958e99f0ff646801f4a83ff02f095b7666 Mon Sep 17 00:00:00 2001 From: Vicente Romero Date: Fri, 10 Feb 2017 07:50:55 -0800 Subject: [PATCH 137/447] 8174099: class ComboTask at the combo test library needs an execute() method Reviewed-by: mcimadamore --- .../test/tools/javac/lib/combo/ComboTask.java | 107 +++++++++++++++++- 1 file changed, 105 insertions(+), 2 deletions(-) diff --git a/langtools/test/tools/javac/lib/combo/ComboTask.java b/langtools/test/tools/javac/lib/combo/ComboTask.java index ee20f78d424..568a1efc724 100644 --- a/langtools/test/tools/javac/lib/combo/ComboTask.java +++ b/langtools/test/tools/javac/lib/combo/ComboTask.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,9 +25,9 @@ package combo; import com.sun.source.tree.CompilationUnitTree; import com.sun.source.util.JavacTask; -import com.sun.source.util.TaskEvent.Kind; import com.sun.source.util.TaskListener; import com.sun.tools.javac.api.JavacTool; +import com.sun.tools.javac.util.Assert; import com.sun.tools.javac.util.List; import combo.ComboParameter.Resolver; @@ -36,11 +36,18 @@ import javax.tools.Diagnostic; import javax.tools.DiagnosticListener; import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; + import java.io.IOException; import java.io.Writer; import java.net.URI; +import java.net.URL; +import java.net.URLClassLoader; +import java.util.ArrayList; +import java.util.function.Consumer; +import java.util.function.Function; import java.util.HashMap; import java.util.Map; +import java.util.Optional; import java.util.stream.Collectors; import java.util.stream.StreamSupport; @@ -183,6 +190,28 @@ public class ComboTask { return new Result<>(getTask().generate()); } + /** + * Parse, analyze, perform code generation for the sources associated with this task and finally + * executes them + */ + public Optional execute(Function executionFunc) throws IOException { + Result> generationResult = generate(); + Iterable jfoIterable = generationResult.get(); + if (generationResult.hasErrors()) { + // we have nothing else to do + return Optional.empty(); + } + java.util.List urlList = new ArrayList<>(); + for (JavaFileObject jfo : jfoIterable) { + String urlStr = jfo.toUri().toURL().toString(); + urlStr = urlStr.substring(0, urlStr.length() - jfo.getName().length()); + urlList.add(new URL(urlStr)); + } + return Optional.of( + executionFunc.apply( + new ExecutionTask(new URLClassLoader(urlList.toArray(new URL[urlList.size()]))))); + } + /** * Fork a new compilation task; if possible the compilation context from previous executions is * retained (see comments in ReusableContext as to when it's safe to do so); otherwise a brand @@ -214,6 +243,80 @@ public class ComboTask { return task; } + /** + * This class represents an execution task. It allows the execution of one or more classes previously + * added to a given class loader. This class uses reflection to execute any given static public method + * in any given class. It's not restricted to the execution of the {@code main} method + */ + public class ExecutionTask { + private ClassLoader classLoader; + private String methodName = "main"; + private Class[] parameterTypes = new Class[]{String[].class}; + private Object[] args = new String[0]; + private Consumer handler; + private Class c; + + private ExecutionTask(ClassLoader classLoader) { + this.classLoader = classLoader; + } + + /** + * Set the name of the class to be loaded. + */ + public ExecutionTask withClass(String className) { + Assert.check(className != null, "class name value is null, impossible to proceed"); + try { + c = classLoader.loadClass(className); + } catch (Throwable t) { + throw new IllegalStateException(t); + } + return this; + } + + /** + * Set the name of the method to be executed along with the parameter types to + * reflectively obtain the method. + */ + public ExecutionTask withMethod(String methodName, Class... parameterTypes) { + this.methodName = methodName; + this.parameterTypes = parameterTypes; + return this; + } + + /** + * Set the arguments to be passed to the method. + */ + public ExecutionTask withArguments(Object... args) { + this.args = args; + return this; + } + + /** + * Set a handler to handle any exception thrown. + */ + public ExecutionTask withHandler(Consumer handler) { + this.handler = handler; + return this; + } + + /** + * Executes the given method in the given class. Returns true if the execution was + * successful, false otherwise. + */ + public Object run() { + try { + java.lang.reflect.Method meth = c.getMethod(methodName, parameterTypes); + meth.invoke(null, (Object)args); + return true; + } catch (Throwable t) { + if (handler != null) { + handler.accept(t); + } + return false; + } + } + } + /** * This class is used to help clients accessing the results of a given compilation task. * Contains several helper methods to inspect diagnostics generated during the task execution. From 19f9a33953d8ea6be81ff071b5e21f2be6d1db50 Mon Sep 17 00:00:00 2001 From: Vladimir Ivanov Date: Fri, 10 Feb 2017 20:45:39 +0300 Subject: [PATCH 138/447] 8174721: C1: Inlining through MH invokers/linkers in unreachable code is unsafe Reviewed-by: iveresov --- hotspot/src/share/vm/c1/c1_GraphBuilder.cpp | 14 ++- hotspot/src/share/vm/ci/ciMethod.cpp | 87 +++++++++++++++++++ hotspot/src/share/vm/ci/ciMethod.hpp | 2 + hotspot/src/share/vm/opto/callGenerator.cpp | 79 +---------------- hotspot/src/share/vm/opto/callGenerator.hpp | 2 - hotspot/src/share/vm/opto/doCall.cpp | 15 +--- .../jsr292/InvokerSignatureMismatch.java | 20 ++--- 7 files changed, 112 insertions(+), 107 deletions(-) diff --git a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp index 1a0a5f63687..5e23d2c09e1 100644 --- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp +++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp @@ -3995,10 +3995,14 @@ bool GraphBuilder::try_method_handle_inline(ciMethod* callee, bool ignore_return ciMethod* target = type->as_ObjectType()->constant_value()->as_method_handle()->get_vmtarget(); // We don't do CHA here so only inline static and statically bindable methods. if (target->is_static() || target->can_be_statically_bound()) { - Bytecodes::Code bc = target->is_static() ? Bytecodes::_invokestatic : Bytecodes::_invokevirtual; - ignore_return = ignore_return || (callee->return_type()->is_void() && !target->return_type()->is_void()); - if (try_inline(target, /*holder_known*/ true, ignore_return, bc)) { - return true; + if (ciMethod::is_consistent_info(callee, target)) { + Bytecodes::Code bc = target->is_static() ? Bytecodes::_invokestatic : Bytecodes::_invokevirtual; + ignore_return = ignore_return || (callee->return_type()->is_void() && !target->return_type()->is_void()); + if (try_inline(target, /*holder_known*/ true, ignore_return, bc)) { + return true; + } + } else { + print_inlining(target, "signatures mismatch", /*success*/ false); } } else { print_inlining(target, "not static or statically bindable", /*success*/ false); @@ -4026,6 +4030,8 @@ bool GraphBuilder::try_method_handle_inline(ciMethod* callee, bool ignore_return if (try_method_handle_inline(target, ignore_return)) { return true; } + } else if (!ciMethod::is_consistent_info(callee, target)) { + print_inlining(target, "signatures mismatch", /*success*/ false); } else { ciSignature* signature = target->signature(); const int receiver_skip = target->is_static() ? 0 : 1; diff --git a/hotspot/src/share/vm/ci/ciMethod.cpp b/hotspot/src/share/vm/ci/ciMethod.cpp index 4860427786f..4303a78a46c 100644 --- a/hotspot/src/share/vm/ci/ciMethod.cpp +++ b/hotspot/src/share/vm/ci/ciMethod.cpp @@ -1409,6 +1409,93 @@ void ciMethod::print_impl(outputStream* st) { } } +// ------------------------------------------------------------------ + +static BasicType erase_to_word_type(BasicType bt) { + if (is_subword_type(bt)) return T_INT; + if (bt == T_ARRAY) return T_OBJECT; + return bt; +} + +static bool basic_types_match(ciType* t1, ciType* t2) { + if (t1 == t2) return true; + return erase_to_word_type(t1->basic_type()) == erase_to_word_type(t2->basic_type()); +} + +bool ciMethod::is_consistent_info(ciMethod* declared_method, ciMethod* resolved_method) { + bool invoke_through_mh_intrinsic = declared_method->is_method_handle_intrinsic() && + !resolved_method->is_method_handle_intrinsic(); + + if (!invoke_through_mh_intrinsic) { + // Method name & descriptor should stay the same. + return (declared_method->name()->equals(resolved_method->name())) && + (declared_method->signature()->equals(resolved_method->signature())); + } + + ciMethod* linker = declared_method; + ciMethod* target = resolved_method; + // Linkers have appendix argument which is not passed to callee. + int has_appendix = MethodHandles::has_member_arg(linker->intrinsic_id()) ? 1 : 0; + if (linker->arg_size() != (target->arg_size() + has_appendix)) { + return false; // argument slot count mismatch + } + + ciSignature* linker_sig = linker->signature(); + ciSignature* target_sig = target->signature(); + + if (linker_sig->count() + (linker->is_static() ? 0 : 1) != + target_sig->count() + (target->is_static() ? 0 : 1) + has_appendix) { + return false; // argument count mismatch + } + + int sbase = 0, rbase = 0; + switch (linker->intrinsic_id()) { + case vmIntrinsics::_linkToVirtual: + case vmIntrinsics::_linkToInterface: + case vmIntrinsics::_linkToSpecial: { + if (target->is_static()) { + return false; + } + if (linker_sig->type_at(0)->is_primitive_type()) { + return false; // receiver should be an oop + } + sbase = 1; // skip receiver + break; + } + case vmIntrinsics::_linkToStatic: { + if (!target->is_static()) { + return false; + } + break; + } + case vmIntrinsics::_invokeBasic: { + if (target->is_static()) { + if (target_sig->type_at(0)->is_primitive_type()) { + return false; // receiver should be an oop + } + rbase = 1; // skip receiver + } + break; + } + } + assert(target_sig->count() - rbase == linker_sig->count() - sbase - has_appendix, "argument count mismatch"); + int arg_count = target_sig->count() - rbase; + for (int i = 0; i < arg_count; i++) { + if (!basic_types_match(linker_sig->type_at(sbase + i), target_sig->type_at(rbase + i))) { + return false; + } + } + // Only check the return type if the symbolic info has non-void return type. + // I.e. the return value of the resolved method can be dropped. + if (!linker->return_type()->is_void() && + !basic_types_match(linker->return_type(), target->return_type())) { + return false; + } + return true; // no mismatch found +} + +// ------------------------------------------------------------------ + #if INCLUDE_TRACE TraceStructCalleeMethod ciMethod::to_trace_struct() const { TraceStructCalleeMethod result; diff --git a/hotspot/src/share/vm/ci/ciMethod.hpp b/hotspot/src/share/vm/ci/ciMethod.hpp index f16948e71d7..dca85811dee 100644 --- a/hotspot/src/share/vm/ci/ciMethod.hpp +++ b/hotspot/src/share/vm/ci/ciMethod.hpp @@ -353,6 +353,8 @@ class ciMethod : public ciMetadata { void print_name(outputStream* st = tty); void print_short_name(outputStream* st = tty); + static bool is_consistent_info(ciMethod* declared_method, ciMethod* resolved_method); + #if INCLUDE_TRACE TraceStructCalleeMethod to_trace_struct() const; #endif diff --git a/hotspot/src/share/vm/opto/callGenerator.cpp b/hotspot/src/share/vm/opto/callGenerator.cpp index b1a68918486..a5aaa552fee 100644 --- a/hotspot/src/share/vm/opto/callGenerator.cpp +++ b/hotspot/src/share/vm/opto/callGenerator.cpp @@ -809,81 +809,6 @@ CallGenerator* CallGenerator::for_method_handle_call(JVMState* jvms, ciMethod* c } } -static BasicType erase_to_word_type(BasicType bt) { - if (is_subword_type(bt)) return T_INT; - if (bt == T_ARRAY) return T_OBJECT; - return bt; -} - -static bool basic_types_match(ciType* t1, ciType* t2) { - if (t1 == t2) return true; - return erase_to_word_type(t1->basic_type()) == erase_to_word_type(t2->basic_type()); -} - -bool CallGenerator::ensure_mh_intrinsic_matches_target_method(ciMethod* linker, ciMethod* target) { - assert(linker->is_method_handle_intrinsic(), "sanity"); - assert(!target->is_method_handle_intrinsic(), "sanity"); - - // Linkers have appendix argument which is not passed to callee. - int has_appendix = MethodHandles::has_member_arg(linker->intrinsic_id()) ? 1 : 0; - if (linker->arg_size() != (target->arg_size() + has_appendix)) { - return false; // argument slot count mismatch - } - - ciSignature* linker_sig = linker->signature(); - ciSignature* target_sig = target->signature(); - - if (linker_sig->count() + (linker->is_static() ? 0 : 1) != - target_sig->count() + (target->is_static() ? 0 : 1) + has_appendix) { - return false; // argument count mismatch - } - - int sbase = 0, rbase = 0; - switch (linker->intrinsic_id()) { - case vmIntrinsics::_linkToVirtual: - case vmIntrinsics::_linkToInterface: - case vmIntrinsics::_linkToSpecial: { - if (target->is_static()) { - return false; - } - if (linker_sig->type_at(0)->is_primitive_type()) { - return false; // receiver should be an oop - } - sbase = 1; // skip receiver - break; - } - case vmIntrinsics::_linkToStatic: { - if (!target->is_static()) { - return false; - } - break; - } - case vmIntrinsics::_invokeBasic: { - if (target->is_static()) { - if (target_sig->type_at(0)->is_primitive_type()) { - return false; // receiver should be an oop - } - rbase = 1; // skip receiver - } - break; - } - } - assert(target_sig->count() - rbase == linker_sig->count() - sbase - has_appendix, "argument count mismatch"); - int arg_count = target_sig->count() - rbase; - for (int i = 0; i < arg_count; i++) { - if (!basic_types_match(linker_sig->type_at(sbase + i), target_sig->type_at(rbase + i))) { - return false; - } - } - // Only check the return type if the symbolic info has non-void return type. - // I.e. the return value of the resolved method can be dropped. - if (!linker->return_type()->is_void() && - !basic_types_match(linker->return_type(), target->return_type())) { - return false; - } - return true; // no mismatch found -} - CallGenerator* CallGenerator::for_method_handle_inline(JVMState* jvms, ciMethod* caller, ciMethod* callee, bool& input_not_const) { GraphKit kit(jvms); PhaseGVN& gvn = kit.gvn(); @@ -901,7 +826,7 @@ CallGenerator* CallGenerator::for_method_handle_inline(JVMState* jvms, ciMethod* ciMethod* target = oop_ptr->const_oop()->as_method_handle()->get_vmtarget(); const int vtable_index = Method::invalid_vtable_index; - if (!ensure_mh_intrinsic_matches_target_method(callee, target)) { + if (!ciMethod::is_consistent_info(callee, target)) { print_inlining_failure(C, callee, jvms->depth() - 1, jvms->bci(), "signatures mismatch"); return NULL; @@ -932,7 +857,7 @@ CallGenerator* CallGenerator::for_method_handle_inline(JVMState* jvms, ciMethod* const TypeOopPtr* oop_ptr = member_name->bottom_type()->is_oopptr(); ciMethod* target = oop_ptr->const_oop()->as_member_name()->get_vmtarget(); - if (!ensure_mh_intrinsic_matches_target_method(callee, target)) { + if (!ciMethod::is_consistent_info(callee, target)) { print_inlining_failure(C, callee, jvms->depth() - 1, jvms->bci(), "signatures mismatch"); return NULL; diff --git a/hotspot/src/share/vm/opto/callGenerator.hpp b/hotspot/src/share/vm/opto/callGenerator.hpp index 80bc0d5466d..8b7ee546571 100644 --- a/hotspot/src/share/vm/opto/callGenerator.hpp +++ b/hotspot/src/share/vm/opto/callGenerator.hpp @@ -176,8 +176,6 @@ class CallGenerator : public ResourceObj { } static bool is_inlined_method_handle_intrinsic(JVMState* jvms, ciMethod* m); - - static bool ensure_mh_intrinsic_matches_target_method(ciMethod* linker, ciMethod* target); }; diff --git a/hotspot/src/share/vm/opto/doCall.cpp b/hotspot/src/share/vm/opto/doCall.cpp index b0ee744e17c..50142ea1204 100644 --- a/hotspot/src/share/vm/opto/doCall.cpp +++ b/hotspot/src/share/vm/opto/doCall.cpp @@ -400,21 +400,10 @@ bool Parse::can_not_compile_call_site(ciMethod *dest_method, ciInstanceKlass* kl } #ifdef ASSERT -static bool is_call_consistent_with_jvms(JVMState* jvms, CallGenerator* cg) { +static bool check_call_consistency(JVMState* jvms, CallGenerator* cg) { ciMethod* symbolic_info = jvms->method()->get_method_at_bci(jvms->bci()); ciMethod* resolved_method = cg->method(); - - if (CallGenerator::is_inlined_method_handle_intrinsic(jvms, resolved_method)) { - return CallGenerator::ensure_mh_intrinsic_matches_target_method(symbolic_info, resolved_method); - } else { - // Method name & descriptor should stay the same. - return (symbolic_info->get_Method()->name() == resolved_method->get_Method()->name()) && - (symbolic_info->get_Method()->signature() == resolved_method->get_Method()->signature()); - } -} - -static bool check_call_consistency(JVMState* jvms, CallGenerator* cg) { - if (!is_call_consistent_with_jvms(jvms, cg)) { + if (!ciMethod::is_consistent_info(symbolic_info, resolved_method)) { tty->print_cr("JVMS:"); jvms->dump(); tty->print_cr("Bytecode info:"); diff --git a/hotspot/test/compiler/jsr292/InvokerSignatureMismatch.java b/hotspot/test/compiler/jsr292/InvokerSignatureMismatch.java index 65a2728bb25..dbd9e0101fc 100644 --- a/hotspot/test/compiler/jsr292/InvokerSignatureMismatch.java +++ b/hotspot/test/compiler/jsr292/InvokerSignatureMismatch.java @@ -31,21 +31,19 @@ public class InvokerSignatureMismatch { } public static void main(String[] args) throws Throwable { - mainLink(); - mainInvoke(); - } - - static void mainLink() throws Throwable { for (int i = 0; i < 50_000; i++) { // OSR - Object name = MethodHandleHelper.internalMemberName(INT_MH); - MethodHandleHelper.linkToStatic(INT_MH, (float) i, name); + mainLink(i); + mainInvoke(i); } } - static void mainInvoke() throws Throwable { - for (int i = 0; i < 50_000; i++) { // OSR - MethodHandleHelper.invokeBasicV(INT_MH, (float) i); - } + static void mainLink(int i) throws Throwable { + Object name = MethodHandleHelper.internalMemberName(INT_MH); + MethodHandleHelper.linkToStatic(INT_MH, (float) i, name); + } + + static void mainInvoke(int i) throws Throwable { + MethodHandleHelper.invokeBasicV(INT_MH, (float) i); } static int cnt = 0; From 236b9ba9424ad556c049c91aa39484454c12d70e Mon Sep 17 00:00:00 2001 From: Volker Simonis Date: Fri, 10 Feb 2017 17:22:17 +0100 Subject: [PATCH 139/447] 8173743: Failures during class definition can lead to memory leaks in metaspace Reviewed-by: dholmes, coleenp, acorn, ddmitriev --- .../share/vm/classfile/systemDictionary.cpp | 35 +- .../test/runtime/Metaspace/DefineClass.java | 380 ++++++++++++++++++ 2 files changed, 404 insertions(+), 11 deletions(-) create mode 100644 hotspot/test/runtime/Metaspace/DefineClass.java diff --git a/hotspot/src/share/vm/classfile/systemDictionary.cpp b/hotspot/src/share/vm/classfile/systemDictionary.cpp index e29fd131432..fd410851d33 100644 --- a/hotspot/src/share/vm/classfile/systemDictionary.cpp +++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp @@ -1152,21 +1152,26 @@ Klass* SystemDictionary::resolve_from_stream(Symbol* class_name, Symbol* h_name = k->name(); assert(class_name == NULL || class_name == h_name, "name mismatch"); - bool define_succeeded = false; // Add class just loaded // If a class loader supports parallel classloading handle parallel define requests // find_or_define_instance_class may return a different InstanceKlass if (is_parallelCapable(class_loader)) { - instanceKlassHandle defined_k = find_or_define_instance_class(h_name, class_loader, k, CHECK_NULL); - if (k() == defined_k()) { - // we have won over other concurrent threads (if any) that are - // competing to define the same class. - define_succeeded = true; + instanceKlassHandle defined_k = find_or_define_instance_class(h_name, class_loader, k, THREAD); + if (!HAS_PENDING_EXCEPTION && defined_k() != k()) { + // If a parallel capable class loader already defined this class, register 'k' for cleanup. + assert(defined_k.not_null(), "Should have a klass if there's no exception"); + loader_data->add_to_deallocate_list(k()); + k = defined_k; } - k = defined_k; } else { - define_instance_class(k, CHECK_NULL); - define_succeeded = true; + define_instance_class(k, THREAD); + } + + // If defining the class throws an exception register 'k' for cleanup. + if (HAS_PENDING_EXCEPTION) { + assert(k.not_null(), "Must have an instance klass here!"); + loader_data->add_to_deallocate_list(k()); + return NULL; } // Make sure we have an entry in the SystemDictionary on success @@ -1518,8 +1523,16 @@ instanceKlassHandle SystemDictionary::load_instance_class(Symbol* class_name, Ha // find_or_define_instance_class may return a different InstanceKlass if (!k.is_null()) { instanceKlassHandle defined_k = - find_or_define_instance_class(class_name, class_loader, k, CHECK_(nh)); - k = defined_k; + find_or_define_instance_class(class_name, class_loader, k, THREAD); + if (!HAS_PENDING_EXCEPTION && defined_k() != k()) { + // If a parallel capable class loader already defined this class, register 'k' for cleanup. + assert(defined_k.not_null(), "Should have a klass if there's no exception"); + loader_data->add_to_deallocate_list(k()); + k = defined_k; + } else if (HAS_PENDING_EXCEPTION) { + loader_data->add_to_deallocate_list(k()); + return nh; + } } return k; } else { diff --git a/hotspot/test/runtime/Metaspace/DefineClass.java b/hotspot/test/runtime/Metaspace/DefineClass.java new file mode 100644 index 00000000000..3e3f730b7db --- /dev/null +++ b/hotspot/test/runtime/Metaspace/DefineClass.java @@ -0,0 +1,380 @@ +/* + * Copyright (c) 2017 SAP SE. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 8173743 + * @summary Failures during class definition can lead to memory leaks in metaspace + * @library /test/lib + * @run main/othervm test.DefineClass defineClass + * @run main/othervm test.DefineClass defineSystemClass + * @run main/othervm -XX:+UnlockDiagnosticVMOptions + -XX:+UnsyncloadClass -XX:+AllowParallelDefineClass + test.DefineClass defineClassParallel + * @run main/othervm -XX:+UnlockDiagnosticVMOptions + -XX:+UnsyncloadClass -XX:-AllowParallelDefineClass + test.DefineClass defineClassParallel + * @run main/othervm -XX:+UnlockDiagnosticVMOptions + -XX:-UnsyncloadClass -XX:+AllowParallelDefineClass + test.DefineClass defineClassParallel + * @run main/othervm -XX:+UnlockDiagnosticVMOptions + -XX:-UnsyncloadClass -XX:-AllowParallelDefineClass + test.DefineClass defineClassParallel + * @run main/othervm test.DefineClass redefineClass + * @run main/othervm test.DefineClass redefineClassWithError + * @author volker.simonis@gmail.com + */ + +package test; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.lang.instrument.ClassDefinition; +import java.lang.instrument.Instrumentation; +import java.lang.management.ManagementFactory; +import java.util.Scanner; +import java.util.concurrent.CountDownLatch; +import java.util.jar.Attributes; +import java.util.jar.JarEntry; +import java.util.jar.JarOutputStream; +import java.util.jar.Manifest; + +import javax.management.MBeanServer; +import javax.management.ObjectName; + +import com.sun.tools.attach.VirtualMachine; + +import jdk.test.lib.process.ProcessTools; + +public class DefineClass { + + private static Instrumentation instrumentation; + + public void getID(CountDownLatch start, CountDownLatch stop) { + String id = "AAAAAAAA"; + System.out.println(id); + try { + // Signal that we've entered the activation.. + start.countDown(); + //..and wait until we can leave it. + stop.await(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + System.out.println(id); + return; + } + + private static class MyThread extends Thread { + private DefineClass dc; + private CountDownLatch start, stop; + + public MyThread(DefineClass dc, CountDownLatch start, CountDownLatch stop) { + this.dc = dc; + this.start = start; + this.stop = stop; + } + + public void run() { + dc.getID(start, stop); + } + } + + private static class ParallelLoadingThread extends Thread { + private MyParallelClassLoader pcl; + private CountDownLatch stop; + private byte[] buf; + + public ParallelLoadingThread(MyParallelClassLoader pcl, byte[] buf, CountDownLatch stop) { + this.pcl = pcl; + this.stop = stop; + this.buf = buf; + } + + public void run() { + try { + stop.await(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + try { + @SuppressWarnings("unchecked") + Class dc = (Class) pcl.myDefineClass(DefineClass.class.getName(), buf, 0, buf.length); + } + catch (LinkageError jle) { + // Expected with a parallel capable class loader and + // -XX:+UnsyncloadClass or -XX:+AllowParallelDefineClass + pcl.incrementLinkageErrors(); + } + + } + } + + static private class MyClassLoader extends ClassLoader { + public Class myDefineClass(String name, byte[] b, int off, int len) throws ClassFormatError { + return defineClass(name, b, off, len, null); + } + } + + static private class MyParallelClassLoader extends ClassLoader { + static { + System.out.println("parallelCapable : " + registerAsParallelCapable()); + } + public Class myDefineClass(String name, byte[] b, int off, int len) throws ClassFormatError { + return defineClass(name, b, off, len, null); + } + public synchronized void incrementLinkageErrors() { + linkageErrors++; + } + public int getLinkageErrors() { + return linkageErrors; + } + private volatile int linkageErrors; + } + + public static void agentmain(String args, Instrumentation inst) { + System.out.println("Loading Java Agent."); + instrumentation = inst; + } + + + private static void loadInstrumentationAgent(String myName, byte[] buf) throws Exception { + // Create agent jar file on the fly + Manifest m = new Manifest(); + m.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, "1.0"); + m.getMainAttributes().put(new Attributes.Name("Agent-Class"), myName); + m.getMainAttributes().put(new Attributes.Name("Can-Redefine-Classes"), "true"); + File jarFile = File.createTempFile("agent", ".jar"); + jarFile.deleteOnExit(); + JarOutputStream jar = new JarOutputStream(new FileOutputStream(jarFile), m); + jar.putNextEntry(new JarEntry(myName.replace('.', '/') + ".class")); + jar.write(buf); + jar.close(); + String pid = Long.toString(ProcessTools.getProcessId()); + System.out.println("Our pid is = " + pid); + VirtualMachine vm = VirtualMachine.attach(pid); + vm.loadAgent(jarFile.getAbsolutePath()); + } + + private static byte[] getBytecodes(String myName) throws Exception { + InputStream is = DefineClass.class.getResourceAsStream(myName + ".class"); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + byte[] buf = new byte[4096]; + int len; + while ((len = is.read(buf)) != -1) baos.write(buf, 0, len); + buf = baos.toByteArray(); + System.out.println("sizeof(" + myName + ".class) == " + buf.length); + return buf; + } + + private static int getStringIndex(String needle, byte[] buf) { + return getStringIndex(needle, buf, 0); + } + + private static int getStringIndex(String needle, byte[] buf, int offset) { + outer: + for (int i = offset; i < buf.length - offset - needle.length(); i++) { + for (int j = 0; j < needle.length(); j++) { + if (buf[i + j] != (byte)needle.charAt(j)) continue outer; + } + return i; + } + return 0; + } + + private static void replaceString(byte[] buf, String name, int index) { + for (int i = index; i < index + name.length(); i++) { + buf[i] = (byte)name.charAt(i - index); + } + } + + private static MBeanServer mbserver = ManagementFactory.getPlatformMBeanServer(); + + private static int getClassStats(String pattern) { + try { + ObjectName diagCmd = new ObjectName("com.sun.management:type=DiagnosticCommand"); + + String result = (String)mbserver.invoke(diagCmd , "gcClassStats" , new Object[] { null }, new String[] {String[].class.getName()}); + int count = 0; + try (Scanner s = new Scanner(result)) { + if (s.hasNextLine()) { + System.out.println(s.nextLine()); + } + while (s.hasNextLine()) { + String l = s.nextLine(); + if (l.endsWith(pattern)) { + count++; + System.out.println(l); + } + } + } + return count; + } + catch (Exception e) { + throw new RuntimeException("Test failed because we can't read the class statistics!", e); + } + } + + private static void printClassStats(int expectedCount, boolean reportError) { + int count = getClassStats("DefineClass"); + String res = "Should have " + expectedCount + + " DefineClass instances and we have: " + count; + System.out.println(res); + if (reportError && count != expectedCount) { + throw new RuntimeException(res); + } + } + + public static final int ITERATIONS = 10; + + public static void main(String[] args) throws Exception { + String myName = DefineClass.class.getName(); + byte[] buf = getBytecodes(myName.substring(myName.lastIndexOf(".") + 1)); + int iterations = (args.length > 1 ? Integer.parseInt(args[1]) : ITERATIONS); + + if (args.length == 0 || "defineClass".equals(args[0])) { + MyClassLoader cl = new MyClassLoader(); + for (int i = 0; i < iterations; i++) { + try { + @SuppressWarnings("unchecked") + Class dc = (Class) cl.myDefineClass(myName, buf, 0, buf.length); + System.out.println(dc); + } + catch (LinkageError jle) { + // Can only define once! + if (i == 0) throw new Exception("Should succeed the first time."); + } + } + // We expect to have two instances of DefineClass here: the initial version in which we are + // executing and another version which was loaded into our own classloader 'MyClassLoader'. + // All the subsequent attempts to reload DefineClass into our 'MyClassLoader' should have failed. + printClassStats(2, false); + System.gc(); + System.out.println("System.gc()"); + // At least after System.gc() the failed loading attempts should leave no instances around! + printClassStats(2, true); + } + else if ("defineSystemClass".equals(args[0])) { + MyClassLoader cl = new MyClassLoader(); + int index = getStringIndex("test/DefineClass", buf); + replaceString(buf, "java/DefineClass", index); + while ((index = getStringIndex("Ltest/DefineClass;", buf, index + 1)) != 0) { + replaceString(buf, "Ljava/DefineClass;", index); + } + index = getStringIndex("test.DefineClass", buf); + replaceString(buf, "java.DefineClass", index); + + for (int i = 0; i < iterations; i++) { + try { + @SuppressWarnings("unchecked") + Class dc = (Class) cl.myDefineClass(null, buf, 0, buf.length); + throw new RuntimeException("Defining a class in the 'java' package should fail!"); + } + catch (java.lang.SecurityException jlse) { + // Expected, because we're not allowed to define a class in the 'java' package + } + } + // We expect to stay with one (the initial) instances of DefineClass. + // All the subsequent attempts to reload DefineClass into the 'java' package should have failed. + printClassStats(1, false); + System.gc(); + System.out.println("System.gc()"); + // At least after System.gc() the failed loading attempts should leave no instances around! + printClassStats(1, true); + } + else if ("defineClassParallel".equals(args[0])) { + MyParallelClassLoader pcl = new MyParallelClassLoader(); + CountDownLatch stop = new CountDownLatch(1); + + Thread[] threads = new Thread[iterations]; + for (int i = 0; i < iterations; i++) { + (threads[i] = new ParallelLoadingThread(pcl, buf, stop)).start(); + } + stop.countDown(); // start parallel class loading.. + // ..and wait until all threads loaded the class + for (int i = 0; i < iterations; i++) { + threads[i].join(); + } + System.out.print("Counted " + pcl.getLinkageErrors() + " LinkageErrors "); + System.out.println(pcl.getLinkageErrors() == 0 ? + "" : "(use -XX:+UnsyncloadClass and/or -XX:+AllowParallelDefineClass to avoid this)"); + System.gc(); + System.out.println("System.gc()"); + // After System.gc() we expect to remain with two instances: one is the initial version which is + // kept alive by this main method and another one in the parallel class loader. + printClassStats(2, true); + } + else if ("redefineClass".equals(args[0])) { + loadInstrumentationAgent(myName, buf); + int index = getStringIndex("AAAAAAAA", buf); + CountDownLatch stop = new CountDownLatch(1); + + Thread[] threads = new Thread[iterations]; + for (int i = 0; i < iterations; i++) { + buf[index] = (byte) ('A' + i + 1); // Change string constant in getID() which is legal in redefinition + instrumentation.redefineClasses(new ClassDefinition(DefineClass.class, buf)); + DefineClass dc = DefineClass.class.newInstance(); + CountDownLatch start = new CountDownLatch(1); + (threads[i] = new MyThread(dc, start, stop)).start(); + start.await(); // Wait until the new thread entered the getID() method + } + // We expect to have one instance for each redefinition because they are all kept alive by an activation + // plus the initial version which is kept active by this main method. + printClassStats(iterations + 1, false); + stop.countDown(); // Let all threads leave the DefineClass.getID() activation.. + // ..and wait until really all of them returned from DefineClass.getID() + for (int i = 0; i < iterations; i++) { + threads[i].join(); + } + System.gc(); + System.out.println("System.gc()"); + // After System.gc() we expect to remain with two instances: one is the initial version which is + // kept alive by this main method and another one which is the latest redefined version. + printClassStats(2, true); + } + else if ("redefineClassWithError".equals(args[0])) { + loadInstrumentationAgent(myName, buf); + int index = getStringIndex("getID", buf); + + for (int i = 0; i < iterations; i++) { + buf[index] = (byte) 'X'; // Change getID() to XetID() which is illegal in redefinition + try { + instrumentation.redefineClasses(new ClassDefinition(DefineClass.class, buf)); + throw new RuntimeException("Class redefinition isn't allowed to change method names!"); + } + catch (UnsupportedOperationException uoe) { + // Expected because redefinition can't change the name of methods + } + } + // We expect just a single DefineClass instance because failed redefinitions should + // leave no garbage around. + printClassStats(1, false); + System.gc(); + System.out.println("System.gc()"); + // At least after a System.gc() we should definitely stay with a single instance! + printClassStats(1, true); + } + } +} From 6e97034144a05d594407d25a5e595e94000fc0a6 Mon Sep 17 00:00:00 2001 From: Phil Race Date: Fri, 10 Feb 2017 10:20:22 -0800 Subject: [PATCH 140/447] 8172967: [macosx] Exception while working with layout for text containing unmappable character Reviewed-by: serb, psadhukhan --- .../classes/sun/font/CompositeStrike.java | 4 +- .../sun/font/ExtendedTextSourceLabel.java | 6 ++- .../native/libfontmanager/hb-jdk-font.cc | 3 ++ .../MissingCodePointLayoutTest.java | 40 +++++++++++++++++++ 4 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 jdk/test/java/awt/font/TextLayout/MissingCodePointLayoutTest.java diff --git a/jdk/src/java.desktop/share/classes/sun/font/CompositeStrike.java b/jdk/src/java.desktop/share/classes/sun/font/CompositeStrike.java index 7d3685fdaa7..be6092f61f8 100644 --- a/jdk/src/java.desktop/share/classes/sun/font/CompositeStrike.java +++ b/jdk/src/java.desktop/share/classes/sun/font/CompositeStrike.java @@ -71,7 +71,9 @@ public final class CompositeStrike extends FontStrike { } PhysicalStrike getStrikeForSlot(int slot) { - + if (slot >= strikes.length) { + slot = 0; + } PhysicalStrike strike = strikes[slot]; if (strike == null) { strike = diff --git a/jdk/src/java.desktop/share/classes/sun/font/ExtendedTextSourceLabel.java b/jdk/src/java.desktop/share/classes/sun/font/ExtendedTextSourceLabel.java index 67aee9e18db..7653d4d5c34 100644 --- a/jdk/src/java.desktop/share/classes/sun/font/ExtendedTextSourceLabel.java +++ b/jdk/src/java.desktop/share/classes/sun/font/ExtendedTextSourceLabel.java @@ -626,7 +626,11 @@ class ExtendedTextSourceLabel extends ExtendedTextLabel implements Decoration.La glyphinfo = gv.getGlyphInfo(); } catch (Exception e) { - System.out.println(source); + if (DEBUG) { + System.err.println(source); + e.printStackTrace(); + } + glyphinfo = new float[gv.getNumGlyphs() * numvals]; } int numGlyphs = gv.getNumGlyphs(); diff --git a/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc b/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc index 8d817243038..027d8d790d7 100644 --- a/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc +++ b/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc @@ -52,6 +52,9 @@ hb_jdk_get_glyph (hb_font_t *font HB_UNUSED, *glyph = (hb_codepoint_t) env->CallIntMethod(font2D, sunFontIDs.f2dCharToGlyphMID, u); + if ((int)*glyph < 0) { + *glyph = 0; + } return (*glyph != 0); } diff --git a/jdk/test/java/awt/font/TextLayout/MissingCodePointLayoutTest.java b/jdk/test/java/awt/font/TextLayout/MissingCodePointLayoutTest.java new file mode 100644 index 00000000000..3d1ff85dbe6 --- /dev/null +++ b/jdk/test/java/awt/font/TextLayout/MissingCodePointLayoutTest.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + */ + +/* @test + * @summary Verify no exception for unsupported code point. + * @bug 8172967 + */ +import java.awt.Font; +import java.awt.font.FontRenderContext; +import java.awt.font.TextLayout; + +public class MissingCodePointLayoutTest { + public static void main(String[] args) { + Font font = new Font("Tahoma", Font.PLAIN, 12); + String text = "\ude00"; + FontRenderContext frc = new FontRenderContext(null, false, false); + TextLayout layout = new TextLayout(text, font, frc); + layout.getCaretShapes(0); + } +} + From 62274dc8df8cce1c201c187d79b3eda08e3b85ea Mon Sep 17 00:00:00 2001 From: Mandy Chung Date: Fri, 10 Feb 2017 10:26:46 -0800 Subject: [PATCH 141/447] 8174739: Rename JMOD section name for native libraries from native to lib Reviewed-by: alanb --- .../share/classes/jdk/internal/jmod/JmodFile.java | 2 +- .../jdk/tools/jlink/builder/DefaultImageBuilder.java | 2 +- .../jlink/internal/AbstractResourcePoolEntry.java | 2 +- .../jlink/internal/plugins/ExcludeVMPlugin.java | 12 ++++++------ .../jdk/tools/jlink/resources/plugins.properties | 2 +- jdk/test/tools/jlink/JLinkNegativeTest.java | 2 +- .../tools/jlink/plugins/ExcludeVMPluginTest.java | 10 +++++----- jdk/test/tools/jmod/JmodTest.java | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/jdk/src/java.base/share/classes/jdk/internal/jmod/JmodFile.java b/jdk/src/java.base/share/classes/jdk/internal/jmod/JmodFile.java index 289a80fdca6..e95037c7b6e 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/jmod/JmodFile.java +++ b/jdk/src/java.base/share/classes/jdk/internal/jmod/JmodFile.java @@ -78,7 +78,7 @@ public class JmodFile implements AutoCloseable { HEADER_FILES("include"), LEGAL_NOTICES("legal"), MAN_PAGES("man"), - NATIVE_LIBS("native"), + NATIVE_LIBS("lib"), NATIVE_CMDS("bin"); private final String jmodDir; diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/builder/DefaultImageBuilder.java b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/builder/DefaultImageBuilder.java index 3c2cfbd8e90..3081a631496 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/builder/DefaultImageBuilder.java +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/builder/DefaultImageBuilder.java @@ -362,7 +362,7 @@ public final class DefaultImageBuilder implements ImageBuilder { String module = "/" + entry.moduleName() + "/"; String filename = entry.path().substring(module.length()); - // Remove radical native|config|... + // Remove radical lib|config|... return filename.substring(filename.indexOf('/') + 1); } diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/AbstractResourcePoolEntry.java b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/AbstractResourcePoolEntry.java index 55408a867ea..8cb71fbfa19 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/AbstractResourcePoolEntry.java +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/AbstractResourcePoolEntry.java @@ -38,7 +38,7 @@ import jdk.tools.jlink.plugin.ResourcePoolEntry; *
    10. For jimage content: /{module name}/{package1}/.../{packageN}/{file * name}
    11. *
    12. For other files (shared lib, launchers, config, ...):/{module name}/ - * {@literal bin|conf|native}/{dir1}>/.../{dirN}/{file name}
    13. + * {@literal bin|conf|lib}/{dir1}>/.../{dirN}/{file name} * */ abstract class AbstractResourcePoolEntry implements ResourcePoolEntry { diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeVMPlugin.java b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeVMPlugin.java index 20e7ef26b1f..ab0af0182d6 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeVMPlugin.java +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeVMPlugin.java @@ -95,9 +95,9 @@ public final class ExcludeVMPlugin implements Plugin { /** * VM paths: - * /java.base/native/{architecture}/{server|client|minimal}/{shared lib} - * e.g.: /java.base/native/amd64/server/libjvm.so - * /java.base/native/server/libjvm.dylib + * /java.base/lib/{architecture}/{server|client|minimal}/{shared lib} + * e.g.: /java.base/lib/server/libjvm.so + * /java.base/lib/server/libjvm.dylib */ private List getVMs(ResourcePoolModule javaBase, String[] jvmlibs) { List ret = javaBase.entries().filter((t) -> { @@ -198,17 +198,17 @@ public final class ExcludeVMPlugin implements Plugin { } case CLIENT: { target = Jvm.CLIENT; - exclude = "/java.base/native**server/**,/java.base/native**minimal/**"; + exclude = "/java.base/lib**server/**,/java.base/lib**minimal/**"; break; } case SERVER: { target = Jvm.SERVER; - exclude = "/java.base/native**client/**,/java.base/native**minimal/**"; + exclude = "/java.base/lib**client/**,/java.base/lib**minimal/**"; break; } case MINIMAL: { target = Jvm.MINIMAL; - exclude = "/java.base/native**server/**,/java.base/native**client/**"; + exclude = "/java.base/lib**server/**,/java.base/lib**client/**"; break; } default: { diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties index 4b1327b253a..a889d101b1e 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties @@ -62,7 +62,7 @@ are different. exclude-files.argument= of files to exclude exclude-files.description=\ -Specify files to exclude. e.g.: **.java,glob:/java.base/native/client/** +Specify files to exclude. e.g.: **.java,glob:/java.base/lib/client/** exclude-resources.argument= resources to exclude diff --git a/jdk/test/tools/jlink/JLinkNegativeTest.java b/jdk/test/tools/jlink/JLinkNegativeTest.java index b97092e4bac..93d1b4c849b 100644 --- a/jdk/test/tools/jlink/JLinkNegativeTest.java +++ b/jdk/test/tools/jlink/JLinkNegativeTest.java @@ -250,7 +250,7 @@ public class JLinkNegativeTest { String moduleName = "hacked4"; Path jmod = helper.generateDefaultJModule(moduleName).assertSuccess(); JImageGenerator.addFiles(jmod, - new InMemoryFile("/native", new byte[0]), + new InMemoryFile("/lib", new byte[0]), new InMemoryFile("/conf", new byte[0]), new InMemoryFile("/bin", new byte[0])); try { diff --git a/jdk/test/tools/jlink/plugins/ExcludeVMPluginTest.java b/jdk/test/tools/jlink/plugins/ExcludeVMPluginTest.java index f581e9bad90..ee4bfabe4b7 100644 --- a/jdk/test/tools/jlink/plugins/ExcludeVMPluginTest.java +++ b/jdk/test/tools/jlink/plugins/ExcludeVMPluginTest.java @@ -155,10 +155,10 @@ public class ExcludeVMPluginTest { String[] winput = new String[input.length]; String[] woutput = new String[expectedOutput.length]; for (int i = 0; i < input.length; i++) { - winput[i] = "/java.base/native" + arch + input[i]; + winput[i] = "/java.base/lib" + arch + input[i]; } for (int i = 0; i < expectedOutput.length; i++) { - woutput[i] = "/java.base/native" + arch + expectedOutput[i]; + woutput[i] = "/java.base/lib" + arch + expectedOutput[i]; } doCheckVM(vm, winput, jvmcfg, woutput, expectdJvmCfg); } @@ -169,7 +169,7 @@ public class ExcludeVMPluginTest { byte[] jvmcfgContent = jvmcfg.getBytes(); ResourcePoolManager poolMgr = new ResourcePoolManager(); poolMgr.add( - ResourcePoolEntry.create("/java.base/native/jvm.cfg", + ResourcePoolEntry.create("/java.base/lib/jvm.cfg", ResourcePoolEntry.Type.NATIVE_LIB, jvmcfgContent)); // java.base/module-info.class is used by exclude vm plugin @@ -192,7 +192,7 @@ public class ExcludeVMPluginTest { p.configure(config); ResourcePool out = p.transform(poolMgr.resourcePool(), outMgr.resourcePoolBuilder()); - String newContent = new String(out.findEntry("/java.base/native/jvm.cfg").get().contentBytes()); + String newContent = new String(out.findEntry("/java.base/lib/jvm.cfg").get().contentBytes()); if (!expectdJvmCfg.equals(newContent)) { throw new Exception("Got content " + newContent + " expected " + expectdJvmCfg); @@ -209,7 +209,7 @@ public class ExcludeVMPluginTest { } out.entries().forEach(md -> { - if (md.path().equals("/java.base/native/jvm.cfg") || + if (md.path().equals("/java.base/lib/jvm.cfg") || md.path().equals("/java.base/module-info.class")) { return; } diff --git a/jdk/test/tools/jmod/JmodTest.java b/jdk/test/tools/jmod/JmodTest.java index 27dc8396e74..0439678dd0b 100644 --- a/jdk/test/tools/jmod/JmodTest.java +++ b/jdk/test/tools/jmod/JmodTest.java @@ -66,7 +66,7 @@ public class JmodTest { static final String CLASSES_PREFIX = "classes/"; static final String CMDS_PREFIX = "bin/"; - static final String LIBS_PREFIX = "native/"; + static final String LIBS_PREFIX = "lib/"; static final String CONFIGS_PREFIX = "conf/"; @BeforeTest From 6d8a15972e55b04abafc69aae780fea5267679da Mon Sep 17 00:00:00 2001 From: Robert Field Date: Fri, 10 Feb 2017 13:49:42 -0800 Subject: [PATCH 142/447] 8174762: JShell: @since tags missing Reviewed-by: jjg --- .../share/classes/jdk/jshell/DeclarationSnippet.java | 2 ++ langtools/src/jdk.jshell/share/classes/jdk/jshell/Diag.java | 2 ++ .../jdk.jshell/share/classes/jdk/jshell/ErroneousSnippet.java | 2 ++ .../jdk.jshell/share/classes/jdk/jshell/EvalException.java | 2 ++ .../share/classes/jdk/jshell/ExpressionSnippet.java | 2 ++ .../jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java | 2 ++ langtools/src/jdk.jshell/share/classes/jdk/jshell/JShell.java | 2 ++ .../jdk.jshell/share/classes/jdk/jshell/JShellException.java | 2 ++ .../jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java | 2 ++ .../share/classes/jdk/jshell/OuterImportSnippetWrap.java | 2 +- .../share/classes/jdk/jshell/OuterSnippetsClassWrap.java | 2 +- .../src/jdk.jshell/share/classes/jdk/jshell/OuterWrapMap.java | 2 +- .../share/classes/jdk/jshell/PersistentSnippet.java | 2 ++ .../src/jdk.jshell/share/classes/jdk/jshell/Snippet.java | 2 ++ .../src/jdk.jshell/share/classes/jdk/jshell/SnippetEvent.java | 2 ++ .../share/classes/jdk/jshell/SourceCodeAnalysis.java | 1 + .../jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java | 2 ++ .../jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java | 2 ++ .../classes/jdk/jshell/UnresolvedReferenceException.java | 2 ++ .../src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java | 2 ++ .../classes/jdk/jshell/execution/DirectExecutionControl.java | 1 + .../jshell/execution/FailOverExecutionControlProvider.java | 2 ++ .../jdk/jshell/execution/JdiDefaultExecutionControl.java | 1 + .../classes/jdk/jshell/execution/JdiExecutionControl.java | 4 +++- .../jdk/jshell/execution/JdiExecutionControlProvider.java | 2 ++ .../share/classes/jdk/jshell/execution/JdiInitiator.java | 2 ++ .../share/classes/jdk/jshell/execution/LoaderDelegate.java | 2 ++ .../classes/jdk/jshell/execution/LocalExecutionControl.java | 1 + .../jdk/jshell/execution/LocalExecutionControlProvider.java | 2 ++ .../classes/jdk/jshell/execution/RemoteExecutionControl.java | 1 + .../jdk/jshell/execution/StreamingExecutionControl.java | 1 + .../jdk.jshell/share/classes/jdk/jshell/execution/Util.java | 1 + .../share/classes/jdk/jshell/execution/package-info.java | 2 ++ .../src/jdk.jshell/share/classes/jdk/jshell/package-info.java | 2 ++ .../share/classes/jdk/jshell/spi/ExecutionControl.java | 2 ++ .../classes/jdk/jshell/spi/ExecutionControlProvider.java | 2 ++ .../jdk.jshell/share/classes/jdk/jshell/spi/ExecutionEnv.java | 1 + .../share/classes/jdk/jshell/spi/SPIResolutionException.java | 2 ++ .../jdk.jshell/share/classes/jdk/jshell/spi/package-info.java | 1 + .../share/classes/jdk/jshell/tool/JavaShellToolBuilder.java | 2 ++ .../share/classes/jdk/jshell/tool/package-info.java | 2 ++ langtools/src/jdk.jshell/share/classes/module-info.java | 2 ++ 42 files changed, 73 insertions(+), 4 deletions(-) diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java index f1645e358da..26a349a01cc 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java @@ -45,6 +45,8 @@ import jdk.jshell.Key.DeclarationKey; * DeclarationSnippet is immutable: an access to * any of its methods will always return the same result. * and thus is thread-safe. + * + * @since 9 */ public abstract class DeclarationSnippet extends PersistentSnippet { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/Diag.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/Diag.java index 4d527fc3faa..56f615d8d18 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/Diag.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/Diag.java @@ -30,6 +30,8 @@ import javax.tools.Diagnostic; /** * Diagnostic information for a Snippet. + * + * @since 9 * @see jdk.jshell.JShell#diagnostics(jdk.jshell.Snippet) */ public abstract class Diag { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/ErroneousSnippet.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/ErroneousSnippet.java index 80793ecee91..9f2acde9298 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/ErroneousSnippet.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/ErroneousSnippet.java @@ -34,6 +34,8 @@ import jdk.jshell.Key.ErroneousKey; * ErroneousSnippet is immutable: an access to * any of its methods will always return the same result. * and thus is thread-safe. + * + * @since 9 */ public class ErroneousSnippet extends Snippet { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/EvalException.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/EvalException.java index 27c351d635f..70883742d59 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/EvalException.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/EvalException.java @@ -38,6 +38,8 @@ package jdk.jshell; * the Snippet id and for snippets without a method name (for example an * expression) StackTraceElement.getMethodName() will be the * empty string. + * + * @since 9 */ @SuppressWarnings("serial") // serialVersionUID intentionally omitted public class EvalException extends JShellException { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java index 4501f76b1e9..547cb4cca1b 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java @@ -34,6 +34,8 @@ import jdk.jshell.Key.ExpressionKey; * ExpressionSnippet is immutable: an access to * any of its methods will always return the same result. * and thus is thread-safe. + * + * @since 9 * @jls 15: Expression. */ public class ExpressionSnippet extends Snippet { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java index e4b2e65594c..58c5a7ee253 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java @@ -34,6 +34,8 @@ import jdk.jshell.Key.ImportKey; * {@code ImportSnippet} is immutable: an access to * any of its methods will always return the same result. * and thus is thread-safe. + * + * @since 9 * @jls 8.3: importDeclaration. */ public class ImportSnippet extends PersistentSnippet { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/JShell.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/JShell.java index b9c7b9a3439..372c30e092b 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/JShell.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/JShell.java @@ -79,7 +79,9 @@ import static jdk.jshell.Util.expunge; *

      * This class is not thread safe, except as noted, all access should be through * a single thread. + * * @author Robert Field + * @since 9 */ public class JShell implements AutoCloseable { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/JShellException.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/JShellException.java index 721bf1e6c47..a9fe6a0caf8 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/JShellException.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/JShellException.java @@ -27,6 +27,8 @@ package jdk.jshell; /** * The superclass of JShell generated exceptions + * + * @since 9 */ @SuppressWarnings("serial") // serialVersionUID intentionally omitted public class JShellException extends Exception { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java index 317b4d6fd67..6a17f286eec 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java @@ -35,6 +35,8 @@ import jdk.jshell.Key.MethodKey; * MethodSnippet is immutable: an access to * any of its methods will always return the same result. * and thus is thread-safe. + * + * @since 9 * @jls 8.4: MethodDeclaration. */ public class MethodSnippet extends DeclarationSnippet { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java index de1d1a2f64f..5bbd48a14c5 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java @@ -32,7 +32,7 @@ import javax.tools.JavaFileObject; * The outer wrap for a set of snippets wrapped in a generated class * @author Robert Field */ -public class OuterImportSnippetWrap extends OuterWrap { +class OuterImportSnippetWrap extends OuterWrap { private final Snippet snippet; diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/OuterSnippetsClassWrap.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/OuterSnippetsClassWrap.java index 5a58ade38cc..61e6585c6bf 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/OuterSnippetsClassWrap.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/OuterSnippetsClassWrap.java @@ -35,7 +35,7 @@ import jdk.jshell.Wrap.CompoundWrap; * The outer wrap for a set of snippets wrapped in a generated class * @author Robert Field */ -public class OuterSnippetsClassWrap extends OuterWrap { +class OuterSnippetsClassWrap extends OuterWrap { private final String className; private final LinkedHashMap wrapToSnippet; diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/OuterWrapMap.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/OuterWrapMap.java index 29f4351f691..8311c8e4203 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/OuterWrapMap.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/OuterWrapMap.java @@ -44,7 +44,7 @@ import static jdk.jshell.Util.asLetters; * * @author Robert Field */ -public class OuterWrapMap { +class OuterWrapMap { private final JShell state; private final Map classOuters = new HashMap<>(); diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/PersistentSnippet.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/PersistentSnippet.java index b615c78e1dc..01b0b1414a7 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/PersistentSnippet.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/PersistentSnippet.java @@ -34,6 +34,8 @@ package jdk.jshell; * PersistentSnippet is immutable: an access to * any of its methods will always return the same result. * and thus is thread-safe. + * + * @since 9 */ public abstract class PersistentSnippet extends Snippet { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java index 3268dd61a02..116245ba6af 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java @@ -39,7 +39,9 @@ import java.util.List; * state engine, query {@code JShell} passing the Snippet. *

      * Because it is immutable, {@code Snippet} (and subclasses) is thread-safe. + * * @author Robert Field + * @since 9 * @see jdk.jshell.JShell#status */ public abstract class Snippet { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/SnippetEvent.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/SnippetEvent.java index 683038bbb26..f18fa429339 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/SnippetEvent.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/SnippetEvent.java @@ -38,7 +38,9 @@ import jdk.jshell.Snippet.Status; * {@code SnippetEvent} is immutable: an access to * any of its methods will always return the same result. * and thus is thread-safe. + * * @author Robert Field + * @since 9 */ public class SnippetEvent { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysis.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysis.java index cd20f77d9f3..3645474a0b8 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysis.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysis.java @@ -39,6 +39,7 @@ import java.util.List; * etc. * Also includes completion suggestions, as might be used in tab-completion. * + * @since 9 */ public abstract class SourceCodeAnalysis { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java index 9e9fef8c135..423bfd71259 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java @@ -34,6 +34,8 @@ import jdk.jshell.Key.StatementKey; * StatementSnippet is immutable: an access to * any of its methods will always return the same result. * and thus is thread-safe. + * + * @since 9 * @jls 14.5: Statement. */ public class StatementSnippet extends Snippet { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java index 49d49a80fcc..0e71784ec08 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java @@ -36,6 +36,8 @@ import jdk.jshell.Key.TypeDeclKey; * TypeDeclSnippet is immutable: an access to * any of its methods will always return the same result. * and thus is thread-safe. + * + * @since 9 */ public class TypeDeclSnippet extends DeclarationSnippet { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/UnresolvedReferenceException.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/UnresolvedReferenceException.java index be91686eff3..0bc2918d75f 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/UnresolvedReferenceException.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/UnresolvedReferenceException.java @@ -36,6 +36,8 @@ package jdk.jshell; * the Snippet id and for snippets without a method name (for example an * expression) StackTraceElement.getName() will be the * empty string. + * + * @since 9 */ @SuppressWarnings("serial") // serialVersionUID intentionally omitted public class UnresolvedReferenceException extends JShellException { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java index aaa25ded741..3757c55ceab 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java @@ -35,6 +35,8 @@ import jdk.jshell.Key.VarKey; * VarSnippet is immutable: an access to * any of its methods will always return the same result. * and thus is thread-safe. + * + * @since 9 * @jls 8.3: FieldDeclaration. */ public class VarSnippet extends DeclarationSnippet { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java index d40e10a59a1..c6a220fbdf6 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java @@ -39,6 +39,7 @@ import jdk.jshell.spi.SPIResolutionException; * * @author Robert Field * @author Jan Lahoda + * @since 9 */ public class DirectExecutionControl implements ExecutionControl { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/FailOverExecutionControlProvider.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/FailOverExecutionControlProvider.java index 4894efc7b1b..090a3ddddda 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/FailOverExecutionControlProvider.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/FailOverExecutionControlProvider.java @@ -37,6 +37,8 @@ import jdk.jshell.spi.ExecutionEnv; /** * Tries other providers in sequence until one works. + * + * @since 9 */ public class FailOverExecutionControlProvider implements ExecutionControlProvider{ diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java index 18e10aafee7..c4c2ff09259 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java @@ -61,6 +61,7 @@ import static jdk.jshell.execution.Util.remoteInputOutput; * * @author Robert Field * @author Jan Lahoda + * @since 9 */ public class JdiDefaultExecutionControl extends JdiExecutionControl { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControl.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControl.java index 2d27a3d5f06..cf07818856a 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControl.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControl.java @@ -37,7 +37,9 @@ import jdk.jshell.spi.ExecutionControl; import static java.util.stream.Collectors.toMap; /** - * Abstract JDI implementation of {@link jdk.jshell.spi.ExecutionControl} + * Abstract JDI implementation of {@link jdk.jshell.spi.ExecutionControl}. + * + * @since 9 */ public abstract class JdiExecutionControl extends StreamingExecutionControl implements ExecutionControl { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControlProvider.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControlProvider.java index 21531ed9bcc..e80bd071351 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControlProvider.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControlProvider.java @@ -35,7 +35,9 @@ import jdk.jshell.spi.ExecutionEnv; /** * A provider of remote JDI-controlled execution engines. + * * @author Robert Field + * @since 9 */ public class JdiExecutionControlProvider implements ExecutionControlProvider { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiInitiator.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiInitiator.java index d53cc81ba43..bba5b97d8d7 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiInitiator.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiInitiator.java @@ -47,6 +47,8 @@ import com.sun.jdi.connect.IllegalConnectorArgumentsException; /** * Sets up a JDI connection, providing the resulting JDI {@link VirtualMachine} * and the {@link Process} the remote agent is running in. + * + * @since 9 */ public class JdiInitiator { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/LoaderDelegate.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/LoaderDelegate.java index b1d7e33a32f..7a1566c67a9 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/LoaderDelegate.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/LoaderDelegate.java @@ -34,6 +34,8 @@ import jdk.jshell.spi.ExecutionControl.NotImplementedException; * This interface specifies the loading specific subset of * {@link jdk.jshell.spi.ExecutionControl}. For use in encapsulating the * {@link java.lang.ClassLoader} implementation. + * + * @since 9 */ public interface LoaderDelegate { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java index 97c7cc3b6a7..c17ceb8fb6a 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java @@ -33,6 +33,7 @@ import java.util.concurrent.atomic.AtomicReference; * in the same JVM as the JShell-core. * * @author Grigory Ptashko + * @since 9 */ public class LocalExecutionControl extends DirectExecutionControl { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControlProvider.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControlProvider.java index bda448bbf31..cc3879c5c6d 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControlProvider.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControlProvider.java @@ -32,7 +32,9 @@ import jdk.jshell.spi.ExecutionEnv; /** * A provider of execution engines which run in the same process as JShell. + * * @author Robert Field + * @since 9 */ public class LocalExecutionControlProvider implements ExecutionControlProvider{ diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteExecutionControl.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteExecutionControl.java index c0d95c54daa..3a1a4eaeb99 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteExecutionControl.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteExecutionControl.java @@ -45,6 +45,7 @@ import static jdk.jshell.execution.Util.forwardExecutionControlAndIO; * * @author Jan Lahoda * @author Robert Field + * @since 9 */ public class RemoteExecutionControl extends DirectExecutionControl implements ExecutionControl { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java index 60552894212..7c4d8fb5790 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java @@ -37,6 +37,7 @@ import static jdk.jshell.execution.RemoteCodes.*; * execution takes place. * * @author Robert Field + * @since 9 */ public class StreamingExecutionControl implements ExecutionControl { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java index 4005decf440..abcbcf0beee 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java @@ -53,6 +53,7 @@ import jdk.jshell.spi.ExecutionControl.ExecutionControlException; * * @author Jan Lahoda * @author Robert Field + * @since 9 */ public class Util { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/package-info.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/package-info.java index 6127c103353..0e9c896ffee 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/package-info.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/package-info.java @@ -30,5 +30,7 @@ * Also, provides related communication utilities. * This package may be used to define alternative execution engines. * The default JShell execution engine is included. + * + * @since 9 */ package jdk.jshell.execution; diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/package-info.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/package-info.java index 7e96546d450..ce3728b15da 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/package-info.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/package-info.java @@ -140,6 +140,8 @@ * provide source boundary and completeness analysis to address cases like * those. SourceCodeAnalysis also provides suggested completions * of input, as might be used in tab-completion. + * + * @since 9 */ diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControl.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControl.java index a054f99c108..82de0fb1a05 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControl.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControl.java @@ -45,6 +45,8 @@ import java.util.Set; *

      * Methods defined in this interface should only be called by the core JShell * implementation. + * + * @since 9 */ public interface ExecutionControl extends AutoCloseable { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControlProvider.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControlProvider.java index 393fb98a059..2ebbbc64ee9 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControlProvider.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControlProvider.java @@ -33,7 +33,9 @@ import java.util.Map; * evaluate Snippets. Alternate execution engines can be created by * implementing this interface, then configuring JShell with the provider or * the providers name and parameter specifier. + * * @author Robert Field + * @since 9 */ public interface ExecutionControlProvider { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionEnv.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionEnv.java index f98f989961b..36780b96af4 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionEnv.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionEnv.java @@ -36,6 +36,7 @@ import java.util.List; * This interface is designed to provide the access to core JShell functionality * needed to implement ExecutionControl. * + * @since 9 * @see ExecutionControl */ public interface ExecutionEnv { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/SPIResolutionException.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/SPIResolutionException.java index f15ed8d81d7..c9199ab7495 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/SPIResolutionException.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/SPIResolutionException.java @@ -33,6 +33,8 @@ package jdk.jshell.spi; *

      * This exception is seen by the execution engine, but not seen by * the end user nor through the JShell API. + * + * @since 9 */ @SuppressWarnings("serial") // serialVersionUID intentionally omitted public class SPIResolutionException extends RuntimeException { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/package-info.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/package-info.java index c5abd85a27c..bda0f8341b5 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/package-info.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/spi/package-info.java @@ -66,6 +66,7 @@ *

    14. failover:1(jdi),2(jdi:launch(true),timeout(3000)),3(local)
    15. * * + * @since 9 * @see jdk.jshell.execution for execution implementation support */ package jdk.jshell.spi; diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/tool/JavaShellToolBuilder.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/tool/JavaShellToolBuilder.java index 1712977b81b..72713e40dbc 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/tool/JavaShellToolBuilder.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/tool/JavaShellToolBuilder.java @@ -40,6 +40,8 @@ import jdk.internal.jshell.tool.JShellToolBuilder; * configuration methods have sensible defaults which will be used if they are * not called.. After zero or more calls to configuration methods, the tool is * launched with a call to {@link #run(java.lang.String...) }. + * + * @since 9 */ public interface JavaShellToolBuilder { diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/tool/package-info.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/tool/package-info.java index 83a5cdf41c9..eb008f7e17a 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/tool/package-info.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/tool/package-info.java @@ -47,6 +47,8 @@ * .run("--feedback", "silent", "MyStart"); * } * + * + * @since 9 */ diff --git a/langtools/src/jdk.jshell/share/classes/module-info.java b/langtools/src/jdk.jshell/share/classes/module-info.java index 6c8311292a1..e174b99a0e2 100644 --- a/langtools/src/jdk.jshell/share/classes/module-info.java +++ b/langtools/src/jdk.jshell/share/classes/module-info.java @@ -51,6 +51,8 @@ * independent, operate at different levels, and do not share functionality or * definitions. *

      + * + * @since 9 */ module jdk.jshell { requires transitive java.compiler; From f7c7a3c8b2c89d749756f2a30f386834f3369a0c Mon Sep 17 00:00:00 2001 From: Michael McMahon Date: Fri, 10 Feb 2017 21:58:45 +0000 Subject: [PATCH 143/447] 8174745: Httpclient source update for JDK 8 Reviewed-by: dfuchs --- .../jdk/incubator/http/AsyncSSLDelegate.java | 2 + .../jdk/incubator/http/DefaultPublisher.java | 6 +- .../jdk/incubator/http/HttpResponse.java | 62 +------------------ .../incubator/http/ResponseProcessors.java | 2 +- .../jdk/incubator/http/SSLDelegate.java | 2 + .../http/internal/common/MinimalFuture.java | 1 - .../incubator/http/internal/common/Queue.java | 8 ++- .../incubator/http/internal/common/Utils.java | 24 ++++++- .../internal/websocket/FrameConsumer.java | 34 +++------- .../websocket/UTF8AccumulatingDecoder.java | 9 ++- .../internal/websocket/WebSocketImpl.java | 21 +++---- 11 files changed, 61 insertions(+), 110 deletions(-) diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/AsyncSSLDelegate.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/AsyncSSLDelegate.java index 2ee78648f87..d8f98ad18b3 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/AsyncSSLDelegate.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/AsyncSSLDelegate.java @@ -609,11 +609,13 @@ class AsyncSSLDelegate implements ExceptionallyCloseable, AsyncConnection { } // SSLParameters.getApplicationProtocols() can't return null + // JDK 8 EXCL START for (String approto : p.getApplicationProtocols()) { sb.append("\n application protocol: {") .append(params.size()).append("}"); params.add(approto); } + // JDK 8 EXCL END if (p.getProtocols() != null) { for (String protocol : p.getProtocols()) { diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/DefaultPublisher.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/DefaultPublisher.java index 7d8d8967924..ea0137b4bbe 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/DefaultPublisher.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/DefaultPublisher.java @@ -91,11 +91,13 @@ class DefaultPublisher implements Flow.Publisher { for (long i = 0; i < nbItemsDemanded && !done.get(); i++) { try { Optional item = Objects.requireNonNull(supplier.get()); - item.ifPresentOrElse(subscriber::onNext, () -> { + if (item.isPresent()) { + subscriber.onNext(item.get()); + } else { if (done.compareAndSet(false, true)) { subscriber.onComplete(); } - }); + } } catch (RuntimeException e) { if (done.compareAndSet(false, true)) { subscriber.onError(e); diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpResponse.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpResponse.java index e11d2d4ef76..427b70a759d 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpResponse.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpResponse.java @@ -30,6 +30,8 @@ import java.io.UncheckedIOException; import java.net.URI; import jdk.incubator.http.ResponseProcessors.MultiFile; import jdk.incubator.http.ResponseProcessors.MultiProcessorImpl; +import static jdk.incubator.http.internal.common.Utils.unchecked; +import static jdk.incubator.http.internal.common.Utils.charsetFrom; import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; @@ -269,19 +271,6 @@ public abstract class HttpResponse { }; } - /** - * Get the Charset from the Content-encoding header. Defaults to - * UTF_8 - */ - private static Charset charsetFrom(HttpHeaders headers) { - String encoding = headers.firstValue("Content-encoding") - .orElse("UTF_8"); - try { - return Charset.forName(encoding); - } catch (IllegalArgumentException e) { - return StandardCharsets.UTF_8; - } - } /** * Returns a {@code BodyHandler} that returns a @@ -342,10 +331,6 @@ public abstract class HttpResponse { }; } - private static UncheckedIOException unchecked(IOException e) { - return new UncheckedIOException(e); - } - /** * Returns a {@code BodyHandler} that returns a * {@link BodyProcessor BodyProcessor}{@code } obtained from @@ -743,48 +728,5 @@ public abstract class HttpResponse { return asMap(pushHandler, true); } - /** - * Returns a {@code MultiProcessor} which writes the response bodies to - * files under a given root directory and which returns an aggregate - * response map that is a {@code Map>}. - * The keyset of the {@code Map} represents the original request and any - * additional requests generated by the server. The values are the - * responses containing the paths of the destination files. Each file - * uses the URI path of the request relative to the destination parent - * directorycprovided. - * - *

      - * All incoming additional requests (push promises) are accepted by this - * multi response processor. Errors are effectively ignored and any - * failed responses are simply omitted from the result {@code Map}. - * Other implementations of {@code MultiProcessor} may handle these - * situations. - * - *

      - * Example usage - *

      -         * {@code
      -         *    HttpClient client = ..
      -         *    HttpRequest request = HttpRequest
      -         *               .create(new URI("https://www.foo.com/"))
      -         *               .version(Version.HTTP2)
      -         *               .GET();
      -         *
      -         *    Map>> map = client
      -         *               .sendAsync(HttpResponse.MultiProcessor.multiFile("/usr/destination"))
      -         *               .join();
      -         *
      -         * }
      -         * 
      - * TEMPORARILY REMOVING THIS FROM API. MIGHT NOT BE NEEDED. - * - * @param destination the destination parent directory of all response - * bodies - * @return a MultiProcessor - */ - private static MultiProcessor,Path> multiFile(Path destination) { - MultiFile mf = new MultiFile(destination); - return new MultiProcessorImpl(mf::handlePush, true); - } } } diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ResponseProcessors.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ResponseProcessors.java index 5b37b0472fe..586c76dc80d 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ResponseProcessors.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ResponseProcessors.java @@ -252,7 +252,7 @@ class ResponseProcessors { @Override public void onError(HttpRequest request, Throwable t) { - results.put(request, CompletableFuture.failedFuture(t)); + results.put(request, MinimalFuture.failedFuture(t)); } @Override diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/SSLDelegate.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/SSLDelegate.java index 781587e01fc..02eaefd4618 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/SSLDelegate.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/SSLDelegate.java @@ -449,9 +449,11 @@ class SSLDelegate { for (String cipher : p.getCipherSuites()) { System.out.printf("cipher: %s\n", cipher); } + // JDK 8 EXCL START for (String approto : p.getApplicationProtocols()) { System.out.printf("application protocol: %s\n", approto); } + // JDK 8 EXCL END for (String protocol : p.getProtocols()) { System.out.printf("protocol: %s\n", protocol); } diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/MinimalFuture.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/MinimalFuture.java index 1219f8ba5f5..78dd707b957 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/MinimalFuture.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/MinimalFuture.java @@ -110,7 +110,6 @@ public final class MinimalFuture extends CompletableFuture { } } - @Override public MinimalFuture newIncompleteFuture() { return new MinimalFuture<>(); } diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/Queue.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/Queue.java index a1f236441e2..2f1d256a5b4 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/Queue.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/Queue.java @@ -118,11 +118,13 @@ public class Queue implements ExceptionallyCloseable { public synchronized void closeExceptionally(Throwable t) { if (exception == null) exception = t; else if (t != null && t != exception) { - Stream.of(exception.getSuppressed()) + if (!Stream.of(exception.getSuppressed()) .filter(x -> x == t) .findFirst() - .ifPresentOrElse((x) -> {}, - () -> exception.addSuppressed(t)); + .isPresent()) + { + exception.addSuppressed(t); + } } close(); } diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/Utils.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/Utils.java index 9ca85f6deb9..15dc5a7a8de 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/Utils.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/Utils.java @@ -32,12 +32,14 @@ import javax.net.ssl.SSLParameters; import java.io.ByteArrayOutputStream; import java.io.Closeable; import java.io.IOException; +import java.io.UncheckedIOException; import java.io.PrintStream; import java.io.UnsupportedEncodingException; import java.net.NetPermission; import java.net.URI; import java.net.URLPermission; import java.nio.ByteBuffer; +import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.security.AccessController; import java.security.PrivilegedAction; @@ -54,6 +56,7 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.LinkedBlockingQueue; import java.util.function.Predicate; +import jdk.incubator.http.HttpHeaders; /** * Miscellaneous utilities @@ -259,9 +262,11 @@ public final class Utils { SSLParameters p1 = new SSLParameters(); p1.setAlgorithmConstraints(p.getAlgorithmConstraints()); p1.setCipherSuites(p.getCipherSuites()); + // JDK 8 EXCL START p1.setEnableRetransmissions(p.getEnableRetransmissions()); - p1.setEndpointIdentificationAlgorithm(p.getEndpointIdentificationAlgorithm()); p1.setMaximumPacketSize(p.getMaximumPacketSize()); + // JDK 8 EXCL END + p1.setEndpointIdentificationAlgorithm(p.getEndpointIdentificationAlgorithm()); p1.setNeedClientAuth(p.getNeedClientAuth()); String[] protocols = p.getProtocols(); if (protocols != null) { @@ -475,4 +480,21 @@ public final class Utils { return newb; } + /** + * Get the Charset from the Content-encoding header. Defaults to + * UTF_8 + */ + public static Charset charsetFrom(HttpHeaders headers) { + String encoding = headers.firstValue("Content-encoding") + .orElse("UTF_8"); + try { + return Charset.forName(encoding); + } catch (IllegalArgumentException e) { + return StandardCharsets.UTF_8; + } + } + + public static UncheckedIOException unchecked(IOException e) { + return new UncheckedIOException(e); + } } diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/FrameConsumer.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/FrameConsumer.java index ac835965cff..d6b32d704ee 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/FrameConsumer.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/FrameConsumer.java @@ -26,6 +26,7 @@ package jdk.incubator.http.internal.websocket; import jdk.incubator.http.WebSocket.MessagePart; +import jdk.incubator.http.internal.common.Log; import jdk.incubator.http.internal.websocket.Frame.Opcode; import java.nio.ByteBuffer; @@ -33,13 +34,11 @@ import java.nio.CharBuffer; import java.nio.charset.CharacterCodingException; import static java.lang.String.format; -import static java.lang.System.Logger.Level.TRACE; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; import static jdk.incubator.http.internal.common.Utils.dump; import static jdk.incubator.http.internal.websocket.StatusCodes.NO_STATUS_CODE; import static jdk.incubator.http.internal.websocket.StatusCodes.checkIncomingCode; -import static jdk.incubator.http.internal.websocket.WebSocketImpl.logger; /* * Consumes frame parts and notifies a message consumer, when there is @@ -71,17 +70,13 @@ class FrameConsumer implements Frame.Consumer { @Override public void fin(boolean value) { - if (logger.isLoggable(TRACE)) { - logger.log(TRACE, "Reading fin: {0}", value); - } + Log.logTrace("Reading fin: {0}", value); fin = value; } @Override public void rsv1(boolean value) { - if (logger.isLoggable(TRACE)) { - logger.log(TRACE, "Reading rsv1: {0}", value); - } + Log.logTrace("Reading rsv1: {0}", value); if (value) { throw new FailWebSocketException("Unexpected rsv1 bit"); } @@ -89,9 +84,7 @@ class FrameConsumer implements Frame.Consumer { @Override public void rsv2(boolean value) { - if (logger.isLoggable(TRACE)) { - logger.log(TRACE, "Reading rsv2: {0}", value); - } + Log.logTrace("Reading rsv2: {0}", value); if (value) { throw new FailWebSocketException("Unexpected rsv2 bit"); } @@ -99,9 +92,7 @@ class FrameConsumer implements Frame.Consumer { @Override public void rsv3(boolean value) { - if (logger.isLoggable(TRACE)) { - logger.log(TRACE, "Reading rsv3: {0}", value); - } + Log.logTrace("Reading rsv3: {0}", value); if (value) { throw new FailWebSocketException("Unexpected rsv3 bit"); } @@ -109,7 +100,7 @@ class FrameConsumer implements Frame.Consumer { @Override public void opcode(Opcode v) { - logger.log(TRACE, "Reading opcode: {0}", v); + Log.logTrace("Reading opcode: {0}", v); if (v == Opcode.PING || v == Opcode.PONG || v == Opcode.CLOSE) { if (!fin) { throw new FailWebSocketException("Fragmented control frame " + v); @@ -137,9 +128,7 @@ class FrameConsumer implements Frame.Consumer { @Override public void mask(boolean value) { - if (logger.isLoggable(TRACE)) { - logger.log(TRACE, "Reading mask: {0}", value); - } + Log.logTrace("Reading mask: {0}", value); if (value) { throw new FailWebSocketException("Masked frame received"); } @@ -147,10 +136,7 @@ class FrameConsumer implements Frame.Consumer { @Override public void payloadLen(long value) { - if (logger.isLoggable(TRACE)) { - // Checked for being loggable because of autoboxing of 'value' - logger.log(TRACE, "Reading payloadLen: {0}", value); - } + Log.logTrace("Reading payloadLen: {0}", value); if (opcode.isControl()) { if (value > 125) { throw new FailWebSocketException( @@ -178,9 +164,7 @@ class FrameConsumer implements Frame.Consumer { @Override public void payloadData(ByteBuffer data) { - if (logger.isLoggable(TRACE)) { - logger.log(TRACE, "Reading payloadData: data={0}", data); - } + Log.logTrace("Reading payloadData: data={0}", data); unconsumedPayloadLen -= data.remaining(); boolean isLast = unconsumedPayloadLen == 0; if (opcode.isControl()) { diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/UTF8AccumulatingDecoder.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/UTF8AccumulatingDecoder.java index 753630419ca..0a166ccf288 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/UTF8AccumulatingDecoder.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/UTF8AccumulatingDecoder.java @@ -25,6 +25,8 @@ package jdk.incubator.http.internal.websocket; +import jdk.incubator.http.internal.common.Log; + import java.nio.ByteBuffer; import java.nio.CharBuffer; import java.nio.charset.CharacterCodingException; @@ -32,10 +34,8 @@ import java.nio.charset.CharsetDecoder; import java.nio.charset.CoderResult; import java.nio.charset.CodingErrorAction; -import static java.lang.System.Logger.Level.WARNING; import static java.nio.charset.StandardCharsets.UTF_8; import static jdk.incubator.http.internal.common.Utils.EMPTY_BYTEBUFFER; -import static jdk.incubator.http.internal.websocket.WebSocketImpl.logger; final class UTF8AccumulatingDecoder { @@ -74,9 +74,8 @@ final class UTF8AccumulatingDecoder { // Since it's UTF-8, the assumption is leftovers.remaining() < 4 // (i.e. small). Otherwise a shared buffer should be used if (!(leftovers.remaining() < 4)) { - logger.log(WARNING, - "The size of decoding leftovers is greater than expected: {0}", - leftovers.remaining()); + Log.logError("The size of decoding leftovers is greater than expected: {0}", + leftovers.remaining()); } b.position(b.limit()); // As if we always read to the end // Decoder promises that in the case of endOfInput == true: diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/WebSocketImpl.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/WebSocketImpl.java index afc92c3fcbb..863211d5948 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/WebSocketImpl.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/WebSocketImpl.java @@ -26,6 +26,7 @@ package jdk.incubator.http.internal.websocket; import jdk.incubator.http.WebSocket; +import jdk.incubator.http.internal.common.Log; import jdk.incubator.http.internal.common.Pair; import jdk.incubator.http.internal.websocket.OpeningHandshake.Result; import jdk.incubator.http.internal.websocket.OutgoingMessage.Binary; @@ -47,8 +48,6 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Consumer; import java.util.function.Function; -import static java.lang.System.Logger.Level.ERROR; -import static java.lang.System.Logger.Level.TRACE; import static java.util.Objects.requireNonNull; import static java.util.concurrent.CompletableFuture.failedFuture; import static jdk.incubator.http.internal.common.Pair.pair; @@ -61,8 +60,6 @@ import static jdk.incubator.http.internal.websocket.StatusCodes.checkOutgoingCod */ final class WebSocketImpl implements WebSocket { - static final System.Logger logger = System.getLogger("jdk.httpclient.WebSocket"); - private final URI uri; private final String subprotocol; private final RawChannel channel; @@ -142,7 +139,7 @@ final class WebSocketImpl implements WebSocket { try { channel.close(); } catch (IOException e) { - logger.log(ERROR, e); + Log.logError(e); } finally { closed.set(true); } @@ -168,14 +165,14 @@ final class WebSocketImpl implements WebSocket { private void signalError(Throwable error) { synchronized (lock) { if (lastMethodInvoked) { - logger.log(ERROR, error); + Log.logError(error); } else { lastMethodInvoked = true; receiver.close(); try { listener.onError(this, error); } catch (Exception e) { - logger.log(ERROR, e); + Log.logError(e); } } } @@ -190,7 +187,7 @@ final class WebSocketImpl implements WebSocket { try { channel.shutdownInput(); } catch (IOException e) { - logger.log(ERROR, e); + Log.logError(e); } boolean wasComplete = !closeReceived.complete(null); if (wasComplete) { @@ -210,7 +207,7 @@ final class WebSocketImpl implements WebSocket { enqueueClose(new Close(code, "")) .whenComplete((r1, error1) -> { if (error1 != null) { - logger.log(ERROR, error1); + Log.logError(error1); } }); }); @@ -223,14 +220,14 @@ final class WebSocketImpl implements WebSocket { private CompletionStage signalClose(int statusCode, String reason) { synchronized (lock) { if (lastMethodInvoked) { - logger.log(TRACE, "Close: {0}, ''{1}''", statusCode, reason); + Log.logTrace("Close: {0}, ''{1}''", statusCode, reason); } else { lastMethodInvoked = true; receiver.close(); try { return listener.onClose(this, statusCode, reason); } catch (Exception e) { - logger.log(ERROR, e); + Log.logError(e); } } } @@ -289,7 +286,7 @@ final class WebSocketImpl implements WebSocket { try { channel.shutdownOutput(); } catch (IOException e) { - logger.log(ERROR, e); + Log.logError(e); } boolean wasComplete = !closeSent.complete(null); if (wasComplete) { From 0fcd98980cdc7cd37470d2fffb253b69c50ab43c Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Fri, 10 Feb 2017 15:42:17 -0800 Subject: [PATCH 144/447] 8174104: Compiler does not allow non-existent module path entry Reviewed-by: jlahoda --- .../com/sun/tools/javac/file/Locations.java | 5 ++++ .../IllegalArgumentForOption.java | 4 +-- .../tools/javac/modules/ModulePathTest.java | 27 ++++++++++++++++--- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java index e14fb7d5eee..ba17c502b71 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java @@ -985,6 +985,11 @@ public class Locations { } private void checkValidModulePathEntry(Path p) { + if (!Files.exists(p)) { + // warning may be generated later + return; + } + if (Files.isDirectory(p)) { // either an exploded module or a directory of modules return; diff --git a/langtools/test/tools/javac/diags/examples/IllegalArgumentForOption/IllegalArgumentForOption.java b/langtools/test/tools/javac/diags/examples/IllegalArgumentForOption/IllegalArgumentForOption.java index 90c2c1fb79b..429fe7ed3e1 100644 --- a/langtools/test/tools/javac/diags/examples/IllegalArgumentForOption/IllegalArgumentForOption.java +++ b/langtools/test/tools/javac/diags/examples/IllegalArgumentForOption/IllegalArgumentForOption.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,7 +22,7 @@ */ // key: compiler.err.illegal.argument.for.option -// options: --module-path doesNotExist +// options: --module-source-path=abc*def // run: simple class X {} diff --git a/langtools/test/tools/javac/modules/ModulePathTest.java b/langtools/test/tools/javac/modules/ModulePathTest.java index 7315ad10e66..53123b25682 100644 --- a/langtools/test/tools/javac/modules/ModulePathTest.java +++ b/langtools/test/tools/javac/modules/ModulePathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,7 @@ /* * @test + * @bug 8142968 8174104 * @summary tests for --module-path * @library /tools/lib * @modules @@ -57,7 +58,7 @@ public class ModulePathTest extends ModuleTestBase { } @Test - public void testNotExistsOnPath(Path base) throws Exception { + public void testNotExistsOnPath_noWarn(Path base) throws Exception { Path src = base.resolve("src"); tb.writeJavaFiles(src, "class C { }"); @@ -65,11 +66,29 @@ public class ModulePathTest extends ModuleTestBase { .options("-XDrawDiagnostics", "--module-path", "doesNotExist") .files(findJavaFiles(src)) - .run(Task.Expect.FAIL) + .run(Task.Expect.SUCCESS) .writeAll() .getOutput(Task.OutputKind.DIRECT); - if (!log.contains("- compiler.err.illegal.argument.for.option: --module-path, doesNotExist")) + if (!log.isEmpty()) + throw new Exception("unexpected output"); + } + + @Test + public void testNotExistsOnPath_warn(Path base) throws Exception { + Path src = base.resolve("src"); + tb.writeJavaFiles(src, "class C { }"); + + String log = new JavacTask(tb, Task.Mode.CMDLINE) + .options("-XDrawDiagnostics", + "-Xlint:path", + "--module-path", "doesNotExist") + .files(findJavaFiles(src)) + .run(Task.Expect.SUCCESS) + .writeAll() + .getOutput(Task.OutputKind.DIRECT); + + if (!log.contains("- compiler.warn.path.element.not.found: doesNotExist")) throw new Exception("expected output not found"); } From e1cff30e7692a8d09b06c33232ac8a48d5d771be Mon Sep 17 00:00:00 2001 From: David Holmes Date: Sun, 12 Feb 2017 20:21:31 -0500 Subject: [PATCH 145/447] 8174798: Mis-merge left serviceability/sa/TestCpoolForInvokeDynamic.java ignored Reviewed-by: dcubed --- hotspot/test/serviceability/sa/TestCpoolForInvokeDynamic.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hotspot/test/serviceability/sa/TestCpoolForInvokeDynamic.java b/hotspot/test/serviceability/sa/TestCpoolForInvokeDynamic.java index e8f1fd86703..901fbab83ef 100644 --- a/hotspot/test/serviceability/sa/TestCpoolForInvokeDynamic.java +++ b/hotspot/test/serviceability/sa/TestCpoolForInvokeDynamic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -51,7 +51,6 @@ import jdk.test.lib.Asserts; * jdk.hotspot.agent/sun.jvm.hotspot.oops * jdk.hotspot.agent/sun.jvm.hotspot.debugger * jdk.hotspot.agent/sun.jvm.hotspot.ui.classbrowser - * @ignore 8169232 * @run main/othervm TestCpoolForInvokeDynamic */ From ad981f39b51a478fae4861758ea207a10683fbc5 Mon Sep 17 00:00:00 2001 From: Hamlin Li Date: Sun, 12 Feb 2017 18:37:38 -0800 Subject: [PATCH 146/447] 8174699: Fix @since in module-info.java in dev/nashorn repo Reviewed-by: jlaskey --- nashorn/src/jdk.dynalink/share/classes/module-info.java | 2 ++ .../jdk.scripting.nashorn.shell/share/classes/module-info.java | 2 ++ .../src/jdk.scripting.nashorn/share/classes/module-info.java | 2 ++ 3 files changed, 6 insertions(+) diff --git a/nashorn/src/jdk.dynalink/share/classes/module-info.java b/nashorn/src/jdk.dynalink/share/classes/module-info.java index 9e9fcbc3d20..963a1d43141 100644 --- a/nashorn/src/jdk.dynalink/share/classes/module-info.java +++ b/nashorn/src/jdk.dynalink/share/classes/module-info.java @@ -216,6 +216,8 @@ * language runtime B gets passed to code from language runtime A, the linker * from B will get a chance to link the call site in A when it encounters the * object from B. + * + * @since 9 */ module jdk.dynalink { requires java.logging; diff --git a/nashorn/src/jdk.scripting.nashorn.shell/share/classes/module-info.java b/nashorn/src/jdk.scripting.nashorn.shell/share/classes/module-info.java index 790fc62b366..2ed4857862b 100644 --- a/nashorn/src/jdk.scripting.nashorn.shell/share/classes/module-info.java +++ b/nashorn/src/jdk.scripting.nashorn.shell/share/classes/module-info.java @@ -25,6 +25,8 @@ /** * Nashorn shell module + * + * @since 9 */ module jdk.scripting.nashorn.shell { requires java.desktop; diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/module-info.java b/nashorn/src/jdk.scripting.nashorn/share/classes/module-info.java index 83b41891f51..2e19def917d 100644 --- a/nashorn/src/jdk.scripting.nashorn/share/classes/module-info.java +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/module-info.java @@ -89,6 +89,8 @@ arrays and back, and so on.

      Other non-standard built-in objects

      In addition to {@code Java}, Nashorn also exposes some other non-standard built-in objects: {@code JSAdapter}, {@code JavaImporter}, {@code Packages} + +@since 9 */ module jdk.scripting.nashorn { requires java.logging; From 0fe169142588e3499904e6192569682828cc12ed Mon Sep 17 00:00:00 2001 From: Jayathirth D V Date: Mon, 13 Feb 2017 12:13:20 +0530 Subject: [PATCH 147/447] 7107905: ColorModel subclasses are missing hashCode() or equals() or both methods Reviewed-by: prr, flar --- .../classes/java/awt/image/ColorModel.java | 111 ++++---- .../java/awt/image/ComponentColorModel.java | 57 +++- .../java/awt/image/IndexColorModel.java | 102 ++++++- .../java/awt/image/PackedColorModel.java | 48 +++- .../java/awt/image/ColorModel/EqualsTest.java | 86 ++++++ .../ComponentColorModelEqualsTest.java | 118 +++++++++ .../IndexColorModelEqualsTest.java | 250 ++++++++++++++++++ .../PackedColorModelEqualsTest.java | 119 +++++++++ 8 files changed, 816 insertions(+), 75 deletions(-) create mode 100644 jdk/test/java/awt/image/ColorModel/EqualsTest.java create mode 100644 jdk/test/java/awt/image/ComponentColorModel/ComponentColorModelEqualsTest.java create mode 100644 jdk/test/java/awt/image/IndexColorModel/IndexColorModelEqualsTest.java create mode 100644 jdk/test/java/awt/image/PackedColorModel/PackedColorModelEqualsTest.java diff --git a/jdk/src/java.desktop/share/classes/java/awt/image/ColorModel.java b/jdk/src/java.desktop/share/classes/java/awt/image/ColorModel.java index 9c226320a0b..07e823ce6aa 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/image/ColorModel.java +++ b/jdk/src/java.desktop/share/classes/java/awt/image/ColorModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,10 +31,10 @@ import java.awt.color.ICC_ColorSpace; import sun.java2d.cmm.CMSManager; import sun.java2d.cmm.ColorTransform; import sun.java2d.cmm.PCMM; -import java.awt.Toolkit; import java.util.Collections; import java.util.Map; import java.util.WeakHashMap; +import java.util.Arrays; /** * The {@code ColorModel} abstract class encapsulates the @@ -362,7 +362,14 @@ public abstract class ColorModel implements Transparency{ this.transparency = transparency; } - nBits = bits.clone(); + /* + * We need significant bits value only for the length + * of number of components, so we truncate remaining part. + * It also helps in hashCode calculation since bits[] can contain + * different values after the length of number of components between + * two ColorModels. + */ + nBits = Arrays.copyOf(bits, numComponents); this.pixel_bits = pixel_bits; if (pixel_bits <= 0) { throw new IllegalArgumentException("Number of pixel bits must "+ @@ -1441,69 +1448,53 @@ public abstract class ColorModel implements Transparency{ } /** - * Tests if the specified {@code Object} is an instance of - * {@code ColorModel} and if it equals this - * {@code ColorModel}. - * @param obj the {@code Object} to test for equality - * @return {@code true} if the specified {@code Object} - * is an instance of {@code ColorModel} and equals this - * {@code ColorModel}; {@code false} otherwise. + * This method simply delegates to the default implementation in {@code Object} + * which is identical to an {@code ==} test since this class cannot enforce the + * issues of a proper equality test among multiple independent subclass + * branches. + * Subclasses are encouraged to override this method and provide equality + * testing for their own properties in addition to equality tests for the + * following common base properties of {@code ColorModel}: + *
        + *
      • Support for alpha component.
      • + *
      • Is alpha premultiplied.
      • + *
      • Number of bits per pixel.
      • + *
      • Type of transparency like Opaque, Bitmask or Translucent.
      • + *
      • Number of components in a pixel.
      • + *
      • {@code ColorSpace} type.
      • + *
      • Type of the array used to represent pixel values.
      • + *
      • Number of significant bits per color and alpha component.
      • + *
      + * @param obj the reference object with which to compare. + * @return {@code true} if this object is the same as the obj + * argument; {@code false} otherwise. */ + @Override public boolean equals(Object obj) { - if (!(obj instanceof ColorModel)) { - return false; - } - ColorModel cm = (ColorModel) obj; - - if (this == cm) { - return true; - } - if (supportsAlpha != cm.hasAlpha() || - isAlphaPremultiplied != cm.isAlphaPremultiplied() || - pixel_bits != cm.getPixelSize() || - transparency != cm.getTransparency() || - numComponents != cm.getNumComponents()) - { - return false; - } - - int[] nb = cm.getComponentSize(); - - if ((nBits != null) && (nb != null)) { - for (int i = 0; i < numComponents; i++) { - if (nBits[i] != nb[i]) { - return false; - } - } - } else { - return ((nBits == null) && (nb == null)); - } - - return true; + return super.equals(obj); } /** - * Returns the hash code for this ColorModel. - * - * @return a hash code for this ColorModel. + * This method simply delegates to the default implementation in {@code Object} + * which returns the system ID for the class. + * Subclasses are encouraged to override this method and provide a hash + * for their own properties in addition to hashing the values of the + * following common base properties of {@code ColorModel}: + *
        + *
      • Support for alpha component.
      • + *
      • Is alpha premultiplied.
      • + *
      • Number of bits per pixel.
      • + *
      • Type of transparency like Opaque, Bitmask or Translucent.
      • + *
      • Number of components in a pixel.
      • + *
      • {@code ColorSpace} type.
      • + *
      • Type of the array used to represent pixel values.
      • + *
      • Number of significant bits per color and alpha component.
      • + *
      + * @return a hash code value for this object. */ + @Override public int hashCode() { - - int result = 0; - - result = (supportsAlpha ? 2 : 3) + - (isAlphaPremultiplied ? 4 : 5) + - pixel_bits * 6 + - transparency * 7 + - numComponents * 8; - - if (nBits != null) { - for (int i = 0; i < numComponents; i++) { - result = result + nBits[i] * (i + 9); - } - } - - return result; + return super.hashCode(); } /** @@ -1961,4 +1952,4 @@ public abstract class ColorModel implements Transparency{ return lg16Toog16LUT; } -} +} \ No newline at end of file diff --git a/jdk/src/java.desktop/share/classes/java/awt/image/ComponentColorModel.java b/jdk/src/java.desktop/share/classes/java/awt/image/ComponentColorModel.java index 60c5b0dfbd2..1e6a4d9c337 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/image/ComponentColorModel.java +++ b/jdk/src/java.desktop/share/classes/java/awt/image/ComponentColorModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ package java.awt.image; import java.awt.color.ColorSpace; import java.awt.color.ICC_ColorSpace; +import java.util.Arrays; /** * A {@code ColorModel} class that works with pixel values that @@ -200,6 +201,7 @@ public class ComponentColorModel extends ColorModel { private float[] diffMinMax; private float[] compOffset; private float[] compScale; + private volatile int hashCode; /** * Constructs a {@code ComponentColorModel} from the specified @@ -2927,22 +2929,59 @@ public class ComponentColorModel extends ColorModel { } /** - * Compares this color model with another for equality. - * - * @param obj The object to compare with this color model. - * @return {@code true} if the color model objects are equal, - * {@code false} if they are not. + * Tests if the specified {@code Object} is an instance + * of {@code ComponentColorModel} and equals this + * {@code ComponentColorModel}. + * @param obj the {@code Object} to test for equality + * @return {@code true} if the specified {@code Object} + * is an instance of {@code ComponentColorModel} and equals this + * {@code ComponentColorModel}; {@code false} otherwise. */ + @Override public boolean equals(Object obj) { - if (!super.equals(obj)) { + if (!(obj instanceof ComponentColorModel)) { return false; } - if (obj.getClass() != getClass()) { + ComponentColorModel cm = (ComponentColorModel) obj; + if (supportsAlpha != cm.hasAlpha() || + isAlphaPremultiplied != cm.isAlphaPremultiplied() || + pixel_bits != cm.getPixelSize() || + transparency != cm.getTransparency() || + numComponents != cm.getNumComponents() || + (!(colorSpace.equals(cm.colorSpace))) || + transferType != cm.transferType) + { + return false; + } + + if (!(Arrays.equals(nBits, cm.getComponentSize()))) { return false; } return true; } -} + /** + * Returns the hash code for this ComponentColorModel. + * + * @return a hash code for this ComponentColorModel. + */ + @Override + public int hashCode() { + int result = hashCode; + if (result == 0) { + result = 7; + result = 89 * result + this.pixel_bits; + result = 89 * result + Arrays.hashCode(this.nBits); + result = 89 * result + this.transparency; + result = 89 * result + (this.supportsAlpha ? 1 : 0); + result = 89 * result + (this.isAlphaPremultiplied ? 1 : 0); + result = 89 * result + this.numComponents; + result = 89 * result + this.colorSpace.hashCode(); + result = 89 * result + this.transferType; + hashCode = result; + } + return result; + } +} \ No newline at end of file diff --git a/jdk/src/java.desktop/share/classes/java/awt/image/IndexColorModel.java b/jdk/src/java.desktop/share/classes/java/awt/image/IndexColorModel.java index bc6e8051f89..3a172c142e2 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/image/IndexColorModel.java +++ b/jdk/src/java.desktop/share/classes/java/awt/image/IndexColorModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,6 +28,7 @@ package java.awt.image; import java.awt.Transparency; import java.awt.color.ColorSpace; import java.math.BigInteger; +import java.util.Arrays; /** * The {@code IndexColorModel} class is a {@code ColorModel} @@ -129,6 +130,7 @@ public class IndexColorModel extends ColorModel { private int transparent_index = -1; private boolean allgrayopaque; private BigInteger validBits; + private volatile int hashCode; private sun.awt.image.BufImgSurfaceData.ICMColorData colorData = null; @@ -1532,4 +1534,100 @@ public class IndexColorModel extends ColorModel { + " isAlphaPre = "+isAlphaPremultiplied ); } -} + + /** + * Tests if the specified {@code Object} is an + * instance of {@code IndexColorModel} + * and if it equals this {@code IndexColorModel} + * @param obj the {@code Object} to test for equality + * @return {@code true} if the specified {@code Object} + * equals this {@code IndexColorModel}; {@code false} otherwise. + */ + @Override + public boolean equals(Object obj) { + + if (!(obj instanceof IndexColorModel)) { + return false; + } + + IndexColorModel cm = (IndexColorModel) obj; + if (supportsAlpha != cm.hasAlpha() || + isAlphaPremultiplied != cm.isAlphaPremultiplied() || + pixel_bits != cm.getPixelSize() || + transparency != cm.getTransparency() || + numComponents != cm.getNumComponents() || + (!(colorSpace.equals(cm.colorSpace))) || + transferType != cm.transferType || + map_size != cm.map_size || + transparent_index != cm.transparent_index) + { + return false; + } + + if (!(Arrays.equals(nBits, cm.getComponentSize()))) { + return false; + } + + // verify whether we have to check equality of all bits in validBits + boolean testValidBits; + if (validBits == cm.validBits) { + testValidBits = false; + } else if (validBits == null || cm.validBits == null) { + return false; + } else if (validBits.equals(cm.validBits)) { + testValidBits = false; + } else { + testValidBits = true; + } + + if (testValidBits) { + for (int i = 0; i < map_size; i++) { + if (rgb[i] != cm.rgb[i] || + validBits.testBit(i) != cm.validBits.testBit(i)) + { + return false; + } + } + } else { + for (int i = 0; i < map_size; i++) { + if (rgb[i] != cm.rgb[i]) { + return false; + } + } + } + return true; + } + + /** + * Returns the hash code for IndexColorModel. + * + * @return a hash code for IndexColorModel + */ + @Override + public int hashCode() { + int result = hashCode; + if (result == 0) { + /* + * We are intentionally not calculating hashCode for validBits, + * because it is only used for 8-bit indexed screens and they + * are very rare. It is very unlikely for 2 IndexColorModels + * to have different valiBits and have same value for all + * other properties. + */ + result = 7; + result = 89 * result + this.pixel_bits; + result = 89 * result + Arrays.hashCode(this.nBits); + result = 89 * result + this.transparency; + result = 89 * result + (this.supportsAlpha ? 1 : 0); + result = 89 * result + (this.isAlphaPremultiplied ? 1 : 0); + result = 89 * result + this.numComponents; + result = 89 * result + this.colorSpace.hashCode(); + result = 89 * result + this.transferType; + result = 89 * result + Arrays.hashCode(this.rgb); + result = 89 * result + this.map_size; + result = 89 * result + this.transparent_index; + hashCode = result; + } + return result; + } +} \ No newline at end of file diff --git a/jdk/src/java.desktop/share/classes/java/awt/image/PackedColorModel.java b/jdk/src/java.desktop/share/classes/java/awt/image/PackedColorModel.java index 0db6ff17441..bb432f9d513 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/image/PackedColorModel.java +++ b/jdk/src/java.desktop/share/classes/java/awt/image/PackedColorModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ package java.awt.image; import java.awt.Transparency; import java.awt.color.ColorSpace; +import java.util.Arrays; /** * The {@code PackedColorModel} class is an abstract @@ -88,6 +89,7 @@ public abstract class PackedColorModel extends ColorModel { int[] maskArray; int[] maskOffsets; float[] scaleFactors; + private volatile int hashCode; /** * Constructs a {@code PackedColorModel} from a color mask array, @@ -393,25 +395,63 @@ public abstract class PackedColorModel extends ColorModel { * is an instance of {@code PackedColorModel} and equals this * {@code PackedColorModel}; {@code false} otherwise. */ + @Override public boolean equals(Object obj) { if (!(obj instanceof PackedColorModel)) { return false; } - if (!super.equals(obj)) { + PackedColorModel cm = (PackedColorModel) obj; + + if (supportsAlpha != cm.hasAlpha() || + isAlphaPremultiplied != cm.isAlphaPremultiplied() || + pixel_bits != cm.getPixelSize() || + transparency != cm.getTransparency() || + numComponents != cm.getNumComponents() || + (!(colorSpace.equals(cm.colorSpace))) || + transferType != cm.transferType) + { return false; } - PackedColorModel cm = (PackedColorModel) obj; int numC = cm.getNumComponents(); for(int i=0; i < numC; i++) { if (maskArray[i] != cm.getMask(i)) { return false; } } + + if (!(Arrays.equals(nBits, cm.getComponentSize()))) { + return false; + } + return true; } + /** + * Returns the hash code for this PackedColorModel. + * + * @return a hash code for this PackedColorModel. + */ + @Override + public int hashCode() { + int result = hashCode; + if (result == 0) { + result = 7; + result = 89 * result + this.pixel_bits; + result = 89 * result + Arrays.hashCode(this.nBits); + result = 89 * result + this.transparency; + result = 89 * result + (this.supportsAlpha ? 1 : 0); + result = 89 * result + (this.isAlphaPremultiplied ? 1 : 0); + result = 89 * result + this.numComponents; + result = 89 * result + this.colorSpace.hashCode(); + result = 89 * result + this.transferType; + result = 89 * result + Arrays.hashCode(this.maskArray); + hashCode = result; + } + return result; + } + private static final int[] createBitsArray(int[]colorMaskArray, int alphaMask) { int numColors = colorMaskArray.length; @@ -480,4 +520,4 @@ public abstract class PackedColorModel extends ColorModel { return count; } -} +} \ No newline at end of file diff --git a/jdk/test/java/awt/image/ColorModel/EqualsTest.java b/jdk/test/java/awt/image/ColorModel/EqualsTest.java new file mode 100644 index 00000000000..1d2adf73545 --- /dev/null +++ b/jdk/test/java/awt/image/ColorModel/EqualsTest.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4524500 7107905 + * @run main EqualsTest + * @summary Tests whether ColorModel.equals() succeeds using a + * user-implemented subclass of ColorModel which calls the ColorModel(int bits) + * constructor. The test fails if an exception is thrown when equals() + * is called or if equals() returns an incorrect value. + */ + +import java.awt.image.ColorModel; + +public class EqualsTest { + + public static void main(String[] args) { + SimpleColorModel scm1 = new SimpleColorModel(3); + SimpleColorModel scm2 = new SimpleColorModel(3); + SimpleColorModel scm3 = new SimpleColorModel(8); + ColorModel rgbcm = ColorModel.getRGBdefault(); + + try { + if (scm1.equals(scm2)) { + throw new RuntimeException("Test 1 failed: " + + "scm1 should not equal scm2"); + } + + if (scm1.equals(scm3)) { + throw new RuntimeException("Test 2 failed: " + + "scm1 should not equal scm3"); + } + + if (scm1.equals(rgbcm) || rgbcm.equals(scm1)) { + throw new RuntimeException("Test 3 failed: " + + "scm1 should not equal rgbcm"); + } + } catch (Exception e) { + throw new RuntimeException("Test failed: " + e); + } + } + + private static class SimpleColorModel extends ColorModel { + + public SimpleColorModel(int bits) { + super(bits); + } + + public int getRed(int pixel) { + return 0; + } + + public int getGreen(int pixel) { + return 0; + } + + public int getBlue(int pixel) { + return 0; + } + + public int getAlpha(int pixel) { + return 0; + } + } +} diff --git a/jdk/test/java/awt/image/ComponentColorModel/ComponentColorModelEqualsTest.java b/jdk/test/java/awt/image/ComponentColorModel/ComponentColorModelEqualsTest.java new file mode 100644 index 00000000000..995da55c86a --- /dev/null +++ b/jdk/test/java/awt/image/ComponentColorModel/ComponentColorModelEqualsTest.java @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 7107905 + * @summary Test verifies whether equals() and hashCode() methods in + * ComponentColorModel works properly. + * @run main ComponentColorModelEqualsTest + */ + +import java.awt.Transparency; +import java.awt.color.ColorSpace; +import java.awt.image.ComponentColorModel; +import java.awt.image.DataBuffer; + +public class ComponentColorModelEqualsTest { + + private static void verifyEquals(ComponentColorModel m1, + ComponentColorModel m2) { + if (m1.equals(null)) { + throw new RuntimeException("equals(null) returns true"); + } + if (!(m1.equals(m2))) { + throw new RuntimeException("equals() method is not working" + + " properly"); + } + if (!(m2.equals(m1))) { + throw new RuntimeException("equals() method is not working" + + " properly"); + } + if (m1.hashCode() != m2.hashCode()) { + throw new RuntimeException("HashCode is not same for same" + + " ComponentColorModels"); + } + } + + private static void testConstructor1() { + /* + * verify equality with constructor + * ComponentColorModel(ColorSpace colorSpace, + * int[] bits, + * boolean hasAlpha, + * boolean isAlphaPremultiplied, + * int transparency, + * int transferType) + */ + ComponentColorModel model1 = + new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), + new int[] {8, 8, 8}, + false, + false, + Transparency.OPAQUE, + DataBuffer.TYPE_BYTE); + ComponentColorModel model2 = + new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), + new int[] {8, 8, 8}, + false, + false, + Transparency.OPAQUE, + DataBuffer.TYPE_BYTE); + verifyEquals(model1, model2); + } + + private static void testConstructor2() { + /* + * verify equality with constructor + * ComponentColorModel(ColorSpace colorSpace, + * boolean hasAlpha, + * boolean isAlphaPremultiplied, + * int transparency, + * int transferType) + */ + ComponentColorModel model1 = + new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), + false, + false, + Transparency.OPAQUE, + DataBuffer.TYPE_BYTE); + ComponentColorModel model2 = + new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), + false, + false, + Transparency.OPAQUE, + DataBuffer.TYPE_BYTE); + verifyEquals(model1, model2); + } + + private static void testSameComponentColorModel() { + testConstructor1(); + testConstructor2(); + } + public static void main(String[] args) { + // verify ComponentColorModel equality using different constructors. + testSameComponentColorModel(); + } +} + diff --git a/jdk/test/java/awt/image/IndexColorModel/IndexColorModelEqualsTest.java b/jdk/test/java/awt/image/IndexColorModel/IndexColorModelEqualsTest.java new file mode 100644 index 00000000000..edfe7eac8ba --- /dev/null +++ b/jdk/test/java/awt/image/IndexColorModel/IndexColorModelEqualsTest.java @@ -0,0 +1,250 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 7107905 + * @summary Test verifies whether equals() and hashCode() methods in + * IndexColorModel works properly for IndexColorModel unique + * properties. + * @run main IndexColorModelEqualsTest + */ + +import java.awt.image.DataBuffer; +import java.awt.image.IndexColorModel; +import java.math.BigInteger; + +public class IndexColorModelEqualsTest { + + private static void verifyEquals(IndexColorModel m1, + IndexColorModel m2) { + if (m1.equals(null)) { + throw new RuntimeException("equals(null) returns true"); + } + if (!(m1.equals(m2))) { + throw new RuntimeException("equals() method is not working" + + " properly"); + } + if (!(m2.equals(m1))) { + throw new RuntimeException("equals() method is not working" + + " properly"); + } + if (m1.hashCode() != m2.hashCode()) { + throw new RuntimeException("HashCode is not same for same" + + " IndexColorModels"); + } + } + + private static void testColorMapEquality() { + // test with different cmap values. + IndexColorModel model1 = new IndexColorModel(8, 3, new int[] {1, 2, 3}, + 0, true, -1, DataBuffer.TYPE_BYTE); + IndexColorModel model2 = new IndexColorModel(8, 3, new int[] {4, 5, 6}, + 0, true, -1, DataBuffer.TYPE_BYTE); + if (model1.equals(model2)) { + throw new RuntimeException("equals() method is determining" + + " ColorMap equality improperly"); + } + if (model2.equals(model1)) { + throw new RuntimeException("equals() method is determining" + + " ColorMap equality improperly"); + } + } + + private static void testSizeEquality() { + // test with different size for cmap. + IndexColorModel model1 = new IndexColorModel(8, 4, + new int[] {1, 2, 3, 4}, + 0, true, -1, DataBuffer.TYPE_BYTE); + IndexColorModel model2 = new IndexColorModel(8, 3, + new int[] {1, 2, 3}, + 0, true, -1, DataBuffer.TYPE_BYTE); + if (model1.equals(model2)) { + throw new RuntimeException("equals() method is determining" + + " Map size equality improperly"); + } + if (model2.equals(model1)) { + throw new RuntimeException("equals() method is determining" + + " Map size equality improperly"); + } + } + + private static void testTransparentIndexEquality() { + // test with different values for transparent_index. + IndexColorModel model1 = new IndexColorModel(8, 3, new int[] {1, 2, 3}, + 0, true, 1, DataBuffer.TYPE_BYTE); + IndexColorModel model2 = new IndexColorModel(8, 3, new int[] {1, 2, 3}, + 0, true, 2, DataBuffer.TYPE_BYTE); + if (model1.equals(model2)) { + throw new RuntimeException("equals() method is determining" + + " TransparentIndex equality improperly"); + } + if (model2.equals(model1)) { + throw new RuntimeException("equals() method is determining" + + " TransparentIndex equality improperly"); + } + } + + private static void testValidPixelsEquality() { + // test with different valid pixels. + /* + * In setRGBs() function of IndexColorModel we override + * transparent_index value to map to pixel value if alpha is 0x00 + * so we should have atleast minimum alpha value to verify + * equality of validBits thats why we have color value as + * 16777216(2 ^ 24). + */ + int color = 16777216; + IndexColorModel model1 = new IndexColorModel(8, 3, new int[] {color, + color, color}, 0, DataBuffer.TYPE_BYTE, new BigInteger("1")); + IndexColorModel model2 = new IndexColorModel(8, 3, new int[] {color, + color, color}, 0, DataBuffer.TYPE_BYTE, new BigInteger("2")); + if (model1.equals(model2)) { + throw new RuntimeException("equals() method is determining" + + " Valid pixels equality improperly"); + } + if (model2.equals(model1)) { + throw new RuntimeException("equals() method is determining" + + " Valid pixels equality improperly"); + } + } + + private static void testConstructor1() { + /* + * verify equality with constructor + * IndexColorModel(int bits, int size, byte[] r, byte[] g, byte[] b) + */ + IndexColorModel model1 = new IndexColorModel(8, 2, + new byte[] {1, 2}, new byte[] {1, 2}, new byte[] {1, 2}); + IndexColorModel model2 = new IndexColorModel(8, 2, + new byte[] {1, 2}, new byte[] {1, 2}, new byte[] {1, 2}); + verifyEquals(model1, model2); + } + + private static void testConstructor2() { + /* + * verify equality with constructor + * IndexColorModel(int bits, int size, byte[] r, byte[] g, byte[] b, + * byte[] a) + */ + IndexColorModel model1 = new IndexColorModel(8, 2, new byte[] {1, 2}, + new byte[] {1, 2}, new byte[] {1, 2}, new byte[] {1, 2}); + IndexColorModel model2 = new IndexColorModel(8, 2, new byte[] {1, 2}, + new byte[] {1, 2}, new byte[] {1, 2}, new byte[] {1, 2}); + verifyEquals(model1, model2); + } + + private static void testConstructor3() { + /* + * verify equality with constructor + * IndexColorModel(int bits, int size, byte[] r, byte[] g, byte[] b, + * int trans) + */ + IndexColorModel model1 = new IndexColorModel(8, 2, new byte[] {1, 2}, + new byte[] {1, 2}, new byte[] {1, 2}, 1); + IndexColorModel model2 = new IndexColorModel(8, 2, new byte[] {1, 2}, + new byte[] {1, 2}, new byte[] {1, 2}, 1); + verifyEquals(model1, model2); + } + + private static void testConstructor4() { + /* + * verify equality with constructor + * IndexColorModel(int bits, int size, byte[] cmap, int start, + * boolean hasalpha) + */ + IndexColorModel model1 = new IndexColorModel(8, 1, + new byte[] {1, 2, 3, 4}, 0, true); + IndexColorModel model2 = new IndexColorModel(8, 1, + new byte[] {1, 2, 3, 4}, 0, true); + verifyEquals(model1, model2); + } + + private static void testConstructor5() { + /* + * verify equality with constructor + * IndexColorModel(int bits, int size, byte[] cmap, int start, + * boolean hasalpha, int trans) + */ + IndexColorModel model1 = new IndexColorModel(8, 1, + new byte[] {1, 2, 3, 4}, 0, true, 0); + IndexColorModel model2 = new IndexColorModel(8, 1, + new byte[] {1, 2, 3, 4}, 0, true, 0); + verifyEquals(model1, model2); + } + + private static void testConstructor6() { + /* + * verify equality with constructor + * IndexColorModel(int bits, int size, int[] cmap, int start, + * boolean hasalpha, int trans, int transferType) + */ + IndexColorModel model1 = new IndexColorModel(8, 3, new int[] {1, 2, 3}, + 0, true, -1, DataBuffer.TYPE_BYTE); + IndexColorModel model2 = new IndexColorModel(8, 3, new int[] {1, 2, 3}, + 0, true, -1, DataBuffer.TYPE_BYTE); + verifyEquals(model1, model2); + } + + private static void testConstructor7() { + /* + * verify equality with constructor + * IndexColorModel(int bits, int size, int[] cmap, int start, + * int transferType, BigInteger validBits) + */ + /* + * In setRGBs() function of IndexColorModel we override + * transparent_index value to map to pixel value if alpha is 0x00 + * so we should have atleast minimum alpha value to keep + * both model1 and model2 same. + */ + int color = 16777216; + IndexColorModel model1 = new IndexColorModel(8, 3, new int[] {color, + color, color}, 0, DataBuffer.TYPE_BYTE, new BigInteger("1")); + IndexColorModel model2 = new IndexColorModel(8, 3, new int[] {color, + color, color}, 0, DataBuffer.TYPE_BYTE, new BigInteger("1")); + verifyEquals(model1, model2); + } + + private static void testSameIndexColorModel() { + testConstructor1(); + testConstructor2(); + testConstructor3(); + testConstructor4(); + testConstructor5(); + testConstructor6(); + testConstructor7(); + } + public static void main(String[] args) { + /* test whether equals() method works properly for parameters + * unique to IndexColorModel. + */ + testColorMapEquality(); + testSizeEquality(); + testTransparentIndexEquality(); + testValidPixelsEquality(); + // verify same IndexColorModel equality using different constructors. + testSameIndexColorModel(); + } +} + diff --git a/jdk/test/java/awt/image/PackedColorModel/PackedColorModelEqualsTest.java b/jdk/test/java/awt/image/PackedColorModel/PackedColorModelEqualsTest.java new file mode 100644 index 00000000000..bc51557cb81 --- /dev/null +++ b/jdk/test/java/awt/image/PackedColorModel/PackedColorModelEqualsTest.java @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 7107905 + * @summary Test verifies whether equals() and hashCode() methods in + * PackedColorModel works properly. + * @run main PackedColorModelEqualsTest + */ + +import java.awt.color.ColorSpace; +import java.awt.image.DataBuffer; +import java.awt.image.DirectColorModel; + +public class PackedColorModelEqualsTest { + + private static void verifyEquals(DirectColorModel m1, + DirectColorModel m2) { + if (m1.equals(null)) { + throw new RuntimeException("equals(null) returns true"); + } + if (!(m1.equals(m2))) { + throw new RuntimeException("equals() method is not working" + + " properly"); + } + if (!(m2.equals(m1))) { + throw new RuntimeException("equals() method is not working" + + " properly"); + } + if (m1.hashCode() != m2.hashCode()) { + throw new RuntimeException("HashCode is not same for same" + + " PackedColorModels"); + } + } + + private static void testMaskArrayEquality() { + /* + * Test with different maskArray values, since PackedColorModel + * is abstract we use subclass DirectColorModel. + */ + DirectColorModel model1 = + new DirectColorModel(24, 0x00FF0000, 0x0000FF00, 0x000000FF); + DirectColorModel model2 = + new DirectColorModel(24, 0x000000FF, 0x0000FF00, 0x00FF0000); + if (model1.equals(model2)) { + throw new RuntimeException("equals() method is determining" + + " ColorMap equality improperly"); + } + if (model2.equals(model1)) { + throw new RuntimeException("equals() method is determining" + + " ColorMap equality improperly"); + } + } + + private static void testConstructor1() { + /* + * verify equality with constructor + * DirectColorModel(int bits, int rmask, int gmask, int bmask, + * int amask) + */ + DirectColorModel model1 = + new DirectColorModel(32, 0xFF000000, 0x00FF0000, + 0x0000FF00, 0x000000FF); + DirectColorModel model2 = + new DirectColorModel(32, 0xFF000000, 0x00FF0000, + 0x0000FF00, 0x000000FF); + verifyEquals(model1, model2); + } + + private static void testConstructor2() { + /* + * verify equality with constructor + * DirectColorModel(ColorSpace space, int bits, int rmask, int gmask, + * int bmask, int amask, boolean isAlphaPremultiplied, int transferType) + */ + DirectColorModel model1 = + new DirectColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), + 32, 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF, + false, DataBuffer.TYPE_BYTE); + DirectColorModel model2 = + new DirectColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), + 32, 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF, + false, DataBuffer.TYPE_BYTE); + verifyEquals(model1, model2); + } + + private static void testSamePackedColorModel() { + testConstructor1(); + testConstructor2(); + } + public static void main(String[] args) { + // test with different mask array. + testMaskArrayEquality(); + // verify PackedColorModel equality using different constructors. + testSamePackedColorModel(); + } +} + From 261ce92be5974fba5015ad0c420caa7390b2f604 Mon Sep 17 00:00:00 2001 From: Jan Lahoda Date: Mon, 13 Feb 2017 09:37:26 +0100 Subject: [PATCH 148/447] 8173777: Merge javac -Xmodule into javac--patch-module Merging -Xmodule: functionality into --patch-module. Reviewed-by: jjg, mchung, rfield --- .../classes/javax/tools/StandardLocation.java | 10 +- .../tools/javac/api/ClientCodeWrapper.java | 2 +- .../com/sun/tools/javac/code/ClassFinder.java | 53 ++- .../sun/tools/javac/code/ModuleFinder.java | 44 +- .../com/sun/tools/javac/code/Symbol.java | 2 + .../com/sun/tools/javac/comp/Modules.java | 119 ++++-- .../tools/javac/file/JavacFileManager.java | 2 +- .../com/sun/tools/javac/file/Locations.java | 167 +++++--- .../com/sun/tools/javac/main/Arguments.java | 3 - .../sun/tools/javac/main/JavaCompiler.java | 5 + .../com/sun/tools/javac/main/Option.java | 2 +- .../tools/javac/resources/compiler.properties | 20 +- .../sun/tools/javadoc/main/ToolOption.java | 7 - .../javadoc/resources/javadoc.properties | 1 - .../jdk/javadoc/internal/tool/ToolOption.java | 7 - .../tool/resources/javadoc.properties | 5 - .../classes/jdk/jshell/MemoryFileManager.java | 65 +-- .../test/tools/javac/6627362/T6627362.java | 4 +- .../6627362/x/{ => java/lang}/Object.java | 0 langtools/test/tools/javac/diags/Example.java | 16 + .../tools/javac/diags/examples.not-yet.txt | 1 + ...oduleInfoWithPatchedModuleClassoutput.java | 24 ++ .../additional/module-info.java | 2 +- .../javax/lang/model/element}/Extra.java | 5 +- .../ModuleInfoWithPatchedModule.java | 24 ++ .../javax/lang/model/element/Extra.java} | 7 +- .../java.compiler}/module-info.java | 2 +- .../{ => NoSuperclass}/NoSuperclass.java | 11 +- .../java.base/java/lang/Object.java | 30 ++ .../TooManyPatchedModules.java} | 7 +- .../patchmodule/java.compiler/p/C.java | 25 ++ .../patchmodule/jdk.compiler/p/C.java | 25 ++ .../test/tools/javac/meth/BadPolySig.java | 12 - .../javac/meth/BadPolySig/BadPolySig.java | 30 ++ .../java/lang/invoke/MethodHandle.java | 28 ++ .../tools/javac/modules/AddLimitMods.java | 2 +- .../tools/javac/modules/AddReadsTest.java | 6 +- ...eTest.java => CompileModulePatchTest.java} | 392 +++++++++++++++--- .../InheritRuntimeEnvironmentTest.java | 2 +- .../tools/javac/modules/PatchModulesTest.java | 66 ++- .../test/tools/javac/synthesize/Main.java | 10 +- .../jdkinternals/RemovedJDKInternals.java | 2 +- 42 files changed, 933 insertions(+), 314 deletions(-) rename langtools/test/tools/javac/6627362/x/{ => java/lang}/Object.java (100%) create mode 100644 langtools/test/tools/javac/diags/examples/ModuleInfoWithPatchedModuleClassoutput/ModuleInfoWithPatchedModuleClassoutput.java rename langtools/test/tools/javac/diags/examples/{ModuleInfoWithXmoduleClasspath => ModuleInfoWithPatchedModuleClassoutput}/additional/module-info.java (92%) rename langtools/test/tools/javac/diags/examples/{ModuleInfoWithXModuleSourcePath => ModuleInfoWithPatchedModuleClassoutput/patchmodule/java.compiler/javax/lang/model/element}/Extra.java (86%) create mode 100644 langtools/test/tools/javac/diags/examples/ModuleInfoWithPatchedModuleSourcepath/ModuleInfoWithPatchedModule.java rename langtools/test/tools/javac/diags/examples/{ModuleInfoWithXmoduleClasspath/ModuleInfoWithXmoduleClasspath.java => ModuleInfoWithPatchedModuleSourcepath/patchmodule/java.compiler/javax/lang/model/element/Extra.java} (82%) rename langtools/test/tools/javac/diags/examples/{ModuleInfoWithXModuleSourcePath => ModuleInfoWithPatchedModuleSourcepath/patchmodule/java.compiler}/module-info.java (92%) rename langtools/test/tools/javac/diags/examples/{ => NoSuperclass}/NoSuperclass.java (85%) create mode 100644 langtools/test/tools/javac/diags/examples/NoSuperclass/patchmodule/java.base/java/lang/Object.java rename langtools/test/tools/javac/diags/examples/{XModuleWithModulePath/XModuleWithModulePath.java => TooManyPatchedModules/TooManyPatchedModules.java} (82%) create mode 100644 langtools/test/tools/javac/diags/examples/TooManyPatchedModules/patchmodule/java.compiler/p/C.java create mode 100644 langtools/test/tools/javac/diags/examples/TooManyPatchedModules/patchmodule/jdk.compiler/p/C.java delete mode 100644 langtools/test/tools/javac/meth/BadPolySig.java create mode 100644 langtools/test/tools/javac/meth/BadPolySig/BadPolySig.java create mode 100644 langtools/test/tools/javac/meth/BadPolySig/java.base/java/lang/invoke/MethodHandle.java rename langtools/test/tools/javac/modules/{XModuleTest.java => CompileModulePatchTest.java} (50%) diff --git a/langtools/src/java.compiler/share/classes/javax/tools/StandardLocation.java b/langtools/src/java.compiler/share/classes/javax/tools/StandardLocation.java index 9cc9ab3113f..8e2f70e7d44 100644 --- a/langtools/src/java.compiler/share/classes/javax/tools/StandardLocation.java +++ b/langtools/src/java.compiler/share/classes/javax/tools/StandardLocation.java @@ -107,7 +107,14 @@ public enum StandardLocation implements Location { * @spec JPMS * @since 9 */ - MODULE_PATH; + MODULE_PATH, + + /** + * Location to search for module patches. + * @since 9 + * @spec JPMS + */ + PATCH_MODULE_PATH; /** * Returns a location object with the given name. The following @@ -166,6 +173,7 @@ public enum StandardLocation implements Location { case UPGRADE_MODULE_PATH: case SYSTEM_MODULES: case MODULE_PATH: + case PATCH_MODULE_PATH: return true; default: return false; diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/ClientCodeWrapper.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/ClientCodeWrapper.java index 97450527829..df2771fd03e 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/ClientCodeWrapper.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/ClientCodeWrapper.java @@ -361,7 +361,7 @@ public class ClientCodeWrapper { @Override @DefinedBy(Api.COMPILER) public Location getLocationForModule(Location location, JavaFileObject fo, String pkgName) throws IOException { try { - return clientJavaFileManager.getLocationForModule(location, fo, pkgName); + return clientJavaFileManager.getLocationForModule(location, unwrap(fo), pkgName); } catch (ClientCodeException e) { throw e; } catch (RuntimeException | Error e) { diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java index c9c152318e1..e7a782e387d 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java @@ -553,20 +553,47 @@ public class ClassFinder { Location classLocn = msym.classLocation; Location sourceLocn = msym.sourceLocation; + Location patchLocn = msym.patchLocation; + Location patchOutLocn = msym.patchOutputLocation; - if (wantClassFiles && (classLocn != null)) { - fillIn(p, classLocn, - list(classLocn, - p, - packageName, - classKinds)); - } - if (wantSourceFiles && (sourceLocn != null)) { - fillIn(p, sourceLocn, - list(sourceLocn, - p, - packageName, - sourceKinds)); + boolean prevPreferCurrent = preferCurrent; + + try { + preferCurrent = false; + if (wantClassFiles && (patchOutLocn != null)) { + fillIn(p, patchOutLocn, + list(patchOutLocn, + p, + packageName, + classKinds)); + } + if ((wantClassFiles || wantSourceFiles) && (patchLocn != null)) { + Set combined = EnumSet.noneOf(JavaFileObject.Kind.class); + combined.addAll(classKinds); + combined.addAll(sourceKinds); + fillIn(p, patchLocn, + list(patchLocn, + p, + packageName, + combined)); + } + preferCurrent = true; + if (wantClassFiles && (classLocn != null)) { + fillIn(p, classLocn, + list(classLocn, + p, + packageName, + classKinds)); + } + if (wantSourceFiles && (sourceLocn != null)) { + fillIn(p, sourceLocn, + list(sourceLocn, + p, + packageName, + sourceKinds)); + } + } finally { + preferCurrent = prevPreferCurrent; } } diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ModuleFinder.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ModuleFinder.java index 30de50c75fb..0d42c292fb4 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ModuleFinder.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ModuleFinder.java @@ -267,6 +267,7 @@ public class ModuleFinder { private List scanModulePath(ModuleSymbol toFind) { ListBuffer results = new ListBuffer<>(); Map namesInSet = new HashMap<>(); + boolean multiModuleMode = fileManager.hasLocation(StandardLocation.MODULE_SOURCE_PATH); while (moduleLocationIterator.hasNext()) { Set locns = (moduleLocationIterator.next()); namesInSet.clear(); @@ -279,10 +280,29 @@ public class ModuleFinder { // module has already been found, so ignore this instance continue; } + if (fileManager.hasLocation(StandardLocation.PATCH_MODULE_PATH) && + msym.patchLocation == null) { + msym.patchLocation = + fileManager.getLocationForModule(StandardLocation.PATCH_MODULE_PATH, + msym.name.toString()); + checkModuleInfoOnLocation(msym.patchLocation, Kind.CLASS, Kind.SOURCE); + if (msym.patchLocation != null && + multiModuleMode && + fileManager.hasLocation(StandardLocation.CLASS_OUTPUT)) { + msym.patchOutputLocation = + fileManager.getLocationForModule(StandardLocation.CLASS_OUTPUT, + msym.name.toString()); + checkModuleInfoOnLocation(msym.patchOutputLocation, Kind.CLASS); + } + } if (moduleLocationIterator.outer == StandardLocation.MODULE_SOURCE_PATH) { - msym.sourceLocation = l; - if (fileManager.hasLocation(StandardLocation.CLASS_OUTPUT)) { - msym.classLocation = fileManager.getLocationForModule(StandardLocation.CLASS_OUTPUT, msym.name.toString()); + if (msym.patchLocation == null) { + msym.sourceLocation = l; + if (fileManager.hasLocation(StandardLocation.CLASS_OUTPUT)) { + msym.classLocation = + fileManager.getLocationForModule(StandardLocation.CLASS_OUTPUT, + msym.name.toString()); + } } } else { msym.classLocation = l; @@ -291,7 +311,8 @@ public class ModuleFinder { moduleLocationIterator.outer == StandardLocation.UPGRADE_MODULE_PATH) { msym.flags_field |= Flags.SYSTEM_MODULE; } - if (toFind == msym || toFind == null) { + if (toFind == null || + (toFind == msym && (msym.sourceLocation != null || msym.classLocation != null))) { // Note: cannot return msym directly, because we must finish // processing this set first results.add(msym); @@ -311,6 +332,21 @@ public class ModuleFinder { return results.toList(); } + private void checkModuleInfoOnLocation(Location location, Kind... kinds) throws IOException { + if (location == null) + return ; + + for (Kind kind : kinds) { + JavaFileObject file = fileManager.getJavaFileForInput(location, + names.module_info.toString(), + kind); + if (file != null) { + log.error(Errors.LocnModuleInfoNotAllowedOnPatchPath(file)); + return; + } + } + } + private void findModuleInfo(ModuleSymbol msym) { try { JavaFileObject src_fo = (msym.sourceLocation == null) ? null diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java index 4fd7b90430b..2298d197121 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java @@ -908,6 +908,8 @@ public abstract class Symbol extends AnnoConstruct implements Element { public Name version; public JavaFileManager.Location sourceLocation; public JavaFileManager.Location classLocation; + public JavaFileManager.Location patchLocation; + public JavaFileManager.Location patchOutputLocation; /** All directives, in natural order. */ public List directives; diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java index c0e6543ba43..185187461b2 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java @@ -145,7 +145,7 @@ public class Modules extends JCTree.Visitor { public final boolean multiModuleMode; - private final String moduleOverride; + private final String legacyModuleOverride; private final Name java_se; private final Name java_; @@ -192,7 +192,7 @@ public class Modules extends JCTree.Visitor { lintOptions = options.isUnset(Option.XLINT_CUSTOM, "-" + LintCategory.OPTIONS.option); - moduleOverride = options.get(Option.XMODULE); + legacyModuleOverride = options.get(Option.XMODULE); multiModuleMode = fileManager.hasLocation(StandardLocation.MODULE_SOURCE_PATH); ClassWriter classWriter = ClassWriter.instance(context); @@ -366,9 +366,26 @@ public class Modules extends JCTree.Visitor { JavaFileObject prev = log.useSource(tree.sourcefile); try { - Location locn = getModuleLocation(tree); - if (locn != null) { - Name name = names.fromString(fileManager.inferModuleName(locn)); + Location msplocn = getModuleLocation(tree); + Location plocn = fileManager.hasLocation(StandardLocation.PATCH_MODULE_PATH) ? + fileManager.getLocationForModule(StandardLocation.PATCH_MODULE_PATH, + tree.sourcefile, getPackageName(tree)) : + null; + + if (plocn != null) { + Name name = names.fromString(fileManager.inferModuleName(plocn)); + ModuleSymbol msym = moduleFinder.findModule(name); + tree.modle = msym; + rootModules.add(msym); + + if (msplocn != null) { + Name mspname = names.fromString(fileManager.inferModuleName(msplocn)); + if (name != mspname) { + log.error(tree.pos(), Errors.FilePatchedAndMsp(name, mspname)); + } + } + } else if (msplocn != null) { + Name name = names.fromString(fileManager.inferModuleName(msplocn)); ModuleSymbol msym; JCModuleDecl decl = tree.getModuleDecl(); if (decl != null) { @@ -383,7 +400,7 @@ public class Modules extends JCTree.Visitor { msym = syms.enterModule(name); } if (msym.sourceLocation == null) { - msym.sourceLocation = locn; + msym.sourceLocation = msplocn; if (fileManager.hasLocation(StandardLocation.CLASS_OUTPUT)) { msym.classLocation = fileManager.getLocationForModule( StandardLocation.CLASS_OUTPUT, msym.name.toString()); @@ -414,7 +431,9 @@ public class Modules extends JCTree.Visitor { } defaultModule = syms.unnamedModule; } else { + ModuleSymbol module = null; if (defaultModule == null) { + String moduleOverride = singleModuleOverride(trees); switch (rootModules.size()) { case 0: defaultModule = moduleFinder.findSingleModule(); @@ -422,38 +441,49 @@ public class Modules extends JCTree.Visitor { if (moduleOverride != null) { checkNoAllModulePath(); defaultModule = moduleFinder.findModule(names.fromString(moduleOverride)); - defaultModule.sourceLocation = StandardLocation.SOURCE_PATH; + if (legacyModuleOverride != null) { + defaultModule.sourceLocation = StandardLocation.SOURCE_PATH; + } + defaultModule.patchOutputLocation = StandardLocation.CLASS_OUTPUT; } else { // Question: why not do findAllModules and initVisiblePackages here? // i.e. body of unnamedModuleCompleter defaultModule.completer = getUnnamedModuleCompleter(); + defaultModule.sourceLocation = StandardLocation.SOURCE_PATH; defaultModule.classLocation = StandardLocation.CLASS_PATH; } } else { - checkSpecifiedModule(trees, Errors.ModuleInfoWithXmoduleClasspath); + checkSpecifiedModule(trees, moduleOverride, Errors.ModuleInfoWithPatchedModuleClassoutput); checkNoAllModulePath(); defaultModule.complete(); // Question: why not do completeModule here? defaultModule.completer = sym -> completeModule((ModuleSymbol) sym); + defaultModule.sourceLocation = StandardLocation.SOURCE_PATH; } rootModules.add(defaultModule); break; case 1: - checkSpecifiedModule(trees, Errors.ModuleInfoWithXmoduleSourcepath); + checkSpecifiedModule(trees, moduleOverride, Errors.ModuleInfoWithPatchedModuleSourcepath); checkNoAllModulePath(); defaultModule = rootModules.iterator().next(); + defaultModule.sourceLocation = StandardLocation.SOURCE_PATH; defaultModule.classLocation = StandardLocation.CLASS_OUTPUT; break; default: Assert.error("too many modules"); } - defaultModule.sourceLocation = StandardLocation.SOURCE_PATH; } else if (rootModules.size() == 1 && defaultModule == rootModules.iterator().next()) { defaultModule.complete(); defaultModule.completer = sym -> completeModule((ModuleSymbol) sym); } else { Assert.check(rootModules.isEmpty()); - rootModules.add(defaultModule); + String moduleOverride = singleModuleOverride(trees); + if (moduleOverride != null) { + module = moduleFinder.findModule(names.fromString(moduleOverride)); + } else { + module = defaultModule; + } + rootModules.add(module); } if (defaultModule != syms.unnamedModule) { @@ -461,9 +491,53 @@ public class Modules extends JCTree.Visitor { syms.unnamedModule.classLocation = StandardLocation.CLASS_PATH; } - for (JCCompilationUnit tree: trees) { - tree.modle = defaultModule; + if (module == null) { + module = defaultModule; } + + for (JCCompilationUnit tree: trees) { + tree.modle = module; + } + } + } + + private String singleModuleOverride(List trees) { + if (!fileManager.hasLocation(StandardLocation.PATCH_MODULE_PATH)) { + return legacyModuleOverride; + } + + Set override = new LinkedHashSet<>(); + for (JCCompilationUnit tree : trees) { + JavaFileObject fo = tree.sourcefile; + + try { + Location loc = + fileManager.getLocationForModule(StandardLocation.PATCH_MODULE_PATH, + fo, getPackageName(tree)); + + if (loc != null) { + override.add(fileManager.inferModuleName(loc)); + } + } catch (IOException ex) { + throw new Error(ex); + } + } + + switch (override.size()) { + case 0: return legacyModuleOverride; + case 1: return override.iterator().next(); + default: + log.error(Errors.TooManyPatchedModules(override)); + return null; + } + } + + private String getPackageName(JCCompilationUnit tree) { + if (tree.getModuleDecl() != null) { + return null; + } else { + JCPackageDecl pkg = tree.getPackage(); + return (pkg == null) ? "" : TreeInfo.fullName(pkg.pid).toString(); } } @@ -478,32 +552,23 @@ public class Modules extends JCTree.Visitor { * @throws IOException if there is a problem while searching for the module. */ private Location getModuleLocation(JCCompilationUnit tree) throws IOException { - Name pkgName; - if (tree.getModuleDecl() != null) { - pkgName = null; - } else { - JCPackageDecl pkg = tree.getPackage(); - pkgName = (pkg == null) ? names.empty : TreeInfo.fullName(pkg.pid); - } - + String pkgName = getPackageName(tree); JavaFileObject fo = tree.sourcefile; - // For now, just check module source path. - // We may want to check source path as well. Location loc = fileManager.getLocationForModule(StandardLocation.MODULE_SOURCE_PATH, - fo, (pkgName == null) ? null : pkgName.toString()); + fo, (pkgName == null) ? null : pkgName); if (loc == null) { Location sourceOutput = fileManager.hasLocation(StandardLocation.SOURCE_OUTPUT) ? StandardLocation.SOURCE_OUTPUT : StandardLocation.CLASS_OUTPUT; loc = fileManager.getLocationForModule(sourceOutput, - fo, (pkgName == null) ? null : pkgName.toString()); + fo, (pkgName == null) ? null : pkgName); } return loc; } - private void checkSpecifiedModule(List trees, JCDiagnostic.Error error) { + private void checkSpecifiedModule(List trees, String moduleOverride, JCDiagnostic.Error error) { if (moduleOverride != null) { JavaFileObject prev = log.useSource(trees.head.sourcefile); try { @@ -1594,8 +1659,8 @@ public class Modules extends JCTree.Visitor { } public void newRound() { - rootModules = null; allModules = null; + rootModules = null; warnedMissing.clear(); } } diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java index a42aa379c4e..a66b9aa298b 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java @@ -980,7 +980,7 @@ public class JavacFileManager extends BaseFileManager implements StandardJavaFil public Location getLocationForModule(Location location, JavaFileObject fo, String pkgName) throws IOException { checkModuleOrientedOrOutputLocation(location); if (!(fo instanceof PathFileObject)) - throw new IllegalArgumentException(fo.getName()); + return null; int depth = 1; // allow 1 for filename if (pkgName != null && !pkgName.isEmpty()) { depth += 1; diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java index ba17c502b71..fbeb3dc0f09 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java @@ -432,7 +432,7 @@ public class Locations { /** * @see JavaFileManager#getLocationForModule(Location, JavaFileObject, String) */ - Location getLocationForModule(Path dir) { + Location getLocationForModule(Path dir) throws IOException { return null; } @@ -545,7 +545,7 @@ public class Locations { l = new ModuleLocationHandler(location.getName() + "[" + name + "]", name, Collections.singleton(out), - true, false); + true); moduleLocations.put(name, l); pathLocations.put(out.toAbsolutePath(), l); } @@ -864,29 +864,14 @@ public class Locations { protected final String name; protected final String moduleName; protected final Collection searchPath; - protected final Collection searchPathWithOverrides; protected final boolean output; ModuleLocationHandler(String name, String moduleName, Collection searchPath, - boolean output, boolean allowOverrides) { + boolean output) { this.name = name; this.moduleName = moduleName; this.searchPath = searchPath; this.output = output; - - if (allowOverrides && patchMap != null) { - SearchPath mPatch = patchMap.get(moduleName); - if (mPatch != null) { - SearchPath sp = new SearchPath(); - sp.addAll(mPatch); - sp.addAll(searchPath); - searchPathWithOverrides = sp; - } else { - searchPathWithOverrides = searchPath; - } - } else { - searchPathWithOverrides = searchPath; - } } @Override @DefinedBy(Api.COMPILER) @@ -909,7 +894,7 @@ public class Locations { // For now, we always return searchPathWithOverrides. This may differ from the // JVM behavior if there is a module-info.class to be found in the overriding // classes. - return searchPathWithOverrides; + return searchPath; } @Override // defined by LocationHandler @@ -1068,7 +1053,7 @@ public class Locations { String name = location.getName() + "[" + pathIndex + ":" + moduleName + "]"; ModuleLocationHandler l = new ModuleLocationHandler(name, moduleName, - Collections.singleton(path), false, true); + Collections.singleton(path), false); return Collections.singleton(l); } catch (ModuleNameReader.BadClassFile e) { log.error(Errors.LocnBadModuleInfo(path)); @@ -1093,7 +1078,7 @@ public class Locations { String name = location.getName() + "[" + pathIndex + "." + (index++) + ":" + moduleName + "]"; ModuleLocationHandler l = new ModuleLocationHandler(name, moduleName, - Collections.singleton(modulePath), false, true); + Collections.singleton(modulePath), false); result.add(l); } return result; @@ -1110,7 +1095,7 @@ public class Locations { String name = location.getName() + "[" + pathIndex + ":" + moduleName + "]"; ModuleLocationHandler l = new ModuleLocationHandler(name, moduleName, - Collections.singleton(modulePath), false, true); + Collections.singleton(modulePath), false); return Collections.singleton(l); } @@ -1277,7 +1262,7 @@ public class Locations { pathLocations = new LinkedHashMap<>(); map.forEach((k, v) -> { String name = location.getName() + "[" + k + "]"; - ModuleLocationHandler h = new ModuleLocationHandler(name, k, v, false, false); + ModuleLocationHandler h = new ModuleLocationHandler(name, k, v, false); moduleLocations.put(k, h); v.forEach(p -> pathLocations.put(normalize(p), h)); }); @@ -1417,6 +1402,7 @@ public class Locations { private Path systemJavaHome; private Path modules; private Map systemModules; + private Map pathLocations; SystemModulesLocationHandler() { super(StandardLocation.SYSTEM_MODULES, Option.SYSTEM); @@ -1490,6 +1476,12 @@ public class Locations { return systemModules.get(name); } + @Override + Location getLocationForModule(Path dir) throws IOException { + initSystemModules(); + return (pathLocations == null) ? null : pathLocations.get(dir); + } + @Override Iterable> listLocationsForModules() throws IOException { initSystemModules(); @@ -1544,18 +1536,96 @@ public class Locations { } systemModules = new LinkedHashMap<>(); + pathLocations = new LinkedHashMap<>(); try (DirectoryStream stream = Files.newDirectoryStream(modules, Files::isDirectory)) { for (Path entry : stream) { String moduleName = entry.getFileName().toString(); String name = location.getName() + "[" + moduleName + "]"; ModuleLocationHandler h = new ModuleLocationHandler(name, moduleName, - Collections.singleton(entry), false, true); + Collections.singleton(entry), false); systemModules.put(moduleName, h); + pathLocations.put(normalize(entry), h); } } } } + private class PatchModulesLocationHandler extends BasicLocationHandler { + private final Map moduleLocations = new HashMap<>(); + private final Map pathLocations = new HashMap<>(); + + PatchModulesLocationHandler() { + super(StandardLocation.PATCH_MODULE_PATH, Option.PATCH_MODULE); + } + + @Override + boolean handleOption(Option option, String value) { + if (!options.contains(option)) { + return false; + } + + // Allow an extended syntax for --patch-module consisting of a series + // of values separated by NULL characters. This is to facilitate + // supporting deferred file manager options on the command line. + // See Option.PATCH_MODULE for the code that composes these multiple + // values. + for (String v : value.split("\0")) { + int eq = v.indexOf('='); + if (eq > 0) { + String moduleName = v.substring(0, eq); + SearchPath mPatchPath = new SearchPath() + .addFiles(v.substring(eq + 1)); + String name = location.getName() + "[" + moduleName + "]"; + ModuleLocationHandler h = new ModuleLocationHandler(name, moduleName, mPatchPath, false); + moduleLocations.put(moduleName, h); + for (Path r : mPatchPath) { + pathLocations.put(normalize(r), h); + } + } else { + // Should not be able to get here; + // this should be caught and handled in Option.PATCH_MODULE + log.error(Errors.LocnInvalidArgForXpatch(value)); + } + } + + return true; + } + + @Override + boolean isSet() { + return !moduleLocations.isEmpty(); + } + + @Override + Collection getPaths() { + throw new UnsupportedOperationException(); + } + + @Override + void setPaths(Iterable files) throws IOException { + throw new UnsupportedOperationException(); + } + + @Override + Location getLocationForModule(String name) throws IOException { + return moduleLocations.get(name); + } + + @Override + Location getLocationForModule(Path dir) throws IOException { + return (pathLocations == null) ? null : pathLocations.get(dir); + } + + @Override + Iterable> listLocationsForModules() throws IOException { + Set locns = new LinkedHashSet<>(); + for (Location l: moduleLocations.values()) + locns.add(l); + return Collections.singleton(locns); + } + + } + Map handlersForLocation; Map handlersForOption; @@ -1573,6 +1643,7 @@ public class Locations { new OutputLocationHandler(StandardLocation.SOURCE_OUTPUT, Option.S), new OutputLocationHandler(StandardLocation.NATIVE_HEADER_OUTPUT, Option.H), new ModuleSourcePathLocationHandler(), + new PatchModulesLocationHandler(), // TODO: should UPGRADE_MODULE_PATH be merged with SYSTEM_MODULES? new ModulePathLocationHandler(StandardLocation.UPGRADE_MODULE_PATH, Option.UPGRADE_MODULE_PATH), new ModulePathLocationHandler(StandardLocation.MODULE_PATH, Option.MODULE_PATH), @@ -1587,51 +1658,9 @@ public class Locations { } } - private Map patchMap; - boolean handleOption(Option option, String value) { - switch (option) { - case PATCH_MODULE: - if (value == null) { - patchMap = null; - } else { - // Allow an extended syntax for --patch-module consisting of a series - // of values separated by NULL characters. This is to facilitate - // supporting deferred file manager options on the command line. - // See Option.PATCH_MODULE for the code that composes these multiple - // values. - for (String v : value.split("\0")) { - int eq = v.indexOf('='); - if (eq > 0) { - String mName = v.substring(0, eq); - SearchPath mPatchPath = new SearchPath() - .addFiles(v.substring(eq + 1)); - boolean ok = true; - for (Path p : mPatchPath) { - Path mi = p.resolve("module-info.class"); - if (Files.exists(mi)) { - log.error(Errors.LocnModuleInfoNotAllowedOnPatchPath(mi)); - ok = false; - } - } - if (ok) { - if (patchMap == null) { - patchMap = new LinkedHashMap<>(); - } - patchMap.put(mName, mPatchPath); - } - } else { - // Should not be able to get here; - // this should be caught and handled in Option.PATCH_MODULE - log.error(Errors.LocnInvalidArgForXpatch(value)); - } - } - } - return true; - default: - LocationHandler h = handlersForOption.get(option); - return (h == null ? false : h.handleOption(option, value)); - } + LocationHandler h = handlersForOption.get(option); + return (h == null ? false : h.handleOption(option, value)); } boolean hasLocation(Location location) { @@ -1670,7 +1699,7 @@ public class Locations { return (h == null ? null : h.getLocationForModule(name)); } - Location getLocationForModule(Location location, Path dir) { + Location getLocationForModule(Location location, Path dir) throws IOException { LocationHandler h = getHandler(location); return (h == null ? null : h.getLocationForModule(dir)); } diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java index 179cd04f721..74869b2c2bc 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java @@ -598,9 +598,6 @@ public class Arguments { && !fm.hasLocation(StandardLocation.CLASS_OUTPUT)) { log.error(Errors.NoOutputDir); } - if (options.isSet(Option.XMODULE)) { - log.error(Errors.XmoduleNoModuleSourcepath); - } } if (fm.hasLocation(StandardLocation.ANNOTATION_PROCESSOR_MODULE_PATH) && diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java index 8f0819e0359..9e2fdf529fa 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java @@ -1450,6 +1450,11 @@ public class JavaCompiler { return; } + if (!modules.multiModuleMode && env.toplevel.modle != modules.getDefaultModule()) { + //can only generate classfiles for a single module: + return; + } + if (compileStates.isDone(env, CompileState.LOWER)) { results.addAll(desugaredEnvs.get(env)); return; diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java index c7fba06ba63..611b94b7607 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java @@ -579,7 +579,7 @@ public enum Option { } }, - XMODULE("-Xmodule:", "opt.arg.module", "opt.module", EXTENDED, BASIC) { + XMODULE("-Xmodule:", "opt.arg.module", "opt.module", HIDDEN, BASIC) { @Override public void process(OptionHelper helper, String option, String arg) throws InvalidValueException { String prev = helper.get(XMODULE); diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties index a7d479fcdbf..934f7066a4e 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties @@ -1292,7 +1292,7 @@ compiler.err.multi-module.outdir.cannot.be.exploded.module=\ compiler.warn.outdir.is.in.exploded.module=\ the output directory is within an exploded module: {0} -# 0: path +# 0: file object compiler.err.locn.module-info.not.allowed.on.patch.path=\ module-info.class not allowed on patch path: {0} @@ -2957,14 +2957,20 @@ compiler.misc.module.non.zero.opens=\ compiler.err.module.decl.sb.in.module-info.java=\ module declarations should be in a file named module-info.java -compiler.err.module-info.with.xmodule.sourcepath=\ - illegal combination of -Xmodule and module-info on sourcepath +compiler.err.module-info.with.patched.module.sourcepath=\ + compiling a module patch with module-info on sourcepath -compiler.err.module-info.with.xmodule.classpath=\ - illegal combination of -Xmodule and module-info on classpath +compiler.err.module-info.with.patched.module.classoutput=\ + compiling a module patch with module-info on class output -compiler.err.xmodule.no.module.sourcepath=\ - illegal combination of -Xmodule and --module-source-path +# 0: set of string +compiler.err.too.many.patched.modules=\ + too many patched modules ({0}), use --module-source-path + +# 0: name, 1: name +compiler.err.file.patched.and.msp=\ + file accessible from both --patch-module and --module-source-path, \ + but belongs to a different module on each path: {0}, {1} compiler.err.processorpath.no.processormodulepath=\ illegal combination of -processorpath and --processor-module-path diff --git a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/ToolOption.java b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/ToolOption.java index e74aad1e3ad..e84e6595015 100644 --- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/ToolOption.java +++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/ToolOption.java @@ -204,13 +204,6 @@ public enum ToolOption { } }, - XMODULE("-Xmodule:", false) { - @Override - public void process(Helper helper, String arg) throws InvalidValueException { - Option.XMODULE.process(helper.getOptionHelper(), arg); - } - }, - PATCH_MODULE("--patch-module", true) { @Override public void process(Helper helper, String arg) throws InvalidValueException { diff --git a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/resources/javadoc.properties b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/resources/javadoc.properties index 05479908a0d..f2e193dd437 100644 --- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/resources/javadoc.properties +++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/resources/javadoc.properties @@ -82,7 +82,6 @@ main.Xusage=\ \ Specify additional modules to be considered as required by a\n\ \ given module. may be ALL-UNNAMED to require\n\ \ the unnamed module.\n\ -\ -Xmodule: Specify a module to which the classes being compiled belong.\n\ \ --patch-module =(:)*\n\ \ Override or augment a module with classes and resources\n\ \ in JAR files or directories\n diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java index 2a60a079ba4..83d557fe3ee 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java @@ -181,13 +181,6 @@ public enum ToolOption { } }, - XMODULE("-Xmodule:", EXTENDED, false) { - @Override - public void process(Helper helper, String arg) throws InvalidValueException { - Option.XMODULE.process(helper.getOptionHelper(), arg); - } - }, - PATCH_MODULE("--patch-module", EXTENDED, true) { @Override public void process(Helper helper, String arg) throws InvalidValueException { diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc.properties b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc.properties index 7985449a21f..e35e9cb350b 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc.properties +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc.properties @@ -238,11 +238,6 @@ main.opt.add.reads.desc=\ given module. may be ALL-UNNAMED to require\n\ the unnamed module. -main.opt.Xmodule.arg=\ - -main.opt.Xmodule.desc=\ - Specify a module to which the classes being compiled belong - main.opt.patch.module.arg=\ =(:)* main.opt.patch.module.desc=\ diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/MemoryFileManager.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/MemoryFileManager.java index e426e0de29d..c275b0f34d8 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/MemoryFileManager.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/MemoryFileManager.java @@ -30,8 +30,6 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; import java.net.URI; import java.nio.file.FileSystems; import java.nio.file.Files; @@ -71,10 +69,6 @@ class MemoryFileManager implements JavaFileManager { private final JShell proc; - // Upcoming Jigsaw - private Method inferModuleNameMethod = null; - private Method listLocationsForModulesMethod = null; - Iterable getLocationAsPaths(Location loc) { return this.stdFileManager.getLocationAsPaths(loc); } @@ -186,45 +180,6 @@ class MemoryFileManager implements JavaFileManager { return new SourceMemoryJavaFileObject(origin, name, code); } - // Make compatible with Jigsaw - @Override - public String inferModuleName(Location location) { - try { - if (inferModuleNameMethod == null) { - inferModuleNameMethod = JavaFileManager.class.getDeclaredMethod("inferModuleName", Location.class); - } - @SuppressWarnings("unchecked") - String result = (String) inferModuleNameMethod.invoke(stdFileManager, location); - return result; - } catch (NoSuchMethodException | SecurityException ex) { - throw new InternalError("Cannot lookup JavaFileManager method", ex); - } catch (IllegalAccessException | - IllegalArgumentException | - InvocationTargetException ex) { - throw new InternalError("Cannot invoke JavaFileManager method", ex); - } - } - - // Make compatible with Jigsaw - @Override - public Iterable> listLocationsForModules(Location location) throws IOException { - try { - if (listLocationsForModulesMethod == null) { - listLocationsForModulesMethod = JavaFileManager.class.getDeclaredMethod("listLocationsForModules", Location.class); - } - @SuppressWarnings("unchecked") - Iterable> result = (Iterable>) listLocationsForModulesMethod.invoke(stdFileManager, location); - return result; - } catch (NoSuchMethodException | SecurityException ex) { - throw new InternalError("Cannot lookup JavaFileManager method", ex); - } catch (IllegalAccessException | - IllegalArgumentException | - InvocationTargetException ex) { - throw new InternalError("Cannot invoke JavaFileManager method", ex); - } - } - - /** * Returns a class loader for loading plug-ins from the given location. For * example, to load annotation processors, a compiler will request a class @@ -584,6 +539,26 @@ class MemoryFileManager implements JavaFileManager { ", sibling: " + sibling); } + @Override + public Location getLocationForModule(Location location, String moduleName) throws IOException { + return stdFileManager.getLocationForModule(location, moduleName); + } + + @Override + public Location getLocationForModule(Location location, JavaFileObject fo, String pkgName) throws IOException { + return stdFileManager.getLocationForModule(location, fo, pkgName); + } + + @Override + public String inferModuleName(Location location) throws IOException { + return stdFileManager.inferModuleName(location); + } + + @Override + public Iterable> listLocationsForModules(Location location) throws IOException { + return stdFileManager.listLocationsForModules(location); + } + /** * Flushes any resources opened for output by this file manager * directly or indirectly. Flushing a closed file manager has no diff --git a/langtools/test/tools/javac/6627362/T6627362.java b/langtools/test/tools/javac/6627362/T6627362.java index 28d178d4506..d2d7460f585 100644 --- a/langtools/test/tools/javac/6627362/T6627362.java +++ b/langtools/test/tools/javac/6627362/T6627362.java @@ -68,9 +68,9 @@ public class T6627362 { // compile and disassemble E.java, using modified Object.java, // check for reference to System.arraycopy File x = new File(testSrc, "x"); - String[] jcArgs = { "-d", ".", "-Xmodule:java.base", + String[] jcArgs = { "-d", ".", "--patch-module", "java.base=" + x.getAbsolutePath(), new File(x, "E.java").getPath(), - new File(x, "Object.java").getPath()}; + new File(new File(new File(x, "java"), "lang"), "Object.java").getPath()}; compile(jcArgs); String[] jpArgs = { "-classpath", ".", "-c", "E" }; diff --git a/langtools/test/tools/javac/6627362/x/Object.java b/langtools/test/tools/javac/6627362/x/java/lang/Object.java similarity index 100% rename from langtools/test/tools/javac/6627362/x/Object.java rename to langtools/test/tools/javac/6627362/x/java/lang/Object.java diff --git a/langtools/test/tools/javac/diags/Example.java b/langtools/test/tools/javac/diags/Example.java index 72c4b64e382..f72dc5c243a 100644 --- a/langtools/test/tools/javac/diags/Example.java +++ b/langtools/test/tools/javac/diags/Example.java @@ -63,6 +63,7 @@ class Example implements Comparable { procFiles = new ArrayList(); srcPathFiles = new ArrayList(); moduleSourcePathFiles = new ArrayList(); + patchModulePathFiles = new ArrayList(); modulePathFiles = new ArrayList(); classPathFiles = new ArrayList(); additionalFiles = new ArrayList(); @@ -88,6 +89,9 @@ class Example implements Comparable { } else if (files == srcFiles && c.getName().equals("modulesourcepath")) { moduleSourcePathDir = c; findFiles(c, moduleSourcePathFiles); + } else if (files == srcFiles && c.getName().equals("patchmodule")) { + patchModulePathDir = c; + findFiles(c, patchModulePathFiles); } else if (files == srcFiles && c.getName().equals("additional")) { additionalFilesDir = c; findFiles(c, additionalFiles); @@ -272,6 +276,16 @@ class Example implements Comparable { files.addAll(nonEmptySrcFiles); // srcFiles containing declarations } + if (patchModulePathDir != null) { + for (File mod : patchModulePathDir.listFiles()) { + opts.add("--patch-module"); + opts.add(mod.getName() + "=" + mod.getPath()); + } + files = new ArrayList<>(); + files.addAll(patchModulePathFiles); + files.addAll(nonEmptySrcFiles); // srcFiles containing declarations + } + if (additionalFiles.size() > 0) { List sOpts = Arrays.asList("-d", classesDir.getPath()); new Jsr199Compiler(verbose).run(null, null, false, sOpts, additionalFiles); @@ -343,9 +357,11 @@ class Example implements Comparable { List procFiles; File srcPathDir; File moduleSourcePathDir; + File patchModulePathDir; File additionalFilesDir; List srcPathFiles; List moduleSourcePathFiles; + List patchModulePathFiles; List modulePathFiles; List classPathFiles; List additionalFiles; diff --git a/langtools/test/tools/javac/diags/examples.not-yet.txt b/langtools/test/tools/javac/diags/examples.not-yet.txt index 5f88b42c880..a34685dd48b 100644 --- a/langtools/test/tools/javac/diags/examples.not-yet.txt +++ b/langtools/test/tools/javac/diags/examples.not-yet.txt @@ -5,6 +5,7 @@ compiler.err.bad.functional.intf.anno # seems to be masked by compiler.err.cant.read.file # (apt.JavaCompiler?) compiler.err.cant.select.static.class.from.param.type compiler.err.dc.unterminated.string # cannot happen +compiler.err.file.patched.and.msp # needs the same dir on --module-source-path and --patch-module compiler.err.illegal.char.for.encoding compiler.err.invalid.repeatable.annotation # should not happen compiler.err.invalid.repeatable.annotation.invalid.value # "can't" happen diff --git a/langtools/test/tools/javac/diags/examples/ModuleInfoWithPatchedModuleClassoutput/ModuleInfoWithPatchedModuleClassoutput.java b/langtools/test/tools/javac/diags/examples/ModuleInfoWithPatchedModuleClassoutput/ModuleInfoWithPatchedModuleClassoutput.java new file mode 100644 index 00000000000..38792b36867 --- /dev/null +++ b/langtools/test/tools/javac/diags/examples/ModuleInfoWithPatchedModuleClassoutput/ModuleInfoWithPatchedModuleClassoutput.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +// key: compiler.err.module-info.with.patched.module.classoutput diff --git a/langtools/test/tools/javac/diags/examples/ModuleInfoWithXmoduleClasspath/additional/module-info.java b/langtools/test/tools/javac/diags/examples/ModuleInfoWithPatchedModuleClassoutput/additional/module-info.java similarity index 92% rename from langtools/test/tools/javac/diags/examples/ModuleInfoWithXmoduleClasspath/additional/module-info.java rename to langtools/test/tools/javac/diags/examples/ModuleInfoWithPatchedModuleClassoutput/additional/module-info.java index 6faf7dbee92..c1cc5cc2afe 100644 --- a/langtools/test/tools/javac/diags/examples/ModuleInfoWithXmoduleClasspath/additional/module-info.java +++ b/langtools/test/tools/javac/diags/examples/ModuleInfoWithPatchedModuleClassoutput/additional/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/langtools/test/tools/javac/diags/examples/ModuleInfoWithXModuleSourcePath/Extra.java b/langtools/test/tools/javac/diags/examples/ModuleInfoWithPatchedModuleClassoutput/patchmodule/java.compiler/javax/lang/model/element/Extra.java similarity index 86% rename from langtools/test/tools/javac/diags/examples/ModuleInfoWithXModuleSourcePath/Extra.java rename to langtools/test/tools/javac/diags/examples/ModuleInfoWithPatchedModuleClassoutput/patchmodule/java.compiler/javax/lang/model/element/Extra.java index cafc425479d..74cb601196b 100644 --- a/langtools/test/tools/javac/diags/examples/ModuleInfoWithXModuleSourcePath/Extra.java +++ b/langtools/test/tools/javac/diags/examples/ModuleInfoWithPatchedModuleClassoutput/patchmodule/java.compiler/javax/lang/model/element/Extra.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,9 +21,6 @@ * questions. */ -// key: compiler.err.module-info.with.xmodule.sourcepath -// options: -Xmodule:java.compiler - package javax.lang.model.element; public interface Extra {} diff --git a/langtools/test/tools/javac/diags/examples/ModuleInfoWithPatchedModuleSourcepath/ModuleInfoWithPatchedModule.java b/langtools/test/tools/javac/diags/examples/ModuleInfoWithPatchedModuleSourcepath/ModuleInfoWithPatchedModule.java new file mode 100644 index 00000000000..c9d1e4a5d1e --- /dev/null +++ b/langtools/test/tools/javac/diags/examples/ModuleInfoWithPatchedModuleSourcepath/ModuleInfoWithPatchedModule.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +// key: compiler.err.module-info.with.patched.module.sourcepath diff --git a/langtools/test/tools/javac/diags/examples/ModuleInfoWithXmoduleClasspath/ModuleInfoWithXmoduleClasspath.java b/langtools/test/tools/javac/diags/examples/ModuleInfoWithPatchedModuleSourcepath/patchmodule/java.compiler/javax/lang/model/element/Extra.java similarity index 82% rename from langtools/test/tools/javac/diags/examples/ModuleInfoWithXmoduleClasspath/ModuleInfoWithXmoduleClasspath.java rename to langtools/test/tools/javac/diags/examples/ModuleInfoWithPatchedModuleSourcepath/patchmodule/java.compiler/javax/lang/model/element/Extra.java index a9ea8197d3b..74cb601196b 100644 --- a/langtools/test/tools/javac/diags/examples/ModuleInfoWithXmoduleClasspath/ModuleInfoWithXmoduleClasspath.java +++ b/langtools/test/tools/javac/diags/examples/ModuleInfoWithPatchedModuleSourcepath/patchmodule/java.compiler/javax/lang/model/element/Extra.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,9 +21,6 @@ * questions. */ -// key: compiler.err.module-info.with.xmodule.classpath -// options: -Xmodule:java.compiler - package javax.lang.model.element; -public interface ModuleInfoWithXModuleClasspath {} +public interface Extra {} diff --git a/langtools/test/tools/javac/diags/examples/ModuleInfoWithXModuleSourcePath/module-info.java b/langtools/test/tools/javac/diags/examples/ModuleInfoWithPatchedModuleSourcepath/patchmodule/java.compiler/module-info.java similarity index 92% rename from langtools/test/tools/javac/diags/examples/ModuleInfoWithXModuleSourcePath/module-info.java rename to langtools/test/tools/javac/diags/examples/ModuleInfoWithPatchedModuleSourcepath/patchmodule/java.compiler/module-info.java index 79715268b7a..48e56b0c1a4 100644 --- a/langtools/test/tools/javac/diags/examples/ModuleInfoWithXModuleSourcePath/module-info.java +++ b/langtools/test/tools/javac/diags/examples/ModuleInfoWithPatchedModuleSourcepath/patchmodule/java.compiler/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/langtools/test/tools/javac/diags/examples/NoSuperclass.java b/langtools/test/tools/javac/diags/examples/NoSuperclass/NoSuperclass.java similarity index 85% rename from langtools/test/tools/javac/diags/examples/NoSuperclass.java rename to langtools/test/tools/javac/diags/examples/NoSuperclass/NoSuperclass.java index 9e86e1872e0..9fcc9076124 100644 --- a/langtools/test/tools/javac/diags/examples/NoSuperclass.java +++ b/langtools/test/tools/javac/diags/examples/NoSuperclass/NoSuperclass.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,12 +22,3 @@ */ // key: compiler.err.no.superclass -// options: -Xmodule:java.base - -package java.lang; - -class Object { - public Object() { - super(); - } -} diff --git a/langtools/test/tools/javac/diags/examples/NoSuperclass/patchmodule/java.base/java/lang/Object.java b/langtools/test/tools/javac/diags/examples/NoSuperclass/patchmodule/java.base/java/lang/Object.java new file mode 100644 index 00000000000..c42ff757105 --- /dev/null +++ b/langtools/test/tools/javac/diags/examples/NoSuperclass/patchmodule/java.base/java/lang/Object.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package java.lang; + +class Object { + public Object() { + super(); + } +} diff --git a/langtools/test/tools/javac/diags/examples/XModuleWithModulePath/XModuleWithModulePath.java b/langtools/test/tools/javac/diags/examples/TooManyPatchedModules/TooManyPatchedModules.java similarity index 82% rename from langtools/test/tools/javac/diags/examples/XModuleWithModulePath/XModuleWithModulePath.java rename to langtools/test/tools/javac/diags/examples/TooManyPatchedModules/TooManyPatchedModules.java index eaffab89d3e..f7bb6eee1ff 100644 --- a/langtools/test/tools/javac/diags/examples/XModuleWithModulePath/XModuleWithModulePath.java +++ b/langtools/test/tools/javac/diags/examples/TooManyPatchedModules/TooManyPatchedModules.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,7 +21,4 @@ * questions. */ -// key: compiler.err.xmodule.no.module.sourcepath -// options: -Xmodule:java.compiler --module-source-path src - -class XModuleWithModulePath {} +// key: compiler.err.too.many.patched.modules diff --git a/langtools/test/tools/javac/diags/examples/TooManyPatchedModules/patchmodule/java.compiler/p/C.java b/langtools/test/tools/javac/diags/examples/TooManyPatchedModules/patchmodule/java.compiler/p/C.java new file mode 100644 index 00000000000..a92294c7deb --- /dev/null +++ b/langtools/test/tools/javac/diags/examples/TooManyPatchedModules/patchmodule/java.compiler/p/C.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package p; + +class C {} diff --git a/langtools/test/tools/javac/diags/examples/TooManyPatchedModules/patchmodule/jdk.compiler/p/C.java b/langtools/test/tools/javac/diags/examples/TooManyPatchedModules/patchmodule/jdk.compiler/p/C.java new file mode 100644 index 00000000000..a92294c7deb --- /dev/null +++ b/langtools/test/tools/javac/diags/examples/TooManyPatchedModules/patchmodule/jdk.compiler/p/C.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package p; + +class C {} diff --git a/langtools/test/tools/javac/meth/BadPolySig.java b/langtools/test/tools/javac/meth/BadPolySig.java deleted file mode 100644 index f607f63c258..00000000000 --- a/langtools/test/tools/javac/meth/BadPolySig.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * @test - * @bug 8168774 - * @summary Polymorhic signature method check crashes javac - * @compile -Xmodule:java.base BadPolySig.java - */ - -package java.lang.invoke; - -class MethodHandle { - native Object m(); -} diff --git a/langtools/test/tools/javac/meth/BadPolySig/BadPolySig.java b/langtools/test/tools/javac/meth/BadPolySig/BadPolySig.java new file mode 100644 index 00000000000..2d366824685 --- /dev/null +++ b/langtools/test/tools/javac/meth/BadPolySig/BadPolySig.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8168774 + * @summary Polymorhic signature method check crashes javac + * @modules jdk.compiler + * @compile/module=java.base java/lang/invoke/MethodHandle.java + */ diff --git a/langtools/test/tools/javac/meth/BadPolySig/java.base/java/lang/invoke/MethodHandle.java b/langtools/test/tools/javac/meth/BadPolySig/java.base/java/lang/invoke/MethodHandle.java new file mode 100644 index 00000000000..b748f3e5835 --- /dev/null +++ b/langtools/test/tools/javac/meth/BadPolySig/java.base/java/lang/invoke/MethodHandle.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package java.lang.invoke; + +class MethodHandle { + native Object m(); +} diff --git a/langtools/test/tools/javac/modules/AddLimitMods.java b/langtools/test/tools/javac/modules/AddLimitMods.java index 8c980bb8f86..09be5b5e97e 100644 --- a/langtools/test/tools/javac/modules/AddLimitMods.java +++ b/langtools/test/tools/javac/modules/AddLimitMods.java @@ -293,7 +293,7 @@ public class AddLimitMods extends ModuleTestBase { } actual = new JavacTask(tb) - .options("-Xmodule:java.base", + .options("--patch-module", "java.base=" + cpSrc.toString(), "-XDrawDiagnostics", "--add-modules", "ALL-MODULE-PATH") .outdir(cpOut) diff --git a/langtools/test/tools/javac/modules/AddReadsTest.java b/langtools/test/tools/javac/modules/AddReadsTest.java index d03cda631e1..32d023e1d8f 100644 --- a/langtools/test/tools/javac/modules/AddReadsTest.java +++ b/langtools/test/tools/javac/modules/AddReadsTest.java @@ -217,7 +217,7 @@ public class AddReadsTest extends ModuleTestBase { new JavacTask(tb) .options("--class-path", jar.toString(), "--add-reads", "java.base=ALL-UNNAMED", - "-Xmodule:java.base") + "--patch-module", "java.base=" + src) .outdir(classes) .files(src.resolve("impl").resolve("Impl.java")) .run() @@ -237,7 +237,7 @@ public class AddReadsTest extends ModuleTestBase { new JavacTask(tb) .options("--add-modules", "java.desktop", "--add-reads", "java.base=java.desktop", - "-Xmodule:java.base") + "--patch-module", "java.base=" + src) .outdir(classes) .files(findJavaFiles(src)) .run() @@ -304,7 +304,7 @@ public class AddReadsTest extends ModuleTestBase { new JavacTask(tb) .options("--add-reads", "m1x=ALL-UNNAMED", - "-Xmodule:m1x", + "--patch-module", "m1x=" + unnamedSrc, "--module-path", classes.toString()) .outdir(unnamedClasses) .files(findJavaFiles(unnamedSrc)) diff --git a/langtools/test/tools/javac/modules/XModuleTest.java b/langtools/test/tools/javac/modules/CompileModulePatchTest.java similarity index 50% rename from langtools/test/tools/javac/modules/XModuleTest.java rename to langtools/test/tools/javac/modules/CompileModulePatchTest.java index 2ddeacbb7ef..c837a7a2974 100644 --- a/langtools/test/tools/javac/modules/XModuleTest.java +++ b/langtools/test/tools/javac/modules/CompileModulePatchTest.java @@ -23,6 +23,7 @@ /* * @test + * @bug 8173777 * @summary tests for multi-module mode compilation * @library /tools/lib * @modules @@ -31,13 +32,15 @@ * jdk.compiler/com.sun.tools.javac.main * jdk.compiler/com.sun.tools.javac.processing * @build toolbox.ToolBox toolbox.JavacTask toolbox.ModuleBuilder ModuleTestBase - * @run main XModuleTest + * @run main CompileModulePatchTest */ +import java.nio.file.Files; import java.nio.file.Path; import java.util.Arrays; import java.util.List; import java.util.Set; +import java.util.stream.Collectors; import javax.annotation.processing.AbstractProcessor; import javax.annotation.processing.RoundEnvironment; @@ -54,14 +57,14 @@ import toolbox.ModuleBuilder; import toolbox.Task; import toolbox.Task.Expect; -public class XModuleTest extends ModuleTestBase { +public class CompileModulePatchTest extends ModuleTestBase { public static void main(String... args) throws Exception { - new XModuleTest().runTests(); + new CompileModulePatchTest().runTests(); } @Test - public void testCorrectXModule(Path base) throws Exception { + public void testCorrectModulePatch(Path base) throws Exception { //note: avoiding use of java.base, as that gets special handling on some places: Path src = base.resolve("src"); tb.writeJavaFiles(src, "package javax.lang.model.element; public interface Extra extends Element { }"); @@ -69,7 +72,7 @@ public class XModuleTest extends ModuleTestBase { tb.createDirectories(classes); String log = new JavacTask(tb) - .options("-Xmodule:java.compiler") + .options("--patch-module", "java.compiler=" + src.toString()) .outdir(classes) .files(findJavaFiles(src)) .run() @@ -81,23 +84,136 @@ public class XModuleTest extends ModuleTestBase { } @Test - public void testSourcePath(Path base) throws Exception { + public void testCorrectModulePatchMultiModule(Path base) throws Exception { //note: avoiding use of java.base, as that gets special handling on some places: Path src = base.resolve("src"); - tb.writeJavaFiles(src, "package javax.lang.model.element; public interface Extra extends Element, Other { }", "package javax.lang.model.element; interface Other { }"); + Path m1 = src.resolve("m1"); + tb.writeJavaFiles(m1, "package javax.lang.model.element; public interface Extra extends Element { }"); + Path m2 = src.resolve("m2"); + tb.writeJavaFiles(m2, "package com.sun.source.tree; public interface Extra extends Tree { }"); Path classes = base.resolve("classes"); tb.createDirectories(classes); String log = new JavacTask(tb) - .options("-Xmodule:java.compiler", "-sourcepath", src.toString()) + .options("--patch-module", "java.compiler=" + m1.toString(), + "--patch-module", "jdk.compiler=" + m2.toString(), + "--module-source-path", "dummy") .outdir(classes) - .files(src.resolve("javax/lang/model/element/Extra.java")) + .files(findJavaFiles(src)) .run() .writeAll() .getOutput(Task.OutputKind.DIRECT); if (!log.isEmpty()) throw new Exception("expected output not found: " + log); + + checkFileExists(classes, "java.compiler/javax/lang/model/element/Extra.class"); + checkFileExists(classes, "jdk.compiler/com/sun/source/tree/Extra.class"); + } + + @Test + public void testCorrectModulePatchMultiModule2(Path base) throws Exception { + //note: avoiding use of java.base, as that gets special handling on some places: + Path src = base.resolve("src"); + Path m1 = src.resolve("m1"); + tb.writeJavaFiles(m1, + "package javax.lang.model.element; public interface Extra extends Element { }"); + Path m2 = src.resolve("m2"); + tb.writeJavaFiles(m2, + "package com.sun.source.tree; public interface Extra extends Tree { }"); + Path msp = base.resolve("msp"); + Path m3 = msp.resolve("m3x"); + tb.writeJavaFiles(m3, + "module m3x { }", + "package m3; public class Test { }"); + Path m4 = msp.resolve("m4x"); + tb.writeJavaFiles(m4, + "module m4x { }", + "package m4; public class Test { }"); + Path classes = base.resolve("classes"); + tb.createDirectories(classes); + + String log = new JavacTask(tb) + .options("--patch-module", "java.compiler=" + m1.toString(), + "--patch-module", "jdk.compiler=" + m2.toString(), + "--module-source-path", msp.toString()) + .outdir(classes) + .files(findJavaFiles(src, msp)) + .run() + .writeAll() + .getOutput(Task.OutputKind.DIRECT); + + if (!log.isEmpty()) + throw new Exception("expected output not found: " + log); + + checkFileExists(classes, "java.compiler/javax/lang/model/element/Extra.class"); + checkFileExists(classes, "jdk.compiler/com/sun/source/tree/Extra.class"); + checkFileExists(classes, "m3x/m3/Test.class"); + checkFileExists(classes, "m4x/m4/Test.class"); + } + + @Test + public void testPatchModuleModuleSourcePathConflict(Path base) throws Exception { + //note: avoiding use of java.base, as that gets special handling on some places: + Path src = base.resolve("src"); + Path m1 = src.resolve("m1x"); + tb.writeJavaFiles(m1, + "module m1x { }", + "package m1; public class Test { }"); + Path m2 = src.resolve("m2x"); + tb.writeJavaFiles(m2, + "module m2x { }", + "package m2; public class Test { }"); + Path classes = base.resolve("classes"); + tb.createDirectories(classes); + + List log = new JavacTask(tb) + .options("--patch-module", "m1x=" + m2.toString(), + "--module-source-path", src.toString(), + "-XDrawDiagnostics") + .outdir(classes) + .files(findJavaFiles(src.resolve("m1x").resolve("m1"), + src.resolve("m2x").resolve("m2"))) + .run(Expect.FAIL) + .writeAll() + .getOutputLines(Task.OutputKind.DIRECT); + + List expectedOut = Arrays.asList( + "Test.java:1:1: compiler.err.file.patched.and.msp: m1x, m2x", + "1 error" + ); + + if (!expectedOut.equals(log)) + throw new Exception("expected output not found: " + log); + } + + @Test + public void testSourcePath(Path base) throws Exception { + //note: avoiding use of java.base, as that gets special handling on some places: + Path src = base.resolve("src"); + tb.writeJavaFiles(src, "package javax.lang.model.element; public interface Extra extends Element, Other { }"); + Path srcPath = base.resolve("src-path"); + tb.writeJavaFiles(srcPath, "package javax.lang.model.element; interface Other { }"); + Path classes = base.resolve("classes"); + tb.createDirectories(classes); + + List log = new JavacTask(tb) + .options("--patch-module", "java.compiler=" + src.toString(), + "-sourcepath", srcPath.toString(), + "-XDrawDiagnostics") + .outdir(classes) + .files(src.resolve("javax/lang/model/element/Extra.java")) + .run(Expect.FAIL) + .writeAll() + .getOutputLines(Task.OutputKind.DIRECT); + + List expectedOut = Arrays.asList( + "Extra.java:1:75: compiler.err.cant.resolve: kindname.class, Other, , ", + "1 error" + ); + + if (!expectedOut.equals(log)) + throw new Exception("expected output not found: " + log); } @Test @@ -124,7 +240,7 @@ public class XModuleTest extends ModuleTestBase { tb.createDirectories(classes); List log = new JavacTask(tb) - .options("-Xmodule:java.compiler", + .options("--patch-module", "java.compiler=" + src.toString(), "--class-path", cpClasses.toString(), "-XDrawDiagnostics") .outdir(classes) @@ -152,16 +268,37 @@ public class XModuleTest extends ModuleTestBase { Path classes = base.resolve("classes"); tb.createDirectories(classes); - List log = new JavacTask(tb) - .options("-XDrawDiagnostics", "-Xmodule:java.compiler") + List log; + List expected; + + log = new JavacTask(tb) + .options("-XDrawDiagnostics", + "--patch-module", "java.compiler=" + src.toString()) .outdir(classes) .files(findJavaFiles(src)) .run(Task.Expect.FAIL) .writeAll() .getOutputLines(Task.OutputKind.DIRECT); - List expected = Arrays.asList("Extra.java:1:1: compiler.err.module-info.with.xmodule.sourcepath", - "1 error"); + expected = Arrays.asList("Extra.java:1:1: compiler.err.module-info.with.patched.module.sourcepath", + "1 error"); + + if (!expected.equals(log)) + throw new Exception("expected output not found: " + log); + + //multi-module mode: + log = new JavacTask(tb) + .options("-XDrawDiagnostics", + "--patch-module", "java.compiler=" + src.toString(), + "--module-source-path", "dummy") + .outdir(classes) + .files(findJavaFiles(src)) + .run(Task.Expect.FAIL) + .writeAll() + .getOutputLines(Task.OutputKind.DIRECT); + + expected = Arrays.asList("- compiler.err.locn.module-info.not.allowed.on.patch.path: module-info.java", + "1 error"); if (!expected.equals(log)) throw new Exception("expected output not found: " + log); @@ -173,7 +310,7 @@ public class XModuleTest extends ModuleTestBase { Path srcMod = base.resolve("src-mod"); tb.writeJavaFiles(srcMod, "module mod {}"); - Path classes = base.resolve("classes"); + Path classes = base.resolve("classes").resolve("java.compiler"); tb.createDirectories(classes); String logMod = new JavacTask(tb) @@ -192,62 +329,36 @@ public class XModuleTest extends ModuleTestBase { "package javax.lang.model.element; public interface Extra { }"); tb.createDirectories(classes); - List log = new JavacTask(tb) - .options("-XDrawDiagnostics", "-Xmodule:java.compiler") + List log; + List expected; + + log = new JavacTask(tb) + .options("-XDrawDiagnostics", + "--patch-module", "java.compiler=" + src.toString()) .outdir(classes) .files(findJavaFiles(src)) .run(Task.Expect.FAIL) .writeAll() .getOutputLines(Task.OutputKind.DIRECT); - List expected = Arrays.asList("Extra.java:1:1: compiler.err.module-info.with.xmodule.classpath", - "1 error"); + expected = Arrays.asList("Extra.java:1:1: compiler.err.module-info.with.patched.module.classoutput", + "1 error"); if (!expected.equals(log)) throw new Exception("expected output not found: " + log); - } - @Test - public void testModuleSourcePathXModule(Path base) throws Exception { - //note: avoiding use of java.base, as that gets special handling on some places: - Path src = base.resolve("src"); - tb.writeJavaFiles(src, "package javax.lang.model.element; public interface Extra extends Element { }"); - Path classes = base.resolve("classes"); - tb.createDirectories(classes); - - List log = new JavacTask(tb) - .options("-XDrawDiagnostics", "-Xmodule:java.compiler", "--module-source-path", src.toString()) - .outdir(classes) + log = new JavacTask(tb) + .options("-XDrawDiagnostics", + "--patch-module", "java.compiler=" + src.toString(), + "--module-source-path", "dummy") + .outdir(classes.getParent()) .files(findJavaFiles(src)) .run(Task.Expect.FAIL) .writeAll() .getOutputLines(Task.OutputKind.DIRECT); - List expected = Arrays.asList("- compiler.err.xmodule.no.module.sourcepath"); - - if (!expected.equals(log)) - throw new Exception("expected output not found: " + log); - } - - @Test - public void testXModuleTooMany(Path base) throws Exception { - //note: avoiding use of java.base, as that gets special handling on some places: - Path src = base.resolve("src"); - tb.writeJavaFiles(src, "package javax.lang.model.element; public interface Extra extends Element { }"); - Path classes = base.resolve("classes"); - tb.createDirectories(classes); - - List log = new JavacTask(tb, Task.Mode.CMDLINE) - .options("-XDrawDiagnostics", "-Xmodule:java.compiler", "-Xmodule:java.compiler") - .outdir(classes) - .files(findJavaFiles(src)) - .run(Task.Expect.FAIL) - .writeAll() - .getOutputLines(Task.OutputKind.DIRECT); - - List expected = Arrays.asList("javac: option -Xmodule: can only be specified once", - "Usage: javac ", - "use --help for a list of possible options"); + expected = Arrays.asList("- compiler.err.locn.module-info.not.allowed.on.patch.path: module-info.class", + "1 error"); if (!expected.equals(log)) throw new Exception("expected output not found: " + log); @@ -266,7 +377,7 @@ public class XModuleTest extends ModuleTestBase { new JavacTask(tb, Task.Mode.CMDLINE) .options("--module-path", modules.toString(), - "-Xmodule:m1") + "--patch-module", "m1=" + src.toString()) .files(findJavaFiles(src)) .run() .writeAll(); @@ -282,7 +393,7 @@ public class XModuleTest extends ModuleTestBase { List log = new JavacTask(tb, Task.Mode.CMDLINE) .options("-XDrawDiagnostics", "--module-path", modules.toString(), - "-Xmodule:m1") + "--patch-module", "m1=" + src2.toString()) .files(findJavaFiles(src2)) .run(Task.Expect.FAIL) .writeAll() @@ -315,7 +426,7 @@ public class XModuleTest extends ModuleTestBase { new JavacTask(tb, Task.Mode.CMDLINE) .options("--module-path", modules.toString(), "--upgrade-module-path", upgrade.toString(), - "-Xmodule:m1") + "--patch-module", "m1=" + src.toString()) .files(findJavaFiles(src)) .run() .writeAll(); @@ -365,7 +476,7 @@ public class XModuleTest extends ModuleTestBase { tb.createDirectories(classes); String log = new JavacTask(tb) - .options("-Xmodule:m", + .options("--patch-module", "m=" + sourcePath.toString(), "--class-path", classPath.toString(), "--source-path", sourcePath.toString(), "--module-path", modulePath.toString(), @@ -419,4 +530,165 @@ public class XModuleTest extends ModuleTestBase { } } + @Test + public void testSingleModeIncremental(Path base) throws Exception { + //note: avoiding use of java.base, as that gets special handling on some places: + Path src = base.resolve("src"); + tb.writeJavaFiles(src, + "package javax.lang.model.element; public interface Extra extends Element { }", + "package javax.lang.model.element; public interface Extra2 extends Extra { }"); + Path classes = base.resolve("classes"); + tb.createDirectories(classes); + + Thread.sleep(2000); //ensure newer timestamps on classfiles: + + new JavacTask(tb) + .options("--patch-module", "java.compiler=" + src.toString()) + .outdir(classes) + .files(findJavaFiles(src)) + .run() + .writeAll() + .getOutput(Task.OutputKind.DIRECT); + + List log = new JavacTask(tb) + .options("--patch-module", "java.compiler=" + src.toString(), + "-verbose") + .outdir(classes) + .files(findJavaFiles(src.resolve("javax/lang/model/element/Extra2.java" + .replace("/", src.getFileSystem().getSeparator())))) + .run() + .writeAll() + .getOutputLines(Task.OutputKind.DIRECT) + .stream() + .filter(l -> l.contains("parsing")) + .collect(Collectors.toList()); + + boolean parsesExtra2 = log.stream() + .anyMatch(l -> l.contains("Extra2.java")); + boolean parsesExtra = log.stream() + .anyMatch(l -> l.contains("Extra.java")); + + if (!parsesExtra2 || parsesExtra) { + throw new AssertionError("Unexpected output: " + log); + } + } + + @Test + public void testComplexMSPAndPatch(Path base) throws Exception { + //note: avoiding use of java.base, as that gets special handling on some places: + Path src1 = base.resolve("src1"); + Path src1ma = src1.resolve("ma"); + tb.writeJavaFiles(src1ma, + "module ma { exports ma; }", + "package ma; public class C1 { public static void method() { } }", + "package ma.impl; public class C2 { }"); + Path src1mb = src1.resolve("mb"); + tb.writeJavaFiles(src1mb, + "module mb { requires ma; }", + "package mb.impl; public class C2 { public static void method() { } }"); + Path src1mc = src1.resolve("mc"); + tb.writeJavaFiles(src1mc, + "module mc { }"); + Path classes1 = base.resolve("classes1"); + tb.createDirectories(classes1); + tb.cleanDirectory(classes1); + + new JavacTask(tb) + .options("--module-source-path", src1.toString()) + .files(findJavaFiles(src1)) + .outdir(classes1) + .run() + .writeAll(); + + //patching: + Path src2 = base.resolve("src2"); + Path src2ma = src2.resolve("ma"); + tb.writeJavaFiles(src2ma, + "package ma.impl; public class C2 { public static void extra() { ma.C1.method(); } }", + "package ma.impl; public class C3 { public void test() { C2.extra(); } }"); + Path src2mb = src2.resolve("mb"); + tb.writeJavaFiles(src2mb, + "package mb.impl; public class C3 { public void test() { C2.method(); ma.C1.method(); ma.impl.C2.extra(); } }"); + Path src2mc = src2.resolve("mc"); + tb.writeJavaFiles(src2mc, + "package mc.impl; public class C2 { public static void test() { } }", + //will require --add-reads ma: + "package mc.impl; public class C3 { public static void test() { ma.impl.C2.extra(); } }"); + Path src2mt = src2.resolve("mt"); + tb.writeJavaFiles(src2mt, + "module mt { requires ma; requires mb; }", + "package mt.impl; public class C2 { public static void test() { mb.impl.C2.method(); ma.impl.C2.extra(); } }", + "package mt.impl; public class C3 { public static void test() { C2.test(); mc.impl.C2.test(); } }"); + Path classes2 = base.resolve("classes2"); + tb.createDirectories(classes2); + tb.cleanDirectory(classes2); + + Thread.sleep(2000); //ensure newer timestamps on classfiles: + + new JavacTask(tb) + .options("--module-path", classes1.toString(), + "--patch-module", "ma=" + src2ma.toString(), + "--patch-module", "mb=" + src2mb.toString(), + "--add-exports", "ma/ma.impl=mb", + "--patch-module", "mc=" + src2mc.toString(), + "--add-reads", "mc=ma", + "--add-exports", "ma/ma.impl=mc", + "--add-exports", "ma/ma.impl=mt", + "--add-exports", "mb/mb.impl=mt", + "--add-exports", "mc/mc.impl=mt", + "--add-reads", "mt=mc", + "--module-source-path", src2.toString()) + .outdir(classes2) + .files(findJavaFiles(src2)) + .run() + .writeAll(); + + //incremental compilation (C2 mustn't be compiled, C3 must): + tb.writeJavaFiles(src2ma, + "package ma.impl; public class C3 { public void test() { ma.C1.method(); C2.extra(); } }"); + tb.writeJavaFiles(src2mt, + "package mt.impl; public class C3 { public static void test() { mc.impl.C2.test(); C2.test(); } }"); + + List log = new JavacTask(tb) + .options("--module-path", classes1.toString(), + "--patch-module", "ma=" + src2ma.toString(), + "--patch-module", "mb=" + src2mb.toString(), + "--add-exports", "ma/ma.impl=mb", + "--patch-module", "mc=" + src2mc.toString(), + "--add-reads", "mc=ma", + "--add-exports", "ma/ma.impl=mc", + "--add-exports", "ma/ma.impl=mt", + "--add-exports", "mb/mb.impl=mt", + "--add-exports", "mc/mc.impl=mt", + "--add-reads", "mt=mc", + "--module-source-path", src2.toString(), + "--add-modules", "mc", + "-verbose") + .outdir(classes2) + .files(src2ma.resolve("ma").resolve("impl").resolve("C3.java"), + src2mt.resolve("mt").resolve("impl").resolve("C3.java")) + .run() + .writeAll() + .getOutputLines(Task.OutputKind.DIRECT) + .stream() + .filter(l -> l.contains("parsing")) + .collect(Collectors.toList()); + + boolean parsesC3 = log.stream() + .anyMatch(l -> l.contains("C3.java")); + boolean parsesC2 = log.stream() + .anyMatch(l -> l.contains("C2.java")); + + if (!parsesC3 || parsesC2) { + throw new AssertionError("Unexpected output: " + log); + } + } + + private void checkFileExists(Path dir, String path) { + Path toCheck = dir.resolve(path.replace("/", dir.getFileSystem().getSeparator())); + + if (!Files.exists(toCheck)) { + throw new AssertionError(toCheck.toString() + " does not exist!"); + } + } } diff --git a/langtools/test/tools/javac/modules/InheritRuntimeEnvironmentTest.java b/langtools/test/tools/javac/modules/InheritRuntimeEnvironmentTest.java index b4766d7f5d7..e261dbf6dd7 100644 --- a/langtools/test/tools/javac/modules/InheritRuntimeEnvironmentTest.java +++ b/langtools/test/tools/javac/modules/InheritRuntimeEnvironmentTest.java @@ -177,7 +177,7 @@ public class InheritRuntimeEnvironmentTest extends ModuleTestBase { Files.createDirectories(patch); new JavacTask(tb) - .options("-Xmodule:java.base") + .options("--patch-module", "java.base=" + patchSrc.toString()) .outdir(patch) .sourcepath(patchSrc) .files(findJavaFiles(patchSrc)) diff --git a/langtools/test/tools/javac/modules/PatchModulesTest.java b/langtools/test/tools/javac/modules/PatchModulesTest.java index dde0c53a613..6543c868994 100644 --- a/langtools/test/tools/javac/modules/PatchModulesTest.java +++ b/langtools/test/tools/javac/modules/PatchModulesTest.java @@ -28,7 +28,7 @@ * @library /tools/lib * @modules * jdk.compiler/com.sun.tools.javac.api - * jdk.compiler/com.sun.tools.javac.file:+open + * jdk.compiler/com.sun.tools.javac.file * jdk.compiler/com.sun.tools.javac.main * @build toolbox.ToolBox toolbox.JavacTask toolbox.ModuleBuilder ModuleTestBase * @run main PatchModulesTest @@ -38,21 +38,26 @@ import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.io.StringWriter; -import java.lang.reflect.Field; +import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.util.AbstractMap.SimpleEntry; import java.util.List; import java.util.Map; +import java.util.Map.Entry; +import java.util.TreeMap; import java.util.stream.Collectors; +import java.util.stream.StreamSupport; +import javax.tools.JavaFileManager.Location; import javax.tools.JavaFileObject; import javax.tools.ToolProvider; +import javax.tools.StandardJavaFileManager; +import javax.tools.StandardLocation; import com.sun.source.util.JavacTask; import com.sun.tools.javac.api.JavacTool; -import com.sun.tools.javac.file.BaseFileManager; import com.sun.tools.javac.file.JavacFileManager; -import com.sun.tools.javac.file.Locations; import static java.util.Arrays.asList; @@ -115,21 +120,29 @@ public class PatchModulesTest extends ModuleTestBase { void test(List patches, boolean expectOK, String expect) throws Exception { JavacTool tool = (JavacTool) ToolProvider.getSystemJavaCompiler(); StringWriter sw = new StringWriter(); - try (PrintWriter pw = new PrintWriter(sw)) { - JavacFileManager fm = tool.getStandardFileManager(null, null, null); + try (PrintWriter pw = new PrintWriter(sw); + JavacFileManager fm = tool.getStandardFileManager(null, null, null)) { List opts = patches.stream() .map(p -> "--patch-module=" + p.replace(":", PS)) .collect(Collectors.toList()); Iterable files = fm.getJavaFileObjects("C.java"); JavacTask task = tool.getTask(pw, fm, null, opts, null, files); - Field locationsField = BaseFileManager.class.getDeclaredField("locations"); - locationsField.setAccessible(true); - Object locations = locationsField.get(fm); + Map> mod2Location = + StreamSupport.stream(fm.listLocationsForModules(StandardLocation.PATCH_MODULE_PATH) + .spliterator(), + false) + .flatMap(sl -> sl.stream()) + .collect(Collectors.groupingBy(l -> fm.inferModuleName(l))); - Field patchMapField = Locations.class.getDeclaredField("patchMap"); - patchMapField.setAccessible(true); - Map patchMap = (Map) patchMapField.get(locations); + Map> patchMap = mod2Location.entrySet() + .stream() + .map(e -> new SimpleEntry<>(e.getKey(), e.getValue().get(0))) + .map(e -> new SimpleEntry<>(e.getKey(), locationPaths(fm, e.getValue()))) + .collect(Collectors.toMap(Entry :: getKey, + Entry :: getValue, + (v1, v2) -> {throw new IllegalStateException();}, + TreeMap::new)); String found = patchMap.toString(); if (!found.equals(expect)) { @@ -150,5 +163,34 @@ public class PatchModulesTest extends ModuleTestBase { } } } + + static List locationPaths(StandardJavaFileManager fm, Location loc) { + return StreamSupport.stream(fm.getLocationAsPaths(loc).spliterator(), false) + .map(p -> p.toString()) + .collect(Collectors.toList()); + } + + @Test + public void testPatchWithSource(Path base) throws Exception { + Path patch = base.resolve("patch"); + tb.writeJavaFiles(patch, "package javax.lang.model.element; public interface Extra { }"); + Path src = base.resolve("src"); + tb.writeJavaFiles(src, + "module m { requires java.compiler; }", + "package test; public interface Test extends javax.lang.model.element.Extra { }"); + Path classes = base.resolve("classes"); + tb.createDirectories(classes); + + new toolbox.JavacTask(tb) + .options("--patch-module", "java.compiler=" + patch.toString()) + .outdir(classes) + .files(findJavaFiles(src)) + .run() + .writeAll(); + + if (Files.exists(classes.resolve("javax"))) { + throw new AssertionError(); + } + } } diff --git a/langtools/test/tools/javac/synthesize/Main.java b/langtools/test/tools/javac/synthesize/Main.java index d92cff2a96e..bf430b8889c 100644 --- a/langtools/test/tools/javac/synthesize/Main.java +++ b/langtools/test/tools/javac/synthesize/Main.java @@ -92,12 +92,17 @@ public class Main File empty = new File("empty"); empty.mkdirs(); + // files to compile are in a separate directory from test to avoid + // confusing jtreg + File src = new File(testSrc, "src"); + List args = new ArrayList(); args.add("-classpath"); args.add("empty"); if (stdBootClassPath) { - args.add("-Xmodule:java.base"); + args.add("--patch-module"); + args.add("java.base=" + testSrc.getAbsolutePath()); } else { args.add("--system"); args.add("none"); @@ -108,9 +113,6 @@ public class Main args.add("-d"); args.add("."); - // files to compile are in a separate directory from test to avoid - // confusing jtreg - File src = new File(testSrc, "src"); for (String f: files) args.add(new File(src, f).getPath()); diff --git a/langtools/test/tools/jdeps/jdkinternals/RemovedJDKInternals.java b/langtools/test/tools/jdeps/jdkinternals/RemovedJDKInternals.java index 6611235d48f..b97c27dcd46 100644 --- a/langtools/test/tools/jdeps/jdkinternals/RemovedJDKInternals.java +++ b/langtools/test/tools/jdeps/jdkinternals/RemovedJDKInternals.java @@ -63,7 +63,7 @@ public class RemovedJDKInternals { Path sunMiscSrc = Paths.get(TEST_SRC, "patches", JDK_UNSUPPORTED); Path patchDir = PATCHES_DIR.resolve(JDK_UNSUPPORTED); assertTrue(CompilerUtils.compile(sunMiscSrc, patchDir, - "-Xmodule:" + JDK_UNSUPPORTED)); + "--patch-module", JDK_UNSUPPORTED + "=" + sunMiscSrc.toString())); // compile com.sun.image.codec.jpeg types Path codecSrc = Paths.get(TEST_SRC, "patches", "java.desktop"); From 0f008adc1e6c042d248838209c6ed52f0fb9922d Mon Sep 17 00:00:00 2001 From: Jan Lahoda Date: Mon, 13 Feb 2017 09:41:05 +0100 Subject: [PATCH 149/447] 8173777: Merge javac -Xmodule into javac--patch-module Converting uses of -Xmodule: to --patch-module. Reviewed-by: alanb, mchung --- .../org/w3c/dom}/Document.java | 0 .../{ => patch-src1/org/w3c/dom}/Node.java | 0 .../xerces/internal/dom}/DocumentImpl.java | 0 jdk/test/javax/xml/jaxp/common/8035437/run.sh | 34 +++++++++++++++++-- .../sun/text/IntHashtable/Bug4170614Test.sh | 4 +-- .../java/text}/Bug4170614Test.java | 0 jdk/test/tools/launcher/ToolsOpts.java | 9 +++-- .../modules/patch/basic/PatchTest.java | 10 +++--- .../patch/basic/PatchTestWarningError.java | 10 +++--- .../systemmodules/PatchSystemModules.java | 3 +- 10 files changed, 55 insertions(+), 15 deletions(-) rename jdk/test/javax/xml/jaxp/common/8035437/{ => patch-src1/org/w3c/dom}/Document.java (100%) rename jdk/test/javax/xml/jaxp/common/8035437/{ => patch-src1/org/w3c/dom}/Node.java (100%) rename jdk/test/javax/xml/jaxp/common/8035437/{ => patch-src2/com/sun/org/apache/xerces/internal/dom}/DocumentImpl.java (100%) rename jdk/test/sun/text/IntHashtable/{ => patch-src/java/text}/Bug4170614Test.java (100%) diff --git a/jdk/test/javax/xml/jaxp/common/8035437/Document.java b/jdk/test/javax/xml/jaxp/common/8035437/patch-src1/org/w3c/dom/Document.java similarity index 100% rename from jdk/test/javax/xml/jaxp/common/8035437/Document.java rename to jdk/test/javax/xml/jaxp/common/8035437/patch-src1/org/w3c/dom/Document.java diff --git a/jdk/test/javax/xml/jaxp/common/8035437/Node.java b/jdk/test/javax/xml/jaxp/common/8035437/patch-src1/org/w3c/dom/Node.java similarity index 100% rename from jdk/test/javax/xml/jaxp/common/8035437/Node.java rename to jdk/test/javax/xml/jaxp/common/8035437/patch-src1/org/w3c/dom/Node.java diff --git a/jdk/test/javax/xml/jaxp/common/8035437/DocumentImpl.java b/jdk/test/javax/xml/jaxp/common/8035437/patch-src2/com/sun/org/apache/xerces/internal/dom/DocumentImpl.java similarity index 100% rename from jdk/test/javax/xml/jaxp/common/8035437/DocumentImpl.java rename to jdk/test/javax/xml/jaxp/common/8035437/patch-src2/com/sun/org/apache/xerces/internal/dom/DocumentImpl.java diff --git a/jdk/test/javax/xml/jaxp/common/8035437/run.sh b/jdk/test/javax/xml/jaxp/common/8035437/run.sh index ea377c67281..9b1d327e6d2 100644 --- a/jdk/test/javax/xml/jaxp/common/8035437/run.sh +++ b/jdk/test/javax/xml/jaxp/common/8035437/run.sh @@ -28,13 +28,43 @@ # @summary Tests that java.lang.AbstractMethodError is not thrown when # serializing improper version of DocumentImpl class. +OS=`uname -s` +case "$OS" in + SunOS ) + PS=":" + ;; + Linux ) + PS=":" + ;; + Darwin ) + PS=":" + ;; + AIX ) + PS=":" + ;; + Windows*) + PS=";" + ;; + CYGWIN*) + PS=";" + ;; + * ) + echo "Unrecognized system!" + exit 1; + ;; +esac + mkdir -p exec/java.xml compile/java.xml $COMPILEJAVA/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} \ - -d compile/java.xml -Xmodule:java.xml $TESTSRC/Document.java $TESTSRC/Node.java || exit 1 + -d compile/java.xml --patch-module java.xml=$TESTSRC/patch-src1 \ + $TESTSRC/patch-src1/org/w3c/dom/Document.java \ + $TESTSRC/patch-src1/org/w3c/dom/Node.java || exit 1 $COMPILEJAVA/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} \ - -d exec/java.xml --patch-module java.xml=compile/java.xml -Xmodule:java.xml $TESTSRC/DocumentImpl.java || exit 2 + -d exec/java.xml --patch-module java.xml=compile/java.xml${PS}$TESTSRC/patch-src2 \ + $TESTSRC/patch-src2/com/sun/org/apache/xerces/internal/dom/DocumentImpl.java \ + || exit 2 $COMPILEJAVA/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} \ $TESTSRC/AbstractMethodErrorTest.java -d exec || exit 3 diff --git a/jdk/test/sun/text/IntHashtable/Bug4170614Test.sh b/jdk/test/sun/text/IntHashtable/Bug4170614Test.sh index 0c31934d01c..e70f4905831 100644 --- a/jdk/test/sun/text/IntHashtable/Bug4170614Test.sh +++ b/jdk/test/sun/text/IntHashtable/Bug4170614Test.sh @@ -60,8 +60,8 @@ cd ${TESTSRC} TEST_JAVABASE=${TESTCLASSES}/java.base mkdir -p ${TEST_JAVABASE} ${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} \ - -Xmodule:java.base \ - -d ${TEST_JAVABASE} Bug4170614Test.java + --patch-module java.base=patch-src \ + -d ${TEST_JAVABASE} patch-src/java/text/Bug4170614Test.java ${TESTJAVA}/bin/java ${TESTVMOPTS} --patch-module java.base=${TEST_JAVABASE} java.text.Bug4170614Test diff --git a/jdk/test/sun/text/IntHashtable/Bug4170614Test.java b/jdk/test/sun/text/IntHashtable/patch-src/java/text/Bug4170614Test.java similarity index 100% rename from jdk/test/sun/text/IntHashtable/Bug4170614Test.java rename to jdk/test/sun/text/IntHashtable/patch-src/java/text/Bug4170614Test.java diff --git a/jdk/test/tools/launcher/ToolsOpts.java b/jdk/test/tools/launcher/ToolsOpts.java index f8920c6acd7..5837c62e015 100644 --- a/jdk/test/tools/launcher/ToolsOpts.java +++ b/jdk/test/tools/launcher/ToolsOpts.java @@ -87,11 +87,16 @@ public class ToolsOpts extends TestHelper { contents.add(" }\n"); contents.add(" }\n"); contents.add("}\n"); - createFile(new File(mainJava), contents); + String mainJavaPath = "patch-src/com/sun/tools/javac/" + mainJava; + File mainJavaFile = new File(mainJavaPath.replace('/', File.separatorChar)); + mainJavaFile.getParentFile().mkdirs(); + createFile(mainJavaFile, contents); // compile Main.java into directory to override classes in jdk.compiler new File("jdk.compiler").mkdir(); - compile("-Xmodule:jdk.compiler", "-d", "jdk.compiler", mainJava); + compile("--patch-module", "jdk.compiler=patch-src", + "-d", "jdk.compiler", + mainJavaFile.toString()); } static void pass(String msg) { diff --git a/jdk/test/tools/launcher/modules/patch/basic/PatchTest.java b/jdk/test/tools/launcher/modules/patch/basic/PatchTest.java index 968336ae8aa..15457cf7664 100644 --- a/jdk/test/tools/launcher/modules/patch/basic/PatchTest.java +++ b/jdk/test/tools/launcher/modules/patch/basic/PatchTest.java @@ -105,22 +105,24 @@ public class PatchTest { MODS_DIR.resolve("test")); assertTrue(compiled, "classes did not compile"); - // javac -Xmodule:$MODULE -d patches1/$MODULE patches1/$MODULE/** + // javac --patch-module $MODULE=patches1/$MODULE -d patches1/$MODULE patches1/$MODULE/** // jar cf patches/$MODULE-1.jar -C patches1/$MODULE . for (Path src : Files.newDirectoryStream(SRC1_DIR)) { Path output = PATCHES1_DIR.resolve(src.getFileName()); String mn = src.getFileName().toString(); - compiled = CompilerUtils.compile(src, output, "-Xmodule:" + mn); + compiled = CompilerUtils.compile(src, output, + "--patch-module", mn + "=" + src.toString()); assertTrue(compiled, "classes did not compile"); JarUtils.createJarFile(PATCHES_DIR.resolve(mn + "-1.jar"), output); } - // javac -Xmodule:$MODULE -d patches2/$MODULE patches2/$MODULE/** + // javac --patch-module $MODULE=patches2/$MODULE -d patches2/$MODULE patches2/$MODULE/** // jar cf patches/$MODULE-2.jar -C patches2/$MODULE . for (Path src : Files.newDirectoryStream(SRC2_DIR)) { Path output = PATCHES2_DIR.resolve(src.getFileName()); String mn = src.getFileName().toString(); - compiled = CompilerUtils.compile(src, output, "-Xmodule:" + mn); + compiled = CompilerUtils.compile(src, output, + "--patch-module", mn + "=" + src.toString()); assertTrue(compiled, "classes did not compile"); JarUtils.createJarFile(PATCHES_DIR.resolve(mn + "-2.jar"), output); } diff --git a/jdk/test/tools/launcher/modules/patch/basic/PatchTestWarningError.java b/jdk/test/tools/launcher/modules/patch/basic/PatchTestWarningError.java index 711bedf8e3a..5ada5888d92 100644 --- a/jdk/test/tools/launcher/modules/patch/basic/PatchTestWarningError.java +++ b/jdk/test/tools/launcher/modules/patch/basic/PatchTestWarningError.java @@ -93,20 +93,22 @@ public class PatchTestWarningError { MODS_DIR.resolve("test")); assertTrue(compiled, "classes did not compile"); - // javac -Xmodule:$MODULE -d patches1/$MODULE patches1/$MODULE/** + // javac --patch-module $MODULE=patches1/$MODULE -d patches1/$MODULE patches1/$MODULE/** Path src = SRC1_DIR.resolve("java.base"); Path output = PATCHES1_DIR.resolve(src.getFileName()); Files.createDirectories(output); String mn = src.getFileName().toString(); - compiled = CompilerUtils.compile(src, output, "-Xmodule:" + mn); + compiled = CompilerUtils.compile(src, output, + "--patch-module", mn + "=" + src.toString()); assertTrue(compiled, "classes did not compile"); - // javac -Xmodule:$MODULE -d patches2/$MODULE patches2/$MODULE/** + // javac --patch-module $MODULE=patches2/$MODULE -d patches2/$MODULE patches2/$MODULE/** src = SRC2_DIR.resolve("java.base"); output = PATCHES2_DIR.resolve(src.getFileName()); Files.createDirectories(output); mn = src.getFileName().toString(); - compiled = CompilerUtils.compile(src, output, "-Xmodule:" + mn); + compiled = CompilerUtils.compile(src, output, + "--patch-module", mn + "=" + src.toString()); assertTrue(compiled, "classes did not compile"); } diff --git a/jdk/test/tools/launcher/modules/patch/systemmodules/PatchSystemModules.java b/jdk/test/tools/launcher/modules/patch/systemmodules/PatchSystemModules.java index 9a5c84cad99..1f1ff316114 100644 --- a/jdk/test/tools/launcher/modules/patch/systemmodules/PatchSystemModules.java +++ b/jdk/test/tools/launcher/modules/patch/systemmodules/PatchSystemModules.java @@ -73,9 +73,10 @@ public class PatchSystemModules { } // compile patched source + String patchDir = PATCH_SRC_DIR.resolve(JAVA_BASE).toString(); assertTrue(CompilerUtils.compile(PATCH_SRC_DIR.resolve(JAVA_BASE), PATCH_DIR.resolve(JAVA_BASE), - "-Xmodule:java.base")); + "--patch-module", "java.base=" + patchDir)); assertTrue(CompilerUtils.compile(PATCH_SRC_DIR.resolve("m2"), PATCH_DIR.resolve("m2"))); From 9c2bee086b1515929b4c0f1bded4a62d00370d18 Mon Sep 17 00:00:00 2001 From: Prasanta Sadhukhan Date: Mon, 13 Feb 2017 16:26:11 +0530 Subject: [PATCH 150/447] 8174720: [TEST_BUG] add :open to a @modules annotation for bug7089914.java Reviewed-by: yan --- .../plaf/windows/WindowsRadioButtonUI/7089914/bug7089914.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/test/com/sun/java/swing/plaf/windows/WindowsRadioButtonUI/7089914/bug7089914.java b/jdk/test/com/sun/java/swing/plaf/windows/WindowsRadioButtonUI/7089914/bug7089914.java index 3c0d03c9326..8f100851283 100644 --- a/jdk/test/com/sun/java/swing/plaf/windows/WindowsRadioButtonUI/7089914/bug7089914.java +++ b/jdk/test/com/sun/java/swing/plaf/windows/WindowsRadioButtonUI/7089914/bug7089914.java @@ -26,9 +26,9 @@ */ /* @test - * @bug 7089914 + * @bug 7089914 8174720 * @requires (os.family == "windows") - * @modules java.desktop/com.sun.java.swing.plaf.windows + * @modules java.desktop/com.sun.java.swing.plaf.windows:open * @summary Focus on image icons are not visible in javaws cache with high contrast mode * @author Sean Chou */ From 4c9c5913997255a9341c991d4d22f6c47c374987 Mon Sep 17 00:00:00 2001 From: Jan Lahoda Date: Mon, 13 Feb 2017 11:57:56 +0100 Subject: [PATCH 151/447] 8174245: Javadoc is not working for some methods Parsing source file as if they were part of their corresponding modules. Reviewed-by: rfield --- .../shellsupport/doc/JavadocHelper.java | 75 ++++++++++++++++++- .../jshell/tool/ConsoleIOContext.java | 2 + langtools/test/jdk/jshell/JavadocTest.java | 49 +++++++++++- 3 files changed, 121 insertions(+), 5 deletions(-) diff --git a/langtools/src/jdk.compiler/share/classes/jdk/internal/shellsupport/doc/JavadocHelper.java b/langtools/src/jdk.compiler/share/classes/jdk/internal/shellsupport/doc/JavadocHelper.java index bb9a5a4b3b7..b240d0117a9 100644 --- a/langtools/src/jdk.compiler/share/classes/jdk/internal/shellsupport/doc/JavadocHelper.java +++ b/langtools/src/jdk.compiler/share/classes/jdk/internal/shellsupport/doc/JavadocHelper.java @@ -49,12 +49,15 @@ import java.util.stream.Stream; import javax.lang.model.element.Element; import javax.lang.model.element.ElementKind; import javax.lang.model.element.ExecutableElement; +import javax.lang.model.element.ModuleElement; import javax.lang.model.element.TypeElement; import javax.lang.model.element.VariableElement; import javax.lang.model.type.DeclaredType; import javax.lang.model.type.TypeKind; import javax.lang.model.type.TypeMirror; import javax.lang.model.util.ElementFilter; +import javax.lang.model.util.Elements; +import javax.tools.ForwardingJavaFileManager; import javax.tools.JavaCompiler; import javax.tools.JavaFileManager; import javax.tools.JavaFileObject; @@ -542,8 +545,13 @@ public abstract class JavadocHelper implements AutoCloseable { if (type == null) return null; - String binaryName = origin.getElements().getBinaryName(type).toString(); - Pair source = findSource(binaryName); + Elements elements = origin.getElements(); + String binaryName = elements.getBinaryName(type).toString(); + ModuleElement module = elements.getModuleOf(type); + String moduleName = module == null || module.isUnnamed() + ? null + : module.getQualifiedName().toString(); + Pair source = findSource(moduleName, binaryName); if (source == null) return null; @@ -636,7 +644,8 @@ public abstract class JavadocHelper implements AutoCloseable { }.scan(cut, null); } - private Pair findSource(String binaryName) throws IOException { + private Pair findSource(String moduleName, + String binaryName) throws IOException { JavaFileObject jfo = fm.getJavaFileForInput(StandardLocation.SOURCE_PATH, binaryName, JavaFileObject.Kind.SOURCE); @@ -645,7 +654,10 @@ public abstract class JavadocHelper implements AutoCloseable { return null; List jfos = Arrays.asList(jfo); - JavacTaskImpl task = (JavacTaskImpl) compiler.getTask(null, baseFileManager, d -> {}, null, null, jfos); + JavaFileManager patchFM = moduleName != null + ? new PatchModuleFileManager(baseFileManager, jfo, moduleName) + : baseFileManager; + JavacTaskImpl task = (JavacTaskImpl) compiler.getTask(null, patchFM, d -> {}, null, null, jfos); Iterable cuts = task.parse(); task.enter(); @@ -657,6 +669,61 @@ public abstract class JavadocHelper implements AutoCloseable { public void close() throws IOException { fm.close(); } + + private static final class PatchModuleFileManager + extends ForwardingJavaFileManager { + + private final JavaFileObject file; + private final String moduleName; + + public PatchModuleFileManager(JavaFileManager fileManager, + JavaFileObject file, + String moduleName) { + super(fileManager); + this.file = file; + this.moduleName = moduleName; + } + + @Override @DefinedBy(Api.COMPILER) + public Location getLocationForModule(Location location, + JavaFileObject fo, + String pkgName) throws IOException { + return fo == file + ? PATCH_LOCATION + : super.getLocationForModule(location, fo, pkgName); + } + + @Override @DefinedBy(Api.COMPILER) + public String inferModuleName(Location location) throws IOException { + return location == PATCH_LOCATION + ? moduleName + : super.inferModuleName(location); + } + + @Override @DefinedBy(Api.COMPILER) + public boolean hasLocation(Location location) { + return location == StandardLocation.PATCH_MODULE_PATH || + super.hasLocation(location); + } + + private static final Location PATCH_LOCATION = new Location() { + @Override @DefinedBy(Api.COMPILER) + public String getName() { + return "PATCH_LOCATION"; + } + + @Override @DefinedBy(Api.COMPILER) + public boolean isOutputLocation() { + return false; + } + + @Override @DefinedBy(Api.COMPILER) + public boolean isModuleOrientedLocation() { + return false; + } + + }; + } } } diff --git a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ConsoleIOContext.java b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ConsoleIOContext.java index 3cc4eb02273..8468594d493 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ConsoleIOContext.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ConsoleIOContext.java @@ -310,6 +310,8 @@ class ConsoleIOContext extends IOContext { int firstLine = 0; PRINT_PAGE: while (true) { + in.print(lastNote.replaceAll(".", " ") + ConsoleReader.RESET_LINE); + int toPrint = height - 1; while (toPrint > 0 && firstLine < lines.length) { diff --git a/langtools/test/jdk/jshell/JavadocTest.java b/langtools/test/jdk/jshell/JavadocTest.java index a43ef91aa6d..184921adf9a 100644 --- a/langtools/test/jdk/jshell/JavadocTest.java +++ b/langtools/test/jdk/jshell/JavadocTest.java @@ -23,7 +23,7 @@ /* * @test - * @bug 8131019 8169561 + * @bug 8131019 8169561 8174245 * @summary Test Javadoc * @library /tools/lib * @modules jdk.compiler/com.sun.tools.javac.api @@ -107,4 +107,51 @@ public class JavadocTest extends KullaTesting { addToClasspath(compiler.getClassDir()); } + public void testCollectionsMin() { + prepareJavaUtilZip(); + assertJavadoc("java.util.Collections.min(|", + "T java.util.Collections.min(java.util.Collection coll, java.util.Comparator comp)\n" + + " min comparator\n", + "T java.util.Collections.>min(java.util.Collection coll)\n" + + " min comparable\n"); + } + + private void prepareJavaUtilZip() { + String clazz = + "package java.util;\n" + + "/**Top level." + + " */\n" + + "public class Collections {\n" + + " /**\n" + + " * min comparable\n" + + " */\n" + + " public static > T min(Collection coll) {" + + " return null;\n" + + " }\n" + + " /**\n" + + " * min comparator\n" + + " */\n" + + " public static T min(Collection coll, Comparator comp) {\n" + + " return null;\n" + + " }\n" + + "}\n"; + + Path srcZip = Paths.get("src.zip"); + + try (JarOutputStream out = new JarOutputStream(Files.newOutputStream(srcZip))) { + out.putNextEntry(new JarEntry("java/util/Collections.java")); + out.write(clazz.getBytes()); + } catch (IOException ex) { + throw new IllegalStateException(ex); + } + + try { + Field availableSources = getAnalysis().getClass().getDeclaredField("availableSources"); + availableSources.setAccessible(true); + availableSources.set(getAnalysis(), Arrays.asList(srcZip)); + } catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException ex) { + throw new IllegalStateException(ex); + } + } + } From 9d5439dda1475c383afb3f29b3f2ad7771b823ab Mon Sep 17 00:00:00 2001 From: Sean Mullan Date: Mon, 13 Feb 2017 11:35:00 -0500 Subject: [PATCH 152/447] 8174837: Add "since=9" to deprecated ContentSigner and ContentSignerParameters classes Reviewed-by: vinnie --- .../share/classes/com/sun/jarsigner/ContentSigner.java | 4 ++-- .../classes/com/sun/jarsigner/ContentSignerParameters.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSigner.java b/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSigner.java index 0976535946b..abeeb106f77 100644 --- a/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSigner.java +++ b/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSigner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,7 +38,7 @@ import java.security.cert.CertificateException; * @deprecated This class has been deprecated. */ -@Deprecated +@Deprecated(since="9") public abstract class ContentSigner { /** diff --git a/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSignerParameters.java b/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSignerParameters.java index a2cb8d70253..daa13fe5f77 100644 --- a/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSignerParameters.java +++ b/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSignerParameters.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,7 +36,7 @@ import java.util.zip.ZipFile; * @author Vincent Ryan * @deprecated This class has been deprecated. */ -@Deprecated +@Deprecated(since="9") public interface ContentSignerParameters { /** From 2e2479ed2d66306ef6906d60809c742ae73eb6cd Mon Sep 17 00:00:00 2001 From: Phil Race Date: Mon, 13 Feb 2017 08:49:54 -0800 Subject: [PATCH 153/447] 8170913: Java "1.8.0_112" on Windows 10 displays different characters for EUDCs from ones created in eudcedit.exe Reviewed-by: vadim, psadhukhan --- .../share/classes/sun/font/CompositeFont.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/jdk/src/java.desktop/share/classes/sun/font/CompositeFont.java b/jdk/src/java.desktop/share/classes/sun/font/CompositeFont.java index 622a04d472e..bc136d75cfa 100644 --- a/jdk/src/java.desktop/share/classes/sun/font/CompositeFont.java +++ b/jdk/src/java.desktop/share/classes/sun/font/CompositeFont.java @@ -93,20 +93,25 @@ public final class CompositeFont extends Font2D { * better that it is handled internally to the CompositeFont class. */ if (fm.getEUDCFont() != null) { + int msCnt = numMetricsSlots; + int fbCnt = numSlots - msCnt; numSlots++; if (componentNames != null) { componentNames = new String[numSlots]; - System.arraycopy(compNames, 0, componentNames, 0, numSlots-1); - componentNames[numSlots-1] = - fm.getEUDCFont().getFontName(null); + System.arraycopy(compNames, 0, componentNames, 0, msCnt); + componentNames[msCnt] = fm.getEUDCFont().getFontName(null); + System.arraycopy(compNames, msCnt, + componentNames, msCnt+1, fbCnt); } if (componentFileNames != null) { componentFileNames = new String[numSlots]; System.arraycopy(compFileNames, 0, - componentFileNames, 0, numSlots-1); + componentFileNames, 0, msCnt); + System.arraycopy(compFileNames, msCnt, + componentFileNames, msCnt+1, fbCnt); } components = new PhysicalFont[numSlots]; - components[numSlots-1] = fm.getEUDCFont(); + components[msCnt] = fm.getEUDCFont(); deferredInitialisation = new boolean[numSlots]; if (defer) { for (int i=0; i Date: Mon, 13 Feb 2017 08:50:26 -0800 Subject: [PATCH 154/447] 8174797: jshell tool: invalid module path crashes tool 8174796: jshell tool: regression: user home (tilde) not translated Reviewed-by: jlahoda --- .../jdk/internal/jshell/tool/JShellTool.java | 51 ++++++++++++++- langtools/test/jdk/jshell/ToolBasicTest.java | 63 +++++++++++++++++-- langtools/test/jdk/jshell/ToolSimpleTest.java | 10 ++- 3 files changed, 117 insertions(+), 7 deletions(-) diff --git a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java index 95c54aad2a7..db8970c6350 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java @@ -349,9 +349,56 @@ public class JShellTool implements MessageHandler { } } + // check that the supplied string represent valid class/module paths + // converting any ~/ to user home + private Collection validPaths(Collection vals, String context, boolean isModulePath) { + Stream result = vals.stream() + .map(s -> Arrays.stream(s.split(File.pathSeparator)) + .map(sp -> toPathResolvingUserHome(sp)) + .filter(p -> checkValidPathEntry(p, context, isModulePath)) + .map(p -> p.toString()) + .collect(Collectors.joining(File.pathSeparator))); + if (failed) { + return Collections.emptyList(); + } else { + return result.collect(toList()); + } + } + + // Adapted from compiler method Locations.checkValidModulePathEntry + private boolean checkValidPathEntry(Path p, String context, boolean isModulePath) { + if (!Files.exists(p)) { + msg("jshell.err.file.not.found", context, p); + failed = true; + return false; + } + if (Files.isDirectory(p)) { + // if module-path, either an exploded module or a directory of modules + return true; + } + + String name = p.getFileName().toString(); + int lastDot = name.lastIndexOf("."); + if (lastDot > 0) { + switch (name.substring(lastDot)) { + case ".jar": + return true; + case ".jmod": + if (isModulePath) { + return true; + } + } + } + msg("jshell.err.arg", context, p); + failed = true; + return false; + } + Options parse(OptionSet options) { - addOptions(OptionKind.CLASS_PATH, options.valuesOf(argClassPath)); - addOptions(OptionKind.MODULE_PATH, options.valuesOf(argModulePath)); + addOptions(OptionKind.CLASS_PATH, + validPaths(options.valuesOf(argClassPath), "--class-path", false)); + addOptions(OptionKind.MODULE_PATH, + validPaths(options.valuesOf(argModulePath), "--module-path", true)); addOptions(OptionKind.ADD_MODULES, options.valuesOf(argAddModules)); addOptions(OptionKind.ADD_EXPORTS, options.valuesOf(argAddExports).stream() .map(mp -> mp.contains("=") ? mp : mp + "=ALL-UNNAMED") diff --git a/langtools/test/jdk/jshell/ToolBasicTest.java b/langtools/test/jdk/jshell/ToolBasicTest.java index 389b3b5a89b..d62382cbfc8 100644 --- a/langtools/test/jdk/jshell/ToolBasicTest.java +++ b/langtools/test/jdk/jshell/ToolBasicTest.java @@ -23,7 +23,7 @@ /* * @test - * @bug 8143037 8142447 8144095 8140265 8144906 8146138 8147887 8147886 8148316 8148317 8143955 8157953 8080347 8154714 8166649 8167643 8170162 8172102 8165405 + * @bug 8143037 8142447 8144095 8140265 8144906 8146138 8147887 8147886 8148316 8148317 8143955 8157953 8080347 8154714 8166649 8167643 8170162 8172102 8165405 8174796 8174797 * @summary Tests for Basic tests for REPL tool * @modules jdk.compiler/com.sun.tools.javac.api * jdk.compiler/com.sun.tools.javac.main @@ -35,6 +35,7 @@ * @run testng/timeout=600 ToolBasicTest */ +import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.io.StringWriter; @@ -272,23 +273,58 @@ public class ToolBasicTest extends ReplToolTesting { ); } - public void testClasspathJar() { + private String makeSimpleJar() { Compiler compiler = new Compiler(); Path outDir = Paths.get("testClasspathJar"); compiler.compile(outDir, "package pkg; public class A { public String toString() { return \"A\"; } }"); String jarName = "test.jar"; compiler.jar(outDir, jarName, "pkg/A.class"); - Path jarPath = compiler.getPath(outDir).resolve(jarName); + return compiler.getPath(outDir).resolve(jarName).toString(); + } + + public void testClasspathJar() { + String jarPath = makeSimpleJar(); test( (a) -> assertCommand(a, "/env --class-path " + jarPath, "| Setting new options and restoring state."), (a) -> evaluateExpression(a, "pkg.A", "new pkg.A();", "A") ); - test(new String[] { "--class-path", jarPath.toString() }, + test(new String[] { "--class-path", jarPath }, (a) -> evaluateExpression(a, "pkg.A", "new pkg.A();", "A") ); } + public void testClasspathUserHomeExpansion() { + String jarPath = makeSimpleJar(); + String tilde = "~" + File.separator; + test( + (a) -> assertCommand(a, "/env --class-path " + tilde + "forblato", + "| File '" + System.getProperty("user.home") + File.separator + + "forblato' for '--class-path' is not found."), + (a) -> assertCommand(a, "/env --class-path " + jarPath + File.pathSeparator + + tilde + "forblato", + "| File '" + System.getProperty("user.home") + File.separator + + "forblato' for '--class-path' is not found.") + ); + } + + public void testBadClasspath() { + String jarPath = makeSimpleJar(); + Compiler compiler = new Compiler(); + Path t1 = compiler.getPath("whatever/thing.zip"); + compiler.writeToFile(t1, ""); + Path t2 = compiler.getPath("whatever/thing.jmod"); + compiler.writeToFile(t2, ""); + test( + (a) -> assertCommand(a, "/env --class-path " + t1.toString(), + "| Invalid '--class-path' argument: " + t1.toString()), + (a) -> assertCommand(a, "/env --class-path " + jarPath + File.pathSeparator + t1.toString(), + "| Invalid '--class-path' argument: " + t1.toString()), + (a) -> assertCommand(a, "/env --class-path " + t2.toString(), + "| Invalid '--class-path' argument: " + t2.toString()) + ); + } + public void testModulePath() { Compiler compiler = new Compiler(); Path modsDir = Paths.get("mods"); @@ -304,6 +340,25 @@ public class ToolBasicTest extends ReplToolTesting { ); } + public void testModulePathUserHomeExpansion() { + String tilde = "~" + File.separatorChar; + test( + (a) -> assertCommand(a, "/env --module-path " + tilde + "snardugol", + "| File '" + System.getProperty("user.home") + + File.separatorChar + "snardugol' for '--module-path' is not found.") + ); + } + + public void testBadModulePath() { + Compiler compiler = new Compiler(); + Path t1 = compiler.getPath("whatever/thing.zip"); + compiler.writeToFile(t1, ""); + test( + (a) -> assertCommand(a, "/env --module-path " + t1.toString(), + "| Invalid '--module-path' argument: " + t1.toString()) + ); + } + public void testStartupFileOption() { Compiler compiler = new Compiler(); Path startup = compiler.getPath("StartupFileOption/startup.txt"); diff --git a/langtools/test/jdk/jshell/ToolSimpleTest.java b/langtools/test/jdk/jshell/ToolSimpleTest.java index 44711345046..3e82d51d28e 100644 --- a/langtools/test/jdk/jshell/ToolSimpleTest.java +++ b/langtools/test/jdk/jshell/ToolSimpleTest.java @@ -23,7 +23,7 @@ /* * @test - * @bug 8153716 8143955 8151754 8150382 8153920 8156910 8131024 8160089 8153897 8167128 8154513 8170015 8170368 8172102 8172103 8165405 8173073 8173848 8174041 8173916 8174028 8174262 + * @bug 8153716 8143955 8151754 8150382 8153920 8156910 8131024 8160089 8153897 8167128 8154513 8170015 8170368 8172102 8172103 8165405 8173073 8173848 8174041 8173916 8174028 8174262 8174797 * @summary Simple jshell tool tests * @modules jdk.compiler/com.sun.tools.javac.api * jdk.compiler/com.sun.tools.javac.main @@ -211,6 +211,14 @@ public class ToolSimpleTest extends ReplToolTesting { test(after -> assertCommand(after, "/env --class-path", "| Argument to class-path missing.")); } + @Test + public void testInvalidClassPath() { + test( + a -> assertCommand(a, "/env --class-path snurge/fusal", + "| File 'snurge/fusal' for '--class-path' is not found.") + ); + } + @Test public void testNoArgument() { test( From 28fc67ce7e8c4abc5da0926245616da5c0951572 Mon Sep 17 00:00:00 2001 From: Daniel Fuchs Date: Mon, 13 Feb 2017 17:18:48 +0000 Subject: [PATCH 155/447] 8174833: java/net/httpclient/http2/BasicTest.java always fails but always report success Reviewed-by: michaelm --- jdk/test/java/net/httpclient/http2/BasicTest.java | 3 ++- .../httpclient/http2/server/Http2TestServerConnection.java | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/jdk/test/java/net/httpclient/http2/BasicTest.java b/jdk/test/java/net/httpclient/http2/BasicTest.java index 730ed699800..615843df973 100644 --- a/jdk/test/java/net/httpclient/http2/BasicTest.java +++ b/jdk/test/java/net/httpclient/http2/BasicTest.java @@ -94,6 +94,7 @@ public class BasicTest { } catch (Throwable tt) { System.err.println("tt caught"); tt.printStackTrace(); + throw tt; } finally { httpServer.stop(); httpsServer.stop(); @@ -223,7 +224,7 @@ public class BasicTest { CompletableFuture[] responses = new CompletableFuture[LOOPS]; final Path source = TestUtil.getAFile(FILESIZE); HttpRequest request = HttpRequest.newBuilder(uri) - .POST(fromFile(tempFile())) + .POST(fromFile(source)) .build(); for (int i = 0; i < LOOPS; i++) { responses[i] = client.sendAsync(request, asFile(tempFile())) diff --git a/jdk/test/java/net/httpclient/http2/server/Http2TestServerConnection.java b/jdk/test/java/net/httpclient/http2/server/Http2TestServerConnection.java index a49f06df24f..f88f8daa2aa 100644 --- a/jdk/test/java/net/httpclient/http2/server/Http2TestServerConnection.java +++ b/jdk/test/java/net/httpclient/http2/server/Http2TestServerConnection.java @@ -392,9 +392,11 @@ public class Http2TestServerConnection { //System.err.println ("Stream window size = " + winsize); final InputStream bis; - if (endStreamReceived) { + if (endStreamReceived && queue.size() == 0) { + System.err.println("Server: got END_STREAM for stream " + streamid); bis = NullInputStream.INSTANCE; } else { + System.err.println("Server: creating input stream for stream " + streamid); bis = new BodyInputStream(queue, streamid, this); } try (bis; From bf8ad52b2243562ac2eba185b3cae386f7e89019 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Mon, 13 Feb 2017 10:47:15 -0700 Subject: [PATCH 156/447] 8174399: LambdaMetafactory should use types in implMethod.type() Reviewed-by: psandoz --- .../AbstractValidatingLambdaMetafactory.java | 91 +++++++++---------- .../invoke/InnerClassLambdaMetafactory.java | 29 ++---- .../invoke/lambda/InheritedMethodTest.java | 85 +++++++++++++++++ 3 files changed, 137 insertions(+), 68 deletions(-) create mode 100644 jdk/test/java/lang/invoke/lambda/InheritedMethodTest.java diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java b/jdk/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java index 0675c043185..a7172138ae8 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java @@ -26,6 +26,7 @@ package java.lang.invoke; import sun.invoke.util.Wrapper; +import static java.lang.invoke.MethodHandleInfo.*; import static sun.invoke.util.Wrapper.forPrimitiveType; import static sun.invoke.util.Wrapper.forWrapperType; import static sun.invoke.util.Wrapper.isWrapperType; @@ -56,11 +57,11 @@ import static sun.invoke.util.Wrapper.isWrapperType; final String samMethodName; // Name of the SAM method "foo" final MethodType samMethodType; // Type of the SAM method "(Object)Object" final MethodHandle implMethod; // Raw method handle for the implementation method + final MethodType implMethodType; // Type of the implMethod MethodHandle "(CC,int)String" final MethodHandleInfo implInfo; // Info about the implementation method handle "MethodHandleInfo[5 CC.impl(int)String]" final int implKind; // Invocation kind for implementation "5"=invokevirtual final boolean implIsInstanceMethod; // Is the implementation an instance method "true" - final Class implDefiningClass; // Type defining the implementation "class CC" - final MethodType implMethodType; // Type of the implementation method "(int)String" + final Class implClass; // Class for referencing the implementation method "class CC" final MethodType instantiatedMethodType; // Instantiated erased functional interface method type "(Integer)Object" final boolean isSerializable; // Should the returned instance be serializable final Class[] markerInterfaces; // Additional marker interfaces to be implemented @@ -128,14 +129,34 @@ import static sun.invoke.util.Wrapper.isWrapperType; this.samMethodType = samMethodType; this.implMethod = implMethod; + this.implMethodType = implMethod.type(); this.implInfo = caller.revealDirect(implMethod); - this.implKind = implInfo.getReferenceKind(); - this.implIsInstanceMethod = - implKind == MethodHandleInfo.REF_invokeVirtual || - implKind == MethodHandleInfo.REF_invokeSpecial || - implKind == MethodHandleInfo.REF_invokeInterface; - this.implDefiningClass = implInfo.getDeclaringClass(); - this.implMethodType = implInfo.getMethodType(); + switch (implInfo.getReferenceKind()) { + case REF_invokeVirtual: + case REF_invokeInterface: + this.implClass = implMethodType.parameterType(0); + // reference kind reported by implInfo may not match implMethodType's first param + // Example: implMethodType is (Cloneable)String, implInfo is for Object.toString + this.implKind = implClass.isInterface() ? REF_invokeInterface : REF_invokeVirtual; + this.implIsInstanceMethod = true; + break; + case REF_invokeSpecial: + // JDK-8172817: should use referenced class here, but we don't know what it was + this.implClass = implInfo.getDeclaringClass(); + this.implKind = REF_invokeSpecial; + this.implIsInstanceMethod = true; + break; + case REF_invokeStatic: + case REF_newInvokeSpecial: + // JDK-8172817: should use referenced class here for invokestatic, but we don't know what it was + this.implClass = implInfo.getDeclaringClass(); + this.implKind = implInfo.getReferenceKind(); + this.implIsInstanceMethod = false; + break; + default: + throw new LambdaConversionException(String.format("Unsupported MethodHandle kind: %s", implInfo)); + } + this.instantiatedMethodType = instantiatedMethodType; this.isSerializable = isSerializable; this.markerInterfaces = markerInterfaces; @@ -183,24 +204,12 @@ import static sun.invoke.util.Wrapper.isWrapperType; * @throws LambdaConversionException if there are improper conversions */ void validateMetafactoryArgs() throws LambdaConversionException { - switch (implKind) { - case MethodHandleInfo.REF_invokeInterface: - case MethodHandleInfo.REF_invokeVirtual: - case MethodHandleInfo.REF_invokeStatic: - case MethodHandleInfo.REF_newInvokeSpecial: - case MethodHandleInfo.REF_invokeSpecial: - break; - default: - throw new LambdaConversionException(String.format("Unsupported MethodHandle kind: %s", implInfo)); - } - - // Check arity: optional-receiver + captured + SAM == impl + // Check arity: captured + SAM == impl final int implArity = implMethodType.parameterCount(); - final int receiverArity = implIsInstanceMethod ? 1 : 0; final int capturedArity = invokedType.parameterCount(); final int samArity = samMethodType.parameterCount(); final int instantiatedArity = instantiatedMethodType.parameterCount(); - if (implArity + receiverArity != capturedArity + samArity) { + if (implArity != capturedArity + samArity) { throw new LambdaConversionException( String.format("Incorrect number of parameters for %s method %s; %d captured parameters, %d functional interface method parameters, %d implementation parameters", implIsInstanceMethod ? "instance" : "static", implInfo, @@ -221,8 +230,8 @@ import static sun.invoke.util.Wrapper.isWrapperType; } // If instance: first captured arg (receiver) must be subtype of class where impl method is defined - final int capturedStart; - final int samStart; + final int capturedStart; // index of first non-receiver capture parameter in implMethodType + final int samStart; // index of first non-receiver sam parameter in implMethodType if (implIsInstanceMethod) { final Class receiverClass; @@ -235,45 +244,36 @@ import static sun.invoke.util.Wrapper.isWrapperType; } else { // receiver is a captured variable capturedStart = 1; - samStart = 0; + samStart = capturedArity; receiverClass = invokedType.parameterType(0); } // check receiver type - if (!implDefiningClass.isAssignableFrom(receiverClass)) { + if (!implClass.isAssignableFrom(receiverClass)) { throw new LambdaConversionException( String.format("Invalid receiver type %s; not a subtype of implementation type %s", - receiverClass, implDefiningClass)); - } - - Class implReceiverClass = implMethod.type().parameterType(0); - if (implReceiverClass != implDefiningClass && !implReceiverClass.isAssignableFrom(receiverClass)) { - throw new LambdaConversionException( - String.format("Invalid receiver type %s; not a subtype of implementation receiver type %s", - receiverClass, implReceiverClass)); + receiverClass, implClass)); } } else { // no receiver capturedStart = 0; - samStart = 0; + samStart = capturedArity; } // Check for exact match on non-receiver captured arguments - final int implFromCaptured = capturedArity - capturedStart; - for (int i=0; i implParamType = implMethodType.parameterType(i); - Class capturedParamType = invokedType.parameterType(i + capturedStart); + Class capturedParamType = invokedType.parameterType(i); if (!capturedParamType.equals(implParamType)) { throw new LambdaConversionException( String.format("Type mismatch in captured lambda parameter %d: expecting %s, found %s", i, capturedParamType, implParamType)); } } - // Check for adaptation match on SAM arguments - final int samOffset = samStart - implFromCaptured; - for (int i=implFromCaptured; i implParamType = implMethodType.parameterType(i); - Class instantiatedParamType = instantiatedMethodType.parameterType(i + samOffset); + Class instantiatedParamType = instantiatedMethodType.parameterType(i - capturedArity); if (!isAdaptableTo(instantiatedParamType, implParamType, true)) { throw new LambdaConversionException( String.format("Type mismatch for lambda argument %d: %s is not convertible to %s", @@ -283,10 +283,7 @@ import static sun.invoke.util.Wrapper.isWrapperType; // Adaptation match: return type Class expectedType = instantiatedMethodType.returnType(); - Class actualReturnType = - (implKind == MethodHandleInfo.REF_newInvokeSpecial) - ? implDefiningClass - : implMethodType.returnType(); + Class actualReturnType = implMethodType.returnType(); if (!isAdaptableToAsReturn(actualReturnType, expectedType)) { throw new LambdaConversionException( String.format("Type mismatch for lambda return: %s is not convertible to %s", diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java b/jdk/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java index 0c814bdd470..35f91cc243b 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java @@ -96,7 +96,6 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; private final String implMethodClassName; // Name of type containing implementation "CC" private final String implMethodName; // Name of implementation method "impl" private final String implMethodDesc; // Type descriptor for implementation methods "(I)Ljava/lang/String;" - private final Class implMethodReturnClass; // class for implementation method return type "Ljava/lang/String;" private final MethodType constructorType; // Generated class constructor type "(CC)void" private final ClassWriter cw; // ASM class writer private final String[] argNames; // Generated names for the constructor arguments @@ -153,12 +152,9 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; super(caller, invokedType, samMethodName, samMethodType, implMethod, instantiatedMethodType, isSerializable, markerInterfaces, additionalBridges); - implMethodClassName = implDefiningClass.getName().replace('.', '/'); + implMethodClassName = implClass.getName().replace('.', '/'); implMethodName = implInfo.getName(); - implMethodDesc = implMethodType.toMethodDescriptorString(); - implMethodReturnClass = (implKind == MethodHandleInfo.REF_newInvokeSpecial) - ? implDefiningClass - : implMethodType.returnType(); + implMethodDesc = implInfo.getMethodType().toMethodDescriptorString(); constructorType = invokedType.changeReturnType(Void.TYPE); lambdaClassName = targetClass.getName().replace('.', '/') + "$$Lambda$" + counter.incrementAndGet(); cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); @@ -467,13 +463,14 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; // Invoke the method we want to forward to visitMethodInsn(invocationOpcode(), implMethodClassName, implMethodName, implMethodDesc, - implDefiningClass.isInterface()); + implClass.isInterface()); // Convert the return value (if any) and return it // Note: if adapting from non-void to void, the 'return' // instruction will pop the unneeded result + Class implReturnClass = implMethodType.returnType(); Class samReturnClass = methodType.returnType(); - convertType(implMethodReturnClass, samReturnClass, samReturnClass); + convertType(implReturnClass, samReturnClass, samReturnClass); visitInsn(getReturnOpcode(samReturnClass)); // Maxs computed by ClassWriter.COMPUTE_MAXS,these arguments ignored visitMaxs(-1, -1); @@ -482,23 +479,13 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; private void convertArgumentTypes(MethodType samType) { int lvIndex = 0; - boolean samIncludesReceiver = implIsInstanceMethod && - invokedType.parameterCount() == 0; - int samReceiverLength = samIncludesReceiver ? 1 : 0; - if (samIncludesReceiver) { - // push receiver - Class rcvrType = samType.parameterType(0); - visitVarInsn(getLoadOpcode(rcvrType), lvIndex + 1); - lvIndex += getParameterSize(rcvrType); - convertType(rcvrType, implDefiningClass, instantiatedMethodType.parameterType(0)); - } int samParametersLength = samType.parameterCount(); - int argOffset = implMethodType.parameterCount() - samParametersLength; - for (int i = samReceiverLength; i < samParametersLength; i++) { + int captureArity = invokedType.parameterCount(); + for (int i = 0; i < samParametersLength; i++) { Class argType = samType.parameterType(i); visitVarInsn(getLoadOpcode(argType), lvIndex + 1); lvIndex += getParameterSize(argType); - convertType(argType, implMethodType.parameterType(argOffset + i), instantiatedMethodType.parameterType(i)); + convertType(argType, implMethodType.parameterType(captureArity + i), instantiatedMethodType.parameterType(i)); } } diff --git a/jdk/test/java/lang/invoke/lambda/InheritedMethodTest.java b/jdk/test/java/lang/invoke/lambda/InheritedMethodTest.java new file mode 100644 index 00000000000..bbf59d0b9b6 --- /dev/null +++ b/jdk/test/java/lang/invoke/lambda/InheritedMethodTest.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8174399 + * @summary LambdaMetafactory should be able to handle inherited methods as 'implMethod' + */ +import java.lang.ReflectiveOperationException; +import java.lang.invoke.*; + +public class InheritedMethodTest { + + public static MethodType mt(Class ret, Class... params) { return MethodType.methodType(ret, params); } + + public interface StringFactory { + String get(); + } + + public interface I { + String iString(); + } + + public interface J extends I {} + + public static abstract class C implements I {} + + public static class D extends C implements J { + public String toString() { return "a"; } + public String iString() { return "b"; } + } + + private static final MethodHandles.Lookup lookup = MethodHandles.lookup(); + + public static void main(String... args) throws Throwable { + test(lookup.findVirtual(C.class, "toString", mt(String.class)), "a"); + test(lookup.findVirtual(C.class, "iString", mt(String.class)), "b"); + test(lookup.findVirtual(J.class, "toString", mt(String.class)), "a"); + test(lookup.findVirtual(J.class, "iString", mt(String.class)), "b"); + test(lookup.findVirtual(I.class, "toString", mt(String.class)), "a"); + test(lookup.findVirtual(I.class, "iString", mt(String.class)), "b"); + } + + static void test(MethodHandle implMethod, String expected) throws Throwable { + testMetafactory(implMethod, expected); + testAltMetafactory(implMethod, expected); + } + + static void testMetafactory(MethodHandle implMethod, String expected) throws Throwable { + CallSite cs = LambdaMetafactory.metafactory(lookup, "get", mt(StringFactory.class, D.class), mt(String.class), + implMethod, mt(String.class)); + StringFactory factory = (StringFactory) cs.dynamicInvoker().invokeExact(new D()); + String actual = factory.get(); + if (!expected.equals(actual)) throw new AssertionError("Unexpected result: " + actual); + } + + static void testAltMetafactory(MethodHandle implMethod, String expected) throws Throwable { + CallSite cs = LambdaMetafactory.altMetafactory(lookup, "get", mt(StringFactory.class, D.class), mt(String.class), + implMethod, mt(String.class), LambdaMetafactory.FLAG_SERIALIZABLE); + StringFactory factory = (StringFactory) cs.dynamicInvoker().invokeExact(new D()); + String actual = factory.get(); + if (!expected.equals(actual)) throw new AssertionError("Unexpected result: " + actual); + } + +} From 205d4855107362331c1e2ebe0b1e5f0cb4a06ec0 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Mon, 13 Feb 2017 10:29:04 -0800 Subject: [PATCH 157/447] 8173945: Add methods for Elements.getAll{Type, Package, Module}Elements Reviewed-by: jlahoda, jjg --- .../javax/lang/model/util/Elements.java | 123 +++++++++++++++++- .../sun/tools/javac/model/JavacElements.java | 9 ++ .../model/util/elements/TestAllFoos.java | 93 +++++++++++++ .../util/elements/modules/m1/module-info.java | 4 + .../model/util/elements/modules/m1/pkg/C.java | 11 ++ .../elements/modules/m1/pkg/package-info.java | 6 + .../util/elements/modules/m2/module-info.java | 4 + .../model/util/elements/modules/m2/pkg/C.java | 11 ++ .../elements/modules/m2/pkg/package-info.java | 6 + 9 files changed, 262 insertions(+), 5 deletions(-) create mode 100644 langtools/test/tools/javac/processing/model/util/elements/TestAllFoos.java create mode 100644 langtools/test/tools/javac/processing/model/util/elements/modules/m1/module-info.java create mode 100644 langtools/test/tools/javac/processing/model/util/elements/modules/m1/pkg/C.java create mode 100644 langtools/test/tools/javac/processing/model/util/elements/modules/m1/pkg/package-info.java create mode 100644 langtools/test/tools/javac/processing/model/util/elements/modules/m2/module-info.java create mode 100644 langtools/test/tools/javac/processing/model/util/elements/modules/m2/pkg/C.java create mode 100644 langtools/test/tools/javac/processing/model/util/elements/modules/m2/pkg/package-info.java diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/util/Elements.java b/langtools/src/java.compiler/share/classes/javax/lang/model/util/Elements.java index 65f302c4793..3f89e27b10d 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/util/Elements.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/util/Elements.java @@ -25,9 +25,12 @@ package javax.lang.model.util; - +import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.Set; +import java.util.LinkedHashSet; import javax.lang.model.AnnotatedConstruct; import javax.lang.model.element.*; @@ -65,12 +68,56 @@ public interface Elements { * @param name fully qualified package name, or an empty string for an unnamed package * @param module module relative to which the lookup should happen * @return the specified package, or {@code null} if it cannot be found + * @see #getAllPackageElements * @since 9 */ default PackageElement getPackageElement(ModuleElement module, CharSequence name) { return null; } + /** + * Returns all package elements with the given canonical name. + * + * There may be more than one package element with the same canonical + * name if the package elements are in different modules. + * + * @implSpec The default implementation of this method calls + * {@link #getAllModuleElements() getAllModuleElements} and stores + * the result. If the set of modules is empty, {@link + * #getPackageElement(CharSequence) getPackageElement(name)} is + * called passing through the name argument. If {@code + * getPackageElement(name)} is {@code null}, an empty set of + * package elements is returned; otherwise, a single-element set + * with the found package element is returned. If the set of + * modules is nonempty, the modules are iterated over and any + * non-{@code null} results of {@link + * #getPackageElement(ModuleElement, CharSequence) + * getPackageElement(module, name)} are accumulated into a + * set. The set is then returned. + * + * @param name the canonical name + * @return the package elements, or an empty set if no package with the name can be found + * @see #getPackageElement(ModuleElement, CharSequence) + * @since 9 + */ + default Set getAllPackageElements(CharSequence name) { + Set modules = getAllModuleElements(); + if (modules.isEmpty()) { + PackageElement packageElt = getPackageElement(name); + return (packageElt != null) ? + Collections.singleton(packageElt): + Collections.emptySet(); + } else { + Set result = new LinkedHashSet<>(1); // Usually expect at most 1 result + for (ModuleElement module: modules) { + PackageElement packageElt = getPackageElement(module, name); + if (packageElt != null) + result.add(packageElt); + } + return Collections.unmodifiableSet(result); + } + } + /** * Returns a type element given its canonical name if the type element is unique in the environment. * If running with modules, all modules in the modules graph are searched for matching @@ -90,18 +137,62 @@ public interface Elements { * @param name the canonical name * @param module module relative to which the lookup should happen * @return the named type element, or {@code null} if it cannot be found + * @see #getAllTypeElements * @since 9 */ default TypeElement getTypeElement(ModuleElement module, CharSequence name) { return null; } + /** + * Returns all type elements with the given canonical name. + * + * There may be more than one type element with the same canonical + * name if the type elements are in different modules. + * + * @implSpec The default implementation of this method calls + * {@link #getAllModuleElements() getAllModuleElements} and stores + * the result. If the set of modules is empty, {@link + * #getTypeElement(CharSequence) getTypeElement(name)} is called + * passing through the name argument. If {@code + * getTypeElement(name)} is {@code null}, an empty set of type + * elements is returned; otherwise, a single-element set with the + * found type element is returned. If the set of modules is + * nonempty, the modules are iterated over and any non-{@code null} + * results of {@link #getTypeElement(ModuleElement, + * CharSequence) getTypeElement(module, name)} are accumulated + * into a set. The set is then returned. + * + * @param name the canonical name + * @return the type elements, or an empty set if no type with the name can be found + * @see #getTypeElement(ModuleElement, CharSequence) + * @since 9 + */ + default Set getAllTypeElements(CharSequence name) { + Set modules = getAllModuleElements(); + if (modules.isEmpty()) { + TypeElement typeElt = getTypeElement(name); + return (typeElt != null) ? + Collections.singleton(typeElt): + Collections.emptySet(); + } else { + Set result = new LinkedHashSet<>(1); // Usually expect at most 1 result + for (ModuleElement module: modules) { + TypeElement typeElt = getTypeElement(module, name); + if (typeElt != null) + result.add(typeElt); + } + return Collections.unmodifiableSet(result); + } + } + /** * Returns a module element given its fully qualified name. - * If the named module cannot be found, null is returned. One situation where a module - * cannot be found is if the environment does not include modules, such as - * an annotation processing environment configured for - * a {@linkplain + * + * If the named module cannot be found, {@code null} is + * returned. One situation where a module cannot be found is if + * the environment does not include modules, such as an annotation + * processing environment configured for a {@linkplain * javax.annotation.processing.ProcessingEnvironment#getSourceVersion * source version} without modules. * @@ -110,6 +201,7 @@ public interface Elements { * * @param name the name * @return the named module element, or {@code null} if it cannot be found + * @see #getAllModuleElements * @since 9 * @spec JPMS */ @@ -117,6 +209,27 @@ public interface Elements { return null; } + /** + * Returns all module elements in the current environment. + * + * If no modules are present, an empty set is returned. One + * situation where no modules are present occurs when the + * environment does not include modules, such as an annotation + * processing environment configured for a {@linkplain + * javax.annotation.processing.ProcessingEnvironment#getSourceVersion + * source version} without modules. + * + * @implSpec The default implementation of this method returns + * an empty set. + * + * @return the known module elements, or an empty set if there are no modules + * @see #getModuleElement(CharSequence) + * @since 9 + */ + default Set getAllModuleElements() { + return Collections.emptySet(); + } + /** * Returns the values of an annotation's elements, including defaults. * diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacElements.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacElements.java index 465af2f6c8f..a02e34e313a 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacElements.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacElements.java @@ -25,6 +25,7 @@ package com.sun.tools.javac.model; +import java.util.Collections; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.Map; @@ -116,6 +117,14 @@ public class JavacElements implements Elements { allowModules = source.allowModules(); } + @Override @DefinedBy(Api.LANGUAGE_MODEL) + public Set getAllModuleElements() { + if (allowModules) + return Collections.unmodifiableSet(modules.allModules()); + else + return Collections.emptySet(); + } + @Override @DefinedBy(Api.LANGUAGE_MODEL) public ModuleSymbol getModuleElement(CharSequence name) { ensureEntered("getModuleElement"); diff --git a/langtools/test/tools/javac/processing/model/util/elements/TestAllFoos.java b/langtools/test/tools/javac/processing/model/util/elements/TestAllFoos.java new file mode 100644 index 00000000000..caff3b89744 --- /dev/null +++ b/langtools/test/tools/javac/processing/model/util/elements/TestAllFoos.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8173945 + * @summary Test Elements.getAll{Type, Package, Module}Elements + * @library /tools/javac/lib + * @modules java.compiler + * jdk.compiler + * @build JavacTestingAbstractProcessor TestAllFoos + * @compile -processor TestAllFoos -proc:only --release 8 --source-path modules/m1/pkg modules/m1/pkg/C.java + * @compile -processor TestAllFoos -proc:only --release 8 --source-path modules/m2/pkg modules/m2/pkg/C.java + */ +// @compile -processor TestAllFoos -proc:only --module-source-path modules -m m1,m2 + +import java.util.Set; +import static java.util.Objects.*; +import javax.annotation.processing.*; +import static javax.lang.model.SourceVersion.*; +import javax.lang.model.element.*; +import javax.lang.model.util.*; + +/** + * Test basic workings of Elements.getAll{Type, Package, Module}Elements under + * pre- and post-modules. + */ +public class TestAllFoos extends JavacTestingAbstractProcessor { + public boolean process(Set annotations, + RoundEnvironment roundEnv) { + if (!roundEnv.processingOver()) { + boolean expectModules = + (processingEnv.getSourceVersion().compareTo(RELEASE_9) >= 0); + + testSetSize(eltUtils.getAllTypeElements("java.lang.String"), 1); + testSetSize(eltUtils.getAllTypeElements("example.com"), 0); + + if (!expectModules) { + // Expect empty modules set, single package named "pkg" with one type "pkg.C". + testSetSize(eltUtils.getAllModuleElements(), 0); + testSetSize(eltUtils.getAllPackageElements("pkg"), 1); + testSetSize(eltUtils.getAllTypeElements("pkg.C"), 1); + } else { + Set modules = + requireNonNull(eltUtils.getAllModuleElements()); + + ModuleElement m1 = requireNonNull(eltUtils.getModuleElement("m1")); + ModuleElement m2 = requireNonNull(eltUtils.getModuleElement("m2")); + + if (!modules.contains(m1) || + !modules.contains(m2) || + !modules.contains(requireNonNull(eltUtils.getModuleElement("java.base")))) + throw new RuntimeException("Missing modules " + modules); + + // Expect two packages named "pkg" and two types named "pkg.C". + testSetSize(eltUtils.getAllPackageElements("pkg"), 2); + testSetSize(eltUtils.getAllTypeElements("pkg.C"), 2); + } + } + return true; + } + + /** + * Check the set argument against null and throw an exception if + * the set is not of the expected size. + */ + private static Set testSetSize(Set set, int expectedSize) { + requireNonNull(set); + if (set.size() != expectedSize) + throw new RuntimeException("Unexpected size of set " + set); + return set; + } +} diff --git a/langtools/test/tools/javac/processing/model/util/elements/modules/m1/module-info.java b/langtools/test/tools/javac/processing/model/util/elements/modules/m1/module-info.java new file mode 100644 index 00000000000..6897fc31e56 --- /dev/null +++ b/langtools/test/tools/javac/processing/model/util/elements/modules/m1/module-info.java @@ -0,0 +1,4 @@ +/* /nodynamiccopyright/ */ + +module m1 { +} diff --git a/langtools/test/tools/javac/processing/model/util/elements/modules/m1/pkg/C.java b/langtools/test/tools/javac/processing/model/util/elements/modules/m1/pkg/C.java new file mode 100644 index 00000000000..17c3c1a52c3 --- /dev/null +++ b/langtools/test/tools/javac/processing/model/util/elements/modules/m1/pkg/C.java @@ -0,0 +1,11 @@ +/* /nodynamiccopyright/ */ + +package pkg; + +/** + * A lovely description of class C of package pkg in module m1. + */ +public class C { + public C() {} + public static String foo() {return "foo";} +} diff --git a/langtools/test/tools/javac/processing/model/util/elements/modules/m1/pkg/package-info.java b/langtools/test/tools/javac/processing/model/util/elements/modules/m1/pkg/package-info.java new file mode 100644 index 00000000000..969f9cffe56 --- /dev/null +++ b/langtools/test/tools/javac/processing/model/util/elements/modules/m1/pkg/package-info.java @@ -0,0 +1,6 @@ +/* /nodynamiccopyright/ */ + +/** + * A lovely description of package pkg in module m1. + */ +package pkg; diff --git a/langtools/test/tools/javac/processing/model/util/elements/modules/m2/module-info.java b/langtools/test/tools/javac/processing/model/util/elements/modules/m2/module-info.java new file mode 100644 index 00000000000..aa297e558e4 --- /dev/null +++ b/langtools/test/tools/javac/processing/model/util/elements/modules/m2/module-info.java @@ -0,0 +1,4 @@ +/* /nodynamiccopyright/ */ + +module m2 { +} diff --git a/langtools/test/tools/javac/processing/model/util/elements/modules/m2/pkg/C.java b/langtools/test/tools/javac/processing/model/util/elements/modules/m2/pkg/C.java new file mode 100644 index 00000000000..d9f86606181 --- /dev/null +++ b/langtools/test/tools/javac/processing/model/util/elements/modules/m2/pkg/C.java @@ -0,0 +1,11 @@ +/* /nodynamiccopyright/ */ + +package pkg; + +/** + * A lovely description of class C of package pkg in module m2. + */ +public class C { + public C() {} + public static String bar() {return "bar";} +} diff --git a/langtools/test/tools/javac/processing/model/util/elements/modules/m2/pkg/package-info.java b/langtools/test/tools/javac/processing/model/util/elements/modules/m2/pkg/package-info.java new file mode 100644 index 00000000000..032700bf4e7 --- /dev/null +++ b/langtools/test/tools/javac/processing/model/util/elements/modules/m2/pkg/package-info.java @@ -0,0 +1,6 @@ +/* /nodynamiccopyright/ */ + +/** + * A lovely description of package pkg in module m2. + */ +package pkg; From e17bdd6c771aa6a77eaa5817b96ba82f4378c30e Mon Sep 17 00:00:00 2001 From: Claes Redestad Date: Mon, 13 Feb 2017 20:32:06 +0100 Subject: [PATCH 158/447] 8174831: Reduce number of Charset classes loaded on bootstrap Reviewed-by: alanb --- .../share/classes/java/lang/StringCoding.java | 7 ++-- .../classes/java/nio/charset/Charset.java | 10 +++--- .../sun/nio/cs/StandardCharsets.java.template | 32 ++++++++++++------- .../share/classes/sun/nio/cs/US_ASCII.java | 1 - 4 files changed, 29 insertions(+), 21 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/lang/StringCoding.java b/jdk/src/java.base/share/classes/java/lang/StringCoding.java index ccbe6f24b43..7340fed04ca 100644 --- a/jdk/src/java.base/share/classes/java/lang/StringCoding.java +++ b/jdk/src/java.base/share/classes/java/lang/StringCoding.java @@ -46,9 +46,6 @@ import sun.nio.cs.ArrayEncoder; import static java.lang.String.LATIN1; import static java.lang.String.UTF16; import static java.lang.String.COMPACT_STRINGS; -import static java.nio.charset.StandardCharsets.ISO_8859_1; -import static java.nio.charset.StandardCharsets.US_ASCII; -import static java.nio.charset.StandardCharsets.UTF_8; /** * Utility class for string encoding and decoding. @@ -64,6 +61,10 @@ class StringCoding { private static final ThreadLocal> encoder = new ThreadLocal<>(); + private static final Charset ISO_8859_1 = Charset.forName("iso-8859-1"); + private static final Charset US_ASCII = Charset.forName("us-ascii"); + private static final Charset UTF_8 = Charset.forName("utf-8"); + private static boolean warnUnsupportedCharset = true; private static T deref(ThreadLocal> tl) { diff --git a/jdk/src/java.base/share/classes/java/nio/charset/Charset.java b/jdk/src/java.base/share/classes/java/nio/charset/Charset.java index 81209891bb4..512045bb8b0 100644 --- a/jdk/src/java.base/share/classes/java/nio/charset/Charset.java +++ b/jdk/src/java.base/share/classes/java/nio/charset/Charset.java @@ -300,9 +300,8 @@ public abstract class Charset */ private static void checkName(String s) { int n = s.length(); - if (!atBugLevel("1.4")) { - if (n == 0) - throw new IllegalCharsetNameException(s); + if (n == 0 && !atBugLevel("1.4")) { + throw new IllegalCharsetNameException(s); } for (int i = 0; i < n; i++) { char c = s.charAt(i); @@ -319,7 +318,9 @@ public abstract class Charset } /* The standard set of charsets */ - private static CharsetProvider standardProvider = new StandardCharsets(); + private static final CharsetProvider standardProvider = new StandardCharsets(); + + private static final String[] zeroAliases = new String[0]; // Cache of the most-recently-returned charsets, // along with the names that were used to find them @@ -626,7 +627,6 @@ public abstract class Charset private final String name; // tickles a bug in oldjavac private final String[] aliases; // tickles a bug in oldjavac - private final String[] zeroAliases = new String[0]; private Set aliasSet = null; /** diff --git a/jdk/src/java.base/share/classes/sun/nio/cs/StandardCharsets.java.template b/jdk/src/java.base/share/classes/sun/nio/cs/StandardCharsets.java.template index f2eeaaafdc3..8969ef1a04b 100644 --- a/jdk/src/java.base/share/classes/sun/nio/cs/StandardCharsets.java.template +++ b/jdk/src/java.base/share/classes/sun/nio/cs/StandardCharsets.java.template @@ -32,7 +32,6 @@ package sun.nio.cs; import java.nio.charset.Charset; import java.nio.charset.spi.CharsetProvider; import java.util.Iterator; -import java.util.Locale; import java.util.Map; import sun.security.action.GetPropertyAction; @@ -44,13 +43,13 @@ public class StandardCharsets extends CharsetProvider { _INCLUDE_CACHE_MAP_ // Maps canonical names to class names - private Map classMap; + private final Map classMap; // Maps alias names to canonical names - private Map aliasMap; + private final Map aliasMap; // Maps canonical names to cached instances - private Map cache; + private final Map cache; - private String packagePrefix = "sun.nio.cs"; + private static final String packagePrefix = "sun.nio.cs"; public StandardCharsets() { this.aliasMap = new Aliases(); @@ -102,10 +101,16 @@ public class StandardCharsets extends CharsetProvider { if (cln == null) return null; - if (cln.equals("US_ASCII")) { - cs = new US_ASCII(); - cache.put(csn, cs); - return cs; + // As all charset class names added to classMap are string literals we + // can check identity here as an optimization + if (cln == "US_ASCII") { + return cache(csn, new US_ASCII()); + } + if (cln == "ISO_8859_1") { + return cache(csn, new ISO_8859_1()); + } + if (cln == "UTF_8") { + return cache(csn, new UTF_8()); } // Instantiate the charset and cache it @@ -114,9 +119,7 @@ public class StandardCharsets extends CharsetProvider { Object o = Class.forName(packagePrefix + "." + cln, true, this.getClass().getClassLoader()).newInstance(); - cs = (Charset)o; - cache.put(csn, cs); - return cs; + return cache(csn, (Charset)o); } catch (ClassNotFoundException | IllegalAccessException | InstantiationException x) { @@ -124,6 +127,11 @@ public class StandardCharsets extends CharsetProvider { } } + private Charset cache(String csn, Charset cs) { + cache.put(csn, cs); + return cs; + } + public final Charset charsetForName(String charsetName) { synchronized (this) { return lookup(canonicalize(charsetName)); diff --git a/jdk/src/java.base/share/classes/sun/nio/cs/US_ASCII.java b/jdk/src/java.base/share/classes/sun/nio/cs/US_ASCII.java index 39b7df07d85..e85ce61ccd8 100644 --- a/jdk/src/java.base/share/classes/sun/nio/cs/US_ASCII.java +++ b/jdk/src/java.base/share/classes/sun/nio/cs/US_ASCII.java @@ -31,7 +31,6 @@ import java.nio.charset.Charset; import java.nio.charset.CharsetDecoder; import java.nio.charset.CharsetEncoder; import java.nio.charset.CoderResult; -import java.util.Arrays; public class US_ASCII extends Charset From 203001b002116c3f6aacac5209889589770f467d Mon Sep 17 00:00:00 2001 From: Phil Race Date: Mon, 13 Feb 2017 11:48:27 -0800 Subject: [PATCH 159/447] 8173028: Incorrect processing of supplementary-plane characters in text fields Reviewed-by: serb, vadim --- .../sun/font/ExtendedTextSourceLabel.java | 2 +- .../java/awt/font/TextLayout/HitTest.java | 49 +++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 jdk/test/java/awt/font/TextLayout/HitTest.java diff --git a/jdk/src/java.desktop/share/classes/sun/font/ExtendedTextSourceLabel.java b/jdk/src/java.desktop/share/classes/sun/font/ExtendedTextSourceLabel.java index 7653d4d5c34..657ffa16ce5 100644 --- a/jdk/src/java.desktop/share/classes/sun/font/ExtendedTextSourceLabel.java +++ b/jdk/src/java.desktop/share/classes/sun/font/ExtendedTextSourceLabel.java @@ -779,7 +779,7 @@ class ExtendedTextSourceLabel extends ExtendedTextLabel implements Decoration.La if (gx == gxlimit) { tgt = charInfo.length / numvals; } else { - tgt = indices[gx]-1; + tgt = indices[gx]; } if (DEBUG) { System.err.println("gx=" + gx + " gxlimit=" + gxlimit + diff --git a/jdk/test/java/awt/font/TextLayout/HitTest.java b/jdk/test/java/awt/font/TextLayout/HitTest.java new file mode 100644 index 00000000000..722adbecd78 --- /dev/null +++ b/jdk/test/java/awt/font/TextLayout/HitTest.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @summary verify Hit index with supplementary characters. + * @bug 8173028 + */ + +import java.awt.Font; +import java.awt.font.FontRenderContext; +import java.awt.font.TextHitInfo; +import java.awt.font.TextLayout; + +public class HitTest { + + public static void main(String args[]) { + String s = new String(new int[]{0x1d400, 0x61}, 0, 2); + Font font = new Font("Dialog", Font.PLAIN, 12); + FontRenderContext frc = new FontRenderContext(null, false, false); + TextLayout tl = new TextLayout(s, font, frc); + TextHitInfo currHit = TextHitInfo.beforeOffset(3); + TextHitInfo prevHit = tl.getNextLeftHit(currHit); + System.out.println("index=" + prevHit.getCharIndex()+ + " leading edge=" + prevHit.isLeadingEdge()); + if (prevHit.getCharIndex() != 2) { + throw new RuntimeException("Expected 2 for hit index"); + } + } +} From 52187f31d35ae2f451f2312a2033f7b3da8300ef Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Mon, 13 Feb 2017 11:51:51 -0800 Subject: [PATCH 160/447] 8174854: Fix two javax.annotation.processing javadoc link issues Reviewed-by: mchung --- .../javax/annotation/processing/AbstractProcessor.java | 4 ++-- .../share/classes/javax/annotation/processing/Processor.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/langtools/src/java.compiler/share/classes/javax/annotation/processing/AbstractProcessor.java b/langtools/src/java.compiler/share/classes/javax/annotation/processing/AbstractProcessor.java index 0a8287b8b4b..62fb6d5dd37 100644 --- a/langtools/src/java.compiler/share/classes/javax/annotation/processing/AbstractProcessor.java +++ b/langtools/src/java.compiler/share/classes/javax/annotation/processing/AbstractProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -92,7 +92,7 @@ public abstract class AbstractProcessor implements Processor { * same set of strings as the annotation. If the class is not so * annotated, an empty set is returned. * - * If the {@link ProcessingEvironment#getSourceVersion source + * If the {@link ProcessingEnvironment#getSourceVersion source * version} does not support modules, in other words if it is less * than or equal to {@link SourceVersion#RELEASE_8 RELEASE_8}, * then any leading {@link Processor#getSupportedAnnotationTypes diff --git a/langtools/src/java.compiler/share/classes/javax/annotation/processing/Processor.java b/langtools/src/java.compiler/share/classes/javax/annotation/processing/Processor.java index e7a8278dce2..3fb83920973 100644 --- a/langtools/src/java.compiler/share/classes/javax/annotation/processing/Processor.java +++ b/langtools/src/java.compiler/share/classes/javax/annotation/processing/Processor.java @@ -291,7 +291,7 @@ public interface Processor { * @apiNote When running in an environment which supports modules, * processors are encouraged to include the module prefix when * describing their supported annotation types. The method {@link - * AbstractProcessor.getSupportedAnnotationTypes + * AbstractProcessor#getSupportedAnnotationTypes * AbstractProcessor.getSupportedAnnotationTypes} provides support * for stripping off the module prefix when running in an * environment without modules. From fb170dede95121c15499f26889247a9753c5b55a Mon Sep 17 00:00:00 2001 From: Robert Field Date: Mon, 13 Feb 2017 12:14:23 -0800 Subject: [PATCH 161/447] 8174857: jshell tool: /help /set truncation -- confusing indentation Reviewed-by: jjg --- .../classes/jdk/internal/jshell/tool/resources/l10n.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties index 4afc5359073..5be58316754 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties +++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties @@ -650,7 +650,7 @@ The case selector kind describes the kind of snippet. The values are:\n\t\ varinit -- variable declaration with init\n\t\ expression -- expression -- note: {name}==scratch-variable-name\n\t\ varvalue -- variable value expression\n\t\ - assignment -- assign variable\n\t\ + assignment -- assign variable\n\ The action selector kind describes what happened to the snippet. The values are:\n\t\ added -- snippet has been added\n\t\ modified -- an existing snippet has been modified\n\t\ From 2a4864a3ea07e8919a9a157b454ac4600919a655 Mon Sep 17 00:00:00 2001 From: Dmitry Chuyko Date: Mon, 13 Feb 2017 23:58:00 +0300 Subject: [PATCH 162/447] 8174818: bigapps/Weblogic12medrec fails with assert(check_call_consistency(jvms, cg)) failed: inconsistent info Reviewed-by: vlivanov --- hotspot/src/share/vm/ci/ciMethod.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/ci/ciMethod.cpp b/hotspot/src/share/vm/ci/ciMethod.cpp index 4303a78a46c..3101612474b 100644 --- a/hotspot/src/share/vm/ci/ciMethod.cpp +++ b/hotspot/src/share/vm/ci/ciMethod.cpp @@ -1428,8 +1428,12 @@ bool ciMethod::is_consistent_info(ciMethod* declared_method, ciMethod* resolved_ if (!invoke_through_mh_intrinsic) { // Method name & descriptor should stay the same. + // Signatures may reference unloaded types and thus they may be not strictly equal. + ciSymbol* declared_signature = declared_method->signature()->as_symbol(); + ciSymbol* resolved_signature = resolved_method->signature()->as_symbol(); + return (declared_method->name()->equals(resolved_method->name())) && - (declared_method->signature()->equals(resolved_method->signature())); + (declared_signature->equals(resolved_signature)); } ciMethod* linker = declared_method; From 45f1992dbabe833d13c69d73453c86c94d389059 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Mon, 13 Feb 2017 12:59:11 -0800 Subject: [PATCH 163/447] 8174860: Fix bad javadoc link in javax.tools.JavaFileManager Reviewed-by: jjg --- .../share/classes/javax/tools/JavaFileManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/langtools/src/java.compiler/share/classes/javax/tools/JavaFileManager.java b/langtools/src/java.compiler/share/classes/javax/tools/JavaFileManager.java index fc3cb01f257..4c3eb7a6cb0 100644 --- a/langtools/src/java.compiler/share/classes/javax/tools/JavaFileManager.java +++ b/langtools/src/java.compiler/share/classes/javax/tools/JavaFileManager.java @@ -130,7 +130,7 @@ public interface JavaFileManager extends Closeable, Flushable, OptionChecker { * It is not possible to directly list the classes in a module-oriented * location. Instead, you can get a package-oriented location for any specific module * using methods like {@link JavaFileManager#getLocationForModule} or - * {@link JavaFileManager#listLocationsForModule}. + * {@link JavaFileManager#listLocationsForModules}. */ interface Location { /** From 2a3c0587b6312c0c229f1e717377f0b9aac24764 Mon Sep 17 00:00:00 2001 From: Dmitry Batrak Date: Tue, 14 Feb 2017 00:09:32 +0300 Subject: [PATCH 164/447] 8170950: Text is displayed in bold when fonts are installed into symlinked folder Reviewed-by: prr, serb --- .../share/classes/sun/font/FontFamily.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/jdk/src/java.desktop/share/classes/sun/font/FontFamily.java b/jdk/src/java.desktop/share/classes/sun/font/FontFamily.java index 7b6cac69765..16d1d41dd7b 100644 --- a/jdk/src/java.desktop/share/classes/sun/font/FontFamily.java +++ b/jdk/src/java.desktop/share/classes/sun/font/FontFamily.java @@ -27,6 +27,7 @@ package sun.font; import java.io.File; import java.awt.Font; +import java.io.IOException; import java.util.Collection; import java.util.HashMap; import java.util.concurrent.ConcurrentHashMap; @@ -132,6 +133,16 @@ public class FontFamily { FileFont newFont = (FileFont)font; File newDir = (new File(newFont.platName)).getParentFile(); + if (existDir != null) { + try { + existDir = existDir.getCanonicalFile(); + } catch (IOException ignored) {} + } + if (newDir != null) { + try { + newDir = newDir.getCanonicalFile(); + } catch (IOException ignored) {} + } return java.util.Objects.equals(newDir, existDir); } From 46893b06b3f8b282ad7b7d89b1442cbc291bc555 Mon Sep 17 00:00:00 2001 From: Alexander Zvegintsev Date: Tue, 14 Feb 2017 01:11:03 +0300 Subject: [PATCH 165/447] 8166313: JavaDoc mentions AppEvent subclasses as inner class of AppEvent Reviewed-by: serb, ssadetsky --- jdk/src/java.desktop/share/classes/java/awt/Desktop.java | 6 +++--- .../share/classes/java/awt/desktop/AppForegroundEvent.java | 4 ++-- .../share/classes/java/awt/desktop/AppHiddenEvent.java | 4 ++-- .../share/classes/java/awt/desktop/AppReopenedEvent.java | 2 +- .../share/classes/java/awt/desktop/OpenURIEvent.java | 2 +- .../share/classes/java/awt/desktop/PrintFilesEvent.java | 2 +- .../share/classes/java/awt/desktop/QuitEvent.java | 2 +- .../share/classes/java/awt/desktop/ScreenSleepEvent.java | 4 ++-- .../share/classes/java/awt/desktop/SystemSleepEvent.java | 4 ++-- .../share/classes/java/awt/desktop/UserSessionEvent.java | 4 ++-- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/jdk/src/java.desktop/share/classes/java/awt/Desktop.java b/jdk/src/java.desktop/share/classes/java/awt/Desktop.java index fac3def4de0..aea69c3adf1 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/Desktop.java +++ b/jdk/src/java.desktop/share/classes/java/awt/Desktop.java @@ -335,7 +335,7 @@ public class Desktop { * most of the platforms support the {@link Desktop.Action#OPEN} * action. But for a specific file, there may not be an * application registered to open it. In this case, {@link - * #isSupported} may return {@code true}, but the corresponding + * #isSupported(Action)} may return {@code true}, but the corresponding * action method will throw an {@link IOException}. * * @param action the specified {@link Action} @@ -720,7 +720,7 @@ public class Desktop { * default behavior. * * @param aboutHandler the handler to respond to the - * {@link java.awt.desktop.AboutHandler#handleAbout} )} message + * {@link java.awt.desktop.AboutHandler#handleAbout(AboutEvent)} message * * @throws SecurityException if a security manager exists and it * denies the @@ -828,7 +828,7 @@ public class Desktop { * open a URL. * * Setting the handler to {@code null} causes all - * {@link OpenURIHandler#openURI(AppEvent.OpenURIEvent)} requests to be + * {@link OpenURIHandler#openURI(OpenURIEvent)} requests to be * enqueued until another handler is set. * * @implNote Please note that for Mac OS, notifications diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/AppForegroundEvent.java b/jdk/src/java.desktop/share/classes/java/awt/desktop/AppForegroundEvent.java index 9d7107b84db..d5442b5b18f 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/desktop/AppForegroundEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/desktop/AppForegroundEvent.java @@ -30,8 +30,8 @@ package java.awt.desktop; * Event sent when the application has become the foreground app, and when it is * no longer the foreground app. * - * @see AppForegroundListener#appRaisedToForeground(AppEvent.AppForegroundEvent) - * @see AppForegroundListener#appMovedToBackground(AppEvent.AppForegroundEvent) + * @see AppForegroundListener#appRaisedToForeground(AppForegroundEvent) + * @see AppForegroundListener#appMovedToBackground(AppForegroundEvent) * * @since 9 */ diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/AppHiddenEvent.java b/jdk/src/java.desktop/share/classes/java/awt/desktop/AppHiddenEvent.java index 1a41cc271a3..39ac364ce63 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/desktop/AppHiddenEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/desktop/AppHiddenEvent.java @@ -29,8 +29,8 @@ package java.awt.desktop; /** * Event sent when the application has been hidden or shown. * - * @see AppHiddenListener#appHidden(AppEvent.AppHiddenEvent) - * @see AppHiddenListener#appUnhidden(AppEvent.AppHiddenEvent) + * @see AppHiddenListener#appHidden(AppHiddenEvent) + * @see AppHiddenListener#appUnhidden(AppHiddenEvent) * * @since 9 */ diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/AppReopenedEvent.java b/jdk/src/java.desktop/share/classes/java/awt/desktop/AppReopenedEvent.java index 2e7f9f14be6..526cd872de8 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/desktop/AppReopenedEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/desktop/AppReopenedEvent.java @@ -29,7 +29,7 @@ package java.awt.desktop; /** * Event sent when the application is asked to re-open itself. * - * @see AppReopenedListener#appReopened(AppEvent.AppReopenedEvent) + * @see AppReopenedListener#appReopened(AppReopenedEvent) * * @since 9 */ diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/OpenURIEvent.java b/jdk/src/java.desktop/share/classes/java/awt/desktop/OpenURIEvent.java index 61b0aae7ee2..d29ce26ef45 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/desktop/OpenURIEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/desktop/OpenURIEvent.java @@ -31,7 +31,7 @@ import java.net.URI; /** * Event sent when the app is asked to open a {@code URI}. * - * @see OpenURIHandler#openURI(AppEvent.OpenURIEvent) + * @see OpenURIHandler#openURI(OpenURIEvent) * * @since 9 */ diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/PrintFilesEvent.java b/jdk/src/java.desktop/share/classes/java/awt/desktop/PrintFilesEvent.java index 0ec9d006395..c3e5a46c328 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/desktop/PrintFilesEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/desktop/PrintFilesEvent.java @@ -33,7 +33,7 @@ import java.util.List; /** * Event sent when the app is asked to print a list of files. * - * @see PrintFilesHandler#printFiles(AppEvent.PrintFilesEvent) + * @see PrintFilesHandler#printFiles(PrintFilesEvent) * @since 9 */ public final class PrintFilesEvent extends FilesEvent { diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/QuitEvent.java b/jdk/src/java.desktop/share/classes/java/awt/desktop/QuitEvent.java index ea9f4b48d7c..c0e1bd4b217 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/desktop/QuitEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/desktop/QuitEvent.java @@ -28,7 +28,7 @@ package java.awt.desktop; /** * Event sent when the application is asked to quit. * - * @see QuitHandler#handleQuitRequestWith(AppEvent.QuitEvent, QuitResponse) + * @see QuitHandler#handleQuitRequestWith(QuitEvent, QuitResponse) * * @since 9 */ diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/ScreenSleepEvent.java b/jdk/src/java.desktop/share/classes/java/awt/desktop/ScreenSleepEvent.java index 880187878e8..3f6505ccad0 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/desktop/ScreenSleepEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/desktop/ScreenSleepEvent.java @@ -28,8 +28,8 @@ package java.awt.desktop; * Event sent when the displays attached to the system enter and exit power save * sleep. * - * @see ScreenSleepListener#screenAboutToSleep(AppEvent.ScreenSleepEvent) - * @see ScreenSleepListener#screenAwoke(AppEvent.ScreenSleepEvent) + * @see ScreenSleepListener#screenAboutToSleep(ScreenSleepEvent) + * @see ScreenSleepListener#screenAwoke(ScreenSleepEvent) * * @since 9 */ diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/SystemSleepEvent.java b/jdk/src/java.desktop/share/classes/java/awt/desktop/SystemSleepEvent.java index b9fab3bd137..b38b76d710b 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/desktop/SystemSleepEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/desktop/SystemSleepEvent.java @@ -28,8 +28,8 @@ package java.awt.desktop; /** * Event sent when the system enters and exits power save sleep. * - * @see SystemSleepListener#systemAboutToSleep(AppEvent.SystemSleepEvent) - * @see SystemSleepListener#systemAwoke(AppEvent.SystemSleepEvent) + * @see SystemSleepListener#systemAboutToSleep(SystemSleepEvent) + * @see SystemSleepListener#systemAwoke(SystemSleepEvent) * * @since 9 */ diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/UserSessionEvent.java b/jdk/src/java.desktop/share/classes/java/awt/desktop/UserSessionEvent.java index 5daca855d3e..aaf1ceace16 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/desktop/UserSessionEvent.java +++ b/jdk/src/java.desktop/share/classes/java/awt/desktop/UserSessionEvent.java @@ -29,8 +29,8 @@ package java.awt.desktop; * * Some systems may provide a reason of a user session change. * - * @see UserSessionListener#userSessionActivated(AppEvent.UserSessionEvent) - * @see UserSessionListener#userSessionDeactivated(AppEvent.UserSessionEvent) + * @see UserSessionListener#userSessionActivated(UserSessionEvent) + * @see UserSessionListener#userSessionDeactivated(UserSessionEvent) * * @since 9 */ From 8efb2f4342a38ad661a10620c8c0d7b81a64792a Mon Sep 17 00:00:00 2001 From: Serguei Spitsyn Date: Mon, 13 Feb 2017 14:39:50 -0800 Subject: [PATCH 166/447] 8172969: JVMTI spec: GetCurrentThread may return NULL in the early start phase Update the GetCurrentThread function spec to allow returning NULL Reviewed-by: dholmes, dcubed, alanb --- hotspot/src/share/vm/prims/jvmti.xml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/prims/jvmti.xml b/hotspot/src/share/vm/prims/jvmti.xml index 7a0515c2bc4..d01db3240fc 100644 --- a/hotspot/src/share/vm/prims/jvmti.xml +++ b/hotspot/src/share/vm/prims/jvmti.xml @@ -1486,6 +1486,10 @@ jvmtiEnv *jvmti; Get the current thread. The current thread is the Java programming language thread which has called the function. + The function may return NULL in the start phase if the + + can_generate_early_vmstart capability is enabled + and the java.lang.Thread class has not been initialized yet.

      Note that most functions that take a thread as an argument will accept NULL to mean @@ -1498,7 +1502,7 @@ jvmtiEnv *jvmti; - On return, points to the current thread. + On return, points to the current thread, or NULL. @@ -14735,6 +14739,11 @@ typedef void (JNICALL *jvmtiEventVMInit) Clarified can_redefine_any_classes, can_retransform_any_classes and IsModifiableClass API to disallow some implementation defined classes. + + Minor update for GetCurrentThread function: + - The function may return NULL in the start phase if the + can_generate_early_vmstart capability is enabled. + From cd867f35bd332327f8bd925a978c177293853068 Mon Sep 17 00:00:00 2001 From: Robert Field Date: Mon, 13 Feb 2017 17:04:26 -0800 Subject: [PATCH 167/447] 8174862: JShell tests: new JDK-8174797 testInvalidClassPath fails on Windows Reviewed-by: jlahoda --- langtools/test/jdk/jshell/ToolSimpleTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/langtools/test/jdk/jshell/ToolSimpleTest.java b/langtools/test/jdk/jshell/ToolSimpleTest.java index 3e82d51d28e..53e79fb7c06 100644 --- a/langtools/test/jdk/jshell/ToolSimpleTest.java +++ b/langtools/test/jdk/jshell/ToolSimpleTest.java @@ -214,8 +214,8 @@ public class ToolSimpleTest extends ReplToolTesting { @Test public void testInvalidClassPath() { test( - a -> assertCommand(a, "/env --class-path snurge/fusal", - "| File 'snurge/fusal' for '--class-path' is not found.") + a -> assertCommand(a, "/env --class-path snurgefusal", + "| File 'snurgefusal' for '--class-path' is not found.") ); } From 363755b622cee195ebe82f489301a0ed95faf10f Mon Sep 17 00:00:00 2001 From: Athijegannathan Sundararajan Date: Tue, 14 Feb 2017 07:33:49 +0530 Subject: [PATCH 168/447] 8174209: Renumber the compress levels Reviewed-by: alanb, jlaskey, mchung, redestad --- .../plugins/DefaultCompressPlugin.java | 15 ++-- .../tools/jlink/resources/plugins.properties | 12 +-- jdk/test/tools/jlink/IntegrationTest.java | 2 +- .../jlink/plugins/CompressorPluginTest.java | 80 +++++++------------ 4 files changed, 45 insertions(+), 64 deletions(-) diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/DefaultCompressPlugin.java b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/DefaultCompressPlugin.java index 67ce62f10d9..69add478c18 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/DefaultCompressPlugin.java +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/DefaultCompressPlugin.java @@ -25,6 +25,7 @@ package jdk.tools.jlink.internal.plugins; import java.util.Map; +import java.util.function.Function; import jdk.tools.jlink.internal.ResourcePoolManager.ResourcePoolImpl; import jdk.tools.jlink.plugin.ResourcePool; @@ -64,9 +65,10 @@ public final class DefaultCompressPlugin implements Plugin, ResourcePrevisitor { return ss.transform(in, out); } else if (zip != null) { return zip.transform(in, out); + } else { + in.transformAndCopy(Function.identity(), out); + return out.build(); } - - return out.build(); } @Override @@ -103,21 +105,20 @@ public final class DefaultCompressPlugin implements Plugin, ResourcePrevisitor { if (level != null) { switch (level) { case LEVEL_0: - ss = new StringSharingPlugin(resFilter); + ss = null; + zip = null; break; case LEVEL_1: - zip = new ZipPlugin(resFilter); + ss = new StringSharingPlugin(resFilter); break; case LEVEL_2: - ss = new StringSharingPlugin(resFilter); zip = new ZipPlugin(resFilter); break; default: throw new IllegalArgumentException("Invalid compression level " + level); } } else { - ss = new StringSharingPlugin(resFilter); - zip = new ZipPlugin(resFilter); + throw new IllegalArgumentException("Invalid compression level " + level); } } } diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties index a889d101b1e..2ba726f6350 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties @@ -40,9 +40,9 @@ compress.argument=<0|1|2>[:filter=] compress.description=\ Compress all resources in the output image.\n\ -Level 0: constant string sharing\n\ -Level 1: ZIP\n\ -Level 2: both.\n\ +Level 0: No compression\n\ +Level 1: Constant string sharing\n\ +Level 2: ZIP.\n\ An optional filter can be specified to list the pattern of\n\ files to be included. @@ -148,8 +148,10 @@ plugin.opt.disable-plugin=\ \ --disable-plugin Disable the plugin mentioned plugin.opt.compress=\ -\ -c, --compress=<0|1|2> Enable compression of resources\n\ -\ More details in --list-plugins option +\ -c, --compress=<0|1|2> Enable compression of resources:\n\ +\ Level 0: No compression\n\ +\ Level 1: Constant string sharing\n\ +\ Level 2: ZIP plugin.opt.strip-debug=\ \ -G, --strip-debug Strip debug information diff --git a/jdk/test/tools/jlink/IntegrationTest.java b/jdk/test/tools/jlink/IntegrationTest.java index 9bf019069ba..b968d6e4da0 100644 --- a/jdk/test/tools/jlink/IntegrationTest.java +++ b/jdk/test/tools/jlink/IntegrationTest.java @@ -145,7 +145,7 @@ public class IntegrationTest { throw new Exception("Plugin should be null"); } - Plugin p2 = Jlink.newPlugin("compress", Collections.emptyMap(), null); + Plugin p2 = Jlink.newPlugin("compress", Map.of("compress", "1"), null); if (p2 == null) { throw new Exception("Plugin should not be null"); } diff --git a/jdk/test/tools/jlink/plugins/CompressorPluginTest.java b/jdk/test/tools/jlink/plugins/CompressorPluginTest.java index aea5c21424f..dbed1a726bf 100644 --- a/jdk/test/tools/jlink/plugins/CompressorPluginTest.java +++ b/jdk/test/tools/jlink/plugins/CompressorPluginTest.java @@ -93,80 +93,53 @@ public class CompressorPluginTest { new ResourceDecompressorFactory[]{ new StringSharingDecompressorFactory()}); - // compress == ZIP + String sharing - Properties options = new Properties(); - options.setProperty(ZipPlugin.NAME, ""); - checkCompress(classes, new DefaultCompressPlugin(), options, + // compress level 0 == no compression + Properties options0 = new Properties(); + options0.setProperty(DefaultCompressPlugin.NAME, + "0"); + checkCompress(classes, new DefaultCompressPlugin(), + options0, new ResourceDecompressorFactory[]{ - new ZipDecompressorFactory(), - new StringSharingDecompressorFactory() }); - // compress == ZIP + String sharing + filter - options.setProperty(DefaultCompressPlugin.FILTER, - "**Exception.class"); - checkCompress(classes, new DefaultCompressPlugin(), options, - new ResourceDecompressorFactory[]{ - new ZipDecompressorFactory(), - new StringSharingDecompressorFactory() - }, Collections.singletonList(".*Exception.class")); - - // compress level 1 == ZIP + // compress level 1 == String sharing Properties options1 = new Properties(); - options1.setProperty(DefaultCompressPlugin.NAME, - "1"); + options1.setProperty(DefaultCompressPlugin.NAME, "1"); checkCompress(classes, new DefaultCompressPlugin(), options1, new ResourceDecompressorFactory[]{ - new ZipDecompressorFactory() + new StringSharingDecompressorFactory() }); - // compress level 1 == ZIP + // compress level 1 == String sharing + filter options1.setProperty(DefaultCompressPlugin.FILTER, "**Exception.class"); + options1.setProperty(DefaultCompressPlugin.NAME, "1"); checkCompress(classes, new DefaultCompressPlugin(), options1, + new ResourceDecompressorFactory[]{ + new StringSharingDecompressorFactory() + }, Collections.singletonList(".*Exception.class")); + + // compress level 2 == ZIP + Properties options2 = new Properties(); + options2.setProperty(DefaultCompressPlugin.FILTER, + "**Exception.class"); + options2.setProperty(DefaultCompressPlugin.NAME, "2"); + checkCompress(classes, new DefaultCompressPlugin(), + options2, new ResourceDecompressorFactory[]{ new ZipDecompressorFactory() }, Collections.singletonList(".*Exception.class")); - // compress level 2 == ZIP + String sharing - Properties options2 = new Properties(); - options2.setProperty(DefaultCompressPlugin.NAME, - "2"); - checkCompress(classes, new DefaultCompressPlugin(), - options2, - new ResourceDecompressorFactory[]{ - new ZipDecompressorFactory(), - new StringSharingDecompressorFactory() - }); - - // compress level 2 == ZIP + String sharing + filter + // compress level 2 == ZIP + filter options2.setProperty(DefaultCompressPlugin.FILTER, "**Exception.class"); + options2.setProperty(DefaultCompressPlugin.NAME, "2"); checkCompress(classes, new DefaultCompressPlugin(), options2, new ResourceDecompressorFactory[]{ new ZipDecompressorFactory(), - new StringSharingDecompressorFactory() - }, Collections.singletonList(".*Exception.class")); - - // compress level 0 == String sharing - Properties options0 = new Properties(); - options0.setProperty(DefaultCompressPlugin.NAME, "0"); - checkCompress(classes, new DefaultCompressPlugin(), - options0, - new ResourceDecompressorFactory[]{ - new StringSharingDecompressorFactory() - }); - - // compress level 0 == String sharing + filter - options0.setProperty(DefaultCompressPlugin.FILTER, - "**Exception.class"); - checkCompress(classes, new DefaultCompressPlugin(), - options0, - new ResourceDecompressorFactory[]{ - new StringSharingDecompressorFactory() }, Collections.singletonList(".*Exception.class")); } @@ -234,6 +207,11 @@ public class CompressorPluginTest { Properties config, ResourceDecompressorFactory[] factories, List includes) throws Exception { + if (factories.length == 0) { + // no compression, nothing to check! + return; + } + long[] original = new long[1]; long[] compressed = new long[1]; resources.entries().forEach(resource -> { From dbfbe59e5ccbb7f4fd227701b1bc417390ca7299 Mon Sep 17 00:00:00 2001 From: Amy Lu Date: Tue, 14 Feb 2017 10:11:26 +0800 Subject: [PATCH 169/447] 8169903: Refactor spliterator traversing tests into a library Reviewed-by: psandoz --- .../Spliterator/SpliteratorCollisions.java | 539 +++--------------- ...SpliteratorTraversingAndSplittingTest.java | 523 ++--------------- .../{stream => }/SpliteratorTestHelper.java | 126 ++-- .../util/stream/DoubleStreamTestScenario.java | 3 +- .../util/stream/IntStreamTestScenario.java | 3 +- .../util/stream/LongStreamTestScenario.java | 3 +- .../java/util/stream/StreamTestScenario.java | 3 +- .../java/util/stream/DoubleNodeTest.java | 3 +- .../java/util/stream/IntNodeTest.java | 3 +- .../java/util/stream/LongNodeTest.java | 3 +- .../java.base/java/util/stream/NodeTest.java | 3 +- .../util/stream/SliceSpliteratorTest.java | 3 +- .../tests/java/util/stream/RangeTest.java | 4 +- .../java/util/stream/SpliteratorTest.java | 3 +- .../util/stream/StreamSpliteratorTest.java | 4 +- 15 files changed, 242 insertions(+), 984 deletions(-) rename jdk/test/java/util/stream/bootlib/java.base/java/util/{stream => }/SpliteratorTestHelper.java (89%) diff --git a/jdk/test/java/util/Spliterator/SpliteratorCollisions.java b/jdk/test/java/util/Spliterator/SpliteratorCollisions.java index 733dff4b21c..43c0fc6da85 100644 --- a/jdk/test/java/util/Spliterator/SpliteratorCollisions.java +++ b/jdk/test/java/util/Spliterator/SpliteratorCollisions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,20 +24,19 @@ /** * @test * @bug 8005698 + * @library ../stream/bootlib + * @build java.base/java.util.SpliteratorTestHelper * @run testng SpliteratorCollisions * @summary Spliterator traversing and splitting hash maps containing colliding hashes - * @author Brent Christian */ import org.testng.annotations.DataProvider; import org.testng.annotations.Test; -import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; -import java.util.Deque; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedHashMap; @@ -45,19 +44,15 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Spliterator; +import java.util.SpliteratorTestHelper; import java.util.TreeSet; -import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Supplier; import java.util.function.UnaryOperator; -import static org.testng.Assert.*; -import static org.testng.Assert.assertEquals; +public class SpliteratorCollisions extends SpliteratorTestHelper { -@Test -public class SpliteratorCollisions { - - private static List SIZES = Arrays.asList(0, 1, 10, 100, 1000); + private static final List SIZES = Arrays.asList(0, 1, 10, 100, 1000); private static class SpliteratorDataBuilder { List data; @@ -214,492 +209,134 @@ public class SpliteratorCollisions { } @Test(dataProvider = "HashableIntSpliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testNullPointerException(String description, Collection exp, Supplier s) { + void testNullPointerException(String description, + Collection exp, + Supplier> s) { executeAndCatch(NullPointerException.class, () -> s.get().forEachRemaining(null)); executeAndCatch(NullPointerException.class, () -> s.get().tryAdvance(null)); } @Test(dataProvider = "HashableIntSpliteratorWithNull") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testNullPointerExceptionWithNull(String description, Collection exp, Supplier s) { + void testNullPointerExceptionWithNull(String description, + Collection exp, + Supplier> s) { executeAndCatch(NullPointerException.class, () -> s.get().forEachRemaining(null)); executeAndCatch(NullPointerException.class, () -> s.get().tryAdvance(null)); } @Test(dataProvider = "HashableIntSpliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testForEach(String description, Collection exp, Supplier s) { - testForEach(exp, s, (Consumer b) -> b); + void testForEach(String description, + Collection exp, + Supplier> s) { + testForEach(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "HashableIntSpliteratorWithNull") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testForEachWithNull(String description, Collection exp, Supplier s) { - testForEach(exp, s, (Consumer b) -> b); + void testForEachWithNull(String description, + Collection exp, + Supplier> s) { + testForEach(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "HashableIntSpliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testTryAdvance(String description, Collection exp, Supplier s) { - testTryAdvance(exp, s, (Consumer b) -> b); + void testTryAdvance(String description, + Collection exp, + Supplier> s) { + testTryAdvance(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "HashableIntSpliteratorWithNull") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testTryAdvanceWithNull(String description, Collection exp, Supplier s) { - testTryAdvance(exp, s, (Consumer b) -> b); + void testTryAdvanceWithNull(String description, + Collection exp, + Supplier> s) { + testTryAdvance(exp, s, UnaryOperator.identity()); } -/* skip this test until 8013649 is fixed - @Test(dataProvider = "HashableIntSpliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testMixedTryAdvanceForEach(String description, Collection exp, Supplier s) { - testMixedTryAdvanceForEach(exp, s, (Consumer b) -> b); - } - - @Test(dataProvider = "HashableIntSpliteratorWithNull") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testMixedTryAdvanceForEachWithNull(String description, Collection exp, Supplier s) { - testMixedTryAdvanceForEach(exp, s, (Consumer b) -> b); - } -*/ - @Test(dataProvider = "HashableIntSpliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitAfterFullTraversal(String description, Collection exp, Supplier s) { - testSplitAfterFullTraversal(s, (Consumer b) -> b); + void testMixedTryAdvanceForEach(String description, + Collection exp, + Supplier> s) { + testMixedTryAdvanceForEach(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "HashableIntSpliteratorWithNull") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitAfterFullTraversalWithNull(String description, Collection exp, Supplier s) { - testSplitAfterFullTraversal(s, (Consumer b) -> b); + void testMixedTryAdvanceForEachWithNull(String description, + Collection exp, + Supplier> s) { + testMixedTryAdvanceForEach(exp, s, UnaryOperator.identity()); + } + + @Test(dataProvider = "HashableIntSpliterator") + void testMixedTraverseAndSplit(String description, + Collection exp, + Supplier> s) { + testMixedTraverseAndSplit(exp, s, UnaryOperator.identity()); + } + + @Test(dataProvider = "HashableIntSpliteratorWithNull") + void testMixedTraverseAndSplitWithNull(String description, + Collection exp, + Supplier> s) { + testMixedTraverseAndSplit(exp, s, UnaryOperator.identity()); + } + + @Test(dataProvider = "HashableIntSpliterator") + void testSplitAfterFullTraversal(String description, + Collection exp, + Supplier> s) { + testSplitAfterFullTraversal(s, UnaryOperator.identity()); + } + + @Test(dataProvider = "HashableIntSpliteratorWithNull") + void testSplitAfterFullTraversalWithNull(String description, + Collection exp, + Supplier> s) { + testSplitAfterFullTraversal(s, UnaryOperator.identity()); } @Test(dataProvider = "HashableIntSpliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitOnce(String description, Collection exp, Supplier s) { - testSplitOnce(exp, s, (Consumer b) -> b); + void testSplitOnce(String description, + Collection exp, + Supplier> s) { + testSplitOnce(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "HashableIntSpliteratorWithNull") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitOnceWithNull(String description, Collection exp, Supplier s) { - testSplitOnce(exp, s, (Consumer b) -> b); + void testSplitOnceWithNull(String description, + Collection exp, + Supplier> s) { + testSplitOnce(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "HashableIntSpliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitSixDeep(String description, Collection exp, Supplier s) { - testSplitSixDeep(exp, s, (Consumer b) -> b); + void testSplitSixDeep(String description, + Collection exp, + Supplier> s) { + testSplitSixDeep(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "HashableIntSpliteratorWithNull") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitSixDeepWithNull(String description, Collection exp, Supplier s) { - testSplitSixDeep(exp, s, (Consumer b) -> b); + void testSplitSixDeepWithNull(String description, + Collection exp, + Supplier> s) { + testSplitSixDeep(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "HashableIntSpliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitUntilNull(String description, Collection exp, Supplier s) { - testSplitUntilNull(exp, s, (Consumer b) -> b); + void testSplitUntilNull(String description, + Collection exp, + Supplier> s) { + testSplitUntilNull(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "HashableIntSpliteratorWithNull") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitUntilNullWithNull(String description, Collection exp, Supplier s) { - testSplitUntilNull(exp, s, (Consumer b) -> b); - } - - private static > void testForEach( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - S spliterator = supplier.get(); - long sizeIfKnown = spliterator.getExactSizeIfKnown(); - boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED); - - ArrayList fromForEach = new ArrayList<>(); - spliterator = supplier.get(); - Consumer addToFromForEach = boxingAdapter.apply(fromForEach::add); - spliterator.forEachRemaining(addToFromForEach); - - // Assert that forEach now produces no elements - spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e))); - // Assert that tryAdvance now produce no elements - spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e))); - - // assert that size, tryAdvance, and forEach are consistent - if (sizeIfKnown >= 0) { - assertEquals(sizeIfKnown, exp.size()); - } - if (exp.contains(null)) { - assertTrue(fromForEach.contains(null)); - } - assertEquals(fromForEach.size(), exp.size()); - - assertContents(fromForEach, exp, isOrdered); - } - - private static > void testTryAdvance( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - S spliterator = supplier.get(); - long sizeIfKnown = spliterator.getExactSizeIfKnown(); - boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED); - - spliterator = supplier.get(); - ArrayList fromTryAdvance = new ArrayList<>(); - Consumer addToFromTryAdvance = boxingAdapter.apply(fromTryAdvance::add); - while (spliterator.tryAdvance(addToFromTryAdvance)) { } - - // Assert that forEach now produces no elements - spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e))); - // Assert that tryAdvance now produce no elements - spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e))); - - // assert that size, tryAdvance, and forEach are consistent - if (sizeIfKnown >= 0) { - assertEquals(sizeIfKnown, exp.size()); - } - assertEquals(fromTryAdvance.size(), exp.size()); - - assertContents(fromTryAdvance, exp, isOrdered); - } - - private static > void testMixedTryAdvanceForEach( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - S spliterator = supplier.get(); - long sizeIfKnown = spliterator.getExactSizeIfKnown(); - boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED); - - // tryAdvance first few elements, then forEach rest - ArrayList dest = new ArrayList<>(); - spliterator = supplier.get(); - Consumer addToDest = boxingAdapter.apply(dest::add); - for (int i = 0; i < 10 && spliterator.tryAdvance(addToDest); i++) { } - spliterator.forEachRemaining(addToDest); - - // Assert that forEach now produces no elements - spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e))); - // Assert that tryAdvance now produce no elements - spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e))); - - if (sizeIfKnown >= 0) { - assertEquals(sizeIfKnown, dest.size()); - } - assertEquals(dest.size(), exp.size()); - - if (isOrdered) { - assertEquals(dest, exp); - } - else { - assertContentsUnordered(dest, exp); - } - } - - private static > void testSplitAfterFullTraversal( - Supplier supplier, - UnaryOperator> boxingAdapter) { - // Full traversal using tryAdvance - Spliterator spliterator = supplier.get(); - while (spliterator.tryAdvance(boxingAdapter.apply(e -> { }))) { } - Spliterator split = spliterator.trySplit(); - assertNull(split); - - // Full traversal using forEach - spliterator = supplier.get(); - spliterator.forEachRemaining(boxingAdapter.apply(e -> { - })); - split = spliterator.trySplit(); - assertNull(split); - - // Full traversal using tryAdvance then forEach - spliterator = supplier.get(); - spliterator.tryAdvance(boxingAdapter.apply(e -> { })); - spliterator.forEachRemaining(boxingAdapter.apply(e -> { - })); - split = spliterator.trySplit(); - assertNull(split); - } - - private static > void testSplitOnce( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - S spliterator = supplier.get(); - long sizeIfKnown = spliterator.getExactSizeIfKnown(); - boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED); - - ArrayList fromSplit = new ArrayList<>(); - Spliterator s1 = supplier.get(); - Spliterator s2 = s1.trySplit(); - long s1Size = s1.getExactSizeIfKnown(); - long s2Size = (s2 != null) ? s2.getExactSizeIfKnown() : 0; - - Consumer addToFromSplit = boxingAdapter.apply(fromSplit::add); - if (s2 != null) - s2.forEachRemaining(addToFromSplit); - s1.forEachRemaining(addToFromSplit); - - if (sizeIfKnown >= 0) { - assertEquals(sizeIfKnown, fromSplit.size()); - if (s1Size >= 0 && s2Size >= 0) - assertEquals(sizeIfKnown, s1Size + s2Size); - } - assertContents(fromSplit, exp, isOrdered); - } - - private static > void testSplitSixDeep( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - S spliterator = supplier.get(); - boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED); - - for (int depth=0; depth < 6; depth++) { - List dest = new ArrayList<>(); - spliterator = supplier.get(); - - assertSpliterator(spliterator); - - // verify splitting with forEach - visit(depth, 0, dest, spliterator, boxingAdapter, spliterator.characteristics(), false); - assertContents(dest, exp, isOrdered); - - // verify splitting with tryAdvance - dest.clear(); - spliterator = supplier.get(); - visit(depth, 0, dest, spliterator, boxingAdapter, spliterator.characteristics(), true); - assertContents(dest, exp, isOrdered); - } - } - - private static > void visit(int depth, int curLevel, - List dest, S spliterator, UnaryOperator> boxingAdapter, - int rootCharacteristics, boolean useTryAdvance) { - if (curLevel < depth) { - long beforeSize = spliterator.getExactSizeIfKnown(); - Spliterator split = spliterator.trySplit(); - if (split != null) { - assertSpliterator(split, rootCharacteristics); - assertSpliterator(spliterator, rootCharacteristics); - - if ((rootCharacteristics & Spliterator.SUBSIZED) != 0 && - (rootCharacteristics & Spliterator.SIZED) != 0) { - assertEquals(beforeSize, split.estimateSize() + spliterator.estimateSize()); - } - visit(depth, curLevel + 1, dest, split, boxingAdapter, rootCharacteristics, useTryAdvance); - } - visit(depth, curLevel + 1, dest, spliterator, boxingAdapter, rootCharacteristics, useTryAdvance); - } - else { - long sizeIfKnown = spliterator.getExactSizeIfKnown(); - if (useTryAdvance) { - Consumer addToDest = boxingAdapter.apply(dest::add); - int count = 0; - while (spliterator.tryAdvance(addToDest)) { - ++count; - } - - if (sizeIfKnown >= 0) - assertEquals(sizeIfKnown, count); - - // Assert that forEach now produces no elements - spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e))); - - Spliterator split = spliterator.trySplit(); - assertNull(split); - } - else { - List leafDest = new ArrayList<>(); - Consumer addToLeafDest = boxingAdapter.apply(leafDest::add); - spliterator.forEachRemaining(addToLeafDest); - - if (sizeIfKnown >= 0) - assertEquals(sizeIfKnown, leafDest.size()); - - // Assert that forEach now produces no elements - spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e))); - - Spliterator split = spliterator.trySplit(); - assertNull(split); - - dest.addAll(leafDest); - } - } - } - - private static > void testSplitUntilNull( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - Spliterator s = supplier.get(); - boolean isOrdered = s.hasCharacteristics(Spliterator.ORDERED); - assertSpliterator(s); - - List splits = new ArrayList<>(); - Consumer c = boxingAdapter.apply(splits::add); - - testSplitUntilNull(new SplitNode(c, s)); - assertContents(splits, exp, isOrdered); - } - - private static class SplitNode { - // Constant for every node - final Consumer c; - final int rootCharacteristics; - - final Spliterator s; - - SplitNode(Consumer c, Spliterator s) { - this(c, s.characteristics(), s); - } - - private SplitNode(Consumer c, int rootCharacteristics, Spliterator s) { - this.c = c; - this.rootCharacteristics = rootCharacteristics; - this.s = s; - } - - SplitNode fromSplit(Spliterator split) { - return new SplitNode<>(c, rootCharacteristics, split); - } - } - - /** - * Set the maximum stack capacity to 0.25MB. This should be more than enough to detect a bad spliterator - * while not unduly disrupting test infrastructure given the test data sizes that are used are small. - * Note that j.u.c.ForkJoinPool sets the max queue size to 64M (1 << 26). - */ - private static final int MAXIMUM_STACK_CAPACITY = 1 << 18; // 0.25MB - - private static void testSplitUntilNull(SplitNode e) { - // Use an explicit stack to avoid a StackOverflowException when testing a Spliterator - // that when repeatedly split produces a right-balanced (and maybe degenerate) tree, or - // for a spliterator that is badly behaved. - Deque> stack = new ArrayDeque<>(); - stack.push(e); - - int iteration = 0; - while (!stack.isEmpty()) { - assertTrue(iteration++ < MAXIMUM_STACK_CAPACITY, "Exceeded maximum stack modification count of 1 << 18"); - - e = stack.pop(); - Spliterator parentAndRightSplit = e.s; - - long parentEstimateSize = parentAndRightSplit.estimateSize(); - assertTrue(parentEstimateSize >= 0, - String.format("Split size estimate %d < 0", parentEstimateSize)); - - long parentSize = parentAndRightSplit.getExactSizeIfKnown(); - Spliterator leftSplit = parentAndRightSplit.trySplit(); - if (leftSplit == null) { - parentAndRightSplit.forEachRemaining(e.c); - continue; - } - - assertSpliterator(leftSplit, e.rootCharacteristics); - assertSpliterator(parentAndRightSplit, e.rootCharacteristics); - - if (parentEstimateSize != Long.MAX_VALUE && leftSplit.estimateSize() > 0 && parentAndRightSplit.estimateSize() > 0) { - assertTrue(leftSplit.estimateSize() < parentEstimateSize, - String.format("Left split size estimate %d >= parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize)); - assertTrue(parentAndRightSplit.estimateSize() < parentEstimateSize, - String.format("Right split size estimate %d >= parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize)); - } - else { - assertTrue(leftSplit.estimateSize() <= parentEstimateSize, - String.format("Left split size estimate %d > parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize)); - assertTrue(parentAndRightSplit.estimateSize() <= parentEstimateSize, - String.format("Right split size estimate %d > parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize)); - } - - long leftSize = leftSplit.getExactSizeIfKnown(); - long rightSize = parentAndRightSplit.getExactSizeIfKnown(); - if (parentSize >= 0 && leftSize >= 0 && rightSize >= 0) - assertEquals(parentSize, leftSize + rightSize, - String.format("exact left split size %d + exact right split size %d != parent exact split size %d", - leftSize, rightSize, parentSize)); - - // Add right side to stack first so left side is popped off first - stack.push(e.fromSplit(parentAndRightSplit)); - stack.push(e.fromSplit(leftSplit)); - } - } - - private static void assertSpliterator(Spliterator s, int rootCharacteristics) { - if ((rootCharacteristics & Spliterator.SUBSIZED) != 0) { - assertTrue(s.hasCharacteristics(Spliterator.SUBSIZED), - "Child split is not SUBSIZED when root split is SUBSIZED"); - } - assertSpliterator(s); - } - - private static void assertSpliterator(Spliterator s) { - if (s.hasCharacteristics(Spliterator.SUBSIZED)) { - assertTrue(s.hasCharacteristics(Spliterator.SIZED)); - } - if (s.hasCharacteristics(Spliterator.SIZED)) { - assertTrue(s.estimateSize() != Long.MAX_VALUE); - assertTrue(s.getExactSizeIfKnown() >= 0); - } - try { - s.getComparator(); - assertTrue(s.hasCharacteristics(Spliterator.SORTED)); - } catch (IllegalStateException e) { - assertFalse(s.hasCharacteristics(Spliterator.SORTED)); - } - } - - private static void assertContents(Collection actual, Collection expected, boolean isOrdered) { - if (isOrdered) { - assertEquals(actual, expected); - } - else { - assertContentsUnordered(actual, expected); - } - } - - private static void assertContentsUnordered(Iterable actual, Iterable expected) { - assertEquals(toBoxedMultiset(actual), toBoxedMultiset(expected)); - } - - private static Map toBoxedMultiset(Iterable c) { - Map result = new HashMap<>(); - c.forEach(e -> { - if (result.containsKey(e)) { - result.put(e, new HashableInteger(result.get(e).value + 1, 10)); - } else { - result.put(e, new HashableInteger(1, 10)); - } - }); - return result; - } - - private void executeAndCatch(Class expected, Runnable r) { - Exception caught = null; - try { - r.run(); - } - catch (Exception e) { - caught = e; - } - - assertNotNull(caught, - String.format("No Exception was thrown, expected an Exception of %s to be thrown", - expected.getName())); - assertTrue(expected.isInstance(caught), - String.format("Exception thrown %s not an instance of %s", - caught.getClass().getName(), expected.getName())); + void testSplitUntilNullWithNull(String description, + Collection exp, + Supplier> s) { + testSplitUntilNull(exp, s, UnaryOperator.identity()); } } diff --git a/jdk/test/java/util/Spliterator/SpliteratorTraversingAndSplittingTest.java b/jdk/test/java/util/Spliterator/SpliteratorTraversingAndSplittingTest.java index a8338ca4e5f..eb3647a6816 100644 --- a/jdk/test/java/util/Spliterator/SpliteratorTraversingAndSplittingTest.java +++ b/jdk/test/java/util/Spliterator/SpliteratorTraversingAndSplittingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,6 +24,8 @@ /** * @test * @summary Spliterator traversing and splitting tests + * @library ../stream/bootlib + * @build java.base/java.util.SpliteratorTestHelper * @run testng SpliteratorTraversingAndSplittingTest * @bug 8020016 8071477 8072784 8169838 */ @@ -42,7 +44,6 @@ import java.util.BitSet; import java.util.Collection; import java.util.Collections; import java.util.Comparator; -import java.util.Deque; import java.util.HashMap; import java.util.HashSet; import java.util.IdentityHashMap; @@ -58,6 +59,7 @@ import java.util.RandomAccess; import java.util.Set; import java.util.SortedSet; import java.util.Spliterator; +import java.util.SpliteratorTestHelper; import java.util.Spliterators; import java.util.Stack; import java.util.TreeMap; @@ -85,11 +87,8 @@ import java.util.function.UnaryOperator; import java.util.stream.IntStream; import static java.util.stream.Collectors.toList; -import static org.testng.Assert.*; -import static org.testng.Assert.assertEquals; -@Test -public class SpliteratorTraversingAndSplittingTest { +public class SpliteratorTraversingAndSplittingTest extends SpliteratorTestHelper { private static final List SIZES = Arrays.asList(0, 1, 10, 42); @@ -668,52 +667,49 @@ public class SpliteratorTraversingAndSplittingTest { } @Test(dataProvider = "Spliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testNullPointerException(String description, Collection exp, Supplier s) { + public void testNullPointerException(String description, Collection exp, Supplier> s) { executeAndCatch(NullPointerException.class, () -> s.get().forEachRemaining(null)); executeAndCatch(NullPointerException.class, () -> s.get().tryAdvance(null)); } @Test(dataProvider = "Spliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testForEach(String description, Collection exp, Supplier s) { - testForEach(exp, s, (Consumer b) -> b); + public void testForEach(String description, Collection exp, Supplier> s) { + testForEach(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "Spliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testTryAdvance(String description, Collection exp, Supplier s) { - testTryAdvance(exp, s, (Consumer b) -> b); + public void testTryAdvance(String description, Collection exp, Supplier> s) { + testTryAdvance(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "Spliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testMixedTryAdvanceForEach(String description, Collection exp, Supplier s) { - testMixedTryAdvanceForEach(exp, s, (Consumer b) -> b); + public void testMixedTryAdvanceForEach(String description, Collection exp, Supplier> s) { + testMixedTryAdvanceForEach(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "Spliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitAfterFullTraversal(String description, Collection exp, Supplier s) { - testSplitAfterFullTraversal(s, (Consumer b) -> b); + public void testMixedTraverseAndSplit(String description, Collection exp, Supplier> s) { + testMixedTraverseAndSplit(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "Spliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitOnce(String description, Collection exp, Supplier s) { - testSplitOnce(exp, s, (Consumer b) -> b); + public void testSplitAfterFullTraversal(String description, Collection exp, Supplier> s) { + testSplitAfterFullTraversal(s, UnaryOperator.identity()); } @Test(dataProvider = "Spliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitSixDeep(String description, Collection exp, Supplier s) { - testSplitSixDeep(exp, s, (Consumer b) -> b); + public void testSplitOnce(String description, Collection exp, Supplier> s) { + testSplitOnce(exp, s, UnaryOperator.identity()); } @Test(dataProvider = "Spliterator") - @SuppressWarnings({"unchecked", "rawtypes"}) - public void testSplitUntilNull(String description, Collection exp, Supplier s) { - testSplitUntilNull(exp, s, (Consumer b) -> b); + public void testSplitSixDeep(String description, Collection exp, Supplier> s) { + testSplitSixDeep(exp, s, UnaryOperator.identity()); + } + + @Test(dataProvider = "Spliterator") + public void testSplitUntilNull(String description, Collection exp, Supplier> s) { + testSplitUntilNull(exp, s, UnaryOperator.identity()); } // @@ -922,28 +918,6 @@ public class SpliteratorTraversingAndSplittingTest { return exp; } - private static UnaryOperator> intBoxingConsumer() { - class BoxingAdapter implements Consumer, IntConsumer { - private final Consumer b; - - BoxingAdapter(Consumer b) { - this.b = b; - } - - @Override - public void accept(Integer value) { - throw new IllegalStateException(); - } - - @Override - public void accept(int value) { - b.accept(value); - } - } - - return b -> new BoxingAdapter(b); - } - @Test(dataProvider = "Spliterator.OfInt") public void testIntNullPointerException(String description, Collection exp, Supplier s) { executeAndCatch(NullPointerException.class, () -> s.get().forEachRemaining((IntConsumer) null)); @@ -965,6 +939,11 @@ public class SpliteratorTraversingAndSplittingTest { testMixedTryAdvanceForEach(exp, s, intBoxingConsumer()); } + @Test(dataProvider = "Spliterator.OfInt") + public void testIntMixedTraverseAndSplit(String description, Collection exp, Supplier s) { + testMixedTraverseAndSplit(exp, s, intBoxingConsumer()); + } + @Test(dataProvider = "Spliterator.OfInt") public void testIntSplitAfterFullTraversal(String description, Collection exp, Supplier s) { testSplitAfterFullTraversal(s, intBoxingConsumer()); @@ -1082,28 +1061,6 @@ public class SpliteratorTraversingAndSplittingTest { return exp; } - private static UnaryOperator> longBoxingConsumer() { - class BoxingAdapter implements Consumer, LongConsumer { - private final Consumer b; - - BoxingAdapter(Consumer b) { - this.b = b; - } - - @Override - public void accept(Long value) { - throw new IllegalStateException(); - } - - @Override - public void accept(long value) { - b.accept(value); - } - } - - return b -> new BoxingAdapter(b); - } - @Test(dataProvider = "Spliterator.OfLong") public void testLongNullPointerException(String description, Collection exp, Supplier s) { executeAndCatch(NullPointerException.class, () -> s.get().forEachRemaining((LongConsumer) null)); @@ -1125,6 +1082,11 @@ public class SpliteratorTraversingAndSplittingTest { testMixedTryAdvanceForEach(exp, s, longBoxingConsumer()); } + @Test(dataProvider = "Spliterator.OfLong") + public void testLongMixedTraverseAndSplit(String description, Collection exp, Supplier s) { + testMixedTraverseAndSplit(exp, s, longBoxingConsumer()); + } + @Test(dataProvider = "Spliterator.OfLong") public void testLongSplitAfterFullTraversal(String description, Collection exp, Supplier s) { testSplitAfterFullTraversal(s, longBoxingConsumer()); @@ -1242,28 +1204,6 @@ public class SpliteratorTraversingAndSplittingTest { return exp; } - private static UnaryOperator> doubleBoxingConsumer() { - class BoxingAdapter implements Consumer, DoubleConsumer { - private final Consumer b; - - BoxingAdapter(Consumer b) { - this.b = b; - } - - @Override - public void accept(Double value) { - throw new IllegalStateException(); - } - - @Override - public void accept(double value) { - b.accept(value); - } - } - - return b -> new BoxingAdapter(b); - } - @Test(dataProvider = "Spliterator.OfDouble") public void testDoubleNullPointerException(String description, Collection exp, Supplier s) { executeAndCatch(NullPointerException.class, () -> s.get().forEachRemaining((DoubleConsumer) null)); @@ -1285,6 +1225,11 @@ public class SpliteratorTraversingAndSplittingTest { testMixedTryAdvanceForEach(exp, s, doubleBoxingConsumer()); } + @Test(dataProvider = "Spliterator.OfDouble") + public void testDoubleMixedTraverseAndSplit(String description, Collection exp, Supplier s) { + testMixedTraverseAndSplit(exp, s, doubleBoxingConsumer()); + } + @Test(dataProvider = "Spliterator.OfDouble") public void testDoubleSplitAfterFullTraversal(String description, Collection exp, Supplier s) { testSplitAfterFullTraversal(s, doubleBoxingConsumer()); @@ -1305,392 +1250,4 @@ public class SpliteratorTraversingAndSplittingTest { testSplitUntilNull(exp, s, doubleBoxingConsumer()); } - // - - private static > void testForEach( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - S spliterator = supplier.get(); - long sizeIfKnown = spliterator.getExactSizeIfKnown(); - boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED); - - ArrayList fromForEach = new ArrayList<>(); - spliterator = supplier.get(); - Consumer addToFromForEach = boxingAdapter.apply(fromForEach::add); - spliterator.forEachRemaining(addToFromForEach); - - // Assert that forEach now produces no elements - spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e))); - // Assert that tryAdvance now produce no elements - spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e))); - - // assert that size, tryAdvance, and forEach are consistent - if (sizeIfKnown >= 0) { - assertEquals(sizeIfKnown, exp.size()); - } - assertEquals(fromForEach.size(), exp.size()); - - assertContents(fromForEach, exp, isOrdered); - } - - private static > void testTryAdvance( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - S spliterator = supplier.get(); - long sizeIfKnown = spliterator.getExactSizeIfKnown(); - boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED); - - spliterator = supplier.get(); - ArrayList fromTryAdvance = new ArrayList<>(); - Consumer addToFromTryAdvance = boxingAdapter.apply(fromTryAdvance::add); - while (spliterator.tryAdvance(addToFromTryAdvance)) { } - - // Assert that forEach now produces no elements - spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e))); - // Assert that tryAdvance now produce no elements - spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e))); - - // assert that size, tryAdvance, and forEach are consistent - if (sizeIfKnown >= 0) { - assertEquals(sizeIfKnown, exp.size()); - } - assertEquals(fromTryAdvance.size(), exp.size()); - - assertContents(fromTryAdvance, exp, isOrdered); - } - - private static > void testMixedTryAdvanceForEach( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - S spliterator = supplier.get(); - long sizeIfKnown = spliterator.getExactSizeIfKnown(); - boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED); - - // tryAdvance first few elements, then forEach rest - ArrayList dest = new ArrayList<>(); - spliterator = supplier.get(); - Consumer addToDest = boxingAdapter.apply(dest::add); - for (int i = 0; i < 10 && spliterator.tryAdvance(addToDest); i++) { } - spliterator.forEachRemaining(addToDest); - - // Assert that forEach now produces no elements - spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e))); - // Assert that tryAdvance now produce no elements - spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e))); - - if (sizeIfKnown >= 0) { - assertEquals(sizeIfKnown, dest.size()); - } - assertEquals(dest.size(), exp.size()); - - if (isOrdered) { - assertEquals(dest, exp); - } - else { - assertContentsUnordered(dest, exp); - } - } - - private static > void testSplitAfterFullTraversal( - Supplier supplier, - UnaryOperator> boxingAdapter) { - // Full traversal using tryAdvance - Spliterator spliterator = supplier.get(); - while (spliterator.tryAdvance(boxingAdapter.apply(e -> { }))) { } - Spliterator split = spliterator.trySplit(); - assertNull(split); - - // Full traversal using forEach - spliterator = supplier.get(); - spliterator.forEachRemaining(boxingAdapter.apply(e -> { - })); - split = spliterator.trySplit(); - assertNull(split); - - // Full traversal using tryAdvance then forEach - spliterator = supplier.get(); - spliterator.tryAdvance(boxingAdapter.apply(e -> { })); - spliterator.forEachRemaining(boxingAdapter.apply(e -> { - })); - split = spliterator.trySplit(); - assertNull(split); - } - - private static > void testSplitOnce( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - S spliterator = supplier.get(); - long sizeIfKnown = spliterator.getExactSizeIfKnown(); - boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED); - - ArrayList fromSplit = new ArrayList<>(); - Spliterator s1 = supplier.get(); - Spliterator s2 = s1.trySplit(); - long s1Size = s1.getExactSizeIfKnown(); - long s2Size = (s2 != null) ? s2.getExactSizeIfKnown() : 0; - Consumer addToFromSplit = boxingAdapter.apply(fromSplit::add); - if (s2 != null) - s2.forEachRemaining(addToFromSplit); - s1.forEachRemaining(addToFromSplit); - - if (sizeIfKnown >= 0) { - assertEquals(sizeIfKnown, fromSplit.size()); - if (s1Size >= 0 && s2Size >= 0) - assertEquals(sizeIfKnown, s1Size + s2Size); - } - assertContents(fromSplit, exp, isOrdered); - } - - private static > void testSplitSixDeep( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - S spliterator = supplier.get(); - boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED); - - for (int depth=0; depth < 6; depth++) { - List dest = new ArrayList<>(); - spliterator = supplier.get(); - - assertRootSpliterator(spliterator); - - // verify splitting with forEach - visit(depth, 0, dest, spliterator, boxingAdapter, spliterator.characteristics(), false); - assertContents(dest, exp, isOrdered); - - // verify splitting with tryAdvance - dest.clear(); - spliterator = supplier.get(); - visit(depth, 0, dest, spliterator, boxingAdapter, spliterator.characteristics(), true); - assertContents(dest, exp, isOrdered); - } - } - - private static > void visit(int depth, int curLevel, - List dest, S spliterator, UnaryOperator> boxingAdapter, - int rootCharacteristics, boolean useTryAdvance) { - if (curLevel < depth) { - long beforeSize = spliterator.getExactSizeIfKnown(); - Spliterator split = spliterator.trySplit(); - if (split != null) { - assertSpliterator(split, rootCharacteristics); - assertSpliterator(spliterator, rootCharacteristics); - - if ((rootCharacteristics & Spliterator.SUBSIZED) != 0 && - (rootCharacteristics & Spliterator.SIZED) != 0) { - assertEquals(beforeSize, split.estimateSize() + spliterator.estimateSize()); - } - visit(depth, curLevel + 1, dest, split, boxingAdapter, rootCharacteristics, useTryAdvance); - } - visit(depth, curLevel + 1, dest, spliterator, boxingAdapter, rootCharacteristics, useTryAdvance); - } - else { - long sizeIfKnown = spliterator.getExactSizeIfKnown(); - if (useTryAdvance) { - Consumer addToDest = boxingAdapter.apply(dest::add); - int count = 0; - while (spliterator.tryAdvance(addToDest)) { - ++count; - } - - if (sizeIfKnown >= 0) - assertEquals(sizeIfKnown, count); - - // Assert that forEach now produces no elements - spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e))); - - Spliterator split = spliterator.trySplit(); - assertNull(split); - } - else { - List leafDest = new ArrayList<>(); - Consumer addToLeafDest = boxingAdapter.apply(leafDest::add); - spliterator.forEachRemaining(addToLeafDest); - - if (sizeIfKnown >= 0) - assertEquals(sizeIfKnown, leafDest.size()); - - // Assert that forEach now produces no elements - spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e))); - - Spliterator split = spliterator.trySplit(); - assertNull(split); - - dest.addAll(leafDest); - } - } - } - - private static > void testSplitUntilNull( - Collection exp, - Supplier supplier, - UnaryOperator> boxingAdapter) { - Spliterator s = supplier.get(); - boolean isOrdered = s.hasCharacteristics(Spliterator.ORDERED); - assertRootSpliterator(s); - - List splits = new ArrayList<>(); - Consumer c = boxingAdapter.apply(splits::add); - - testSplitUntilNull(new SplitNode(c, s)); - assertContents(splits, exp, isOrdered); - } - - private static class SplitNode { - // Constant for every node - final Consumer c; - final int rootCharacteristics; - - final Spliterator s; - - SplitNode(Consumer c, Spliterator s) { - this(c, s.characteristics(), s); - } - - private SplitNode(Consumer c, int rootCharacteristics, Spliterator s) { - this.c = c; - this.rootCharacteristics = rootCharacteristics; - this.s = s; - } - - SplitNode fromSplit(Spliterator split) { - return new SplitNode<>(c, rootCharacteristics, split); - } - } - - /** - * Set the maximum stack capacity to 0.25MB. This should be more than enough to detect a bad spliterator - * while not unduly disrupting test infrastructure given the test data sizes that are used are small. - * Note that j.u.c.ForkJoinPool sets the max queue size to 64M (1 << 26). - */ - private static final int MAXIMUM_STACK_CAPACITY = 1 << 18; // 0.25MB - - private static void testSplitUntilNull(SplitNode e) { - // Use an explicit stack to avoid a StackOverflowException when testing a Spliterator - // that when repeatedly split produces a right-balanced (and maybe degenerate) tree, or - // for a spliterator that is badly behaved. - Deque> stack = new ArrayDeque<>(); - stack.push(e); - - int iteration = 0; - while (!stack.isEmpty()) { - assertTrue(iteration++ < MAXIMUM_STACK_CAPACITY, "Exceeded maximum stack modification count of 1 << 18"); - - e = stack.pop(); - Spliterator parentAndRightSplit = e.s; - - long parentEstimateSize = parentAndRightSplit.estimateSize(); - assertTrue(parentEstimateSize >= 0, - String.format("Split size estimate %d < 0", parentEstimateSize)); - - long parentSize = parentAndRightSplit.getExactSizeIfKnown(); - Spliterator leftSplit = parentAndRightSplit.trySplit(); - if (leftSplit == null) { - parentAndRightSplit.forEachRemaining(e.c); - continue; - } - - assertSpliterator(leftSplit, e.rootCharacteristics); - assertSpliterator(parentAndRightSplit, e.rootCharacteristics); - - if (parentEstimateSize != Long.MAX_VALUE && leftSplit.estimateSize() > 0 && parentAndRightSplit.estimateSize() > 0) { - assertTrue(leftSplit.estimateSize() < parentEstimateSize, - String.format("Left split size estimate %d >= parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize)); - assertTrue(parentAndRightSplit.estimateSize() < parentEstimateSize, - String.format("Right split size estimate %d >= parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize)); - } - else { - assertTrue(leftSplit.estimateSize() <= parentEstimateSize, - String.format("Left split size estimate %d > parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize)); - assertTrue(parentAndRightSplit.estimateSize() <= parentEstimateSize, - String.format("Right split size estimate %d > parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize)); - } - - long leftSize = leftSplit.getExactSizeIfKnown(); - long rightSize = parentAndRightSplit.getExactSizeIfKnown(); - if (parentSize >= 0 && leftSize >= 0 && rightSize >= 0) - assertEquals(parentSize, leftSize + rightSize, - String.format("exact left split size %d + exact right split size %d != parent exact split size %d", - leftSize, rightSize, parentSize)); - - // Add right side to stack first so left side is popped off first - stack.push(e.fromSplit(parentAndRightSplit)); - stack.push(e.fromSplit(leftSplit)); - } - } - - private static void assertRootSpliterator(Spliterator s) { - assertFalse(s.hasCharacteristics(Spliterator.SIZED | Spliterator.CONCURRENT), - "Root spliterator should not be SIZED and CONCURRENT"); - - assertSpliterator(s); - } - - private static void assertSpliterator(Spliterator s, int rootCharacteristics) { - if ((rootCharacteristics & Spliterator.SUBSIZED) != 0) { - assertTrue(s.hasCharacteristics(Spliterator.SUBSIZED), - "Child split is not SUBSIZED when root split is SUBSIZED"); - } - assertSpliterator(s); - } - - private static void assertSpliterator(Spliterator s) { - if (s.hasCharacteristics(Spliterator.SUBSIZED)) { - assertTrue(s.hasCharacteristics(Spliterator.SIZED)); - } - if (s.hasCharacteristics(Spliterator.SIZED)) { - assertTrue(s.estimateSize() != Long.MAX_VALUE); - assertTrue(s.getExactSizeIfKnown() >= 0); - } - try { - s.getComparator(); - assertTrue(s.hasCharacteristics(Spliterator.SORTED)); - } catch (IllegalStateException e) { - assertFalse(s.hasCharacteristics(Spliterator.SORTED)); - } - } - - private static void assertContents(Collection actual, Collection expected, boolean isOrdered) { - if (isOrdered) { - assertEquals(actual, expected); - } - else { - assertContentsUnordered(actual, expected); - } - } - - private static void assertContentsUnordered(Iterable actual, Iterable expected) { - assertEquals(toBoxedMultiset(actual), toBoxedMultiset(expected)); - } - - private static Map toBoxedMultiset(Iterable c) { - Map result = new HashMap<>(); - c.forEach(e -> { - if (result.containsKey(e)) result.put(e, result.get(e) + 1); - else result.put(e, 1); - }); - return result; - } - - private void executeAndCatch(Class expected, Runnable r) { - Exception caught = null; - try { - r.run(); - } - catch (Exception e) { - caught = e; - } - - assertNotNull(caught, - String.format("No Exception was thrown, expected an Exception of %s to be thrown", - expected.getName())); - assertTrue(expected.isInstance(caught), - String.format("Exception thrown %s not an instance of %s", - caught.getClass().getName(), expected.getName())); - } - } diff --git a/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/SpliteratorTestHelper.java b/jdk/test/java/util/stream/bootlib/java.base/java/util/SpliteratorTestHelper.java similarity index 89% rename from jdk/test/java/util/stream/bootlib/java.base/java/util/stream/SpliteratorTestHelper.java rename to jdk/test/java/util/stream/bootlib/java.base/java/util/SpliteratorTestHelper.java index a3446ffd6cc..087658431e8 100644 --- a/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/SpliteratorTestHelper.java +++ b/jdk/test/java/util/stream/bootlib/java.base/java/util/SpliteratorTestHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -20,20 +20,10 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package java.util.stream; +package java.util; -import org.testng.annotations.Test; - -import java.util.ArrayDeque; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Deque; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Spliterator; import java.util.function.*; +import java.util.stream.LambdaTestHelpers; import static org.testng.Assert.*; import static org.testng.Assert.assertEquals; @@ -71,6 +61,28 @@ public class SpliteratorTestHelper { public static void testIntSpliterator(Supplier supplier, ContentAsserter asserter) { + testSpliterator(supplier, intBoxingConsumer(), asserter); + } + + public static void testLongSpliterator(Supplier supplier) { + testLongSpliterator(supplier, defaultContentAsserter()); + } + + public static void testLongSpliterator(Supplier supplier, + ContentAsserter asserter) { + testSpliterator(supplier, longBoxingConsumer(), asserter); + } + + public static void testDoubleSpliterator(Supplier supplier) { + testDoubleSpliterator(supplier, defaultContentAsserter()); + } + + public static void testDoubleSpliterator(Supplier supplier, + ContentAsserter asserter) { + testSpliterator(supplier, doubleBoxingConsumer(), asserter); + } + + public static UnaryOperator> intBoxingConsumer() { class BoxingAdapter implements Consumer, IntConsumer { private final Consumer b; @@ -89,15 +101,10 @@ public class SpliteratorTestHelper { } } - testSpliterator(supplier, BoxingAdapter::new, asserter); + return b -> new BoxingAdapter(b); } - public static void testLongSpliterator(Supplier supplier) { - testLongSpliterator(supplier, defaultContentAsserter()); - } - - public static void testLongSpliterator(Supplier supplier, - ContentAsserter asserter) { + public static UnaryOperator> longBoxingConsumer() { class BoxingAdapter implements Consumer, LongConsumer { private final Consumer b; @@ -116,15 +123,10 @@ public class SpliteratorTestHelper { } } - testSpliterator(supplier, BoxingAdapter::new, asserter); + return b -> new BoxingAdapter(b); } - public static void testDoubleSpliterator(Supplier supplier) { - testDoubleSpliterator(supplier, defaultContentAsserter()); - } - - public static void testDoubleSpliterator(Supplier supplier, - ContentAsserter asserter) { + public static UnaryOperator> doubleBoxingConsumer() { class BoxingAdapter implements Consumer, DoubleConsumer { private final Consumer b; @@ -143,10 +145,10 @@ public class SpliteratorTestHelper { } } - testSpliterator(supplier, BoxingAdapter::new, asserter); + return b -> new BoxingAdapter(b); } - static > void testSpliterator(Supplier supplier, + public static > void testSpliterator(Supplier supplier, UnaryOperator> boxingAdapter, ContentAsserter asserter) { ArrayList fromForEach = new ArrayList<>(); @@ -167,7 +169,54 @@ public class SpliteratorTestHelper { testSplitUntilNull(exp, supplier, boxingAdapter, asserter); } - // + public static > void testForEach( + Collection exp, + Supplier supplier, + UnaryOperator> boxingAdapter) { + testForEach(exp, supplier, boxingAdapter, defaultContentAsserter()); + } + + public static > void testTryAdvance( + Collection exp, + Supplier supplier, + UnaryOperator> boxingAdapter) { + testTryAdvance(exp, supplier, boxingAdapter, defaultContentAsserter()); + } + + public static > void testMixedTryAdvanceForEach( + Collection exp, + Supplier supplier, + UnaryOperator> boxingAdapter) { + testMixedTryAdvanceForEach(exp, supplier, boxingAdapter, defaultContentAsserter()); + } + + public static > void testMixedTraverseAndSplit( + Collection exp, + Supplier supplier, + UnaryOperator> boxingAdapter) { + testMixedTraverseAndSplit(exp, supplier, boxingAdapter, defaultContentAsserter()); + } + + public static > void testSplitOnce( + Collection exp, + Supplier supplier, + UnaryOperator> boxingAdapter) { + testSplitOnce(exp, supplier, boxingAdapter, defaultContentAsserter()); + } + + public static > void testSplitSixDeep( + Collection exp, + Supplier supplier, + UnaryOperator> boxingAdapter) { + testSplitSixDeep(exp, supplier, boxingAdapter, defaultContentAsserter()); + } + + public static > void testSplitUntilNull( + Collection exp, + Supplier supplier, + UnaryOperator> boxingAdapter) { + testSplitUntilNull(exp, supplier, boxingAdapter, defaultContentAsserter()); + } private static > void testNullPointerException(Supplier s) { S sp = s.get(); @@ -219,6 +268,9 @@ public class SpliteratorTestHelper { if (sizeIfKnown >= 0) { assertEquals(sizeIfKnown, exp.size()); } + if (exp.contains(null)) { + assertTrue(fromForEach.contains(null)); + } assertEquals(fromForEach.size(), exp.size()); asserter.assertContents(fromForEach, exp, isOrdered); @@ -329,7 +381,7 @@ public class SpliteratorTestHelper { asserter.assertContents(dest, exp, isOrdered); } - private static > void testSplitAfterFullTraversal( + public static > void testSplitAfterFullTraversal( Supplier supplier, UnaryOperator> boxingAdapter) { // Full traversal using tryAdvance @@ -601,7 +653,7 @@ public class SpliteratorTestHelper { } } - private static void executeAndCatch(Class expected, Runnable r) { + public static void executeAndCatch(Class expected, Runnable r) { Exception caught = null; try { r.run(); @@ -618,7 +670,7 @@ public class SpliteratorTestHelper { caught.getClass().getName(), expected.getName())); } - static void mixedTraverseAndSplit(Consumer b, Spliterator splTop) { + public static void mixedTraverseAndSplit(Consumer b, Spliterator splTop) { Spliterator spl1, spl2, spl3; splTop.tryAdvance(b); spl2 = splTop.trySplit(); @@ -642,7 +694,7 @@ public class SpliteratorTestHelper { splTop.forEachRemaining(b); } - static void mixedTraverseAndSplit(IntConsumer b, Spliterator.OfInt splTop) { + public static void mixedTraverseAndSplit(IntConsumer b, Spliterator.OfInt splTop) { Spliterator.OfInt spl1, spl2, spl3; splTop.tryAdvance(b); spl2 = splTop.trySplit(); @@ -665,7 +717,8 @@ public class SpliteratorTestHelper { splTop.tryAdvance(b); splTop.forEachRemaining(b); } - static void mixedTraverseAndSplit(LongConsumer b, Spliterator.OfLong splTop) { + + public static void mixedTraverseAndSplit(LongConsumer b, Spliterator.OfLong splTop) { Spliterator.OfLong spl1, spl2, spl3; splTop.tryAdvance(b); spl2 = splTop.trySplit(); @@ -689,7 +742,7 @@ public class SpliteratorTestHelper { splTop.forEachRemaining(b); } - static void mixedTraverseAndSplit(DoubleConsumer b, Spliterator.OfDouble splTop) { + public static void mixedTraverseAndSplit(DoubleConsumer b, Spliterator.OfDouble splTop) { Spliterator.OfDouble spl1, spl2, spl3; splTop.tryAdvance(b); spl2 = splTop.trySplit(); @@ -712,4 +765,5 @@ public class SpliteratorTestHelper { splTop.tryAdvance(b); splTop.forEachRemaining(b); } + } diff --git a/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/DoubleStreamTestScenario.java b/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/DoubleStreamTestScenario.java index f1ff3382468..c717e221f98 100644 --- a/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/DoubleStreamTestScenario.java +++ b/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/DoubleStreamTestScenario.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ import java.util.EnumSet; import java.util.PrimitiveIterator; import java.util.Set; import java.util.Spliterator; +import java.util.SpliteratorTestHelper; import java.util.function.Consumer; import java.util.function.DoubleConsumer; import java.util.function.Function; diff --git a/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/IntStreamTestScenario.java b/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/IntStreamTestScenario.java index 526638d0cb8..37bf656ebe9 100644 --- a/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/IntStreamTestScenario.java +++ b/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/IntStreamTestScenario.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ import java.util.EnumSet; import java.util.PrimitiveIterator; import java.util.Set; import java.util.Spliterator; +import java.util.SpliteratorTestHelper; import java.util.function.Consumer; import java.util.function.Function; import java.util.function.IntConsumer; diff --git a/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/LongStreamTestScenario.java b/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/LongStreamTestScenario.java index acc2492d6f6..9cfc8c6fd48 100644 --- a/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/LongStreamTestScenario.java +++ b/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/LongStreamTestScenario.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ import java.util.EnumSet; import java.util.PrimitiveIterator; import java.util.Set; import java.util.Spliterator; +import java.util.SpliteratorTestHelper; import java.util.function.Consumer; import java.util.function.Function; import java.util.function.LongConsumer; diff --git a/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/StreamTestScenario.java b/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/StreamTestScenario.java index 899dfdb52b2..bf7b4e65237 100644 --- a/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/StreamTestScenario.java +++ b/jdk/test/java/util/stream/bootlib/java.base/java/util/stream/StreamTestScenario.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ import java.util.EnumSet; import java.util.Iterator; import java.util.Set; import java.util.Spliterator; +import java.util.SpliteratorTestHelper; import java.util.function.Consumer; import java.util.function.Function; diff --git a/jdk/test/java/util/stream/boottest/java.base/java/util/stream/DoubleNodeTest.java b/jdk/test/java/util/stream/boottest/java.base/java/util/stream/DoubleNodeTest.java index c1e8a309e89..d96bd8c676a 100644 --- a/jdk/test/java/util/stream/boottest/java.base/java/util/stream/DoubleNodeTest.java +++ b/jdk/test/java/util/stream/boottest/java.base/java/util/stream/DoubleNodeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ import java.util.Arrays; import java.util.List; import java.util.PrimitiveIterator; import java.util.Spliterators; +import java.util.SpliteratorTestHelper; import java.util.function.Function; import org.testng.annotations.DataProvider; diff --git a/jdk/test/java/util/stream/boottest/java.base/java/util/stream/IntNodeTest.java b/jdk/test/java/util/stream/boottest/java.base/java/util/stream/IntNodeTest.java index e050e63d37b..459dad4f176 100644 --- a/jdk/test/java/util/stream/boottest/java.base/java/util/stream/IntNodeTest.java +++ b/jdk/test/java/util/stream/boottest/java.base/java/util/stream/IntNodeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ import java.util.Arrays; import java.util.List; import java.util.PrimitiveIterator; import java.util.Spliterators; +import java.util.SpliteratorTestHelper; import java.util.function.Function; import org.testng.annotations.DataProvider; diff --git a/jdk/test/java/util/stream/boottest/java.base/java/util/stream/LongNodeTest.java b/jdk/test/java/util/stream/boottest/java.base/java/util/stream/LongNodeTest.java index d266fd7d04e..dbe28c8ecc0 100644 --- a/jdk/test/java/util/stream/boottest/java.base/java/util/stream/LongNodeTest.java +++ b/jdk/test/java/util/stream/boottest/java.base/java/util/stream/LongNodeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ import java.util.Arrays; import java.util.List; import java.util.PrimitiveIterator; import java.util.Spliterators; +import java.util.SpliteratorTestHelper; import java.util.function.Function; import org.testng.annotations.DataProvider; diff --git a/jdk/test/java/util/stream/boottest/java.base/java/util/stream/NodeTest.java b/jdk/test/java/util/stream/boottest/java.base/java/util/stream/NodeTest.java index da710033fda..61532a5972c 100644 --- a/jdk/test/java/util/stream/boottest/java.base/java/util/stream/NodeTest.java +++ b/jdk/test/java/util/stream/boottest/java.base/java/util/stream/NodeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.Iterator; import java.util.List; +import java.util.SpliteratorTestHelper; import java.util.function.Function; import org.testng.annotations.DataProvider; diff --git a/jdk/test/java/util/stream/boottest/java.base/java/util/stream/SliceSpliteratorTest.java b/jdk/test/java/util/stream/boottest/java.base/java/util/stream/SliceSpliteratorTest.java index 7aa27bf5b88..ef0e848fe79 100644 --- a/jdk/test/java/util/stream/boottest/java.base/java/util/stream/SliceSpliteratorTest.java +++ b/jdk/test/java/util/stream/boottest/java.base/java/util/stream/SliceSpliteratorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,6 +30,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.Spliterator; +import java.util.SpliteratorTestHelper; import static java.util.stream.Collectors.toList; import static org.testng.Assert.assertEquals; diff --git a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/RangeTest.java b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/RangeTest.java index 20ae203bb63..f9d3385bd05 100644 --- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/RangeTest.java +++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/RangeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,10 +25,10 @@ package org.openjdk.tests.java.util.stream; import java.util.Arrays; import java.util.Optional; import java.util.Spliterator; +import java.util.SpliteratorTestHelper; import java.util.stream.IntStream; import java.util.stream.LongStream; import java.util.stream.OpTestCase; -import java.util.stream.SpliteratorTestHelper; import java.util.stream.Stream; import java.util.stream.TestData; diff --git a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SpliteratorTest.java b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SpliteratorTest.java index d69c585b72d..395b2b65b2f 100644 --- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SpliteratorTest.java +++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SpliteratorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,6 +29,7 @@ import java.util.Iterator; import java.util.List; import java.util.function.Supplier; import java.util.Spliterator; +import java.util.SpliteratorTestHelper; import java.util.stream.*; import static org.testng.Assert.*; diff --git a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/StreamSpliteratorTest.java b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/StreamSpliteratorTest.java index 0d07e7cb67a..d3b0d254c41 100644 --- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/StreamSpliteratorTest.java +++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/StreamSpliteratorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,6 +32,7 @@ import java.util.Arrays; import java.util.Comparator; import java.util.List; import java.util.Spliterator; +import java.util.SpliteratorTestHelper; import java.util.function.Consumer; import java.util.function.DoubleConsumer; import java.util.function.Function; @@ -46,7 +47,6 @@ import java.util.stream.LambdaTestHelpers; import java.util.stream.LongStream; import java.util.stream.LongStreamTestDataProvider; import java.util.stream.OpTestCase; -import java.util.stream.SpliteratorTestHelper; import java.util.stream.Stream; import java.util.stream.StreamSupport; import java.util.stream.StreamTestDataProvider; From ce8df4ca58e882c4ce14bb665873e181c49c0717 Mon Sep 17 00:00:00 2001 From: Hamlin Li Date: Mon, 13 Feb 2017 18:19:36 -0800 Subject: [PATCH 170/447] 8174695: Fix @since in module-info.java in dev/langtools repo Reviewed-by: mcimadamore --- langtools/src/java.compiler/share/classes/module-info.java | 2 ++ langtools/src/jdk.compiler/share/classes/module-info.java | 2 ++ langtools/src/jdk.javadoc/share/classes/module-info.java | 2 ++ langtools/src/jdk.jdeps/share/classes/module-info.java | 2 ++ 4 files changed, 8 insertions(+) diff --git a/langtools/src/java.compiler/share/classes/module-info.java b/langtools/src/java.compiler/share/classes/module-info.java index 093f748bde8..27e74592607 100644 --- a/langtools/src/java.compiler/share/classes/module-info.java +++ b/langtools/src/java.compiler/share/classes/module-info.java @@ -29,6 +29,8 @@ * These APIs model declarations and types of the Java programming language, * and define interfaces for tools such as compilers which can be invoked * from a program. + * + * @since 9 */ module java.compiler { exports javax.annotation.processing; diff --git a/langtools/src/jdk.compiler/share/classes/module-info.java b/langtools/src/jdk.compiler/share/classes/module-info.java index ddfc508345c..51db8c7bd51 100644 --- a/langtools/src/jdk.compiler/share/classes/module-info.java +++ b/langtools/src/jdk.compiler/share/classes/module-info.java @@ -26,6 +26,8 @@ /** Defines the implementation of the * {@link javax.tools.ToolProvider#getSystemJavaCompiler system Java compiler} * and its command line equivalent, javac, as well as javah. + * + * @since 9 */ module jdk.compiler { requires transitive java.compiler; diff --git a/langtools/src/jdk.javadoc/share/classes/module-info.java b/langtools/src/jdk.javadoc/share/classes/module-info.java index 7690a69535b..1834f78f7c2 100644 --- a/langtools/src/jdk.javadoc/share/classes/module-info.java +++ b/langtools/src/jdk.javadoc/share/classes/module-info.java @@ -26,6 +26,8 @@ /** Defines the implementation of the * {@link javax.tools.ToolProvider#getSystemDocumentationTool system documentation tool} * and its command line equivalent, javadoc. + * + * @since 9 */ module jdk.javadoc { requires transitive java.compiler; diff --git a/langtools/src/jdk.jdeps/share/classes/module-info.java b/langtools/src/jdk.jdeps/share/classes/module-info.java index 87e2135dd7d..6bea5dde765 100644 --- a/langtools/src/jdk.jdeps/share/classes/module-info.java +++ b/langtools/src/jdk.jdeps/share/classes/module-info.java @@ -25,6 +25,8 @@ /** Defines tools for analysing dependencies in Java libraries and programs, including * the jdeps and javap tools. + * + * @since 9 */ module jdk.jdeps { requires java.base; From 97456db8e62711cf0f56347104a18eaee3884794 Mon Sep 17 00:00:00 2001 From: Prasanta Sadhukhan Date: Tue, 14 Feb 2017 10:00:01 +0530 Subject: [PATCH 171/447] 8174717: [TEST_BUG] javax/swing/text/html/StyleSheet/bug4936917.java Reviewed-by: yan, serb --- jdk/test/javax/swing/text/html/StyleSheet/bug4936917.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jdk/test/javax/swing/text/html/StyleSheet/bug4936917.java b/jdk/test/javax/swing/text/html/StyleSheet/bug4936917.java index 10fe6e867bc..e490f93baf0 100644 --- a/jdk/test/javax/swing/text/html/StyleSheet/bug4936917.java +++ b/jdk/test/javax/swing/text/html/StyleSheet/bug4936917.java @@ -21,7 +21,7 @@ * questions. */ /* @test - @bug 4936917 7190578 + @bug 4936917 7190578 8174717 @summary Tests if background is correctly painted when has css margins @author Denis Sharypov @library ../../../regtesthelpers @@ -72,6 +72,7 @@ public class bug4936917 { blockTillDisplayed(editorPane); Robot robot = new Robot(); robot.waitForIdle(); + robot.delay(300); int x0 = p.x + 15 ; int y = p.y + 15; From 2d42fc6691ae135e13453397e0a94766a1ea653f Mon Sep 17 00:00:00 2001 From: Amy Lu Date: Tue, 14 Feb 2017 12:43:57 +0800 Subject: [PATCH 172/447] 8174887: Problem list javax/net/ssl/DTLS/RespondToRetransmit.java Reviewed-by: xuelei --- jdk/test/ProblemList.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt index 0162d67b35c..518f9c77457 100644 --- a/jdk/test/ProblemList.txt +++ b/jdk/test/ProblemList.txt @@ -214,6 +214,7 @@ sun/security/tools/keytool/ListKeychainStore.sh 8156889 macosx-a sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java 8026393 generic-all javax/net/ssl/DTLS/PacketLossRetransmission.java 8169086 macosx-x64 +javax/net/ssl/DTLS/RespondToRetransmit.java 8169086 macosx-x64 ############################################################################ From 69ec5356642c00d2ce94845e1bd40fadb4536294 Mon Sep 17 00:00:00 2001 From: Prahalad Kumar Narayanan Date: Tue, 14 Feb 2017 11:24:21 +0530 Subject: [PATCH 173/447] 6852563: ArrayOutOfBoundException when reading RLE8 compressed bitmap Reviewed-by: prr, jdv --- .../imageio/plugins/bmp/BMPImageReader.java | 137 +++++++++++++----- 1 file changed, 100 insertions(+), 37 deletions(-) diff --git a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java index ee178527dac..81baecc21cb 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java +++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java @@ -1439,51 +1439,72 @@ public class BMPImageReader extends ImageReader implements BMPConstants { decodeRLE8(imSize, padding, values, bdata); } + private boolean copyRLE8ScanlineToDst(int lineNo, + byte[] val, + byte[] bdata) { + // Return value + boolean isSuccess = false; + + // Reusing the code to copy 1 row of pixels or scanline to required + // destination buffer. + if (lineNo >= sourceRegion.y && + lineNo < sourceRegion.y + sourceRegion.height) { + if (noTransform) { + int pos = lineNo * width; + for(int i = 0; i < width; i++) + bdata[pos++] = val[i]; + processImageUpdate(bi, 0, lineNo, + destinationRegion.width, 1, 1, 1, + new int[]{0}); + isSuccess = true; + } else if ((lineNo - sourceRegion.y) % scaleY == 0) { + int lineStride = + ((ComponentSampleModel)sampleModel).getScanlineStride(); + int currentLine = (lineNo - sourceRegion.y) / scaleY + + destinationRegion.y; + int pos = currentLine * lineStride; + pos += destinationRegion.x; + for (int i = sourceRegion.x; + i < sourceRegion.x + sourceRegion.width; + i += scaleX) + bdata[pos++] = val[i]; + processImageUpdate(bi, 0, currentLine, + destinationRegion.width, 1, 1, 1, + new int[]{0}); + isSuccess = true; + } + // Ensure to reset the scanline buffer once the copy is complete. + for(int scIndex = 0; scIndex < width; scIndex++) { + val[scIndex] = 0; + } + } + + return isSuccess; + } + private void decodeRLE8(int imSize, int padding, byte[] values, byte[] bdata) throws IOException { - byte val[] = new byte[width * height]; + byte val[] = new byte[width]; int count = 0, l = 0; int value; boolean flag = false; int lineNo = isBottomUp ? height - 1 : 0; - int lineStride = - ((ComponentSampleModel)sampleModel).getScanlineStride(); int finished = 0; - while (count != imSize) { + // Ensure image source has sufficient data to decode + while ((count + 1) < imSize) { value = values[count++] & 0xff; if (value == 0) { switch(values[count++] & 0xff) { case 0: // End-of-scanline marker - if (lineNo >= sourceRegion.y && - lineNo < sourceRegion.y + sourceRegion.height) { - if (noTransform) { - int pos = lineNo * width; - for(int i = 0; i < width; i++) - bdata[pos++] = val[i]; - processImageUpdate(bi, 0, lineNo, - destinationRegion.width, 1, 1, 1, - new int[]{0}); - finished++; - } else if ((lineNo - sourceRegion.y) % scaleY == 0) { - int currentLine = (lineNo - sourceRegion.y) / scaleY + - destinationRegion.y; - int pos = currentLine * lineStride; - pos += destinationRegion.x; - for (int i = sourceRegion.x; - i < sourceRegion.x + sourceRegion.width; - i += scaleX) - bdata[pos++] = val[i]; - processImageUpdate(bi, 0, currentLine, - destinationRegion.width, 1, 1, 1, - new int[]{0}); - finished++; - } + // Copy the decoded scanline to destination + if (copyRLE8ScanlineToDst(lineNo, val, bdata)) { + finished++; } processImageProgress(100.0F * finished / destinationRegion.height); lineNo += isBottomUp ? -1 : 1; @@ -1492,26 +1513,62 @@ public class BMPImageReader extends ImageReader implements BMPConstants { if (abortRequested()) { flag = true; } - break; case 1: // End-of-RLE marker flag = true; + + // Check if the last decoded scanline was copied to + // destination bitmap + if (l != 0) { + // Copy the decoded scanline to destination + if (copyRLE8ScanlineToDst(lineNo, val, bdata)) { + finished++; + } + processImageProgress(100.0F * finished / destinationRegion.height); + lineNo += isBottomUp ? -1 : 1; + l = 0; + } break; case 2: // delta or vector marker - int xoff = values[count++] & 0xff; - int yoff = values[count] & 0xff; - // Move to the position xoff, yoff down - l += xoff + yoff*width; + if ((count+1) < imSize) { + int xoff = values[count++] & 0xff; + int yoff = values[count++] & 0xff; + + // Check if the yOffset shifts the decoding to another + // row. In such cases, the decoded pixels in scanline + // buffer-val must be copied to the destination image. + if (yoff != 0) { + // Copy the decoded scanline to destination + if (copyRLE8ScanlineToDst(lineNo, val, bdata)) { + finished++; + } + processImageProgress(100.0F * finished + / destinationRegion.height); + lineNo += isBottomUp ? -yoff : yoff; + } + + // Move to the position xoff, yoff down + l += xoff + yoff*width; + l %= width; + } break; default: int end = values[count-1] & 0xff; - for (int i=0; i Date: Tue, 14 Feb 2017 14:24:23 +0530 Subject: [PATCH 174/447] 8170691: fill in @bug number for test Reviewed-by: darcy --- langtools/test/tools/javac/modules/AllDefaultTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/langtools/test/tools/javac/modules/AllDefaultTest.java b/langtools/test/tools/javac/modules/AllDefaultTest.java index f78b0f19209..77241cc3d24 100644 --- a/langtools/test/tools/javac/modules/AllDefaultTest.java +++ b/langtools/test/tools/javac/modules/AllDefaultTest.java @@ -23,7 +23,7 @@ /** * @test - * @bug 0000000 + * @bug 8164590 8170691 * @summary Test use of ALL-DEFAULT token * @library /tools/lib * @modules From 7eb64c498da8cabb9cdda305914b0404e575c880 Mon Sep 17 00:00:00 2001 From: Abjihit Roy Date: Tue, 14 Feb 2017 10:49:43 +0000 Subject: [PATCH 175/447] 8173094: Error in API documentation for SwingWorker 8173751: Syntax error in ZipFile.getComment() method 8173752: Syntax error in ZipEntry.setCompressedSize(long) method documentation 8173755: FilterOutputStream.write(byte[],int,int) javadoc correction 8173802: Incorrect argument name in java.io.FilterInputStream.read(byte[]) method documentation Reviewed-by: coffeys, chegar --- .../share/classes/java/io/FilterInputStream.java | 4 ++-- .../share/classes/java/io/FilterOutputStream.java | 8 ++++---- .../java.base/share/classes/java/util/zip/ZipEntry.java | 4 ++-- .../java.base/share/classes/java/util/zip/ZipFile.java | 4 ++-- .../share/classes/javax/swing/SwingWorker.java | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/io/FilterInputStream.java b/jdk/src/java.base/share/classes/java/io/FilterInputStream.java index 3304a1f2eb8..05ab5fa56cb 100644 --- a/jdk/src/java.base/share/classes/java/io/FilterInputStream.java +++ b/jdk/src/java.base/share/classes/java/io/FilterInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -84,7 +84,7 @@ class FilterInputStream extends InputStream { } /** - * Reads up to byte.length bytes of data from this + * Reads up to b.length bytes of data from this * input stream into an array of bytes. This method blocks until some * input is available. *

      diff --git a/jdk/src/java.base/share/classes/java/io/FilterOutputStream.java b/jdk/src/java.base/share/classes/java/io/FilterOutputStream.java index cb8f122d0b1..8030979cdaa 100644 --- a/jdk/src/java.base/share/classes/java/io/FilterOutputStream.java +++ b/jdk/src/java.base/share/classes/java/io/FilterOutputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -91,8 +91,8 @@ public class FilterOutputStream extends OutputStream { * b.length. *

      * Note that this method does not call the one-argument - * write method of its underlying stream with the single - * argument b. + * write method of its underlying output stream with + * the single argument b. * * @param b the data to be written. * @exception IOException if an I/O error occurs. @@ -113,7 +113,7 @@ public class FilterOutputStream extends OutputStream { * byte to output. *

      * Note that this method does not call the write method - * of its underlying input stream with the same arguments. Subclasses + * of its underlying output stream with the same arguments. Subclasses * of FilterOutputStream should provide a more efficient * implementation of this method. * diff --git a/jdk/src/java.base/share/classes/java/util/zip/ZipEntry.java b/jdk/src/java.base/share/classes/java/util/zip/ZipEntry.java index 5191894f4e6..c00b5bf6789 100644 --- a/jdk/src/java.base/share/classes/java/util/zip/ZipEntry.java +++ b/jdk/src/java.base/share/classes/java/util/zip/ZipEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -441,7 +441,7 @@ class ZipEntry implements ZipConstants, Cloneable { /** * Sets the size of the compressed entry data. * - * @param csize the compressed size to set to + * @param csize the compressed size to set * * @see #getCompressedSize() */ diff --git a/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java b/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java index 4a78e2eb277..ecd002bc340 100644 --- a/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java +++ b/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -274,7 +274,7 @@ class ZipFile implements ZipConstants, Closeable { * * @throws IllegalStateException if the zip file has been closed * - * Since 1.7 + * @since 1.7 */ public String getComment() { synchronized (this) { diff --git a/jdk/src/java.desktop/share/classes/javax/swing/SwingWorker.java b/jdk/src/java.desktop/share/classes/javax/swing/SwingWorker.java index 40da1c24a02..26a122cd513 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/SwingWorker.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/SwingWorker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -575,7 +575,7 @@ public abstract class SwingWorker implements RunnableFuture { * For example: * *

      -     * class SwingWorkerCompletionWaiter extends PropertyChangeListener {
      +     * class SwingWorkerCompletionWaiter implements PropertyChangeListener {
            *     private JDialog dialog;
            *
            *     public SwingWorkerCompletionWaiter(JDialog dialog) {
      
      From 05ccdbdb0e0218bc5da7c3cc7f3be8b305ab160d Mon Sep 17 00:00:00 2001
      From: Denis Kononenko 
      Date: Tue, 14 Feb 2017 14:31:41 +0300
      Subject: [PATCH 176/447] 8169715: jimage fails with IAE when attempts to
       inspect an empty file
      
      Added buffer's capacity checks.
      
      Reviewed-by: jlaskey, anazarov
      ---
       .../jdk/internal/jimage/BasicImageReader.java    | 16 ++++++++++++----
       1 file changed, 12 insertions(+), 4 deletions(-)
      
      diff --git a/jdk/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java b/jdk/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java
      index 10506b7029c..e82a27dea43 100644
      --- a/jdk/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java
      +++ b/jdk/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
        * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
        *
        * This code is free software; you can redistribute it and/or modify it
      @@ -137,10 +137,15 @@ public class BasicImageReader implements AutoCloseable {
               int headerSize = ImageHeader.getHeaderSize();
       
               // If no memory map then read header from image file
      -        if (map == null) {
      +        if (headerBuffer == null) {
                   headerBuffer = ByteBuffer.allocateDirect(headerSize);
      -            channel.read(headerBuffer, 0L);
      -            headerBuffer.rewind();
      +            if (channel.read(headerBuffer, 0L) == headerSize) {
      +                headerBuffer.rewind();
      +            } else {
      +                throw new IOException("\"" + name + "\" is not an image file");
      +            }
      +        } else if (headerBuffer.capacity() < headerSize) {
      +            throw new IOException("\"" + name + "\" is not an image file");
               }
       
               // Interpret the image file header
      @@ -156,6 +161,9 @@ public class BasicImageReader implements AutoCloseable {
               memoryMap = map.asReadOnlyBuffer();
       
               // Interpret the image index
      +        if (memoryMap.capacity() < indexSize) {
      +            throw new IOException("The image file \"" + name + "\" is corrupted");
      +        }
               redirect = intBuffer(memoryMap, header.getRedirectOffset(), header.getRedirectSize());
               offsets = intBuffer(memoryMap, header.getOffsetsOffset(), header.getOffsetsSize());
               locations = slice(memoryMap, header.getLocationsOffset(), header.getLocationsSize());
      
      From 7ebe8fa0fa56cacdb9c82ec43616f987ab04fcc1 Mon Sep 17 00:00:00 2001
      From: Dmitry Markov 
      Date: Tue, 14 Feb 2017 15:47:58 +0300
      Subject: [PATCH 177/447] 8163979: [macosx] Chinese text shows as Latin w/
       openVanilla input method
      
      Reviewed-by: prr, serb
      ---
       .../lwawt/macosx/CInputMethodDescriptor.java  | 20 +++++++++++--------
       1 file changed, 12 insertions(+), 8 deletions(-)
      
      diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethodDescriptor.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethodDescriptor.java
      index 3deba1e33f9..891972ff130 100644
      --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethodDescriptor.java
      +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethodDescriptor.java
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
        * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
        *
        * This code is free software; you can redistribute it and/or modify it
      @@ -57,15 +57,19 @@ public class CInputMethodDescriptor implements InputMethodDescriptor {
           }
       
           static Object[] getAvailableLocalesInternal() {
      -        List workList = nativeGetAvailableLocales();
      +        List workList = nativeGetAvailableLocales();
      +        Locale currentLocale = CInputMethod.getNativeLocale();
       
      -        if (workList != null) {
      +        if (workList == null || workList.isEmpty()) {
      +            return new Object[] {
      +                    currentLocale != null ? currentLocale : Locale.getDefault()
      +            };
      +        } else {
      +            if (currentLocale != null && !workList.contains(currentLocale)) {
      +                workList.add(currentLocale);
      +            }
                   return workList.toArray();
               }
      -
      -        return new Object[] {
      -            Locale.getDefault()
      -        };
           }
       
           /**
      @@ -119,5 +123,5 @@ public class CInputMethodDescriptor implements InputMethodDescriptor {
           }
       
           private static native void nativeInit();
      -    private static native List nativeGetAvailableLocales();
      +    private static native List nativeGetAvailableLocales();
       }
      
      From ffe5040932e18028d258f81d76ad9c16a9b66db9 Mon Sep 17 00:00:00 2001
      From: Andrey Nazarov 
      Date: Tue, 14 Feb 2017 16:18:38 +0300
      Subject: [PATCH 178/447] 8170404: Improve negative testing for module-info
      
      Reviewed-by: jjg
      ---
       .../tools/javac/modules/ModuleInfoTest.java   | 185 +++++++++++++++++-
       1 file changed, 184 insertions(+), 1 deletion(-)
      
      diff --git a/langtools/test/tools/javac/modules/ModuleInfoTest.java b/langtools/test/tools/javac/modules/ModuleInfoTest.java
      index 0c816f40fbb..6e083f901cf 100644
      --- a/langtools/test/tools/javac/modules/ModuleInfoTest.java
      +++ b/langtools/test/tools/javac/modules/ModuleInfoTest.java
      @@ -557,4 +557,187 @@ public class ModuleInfoTest extends ModuleTestBase {
                       throw new Exception("expected output not found for: " + moduleInfo + "; actual: " + log);
               }
           }
      -}
      +
      +    @Test
      +    public void testMalformedModuleNames(Path base) throws Exception {
      +        testMalformedName(base, "m1.package", "module-info.java:1:11: compiler.err.expected: token.identifier");
      +        testMalformedName(base, "m1/package", "module-info.java:1:10: compiler.err.expected: '{'");
      +        testMalformedName(base, "m1->long", "module-info.java:1:10: compiler.err.expected: '{'");
      +        testMalformedName(base, "m1::long", "module-info.java:1:10: compiler.err.expected: '{'");
      +        testMalformedName(base, "m1&long", "module-info.java:1:10: compiler.err.expected: '{'");
      +        testMalformedName(base, "m1%long", "module-info.java:1:10: compiler.err.expected: '{'");
      +        testMalformedName(base, "m1@long", "module-info.java:1:10: compiler.err.expected: '{'");
      +        testMalformedName(base, "@m1", "module-info.java:1:7: compiler.err.expected: token.identifier");
      +        testMalformedName(base, "!", "module-info.java:1:7: compiler.err.expected: token.identifier");
      +        testMalformedName(base, "m1#long", "module-info.java:1:10: compiler.err.illegal.char: #");
      +        testMalformedName(base, "m1\\long", "module-info.java:1:10: compiler.err.illegal.char: \\");
      +        testMalformedName(base, "module.", "module-info.java:1:15: compiler.err.expected: token.identifier");
      +        testMalformedName(base, ".module", "module-info.java:1:7: compiler.err.expected: token.identifier");
      +        testMalformedName(base, "1module", "module-info.java:1:7: compiler.err.expected: token.identifier");
      +        testMalformedName(base, "module module", "module-info.java:1:14: compiler.err.expected: '{'");
      +    }
      +
      +    private void testMalformedName(Path base, String name, String expected) throws Exception {
      +        Path src = base.resolve("src");
      +        Path src_m1 = src.resolve("m1");
      +        tb.writeJavaFiles(src_m1, "module " + name + " { }");
      +
      +        Path classes = base.resolve("classes");
      +        Files.createDirectories(classes);
      +
      +        String log = new JavacTask(tb)
      +                .options("-XDrawDiagnostics", "--module-source-path", src.toString())
      +                .outdir(classes)
      +                .files(findJavaFiles(src))
      +                .run(Task.Expect.FAIL)
      +                .writeAll()
      +                .getOutput(Task.OutputKind.DIRECT);
      +
      +        if (!log.contains(expected))
      +            throw new Exception("expected output not found. Name: " + name + " Expected: " + expected);
      +    }
      +
      +    @Test
      +    public void testWrongOpensTransitiveFlag(Path base) throws Exception {
      +        Path src = base.resolve("src");
      +        tb.writeJavaFiles(src, "module M { opens transitive p1; }",
      +                "package p1; public class A { }");
      +        String log = new JavacTask(tb)
      +                .options("-XDrawDiagnostics")
      +                .files(findJavaFiles(src))
      +                .run(Task.Expect.FAIL)
      +                .writeAll()
      +                .getOutput(Task.OutputKind.DIRECT);
      +
      +        if (!log.contains("module-info.java:1:28: compiler.err.expected: ';'"))
      +            throw new Exception("expected output not found");
      +    }
      +
      +    @Test
      +    public void testWrongOpensStaticFlag(Path base) throws Exception {
      +        Path src = base.resolve("src");
      +        tb.writeJavaFiles(src, "module M { opens static p1; }",
      +                "package p1; public class A { }");
      +        String log = new JavacTask(tb)
      +                .options("-XDrawDiagnostics")
      +                .files(findJavaFiles(src))
      +                .run(Task.Expect.FAIL)
      +                .writeAll()
      +                .getOutput(Task.OutputKind.DIRECT);
      +
      +        if (!log.contains("module-info.java:1:17: compiler.err.expected: token.identifier"))
      +            throw new Exception("expected output not found");
      +    }
      +
      +    @Test
      +    public void testSeveralOpensDirectives(Path base) throws Exception {
      +        Path src = base.resolve("src");
      +        tb.writeJavaFiles(src, "module M { opens opens p1; }",
      +                "package p1; public class A { }");
      +        String log = new JavacTask(tb)
      +                .options("-XDrawDiagnostics")
      +                .files(findJavaFiles(src))
      +                .run(Task.Expect.FAIL)
      +                .writeAll()
      +                .getOutput(Task.OutputKind.DIRECT);
      +
      +        if (!log.contains("module-info.java:1:23: compiler.err.expected: ';'"))
      +            throw new Exception("expected output not found");
      +    }
      +
      +    @Test
      +    public void testUnknownDirective(Path base) throws Exception {
      +        Path src = base.resolve("src");
      +        tb.writeJavaFiles(src, "module M { boolean p1; }",
      +                "package p1; public class A { }");
      +        String log = new JavacTask(tb)
      +                .options("-XDrawDiagnostics")
      +                .files(findJavaFiles(src))
      +                .run(Task.Expect.FAIL)
      +                .writeAll()
      +                .getOutput(Task.OutputKind.DIRECT);
      +
      +        if (!log.contains("module-info.java:1:11: compiler.err.expected: '}'"))
      +            throw new Exception("expected output not found");
      +    }
      +
      +    @Test
      +    public void testUnknownModuleFlag(Path base) throws Exception {
      +        Path src = base.resolve("src");
      +        tb.writeJavaFiles(src, "private module M { }",
      +                "package p1; public class A { }");
      +        String log = new JavacTask(tb)
      +                .options("-XDrawDiagnostics")
      +                .files(findJavaFiles(src))
      +                .run(Task.Expect.FAIL)
      +                .writeAll()
      +                .getOutput(Task.OutputKind.DIRECT);
      +
      +        if (!log.contains("module-info.java:1:9: compiler.err.mod.not.allowed.here: private"))
      +            throw new Exception("expected output not found");
      +    }
      +
      +    @Test
      +    public void testDirectiveOnModuleDeclaration(Path base) throws Exception {
      +        Path src = base.resolve("src");
      +        tb.writeJavaFiles(src, "opens module M { }",
      +                "package p1; public class A { }");
      +        String log = new JavacTask(tb)
      +                .options("-XDrawDiagnostics")
      +                .files(findJavaFiles(src))
      +                .run(Task.Expect.FAIL)
      +                .writeAll()
      +                .getOutput(Task.OutputKind.DIRECT);
      +
      +        if (!log.contains("module-info.java:1:1: compiler.err.expected.module.or.open"))
      +            throw new Exception("expected output not found");
      +    }
      +
      +    @Test
      +    public void testTooOpenModule(Path base) throws Exception {
      +        Path src = base.resolve("src");
      +        tb.writeJavaFiles(src, "open open module M { }",
      +                "package p1; public class A { }");
      +        String log = new JavacTask(tb)
      +                .options("-XDrawDiagnostics")
      +                .files(findJavaFiles(src))
      +                .run(Task.Expect.FAIL)
      +                .writeAll()
      +                .getOutput(Task.OutputKind.DIRECT);
      +
      +        if (!log.contains("module-info.java:1:6: compiler.err.expected.module"))
      +            throw new Exception("expected output not found");
      +    }
      +
      +    @Test
      +    public void testEnumAsModuleFlag(Path base) throws Exception {
      +        Path src = base.resolve("src");
      +        tb.writeJavaFiles(src, "enum module M { }",
      +                "package p1; public class A { }");
      +        String log = new JavacTask(tb)
      +                .options("-XDrawDiagnostics")
      +                .files(findJavaFiles(src))
      +                .run(Task.Expect.FAIL)
      +                .writeAll()
      +                .getOutput(Task.OutputKind.DIRECT);
      +
      +        if (!log.contains("module-info.java:1:12: compiler.err.expected: '{'"))
      +            throw new Exception("expected output not found");
      +    }
      +
      +    @Test
      +    public void testClassInModule(Path base) throws Exception {
      +        Path src = base.resolve("src");
      +        tb.writeJavaFiles(src, "module M { class B { } }",
      +                "package p1; public class A { }");
      +        String log = new JavacTask(tb)
      +                .options("-XDrawDiagnostics")
      +                .files(findJavaFiles(src))
      +                .run(Task.Expect.FAIL)
      +                .writeAll()
      +                .getOutput(Task.OutputKind.DIRECT);
      +
      +        if (!log.contains("module-info.java:1:11: compiler.err.expected: '}'"))
      +            throw new Exception("expected output not found");
      +    }
      +}
      \ No newline at end of file
      
      From 7d211599486034f475e8172c80a641c42833407c Mon Sep 17 00:00:00 2001
      From: Athijegannathan Sundararajan 
      Date: Tue, 14 Feb 2017 21:56:09 +0530
      Subject: [PATCH 179/447] 8174718: "Module 's descriptor returns
       inconsistent package set" confusing
      
      Reviewed-by: alanb, jlaskey, mchung
      ---
       .../internal/ResourcePoolConfiguration.java   |  4 ++-
       jdk/test/tools/jlink/JLinkNegativeTest.java   | 25 +++++++++++++++++++
       2 files changed, 28 insertions(+), 1 deletion(-)
      
      diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ResourcePoolConfiguration.java b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ResourcePoolConfiguration.java
      index 37d96c64413..737b234f6c8 100644
      --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ResourcePoolConfiguration.java
      +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ResourcePoolConfiguration.java
      @@ -97,7 +97,9 @@ final class ResourcePoolConfiguration {
                   ModuleDescriptor desc = m.descriptor();
                   if (!desc.packages().equals(m.packages())) {
                       throw new RuntimeException("Module " + m.name() +
      -                   "'s descriptor returns inconsistent package set");
      +                   "'s descriptor indicates the set of packages is : " +
      +                   desc.packages() + ", but module contains packages: " +
      +                   m.packages());
                   }
               });
           }
      diff --git a/jdk/test/tools/jlink/JLinkNegativeTest.java b/jdk/test/tools/jlink/JLinkNegativeTest.java
      index 93d1b4c849b..ab1c568c06b 100644
      --- a/jdk/test/tools/jlink/JLinkNegativeTest.java
      +++ b/jdk/test/tools/jlink/JLinkNegativeTest.java
      @@ -25,6 +25,7 @@
        * @test
        * @summary Negative tests for jlink
        * @bug 8130861
      + * @bug 8174718
        * @author Andrei Eremeev
        * @library ../lib
        * @modules java.base/jdk.internal.jimage
      @@ -50,6 +51,7 @@ import java.nio.file.attribute.BasicFileAttributes;
       import java.util.Arrays;
       import java.util.Collections;
       import java.util.List;
      +import java.util.Set;
       
       import jdk.internal.module.ModuleInfoWriter;
       import org.testng.SkipException;
      @@ -346,4 +348,27 @@ public class JLinkNegativeTest {
                   deleteDirectory(jar2);
               }
           }
      +
      +    public void testInconsistentModuleInfo() throws IOException {
      +        String moduleName = "inconsistentJar";
      +        List classNames = Arrays.asList("xorg.acme.internal.B");
      +        Path module = helper.generateModuleCompiledClasses(
      +                helper.getJarSrcDir(), helper.getJarClassesDir(), moduleName, classNames);
      +
      +        try (OutputStream out = Files.newOutputStream(module.resolve("module-info.class"))) {
      +            ModuleInfoWriter.write(ModuleDescriptor.newModule(moduleName)
      +                    .requires("java.base")
      +                    .packages(Set.of("org.acme.internal"))
      +                    .build(), out);
      +        }
      +
      +        Path jar = JImageGenerator.createJarFile(helper.getJarDir().resolve(moduleName + ".jar"), module);
      +        try {
      +            helper.generateDefaultImage(moduleName)
      +                  .assertFailure("Module inconsistentJar's descriptor indicates the set of packages is : " +
      +                  "[org.acme.internal], but module contains packages: [xorg.acme.internal]");
      +        } finally {
      +            deleteDirectory(jar);
      +        }
      +    }
       }
      
      From bf633a61978119019d19fe64c921907c9ce45f97 Mon Sep 17 00:00:00 2001
      From: Joe Darcy 
      Date: Tue, 14 Feb 2017 09:00:43 -0800
      Subject: [PATCH 180/447] 8174945: Turn on doclint reference checking in build
       of java.compiler module
      
      Reviewed-by: erikj
      ---
       make/CompileJavaModules.gmk | 2 +-
       1 file changed, 1 insertion(+), 1 deletion(-)
      
      diff --git a/make/CompileJavaModules.gmk b/make/CompileJavaModules.gmk
      index 0b54c856da4..147ba8cfab4 100644
      --- a/make/CompileJavaModules.gmk
      +++ b/make/CompileJavaModules.gmk
      @@ -85,7 +85,7 @@ endif
       
       ################################################################################
       
      -java.compiler_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*'
      +java.compiler_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
       
       ################################################################################
       
      
      From 51d9966f2da92f7aa1b5c4f5819017d0e1101d74 Mon Sep 17 00:00:00 2001
      From: Joe Wang 
      Date: Tue, 14 Feb 2017 10:28:12 -0800
      Subject: [PATCH 181/447] 8169450: StAX parse error if there is a newline in
       xml declaration
      
      Reviewed-by: clanger, dfuchs, lancea
      ---
       .../internal/impl/XMLDocumentScannerImpl.java |   4 +-
       .../unittest/parsers/BaseParsingTest.java     | 158 ++++++++++++++++++
       2 files changed, 160 insertions(+), 2 deletions(-)
       create mode 100644 jaxp/test/javax/xml/jaxp/unittest/parsers/BaseParsingTest.java
      
      diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java
      index 1226fe319ff..d6d73ca56a5 100644
      --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java
      +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
        */
       
       /*
      @@ -743,7 +743,7 @@ public class XMLDocumentScannerImpl
                   // scan XMLDecl
                   try {
                       if (fEntityScanner.skipString(XMLDECL)) {
      -                    if (fEntityScanner.peekChar() == ' ') {
      +                    if (XMLChar.isSpace(fEntityScanner.peekChar())) {
                               fMarkupDepth++;
                               scanXMLDeclOrTextDecl(false);
                           } else {
      diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/BaseParsingTest.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/BaseParsingTest.java
      new file mode 100644
      index 00000000000..2d15fda1b0e
      --- /dev/null
      +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/BaseParsingTest.java
      @@ -0,0 +1,158 @@
      +/*
      + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * under the terms of the GNU General Public License version 2 only, as
      + * published by the Free Software Foundation.
      + *
      + * This code is distributed in the hope that it will be useful, but WITHOUT
      + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
      + * version 2 for more details (a copy is included in the LICENSE file that
      + * accompanied this code).
      + *
      + * You should have received a copy of the GNU General Public License version
      + * 2 along with this work; if not, write to the Free Software Foundation,
      + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
      + *
      + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +package parsers;
      +
      +import java.io.StringReader;
      +import javax.xml.parsers.DocumentBuilder;
      +import javax.xml.parsers.DocumentBuilderFactory;
      +import javax.xml.stream.XMLInputFactory;
      +import javax.xml.stream.XMLStreamReader;
      +import org.testng.annotations.DataProvider;
      +import org.testng.annotations.Listeners;
      +import org.testng.annotations.Test;
      +import org.xml.sax.InputSource;
      +
      +/**
      + * @test
      + * @bug 8169450
      + * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest
      + * @run testng/othervm -DrunSecMngr=true parsers.BaseParsingTest
      + * @run testng/othervm parsers.BaseParsingTest
      + * @summary Tests that verify base parsing
      + */
      +@Listeners({jaxp.library.BasePolicy.class})
      +public class BaseParsingTest {
      +
      +    @DataProvider(name = "xmlDeclarations")
      +    public static Object[][] xmlDeclarations() {
      +        return new Object[][]{
      +            {"t"},
      +            {"t"},
      +            {"t"},
      +            {"\n"
      +                + "\n"
      +                + " t\n"
      +                + ""},
      +            {"\n"
      +                + "\n"
      +                + " t\n"
      +                + ""},
      +            {"\n"
      +                + "\n"
      +                + " t\n"
      +                + ""},
      +            {"\n"
      +                + "\n"
      +                + " t\n"
      +                + ""},
      +            {"t"},
      +            {"t"},
      +            {"t"},
      +            {"\n"
      +                + "\n"
      +                + " t\n"
      +                + ""},
      +            {"\n"
      +                + "\n"
      +                + " t\n"
      +                + ""},
      +            {"\n"
      +                + "\n"
      +                + " t\n"
      +                + ""},
      +            {"\n"
      +                + "\n"
      +                + " t\n"
      +                + ""}
      +        };
      +    }
      +
      +    /**
      +     * @bug 8169450
      +     * Verifies that the parser successfully parses the declarations provided in
      +     * xmlDeclarations. Exception would otherwise be thrown as reported in 8169450.
      +     *
      +     * XML Declaration according to https://www.w3.org/TR/REC-xml/#NT-XMLDecl
      +     * [23] XMLDecl     ::= ''
      +     * [24] VersionInfo ::= S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"')
      +     * [25] Eq          ::= S? '=' S? [26] VersionNum ::= '1.' [0-9]+
      +     *
      +     * @param xml the test xml
      +     * @throws Exception if the parser fails to parse the xml
      +     */
      +    @Test(dataProvider = "xmlDeclarations")
      +    public void test(String xml) throws Exception {
      +        XMLInputFactory xif = XMLInputFactory.newDefaultFactory();
      +        XMLStreamReader xsr = xif.createXMLStreamReader(new StringReader(xml));
      +        while (xsr.hasNext()) {
      +            xsr.next();
      +        }
      +    }
      +
      +    /**
      +     * @bug 8169450
      +     * This particular issue does not appear in DOM parsing since the spaces are
      +     * normalized during version detection. This test case then serves as a guard
      +     * against such an issue from occuring in the version detection.
      +     *
      +     * @param xml the test xml
      +     * @throws Exception if the parser fails to parse the xml
      +     */
      +    @Test(dataProvider = "xmlDeclarations")
      +    public void testWithDOM(String xml) throws Exception {
      +        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
      +        dbf.setValidating(true);
      +        DocumentBuilder db = dbf.newDocumentBuilder();
      +        db.parse(new InputSource(new StringReader(xml)));
      +    }
      +}
      
      From ad7f87f083c56e70fe049677d642d2595f49e0a5 Mon Sep 17 00:00:00 2001
      From: Xueming Shen 
      Date: Tue, 14 Feb 2017 11:50:33 -0800
      Subject: [PATCH 182/447] 8174248: partialUpdateFooMainClass test in
       tools/jar/modularJar/Basic.java needs to be re-examined
      
      Reviewed-by: chegar, lancea
      ---
       jdk/test/tools/jar/modularJar/Basic.java | 6 +++---
       1 file changed, 3 insertions(+), 3 deletions(-)
      
      diff --git a/jdk/test/tools/jar/modularJar/Basic.java b/jdk/test/tools/jar/modularJar/Basic.java
      index c45188cad9b..4bb368d918c 100644
      --- a/jdk/test/tools/jar/modularJar/Basic.java
      +++ b/jdk/test/tools/jar/modularJar/Basic.java
      @@ -46,7 +46,7 @@ import static java.lang.System.out;
       
       /*
        * @test
      - * @bug 8167328 8171830 8165640
      + * @bug 8167328 8171830 8165640 8174248
        * @library /lib/testlibrary
        * @modules jdk.compiler
        *          jdk.jartool
      @@ -323,7 +323,7 @@ public class Basic {
                   .resultChecker(r -> assertModuleData(r, FOO));
           }
       
      -    @Test(enabled = false)
      +    @Test
           public void partialUpdateFooMainClass() throws IOException {
               Path mp = Paths.get("partialUpdateFooMainClass");
               createTestDir(mp);
      @@ -333,7 +333,7 @@ public class Basic {
               // A "bad" main class in first create ( and no version )
               jar("--create",
                   "--file=" + modularJar.toString(),
      -            "--main-class=" + "IAmNotTheEntryPoint",
      +            "--main-class=" + "jdk.test.foo.IAmNotTheEntryPoint",
                   "--no-manifest",
                   "-C", modClasses.toString(), ".")  // includes module-info.class
                  .assertSuccess();
      
      From 96846a4105db513a9b705816300fa945c8d3598d Mon Sep 17 00:00:00 2001
      From: Roman Kennke 
      Date: Tue, 14 Feb 2017 12:31:11 -0800
      Subject: [PATCH 183/447] 8172434: CompareAndExchangeObject inserts two
       pre-barriers
      
      Reviewed-by: kvn
      ---
       hotspot/src/share/vm/opto/library_call.cpp | 2 +-
       1 file changed, 1 insertion(+), 1 deletion(-)
      
      diff --git a/hotspot/src/share/vm/opto/library_call.cpp b/hotspot/src/share/vm/opto/library_call.cpp
      index 5d837d6ecb0..508eadeb167 100644
      --- a/hotspot/src/share/vm/opto/library_call.cpp
      +++ b/hotspot/src/share/vm/opto/library_call.cpp
      @@ -3017,7 +3017,7 @@ bool LibraryCallKit::inline_unsafe_load_store(const BasicType type, const LoadSt
             load_store = _gvn.transform(new DecodeNNode(load_store, load_store->get_ptr_type()));
           }
       #endif
      -    if (can_move_pre_barrier()) {
      +    if (can_move_pre_barrier() && kind == LS_get_set) {
             // Don't need to load pre_val. The old value is returned by load_store.
             // The pre_barrier can execute after the xchg as long as no safepoint
             // gets inserted between them.
      
      From eb8d5435c2a6a92969bf4a09bf4d43393f987137 Mon Sep 17 00:00:00 2001
      From: Doug Simon 
      Date: Tue, 14 Feb 2017 12:04:28 -0800
      Subject: [PATCH 184/447] 8174961: [JVMCI] incorrect implementation of
       isCompilable
      
      Reviewed-by: kvn
      ---
       hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp  |  4 +---
       .../jvmci/compilerToVM/IsCompilableTest.java      | 15 ++++++---------
       2 files changed, 7 insertions(+), 12 deletions(-)
      
      diff --git a/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp b/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp
      index 3734ae14c83..66b7936d3c8 100644
      --- a/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp
      +++ b/hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp
      @@ -735,9 +735,7 @@ C2V_END
       
       C2V_VMENTRY(jboolean, isCompilable,(JNIEnv *, jobject, jobject jvmci_method))
         methodHandle method = CompilerToVM::asMethod(jvmci_method);
      -  // Ignore the not_compilable flags in hosted mode since they are never set by
      -  // the JVMCI compiler.
      -  return UseJVMCICompiler || !method->is_not_compilable(CompLevel_full_optimization);
      +  return !method->is_not_compilable(CompLevel_full_optimization);
       C2V_END
       
       C2V_VMENTRY(jboolean, hasNeverInlineDirective,(JNIEnv *, jobject, jobject jvmci_method))
      diff --git a/hotspot/test/compiler/jvmci/compilerToVM/IsCompilableTest.java b/hotspot/test/compiler/jvmci/compilerToVM/IsCompilableTest.java
      index 02436906636..5d187489864 100644
      --- a/hotspot/test/compiler/jvmci/compilerToVM/IsCompilableTest.java
      +++ b/hotspot/test/compiler/jvmci/compilerToVM/IsCompilableTest.java
      @@ -42,7 +42,7 @@
        *                   compiler.jvmci.compilerToVM.IsCompilableTest
        * @run main/othervm -Xbootclasspath/a:.
        *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
      - *                   -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
      + *                   -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:-UseJVMCICompiler
        *                   compiler.jvmci.compilerToVM.IsCompilableTest
        */
       
      @@ -69,20 +69,17 @@ public class IsCompilableTest {
           }
       
           private static void runSanityTest(Executable aMethod) {
      -        boolean UseJVMCICompiler = (Boolean) WB.getVMFlag("UseJVMCICompiler");
               HotSpotResolvedJavaMethod method = CTVMUtilities
                       .getResolvedMethod(aMethod);
               boolean isCompilable = CompilerToVMHelper.isCompilable(method);
      -        boolean expected = UseJVMCICompiler || WB.isMethodCompilable(aMethod);
      +        boolean expected = WB.isMethodCompilable(aMethod);
               Asserts.assertEQ(isCompilable, expected, "Unexpected initial " +
                       "value of property 'compilable'");
       
      -        if (!UseJVMCICompiler) {
      -            WB.makeMethodNotCompilable(aMethod);
      -            isCompilable = CompilerToVMHelper.isCompilable(method);
      -            Asserts.assertFalse(isCompilable, aMethod + "Unexpected value of " +
      -                "property 'isCompilable' after setting 'compilable' to false");
      -        }
      +        WB.makeMethodNotCompilable(aMethod);
      +        isCompilable = CompilerToVMHelper.isCompilable(method);
      +        Asserts.assertFalse(isCompilable, aMethod + "Unexpected value of " +
      +            "property 'isCompilable' after setting 'compilable' to false");
           }
       
           private static List createTestCases() {
      
      From 52bf1f47f23e967b1cca8bb9439dc9d2ee42dcbc Mon Sep 17 00:00:00 2001
      From: Joe Darcy 
      Date: Tue, 14 Feb 2017 13:08:33 -0800
      Subject: [PATCH 185/447] 8174960: Mark WakeupAfterClose.java as failing
       intermittentl
      
      Reviewed-by: rriggs, bpb
      ---
       jdk/test/java/nio/channels/Selector/WakeupAfterClose.java | 3 ++-
       1 file changed, 2 insertions(+), 1 deletion(-)
      
      diff --git a/jdk/test/java/nio/channels/Selector/WakeupAfterClose.java b/jdk/test/java/nio/channels/Selector/WakeupAfterClose.java
      index f193634b3fc..273893ed215 100644
      --- a/jdk/test/java/nio/channels/Selector/WakeupAfterClose.java
      +++ b/jdk/test/java/nio/channels/Selector/WakeupAfterClose.java
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
        * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
        *
        * This code is free software; you can redistribute it and/or modify it
      @@ -24,6 +24,7 @@
       /* @test
        * @bug 6524172
        * @summary Invoking wakeup on closed Selector can throw NPE if close resets interrupt status
      + * @key intermittent
        */
       
       import java.nio.channels.Selector;
      
      From d12dcc701f6e51f8fa65cd36fb16a3faa7d73fe8 Mon Sep 17 00:00:00 2001
      From: Dmitry Batrak 
      Date: Wed, 15 Feb 2017 00:16:49 +0300
      Subject: [PATCH 186/447] 8170552: [macosx] Wrong rendering of diacritics on
       macOS
      
      Reviewed-by: prr, vadim
      ---
       .../classes/sun/font/CCharToGlyphMapper.java  | 32 +--------
       .../TextLayout/DiacriticsDrawingTest.java     | 67 +++++++++++++++++++
       2 files changed, 69 insertions(+), 30 deletions(-)
       create mode 100644 jdk/test/java/awt/font/TextLayout/DiacriticsDrawingTest.java
      
      diff --git a/jdk/src/java.desktop/macosx/classes/sun/font/CCharToGlyphMapper.java b/jdk/src/java.desktop/macosx/classes/sun/font/CCharToGlyphMapper.java
      index d2f9a548763..5a2cf766cf6 100644
      --- a/jdk/src/java.desktop/macosx/classes/sun/font/CCharToGlyphMapper.java
      +++ b/jdk/src/java.desktop/macosx/classes/sun/font/CCharToGlyphMapper.java
      @@ -75,37 +75,9 @@ public class CCharToGlyphMapper extends CharToGlyphMapper {
                       }
                   }
       
      -            if (code < 0x0590) {
      +            if (code < FontUtilities.MIN_LAYOUT_CHARCODE) {
                       continue;
      -            } else if (code <= 0x05ff) {
      -                // Hebrew 0x0590->0x05ff
      -                return true;
      -            } else if (code >= 0x0600 && code <= 0x06ff) {
      -                // Arabic
      -                return true;
      -            } else if (code >= 0x0900 && code <= 0x0d7f) {
      -                // if Indic, assume shaping for conjuncts, reordering:
      -                // 0900 - 097F Devanagari
      -                // 0980 - 09FF Bengali
      -                // 0A00 - 0A7F Gurmukhi
      -                // 0A80 - 0AFF Gujarati
      -                // 0B00 - 0B7F Oriya
      -                // 0B80 - 0BFF Tamil
      -                // 0C00 - 0C7F Telugu
      -                // 0C80 - 0CFF Kannada
      -                // 0D00 - 0D7F Malayalam
      -                return true;
      -            } else if (code >= 0x0e00 && code <= 0x0e7f) {
      -                // if Thai, assume shaping for vowel, tone marks
      -                return true;
      -            } else if (code >= 0x200c && code <= 0x200d) {
      -                // zwj or zwnj
      -                return true;
      -            } else if (code >= 0x202a && code <= 0x202e) {
      -                // directional control
      -                return true;
      -            } else if (code >= 0x206a && code <= 0x206f) {
      -                // directional control
      +            } else if (FontUtilities.isComplexCharCode(code)) {
                       return true;
                   } else if (code >= 0x10000) {
                       i += 1; // Empty glyph slot after surrogate
      diff --git a/jdk/test/java/awt/font/TextLayout/DiacriticsDrawingTest.java b/jdk/test/java/awt/font/TextLayout/DiacriticsDrawingTest.java
      new file mode 100644
      index 00000000000..4920b8166df
      --- /dev/null
      +++ b/jdk/test/java/awt/font/TextLayout/DiacriticsDrawingTest.java
      @@ -0,0 +1,67 @@
      +/*
      + * Copyright 2017 JetBrains s.r.o.
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + *
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +/* @test
      + * @bug 8170552
      + * @summary verify enabling text layout for complex text on macOS
      + * @requires os.family == "mac"
      + */
      +
      +import java.awt.Color;
      +import java.awt.Font;
      +import java.awt.Graphics;
      +import java.awt.image.BufferedImage;
      +
      +public class DiacriticsDrawingTest {
      +    private static final Font FONT = new Font("Menlo", Font.PLAIN, 12);
      +    private static final int IMAGE_WIDTH = 20;
      +    private static final int IMAGE_HEIGHT = 20;
      +    private static final int TEXT_X = 5;
      +    private static final int TEXT_Y = 15;
      +
      +    public static void main(String[] args) {
      +        BufferedImage composed = drawString("\u00e1"); // latin small letter a with acute
      +        BufferedImage decomposed = drawString("a\u0301"); // same letter in decomposed form
      +
      +        if (!imagesAreEqual(composed, decomposed)) {
      +            throw new RuntimeException("Text rendering is supposed to be the same");
      +        }
      +    }
      +
      +    private static BufferedImage drawString(String text) {
      +        BufferedImage image = new BufferedImage(IMAGE_WIDTH, IMAGE_HEIGHT, BufferedImage.TYPE_INT_RGB);
      +        Graphics g = image.createGraphics();
      +        g.setColor(Color.white);
      +        g.fillRect(0, 0, IMAGE_WIDTH, IMAGE_HEIGHT);
      +        g.setColor(Color.black);
      +        g.setFont(FONT);
      +        g.drawString(text, TEXT_X, TEXT_Y);
      +        g.dispose();
      +        return image;
      +    }
      +
      +    private static boolean imagesAreEqual(BufferedImage i1, BufferedImage i2) {
      +        if (i1.getWidth() != i2.getWidth() || i1.getHeight() != i2.getHeight()) return false;
      +        for (int i = 0; i < i1.getWidth(); i++) {
      +            for (int j = 0; j < i1.getHeight(); j++) {
      +                if (i1.getRGB(i, j) != i2.getRGB(i, j)) {
      +                    return false;
      +                }
      +            }
      +        }
      +        return true;
      +    }
      +}
      
      From eda2d66e13b7f4a80ee61d98e31f2d115986e306 Mon Sep 17 00:00:00 2001
      From: Naoto Sato 
      Date: Tue, 14 Feb 2017 13:20:48 -0800
      Subject: [PATCH 187/447] 8174779: Locale issues with Mac 10.12
      
      Reviewed-by: bchristi
      ---
       .../macosx/native/libjava/java_props_macosx.c | 20 +++++++++++++------
       1 file changed, 14 insertions(+), 6 deletions(-)
      
      diff --git a/jdk/src/java.base/macosx/native/libjava/java_props_macosx.c b/jdk/src/java.base/macosx/native/libjava/java_props_macosx.c
      index b43f290b0a2..8246b8130a5 100644
      --- a/jdk/src/java.base/macosx/native/libjava/java_props_macosx.c
      +++ b/jdk/src/java.base/macosx/native/libjava/java_props_macosx.c
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
        * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
        *
        * This code is free software; you can redistribute it and/or modify it
      @@ -80,23 +80,31 @@ char *getMacOSXLocale(int cat) {
                   // "en-GB"      (language with alpha-2 region designator)
                   // "es-419"     (language with 3-digit UN M.49 area code)
                   // "zh-Hans"    (language with ISO 15924 script designator)
      +            // "zh-Hans-US"  (language with ISO 15924 script designator and region)
      +            // "zh-Hans-419" (language with ISO 15924 script designator and UN M.49)
                   //
      -            // In the case of region designators (alpha-2 or UN M.49), we convert
      +            // In the case of region designators (alpha-2 and/or UN M.49), we convert
                   // to our locale string format by changing '-' to '_'.  That is, if
                   // the '-' is followed by fewer than 4 chars.
                   char* scriptOrRegion = strchr(languageString, '-');
      -            if (scriptOrRegion != NULL && strlen(scriptOrRegion) < 5) {
      -                *scriptOrRegion = '_';
      +            if (scriptOrRegion != NULL) {
      +                int length = strlen(scriptOrRegion);
      +                if (length > 5) {
      +                    // Region and script both exist. Honor the script for now
      +                    scriptOrRegion[5] = '\0';
      +                } else if (length < 5) {
      +                    *scriptOrRegion = '_';
       
      -                assert((strlen(scriptOrRegion) == 3 &&
      +                    assert((length == 3 &&
                               // '-' followed by a 2 character region designator
                                 isalpha(scriptOrRegion[1]) &&
                                 isalpha(scriptOrRegion[2])) ||
      -                       (strlen(scriptOrRegion) == 4 &&
      +                           (length == 4 &&
                               // '-' followed by a 3-digit UN M.49 area code
                                 isdigit(scriptOrRegion[1]) &&
                                 isdigit(scriptOrRegion[2]) &&
                                 isdigit(scriptOrRegion[3])));
      +                }
                   }
                   const char* retVal = languageString;
       
      
      From 50a683ef67df27c8f051c16e0f4063fc1df54ad3 Mon Sep 17 00:00:00 2001
      From: Paul Sandoz 
      Date: Tue, 14 Feb 2017 14:29:58 -0800
      Subject: [PATCH 188/447] 8174151: URLClassLoader no longer uses custom
       URLStreamHandler for jar URLs
      
      Reviewed-by: alanb, chegar
      ---
       .../java.base/share/classes/java/net/URL.java | 15 +++-
       .../jdk/internal/loader/URLClassPath.java     | 73 +++++++++++--------
       .../jdk/internal/misc/JavaNetURLAccess.java   | 32 ++++++++
       .../jdk/internal/misc/SharedSecrets.java      | 13 +++-
       .../JarHandlerPkgPrefix.java                  | 65 +++++++++++++++++
       .../handlers/jar/Handler.java                 | 42 +++++++++++
       6 files changed, 209 insertions(+), 31 deletions(-)
       create mode 100644 jdk/src/java.base/share/classes/jdk/internal/misc/JavaNetURLAccess.java
       create mode 100644 jdk/test/java/net/URL/JarHandlerPkgPrefix/JarHandlerPkgPrefix.java
       create mode 100644 jdk/test/java/net/URL/JarHandlerPkgPrefix/handlers/jar/Handler.java
      
      diff --git a/jdk/src/java.base/share/classes/java/net/URL.java b/jdk/src/java.base/share/classes/java/net/URL.java
      index b029b83d7ca..1ac1437ab96 100644
      --- a/jdk/src/java.base/share/classes/java/net/URL.java
      +++ b/jdk/src/java.base/share/classes/java/net/URL.java
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
        * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
        *
        * This code is free software; you can redistribute it and/or modify it
      @@ -41,6 +41,8 @@ import java.util.NoSuchElementException;
       import java.util.ServiceConfigurationError;
       import java.util.ServiceLoader;
       
      +import jdk.internal.misc.JavaNetURLAccess;
      +import jdk.internal.misc.SharedSecrets;
       import sun.security.util.SecurityConstants;
       import sun.security.action.GetPropertyAction;
       
      @@ -1614,6 +1616,17 @@ public final class URL implements java.io.Serializable {
           private void setSerializedHashCode(int hc) {
               this.hashCode = hc;
           }
      +
      +    static {
      +        SharedSecrets.setJavaNetURLAccess(
      +                new JavaNetURLAccess() {
      +                    @Override
      +                    public URLStreamHandler getHandler(URL u) {
      +                        return u.handler;
      +                    }
      +                }
      +        );
      +    }
       }
       
       final class UrlDeserializedState {
      diff --git a/jdk/src/java.base/share/classes/jdk/internal/loader/URLClassPath.java b/jdk/src/java.base/share/classes/jdk/internal/loader/URLClassPath.java
      index d67c342fb0a..d343f8fdcbe 100644
      --- a/jdk/src/java.base/share/classes/jdk/internal/loader/URLClassPath.java
      +++ b/jdk/src/java.base/share/classes/jdk/internal/loader/URLClassPath.java
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
        * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
        *
        * This code is free software; you can redistribute it and/or modify it
      @@ -65,6 +65,8 @@ import java.util.jar.Attributes;
       import java.util.jar.Attributes.Name;
       import java.util.zip.ZipFile;
       
      +import jdk.internal.misc.JavaNetURLAccess;
      +import jdk.internal.misc.JavaNetURLClassLoaderAccess;
       import jdk.internal.misc.JavaUtilZipFileAccess;
       import jdk.internal.misc.SharedSecrets;
       import jdk.internal.util.jar.InvalidJarIndexError;
      @@ -346,7 +348,7 @@ public class URLClassPath {
            * path. The URLs are opened and expanded as needed. Returns null
            * if the specified index is out of range.
            */
      -     private synchronized Loader getLoader(int index) {
      +    private synchronized Loader getLoader(int index) {
               if (closed) {
                   return null;
               }
      @@ -404,31 +406,40 @@ public class URLClassPath {
           private Loader getLoader(final URL url) throws IOException {
               try {
                   return java.security.AccessController.doPrivileged(
      -                new java.security.PrivilegedExceptionAction<>() {
      -                public Loader run() throws IOException {
      -                    String protocol = url.getProtocol();  // lower cased in URL
      -                    String file = url.getFile();
      -                    if ("jar".equals(protocol)
      -                            && file != null && (file.indexOf("!/") == file.length() - 2)) {
      -                        // extract the nested URL
      -                        URL nestedUrl = new URL(file.substring(0, file.length() - 2));
      -                        return new JarLoader(nestedUrl, jarHandler, lmap, acc);
      -                    } else if (file != null && file.endsWith("/")) {
      -                        if ("file".equals(protocol)) {
      -                            return new FileLoader(url);
      -                        } else {
      -                            return new Loader(url);
      +                    new java.security.PrivilegedExceptionAction<>() {
      +                        public Loader run() throws IOException {
      +                            String protocol = url.getProtocol();  // lower cased in URL
      +                            String file = url.getFile();
      +                            if (file != null && file.endsWith("/")) {
      +                                if ("file".equals(protocol)) {
      +                                    return new FileLoader(url);
      +                                } else if ("jar".equals(protocol) &&
      +                                        isDefaultJarHandler(url) &&
      +                                        file.endsWith("!/")) {
      +                                    // extract the nested URL
      +                                    URL nestedUrl = new URL(file.substring(0, file.length() - 2));
      +                                    return new JarLoader(nestedUrl, jarHandler, lmap, acc);
      +                                } else {
      +                                    return new Loader(url);
      +                                }
      +                            } else {
      +                                return new JarLoader(url, jarHandler, lmap, acc);
      +                            }
                               }
      -                    } else {
      -                        return new JarLoader(url, jarHandler, lmap, acc);
      -                    }
      -                }
      -            }, acc);
      +                    }, acc);
               } catch (java.security.PrivilegedActionException pae) {
                   throw (IOException)pae.getException();
               }
           }
       
      +    private static final JavaNetURLAccess JNUA
      +            = SharedSecrets.getJavaNetURLAccess();
      +
      +    private static boolean isDefaultJarHandler(URL u) {
      +        URLStreamHandler h = JNUA.getHandler(u);
      +        return h instanceof sun.net.www.protocol.jar.Handler;
      +    }
      +
           /*
            * Pushes the specified URLs onto the list of unopened URLs.
            */
      @@ -493,7 +504,7 @@ public class URLClassPath {
           }
       
           /**
      -     * Inner class used to represent a loader of resources and classes
      +     * Nested class used to represent a loader of resources and classes
            * from a base URL.
            */
           private static class Loader implements Closeable {
      @@ -600,7 +611,8 @@ public class URLClassPath {
                * close this loader and release all resources
                * method overridden in sub-classes
                */
      -        public void close () throws IOException {
      +        @Override
      +        public void close() throws IOException {
                   if (jarfile != null) {
                       jarfile.close();
                   }
      @@ -615,7 +627,7 @@ public class URLClassPath {
           }
       
           /*
      -     * Inner class used to represent a Loader of resources from a JAR URL.
      +     * Nested class class used to represent a Loader of resources from a JAR URL.
            */
           static class JarLoader extends Loader {
               private JarFile jar;
      @@ -798,7 +810,7 @@ public class URLClassPath {
       
       
               /*
      -         * Returns true iff atleast one resource in the jar file has the same
      +         * Returns true iff at least one resource in the jar file has the same
                * package name as that of the specified resource name.
                */
               boolean validIndex(final String name) {
      @@ -826,6 +838,7 @@ public class URLClassPath {
               /*
                * Returns the URL for a resource with the specified name
                */
      +        @Override
               URL findResource(final String name, boolean check) {
                   Resource rsc = getResource(name, check);
                   if (rsc != null) {
      @@ -837,6 +850,7 @@ public class URLClassPath {
               /*
                * Returns the JAR Resource for the specified name.
                */
      +        @Override
               Resource getResource(final String name, boolean check) {
                   try {
                       ensureOpen();
      @@ -863,7 +877,6 @@ public class URLClassPath {
                */
               Resource getResource(final String name, boolean check,
                                    Set visited) {
      -
                   Resource res;
                   String[] jarFiles;
                   int count = 0;
      @@ -919,7 +932,6 @@ public class URLClassPath {
                               continue;
                           }
       
      -
                           /* Note that the addition of the url to the list of visited
                            * jars incorporates a check for presence in the hashmap
                            */
      @@ -975,6 +987,7 @@ public class URLClassPath {
               /*
                * Returns the JAR file local class path, or null if none.
                */
      +        @Override
               URL[] getClassPath() throws IOException {
                   if (index != null) {
                       return null;
      @@ -1002,7 +1015,7 @@ public class URLClassPath {
                * Parses value of the Class-Path manifest attribute and returns
                * an array of URLs relative to the specified base URL.
                */
      -        private URL[] parseClassPath(URL base, String value)
      +        private static URL[] parseClassPath(URL base, String value)
                   throws MalformedURLException
               {
                   StringTokenizer st = new StringTokenizer(value);
      @@ -1018,7 +1031,7 @@ public class URLClassPath {
           }
       
           /*
      -     * Inner class used to represent a loader of classes and resources
      +     * Nested class used to represent a loader of classes and resources
            * from a file URL that refers to a directory.
            */
           private static class FileLoader extends Loader {
      @@ -1038,6 +1051,7 @@ public class URLClassPath {
               /*
                * Returns the URL for a resource with the specified name
                */
      +        @Override
               URL findResource(final String name, boolean check) {
                   Resource rsc = getResource(name, check);
                   if (rsc != null) {
      @@ -1046,6 +1060,7 @@ public class URLClassPath {
                   return null;
               }
       
      +        @Override
               Resource getResource(final String name, boolean check) {
                   final URL url;
                   try {
      diff --git a/jdk/src/java.base/share/classes/jdk/internal/misc/JavaNetURLAccess.java b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaNetURLAccess.java
      new file mode 100644
      index 00000000000..37e8fd3216c
      --- /dev/null
      +++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaNetURLAccess.java
      @@ -0,0 +1,32 @@
      +/*
      + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * under the terms of the GNU General Public License version 2 only, as
      + * published by the Free Software Foundation.  Oracle designates this
      + * particular file as subject to the "Classpath" exception as provided
      + * by Oracle in the LICENSE file that accompanied this code.
      + *
      + * This code is distributed in the hope that it will be useful, but WITHOUT
      + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
      + * version 2 for more details (a copy is included in the LICENSE file that
      + * accompanied this code).
      + *
      + * You should have received a copy of the GNU General Public License version
      + * 2 along with this work; if not, write to the Free Software Foundation,
      + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
      + *
      + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +package jdk.internal.misc;
      +
      +import java.net.URL;
      +import java.net.URLStreamHandler;
      +
      +public interface JavaNetURLAccess {
      +    URLStreamHandler getHandler(URL u);
      +}
      diff --git a/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java b/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java
      index 36514cb1065..321a4ca1fb2 100644
      --- a/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java
      +++ b/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
        * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
        *
        * This code is free software; you can redistribute it and/or modify it
      @@ -58,6 +58,7 @@ public class SharedSecrets {
           private static JavaNetHttpCookieAccess javaNetHttpCookieAccess;
           private static JavaNetSocketAccess javaNetSocketAccess;
           private static JavaNetUriAccess javaNetUriAccess;
      +    private static JavaNetURLAccess javaNetURLAccess;
           private static JavaNetURLClassLoaderAccess javaNetURLClassLoaderAccess;
           private static JavaNioAccess javaNioAccess;
           private static JavaIOFileDescriptorAccess javaIOFileDescriptorAccess;
      @@ -146,6 +147,16 @@ public class SharedSecrets {
               return javaNetUriAccess;
           }
       
      +    public static void setJavaNetURLAccess(JavaNetURLAccess jnua) {
      +        javaNetURLAccess = jnua;
      +    }
      +
      +    public static JavaNetURLAccess getJavaNetURLAccess() {
      +        if (javaNetURLAccess == null)
      +            unsafe.ensureClassInitialized(java.net.URL.class);
      +        return javaNetURLAccess;
      +    }
      +
           public static void setJavaNetURLClassLoaderAccess(JavaNetURLClassLoaderAccess jnua) {
               javaNetURLClassLoaderAccess = jnua;
           }
      diff --git a/jdk/test/java/net/URL/JarHandlerPkgPrefix/JarHandlerPkgPrefix.java b/jdk/test/java/net/URL/JarHandlerPkgPrefix/JarHandlerPkgPrefix.java
      new file mode 100644
      index 00000000000..0ad66fa2303
      --- /dev/null
      +++ b/jdk/test/java/net/URL/JarHandlerPkgPrefix/JarHandlerPkgPrefix.java
      @@ -0,0 +1,65 @@
      +/*
      + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * under the terms of the GNU General Public License version 2 only, as
      + * published by the Free Software Foundation.
      + *
      + * This code is distributed in the hope that it will be useful, but WITHOUT
      + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
      + * version 2 for more details (a copy is included in the LICENSE file that
      + * accompanied this code).
      + *
      + * You should have received a copy of the GNU General Public License version
      + * 2 along with this work; if not, write to the Free Software Foundation,
      + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
      + *
      + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +
      +import handlers.jar.Handler;
      +
      +import java.net.URL;
      +import java.net.URLClassLoader;
      +import java.nio.file.Files;
      +import java.nio.file.Path;
      +import java.nio.file.Paths;
      +
      +/*
      + * @test
      + * @bug 8174151
      + * @summary Test for java.protocol.handler.pkgs with jar protocol handler
      + * @library /lib/testlibrary/java/util/jar
      + * @compile handlers/jar/Handler.java
      + * @run main/othervm -Djava.protocol.handler.pkgs=handlers JarHandlerPkgPrefix
      + */
      +public class JarHandlerPkgPrefix {
      +
      +    static void createJar(Path p) throws Exception {
      +        JarBuilder jb = new JarBuilder(p.toString());
      +        jb.addEntry("resource.txt", "CONTENTS".getBytes());
      +        jb.build();
      +    }
      +
      +    public static void main(String[] args) throws Exception {
      +        Path jarPath = Paths.get(System.getProperty("user.dir", "."), "test.jar");
      +        try {
      +            createJar(jarPath);
      +
      +            URL j = new URL("jar:file:" + jarPath.toString() + "!/");
      +            URLClassLoader ucl = new URLClassLoader(new URL[]{j});
      +            ucl.findResource("resource.txt");
      +
      +            URL r = new URL("jar:file:" + jarPath.toString() + "!/resource.txt");
      +            if (!Handler.URLS.contains(r))
      +                throw new AssertionError("jar: URL handler not invoked");
      +        }
      +        finally {
      +            Files.delete(jarPath);
      +        }
      +    }
      +}
      \ No newline at end of file
      diff --git a/jdk/test/java/net/URL/JarHandlerPkgPrefix/handlers/jar/Handler.java b/jdk/test/java/net/URL/JarHandlerPkgPrefix/handlers/jar/Handler.java
      new file mode 100644
      index 00000000000..b0309a99aab
      --- /dev/null
      +++ b/jdk/test/java/net/URL/JarHandlerPkgPrefix/handlers/jar/Handler.java
      @@ -0,0 +1,42 @@
      +/*
      + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * under the terms of the GNU General Public License version 2 only, as
      + * published by the Free Software Foundation.
      + *
      + * This code is distributed in the hope that it will be useful, but WITHOUT
      + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
      + * version 2 for more details (a copy is included in the LICENSE file that
      + * accompanied this code).
      + *
      + * You should have received a copy of the GNU General Public License version
      + * 2 along with this work; if not, write to the Free Software Foundation,
      + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
      + *
      + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +
      +package handlers.jar;
      +
      +import java.io.IOException;
      +import java.net.URL;
      +import java.net.URLConnection;
      +import java.net.URLStreamHandler;
      +import java.util.Collections;
      +import java.util.HashSet;
      +import java.util.Set;
      +
      +public class Handler extends URLStreamHandler {
      +    public static Set URLS = Collections.synchronizedSet(new HashSet<>());
      +
      +    @Override
      +    protected URLConnection openConnection(URL u) throws IOException {
      +        URLS.add(u);
      +        return null;
      +    }
      +}
      
      From 48b32880609b1e7aa5a96397cefed4cda67a687a Mon Sep 17 00:00:00 2001
      From: Vicente Romero 
      Date: Tue, 14 Feb 2017 15:45:17 -0800
      Subject: [PATCH 189/447] 8174243: incorrect error message for nested service
       provider
      
      Reviewed-by: jjg, jlahoda
      ---
       .../com/sun/tools/javac/comp/AttrContext.java |   7 +-
       .../com/sun/tools/javac/comp/Modules.java     |  12 +-
       .../com/sun/tools/javac/comp/Resolve.java     |  10 +
       .../tools/javac/resources/compiler.properties |   4 +
       .../ServiceImplNotPublic.java                 |  24 +++
       .../example/ServiceImpl.java                  |  28 +++
       .../example/SomeService.java                  |  27 +++
       .../ServiceImplNotPublic/module-info.java     |  27 +++
       .../tools/javac/modules/ProvidesTest.java     |   2 +-
       ...orMessageForNestedServiceProviderTest.java | 181 ++++++++++++++++++
       10 files changed, 319 insertions(+), 3 deletions(-)
       create mode 100644 langtools/test/tools/javac/diags/examples/ServiceImplNotPublic/ServiceImplNotPublic.java
       create mode 100644 langtools/test/tools/javac/diags/examples/ServiceImplNotPublic/example/ServiceImpl.java
       create mode 100644 langtools/test/tools/javac/diags/examples/ServiceImplNotPublic/example/SomeService.java
       create mode 100644 langtools/test/tools/javac/diags/examples/ServiceImplNotPublic/module-info.java
       create mode 100644 langtools/test/tools/javac/modules/WrongErrorMessageForNestedServiceProviderTest.java
      
      diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrContext.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrContext.java
      index 573e8948136..b186da0aaea 100644
      --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrContext.java
      +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrContext.java
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
        * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
        *
        * This code is free software; you can redistribute it and/or modify it
      @@ -79,6 +79,10 @@ public class AttrContext {
            */
           boolean isNewClass = false;
       
      +    /** Indicate if the type being visited is a service implementation
      +     */
      +    boolean visitingServiceImplementation = false;
      +
           /** Are arguments to current function applications boxed into an array for varargs?
            */
           Resolve.MethodResolutionPhase pendingResolutionPhase = null;
      @@ -127,6 +131,7 @@ public class AttrContext {
               info.isAnonymousDiamond = isAnonymousDiamond;
               info.isNewClass = isNewClass;
               info.preferredTreeForDiagnostics = preferredTreeForDiagnostics;
      +        info.visitingServiceImplementation = visitingServiceImplementation;
               return info;
           }
       
      diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java
      index 185187461b2..192b85b2b70 100644
      --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java
      +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java
      @@ -996,8 +996,18 @@ public class Modules extends JCTree.Visitor {
                   }
                   ListBuffer impls = new ListBuffer<>();
                   for (JCExpression implName : tree.implNames) {
      -                Type it = attr.attribType(implName, env, syms.objectType);
      +                Type it;
      +                boolean prevVisitingServiceImplementation = env.info.visitingServiceImplementation;
      +                try {
      +                    env.info.visitingServiceImplementation = true;
      +                    it = attr.attribType(implName, env, syms.objectType);
      +                } finally {
      +                    env.info.visitingServiceImplementation = prevVisitingServiceImplementation;
      +                }
                       ClassSymbol impl = (ClassSymbol) it.tsym;
      +                if ((impl.flags_field & PUBLIC) == 0) {
      +                    log.error(implName.pos(), Errors.NotDefPublic(impl, impl.location()));
      +                }
                       //find provider factory:
                       MethodSymbol factory = factoryMethod(impl);
                       if (factory != null) {
      diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java
      index 3b1743d2ff4..a567936f382 100644
      --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java
      +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java
      @@ -307,6 +307,11 @@ public class Resolve {
               if (env.enclMethod != null && (env.enclMethod.mods.flags & ANONCONSTR) != 0)
                   return true;
       
      +        if (env.info.visitingServiceImplementation &&
      +            env.toplevel.modle == c.packge().modle) {
      +            return true;
      +        }
      +
               boolean isAccessible = false;
               switch ((short)(c.flags() & AccessFlags)) {
                   case PRIVATE:
      @@ -389,6 +394,11 @@ public class Resolve {
               if (env.enclMethod != null && (env.enclMethod.mods.flags & ANONCONSTR) != 0)
                   return true;
       
      +        if (env.info.visitingServiceImplementation &&
      +            env.toplevel.modle == sym.packge().modle) {
      +            return true;
      +        }
      +
               switch ((short)(sym.flags() & AccessFlags)) {
               case PRIVATE:
                   return
      diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties
      index 934f7066a4e..c8d8f054966 100644
      --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties
      +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties
      @@ -914,6 +914,10 @@ compiler.misc.cant.access.inner.cls.constr=\
       compiler.err.not.def.public.cant.access=\
           {0} is not public in {1}; cannot be accessed from outside package
       
      +# 0: symbol, 1: symbol
      +compiler.err.not.def.public=\
      +    {0} is not public in {1}
      +
       # 0: symbol, 1: symbol
       compiler.misc.not.def.public.cant.access=\
           {0} is not public in {1}; cannot be accessed from outside package
      diff --git a/langtools/test/tools/javac/diags/examples/ServiceImplNotPublic/ServiceImplNotPublic.java b/langtools/test/tools/javac/diags/examples/ServiceImplNotPublic/ServiceImplNotPublic.java
      new file mode 100644
      index 00000000000..e7bdcd80fc6
      --- /dev/null
      +++ b/langtools/test/tools/javac/diags/examples/ServiceImplNotPublic/ServiceImplNotPublic.java
      @@ -0,0 +1,24 @@
      +/*
      + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * under the terms of the GNU General Public License version 2 only, as
      + * published by the Free Software Foundation.
      + *
      + * This code is distributed in the hope that it will be useful, but WITHOUT
      + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
      + * version 2 for more details (a copy is included in the LICENSE file that
      + * accompanied this code).
      + *
      + * You should have received a copy of the GNU General Public License version
      + * 2 along with this work; if not, write to the Free Software Foundation,
      + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
      + *
      + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +
      +// key: compiler.err.not.def.public
      diff --git a/langtools/test/tools/javac/diags/examples/ServiceImplNotPublic/example/ServiceImpl.java b/langtools/test/tools/javac/diags/examples/ServiceImplNotPublic/example/ServiceImpl.java
      new file mode 100644
      index 00000000000..cb1b3b1b184
      --- /dev/null
      +++ b/langtools/test/tools/javac/diags/examples/ServiceImplNotPublic/example/ServiceImpl.java
      @@ -0,0 +1,28 @@
      +/*
      + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * under the terms of the GNU General Public License version 2 only, as
      + * published by the Free Software Foundation.
      + *
      + * This code is distributed in the hope that it will be useful, but WITHOUT
      + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
      + * version 2 for more details (a copy is included in the LICENSE file that
      + * accompanied this code).
      + *
      + * You should have received a copy of the GNU General Public License version
      + * 2 along with this work; if not, write to the Free Software Foundation,
      + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
      + *
      + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +
      +package example;
      +class ServiceImpl implements example.SomeService {
      +    public ServiceImpl() {}
      +    public void foo() {}
      +}
      diff --git a/langtools/test/tools/javac/diags/examples/ServiceImplNotPublic/example/SomeService.java b/langtools/test/tools/javac/diags/examples/ServiceImplNotPublic/example/SomeService.java
      new file mode 100644
      index 00000000000..f39627f3874
      --- /dev/null
      +++ b/langtools/test/tools/javac/diags/examples/ServiceImplNotPublic/example/SomeService.java
      @@ -0,0 +1,27 @@
      +/*
      + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * under the terms of the GNU General Public License version 2 only, as
      + * published by the Free Software Foundation.
      + *
      + * This code is distributed in the hope that it will be useful, but WITHOUT
      + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
      + * version 2 for more details (a copy is included in the LICENSE file that
      + * accompanied this code).
      + *
      + * You should have received a copy of the GNU General Public License version
      + * 2 along with this work; if not, write to the Free Software Foundation,
      + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
      + *
      + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +
      +package example;
      +public interface SomeService {
      +    public void foo();
      +}
      diff --git a/langtools/test/tools/javac/diags/examples/ServiceImplNotPublic/module-info.java b/langtools/test/tools/javac/diags/examples/ServiceImplNotPublic/module-info.java
      new file mode 100644
      index 00000000000..ec6405d3a12
      --- /dev/null
      +++ b/langtools/test/tools/javac/diags/examples/ServiceImplNotPublic/module-info.java
      @@ -0,0 +1,27 @@
      +/*
      + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * under the terms of the GNU General Public License version 2 only, as
      + * published by the Free Software Foundation.
      + *
      + * This code is distributed in the hope that it will be useful, but WITHOUT
      + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
      + * version 2 for more details (a copy is included in the LICENSE file that
      + * accompanied this code).
      + *
      + * You should have received a copy of the GNU General Public License version
      + * 2 along with this work; if not, write to the Free Software Foundation,
      + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
      + *
      + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +
      +module m {
      +    exports example;
      +    provides example.SomeService with example.ServiceImpl;
      +}
      diff --git a/langtools/test/tools/javac/modules/ProvidesTest.java b/langtools/test/tools/javac/modules/ProvidesTest.java
      index 0e92bb96934..07017981ff5 100644
      --- a/langtools/test/tools/javac/modules/ProvidesTest.java
      +++ b/langtools/test/tools/javac/modules/ProvidesTest.java
      @@ -377,7 +377,7 @@ public class ProvidesTest extends ModuleTestBase {
                       .writeAll()
                       .getOutputLines(Task.OutputKind.DIRECT);
       
      -        List expected = Arrays.asList("module-info.java:1:34: compiler.err.not.def.public.cant.access: p2.C2, p2",
      +        List expected = Arrays.asList("module-info.java:1:34: compiler.err.not.def.public: p2.C2, p2",
                       "1 error");
               if (!output.containsAll(expected)) {
                   throw new Exception("Expected output not found");
      diff --git a/langtools/test/tools/javac/modules/WrongErrorMessageForNestedServiceProviderTest.java b/langtools/test/tools/javac/modules/WrongErrorMessageForNestedServiceProviderTest.java
      new file mode 100644
      index 00000000000..096405bb878
      --- /dev/null
      +++ b/langtools/test/tools/javac/modules/WrongErrorMessageForNestedServiceProviderTest.java
      @@ -0,0 +1,181 @@
      +/*
      + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * under the terms of the GNU General Public License version 2 only, as
      + * published by the Free Software Foundation.
      + *
      + * This code is distributed in the hope that it will be useful, but WITHOUT
      + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
      + * version 2 for more details (a copy is included in the LICENSE file that
      + * accompanied this code).
      + *
      + * You should have received a copy of the GNU General Public License version
      + * 2 along with this work; if not, write to the Free Software Foundation,
      + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
      + *
      + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +
      +/**
      + * @test
      + * @bug 8174243
      + * @summary incorrect error message for nested service provider
      + * @library /tools/lib
      + * @modules
      + *      jdk.compiler/com.sun.tools.javac.api
      + *      jdk.compiler/com.sun.tools.javac.main
      + * @build toolbox.ToolBox toolbox.JavacTask ModuleTestBase
      + * @run main WrongErrorMessageForNestedServiceProviderTest
      + */
      +
      +import java.nio.file.Files;
      +import java.nio.file.Path;
      +import java.util.Arrays;
      +import java.util.List;
      +
      +import toolbox.JavacTask;
      +import toolbox.Task;
      +import toolbox.ToolBox;
      +
      +public class WrongErrorMessageForNestedServiceProviderTest extends ModuleTestBase {
      +    public static void main(String... args) throws Exception {
      +        WrongErrorMessageForNestedServiceProviderTest t = new WrongErrorMessageForNestedServiceProviderTest();
      +        t.runTests();
      +    }
      +
      +    private static final String twoServicesModuleDef =
      +            "module m {\n" +
      +            "    exports example;\n" +
      +            "    provides example.SomeService with example.ServiceImpl;\n" +
      +            "    provides example.SomeServiceOuter with example.Outer.ServiceImplOuter;\n" +
      +            "}";
      +
      +    private static final String someServiceInt =
      +            "package example;\n" +
      +            "public interface SomeService {\n" +
      +            "    public void foo();\n" +
      +            "}";
      +
      +    private static final String someServiceIntOuter =
      +            "package example;\n" +
      +            "public interface SomeServiceOuter {\n" +
      +            "    public void foo();\n" +
      +            "}";
      +
      +    @Test
      +    public void testPositive(Path base) throws Exception {
      +        Path src = base.resolve("src");
      +        tb.writeJavaFiles(src,
      +                twoServicesModuleDef,
      +                someServiceInt,
      +                someServiceIntOuter,
      +                "package example;\n" +
      +                "public class ServiceImpl implements example.SomeService {\n" +
      +                "    public ServiceImpl() {}\n" +
      +                "    public void foo() {}\n" +
      +                "}",
      +
      +                "package example;\n" +
      +                "class Outer {\n" +
      +                "    public static class ServiceImplOuter implements example.SomeServiceOuter {\n" +
      +                "        public ServiceImplOuter() {}\n" +
      +                "        public void foo() {}\n" +
      +                "    }\n" +
      +                "}");
      +        Path classes = base.resolve("classes");
      +        Files.createDirectories(classes);
      +
      +        List output = new JavacTask(tb)
      +                .outdir(classes)
      +                .options("-Werror", "-XDrawDiagnostics")
      +                .files(findJavaFiles(src))
      +                .run(Task.Expect.SUCCESS)
      +                .writeAll()
      +                .getOutputLines(Task.OutputKind.DIRECT);
      +        List expected = Arrays.asList("");
      +        if (!output.containsAll(expected)) {
      +            throw new Exception("Expected output not found");
      +        }
      +    }
      +
      +    @Test
      +    public void testNegative(Path base) throws Exception {
      +        Path src = base.resolve("src");
      +        tb.writeJavaFiles(src,
      +                twoServicesModuleDef,
      +                someServiceInt,
      +                someServiceIntOuter,
      +
      +                "package example;\n" +
      +                "class ServiceImpl implements example.SomeService {\n" +
      +                "    public ServiceImpl() {}\n" +
      +                "    public void foo() {}\n" +
      +                "}",
      +
      +                "package example;\n" +
      +                "class Outer {\n" +
      +                "    static class ServiceImplOuter implements example.SomeServiceOuter {\n" +
      +                "        public ServiceImplOuter() {}\n" +
      +                "        public void foo() {}\n" +
      +                "    }\n" +
      +                "}");
      +        Path classes = base.resolve("classes");
      +        Files.createDirectories(classes);
      +
      +        List output = new JavacTask(tb)
      +                .outdir(classes)
      +                .options("-Werror", "-XDrawDiagnostics")
      +                .files(findJavaFiles(src))
      +                .run(Task.Expect.FAIL)
      +                .writeAll()
      +                .getOutputLines(Task.OutputKind.DIRECT);
      +        List expected = Arrays.asList(
      +                "module-info.java:3:46: compiler.err.not.def.public: example.ServiceImpl, example",
      +                "module-info.java:4:57: compiler.err.not.def.public: example.Outer.ServiceImplOuter, example.Outer",
      +                "2 errors");
      +        if (!output.containsAll(expected)) {
      +            throw new Exception("Expected output not found");
      +        }
      +    }
      +
      +    @Test
      +    public void testClassWrappedByPrivateClass(Path base) throws Exception {
      +        Path src = base.resolve("src");
      +        tb.writeJavaFiles(src,
      +                "module m {\n" +
      +                "    exports example;\n" +
      +                "    provides example.SomeServiceOuter with example.Outer1.Outer2.ServiceImplOuter;\n" +
      +                "}",
      +
      +                someServiceIntOuter,
      +
      +                "package example;\n" +
      +                "class Outer1 {\n" +
      +                "    static private class Outer2 {\n" +
      +                "        public static class ServiceImplOuter implements example.SomeServiceOuter {\n" +
      +                "            public ServiceImplOuter() {}\n" +
      +                "            public void foo() {}\n" +
      +                "        }\n" +
      +                "    }\n" +
      +                "}");
      +        Path classes = base.resolve("classes");
      +        Files.createDirectories(classes);
      +
      +        List output = new JavacTask(tb)
      +                .outdir(classes)
      +                .options("-Werror", "-XDrawDiagnostics")
      +                .files(findJavaFiles(src))
      +                .run(Task.Expect.SUCCESS)
      +                .writeAll()
      +                .getOutputLines(Task.OutputKind.DIRECT);
      +        List expected = Arrays.asList("");
      +        if (!output.containsAll(expected)) {
      +            throw new Exception("Expected output not found");
      +        }
      +    }
      +}
      
      From cb48e2096db1e53101db8705bd9266efdc8128c7 Mon Sep 17 00:00:00 2001
      From: Weijun Wang 
      Date: Wed, 15 Feb 2017 09:08:25 +0800
      Subject: [PATCH 190/447] 8174909: Doc error in SecureRandom
      
      Reviewed-by: mullan
      ---
       .../java.base/share/classes/java/security/DrbgParameters.java | 4 ++--
       .../java.base/share/classes/java/security/SecureRandom.java   | 4 ++--
       2 files changed, 4 insertions(+), 4 deletions(-)
      
      diff --git a/jdk/src/java.base/share/classes/java/security/DrbgParameters.java b/jdk/src/java.base/share/classes/java/security/DrbgParameters.java
      index c71e1cffa28..b17cf07ace8 100644
      --- a/jdk/src/java.base/share/classes/java/security/DrbgParameters.java
      +++ b/jdk/src/java.base/share/classes/java/security/DrbgParameters.java
      @@ -53,8 +53,8 @@ import java.util.Objects;
        * for CTR_DRBG. Please note that it is not the algorithm used in
        * {@link SecureRandom#getInstance}, which we will call a
        * SecureRandom algorithm below),
      - * 
    16. optionally features, including prediction resistance - * and reseeding supports. + *
    17. optional features, including prediction resistance + * and reseeding supports, *
    18. highest security strength. * *

      diff --git a/jdk/src/java.base/share/classes/java/security/SecureRandom.java b/jdk/src/java.base/share/classes/java/security/SecureRandom.java index ac4ee6e7c7a..9154060bfcd 100644 --- a/jdk/src/java.base/share/classes/java/security/SecureRandom.java +++ b/jdk/src/java.base/share/classes/java/security/SecureRandom.java @@ -64,8 +64,8 @@ import sun.security.util.Debug; *

        * SecureRandom r1 = new SecureRandom();
        * SecureRandom r2 = SecureRandom.getInstance("NativePRNG");
      - * SecureRandom r3 = SecureRandom("DRBG",
      - *         DrbgParameters.Instantiation(128, RESEED_ONLY, null));
      + * SecureRandom r3 = SecureRandom.getInstance("DRBG", + * DrbgParameters.instantiation(128, RESEED_ONLY, null)); *
      * *

      The third statement above returns a {@code SecureRandom} object of the From 00af9d20135ce4100d447c9d2ddf5941b6d02a7d Mon Sep 17 00:00:00 2001 From: Frank Yuan Date: Wed, 15 Feb 2017 11:43:23 +0800 Subject: [PATCH 191/447] 8174025: Regression in XML Transform caused by JDK-8087303 Reviewed-by: joehw, dfuchs --- .../xml/internal/serializer/ToStream.java | 137 ++++++++++----- .../serializer/dom3/DOM3TreeWalker.java | 3 +- .../common/prettyprint/PrettyPrintTest.java | 165 ++++++++++++++---- .../common/prettyprint/generate-catalog.xsl | 23 +++ .../unittest/common/prettyprint/htmltest1.xml | 2 +- .../unittest/common/prettyprint/htmltest7.out | 7 + .../unittest/common/prettyprint/htmltest7.xml | 1 + .../unittest/common/prettyprint/nodetest2.out | 19 +- .../common/prettyprint/nodetest2ls.out | 18 ++ ...ple-entity-resolver-config-transformed.xml | 3 + .../simple-entity-resolver-config.xml | 20 +++ .../{xmltest5.out => xmltest5ls.out} | 0 .../common/prettyprint/xmltest5xslt.out | 15 ++ .../{xmltest7.out => xmltest7ls.out} | 0 .../common/prettyprint/xmltest7xslt.out | 17 ++ .../unittest/common/prettyprint/xmltest8.out | 15 +- .../unittest/common/prettyprint/xmltest8.xml | 13 +- .../unittest/dom/ls/LSSerializerTest.java | 8 +- 18 files changed, 357 insertions(+), 109 deletions(-) create mode 100644 jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/generate-catalog.xsl create mode 100644 jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest7.out create mode 100644 jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest7.xml create mode 100644 jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/nodetest2ls.out create mode 100644 jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/simple-entity-resolver-config-transformed.xml create mode 100644 jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/simple-entity-resolver-config.xml rename jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/{xmltest5.out => xmltest5ls.out} (100%) create mode 100644 jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest5xslt.out rename jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/{xmltest7.out => xmltest7ls.out} (100%) create mode 100644 jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest7xslt.out diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java index 352ce1b8cc4..ae14a4922b1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java @@ -1385,7 +1385,7 @@ abstract public class ToStream extends SerializerBase { return; final boolean shouldNotFormat = !shouldFormatOutput(); - if (m_elemContext.m_startTagOpen && shouldNotFormat) + if (m_elemContext.m_startTagOpen) { closeStartTag(); m_elemContext.m_startTagOpen = false; @@ -1411,8 +1411,12 @@ abstract public class ToStream extends SerializerBase { if (m_disableOutputEscapingStates.peekOrFalse() || (!m_escaping)) { - charactersRaw(chars, start, length); - m_isprevtext = true; + if (shouldNotFormat) { + charactersRaw(chars, start, length); + m_isprevtext = true; + } else { + m_charactersBuffer.addRawText(chars, start, length); + } // time to fire off characters generation event if (m_tracer != null) super.fireCharEvent(chars, start, length); @@ -1420,7 +1424,7 @@ abstract public class ToStream extends SerializerBase { return; } - if (m_elemContext.m_startTagOpen && shouldNotFormat) + if (m_elemContext.m_startTagOpen) { closeStartTag(); m_elemContext.m_startTagOpen = false; @@ -1447,6 +1451,13 @@ abstract public class ToStream extends SerializerBase { return m_doIndent && !m_ispreserveSpace; } + /** + * @return True if the content in current element should be formatted. + */ + public boolean getIndent() { + return shouldFormatOutput(); + } + /** * Write out the characters. * @@ -1550,12 +1561,7 @@ abstract public class ToStream extends SerializerBase { */ final protected void flushCharactersBuffer() throws SAXException { try { - if (shouldFormatOutput() && m_charactersBuffer.hasContent()) { - if (m_elemContext.m_startTagOpen) { - closeStartTag(); - m_elemContext.m_startTagOpen = false; - } - + if (shouldFormatOutput() && m_charactersBuffer.isAnyCharactersBuffered()) { if (m_elemContext.m_isCdataSection) { /* * due to cdata-section-elements atribute, we need this as @@ -1567,11 +1573,16 @@ abstract public class ToStream extends SerializerBase { } m_childNodeNum++; + boolean skipBeginningNewlines = false; if (shouldIndentForText()) { indent(); m_startNewLine = true; + // newline has always been added here because if this is the + // text before the first element, shouldIndent() won't + // return true. + skipBeginningNewlines = true; } - m_charactersBuffer.flush(); + m_charactersBuffer.flush(skipBeginningNewlines); } } catch (IOException e) { throw new SAXException(e); @@ -2915,7 +2926,7 @@ abstract public class ToStream extends SerializerBase { String value, boolean xslAttribute) { - if (m_charactersBuffer.isNoCharactersBuffered()) { + if (!m_charactersBuffer.isAnyCharactersBuffered()) { return doAddAttributeAlways(uri, localName, rawName, type, value, xslAttribute); } else { /* @@ -3396,15 +3407,16 @@ abstract public class ToStream extends SerializerBase { */ private abstract class GenericCharacters { /** - * @return True if having any character other than whitespace or - * line feed. + * @return True if all characters in this Text are newlines. */ - abstract boolean hasContent(); - - abstract void flush() throws SAXException; + abstract boolean flush(boolean skipBeginningNewlines) throws SAXException; /** - * Converts this GenericCharacters to a new character array. + * Converts this GenericCharacters to a new character array. This + * method is used to handle cdata-section-elements attribute in + * xsl:output. Therefore it doesn't need to consider + * skipBeginningNewlines because the text will be involved with CDATA + * tag. */ abstract char[] toChars(); } @@ -3422,27 +3434,21 @@ abstract public class ToStream extends SerializerBase { text = Arrays.copyOfRange(chars, start, start + length); } - boolean hasContent() { - for (int i = 0; i < text.length; i++) { - if (!isWhiteSpace(text[i])) { + boolean flush(boolean skipBeginningNewlines) throws SAXException { + int start = 0; + while (skipBeginningNewlines && text[start] == '\n') { + start++; + if (start == text.length) { return true; } } + outputCharacters(text, start, text.length - start); return false; } - void flush() throws SAXException { - outputCharacters(text, 0, text.length); - } - char[] toChars() { return text; } - - boolean isWhiteSpace(char ch) { - return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r'; - } - }); } @@ -3451,12 +3457,22 @@ abstract public class ToStream extends SerializerBase { */ public void addEntityReference(String entityName) { bufferedCharacters.add(new GenericCharacters() { - boolean hasContent() { - return true; - } - - void flush() throws SAXException { - outputEntityReference(entityName); + boolean flush(boolean skipBeginningNewlines) throws SAXException { + if (m_elemContext.m_startTagOpen) + { + closeStartTag(); + m_elemContext.m_startTagOpen = false; + } + if (m_cdataTagOpen) + closeCDATA(); + char[] cs = toChars(); + try { + m_writer.write(cs, 0, cs.length); + m_isprevtext = true; + } catch (IOException e) { + throw new SAXException(e); + } + return false; } char[] toChars() { @@ -3466,31 +3482,56 @@ abstract public class ToStream extends SerializerBase { } /** - * @return True if no GenericCharacters are buffered. + * Append a raw text to the buffer. Used to handle raw characters event. */ - public boolean isNoCharactersBuffered() { - return bufferedCharacters.isEmpty(); + public void addRawText(final char chars[], final int start, final int length) { + bufferedCharacters.add(new GenericCharacters() { + char[] text; + + { + text = Arrays.copyOfRange(chars, start, start + length); + } + + boolean flush(boolean skipBeginningNewlines) throws SAXException { + try { + int start = 0; + while (skipBeginningNewlines && text[start] == '\n') { + start++; + if (start == text.length) { + return true; + } + } + m_writer.write(text, start, text.length - start); + m_isprevtext = true; + } catch (IOException e) { + throw new SAXException(e); + } + return false; + } + + char[] toChars() { + return text; + } + }); } /** - * @return True if any buffered GenericCharacters has content. + * @return True if any GenericCharacters are buffered. */ - public boolean hasContent() { - for (GenericCharacters element : bufferedCharacters) { - if (element.hasContent()) - return true; - } - return false; + public boolean isAnyCharactersBuffered() { + return bufferedCharacters.size() > 0; } /** * Flush all buffered GenericCharacters. */ - public void flush() throws SAXException { + public void flush(boolean skipBeginningNewlines) throws SAXException { Iterator itr = bufferedCharacters.iterator(); + + boolean continueSkipBeginningNewlines = skipBeginningNewlines; while (itr.hasNext()) { GenericCharacters element = itr.next(); - element.flush(); + continueSkipBeginningNewlines = element.flush(continueSkipBeginningNewlines); itr.remove(); } } diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3TreeWalker.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3TreeWalker.java index 68864ca7800..1fafb24c641 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3TreeWalker.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3TreeWalker.java @@ -1024,7 +1024,8 @@ final class DOM3TreeWalker { return; } - if (bDispatch) { + if (bDispatch + && (!fSerializer.getIndent() || !node.getData().replace('\n', ' ').trim().isEmpty())) { dispatachChars(node); } } diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/PrettyPrintTest.java b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/PrettyPrintTest.java index be54c6c2e05..da4ff787589 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/PrettyPrintTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/PrettyPrintTest.java @@ -60,7 +60,7 @@ import org.xml.sax.SAXException; /* * @test - * @bug 6439439 8087303 + * @bug 6439439 8087303 8174025 * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest * @run testng/othervm -DrunSecMngr=true common.prettyprint.PrettyPrintTest * @run testng/othervm common.prettyprint.PrettyPrintTest @@ -69,29 +69,30 @@ import org.xml.sax.SAXException; @Listeners({jaxp.library.FilePolicy.class}) public class PrettyPrintTest { /* - * test CDATA, elements only, text and element, whitespace and element, - * xml:space property and nested xml:space property, mixed node types. + * test CDATA, elements only, text and element, xml:space property, mixed + * node types. */ @DataProvider(name = "xml-data") public Object[][] xmlData() throws Exception { return new Object[][] { - { read("xmltest1.xml"), read("xmltest1.out") }, - { read("xmltest2.xml"), read("xmltest2.out") }, - { read("xmltest3.xml"), read("xmltest3.out") }, - { read("xmltest4.xml"), read("xmltest4.out") }, - { read("xmltest5.xml"), read("xmltest5.out") }, - { read("xmltest6.xml"), read("xmltest6.out") }, - { read("xmltest7.xml"), read("xmltest7.out") }, - { read("xmltest8.xml"), read("xmltest8.out") } }; + { "xmltest1.xml", "xmltest1.out" }, + { "xmltest2.xml", "xmltest2.out" }, + { "xmltest3.xml", "xmltest3.out" }, + { "xmltest4.xml", "xmltest4.out" }, + { "xmltest6.xml", "xmltest6.out" }, + { "xmltest8.xml", "xmltest8.out" } }; } /* * @bug 8087303 - * Test the whitespace text nodes are serialized with pretty-print by LSSerializer and transformer correctly + * Test the xml document are serialized with pretty-print by + * LSSerializer and transformer correctly * */ @Test(dataProvider = "xml-data") - public void testXMLPrettyPrint(String source, String expected) throws Exception { + public void testXMLPrettyPrint(String sourceFile, String expectedFile) throws Exception { + String source = read(sourceFile); + String expected = read(expectedFile); // test it's no change if no pretty-print String result = serializerWrite(toXmlDocument(source), false); assertTrue(toXmlDocument(source).isEqualNode(toXmlDocument(result)), "The actual is: " + result); @@ -104,40 +105,116 @@ public class PrettyPrintTest { assertEquals(transform(toXmlDocument(source), true).replaceAll("\r\n", "\n"), expected); } + /* - * test pure text content, and sequent Text nodes. + * @bug 8087303 + * Test a single text node is serialized with pretty-print by + * LSSerializer and transformer correctly + * */ - @DataProvider(name = "xml-node-data") - public Object[][] xmlNodeData() throws Exception { - return new Object[][] { - { newTextNode(read("nodetest1.txt")), read("nodetest1.out") }, - { createDocWithSequentTextNodes(), read("nodetest2.out") } }; + @Test + public void testSingleTextNode() throws Exception { + Node xml = newTextNode(read("nodetest1.txt")); + String expected = read("nodetest1.out"); + assertEquals(serializerWrite(xml, true), expected); + assertEquals(transform(xml, true).replaceAll("\r\n", "\n"), expected); } /* * @bug 8087303 - * Test the whitespace text nodes are serialized with pretty-print by LSSerializer and transformer correctly, - * doesn't compare with the source because the test data is Node object + * Test the transformer shall keep all whitespace text node in + * sequent text nodes * */ - @Test(dataProvider = "xml-node-data") - public void testXMLNodePrettyPrint(Node xml, String expected) throws Exception { - assertEquals(serializerWrite(xml, true), expected); + @Test + public void testSequentTextNodesWithTransformer() throws Exception { + Node xml = createDocWithSequentTextNodes(); + String expected = read("nodetest2.out"); assertEquals(transform(xml, true).replaceAll("\r\n", "\n"), expected); } + /* + * @bug 8087303 + * Test LSSerializer shall eliminate the whitespace text node + * in sequent text nodes + * + */ + @Test + public void testSequentTextNodesWithLSSerializer() throws Exception { + Node xml = createDocWithSequentTextNodes(); + String expected = read("nodetest2ls.out"); + assertEquals(serializerWrite(xml, true), expected); + } + + + /* + * test whitespace and element, nested xml:space property. + */ + @DataProvider(name = "xml-data-whitespace-ls") + public Object[][] whitespaceLS() throws Exception { + return new Object[][] { + { "xmltest5.xml", "xmltest5ls.out" }, + { "xmltest7.xml", "xmltest7ls.out" } }; + } + + /* + * @bug 8087303 + * Test LSSerializer shall eliminate the whitespace text node + * unless xml:space="preserve" + * + */ + @Test(dataProvider = "xml-data-whitespace-ls") + public void testWhitespaceWithLSSerializer(String sourceFile, String expectedFile) throws Exception { + String source = read(sourceFile); + String expected = read(expectedFile); + // test it's no change if no pretty-print + String result = serializerWrite(toXmlDocument(source), false); + assertTrue(toXmlDocument(source).isEqualNode(toXmlDocument(result)), "The actual is: " + result); + // test pretty-print + assertEquals(serializerWrite(toXmlDocument(source), true), expected); + } + + /* + * test whitespace and element, nested xml:space property. + */ + @DataProvider(name = "xml-data-whitespace-xslt") + public Object[][] whitespaceXSLT() throws Exception { + return new Object[][] { + { "xmltest5.xml", "xmltest5xslt.out" }, + { "xmltest7.xml", "xmltest7xslt.out" } }; + } + + /* + * @bug 8087303 + * Test the transformer shall format the output but keep all + * whitespace text node even if xml:space="preserve" + * + */ + @Test(dataProvider = "xml-data-whitespace-xslt") + public void testWhitespaceWithTransformer(String sourceFile, String expectedFile) throws Exception { + String source = read(sourceFile); + String expected = read(expectedFile); + // test it's no change if no pretty-print + String result = transform(toXmlDocument(source), false); + assertTrue(toXmlDocument(source).isEqualNode(toXmlDocument(result)), "The actual is: " + result); + // test pretty-print + assertEquals(transform(toXmlDocument(source), true).replaceAll("\r\n", "\n"), expected); + } + /* * test block element, inline element, text, and mixed elements. */ @DataProvider(name = "html-data") public Object[][] htmlData() throws Exception { return new Object[][] { - { read("htmltest1.xml"), read("htmltest1.out") }, - { read("htmltest2.xml"), read("htmltest2.out") }, - { read("htmltest3.xml"), read("htmltest3.out") }, - { read("htmltest4.xml"), read("htmltest4.out") }, - { read("htmltest5.xml"), read("htmltest5.out") }, - { read("htmltest6.xml"), read("htmltest6.out") } }; + { "htmltest1.xml", "htmltest1.out" }, + { "htmltest2.xml", "htmltest2.out" }, + { "htmltest3.xml", "htmltest3.out" }, + { "htmltest4.xml", "htmltest4.out" }, + { "htmltest5.xml", "htmltest5.out" }, + { "htmltest6.xml", "htmltest6.out" }, + /* @bug 8174025, test whitespace between inline elements */ + { "htmltest7.xml", "htmltest7.out" } }; } /* @@ -146,7 +223,9 @@ public class PrettyPrintTest { * */ @Test(dataProvider = "html-data") - public void testTransformToHTML(String source, String expected) throws Exception { + public void testTransformToHTML(String sourceFile, String expectedFile) throws Exception { + String source = read(sourceFile); + String expected = read(expectedFile); // test it's no change if no pretty-print StringWriter writer = new StringWriter(); getTransformer(true, false).transform(new StreamSource(new StringReader(source)), new StreamResult(writer)); @@ -158,6 +237,27 @@ public class PrettyPrintTest { assertEquals(writer.toString().replaceAll("\r\n", "\n"), expected); } + /* + * @bug 8174025 + * Test the serializer can handle correctly. + * + */ + @Test + public void testDisableOutputEscaping() throws Exception { + final String xsl ="generate-catalog.xsl"; + final String xml ="simple-entity-resolver-config.xml"; + final String expectedOutput ="simple-entity-resolver-config-transformed.xml"; + TransformerFactory factory = TransformerFactory.newInstance(); + Transformer transformer = factory.newTemplates(new StreamSource(new StringReader(read(xsl)))).newTransformer(); + + String key = "schemaBase"; + String value = "schemas"; + transformer.setParameter(key, value); + StringWriter writer = new StringWriter(); + transformer.transform(new StreamSource(new StringReader(read(xml))), new StreamResult(writer)); + assertEquals(writer.toString().replaceAll("\r\n", "\n"), read(expectedOutput)); + } + @Test public void testLSSerializerFormatPrettyPrint() { @@ -298,6 +398,9 @@ public class PrettyPrintTest { Document doc = db.newDocument(); Node root = doc.createElement("root"); doc.appendChild(root); + root.appendChild(doc.createTextNode("\n")); + root.appendChild(doc.createTextNode("\n")); + root.appendChild(doc.createTextNode("\n")); root.appendChild(doc.createTextNode(" ")); root.appendChild(doc.createTextNode("t")); root.appendChild(doc.createTextNode("\n")); diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/generate-catalog.xsl b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/generate-catalog.xsl new file mode 100644 index 00000000000..e1b8e75171a --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/generate-catalog.xsl @@ -0,0 +1,23 @@ + + + + + + + + + + + + + <system systemId=" + + " uri=" + + " /> + + + + \ No newline at end of file diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest1.xml b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest1.xml index 50460626a7b..c0959b46dc8 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest1.xml +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest1.xml @@ -1 +1 @@ -Java Tutorials and Examples 1 en-us \ No newline at end of file +Java Tutorials and Examples 1en-us \ No newline at end of file diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest7.out b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest7.out new file mode 100644 index 00000000000..2ce8445a6dc --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest7.out @@ -0,0 +1,7 @@ + + +

      + this is a whitespace inline element test +

      + + diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest7.xml b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest7.xml new file mode 100644 index 00000000000..f1480607ef8 --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/htmltest7.xml @@ -0,0 +1 @@ +

      this is a whitespace inline element test

      \ No newline at end of file diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/nodetest2.out b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/nodetest2.out index a0d94368a3d..8a7d8fb0d18 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/nodetest2.out +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/nodetest2.out @@ -1,19 +1,30 @@ t t - + + t - - - + + + + + + t + t + t + + + + + diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/nodetest2ls.out b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/nodetest2ls.out new file mode 100644 index 00000000000..92e2d1f41e0 --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/nodetest2ls.out @@ -0,0 +1,18 @@ + + tt + + t + + + + + t + + t + + t + + + + + diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/simple-entity-resolver-config-transformed.xml b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/simple-entity-resolver-config-transformed.xml new file mode 100644 index 00000000000..238b5e2a2ac --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/simple-entity-resolver-config-transformed.xml @@ -0,0 +1,3 @@ + + + diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/simple-entity-resolver-config.xml b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/simple-entity-resolver-config.xml new file mode 100644 index 00000000000..9156728e13d --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/simple-entity-resolver-config.xml @@ -0,0 +1,20 @@ + + + + + Example 1 Schema Type library 10.0 + >-//Oracle//Example 1 Schema Type library 10.0//EN + http://www.example.test/oracle/schema/example1.xsd + META-INF/example1.xsd + + + Example 2 Schema Type library 10.0 + >-//Oracle//Example 2 Schema Type library 10.0//EN + http://www.example.test/oracle/schema/example2.xsd + META-INF/example2.xsd + + \ No newline at end of file diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest5.out b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest5ls.out similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest5.out rename to jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest5ls.out diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest5xslt.out b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest5xslt.out new file mode 100644 index 00000000000..4178e8ea9c2 --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest5xslt.out @@ -0,0 +1,15 @@ + + + + Java Tutorials and Examples 1 + + en-us + + + + + + + + + diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest7.out b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest7ls.out similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest7.out rename to jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest7ls.out diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest7xslt.out b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest7xslt.out new file mode 100644 index 00000000000..06296cddd1d --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest7xslt.out @@ -0,0 +1,17 @@ + + Java + + 5 + + + + + + + + + + + + + diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest8.out b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest8.out index 621263fbe19..b62fff27a78 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest8.out +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest8.out @@ -1,25 +1,20 @@ - - t + t - -t + t - - t + t - - t + t t - - t + t diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest8.xml b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest8.xml index e9c1c477d3a..6b9c54af8ed 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest8.xml +++ b/jaxp/test/javax/xml/jaxp/unittest/common/prettyprint/xmltest8.xml @@ -2,14 +2,7 @@ t t - t - - - t - - t - + t + tt t - - - + diff --git a/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSSerializerTest.java b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSSerializerTest.java index 9068969b318..50c79a962a6 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSSerializerTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSSerializerTest.java @@ -279,11 +279,11 @@ public class LSSerializerTest { "\n" + " &name1;Jo Smith\n" + " b &name2;Jo Smith &name1;Jo Smith b\n" + - " &name;Jo Smith \n" + + " &name;Jo Smith \n" + " &ele1;d\n" + - " &ele2;eee \n" + + " &ele2;eee \n" + " <att>\n" + - " &ele; g\n" + + " &ele; g\n" + " &ele2;\n" + "\n"); @@ -301,7 +301,7 @@ public class LSSerializerTest { "\n" + " &name;Jo Smith\n" + " b &name;Jo Smith &name;Jo Smith b\n" + - " &name;Jo Smith \n" + + " &name;Jo Smith \n" + " \n" + " \n" + " text\n" + From 42e5401d71758d1a8c55d36a4ab90467f18be9ef Mon Sep 17 00:00:00 2001 From: Jini George Date: Wed, 15 Feb 2017 11:55:53 +0530 Subject: [PATCH 192/447] 8173896: SA: BasicLauncherTest.java (printmdo) fails for Client VM and Server VM with emulated-client Avoid running the test for client VMs and emulated client VMs, when method data is not available. Reviewed-by: sspitsyn, dsamersoff --- .../test/serviceability/sa/TestPrintMdo.java | 176 ++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 hotspot/hotspot/test/serviceability/sa/TestPrintMdo.java diff --git a/hotspot/hotspot/test/serviceability/sa/TestPrintMdo.java b/hotspot/hotspot/test/serviceability/sa/TestPrintMdo.java new file mode 100644 index 00000000000..0681aa02514 --- /dev/null +++ b/hotspot/hotspot/test/serviceability/sa/TestPrintMdo.java @@ -0,0 +1,176 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.util.ArrayList; +import java.util.Scanner; +import java.util.List; +import java.io.File; +import java.io.IOException; +import java.util.stream.Collectors; +import java.io.OutputStream; +import jdk.test.lib.apps.LingeredApp; +import jdk.test.lib.JDKToolLauncher; +import jdk.test.lib.Platform; +import jdk.test.lib.process.ProcessTools; +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.Utils; +import jdk.test.lib.Asserts; + +/* + * @test + * @library /test/lib + * @requires vm.flavor == "server" & !vm.emulatedClient + * @build jdk.test.lib.apps.* + * @run main/othervm TestPrintMdo + */ + +public class TestPrintMdo { + + private static final String PRINTMDO_OUT_FILE = "printmdo_out.txt"; + + private static void verifyPrintMdoOutput() throws Exception { + + Exception unexpected = null; + File printMdoFile = new File(PRINTMDO_OUT_FILE); + Asserts.assertTrue(printMdoFile.exists() && printMdoFile.isFile(), + "File with printmdo output not created: " + + printMdoFile.getAbsolutePath()); + try { + Scanner scanner = new Scanner(printMdoFile); + + String unexpectedMsg = + "One or more of 'VirtualCallData', 'CounterData', " + + "'ReceiverTypeData', 'bci', 'MethodData' " + + "or 'java/lang/Object' not found"; + boolean knownClassFound = false; + boolean knownProfileDataTypeFound = false; + boolean knownTokensFound = false; + + while (scanner.hasNextLine()) { + String line = scanner.nextLine(); + line = line.trim(); + System.out.println(line); + + if (line.contains("missing reason for ")) { + unexpected = new RuntimeException("Unexpected msg: missing reason for "); + break; + } + if (line.contains("VirtualCallData") || + line.contains("CounterData") || + line.contains("ReceiverTypeData")) { + knownProfileDataTypeFound = true; + } + if (line.contains("bci") || + line.contains("MethodData")) { + knownTokensFound = true; + } + if (line.contains("java/lang/Object")) { + knownClassFound = true; + } + } + if ((knownClassFound == false) || + (knownTokensFound == false) || + (knownProfileDataTypeFound == false)) { + unexpected = new RuntimeException(unexpectedMsg); + } + if (unexpected != null) { + throw unexpected; + } + } catch (Exception ex) { + throw new RuntimeException("Test ERROR " + ex, ex); + } finally { + printMdoFile.delete(); + } + } + + private static void startClhsdbForPrintMdo(long lingeredAppPid) throws Exception { + + Process p; + JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jhsdb"); + launcher.addToolArg("clhsdb"); + launcher.addToolArg("--pid"); + launcher.addToolArg(Long.toString(lingeredAppPid)); + + ProcessBuilder pb = new ProcessBuilder(); + pb.command(launcher.getCommand()); + System.out.println( + pb.command().stream().collect(Collectors.joining(" "))); + + try { + p = pb.start(); + } catch (Exception attachE) { + throw new Error("Couldn't start jhsdb or attach to LingeredApp : " + attachE); + } + + // Issue the 'printmdo' input at the clhsdb prompt. + OutputStream input = p.getOutputStream(); + String str = "printmdo -a > " + PRINTMDO_OUT_FILE + "\nquit\n"; + try { + input.write(str.getBytes()); + input.flush(); + } catch (IOException ioe) { + throw new Error("Problem issuing the printmdo command: " + str, ioe); + } + + try { + p.waitFor(); + } catch (InterruptedException ie) { + throw new Error("Problem awaiting the child process: " + ie, ie); + } + + int exitValue = p.exitValue(); + if (exitValue != 0) { + String output; + try { + output = new OutputAnalyzer(p).getOutput(); + } catch (IOException ioe) { + throw new Error("Can't get failed clhsdb process output: " + ioe, ioe); + } + throw new AssertionError("clhsdb wasn't run successfully: " + output); + } + } + + public static void main (String... args) throws Exception { + + LingeredApp app = null; + + if (!Platform.shouldSAAttach()) { + System.out.println( + "SA attach not expected to work - test skipped."); + return; + } + + try { + List vmArgs = new ArrayList(); + vmArgs.add("-XX:+ProfileInterpreter"); + vmArgs.addAll(Utils.getVmOptions()); + + app = LingeredApp.startApp(vmArgs); + System.out.println ("Started LingeredApp with pid " + app.getPid()); + startClhsdbForPrintMdo(app.getPid()); + verifyPrintMdoOutput(); + } finally { + LingeredApp.stopApp(app); + } + } +} From c4743a4ccacddc12d7d24d68fb1c0be77f930a5d Mon Sep 17 00:00:00 2001 From: Jini George Date: Wed, 15 Feb 2017 11:58:21 +0530 Subject: [PATCH 193/447] 8173896: SA: BasicLauncherTest.java (printmdo) fails for Client VM and Server VM with emulated-client Avoid running the test for client VMs and emulated client VMs, when method data is not available. Reviewed-by: sspitsyn, dsamersoff --- .../sun/tools/jhsdb/BasicLauncherTest.java | 34 +------------------ 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java b/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java index 9285044b358..6191cae2e2e 100644 --- a/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java +++ b/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -85,7 +85,6 @@ public class BasicLauncherTest { try (OutputStream out = toolProcess.getOutputStream()) { out.write("universe\n".getBytes()); - out.write("printmdo -a\n".getBytes()); out.write("quit\n".getBytes()); } @@ -94,13 +93,6 @@ public class BasicLauncherTest { try (BufferedReader reader = new BufferedReader(new InputStreamReader(toolProcess.getInputStream()))) { String line; - String unexpectedMsg = - "One or more of 'VirtualCallData', 'CounterData', " + - "'ReceiverTypeData', 'bci', 'MethodData' " + - "or 'java/lang/Object' not found"; - boolean knownClassFound = false; - boolean knownProfileDataTypeFound = false; - boolean knownTokensFound = false; while ((line = reader.readLine()) != null) { line = line.trim(); @@ -110,27 +102,6 @@ public class BasicLauncherTest { unexpected = new RuntimeException("CollectedHeap type should be known."); break; } - else if (line.contains("missing reason for ")) { - unexpected = new RuntimeException("missing reason for "); - break; - } - if (line.contains("VirtualCallData") || - line.contains("CounterData") || - line.contains("ReceiverTypeData")) { - knownProfileDataTypeFound = true; - } - if (line.contains("bci") || - line.contains("MethodData")) { - knownTokensFound = true; - } - if (line.contains("java/lang/Object")) { - knownClassFound = true; - } - } - if ((knownClassFound == false) || - (knownTokensFound == false) || - (knownProfileDataTypeFound == false)) { - unexpected = new RuntimeException(unexpectedMsg); } } @@ -144,9 +115,6 @@ public class BasicLauncherTest { throw unexpected; } - if (unexpected != null) { - throw unexpected; - } } catch (Exception ex) { throw new RuntimeException("Test ERROR " + ex, ex); } finally { From 46cd380010e1907bcb39d730a1dc4788e0d35dec Mon Sep 17 00:00:00 2001 From: Volker Simonis Date: Wed, 15 Feb 2017 09:10:24 +0100 Subject: [PATCH 194/447] 8174950: Gracefully handle null Supplier in Objects.requireNonNull Reviewed-by: dholmes, psandoz, alanb, chegar --- jdk/src/java.base/share/classes/java/util/Objects.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jdk/src/java.base/share/classes/java/util/Objects.java b/jdk/src/java.base/share/classes/java/util/Objects.java index dad583b9206..c6bf3c96133 100644 --- a/jdk/src/java.base/share/classes/java/util/Objects.java +++ b/jdk/src/java.base/share/classes/java/util/Objects.java @@ -343,7 +343,8 @@ public final class Objects { */ public static T requireNonNull(T obj, Supplier messageSupplier) { if (obj == null) - throw new NullPointerException(messageSupplier.get()); + throw new NullPointerException(messageSupplier == null ? + null : messageSupplier.get()); return obj; } From b70e80c61419b232c79c12ac39067d6fff3de2e4 Mon Sep 17 00:00:00 2001 From: Dmitrij Pochepko Date: Wed, 15 Feb 2017 17:37:44 +0300 Subject: [PATCH 195/447] 8172050: some compiler/calls/ tests should have /native option Reviewed-by: kvn --- .../calls/fromCompiled/CompiledInvokeDynamic2NativeTest.java | 4 ++-- .../fromCompiled/CompiledInvokeInterface2NativeTest.java | 4 ++-- .../calls/fromCompiled/CompiledInvokeSpecial2NativeTest.java | 4 ++-- .../calls/fromCompiled/CompiledInvokeStatic2NativeTest.java | 4 ++-- .../calls/fromCompiled/CompiledInvokeVirtual2NativeTest.java | 4 ++-- .../fromInterpreted/InterpretedInvokeDynamic2NativeTest.java | 2 +- .../InterpretedInvokeInterface2NativeTest.java | 2 +- .../fromInterpreted/InterpretedInvokeSpecial2NativeTest.java | 2 +- .../fromInterpreted/InterpretedInvokeStatic2NativeTest.java | 2 +- .../fromInterpreted/InterpretedInvokeVirtual2NativeTest.java | 2 +- .../calls/fromNative/NativeInvokeSpecial2CompiledTest.java | 4 ++-- .../calls/fromNative/NativeInvokeSpecial2InterpretedTest.java | 2 +- .../calls/fromNative/NativeInvokeSpecial2NativeTest.java | 2 +- .../calls/fromNative/NativeInvokeStatic2CompiledTest.java | 4 ++-- .../calls/fromNative/NativeInvokeStatic2InterpretedTest.java | 2 +- .../calls/fromNative/NativeInvokeStatic2NativeTest.java | 2 +- .../calls/fromNative/NativeInvokeVirtual2CompiledTest.java | 4 ++-- .../calls/fromNative/NativeInvokeVirtual2InterpretedTest.java | 2 +- .../calls/fromNative/NativeInvokeVirtual2NativeTest.java | 2 +- 19 files changed, 27 insertions(+), 27 deletions(-) diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2NativeTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2NativeTest.java index 4c81223b565..5009ba634bf 100644 --- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2NativeTest.java +++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2NativeTest.java @@ -32,10 +32,10 @@ * @run main compiler.calls.common.InvokeDynamicPatcher * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeDynamic * -compileCaller 1 -checkCallerCompileLevel 1 -nativeCallee - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeDynamic * -compileCaller 4 -checkCallerCompileLevel 4 -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeInterface2NativeTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeInterface2NativeTest.java index 2544b4cc3d8..3387d3e800d 100644 --- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeInterface2NativeTest.java +++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeInterface2NativeTest.java @@ -30,10 +30,10 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeInterface * -compileCaller 1 -checkCallerCompileLevel 1 -nativeCallee - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeInterface * -compileCaller 4 -checkCallerCompileLevel 4 -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2NativeTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2NativeTest.java index 301811399c2..4948890a985 100644 --- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2NativeTest.java +++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2NativeTest.java @@ -30,10 +30,10 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeSpecial * -compileCaller 1 -checkCallerCompileLevel 1 -nativeCallee - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeSpecial * -compileCaller 4 -checkCallerCompileLevel 4 -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeStatic2NativeTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeStatic2NativeTest.java index a40d9d41090..563c4c4091f 100644 --- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeStatic2NativeTest.java +++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeStatic2NativeTest.java @@ -30,10 +30,10 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeStatic * -compileCaller 1 -checkCallerCompileLevel 1 -nativeCallee - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeStatic * -compileCaller 4 -checkCallerCompileLevel 4 -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2NativeTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2NativeTest.java index c82f056bd24..4a1f046583e 100644 --- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2NativeTest.java +++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2NativeTest.java @@ -30,10 +30,10 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeVirtual * -compileCaller 1 -checkCallerCompileLevel 1 -nativeCallee - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeVirtual * -compileCaller 4 -checkCallerCompileLevel 4 -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2NativeTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2NativeTest.java index 1d5ac09b6c1..b59a4f96ff9 100644 --- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2NativeTest.java +++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2NativeTest.java @@ -32,7 +32,7 @@ * @run main compiler.calls.common.InvokeDynamicPatcher * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -XX:CompileCommand=exclude,compiler.calls.common.InvokeDynamic::caller compiler.calls.common.InvokeDynamic * -checkCallerCompileLevel 0 -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2NativeTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2NativeTest.java index b03e5bd5ec2..63ab11a5a47 100644 --- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2NativeTest.java +++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2NativeTest.java @@ -30,7 +30,7 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -XX:CompileCommand=exclude,compiler.calls.common.InvokeInterface::caller compiler.calls.common.InvokeInterface * -checkCallerCompileLevel 0 -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2NativeTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2NativeTest.java index 8593ebc2551..c7dda1f3faa 100644 --- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2NativeTest.java +++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2NativeTest.java @@ -30,7 +30,7 @@ * @build compiler.calls.common.InvokeSpecial * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -XX:CompileCommand=exclude,compiler.calls.common.InvokeSpecial::caller compiler.calls.common.InvokeSpecial * -checkCallerCompileLevel 0 -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2NativeTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2NativeTest.java index a17e9c5c2a7..ca2613b14a2 100644 --- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2NativeTest.java +++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2NativeTest.java @@ -30,7 +30,7 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -XX:CompileCommand=exclude,compiler.calls.common.InvokeStatic::caller compiler.calls.common.InvokeStatic * -checkCallerCompileLevel 0 -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2NativeTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2NativeTest.java index 9ebf7a359c8..c983efd890f 100644 --- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2NativeTest.java +++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2NativeTest.java @@ -30,7 +30,7 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -XX:CompileCommand=exclude,compiler.calls.common.InvokeVirtual::caller compiler.calls.common.InvokeVirtual * -checkCallerCompileLevel 0 -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2CompiledTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2CompiledTest.java index 74007716168..1ddea48c639 100644 --- a/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2CompiledTest.java +++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2CompiledTest.java @@ -30,10 +30,10 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeSpecial * -nativeCaller -compileCallee 1 -checkCalleeCompileLevel 1 - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeSpecial * -nativeCaller -compileCallee 4 -checkCalleeCompileLevel 4 */ diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2InterpretedTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2InterpretedTest.java index 4efd098904d..961daf545bd 100644 --- a/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2InterpretedTest.java +++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2InterpretedTest.java @@ -30,7 +30,7 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -XX:CompileCommand=exclude,compiler.calls.common.InvokeSpecial::callee compiler.calls.common.InvokeSpecial * -nativeCaller -checkCalleeCompileLevel 0 */ diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2NativeTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2NativeTest.java index 1005783754c..bde00f6da43 100644 --- a/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2NativeTest.java +++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2NativeTest.java @@ -30,7 +30,7 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * compiler.calls.common.InvokeSpecial * -nativeCaller -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2CompiledTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2CompiledTest.java index f1f0634e9f0..f86ca89896c 100644 --- a/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2CompiledTest.java +++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2CompiledTest.java @@ -30,10 +30,10 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeStatic * -nativeCaller -compileCallee 1 -checkCalleeCompileLevel 1 - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeStatic * -nativeCaller -compileCallee 4 -checkCalleeCompileLevel 4 */ diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2InterpretedTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2InterpretedTest.java index fc0a0592072..fff52824542 100644 --- a/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2InterpretedTest.java +++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2InterpretedTest.java @@ -30,7 +30,7 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -XX:CompileCommand=exclude,compiler.calls.common.InvokeStatic::callee compiler.calls.common.InvokeStatic * -nativeCaller -checkCalleeCompileLevel 0 */ diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2NativeTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2NativeTest.java index f9da3d65c98..3d106fdf12b 100644 --- a/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2NativeTest.java +++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2NativeTest.java @@ -30,7 +30,7 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * compiler.calls.common.InvokeStatic * -nativeCaller -nativeCallee */ diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2CompiledTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2CompiledTest.java index b6cce29b413..7b744249c3c 100644 --- a/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2CompiledTest.java +++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2CompiledTest.java @@ -30,10 +30,10 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeVirtual * -nativeCaller -compileCallee 1 -checkCalleeCompileLevel 1 - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -Xbatch compiler.calls.common.InvokeVirtual * -nativeCaller -compileCallee 4 -checkCalleeCompileLevel 4 */ diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2InterpretedTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2InterpretedTest.java index 270ecfa6f35..43be4d49c4e 100644 --- a/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2InterpretedTest.java +++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2InterpretedTest.java @@ -30,7 +30,7 @@ * * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * -XX:CompileCommand=exclude,compiler.calls.common.InvokeVirtual::callee compiler.calls.common.InvokeVirtual * -nativeCaller -checkCalleeCompileLevel 0 */ diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2NativeTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2NativeTest.java index 83564c143b2..9b9fe1a44df 100644 --- a/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2NativeTest.java +++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2NativeTest.java @@ -30,7 +30,7 @@ * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * compiler.calls.common.InvokeVirtual * -nativeCaller -nativeCallee */ From 54491302fe0b21b6b6913d41fdaae33ebebfcf69 Mon Sep 17 00:00:00 2001 From: Dmitrij Pochepko Date: Wed, 15 Feb 2017 17:39:19 +0300 Subject: [PATCH 196/447] 8138801: develop tests to check that CompilerToVM::isMature state is consistence w/ reprofile Reviewed-by: kvn --- .../compilerToVM/IsMatureVsReprofileTest.java | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 hotspot/test/compiler/jvmci/compilerToVM/IsMatureVsReprofileTest.java diff --git a/hotspot/test/compiler/jvmci/compilerToVM/IsMatureVsReprofileTest.java b/hotspot/test/compiler/jvmci/compilerToVM/IsMatureVsReprofileTest.java new file mode 100644 index 00000000000..ba47d417cad --- /dev/null +++ b/hotspot/test/compiler/jvmci/compilerToVM/IsMatureVsReprofileTest.java @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8136421 + * @requires vm.jvmci + * @library / /test/lib + * ../common/patches + * @modules java.base/jdk.internal.misc + * java.base/jdk.internal.org.objectweb.asm + * java.base/jdk.internal.org.objectweb.asm.tree + * jdk.vm.ci/jdk.vm.ci.hotspot + * jdk.vm.ci/jdk.vm.ci.code + * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox + * sun.hotspot.WhiteBox$WhiteBoxPermission + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions + * -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Xbatch + * compiler.jvmci.compilerToVM.IsMatureVsReprofileTest + */ + +package compiler.jvmci.compilerToVM; + +import compiler.jvmci.common.CTVMUtilities; +import compiler.jvmci.common.testcases.SimpleClass; +import jdk.vm.ci.hotspot.CompilerToVMHelper; +import jdk.test.lib.Asserts; +import sun.hotspot.WhiteBox; +import compiler.whitebox.CompilerWhiteBoxTest; +import java.lang.reflect.Executable; +import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod; +import jdk.test.lib.Platform; + +public class IsMatureVsReprofileTest { + private static final WhiteBox WB = WhiteBox.getWhiteBox(); + private static final boolean TIERED = WB.getBooleanVMFlag("TieredCompilation"); + private static final boolean IS_XCOMP = Platform.isComp(); + + public static void main(String[] args) throws Exception { + new IsMatureVsReprofileTest().test(); + } + + public void test() throws Exception { + SimpleClass sclass = new SimpleClass(); + Executable method = SimpleClass.class.getDeclaredMethod("testMethod"); + long metaspaceMethodData = WB.getMethodData(method); + Asserts.assertEQ(metaspaceMethodData, 0L, "MDO should be null for a " + + "never invoked method"); + boolean isMature = CompilerToVMHelper.isMature(metaspaceMethodData); + Asserts.assertFalse(isMature, "null MDO can't be mature"); + for (int i = 0; i < CompilerWhiteBoxTest.THRESHOLD; i++) { + sclass.testMethod(); + } + Asserts.assertTrue(WB.isMethodCompiled(method), + "Method should be compiled"); + metaspaceMethodData = WB.getMethodData(method); + Asserts.assertNE(metaspaceMethodData, 0L, + "Multiple times invoked method should have MDO"); + isMature = CompilerToVMHelper.isMature(metaspaceMethodData); + /* a method is not mature for -Xcomp and -Tiered, + see NonTieredCompPolicy::is_mature */ + Asserts.assertEQ(!IS_XCOMP || TIERED, isMature, + "Unexpected isMature state for compiled method"); + HotSpotResolvedJavaMethod resolvedMethod + = CTVMUtilities.getResolvedMethod(method); + CompilerToVMHelper.reprofile(resolvedMethod); + Asserts.assertFalse(WB.isMethodCompiled(method), + "Unexpected method compilation state after reprofile"); + metaspaceMethodData = WB.getMethodData(method); + isMature = CompilerToVMHelper.isMature(metaspaceMethodData); + Asserts.assertNE(metaspaceMethodData, 0L, + "Got null MDO after reprofile"); + Asserts.assertEQ(TIERED && IS_XCOMP, isMature, + "Got unexpected isMature state after reprofiling"); + } +} From 5c88e780c223eb3715122b99b9ebdf59c019dd66 Mon Sep 17 00:00:00 2001 From: Dmitrij Pochepko Date: Wed, 15 Feb 2017 17:40:44 +0300 Subject: [PATCH 197/447] 8138799: improve tests for CompilerToVM::MaterializeVirtualObjectTest Reviewed-by: kvn --- .../MaterializeVirtualObjectTest.java | 151 +++++++++++++----- 1 file changed, 111 insertions(+), 40 deletions(-) diff --git a/hotspot/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java b/hotspot/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java index ec463e11890..5f9875d226d 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java @@ -39,22 +39,48 @@ * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -Xmixed -Xbootclasspath/a:. + * @run main/othervm -Xmixed -Xbatch -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI - * -XX:CompileCommand=exclude,*::check + * -XX:CompileCommand=exclude,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::check + * -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame + * -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame2 + * -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::recurse * -XX:+DoEscapeAnalysis -XX:-UseCounterDecay - * -XX:CompileCommand=dontinline,compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest,testFrame - * -XX:CompileCommand=inline,compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest,recurse - * -Xbatch + * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=true * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=false * compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest - * @run main/othervm -Xmixed -Xbootclasspath/a:. + * @run main/othervm -Xmixed -Xbatch -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI - * -XX:CompileCommand=exclude,*::check + * -XX:CompileCommand=exclude,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::check + * -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame + * -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame2 + * -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::recurse * -XX:+DoEscapeAnalysis -XX:-UseCounterDecay - * -Xbatch + * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=false + * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=false + * compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest + * @run main/othervm -Xmixed -Xbatch -Xbootclasspath/a:. + * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI + * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -XX:CompileCommand=exclude,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::check + * -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame + * -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame2 + * -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::recurse + * -XX:+DoEscapeAnalysis -XX:-UseCounterDecay + * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=true + * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=true + * compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest + * @run main/othervm -Xmixed -Xbatch -Xbootclasspath/a:. + * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI + * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * -XX:CompileCommand=exclude,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::check + * -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame + * -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame2 + * -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::recurse + * -XX:+DoEscapeAnalysis -XX:-UseCounterDecay + * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=false * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=true * compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest */ @@ -74,25 +100,41 @@ import java.lang.reflect.Method; public class MaterializeVirtualObjectTest { private static final WhiteBox WB; - private static final Method METHOD; - private static final ResolvedJavaMethod RESOLVED_METHOD; private static final boolean INVALIDATE; private static final int COMPILE_THRESHOLD; + private static final Method MATERIALIZED_METHOD; + private static final Method NOT_MATERIALIZED_METHOD; + private static final ResolvedJavaMethod MATERIALIZED_RESOLVED; + private static final ResolvedJavaMethod NOT_MATERIALIZED_RESOLVED; + private static final boolean MATERIALIZE_FIRST; static { + Method method1; + Method method2; WB = WhiteBox.getWhiteBox(); try { - METHOD = MaterializeVirtualObjectTest.class.getDeclaredMethod( - "testFrame", String.class, int.class); + method1 = MaterializeVirtualObjectTest.class.getDeclaredMethod("testFrame", + String.class, int.class); + method2 = MaterializeVirtualObjectTest.class.getDeclaredMethod("testFrame2", + String.class, int.class); } catch (NoSuchMethodException e) { throw new Error("Can't get executable for test method", e); } - RESOLVED_METHOD = CTVMUtilities.getResolvedMethod(METHOD); + ResolvedJavaMethod resolved1; + ResolvedJavaMethod resolved2; + resolved1 = CTVMUtilities.getResolvedMethod(method1); + resolved2 = CTVMUtilities.getResolvedMethod(method2); INVALIDATE = Boolean.getBoolean( "compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate"); COMPILE_THRESHOLD = WB.getBooleanVMFlag("TieredCompilation") ? CompilerWhiteBoxTest.THRESHOLD : CompilerWhiteBoxTest.THRESHOLD * 2; + MATERIALIZE_FIRST = Boolean.getBoolean( + "compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst"); + MATERIALIZED_RESOLVED = MATERIALIZE_FIRST ? resolved1 : resolved2; + NOT_MATERIALIZED_RESOLVED = MATERIALIZE_FIRST ? resolved2 : resolved1; + MATERIALIZED_METHOD = MATERIALIZE_FIRST ? method1 : method2; + NOT_MATERIALIZED_METHOD = MATERIALIZE_FIRST ? method2 : method1; } public static void main(String[] args) { @@ -107,58 +149,87 @@ public class MaterializeVirtualObjectTest { } private static String getName() { - return "CASE: invalidate=" + INVALIDATE; + return "CASE: invalidate=" + INVALIDATE + ", materializedMethod=" + + (MATERIALIZE_FIRST ? "testFrame" : "testFrame2") + + ", notMaterializedMethod=" + + (MATERIALIZE_FIRST ? "testFrame2" : "testFrame"); } private void test() { System.out.println(getName()); - Asserts.assertFalse(WB.isMethodCompiled(METHOD), getName() - + " : method unexpectedly compiled"); - /* need to trigger compilation by multiple method invocations - in order to have method profile data to be gathered */ - for (int i = 0; i < COMPILE_THRESHOLD; i++) { + Asserts.assertFalse(WB.isMethodCompiled(MATERIALIZED_METHOD), + getName() + " : materialized method is compiled"); + Asserts.assertFalse(WB.isMethodCompiled(NOT_MATERIALIZED_METHOD), + getName() + " : not materialized method is compiled"); + for (int i = 0; i < CompilerWhiteBoxTest.THRESHOLD; i++) { testFrame("someString", i); } - Asserts.assertTrue(WB.isMethodCompiled(METHOD), getName() - + "Method unexpectedly not compiled"); - Asserts.assertTrue(WB.getMethodCompilationLevel(METHOD) == 4, getName() - + "Method not compiled at level 4"); - testFrame("someString", COMPILE_THRESHOLD); + Asserts.assertTrue(WB.isMethodCompiled(MATERIALIZED_METHOD), getName() + + " : materialized method not compiled"); + Asserts.assertTrue(WB.isMethodCompiled(NOT_MATERIALIZED_METHOD), + getName() + " : not materialized method not compiled"); + testFrame("someString", /* materialize */ CompilerWhiteBoxTest.THRESHOLD); } private void testFrame(String str, int iteration) { + Helper helper = new Helper(str); + testFrame2(str, iteration); + Asserts.assertTrue((helper.string != null) && (this != null) + && (helper != null), String.format("%s : some locals are null", getName())); + } + + private void testFrame2(String str, int iteration) { Helper helper = new Helper(str); recurse(2, iteration); Asserts.assertTrue((helper.string != null) && (this != null) - && (helper != null), String.format("%s : some locals are null", getName())); + && (helper != null), String.format("%s : some locals are null", getName())); } + private void recurse(int depth, int iteration) { if (depth == 0) { check(iteration); } else { Integer s = new Integer(depth); recurse(depth - 1, iteration); - Asserts.assertEQ(s.intValue(), depth, String.format("different values: %s != %s", s.intValue(), depth)); + Asserts.assertEQ(s.intValue(), depth, + String.format("different values: %s != %s", s.intValue(), depth)); } } private void check(int iteration) { // Materialize virtual objects on last invocation if (iteration == COMPILE_THRESHOLD) { - HotSpotStackFrameReference hsFrame = CompilerToVMHelper - .getNextStackFrame(/* topmost frame */ null, - new ResolvedJavaMethod[]{ - RESOLVED_METHOD}, /* don't skip any */ 0); - Asserts.assertNotNull(hsFrame, getName() + " : got null frame"); - Asserts.assertTrue(WB.isMethodCompiled(METHOD), getName() - + "Test method should be compiled"); - Asserts.assertTrue(hsFrame.hasVirtualObjects(), getName() - + ": has no virtual object before materialization"); - CompilerToVMHelper.materializeVirtualObjects(hsFrame, INVALIDATE); - Asserts.assertFalse(hsFrame.hasVirtualObjects(), getName() - + " : has virtual object after materialization"); - Asserts.assertEQ(WB.isMethodCompiled(METHOD), !INVALIDATE, getName() - + " : unexpected compiled status"); + // get frames and check not-null + HotSpotStackFrameReference materialized = CompilerToVMHelper.getNextStackFrame( + /* topmost frame */ null, new ResolvedJavaMethod[]{MATERIALIZED_RESOLVED}, + /* don't skip any */ 0); + Asserts.assertNotNull(materialized, getName() + + " : got null frame for materialized method"); + HotSpotStackFrameReference notMaterialized = CompilerToVMHelper.getNextStackFrame( + /* topmost frame */ null, new ResolvedJavaMethod[]{NOT_MATERIALIZED_RESOLVED}, + /* don't skip any */ 0); + Asserts.assertNE(materialized, notMaterialized, + "Got same frame pointer for both tested frames"); + Asserts.assertNotNull(notMaterialized, getName() + + " : got null frame for not materialized method"); + // check that frames has virtual objects before materialization stage + Asserts.assertTrue(materialized.hasVirtualObjects(), getName() + + ": materialized frame has no virtual object before materialization"); + Asserts.assertTrue(notMaterialized.hasVirtualObjects(), getName() + + ": notMaterialized frame has no virtual object before materialization"); + // materialize + CompilerToVMHelper.materializeVirtualObjects(materialized, INVALIDATE); + // check that only not materialized frame has virtual objects + Asserts.assertFalse(materialized.hasVirtualObjects(), getName() + + " : materialized has virtual object after materialization"); + Asserts.assertTrue(notMaterialized.hasVirtualObjects(), getName() + + " : notMaterialized has no virtual object after materialization"); + // check that materialized frame was deoptimized in case invalidate=true + Asserts.assertEQ(WB.isMethodCompiled(MATERIALIZED_METHOD), !INVALIDATE, getName() + + " : materialized method has unexpected compiled status"); + // check that not materialized frame wasn't deoptimized + Asserts.assertTrue(WB.isMethodCompiled(NOT_MATERIALIZED_METHOD), getName() + + " : not materialized method has unexpected compiled status"); } } From 896fc637875f261fca3f37690255efad1bb3e32c Mon Sep 17 00:00:00 2001 From: Doug Simon Date: Wed, 15 Feb 2017 11:14:45 +0100 Subject: [PATCH 198/447] 8174957: [JVMCI] jaotc is broken in Xcomp mode Reviewed-by: iveresov --- .../src/jdk/tools/jaotc/DataBuilder.java | 4 ++-- .../vm/ci/hotspot/HotSpotCodeCacheProvider.java | 2 +- .../src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java | 2 +- .../src/jdk/vm/ci/hotspot/VMField.java | 14 +++++++------- hotspot/src/share/vm/jvmci/jvmciJavaClasses.hpp | 2 +- .../jvmci/compilerToVM/ReadConfigurationTest.java | 12 +++++++++++- 6 files changed, 23 insertions(+), 13 deletions(-) diff --git a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/DataBuilder.java b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/DataBuilder.java index 350ee46921a..159955c6bda 100644 --- a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/DataBuilder.java +++ b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/DataBuilder.java @@ -70,8 +70,8 @@ class DataBuilder { */ private void fillVMAddresses(HotSpotVMConfigStore config) { for (VMField vmField : config.getFields().values()) { - if (vmField.value != null) { - final long address = vmField.value; + if (vmField.value != null && vmField.value instanceof Long) { + final long address = (Long) vmField.value; String value = vmField.name; /* * Some fields don't contain addresses but integer values. At least don't add zero diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java index f5489fb18c5..b77ed14ca8e 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java +++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java @@ -76,7 +76,7 @@ public class HotSpotCodeCacheProvider implements CodeCacheProvider { HotSpotVMConfigStore store = runtime.getConfigStore(); for (Map.Entry e : store.getFields().entrySet()) { VMField field = e.getValue(); - if (field.isStatic() && field.value != null && field.value == address) { + if (field.isStatic() && field.value != null && field.value instanceof Long && ((Long) field.value) == address) { return e.getValue() + ":0x" + Long.toHexString(address); } } diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java index b687ab5a367..473eb18a037 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java +++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java @@ -497,7 +497,7 @@ public final class HotSpotJVMCIRuntime implements HotSpotJVMCIRuntimeProvider { if (!field.isStatic()) { printConfigLine(vm, "[vmconfig:instance field] %s %s {offset=%d[0x%x]}%n", field.type, field.name, field.offset, field.offset); } else { - String value = field.value == null ? "null" : String.format("%d[0x%x]", field.value, field.value); + String value = field.value == null ? "null" : field.value instanceof Boolean ? field.value.toString() : String.format("%d[0x%x]", field.value, field.value); printConfigLine(vm, "[vmconfig:static field] %s %s = %s {address=0x%x}%n", field.type, field.name, value, field.address); } } diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMField.java b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMField.java index 094d92cdd32..ce8b54139df 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMField.java +++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMField.java @@ -38,22 +38,22 @@ public final class VMField { public final String type; /** - * If represented field is non-static, this is its offset within the containing structure. + * If the represented field is non-static, this is its offset within the containing structure. */ public final long offset; /** - * If represented field is static, this is its address. Otherwise, this field is 0. + * If the represented field is static, this is its address. Otherwise, this is 0. */ public final long address; /** - * Value of the field represented as a boxed long; only valid for non-oop static fields. This - * value is only captured once, during JVMCI initialization. If {@link #type} cannot be - * meaningfully (e.g., a struct) or safely (e.g., an oop) expressed as a boxed long, this is - * {@code null}. + * Value of the field represented as a boxed boolean if its C++ type is bool otherwise as a + * boxed long; only valid for non-oop static fields. This value is only captured once, during + * JVMCI initialization. If {@link #type} cannot be meaningfully (e.g., a struct) or safely + * (e.g., an oop) expressed as a boxed object, this is {@code null}. */ - public final Long value; + public final Object value; /** * Determines if the represented field is static. diff --git a/hotspot/src/share/vm/jvmci/jvmciJavaClasses.hpp b/hotspot/src/share/vm/jvmci/jvmciJavaClasses.hpp index d6039fca4a3..58764147efa 100644 --- a/hotspot/src/share/vm/jvmci/jvmciJavaClasses.hpp +++ b/hotspot/src/share/vm/jvmci/jvmciJavaClasses.hpp @@ -117,7 +117,7 @@ class JVMCIJavaClasses : AllStatic { oop_field(VMField, type, "Ljava/lang/String;") \ long_field(VMField, offset) \ long_field(VMField, address) \ - oop_field(VMField, value, "Ljava/lang/Long;") \ + oop_field(VMField, value, "Ljava/lang/Object;") \ end_class \ start_class(VMFlag) \ oop_field(VMFlag, name, "Ljava/lang/String;") \ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ReadConfigurationTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ReadConfigurationTest.java index 866756c5b42..4b9a7d37ed4 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ReadConfigurationTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ReadConfigurationTest.java @@ -38,6 +38,7 @@ package compiler.jvmci.compilerToVM; import jdk.test.lib.Asserts; +import jdk.vm.ci.hotspot.VMField; import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; import jdk.vm.ci.hotspot.HotSpotVMConfigAccess; import jdk.vm.ci.hotspot.HotSpotVMConfigStore; @@ -49,10 +50,19 @@ public class ReadConfigurationTest { } private void runTest() { - TestHotSpotVMConfig config = new TestHotSpotVMConfig(HotSpotJVMCIRuntime.runtime().getConfigStore()); + HotSpotVMConfigStore store = HotSpotJVMCIRuntime.runtime().getConfigStore(); + TestHotSpotVMConfig config = new TestHotSpotVMConfig(store); Asserts.assertNE(config.codeCacheHighBound, 0L, "Got null address"); Asserts.assertNE(config.stubRoutineJintArrayCopy, 0L, "Got null address"); + for (VMField field : store.getFields().values()) { + Object value = field.value; + if (value != null) { + Asserts.assertTrue(value instanceof Long || value instanceof Boolean, + "Got unexpected value type for VM field " + field.name + ": " + value.getClass()); + } + } + for (VMIntrinsicMethod m : config.getStore().getIntrinsics()) { Asserts.assertNotNull(m); Asserts.assertNotNull(m.declaringClass); From 8a2de9b69b94610158d675f273834dec7d875f36 Mon Sep 17 00:00:00 2001 From: Jan Lahoda Date: Wed, 15 Feb 2017 11:27:03 +0100 Subject: [PATCH 199/447] 8175007: Incorrect error messages for inaccessible classes in visible packages Recovery lookup may be triggered for inaccessible classes in visible packages - providing better errors. Reviewed-by: mcimadamore --- .../com/sun/tools/javac/comp/Resolve.java | 22 ++++++++-- .../modules/ConvenientAccessErrorsTest.java | 42 ++++++++++++++++++- 2 files changed, 59 insertions(+), 5 deletions(-) diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java index a567936f382..9e36cfa74a0 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java @@ -2104,7 +2104,7 @@ public class Resolve { for (S sym : candidates) { if (validate.test(sym)) - return new InvisibleSymbolError(env, suppressError, sym); + return createInvisibleSymbolError(env, suppressError, sym); } Set recoverableModules = new HashSet<>(syms.getAllModules()); @@ -2123,7 +2123,7 @@ public class Resolve { S sym = load.apply(ms, name); if (sym != null && validate.test(sym)) { - return new InvisibleSymbolError(env, suppressError, sym); + return createInvisibleSymbolError(env, suppressError, sym); } } } @@ -2132,6 +2132,21 @@ public class Resolve { return defaultResult; } + private Symbol createInvisibleSymbolError(Env env, boolean suppressError, Symbol sym) { + if (symbolPackageVisible(env, sym)) { + return new AccessError(env, null, sym); + } else { + return new InvisibleSymbolError(env, suppressError, sym); + } + } + + private boolean symbolPackageVisible(Env env, Symbol sym) { + ModuleSymbol envMod = env.toplevel.modle; + PackageSymbol symPack = sym.packge(); + return envMod == symPack.modle || + envMod.visiblePackages.containsKey(symPack.fullname); + } + /** * Find a type declared in a scope (not inherited). Return null * if none is found. @@ -4104,8 +4119,7 @@ public class Resolve { pos, "not.def.access.package.cant.access", sym, sym.location(), inaccessiblePackageReason(env, sym.packge())); } else if ( sym.packge() != syms.rootPackage - && sym.packge().modle != env.toplevel.modle - && !isAccessible(env, sym.outermostClass())) { + && !symbolPackageVisible(env, sym)) { return diags.create(dkind, log.currentSource(), pos, "not.def.access.class.intf.cant.access.reason", sym, sym.location(), sym.location().packge(), diff --git a/langtools/test/tools/javac/modules/ConvenientAccessErrorsTest.java b/langtools/test/tools/javac/modules/ConvenientAccessErrorsTest.java index 45c2d388a8b..3fed25a3ab5 100644 --- a/langtools/test/tools/javac/modules/ConvenientAccessErrorsTest.java +++ b/langtools/test/tools/javac/modules/ConvenientAccessErrorsTest.java @@ -23,7 +23,7 @@ /* * @test - * @bug 8169197 8172668 8173117 + * @bug 8169197 8172668 8173117 8175007 * @summary Check convenient errors are produced for inaccessible classes. * @library /tools/lib * @modules jdk.compiler/com.sun.tools.javac.api @@ -704,4 +704,44 @@ public class ConvenientAccessErrorsTest extends ModuleTestBase { throw new Exception("Expected names not generated: " + actual); } } + + @Test + public void testInaccessibleInVisible(Path base) throws Exception { + Path src = base.resolve("src"); + Path src_ma = src.resolve("ma"); + tb.writeJavaFiles(src_ma, + "module ma { exports ma; }", + "package ma; class NotApi { public static class Inner { } }"); + Path classes = base.resolve("classes"); + tb.createDirectories(classes); + + new JavacTask(tb) + .outdir(classes) + .files(findJavaFiles(src_ma)) + .run() + .writeAll(); + + Path src_mb = src.resolve("mb"); + tb.writeJavaFiles(src_mb, + "module mb { requires ma; }", + "package mb.a; public class Test { ma.NotApi.Inner i1; mb.b.NotApi.Inner i2; }", + "package mb.b; class NotApi { public static class Inner { } }"); + + List log = new JavacTask(tb) + .options("-XDrawDiagnostics", + "--module-path", classes.toString()) + .outdir(classes) + .files(findJavaFiles(src_mb)) + .run(Task.Expect.FAIL) + .writeAll() + .getOutputLines(Task.OutputKind.DIRECT); + + List expected = Arrays.asList( + "Test.java:1:44: compiler.err.not.def.access.class.intf.cant.access: ma.NotApi.Inner, ma.NotApi", + "Test.java:1:66: compiler.err.not.def.access.class.intf.cant.access: mb.b.NotApi.Inner, mb.b.NotApi", + "2 errors"); + + if (!expected.equals(log)) + throw new Exception("expected output not found; actual: " + log); + } } From a63ec90cd25b6846922d668335f88f689ea7dda5 Mon Sep 17 00:00:00 2001 From: Amit Sapre Date: Wed, 15 Feb 2017 17:11:46 +0530 Subject: [PATCH 200/447] 8174196: sun/management/jdp tests are not running properly Reviewed-by: egahlin, dfuchs --- jdk/test/sun/management/jdp/JdpDefaultsTest.java | 4 ++-- jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java | 2 +- jdk/test/sun/management/jdp/JdpOffTest.java | 4 ++-- jdk/test/sun/management/jdp/JdpSpecificAddressTest.java | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/jdk/test/sun/management/jdp/JdpDefaultsTest.java b/jdk/test/sun/management/jdp/JdpDefaultsTest.java index 8236e5e1e25..9ce8bd9fb98 100644 --- a/jdk/test/sun/management/jdp/JdpDefaultsTest.java +++ b/jdk/test/sun/management/jdp/JdpDefaultsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,7 @@ * @library /lib/testlibrary * @modules jdk.management.agent/sun.management.jdp * @build jdk.testlibrary.* ClientConnection JdpTestUtil JdpTestCase JdpOnTestCase DynamicLauncher - * @run main JdpDefaultsTest + * @run main/othervm JdpDefaultsTest */ public class JdpDefaultsTest extends DynamicLauncher { diff --git a/jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java b/jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java index 4e628995c18..d79e2245870 100644 --- a/jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java +++ b/jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java @@ -29,7 +29,7 @@ * @library /lib/testlibrary * @modules jdk.management.agent/sun.management.jdp * @build jdk.testlibrary.* ClientConnection JdpTestUtil JdpTestCase JdpJmxRemoteDynamicPortTestCase DynamicLauncher - * @run main JdpJmxRemoteDynamicPortTest + * @run main/othervm JdpJmxRemoteDynamicPortTest */ import java.lang.management.ManagementFactory; diff --git a/jdk/test/sun/management/jdp/JdpOffTest.java b/jdk/test/sun/management/jdp/JdpOffTest.java index a1aa6189c5f..7f105e8c21a 100644 --- a/jdk/test/sun/management/jdp/JdpOffTest.java +++ b/jdk/test/sun/management/jdp/JdpOffTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,7 +34,7 @@ * @library /lib/testlibrary * @modules jdk.management.agent/sun.management.jdp * @build jdk.testlibrary.* ClientConnection JdpTestUtil JdpTestCase JdpOffTestCase DynamicLauncher - * @run main JdpOffTest + * @run main/othervm JdpOffTest */ diff --git a/jdk/test/sun/management/jdp/JdpSpecificAddressTest.java b/jdk/test/sun/management/jdp/JdpSpecificAddressTest.java index f98216427c1..cf95e5fcc7e 100644 --- a/jdk/test/sun/management/jdp/JdpSpecificAddressTest.java +++ b/jdk/test/sun/management/jdp/JdpSpecificAddressTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,7 @@ * @library /lib/testlibrary * @modules jdk.management.agent/sun.management.jdp * @build jdk.testlibrary.* ClientConnection JdpTestUtil JdpTestCase JdpOnTestCase DynamicLauncher - * @run main JdpSpecificAddressTest + * @run main/othervm JdpSpecificAddressTest */ From 08aeb22f48a2d90ee0d1e6e7b4902b3800043e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rickard=20B=C3=A4ckman?= Date: Wed, 15 Feb 2017 14:00:13 +0100 Subject: [PATCH 201/447] 8165256: ARM64: vm/gc/concurrent/lp30yp10rp30mr0st300 Crash SIGBUS Reviewed-by: aph --- hotspot/src/cpu/arm/vm/compiledIC_arm.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hotspot/src/cpu/arm/vm/compiledIC_arm.cpp b/hotspot/src/cpu/arm/vm/compiledIC_arm.cpp index de7249f277a..abbd673b6ba 100644 --- a/hotspot/src/cpu/arm/vm/compiledIC_arm.cpp +++ b/hotspot/src/cpu/arm/vm/compiledIC_arm.cpp @@ -85,17 +85,17 @@ address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf, address mark) } #undef __ -// size of C2 call stub, compiled java to interpretor -int CompiledStaticCall::to_interp_stub_size() { - return 8 * NativeInstruction::instruction_size; -} - // Relocation entries for call stub, compiled java to interpreter. int CompiledStaticCall::reloc_to_interp_stub() { return 10; // 4 in emit_to_interp_stub + 1 in Java_Static_Call } #endif // COMPILER2 || JVMCI +// size of C2 call stub, compiled java to interpretor +int CompiledStaticCall::to_interp_stub_size() { + return 8 * NativeInstruction::instruction_size; +} + void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, address entry) { address stub = find_stub(/*is_aot*/ false); guarantee(stub != NULL, "stub not found"); @@ -125,6 +125,8 @@ void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, ad method_holder->set_data((intptr_t)callee()); jump->set_jump_destination(entry); + ICache::invalidate_range(stub, to_interp_stub_size()); + // Update jump to call. set_destination_mt_safe(stub); } From 5ff0126d19a0352eeabfd88cb5ed88cbb1543be4 Mon Sep 17 00:00:00 2001 From: Weijun Wang Date: Wed, 15 Feb 2017 21:46:50 +0800 Subject: [PATCH 202/447] 8168410: Multiple JCK tests are failing due to SecurityException is not thrown Reviewed-by: mullan --- .../java/security/ProtectionDomain.java | 33 ++++++++++++++----- jdk/test/java/security/testlibrary/Proc.java | 10 +++++- .../util/FilePermCompat/CompatImpact.java | 13 +++++--- .../security/util/FilePermCompat/Flag.java | 29 +++++----------- .../security/util/FilePermCompat/flag.policy | 4 +++ 5 files changed, 55 insertions(+), 34 deletions(-) create mode 100644 jdk/test/sun/security/util/FilePermCompat/flag.policy diff --git a/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java b/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java index ecb12785591..1a9ac151a70 100644 --- a/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java +++ b/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,6 +38,7 @@ import jdk.internal.misc.JavaSecurityAccess; import jdk.internal.misc.JavaSecurityProtectionDomainAccess; import static jdk.internal.misc.JavaSecurityProtectionDomainAccess.ProtectionDomainCache; import jdk.internal.misc.SharedSecrets; +import sun.security.action.GetPropertyAction; import sun.security.provider.PolicyFile; import sun.security.util.Debug; import sun.security.util.FilePermCompat; @@ -62,6 +63,14 @@ import sun.security.util.SecurityConstants; public class ProtectionDomain { + /** + * If true, {@link #impliesWithAltFilePerm} will try to be compatible on + * FilePermission checking even if a 3rd-party Policy implementation is set. + */ + private static final boolean filePermCompatInPD = + "true".equals(GetPropertyAction.privilegedGetProperty( + "jdk.security.filePermCompat")); + private static class JavaSecurityAccessImpl implements JavaSecurityAccess { private JavaSecurityAccessImpl() { @@ -321,19 +330,27 @@ public class ProtectionDomain { } /** - * This method has the same logic flow as {@link #implies} except that - * when the {@link FilePermCompat#compat} flag is on it ensures - * FilePermission compatibility after JDK-8164705. {@code implies()} - * is called when compat flag is not on or user has extended - * {@code ProtectionDomain}. + * This method has almost the same logic flow as {@link #implies} but + * it ensures some level of FilePermission compatibility after JDK-8164705. * * This method is called by {@link AccessControlContext#checkPermission} * and not intended to be called by an application. */ boolean impliesWithAltFilePerm(Permission perm) { - // If this is a subclass of ProtectionDomain. Call the old method. - if (!FilePermCompat.compat || getClass() != ProtectionDomain.class) { + // If FilePermCompat.compat is set (default value), FilePermission + // checking compatibility should be considered. + + // If filePermCompatInPD is set, this method checks for alternative + // FilePermission to keep compatibility for any Policy implementation. + // When set to false (default value), implies() is called since + // the PolicyFile implementation already supports compatibility. + + // If this is a subclass of ProtectionDomain, call implies() + // because most likely user has overridden it. + + if (!filePermCompatInPD || !FilePermCompat.compat || + getClass() != ProtectionDomain.class) { return implies(perm); } diff --git a/jdk/test/java/security/testlibrary/Proc.java b/jdk/test/java/security/testlibrary/Proc.java index 7248757e0cd..dc1f9e7aea4 100644 --- a/jdk/test/java/security/testlibrary/Proc.java +++ b/jdk/test/java/security/testlibrary/Proc.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -176,6 +176,14 @@ public class Proc { prop.put(a, b); return this; } + // Inherit the value of a system property + public Proc inheritProp(String k) { + String v = System.getProperty(k); + if (v != null) { + prop.put(k, v); + } + return this; + } // Sets classpath. If not called, Proc will choose a classpath. If called // with no arg, no classpath will be used. Can be called multiple times. public Proc cp(String... s) { diff --git a/jdk/test/sun/security/util/FilePermCompat/CompatImpact.java b/jdk/test/sun/security/util/FilePermCompat/CompatImpact.java index 7b2db0417e1..3ead58127e6 100644 --- a/jdk/test/sun/security/util/FilePermCompat/CompatImpact.java +++ b/jdk/test/sun/security/util/FilePermCompat/CompatImpact.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,13 +23,14 @@ /* * @test - * @bug 8164705 + * @bug 8164705 8168410 * @summary check compatibility after FilePermission change * @library /java/security/testlibrary/ * @modules java.base/jdk.internal.misc * @run main CompatImpact prepare * @run main CompatImpact builtin - * @run main CompatImpact mine + * @run main/othervm -Djdk.security.filePermCompat=true CompatImpact mine + * @run main/fail CompatImpact mine * @run main CompatImpact dopriv */ @@ -72,7 +73,8 @@ public class CompatImpact { Files.copy(Paths.get(cp, "CompatImpact$DoPrivInner.class"), Paths.get("inner", "CompatImpact$DoPrivInner.class")); break; - // run tests with different policy impls + // default policy always covered, user-defined depends on + // system property jdk.security.filePermCompact. case "builtin": case "mine": cp = System.getProperty("test.classes"); @@ -222,7 +224,8 @@ public class CompatImpact { // Return a Proc object for different policy types private static Proc p(String type, String f) throws Exception { Proc p = Proc.create("CompatImpact") - .prop("java.security.manager", ""); + .prop("java.security.manager", "") + .inheritProp("jdk.security.filePermCompat"); p.args("test", type); switch (type) { case "builtin": diff --git a/jdk/test/sun/security/util/FilePermCompat/Flag.java b/jdk/test/sun/security/util/FilePermCompat/Flag.java index 30c97e2892b..dab4cff5b14 100644 --- a/jdk/test/sun/security/util/FilePermCompat/Flag.java +++ b/jdk/test/sun/security/util/FilePermCompat/Flag.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,19 +25,16 @@ * @test * @bug 8164705 * @summary check jdk.filepermission.canonicalize - * @library /java/security/testlibrary/ - * @modules java.base/jdk.internal.misc - * @run main/othervm -Djdk.io.permissionsUseCanonicalPath=true Flag truetrue - * @run main/othervm -Djdk.io.permissionsUseCanonicalPath=false Flag falsetrue - * @run main/othervm Flag falsetrue + * @run main/othervm/policy=flag.policy + * -Djdk.io.permissionsUseCanonicalPath=true Flag true true + * @run main/othervm/policy=flag.policy + * -Djdk.io.permissionsUseCanonicalPath=false Flag false true + * @run main/othervm/policy=flag.policy Flag false true */ import java.io.File; import java.io.FilePermission; import java.lang.*; -import java.security.Permission; -import java.security.Policy; -import java.security.ProtectionDomain; public class Flag { public static void main(String[] args) throws Exception { @@ -51,15 +48,6 @@ public class Flag { FilePermission fp2 = new FilePermission(abs.toString(), "read"); test1 = fp1.equals(fp2); - Policy pol = new Policy() { - @java.lang.Override - public boolean implies(ProtectionDomain domain, Permission permission) { - return fp1.implies(permission); - } - }; - - Policy.setPolicy(pol); - System.setSecurityManager(new SecurityManager()); try { System.getSecurityManager().checkPermission(fp2); test2 = true; @@ -67,8 +55,9 @@ public class Flag { test2 = false; } - if (!args[0].equals(test1 + "" + test2)) { - throw new Exception("Test failed: " + test1 + test2); + if (test1 != Boolean.parseBoolean(args[0]) || + test2 != Boolean.parseBoolean(args[1])) { + throw new Exception("Test failed: " + test1 + " " + test2); } } } diff --git a/jdk/test/sun/security/util/FilePermCompat/flag.policy b/jdk/test/sun/security/util/FilePermCompat/flag.policy new file mode 100644 index 00000000000..70e052a5ac9 --- /dev/null +++ b/jdk/test/sun/security/util/FilePermCompat/flag.policy @@ -0,0 +1,4 @@ +grant { + permission java.io.FilePermission "x", "read"; + permission java.util.PropertyPermission "user.dir", "read"; +}; From b0bb2c00849cd97ad9841ad0207a2a797bb1b032 Mon Sep 17 00:00:00 2001 From: Claes Redestad Date: Wed, 15 Feb 2017 15:57:18 +0100 Subject: [PATCH 203/447] 8175010: ImageReader is not thread-safe Reviewed-by: alanb, jlaskey, chegar --- .../jdk/internal/jimage/ImageReader.java | 70 ++++++++++--------- .../internal/jimage/ImageReaderFactory.java | 27 +++---- 2 files changed, 53 insertions(+), 44 deletions(-) diff --git a/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageReader.java b/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageReader.java index 60ab472db3e..6082c21bee3 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageReader.java +++ b/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageReader.java @@ -52,7 +52,9 @@ import java.util.function.Consumer; * to the jimage file provided by the shipped JDK by tools running on JDK 8. */ public final class ImageReader implements AutoCloseable { - private SharedImageReader reader; + private final SharedImageReader reader; + + private volatile boolean closed; private ImageReader(SharedImageReader reader) { this.reader = reader; @@ -71,45 +73,49 @@ public final class ImageReader implements AutoCloseable { @Override public void close() throws IOException { - if (reader == null) { + if (closed) { throw new IOException("image file already closed"); } - reader.close(this); - reader = null; + closed = true; + } + + private void ensureOpen() throws IOException { + if (closed) { + throw new IOException("image file closed"); + } + } + + private void requireOpen() { + if (closed) { + throw new IllegalStateException("image file closed"); + } } // directory management interface public Directory getRootDirectory() throws IOException { - if (reader == null) { - throw new IOException("image file closed"); - } + ensureOpen(); return reader.getRootDirectory(); } + public Node findNode(String name) throws IOException { - if (reader == null) { - throw new IOException("image file closed"); - } + ensureOpen(); return reader.findNode(name); } public byte[] getResource(Node node) throws IOException { - if (reader == null) { - throw new IOException("image file closed"); - } + ensureOpen(); return reader.getResource(node); } public byte[] getResource(Resource rs) throws IOException { - if (reader == null) { - throw new IOException("image file closed"); - } + ensureOpen(); return reader.getResource(rs); } public ImageHeader getHeader() { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.getHeader(); } @@ -118,42 +124,42 @@ public final class ImageReader implements AutoCloseable { } public String getName() { - Objects.requireNonNull(reader, "image file closed"); - return reader.getName() ; + requireOpen(); + return reader.getName(); } public ByteOrder getByteOrder() { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.getByteOrder(); } public Path getImagePath() { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.getImagePath(); } public ImageStringsReader getStrings() { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.getStrings(); } public ImageLocation findLocation(String mn, String rn) { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.findLocation(mn, rn); } public ImageLocation findLocation(String name) { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.findLocation(name); } public String[] getEntryNames() { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.getEntryNames(); } public String[] getModuleNames() { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); int off = "/modules/".length(); return reader.findNode("/modules") .getChildren() @@ -164,32 +170,32 @@ public final class ImageReader implements AutoCloseable { } public long[] getAttributes(int offset) { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.getAttributes(offset); } public String getString(int offset) { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.getString(offset); } public byte[] getResource(String name) { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.getResource(name); } public byte[] getResource(ImageLocation loc) { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.getResource(loc); } public ByteBuffer getResourceBuffer(ImageLocation loc) { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.getResourceBuffer(loc); } public InputStream getResourceStream(ImageLocation loc) { - Objects.requireNonNull(reader, "image file closed"); + requireOpen(); return reader.getResourceStream(loc); } diff --git a/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageReaderFactory.java b/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageReaderFactory.java index 092b309b0b7..24ac9bfc18a 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageReaderFactory.java +++ b/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageReaderFactory.java @@ -32,6 +32,7 @@ import java.nio.file.Paths; import java.util.concurrent.ConcurrentHashMap; import java.util.Map; import java.util.Objects; +import java.util.function.Function; /** * Factory to get ImageReader @@ -56,21 +57,23 @@ public class ImageReaderFactory { */ public static ImageReader get(Path jimage) throws IOException { Objects.requireNonNull(jimage); - ImageReader reader = readers.get(jimage); - if (reader != null) { - return reader; - } - reader = ImageReader.open(jimage); - // potential race with other threads opening the same URL - ImageReader r = readers.putIfAbsent(jimage, reader); - if (r == null) { - return reader; - } else { - reader.close(); - return r; + try { + return readers.computeIfAbsent(jimage, OPENER); + } catch (UncheckedIOException io) { + throw io.getCause(); } } + private static Function OPENER = new Function() { + public ImageReader apply(Path path) { + try { + return ImageReader.open(path); + } catch (IOException io) { + throw new UncheckedIOException(io); + } + } + }; + /** * Returns the {@code ImageReader} to read the image file in this * run-time image. From 36b02985182696599ef7cd85ccef00e00289ca3a Mon Sep 17 00:00:00 2001 From: George Triantafillou Date: Wed, 15 Feb 2017 11:36:35 -0500 Subject: [PATCH 204/447] 8174855: Quarantine failing test jdk/test/sun/management/HotspotRuntimeMBean/GetSafepointSyncTime.java Reviewed-by: alanb, coleenp --- jdk/test/ProblemList.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt index 0162d67b35c..46be9b535ec 100644 --- a/jdk/test/ProblemList.txt +++ b/jdk/test/ProblemList.txt @@ -147,6 +147,7 @@ java/lang/management/MemoryMXBean/PendingAllGC.sh 8158837 generic- com/sun/management/OperatingSystemMXBean/GetProcessCpuLoad.java 8030957 aix-all com/sun/management/OperatingSystemMXBean/GetSystemCpuLoad.java 8030957 aix-all +sun/management/HotspotRuntimeMBean/GetSafepointSyncTime.java 8174734 generic-all ############################################################################ From 06252eb14f60561e91e4be0b347bbd9ad2e91fb3 Mon Sep 17 00:00:00 2001 From: Paul Sandoz Date: Wed, 15 Feb 2017 09:10:51 -0800 Subject: [PATCH 205/447] 8165035: jar --help-extra should provide information on the -n/--normalize option Reviewed-by: chegar, alanb, mchung, lancea, sherman --- .../share/classes/sun/tools/jar/GNUStyleOptions.java | 2 +- .../share/classes/sun/tools/jar/resources/jar.properties | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/GNUStyleOptions.java b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/GNUStyleOptions.java index a95ccd8e116..dc8c02a6731 100644 --- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/GNUStyleOptions.java +++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/GNUStyleOptions.java @@ -118,7 +118,7 @@ class GNUStyleOptions { void process(Main jartool, String opt, String arg) { jartool.nflag = true; } - boolean isHidden() { return true; } + boolean isExtra() { return true; } }, new Option(true, OptionType.CREATE_UPDATE, "--main-class", "-e") { void process(Main jartool, String opt, String arg) { diff --git a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties index 1228af53738..948b075e932 100644 --- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties +++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties @@ -238,6 +238,11 @@ main.help.opt.any.file=\ \ of the jar (i.e. META-INF/versions/VERSION/) main.help.opt.any.verbose=\ \ -v, --verbose Generate verbose output on standard output +main.help.opt.create=\ +\ Operation modifiers valid only in create mode:\n +main.help.opt.create.normalize=\ +\ -n, --normalize Normalize information in the new jar archive\n\ +\ after creation main.help.opt.create.update=\ \ Operation modifiers valid only in create and update mode:\n main.help.opt.create.update.main-class=\ From 388550d1a446378ed6d839158ab222a9cef88e93 Mon Sep 17 00:00:00 2001 From: Kumar Srinivasan Date: Wed, 15 Feb 2017 09:50:26 -0800 Subject: [PATCH 206/447] 8174715: Javadoc fails on JDK 7 and JDK 8 sources with StringIndexOutOfBoundsException Reviewed-by: jjg --- .../formats/html/HtmlDocletWriter.java | 12 ++---- .../testNonInlineHtmlTagRemoval/C.java | 5 +++ .../testNonInlineHtmlTagRemoval/Negative.java | 29 ++++++++++++++ .../TestNonInlineHtmlTagRemoval.java | 38 ++++++++++++------- .../doclet/testNonInlineHtmlTagRemoval/C.java | 5 +++ .../testNonInlineHtmlTagRemoval/Negative.java | 29 ++++++++++++++ .../TestNonInlineHtmlTagRemoval.java | 20 ++++++++-- 7 files changed, 112 insertions(+), 26 deletions(-) create mode 100644 langtools/test/com/sun/javadoc/testNonInlineHtmlTagRemoval/Negative.java create mode 100644 langtools/test/jdk/javadoc/doclet/testNonInlineHtmlTagRemoval/Negative.java diff --git a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java index 676672d774d..5f2107d4196 100644 --- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java +++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java @@ -1705,7 +1705,6 @@ public class HtmlDocletWriter extends HtmlDocWriter { if (lessThanPos < 0) { return text; } - StringBuilder result = new StringBuilder(); main: while (lessThanPos != -1) { int currPos = lessThanPos + 1; @@ -1740,17 +1739,16 @@ public class HtmlDocletWriter extends HtmlDocWriter { if (ch == '>' && quoteKind == null) { foundGT = true; } - if (++currPos == len) + if (++currPos == len) { break; + } ch = text.charAt(currPos); } - startPos = currPos + 1; - currPos = startPos; + startPos = currPos; } lessThanPos = text.indexOf('<', currPos); } result.append(text.substring(startPos)); - return result.toString(); } @@ -1760,10 +1758,6 @@ public class HtmlDocletWriter extends HtmlDocWriter { ('1' <= ch && ch <= '6'); } - private static boolean isWhitespace(char ch) { - return Character.isWhitespace(ch); - } - /** * Add a link to the stylesheet file. * diff --git a/langtools/test/com/sun/javadoc/testNonInlineHtmlTagRemoval/C.java b/langtools/test/com/sun/javadoc/testNonInlineHtmlTagRemoval/C.java index 09b8a237794..735a2d5f241 100644 --- a/langtools/test/com/sun/javadoc/testNonInlineHtmlTagRemoval/C.java +++ b/langtools/test/com/sun/javadoc/testNonInlineHtmlTagRemoval/C.java @@ -71,4 +71,9 @@ public class C { * caseA
      • end of sentence.
      • more
      */ public void caseA() {} + + /** + * caseB
      A block quote example:
      + */ + public void caseB() {} } diff --git a/langtools/test/com/sun/javadoc/testNonInlineHtmlTagRemoval/Negative.java b/langtools/test/com/sun/javadoc/testNonInlineHtmlTagRemoval/Negative.java new file mode 100644 index 00000000000..0bbe3f3b19a --- /dev/null +++ b/langtools/test/com/sun/javadoc/testNonInlineHtmlTagRemoval/Negative.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +public class Negative { + /** + * case1: A hanging < :
      xx
      < + */ + public void case1() {} +} diff --git a/langtools/test/com/sun/javadoc/testNonInlineHtmlTagRemoval/TestNonInlineHtmlTagRemoval.java b/langtools/test/com/sun/javadoc/testNonInlineHtmlTagRemoval/TestNonInlineHtmlTagRemoval.java index ba371521442..0dc129d70ff 100644 --- a/langtools/test/com/sun/javadoc/testNonInlineHtmlTagRemoval/TestNonInlineHtmlTagRemoval.java +++ b/langtools/test/com/sun/javadoc/testNonInlineHtmlTagRemoval/TestNonInlineHtmlTagRemoval.java @@ -23,7 +23,7 @@ /* * @test - * @bug 8048628 + * @bug 8048628 8174715 * @summary Verify html inline tags are removed correctly in the first sentence. * @library ../lib * @modules jdk.javadoc @@ -39,22 +39,34 @@ public class TestNonInlineHtmlTagRemoval extends JavadocTester { } @Test - void test() { - javadoc("-d", "out", + void testPositive() { + javadoc("-d", "out1", "-sourcepath", testSrc, testSrc("C.java")); checkExit(Exit.OK); checkOutput("C.html", true, - "
      case1 end of sentence.
      ", - "
      case2 end of sentence.
      ", - "
      case3 end of sentence.
      ", - "
      case4 end of sentence.
      ", - "
      case5 end of sentence.
      ", - "
      case6 end of sentence.
      ", - "
      case7 end of sentence.
      ", - "
      case8 end of sentence.
      ", - "
      case9 end of sentence.
      ", - "
      caseA end of sentence.
      "); + "
      case1 end of sentence.
      ", + "
      case2 end of sentence.
      ", + "
      case3 end of sentence.
      ", + "
      case4 end of sentence.
      ", + "
      case5 end of sentence.
      ", + "
      case6 end of sentence.
      ", + "
      case7 end of sentence.
      ", + "
      case8 end of sentence.
      ", + "
      case9 end of sentence.
      ", + "
      caseA end of sentence.
      ", + "
      caseB A block quote example:
      "); + } + + @Test + void testNegative() { + javadoc("-d", "out2", + "-sourcepath", testSrc, + testSrc("Negative.java")); + checkExit(Exit.FAILED); + + checkOutput("Negative.html", true, + "
      case1: A hanging < : xx<
      "); } } diff --git a/langtools/test/jdk/javadoc/doclet/testNonInlineHtmlTagRemoval/C.java b/langtools/test/jdk/javadoc/doclet/testNonInlineHtmlTagRemoval/C.java index 09b8a237794..735a2d5f241 100644 --- a/langtools/test/jdk/javadoc/doclet/testNonInlineHtmlTagRemoval/C.java +++ b/langtools/test/jdk/javadoc/doclet/testNonInlineHtmlTagRemoval/C.java @@ -71,4 +71,9 @@ public class C { * caseA
      • end of sentence.
      • more
      */ public void caseA() {} + + /** + * caseB
      A block quote example:
      + */ + public void caseB() {} } diff --git a/langtools/test/jdk/javadoc/doclet/testNonInlineHtmlTagRemoval/Negative.java b/langtools/test/jdk/javadoc/doclet/testNonInlineHtmlTagRemoval/Negative.java new file mode 100644 index 00000000000..0bbe3f3b19a --- /dev/null +++ b/langtools/test/jdk/javadoc/doclet/testNonInlineHtmlTagRemoval/Negative.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +public class Negative { + /** + * case1: A hanging < :
      xx
      < + */ + public void case1() {} +} diff --git a/langtools/test/jdk/javadoc/doclet/testNonInlineHtmlTagRemoval/TestNonInlineHtmlTagRemoval.java b/langtools/test/jdk/javadoc/doclet/testNonInlineHtmlTagRemoval/TestNonInlineHtmlTagRemoval.java index f1f85b51b0e..b24fb819962 100644 --- a/langtools/test/jdk/javadoc/doclet/testNonInlineHtmlTagRemoval/TestNonInlineHtmlTagRemoval.java +++ b/langtools/test/jdk/javadoc/doclet/testNonInlineHtmlTagRemoval/TestNonInlineHtmlTagRemoval.java @@ -23,7 +23,7 @@ /* * @test - * @bug 8048628 + * @bug 8048628 8174715 * @summary Verify html inline tags are removed correctly in the first sentence. * @library ../lib * @modules jdk.javadoc/jdk.javadoc.internal.tool @@ -39,8 +39,8 @@ public class TestNonInlineHtmlTagRemoval extends JavadocTester { } @Test - void test() { - javadoc("-d", "out", + void testPositive() { + javadoc("-d", "out1", "-sourcepath", testSrc, testSrc("C.java")); checkExit(Exit.OK); @@ -55,6 +55,18 @@ public class TestNonInlineHtmlTagRemoval extends JavadocTester { "
      case7 end of sentence.
      ", "
      case8 end of sentence.
      ", "
      case9 end of sentence.
      ", - "
      caseA end of sentence.
      "); + "
      caseA end of sentence.
      ", + "
      caseB A block quote example:
      "); + } + + @Test + void testNegative() { + javadoc("-d", "out2", + "-sourcepath", testSrc, + testSrc("Negative.java")); + checkExit(Exit.ERROR); + + checkOutput("Negative.html", true, + "
      case1: A hanging < : xx<
      "); } } From dfa7ec7ad860fcb45ea8ac39c7d11987e3bee7ae Mon Sep 17 00:00:00 2001 From: Kumar Srinivasan Date: Wed, 15 Feb 2017 11:23:52 -0800 Subject: [PATCH 207/447] 8173804: javadoc throws UnsupportedOperationException: should not happen Reviewed-by: jjg --- .../internal/doclets/toolkit/util/Utils.java | 10 ++-- .../testMissingType/TestMissingType.java | 50 +++++++++++++++++++ .../doclet/testMissingType/p/MissingType.java | 32 ++++++++++++ 3 files changed, 85 insertions(+), 7 deletions(-) create mode 100644 langtools/test/jdk/javadoc/doclet/testMissingType/TestMissingType.java create mode 100644 langtools/test/jdk/javadoc/doclet/testMissingType/p/MissingType.java diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java index 4cc17b8a287..f2663a3cd91 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java @@ -1885,11 +1885,6 @@ public class Utils { return visit(t.getComponentType()); } - @Override - public String visitPrimitive(PrimitiveType t, Void p) { - return t.toString(); - } - @Override public String visitTypeVariable(javax.lang.model.type.TypeVariable t, Void p) { // The knee jerk reaction is to do this but don't!, as we would like @@ -1900,9 +1895,10 @@ public class Utils { } @Override - protected String defaultAction(TypeMirror e, Void p) { - throw new UnsupportedOperationException("should not happen"); + protected String defaultAction(TypeMirror t, Void p) { + return t.toString(); } + }.visit(t); } diff --git a/langtools/test/jdk/javadoc/doclet/testMissingType/TestMissingType.java b/langtools/test/jdk/javadoc/doclet/testMissingType/TestMissingType.java new file mode 100644 index 00000000000..a4c9e7b4568 --- /dev/null +++ b/langtools/test/jdk/javadoc/doclet/testMissingType/TestMissingType.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8173804 + * @summary make sure doclet can handle missing types + * @library ../lib + * @modules jdk.javadoc/jdk.javadoc.internal.tool + * @build JavadocTester + * @run main TestMissingType + */ + +public class TestMissingType extends JavadocTester { + + public static void main(String... args) throws Exception { + TestMissingType tester = new TestMissingType(); + tester.runTests(); + } + + @Test + void test() { + javadoc("-d", "out", + "-use", + "-sourcepath", testSrc, + "p"); + checkExit(Exit.OK); + checkFiles(true, "p/class-use/MissingType.html"); + } +} diff --git a/langtools/test/jdk/javadoc/doclet/testMissingType/p/MissingType.java b/langtools/test/jdk/javadoc/doclet/testMissingType/p/MissingType.java new file mode 100644 index 00000000000..619b5848736 --- /dev/null +++ b/langtools/test/jdk/javadoc/doclet/testMissingType/p/MissingType.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package p; + +public final class MissingType { + /** + * Do something with a missing type. + * + * @param out use the missing type + */ + public void encode(MissingMe out) {} +} From 286a28f834f6a81584f6a8096138eebfee817bcd Mon Sep 17 00:00:00 2001 From: Jan Lahoda Date: Wed, 15 Feb 2017 20:31:16 +0100 Subject: [PATCH 208/447] 8175038: Wrong note about multiple type/package elements being found Avoiding quoting by a single '. Reviewed-by: jjg --- .../classes/com/sun/tools/javac/resources/compiler.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties index c8d8f054966..d4ccb19ffde 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties @@ -1442,7 +1442,7 @@ compiler.note.proc.messager=\ # 0: string, 1: string, 2: string compiler.note.multiple.elements=\ - Multiple elements named '{1}' in modules '{2}' were found by javax.lang.model.util.Elements.{0}. + Multiple elements named ''{1}'' in modules ''{2}'' were found by javax.lang.model.util.Elements.{0}. ##### From 8dfb222edf2cebb304569ebea30d3b1cc654337b Mon Sep 17 00:00:00 2001 From: Bhavesh Patel Date: Wed, 15 Feb 2017 11:55:16 -0800 Subject: [PATCH 209/447] 8151743: Header can still disappear behind the navbar Reviewed-by: jjg, ksrini --- .../formats/html/HtmlDocletWriter.java | 7 +++ .../doclets/toolkit/resources/script.js | 3 + .../doclets/toolkit/resources/stylesheet.css | 2 +- .../testHtmlVersion/TestHtmlVersion.java | 58 ++++++++++++++++++- .../doclet/testJavascript/TestJavascript.java | 15 ++++- .../doclet/testNavigation/TestNavigation.java | 36 +++++++++++- .../doclet/testStylesheet/TestStylesheet.java | 9 ++- 7 files changed, 120 insertions(+), 10 deletions(-) diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java index 432806b8844..a7dfa8f76ad 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java @@ -647,6 +647,13 @@ public class HtmlDocletWriter extends HtmlDocWriter { tree.addContent(fixedNavDiv); HtmlTree paddingDiv = HtmlTree.DIV(HtmlStyle.navPadding, Contents.SPACE); tree.addContent(paddingDiv); + HtmlTree scriptTree = HtmlTree.SCRIPT(); + String scriptCode = "\n"; + RawHtml scriptContent = new RawHtml(scriptCode.replace("\n", DocletConstants.NL)); + scriptTree.addContent(scriptContent); + tree.addContent(scriptTree); } else { subDiv.addContent(getMarkerAnchor(SectionName.SKIP_NAVBAR_BOTTOM)); tree.addContent(subDiv); diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/script.js b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/script.js index 56c76bdc172..50a08ad366f 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/script.js +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/script.js @@ -92,6 +92,9 @@ function loadScripts(doc, tag) { if (!tagSearchIndex) { createElem(doc, tag, 'tag-search-index.js'); } + $(window).resize(function() { + $('.navPadding').css('padding-top', $('.fixedNav').css("height")); + }); } function createElem(doc, tag, path) { diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css index 98aec12202a..fce177f31b8 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css @@ -144,7 +144,7 @@ Navigation bar styles margin:0; } .navPadding { - padding-top: 100px; + padding-top: 107px; } .fixedNav { position:fixed; diff --git a/langtools/test/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java b/langtools/test/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java index 0ff1c996d5e..b5ca0681671 100644 --- a/langtools/test/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java +++ b/langtools/test/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java @@ -23,7 +23,7 @@ /* * @test - * @bug 8072945 8081854 8141492 8148985 8150188 4649116 8173707 + * @bug 8072945 8081854 8141492 8148985 8150188 4649116 8173707 8151743 * @summary Test the version of HTML generated by the javadoc tool. * @author bpatel * @library ../lib @@ -710,6 +710,10 @@ public class TestHtmlVersion extends JavadocTester { "\n" + "\n" + "
       
      \n" + + "\n" + "
      ", ""); @@ -723,6 +727,10 @@ public class TestHtmlVersion extends JavadocTester { "\n" + "\n" + "
       
      \n" + + "\n" + "
      \n" + "

      Deprecated API

      \n" + "

      Contents

      ", @@ -747,6 +755,10 @@ public class TestHtmlVersion extends JavadocTester { "\n" + "
      \n" + "
       
      \n" + + "\n" + "
      ", "
    19. \n" + "

      Package pkg

      "); @@ -761,6 +773,10 @@ public class TestHtmlVersion extends JavadocTester { "\n" + "
    20. \n" + "
       
      \n" + + "\n" + "
      ", "
      \n" + "

      Class Hierarchy

      ", @@ -779,6 +795,10 @@ public class TestHtmlVersion extends JavadocTester { "\n" + "
      \n" + "
       
      \n" + + "\n" + "
      "); // Negated test for src-html page @@ -797,6 +817,10 @@ public class TestHtmlVersion extends JavadocTester { "\n" + "
      \n" + "
       
      \n" + + "\n" + "
      ", "
        \n" + "
      • \n" @@ -1005,6 +1029,10 @@ public class TestHtmlVersion extends JavadocTester { "\n" + "
      \n" + "
       
      \n" + + "\n" + "
      ", "
      ", "
    21. \n" @@ -1123,6 +1151,10 @@ public class TestHtmlVersion extends JavadocTester { "\n" + "\n" + "
       
      \n" + + "\n" + "
      ", "
    22. "); @@ -1136,6 +1168,10 @@ public class TestHtmlVersion extends JavadocTester { "\n" + "\n" + "
       
      \n" + + "\n" + "
      \n" + "

      Deprecated API

      \n" + "

      Contents

      ", @@ -1160,6 +1196,10 @@ public class TestHtmlVersion extends JavadocTester { "\n" + "
      \n" + "
       
      \n" + + "\n" + "
      ", "
    23. \n" + "

      Package pkg

      "); @@ -1175,6 +1215,10 @@ public class TestHtmlVersion extends JavadocTester { "\n" + "
    24. \n" + "
       
      \n" + + "\n" + "
      ", "

      Hierarchy For All Packages

      \n" + "Package Hierarchies:", @@ -1195,6 +1239,10 @@ public class TestHtmlVersion extends JavadocTester { "\n" + "
      \n" + "
       
      \n" + + "\n" + "
      "); // Test for src-html page @@ -1213,6 +1261,10 @@ public class TestHtmlVersion extends JavadocTester { "\n" + "
      \n" + "
       
      \n" + + "\n" + "
      ", "
        \n" + "
      • \n" @@ -1421,6 +1473,10 @@ public class TestHtmlVersion extends JavadocTester { "\n" + "
      \n" + "
       
      \n" + + "\n" + "
      ", "
      ", "
    25. \n" diff --git a/langtools/test/jdk/javadoc/doclet/testJavascript/TestJavascript.java b/langtools/test/jdk/javadoc/doclet/testJavascript/TestJavascript.java index 246265efcac..4b27ccd34a5 100644 --- a/langtools/test/jdk/javadoc/doclet/testJavascript/TestJavascript.java +++ b/langtools/test/jdk/javadoc/doclet/testJavascript/TestJavascript.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ /* * @test - * @bug 4665566 4855876 7025314 8012375 8015997 8016328 8024756 8148985 8151921 + * @bug 4665566 4855876 7025314 8012375 8015997 8016328 8024756 8148985 8151921 8151743 * @summary Verify that the output has the right javascript. * @author jamieh * @library ../lib @@ -47,7 +47,11 @@ public class TestJavascript extends JavadocTester { checkExit(Exit.OK); checkOutput("pkg/C.html", true, - "Frames"); + "Frames", + ""); checkOutput("TestJavascript.html", true, "Frames"); @@ -119,5 +123,10 @@ public class TestJavascript extends JavadocTester { + " }\n" + " catch(err) {\n" + " }"); + + checkOutput("script.js", true, + "$(window).resize(function() {\n" + + " $('.navPadding').css('padding-top', $('.fixedNav').css(\"height\"));\n" + + " });"); } } diff --git a/langtools/test/jdk/javadoc/doclet/testNavigation/TestNavigation.java b/langtools/test/jdk/javadoc/doclet/testNavigation/TestNavigation.java index f8a50424202..2f219a7e3e1 100644 --- a/langtools/test/jdk/javadoc/doclet/testNavigation/TestNavigation.java +++ b/langtools/test/jdk/javadoc/doclet/testNavigation/TestNavigation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ /* * @test - * @bug 4131628 4664607 7025314 8023700 7198273 8025633 8026567 8081854 8150188 + * @bug 4131628 4664607 7025314 8023700 7198273 8025633 8026567 8081854 8150188 8151743 * @summary Make sure the Next/Prev Class links iterate through all types. * Make sure the navagation is 2 columns, not 3. * @author jamieh @@ -77,12 +77,20 @@ public class TestNavigation extends JavadocTester { "\n" + "\n" + "
       
      \n" + + "\n" + ""); checkOutput("pkg/package-summary.html", true, "\n" + "\n" + "
       
      \n" + + "\n" + "
      "); } @@ -98,6 +106,10 @@ public class TestNavigation extends JavadocTester { "\n" + "
      \n" + "
       
      \n" + + "\n" + "\n" + "\n" + ""); @@ -106,6 +118,10 @@ public class TestNavigation extends JavadocTester { "\n" + "\n" + "
       
      \n" + + "\n" + ""); } @@ -121,12 +137,20 @@ public class TestNavigation extends JavadocTester { "\n" + "\n" + "
       
      \n" + + "\n" + ""); checkOutput("pkg/package-summary.html", false, "\n" + "\n" + "
       
      \n" + + "\n" + "
      "); } @@ -142,6 +166,10 @@ public class TestNavigation extends JavadocTester { "\n" + "
      \n" + "
       
      \n" + + "\n" + "\n" + "\n" + ""); @@ -150,6 +178,10 @@ public class TestNavigation extends JavadocTester { "\n" + "\n" + "
       
      \n" + + "\n" + ""); } } diff --git a/langtools/test/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java b/langtools/test/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java index c54e98cc11c..944d99494b7 100644 --- a/langtools/test/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java +++ b/langtools/test/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ /* * @test - * @bug 4494033 7028815 7052425 8007338 8023608 8008164 8016549 8072461 8154261 8162363 8160196 + * @bug 4494033 7028815 7052425 8007338 8023608 8008164 8016549 8072461 8154261 8162363 8160196 8151743 * @summary Run tests on doclet stylesheet. * @author jamieh * @library ../lib @@ -159,7 +159,10 @@ public class TestStylesheet extends JavadocTester { + " float:none;\n" + " display:inline;\n" + "}", - "@import url('resources/fonts/dejavu.css');"); + "@import url('resources/fonts/dejavu.css');", + ".navPadding {\n" + + " padding-top: 107px;\n" + + "}"); // Test whether a link to the stylesheet file is inserted properly // in the class documentation. From b284200a903f2203029288cc68d736e423910207 Mon Sep 17 00:00:00 2001 From: Xueming Shen Date: Wed, 15 Feb 2017 12:11:03 -0800 Subject: [PATCH 210/447] 8173207: Upgrade compression library Reviewed-by: alanb, erikj --- jdk/make/launcher/Launcher-jdk.pack.gmk | 2 +- jdk/make/lib/Awt2dLibraries.gmk | 2 +- jdk/make/lib/CoreLibraries.gmk | 4 +- jdk/make/lib/LibCommon.gmk | 2 +- .../share/native/libzip/zlib-1.2.8/gzclose.c | 49 - .../share/native/libzip/zlib-1.2.8/gzguts.h | 233 ----- .../share/native/libzip/zlib-1.2.8/gzlib.c | 658 -------------- .../share/native/libzip/zlib-1.2.8/gzread.c | 618 ------------- .../share/native/libzip/zlib-1.2.8/gzwrite.c | 601 ------------ .../libzip/zlib-1.2.8/patches/ChangeLog_java | 10 - .../share/native/libzip/zlib-1.2.8/uncompr.c | 83 -- .../libzip/{zlib-1.2.8 => zlib}/ChangeLog | 55 +- .../native/libzip/{zlib-1.2.8 => zlib}/README | 6 +- .../libzip/{zlib-1.2.8 => zlib}/compress.c | 42 +- .../libzip/{zlib-1.2.8 => zlib}/crc32.h | 0 .../libzip/{zlib-1.2.8 => zlib}/deflate.c | 860 +++++++++++------- .../libzip/{zlib-1.2.8 => zlib}/deflate.h | 35 +- .../libzip/{zlib-1.2.8 => zlib}/infback.c | 4 +- .../libzip/{zlib-1.2.8 => zlib}/inffast.c | 85 +- .../libzip/{zlib-1.2.8 => zlib}/inffast.h | 0 .../libzip/{zlib-1.2.8 => zlib}/inffixed.h | 0 .../libzip/{zlib-1.2.8 => zlib}/inflate.c | 123 ++- .../libzip/{zlib-1.2.8 => zlib}/inflate.h | 11 +- .../libzip/{zlib-1.2.8 => zlib}/inftrees.c | 26 +- .../libzip/{zlib-1.2.8 => zlib}/inftrees.h | 0 .../native/libzip/zlib/patches/ChangeLog_java | 67 ++ .../libzip/{zlib-1.2.8 => zlib}/trees.c | 99 +- .../libzip/{zlib-1.2.8 => zlib}/trees.h | 0 .../share/native/libzip/zlib/uncompr.c | 117 +++ .../libzip/{zlib-1.2.8 => zlib}/zadler32.c | 21 +- .../libzip/{zlib-1.2.8 => zlib}/zconf.h | 43 +- .../libzip/{zlib-1.2.8 => zlib}/zcrc32.c | 41 +- .../native/libzip/{zlib-1.2.8 => zlib}/zlib.h | 444 ++++++--- .../libzip/{zlib-1.2.8 => zlib}/zutil.c | 54 +- .../libzip/{zlib-1.2.8 => zlib}/zutil.h | 52 +- 35 files changed, 1426 insertions(+), 3021 deletions(-) delete mode 100644 jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzclose.c delete mode 100644 jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzguts.h delete mode 100644 jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzlib.c delete mode 100644 jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzread.c delete mode 100644 jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzwrite.c delete mode 100644 jdk/src/java.base/share/native/libzip/zlib-1.2.8/patches/ChangeLog_java delete mode 100644 jdk/src/java.base/share/native/libzip/zlib-1.2.8/uncompr.c rename jdk/src/java.base/share/native/libzip/{zlib-1.2.8 => zlib}/ChangeLog (96%) rename jdk/src/java.base/share/native/libzip/{zlib-1.2.8 => zlib}/README (96%) rename jdk/src/java.base/share/native/libzip/{zlib-1.2.8 => zlib}/compress.c (81%) rename jdk/src/java.base/share/native/libzip/{zlib-1.2.8 => zlib}/crc32.h (100%) rename jdk/src/java.base/share/native/libzip/{zlib-1.2.8 => zlib}/deflate.c (76%) rename jdk/src/java.base/share/native/libzip/{zlib-1.2.8 => zlib}/deflate.h (93%) rename jdk/src/java.base/share/native/libzip/{zlib-1.2.8 => zlib}/infback.c (99%) rename jdk/src/java.base/share/native/libzip/{zlib-1.2.8 => zlib}/inffast.c (86%) rename jdk/src/java.base/share/native/libzip/{zlib-1.2.8 => zlib}/inffast.h (100%) rename jdk/src/java.base/share/native/libzip/{zlib-1.2.8 => zlib}/inffixed.h (100%) rename jdk/src/java.base/share/native/libzip/{zlib-1.2.8 => zlib}/inflate.c (94%) rename jdk/src/java.base/share/native/libzip/{zlib-1.2.8 => zlib}/inflate.h (94%) rename jdk/src/java.base/share/native/libzip/{zlib-1.2.8 => zlib}/inftrees.c (96%) rename jdk/src/java.base/share/native/libzip/{zlib-1.2.8 => zlib}/inftrees.h (100%) create mode 100644 jdk/src/java.base/share/native/libzip/zlib/patches/ChangeLog_java rename jdk/src/java.base/share/native/libzip/{zlib-1.2.8 => zlib}/trees.c (95%) rename jdk/src/java.base/share/native/libzip/{zlib-1.2.8 => zlib}/trees.h (100%) create mode 100644 jdk/src/java.base/share/native/libzip/zlib/uncompr.c rename jdk/src/java.base/share/native/libzip/{zlib-1.2.8 => zlib}/zadler32.c (93%) rename jdk/src/java.base/share/native/libzip/{zlib-1.2.8 => zlib}/zconf.h (93%) rename jdk/src/java.base/share/native/libzip/{zlib-1.2.8 => zlib}/zcrc32.c (92%) rename jdk/src/java.base/share/native/libzip/{zlib-1.2.8 => zlib}/zlib.h (82%) rename jdk/src/java.base/share/native/libzip/{zlib-1.2.8 => zlib}/zutil.c (88%) rename jdk/src/java.base/share/native/libzip/{zlib-1.2.8 => zlib}/zutil.h (89%) diff --git a/jdk/make/launcher/Launcher-jdk.pack.gmk b/jdk/make/launcher/Launcher-jdk.pack.gmk index 2ee08c767bf..4fe0fdf411f 100644 --- a/jdk/make/launcher/Launcher-jdk.pack.gmk +++ b/jdk/make/launcher/Launcher-jdk.pack.gmk @@ -44,7 +44,7 @@ ifeq ($(USE_EXTERNAL_LIBZ), true) UNPACKEXE_CFLAGS += -DSYSTEM_ZLIB UNPACKEXE_LIBS := -lz else - UNPACKEXE_CFLAGS += -I$(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8 + UNPACKEXE_CFLAGS += -I$(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib UNPACKEXE_ZIPOBJS := $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/zcrc32$(OBJ_SUFFIX) \ $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/deflate$(OBJ_SUFFIX) \ $(SUPPORT_OUTPUTDIR)/native/java.base/libzip/trees$(OBJ_SUFFIX) \ diff --git a/jdk/make/lib/Awt2dLibraries.gmk b/jdk/make/lib/Awt2dLibraries.gmk index 743422b0afe..9407f91b329 100644 --- a/jdk/make/lib/Awt2dLibraries.gmk +++ b/jdk/make/lib/Awt2dLibraries.gmk @@ -889,7 +889,7 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false) LIBSPLASHSCREEN_LIBS := ifneq ($(USE_EXTERNAL_LIBZ), true) - LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8 + LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib LIBSPLASHSCREEN_CFLAGS += $(ZLIB_CPPFLAGS) endif diff --git a/jdk/make/lib/CoreLibraries.gmk b/jdk/make/lib/CoreLibraries.gmk index 3ec50824202..5bb93942087 100644 --- a/jdk/make/lib/CoreLibraries.gmk +++ b/jdk/make/lib/CoreLibraries.gmk @@ -202,7 +202,7 @@ $(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM) BUILD_LIBZIP_EXCLUDES := ifeq ($(USE_EXTERNAL_LIBZ), true) - LIBZIP_EXCLUDES += zlib-1.2.8 + LIBZIP_EXCLUDES += zlib endif BUILD_LIBZIP_REORDER := @@ -343,7 +343,7 @@ LIBJLI_CFLAGS += $(addprefix -I, $(LIBJLI_SRC_DIRS)) ifneq ($(USE_EXTERNAL_LIBZ), true) LIBJLI_CFLAGS += $(ZLIB_CPPFLAGS) LIBJLI_EXTRA_FILES += \ - $(addprefix $(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8/, \ + $(addprefix $(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib/, \ inflate.c \ inftrees.c \ inffast.c \ diff --git a/jdk/make/lib/LibCommon.gmk b/jdk/make/lib/LibCommon.gmk index f326842d0d9..4e1cab991aa 100644 --- a/jdk/make/lib/LibCommon.gmk +++ b/jdk/make/lib/LibCommon.gmk @@ -73,7 +73,7 @@ INSTALL_LIBRARIES_HERE := $(call FindLibDirForModule, $(MODULE)) ifeq ($(USE_EXTERNAL_LIBZ), true) LIBZ := -lz else - ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8 + ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib endif ############################################################################### diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzclose.c b/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzclose.c deleted file mode 100644 index 5cce4b03d2f..00000000000 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzclose.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* gzclose.c -- zlib gzclose() function - * Copyright (C) 2004, 2010 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "gzguts.h" - -/* gzclose() is in a separate file so that it is linked in only if it is used. - That way the other gzclose functions can be used instead to avoid linking in - unneeded compression or decompression routines. */ -int ZEXPORT gzclose(file) - gzFile file; -{ -#ifndef NO_GZCOMPRESS - gz_statep state; - - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - - return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); -#else - return gzclose_r(file); -#endif -} diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzguts.h b/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzguts.h deleted file mode 100644 index 5889f45c784..00000000000 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzguts.h +++ /dev/null @@ -1,233 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* gzguts.h -- zlib internal header definitions for gz* operations - * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#ifdef _LARGEFILE64_SOURCE -# ifndef _LARGEFILE_SOURCE -# define _LARGEFILE_SOURCE 1 -# endif -# ifdef _FILE_OFFSET_BITS -# undef _FILE_OFFSET_BITS -# endif -#endif - -#ifdef HAVE_HIDDEN -# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) -#else -# define ZLIB_INTERNAL -#endif - -#include -#include "zlib.h" -#ifdef STDC -# include -# include -# include -#endif -#include - -#ifdef _WIN32 -# include -#endif - -#if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32) -# include -#endif - -#ifdef WINAPI_FAMILY -# define open _open -# define read _read -# define write _write -# define close _close -#endif - -#ifdef NO_DEFLATE /* for compatibility with old definition */ -# define NO_GZCOMPRESS -#endif - -#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) -# ifndef HAVE_VSNPRINTF -# define HAVE_VSNPRINTF -# endif -#endif - -#if defined(__CYGWIN__) -# ifndef HAVE_VSNPRINTF -# define HAVE_VSNPRINTF -# endif -#endif - -#if defined(MSDOS) && defined(__BORLANDC__) && (BORLANDC > 0x410) -# ifndef HAVE_VSNPRINTF -# define HAVE_VSNPRINTF -# endif -#endif - -#ifndef HAVE_VSNPRINTF -# ifdef MSDOS -/* vsnprintf may exist on some MS-DOS compilers (DJGPP?), - but for now we just assume it doesn't. */ -# define NO_vsnprintf -# endif -# ifdef __TURBOC__ -# define NO_vsnprintf -# endif -# ifdef WIN32 -/* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */ -# if !defined(vsnprintf) && !defined(NO_vsnprintf) -# if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 ) -# define vsnprintf _vsnprintf -# endif -# endif -# endif -# ifdef __SASC -# define NO_vsnprintf -# endif -# ifdef VMS -# define NO_vsnprintf -# endif -# ifdef __OS400__ -# define NO_vsnprintf -# endif -# ifdef __MVS__ -# define NO_vsnprintf -# endif -#endif - -/* unlike snprintf (which is required in C99, yet still not supported by - Microsoft more than a decade later!), _snprintf does not guarantee null - termination of the result -- however this is only used in gzlib.c where - the result is assured to fit in the space provided */ -#ifdef _MSC_VER -# define snprintf _snprintf -#endif - -#ifndef local -# define local static -#endif -/* compile with -Dlocal if your debugger can't find static symbols */ - -/* gz* functions always use library allocation functions */ -#ifndef STDC - extern voidp malloc OF((uInt size)); - extern void free OF((voidpf ptr)); -#endif - -/* get errno and strerror definition */ -#if defined UNDER_CE -# include -# define zstrerror() gz_strwinerror((DWORD)GetLastError()) -#else -# ifndef NO_STRERROR -# include -# define zstrerror() strerror(errno) -# else -# define zstrerror() "stdio error (consult errno)" -# endif -#endif - -/* provide prototypes for these when building zlib without LFS */ -#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); - ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); -#endif - -/* default memLevel */ -#if MAX_MEM_LEVEL >= 8 -# define DEF_MEM_LEVEL 8 -#else -# define DEF_MEM_LEVEL MAX_MEM_LEVEL -#endif - -/* default i/o buffer size -- double this for output when reading (this and - twice this must be able to fit in an unsigned type) */ -#define GZBUFSIZE 8192 - -/* gzip modes, also provide a little integrity check on the passed structure */ -#define GZ_NONE 0 -#define GZ_READ 7247 -#define GZ_WRITE 31153 -#define GZ_APPEND 1 /* mode set to GZ_WRITE after the file is opened */ - -/* values for gz_state how */ -#define LOOK 0 /* look for a gzip header */ -#define COPY 1 /* copy input directly */ -#define GZIP 2 /* decompress a gzip stream */ - -/* internal gzip file state data structure */ -typedef struct { - /* exposed contents for gzgetc() macro */ - struct gzFile_s x; /* "x" for exposed */ - /* x.have: number of bytes available at x.next */ - /* x.next: next output data to deliver or write */ - /* x.pos: current position in uncompressed data */ - /* used for both reading and writing */ - int mode; /* see gzip modes above */ - int fd; /* file descriptor */ - char *path; /* path or fd for error messages */ - unsigned size; /* buffer size, zero if not allocated yet */ - unsigned want; /* requested buffer size, default is GZBUFSIZE */ - unsigned char *in; /* input buffer */ - unsigned char *out; /* output buffer (double-sized when reading) */ - int direct; /* 0 if processing gzip, 1 if transparent */ - /* just for reading */ - int how; /* 0: get header, 1: copy, 2: decompress */ - z_off64_t start; /* where the gzip data started, for rewinding */ - int eof; /* true if end of input file reached */ - int past; /* true if read requested past end */ - /* just for writing */ - int level; /* compression level */ - int strategy; /* compression strategy */ - /* seek request */ - z_off64_t skip; /* amount to skip (already rewound if backwards) */ - int seek; /* true if seek request pending */ - /* error information */ - int err; /* error code */ - char *msg; /* error message */ - /* zlib inflate or deflate stream */ - z_stream strm; /* stream structure in-place (not a pointer) */ -} gz_state; -typedef gz_state FAR *gz_statep; - -/* shared functions */ -void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *)); -#if defined UNDER_CE -char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error)); -#endif - -/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t - value -- needed when comparing unsigned to z_off64_t, which is signed - (possible z_off64_t types off_t, off64_t, and long are all signed) */ -#ifdef INT_MAX -# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX) -#else -unsigned ZLIB_INTERNAL gz_intmax OF((void)); -# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) -#endif diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzlib.c b/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzlib.c deleted file mode 100644 index 4dce9b96ef7..00000000000 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzlib.c +++ /dev/null @@ -1,658 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* gzlib.c -- zlib functions common to reading and writing gzip files - * Copyright (C) 2004, 2010, 2011, 2012, 2013 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "gzguts.h" - -#if defined(_WIN32) && !defined(__BORLANDC__) -# define LSEEK _lseeki64 -#else -#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 -# define LSEEK lseek64 -#else -# define LSEEK lseek -#endif -#endif - -/* Local functions */ -local void gz_reset OF((gz_statep)); -local gzFile gz_open OF((const void *, int, const char *)); - -#if defined UNDER_CE - -/* Map the Windows error number in ERROR to a locale-dependent error message - string and return a pointer to it. Typically, the values for ERROR come - from GetLastError. - - The string pointed to shall not be modified by the application, but may be - overwritten by a subsequent call to gz_strwinerror - - The gz_strwinerror function does not change the current setting of - GetLastError. */ -char ZLIB_INTERNAL *gz_strwinerror (error) - DWORD error; -{ - static char buf[1024]; - - wchar_t *msgbuf; - DWORD lasterr = GetLastError(); - DWORD chars = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM - | FORMAT_MESSAGE_ALLOCATE_BUFFER, - NULL, - error, - 0, /* Default language */ - (LPVOID)&msgbuf, - 0, - NULL); - if (chars != 0) { - /* If there is an \r\n appended, zap it. */ - if (chars >= 2 - && msgbuf[chars - 2] == '\r' && msgbuf[chars - 1] == '\n') { - chars -= 2; - msgbuf[chars] = 0; - } - - if (chars > sizeof (buf) - 1) { - chars = sizeof (buf) - 1; - msgbuf[chars] = 0; - } - - wcstombs(buf, msgbuf, chars + 1); - LocalFree(msgbuf); - } - else { - sprintf(buf, "unknown win32 error (%ld)", error); - } - - SetLastError(lasterr); - return buf; -} - -#endif /* UNDER_CE */ - -/* Reset gzip file state */ -local void gz_reset(state) - gz_statep state; -{ - state->x.have = 0; /* no output data available */ - if (state->mode == GZ_READ) { /* for reading ... */ - state->eof = 0; /* not at end of file */ - state->past = 0; /* have not read past end yet */ - state->how = LOOK; /* look for gzip header */ - } - state->seek = 0; /* no seek request pending */ - gz_error(state, Z_OK, NULL); /* clear error */ - state->x.pos = 0; /* no uncompressed data yet */ - state->strm.avail_in = 0; /* no input data yet */ -} - -/* Open a gzip file either by name or file descriptor. */ -local gzFile gz_open(path, fd, mode) - const void *path; - int fd; - const char *mode; -{ - gz_statep state; - size_t len; - int oflag; -#ifdef O_CLOEXEC - int cloexec = 0; -#endif -#ifdef O_EXCL - int exclusive = 0; -#endif - - /* check input */ - if (path == NULL) - return NULL; - - /* allocate gzFile structure to return */ - state = (gz_statep)malloc(sizeof(gz_state)); - if (state == NULL) - return NULL; - state->size = 0; /* no buffers allocated yet */ - state->want = GZBUFSIZE; /* requested buffer size */ - state->msg = NULL; /* no error message yet */ - - /* interpret mode */ - state->mode = GZ_NONE; - state->level = Z_DEFAULT_COMPRESSION; - state->strategy = Z_DEFAULT_STRATEGY; - state->direct = 0; - while (*mode) { - if (*mode >= '0' && *mode <= '9') - state->level = *mode - '0'; - else - switch (*mode) { - case 'r': - state->mode = GZ_READ; - break; -#ifndef NO_GZCOMPRESS - case 'w': - state->mode = GZ_WRITE; - break; - case 'a': - state->mode = GZ_APPEND; - break; -#endif - case '+': /* can't read and write at the same time */ - free(state); - return NULL; - case 'b': /* ignore -- will request binary anyway */ - break; -#ifdef O_CLOEXEC - case 'e': - cloexec = 1; - break; -#endif -#ifdef O_EXCL - case 'x': - exclusive = 1; - break; -#endif - case 'f': - state->strategy = Z_FILTERED; - break; - case 'h': - state->strategy = Z_HUFFMAN_ONLY; - break; - case 'R': - state->strategy = Z_RLE; - break; - case 'F': - state->strategy = Z_FIXED; - break; - case 'T': - state->direct = 1; - break; - default: /* could consider as an error, but just ignore */ - ; - } - mode++; - } - - /* must provide an "r", "w", or "a" */ - if (state->mode == GZ_NONE) { - free(state); - return NULL; - } - - /* can't force transparent read */ - if (state->mode == GZ_READ) { - if (state->direct) { - free(state); - return NULL; - } - state->direct = 1; /* for empty file */ - } - - /* save the path name for error messages */ -#ifdef _WIN32 - if (fd == -2) { - len = wcstombs(NULL, path, 0); - if (len == (size_t)-1) - len = 0; - } - else -#endif - len = strlen((const char *)path); - state->path = (char *)malloc(len + 1); - if (state->path == NULL) { - free(state); - return NULL; - } -#ifdef _WIN32 - if (fd == -2) - if (len) - wcstombs(state->path, path, len + 1); - else - *(state->path) = 0; - else -#endif -#if !defined(NO_snprintf) && !defined(NO_vsnprintf) - snprintf(state->path, len + 1, "%s", (const char *)path); -#else - strcpy(state->path, path); -#endif - - /* compute the flags for open() */ - oflag = -#ifdef O_LARGEFILE - O_LARGEFILE | -#endif -#ifdef O_BINARY - O_BINARY | -#endif -#ifdef O_CLOEXEC - (cloexec ? O_CLOEXEC : 0) | -#endif - (state->mode == GZ_READ ? - O_RDONLY : - (O_WRONLY | O_CREAT | -#ifdef O_EXCL - (exclusive ? O_EXCL : 0) | -#endif - (state->mode == GZ_WRITE ? - O_TRUNC : - O_APPEND))); - - /* open the file with the appropriate flags (or just use fd) */ - state->fd = fd > -1 ? fd : ( -#ifdef _WIN32 - fd == -2 ? _wopen(path, oflag, 0666) : -#endif - open((const char *)path, oflag, 0666)); - if (state->fd == -1) { - free(state->path); - free(state); - return NULL; - } - if (state->mode == GZ_APPEND) - state->mode = GZ_WRITE; /* simplify later checks */ - - /* save the current position for rewinding (only if reading) */ - if (state->mode == GZ_READ) { - state->start = LSEEK(state->fd, 0, SEEK_CUR); - if (state->start == -1) state->start = 0; - } - - /* initialize stream */ - gz_reset(state); - - /* return stream */ - return (gzFile)state; -} - -/* -- see zlib.h -- */ -gzFile ZEXPORT gzopen(path, mode) - const char *path; - const char *mode; -{ - return gz_open(path, -1, mode); -} - -/* -- see zlib.h -- */ -gzFile ZEXPORT gzopen64(path, mode) - const char *path; - const char *mode; -{ - return gz_open(path, -1, mode); -} - -/* -- see zlib.h -- */ -gzFile ZEXPORT gzdopen(fd, mode) - int fd; - const char *mode; -{ - char *path; /* identifier for error messages */ - gzFile gz; - - if (fd == -1 || (path = (char *)malloc(7 + 3 * sizeof(int))) == NULL) - return NULL; -#if !defined(NO_snprintf) && !defined(NO_vsnprintf) - snprintf(path, 7 + 3 * sizeof(int), "", fd); /* for debugging */ -#else - sprintf(path, "", fd); /* for debugging */ -#endif - gz = gz_open(path, fd, mode); - free(path); - return gz; -} - -/* -- see zlib.h -- */ -#ifdef _WIN32 -gzFile ZEXPORT gzopen_w(path, mode) - const wchar_t *path; - const char *mode; -{ - return gz_open(path, -2, mode); -} -#endif - -/* -- see zlib.h -- */ -int ZEXPORT gzbuffer(file, size) - gzFile file; - unsigned size; -{ - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return -1; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return -1; - - /* make sure we haven't already allocated memory */ - if (state->size != 0) - return -1; - - /* check and set requested size */ - if (size < 2) - size = 2; /* need two bytes to check magic header */ - state->want = size; - return 0; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzrewind(file) - gzFile file; -{ - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - - /* check that we're reading and that there's no error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) - return -1; - - /* back up and start over */ - if (LSEEK(state->fd, state->start, SEEK_SET) == -1) - return -1; - gz_reset(state); - return 0; -} - -/* -- see zlib.h -- */ -z_off64_t ZEXPORT gzseek64(file, offset, whence) - gzFile file; - z_off64_t offset; - int whence; -{ - unsigned n; - z_off64_t ret; - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return -1; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return -1; - - /* check that there's no error */ - if (state->err != Z_OK && state->err != Z_BUF_ERROR) - return -1; - - /* can only seek from start or relative to current position */ - if (whence != SEEK_SET && whence != SEEK_CUR) - return -1; - - /* normalize offset to a SEEK_CUR specification */ - if (whence == SEEK_SET) - offset -= state->x.pos; - else if (state->seek) - offset += state->skip; - state->seek = 0; - - /* if within raw area while reading, just go there */ - if (state->mode == GZ_READ && state->how == COPY && - state->x.pos + offset >= 0) { - ret = LSEEK(state->fd, offset - state->x.have, SEEK_CUR); - if (ret == -1) - return -1; - state->x.have = 0; - state->eof = 0; - state->past = 0; - state->seek = 0; - gz_error(state, Z_OK, NULL); - state->strm.avail_in = 0; - state->x.pos += offset; - return state->x.pos; - } - - /* calculate skip amount, rewinding if needed for back seek when reading */ - if (offset < 0) { - if (state->mode != GZ_READ) /* writing -- can't go backwards */ - return -1; - offset += state->x.pos; - if (offset < 0) /* before start of file! */ - return -1; - if (gzrewind(file) == -1) /* rewind, then skip to offset */ - return -1; - } - - /* if reading, skip what's in output buffer (one less gzgetc() check) */ - if (state->mode == GZ_READ) { - n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > offset ? - (unsigned)offset : state->x.have; - state->x.have -= n; - state->x.next += n; - state->x.pos += n; - offset -= n; - } - - /* request skip (if not zero) */ - if (offset) { - state->seek = 1; - state->skip = offset; - } - return state->x.pos + offset; -} - -/* -- see zlib.h -- */ -z_off_t ZEXPORT gzseek(file, offset, whence) - gzFile file; - z_off_t offset; - int whence; -{ - z_off64_t ret; - - ret = gzseek64(file, (z_off64_t)offset, whence); - return ret == (z_off_t)ret ? (z_off_t)ret : -1; -} - -/* -- see zlib.h -- */ -z_off64_t ZEXPORT gztell64(file) - gzFile file; -{ - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return -1; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return -1; - - /* return position */ - return state->x.pos + (state->seek ? state->skip : 0); -} - -/* -- see zlib.h -- */ -z_off_t ZEXPORT gztell(file) - gzFile file; -{ - z_off64_t ret; - - ret = gztell64(file); - return ret == (z_off_t)ret ? (z_off_t)ret : -1; -} - -/* -- see zlib.h -- */ -z_off64_t ZEXPORT gzoffset64(file) - gzFile file; -{ - z_off64_t offset; - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return -1; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return -1; - - /* compute and return effective offset in file */ - offset = LSEEK(state->fd, 0, SEEK_CUR); - if (offset == -1) - return -1; - if (state->mode == GZ_READ) /* reading */ - offset -= state->strm.avail_in; /* don't count buffered input */ - return offset; -} - -/* -- see zlib.h -- */ -z_off_t ZEXPORT gzoffset(file) - gzFile file; -{ - z_off64_t ret; - - ret = gzoffset64(file); - return ret == (z_off_t)ret ? (z_off_t)ret : -1; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzeof(file) - gzFile file; -{ - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return 0; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return 0; - - /* return end-of-file state */ - return state->mode == GZ_READ ? state->past : 0; -} - -/* -- see zlib.h -- */ -const char * ZEXPORT gzerror(file, errnum) - gzFile file; - int *errnum; -{ - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return NULL; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return NULL; - - /* return error information */ - if (errnum != NULL) - *errnum = state->err; - return state->err == Z_MEM_ERROR ? "out of memory" : - (state->msg == NULL ? "" : state->msg); -} - -/* -- see zlib.h -- */ -void ZEXPORT gzclearerr(file) - gzFile file; -{ - gz_statep state; - - /* get internal structure and check integrity */ - if (file == NULL) - return; - state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) - return; - - /* clear error and end-of-file */ - if (state->mode == GZ_READ) { - state->eof = 0; - state->past = 0; - } - gz_error(state, Z_OK, NULL); -} - -/* Create an error message in allocated memory and set state->err and - state->msg accordingly. Free any previous error message already there. Do - not try to free or allocate space if the error is Z_MEM_ERROR (out of - memory). Simply save the error message as a static string. If there is an - allocation failure constructing the error message, then convert the error to - out of memory. */ -void ZLIB_INTERNAL gz_error(state, err, msg) - gz_statep state; - int err; - const char *msg; -{ - /* free previously allocated message and clear */ - if (state->msg != NULL) { - if (state->err != Z_MEM_ERROR) - free(state->msg); - state->msg = NULL; - } - - /* if fatal, set state->x.have to 0 so that the gzgetc() macro fails */ - if (err != Z_OK && err != Z_BUF_ERROR) - state->x.have = 0; - - /* set error code, and if no message, then done */ - state->err = err; - if (msg == NULL) - return; - - /* for an out of memory error, return literal string when requested */ - if (err == Z_MEM_ERROR) - return; - - /* construct error message with path */ - if ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) == - NULL) { - state->err = Z_MEM_ERROR; - return; - } -#if !defined(NO_snprintf) && !defined(NO_vsnprintf) - snprintf(state->msg, strlen(state->path) + strlen(msg) + 3, - "%s%s%s", state->path, ": ", msg); -#else - strcpy(state->msg, state->path); - strcat(state->msg, ": "); - strcat(state->msg, msg); -#endif - return; -} - -#ifndef INT_MAX -/* portably return maximum value for an int (when limits.h presumed not - available) -- we need to do this to cover cases where 2's complement not - used, since C standard permits 1's complement and sign-bit representations, - otherwise we could just use ((unsigned)-1) >> 1 */ -unsigned ZLIB_INTERNAL gz_intmax() -{ - unsigned p, q; - - p = 1; - do { - q = p; - p <<= 1; - p++; - } while (p > q); - return q >> 1; -} -#endif diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzread.c b/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzread.c deleted file mode 100644 index cd87098b95a..00000000000 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzread.c +++ /dev/null @@ -1,618 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* gzread.c -- zlib functions for reading gzip files - * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "gzguts.h" - -/* Local functions */ -local int gz_load OF((gz_statep, unsigned char *, unsigned, unsigned *)); -local int gz_avail OF((gz_statep)); -local int gz_look OF((gz_statep)); -local int gz_decomp OF((gz_statep)); -local int gz_fetch OF((gz_statep)); -local int gz_skip OF((gz_statep, z_off64_t)); - -/* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from - state->fd, and update state->eof, state->err, and state->msg as appropriate. - This function needs to loop on read(), since read() is not guaranteed to - read the number of bytes requested, depending on the type of descriptor. */ -local int gz_load(state, buf, len, have) - gz_statep state; - unsigned char *buf; - unsigned len; - unsigned *have; -{ - int ret; - - *have = 0; - do { - ret = read(state->fd, buf + *have, len - *have); - if (ret <= 0) - break; - *have += ret; - } while (*have < len); - if (ret < 0) { - gz_error(state, Z_ERRNO, zstrerror()); - return -1; - } - if (ret == 0) - state->eof = 1; - return 0; -} - -/* Load up input buffer and set eof flag if last data loaded -- return -1 on - error, 0 otherwise. Note that the eof flag is set when the end of the input - file is reached, even though there may be unused data in the buffer. Once - that data has been used, no more attempts will be made to read the file. - If strm->avail_in != 0, then the current data is moved to the beginning of - the input buffer, and then the remainder of the buffer is loaded with the - available data from the input file. */ -local int gz_avail(state) - gz_statep state; -{ - unsigned got; - z_streamp strm = &(state->strm); - - if (state->err != Z_OK && state->err != Z_BUF_ERROR) - return -1; - if (state->eof == 0) { - if (strm->avail_in) { /* copy what's there to the start */ - unsigned char *p = state->in; - unsigned const char *q = strm->next_in; - unsigned n = strm->avail_in; - do { - *p++ = *q++; - } while (--n); - } - if (gz_load(state, state->in + strm->avail_in, - state->size - strm->avail_in, &got) == -1) - return -1; - strm->avail_in += got; - strm->next_in = state->in; - } - return 0; -} - -/* Look for gzip header, set up for inflate or copy. state->x.have must be 0. - If this is the first time in, allocate required memory. state->how will be - left unchanged if there is no more input data available, will be set to COPY - if there is no gzip header and direct copying will be performed, or it will - be set to GZIP for decompression. If direct copying, then leftover input - data from the input buffer will be copied to the output buffer. In that - case, all further file reads will be directly to either the output buffer or - a user buffer. If decompressing, the inflate state will be initialized. - gz_look() will return 0 on success or -1 on failure. */ -local int gz_look(state) - gz_statep state; -{ - z_streamp strm = &(state->strm); - - /* allocate read buffers and inflate memory */ - if (state->size == 0) { - /* allocate buffers */ - state->in = (unsigned char *)malloc(state->want); - state->out = (unsigned char *)malloc(state->want << 1); - if (state->in == NULL || state->out == NULL) { - if (state->out != NULL) - free(state->out); - if (state->in != NULL) - free(state->in); - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - state->size = state->want; - - /* allocate inflate memory */ - state->strm.zalloc = Z_NULL; - state->strm.zfree = Z_NULL; - state->strm.opaque = Z_NULL; - state->strm.avail_in = 0; - state->strm.next_in = Z_NULL; - if (inflateInit2(&(state->strm), 15 + 16) != Z_OK) { /* gunzip */ - free(state->out); - free(state->in); - state->size = 0; - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - } - - /* get at least the magic bytes in the input buffer */ - if (strm->avail_in < 2) { - if (gz_avail(state) == -1) - return -1; - if (strm->avail_in == 0) - return 0; - } - - /* look for gzip magic bytes -- if there, do gzip decoding (note: there is - a logical dilemma here when considering the case of a partially written - gzip file, to wit, if a single 31 byte is written, then we cannot tell - whether this is a single-byte file, or just a partially written gzip - file -- for here we assume that if a gzip file is being written, then - the header will be written in a single operation, so that reading a - single byte is sufficient indication that it is not a gzip file) */ - if (strm->avail_in > 1 && - strm->next_in[0] == 31 && strm->next_in[1] == 139) { - inflateReset(strm); - state->how = GZIP; - state->direct = 0; - return 0; - } - - /* no gzip header -- if we were decoding gzip before, then this is trailing - garbage. Ignore the trailing garbage and finish. */ - if (state->direct == 0) { - strm->avail_in = 0; - state->eof = 1; - state->x.have = 0; - return 0; - } - - /* doing raw i/o, copy any leftover input to output -- this assumes that - the output buffer is larger than the input buffer, which also assures - space for gzungetc() */ - state->x.next = state->out; - if (strm->avail_in) { - memcpy(state->x.next, strm->next_in, strm->avail_in); - state->x.have = strm->avail_in; - strm->avail_in = 0; - } - state->how = COPY; - state->direct = 1; - return 0; -} - -/* Decompress from input to the provided next_out and avail_out in the state. - On return, state->x.have and state->x.next point to the just decompressed - data. If the gzip stream completes, state->how is reset to LOOK to look for - the next gzip stream or raw data, once state->x.have is depleted. Returns 0 - on success, -1 on failure. */ -local int gz_decomp(state) - gz_statep state; -{ - int ret = Z_OK; - unsigned had; - z_streamp strm = &(state->strm); - - /* fill output buffer up to end of deflate stream */ - had = strm->avail_out; - do { - /* get more input for inflate() */ - if (strm->avail_in == 0 && gz_avail(state) == -1) - return -1; - if (strm->avail_in == 0) { - gz_error(state, Z_BUF_ERROR, "unexpected end of file"); - break; - } - - /* decompress and handle errors */ - ret = inflate(strm, Z_NO_FLUSH); - if (ret == Z_STREAM_ERROR || ret == Z_NEED_DICT) { - gz_error(state, Z_STREAM_ERROR, - "internal error: inflate stream corrupt"); - return -1; - } - if (ret == Z_MEM_ERROR) { - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - if (ret == Z_DATA_ERROR) { /* deflate stream invalid */ - gz_error(state, Z_DATA_ERROR, - strm->msg == NULL ? "compressed data error" : strm->msg); - return -1; - } - } while (strm->avail_out && ret != Z_STREAM_END); - - /* update available output */ - state->x.have = had - strm->avail_out; - state->x.next = strm->next_out - state->x.have; - - /* if the gzip stream completed successfully, look for another */ - if (ret == Z_STREAM_END) - state->how = LOOK; - - /* good decompression */ - return 0; -} - -/* Fetch data and put it in the output buffer. Assumes state->x.have is 0. - Data is either copied from the input file or decompressed from the input - file depending on state->how. If state->how is LOOK, then a gzip header is - looked for to determine whether to copy or decompress. Returns -1 on error, - otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the - end of the input file has been reached and all data has been processed. */ -local int gz_fetch(state) - gz_statep state; -{ - z_streamp strm = &(state->strm); - - do { - switch(state->how) { - case LOOK: /* -> LOOK, COPY (only if never GZIP), or GZIP */ - if (gz_look(state) == -1) - return -1; - if (state->how == LOOK) - return 0; - break; - case COPY: /* -> COPY */ - if (gz_load(state, state->out, state->size << 1, &(state->x.have)) - == -1) - return -1; - state->x.next = state->out; - return 0; - case GZIP: /* -> GZIP or LOOK (if end of gzip stream) */ - strm->avail_out = state->size << 1; - strm->next_out = state->out; - if (gz_decomp(state) == -1) - return -1; - } - } while (state->x.have == 0 && (!state->eof || strm->avail_in)); - return 0; -} - -/* Skip len uncompressed bytes of output. Return -1 on error, 0 on success. */ -local int gz_skip(state, len) - gz_statep state; - z_off64_t len; -{ - unsigned n; - - /* skip over len bytes or reach end-of-file, whichever comes first */ - while (len) - /* skip over whatever is in output buffer */ - if (state->x.have) { - n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > len ? - (unsigned)len : state->x.have; - state->x.have -= n; - state->x.next += n; - state->x.pos += n; - len -= n; - } - - /* output buffer empty -- return if we're at the end of the input */ - else if (state->eof && state->strm.avail_in == 0) - break; - - /* need more data to skip -- load up output buffer */ - else { - /* get more output, looking for header if required */ - if (gz_fetch(state) == -1) - return -1; - } - return 0; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzread(file, buf, len) - gzFile file; - voidp buf; - unsigned len; -{ - unsigned got, n; - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - strm = &(state->strm); - - /* check that we're reading and that there's no (serious) error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) - return -1; - - /* since an int is returned, make sure len fits in one, otherwise return - with an error (this avoids the flaw in the interface) */ - if ((int)len < 0) { - gz_error(state, Z_DATA_ERROR, "requested length does not fit in int"); - return -1; - } - - /* if len is zero, avoid unnecessary operations */ - if (len == 0) - return 0; - - /* process a skip request */ - if (state->seek) { - state->seek = 0; - if (gz_skip(state, state->skip) == -1) - return -1; - } - - /* get len bytes to buf, or less than len if at the end */ - got = 0; - do { - /* first just try copying data from the output buffer */ - if (state->x.have) { - n = state->x.have > len ? len : state->x.have; - memcpy(buf, state->x.next, n); - state->x.next += n; - state->x.have -= n; - } - - /* output buffer empty -- return if we're at the end of the input */ - else if (state->eof && strm->avail_in == 0) { - state->past = 1; /* tried to read past end */ - break; - } - - /* need output data -- for small len or new stream load up our output - buffer */ - else if (state->how == LOOK || len < (state->size << 1)) { - /* get more output, looking for header if required */ - if (gz_fetch(state) == -1) - return -1; - continue; /* no progress yet -- go back to copy above */ - /* the copy above assures that we will leave with space in the - output buffer, allowing at least one gzungetc() to succeed */ - } - - /* large len -- read directly into user buffer */ - else if (state->how == COPY) { /* read directly */ - if (gz_load(state, (unsigned char *)buf, len, &n) == -1) - return -1; - } - - /* large len -- decompress directly into user buffer */ - else { /* state->how == GZIP */ - strm->avail_out = len; - strm->next_out = (unsigned char *)buf; - if (gz_decomp(state) == -1) - return -1; - n = state->x.have; - state->x.have = 0; - } - - /* update progress */ - len -= n; - buf = (char *)buf + n; - got += n; - state->x.pos += n; - } while (len); - - /* return number of bytes read into user buffer (will fit in int) */ - return (int)got; -} - -/* -- see zlib.h -- */ -#ifdef Z_PREFIX_SET -# undef z_gzgetc -#else -# undef gzgetc -#endif -int ZEXPORT gzgetc(file) - gzFile file; -{ - int ret; - unsigned char buf[1]; - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - - /* check that we're reading and that there's no (serious) error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) - return -1; - - /* try output buffer (no need to check for skip request) */ - if (state->x.have) { - state->x.have--; - state->x.pos++; - return *(state->x.next)++; - } - - /* nothing there -- try gzread() */ - ret = gzread(file, buf, 1); - return ret < 1 ? -1 : buf[0]; -} - -int ZEXPORT gzgetc_(file) -gzFile file; -{ - return gzgetc(file); -} - -/* -- see zlib.h -- */ -int ZEXPORT gzungetc(c, file) - int c; - gzFile file; -{ - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - - /* check that we're reading and that there's no (serious) error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) - return -1; - - /* process a skip request */ - if (state->seek) { - state->seek = 0; - if (gz_skip(state, state->skip) == -1) - return -1; - } - - /* can't push EOF */ - if (c < 0) - return -1; - - /* if output buffer empty, put byte at end (allows more pushing) */ - if (state->x.have == 0) { - state->x.have = 1; - state->x.next = state->out + (state->size << 1) - 1; - state->x.next[0] = c; - state->x.pos--; - state->past = 0; - return c; - } - - /* if no room, give up (must have already done a gzungetc()) */ - if (state->x.have == (state->size << 1)) { - gz_error(state, Z_DATA_ERROR, "out of room to push characters"); - return -1; - } - - /* slide output data if needed and insert byte before existing data */ - if (state->x.next == state->out) { - unsigned char *src = state->out + state->x.have; - unsigned char *dest = state->out + (state->size << 1); - while (src > state->out) - *--dest = *--src; - state->x.next = dest; - } - state->x.have++; - state->x.next--; - state->x.next[0] = c; - state->x.pos--; - state->past = 0; - return c; -} - -/* -- see zlib.h -- */ -char * ZEXPORT gzgets(file, buf, len) - gzFile file; - char *buf; - int len; -{ - unsigned left, n; - char *str; - unsigned char *eol; - gz_statep state; - - /* check parameters and get internal structure */ - if (file == NULL || buf == NULL || len < 1) - return NULL; - state = (gz_statep)file; - - /* check that we're reading and that there's no (serious) error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) - return NULL; - - /* process a skip request */ - if (state->seek) { - state->seek = 0; - if (gz_skip(state, state->skip) == -1) - return NULL; - } - - /* copy output bytes up to new line or len - 1, whichever comes first -- - append a terminating zero to the string (we don't check for a zero in - the contents, let the user worry about that) */ - str = buf; - left = (unsigned)len - 1; - if (left) do { - /* assure that something is in the output buffer */ - if (state->x.have == 0 && gz_fetch(state) == -1) - return NULL; /* error */ - if (state->x.have == 0) { /* end of file */ - state->past = 1; /* read past end */ - break; /* return what we have */ - } - - /* look for end-of-line in current output buffer */ - n = state->x.have > left ? left : state->x.have; - eol = (unsigned char *)memchr(state->x.next, '\n', n); - if (eol != NULL) - n = (unsigned)(eol - state->x.next) + 1; - - /* copy through end-of-line, or remainder if not found */ - memcpy(buf, state->x.next, n); - state->x.have -= n; - state->x.next += n; - state->x.pos += n; - left -= n; - buf += n; - } while (left && eol == NULL); - - /* return terminated string, or if nothing, end of file */ - if (buf == str) - return NULL; - buf[0] = 0; - return str; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzdirect(file) - gzFile file; -{ - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return 0; - state = (gz_statep)file; - - /* if the state is not known, but we can find out, then do so (this is - mainly for right after a gzopen() or gzdopen()) */ - if (state->mode == GZ_READ && state->how == LOOK && state->x.have == 0) - (void)gz_look(state); - - /* return 1 if transparent, 0 if processing a gzip stream */ - return state->direct; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzclose_r(file) - gzFile file; -{ - int ret, err; - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - - /* check that we're reading */ - if (state->mode != GZ_READ) - return Z_STREAM_ERROR; - - /* free memory and close file */ - if (state->size) { - inflateEnd(&(state->strm)); - free(state->out); - free(state->in); - } - err = state->err == Z_BUF_ERROR ? Z_BUF_ERROR : Z_OK; - gz_error(state, Z_OK, NULL); - free(state->path); - ret = close(state->fd); - free(state); - return ret ? Z_ERRNO : err; -} diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzwrite.c b/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzwrite.c deleted file mode 100644 index 1955cf763b4..00000000000 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/gzwrite.c +++ /dev/null @@ -1,601 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* gzwrite.c -- zlib functions for writing gzip files - * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -#include "gzguts.h" - -/* Local functions */ -local int gz_init OF((gz_statep)); -local int gz_comp OF((gz_statep, int)); -local int gz_zero OF((gz_statep, z_off64_t)); - -/* Initialize state for writing a gzip file. Mark initialization by setting - state->size to non-zero. Return -1 on failure or 0 on success. */ -local int gz_init(state) - gz_statep state; -{ - int ret; - z_streamp strm = &(state->strm); - - /* allocate input buffer */ - state->in = (unsigned char *)malloc(state->want); - if (state->in == NULL) { - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - - /* only need output buffer and deflate state if compressing */ - if (!state->direct) { - /* allocate output buffer */ - state->out = (unsigned char *)malloc(state->want); - if (state->out == NULL) { - free(state->in); - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - - /* allocate deflate memory, set up for gzip compression */ - strm->zalloc = Z_NULL; - strm->zfree = Z_NULL; - strm->opaque = Z_NULL; - ret = deflateInit2(strm, state->level, Z_DEFLATED, - MAX_WBITS + 16, DEF_MEM_LEVEL, state->strategy); - if (ret != Z_OK) { - free(state->out); - free(state->in); - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } - } - - /* mark state as initialized */ - state->size = state->want; - - /* initialize write buffer if compressing */ - if (!state->direct) { - strm->avail_out = state->size; - strm->next_out = state->out; - state->x.next = strm->next_out; - } - return 0; -} - -/* Compress whatever is at avail_in and next_in and write to the output file. - Return -1 if there is an error writing to the output file, otherwise 0. - flush is assumed to be a valid deflate() flush value. If flush is Z_FINISH, - then the deflate() state is reset to start a new gzip stream. If gz->direct - is true, then simply write to the output file without compressing, and - ignore flush. */ -local int gz_comp(state, flush) - gz_statep state; - int flush; -{ - int ret, got; - unsigned have; - z_streamp strm = &(state->strm); - - /* allocate memory if this is the first time through */ - if (state->size == 0 && gz_init(state) == -1) - return -1; - - /* write directly if requested */ - if (state->direct) { - got = write(state->fd, strm->next_in, strm->avail_in); - if (got < 0 || (unsigned)got != strm->avail_in) { - gz_error(state, Z_ERRNO, zstrerror()); - return -1; - } - strm->avail_in = 0; - return 0; - } - - /* run deflate() on provided input until it produces no more output */ - ret = Z_OK; - do { - /* write out current buffer contents if full, or if flushing, but if - doing Z_FINISH then don't write until we get to Z_STREAM_END */ - if (strm->avail_out == 0 || (flush != Z_NO_FLUSH && - (flush != Z_FINISH || ret == Z_STREAM_END))) { - have = (unsigned)(strm->next_out - state->x.next); - if (have && ((got = write(state->fd, state->x.next, have)) < 0 || - (unsigned)got != have)) { - gz_error(state, Z_ERRNO, zstrerror()); - return -1; - } - if (strm->avail_out == 0) { - strm->avail_out = state->size; - strm->next_out = state->out; - } - state->x.next = strm->next_out; - } - - /* compress */ - have = strm->avail_out; - ret = deflate(strm, flush); - if (ret == Z_STREAM_ERROR) { - gz_error(state, Z_STREAM_ERROR, - "internal error: deflate stream corrupt"); - return -1; - } - have -= strm->avail_out; - } while (have); - - /* if that completed a deflate stream, allow another to start */ - if (flush == Z_FINISH) - deflateReset(strm); - - /* all done, no errors */ - return 0; -} - -/* Compress len zeros to output. Return -1 on error, 0 on success. */ -local int gz_zero(state, len) - gz_statep state; - z_off64_t len; -{ - int first; - unsigned n; - z_streamp strm = &(state->strm); - - /* consume whatever's left in the input buffer */ - if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) - return -1; - - /* compress len zeros (len guaranteed > 0) */ - first = 1; - while (len) { - n = GT_OFF(state->size) || (z_off64_t)state->size > len ? - (unsigned)len : state->size; - if (first) { - memset(state->in, 0, n); - first = 0; - } - strm->avail_in = n; - strm->next_in = state->in; - state->x.pos += n; - if (gz_comp(state, Z_NO_FLUSH) == -1) - return -1; - len -= n; - } - return 0; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzwrite(file, buf, len) - gzFile file; - voidpc buf; - unsigned len; -{ - unsigned put = len; - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return 0; - state = (gz_statep)file; - strm = &(state->strm); - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return 0; - - /* since an int is returned, make sure len fits in one, otherwise return - with an error (this avoids the flaw in the interface) */ - if ((int)len < 0) { - gz_error(state, Z_DATA_ERROR, "requested length does not fit in int"); - return 0; - } - - /* if len is zero, avoid unnecessary operations */ - if (len == 0) - return 0; - - /* allocate memory if this is the first time through */ - if (state->size == 0 && gz_init(state) == -1) - return 0; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return 0; - } - - /* for small len, copy to input buffer, otherwise compress directly */ - if (len < state->size) { - /* copy to input buffer, compress when full */ - do { - unsigned have, copy; - - if (strm->avail_in == 0) - strm->next_in = state->in; - have = (unsigned)((strm->next_in + strm->avail_in) - state->in); - copy = state->size - have; - if (copy > len) - copy = len; - memcpy(state->in + have, buf, copy); - strm->avail_in += copy; - state->x.pos += copy; - buf = (const char *)buf + copy; - len -= copy; - if (len && gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - } while (len); - } - else { - /* consume whatever's left in the input buffer */ - if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - - /* directly compress user buffer to file */ - strm->avail_in = len; - strm->next_in = (z_const Bytef *)buf; - state->x.pos += len; - if (gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - } - - /* input was all buffered or compressed (put will fit in int) */ - return (int)put; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzputc(file, c) - gzFile file; - int c; -{ - unsigned have; - unsigned char buf[1]; - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - strm = &(state->strm); - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return -1; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return -1; - } - - /* try writing to input buffer for speed (state->size == 0 if buffer not - initialized) */ - if (state->size) { - if (strm->avail_in == 0) - strm->next_in = state->in; - have = (unsigned)((strm->next_in + strm->avail_in) - state->in); - if (have < state->size) { - state->in[have] = c; - strm->avail_in++; - state->x.pos++; - return c & 0xff; - } - } - - /* no room in buffer or not initialized, use gz_write() */ - buf[0] = c; - if (gzwrite(file, buf, 1) != 1) - return -1; - return c & 0xff; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzputs(file, str) - gzFile file; - const char *str; -{ - int ret; - unsigned len; - - /* write string */ - len = (unsigned)strlen(str); - ret = gzwrite(file, str, len); - return ret == 0 && len != 0 ? -1 : ret; -} - -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -#include - -/* -- see zlib.h -- */ -int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va) -{ - int size, len; - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - strm = &(state->strm); - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return 0; - - /* make sure we have some buffer space */ - if (state->size == 0 && gz_init(state) == -1) - return 0; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return 0; - } - - /* consume whatever's left in the input buffer */ - if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - - /* do the printf() into the input buffer, put length in len */ - size = (int)(state->size); - state->in[size - 1] = 0; -#ifdef NO_vsnprintf -# ifdef HAS_vsprintf_void - (void)vsprintf((char *)(state->in), format, va); - for (len = 0; len < size; len++) - if (state->in[len] == 0) break; -# else - len = vsprintf((char *)(state->in), format, va); -# endif -#else -# ifdef HAS_vsnprintf_void - (void)vsnprintf((char *)(state->in), size, format, va); - len = strlen((char *)(state->in)); -# else - len = vsnprintf((char *)(state->in), size, format, va); -# endif -#endif - - /* check that printf() results fit in buffer */ - if (len <= 0 || len >= (int)size || state->in[size - 1] != 0) - return 0; - - /* update buffer and position, defer compression until needed */ - strm->avail_in = (unsigned)len; - strm->next_in = state->in; - state->x.pos += len; - return len; -} - -int ZEXPORTVA gzprintf(gzFile file, const char *format, ...) -{ - va_list va; - int ret; - - va_start(va, format); - ret = gzvprintf(file, format, va); - va_end(va); - return ret; -} - -#else /* !STDC && !Z_HAVE_STDARG_H */ - -/* -- see zlib.h -- */ -int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, - a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) - gzFile file; - const char *format; - int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, - a11, a12, a13, a14, a15, a16, a17, a18, a19, a20; -{ - int size, len; - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - strm = &(state->strm); - - /* check that can really pass pointer in ints */ - if (sizeof(int) != sizeof(void *)) - return 0; - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return 0; - - /* make sure we have some buffer space */ - if (state->size == 0 && gz_init(state) == -1) - return 0; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return 0; - } - - /* consume whatever's left in the input buffer */ - if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - - /* do the printf() into the input buffer, put length in len */ - size = (int)(state->size); - state->in[size - 1] = 0; -#ifdef NO_snprintf -# ifdef HAS_sprintf_void - sprintf((char *)(state->in), format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); - for (len = 0; len < size; len++) - if (state->in[len] == 0) break; -# else - len = sprintf((char *)(state->in), format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); -# endif -#else -# ifdef HAS_snprintf_void - snprintf((char *)(state->in), size, format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); - len = strlen((char *)(state->in)); -# else - len = snprintf((char *)(state->in), size, format, a1, a2, a3, a4, a5, a6, - a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, - a19, a20); -# endif -#endif - - /* check that printf() results fit in buffer */ - if (len <= 0 || len >= (int)size || state->in[size - 1] != 0) - return 0; - - /* update buffer and position, defer compression until needed */ - strm->avail_in = (unsigned)len; - strm->next_in = state->in; - state->x.pos += len; - return len; -} - -#endif - -/* -- see zlib.h -- */ -int ZEXPORT gzflush(file, flush) - gzFile file; - int flush; -{ - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return Z_STREAM_ERROR; - - /* check flush parameter */ - if (flush < 0 || flush > Z_FINISH) - return Z_STREAM_ERROR; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return -1; - } - - /* compress remaining data with requested flush */ - gz_comp(state, flush); - return state->err; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzsetparams(file, level, strategy) - gzFile file; - int level; - int strategy; -{ - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - strm = &(state->strm); - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return Z_STREAM_ERROR; - - /* if no change is requested, then do nothing */ - if (level == state->level && strategy == state->strategy) - return Z_OK; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return -1; - } - - /* change compression parameters for subsequent input */ - if (state->size) { - /* flush previous input with previous parameters before changing */ - if (strm->avail_in && gz_comp(state, Z_PARTIAL_FLUSH) == -1) - return state->err; - deflateParams(strm, level, strategy); - } - state->level = level; - state->strategy = strategy; - return Z_OK; -} - -/* -- see zlib.h -- */ -int ZEXPORT gzclose_w(file) - gzFile file; -{ - int ret = Z_OK; - gz_statep state; - - /* get internal structure */ - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - - /* check that we're writing */ - if (state->mode != GZ_WRITE) - return Z_STREAM_ERROR; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - ret = state->err; - } - - /* flush, free memory, and close file */ - if (gz_comp(state, Z_FINISH) == -1) - ret = state->err; - if (state->size) { - if (!state->direct) { - (void)deflateEnd(&(state->strm)); - free(state->out); - } - free(state->in); - } - gz_error(state, Z_OK, NULL); - free(state->path); - if (close(state->fd) == -1) - ret = Z_ERRNO; - free(state); - return ret; -} diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/patches/ChangeLog_java b/jdk/src/java.base/share/native/libzip/zlib-1.2.8/patches/ChangeLog_java deleted file mode 100644 index 6f013dbb2fa..00000000000 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/patches/ChangeLog_java +++ /dev/null @@ -1,10 +0,0 @@ -(1)renamed - adler32.c -> zadler32.c - zcrc32c -> zcrc32.c - -(2)added _LP64 to make uLong a 32-bit int on 64-bit platform - zconf.h: - uLong -> 32-bit int - -(3)updated crc32.c/crc32() - unsigned long -> uLong diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/uncompr.c b/jdk/src/java.base/share/native/libzip/zlib-1.2.8/uncompr.c deleted file mode 100644 index 1bcf06feeb0..00000000000 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/uncompr.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* uncompr.c -- decompress a memory buffer - * Copyright (C) 1995-2003, 2010 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#define ZLIB_INTERNAL -#include "zlib.h" - -/* =========================================================================== - Decompresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total - size of the destination buffer, which must be large enough to hold the - entire uncompressed data. (The size of the uncompressed data must have - been saved previously by the compressor and transmitted to the decompressor - by some mechanism outside the scope of this compression library.) - Upon exit, destLen is the actual size of the compressed buffer. - - uncompress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer, or Z_DATA_ERROR if the input data was corrupted. -*/ -int ZEXPORT uncompress (dest, destLen, source, sourceLen) - Bytef *dest; - uLongf *destLen; - const Bytef *source; - uLong sourceLen; -{ - z_stream stream; - int err; - - stream.next_in = (z_const Bytef *)source; - stream.avail_in = (uInt)sourceLen; - /* Check for source > 64K on 16-bit machine: */ - if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; - - stream.next_out = dest; - stream.avail_out = (uInt)*destLen; - if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; - - stream.zalloc = (alloc_func)0; - stream.zfree = (free_func)0; - - err = inflateInit(&stream); - if (err != Z_OK) return err; - - err = inflate(&stream, Z_FINISH); - if (err != Z_STREAM_END) { - inflateEnd(&stream); - if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0)) - return Z_DATA_ERROR; - return err; - } - *destLen = stream.total_out; - - err = inflateEnd(&stream); - return err; -} diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/ChangeLog b/jdk/src/java.base/share/native/libzip/zlib/ChangeLog similarity index 96% rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/ChangeLog rename to jdk/src/java.base/share/native/libzip/zlib/ChangeLog index f22aabaef53..30199a65a03 100644 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/ChangeLog +++ b/jdk/src/java.base/share/native/libzip/zlib/ChangeLog @@ -1,10 +1,53 @@ ChangeLog file for zlib +Changes in 1.2.11 (15 Jan 2017) +- Fix deflate stored bug when pulling last block from window +- Permit immediate deflateParams changes before any deflate input + +Changes in 1.2.10 (2 Jan 2017) +- Avoid warnings on snprintf() return value +- Fix bug in deflate_stored() for zero-length input +- Fix bug in gzwrite.c that produced corrupt gzip files +- Remove files to be installed before copying them in Makefile.in +- Add warnings when compiling with assembler code + +Changes in 1.2.9 (31 Dec 2016) +- Fix contrib/minizip to permit unzipping with desktop API [Zouzou] +- Improve contrib/blast to return unused bytes +- Assure that gzoffset() is correct when appending +- Improve compress() and uncompress() to support large lengths +- Fix bug in test/example.c where error code not saved +- Remedy Coverity warning [Randers-Pehrson] +- Improve speed of gzprintf() in transparent mode +- Fix inflateInit2() bug when windowBits is 16 or 32 +- Change DEBUG macro to ZLIB_DEBUG +- Avoid uninitialized access by gzclose_w() +- Allow building zlib outside of the source directory +- Fix bug that accepted invalid zlib header when windowBits is zero +- Fix gzseek() problem on MinGW due to buggy _lseeki64 there +- Loop on write() calls in gzwrite.c in case of non-blocking I/O +- Add --warn (-w) option to ./configure for more compiler warnings +- Reject a window size of 256 bytes if not using the zlib wrapper +- Fix bug when level 0 used with Z_HUFFMAN or Z_RLE +- Add --debug (-d) option to ./configure to define ZLIB_DEBUG +- Fix bugs in creating a very large gzip header +- Add uncompress2() function, which returns the input size used +- Assure that deflateParams() will not switch functions mid-block +- Dramatically speed up deflation for level 0 (storing) +- Add gzfread(), duplicating the interface of fread() +- Add gzfwrite(), duplicating the interface of fwrite() +- Add deflateGetDictionary() function +- Use snprintf() for later versions of Microsoft C +- Fix *Init macros to use z_ prefix when requested +- Replace as400 with os400 for OS/400 support [Monnerat] +- Add crc32_z() and adler32_z() functions with size_t lengths +- Update Visual Studio project files [AraHaan] + Changes in 1.2.8 (28 Apr 2013) - Update contrib/minizip/iowin32.c for Windows RT [Vollant] - Do not force Z_CONST for C++ -- Clean up contrib/vstudio [Ro§] +- Clean up contrib/vstudio [Roß] - Correct spelling error in zlib.h - Fix mixed line endings in contrib/vstudio @@ -34,7 +77,7 @@ Changes in 1.2.7.1 (24 Mar 2013) - Clean up the usage of z_const and respect const usage within zlib - Clean up examples/gzlog.[ch] comparisons of different types - Avoid shift equal to bits in type (caused endless loop) -- Fix unintialized value bug in gzputc() introduced by const patches +- Fix uninitialized value bug in gzputc() introduced by const patches - Fix memory allocation error in examples/zran.c [Nor] - Fix bug where gzopen(), gzclose() would write an empty file - Fix bug in gzclose() when gzwrite() runs out of memory @@ -194,7 +237,7 @@ Changes in 1.2.5.2 (17 Dec 2011) - Add a transparent write mode to gzopen() when 'T' is in the mode - Update python link in zlib man page - Get inffixed.h and MAKEFIXED result to match -- Add a ./config --solo option to make zlib subset with no libary use +- Add a ./config --solo option to make zlib subset with no library use - Add undocumented inflateResetKeep() function for CAB file decoding - Add --cover option to ./configure for gcc coverage testing - Add #define ZLIB_CONST option to use const in the z_stream interface @@ -564,7 +607,7 @@ Changes in 1.2.3.1 (16 August 2006) - Update make_vms.com [Zinser] - Use -fPIC for shared build in configure [Teredesai, Nicholson] - Use only major version number for libz.so on IRIX and OSF1 [Reinholdtsen] -- Use fdopen() (not _fdopen()) for Interix in zutil.h [BŠck] +- Use fdopen() (not _fdopen()) for Interix in zutil.h [Bäck] - Add some FAQ entries about the contrib directory - Update the MVS question in the FAQ - Avoid extraneous reads after EOF in gzio.c [Brown] @@ -1178,7 +1221,7 @@ Changes in 1.0.6 (19 Jan 1998) 386 asm code replacing longest_match(). contrib/iostream/ by Kevin Ruland A C++ I/O streams interface to the zlib gz* functions - contrib/iostream2/ by Tyge Løvset + contrib/iostream2/ by Tyge Løvset Another C++ I/O streams interface contrib/untgz/ by "Pedro A. Aranda Guti\irrez" A very simple tar.gz file extractor using zlib @@ -1267,7 +1310,7 @@ Changes in 1.0.1 (20 May 96) [1.0 skipped to avoid confusion] - fix array overlay in deflate.c which sometimes caused bad compressed data - fix inflate bug with empty stored block - fix MSDOS medium model which was broken in 0.99 -- fix deflateParams() which could generated bad compressed data. +- fix deflateParams() which could generate bad compressed data. - Bytef is define'd instead of typedef'ed (work around Borland bug) - added an INDEX file - new makefiles for DJGPP (Makefile.dj2), 32-bit Borland (Makefile.b32), diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/README b/jdk/src/java.base/share/native/libzip/zlib/README similarity index 96% rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/README rename to jdk/src/java.base/share/native/libzip/zlib/README index 5ca9d127eda..51106de4753 100644 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/README +++ b/jdk/src/java.base/share/native/libzip/zlib/README @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.2.8 is a general purpose data compression library. All the code is +zlib 1.2.11 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and @@ -31,7 +31,7 @@ Mark Nelson wrote an article about zlib for the Jan. 1997 issue of Dr. Dobb's Journal; a copy of the article is available at http://marknelson.us/1997/01/01/zlib-engine/ . -The changes made in version 1.2.8 are documented in the file ChangeLog. +The changes made in version 1.2.11 are documented in the file ChangeLog. Unsupported third party contributions are provided in directory contrib/ . @@ -84,7 +84,7 @@ Acknowledgments: Copyright notice: - (C) 1995-2013 Jean-loup Gailly and Mark Adler + (C) 1995-2017 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/compress.c b/jdk/src/java.base/share/native/libzip/zlib/compress.c similarity index 81% rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/compress.c rename to jdk/src/java.base/share/native/libzip/zlib/compress.c index cdc51e08172..a9d3b983486 100644 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/compress.c +++ b/jdk/src/java.base/share/native/libzip/zlib/compress.c @@ -23,7 +23,7 @@ */ /* compress.c -- compress a memory buffer - * Copyright (C) 1995-2005 Jean-loup Gailly. + * Copyright (C) 1995-2005, 2014, 2016 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -52,16 +52,11 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level) { z_stream stream; int err; + const uInt max = (uInt)-1; + uLong left; - stream.next_in = (z_const Bytef *)source; - stream.avail_in = (uInt)sourceLen; -#ifdef MAXSEG_64K - /* Check for source > 64K on 16-bit machine: */ - if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; -#endif - stream.next_out = dest; - stream.avail_out = (uInt)*destLen; - if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; + left = *destLen; + *destLen = 0; stream.zalloc = (alloc_func)0; stream.zfree = (free_func)0; @@ -70,15 +65,26 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level) err = deflateInit(&stream, level); if (err != Z_OK) return err; - err = deflate(&stream, Z_FINISH); - if (err != Z_STREAM_END) { - deflateEnd(&stream); - return err == Z_OK ? Z_BUF_ERROR : err; - } - *destLen = stream.total_out; + stream.next_out = dest; + stream.avail_out = 0; + stream.next_in = (z_const Bytef *)source; + stream.avail_in = 0; - err = deflateEnd(&stream); - return err; + do { + if (stream.avail_out == 0) { + stream.avail_out = left > (uLong)max ? max : (uInt)left; + left -= stream.avail_out; + } + if (stream.avail_in == 0) { + stream.avail_in = sourceLen > (uLong)max ? max : (uInt)sourceLen; + sourceLen -= stream.avail_in; + } + err = deflate(&stream, sourceLen ? Z_NO_FLUSH : Z_FINISH); + } while (err == Z_OK); + + *destLen = stream.total_out; + deflateEnd(&stream); + return err == Z_STREAM_END ? Z_OK : err; } /* =========================================================================== diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/crc32.h b/jdk/src/java.base/share/native/libzip/zlib/crc32.h similarity index 100% rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/crc32.h rename to jdk/src/java.base/share/native/libzip/zlib/crc32.h diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/deflate.c b/jdk/src/java.base/share/native/libzip/zlib/deflate.c similarity index 76% rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/deflate.c rename to jdk/src/java.base/share/native/libzip/zlib/deflate.c index 5cc66c5e537..d0ee5feadf7 100644 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/deflate.c +++ b/jdk/src/java.base/share/native/libzip/zlib/deflate.c @@ -23,7 +23,7 @@ */ /* deflate.c -- compress data using the deflation algorithm - * Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler + * Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -76,7 +76,7 @@ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.2.8 Copyright 1995-2013 Jean-loup Gailly and Mark Adler "; + " deflate 1.2.11 Copyright 1995-2017 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -97,6 +97,8 @@ typedef enum { typedef block_state (*compress_func) OF((deflate_state *s, int flush)); /* Compression function. Returns the block state after the call. */ +local int deflateStateCheck OF((z_streamp strm)); +local void slide_hash OF((deflate_state *s)); local void fill_window OF((deflate_state *s)); local block_state deflate_stored OF((deflate_state *s, int flush)); local block_state deflate_fast OF((deflate_state *s, int flush)); @@ -108,15 +110,16 @@ local block_state deflate_huff OF((deflate_state *s, int flush)); local void lm_init OF((deflate_state *s)); local void putShortMSB OF((deflate_state *s, uInt b)); local void flush_pending OF((z_streamp strm)); -local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size)); +local unsigned read_buf OF((z_streamp strm, Bytef *buf, unsigned size)); #ifdef ASMV +# pragma message("Assembler code may have bugs -- use at your own risk") void match_init OF((void)); /* asm code initialization */ uInt longest_match OF((deflate_state *s, IPos cur_match)); #else local uInt longest_match OF((deflate_state *s, IPos cur_match)); #endif -#ifdef DEBUG +#ifdef ZLIB_DEBUG local void check_match OF((deflate_state *s, IPos start, IPos match, int length)); #endif @@ -172,21 +175,14 @@ local const config configuration_table[10] = { * meaning. */ -#define EQUAL 0 -/* result of memcmp for equal strings */ - -#ifndef NO_DUMMY_DECL -struct static_tree_desc_s {int dummy;}; /* for buggy compilers */ -#endif - /* rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH */ -#define RANK(f) (((f) << 1) - ((f) > 4 ? 9 : 0)) +#define RANK(f) (((f) * 2) - ((f) > 4 ? 9 : 0)) /* =========================================================================== * Update a hash value with the given input byte - * IN assertion: all calls to to UPDATE_HASH are made with consecutive - * input characters, so that a running hash key can be computed from the - * previous key instead of complete recalculation each time. + * IN assertion: all calls to UPDATE_HASH are made with consecutive input + * characters, so that a running hash key can be computed from the previous + * key instead of complete recalculation each time. */ #define UPDATE_HASH(s,h,c) (h = (((h)<hash_shift) ^ (c)) & s->hash_mask) @@ -197,9 +193,9 @@ struct static_tree_desc_s {int dummy;}; /* for buggy compilers */ * the previous length of the hash chain. * If this file is compiled with -DFASTEST, the compression level is forced * to 1, and no hash chains are maintained. - * IN assertion: all calls to to INSERT_STRING are made with consecutive - * input characters and the first MIN_MATCH bytes of str are valid - * (except for the last MIN_MATCH-1 bytes of the input file). + * IN assertion: all calls to INSERT_STRING are made with consecutive input + * characters and the first MIN_MATCH bytes of str are valid (except for + * the last MIN_MATCH-1 bytes of the input file). */ #ifdef FASTEST #define INSERT_STRING(s, str, match_head) \ @@ -221,6 +217,37 @@ struct static_tree_desc_s {int dummy;}; /* for buggy compilers */ s->head[s->hash_size-1] = NIL; \ zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head)); +/* =========================================================================== + * Slide the hash table when sliding the window down (could be avoided with 32 + * bit values at the expense of memory usage). We slide even when level == 0 to + * keep the hash table consistent if we switch back to level > 0 later. + */ +local void slide_hash(s) + deflate_state *s; +{ + unsigned n, m; + Posf *p; + uInt wsize = s->w_size; + + n = s->hash_size; + p = &s->head[n]; + do { + m = *--p; + *p = (Pos)(m >= wsize ? m - wsize : NIL); + } while (--n); + n = wsize; +#ifndef FASTEST + p = &s->prev[n]; + do { + m = *--p; + *p = (Pos)(m >= wsize ? m - wsize : NIL); + /* If n is not on any hash chain, prev[n] is garbage but + * its value will never be used. + */ + } while (--n); +#endif +} + /* ========================================================================= */ int ZEXPORT deflateInit_(strm, level, version, stream_size) z_streamp strm; @@ -294,7 +321,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, #endif if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED || windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED) { + strategy < 0 || strategy > Z_FIXED || (windowBits == 8 && wrap != 1)) { return Z_STREAM_ERROR; } if (windowBits == 8) windowBits = 9; /* until 256-byte window bug fixed */ @@ -302,14 +329,15 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, if (s == Z_NULL) return Z_MEM_ERROR; strm->state = (struct internal_state FAR *)s; s->strm = strm; + s->status = INIT_STATE; /* to pass state test in deflateReset() */ s->wrap = wrap; s->gzhead = Z_NULL; - s->w_bits = windowBits; + s->w_bits = (uInt)windowBits; s->w_size = 1 << s->w_bits; s->w_mask = s->w_size - 1; - s->hash_bits = memLevel + 7; + s->hash_bits = (uInt)memLevel + 7; s->hash_size = 1 << s->hash_bits; s->hash_mask = s->hash_size - 1; s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH); @@ -343,6 +371,31 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, return deflateReset(strm); } +/* ========================================================================= + * Check for a valid deflate stream state. Return 0 if ok, 1 if not. + */ +local int deflateStateCheck (strm) + z_streamp strm; +{ + deflate_state *s; + if (strm == Z_NULL || + strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) + return 1; + s = strm->state; + if (s == Z_NULL || s->strm != strm || (s->status != INIT_STATE && +#ifdef GZIP + s->status != GZIP_STATE && +#endif + s->status != EXTRA_STATE && + s->status != NAME_STATE && + s->status != COMMENT_STATE && + s->status != HCRC_STATE && + s->status != BUSY_STATE && + s->status != FINISH_STATE)) + return 1; + return 0; +} + /* ========================================================================= */ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) z_streamp strm; @@ -355,7 +408,7 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) unsigned avail; z_const unsigned char *next; - if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL) + if (deflateStateCheck(strm) || dictionary == Z_NULL) return Z_STREAM_ERROR; s = strm->state; wrap = s->wrap; @@ -412,14 +465,35 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) return Z_OK; } +/* ========================================================================= */ +int ZEXPORT deflateGetDictionary (strm, dictionary, dictLength) + z_streamp strm; + Bytef *dictionary; + uInt *dictLength; +{ + deflate_state *s; + uInt len; + + if (deflateStateCheck(strm)) + return Z_STREAM_ERROR; + s = strm->state; + len = s->strstart + s->lookahead; + if (len > s->w_size) + len = s->w_size; + if (dictionary != Z_NULL && len) + zmemcpy(dictionary, s->window + s->strstart + s->lookahead - len, len); + if (dictLength != Z_NULL) + *dictLength = len; + return Z_OK; +} + /* ========================================================================= */ int ZEXPORT deflateResetKeep (strm) z_streamp strm; { deflate_state *s; - if (strm == Z_NULL || strm->state == Z_NULL || - strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) { + if (deflateStateCheck(strm)) { return Z_STREAM_ERROR; } @@ -434,7 +508,11 @@ int ZEXPORT deflateResetKeep (strm) if (s->wrap < 0) { s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */ } - s->status = s->wrap ? INIT_STATE : BUSY_STATE; + s->status = +#ifdef GZIP + s->wrap == 2 ? GZIP_STATE : +#endif + s->wrap ? INIT_STATE : BUSY_STATE; strm->adler = #ifdef GZIP s->wrap == 2 ? crc32(0L, Z_NULL, 0) : @@ -464,8 +542,8 @@ int ZEXPORT deflateSetHeader (strm, head) z_streamp strm; gz_headerp head; { - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - if (strm->state->wrap != 2) return Z_STREAM_ERROR; + if (deflateStateCheck(strm) || strm->state->wrap != 2) + return Z_STREAM_ERROR; strm->state->gzhead = head; return Z_OK; } @@ -476,7 +554,7 @@ int ZEXPORT deflatePending (strm, pending, bits) int *bits; z_streamp strm; { - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if (deflateStateCheck(strm)) return Z_STREAM_ERROR; if (pending != Z_NULL) *pending = strm->state->pending; if (bits != Z_NULL) @@ -493,7 +571,7 @@ int ZEXPORT deflatePrime (strm, bits, value) deflate_state *s; int put; - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if (deflateStateCheck(strm)) return Z_STREAM_ERROR; s = strm->state; if ((Bytef *)(s->d_buf) < s->pending_out + ((Buf_size + 7) >> 3)) return Z_BUF_ERROR; @@ -518,9 +596,8 @@ int ZEXPORT deflateParams(strm, level, strategy) { deflate_state *s; compress_func func; - int err = Z_OK; - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if (deflateStateCheck(strm)) return Z_STREAM_ERROR; s = strm->state; #ifdef FASTEST @@ -534,13 +611,22 @@ int ZEXPORT deflateParams(strm, level, strategy) func = configuration_table[s->level].func; if ((strategy != s->strategy || func != configuration_table[level].func) && - strm->total_in != 0) { + s->high_water) { /* Flush the last buffer: */ - err = deflate(strm, Z_BLOCK); - if (err == Z_BUF_ERROR && s->pending == 0) - err = Z_OK; + int err = deflate(strm, Z_BLOCK); + if (err == Z_STREAM_ERROR) + return err; + if (strm->avail_out == 0) + return Z_BUF_ERROR; } if (s->level != level) { + if (s->level == 0 && s->matches != 0) { + if (s->matches == 1) + slide_hash(s); + else + CLEAR_HASH(s); + s->matches = 0; + } s->level = level; s->max_lazy_match = configuration_table[level].max_lazy; s->good_match = configuration_table[level].good_length; @@ -548,7 +634,7 @@ int ZEXPORT deflateParams(strm, level, strategy) s->max_chain_length = configuration_table[level].max_chain; } s->strategy = strategy; - return err; + return Z_OK; } /* ========================================================================= */ @@ -561,12 +647,12 @@ int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain) { deflate_state *s; - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if (deflateStateCheck(strm)) return Z_STREAM_ERROR; s = strm->state; - s->good_match = good_length; - s->max_lazy_match = max_lazy; + s->good_match = (uInt)good_length; + s->max_lazy_match = (uInt)max_lazy; s->nice_match = nice_length; - s->max_chain_length = max_chain; + s->max_chain_length = (uInt)max_chain; return Z_OK; } @@ -593,14 +679,13 @@ uLong ZEXPORT deflateBound(strm, sourceLen) { deflate_state *s; uLong complen, wraplen; - Bytef *str; /* conservative upper bound for compressed data */ complen = sourceLen + ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 5; /* if can't get parameters, return conservative bound plus zlib wrapper */ - if (strm == Z_NULL || strm->state == Z_NULL) + if (deflateStateCheck(strm)) return complen + 6; /* compute wrapper length */ @@ -612,9 +697,11 @@ uLong ZEXPORT deflateBound(strm, sourceLen) case 1: /* zlib wrapper */ wraplen = 6 + (s->strstart ? 4 : 0); break; +#ifdef GZIP case 2: /* gzip wrapper */ wraplen = 18; if (s->gzhead != Z_NULL) { /* user-supplied gzip header */ + Bytef *str; if (s->gzhead->extra != Z_NULL) wraplen += 2 + s->gzhead->extra_len; str = s->gzhead->name; @@ -631,6 +718,7 @@ uLong ZEXPORT deflateBound(strm, sourceLen) wraplen += 2; } break; +#endif default: /* for compiler happiness */ wraplen = 6; } @@ -658,10 +746,10 @@ local void putShortMSB (s, b) } /* ========================================================================= - * Flush as much pending output as possible. All deflate() output goes - * through this function so some applications may wish to modify it - * to avoid allocating a large strm->next_out buffer and copying into it. - * (See also read_buf()). + * Flush as much pending output as possible. All deflate() output, except for + * some deflate_stored() output, goes through this function so some + * applications may wish to modify it to avoid allocating a large + * strm->next_out buffer and copying into it. (See also read_buf()). */ local void flush_pending(strm) z_streamp strm; @@ -678,13 +766,23 @@ local void flush_pending(strm) strm->next_out += len; s->pending_out += len; strm->total_out += len; - strm->avail_out -= len; - s->pending -= len; + strm->avail_out -= len; + s->pending -= len; if (s->pending == 0) { s->pending_out = s->pending_buf; } } +/* =========================================================================== + * Update the header CRC with the bytes s->pending_buf[beg..s->pending - 1]. + */ +#define HCRC_UPDATE(beg) \ + do { \ + if (s->gzhead->hcrc && s->pending > (beg)) \ + strm->adler = crc32(strm->adler, s->pending_buf + (beg), \ + s->pending - (beg)); \ + } while (0) + /* ========================================================================= */ int ZEXPORT deflate (strm, flush) z_streamp strm; @@ -693,203 +791,21 @@ int ZEXPORT deflate (strm, flush) int old_flush; /* value of flush param for previous deflate call */ deflate_state *s; - if (strm == Z_NULL || strm->state == Z_NULL || - flush > Z_BLOCK || flush < 0) { + if (deflateStateCheck(strm) || flush > Z_BLOCK || flush < 0) { return Z_STREAM_ERROR; } s = strm->state; if (strm->next_out == Z_NULL || - (strm->next_in == Z_NULL && strm->avail_in != 0) || + (strm->avail_in != 0 && strm->next_in == Z_NULL) || (s->status == FINISH_STATE && flush != Z_FINISH)) { ERR_RETURN(strm, Z_STREAM_ERROR); } if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR); - s->strm = strm; /* just in case */ old_flush = s->last_flush; s->last_flush = flush; - /* Write the header */ - if (s->status == INIT_STATE) { -#ifdef GZIP - if (s->wrap == 2) { - strm->adler = crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (s->gzhead == Z_NULL) { - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s->level == 9 ? 2 : - (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s->status = BUSY_STATE; - } - else { - put_byte(s, (s->gzhead->text ? 1 : 0) + - (s->gzhead->hcrc ? 2 : 0) + - (s->gzhead->extra == Z_NULL ? 0 : 4) + - (s->gzhead->name == Z_NULL ? 0 : 8) + - (s->gzhead->comment == Z_NULL ? 0 : 16) - ); - put_byte(s, (Byte)(s->gzhead->time & 0xff)); - put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff)); - put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff)); - put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff)); - put_byte(s, s->level == 9 ? 2 : - (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? - 4 : 0)); - put_byte(s, s->gzhead->os & 0xff); - if (s->gzhead->extra != Z_NULL) { - put_byte(s, s->gzhead->extra_len & 0xff); - put_byte(s, (s->gzhead->extra_len >> 8) & 0xff); - } - if (s->gzhead->hcrc) - strm->adler = crc32(strm->adler, s->pending_buf, - s->pending); - s->gzindex = 0; - s->status = EXTRA_STATE; - } - } - else -#endif - { - uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8; - uInt level_flags; - - if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2) - level_flags = 0; - else if (s->level < 6) - level_flags = 1; - else if (s->level == 6) - level_flags = 2; - else - level_flags = 3; - header |= (level_flags << 6); - if (s->strstart != 0) header |= PRESET_DICT; - header += 31 - (header % 31); - - s->status = BUSY_STATE; - putShortMSB(s, header); - - /* Save the adler32 of the preset dictionary: */ - if (s->strstart != 0) { - putShortMSB(s, (uInt)(strm->adler >> 16)); - putShortMSB(s, (uInt)(strm->adler & 0xffff)); - } - strm->adler = adler32(0L, Z_NULL, 0); - } - } -#ifdef GZIP - if (s->status == EXTRA_STATE) { - if (s->gzhead->extra != Z_NULL) { - uInt beg = s->pending; /* start of bytes to update crc */ - - while (s->gzindex < (s->gzhead->extra_len & 0xffff)) { - if (s->pending == s->pending_buf_size) { - if (s->gzhead->hcrc && s->pending > beg) - strm->adler = crc32(strm->adler, s->pending_buf + beg, - s->pending - beg); - flush_pending(strm); - beg = s->pending; - if (s->pending == s->pending_buf_size) - break; - } - put_byte(s, s->gzhead->extra[s->gzindex]); - s->gzindex++; - } - if (s->gzhead->hcrc && s->pending > beg) - strm->adler = crc32(strm->adler, s->pending_buf + beg, - s->pending - beg); - if (s->gzindex == s->gzhead->extra_len) { - s->gzindex = 0; - s->status = NAME_STATE; - } - } - else - s->status = NAME_STATE; - } - if (s->status == NAME_STATE) { - if (s->gzhead->name != Z_NULL) { - uInt beg = s->pending; /* start of bytes to update crc */ - int val; - - do { - if (s->pending == s->pending_buf_size) { - if (s->gzhead->hcrc && s->pending > beg) - strm->adler = crc32(strm->adler, s->pending_buf + beg, - s->pending - beg); - flush_pending(strm); - beg = s->pending; - if (s->pending == s->pending_buf_size) { - val = 1; - break; - } - } - val = s->gzhead->name[s->gzindex++]; - put_byte(s, val); - } while (val != 0); - if (s->gzhead->hcrc && s->pending > beg) - strm->adler = crc32(strm->adler, s->pending_buf + beg, - s->pending - beg); - if (val == 0) { - s->gzindex = 0; - s->status = COMMENT_STATE; - } - } - else - s->status = COMMENT_STATE; - } - if (s->status == COMMENT_STATE) { - if (s->gzhead->comment != Z_NULL) { - uInt beg = s->pending; /* start of bytes to update crc */ - int val; - - do { - if (s->pending == s->pending_buf_size) { - if (s->gzhead->hcrc && s->pending > beg) - strm->adler = crc32(strm->adler, s->pending_buf + beg, - s->pending - beg); - flush_pending(strm); - beg = s->pending; - if (s->pending == s->pending_buf_size) { - val = 1; - break; - } - } - val = s->gzhead->comment[s->gzindex++]; - put_byte(s, val); - } while (val != 0); - if (s->gzhead->hcrc && s->pending > beg) - strm->adler = crc32(strm->adler, s->pending_buf + beg, - s->pending - beg); - if (val == 0) - s->status = HCRC_STATE; - } - else - s->status = HCRC_STATE; - } - if (s->status == HCRC_STATE) { - if (s->gzhead->hcrc) { - if (s->pending + 2 > s->pending_buf_size) - flush_pending(strm); - if (s->pending + 2 <= s->pending_buf_size) { - put_byte(s, (Byte)(strm->adler & 0xff)); - put_byte(s, (Byte)((strm->adler >> 8) & 0xff)); - strm->adler = crc32(0L, Z_NULL, 0); - s->status = BUSY_STATE; - } - } - else - s->status = BUSY_STATE; - } -#endif - /* Flush as much pending output as possible */ if (s->pending != 0) { flush_pending(strm); @@ -918,15 +834,197 @@ int ZEXPORT deflate (strm, flush) ERR_RETURN(strm, Z_BUF_ERROR); } + /* Write the header */ + if (s->status == INIT_STATE) { + /* zlib header */ + uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8; + uInt level_flags; + + if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2) + level_flags = 0; + else if (s->level < 6) + level_flags = 1; + else if (s->level == 6) + level_flags = 2; + else + level_flags = 3; + header |= (level_flags << 6); + if (s->strstart != 0) header |= PRESET_DICT; + header += 31 - (header % 31); + + putShortMSB(s, header); + + /* Save the adler32 of the preset dictionary: */ + if (s->strstart != 0) { + putShortMSB(s, (uInt)(strm->adler >> 16)); + putShortMSB(s, (uInt)(strm->adler & 0xffff)); + } + strm->adler = adler32(0L, Z_NULL, 0); + s->status = BUSY_STATE; + + /* Compression must start with an empty pending buffer */ + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; + } + } +#ifdef GZIP + if (s->status == GZIP_STATE) { + /* gzip header */ + strm->adler = crc32(0L, Z_NULL, 0); + put_byte(s, 31); + put_byte(s, 139); + put_byte(s, 8); + if (s->gzhead == Z_NULL) { + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, s->level == 9 ? 2 : + (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? + 4 : 0)); + put_byte(s, OS_CODE); + s->status = BUSY_STATE; + + /* Compression must start with an empty pending buffer */ + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; + } + } + else { + put_byte(s, (s->gzhead->text ? 1 : 0) + + (s->gzhead->hcrc ? 2 : 0) + + (s->gzhead->extra == Z_NULL ? 0 : 4) + + (s->gzhead->name == Z_NULL ? 0 : 8) + + (s->gzhead->comment == Z_NULL ? 0 : 16) + ); + put_byte(s, (Byte)(s->gzhead->time & 0xff)); + put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff)); + put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff)); + put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff)); + put_byte(s, s->level == 9 ? 2 : + (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? + 4 : 0)); + put_byte(s, s->gzhead->os & 0xff); + if (s->gzhead->extra != Z_NULL) { + put_byte(s, s->gzhead->extra_len & 0xff); + put_byte(s, (s->gzhead->extra_len >> 8) & 0xff); + } + if (s->gzhead->hcrc) + strm->adler = crc32(strm->adler, s->pending_buf, + s->pending); + s->gzindex = 0; + s->status = EXTRA_STATE; + } + } + if (s->status == EXTRA_STATE) { + if (s->gzhead->extra != Z_NULL) { + ulg beg = s->pending; /* start of bytes to update crc */ + uInt left = (s->gzhead->extra_len & 0xffff) - s->gzindex; + while (s->pending + left > s->pending_buf_size) { + uInt copy = s->pending_buf_size - s->pending; + zmemcpy(s->pending_buf + s->pending, + s->gzhead->extra + s->gzindex, copy); + s->pending = s->pending_buf_size; + HCRC_UPDATE(beg); + s->gzindex += copy; + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; + } + beg = 0; + left -= copy; + } + zmemcpy(s->pending_buf + s->pending, + s->gzhead->extra + s->gzindex, left); + s->pending += left; + HCRC_UPDATE(beg); + s->gzindex = 0; + } + s->status = NAME_STATE; + } + if (s->status == NAME_STATE) { + if (s->gzhead->name != Z_NULL) { + ulg beg = s->pending; /* start of bytes to update crc */ + int val; + do { + if (s->pending == s->pending_buf_size) { + HCRC_UPDATE(beg); + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; + } + beg = 0; + } + val = s->gzhead->name[s->gzindex++]; + put_byte(s, val); + } while (val != 0); + HCRC_UPDATE(beg); + s->gzindex = 0; + } + s->status = COMMENT_STATE; + } + if (s->status == COMMENT_STATE) { + if (s->gzhead->comment != Z_NULL) { + ulg beg = s->pending; /* start of bytes to update crc */ + int val; + do { + if (s->pending == s->pending_buf_size) { + HCRC_UPDATE(beg); + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; + } + beg = 0; + } + val = s->gzhead->comment[s->gzindex++]; + put_byte(s, val); + } while (val != 0); + HCRC_UPDATE(beg); + } + s->status = HCRC_STATE; + } + if (s->status == HCRC_STATE) { + if (s->gzhead->hcrc) { + if (s->pending + 2 > s->pending_buf_size) { + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; + } + } + put_byte(s, (Byte)(strm->adler & 0xff)); + put_byte(s, (Byte)((strm->adler >> 8) & 0xff)); + strm->adler = crc32(0L, Z_NULL, 0); + } + s->status = BUSY_STATE; + + /* Compression must start with an empty pending buffer */ + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; + } + } +#endif + /* Start a new block or continue the current one. */ if (strm->avail_in != 0 || s->lookahead != 0 || (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) { block_state bstate; - bstate = s->strategy == Z_HUFFMAN_ONLY ? deflate_huff(s, flush) : - (s->strategy == Z_RLE ? deflate_rle(s, flush) : - (*(configuration_table[s->level].func))(s, flush)); + bstate = s->level == 0 ? deflate_stored(s, flush) : + s->strategy == Z_HUFFMAN_ONLY ? deflate_huff(s, flush) : + s->strategy == Z_RLE ? deflate_rle(s, flush) : + (*(configuration_table[s->level].func))(s, flush); if (bstate == finish_started || bstate == finish_done) { s->status = FINISH_STATE; @@ -968,7 +1066,6 @@ int ZEXPORT deflate (strm, flush) } } } - Assert(strm->avail_out > 0, "bug2"); if (flush != Z_FINISH) return Z_OK; if (s->wrap <= 0) return Z_STREAM_END; @@ -1005,18 +1102,9 @@ int ZEXPORT deflateEnd (strm) { int status; - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if (deflateStateCheck(strm)) return Z_STREAM_ERROR; status = strm->state->status; - if (status != INIT_STATE && - status != EXTRA_STATE && - status != NAME_STATE && - status != COMMENT_STATE && - status != HCRC_STATE && - status != BUSY_STATE && - status != FINISH_STATE) { - return Z_STREAM_ERROR; - } /* Deallocate in reverse order of allocations: */ TRY_FREE(strm, strm->state->pending_buf); @@ -1047,7 +1135,7 @@ int ZEXPORT deflateCopy (dest, source) ushf *overlay; - if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) { + if (deflateStateCheck(source) || dest == Z_NULL) { return Z_STREAM_ERROR; } @@ -1097,7 +1185,7 @@ int ZEXPORT deflateCopy (dest, source) * allocating a large strm->next_in buffer and copying from it. * (See also flush_pending()). */ -local int read_buf(strm, buf, size) +local unsigned read_buf(strm, buf, size) z_streamp strm; Bytef *buf; unsigned size; @@ -1121,7 +1209,7 @@ local int read_buf(strm, buf, size) strm->next_in += len; strm->total_in += len; - return (int)len; + return len; } /* =========================================================================== @@ -1175,9 +1263,9 @@ local uInt longest_match(s, cur_match) { unsigned chain_length = s->max_chain_length;/* max hash chain length */ register Bytef *scan = s->window + s->strstart; /* current string */ - register Bytef *match; /* matched string */ + register Bytef *match; /* matched string */ register int len; /* length of current match */ - int best_len = s->prev_length; /* best match length so far */ + int best_len = (int)s->prev_length; /* best match length so far */ int nice_match = s->nice_match; /* stop if match long enough */ IPos limit = s->strstart > (IPos)MAX_DIST(s) ? s->strstart - (IPos)MAX_DIST(s) : NIL; @@ -1212,7 +1300,7 @@ local uInt longest_match(s, cur_match) /* Do not look for matches beyond the end of the input. This is necessary * to make deflate deterministic. */ - if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; + if ((uInt)nice_match > s->lookahead) nice_match = (int)s->lookahead; Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); @@ -1373,7 +1461,11 @@ local uInt longest_match(s, cur_match) #endif /* FASTEST */ -#ifdef DEBUG +#ifdef ZLIB_DEBUG + +#define EQUAL 0 +/* result of memcmp for equal strings */ + /* =========================================================================== * Check that the match at match_start is indeed a match. */ @@ -1399,7 +1491,7 @@ local void check_match(s, start, match, length) } #else # define check_match(s, start, match, length) -#endif /* DEBUG */ +#endif /* ZLIB_DEBUG */ /* =========================================================================== * Fill the window when the lookahead becomes insufficient. @@ -1414,8 +1506,7 @@ local void check_match(s, start, match, length) local void fill_window(s) deflate_state *s; { - register unsigned n, m; - register Posf *p; + unsigned n; unsigned more; /* Amount of free space at the end of the window. */ uInt wsize = s->w_size; @@ -1442,35 +1533,11 @@ local void fill_window(s) */ if (s->strstart >= wsize+MAX_DIST(s)) { - zmemcpy(s->window, s->window+wsize, (unsigned)wsize); + zmemcpy(s->window, s->window+wsize, (unsigned)wsize - more); s->match_start -= wsize; s->strstart -= wsize; /* we now have strstart >= MAX_DIST */ s->block_start -= (long) wsize; - - /* Slide the hash table (could be avoided with 32 bit values - at the expense of memory usage). We slide even when level == 0 - to keep the hash table consistent if we switch back to level > 0 - later. (Using level 0 permanently is not an optimal usage of - zlib, so we don't care about this pathological case.) - */ - n = s->hash_size; - p = &s->head[n]; - do { - m = *--p; - *p = (Pos)(m >= wsize ? m-wsize : NIL); - } while (--n); - - n = wsize; -#ifndef FASTEST - p = &s->prev[n]; - do { - m = *--p; - *p = (Pos)(m >= wsize ? m-wsize : NIL); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); -#endif + slide_hash(s); more += wsize; } if (s->strm->avail_in == 0) break; @@ -1576,70 +1643,199 @@ local void fill_window(s) if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \ } +/* Maximum stored block length in deflate format (not including header). */ +#define MAX_STORED 65535 + +/* Minimum of a and b. */ +#define MIN(a, b) ((a) > (b) ? (b) : (a)) + /* =========================================================================== * Copy without compression as much as possible from the input stream, return * the current block state. - * This function does not insert new strings in the dictionary since - * uncompressible data is probably not useful. This function is used - * only for the level=0 compression option. - * NOTE: this function should be optimized to avoid extra copying from - * window to pending_buf. + * + * In case deflateParams() is used to later switch to a non-zero compression + * level, s->matches (otherwise unused when storing) keeps track of the number + * of hash table slides to perform. If s->matches is 1, then one hash table + * slide will be done when switching. If s->matches is 2, the maximum value + * allowed here, then the hash table will be cleared, since two or more slides + * is the same as a clear. + * + * deflate_stored() is written to minimize the number of times an input byte is + * copied. It is most efficient with large input and output buffers, which + * maximizes the opportunites to have a single copy from next_in to next_out. */ local block_state deflate_stored(s, flush) deflate_state *s; int flush; { - /* Stored blocks are limited to 0xffff bytes, pending_buf is limited - * to pending_buf_size, and each stored block has a 5 byte header: + /* Smallest worthy block size when not flushing or finishing. By default + * this is 32K. This can be as small as 507 bytes for memLevel == 1. For + * large input and output buffers, the stored block size will be larger. */ - ulg max_block_size = 0xffff; - ulg max_start; + unsigned min_block = MIN(s->pending_buf_size - 5, s->w_size); - if (max_block_size > s->pending_buf_size - 5) { - max_block_size = s->pending_buf_size - 5; - } - - /* Copy as much as possible from input to output: */ - for (;;) { - /* Fill the window as much as possible: */ - if (s->lookahead <= 1) { - - Assert(s->strstart < s->w_size+MAX_DIST(s) || - s->block_start >= (long)s->w_size, "slide too late"); - - fill_window(s); - if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more; - - if (s->lookahead == 0) break; /* flush the current block */ - } - Assert(s->block_start >= 0L, "block gone"); - - s->strstart += s->lookahead; - s->lookahead = 0; - - /* Emit a stored block if pending_buf will be full: */ - max_start = s->block_start + max_block_size; - if (s->strstart == 0 || (ulg)s->strstart >= max_start) { - /* strstart == 0 is possible when wraparound on 16-bit machine */ - s->lookahead = (uInt)(s->strstart - max_start); - s->strstart = (uInt)max_start; - FLUSH_BLOCK(s, 0); - } - /* Flush if we may have to slide, otherwise block_start may become - * negative and the data will be gone: + /* Copy as many min_block or larger stored blocks directly to next_out as + * possible. If flushing, copy the remaining available input to next_out as + * stored blocks, if there is enough space. + */ + unsigned len, left, have, last = 0; + unsigned used = s->strm->avail_in; + do { + /* Set len to the maximum size block that we can copy directly with the + * available input data and output space. Set left to how much of that + * would be copied from what's left in the window. */ - if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) { - FLUSH_BLOCK(s, 0); + len = MAX_STORED; /* maximum deflate stored block length */ + have = (s->bi_valid + 42) >> 3; /* number of header bytes */ + if (s->strm->avail_out < have) /* need room for header */ + break; + /* maximum stored block length that will fit in avail_out: */ + have = s->strm->avail_out - have; + left = s->strstart - s->block_start; /* bytes left in window */ + if (len > (ulg)left + s->strm->avail_in) + len = left + s->strm->avail_in; /* limit len to the input */ + if (len > have) + len = have; /* limit len to the output */ + + /* If the stored block would be less than min_block in length, or if + * unable to copy all of the available input when flushing, then try + * copying to the window and the pending buffer instead. Also don't + * write an empty block when flushing -- deflate() does that. + */ + if (len < min_block && ((len == 0 && flush != Z_FINISH) || + flush == Z_NO_FLUSH || + len != left + s->strm->avail_in)) + break; + + /* Make a dummy stored block in pending to get the header bytes, + * including any pending bits. This also updates the debugging counts. + */ + last = flush == Z_FINISH && len == left + s->strm->avail_in ? 1 : 0; + _tr_stored_block(s, (char *)0, 0L, last); + + /* Replace the lengths in the dummy stored block with len. */ + s->pending_buf[s->pending - 4] = len; + s->pending_buf[s->pending - 3] = len >> 8; + s->pending_buf[s->pending - 2] = ~len; + s->pending_buf[s->pending - 1] = ~len >> 8; + + /* Write the stored block header bytes. */ + flush_pending(s->strm); + +#ifdef ZLIB_DEBUG + /* Update debugging counts for the data about to be copied. */ + s->compressed_len += len << 3; + s->bits_sent += len << 3; +#endif + + /* Copy uncompressed bytes from the window to next_out. */ + if (left) { + if (left > len) + left = len; + zmemcpy(s->strm->next_out, s->window + s->block_start, left); + s->strm->next_out += left; + s->strm->avail_out -= left; + s->strm->total_out += left; + s->block_start += left; + len -= left; } + + /* Copy uncompressed bytes directly from next_in to next_out, updating + * the check value. + */ + if (len) { + read_buf(s->strm, s->strm->next_out, len); + s->strm->next_out += len; + s->strm->avail_out -= len; + s->strm->total_out += len; + } + } while (last == 0); + + /* Update the sliding window with the last s->w_size bytes of the copied + * data, or append all of the copied data to the existing window if less + * than s->w_size bytes were copied. Also update the number of bytes to + * insert in the hash tables, in the event that deflateParams() switches to + * a non-zero compression level. + */ + used -= s->strm->avail_in; /* number of input bytes directly copied */ + if (used) { + /* If any input was used, then no unused input remains in the window, + * therefore s->block_start == s->strstart. + */ + if (used >= s->w_size) { /* supplant the previous history */ + s->matches = 2; /* clear hash */ + zmemcpy(s->window, s->strm->next_in - s->w_size, s->w_size); + s->strstart = s->w_size; + } + else { + if (s->window_size - s->strstart <= used) { + /* Slide the window down. */ + s->strstart -= s->w_size; + zmemcpy(s->window, s->window + s->w_size, s->strstart); + if (s->matches < 2) + s->matches++; /* add a pending slide_hash() */ + } + zmemcpy(s->window + s->strstart, s->strm->next_in - used, used); + s->strstart += used; + } + s->block_start = s->strstart; + s->insert += MIN(used, s->w_size - s->insert); } - s->insert = 0; - if (flush == Z_FINISH) { - FLUSH_BLOCK(s, 1); + if (s->high_water < s->strstart) + s->high_water = s->strstart; + + /* If the last block was written to next_out, then done. */ + if (last) return finish_done; + + /* If flushing and all input has been consumed, then done. */ + if (flush != Z_NO_FLUSH && flush != Z_FINISH && + s->strm->avail_in == 0 && (long)s->strstart == s->block_start) + return block_done; + + /* Fill the window with any remaining input. */ + have = s->window_size - s->strstart - 1; + if (s->strm->avail_in > have && s->block_start >= (long)s->w_size) { + /* Slide the window down. */ + s->block_start -= s->w_size; + s->strstart -= s->w_size; + zmemcpy(s->window, s->window + s->w_size, s->strstart); + if (s->matches < 2) + s->matches++; /* add a pending slide_hash() */ + have += s->w_size; /* more space now */ } - if ((long)s->strstart > s->block_start) - FLUSH_BLOCK(s, 0); - return block_done; + if (have > s->strm->avail_in) + have = s->strm->avail_in; + if (have) { + read_buf(s->strm, s->window + s->strstart, have); + s->strstart += have; + } + if (s->high_water < s->strstart) + s->high_water = s->strstart; + + /* There was not enough avail_out to write a complete worthy or flushed + * stored block to next_out. Write a stored block to pending instead, if we + * have enough input for a worthy block, or if flushing and there is enough + * room for the remaining input as a stored block in the pending buffer. + */ + have = (s->bi_valid + 42) >> 3; /* number of header bytes */ + /* maximum stored block length that will fit in pending: */ + have = MIN(s->pending_buf_size - have, MAX_STORED); + min_block = MIN(have, s->w_size); + left = s->strstart - s->block_start; + if (left >= min_block || + ((left || flush == Z_FINISH) && flush != Z_NO_FLUSH && + s->strm->avail_in == 0 && left <= have)) { + len = MIN(left, have); + last = flush == Z_FINISH && s->strm->avail_in == 0 && + len == left ? 1 : 0; + _tr_stored_block(s, (charf *)s->window + s->block_start, len, last); + s->block_start += len; + flush_pending(s->strm); + } + + /* We've done all we can with the available input and output. */ + return last ? finish_started : need_more; } /* =========================================================================== @@ -1916,7 +2112,7 @@ local block_state deflate_rle(s, flush) prev == *++scan && prev == *++scan && prev == *++scan && prev == *++scan && scan < strend); - s->match_length = MAX_MATCH - (int)(strend - scan); + s->match_length = MAX_MATCH - (uInt)(strend - scan); if (s->match_length > s->lookahead) s->match_length = s->lookahead; } diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/deflate.h b/jdk/src/java.base/share/native/libzip/zlib/deflate.h similarity index 93% rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/deflate.h rename to jdk/src/java.base/share/native/libzip/zlib/deflate.h index 8be47fa013b..183c22d430a 100644 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/deflate.h +++ b/jdk/src/java.base/share/native/libzip/zlib/deflate.h @@ -23,7 +23,7 @@ */ /* deflate.h -- internal compression state - * Copyright (C) 1995-2012 Jean-loup Gailly + * Copyright (C) 1995-2016 Jean-loup Gailly * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -75,13 +75,16 @@ #define Buf_size 16 /* size of bit buffer in bi_buf */ -#define INIT_STATE 42 -#define EXTRA_STATE 69 -#define NAME_STATE 73 -#define COMMENT_STATE 91 -#define HCRC_STATE 103 -#define BUSY_STATE 113 -#define FINISH_STATE 666 +#define INIT_STATE 42 /* zlib header -> BUSY_STATE */ +#ifdef GZIP +# define GZIP_STATE 57 /* gzip header -> BUSY_STATE | EXTRA_STATE */ +#endif +#define EXTRA_STATE 69 /* gzip extra block -> NAME_STATE */ +#define NAME_STATE 73 /* gzip file name -> COMMENT_STATE */ +#define COMMENT_STATE 91 /* gzip comment -> HCRC_STATE */ +#define HCRC_STATE 103 /* gzip header CRC -> BUSY_STATE */ +#define BUSY_STATE 113 /* deflate -> FINISH_STATE */ +#define FINISH_STATE 666 /* stream complete */ /* Stream status */ @@ -107,7 +110,7 @@ typedef struct static_tree_desc_s static_tree_desc; typedef struct tree_desc_s { ct_data *dyn_tree; /* the dynamic tree */ int max_code; /* largest code with non zero frequency */ - static_tree_desc *stat_desc; /* the corresponding static tree */ + const static_tree_desc *stat_desc; /* the corresponding static tree */ } FAR tree_desc; typedef ush Pos; @@ -124,10 +127,10 @@ typedef struct internal_state { Bytef *pending_buf; /* output still pending */ ulg pending_buf_size; /* size of pending_buf */ Bytef *pending_out; /* next pending byte to output to the stream */ - uInt pending; /* nb of bytes in the pending buffer */ + ulg pending; /* nb of bytes in the pending buffer */ int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ gz_headerp gzhead; /* gzip header information to write */ - uInt gzindex; /* where in extra, name, or comment */ + ulg gzindex; /* where in extra, name, or comment */ Byte method; /* can only be DEFLATED */ int last_flush; /* value of flush param for previous deflate call */ @@ -273,7 +276,7 @@ typedef struct internal_state { uInt matches; /* number of string matches in current block */ uInt insert; /* bytes at end of window left to insert */ -#ifdef DEBUG +#ifdef ZLIB_DEBUG ulg compressed_len; /* total bit length of compressed file mod 2^32 */ ulg bits_sent; /* bit length of compressed data sent mod 2^32 */ #endif @@ -299,7 +302,7 @@ typedef struct internal_state { /* Output a byte on the stream. * IN assertion: there is enough room in pending_buf. */ -#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);} +#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);} #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) @@ -333,7 +336,7 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf, * used. */ -#ifndef DEBUG +#ifndef ZLIB_DEBUG /* Inline versions of _tr_tally for speed: */ #if defined(GEN_TREES_H) || !defined(STDC) @@ -352,8 +355,8 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf, flush = (s->last_lit == s->lit_bufsize-1); \ } # define _tr_tally_dist(s, distance, length, flush) \ - { uch len = (length); \ - ush dist = (distance); \ + { uch len = (uch)(length); \ + ush dist = (ush)(distance); \ s->d_buf[s->last_lit] = dist; \ s->l_buf[s->last_lit++] = len; \ dist--; \ diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/infback.c b/jdk/src/java.base/share/native/libzip/zlib/infback.c similarity index 99% rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/infback.c rename to jdk/src/java.base/share/native/libzip/zlib/infback.c index 7001b4bfe62..4c8283909c1 100644 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/infback.c +++ b/jdk/src/java.base/share/native/libzip/zlib/infback.c @@ -23,7 +23,7 @@ */ /* infback.c -- inflate using a call-back interface - * Copyright (C) 1995-2011 Mark Adler + * Copyright (C) 1995-2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -85,7 +85,7 @@ int stream_size; Tracev((stderr, "inflate: allocated\n")); strm->state = (struct internal_state FAR *)state; state->dmax = 32768U; - state->wbits = windowBits; + state->wbits = (uInt)windowBits; state->wsize = 1U << windowBits; state->window = window; state->wnext = 0; diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/inffast.c b/jdk/src/java.base/share/native/libzip/zlib/inffast.c similarity index 86% rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/inffast.c rename to jdk/src/java.base/share/native/libzip/zlib/inffast.c index 4b9cddd7040..4bfc995f4cc 100644 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/inffast.c +++ b/jdk/src/java.base/share/native/libzip/zlib/inffast.c @@ -23,7 +23,7 @@ */ /* inffast.c -- fast decoding - * Copyright (C) 1995-2008, 2010, 2013 Mark Adler + * Copyright (C) 1995-2017 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -32,26 +32,9 @@ #include "inflate.h" #include "inffast.h" -#ifndef ASMINF - -/* Allow machine dependent optimization for post-increment or pre-increment. - Based on testing to date, - Pre-increment preferred for: - - PowerPC G3 (Adler) - - MIPS R5000 (Randers-Pehrson) - Post-increment preferred for: - - none - No measurable difference: - - Pentium III (Anderson) - - M68060 (Nikl) - */ -#ifdef POSTINC -# define OFF 0 -# define PUP(a) *(a)++ +#ifdef ASMINF +# pragma message("Assembler code may have bugs -- use at your own risk") #else -# define OFF 1 -# define PUP(a) *++(a) -#endif /* Decode literal, length, and distance codes and write out the resulting @@ -120,9 +103,9 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ /* copy state to local variables */ state = (struct inflate_state FAR *)strm->state; - in = strm->next_in - OFF; + in = strm->next_in; last = in + (strm->avail_in - 5); - out = strm->next_out - OFF; + out = strm->next_out; beg = out - (start - strm->avail_out); end = out + (strm->avail_out - 257); #ifdef INFLATE_STRICT @@ -143,9 +126,9 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ input data or output space */ do { if (bits < 15) { - hold += (unsigned long)(PUP(in)) << bits; + hold += (unsigned long)(*in++) << bits; bits += 8; - hold += (unsigned long)(PUP(in)) << bits; + hold += (unsigned long)(*in++) << bits; bits += 8; } here = lcode[hold & lmask]; @@ -158,14 +141,14 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? "inflate: literal '%c'\n" : "inflate: literal 0x%02x\n", here.val)); - PUP(out) = (unsigned char)(here.val); + *out++ = (unsigned char)(here.val); } else if (op & 16) { /* length base */ len = (unsigned)(here.val); op &= 15; /* number of extra bits */ if (op) { if (bits < op) { - hold += (unsigned long)(PUP(in)) << bits; + hold += (unsigned long)(*in++) << bits; bits += 8; } len += (unsigned)hold & ((1U << op) - 1); @@ -174,9 +157,9 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ } Tracevv((stderr, "inflate: length %u\n", len)); if (bits < 15) { - hold += (unsigned long)(PUP(in)) << bits; + hold += (unsigned long)(*in++) << bits; bits += 8; - hold += (unsigned long)(PUP(in)) << bits; + hold += (unsigned long)(*in++) << bits; bits += 8; } here = dcode[hold & dmask]; @@ -189,10 +172,10 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ dist = (unsigned)(here.val); op &= 15; /* number of extra bits */ if (bits < op) { - hold += (unsigned long)(PUP(in)) << bits; + hold += (unsigned long)(*in++) << bits; bits += 8; if (bits < op) { - hold += (unsigned long)(PUP(in)) << bits; + hold += (unsigned long)(*in++) << bits; bits += 8; } } @@ -220,30 +203,30 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ #ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR if (len <= op - whave) { do { - PUP(out) = 0; + *out++ = 0; } while (--len); continue; } len -= op - whave; do { - PUP(out) = 0; + *out++ = 0; } while (--op > whave); if (op == 0) { from = out - dist; do { - PUP(out) = PUP(from); + *out++ = *from++; } while (--len); continue; } #endif } - from = window - OFF; + from = window; if (wnext == 0) { /* very common case */ from += wsize - op; if (op < len) { /* some from window */ len -= op; do { - PUP(out) = PUP(from); + *out++ = *from++; } while (--op); from = out - dist; /* rest from output */ } @@ -254,14 +237,14 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ if (op < len) { /* some from end of window */ len -= op; do { - PUP(out) = PUP(from); + *out++ = *from++; } while (--op); - from = window - OFF; + from = window; if (wnext < len) { /* some from start of window */ op = wnext; len -= op; do { - PUP(out) = PUP(from); + *out++ = *from++; } while (--op); from = out - dist; /* rest from output */ } @@ -272,35 +255,35 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ if (op < len) { /* some from window */ len -= op; do { - PUP(out) = PUP(from); + *out++ = *from++; } while (--op); from = out - dist; /* rest from output */ } } while (len > 2) { - PUP(out) = PUP(from); - PUP(out) = PUP(from); - PUP(out) = PUP(from); + *out++ = *from++; + *out++ = *from++; + *out++ = *from++; len -= 3; } if (len) { - PUP(out) = PUP(from); + *out++ = *from++; if (len > 1) - PUP(out) = PUP(from); + *out++ = *from++; } } else { from = out - dist; /* copy direct from output */ do { /* minimum length is three */ - PUP(out) = PUP(from); - PUP(out) = PUP(from); - PUP(out) = PUP(from); + *out++ = *from++; + *out++ = *from++; + *out++ = *from++; len -= 3; } while (len > 2); if (len) { - PUP(out) = PUP(from); + *out++ = *from++; if (len > 1) - PUP(out) = PUP(from); + *out++ = *from++; } } } @@ -337,8 +320,8 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ hold &= (1U << bits) - 1; /* update state and return */ - strm->next_in = in + OFF; - strm->next_out = out + OFF; + strm->next_in = in; + strm->next_out = out; strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last)); strm->avail_out = (unsigned)(out < end ? 257 + (end - out) : 257 - (out - end)); diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/inffast.h b/jdk/src/java.base/share/native/libzip/zlib/inffast.h similarity index 100% rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/inffast.h rename to jdk/src/java.base/share/native/libzip/zlib/inffast.h diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/inffixed.h b/jdk/src/java.base/share/native/libzip/zlib/inffixed.h similarity index 100% rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/inffixed.h rename to jdk/src/java.base/share/native/libzip/zlib/inffixed.h diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/inflate.c b/jdk/src/java.base/share/native/libzip/zlib/inflate.c similarity index 94% rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/inflate.c rename to jdk/src/java.base/share/native/libzip/zlib/inflate.c index b159c1543a6..ca904e74427 100644 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/inflate.c +++ b/jdk/src/java.base/share/native/libzip/zlib/inflate.c @@ -23,7 +23,7 @@ */ /* inflate.c -- zlib decompression - * Copyright (C) 1995-2012 Mark Adler + * Copyright (C) 1995-2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -116,6 +116,7 @@ #endif /* function prototypes */ +local int inflateStateCheck OF((z_streamp strm)); local void fixedtables OF((struct inflate_state FAR *state)); local int updatewindow OF((z_streamp strm, const unsigned char FAR *end, unsigned copy)); @@ -125,12 +126,26 @@ local int updatewindow OF((z_streamp strm, const unsigned char FAR *end, local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf, unsigned len)); +local int inflateStateCheck(strm) +z_streamp strm; +{ + struct inflate_state FAR *state; + if (strm == Z_NULL || + strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) + return 1; + state = (struct inflate_state FAR *)strm->state; + if (state == Z_NULL || state->strm != strm || + state->mode < HEAD || state->mode > SYNC) + return 1; + return 0; +} + int ZEXPORT inflateResetKeep(strm) z_streamp strm; { struct inflate_state FAR *state; - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; strm->total_in = strm->total_out = state->total = 0; strm->msg = Z_NULL; @@ -155,7 +170,7 @@ z_streamp strm; { struct inflate_state FAR *state; - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; state->wsize = 0; state->whave = 0; @@ -171,7 +186,7 @@ int windowBits; struct inflate_state FAR *state; /* get the state */ - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; /* extract wrap request from windowBits parameter */ @@ -180,7 +195,7 @@ int windowBits; windowBits = -windowBits; } else { - wrap = (windowBits >> 4) + 1; + wrap = (windowBits >> 4) + 5; #ifdef GUNZIP if (windowBits < 48) windowBits &= 15; @@ -234,7 +249,9 @@ int stream_size; if (state == Z_NULL) return Z_MEM_ERROR; Tracev((stderr, "inflate: allocated\n")); strm->state = (struct internal_state FAR *)state; + state->strm = strm; state->window = Z_NULL; + state->mode = HEAD; /* to pass state test in inflateReset2() */ ret = inflateReset2(strm, windowBits); if (ret != Z_OK) { ZFREE(strm, state); @@ -258,17 +275,17 @@ int value; { struct inflate_state FAR *state; - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; if (bits < 0) { state->hold = 0; state->bits = 0; return Z_OK; } - if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR; + if (bits > 16 || state->bits + (uInt)bits > 32) return Z_STREAM_ERROR; value &= (1L << bits) - 1; - state->hold += value << state->bits; - state->bits += bits; + state->hold += (unsigned)value << state->bits; + state->bits += (uInt)bits; return Z_OK; } @@ -649,7 +666,7 @@ int flush; static const unsigned short order[19] = /* permutation of code lengths */ {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; - if (strm == Z_NULL || strm->state == Z_NULL || strm->next_out == Z_NULL || + if (inflateStateCheck(strm) || strm->next_out == Z_NULL || (strm->next_in == Z_NULL && strm->avail_in != 0)) return Z_STREAM_ERROR; @@ -669,6 +686,8 @@ int flush; NEEDBITS(16); #ifdef GUNZIP if ((state->wrap & 2) && hold == 0x8b1f) { /* gzip header */ + if (state->wbits == 0) + state->wbits = 15; state->check = crc32(0L, Z_NULL, 0); CRC2(state->check, hold); INITBITS(); @@ -696,7 +715,7 @@ int flush; len = BITS(4) + 8; if (state->wbits == 0) state->wbits = len; - else if (len > state->wbits) { + if (len > 15 || len > state->wbits) { strm->msg = (char *)"invalid window size"; state->mode = BAD; break; @@ -723,14 +742,16 @@ int flush; } if (state->head != Z_NULL) state->head->text = (int)((hold >> 8) & 1); - if (state->flags & 0x0200) CRC2(state->check, hold); + if ((state->flags & 0x0200) && (state->wrap & 4)) + CRC2(state->check, hold); INITBITS(); state->mode = TIME; case TIME: NEEDBITS(32); if (state->head != Z_NULL) state->head->time = hold; - if (state->flags & 0x0200) CRC4(state->check, hold); + if ((state->flags & 0x0200) && (state->wrap & 4)) + CRC4(state->check, hold); INITBITS(); state->mode = OS; case OS: @@ -739,7 +760,8 @@ int flush; state->head->xflags = (int)(hold & 0xff); state->head->os = (int)(hold >> 8); } - if (state->flags & 0x0200) CRC2(state->check, hold); + if ((state->flags & 0x0200) && (state->wrap & 4)) + CRC2(state->check, hold); INITBITS(); state->mode = EXLEN; case EXLEN: @@ -748,7 +770,8 @@ int flush; state->length = (unsigned)(hold); if (state->head != Z_NULL) state->head->extra_len = (unsigned)hold; - if (state->flags & 0x0200) CRC2(state->check, hold); + if ((state->flags & 0x0200) && (state->wrap & 4)) + CRC2(state->check, hold); INITBITS(); } else if (state->head != Z_NULL) @@ -766,7 +789,7 @@ int flush; len + copy > state->head->extra_max ? state->head->extra_max - len : copy); } - if (state->flags & 0x0200) + if ((state->flags & 0x0200) && (state->wrap & 4)) state->check = crc32(state->check, next, copy); have -= copy; next += copy; @@ -785,9 +808,9 @@ int flush; if (state->head != Z_NULL && state->head->name != Z_NULL && state->length < state->head->name_max) - state->head->name[state->length++] = len; + state->head->name[state->length++] = (Bytef)len; } while (len && copy < have); - if (state->flags & 0x0200) + if ((state->flags & 0x0200) && (state->wrap & 4)) state->check = crc32(state->check, next, copy); have -= copy; next += copy; @@ -806,9 +829,9 @@ int flush; if (state->head != Z_NULL && state->head->comment != Z_NULL && state->length < state->head->comm_max) - state->head->comment[state->length++] = len; + state->head->comment[state->length++] = (Bytef)len; } while (len && copy < have); - if (state->flags & 0x0200) + if ((state->flags & 0x0200) && (state->wrap & 4)) state->check = crc32(state->check, next, copy); have -= copy; next += copy; @@ -820,7 +843,7 @@ int flush; case HCRC: if (state->flags & 0x0200) { NEEDBITS(16); - if (hold != (state->check & 0xffff)) { + if ((state->wrap & 4) && hold != (state->check & 0xffff)) { strm->msg = (char *)"header crc mismatch"; state->mode = BAD; break; @@ -1201,11 +1224,11 @@ int flush; out -= left; strm->total_out += out; state->total += out; - if (out) + if ((state->wrap & 4) && out) strm->adler = state->check = UPDATE(state->check, put - out, out); out = left; - if (( + if ((state->wrap & 4) && ( #ifdef GUNZIP state->flags ? hold : #endif @@ -1264,10 +1287,10 @@ int flush; strm->total_in += in; strm->total_out += out; state->total += out; - if (state->wrap && out) + if ((state->wrap & 4) && out) strm->adler = state->check = UPDATE(state->check, strm->next_out - out, out); - strm->data_type = state->bits + (state->last ? 64 : 0) + + strm->data_type = (int)state->bits + (state->last ? 64 : 0) + (state->mode == TYPE ? 128 : 0) + (state->mode == LEN_ || state->mode == COPY_ ? 256 : 0); if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK) @@ -1279,7 +1302,7 @@ int ZEXPORT inflateEnd(strm) z_streamp strm; { struct inflate_state FAR *state; - if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; if (state->window != Z_NULL) ZFREE(strm, state->window); @@ -1297,7 +1320,7 @@ uInt *dictLength; struct inflate_state FAR *state; /* check state */ - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; /* copy dictionary */ @@ -1322,7 +1345,7 @@ uInt dictLength; int ret; /* check state */ - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; if (state->wrap != 0 && state->mode != DICT) return Z_STREAM_ERROR; @@ -1354,7 +1377,7 @@ gz_headerp head; struct inflate_state FAR *state; /* check state */ - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; if ((state->wrap & 2) == 0) return Z_STREAM_ERROR; @@ -1407,7 +1430,7 @@ z_streamp strm; struct inflate_state FAR *state; /* check parameters */ - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR; @@ -1454,7 +1477,7 @@ z_streamp strm; { struct inflate_state FAR *state; - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; return state->mode == STORED && state->bits == 0; } @@ -1469,8 +1492,7 @@ z_streamp source; unsigned wsize; /* check input */ - if (dest == Z_NULL || source == Z_NULL || source->state == Z_NULL || - source->zalloc == (alloc_func)0 || source->zfree == (free_func)0) + if (inflateStateCheck(source) || dest == Z_NULL) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)source->state; @@ -1491,6 +1513,7 @@ z_streamp source; /* copy state */ zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream)); zmemcpy((voidpf)copy, (voidpf)state, sizeof(struct inflate_state)); + copy->strm = dest; if (state->lencode >= state->codes && state->lencode <= state->codes + ENOUGH - 1) { copy->lencode = copy->codes + (state->lencode - state->codes); @@ -1512,25 +1535,51 @@ int subvert; { struct inflate_state FAR *state; - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; - state->sane = !subvert; #ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR + state->sane = !subvert; return Z_OK; #else + (void)subvert; state->sane = 1; return Z_DATA_ERROR; #endif } +int ZEXPORT inflateValidate(strm, check) +z_streamp strm; +int check; +{ + struct inflate_state FAR *state; + + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if (check) + state->wrap |= 4; + else + state->wrap &= ~4; + return Z_OK; +} + long ZEXPORT inflateMark(strm) z_streamp strm; { struct inflate_state FAR *state; - if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16; + if (inflateStateCheck(strm)) + return -(1L << 16); state = (struct inflate_state FAR *)strm->state; - return ((long)(state->back) << 16) + + return (long)(((unsigned long)((long)state->back)) << 16) + (state->mode == COPY ? state->length : (state->mode == MATCH ? state->was - state->length : 0)); } + +unsigned long ZEXPORT inflateCodesUsed(strm) +z_streamp strm; +{ + struct inflate_state FAR *state; + if (inflateStateCheck(strm)) return (unsigned long)-1; + state = (struct inflate_state FAR *)strm->state; + return (unsigned long)(state->next - state->codes); +} diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/inflate.h b/jdk/src/java.base/share/native/libzip/zlib/inflate.h similarity index 94% rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/inflate.h rename to jdk/src/java.base/share/native/libzip/zlib/inflate.h index 090cb8a792f..060f7fc7a93 100644 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/inflate.h +++ b/jdk/src/java.base/share/native/libzip/zlib/inflate.h @@ -23,7 +23,7 @@ */ /* inflate.h -- internal inflate state definition - * Copyright (C) 1995-2009 Mark Adler + * Copyright (C) 1995-2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -42,7 +42,7 @@ /* Possible inflate modes between inflate() calls */ typedef enum { - HEAD, /* i: waiting for magic header */ + HEAD = 16180, /* i: waiting for magic header */ FLAGS, /* i: waiting for method and flags (gzip) */ TIME, /* i: waiting for modification time (gzip) */ OS, /* i: waiting for extra flags and operating system (gzip) */ @@ -101,11 +101,14 @@ typedef enum { CHECK -> LENGTH -> DONE */ -/* state maintained between inflate() calls. Approximately 10K bytes. */ +/* State maintained between inflate() calls -- approximately 7K bytes, not + including the allocated sliding window, which is up to 32K bytes. */ struct inflate_state { + z_streamp strm; /* pointer back to this zlib stream */ inflate_mode mode; /* current inflate mode */ int last; /* true if processing last block */ - int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ + int wrap; /* bit 0 true for zlib, bit 1 true for gzip, + bit 2 true to validate check value */ int havedict; /* true if dictionary provided */ int flags; /* gzip header method and flags (0 if zlib) */ unsigned dmax; /* zlib header max distance (INFLATE_STRICT) */ diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/inftrees.c b/jdk/src/java.base/share/native/libzip/zlib/inftrees.c similarity index 96% rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/inftrees.c rename to jdk/src/java.base/share/native/libzip/zlib/inftrees.c index c4b0bf2dd4a..5b882ed0df6 100644 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/inftrees.c +++ b/jdk/src/java.base/share/native/libzip/zlib/inftrees.c @@ -23,7 +23,7 @@ */ /* inftrees.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2013 Mark Adler + * Copyright (C) 1995-2017 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -33,7 +33,7 @@ #define MAXBITS 15 const char inflate_copyright[] = - " inflate 1.2.8 Copyright 1995-2013 Mark Adler "; + " inflate 1.2.11 Copyright 1995-2017 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -78,7 +78,7 @@ unsigned short FAR *work; code FAR *next; /* next available space in table */ const unsigned short FAR *base; /* base value table to use */ const unsigned short FAR *extra; /* extra bits table to use */ - int end; /* use base and extra for symbol > end */ + unsigned match; /* use base and extra for symbol >= match */ unsigned short count[MAXBITS+1]; /* number of codes of each length */ unsigned short offs[MAXBITS+1]; /* offsets in table for each length */ static const unsigned short lbase[31] = { /* Length codes 257..285 base */ @@ -86,7 +86,7 @@ unsigned short FAR *work; 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 77, 202}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, @@ -205,19 +205,17 @@ unsigned short FAR *work; switch (type) { case CODES: base = extra = work; /* dummy value--not used */ - end = 19; + match = 20; break; case LENS: base = lbase; - base -= 257; extra = lext; - extra -= 257; - end = 256; + match = 257; break; - default: /* DISTS */ + default: /* DISTS */ base = dbase; extra = dext; - end = -1; + match = 0; } /* initialize state for loop */ @@ -240,13 +238,13 @@ unsigned short FAR *work; for (;;) { /* create table entry */ here.bits = (unsigned char)(len - drop); - if ((int)(work[sym]) < end) { + if (work[sym] + 1U < match) { here.op = (unsigned char)0; here.val = work[sym]; } - else if ((int)(work[sym]) > end) { - here.op = (unsigned char)(extra[work[sym]]); - here.val = base[work[sym]]; + else if (work[sym] >= match) { + here.op = (unsigned char)(extra[work[sym] - match]); + here.val = base[work[sym] - match]; } else { here.op = (unsigned char)(32 + 64); /* end of block */ diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/inftrees.h b/jdk/src/java.base/share/native/libzip/zlib/inftrees.h similarity index 100% rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/inftrees.h rename to jdk/src/java.base/share/native/libzip/zlib/inftrees.h diff --git a/jdk/src/java.base/share/native/libzip/zlib/patches/ChangeLog_java b/jdk/src/java.base/share/native/libzip/zlib/patches/ChangeLog_java new file mode 100644 index 00000000000..86011279eba --- /dev/null +++ b/jdk/src/java.base/share/native/libzip/zlib/patches/ChangeLog_java @@ -0,0 +1,67 @@ +(1) renamed adler32.c -> zadler32.c, zcrc32c -> zcrc32.c + +(2) zconf.h: + - added _LP64 to make uLong a 32-bit int on 64-bit platform + uLong -> 32-bit int + - commented out gz* related def + +-------------------------- +35,37d10 +< /* for _LP64 */ +< #include +< +89d61 +< /* +128d99 +< */ +423,426d393 +< +< #ifdef _LP64 +< typedef unsigned int uLong; /* 32 bits or more */ +< #else +428d394 +< #endif +-------------------------- + +(3) updated crc32.c/crc32(), crc32_z() + unsigned long -> uLong + +-------------------------- + +226,227c202,203 +< uLong ZEXPORT crc32_z(crc, buf, len) +< uLong crc; +--- +> unsigned long ZEXPORT crc32_z(crc, buf, len) +> unsigned long crc; +244c220 +< return (uLong)crc32_little(crc, buf, len); +--- +> return crc32_little(crc, buf, len); +246c222 +< return (uLong)crc32_big(crc, buf, len); +--- +> return crc32_big(crc, buf, len); +261,262c237,238 +< uLong ZEXPORT crc32(crc, buf, len) +< uLong crc; +--- +> unsigned long ZEXPORT crc32(crc, buf, len) +> unsigned long crc; + +-------------------------- + + +(4) zutil.c + commented out gz* +-------------------------- +33d8 +< +35d9 +< /* +37d10 +< */ +-------------------------- + + + diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/trees.c b/jdk/src/java.base/share/native/libzip/zlib/trees.c similarity index 95% rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/trees.c rename to jdk/src/java.base/share/native/libzip/zlib/trees.c index e4ecffea093..c3703c0e763 100644 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/trees.c +++ b/jdk/src/java.base/share/native/libzip/zlib/trees.c @@ -23,7 +23,7 @@ */ /* trees.c -- output deflated data using Huffman coding - * Copyright (C) 1995-2012 Jean-loup Gailly + * Copyright (C) 1995-2017 Jean-loup Gailly * detect_data_type() function provided freely by Cosmin Truta, 2006 * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -60,7 +60,7 @@ #include "deflate.h" -#ifdef DEBUG +#ifdef ZLIB_DEBUG # include #endif @@ -146,13 +146,13 @@ struct static_tree_desc_s { int max_length; /* max bit length for the codes */ }; -local static_tree_desc static_l_desc = +local const static_tree_desc static_l_desc = {static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS}; -local static_tree_desc static_d_desc = +local const static_tree_desc static_d_desc = {static_dtree, extra_dbits, 0, D_CODES, MAX_BITS}; -local static_tree_desc static_bl_desc = +local const static_tree_desc static_bl_desc = {(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS}; /* =========================================================================== @@ -176,18 +176,16 @@ local int detect_data_type OF((deflate_state *s)); local unsigned bi_reverse OF((unsigned value, int length)); local void bi_windup OF((deflate_state *s)); local void bi_flush OF((deflate_state *s)); -local void copy_block OF((deflate_state *s, charf *buf, unsigned len, - int header)); #ifdef GEN_TREES_H local void gen_trees_header OF((void)); #endif -#ifndef DEBUG +#ifndef ZLIB_DEBUG # define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len) /* Send a code of the given tree. c and tree must not have side effects */ -#else /* DEBUG */ +#else /* !ZLIB_DEBUG */ # define send_code(s, c, tree) \ { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \ send_bits(s, tree[c].Code, tree[c].Len); } @@ -206,7 +204,7 @@ local void gen_trees_header OF((void)); * Send a value on a given number of bits. * IN assertion: length <= 16 and value fits in length bits. */ -#ifdef DEBUG +#ifdef ZLIB_DEBUG local void send_bits OF((deflate_state *s, int value, int length)); local void send_bits(s, value, length) @@ -232,12 +230,12 @@ local void send_bits(s, value, length) s->bi_valid += length; } } -#else /* !DEBUG */ +#else /* !ZLIB_DEBUG */ #define send_bits(s, value, length) \ { int len = length;\ if (s->bi_valid > (int)Buf_size - len) {\ - int val = value;\ + int val = (int)value;\ s->bi_buf |= (ush)val << s->bi_valid;\ put_short(s, s->bi_buf);\ s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\ @@ -247,7 +245,7 @@ local void send_bits(s, value, length) s->bi_valid += len;\ }\ } -#endif /* DEBUG */ +#endif /* ZLIB_DEBUG */ /* the arguments must not have side effects */ @@ -341,7 +339,7 @@ local void tr_static_init() * Genererate the file trees.h describing the static trees. */ #ifdef GEN_TREES_H -# ifndef DEBUG +# ifndef ZLIB_DEBUG # include # endif @@ -418,7 +416,7 @@ void ZLIB_INTERNAL _tr_init(s) s->bi_buf = 0; s->bi_valid = 0; -#ifdef DEBUG +#ifdef ZLIB_DEBUG s->compressed_len = 0L; s->bits_sent = 0L; #endif @@ -546,12 +544,12 @@ local void gen_bitlen(s, desc) xbits = 0; if (n >= base) xbits = extra[n-base]; f = tree[n].Freq; - s->opt_len += (ulg)f * (bits + xbits); - if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits); + s->opt_len += (ulg)f * (unsigned)(bits + xbits); + if (stree) s->static_len += (ulg)f * (unsigned)(stree[n].Len + xbits); } if (overflow == 0) return; - Trace((stderr,"\nbit length overflow\n")); + Tracev((stderr,"\nbit length overflow\n")); /* This happens for example on obj2 and pic of the Calgary corpus */ /* Find the first bit length which could increase: */ @@ -578,9 +576,8 @@ local void gen_bitlen(s, desc) m = s->heap[--h]; if (m > max_code) continue; if ((unsigned) tree[m].Len != (unsigned) bits) { - Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s->opt_len += ((long)bits - (long)tree[m].Len) - *(long)tree[m].Freq; + Tracev((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); + s->opt_len += ((ulg)bits - tree[m].Len) * tree[m].Freq; tree[m].Len = (ush)bits; } n--; @@ -602,7 +599,7 @@ local void gen_codes (tree, max_code, bl_count) ushf *bl_count; /* number of codes at each bit length */ { ush next_code[MAX_BITS+1]; /* next code value for each bit length */ - ush code = 0; /* running code value */ + unsigned code = 0; /* running code value */ int bits; /* bit index */ int n; /* code index */ @@ -610,7 +607,8 @@ local void gen_codes (tree, max_code, bl_count) * without bit reversal. */ for (bits = 1; bits <= MAX_BITS; bits++) { - next_code[bits] = code = (code + bl_count[bits-1]) << 1; + code = (code + bl_count[bits-1]) << 1; + next_code[bits] = (ush)code; } /* Check that the bit counts in bl_count are consistent. The last code * must be all ones. @@ -623,7 +621,7 @@ local void gen_codes (tree, max_code, bl_count) int len = tree[n].Len; if (len == 0) continue; /* Now reverse the bits */ - tree[n].Code = bi_reverse(next_code[len]++, len); + tree[n].Code = (ush)bi_reverse(next_code[len]++, len); Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ", n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1)); @@ -845,7 +843,7 @@ local int build_bl_tree(s) if (s->bl_tree[bl_order[max_blindex]].Len != 0) break; } /* Update opt_len to include the bit length tree and counts */ - s->opt_len += 3*(max_blindex+1) + 5+5+4; + s->opt_len += 3*((ulg)max_blindex+1) + 5+5+4; Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", s->opt_len, s->static_len)); @@ -893,11 +891,17 @@ void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last) int last; /* one if this is the last block for a file */ { send_bits(s, (STORED_BLOCK<<1)+last, 3); /* send block type */ -#ifdef DEBUG + bi_windup(s); /* align on byte boundary */ + put_short(s, (ush)stored_len); + put_short(s, (ush)~stored_len); + zmemcpy(s->pending_buf + s->pending, (Bytef *)buf, stored_len); + s->pending += stored_len; +#ifdef ZLIB_DEBUG s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L; s->compressed_len += (stored_len + 4) << 3; + s->bits_sent += 2*16; + s->bits_sent += stored_len<<3; #endif - copy_block(s, buf, (unsigned)stored_len, 1); /* with header */ } /* =========================================================================== @@ -918,7 +922,7 @@ void ZLIB_INTERNAL _tr_align(s) { send_bits(s, STATIC_TREES<<1, 3); send_code(s, END_BLOCK, static_ltree); -#ifdef DEBUG +#ifdef ZLIB_DEBUG s->compressed_len += 10L; /* 3 for block type, 7 for EOB */ #endif bi_flush(s); @@ -926,7 +930,7 @@ void ZLIB_INTERNAL _tr_align(s) /* =========================================================================== * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. + * trees or store, and write out the encoded block. */ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) deflate_state *s; @@ -998,7 +1002,7 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) send_bits(s, (STATIC_TREES<<1)+last, 3); compress_block(s, (const ct_data *)static_ltree, (const ct_data *)static_dtree); -#ifdef DEBUG +#ifdef ZLIB_DEBUG s->compressed_len += 3 + s->static_len; #endif } else { @@ -1007,7 +1011,7 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) max_blindex+1); compress_block(s, (const ct_data *)s->dyn_ltree, (const ct_data *)s->dyn_dtree); -#ifdef DEBUG +#ifdef ZLIB_DEBUG s->compressed_len += 3 + s->opt_len; #endif } @@ -1019,7 +1023,7 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) if (last) { bi_windup(s); -#ifdef DEBUG +#ifdef ZLIB_DEBUG s->compressed_len += 7; /* align on byte boundary */ #endif } @@ -1114,7 +1118,7 @@ local void compress_block(s, ltree, dtree) send_code(s, code, dtree); /* send the distance code */ extra = extra_dbits[code]; if (extra != 0) { - dist -= base_dist[code]; + dist -= (unsigned)base_dist[code]; send_bits(s, dist, extra); /* send the extra distance bits */ } } /* literal or match pair ? */ @@ -1217,34 +1221,7 @@ local void bi_windup(s) } s->bi_buf = 0; s->bi_valid = 0; -#ifdef DEBUG +#ifdef ZLIB_DEBUG s->bits_sent = (s->bits_sent+7) & ~7; #endif } - -/* =========================================================================== - * Copy a stored block, storing first the length and its - * one's complement if requested. - */ -local void copy_block(s, buf, len, header) - deflate_state *s; - charf *buf; /* the input data */ - unsigned len; /* its length */ - int header; /* true if block header must be written */ -{ - bi_windup(s); /* align on byte boundary */ - - if (header) { - put_short(s, (ush)len); - put_short(s, (ush)~len); -#ifdef DEBUG - s->bits_sent += 2*16; -#endif - } -#ifdef DEBUG - s->bits_sent += (ulg)len<<3; -#endif - while (len--) { - put_byte(s, *buf++); - } -} diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/trees.h b/jdk/src/java.base/share/native/libzip/zlib/trees.h similarity index 100% rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/trees.h rename to jdk/src/java.base/share/native/libzip/zlib/trees.h diff --git a/jdk/src/java.base/share/native/libzip/zlib/uncompr.c b/jdk/src/java.base/share/native/libzip/zlib/uncompr.c new file mode 100644 index 00000000000..bd4766ffbf4 --- /dev/null +++ b/jdk/src/java.base/share/native/libzip/zlib/uncompr.c @@ -0,0 +1,117 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* uncompr.c -- decompress a memory buffer + * Copyright (C) 1995-2003, 2010, 2014, 2016 Jean-loup Gailly, Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#define ZLIB_INTERNAL +#include "zlib.h" + +/* =========================================================================== + Decompresses the source buffer into the destination buffer. *sourceLen is + the byte length of the source buffer. Upon entry, *destLen is the total size + of the destination buffer, which must be large enough to hold the entire + uncompressed data. (The size of the uncompressed data must have been saved + previously by the compressor and transmitted to the decompressor by some + mechanism outside the scope of this compression library.) Upon exit, + *destLen is the size of the decompressed data and *sourceLen is the number + of source bytes consumed. Upon return, source + *sourceLen points to the + first unused input byte. + + uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_BUF_ERROR if there was not enough room in the output buffer, or + Z_DATA_ERROR if the input data was corrupted, including if the input data is + an incomplete zlib stream. +*/ +int ZEXPORT uncompress2 (dest, destLen, source, sourceLen) + Bytef *dest; + uLongf *destLen; + const Bytef *source; + uLong *sourceLen; +{ + z_stream stream; + int err; + const uInt max = (uInt)-1; + uLong len, left; + Byte buf[1]; /* for detection of incomplete stream when *destLen == 0 */ + + len = *sourceLen; + if (*destLen) { + left = *destLen; + *destLen = 0; + } + else { + left = 1; + dest = buf; + } + + stream.next_in = (z_const Bytef *)source; + stream.avail_in = 0; + stream.zalloc = (alloc_func)0; + stream.zfree = (free_func)0; + stream.opaque = (voidpf)0; + + err = inflateInit(&stream); + if (err != Z_OK) return err; + + stream.next_out = dest; + stream.avail_out = 0; + + do { + if (stream.avail_out == 0) { + stream.avail_out = left > (uLong)max ? max : (uInt)left; + left -= stream.avail_out; + } + if (stream.avail_in == 0) { + stream.avail_in = len > (uLong)max ? max : (uInt)len; + len -= stream.avail_in; + } + err = inflate(&stream, Z_NO_FLUSH); + } while (err == Z_OK); + + *sourceLen -= len + stream.avail_in; + if (dest != buf) + *destLen = stream.total_out; + else if (stream.total_out && err == Z_BUF_ERROR) + left = 1; + + inflateEnd(&stream); + return err == Z_STREAM_END ? Z_OK : + err == Z_NEED_DICT ? Z_DATA_ERROR : + err == Z_BUF_ERROR && left + stream.avail_out ? Z_DATA_ERROR : + err; +} + +int ZEXPORT uncompress (dest, destLen, source, sourceLen) + Bytef *dest; + uLongf *destLen; + const Bytef *source; + uLong sourceLen; +{ + return uncompress2(dest, destLen, source, &sourceLen); +} diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zadler32.c b/jdk/src/java.base/share/native/libzip/zlib/zadler32.c similarity index 93% rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/zadler32.c rename to jdk/src/java.base/share/native/libzip/zlib/zadler32.c index a3108315221..e1480226310 100644 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zadler32.c +++ b/jdk/src/java.base/share/native/libzip/zlib/zadler32.c @@ -23,7 +23,7 @@ */ /* adler32.c -- compute the Adler-32 checksum of a data stream - * Copyright (C) 1995-2011 Mark Adler + * Copyright (C) 1995-2011, 2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -31,11 +31,9 @@ #include "zutil.h" -#define local static - local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2)); -#define BASE 65521 /* largest prime smaller than 65536 */ +#define BASE 65521U /* largest prime smaller than 65536 */ #define NMAX 5552 /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ @@ -86,10 +84,10 @@ local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2)); #endif /* ========================================================================= */ -uLong ZEXPORT adler32(adler, buf, len) +uLong ZEXPORT adler32_z(adler, buf, len) uLong adler; const Bytef *buf; - uInt len; + z_size_t len; { unsigned long sum2; unsigned n; @@ -156,6 +154,15 @@ uLong ZEXPORT adler32(adler, buf, len) return adler | (sum2 << 16); } +/* ========================================================================= */ +uLong ZEXPORT adler32(adler, buf, len) + uLong adler; + const Bytef *buf; + uInt len; +{ + return adler32_z(adler, buf, len); +} + /* ========================================================================= */ local uLong adler32_combine_(adler1, adler2, len2) uLong adler1; @@ -180,7 +187,7 @@ local uLong adler32_combine_(adler1, adler2, len2) sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem; if (sum1 >= BASE) sum1 -= BASE; if (sum1 >= BASE) sum1 -= BASE; - if (sum2 >= (BASE << 1)) sum2 -= (BASE << 1); + if (sum2 >= ((unsigned long)BASE << 1)) sum2 -= ((unsigned long)BASE << 1); if (sum2 >= BASE) sum2 -= BASE; return sum1 | (sum2 << 16); } diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zconf.h b/jdk/src/java.base/share/native/libzip/zlib/zconf.h similarity index 93% rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/zconf.h rename to jdk/src/java.base/share/native/libzip/zlib/zconf.h index c7edbed7d12..515b33963ac 100644 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zconf.h +++ b/jdk/src/java.base/share/native/libzip/zlib/zconf.h @@ -23,7 +23,7 @@ */ /* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2013 Jean-loup Gailly. + * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -44,7 +44,7 @@ #ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ # define Z_PREFIX_SET -/* all linked symbols */ +/* all linked symbols and init macros */ # define _dist_code z__dist_code # define _length_code z__length_code # define _tr_align z__tr_align @@ -56,6 +56,7 @@ # define adler32 z_adler32 # define adler32_combine z_adler32_combine # define adler32_combine64 z_adler32_combine64 +# define adler32_z z_adler32_z # ifndef Z_SOLO # define compress z_compress # define compress2 z_compress2 @@ -64,10 +65,14 @@ # define crc32 z_crc32 # define crc32_combine z_crc32_combine # define crc32_combine64 z_crc32_combine64 +# define crc32_z z_crc32_z # define deflate z_deflate # define deflateBound z_deflateBound # define deflateCopy z_deflateCopy # define deflateEnd z_deflateEnd +# define deflateGetDictionary z_deflateGetDictionary +# define deflateInit z_deflateInit +# define deflateInit2 z_deflateInit2 # define deflateInit2_ z_deflateInit2_ # define deflateInit_ z_deflateInit_ # define deflateParams z_deflateParams @@ -81,6 +86,7 @@ # define deflate_copyright z_deflate_copyright # define get_crc_table z_get_crc_table # ifndef Z_SOLO +/* # define gz_error z_gz_error # define gz_intmax z_gz_intmax # define gz_strwinerror z_gz_strwinerror @@ -94,6 +100,8 @@ # define gzeof z_gzeof # define gzerror z_gzerror # define gzflush z_gzflush +# define gzfread z_gzfread +# define gzfwrite z_gzfwrite # define gzgetc z_gzgetc # define gzgetc_ z_gzgetc_ # define gzgets z_gzgets @@ -105,7 +113,6 @@ # define gzopen_w z_gzopen_w # endif # define gzprintf z_gzprintf -# define gzvprintf z_gzvprintf # define gzputc z_gzputc # define gzputs z_gzputs # define gzread z_gzread @@ -116,32 +123,40 @@ # define gztell z_gztell # define gztell64 z_gztell64 # define gzungetc z_gzungetc +# define gzvprintf z_gzvprintf # define gzwrite z_gzwrite +*/ # endif # define inflate z_inflate # define inflateBack z_inflateBack # define inflateBackEnd z_inflateBackEnd +# define inflateBackInit z_inflateBackInit # define inflateBackInit_ z_inflateBackInit_ +# define inflateCodesUsed z_inflateCodesUsed # define inflateCopy z_inflateCopy # define inflateEnd z_inflateEnd +# define inflateGetDictionary z_inflateGetDictionary # define inflateGetHeader z_inflateGetHeader +# define inflateInit z_inflateInit +# define inflateInit2 z_inflateInit2 # define inflateInit2_ z_inflateInit2_ # define inflateInit_ z_inflateInit_ # define inflateMark z_inflateMark # define inflatePrime z_inflatePrime # define inflateReset z_inflateReset # define inflateReset2 z_inflateReset2 +# define inflateResetKeep z_inflateResetKeep # define inflateSetDictionary z_inflateSetDictionary -# define inflateGetDictionary z_inflateGetDictionary # define inflateSync z_inflateSync # define inflateSyncPoint z_inflateSyncPoint # define inflateUndermine z_inflateUndermine -# define inflateResetKeep z_inflateResetKeep +# define inflateValidate z_inflateValidate # define inflate_copyright z_inflate_copyright # define inflate_fast z_inflate_fast # define inflate_table z_inflate_table # ifndef Z_SOLO # define uncompress z_uncompress +# define uncompress2 z_uncompress2 # endif # define zError z_zError # ifndef Z_SOLO @@ -251,9 +266,19 @@ # define z_const #endif -/* Some Mac compilers merge all .h files incorrectly: */ -#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) -# define NO_DUMMY_DECL +#ifdef Z_SOLO + typedef unsigned long z_size_t; +#else +# define z_longlong long long +# if defined(NO_SIZE_T) + typedef unsigned NO_SIZE_T z_size_t; +# elif defined(STDC) +# include + typedef size_t z_size_t; +# else + typedef unsigned long z_size_t; +# endif +# undef z_longlong #endif /* Maximum value for memLevel in deflateInit2 */ @@ -283,7 +308,7 @@ Of course this will generally degrade compression (there's no free lunch). The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus a few kilobytes + that is, 32K for windowBits=15 (default value) plus about 7 kilobytes for small objects. */ diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zcrc32.c b/jdk/src/java.base/share/native/libzip/zlib/zcrc32.c similarity index 92% rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/zcrc32.c rename to jdk/src/java.base/share/native/libzip/zlib/zcrc32.c index 0fe90df9799..c1965fd0e8d 100644 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zcrc32.c +++ b/jdk/src/java.base/share/native/libzip/zlib/zcrc32.c @@ -23,7 +23,7 @@ */ /* crc32.c -- compute the CRC-32 of a data stream - * Copyright (C) 1995-2006, 2010, 2011, 2012 Mark Adler + * Copyright (C) 1995-2006, 2010, 2011, 2012, 2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h * * Thanks to Rodney Brown for his contribution of faster @@ -54,17 +54,15 @@ #include "zutil.h" /* for STDC and FAR definitions */ -#define local static - /* Definitions for doing the crc four data bytes at a time. */ #if !defined(NOBYFOUR) && defined(Z_U4) # define BYFOUR #endif #ifdef BYFOUR local unsigned long crc32_little OF((unsigned long, - const unsigned char FAR *, unsigned)); + const unsigned char FAR *, z_size_t)); local unsigned long crc32_big OF((unsigned long, - const unsigned char FAR *, unsigned)); + const unsigned char FAR *, z_size_t)); # define TBLS 8 #else # define TBLS 1 @@ -225,10 +223,10 @@ const z_crc_t FAR * ZEXPORT get_crc_table() #define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1 /* ========================================================================= */ -uLong ZEXPORT crc32(crc, buf, len) +uLong ZEXPORT crc32_z(crc, buf, len) uLong crc; const unsigned char FAR *buf; - uInt len; + z_size_t len; { if (buf == Z_NULL) return 0UL; @@ -259,8 +257,29 @@ uLong ZEXPORT crc32(crc, buf, len) return crc ^ 0xffffffffUL; } +/* ========================================================================= */ +uLong ZEXPORT crc32(crc, buf, len) + uLong crc; + const unsigned char FAR *buf; + uInt len; +{ + return crc32_z(crc, buf, len); +} + #ifdef BYFOUR +/* + This BYFOUR code accesses the passed unsigned char * buffer with a 32-bit + integer pointer type. This violates the strict aliasing rule, where a + compiler can assume, for optimization purposes, that two pointers to + fundamentally different types won't ever point to the same memory. This can + manifest as a problem only if one of the pointers is written to. This code + only reads from those pointers. So long as this code remains isolated in + this compilation unit, there won't be a problem. For this reason, this code + should not be copied and pasted into a compilation unit in which other code + writes to the buffer that is passed to these routines. + */ + /* ========================================================================= */ #define DOLIT4 c ^= *buf4++; \ c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \ @@ -271,7 +290,7 @@ uLong ZEXPORT crc32(crc, buf, len) local unsigned long crc32_little(crc, buf, len) unsigned long crc; const unsigned char FAR *buf; - unsigned len; + z_size_t len; { register z_crc_t c; register const z_crc_t FAR *buf4; @@ -302,7 +321,7 @@ local unsigned long crc32_little(crc, buf, len) } /* ========================================================================= */ -#define DOBIG4 c ^= *++buf4; \ +#define DOBIG4 c ^= *buf4++; \ c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \ crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24] #define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4 @@ -311,7 +330,7 @@ local unsigned long crc32_little(crc, buf, len) local unsigned long crc32_big(crc, buf, len) unsigned long crc; const unsigned char FAR *buf; - unsigned len; + z_size_t len; { register z_crc_t c; register const z_crc_t FAR *buf4; @@ -324,7 +343,6 @@ local unsigned long crc32_big(crc, buf, len) } buf4 = (const z_crc_t FAR *)(const void FAR *)buf; - buf4--; while (len >= 32) { DOBIG32; len -= 32; @@ -333,7 +351,6 @@ local unsigned long crc32_big(crc, buf, len) DOBIG4; len -= 4; } - buf4++; buf = (const unsigned char FAR *)buf4; if (len) do { diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zlib.h b/jdk/src/java.base/share/native/libzip/zlib/zlib.h similarity index 82% rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/zlib.h rename to jdk/src/java.base/share/native/libzip/zlib/zlib.h index 8779cadf207..e383d0e4508 100644 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zlib.h +++ b/jdk/src/java.base/share/native/libzip/zlib/zlib.h @@ -23,9 +23,9 @@ */ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.8, April 28th, 2013 + version 1.2.11, January 15th, 2017 - Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler + Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -61,11 +61,11 @@ extern "C" { #endif -#define ZLIB_VERSION "1.2.8" -#define ZLIB_VERNUM 0x1280 +#define ZLIB_VERSION "1.2.11" +#define ZLIB_VERNUM 0x12b0 #define ZLIB_VER_MAJOR 1 #define ZLIB_VER_MINOR 2 -#define ZLIB_VER_REVISION 8 +#define ZLIB_VER_REVISION 11 #define ZLIB_VER_SUBREVISION 0 /* @@ -89,7 +89,8 @@ extern "C" { with "gz". The gzip format is different from the zlib format. gzip is a gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. - This library can optionally read and write gzip streams in memory as well. + This library can optionally read and write gzip and raw deflate streams in + memory as well. The zlib format was designed to be compact and fast for use in memory and on communications channels. The gzip format was designed for single- @@ -98,7 +99,7 @@ extern "C" { The library does not install any signal handler. The decoder checks the consistency of the compressed data, so the library should never crash - even in case of corrupted input. + even in the case of corrupted input. */ typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); @@ -111,7 +112,7 @@ typedef struct z_stream_s { uInt avail_in; /* number of bytes available at next_in */ uLong total_in; /* total number of input bytes read so far */ - Bytef *next_out; /* next output byte should be put there */ + Bytef *next_out; /* next output byte will go here */ uInt avail_out; /* remaining free space at next_out */ uLong total_out; /* total number of bytes output so far */ @@ -122,8 +123,9 @@ typedef struct z_stream_s { free_func zfree; /* used to free the internal state */ voidpf opaque; /* private data object passed to zalloc and zfree */ - int data_type; /* best guess about the data type: binary or text */ - uLong adler; /* adler32 value of the uncompressed data */ + int data_type; /* best guess about the data type: binary or text + for deflate, or the decoding state for inflate */ + uLong adler; /* Adler-32 or CRC-32 value of the uncompressed data */ uLong reserved; /* reserved for future use */ } z_stream; @@ -166,7 +168,9 @@ typedef gz_header FAR *gz_headerp; zalloc must return Z_NULL if there is not enough memory for the object. If zlib is used in a multi-threaded application, zalloc and zfree must be - thread safe. + thread safe. In that case, zlib is thread-safe. When zalloc and zfree are + Z_NULL on entry to the initialization function, they are set to internal + routines that use the standard library functions malloc() and free(). On 16-bit systems, the functions zalloc and zfree must be able to allocate exactly 65536 bytes, but will not be required to allocate more than this if @@ -179,7 +183,7 @@ typedef gz_header FAR *gz_headerp; The fields total_in and total_out can be used for statistics or progress reports. After compression, total_in holds the total size of the - uncompressed data and may be saved for use in the decompressor (particularly + uncompressed data and may be saved for use by the decompressor (particularly if the decompressor wants to decompress everything in a single step). */ @@ -224,7 +228,7 @@ typedef gz_header FAR *gz_headerp; #define Z_TEXT 1 #define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */ #define Z_UNKNOWN 2 -/* Possible values of the data_type field (though see inflate()) */ +/* Possible values of the data_type field for deflate() */ #define Z_DEFLATED 8 /* The deflate compression method (the only one supported in this version) */ @@ -282,11 +286,11 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); enough room in the output buffer), next_in and avail_in are updated and processing will resume at this point for the next call of deflate(). - - Provide more output starting at next_out and update next_out and avail_out + - Generate more output starting at next_out and update next_out and avail_out accordingly. This action is forced if the parameter flush is non zero. Forcing flush frequently degrades the compression ratio, so this parameter - should be set only when necessary (in interactive applications). Some - output may be provided even if flush is not set. + should be set only when necessary. Some output may be provided even if + flush is zero. Before the call of deflate(), the application should ensure that at least one of the actions is possible, by providing more input and/or consuming more @@ -295,7 +299,9 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); output when it wants, for example when the output buffer is full (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK and with zero avail_out, it must be called again after making room in the output - buffer because there might be more output pending. + buffer because there might be more output pending. See deflatePending(), + which can be used if desired to determine whether or not there is more ouput + in that case. Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to decide how much data to accumulate before producing output, in order to @@ -316,8 +322,8 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); input data so far will be available to the decompressor, as for Z_SYNC_FLUSH. This completes the current deflate block and follows it with an empty fixed codes block that is 10 bits long. This assures that enough bytes are output - in order for the decompressor to finish the block before the empty fixed code - block. + in order for the decompressor to finish the block before the empty fixed + codes block. If flush is set to Z_BLOCK, a deflate block is completed and emitted, as for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to @@ -343,34 +349,38 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); If the parameter flush is set to Z_FINISH, pending input is processed, pending output is flushed and deflate returns with Z_STREAM_END if there was - enough output space; if deflate returns with Z_OK, this function must be - called again with Z_FINISH and more output space (updated avail_out) but no - more input data, until it returns with Z_STREAM_END or an error. After - deflate has returned Z_STREAM_END, the only possible operations on the stream - are deflateReset or deflateEnd. + enough output space. If deflate returns with Z_OK or Z_BUF_ERROR, this + function must be called again with Z_FINISH and more output space (updated + avail_out) but no more input data, until it returns with Z_STREAM_END or an + error. After deflate has returned Z_STREAM_END, the only possible operations + on the stream are deflateReset or deflateEnd. - Z_FINISH can be used immediately after deflateInit if all the compression - is to be done in a single step. In this case, avail_out must be at least the - value returned by deflateBound (see below). Then deflate is guaranteed to - return Z_STREAM_END. If not enough output space is provided, deflate will - not return Z_STREAM_END, and it must be called again as described above. + Z_FINISH can be used in the first deflate call after deflateInit if all the + compression is to be done in a single step. In order to complete in one + call, avail_out must be at least the value returned by deflateBound (see + below). Then deflate is guaranteed to return Z_STREAM_END. If not enough + output space is provided, deflate will not return Z_STREAM_END, and it must + be called again as described above. - deflate() sets strm->adler to the adler32 checksum of all input read - so far (that is, total_in bytes). + deflate() sets strm->adler to the Adler-32 checksum of all input read + so far (that is, total_in bytes). If a gzip stream is being generated, then + strm->adler will be the CRC-32 checksum of the input read so far. (See + deflateInit2 below.) deflate() may update strm->data_type if it can make a good guess about - the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered - binary. This field is only for information purposes and does not affect the - compression algorithm in any manner. + the input data type (Z_BINARY or Z_TEXT). If in doubt, the data is + considered binary. This field is only for information purposes and does not + affect the compression algorithm in any manner. deflate() returns Z_OK if some progress has been made (more input processed or more output produced), Z_STREAM_END if all input has been consumed and all output has been produced (only when flush is set to Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example - if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible - (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not - fatal, and deflate() can be called again with more input and more output - space to continue compressing. + if next_in or next_out was Z_NULL or the state was inadvertently written over + by the application), or Z_BUF_ERROR if no progress is possible (for example + avail_in or avail_out was zero). Note that Z_BUF_ERROR is not fatal, and + deflate() can be called again with more input and more output space to + continue compressing. */ @@ -393,23 +403,21 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); Initializes the internal stream state for decompression. The fields next_in, avail_in, zalloc, zfree and opaque must be initialized before by - the caller. If next_in is not Z_NULL and avail_in is large enough (the - exact value depends on the compression method), inflateInit determines the - compression method from the zlib header and allocates all data structures - accordingly; otherwise the allocation will be deferred to the first call of - inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to - use default allocation functions. + the caller. In the current version of inflate, the provided input is not + read or consumed. The allocation of a sliding window will be deferred to + the first call of inflate (if the decompression does not complete on the + first call). If zalloc and zfree are set to Z_NULL, inflateInit updates + them to use default allocation functions. inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_VERSION_ERROR if the zlib library version is incompatible with the version assumed by the caller, or Z_STREAM_ERROR if the parameters are invalid, such as a null pointer to the structure. msg is set to null if - there is no error message. inflateInit does not perform any decompression - apart from possibly reading the zlib header if present: actual decompression - will be done by inflate(). (So next_in and avail_in may be modified, but - next_out and avail_out are unused and unchanged.) The current implementation - of inflateInit() does not process any header information -- that is deferred - until inflate() is called. + there is no error message. inflateInit does not perform any decompression. + Actual decompression will be done by inflate(). So next_in, and avail_in, + next_out, and avail_out are unused and unchanged. The current + implementation of inflateInit() does not process any header information -- + that is deferred until inflate() is called. */ @@ -425,17 +433,20 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); - Decompress more input starting at next_in and update next_in and avail_in accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in is updated and processing will - resume at this point for the next call of inflate(). + enough room in the output buffer), then next_in and avail_in are updated + accordingly, and processing will resume at this point for the next call of + inflate(). - - Provide more output starting at next_out and update next_out and avail_out + - Generate more output starting at next_out and update next_out and avail_out accordingly. inflate() provides as much output as possible, until there is no more input data or no more space in the output buffer (see below about the flush parameter). Before the call of inflate(), the application should ensure that at least one of the actions is possible, by providing more input and/or consuming more - output, and updating the next_* and avail_* values accordingly. The + output, and updating the next_* and avail_* values accordingly. If the + caller of inflate() does not provide both available input and available + output space, it is possible that there will be no progress made. The application can consume the uncompressed output when it wants, for example when the output buffer is full (avail_out == 0), or after each call of inflate(). If inflate returns Z_OK and with zero avail_out, it must be @@ -452,7 +463,7 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); gets to the end of that block, or when it runs out of data. The Z_BLOCK option assists in appending to or combining deflate streams. - Also to assist in this, on return inflate() will set strm->data_type to the + To assist in this, on return inflate() always sets strm->data_type to the number of unused bits in the last byte taken from strm->next_in, plus 64 if inflate() is currently decoding the last block in the deflate stream, plus 128 if inflate() returned immediately after decoding an end-of-block code or @@ -478,7 +489,7 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); this case all pending input is processed and all pending output is flushed; avail_out must be large enough to hold all of the uncompressed data for the operation to complete. (The size of the uncompressed data may have been - saved by the compressor for this purpose.) The use of Z_FINISH is not + saved by the compressor for this purpose.) The use of Z_FINISH is not required to perform an inflation in one step. However it may be used to inform inflate that a faster approach can be used for the single inflate() call. Z_FINISH also informs inflate to not maintain a sliding window if the @@ -500,32 +511,33 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); chosen by the compressor and returns Z_NEED_DICT; otherwise it sets strm->adler to the Adler-32 checksum of all output produced so far (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described - below. At the end of the stream, inflate() checks that its computed adler32 + below. At the end of the stream, inflate() checks that its computed Adler-32 checksum is equal to that saved by the compressor and returns Z_STREAM_END only if the checksum is correct. inflate() can decompress and check either zlib-wrapped or gzip-wrapped deflate data. The header type is detected automatically, if requested when initializing with inflateInit2(). Any information contained in the gzip - header is not retained, so applications that need that information should - instead use raw inflate, see inflateInit2() below, or inflateBack() and - perform their own processing of the gzip header and trailer. When processing + header is not retained unless inflateGetHeader() is used. When processing gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output - producted so far. The CRC-32 is checked against the gzip trailer. + produced so far. The CRC-32 is checked against the gzip trailer, as is the + uncompressed length, modulo 2^32. inflate() returns Z_OK if some progress has been made (more input processed or more output produced), Z_STREAM_END if the end of the compressed data has been reached and all uncompressed output has been produced, Z_NEED_DICT if a preset dictionary is needed at this point, Z_DATA_ERROR if the input data was corrupted (input stream not conforming to the zlib format or incorrect check - value), Z_STREAM_ERROR if the stream structure was inconsistent (for example - next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory, - Z_BUF_ERROR if no progress is possible or if there was not enough room in the - output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and + value, in which case strm->msg points to a string with a more specific + error), Z_STREAM_ERROR if the stream structure was inconsistent (for example + next_in or next_out was Z_NULL, or the state was inadvertently written over + by the application), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR + if no progress was possible or if there was not enough room in the output + buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and inflate() can be called again with more input and more output space to continue decompressing. If Z_DATA_ERROR is returned, the application may then call inflateSync() to look for a good compression block if a partial - recovery of the data is desired. + recovery of the data is to be attempted. */ @@ -535,9 +547,8 @@ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); This function discards any unprocessed input and does not flush any pending output. - inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state - was inconsistent. In the error case, msg may be set but then points to a - static string (which must not be deallocated). + inflateEnd returns Z_OK if success, or Z_STREAM_ERROR if the stream state + was inconsistent. */ @@ -568,16 +579,29 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, compression at the expense of memory usage. The default value is 15 if deflateInit is used instead. + For the current implementation of deflate(), a windowBits value of 8 (a + window size of 256 bytes) is not supported. As a result, a request for 8 + will result in 9 (a 512-byte window). In that case, providing 8 to + inflateInit2() will result in an error when the zlib header with 9 is + checked against the initialization of inflate(). The remedy is to not use 8 + with deflateInit2() with this initialization, or at least in that case use 9 + with inflateInit2(). + windowBits can also be -8..-15 for raw deflate. In this case, -windowBits determines the window size. deflate() will then generate raw deflate data - with no zlib header or trailer, and will not compute an adler32 check value. + with no zlib header or trailer, and will not compute a check value. windowBits can also be greater than 15 for optional gzip encoding. Add 16 to windowBits to write a simple gzip header and trailer around the compressed data instead of a zlib wrapper. The gzip header will have no file name, no extra data, no comment, no modification time (set to zero), no - header crc, and the operating system will be set to 255 (unknown). If a - gzip stream is being written, strm->adler is a crc32 instead of an adler32. + header crc, and the operating system will be set to the appropriate value, + if the operating system was determined at compile time. If a gzip stream is + being written, strm->adler is a CRC-32 instead of an Adler-32. + + For raw deflate or gzip encoding, a request for a 256-byte window is + rejected as invalid, since only the zlib header provides a means of + transmitting the window size to the decompressor. The memLevel parameter specifies how much memory should be allocated for the internal compression state. memLevel=1 uses minimum memory but is @@ -638,12 +662,12 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, addition, the current implementation of deflate will use at most the window size minus 262 bytes of the provided dictionary. - Upon return of this function, strm->adler is set to the adler32 value + Upon return of this function, strm->adler is set to the Adler-32 value of the dictionary; the decompressor may later use this value to determine - which dictionary has been used by the compressor. (The adler32 value + which dictionary has been used by the compressor. (The Adler-32 value applies to the whole dictionary even if only a subset of the dictionary is actually used by the compressor.) If a raw deflate was requested, then the - adler32 value is not computed and strm->adler is not set. + Adler-32 value is not computed and strm->adler is not set. deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is @@ -652,6 +676,28 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, not perform any compression: this will be done by deflate(). */ +ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm, + Bytef *dictionary, + uInt *dictLength)); +/* + Returns the sliding dictionary being maintained by deflate. dictLength is + set to the number of bytes in the dictionary, and that many bytes are copied + to dictionary. dictionary must have enough space, where 32768 bytes is + always enough. If deflateGetDictionary() is called with dictionary equal to + Z_NULL, then only the dictionary length is returned, and nothing is copied. + Similary, if dictLength is Z_NULL, then it is not set. + + deflateGetDictionary() may return a length less than the window size, even + when more than the window size in input has been provided. It may return up + to 258 bytes less in that case, due to how zlib's implementation of deflate + manages the sliding window and lookahead for matches, where matches can be + up to 258 bytes long. If the application needs the last window-size bytes of + input, then that would need to be saved by the application outside of zlib. + + deflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the + stream state is inconsistent. +*/ + ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, z_streamp source)); /* @@ -672,10 +718,10 @@ ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); /* - This function is equivalent to deflateEnd followed by deflateInit, - but does not free and reallocate all the internal compression state. The - stream will keep the same compression level and any other attributes that - may have been set by deflateInit2. + This function is equivalent to deflateEnd followed by deflateInit, but + does not free and reallocate the internal compression state. The stream + will leave the compression level and any other attributes that may have been + set unchanged. deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent (such as zalloc or state being Z_NULL). @@ -686,20 +732,36 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, int strategy)); /* Dynamically update the compression level and compression strategy. The - interpretation of level and strategy is as in deflateInit2. This can be + interpretation of level and strategy is as in deflateInit2(). This can be used to switch between compression and straight copy of the input data, or to switch to a different kind of input data requiring a different strategy. - If the compression level is changed, the input available so far is - compressed with the old level (and may be flushed); the new level will take - effect only at the next call of deflate(). + If the compression approach (which is a function of the level) or the + strategy is changed, and if any input has been consumed in a previous + deflate() call, then the input available so far is compressed with the old + level and strategy using deflate(strm, Z_BLOCK). There are three approaches + for the compression levels 0, 1..3, and 4..9 respectively. The new level + and strategy will take effect at the next call of deflate(). - Before the call of deflateParams, the stream state must be set as for - a call of deflate(), since the currently available input may have to be - compressed and flushed. In particular, strm->avail_out must be non-zero. + If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does + not have enough output space to complete, then the parameter change will not + take effect. In this case, deflateParams() can be called again with the + same parameters and more output space to try again. - deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source - stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if - strm->avail_out was zero. + In order to assure a change in the parameters on the first try, the + deflate stream should be flushed using deflate() with Z_BLOCK or other flush + request until strm.avail_out is not zero, before calling deflateParams(). + Then no more input data should be provided before the deflateParams() call. + If this is done, the old level and strategy will be applied to the data + compressed before deflateParams(), and the new level and strategy will be + applied to the the data compressed after deflateParams(). + + deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream + state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if + there was not enough output space to complete the compression of the + available input data before a change in the strategy or approach. Note that + in the case of a Z_BUF_ERROR, the parameters are not changed. A return + value of Z_BUF_ERROR is not fatal, in which case deflateParams() can be + retried with more output space. */ ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, @@ -817,7 +879,7 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, is for use with other formats that use the deflate compressed data format such as zip. Those formats provide their own check values. If a custom format is developed using the raw deflate format for compressed data, it is - recommended that a check value such as an adler32 or a crc32 be applied to + recommended that a check value such as an Adler-32 or a CRC-32 be applied to the uncompressed data as is done in the zlib, gzip, and zip formats. For most applications, the zlib format should be used as is. Note that comments above on the use in deflateInit2() applies to the magnitude of windowBits. @@ -826,7 +888,10 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, 32 to windowBits to enable zlib and gzip decoding with automatic header detection, or add 16 to decode only the gzip format (the zlib format will return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a - crc32 instead of an adler32. + CRC-32 instead of an Adler-32. Unlike the gunzip utility and gzread() (see + below), inflate() will not automatically decode concatenated gzip streams. + inflate() will return Z_STREAM_END at the end of the gzip stream. The state + would need to be reset to continue decoding a subsequent gzip stream. inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_VERSION_ERROR if the zlib library version is incompatible with the @@ -847,7 +912,7 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, Initializes the decompression dictionary from the given uncompressed byte sequence. This function must be called immediately after a call of inflate, if that call returned Z_NEED_DICT. The dictionary chosen by the compressor - can be determined from the adler32 value returned by that call of inflate. + can be determined from the Adler-32 value returned by that call of inflate. The compressor and decompressor must use exactly the same dictionary (see deflateSetDictionary). For raw inflate, this function can be called at any time to set the dictionary. If the provided dictionary is smaller than the @@ -858,7 +923,7 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the - expected one (incorrect adler32 value). inflateSetDictionary does not + expected one (incorrect Adler-32 value). inflateSetDictionary does not perform any decompression: this will be done by subsequent calls of inflate(). */ @@ -916,7 +981,7 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); /* This function is equivalent to inflateEnd followed by inflateInit, - but does not free and reallocate all the internal decompression state. The + but does not free and reallocate the internal decompression state. The stream will keep attributes that may have been set by inflateInit2. inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source @@ -928,7 +993,9 @@ ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, /* This function is the same as inflateReset, but it also permits changing the wrap and window size requests. The windowBits parameter is interpreted - the same as it is for inflateInit2. + the same as it is for inflateInit2. If the window size is changed, then the + memory allocated for the window is freed, and the window will be reallocated + by inflate() if needed. inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent (such as zalloc or state being Z_NULL), or if @@ -980,7 +1047,7 @@ ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); location in the input stream can be determined from avail_in and data_type as noted in the description for the Z_BLOCK flush parameter for inflate. - inflateMark returns the value noted above or -1 << 16 if the provided + inflateMark returns the value noted above, or -65536 if the provided source stream state was inconsistent. */ @@ -1072,9 +1139,9 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, This routine would normally be used in a utility that reads zip or gzip files and writes out uncompressed files. The utility would decode the header and process the trailer on its own, hence this routine expects only - the raw deflate stream to decompress. This is different from the normal - behavior of inflate(), which expects either a zlib or gzip header and - trailer around the deflate stream. + the raw deflate stream to decompress. This is different from the default + behavior of inflate(), which expects a zlib header and trailer around the + deflate stream. inflateBack() uses two subroutines supplied by the caller that are then called by inflateBack() for input and output. inflateBack() calls those @@ -1083,12 +1150,12 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, parameters and return types are defined above in the in_func and out_func typedefs. inflateBack() will call in(in_desc, &buf) which should return the number of bytes of provided input, and a pointer to that input in buf. If - there is no input available, in() must return zero--buf is ignored in that - case--and inflateBack() will return a buffer error. inflateBack() will call - out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out() - should return zero on success, or non-zero on failure. If out() returns - non-zero, inflateBack() will return with an error. Neither in() nor out() - are permitted to change the contents of the window provided to + there is no input available, in() must return zero -- buf is ignored in that + case -- and inflateBack() will return a buffer error. inflateBack() will + call out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. + out() should return zero on success, or non-zero on failure. If out() + returns non-zero, inflateBack() will return with an error. Neither in() nor + out() are permitted to change the contents of the window provided to inflateBackInit(), which is also the buffer that out() uses to write from. The length written by out() will be at most the window size. Any non-zero amount of input may be provided by in(). @@ -1116,7 +1183,7 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, using strm->next_in which will be Z_NULL only if in() returned an error. If strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning non-zero. (in() will always be called before out(), so strm->next_in is - assured to be defined if out() returns non-zero.) Note that inflateBack() + assured to be defined if out() returns non-zero.) Note that inflateBack() cannot return Z_OK. */ @@ -1138,7 +1205,7 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); 7.6: size of z_off_t Compiler, assembler, and debug options: - 8: DEBUG + 8: ZLIB_DEBUG 9: ASMV or ASMINF -- use ASM code 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention 11: 0 (reserved) @@ -1188,7 +1255,8 @@ ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, the byte length of the source buffer. Upon entry, destLen is the total size of the destination buffer, which must be at least the value returned by compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed buffer. + compressed data. compress() is equivalent to compress2() with a level + parameter of Z_DEFAULT_COMPRESSION. compress returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output @@ -1204,7 +1272,7 @@ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, length of the source buffer. Upon entry, destLen is the total size of the destination buffer, which must be at least the value returned by compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed buffer. + compressed data. compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output buffer, @@ -1227,7 +1295,7 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, uncompressed data. (The size of the uncompressed data must have been saved previously by the compressor and transmitted to the decompressor by some mechanism outside the scope of this compression library.) Upon exit, destLen - is the actual size of the uncompressed buffer. + is the actual size of the uncompressed data. uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output @@ -1236,6 +1304,14 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, buffer with the uncompressed data up to that point. */ +ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong *sourceLen)); +/* + Same as uncompress, except that sourceLen is a pointer, where the + length of the source is *sourceLen. On return, *sourceLen is the number of + source bytes consumed. +*/ + /* gzip file access functions */ /* @@ -1314,10 +1390,9 @@ ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); default buffer size is 8192 bytes. This function must be called after gzopen() or gzdopen(), and before any other calls that read or write the file. The buffer memory allocation is always deferred to the first read or - write. Two buffers are allocated, either both of the specified size when - writing, or one of the specified size and the other twice that size when - reading. A larger buffer size of, for example, 64K or 128K bytes will - noticeably increase the speed of decompression (reading). + write. Three times that size in buffer space is allocated. A larger buffer + size of, for example, 64K or 128K bytes will noticeably increase the speed + of decompression (reading). The new buffer size also affects the maximum length for gzprintf(). @@ -1328,10 +1403,12 @@ ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); /* Dynamically update the compression level or strategy. See the description - of deflateInit2 for the meaning of these parameters. + of deflateInit2 for the meaning of these parameters. Previously provided + data is flushed before the parameter change. - gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not - opened for writing. + gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not + opened for writing, Z_ERRNO if there is an error writing the flushed data, + or Z_MEM_ERROR if there is a memory allocation error. */ ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); @@ -1359,7 +1436,35 @@ ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); case. gzread returns the number of uncompressed bytes actually read, less than - len for end of file, or -1 for error. + len for end of file, or -1 for error. If len is too large to fit in an int, + then nothing is read, -1 is returned, and the error state is set to + Z_STREAM_ERROR. +*/ + +ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems, + gzFile file)); +/* + Read up to nitems items of size size from file to buf, otherwise operating + as gzread() does. This duplicates the interface of stdio's fread(), with + size_t request and return types. If the library defines size_t, then + z_size_t is identical to size_t. If not, then z_size_t is an unsigned + integer type that can contain a pointer. + + gzfread() returns the number of full items read of size size, or zero if + the end of the file was reached and a full item could not be read, or if + there was an error. gzerror() must be consulted if zero is returned in + order to determine if there was an error. If the multiplication of size and + nitems overflows, i.e. the product does not fit in a z_size_t, then nothing + is read, zero is returned, and the error state is set to Z_STREAM_ERROR. + + In the event that the end of file is reached and only a partial item is + available at the end, i.e. the remaining uncompressed data length is not a + multiple of size, then the final partial item is nevetheless read into buf + and the end-of-file flag is set. The length of the partial item read is not + provided, but could be inferred from the result of gztell(). This behavior + is the same as the behavior of fread() implementations in common libraries, + but it prevents the direct use of gzfread() to read a concurrently written + file, reseting and retrying on end-of-file, when size is not 1. */ ZEXTERN int ZEXPORT gzwrite OF((gzFile file, @@ -1370,19 +1475,33 @@ ZEXTERN int ZEXPORT gzwrite OF((gzFile file, error. */ +ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size, + z_size_t nitems, gzFile file)); +/* + gzfwrite() writes nitems items of size size from buf to file, duplicating + the interface of stdio's fwrite(), with size_t request and return types. If + the library defines size_t, then z_size_t is identical to size_t. If not, + then z_size_t is an unsigned integer type that can contain a pointer. + + gzfwrite() returns the number of full items written of size size, or zero + if there was an error. If the multiplication of size and nitems overflows, + i.e. the product does not fit in a z_size_t, then nothing is written, zero + is returned, and the error state is set to Z_STREAM_ERROR. +*/ + ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); /* Converts, formats, and writes the arguments to the compressed file under control of the format string, as in fprintf. gzprintf returns the number of - uncompressed bytes actually written, or 0 in case of error. The number of - uncompressed bytes written is limited to 8191, or one less than the buffer - size given to gzbuffer(). The caller should assure that this limit is not - exceeded. If it is exceeded, then gzprintf() will return an error (0) with - nothing written. In this case, there may also be a buffer overflow with - unpredictable consequences, which is possible only if zlib was compiled with - the insecure functions sprintf() or vsprintf() because the secure snprintf() - or vsnprintf() functions were not available. This can be determined using - zlibCompileFlags(). + uncompressed bytes actually written, or a negative zlib error code in case + of error. The number of uncompressed bytes written is limited to 8191, or + one less than the buffer size given to gzbuffer(). The caller should assure + that this limit is not exceeded. If it is exceeded, then gzprintf() will + return an error (0) with nothing written. In this case, there may also be a + buffer overflow with unpredictable consequences, which is possible only if + zlib was compiled with the insecure functions sprintf() or vsprintf() + because the secure snprintf() or vsnprintf() functions were not available. + This can be determined using zlibCompileFlags(). */ ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); @@ -1442,7 +1561,7 @@ ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); If the flush parameter is Z_FINISH, the remaining data is written and the gzip stream is completed in the output. If gzwrite() is called again, a new gzip stream will be started in the output. gzread() is able to read such - concatented gzip streams. + concatenated gzip streams. gzflush should be called only when strictly necessary because it will degrade compression if called too often. @@ -1596,7 +1715,7 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); return the updated checksum. If buf is Z_NULL, this function returns the required initial value for the checksum. - An Adler-32 checksum is almost as reliable as a CRC32 but can be computed + An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed much faster. Usage example: @@ -1609,6 +1728,12 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); if (adler != original_adler) error(); */ +ZEXTERN uLong ZEXPORT adler32_z OF((uLong adler, const Bytef *buf, + z_size_t len)); +/* + Same as adler32(), but with a size_t length. +*/ + /* ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, z_off_t len2)); @@ -1638,6 +1763,12 @@ ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); if (crc != original_crc) error(); */ +ZEXTERN uLong ZEXPORT crc32_z OF((uLong adler, const Bytef *buf, + z_size_t len)); +/* + Same as crc32(), but with a size_t length. +*/ + /* ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); @@ -1668,19 +1799,35 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, unsigned char FAR *window, const char *version, int stream_size)); -#define deflateInit(strm, level) \ - deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) -#define inflateInit(strm) \ - inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) -#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ - deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ - (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) -#define inflateInit2(strm, windowBits) \ - inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ - (int)sizeof(z_stream)) -#define inflateBackInit(strm, windowBits, window) \ - inflateBackInit_((strm), (windowBits), (window), \ - ZLIB_VERSION, (int)sizeof(z_stream)) +#ifdef Z_PREFIX_SET +# define z_deflateInit(strm, level) \ + deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) +# define z_inflateInit(strm) \ + inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) +# define z_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) +# define z_inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ + (int)sizeof(z_stream)) +# define z_inflateBackInit(strm, windowBits, window) \ + inflateBackInit_((strm), (windowBits), (window), \ + ZLIB_VERSION, (int)sizeof(z_stream)) +#else +# define deflateInit(strm, level) \ + deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) +# define inflateInit(strm) \ + inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) +# define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) +# define inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ + (int)sizeof(z_stream)) +# define inflateBackInit(strm, windowBits, window) \ + inflateBackInit_((strm), (windowBits), (window), \ + ZLIB_VERSION, (int)sizeof(z_stream)) +#endif #ifndef Z_SOLO @@ -1700,10 +1847,10 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ #ifdef Z_PREFIX_SET # undef z_gzgetc # define z_gzgetc(g) \ - ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g)) + ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) #else # define gzgetc(g) \ - ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g)) + ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) #endif /* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or @@ -1761,19 +1908,16 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ #endif /* !Z_SOLO */ -/* hack for buggy compilers */ -#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) - struct internal_state {int dummy;}; -#endif - /* undocumented functions */ ZEXTERN const char * ZEXPORT zError OF((int)); ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); +ZEXTERN int ZEXPORT inflateValidate OF((z_streamp, int)); +ZEXTERN unsigned long ZEXPORT inflateCodesUsed OF ((z_streamp)); ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); -#if defined(_WIN32) && !defined(Z_SOLO) +#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(Z_SOLO) ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, const char *mode)); #endif diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zutil.c b/jdk/src/java.base/share/native/libzip/zlib/zutil.c similarity index 88% rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/zutil.c rename to jdk/src/java.base/share/native/libzip/zlib/zutil.c index e54347610c8..3412cbde8f6 100644 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zutil.c +++ b/jdk/src/java.base/share/native/libzip/zlib/zutil.c @@ -23,32 +23,32 @@ */ /* zutil.c -- target dependent utility functions for the compression library - * Copyright (C) 1995-2005, 2010, 2011, 2012 Jean-loup Gailly. + * Copyright (C) 1995-2017 Jean-loup Gailly * For conditions of distribution and use, see copyright notice in zlib.h */ /* @(#) $Id$ */ #include "zutil.h" -#ifndef Z_SOLO -# include "gzguts.h" -#endif -#ifndef NO_DUMMY_DECL -struct internal_state {int dummy;}; /* for buggy compilers */ +#ifndef Z_SOLO +/* +# include "gzguts.h" +*/ #endif z_const char * const z_errmsg[10] = { -"need dictionary", /* Z_NEED_DICT 2 */ -"stream end", /* Z_STREAM_END 1 */ -"", /* Z_OK 0 */ -"file error", /* Z_ERRNO (-1) */ -"stream error", /* Z_STREAM_ERROR (-2) */ -"data error", /* Z_DATA_ERROR (-3) */ -"insufficient memory", /* Z_MEM_ERROR (-4) */ -"buffer error", /* Z_BUF_ERROR (-5) */ -"incompatible version",/* Z_VERSION_ERROR (-6) */ -""}; + (z_const char *)"need dictionary", /* Z_NEED_DICT 2 */ + (z_const char *)"stream end", /* Z_STREAM_END 1 */ + (z_const char *)"", /* Z_OK 0 */ + (z_const char *)"file error", /* Z_ERRNO (-1) */ + (z_const char *)"stream error", /* Z_STREAM_ERROR (-2) */ + (z_const char *)"data error", /* Z_DATA_ERROR (-3) */ + (z_const char *)"insufficient memory", /* Z_MEM_ERROR (-4) */ + (z_const char *)"buffer error", /* Z_BUF_ERROR (-5) */ + (z_const char *)"incompatible version",/* Z_VERSION_ERROR (-6) */ + (z_const char *)"" +}; const char * ZEXPORT zlibVersion() @@ -85,7 +85,7 @@ uLong ZEXPORT zlibCompileFlags() case 8: flags += 2 << 6; break; default: flags += 3 << 6; } -#ifdef DEBUG +#ifdef ZLIB_DEBUG flags += 1 << 8; #endif #if defined(ASMV) || defined(ASMINF) @@ -139,8 +139,8 @@ uLong ZEXPORT zlibCompileFlags() return flags; } -#ifdef DEBUG - +#ifdef ZLIB_DEBUG +#include # ifndef verbose # define verbose 0 # endif @@ -243,9 +243,11 @@ local ptr_table table[MAX_PTR]; voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size) { - voidpf buf = opaque; /* just to make some compilers happy */ + voidpf buf; ulg bsize = (ulg)items*size; + (void)opaque; + /* If we allocate less than 65520 bytes, we assume that farmalloc * will return a usable pointer which doesn't have to be normalized. */ @@ -268,6 +270,9 @@ voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size) void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) { int n; + + (void)opaque; + if (*(ush*)&ptr != 0) { /* object < 64K */ farfree(ptr); return; @@ -283,7 +288,6 @@ void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) next_ptr--; return; } - ptr = opaque; /* just to make some compilers happy */ Assert(0, "zcfree: ptr not found"); } @@ -302,13 +306,13 @@ void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size) { - if (opaque) opaque = 0; /* to make compiler happy */ + (void)opaque; return _halloc((long)items, size); } void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) { - if (opaque) opaque = 0; /* to make compiler happy */ + (void)opaque; _hfree(ptr); } @@ -330,7 +334,7 @@ voidpf ZLIB_INTERNAL zcalloc (opaque, items, size) unsigned items; unsigned size; { - if (opaque) items += size - size; /* make compiler happy */ + (void)opaque; return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) : (voidpf)calloc(items, size); } @@ -339,8 +343,8 @@ void ZLIB_INTERNAL zcfree (opaque, ptr) voidpf opaque; voidpf ptr; { + (void)opaque; free(ptr); - if (opaque) return; /* make compiler happy */ } #endif /* MY_ZCALLOC */ diff --git a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zutil.h b/jdk/src/java.base/share/native/libzip/zlib/zutil.h similarity index 89% rename from jdk/src/java.base/share/native/libzip/zlib-1.2.8/zutil.h rename to jdk/src/java.base/share/native/libzip/zlib/zutil.h index b82b14d4a5e..c9e1273efc0 100644 --- a/jdk/src/java.base/share/native/libzip/zlib-1.2.8/zutil.h +++ b/jdk/src/java.base/share/native/libzip/zlib/zutil.h @@ -23,7 +23,7 @@ */ /* zutil.h -- internal interface and configuration of the compression library - * Copyright (C) 1995-2013 Jean-loup Gailly. + * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -60,7 +60,9 @@ #ifndef local # define local static #endif -/* compile with -Dlocal if your debugger can't find static symbols */ +/* since "static" is used to mean two completely different things in C, we + define "local" for the non-static meaning of "static", for readability + (compile with -Dlocal if your debugger can't find static symbols) */ typedef unsigned char uch; typedef uch FAR uchf; @@ -122,28 +124,38 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ #endif #ifdef AMIGA -# define OS_CODE 0x01 +# define OS_CODE 1 #endif #if defined(VAXC) || defined(VMS) -# define OS_CODE 0x02 +# define OS_CODE 2 # define F_OPEN(name, mode) \ fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") #endif +#ifdef __370__ +# if __TARGET_LIB__ < 0x20000000 +# define OS_CODE 4 +# elif __TARGET_LIB__ < 0x40000000 +# define OS_CODE 11 +# else +# define OS_CODE 8 +# endif +#endif + #if defined(ATARI) || defined(atarist) -# define OS_CODE 0x05 +# define OS_CODE 5 #endif #ifdef OS2 -# define OS_CODE 0x06 +# define OS_CODE 6 # if defined(M_I86) && !defined(Z_SOLO) # include # endif #endif #if defined(MACOS) || defined(TARGET_OS_MAC) -# define OS_CODE 0x07 +# define OS_CODE 7 # ifndef Z_SOLO # if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os # include /* for fdopen */ @@ -155,18 +167,24 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # endif #endif -#ifdef TOPS20 -# define OS_CODE 0x0a +#ifdef __acorn +# define OS_CODE 13 #endif -#ifdef WIN32 -# ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */ -# define OS_CODE 0x0b -# endif +#if defined(WIN32) && !defined(__CYGWIN__) +# define OS_CODE 10 #endif -#ifdef __50SERIES /* Prime/PRIMOS */ -# define OS_CODE 0x0f +#ifdef _BEOS_ +# define OS_CODE 16 +#endif + +#ifdef __TOS_OS400__ +# define OS_CODE 18 +#endif + +#ifdef __APPLE__ +# define OS_CODE 19 #endif #if defined(_BEOS_) || defined(RISCOS) @@ -201,7 +219,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ /* common defaults */ #ifndef OS_CODE -# define OS_CODE 0x03 /* assume Unix */ +# define OS_CODE 3 /* assume Unix */ #endif #ifndef F_OPEN @@ -240,7 +258,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ #endif /* Diagnostic functions */ -#ifdef DEBUG +#ifdef ZLIB_DEBUG # include extern int ZLIB_INTERNAL z_verbose; extern void ZLIB_INTERNAL z_error OF((char *m)); From b9906eaf316b407453a9c18cbca90d9e4503b075 Mon Sep 17 00:00:00 2001 From: Xueming Shen Date: Wed, 15 Feb 2017 12:11:51 -0800 Subject: [PATCH 211/447] 8173207: Upgrade compression library Reviewed-by: alanb, erikj --- common/bin/unshuffle_list.txt | 4 +- common/nb_native/nbproject/configurations.xml | 144 +++++++++--------- 2 files changed, 74 insertions(+), 74 deletions(-) diff --git a/common/bin/unshuffle_list.txt b/common/bin/unshuffle_list.txt index e5fe5af121d..73ccb0a0136 100644 --- a/common/bin/unshuffle_list.txt +++ b/common/bin/unshuffle_list.txt @@ -361,8 +361,8 @@ jdk/src/java.base/share/native/libverify/check_code.c : jdk/src/share/native/com jdk/src/java.base/share/native/libverify/check_format.c : jdk/src/share/native/common/check_format.c jdk/src/java.base/share/native/libverify/opcodes.in_out : jdk/src/share/native/common/opcodes.in_out jdk/src/java.base/share/native/libzip : jdk/src/share/native/java/util/zip -jdk/src/java.base/share/native/libzip/zlib-1.2.8 : jdk/src/share/native/java/util/zip/zlib-1.2.8 -jdk/src/java.base/share/native/libzip/zlib-1.2.8/patches/ChangeLog_java : jdk/src/share/native/java/util/zip/zlib-1.2.8/patches/ChangeLog_java +jdk/src/java.base/share/native/libzip/zlib : jdk/src/share/native/java/util/zip/zlib +jdk/src/java.base/share/native/libzip/zlib/patches/ChangeLog_java : jdk/src/share/native/java/util/zip/zlib/patches/ChangeLog_java jdk/src/java.base/unix/classes/java/io : jdk/src/solaris/classes/java/io jdk/src/java.base/unix/classes/java/lang : jdk/src/solaris/classes/java/lang jdk/src/java.base/unix/classes/java/net : jdk/src/solaris/classes/java/net diff --git a/common/nb_native/nbproject/configurations.xml b/common/nb_native/nbproject/configurations.xml index 170dc36b3b8..934a95f803c 100644 --- a/common/nb_native/nbproject/configurations.xml +++ b/common/nb_native/nbproject/configurations.xml @@ -1223,7 +1223,7 @@ check_format.c - + compress.c deflate.c gzclose.c @@ -38283,7 +38283,7 @@ ../../jdk/src/java.base/unix/native/include ../../jdk/src/java.base/share/native/libjava ../../jdk/src/java.base/unix/native/libjava - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../build/support/headers/java.base ../../make @@ -38304,7 +38304,7 @@ ../../jdk/src/java.base/unix/native/include ../../jdk/src/java.base/share/native/libjava ../../jdk/src/java.base/unix/native/libjava - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../build/support/headers/java.base ../../make @@ -38325,7 +38325,7 @@ ../../jdk/src/java.base/unix/native/include ../../jdk/src/java.base/share/native/libjava ../../jdk/src/java.base/unix/native/libjava - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../build/support/headers/java.base ../../make @@ -38346,7 +38346,7 @@ ../../jdk/src/java.base/unix/native/include ../../jdk/src/java.base/share/native/libjava ../../jdk/src/java.base/unix/native/libjava - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../build/support/headers/java.base ../../make @@ -38367,7 +38367,7 @@ ../../jdk/src/java.base/unix/native/include ../../jdk/src/java.base/share/native/libjava ../../jdk/src/java.base/unix/native/libjava - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../build/support/headers/java.base ../../make @@ -38377,14 +38377,14 @@ - - @@ -38394,7 +38394,7 @@ - @@ -38404,7 +38404,7 @@ - @@ -38414,7 +38414,7 @@ - @@ -38424,7 +38424,7 @@ - @@ -38434,7 +38434,7 @@ - @@ -38444,7 +38444,7 @@ - @@ -38454,7 +38454,7 @@ - @@ -38464,7 +38464,7 @@ - @@ -38474,7 +38474,7 @@ - @@ -38484,7 +38484,7 @@ - @@ -38494,7 +38494,7 @@ - @@ -38504,7 +38504,7 @@ - @@ -38514,7 +38514,7 @@ - @@ -41203,7 +41203,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41232,7 +41232,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41261,7 +41261,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41290,7 +41290,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41319,7 +41319,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41348,7 +41348,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41377,7 +41377,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41406,7 +41406,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41435,7 +41435,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41464,7 +41464,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41493,7 +41493,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41522,7 +41522,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41551,7 +41551,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41580,7 +41580,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41609,7 +41609,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41638,7 +41638,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41667,7 +41667,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41696,7 +41696,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41725,7 +41725,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41754,7 +41754,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41783,7 +41783,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41812,7 +41812,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41841,7 +41841,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41870,7 +41870,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41899,7 +41899,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41928,7 +41928,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41957,7 +41957,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -41986,7 +41986,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42015,7 +42015,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42044,7 +42044,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42073,7 +42073,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42102,7 +42102,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42131,7 +42131,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42160,7 +42160,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42189,7 +42189,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42218,7 +42218,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42247,7 +42247,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42276,7 +42276,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42305,7 +42305,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42334,7 +42334,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42363,7 +42363,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42413,7 +42413,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42442,7 +42442,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -42471,7 +42471,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -46557,7 +46557,7 @@ ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/unix/native/libjli ../../jdk/src/java.base/share/native/libjli - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../make @@ -46639,7 +46639,7 @@ - + ../../jdk/src/java.desktop/share/native/libsplashscreen/giflib @@ -46647,7 +46647,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -46712,7 +46712,7 @@ ../../jdk/src/java.base/unix/native/libjli ../../jdk/src/java.base/share/native/libjli - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../make @@ -47250,7 +47250,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -47598,7 +47598,7 @@ ../../jdk/src/java.desktop/share/native/libsplashscreen ../../jdk/src/java.desktop/share/native/libsplashscreen/libpng ../../jdk/src/java.desktop/unix/native/libsplashscreen - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/linux/native/libjava ../../jdk/src/java.base/unix/native/libjava ../../jdk/src/java.base/share/native/libjava @@ -47996,7 +47996,7 @@ ../../jdk/src/jdk.pack/share/native/common-unpack ../../jdk/src/java.base/share/native/libjava ../../jdk/src/java.base/unix/native/libjava - ../../jdk/src/java.base/share/native/libzip/zlib-1.2.8 + ../../jdk/src/java.base/share/native/libzip/zlib ../../jdk/src/java.base/share/native/include ../../jdk/src/java.base/linux/native/include ../../jdk/src/java.base/unix/native/include From ff79e8c1d764f12d974d2bab0934e94ee738980b Mon Sep 17 00:00:00 2001 From: Anthony Scarpino Date: Wed, 15 Feb 2017 12:55:20 -0800 Subject: [PATCH 212/447] 8174849: Change SHA1 certpath restrictions Reviewed-by: mullan --- .../sun/security/provider/certpath/AlgorithmChecker.java | 2 +- jdk/src/java.base/share/conf/security/java.security | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/AlgorithmChecker.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/AlgorithmChecker.java index a12484d0e20..0be627b84ac 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/AlgorithmChecker.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/AlgorithmChecker.java @@ -276,7 +276,7 @@ public final class AlgorithmChecker extends PKIXCertPathChecker { AlgorithmParameters currSigAlgParams = algorithmId.getParameters(); PublicKey currPubKey = cert.getPublicKey(); - String currSigAlg = x509Cert.getSigAlgName(); + String currSigAlg = ((X509Certificate)cert).getSigAlgName(); // Check the signature algorithm and parameters against constraints. if (!constraints.permits(SIGNATURE_PRIMITIVE_SET, currSigAlg, diff --git a/jdk/src/java.base/share/conf/security/java.security b/jdk/src/java.base/share/conf/security/java.security index e2fde354bd4..5f2b472ffd3 100644 --- a/jdk/src/java.base/share/conf/security/java.security +++ b/jdk/src/java.base/share/conf/security/java.security @@ -598,8 +598,8 @@ krb5.kdc.bad.policy = tryLast # jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048 # # -jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & denyAfter 2017-01-01, \ - RSA keySize < 1024, DSA keySize < 1024, EC keySize < 224 +jdk.certpath.disabledAlgorithms=MD2, MD5, RSA keySize < 1024, \ + DSA keySize < 1024, EC keySize < 224 # # Algorithm restrictions for signed JAR files From e6e86de1191c7de37eb66cd471d7312f54d82d1d Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Wed, 15 Feb 2017 13:43:52 -0800 Subject: [PATCH 213/447] 8175045: Turn on doclint reference checking in build of the java.management.rmi module Reviewed-by: lancea, mchung --- make/CompileJavaModules.gmk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/CompileJavaModules.gmk b/make/CompileJavaModules.gmk index 147ba8cfab4..a49d09d0619 100644 --- a/make/CompileJavaModules.gmk +++ b/make/CompileJavaModules.gmk @@ -247,7 +247,7 @@ java.management_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint ################################################################################ -java.management.rmi_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint/package:javax.*' +java.management.rmi_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:javax.*' ################################################################################ From 6873ceb82cd97ae5e27350d3604bd1615e7f9f5e Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Wed, 15 Feb 2017 14:12:29 -0800 Subject: [PATCH 214/447] 8173596: JavaCompiler.CompilationTask should support addModules Reviewed-by: ksrini, jlahoda --- .../javax/tools/DocumentationTool.java | 17 ++- .../classes/javax/tools/JavaCompiler.java | 18 ++- .../sun/tools/javac/api/BasicJavacTask.java | 7 +- .../sun/tools/javac/api/JavacTaskImpl.java | 22 ++- .../sun/tools/javac/main/JavaCompiler.java | 11 +- .../com/sun/tools/javac/main/Main.java | 4 +- .../javadoc/internal/api/JavadocTaskImpl.java | 24 ++- .../tool/api/basic/AddModulesTest.java | 142 ++++++++++++++++++ .../tools/javac/modules/AddModulesTest.java | 55 ++++++- 9 files changed, 280 insertions(+), 20 deletions(-) create mode 100644 langtools/test/jdk/javadoc/tool/api/basic/AddModulesTest.java diff --git a/langtools/src/java.compiler/share/classes/javax/tools/DocumentationTool.java b/langtools/src/java.compiler/share/classes/javax/tools/DocumentationTool.java index aeb7b98f9d7..a2a25dee7fc 100644 --- a/langtools/src/java.compiler/share/classes/javax/tools/DocumentationTool.java +++ b/langtools/src/java.compiler/share/classes/javax/tools/DocumentationTool.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -121,7 +121,20 @@ public interface DocumentationTool extends Tool, OptionChecker { */ interface DocumentationTask extends Callable { /** - * Set the locale to be applied when formatting diagnostics and + * Adds root modules to be taken into account during module + * resolution. + * Invalid module names may cause either + * {@code IllegalArgumentException} to be thrown, + * or diagnostics to be reported when the task is started. + * @param moduleNames the names of the root modules + * @throws IllegalArgumentException may be thrown for some + * invalid module names + * @throws IllegalStateException if the task has started + */ + void addModules(Iterable moduleNames); + + /** + * Sets the locale to be applied when formatting diagnostics and * other localized data. * * @param locale the locale to apply; {@code null} means apply no diff --git a/langtools/src/java.compiler/share/classes/javax/tools/JavaCompiler.java b/langtools/src/java.compiler/share/classes/javax/tools/JavaCompiler.java index 2aae7aedc77..1396a4fe7db 100644 --- a/langtools/src/java.compiler/share/classes/javax/tools/JavaCompiler.java +++ b/langtools/src/java.compiler/share/classes/javax/tools/JavaCompiler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,6 @@ package javax.tools; -import java.io.File; import java.io.Writer; import java.nio.charset.Charset; import java.util.Locale; @@ -296,6 +295,18 @@ public interface JavaCompiler extends Tool, OptionChecker { * {@linkplain #setProcessors setProcessors} method. */ interface CompilationTask extends Callable { + /** + * Adds root modules to be taken into account during module + * resolution. + * Invalid module names may cause either + * {@code IllegalArgumentException} to be thrown, + * or diagnostics to be reported when the task is started. + * @param moduleNames the names of the root modules + * @throws IllegalArgumentException may be thrown for some + * invalid module names + * @throws IllegalStateException if the task has started + */ + void addModules(Iterable moduleNames); /** * Sets processors (for annotation processing). This will @@ -307,7 +318,7 @@ public interface JavaCompiler extends Tool, OptionChecker { void setProcessors(Iterable processors); /** - * Set the locale to be applied when formatting diagnostics and + * Sets the locale to be applied when formatting diagnostics and * other localized data. * * @param locale the locale to apply; {@code null} means apply no @@ -330,6 +341,7 @@ public interface JavaCompiler extends Tool, OptionChecker { * in user code. * @throws IllegalStateException if called more than once */ + @Override Boolean call(); } } diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/BasicJavacTask.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/BasicJavacTask.java index 43c0e90b339..f96d8dfce86 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/BasicJavacTask.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/BasicJavacTask.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -154,6 +154,11 @@ public class BasicJavacTask extends JavacTask { return JavacTypes.instance(context); } + @Override @DefinedBy(Api.COMPILER) + public void addModules(Iterable moduleNames) { + throw new IllegalStateException(); + } + @Override @DefinedBy(Api.COMPILER) public void setProcessors(Iterable processors) { throw new IllegalStateException(); diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java index 279346280c0..90e4b316955 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,17 +33,12 @@ import java.util.concurrent.atomic.AtomicBoolean; import javax.annotation.processing.Processor; import javax.lang.model.element.Element; -import javax.lang.model.element.ElementKind; import javax.lang.model.element.TypeElement; -import javax.lang.model.util.ElementFilter; import javax.tools.*; -import javax.tools.JavaFileObject.Kind; import com.sun.source.tree.*; import com.sun.tools.javac.code.*; import com.sun.tools.javac.code.Symbol.ClassSymbol; -import com.sun.tools.javac.code.Symbol.ModuleSymbol; -import com.sun.tools.javac.code.Symbol.PackageSymbol; import com.sun.tools.javac.comp.*; import com.sun.tools.javac.file.BaseFileManager; import com.sun.tools.javac.main.*; @@ -82,6 +77,7 @@ public class JavacTaskImpl extends BasicJavacTask { private ListBuffer> genList; private final AtomicBoolean used = new AtomicBoolean(); private Iterable processors; + private ListBuffer addModules = new ListBuffer<>(); protected JavacTaskImpl(Context context) { super(context, true); @@ -101,7 +97,7 @@ public class JavacTaskImpl extends BasicJavacTask { prepareCompiler(false); if (compiler.errorCount() > 0) return Main.Result.ERROR; - compiler.compile(args.getFileObjects(), args.getClassNames(), processors); + compiler.compile(args.getFileObjects(), args.getClassNames(), processors, addModules); return (compiler.errorCount() > 0) ? Main.Result.ERROR : Main.Result.OK; // FIXME? }, Main.Result.SYSERR, Main.Result.ABNORMAL); } finally { @@ -113,6 +109,18 @@ public class JavacTaskImpl extends BasicJavacTask { } } + @Override @DefinedBy(Api.COMPILER) + public void addModules(Iterable moduleNames) { + Objects.requireNonNull(moduleNames); + // not mt-safe + if (used.get()) + throw new IllegalStateException(); + for (String m : moduleNames) { + Objects.requireNonNull(m); + addModules.add(m); + } + } + @Override @DefinedBy(Api.COMPILER) public void setProcessors(Iterable processors) { Objects.requireNonNull(processors); diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java index 9e2fdf529fa..0e697036011 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java @@ -888,7 +888,7 @@ public class JavaCompiler { public void compile(List sourceFileObject) throws Throwable { - compile(sourceFileObject, List.nil(), null); + compile(sourceFileObject, List.nil(), null, List.nil()); } /** @@ -898,10 +898,13 @@ public class JavaCompiler { * @param classnames class names to process for annotations * @param processors user provided annotation processors to bypass * discovery, {@code null} means that no processors were provided + * @param addModules additional root modules to be used during + * module resolution. */ public void compile(Collection sourceFileObjects, Collection classnames, - Iterable processors) + Iterable processors, + Collection addModules) { if (!taskListener.isEmpty()) { taskListener.started(new TaskEvent(TaskEvent.Kind.COMPILATION)); @@ -932,6 +935,10 @@ public class JavaCompiler { } } + for (String moduleName : addModules) { + modules.addExtraAddModules(moduleName); + } + // These method calls must be chained to avoid memory leaks processAnnotations( enterTrees( diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Main.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Main.java index 30568297301..a9a888769c1 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Main.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Main.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -304,7 +304,7 @@ public class Main { } try { - comp.compile(args.getFileObjects(), args.getClassNames(), null); + comp.compile(args.getFileObjects(), args.getClassNames(), null, List.nil()); if (log.expectDiagKeys != null) { if (log.expectDiagKeys.isEmpty()) { diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/JavadocTaskImpl.java b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/JavadocTaskImpl.java index 42622c35630..91793289166 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/JavadocTaskImpl.java +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/JavadocTaskImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,15 +25,20 @@ package jdk.javadoc.internal.api; +import java.util.ArrayList; import java.util.Collections; +import java.util.List; import java.util.Locale; +import java.util.Objects; import java.util.concurrent.atomic.AtomicBoolean; import javax.tools.DocumentationTool.DocumentationTask; import javax.tools.JavaFileObject; +import com.sun.tools.javac.main.Option; import com.sun.tools.javac.util.ClientCodeException; import com.sun.tools.javac.util.Context; +import com.sun.tools.javac.util.Options; import jdk.javadoc.internal.tool.Start; /** @@ -53,6 +58,7 @@ public class JavadocTaskImpl implements DocumentationTask { private Iterable options; private Iterable fileObjects; private Locale locale; + private List addModules = new ArrayList<>(); public JavadocTaskImpl(Context context, Class docletClass, Iterable options, Iterable fileObjects) { @@ -72,6 +78,16 @@ public class JavadocTaskImpl implements DocumentationTask { this.locale = locale; } + @Override + public void addModules(Iterable moduleNames) { + nullCheck(moduleNames); + if (used.get()) + throw new IllegalStateException(); + for (String name : moduleNames) { + addModules.add(name); + } + } + public Boolean call() { if (!used.getAndSet(true)) { initContext(); @@ -89,6 +105,12 @@ public class JavadocTaskImpl implements DocumentationTask { private void initContext() { //initialize compiler's default locale context.put(Locale.class, locale); + if (!addModules.isEmpty()) { + String names = String.join(",", addModules); + Options opts = Options.instance(context); + String prev = opts.get(Option.ADD_MODULES); + opts.put(Option.ADD_MODULES, (prev == null) ? names : prev + "," + names); + } } private static Iterable nullCheck(Iterable items) { diff --git a/langtools/test/jdk/javadoc/tool/api/basic/AddModulesTest.java b/langtools/test/jdk/javadoc/tool/api/basic/AddModulesTest.java new file mode 100644 index 00000000000..fcc71dae618 --- /dev/null +++ b/langtools/test/jdk/javadoc/tool/api/basic/AddModulesTest.java @@ -0,0 +1,142 @@ +/* + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8173596 + * @summary DocumentationTool.DocumentationTask should support addModules + * @modules jdk.compiler/com.sun.tools.javac.api + * jdk.compiler/com.sun.tools.javac.main + * @library /tools/lib + * @build APITest toolbox.JavacTask toolbox.ToolBox + * @run main AddModulesTest + */ + +import java.io.StringWriter; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Arrays; + +import javax.tools.DocumentationTool; +import javax.tools.DocumentationTool.DocumentationTask; +import javax.tools.DocumentationTool.Location; +import javax.tools.JavaFileObject; +import javax.tools.StandardJavaFileManager; +import javax.tools.StandardLocation; +import javax.tools.ToolProvider; + +import toolbox.Assert; +import toolbox.JavacTask; +import toolbox.ToolBox; + +/** + * Tests for DocumentationTask.addModules method. + */ +public class AddModulesTest extends APITest { + public static void main(String... args) throws Exception { + new AddModulesTest().run(); + } + + private final ToolBox tb = new ToolBox(); + + /** + * Verify that addModules works as expected. + */ + @Test + public void testAddModules() throws Exception { + Path base = Paths.get("testAddModules"); + Path src = base.resolve("src"); + + // setup some utility modules + Path src_m1 = src.resolve("m1x"); + tb.writeJavaFiles(src_m1, + "module m1x { exports p1; }", + "package p1; public class C1 { }"); + Path src_m2 = src.resolve("m2x"); + tb.writeJavaFiles(src_m2, + "module m2x { exports p2; }", + "package p2; public class C2 { }"); + Path modules = base.resolve("modules"); + tb.createDirectories(modules); + + new JavacTask(tb) + .options("--module-source-path", src.toString()) + .outdir(modules) + .files(tb.findJavaFiles(src)) + .run() + .writeAll(); + + // now test access to the modules + Path src2 = base.resolve("src2"); + tb.writeJavaFiles(src2, + "public class Dummy { p1.C1 c1; p2.C2 c2; }"); + Path api = base.resolve("api"); + tb.createDirectories(api); + + DocumentationTool tool = ToolProvider.getSystemDocumentationTool(); + try (StandardJavaFileManager fm = tool.getStandardFileManager(null, null, null)) { + fm.setLocationFromPaths(StandardLocation.MODULE_PATH, Arrays.asList(modules)); + fm.setLocationFromPaths(Location.DOCUMENTATION_OUTPUT, Arrays.asList(api)); + Iterable files = fm.getJavaFileObjects(tb.findJavaFiles(src2)); + + for (boolean useOption : new boolean[] { false, true }) { + System.err.println("Use --add-modules option: " + useOption); + StringWriter sw = new StringWriter(); + DocumentationTask t = tool.getTask(sw, fm, null, null, null, files); + if (useOption) { + t.addModules(Arrays.asList("m1x", "m2x")); + } + String out; + boolean ok; + try { + ok = t.call(); + } finally { + out = sw.toString(); + System.err.println(out); + } + System.err.println("ok: " + ok); + boolean expectErrors = !useOption; + check(out, "package p1 is not visible", expectErrors); + check(out, "package p2 is not visible", expectErrors); + System.err.println(); + } + } + } + + void check(String out, String text, boolean expected) { + System.err.println("Checking for " + + (expected ? "expected" : "unexpected") + + " text: " + text); + + if (expected) { + if (!out.contains(text)) { + error("expected text not found: " + text); + } + } else { + if (out.contains(text)) { + error("unexpected text found: " + text); + } + } + } +} + diff --git a/langtools/test/tools/javac/modules/AddModulesTest.java b/langtools/test/tools/javac/modules/AddModulesTest.java index 8aaba8ecb90..8856fc38f5f 100644 --- a/langtools/test/tools/javac/modules/AddModulesTest.java +++ b/langtools/test/tools/javac/modules/AddModulesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,27 @@ /* * @test + * @bug 8167975 8173596 * @summary Test the --add-modules option * @library /tools/lib * @modules jdk.compiler/com.sun.tools.javac.api * jdk.compiler/com.sun.tools.javac.main - * @build toolbox.ToolBox toolbox.JavacTask ModuleTestBase + * @build toolbox.Assert toolbox.ToolBox toolbox.JavacTask ModuleTestBase * @run main AddModulesTest */ import java.nio.file.Path; +import java.util.Arrays; +import javax.tools.JavaCompiler; +import javax.tools.JavaCompiler.CompilationTask; +import javax.tools.JavaFileObject; +import javax.tools.StandardJavaFileManager; +import javax.tools.StandardLocation; +import javax.tools.ToolProvider; + +import toolbox.Assert; import toolbox.JavacTask; import toolbox.Task; @@ -227,5 +237,46 @@ public class AddModulesTest extends ModuleTestBase { .run() .writeAll(); } + + @Test + public void testAddModulesAPI(Path base) throws Exception { + Path src = base.resolve("src"); + + // setup some utility modules + Path src_m1 = src.resolve("m1x"); + tb.writeJavaFiles(src_m1, + "module m1x { exports p1; }", + "package p1; public class C1 { }"); + Path src_m2 = src.resolve("m2x"); + tb.writeJavaFiles(src_m2, + "module m2x { exports p2; }", + "package p2; public class C2 { }"); + Path modules = base.resolve("modules"); + tb.createDirectories(modules); + + new JavacTask(tb) + .options("--module-source-path", src.toString()) + .outdir(modules) + .files(findJavaFiles(src)) + .run() + .writeAll(); + + // now test access to the modules + Path src2 = base.resolve("src2"); + tb.writeJavaFiles(src2, + "class Dummy { p1.C1 c1; p2.C2 c2; }"); + Path classes = base.resolve("classes"); + tb.createDirectories(classes); + + JavaCompiler c = ToolProvider.getSystemJavaCompiler(); + try (StandardJavaFileManager fm = c.getStandardFileManager(null, null, null)) { + fm.setLocationFromPaths(StandardLocation.MODULE_PATH, Arrays.asList(modules)); + fm.setLocationFromPaths(StandardLocation.CLASS_OUTPUT, Arrays.asList(classes)); + Iterable files = fm.getJavaFileObjects(findJavaFiles(src2)); + CompilationTask t = c.getTask(null, fm, null, null, null, files); + t.addModules(Arrays.asList("m1x", "m2x")); + Assert.check(t.call()); + } + } } From bb1db91db4b66f1330e9494adc048c89f058aae6 Mon Sep 17 00:00:00 2001 From: Kumar Srinivasan Date: Wed, 15 Feb 2017 14:25:50 -0800 Subject: [PATCH 215/447] 8174839: javadoc crashes with a method which does not override a super Reviewed-by: jjg --- .../doclets/toolkit/Configuration.java | 5 +- .../internal/doclets/toolkit/WorkArounds.java | 31 +++++++++- .../internal/doclets/toolkit/util/Utils.java | 2 +- .../testOverridenMethods/TestBadOverride.java | 59 +++++++++++++++++++ .../doclet/testOverridenMethods/pkg4/Foo.java | 31 ++++++++++ 5 files changed, 121 insertions(+), 7 deletions(-) create mode 100644 langtools/test/jdk/javadoc/doclet/testOverridenMethods/TestBadOverride.java create mode 100644 langtools/test/jdk/javadoc/doclet/testOverridenMethods/pkg4/Foo.java diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Configuration.java b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Configuration.java index d34323f94ef..2b538374422 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Configuration.java +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Configuration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,7 +32,6 @@ import javax.lang.model.element.Element; import javax.lang.model.element.ModuleElement; import javax.lang.model.element.PackageElement; import javax.lang.model.element.TypeElement; -import javax.lang.model.util.ElementFilter; import javax.lang.model.util.SimpleElementVisitor9; import javax.tools.JavaFileManager; import javax.tools.JavaFileObject; @@ -1116,7 +1115,7 @@ public abstract class Configuration { @Override public String toString() { - return names.toString(); + return Arrays.toString(names); } @Override diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/WorkArounds.java b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/WorkArounds.java index 50ffb6bafef..782a0dfa0cb 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/WorkArounds.java +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/WorkArounds.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -46,7 +46,6 @@ import javax.lang.model.type.TypeMirror; import javax.lang.model.util.Elements; import javax.tools.FileObject; import javax.tools.JavaFileManager.Location; -import javax.tools.JavaFileObject; import com.sun.source.tree.CompilationUnitTree; import com.sun.source.util.JavacTask; @@ -62,7 +61,6 @@ import com.sun.tools.javac.code.Symbol.MethodSymbol; import com.sun.tools.javac.code.Symbol.ModuleSymbol; import com.sun.tools.javac.code.Symbol.PackageSymbol; import com.sun.tools.javac.code.Symbol.VarSymbol; -import com.sun.tools.javac.code.Symtab; import com.sun.tools.javac.comp.AttrContext; import com.sun.tools.javac.comp.Env; import com.sun.tools.javac.model.JavacElements; @@ -297,6 +295,33 @@ public class WorkArounds { return null; } + // TODO: the method jx.l.m.Elements::overrides does not check + // the return type, see JDK-8174840 until that is resolved, + // use a copy of the same method, with a return type check. + + // Note: the rider.overrides call in this method *must* be consistent + // with the call in overrideType(....), the method above. + public boolean overrides(ExecutableElement e1, ExecutableElement e2, TypeElement cls) { + MethodSymbol rider = (MethodSymbol)e1; + MethodSymbol ridee = (MethodSymbol)e2; + ClassSymbol origin = (ClassSymbol)cls; + + return rider.name == ridee.name && + + // not reflexive as per JLS + rider != ridee && + + // we don't care if ridee is static, though that wouldn't + // compile + !rider.isStatic() && + + // Symbol.overrides assumes the following + ridee.isMemberOf(origin, toolEnv.getTypes()) && + + // check access, signatures and check return types + rider.overrides(ridee, origin, toolEnv.getTypes(), true); + } + // TODO: jx.l.m ? public Location getLocationForModule(ModuleElement mdle) { ModuleSymbol msym = (ModuleSymbol)mdle; diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java index f2663a3cd91..8c4eb8a56d6 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java @@ -893,7 +893,7 @@ public class Utils { } List methods = te.getEnclosedElements(); for (ExecutableElement ee : ElementFilter.methodsIn(methods)) { - if (elementUtils.overrides(method, ee, origin)) { + if (configuration.workArounds.overrides(method, ee, origin)) { return ee; } } diff --git a/langtools/test/jdk/javadoc/doclet/testOverridenMethods/TestBadOverride.java b/langtools/test/jdk/javadoc/doclet/testOverridenMethods/TestBadOverride.java new file mode 100644 index 00000000000..eb7fa864b2f --- /dev/null +++ b/langtools/test/jdk/javadoc/doclet/testOverridenMethods/TestBadOverride.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8174839 + * @summary Bad overriding method should not crash + * @library ../lib + * @modules jdk.javadoc/jdk.javadoc.internal.tool + * @build JavadocTester + * @run main TestBadOverride + */ + +public class TestBadOverride extends JavadocTester { + + /** + * The entry point of the test. + * @param args the array of command line arguments. + */ + public static void main(String... args) throws Exception { + TestBadOverride tester = new TestBadOverride(); + tester.runTests(); + } + + @Test + void test() { + javadoc("-d", "out", + "-sourcepath", testSrc, + "pkg4"); + checkExit(Exit.OK); + + checkOutput("pkg4/Foo.html", true, + "
    26. \n" + + "

      toString

      \n" + + "
      public void toString()
      \n" + + "
      Why can't I do this ?
      \n" + + "
    27. "); + } +} diff --git a/langtools/test/jdk/javadoc/doclet/testOverridenMethods/pkg4/Foo.java b/langtools/test/jdk/javadoc/doclet/testOverridenMethods/pkg4/Foo.java new file mode 100644 index 00000000000..fded7417892 --- /dev/null +++ b/langtools/test/jdk/javadoc/doclet/testOverridenMethods/pkg4/Foo.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package pkg4; + +public class Foo { + /** + * Why can't I do this ? + */ + public void toString() {} +} From 7f74b3f6bc0383719d12cc0c348d3f0c47df3d43 Mon Sep 17 00:00:00 2001 From: Vikrant Agarwal Date: Wed, 15 Feb 2017 16:16:21 -0800 Subject: [PATCH 216/447] 8172500: Create test for SwingSet SliderDemo Reviewed-by: serb, mrkam --- .../client/SwingSet/src/SliderDemoTest.java | 235 +++++++++++++++ .../swingset3/demos/slider/SliderDemo.java | 280 ++++++++++++++++++ .../slider/resources/SliderDemo.properties | 18 ++ 3 files changed, 533 insertions(+) create mode 100644 jdk/test/sanity/client/SwingSet/src/SliderDemoTest.java create mode 100644 jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/slider/SliderDemo.java create mode 100644 jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/slider/resources/SliderDemo.properties diff --git a/jdk/test/sanity/client/SwingSet/src/SliderDemoTest.java b/jdk/test/sanity/client/SwingSet/src/SliderDemoTest.java new file mode 100644 index 00000000000..092743cc4e1 --- /dev/null +++ b/jdk/test/sanity/client/SwingSet/src/SliderDemoTest.java @@ -0,0 +1,235 @@ + +/* + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +import org.jtregext.GuiTestListener; +import com.sun.swingset3.demos.slider.SliderDemo; +import java.awt.Component; +import java.awt.event.KeyEvent; +import java.util.function.Predicate; + +import static org.testng.AssertJUnit.*; +import org.testng.annotations.Test; +import org.netbeans.jemmy.ClassReference; +import org.netbeans.jemmy.ComponentChooser; +import org.netbeans.jemmy.operators.JFrameOperator; +import org.netbeans.jemmy.operators.JSliderOperator; +import org.netbeans.jemmy.accessibility.AccessibleNameChooser; +import static com.sun.swingset3.demos.slider.SliderDemo.*; +import org.testng.annotations.Listeners; + +/* + * @test + * @key headful + * @summary Verifies SwingSet3 SliderDemo by moving the sliders through + * different means, checking the slider value corresponding to it, + * checking maximum and minimum values, checking Snap to tick is working + * and checking the presence of ticks and labels. + * + * @library /sanity/client/lib/jemmy/src + * @library /sanity/client/lib/Extensions/src + * @library /sanity/client/lib/SwingSet3/src + * @modules java.desktop + * java.logging + * @build org.jemmy2ext.JemmyExt + * @build com.sun.swingset3.demos.slider.SliderDemo + * @run testng SliderDemoTest + */ +@Listeners(GuiTestListener.class) +public class SliderDemoTest { + + private static final int PLAIN_SLIDER_MINIMUM = -10; + private static final int PLAIN_SLIDER_MAXIMUM = 100; + private static final int HORIZONTAL_MINOR_TICKS_SLIDER_MINIMUM = 0; + private static final int HORIZONTAL_MINOR_TICKS_SLIDER_MAXIMUM = 11; + private static final int VERTICAL_MINOR_TICKS_SLIDER_MINIMUM = 0; + private static final int VERTICAL_MINOR_TICKS_SLIDER_MAXIMUM = 100; + + @Test + public void test() throws Exception { + new ClassReference(SliderDemo.class.getCanonicalName()).startApplication(); + JFrameOperator frame = new JFrameOperator(DEMO_TITLE); + plain(frame, HORIZONTAL_PLAIN_SLIDER); + majorTicks(frame, HORIZONTAL_MAJOR_TICKS_SLIDER); + minorTicks(frame, HORIZONTAL_MINOR_TICKS_SLIDER); + disabled(frame, HORIZONTAL_DISABLED_SLIDER); + plain(frame, VERTICAL_PLAIN_SLIDER); + majorTicks(frame, VERTICAL_MAJOR_TICKS_SLIDER); + minorTicks(frame, VERTICAL_MINOR_TICKS_SLIDER); + disabled(frame, VERTICAL_DISABLED_SLIDER); + } + + private void plain(JFrameOperator jfo, String accessibleName) { + JSliderOperator jso = new JSliderOperator(jfo, + new AccessibleNameChooser(accessibleName)); + if (accessibleName.equals(HORIZONTAL_PLAIN_SLIDER)) { + checkKeyboard(jso); + checkMouse(jso); + } + checkMaximum(jso, PLAIN_SLIDER_MAXIMUM); + checkMinimum(jso, PLAIN_SLIDER_MINIMUM); + checkMoveForward(jso, 10); + } + + private void majorTicks(JFrameOperator jfo, String accessibleName) { + JSliderOperator jso = new JSliderOperator(jfo, + new AccessibleNameChooser(accessibleName)); + checkMoveForward(jso, 40); + assertTrue(jso.getPaintTicks()); + assertEquals(100, jso.getMajorTickSpacing()); + } + + private void minorTicks(JFrameOperator jfo, String accessibleName) { + JSliderOperator jso = new JSliderOperator(jfo, + new AccessibleNameChooser(accessibleName)); + if (accessibleName.equals(HORIZONTAL_MINOR_TICKS_SLIDER)) { + checkMaximum(jso, HORIZONTAL_MINOR_TICKS_SLIDER_MAXIMUM); + checkMinimum(jso, HORIZONTAL_MINOR_TICKS_SLIDER_MINIMUM); + checkMoveForward(jso, 2); + checkSnapToTick(jso, 5, 6); + assertEquals(5, jso.getMajorTickSpacing()); + assertEquals(1, jso.getMinorTickSpacing()); + } else { + checkMaximum(jso, VERTICAL_MINOR_TICKS_SLIDER_MAXIMUM); + checkMinimum(jso, VERTICAL_MINOR_TICKS_SLIDER_MINIMUM); + checkMoveForward(jso, 10); + assertEquals(20, jso.getMajorTickSpacing()); + assertEquals(5, jso.getMinorTickSpacing()); + } + assertTrue(jso.getPaintTicks()); + assertTrue(jso.getPaintLabels()); + } + + private void disabled(JFrameOperator jfo, String accessibleName) + throws InterruptedException { + JSliderOperator jso = new JSliderOperator(jfo, + new AccessibleNameChooser(accessibleName)); + int initialvalue; + initialvalue = jso.getValue(); + jso.clickMouse(jso.getCenterXForClick(), jso.getCenterYForClick(), 10); + Thread.sleep(500); + assertFalse(jso.hasFocus()); + assertEquals(initialvalue, jso.getValue()); + } + + private void checkMaximum(JSliderOperator jso, int maxValue) { + jso.scrollToMaximum(); + waitSliderValue(jso, jSlider -> jSlider.getValue() == maxValue); + } + + private void checkMinimum(JSliderOperator jso, int minValue) { + jso.scrollToMinimum(); + waitSliderValue(jso, jSlider -> jSlider.getValue() == minValue); + } + + private void checkKeyboard(JSliderOperator jso) { + checkKeyPress(jso, KeyEvent.VK_HOME, + jSlider -> jSlider.getValue() == jso.getMinimum()); + + { + int expectedValue = jso.getValue() + 1; + checkKeyPress(jso, KeyEvent.VK_UP, + jSlider -> jSlider.getValue() >= expectedValue); + } + { + int expectedValue = jso.getValue() + 1; + checkKeyPress(jso, KeyEvent.VK_RIGHT, + jSlider -> jSlider.getValue() >= expectedValue); + } + { + int expectedValue = jso.getValue() + 11; + checkKeyPress(jso, KeyEvent.VK_PAGE_UP, + jSlider -> jSlider.getValue() >= expectedValue); + } + + checkKeyPress(jso, KeyEvent.VK_END, + jSlider -> jSlider.getValue() == jso.getMaximum()); + + { + int expectedValue = jso.getValue() - 1; + checkKeyPress(jso, KeyEvent.VK_DOWN, + jSlider -> jSlider.getValue() <= expectedValue); + } + { + int expectedValue = jso.getValue() - 1; + checkKeyPress(jso, KeyEvent.VK_LEFT, + jSlider -> jSlider.getValue() <= expectedValue); + } + { + int expectedValue = jso.getValue() - 11; + checkKeyPress(jso, KeyEvent.VK_PAGE_DOWN, + jSlider -> jSlider.getValue() <= expectedValue); + } + } + + private void checkKeyPress(JSliderOperator jso, int keyCode, + Predicate predicate) { + jso.pushKey(keyCode); + waitSliderValue(jso, predicate); + } + + private void waitSliderValue(JSliderOperator jso, + Predicate predicate) { + jso.waitState(new ComponentChooser() { + public boolean checkComponent(Component comp) { + return predicate.test(jso); + } + + public String getDescription() { + return "Wait till Slider attains the specified state."; + } + }); + } + + private void checkMoveForward(JSliderOperator jso, int value) { + jso.setValue(jso.getMinimum()); + int finalValue = jso.getValue() + value; + jso.scrollToValue(finalValue); + waitSliderValue(jso, jSlider -> jSlider.getValue() == finalValue); + } + + private void checkSnapToTick(JSliderOperator jso, int expectedLower, + int expectedHigher) { + jso.pressMouse(jso.getCenterXForClick(), jso.getCenterYForClick()); + waitSliderValue(jso, jSlider -> jSlider.getValue() == expectedLower + || jSlider.getValue() == expectedHigher); + jso.releaseMouse(); + } + + private void checkMouse(JSliderOperator jso) { + // Check mouse dragging by pressing on the center of Slider and then + // dragging the mouse till the end of the track. + // We set the initial value of the slider as 45, + // which is the value of the slider at the middle. + jso.setValue((jso.getMaximum() + jso.getMinimum()) / 2); + jso.pressMouse(jso.getCenterXForClick(), jso.getCenterYForClick()); + jso.dragMouse(jso.getWidth() + 10, jso.getHeight()); + waitSliderValue(jso, jSlider -> jSlider.getValue() == jSlider.getMaximum()); + jso.releaseMouse(); + + // Check mouse click by clicking on the center of the track 2 times + // and waiting till the slider value has changed from its previous + // value as a result of the clicks. + jso.clickMouse(jso.getCenterXForClick(), jso.getCenterYForClick(), 2); + waitSliderValue(jso, jSlider -> jSlider.getValue() != jSlider.getMaximum()); + } +} diff --git a/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/slider/SliderDemo.java b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/slider/SliderDemo.java new file mode 100644 index 00000000000..7bec4af5cdb --- /dev/null +++ b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/slider/SliderDemo.java @@ -0,0 +1,280 @@ +/* + * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.sun.swingset3.demos.slider; + +import java.awt.*; +import javax.swing.*; +import javax.swing.border.BevelBorder; +import javax.swing.border.TitledBorder; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import com.sun.swingset3.DemoProperties; +import com.sun.swingset3.demos.ResourceManager; +import com.sun.swingset3.demos.textfield.TextFieldDemo; + +/** + * JSlider Demo + * + * @version 1.9 11/17/05 + * @author Dave Kloba + * @author Jeff Dinkins + */ +@DemoProperties( + value = "Slider Demo", + category = "Controls", + description = "Demonstrates the JSlider, a control which supports linear adjustment", + sourceFiles = { + "com/sun/swingset3/demos/slider/SliderDemo.java", + "com/sun/swingset3/demos/ResourceManager.java", + "com/sun/swingset3/demos/slider/resources/SliderDemo.properties", + "com/sun/swingset3/demos/slider/resources/images/SliderDemo.gif" + } +) +public class SliderDemo extends JPanel { + + private static final Dimension HGAP5 = new Dimension(5, 1); + private static final Dimension VGAP5 = new Dimension(1, 5); + private static final Dimension HGAP10 = new Dimension(10, 1); + private static final Dimension VGAP10 = new Dimension(1, 10); + private static final Dimension HGAP20 = new Dimension(20, 1); + private static final Dimension HGAP25 = new Dimension(25, 1); + private final ResourceManager resourceManager = new ResourceManager(this.getClass()); + public static final String DEMO_TITLE = SliderDemo.class.getAnnotation(DemoProperties.class).value(); + public static final String HORIZONTAL_PLAIN_SLIDER = "Horizontal Plain Slider"; + public static final String HORIZONTAL_MAJOR_TICKS_SLIDER = "Horizontal Major Ticks Slider"; + public static final String HORIZONTAL_MINOR_TICKS_SLIDER = "Horizontal Minor Ticks Slider"; + public static final String HORIZONTAL_DISABLED_SLIDER = "Horizontal Disabled Slider"; + public static final String VERTICAL_PLAIN_SLIDER = "Vertical Plain Slider"; + public static final String VERTICAL_MAJOR_TICKS_SLIDER = "Vertical Major Ticks Slider"; + public static final String VERTICAL_MINOR_TICKS_SLIDER = "Vertical Minor Ticks Slider"; + public static final String VERTICAL_DISABLED_SLIDER = "Vertical Disabled Slider"; + + /** + * main method allows us to run as a standalone demo. + */ + public static void main(String[] args) { + JFrame frame = new JFrame(SliderDemo.class.getAnnotation(DemoProperties.class).value()); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.getContentPane().add(new SliderDemo()); + frame.setPreferredSize(new Dimension(800, 600)); + frame.pack(); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + } + + /** + * SliderDemo Constructor + */ + public SliderDemo() { + createSliderDemo(); + } + + private void createSliderDemo() { + JSlider s; + JPanel hp; + JPanel vp; + GridLayout g; + JPanel tp; + JLabel tf; + ChangeListener listener; + + setLayout(new BorderLayout()); + tf = new JLabel(resourceManager.getString("SliderDemo.slidervalue")); + add(tf, BorderLayout.SOUTH); + tp = new JPanel(); + g = new GridLayout(1, 2); + g.setHgap(5); + g.setVgap(5); + tp.setLayout(g); + add(tp, BorderLayout.CENTER); + listener = new SliderListener(tf); + BevelBorder border = new BevelBorder(BevelBorder.LOWERED); + hp = new JPanel(); + hp.setLayout(new BoxLayout(hp, BoxLayout.Y_AXIS)); + hp.setBorder(new TitledBorder( + border, + resourceManager.getString("SliderDemo.horizontal"), + TitledBorder.LEFT, + TitledBorder.ABOVE_TOP)); + tp.add(hp); + vp = new JPanel(); + vp.setLayout(new BoxLayout(vp, BoxLayout.X_AXIS)); + vp.setBorder(new TitledBorder( + border, + resourceManager.getString("SliderDemo.vertical"), + TitledBorder.LEFT, + TitledBorder.ABOVE_TOP)); + tp.add(vp); + + // Horizontal Slider 1 + JPanel p = new JPanel(); + p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); + p.setBorder(new TitledBorder(resourceManager.getString("SliderDemo.plain"))); + s = new JSlider(-10, 100, 20); + s.getAccessibleContext().setAccessibleName(HORIZONTAL_PLAIN_SLIDER); + s.getAccessibleContext().setAccessibleDescription(resourceManager.getString("SliderDemo.a_plain_slider")); + s.addChangeListener(listener); + p.add(Box.createRigidArea(VGAP5)); + p.add(s); + p.add(Box.createRigidArea(VGAP5)); + hp.add(p); + hp.add(Box.createRigidArea(VGAP10)); + + // Horizontal Slider 2 + p = new JPanel(); + p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); + p.setBorder(new TitledBorder(resourceManager.getString("SliderDemo.majorticks"))); + s = new JSlider(100, 1000, 400); + s.setPaintTicks(true); + s.setMajorTickSpacing(100); + s.getAccessibleContext().setAccessibleName(HORIZONTAL_MAJOR_TICKS_SLIDER); + s.getAccessibleContext().setAccessibleDescription(resourceManager.getString("SliderDemo.majorticksdescription")); + s.addChangeListener(listener); + p.add(Box.createRigidArea(VGAP5)); + p.add(s); + p.add(Box.createRigidArea(VGAP5)); + hp.add(p); + hp.add(Box.createRigidArea(VGAP10)); + + // Horizontal Slider 3 + p = new JPanel(); + p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); + p.setBorder(new TitledBorder(resourceManager.getString("SliderDemo.ticks"))); + s = new JSlider(0, 11, 6); + s.putClientProperty("JSlider.isFilled", Boolean.TRUE); + s.setPaintTicks(true); + s.setMajorTickSpacing(5); + s.setMinorTickSpacing(1); + s.setPaintLabels(true); + s.setSnapToTicks(true); + s.getLabelTable().put(new Integer(11), new JLabel(Integer.toString(11), JLabel.CENTER)); + s.setLabelTable(s.getLabelTable()); + s.getAccessibleContext().setAccessibleName(HORIZONTAL_MINOR_TICKS_SLIDER); + s.getAccessibleContext().setAccessibleDescription(resourceManager.getString("SliderDemo.minorticksdescription")); + s.addChangeListener(listener); + p.add(Box.createRigidArea(VGAP5)); + p.add(s); + p.add(Box.createRigidArea(VGAP5)); + hp.add(p); + hp.add(Box.createRigidArea(VGAP10)); + + // Horizontal Slider 4 + p = new JPanel(); + p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); + p.setBorder(new TitledBorder(resourceManager.getString("SliderDemo.disabled"))); + BoundedRangeModel brm = new DefaultBoundedRangeModel(80, 0, 0, 100); + s = new JSlider(brm); + s.setPaintTicks(true); + s.setMajorTickSpacing(20); + s.setMinorTickSpacing(5); + s.setEnabled(false); + s.getAccessibleContext().setAccessibleName(HORIZONTAL_DISABLED_SLIDER); + s.getAccessibleContext().setAccessibleDescription(resourceManager.getString("SliderDemo.disableddescription")); + s.addChangeListener(listener); + p.add(Box.createRigidArea(VGAP5)); + p.add(s); + p.add(Box.createRigidArea(VGAP5)); + hp.add(p); + + ////////////////////////////////////////////////////////////////////////////// + // Vertical Slider 1 + p = new JPanel(); + p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); + p.setBorder(new TitledBorder(resourceManager.getString("SliderDemo.plain"))); + s = new JSlider(JSlider.VERTICAL, -10, 100, 20); + s.getAccessibleContext().setAccessibleName(VERTICAL_PLAIN_SLIDER); + s.getAccessibleContext().setAccessibleDescription(resourceManager.getString("SliderDemo.a_plain_slider")); + s.addChangeListener(listener); + p.add(Box.createRigidArea(HGAP10)); + p.add(s); + p.add(Box.createRigidArea(HGAP10)); + vp.add(p); + vp.add(Box.createRigidArea(HGAP10)); + + // Vertical Slider 2 + p = new JPanel(); + p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); + p.setBorder(new TitledBorder(resourceManager.getString("SliderDemo.majorticks"))); + s = new JSlider(JSlider.VERTICAL, 100, 1000, 400); + s.putClientProperty("JSlider.isFilled", Boolean.TRUE); + s.setPaintTicks(true); + s.setMajorTickSpacing(100); + s.getAccessibleContext().setAccessibleName(VERTICAL_MAJOR_TICKS_SLIDER); + s.getAccessibleContext().setAccessibleDescription(resourceManager.getString("SliderDemo.majorticksdescription")); + s.addChangeListener(listener); + p.add(Box.createRigidArea(HGAP25)); + p.add(s); + p.add(Box.createRigidArea(HGAP25)); + vp.add(p); + vp.add(Box.createRigidArea(HGAP5)); + + // Vertical Slider 3 + p = new JPanel(); + p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); + p.setBorder(new TitledBorder(resourceManager.getString("SliderDemo.minorticks"))); + s = new JSlider(JSlider.VERTICAL, 0, 100, 60); + s.setPaintTicks(true); + s.setMajorTickSpacing(20); + s.setMinorTickSpacing(5); + s.setPaintLabels(true); + s.getAccessibleContext().setAccessibleName(VERTICAL_MINOR_TICKS_SLIDER); + s.getAccessibleContext().setAccessibleDescription(resourceManager.getString("SliderDemo.minorticksdescription")); + s.addChangeListener(listener); + p.add(Box.createRigidArea(HGAP10)); + p.add(s); + p.add(Box.createRigidArea(HGAP10)); + vp.add(p); + vp.add(Box.createRigidArea(HGAP5)); + + // Vertical Slider 4 + p = new JPanel(); + p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); + p.setBorder(new TitledBorder(resourceManager.getString("SliderDemo.disabled"))); + s = new JSlider(JSlider.VERTICAL, 0, 100, 80); + s.setPaintTicks(true); + s.setMajorTickSpacing(20); + s.setMinorTickSpacing(5); + s.setEnabled(false); + s.getAccessibleContext().setAccessibleName(VERTICAL_DISABLED_SLIDER); + s.getAccessibleContext().setAccessibleDescription(resourceManager.getString("SliderDemo.disableddescription")); + s.addChangeListener(listener); + p.add(Box.createRigidArea(HGAP20)); + p.add(s); + p.add(Box.createRigidArea(HGAP20)); + vp.add(p); + } + + private class SliderListener implements ChangeListener { + + private final JLabel tf; + + public SliderListener(JLabel f) { + tf = f; + } + + public void stateChanged(ChangeEvent e) { + JSlider s1 = (JSlider) e.getSource(); + tf.setText(resourceManager.getString("SliderDemo.slidervalue") + s1.getValue()); + } + } +} diff --git a/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/slider/resources/SliderDemo.properties b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/slider/resources/SliderDemo.properties new file mode 100644 index 00000000000..7d3cd7e7bbc --- /dev/null +++ b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/slider/resources/SliderDemo.properties @@ -0,0 +1,18 @@ +### Slider Demo ### + +SliderDemo.accessible_description=This demo shows an example of using the JSlider component. +SliderDemo.tooltip=JSlider demo +SliderDemo.name=Slider Demo + +SliderDemo.slidervalue=Slider Value: +SliderDemo.horizontal=Horizontal +SliderDemo.vertical=Vertical +SliderDemo.plain=Plain +SliderDemo.a_plain_slider=A Plain Slider +SliderDemo.majorticks=Major Ticks +SliderDemo.majorticksdescription=A slider showing major tick marks +SliderDemo.ticks=Minor Ticks, Snap-to-ticks and Labels +SliderDemo.minorticks=Minor Ticks +SliderDemo.minorticksdescription=A slider showing major and minor tick marks, with slider action snapping to tick marks, with some ticks visibly labeled +SliderDemo.disabled=Disabled +SliderDemo.disableddescription=A slider showing major and minor tick marks that is not enabled (cannot be manipulated From 7a9ab1c3a34f9bf7acfbb8adb152965083c25333 Mon Sep 17 00:00:00 2001 From: Mandy Chung Date: Wed, 15 Feb 2017 16:18:18 -0800 Subject: [PATCH 217/447] 8173374: Update GenGraphs tool to generate dot graph with requires transitive edges Reviewed-by: dfuchs, redestad --- .../classes/com/sun/tools/jdeps/Graph.java | 67 +--- .../sun/tools/jdeps/JdepsConfiguration.java | 31 +- .../com/sun/tools/jdeps/JdepsTask.java | 12 +- .../com/sun/tools/jdeps/ModuleAnalyzer.java | 87 ----- .../com/sun/tools/jdeps/ModuleDotGraph.java | 368 ++++++++++++++++++ .../test/tools/jdeps/modules/DotFileTest.java | 130 +++++++ 6 files changed, 517 insertions(+), 178 deletions(-) create mode 100644 langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModuleDotGraph.java create mode 100644 langtools/test/tools/jdeps/modules/DotFileTest.java diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/Graph.java b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/Graph.java index 9499e390d16..3c463948c90 100644 --- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/Graph.java +++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/Graph.java @@ -116,7 +116,7 @@ public final class Graph { .forEach(u -> g.adjacentNodes(u).stream() .filter(v -> isAdjacent(u, v)) .forEach(v -> builder.addEdge(u, v))); - return builder.build(); + return builder.build().reduce(); } /** @@ -274,7 +274,7 @@ public final class Graph { } public void addNodes(Set nodes) { - nodes.addAll(nodes); + this.nodes.addAll(nodes); } public void addEdge(T u, T v) { @@ -335,67 +335,4 @@ public final class Graph { result.addLast(node); } } - - public static class DotGraph { - static final String ORANGE = "#e76f00"; - static final String BLUE = "#437291"; - static final String GRAY = "#dddddd"; - - static final String REEXPORTS = ""; - static final String REQUIRES = "style=\"dashed\""; - static final String REQUIRES_BASE = "color=\"" + GRAY + "\""; - - static final Set javaModules = modules(name -> - (name.startsWith("java.") && !name.equals("java.smartcardio"))); - static final Set jdkModules = modules(name -> - (name.startsWith("java.") || - name.startsWith("jdk.") || - name.startsWith("javafx.")) && !javaModules.contains(name)); - - private static Set modules(Predicate predicate) { - return ModuleFinder.ofSystem().findAll() - .stream() - .map(ModuleReference::descriptor) - .map(ModuleDescriptor::name) - .filter(predicate) - .collect(Collectors.toSet()); - } - - static void printAttributes(PrintWriter out) { - out.format(" size=\"25,25\";%n"); - out.format(" nodesep=.5;%n"); - out.format(" ranksep=1.5;%n"); - out.format(" pencolor=transparent;%n"); - out.format(" node [shape=plaintext, fontname=\"DejaVuSans\", fontsize=36, margin=\".2,.2\"];%n"); - out.format(" edge [penwidth=4, color=\"#999999\", arrowhead=open, arrowsize=2];%n"); - } - - static void printNodes(PrintWriter out, Graph graph) { - out.format(" subgraph se {%n"); - graph.nodes().stream() - .filter(javaModules::contains) - .forEach(mn -> out.format(" \"%s\" [fontcolor=\"%s\", group=%s];%n", - mn, ORANGE, "java")); - out.format(" }%n"); - graph.nodes().stream() - .filter(jdkModules::contains) - .forEach(mn -> out.format(" \"%s\" [fontcolor=\"%s\", group=%s];%n", - mn, BLUE, "jdk")); - - graph.nodes().stream() - .filter(mn -> !javaModules.contains(mn) && !jdkModules.contains(mn)) - .forEach(mn -> out.format(" \"%s\";%n", mn)); - } - - static void printEdges(PrintWriter out, Graph graph, - String node, Set requiresTransitive) { - graph.adjacentNodes(node).forEach(dn -> { - String attr = dn.equals("java.base") ? REQUIRES_BASE - : (requiresTransitive.contains(dn) ? REEXPORTS : REQUIRES); - out.format(" \"%s\" -> \"%s\" [%s];%n", node, dn, attr); - }); - } - } - - } diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsConfiguration.java b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsConfiguration.java index aa32ce307ad..65294d7cd86 100644 --- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsConfiguration.java +++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -206,16 +206,6 @@ public class JdepsConfiguration implements AutoCloseable { ALL_SYSTEM.equals(name); } - /** - * Returns the modules that the given module can read - */ - public Stream reads(Module module) { - return configuration.findModule(module.name()).get() - .reads().stream() - .map(ResolvedModule::name) - .map(nameToModule::get); - } - /** * Returns the list of packages that split between resolved module and * unnamed module @@ -267,16 +257,15 @@ public class JdepsConfiguration implements AutoCloseable { return nameToModule; } - public Stream resolve(Set roots) { - if (roots.isEmpty()) { - return nameToModule.values().stream(); - } else { - return Configuration.empty() - .resolve(finder, ModuleFinder.of(), roots) - .modules().stream() - .map(ResolvedModule::name) - .map(nameToModule::get); - } + /** + * Returns Configuration with the given roots + */ + public Configuration resolve(Set roots) { + if (roots.isEmpty()) + throw new IllegalArgumentException("empty roots"); + + return Configuration.empty() + .resolve(finder, ModuleFinder.of(), roots); } public List classPathArchives() { diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsTask.java b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsTask.java index faa052a9ad9..4ee8a3ede1b 100644 --- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsTask.java +++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsTask.java @@ -721,9 +721,9 @@ class JdepsTask { return run(config, writer, type); } - boolean run(JdepsConfiguration config, JdepsWriter writer, Type type) throws IOException { - - + boolean run(JdepsConfiguration config, JdepsWriter writer, Type type) + throws IOException + { // analyze the dependencies DepsAnalyzer analyzer = new DepsAnalyzer(config, dependencyFilter(config), @@ -1024,8 +1024,10 @@ class JdepsTask { boolean run(JdepsConfiguration config) throws IOException { if ((options.showSummary || options.verbose == MODULE) && !options.addmods.isEmpty() && inputArgs.isEmpty()) { - // print module descriptor - return new ModuleAnalyzer(config, log).genDotFiles(dotOutputDir); + // generate dot graph from the resolved graph from module + // resolution. No class dependency analysis is performed. + return new ModuleDotGraph(config, options.apiOnly) + .genDotFiles(dotOutputDir); } Type type = getAnalyzerType(); diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModuleAnalyzer.java b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModuleAnalyzer.java index dfbe55d89bc..233f62b80ba 100644 --- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModuleAnalyzer.java +++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModuleAnalyzer.java @@ -59,14 +59,9 @@ public class ModuleAnalyzer { private final JdepsConfiguration configuration; private final PrintWriter log; - private final DependencyFinder dependencyFinder; private final Map modules; - public ModuleAnalyzer(JdepsConfiguration config, - PrintWriter log) { - this(config, log, Collections.emptySet()); - } public ModuleAnalyzer(JdepsConfiguration config, PrintWriter log, Set names) { @@ -333,88 +328,6 @@ public class ModuleAnalyzer { return true; } - /** - * Generate dotfile from module descriptor - * - * @param dir output directory - */ - public boolean genDotFiles(Path dir) throws IOException { - Files.createDirectories(dir); - for (Module m : modules.keySet()) { - genDotFile(dir, m.name()); - } - return true; - } - - - private void genDotFile(Path dir, String name) throws IOException { - try (OutputStream os = Files.newOutputStream(dir.resolve(name + ".dot")); - PrintWriter out = new PrintWriter(os)) { - Set modules = configuration.resolve(Set.of(name)) - .collect(Collectors.toSet()); - - // transitive reduction - Graph graph = gengraph(modules); - - out.format("digraph \"%s\" {%n", name); - DotGraph.printAttributes(out); - DotGraph.printNodes(out, graph); - - modules.stream() - .map(Module::descriptor) - .sorted(Comparator.comparing(ModuleDescriptor::name)) - .forEach(md -> { - String mn = md.name(); - Set requiresTransitive = md.requires().stream() - .filter(d -> d.modifiers().contains(TRANSITIVE)) - .map(d -> d.name()) - .collect(toSet()); - - DotGraph.printEdges(out, graph, mn, requiresTransitive); - }); - - out.println("}"); - } - } - - /** - * Returns a Graph of the given Configuration after transitive reduction. - * - * Transitive reduction of requires transitive edge and requires edge have - * to be applied separately to prevent the requires transitive edges - * (e.g. U -> V) from being reduced by a path (U -> X -> Y -> V) - * in which V would not be re-exported from U. - */ - private Graph gengraph(Set modules) { - // build a Graph containing only requires transitive edges - // with transitive reduction. - Graph.Builder rpgbuilder = new Graph.Builder<>(); - for (Module module : modules) { - ModuleDescriptor md = module.descriptor(); - String mn = md.name(); - md.requires().stream() - .filter(d -> d.modifiers().contains(TRANSITIVE)) - .map(d -> d.name()) - .forEach(d -> rpgbuilder.addEdge(mn, d)); - } - - Graph rpg = rpgbuilder.build().reduce(); - - // build the readability graph - Graph.Builder builder = new Graph.Builder<>(); - for (Module module : modules) { - ModuleDescriptor md = module.descriptor(); - String mn = md.name(); - builder.addNode(mn); - configuration.reads(module) - .map(Module::name) - .forEach(d -> builder.addEdge(mn, d)); - } - - // transitive reduction of requires edges - return builder.build().reduce(rpg); - } - // ---- for testing purpose public ModuleDescriptor[] descriptors(String name) { ModuleDeps moduleDeps = modules.keySet().stream() diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModuleDotGraph.java b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModuleDotGraph.java new file mode 100644 index 00000000000..9d1de428485 --- /dev/null +++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModuleDotGraph.java @@ -0,0 +1,368 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.sun.tools.jdeps; + +import static java.lang.module.ModuleDescriptor.Requires.Modifier.*; +import static java.util.stream.Collectors.*; + +import java.io.BufferedWriter; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.module.Configuration; +import java.lang.module.ModuleDescriptor; +import java.lang.module.ModuleFinder; +import java.lang.module.ModuleReference; +import java.lang.module.ResolvedModule; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Deque; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeSet; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +/** + * Generate dot graph for modules + */ +public class ModuleDotGraph { + private final Map configurations; + private final boolean apiOnly; + public ModuleDotGraph(JdepsConfiguration config, boolean apiOnly) { + this(config.rootModules().stream() + .map(Module::name) + .sorted() + .collect(toMap(Function.identity(), mn -> config.resolve(Set.of(mn)))), + apiOnly); + } + + public ModuleDotGraph(Map configurations, boolean apiOnly) { + this.configurations = configurations; + this.apiOnly = apiOnly; + } + + /** + * Generate dotfile for all modules + * + * @param dir output directory + */ + public boolean genDotFiles(Path dir) throws IOException { + Files.createDirectories(dir); + for (String mn : configurations.keySet()) { + Path path = dir.resolve(mn + ".dot"); + genDotFile(path, mn, configurations.get(mn)); + } + return true; + } + + /** + * Generate dotfile of the given path + */ + public void genDotFile(Path path, String name, Configuration configuration) + throws IOException + { + // transitive reduction + Graph graph = apiOnly + ? requiresTransitiveGraph(configuration, Set.of(name)) + : gengraph(configuration); + + DotGraphBuilder builder = new DotGraphBuilder(name, graph); + builder.subgraph("se", "java", DotGraphBuilder.ORANGE, + DotGraphBuilder.JAVA_SE_SUBGRAPH) + .subgraph("jdk", "jdk", DotGraphBuilder.BLUE, + DotGraphBuilder.JDK_SUBGRAPH) + .descriptors(graph.nodes().stream() + .map(mn -> configuration.findModule(mn).get() + .reference().descriptor())); + // build dot file + builder.build(path); + } + + /** + * Returns a Graph of the given Configuration after transitive reduction. + * + * Transitive reduction of requires transitive edge and requires edge have + * to be applied separately to prevent the requires transitive edges + * (e.g. U -> V) from being reduced by a path (U -> X -> Y -> V) + * in which V would not be re-exported from U. + */ + private Graph gengraph(Configuration cf) { + Graph.Builder builder = new Graph.Builder<>(); + cf.modules().stream() + .forEach(resolvedModule -> { + String mn = resolvedModule.reference().descriptor().name(); + builder.addNode(mn); + resolvedModule.reads().stream() + .map(ResolvedModule::name) + .forEach(target -> builder.addEdge(mn, target)); + }); + + Graph rpg = requiresTransitiveGraph(cf, builder.nodes); + return builder.build().reduce(rpg); + } + + + /** + * Returns a Graph containing only requires transitive edges + * with transitive reduction. + */ + public Graph requiresTransitiveGraph(Configuration cf, + Set roots) + { + Deque deque = new ArrayDeque<>(roots); + Set visited = new HashSet<>(); + Graph.Builder builder = new Graph.Builder<>(); + + while (deque.peek() != null) { + String mn = deque.pop(); + if (visited.contains(mn)) + continue; + + visited.add(mn); + builder.addNode(mn); + ModuleDescriptor descriptor = cf.findModule(mn).get() + .reference().descriptor(); + descriptor.requires().stream() + .filter(d -> d.modifiers().contains(TRANSITIVE) + || d.name().equals("java.base")) + .map(d -> d.name()) + .forEach(d -> { + deque.add(d); + builder.addEdge(mn, d); + }); + } + + return builder.build().reduce(); + } + + public static class DotGraphBuilder { + static final Set JAVA_SE_SUBGRAPH = javaSE(); + static final Set JDK_SUBGRAPH = jdk(); + + private static Set javaSE() { + String root = "java.se.ee"; + ModuleFinder system = ModuleFinder.ofSystem(); + if (system.find(root).isPresent()) { + return Stream.concat(Stream.of(root), + Configuration.empty().resolve(system, + ModuleFinder.of(), + Set.of(root)) + .findModule(root).get() + .reads().stream() + .map(ResolvedModule::name)) + .collect(toSet()); + } else { + // approximation + return system.findAll().stream() + .map(ModuleReference::descriptor) + .map(ModuleDescriptor::name) + .filter(name -> name.startsWith("java.") && + !name.equals("java.smartcardio")) + .collect(Collectors.toSet()); + } + } + + private static Set jdk() { + return ModuleFinder.ofSystem().findAll().stream() + .map(ModuleReference::descriptor) + .map(ModuleDescriptor::name) + .filter(name -> !JAVA_SE_SUBGRAPH.contains(name) && + (name.startsWith("java.") || + name.startsWith("jdk.") || + name.startsWith("javafx."))) + .collect(Collectors.toSet()); + } + + static class SubGraph { + final String name; + final String group; + final String color; + final Set nodes; + SubGraph(String name, String group, String color, Set nodes) { + this.name = Objects.requireNonNull(name); + this.group = Objects.requireNonNull(group); + this.color = Objects.requireNonNull(color); + this.nodes = Objects.requireNonNull(nodes); + } + } + + static final String ORANGE = "#e76f00"; + static final String BLUE = "#437291"; + static final String GRAY = "#dddddd"; + static final String BLACK = "#000000"; + + static final String FONT_NAME = "DejaVuSans"; + static final int FONT_SIZE = 12; + static final int ARROW_SIZE = 1; + static final int ARROW_WIDTH = 2; + static final int RANK_SEP = 1; + + static final String REEXPORTS = ""; + static final String REQUIRES = "style=\"dashed\""; + static final String REQUIRES_BASE = "color=\"" + GRAY + "\""; + + // can be configured + static double rankSep = RANK_SEP; + static String fontColor = BLACK; + static String fontName = FONT_NAME; + static int fontsize = FONT_SIZE; + static int arrowWidth = ARROW_WIDTH; + static int arrowSize = ARROW_SIZE; + static final Map weights = new HashMap<>(); + static final List> ranks = new ArrayList<>(); + + private final String name; + private final Graph graph; + private final Set descriptors = new TreeSet<>(); + private final List subgraphs = new ArrayList<>(); + public DotGraphBuilder(String name, Graph graph) { + this.name = name; + this.graph = graph; + } + + public DotGraphBuilder descriptors(Stream descriptors) { + descriptors.forEach(this.descriptors::add); + return this; + } + + public void build(Path filename) throws IOException { + try (BufferedWriter writer = Files.newBufferedWriter(filename); + PrintWriter out = new PrintWriter(writer)) { + + out.format("digraph \"%s\" {%n", name); + out.format(" nodesep=.5;%n"); + out.format(" ranksep=%f;%n", rankSep); + out.format(" pencolor=transparent;%n"); + out.format(" node [shape=plaintext, fontname=\"%s\", fontsize=%d, margin=\".2,.2\"];%n", + fontName, fontsize); + out.format(" edge [penwidth=%d, color=\"#999999\", arrowhead=open, arrowsize=%d];%n", + arrowWidth, arrowSize); + + // same RANKS + ranks.stream() + .map(nodes -> descriptors.stream() + .map(ModuleDescriptor::name) + .filter(nodes::contains) + .map(mn -> "\"" + mn + "\"") + .collect(joining(","))) + .filter(group -> group.length() > 0) + .forEach(group -> out.format(" {rank=same %s}%n", group)); + + subgraphs.forEach(subgraph -> { + out.format(" subgraph %s {%n", subgraph.name); + descriptors.stream() + .map(ModuleDescriptor::name) + .filter(subgraph.nodes::contains) + .forEach(mn -> printNode(out, mn, subgraph.color, subgraph.group)); + out.format(" }%n"); + }); + + descriptors.stream() + .filter(md -> graph.contains(md.name()) && + !graph.adjacentNodes(md.name()).isEmpty()) + .forEach(md -> printNode(out, md, graph.adjacentNodes(md.name()))); + + out.println("}"); + } + } + + public DotGraphBuilder subgraph(String name, String group, String color, + Set nodes) { + subgraphs.add(new SubGraph(name, group, color, nodes)); + return this; + } + + public void printNode(PrintWriter out, String node, String color, String group) { + out.format(" \"%s\" [fontcolor=\"%s\", group=%s];%n", + node, color, group); + } + + public void printNode(PrintWriter out, ModuleDescriptor md, Set edges) { + Set requiresTransitive = md.requires().stream() + .filter(d -> d.modifiers().contains(TRANSITIVE)) + .map(d -> d.name()) + .collect(toSet()); + + String mn = md.name(); + edges.stream().forEach(dn -> { + String attr = dn.equals("java.base") ? REQUIRES_BASE + : (requiresTransitive.contains(dn) ? REEXPORTS : REQUIRES); + + int w = weightOf(mn, dn); + if (w > 1) { + if (!attr.isEmpty()) + attr += ", "; + + attr += "weight=" + w; + } + out.format(" \"%s\" -> \"%s\" [%s];%n", mn, dn, attr); + }); + } + + public int weightOf(String s, String t) { + int w = weights.getOrDefault(s + ":" + t, 1); + if (w != 1) + return w; + if (s.startsWith("java.") && t.startsWith("java.")) + return 10; + return 1; + } + + public static void sameRankNodes(Set nodes) { + ranks.add(nodes); + } + + public static void weight(String s, String t, int w) { + weights.put(s + ":" + t, w); + } + + public static void setRankSep(double value) { + rankSep = value; + } + + public static void setFontSize(int size) { + fontsize = size; + } + + public static void setFontColor(String color) { + fontColor = color; + } + + public static void setArrowSize(int size) { + arrowSize = size; + } + + public static void setArrowWidth(int width) { + arrowWidth = width; + } + } +} diff --git a/langtools/test/tools/jdeps/modules/DotFileTest.java b/langtools/test/tools/jdeps/modules/DotFileTest.java new file mode 100644 index 00000000000..977268931ab --- /dev/null +++ b/langtools/test/tools/jdeps/modules/DotFileTest.java @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8173374 + * @summary Tests module dot graph + * @modules java.desktop + * java.sql + * jdk.jdeps/com.sun.tools.jdeps + * @run testng DotFileTest + */ + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Set; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.spi.ToolProvider; +import java.util.stream.Collectors; + +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import static org.testng.Assert.assertTrue; +import static org.testng.Assert.assertEquals; + +public class DotFileTest { + private static final ToolProvider JDEPS = ToolProvider.findFirst("jdeps") + .orElseThrow(() -> new RuntimeException("jdeps not found")); + + private static final Path DOTS_DIR = Paths.get("dots"); + private static final Path SPEC_DIR = Paths.get("spec"); + + @DataProvider(name = "modules") + public Object[][] modules() { + return new Object[][]{ + {"java.desktop", Set.of("java.datatransfer -> java.base", + "java.desktop -> java.datatransfer", + "java.desktop -> java.prefs", + "java.prefs -> java.xml", + "java.xml -> java.base" ) + }, + { "java.sql", Set.of("java.logging -> java.base", + "java.sql -> java.logging", + "java.sql -> java.xml", + "java.xml -> java.base" ) + } + }; + } + @DataProvider(name = "specVersion") + public Object[][] specVersion() { + return new Object[][]{ + {"java.desktop", Set.of("java.datatransfer -> java.base", + "java.desktop -> java.datatransfer", + "java.desktop -> java.xml", + "java.xml -> java.base") + }, + { "java.sql", Set.of("java.logging -> java.base", + "java.sql -> java.logging", + "java.sql -> java.xml", + "java.xml -> java.base" ) + } + }; + } + + @Test(dataProvider = "modules") + public void test(String name, Set edges) throws Exception { + String[] options = new String[] { + "-dotoutput", DOTS_DIR.toString(), + "-s", "-m", name + }; + assertTrue(JDEPS.run(System.out, System.out, options) == 0); + + Path path = DOTS_DIR.resolve(name + ".dot"); + assertTrue(Files.exists(path)); + Set lines = Files.readAllLines(path).stream() + .filter(l -> l.contains(" -> ")) + .map(this::split) + .collect(Collectors.toSet()); + assertEquals(lines, edges); + } + + @Test(dataProvider = "specVersion") + public void testAPIOnly(String name, Set edges) throws Exception { + String[] options = new String[]{ + "-dotoutput", SPEC_DIR.toString(), + "-s", "-apionly", + "-m", name + }; + assertTrue(JDEPS.run(System.out, System.out, options) == 0); + + Path path = SPEC_DIR.resolve(name + ".dot"); + assertTrue(Files.exists(path)); + Set lines = Files.readAllLines(path).stream() + .filter(l -> l.contains(" -> ")) + .map(this::split) + .collect(Collectors.toSet()); + assertEquals(lines, edges); + } + + static Pattern PATTERN = Pattern.compile(" *\"(\\S+)\" -> \"(\\S+)\" .*"); + String split(String line) { + Matcher pm = PATTERN.matcher(line); + assertTrue(pm.find()); + return String.format("%s -> %s", pm.group(1), pm.group(2)); + } +} From 4248aefdc8d8f812faa48305d2cbc63dc14f930d Mon Sep 17 00:00:00 2001 From: Mandy Chung Date: Wed, 15 Feb 2017 16:18:22 -0800 Subject: [PATCH 218/447] 8173374: Update GenGraphs tool to generate dot graph with requires transitive edges Reviewed-by: dfuchs, redestad --- jdk/make/CompileModuleTools.gmk | 2 + jdk/make/GenerateModuleSummary.gmk | 9 +- jdk/make/ModuleTools.gmk | 2 + .../classes/build/tools/jigsaw/GenGraphs.java | 296 +++++------------- .../src/classes/build/tools/jigsaw/Graph.java | 171 ---------- 5 files changed, 86 insertions(+), 394 deletions(-) delete mode 100644 jdk/make/src/classes/build/tools/jigsaw/Graph.java diff --git a/jdk/make/CompileModuleTools.gmk b/jdk/make/CompileModuleTools.gmk index 2bfe520b233..4a9fcdc9809 100644 --- a/jdk/make/CompileModuleTools.gmk +++ b/jdk/make/CompileModuleTools.gmk @@ -37,5 +37,7 @@ $(eval $(call SetupJavaCompilation,BUILD_JIGSAW_TOOLS, \ build/tools/jigsaw, \ BIN := $(TOOLS_CLASSES_DIR), \ ADD_JAVAC_FLAGS := \ + --add-modules jdk.jdeps \ --add-exports java.base/jdk.internal.module=ALL-UNNAMED \ + --add-exports jdk.jdeps/com.sun.tools.jdeps=ALL-UNNAMED \ )) diff --git a/jdk/make/GenerateModuleSummary.gmk b/jdk/make/GenerateModuleSummary.gmk index 38d9985c263..9f52ed37a74 100644 --- a/jdk/make/GenerateModuleSummary.gmk +++ b/jdk/make/GenerateModuleSummary.gmk @@ -31,11 +31,16 @@ include MakeBase.gmk include ModuleTools.gmk GENGRAPHS_DIR := $(IMAGES_OUTPUTDIR)/gengraphs +SPEC_DOTFILES_DIR := $(IMAGES_OUTPUTDIR)/spec-dotfiles TOOLS_MODULE_SRCDIR := $(JDK_TOPDIR)/make/src/classes/build/tools/jigsaw $(GENGRAPHS_DIR)/jdk.dot: $(BUILD_JIGSAW_TOOLS) $(MKDIR) -p $(@D) - $(TOOL_GENGRAPHS) $(GENGRAPHS_DIR) + $(TOOL_GENGRAPHS) --output $(GENGRAPHS_DIR) + +$(SPEC_DOTFILES_DIR)/java.se.dot: $(BUILD_JIGSAW_TOOLS) + $(MKDIR) -p $(@D) + $(TOOL_GENGRAPHS) --spec --output $(SPEC_DOTFILES_DIR) $(GENGRAPHS_DIR)/technology-summary.html: $(TOOLS_MODULE_SRCDIR)/technology-summary.html $(install-file) @@ -44,4 +49,4 @@ $(GENGRAPHS_DIR)/module-summary.html: $(BUILD_JIGSAW_TOOLS) $(GENGRAPHS_DIR)/tec $(MKDIR) -p $(@D) $(TOOL_MODULESUMMARY) -o $@ --module-path $(IMAGES_OUTPUTDIR)/jmods -all: $(GENGRAPHS_DIR)/jdk.dot $(GENGRAPHS_DIR)/module-summary.html +all: $(GENGRAPHS_DIR)/jdk.dot $(GENGRAPHS_DIR)/module-summary.html $(SPEC_DOTFILES_DIR)/java.se.dot diff --git a/jdk/make/ModuleTools.gmk b/jdk/make/ModuleTools.gmk index 71ca1cf8eaa..45bfbae630e 100644 --- a/jdk/make/ModuleTools.gmk +++ b/jdk/make/ModuleTools.gmk @@ -36,6 +36,8 @@ BUILD_TOOLS_JDK := $(call SetupJavaCompilationCompileTarget, \ BUILD_JIGSAW_TOOLS, $(TOOLS_CLASSES_DIR)) TOOL_GENGRAPHS := $(BUILD_JAVA) -esa -ea -cp $(TOOLS_CLASSES_DIR) \ + --add-modules jdk.jdeps \ + --add-exports jdk.jdeps/com.sun.tools.jdeps=ALL-UNNAMED \ build.tools.jigsaw.GenGraphs TOOL_MODULESUMMARY := $(BUILD_JAVA) -esa -ea -cp $(TOOLS_CLASSES_DIR) \ diff --git a/jdk/make/src/classes/build/tools/jigsaw/GenGraphs.java b/jdk/make/src/classes/build/tools/jigsaw/GenGraphs.java index ac1f9b86090..902185eef3a 100644 --- a/jdk/make/src/classes/build/tools/jigsaw/GenGraphs.java +++ b/jdk/make/src/classes/build/tools/jigsaw/GenGraphs.java @@ -25,29 +25,21 @@ package build.tools.jigsaw; +import com.sun.tools.jdeps.ModuleDotGraph; +import com.sun.tools.jdeps.ModuleDotGraph.DotGraphBuilder; + import java.io.IOException; -import java.io.OutputStream; -import java.io.PrintStream; import java.lang.module.Configuration; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; import java.lang.module.ModuleReference; -import java.lang.module.ResolvedModule; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.Collections; import java.util.HashMap; import java.util.HashSet; -import java.util.List; import java.util.Map; import java.util.Set; -import java.util.TreeSet; -import java.util.function.Function; - -import static java.util.stream.Collectors.*; -import static java.lang.module.ModuleDescriptor.Requires.Modifier.TRANSITIVE; /** * Generate the DOT file for a module graph for each module in the JDK @@ -56,238 +48,100 @@ import static java.lang.module.ModuleDescriptor.Requires.Modifier.TRANSITIVE; public class GenGraphs { public static void main(String[] args) throws Exception { + Path dir = null; + boolean spec = false; + for (int i=0; i < args.length; i++) { + String arg = args[i]; + if (arg.equals("--spec")) { + spec = true; + } else if (arg.equals("--output")) { + i++; + dir = i < args.length ? Paths.get(args[i]) : null; + } else if (arg.startsWith("-")) { + throw new IllegalArgumentException("Invalid option: " + arg); + } + } - if (args.length != 1) { - System.err.println("ERROR: specify the output directory"); + if (dir == null) { + System.err.println("ERROR: must specify --output argument"); System.exit(1); } - Path dir = Paths.get(args[0]); + + // setup and configure the dot graph attributes + initDotGraphAttributes(); Files.createDirectories(dir); + GenGraphs genGraphs = new GenGraphs(dir, spec); + + // print dot file for each module + Map configurations = new HashMap<>(); + Set modules = new HashSet<>(); ModuleFinder finder = ModuleFinder.ofSystem(); - - Set javaSEModules - = new TreeSet<>(finder.findAll().stream() - .map(ModuleReference::descriptor) - .filter(m -> (m.name().startsWith("java.") && - !m.name().equals("java.smartcardio"))) - .collect(toSet())); - Set jdkModules - = new TreeSet<>(finder.findAll().stream() - .map(ModuleReference::descriptor) - .filter(m -> !javaSEModules.contains(m)) - .collect(toSet())); - - GenGraphs genGraphs = new GenGraphs(dir, javaSEModules, jdkModules); - Set mods = new HashSet<>(); - for (ModuleReference mref: finder.findAll()) { - mods.add(mref.descriptor().name()); - genGraphs.genDotFile(mref); + for (ModuleReference mref : finder.findAll()) { + String name = (mref.descriptor().name()); + modules.add(name); + if (genGraphs.accept(name, mref.descriptor())) { + configurations.put(name, Configuration.empty() + .resolve(finder, + ModuleFinder.of(), + Set.of(name))); + } } - // all modules - genGraphs.genDotFile("jdk", mods); + if (genGraphs.accept("jdk", null)) { + // print a graph of all JDK modules + configurations.put("jdk", Configuration.empty() + .resolve(finder, + ModuleFinder.of(), + modules)); + } + genGraphs.genDotFiles(configurations); } - private static final String ORANGE = "#e76f00"; - private static final String BLUE = "#437291"; - private static final String GRAY = "#dddddd"; - - private static final String REEXPORTS = ""; - private static final String REQUIRES = "style=\"dashed\""; - private static final String REQUIRES_BASE = "color=\"" + GRAY + "\""; - - private static final Map weights = new HashMap<>(); - private static final List> ranks = new ArrayList<>(); - - private static void weight(String s, String t, int w) { - weights.put(s + ":" + t, w); - } - - private static int weightOf(String s, String t) { - int w = weights.getOrDefault(s + ":" + t, 1); - if (w != 1) - return w; - if (s.startsWith("java.") && t.startsWith("java.")) - return 10; - return 1; - } - - static { + static void initDotGraphAttributes() { int h = 1000; - weight("java.se", "java.sql.rowset", h * 10); - weight("java.sql.rowset", "java.sql", h * 10); - weight("java.sql", "java.xml", h * 10); - weight("java.xml", "java.base", h * 10); - - ranks.add(Set.of("java.logging", "java.scripting", "java.xml")); - ranks.add(Set.of("java.sql")); - ranks.add(Set.of("java.compiler", "java.instrument")); - ranks.add(Set.of("java.desktop", "java.management")); - ranks.add(Set.of("java.corba", "java.xml.ws")); - ranks.add(Set.of("java.xml.bind", "java.xml.ws.annotation")); + DotGraphBuilder.weight("java.se", "java.sql.rowset", h * 10); + DotGraphBuilder.weight("java.sql.rowset", "java.sql", h * 10); + DotGraphBuilder.weight("java.sql", "java.xml", h * 10); + DotGraphBuilder.weight("java.xml", "java.base", h * 10); + DotGraphBuilder.sameRankNodes(Set.of("java.logging", "java.scripting", "java.xml")); + DotGraphBuilder.sameRankNodes(Set.of("java.sql")); + DotGraphBuilder.sameRankNodes(Set.of("java.compiler", "java.instrument")); + DotGraphBuilder.sameRankNodes(Set.of("java.desktop", "java.management")); + DotGraphBuilder.sameRankNodes(Set.of("java.corba", "java.xml.ws")); + DotGraphBuilder.sameRankNodes(Set.of("java.xml.bind", "java.xml.ws.annotation")); + DotGraphBuilder.setRankSep(0.7); + DotGraphBuilder.setFontSize(12); + DotGraphBuilder.setArrowSize(1); + DotGraphBuilder.setArrowWidth(2); } private final Path dir; - private final Set javaGroup; - private final Set jdkGroup; - - GenGraphs(Path dir, Set javaGroup, Set jdkGroup) { + private final boolean spec; + GenGraphs(Path dir, boolean spec) { this.dir = dir; - this.javaGroup = Collections.unmodifiableSet(javaGroup); - this.jdkGroup = Collections.unmodifiableSet(jdkGroup); + this.spec = spec; } - /** - * Generates a dot file for the given module reference as the root. - */ - void genDotFile(ModuleReference mref) throws IOException { - String name = mref.descriptor().name(); - genDotFile(name, Set.of(name)); + void genDotFiles(Map configurations) throws IOException { + ModuleDotGraph dotGraph = new ModuleDotGraph(configurations, spec); + dotGraph.genDotFiles(dir); } - /** - * Generates a dot file for the given set of root modules. - */ - void genDotFile(String name, Set roots) throws IOException { - Configuration cf = - Configuration.empty().resolve(ModuleFinder.ofSystem(), - ModuleFinder.of(), - roots); + boolean accept(String name, ModuleDescriptor descriptor) { + if (!spec) return true; - Set mds = cf.modules().stream() - .map(ResolvedModule::reference) - .map(ModuleReference::descriptor) - .collect(toSet()); + if (name.equals("jdk")) + return false; - // generate a dot file for the resolved graph - try (OutputStream os = Files.newOutputStream(dir.resolve(name + ".dot")); - PrintStream out = new PrintStream(os)) { - printGraph(out, name, gengraph(cf), - mds.stream() - .collect(toMap(ModuleDescriptor::name, Function.identity())) - ); - } + if (name.equals("java.se") || name.equals("java.se.ee")) + return true; - if (name.equals("java.se") || name.equals("java.se.ee")) { - // generate a dot file for Java SE module graph - try (OutputStream os = Files.newOutputStream(dir.resolve(name + "-spec.dot")); - PrintStream out = new PrintStream(os)) { - // transitive reduction on the graph of `requires transitive` edges - // filter out jdk.* modules which are implementation dependences - Graph graph = requiresTransitiveGraph(cf, true); - printGraph(out, name, graph, - mds.stream() - .filter(md -> !md.name().startsWith("jdk.") && - graph.nodes().contains(md.name())) - .collect(toMap(ModuleDescriptor::name, Function.identity())) - ); - } - } + // only the module that has exported API + return descriptor.exports().stream() + .filter(e -> !e.isQualified()) + .findAny().isPresent(); } - - private void printGraph(PrintStream out, - String name, - Graph graph, - Map nameToModule) - throws IOException - { - Set descriptors = new TreeSet<>(nameToModule.values()); - - out.format("digraph \"%s\" {%n", name); - out.format("size=\"25,25\";"); - out.format("nodesep=.5;%n"); - out.format("ranksep=1.5;%n"); - out.format("pencolor=transparent;%n"); - out.format("node [shape=plaintext, fontname=\"DejaVuSans\", fontsize=36, margin=\".2,.2\"];%n"); - out.format("edge [penwidth=4, color=\"#999999\", arrowhead=open, arrowsize=2];%n"); - - out.format("subgraph %sse {%n", name.equals("jdk") ? "cluster_" : ""); - descriptors.stream() - .filter(javaGroup::contains) - .map(ModuleDescriptor::name) - .forEach(mn -> out.format(" \"%s\" [fontcolor=\"%s\", group=%s];%n", - mn, ORANGE, "java")); - out.format("}%n"); - - // same ranks - ranks.stream() - .map(group -> descriptors.stream() - .map(ModuleDescriptor::name) - .filter(group::contains) - .map(mn -> "\"" + mn + "\"") - .collect(joining(","))) - .filter(group -> group.length() > 0) - .forEach(group -> out.format("{rank=same %s}%n", group)); - - descriptors.stream() - .filter(jdkGroup::contains) - .map(ModuleDescriptor::name) - .forEach(mn -> out.format(" \"%s\" [fontcolor=\"%s\", group=%s];%n", - mn, BLUE, "jdk")); - - descriptors.stream() - .forEach(md -> { - String mn = md.name(); - Set requiresTransitive = md.requires().stream() - .filter(d -> d.modifiers().contains(TRANSITIVE)) - .map(d -> d.name()) - .collect(toSet()); - - graph.adjacentNodes(mn) - .stream() - .filter(nameToModule::containsKey) - .forEach(dn -> { - String attr = dn.equals("java.base") ? REQUIRES_BASE - : (requiresTransitive.contains(dn) ? REEXPORTS : REQUIRES); - int w = weightOf(mn, dn); - if (w > 1) - attr += "weight=" + w; - out.format(" \"%s\" -> \"%s\" [%s];%n", mn, dn, attr); - }); - }); - - out.println("}"); - } - - /** - * Returns a Graph of the given Configuration after transitive reduction. - * - * Transitive reduction of requires transitive edge and requires edge have - * to be applied separately to prevent the requires transitive edges - * (e.g. U -> V) from being reduced by a path (U -> X -> Y -> V) - * in which V would not be re-exported from U. - */ - private Graph gengraph(Configuration cf) { - Graph.Builder builder = new Graph.Builder<>(); - for (ResolvedModule resolvedModule : cf.modules()) { - String mn = resolvedModule.reference().descriptor().name(); - builder.addNode(mn); - resolvedModule.reads().stream() - .map(ResolvedModule::name) - .forEach(target -> builder.addEdge(mn, target)); - } - Graph rpg = requiresTransitiveGraph(cf, false); - return builder.build().reduce(rpg); - } - - /** - * Returns a Graph containing only requires transitive edges - * with transitive reduction. - */ - private Graph requiresTransitiveGraph(Configuration cf, boolean includeBase) { - Graph.Builder builder = new Graph.Builder<>(); - for (ResolvedModule resolvedModule : cf.modules()) { - ModuleDescriptor descriptor = resolvedModule.reference().descriptor(); - String mn = descriptor.name(); - descriptor.requires().stream() - .filter(d -> d.modifiers().contains(TRANSITIVE) - || (includeBase && d.name().equals("java.base"))) - .map(d -> d.name()) - .forEach(d -> builder.addEdge(mn, d)); - } - return builder.build().reduce(); - } -} +} \ No newline at end of file diff --git a/jdk/make/src/classes/build/tools/jigsaw/Graph.java b/jdk/make/src/classes/build/tools/jigsaw/Graph.java deleted file mode 100644 index a835da1ad93..00000000000 --- a/jdk/make/src/classes/build/tools/jigsaw/Graph.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package build.tools.jigsaw; - -import java.io.PrintStream; -import java.util.Deque; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.Map; -import java.util.Set; - -public class Graph { - private static boolean traceOn = Boolean.getBoolean("build.tools.module.trace"); - private final Set nodes; - private final Map> edges; - private Graph(Set nodes, Map> edges) { - this.nodes = nodes; - this.edges = edges; - } - - public Set nodes() { - return nodes; - } - - public Map> edges() { - return edges; - } - - public Set adjacentNodes(T u) { - return edges.get(u); - } - - /** - * Returns a new Graph after transitive reduction - */ - public Graph reduce() { - Graph.Builder builder = new Builder<>(); - nodes.stream() - .forEach(u -> { - builder.addNode(u); - edges.get(u).stream() - .filter(v -> !pathExists(u, v, false)) - .forEach(v -> builder.addEdge(u, v)); - }); - return builder.build(); - } - - /** - * Returns a new Graph after transitive reduction. All edges in - * the given g takes precedence over this graph. - * - * @throw IllegalArgumentException g must be a subgraph this graph - */ - public Graph reduce(Graph g) { - boolean subgraph = nodes.containsAll(g.nodes) && g.edges.keySet().stream() - .allMatch(u -> adjacentNodes(u).containsAll(g.adjacentNodes(u))); - if (!subgraph) { - throw new IllegalArgumentException("the given argument is not a subgraph of this graph"); - } - - Graph.Builder builder = new Builder<>(); - nodes.stream() - .forEach(u -> { - builder.addNode(u); - // filter the edge if there exists a path from u to v in the given g - // or there exists another path from u to v in this graph - edges.get(u).stream() - .filter(v -> !g.pathExists(u, v) && !pathExists(u, v, false)) - .forEach(v -> builder.addEdge(u, v)); - }); - - // add the overlapped edges from this graph and the given g - g.edges().keySet().stream() - .forEach(u -> g.adjacentNodes(u).stream() - .filter(v -> isAdjacent(u, v)) - .forEach(v -> builder.addEdge(u, v))); - return builder.build(); - } - - private boolean isAdjacent(T u, T v) { - return edges.containsKey(u) && edges.get(u).contains(v); - } - - private boolean pathExists(T u, T v) { - return pathExists(u, v, true); - } - - /** - * Returns true if there exists a path from u to v in this graph. - * If includeAdjacent is false, it returns true if there exists - * another path from u to v of distance > 1 - */ - private boolean pathExists(T u, T v, boolean includeAdjacent) { - if (!nodes.contains(u) || !nodes.contains(v)) { - return false; - } - if (includeAdjacent && isAdjacent(u, v)) { - return true; - } - Deque stack = new LinkedList<>(); - Set visited = new HashSet<>(); - stack.push(u); - while (!stack.isEmpty()) { - T node = stack.pop(); - if (node.equals(v)) { - if (traceOn) { - System.out.format("Edge %s -> %s removed%n", u, v); - } - return true; - } - if (!visited.contains(node)) { - visited.add(node); - edges.get(node).stream() - .filter(e -> includeAdjacent || !node.equals(u) || !e.equals(v)) - .forEach(e -> stack.push(e)); - } - } - assert !visited.contains(v); - return false; - } - - void printGraph(PrintStream out) { - nodes.stream() - .forEach(u -> adjacentNodes(u).stream() - .forEach(v -> out.format("%s -> %s%n", u, v))); - } - - public static class Builder { - final Set nodes = new HashSet<>(); - final Map> edges = new HashMap<>(); - public void addNode(T node) { - if (nodes.contains(node)) { - return; - } - nodes.add(node); - edges.computeIfAbsent(node, _e -> new HashSet<>()); - } - public void addEdge(T u, T v) { - addNode(u); - addNode(v); - edges.get(u).add(v); - } - public Graph build() { - return new Graph<>(nodes, edges); - } - } -} From 8f99e6ecdf10a625861a59267adc82f032a0064e Mon Sep 17 00:00:00 2001 From: Vicente Romero Date: Wed, 15 Feb 2017 17:00:22 -0800 Subject: [PATCH 219/447] 8174694: improve error message shown when main class can't be loaded Reviewed-by: ksrini, alanb --- .../classes/sun/launcher/LauncherHelper.java | 8 +- .../launcher/resources/launcher.properties | 5 +- .../launcher/MainClassCantBeLoadedTest.java | 98 +++++++++++++++++++ 3 files changed, 106 insertions(+), 5 deletions(-) create mode 100644 jdk/test/tools/launcher/MainClassCantBeLoadedTest.java diff --git a/jdk/src/java.base/share/classes/sun/launcher/LauncherHelper.java b/jdk/src/java.base/share/classes/sun/launcher/LauncherHelper.java index 39df984054b..c3410489613 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/LauncherHelper.java +++ b/jdk/src/java.base/share/classes/sun/launcher/LauncherHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -638,10 +638,12 @@ public final class LauncherHelper { String ncn = Normalizer.normalize(cn, Normalizer.Form.NFC); mainClass = Class.forName(ncn, false, scl); } catch (NoClassDefFoundError | ClassNotFoundException cnfe1) { - abort(cnfe1, "java.launcher.cls.error1", cn); + abort(cnfe1, "java.launcher.cls.error1", cn, + cnfe1.getClass().getCanonicalName(), cnfe1.getMessage()); } } else { - abort(cnfe, "java.launcher.cls.error1", cn); + abort(cnfe, "java.launcher.cls.error1", cn, + cnfe.getClass().getCanonicalName(), cnfe.getMessage()); } } } catch (LinkageError le) { diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties index 23439deb377..932a69c3bdf 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -175,7 +175,8 @@ The following options are Mac OS X specific:\n\ \ override default icon displayed in dock\n\n java.launcher.cls.error1=\ - Error: Could not find or load main class {0} + Error: Could not find or load main class {0}\n\ + Caused by: {1}: {2} java.launcher.cls.error2=\ Error: Main method is not {0} in class {1}, please define the main method as:\n\ \ public static void main(String[] args) diff --git a/jdk/test/tools/launcher/MainClassCantBeLoadedTest.java b/jdk/test/tools/launcher/MainClassCantBeLoadedTest.java new file mode 100644 index 00000000000..446949757f8 --- /dev/null +++ b/jdk/test/tools/launcher/MainClassCantBeLoadedTest.java @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 8174694 + * @summary improve error message shown when main class can't be loaded + * @compile MainClassCantBeLoadedTest.java + * @run main MainClassCantBeLoadedTest + */ + +import java.io.*; +import java.util.*; + +public class MainClassCantBeLoadedTest extends TestHelper { + private MainClassCantBeLoadedTest(){} + + @Test + void testLoadingClassWithMissingSuper() throws Exception { + if (!isEnglishLocale()) { + return; + } + + File cwd = new File("."); + File srcDir = new File(cwd, "src"); + if (srcDir.exists()) { + recursiveDelete(srcDir); + } + srcDir.mkdirs(); + + /* we want to generate two classes A and B, where B is the superclass of A + * class A has a main method + */ + ArrayList scratchpad = new ArrayList<>(); + scratchpad.add("public class A extends B {"); + scratchpad.add(" public static void main(String... args) {}"); + scratchpad.add("}"); + createFile(new File(srcDir, "A.java"), scratchpad); + + scratchpad.clear(); + scratchpad.add("class B {}"); + createFile(new File(srcDir, "B.java"), scratchpad); + + // let's compile both + TestResult trCompilation = doExec(javacCmd, + "-d", "out", + new File(srcDir, "A.java").toString(), + new File(srcDir, "B.java").toString()); + if (!trCompilation.isOK()) { + System.err.println(trCompilation); + throw new RuntimeException("Error: compiling"); + } + + // and now B is removed + File outDir = new File(cwd, "out"); + File bClass = new File(outDir, "B.class"); + bClass.delete(); + + // if A is executed + TestResult trExecution = doExec(javaCmd, "-cp", "out", "A"); + // then this error message should be generated + trExecution.contains("Error: Could not find or load main class A"); + trExecution.contains("Caused by: java.lang.NoClassDefFoundError: B"); + if (!trExecution.testStatus) + System.err.println(trExecution); + } + + public static void main(String[] args) throws Exception { + MainClassCantBeLoadedTest a = new MainClassCantBeLoadedTest(); + a.run(args); + if (testExitValue > 0) { + System.out.println("Total of " + testExitValue + " failed"); + throw new RuntimeException("Test failed"); + } else { + System.out.println("Test passed"); + } + } +} From 3f1c785d610d03c98340ec3e51802e47c3cc6d91 Mon Sep 17 00:00:00 2001 From: Aleksei Efimov Date: Thu, 16 Feb 2017 04:11:20 +0300 Subject: [PATCH 220/447] 8173390: Investigate SymbolTable in SAXParser Reviewed-by: dfuchs, joehw --- .../internal/parsers/XML11Configuration.java | 57 ++++++++------ .../unittest/sax/SymbolTableResetTest.java | 78 +++++++++++++++++++ 2 files changed, 112 insertions(+), 23 deletions(-) create mode 100644 jaxp/test/javax/xml/jaxp/unittest/sax/SymbolTableResetTest.java diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java index f56467532b6..ac5e7e7ba39 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java @@ -415,9 +415,15 @@ public class XML11Configuration extends ParserConfigurationSettings /** Current DTD scanner. */ protected XMLDTDScanner fCurrentDTDScanner; - /** Flag indiciating whether XML11 components have been initialized. */ + /** Flag indicating whether XML11 components have been initialized. */ private boolean f11Initialized = false; + /** Flag indicating whether the symbol table instance was specified during construction **/ + private boolean fSymbolTableProvided = false; + + /** Flag indicating if the symbol table was initialized and never used before that **/ + private boolean fSymbolTableJustInitialized = true; + // // Constructors // @@ -566,15 +572,18 @@ public class XML11Configuration extends ParserConfigurationSettings }; addRecognizedProperties(recognizedProperties); - if (symbolTable == null) { - symbolTable = new SymbolTable(); + // Remember if symbolTable was provided from outside + fSymbolTableProvided = symbolTable != null; + if (!fSymbolTableProvided) { + fSymbolTable = new SymbolTable(); + } else { + fSymbolTable = symbolTable; } - fSymbolTable = symbolTable; fProperties.put(SYMBOL_TABLE, fSymbolTable); fGrammarPool = grammarPool; if (fGrammarPool != null) { - fProperties.put(XMLGRAMMAR_POOL, fGrammarPool); + fProperties.put(XMLGRAMMAR_POOL, fGrammarPool); } fEntityManager = new XMLEntityManager(); @@ -840,6 +849,7 @@ public class XML11Configuration extends ParserConfigurationSettings fValidationManager.reset(); fVersionDetector.reset(this); fConfigUpdated = true; + resetSymbolTable(); resetCommon(); short version = fVersionDetector.determineDocVersion(fInputSource); @@ -858,15 +868,7 @@ public class XML11Configuration extends ParserConfigurationSettings // resets and sets the pipeline. fVersionDetector.startDocumentParsing((XMLEntityHandler) fCurrentScanner, version); fInputSource = null; - } catch (XNIException ex) { - if (PRINT_EXCEPTION_STACK_TRACE) - ex.printStackTrace(); - throw ex; - } catch (IOException ex) { - if (PRINT_EXCEPTION_STACK_TRACE) - ex.printStackTrace(); - throw ex; - } catch (RuntimeException ex) { + } catch (IOException | RuntimeException ex) { if (PRINT_EXCEPTION_STACK_TRACE) ex.printStackTrace(); throw ex; @@ -879,15 +881,7 @@ public class XML11Configuration extends ParserConfigurationSettings try { return fCurrentScanner.scanDocument(complete); - } catch (XNIException ex) { - if (PRINT_EXCEPTION_STACK_TRACE) - ex.printStackTrace(); - throw ex; - } catch (IOException ex) { - if (PRINT_EXCEPTION_STACK_TRACE) - ex.printStackTrace(); - throw ex; - } catch (RuntimeException ex) { + } catch (IOException | RuntimeException ex) { if (PRINT_EXCEPTION_STACK_TRACE) ex.printStackTrace(); throw ex; @@ -1589,6 +1583,23 @@ public class XML11Configuration extends ParserConfigurationSettings } } + + /** + * Reset the symbol table if it wasn't provided during construction + * and its not the first time when parse is called after initialization + */ + private void resetSymbolTable() { + if (!fSymbolTableProvided) { + if (fSymbolTableJustInitialized) { + // Skip symbol table reallocation for the first parsing process + fSymbolTableJustInitialized = false; + } else { + fSymbolTable = new SymbolTable(); + fProperties.put(SYMBOL_TABLE, fSymbolTable); + } + } + } + /** * Returns the state of a feature. This method calls getFeature() * on ParserConfigurationSettings, bypassing getFeature() on this diff --git a/jaxp/test/javax/xml/jaxp/unittest/sax/SymbolTableResetTest.java b/jaxp/test/javax/xml/jaxp/unittest/sax/SymbolTableResetTest.java new file mode 100644 index 00000000000..d54086361eb --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/SymbolTableResetTest.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package sax; + +import java.io.StringReader; + +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +import org.testng.Assert; +import org.testng.annotations.Listeners; +import org.testng.annotations.Test; +import org.xml.sax.InputSource; +import org.xml.sax.helpers.DefaultHandler; + +/* + * @test + * @bug 8173390 + * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest + * @run testng/othervm -DrunSecMngr=true sax.SymbolTableResetTest + * @run testng/othervm sax.SymbolTableResetTest + * @summary Test that SAXParser reallocates symbol table during + * subsequent parse operations + */ +@Listeners({jaxp.library.BasePolicy.class}) +public class SymbolTableResetTest { + + /* + * Test mimics the SAXParser usage in SAAJ-RI that reuses the + * parsers from the internal pool. To avoid memory leaks, symbol + * table associated with the parser should be reallocated during each + * parse() operation. + */ + @Test + public void testReset() throws Exception { + // Dummy xml input for parser + String input = "Test"; + // Create SAXParser + SAXParserFactory spf = SAXParserFactory.newInstance(); + SAXParser p = spf.newSAXParser(); + // First parse iteration + p.parse(new InputSource(new StringReader(input)), new DefaultHandler()); + // Get first symbol table reference + Object symTable1 = p.getProperty(SYMBOL_TABLE_PROPERTY); + p.reset(); + // Second parse iteration + p.parse(new InputSource(new StringReader(input)), new DefaultHandler()); + // Get second symbol table reference + Object symTable2 = p.getProperty(SYMBOL_TABLE_PROPERTY); + // Symbol table references should be different + Assert.assertNotSame(symTable1, symTable2, "Symbol table references"); + } + + // Symbol table property + private static final String SYMBOL_TABLE_PROPERTY = "http://apache.org/xml/properties/internal/symbol-table"; + +} From 6a5e6f2ae1959ccf9c4693bba243d183b7c0aafa Mon Sep 17 00:00:00 2001 From: Roland Westrelin Date: Wed, 15 Feb 2017 17:26:37 -0800 Subject: [PATCH 221/447] 8174164: SafePointNode::_replaced_nodes breaks with irreducible loops Reviewed-by: kvn --- hotspot/src/share/vm/opto/callnode.hpp | 4 ++-- hotspot/src/share/vm/opto/library_call.cpp | 11 +++++++---- hotspot/src/share/vm/opto/parse1.cpp | 4 ++-- hotspot/src/share/vm/opto/replacednodes.cpp | 8 ++++++-- hotspot/src/share/vm/opto/replacednodes.hpp | 2 +- 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/hotspot/src/share/vm/opto/callnode.hpp b/hotspot/src/share/vm/opto/callnode.hpp index 00979ae0d53..f5cc9bcf237 100644 --- a/hotspot/src/share/vm/opto/callnode.hpp +++ b/hotspot/src/share/vm/opto/callnode.hpp @@ -452,8 +452,8 @@ public: void delete_replaced_nodes() { _replaced_nodes.reset(); } - void apply_replaced_nodes() { - _replaced_nodes.apply(this); + void apply_replaced_nodes(uint idx) { + _replaced_nodes.apply(this, idx); } void merge_replaced_nodes_with(SafePointNode* sfpt) { _replaced_nodes.merge_with(sfpt->_replaced_nodes); diff --git a/hotspot/src/share/vm/opto/library_call.cpp b/hotspot/src/share/vm/opto/library_call.cpp index 508eadeb167..54d66e49c86 100644 --- a/hotspot/src/share/vm/opto/library_call.cpp +++ b/hotspot/src/share/vm/opto/library_call.cpp @@ -277,7 +277,8 @@ class LibraryCallKit : public GraphKit { AllocateArrayNode* tightly_coupled_allocation(Node* ptr, RegionNode* slow_region); JVMState* arraycopy_restore_alloc_state(AllocateArrayNode* alloc, int& saved_reexecute_sp); - void arraycopy_move_allocation_here(AllocateArrayNode* alloc, Node* dest, JVMState* saved_jvms, int saved_reexecute_sp); + void arraycopy_move_allocation_here(AllocateArrayNode* alloc, Node* dest, JVMState* saved_jvms, int saved_reexecute_sp, + uint new_idx); typedef enum { LS_get_add, LS_get_set, LS_cmp_swap, LS_cmp_swap_weak, LS_cmp_exchange } LoadStoreKind; MemNode::MemOrd access_kind_to_memord_LS(AccessKind access_kind, bool is_store); @@ -4882,7 +4883,8 @@ JVMState* LibraryCallKit::arraycopy_restore_alloc_state(AllocateArrayNode* alloc // deoptimize. This is possible because tightly_coupled_allocation() // guarantees there's no observer of the allocated array at this point // and the control flow is simple enough. -void LibraryCallKit::arraycopy_move_allocation_here(AllocateArrayNode* alloc, Node* dest, JVMState* saved_jvms, int saved_reexecute_sp) { +void LibraryCallKit::arraycopy_move_allocation_here(AllocateArrayNode* alloc, Node* dest, JVMState* saved_jvms, + int saved_reexecute_sp, uint new_idx) { if (saved_jvms != NULL && !stopped()) { assert(alloc != NULL, "only with a tightly coupled allocation"); // restore JVM state to the state at the arraycopy @@ -4891,7 +4893,7 @@ void LibraryCallKit::arraycopy_move_allocation_here(AllocateArrayNode* alloc, No assert(saved_jvms->map()->i_o() == map()->i_o(), "IO state changed?"); // If we've improved the types of some nodes (null check) while // emitting the guards, propagate them to the current state - map()->replaced_nodes().apply(saved_jvms->map()); + map()->replaced_nodes().apply(saved_jvms->map(), new_idx); set_jvms(saved_jvms); _reexecute_sp = saved_reexecute_sp; @@ -4949,6 +4951,7 @@ bool LibraryCallKit::inline_arraycopy() { Node* dest_offset = argument(3); // type: int Node* length = argument(4); // type: int + uint new_idx = C->unique(); // Check for allocation before we add nodes that would confuse // tightly_coupled_allocation() @@ -5164,7 +5167,7 @@ bool LibraryCallKit::inline_arraycopy() { } } - arraycopy_move_allocation_here(alloc, dest, saved_jvms, saved_reexecute_sp); + arraycopy_move_allocation_here(alloc, dest, saved_jvms, saved_reexecute_sp, new_idx); if (stopped()) { return true; diff --git a/hotspot/src/share/vm/opto/parse1.cpp b/hotspot/src/share/vm/opto/parse1.cpp index be1d82d7554..35d099bdeda 100644 --- a/hotspot/src/share/vm/opto/parse1.cpp +++ b/hotspot/src/share/vm/opto/parse1.cpp @@ -1086,7 +1086,7 @@ void Parse::do_exits() { kit.make_dtrace_method_exit(method()); } if (_replaced_nodes_for_exceptions) { - kit.map()->apply_replaced_nodes(); + kit.map()->apply_replaced_nodes(_new_idx); } // Done with exception-path processing. ex_map = kit.make_exception_state(ex_oop); @@ -1107,7 +1107,7 @@ void Parse::do_exits() { _exits.add_exception_state(ex_map); } } - _exits.map()->apply_replaced_nodes(); + _exits.map()->apply_replaced_nodes(_new_idx); } //-----------------------------create_entry_map------------------------------- diff --git a/hotspot/src/share/vm/opto/replacednodes.cpp b/hotspot/src/share/vm/opto/replacednodes.cpp index e3f3c113572..68928fc1601 100644 --- a/hotspot/src/share/vm/opto/replacednodes.cpp +++ b/hotspot/src/share/vm/opto/replacednodes.cpp @@ -92,13 +92,17 @@ void ReplacedNodes::reset() { } // Perfom node replacement (used when returning to caller) -void ReplacedNodes::apply(Node* n) { +void ReplacedNodes::apply(Node* n, uint idx) { if (is_empty()) { return; } for (int i = 0; i < _replaced_nodes->length(); i++) { ReplacedNode replaced = _replaced_nodes->at(i); - n->replace_edge(replaced.initial(), replaced.improved()); + // Only apply if improved node was created in a callee to avoid + // issues with irreducible loops in the caller + if (replaced.improved()->_idx >= idx) { + n->replace_edge(replaced.initial(), replaced.improved()); + } } } diff --git a/hotspot/src/share/vm/opto/replacednodes.hpp b/hotspot/src/share/vm/opto/replacednodes.hpp index 0f68fe986d5..3c31d0de903 100644 --- a/hotspot/src/share/vm/opto/replacednodes.hpp +++ b/hotspot/src/share/vm/opto/replacednodes.hpp @@ -71,7 +71,7 @@ class ReplacedNodes VALUE_OBJ_CLASS_SPEC { void record(Node* initial, Node* improved); void transfer_from(const ReplacedNodes& other, uint idx); void reset(); - void apply(Node* n); + void apply(Node* n, uint idx); void merge_with(const ReplacedNodes& other); bool is_empty() const; void dump(outputStream *st) const; From c5656c1c76afc6bc0d7226ecfb1e54422d68020c Mon Sep 17 00:00:00 2001 From: Kumar Srinivasan Date: Wed, 15 Feb 2017 18:07:28 -0800 Subject: [PATCH 222/447] 8173308: JAVAC_OPTIONS should be updated to align with JAVA_OPTIONS Reviewed-by: jjg --- .../com/sun/tools/javac/main/CommandLine.java | 142 ++++++++++++++-- .../com/sun/tools/javac/main/Main.java | 19 +-- .../tools/javac/resources/javac.properties | 3 + .../tools/javac/main/EnvVariableTest.java | 151 ++++++++++++++++++ .../test/tools/javac/modules/EnvVarTest.java | 8 +- .../InheritRuntimeEnvironmentTest.java | 4 +- 6 files changed, 300 insertions(+), 27 deletions(-) create mode 100644 langtools/test/tools/javac/main/EnvVariableTest.java diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/CommandLine.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/CommandLine.java index 9fc54414efb..9e639871a85 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/CommandLine.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/CommandLine.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,8 +29,9 @@ import java.io.IOException; import java.io.Reader; import java.nio.file.Files; import java.nio.file.Paths; - -import com.sun.tools.javac.util.ListBuffer; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; /** * Various utility methods for processing Java tool command line arguments. @@ -55,28 +56,80 @@ public class CommandLine { * @throws IOException if there is a problem reading any of the @files */ public static String[] parse(String[] args) throws IOException { - ListBuffer newArgs = new ListBuffer<>(); + List newArgs = new ArrayList<>(); + appendParsedCommandArgs(newArgs, Arrays.asList(args)); + return newArgs.toArray(new String[newArgs.size()]); + } + + private static void appendParsedCommandArgs(List newArgs, List args) throws IOException { for (String arg : args) { if (arg.length() > 1 && arg.charAt(0) == '@') { arg = arg.substring(1); if (arg.charAt(0) == '@') { - newArgs.append(arg); + newArgs.add(arg); } else { loadCmdFile(arg, newArgs); } } else { - newArgs.append(arg); + newArgs.add(arg); } } - return newArgs.toList().toArray(new String[newArgs.length()]); } - private static void loadCmdFile(String name, ListBuffer args) throws IOException { + /** + * Process the given environment variable and appends any Win32-style + * command files for the specified command line arguments and return + * the resulting arguments. A command file argument + * is of the form '@file' where 'file' is the name of the file whose + * contents are to be parsed for additional arguments. The contents of + * the command file are parsed using StreamTokenizer and the original + * '@file' argument replaced with the resulting tokens. Recursive command + * files are not supported. The '@' character itself can be quoted with + * the sequence '@@'. + * @param envVariable the env variable to process + * @param args the arguments that may contain @files + * @return the arguments, with environment variable's content and expansion of @files + * @throws IOException if there is a problem reading any of the @files + * @throws com.sun.tools.javac.main.CommandLine.UnmatchedQuote + */ + public static List parse(String envVariable, List args) + throws IOException, UnmatchedQuote { + + List inArgs = new ArrayList<>(); + appendParsedEnvVariables(inArgs, envVariable); + inArgs.addAll(args); + List newArgs = new ArrayList<>(); + appendParsedCommandArgs(newArgs, inArgs); + return newArgs; + } + + /** + * Process the given environment variable and appends any Win32-style + * command files for the specified command line arguments and return + * the resulting arguments. A command file argument + * is of the form '@file' where 'file' is the name of the file whose + * contents are to be parsed for additional arguments. The contents of + * the command file are parsed using StreamTokenizer and the original + * '@file' argument replaced with the resulting tokens. Recursive command + * files are not supported. The '@' character itself can be quoted with + * the sequence '@@'. + * @param envVariable the env variable to process + * @param args the arguments that may contain @files + * @return the arguments, with environment variable's content and expansion of @files + * @throws IOException if there is a problem reading any of the @files + * @throws com.sun.tools.javac.main.CommandLine.UnmatchedQuote + */ + public static String[] parse(String envVariable, String[] args) throws IOException, UnmatchedQuote { + List out = parse(envVariable, Arrays.asList(args)); + return out.toArray(new String[out.size()]); + } + + private static void loadCmdFile(String name, List args) throws IOException { try (Reader r = Files.newBufferedReader(Paths.get(name))) { Tokenizer t = new Tokenizer(r); String s; while ((s = t.nextToken()) != null) { - args.append(s); + args.add(s); } } } @@ -188,4 +241,75 @@ public class CommandLine { } } } + + @SuppressWarnings("fallthrough") + private static void appendParsedEnvVariables(List newArgs, String envVariable) + throws UnmatchedQuote { + + if (envVariable == null) { + return; + } + String in = System.getenv(envVariable); + if (in == null || in.trim().isEmpty()) { + return; + } + + final char NUL = (char)0; + final int len = in.length(); + + int pos = 0; + StringBuilder sb = new StringBuilder(); + char quote = NUL; + char ch; + + loop: + while (pos < len) { + ch = in.charAt(pos); + switch (ch) { + case '\"': case '\'': + if (quote == NUL) { + quote = ch; + } else if (quote == ch) { + quote = NUL; + } else { + sb.append(ch); + } + pos++; + break; + case '\f': case '\n': case '\r': case '\t': case ' ': + if (quote == NUL) { + newArgs.add(sb.toString()); + sb.setLength(0); + while (ch == '\f' || ch == '\n' || ch == '\r' || ch == '\t' || ch == ' ') { + pos++; + if (pos >= len) { + break loop; + } + ch = in.charAt(pos); + } + break; + } + // fall through + default: + sb.append(ch); + pos++; + } + } + if (sb.length() != 0) { + newArgs.add(sb.toString()); + } + if (quote != NUL) { + throw new UnmatchedQuote(envVariable); + } + } + + public static class UnmatchedQuote extends Exception { + private static final long serialVersionUID = 0; + + public final String variableName; + + UnmatchedQuote(String variable) { + this.variableName = variable; + } + } } diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Main.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Main.java index a9a888769c1..d356f4a4e3e 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Main.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Main.java @@ -43,6 +43,7 @@ import com.sun.tools.javac.file.CacheFSInfo; import com.sun.tools.javac.file.BaseFileManager; import com.sun.tools.javac.file.JavacFileManager; import com.sun.tools.javac.jvm.Target; +import com.sun.tools.javac.main.CommandLine.UnmatchedQuote; import com.sun.tools.javac.platform.PlatformDescription; import com.sun.tools.javac.processing.AnnotationProcessingError; import com.sun.tools.javac.util.*; @@ -80,6 +81,7 @@ public class Main { */ boolean apiMode; + private static final String ENV_OPT_NAME = "JDK_JAVAC_OPTIONS"; /** Result codes. */ @@ -201,19 +203,12 @@ public class Main { return Result.CMDERR; } - // prefix argv with contents of _JAVAC_OPTIONS if set - String envOpt = System.getenv("_JAVAC_OPTIONS"); - if (envOpt != null && !envOpt.trim().isEmpty()) { - String[] envv = envOpt.split("\\s+"); - String[] result = new String[envv.length + argv.length]; - System.arraycopy(envv, 0, result, 0, envv.length); - System.arraycopy(argv, 0, result, envv.length, argv.length); - argv = result; - } - - // expand @-files + // prefix argv with contents of environment variable and expand @-files try { - argv = CommandLine.parse(argv); + argv = CommandLine.parse(ENV_OPT_NAME, argv); + } catch (UnmatchedQuote ex) { + error("err.unmatched.quote", ex.variableName); + return Result.CMDERR; } catch (FileNotFoundException | NoSuchFileException e) { warning("err.file.not.found", e.getMessage()); return Result.SYSERR; diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties index b92a26a1010..47eb370011b 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties @@ -377,6 +377,9 @@ javac.err.no.value.for.option=\ javac.err.repeated.value.for.patch.module=\ --patch-module specified more than once for {0} +javac.err.unmatched.quote=\ + unmatched quote in environment variable %s + ## messages javac.msg.usage.header=\ diff --git a/langtools/test/tools/javac/main/EnvVariableTest.java b/langtools/test/tools/javac/main/EnvVariableTest.java new file mode 100644 index 00000000000..0d44edcb72c --- /dev/null +++ b/langtools/test/tools/javac/main/EnvVariableTest.java @@ -0,0 +1,151 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8173308 + * @summary Check JDK_JAVA_OPTIONS parsing behavior + * @library /tools/lib + * @modules jdk.compiler/com.sun.tools.javac.main + * @build toolbox.ToolBox toolbox.TestRunner + * @run main EnvVariableTest + */ + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.nio.file.Path; + +import toolbox.*; + +import com.sun.tools.javac.main.CommandLine; + +public class EnvVariableTest extends TestRunner { + final String testClasses; + final ToolBox tb; + final Path javaExePath; + final ExecTask task; + final PrintStream ostream; + final ByteArrayOutputStream baos; + + public EnvVariableTest() { + super(System.err); + ostream = System.err; + baos = new ByteArrayOutputStream(); + testClasses = System.getProperty("test.classes"); + tb = new ToolBox(); + javaExePath = tb.getJDKTool("java"); + task = new ExecTask(tb, javaExePath); + } + + public static void main(String... args) throws Exception { + EnvVariableTest t = new EnvVariableTest(); + t.runTests(); + } + + @Test + public void testDoubleQuote() throws Exception { + // white space quoted with double quotes + test("-version -cp \"c:\\\\java libs\\\\one.jar\" \n", + "-version", "-cp", "c:\\\\java libs\\\\one.jar"); + } + + @Test + public void testSingleQuote() throws Exception { + // white space quoted with single quotes + test("-version -cp \'c:\\\\java libs\\\\one.jar\' \n", + "-version", "-cp", "c:\\\\java libs\\\\one.jar"); + } + + @Test + public void testEscapeCharacters() throws Exception { + // escaped characters + test("escaped chars testing \"\\a\\b\\c\\f\\n\\r\\t\\v\\9\\6\\23\\82\\28\\377\\477\\278\\287\"", + "escaped", "chars", "testing", "\\a\\b\\c\\f\\n\\r\\t\\v\\9\\6\\23\\82\\28\\377\\477\\278\\287"); + } + + @Test + public void testMixedQuotes() throws Exception { + // more mixing of quote types + test("\"mix 'single quote' in double\" 'mix \"double quote\" in single' partial\"quote me\"this", + "mix 'single quote' in double", "mix \"double quote\" in single", "partialquote methis"); + } + + @Test + public void testWhiteSpaces() throws Exception { + // whitespace tests + test("line one #comment\n'line #2' #rest are comment\r\n#comment on line 3\fline 4 #comment to eof", + "line", "one", "#comment", "line #2", "#rest", "are", "comment", "#comment", "on", "line", + "3", "line", "4", "#comment", "to", "eof"); + } + + @Test + public void testMismatchedDoubleQuote() throws Exception { + // mismatched quote + test("This is an \"open quote \n across line\n\t, note for WS.", + "Exception: JDK_JAVAC_OPTIONS"); + } + + @Test + public void testMismatchedSingleQuote() throws Exception { + // mismatched quote + test("This is an \'open quote \n across line\n\t, note for WS.", + "Exception: JDK_JAVAC_OPTIONS"); + } + + void test(String full, String... expectedArgs) throws Exception { + task.envVar("JDK_JAVAC_OPTIONS", full); + task.args("--add-exports", "jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED", + "-cp", testClasses, "EnvVariableTest$Tester"); + Task.Result tr = task.run(Task.Expect.SUCCESS); + String expected = Tester.arrayToString(expectedArgs); + String in = tr.getOutput(Task.OutputKind.STDOUT); + System.err.println("Matching..."); + System.err.println("Obtained: " + in); + System.err.println("Expected: " + expected); + if (in.contains(expected)) { + System.err.println("....OK"); + return; + } + throw new Exception("Expected strings not found"); + } + + /** + * A tester class that is invoked to invoke the CommandLine class, and + * print the result. + */ + public static class Tester { + private static final String[] EMPTY_ARRAY = new String[0]; + static String arrayToString(String... args) { + return String.join(", ", args); + } + public static void main(String... args) throws IOException { + try { + String[] argv = CommandLine.parse("JDK_JAVAC_OPTIONS", EMPTY_ARRAY); + System.out.print(arrayToString(argv)); + } catch (CommandLine.UnmatchedQuote ex) { + System.out.print("Exception: " + ex.variableName); + } + } + } +} diff --git a/langtools/test/tools/javac/modules/EnvVarTest.java b/langtools/test/tools/javac/modules/EnvVarTest.java index eed5a03f385..dfa3d780867 100644 --- a/langtools/test/tools/javac/modules/EnvVarTest.java +++ b/langtools/test/tools/javac/modules/EnvVarTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ /* * @test * @bug 8156962 - * @summary Tests use of _JAVAC_OPTIONS env variable + * @summary Tests use of JDK_JAVAC_OPTIONS env variable * @library /tools/lib * @modules jdk.compiler/com.sun.tools.javac.api * jdk.compiler/com.sun.tools.javac.main @@ -71,7 +71,7 @@ public class EnvVarTest extends ModuleTestBase { tb.out.println("test that addExports can be provided with env variable"); new JavacTask(tb, Mode.EXEC) - .envVar("_JAVAC_OPTIONS", "--add-exports jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED") + .envVar("JDK_JAVAC_OPTIONS", "--add-exports jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED") .outdir(classes) .files(findJavaFiles(src)) .run(Expect.SUCCESS) @@ -83,7 +83,7 @@ public class EnvVarTest extends ModuleTestBase { "--add-exports jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED"); new JavacTask(tb, Mode.EXEC) - .envVar("_JAVAC_OPTIONS", "@" + atFile) + .envVar("JDK_JAVAC_OPTIONS", "@" + atFile) .outdir(classes) .files(findJavaFiles(src)) .run(Expect.SUCCESS) diff --git a/langtools/test/tools/javac/modules/InheritRuntimeEnvironmentTest.java b/langtools/test/tools/javac/modules/InheritRuntimeEnvironmentTest.java index e261dbf6dd7..64b534a0c4b 100644 --- a/langtools/test/tools/javac/modules/InheritRuntimeEnvironmentTest.java +++ b/langtools/test/tools/javac/modules/InheritRuntimeEnvironmentTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -238,7 +238,7 @@ public class InheritRuntimeEnvironmentTest extends ModuleTestBase { Arrays.asList("--add-exports", "jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"); List files = Arrays.asList(findJavaFiles(src)); - String envName = "_JAVAC_OPTIONS"; + String envName = "JDK_JAVAC_OPTIONS"; String envValue = String.join(" ", testOpts); out.println(" javac:"); From b107e7fa3899f0d4eda68dea59e456d11fd18062 Mon Sep 17 00:00:00 2001 From: Muneer Kolarkunnu Date: Wed, 15 Feb 2017 18:22:39 -0800 Subject: [PATCH 223/447] 8172701: Jemmy: FrameOperator: maximize() and demaximize() is not properly implemented Reviewed-by: serb, shurailine, mrkam --- .../drivers/windows/DefaultFrameDriver.java | 20 +++++++++--- .../jemmy/operators/FrameOperator.java | 32 +++++++++++++++++-- 2 files changed, 45 insertions(+), 7 deletions(-) diff --git a/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/drivers/windows/DefaultFrameDriver.java b/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/drivers/windows/DefaultFrameDriver.java index 055bc872f05..01520509f1d 100644 --- a/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/drivers/windows/DefaultFrameDriver.java +++ b/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/drivers/windows/DefaultFrameDriver.java @@ -22,9 +22,7 @@ */ package org.netbeans.jemmy.drivers.windows; -import java.awt.Dimension; import java.awt.Frame; -import java.awt.Toolkit; import java.awt.Window; import java.awt.event.WindowEvent; @@ -61,16 +59,28 @@ public class DefaultFrameDriver extends LightSupportiveDriver implements FrameDr ((FrameOperator) oper).setState(Frame.NORMAL); } + /** Maximizes the frame. + * + * @param oper Frame operator. + * @throws UnsupportedOperatorException if operator class name is not in + * the list of supported classes names + */ @Override public void maximize(ComponentOperator oper) { checkSupported(oper); - oper.setLocation(0, 0); - Dimension ssize = Toolkit.getDefaultToolkit().getScreenSize(); - oper.setSize(ssize.width, ssize.height); + ((FrameOperator) oper).setExtendedState(Frame.MAXIMIZED_BOTH); } + /** Demaximizes the frame. + * + * @param oper Frame operator. + * @throws UnsupportedOperatorException if operator class name is not in + * the list of supported classes names + */ @Override public void demaximize(ComponentOperator oper) { checkSupported(oper); + ((FrameOperator) oper).setExtendedState(Frame.NORMAL); } + } diff --git a/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/FrameOperator.java b/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/FrameOperator.java index d66a8e9c211..da6d1d5855a 100644 --- a/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/FrameOperator.java +++ b/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/FrameOperator.java @@ -274,7 +274,7 @@ public class FrameOperator extends WindowOperator implements Outputable { output.printGolden("Maximizing frame"); driver.maximize(this); if (getVerification()) { - waitState(Frame.NORMAL); + waitState(Frame.MAXIMIZED_BOTH); } } @@ -306,7 +306,7 @@ public class FrameOperator extends WindowOperator implements Outputable { waitState(new ComponentChooser() { @Override public boolean checkComponent(Component comp) { - return ((Frame) comp).getState() == state; + return ((Frame) comp).getExtendedState() == state; } @Override @@ -375,6 +375,19 @@ public class FrameOperator extends WindowOperator implements Outputable { })); } + /** + * Maps {@code Frame.getExtendedState()} through queue + * @return the state of the frame + */ + public int getExtendedState() { + return (runMapping(new MapAction("getExtendedState") { + @Override + public Integer map() { + return ((Frame) getSource()).getExtendedState(); + } + })); + } + /** * Maps {@code Frame.getTitle()} through queue */ @@ -447,6 +460,21 @@ public class FrameOperator extends WindowOperator implements Outputable { }); } + /** + * Maps {@code Frame.setExtendedState(int)} through queue + * @param state of the frame + */ + public void setExtendedState(final int state) { + runMapping(new MapAction("setExtendedState") { + @Override + public Void map() { + ((Frame) getSource()).setExtendedState(state); + return null; + } + }); + + } + /** * Maps {@code Frame.setTitle(String)} through queue */ From 103bce2074df38a4ef89c75b4e1c8344a81d34d9 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Wed, 15 Feb 2017 18:30:31 -0800 Subject: [PATCH 224/447] 8175047: javadoc should support --help-extra as a synonym for -X Reviewed-by: ksrini --- .../jdk/javadoc/internal/tool/ToolOption.java | 4 ++-- .../internal/tool/resources/javadoc.properties | 4 ++-- .../jdk/javadoc/doclet/testXOption/TestXOption.java | 12 +++++++++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java index 83d557fe3ee..72d585cd633 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -338,7 +338,7 @@ public enum ToolOption { } }, - X("-X", STANDARD) { + HELP_EXTRA("--help-extra -X", STANDARD) { @Override public void process(Helper helper) throws OptionException { throw new OptionException(OK, helper::Xusage); diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc.properties b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc.properties index e35e9cb350b..873b2d6852f 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc.properties +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -205,7 +205,7 @@ main.opt.J.arg=\ main.opt.J.desc=\ Pass directly to the runtime system -main.opt.X.desc=\ +main.opt.help.extra.desc=\ Print a synopsis of nonstandard options and exit main.usage.foot=\n\ diff --git a/langtools/test/jdk/javadoc/doclet/testXOption/TestXOption.java b/langtools/test/jdk/javadoc/doclet/testXOption/TestXOption.java index 422c8402507..5997735974c 100644 --- a/langtools/test/jdk/javadoc/doclet/testXOption/TestXOption.java +++ b/langtools/test/jdk/javadoc/doclet/testXOption/TestXOption.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -61,6 +61,16 @@ public class TestXOption extends JavadocTester { } } + @Test + void testWithHelpExtraOption() { + javadoc("-d", "out1", + "-sourcepath", testSrc, + "--help-extra", + testSrc("TestXOption.java")); + checkExit(Exit.OK); + checkOutput(true); + } + @Test void testWithOption() { javadoc("-d", "out1", From 28477cf4930a6273a9ef4d5ebb2d7788634237f7 Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Wed, 15 Feb 2017 22:19:13 -0500 Subject: [PATCH 225/447] 8166188: G1 Needs pre barrier on dereference of weak JNI handles Add low tag to jweaks and G1 barrier for jweak loads. Co-authored-by: Martin Doerr Co-authored-by: Volker Simonis Reviewed-by: mgerdin, mdoerr, pliden, dlong, dcubed, coleenp, aph, tschatzl --- hotspot/make/test/JtregNative.gmk | 4 +- .../cpu/aarch64/vm/sharedRuntime_aarch64.cpp | 32 ++- .../templateInterpreterGenerator_aarch64.cpp | 27 ++- hotspot/src/cpu/arm/vm/interp_masm_arm.cpp | 181 +-------------- hotspot/src/cpu/arm/vm/interp_masm_arm.hpp | 23 +- hotspot/src/cpu/arm/vm/macroAssembler_arm.cpp | 215 +++++++++++++++++- hotspot/src/cpu/arm/vm/macroAssembler_arm.hpp | 25 +- hotspot/src/cpu/arm/vm/sharedRuntime_arm.cpp | 24 +- .../vm/templateInterpreterGenerator_arm.cpp | 35 ++- hotspot/src/cpu/ppc/vm/frame_ppc.cpp | 9 +- hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp | 34 ++- hotspot/src/cpu/ppc/vm/macroAssembler_ppc.hpp | 6 +- hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp | 13 +- .../vm/templateInterpreterGenerator_ppc.cpp | 11 +- .../src/cpu/s390/vm/macroAssembler_s390.cpp | 28 +++ .../src/cpu/s390/vm/macroAssembler_s390.hpp | 2 + .../src/cpu/s390/vm/sharedRuntime_s390.cpp | 12 +- .../vm/templateInterpreterGenerator_s390.cpp | 11 +- .../src/cpu/sparc/vm/sharedRuntime_sparc.cpp | 33 ++- .../vm/templateInterpreterGenerator_sparc.cpp | 24 +- hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp | 32 ++- hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp | 4 +- .../src/cpu/x86/vm/sharedRuntime_x86_32.cpp | 13 +- .../src/cpu/x86/vm/sharedRuntime_x86_64.cpp | 13 +- .../vm/templateInterpreterGenerator_x86.cpp | 12 +- .../src/cpu/zero/vm/cppInterpreter_zero.cpp | 10 +- hotspot/src/share/vm/prims/jni.cpp | 7 +- hotspot/src/share/vm/prims/jvmtiEnv.cpp | 9 +- hotspot/src/share/vm/runtime/javaCalls.cpp | 118 ++++++---- hotspot/src/share/vm/runtime/javaCalls.hpp | 95 ++++++-- hotspot/src/share/vm/runtime/jniHandles.cpp | 37 ++- hotspot/src/share/vm/runtime/jniHandles.hpp | 106 +++++++-- .../src/share/vm/shark/sharkNativeWrapper.cpp | 3 +- .../jni/CallWithJNIWeak/CallWithJNIWeak.java | 45 ++++ .../jni/CallWithJNIWeak/libCallWithJNIWeak.c | 53 +++++ .../jni/ReturnJNIWeak/ReturnJNIWeak.java | 132 +++++++++++ .../jni/ReturnJNIWeak/libReturnJNIWeak.c | 52 +++++ 37 files changed, 1061 insertions(+), 429 deletions(-) create mode 100644 hotspot/test/runtime/jni/CallWithJNIWeak/CallWithJNIWeak.java create mode 100644 hotspot/test/runtime/jni/CallWithJNIWeak/libCallWithJNIWeak.c create mode 100644 hotspot/test/runtime/jni/ReturnJNIWeak/ReturnJNIWeak.java create mode 100644 hotspot/test/runtime/jni/ReturnJNIWeak/libReturnJNIWeak.c diff --git a/hotspot/make/test/JtregNative.gmk b/hotspot/make/test/JtregNative.gmk index 7223733367a..42eb76af57e 100644 --- a/hotspot/make/test/JtregNative.gmk +++ b/hotspot/make/test/JtregNative.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -48,6 +48,8 @@ BUILD_HOTSPOT_JTREG_NATIVE_SRC := \ $(HOTSPOT_TOPDIR)/test/runtime/jni/PrivateInterfaceMethods \ $(HOTSPOT_TOPDIR)/test/runtime/jni/ToStringInInterfaceTest \ $(HOTSPOT_TOPDIR)/test/runtime/jni/CalleeSavedRegisters \ + $(HOTSPOT_TOPDIR)/test/runtime/jni/CallWithJNIWeak \ + $(HOTSPOT_TOPDIR)/test/runtime/jni/ReturnJNIWeak \ $(HOTSPOT_TOPDIR)/test/runtime/modules/getModuleJNI \ $(HOTSPOT_TOPDIR)/test/runtime/SameObject \ $(HOTSPOT_TOPDIR)/test/runtime/BoolReturn \ diff --git a/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp index 01e0eeb1fc1..a286102e7b1 100644 --- a/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, 2015, Red Hat Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -2052,13 +2052,31 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, __ reset_last_Java_frame(false); - // Unpack oop result + // Unbox oop result, e.g. JNIHandles::resolve result. if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - Label L; - __ cbz(r0, L); - __ ldr(r0, Address(r0, 0)); - __ bind(L); - __ verify_oop(r0); + Label done, not_weak; + __ cbz(r0, done); // Use NULL as-is. + STATIC_ASSERT(JNIHandles::weak_tag_mask == 1u); + __ tbz(r0, 0, not_weak); // Test for jweak tag. + // Resolve jweak. + __ ldr(r0, Address(r0, -JNIHandles::weak_tag_value)); + __ verify_oop(r0); +#if INCLUDE_ALL_GCS + if (UseG1GC) { + __ g1_write_barrier_pre(noreg /* obj */, + r0 /* pre_val */, + rthread /* thread */, + rscratch1 /* tmp */, + true /* tosca_live */, + true /* expand_call */); + } +#endif // INCLUDE_ALL_GCS + __ b(done); + __ bind(not_weak); + // Resolve (untagged) jobject. + __ ldr(r0, Address(r0, 0)); + __ verify_oop(r0); + __ bind(done); } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp index 90dcd6c1a2c..6f44292c55a 100644 --- a/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, Red Hat Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -1399,13 +1399,32 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) { // and result handler will pick it up { - Label no_oop, store_result; + Label no_oop, not_weak, store_result; __ adr(t, ExternalAddress(AbstractInterpreter::result_handler(T_OBJECT))); __ cmp(t, result_handler); __ br(Assembler::NE, no_oop); - // retrieve result + // Unbox oop result, e.g. JNIHandles::resolve result. __ pop(ltos); - __ cbz(r0, store_result); + __ cbz(r0, store_result); // Use NULL as-is. + STATIC_ASSERT(JNIHandles::weak_tag_mask == 1u); + __ tbz(r0, 0, not_weak); // Test for jweak tag. + // Resolve jweak. + __ ldr(r0, Address(r0, -JNIHandles::weak_tag_value)); +#if INCLUDE_ALL_GCS + if (UseG1GC) { + __ enter(); // Barrier may call runtime. + __ g1_write_barrier_pre(noreg /* obj */, + r0 /* pre_val */, + rthread /* thread */, + t /* tmp */, + true /* tosca_live */, + true /* expand_call */); + __ leave(); + } +#endif // INCLUDE_ALL_GCS + __ b(store_result); + __ bind(not_weak); + // Resolve (untagged) jobject. __ ldr(r0, Address(r0, 0)); __ bind(store_result); __ str(r0, Address(rfp, frame::interpreter_frame_oop_temp_offset*wordSize)); diff --git a/hotspot/src/cpu/arm/vm/interp_masm_arm.cpp b/hotspot/src/cpu/arm/vm/interp_masm_arm.cpp index 2f41b102a85..96df37c275e 100644 --- a/hotspot/src/cpu/arm/vm/interp_masm_arm.cpp +++ b/hotspot/src/cpu/arm/vm/interp_masm_arm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -476,185 +476,6 @@ void InterpreterMacroAssembler::set_card(Register card_table_base, Address card_ } ////////////////////////////////////////////////////////////////////////////////// -#if INCLUDE_ALL_GCS - -// G1 pre-barrier. -// Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). -// If store_addr != noreg, then previous value is loaded from [store_addr]; -// in such case store_addr and new_val registers are preserved; -// otherwise pre_val register is preserved. -void InterpreterMacroAssembler::g1_write_barrier_pre(Register store_addr, - Register new_val, - Register pre_val, - Register tmp1, - Register tmp2) { - Label done; - Label runtime; - - if (store_addr != noreg) { - assert_different_registers(store_addr, new_val, pre_val, tmp1, tmp2, noreg); - } else { - assert (new_val == noreg, "should be"); - assert_different_registers(pre_val, tmp1, tmp2, noreg); - } - - Address in_progress(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + - SATBMarkQueue::byte_offset_of_active())); - Address index(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + - SATBMarkQueue::byte_offset_of_index())); - Address buffer(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + - SATBMarkQueue::byte_offset_of_buf())); - - // Is marking active? - assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "adjust this code"); - ldrb(tmp1, in_progress); - cbz(tmp1, done); - - // Do we need to load the previous value? - if (store_addr != noreg) { - load_heap_oop(pre_val, Address(store_addr, 0)); - } - - // Is the previous value null? - cbz(pre_val, done); - - // Can we store original value in the thread's buffer? - // Is index == 0? - // (The index field is typed as size_t.) - - ldr(tmp1, index); // tmp1 := *index_adr - ldr(tmp2, buffer); - - subs(tmp1, tmp1, wordSize); // tmp1 := tmp1 - wordSize - b(runtime, lt); // If negative, goto runtime - - str(tmp1, index); // *index_adr := tmp1 - - // Record the previous value - str(pre_val, Address(tmp2, tmp1)); - b(done); - - bind(runtime); - - // save the live input values -#ifdef AARCH64 - if (store_addr != noreg) { - raw_push(store_addr, new_val); - } else { - raw_push(pre_val, ZR); - } -#else - if (store_addr != noreg) { - // avoid raw_push to support any ordering of store_addr and new_val - push(RegisterSet(store_addr) | RegisterSet(new_val)); - } else { - push(pre_val); - } -#endif // AARCH64 - - if (pre_val != R0) { - mov(R0, pre_val); - } - mov(R1, Rthread); - - call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), R0, R1); - -#ifdef AARCH64 - if (store_addr != noreg) { - raw_pop(store_addr, new_val); - } else { - raw_pop(pre_val, ZR); - } -#else - if (store_addr != noreg) { - pop(RegisterSet(store_addr) | RegisterSet(new_val)); - } else { - pop(pre_val); - } -#endif // AARCH64 - - bind(done); -} - -// G1 post-barrier. -// Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). -void InterpreterMacroAssembler::g1_write_barrier_post(Register store_addr, - Register new_val, - Register tmp1, - Register tmp2, - Register tmp3) { - - Address queue_index(Rthread, in_bytes(JavaThread::dirty_card_queue_offset() + - DirtyCardQueue::byte_offset_of_index())); - Address buffer(Rthread, in_bytes(JavaThread::dirty_card_queue_offset() + - DirtyCardQueue::byte_offset_of_buf())); - - BarrierSet* bs = Universe::heap()->barrier_set(); - CardTableModRefBS* ct = (CardTableModRefBS*)bs; - Label done; - Label runtime; - - // Does store cross heap regions? - - eor(tmp1, store_addr, new_val); -#ifdef AARCH64 - logical_shift_right(tmp1, tmp1, HeapRegion::LogOfHRGrainBytes); - cbz(tmp1, done); -#else - movs(tmp1, AsmOperand(tmp1, lsr, HeapRegion::LogOfHRGrainBytes)); - b(done, eq); -#endif - - // crosses regions, storing NULL? - - cbz(new_val, done); - - // storing region crossing non-NULL, is card already dirty? - const Register card_addr = tmp1; - assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code"); - - mov_address(tmp2, (address)ct->byte_map_base, symbolic_Relocation::card_table_reference); - add(card_addr, tmp2, AsmOperand(store_addr, lsr, CardTableModRefBS::card_shift)); - - ldrb(tmp2, Address(card_addr)); - cmp(tmp2, (int)G1SATBCardTableModRefBS::g1_young_card_val()); - b(done, eq); - - membar(MacroAssembler::Membar_mask_bits(MacroAssembler::StoreLoad), tmp2); - - assert(CardTableModRefBS::dirty_card_val() == 0, "adjust this code"); - ldrb(tmp2, Address(card_addr)); - cbz(tmp2, done); - - // storing a region crossing, non-NULL oop, card is clean. - // dirty card and log. - - strb(zero_register(tmp2), Address(card_addr)); - - ldr(tmp2, queue_index); - ldr(tmp3, buffer); - - subs(tmp2, tmp2, wordSize); - b(runtime, lt); // go to runtime if now negative - - str(tmp2, queue_index); - - str(card_addr, Address(tmp3, tmp2)); - b(done); - - bind(runtime); - - if (card_addr != R0) { - mov(R0, card_addr); - } - mov(R1, Rthread); - call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post), R0, R1); - - bind(done); -} - -#endif // INCLUDE_ALL_GCS -////////////////////////////////////////////////////////////////////////////////// // Java Expression Stack diff --git a/hotspot/src/cpu/arm/vm/interp_masm_arm.hpp b/hotspot/src/cpu/arm/vm/interp_masm_arm.hpp index 5c753753f95..39e60226bf6 100644 --- a/hotspot/src/cpu/arm/vm/interp_masm_arm.hpp +++ b/hotspot/src/cpu/arm/vm/interp_masm_arm.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -146,27 +146,6 @@ class InterpreterMacroAssembler: public MacroAssembler { void set_card(Register card_table_base, Address card_table_addr, Register tmp); -#if INCLUDE_ALL_GCS - // G1 pre-barrier. - // Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). - // If store_addr != noreg, then previous value is loaded from [store_addr]; - // in such case store_addr and new_val registers are preserved; - // otherwise pre_val register is preserved. - void g1_write_barrier_pre(Register store_addr, - Register new_val, - Register pre_val, - Register tmp1, - Register tmp2); - - // G1 post-barrier. - // Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). - void g1_write_barrier_post(Register store_addr, - Register new_val, - Register tmp1, - Register tmp2, - Register tmp3); -#endif // INCLUDE_ALL_GCS - void pop_ptr(Register r); void pop_i(Register r = R0_tos); #ifdef AARCH64 diff --git a/hotspot/src/cpu/arm/vm/macroAssembler_arm.cpp b/hotspot/src/cpu/arm/vm/macroAssembler_arm.cpp index ada7d3fc485..2eb2a551002 100644 --- a/hotspot/src/cpu/arm/vm/macroAssembler_arm.cpp +++ b/hotspot/src/cpu/arm/vm/macroAssembler_arm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2211,6 +2211,219 @@ void MacroAssembler::biased_locking_exit(Register obj_reg, Register tmp_reg, Lab b(done, eq); } + +void MacroAssembler::resolve_jobject(Register value, + Register tmp1, + Register tmp2) { + assert_different_registers(value, tmp1, tmp2); + Label done, not_weak; + cbz(value, done); // Use NULL as-is. + STATIC_ASSERT(JNIHandles::weak_tag_mask == 1u); + tbz(value, 0, not_weak); // Test for jweak tag. + // Resolve jweak. + ldr(value, Address(value, -JNIHandles::weak_tag_value)); + verify_oop(value); +#if INCLUDE_ALL_GCS + if (UseG1GC) { + g1_write_barrier_pre(noreg, // store_addr + noreg, // new_val + value, // pre_val + tmp1, // tmp1 + tmp2); // tmp2 + } +#endif // INCLUDE_ALL_GCS + b(done); + bind(not_weak); + // Resolve (untagged) jobject. + ldr(value, Address(value)); + verify_oop(value); + bind(done); +} + + +////////////////////////////////////////////////////////////////////////////////// + +#if INCLUDE_ALL_GCS + +// G1 pre-barrier. +// Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). +// If store_addr != noreg, then previous value is loaded from [store_addr]; +// in such case store_addr and new_val registers are preserved; +// otherwise pre_val register is preserved. +void MacroAssembler::g1_write_barrier_pre(Register store_addr, + Register new_val, + Register pre_val, + Register tmp1, + Register tmp2) { + Label done; + Label runtime; + + if (store_addr != noreg) { + assert_different_registers(store_addr, new_val, pre_val, tmp1, tmp2, noreg); + } else { + assert (new_val == noreg, "should be"); + assert_different_registers(pre_val, tmp1, tmp2, noreg); + } + + Address in_progress(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + + SATBMarkQueue::byte_offset_of_active())); + Address index(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + + SATBMarkQueue::byte_offset_of_index())); + Address buffer(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + + SATBMarkQueue::byte_offset_of_buf())); + + // Is marking active? + assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "adjust this code"); + ldrb(tmp1, in_progress); + cbz(tmp1, done); + + // Do we need to load the previous value? + if (store_addr != noreg) { + load_heap_oop(pre_val, Address(store_addr, 0)); + } + + // Is the previous value null? + cbz(pre_val, done); + + // Can we store original value in the thread's buffer? + // Is index == 0? + // (The index field is typed as size_t.) + + ldr(tmp1, index); // tmp1 := *index_adr + ldr(tmp2, buffer); + + subs(tmp1, tmp1, wordSize); // tmp1 := tmp1 - wordSize + b(runtime, lt); // If negative, goto runtime + + str(tmp1, index); // *index_adr := tmp1 + + // Record the previous value + str(pre_val, Address(tmp2, tmp1)); + b(done); + + bind(runtime); + + // save the live input values +#ifdef AARCH64 + if (store_addr != noreg) { + raw_push(store_addr, new_val); + } else { + raw_push(pre_val, ZR); + } +#else + if (store_addr != noreg) { + // avoid raw_push to support any ordering of store_addr and new_val + push(RegisterSet(store_addr) | RegisterSet(new_val)); + } else { + push(pre_val); + } +#endif // AARCH64 + + if (pre_val != R0) { + mov(R0, pre_val); + } + mov(R1, Rthread); + + call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), R0, R1); + +#ifdef AARCH64 + if (store_addr != noreg) { + raw_pop(store_addr, new_val); + } else { + raw_pop(pre_val, ZR); + } +#else + if (store_addr != noreg) { + pop(RegisterSet(store_addr) | RegisterSet(new_val)); + } else { + pop(pre_val); + } +#endif // AARCH64 + + bind(done); +} + +// G1 post-barrier. +// Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). +void MacroAssembler::g1_write_barrier_post(Register store_addr, + Register new_val, + Register tmp1, + Register tmp2, + Register tmp3) { + + Address queue_index(Rthread, in_bytes(JavaThread::dirty_card_queue_offset() + + DirtyCardQueue::byte_offset_of_index())); + Address buffer(Rthread, in_bytes(JavaThread::dirty_card_queue_offset() + + DirtyCardQueue::byte_offset_of_buf())); + + BarrierSet* bs = Universe::heap()->barrier_set(); + CardTableModRefBS* ct = (CardTableModRefBS*)bs; + Label done; + Label runtime; + + // Does store cross heap regions? + + eor(tmp1, store_addr, new_val); +#ifdef AARCH64 + logical_shift_right(tmp1, tmp1, HeapRegion::LogOfHRGrainBytes); + cbz(tmp1, done); +#else + movs(tmp1, AsmOperand(tmp1, lsr, HeapRegion::LogOfHRGrainBytes)); + b(done, eq); +#endif + + // crosses regions, storing NULL? + + cbz(new_val, done); + + // storing region crossing non-NULL, is card already dirty? + const Register card_addr = tmp1; + assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code"); + + mov_address(tmp2, (address)ct->byte_map_base, symbolic_Relocation::card_table_reference); + add(card_addr, tmp2, AsmOperand(store_addr, lsr, CardTableModRefBS::card_shift)); + + ldrb(tmp2, Address(card_addr)); + cmp(tmp2, (int)G1SATBCardTableModRefBS::g1_young_card_val()); + b(done, eq); + + membar(MacroAssembler::Membar_mask_bits(MacroAssembler::StoreLoad), tmp2); + + assert(CardTableModRefBS::dirty_card_val() == 0, "adjust this code"); + ldrb(tmp2, Address(card_addr)); + cbz(tmp2, done); + + // storing a region crossing, non-NULL oop, card is clean. + // dirty card and log. + + strb(zero_register(tmp2), Address(card_addr)); + + ldr(tmp2, queue_index); + ldr(tmp3, buffer); + + subs(tmp2, tmp2, wordSize); + b(runtime, lt); // go to runtime if now negative + + str(tmp2, queue_index); + + str(card_addr, Address(tmp3, tmp2)); + b(done); + + bind(runtime); + + if (card_addr != R0) { + mov(R0, card_addr); + } + mov(R1, Rthread); + call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post), R0, R1); + + bind(done); +} + +#endif // INCLUDE_ALL_GCS + +////////////////////////////////////////////////////////////////////////////////// + #ifdef AARCH64 void MacroAssembler::load_sized_value(Register dst, Address src, size_t size_in_bytes, bool is_signed) { diff --git a/hotspot/src/cpu/arm/vm/macroAssembler_arm.hpp b/hotspot/src/cpu/arm/vm/macroAssembler_arm.hpp index 770bba6c8a1..e6f73353cb9 100644 --- a/hotspot/src/cpu/arm/vm/macroAssembler_arm.hpp +++ b/hotspot/src/cpu/arm/vm/macroAssembler_arm.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -402,6 +402,29 @@ public: void biased_locking_enter_with_cas(Register obj_reg, Register old_mark_reg, Register new_mark_reg, Register tmp, Label& slow_case, int* counter_addr); + void resolve_jobject(Register value, Register tmp1, Register tmp2); + +#if INCLUDE_ALL_GCS + // G1 pre-barrier. + // Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). + // If store_addr != noreg, then previous value is loaded from [store_addr]; + // in such case store_addr and new_val registers are preserved; + // otherwise pre_val register is preserved. + void g1_write_barrier_pre(Register store_addr, + Register new_val, + Register pre_val, + Register tmp1, + Register tmp2); + + // G1 post-barrier. + // Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). + void g1_write_barrier_post(Register store_addr, + Register new_val, + Register tmp1, + Register tmp2, + Register tmp3); +#endif // INCLUDE_ALL_GCS + #ifndef AARCH64 void nop() { mov(R0, R0); diff --git a/hotspot/src/cpu/arm/vm/sharedRuntime_arm.cpp b/hotspot/src/cpu/arm/vm/sharedRuntime_arm.cpp index 9b37b4fe6dc..48f096473c3 100644 --- a/hotspot/src/cpu/arm/vm/sharedRuntime_arm.cpp +++ b/hotspot/src/cpu/arm/vm/sharedRuntime_arm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1732,14 +1732,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, case T_FLOAT : // fall through case T_DOUBLE : /* nothing to do */ break; case T_OBJECT : // fall through - case T_ARRAY : { - Label L; - __ cbz(R0, L); - __ ldr(R0, Address(R0)); - __ verify_oop(R0); - __ bind(L); - break; - } + case T_ARRAY : break; // See JNIHandles::resolve below default: ShouldNotReachHere(); } @@ -1748,14 +1741,15 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, if (CheckJNICalls) { __ str(__ zero_register(Rtemp), Address(Rthread, JavaThread::pending_jni_exception_check_fn_offset())); } - - // Unhandle the result - if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - __ cmp(R0, 0); - __ ldr(R0, Address(R0), ne); - } #endif // AARCH64 + // Unbox oop result, e.g. JNIHandles::resolve value in R0. + if (ret_type == T_OBJECT || ret_type == T_ARRAY) { + __ resolve_jobject(R0, // value + Rtemp, // tmp1 + R1_tmp); // tmp2 + } + // Any exception pending? __ ldr(Rtemp, Address(Rthread, Thread::pending_exception_offset())); __ mov(SP, FP); diff --git a/hotspot/src/cpu/arm/vm/templateInterpreterGenerator_arm.cpp b/hotspot/src/cpu/arm/vm/templateInterpreterGenerator_arm.cpp index 743510e09a7..7fda747ad48 100644 --- a/hotspot/src/cpu/arm/vm/templateInterpreterGenerator_arm.cpp +++ b/hotspot/src/cpu/arm/vm/templateInterpreterGenerator_arm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1240,28 +1240,25 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) { __ str(__ zero_register(Rtemp), Address(Rthread, JavaThread::pending_jni_exception_check_fn_offset())); } - // Unbox if the result is non-zero object -#ifdef AARCH64 + // Unbox oop result, e.g. JNIHandles::resolve result if it's an oop. { - Label L, Lnull; + Label Lnot_oop; +#ifdef AARCH64 __ mov_slow(Rtemp, AbstractInterpreter::result_handler(T_OBJECT)); __ cmp(Rresult_handler, Rtemp); - __ b(L, ne); - __ cbz(Rsaved_result, Lnull); - __ ldr(Rsaved_result, Address(Rsaved_result)); - __ bind(Lnull); - // Store oop on the stack for GC - __ str(Rsaved_result, Address(FP, frame::interpreter_frame_oop_temp_offset * wordSize)); - __ bind(L); + __ b(Lnot_oop, ne); +#else // !AARCH64 + // For ARM32, Rresult_handler is -1 for oop result, 0 otherwise. + __ cbz(Rresult_handler, Lnot_oop); +#endif // !AARCH64 + Register value = AARCH64_ONLY(Rsaved_result) NOT_AARCH64(Rsaved_result_lo); + __ resolve_jobject(value, // value + Rtemp, // tmp1 + R1_tmp); // tmp2 + // Store resolved result in frame for GC visibility. + __ str(value, Address(FP, frame::interpreter_frame_oop_temp_offset * wordSize)); + __ bind(Lnot_oop); } -#else - __ tst(Rsaved_result_lo, Rresult_handler); - __ ldr(Rsaved_result_lo, Address(Rsaved_result_lo), ne); - - // Store oop on the stack for GC - __ cmp(Rresult_handler, 0); - __ str(Rsaved_result_lo, Address(FP, frame::interpreter_frame_oop_temp_offset * wordSize), ne); -#endif // AARCH64 #ifdef AARCH64 // Restore SP (drop native parameters area), to keep SP in sync with extended_sp in frame diff --git a/hotspot/src/cpu/ppc/vm/frame_ppc.cpp b/hotspot/src/cpu/ppc/vm/frame_ppc.cpp index 131a931c2c1..b6a538681f6 100644 --- a/hotspot/src/cpu/ppc/vm/frame_ppc.cpp +++ b/hotspot/src/cpu/ppc/vm/frame_ppc.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2015 SAP SE. All rights reserved. + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -171,10 +171,7 @@ BasicType frame::interpreter_frame_result(oop* oop_result, jvalue* value_result) switch (method->result_type()) { case T_OBJECT: case T_ARRAY: { - oop* obj_p = *(oop**)lresult; - oop obj = (obj_p == NULL) ? (oop)NULL : *obj_p; - assert(obj == NULL || Universe::heap()->is_in(obj), "sanity check"); - *oop_result = obj; + *oop_result = JNIHandles::resolve(*(jobject*)lresult); break; } // We use std/stfd to store the values. diff --git a/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp b/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp index a5d5613a414..6eb27c78f17 100644 --- a/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp +++ b/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2016 SAP SE. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -3033,6 +3033,34 @@ void MacroAssembler::card_table_write(jbyte* byte_map_base, Register Rtmp, Regis stbx(R0, Rtmp, Robj); } +// Kills R31 if value is a volatile register. +void MacroAssembler::resolve_jobject(Register value, Register tmp1, Register tmp2, bool needs_frame) { + Label done; + cmpdi(CCR0, value, 0); + beq(CCR0, done); // Use NULL as-is. + + clrrdi(tmp1, value, JNIHandles::weak_tag_size); +#if INCLUDE_ALL_GCS + if (UseG1GC) { andi_(tmp2, value, JNIHandles::weak_tag_mask); } +#endif + ld(value, 0, tmp1); // Resolve (untagged) jobject. + +#if INCLUDE_ALL_GCS + if (UseG1GC) { + Label not_weak; + beq(CCR0, not_weak); // Test for jweak tag. + verify_oop(value); + g1_write_barrier_pre(noreg, // obj + noreg, // offset + value, // pre_val + tmp1, tmp2, needs_frame); + bind(not_weak); + } +#endif // INCLUDE_ALL_GCS + verify_oop(value); + bind(done); +} + #if INCLUDE_ALL_GCS // General G1 pre-barrier generator. // Goal: record the previous value if it is not null. @@ -3094,7 +3122,7 @@ void MacroAssembler::g1_write_barrier_pre(Register Robj, RegisterOrConstant offs bind(runtime); - // VM call need frame to access(write) O register. + // May need to preserve LR. Also needed if current frame is not compatible with C calling convention. if (needs_frame) { save_LR_CR(Rtmp1); push_frame_reg_args(0, Rtmp2); diff --git a/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.hpp b/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.hpp index 11b966a82c9..0b1b2a0befa 100644 --- a/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.hpp +++ b/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.hpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2016 SAP SE. All rights reserved. + * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -649,6 +649,8 @@ class MacroAssembler: public Assembler { void card_write_barrier_post(Register Rstore_addr, Register Rnew_val, Register Rtmp); void card_table_write(jbyte* byte_map_base, Register Rtmp, Register Robj); + void resolve_jobject(Register value, Register tmp1, Register tmp2, bool needs_frame); + #if INCLUDE_ALL_GCS // General G1 pre-barrier generator. void g1_write_barrier_pre(Register Robj, RegisterOrConstant offset, Register Rpre_val, diff --git a/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp b/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp index 784595f11be..dc36aa77da2 100644 --- a/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp +++ b/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2016 SAP SE. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2477,16 +2477,11 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm, __ reset_last_Java_frame(); - // Unpack oop result. + // Unbox oop result, e.g. JNIHandles::resolve value. // -------------------------------------------------------------------------- if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - Label skip_unboxing; - __ cmpdi(CCR0, R3_RET, 0); - __ beq(CCR0, skip_unboxing); - __ ld(R3_RET, 0, R3_RET); - __ bind(skip_unboxing); - __ verify_oop(R3_RET); + __ resolve_jobject(R3_RET, r_temp_1, r_temp_2, /* needs_frame */ false); // kills R31 } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/ppc/vm/templateInterpreterGenerator_ppc.cpp b/hotspot/src/cpu/ppc/vm/templateInterpreterGenerator_ppc.cpp index 56810938a53..ab87c204018 100644 --- a/hotspot/src/cpu/ppc/vm/templateInterpreterGenerator_ppc.cpp +++ b/hotspot/src/cpu/ppc/vm/templateInterpreterGenerator_ppc.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2015, 2016 SAP SE. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -401,11 +401,8 @@ address TemplateInterpreterGenerator::generate_result_handler_for(BasicType type case T_LONG: break; case T_OBJECT: - // unbox result if not null - __ cmpdi(CCR0, R3_RET, 0); - __ beq(CCR0, done); - __ ld(R3_RET, 0, R3_RET); - __ verify_oop(R3_RET); + // JNIHandles::resolve result. + __ resolve_jobject(R3_RET, R11_scratch1, R12_scratch2, /* needs_frame */ true); // kills R31 break; case T_FLOAT: break; diff --git a/hotspot/src/cpu/s390/vm/macroAssembler_s390.cpp b/hotspot/src/cpu/s390/vm/macroAssembler_s390.cpp index 0f78e5a6250..d5776117436 100644 --- a/hotspot/src/cpu/s390/vm/macroAssembler_s390.cpp +++ b/hotspot/src/cpu/s390/vm/macroAssembler_s390.cpp @@ -3439,6 +3439,34 @@ void MacroAssembler::card_write_barrier_post(Register store_addr, Register tmp) z_mvi(0, store_addr, 0); // Store byte 0. } +void MacroAssembler::resolve_jobject(Register value, Register tmp1, Register tmp2) { + NearLabel Ldone; + z_ltgr(tmp1, value); + z_bre(Ldone); // Use NULL result as-is. + + z_nill(value, ~JNIHandles::weak_tag_mask); + z_lg(value, 0, value); // Resolve (untagged) jobject. + +#if INCLUDE_ALL_GCS + if (UseG1GC) { + NearLabel Lnot_weak; + z_tmll(tmp1, JNIHandles::weak_tag_mask); // Test for jweak tag. + z_braz(Lnot_weak); + verify_oop(value); + g1_write_barrier_pre(noreg /* obj */, + noreg /* offset */, + value /* pre_val */, + noreg /* val */, + tmp1 /* tmp1 */, + tmp2 /* tmp2 */, + true /* pre_val_needed */); + bind(Lnot_weak); + } +#endif // INCLUDE_ALL_GCS + verify_oop(value); + bind(Ldone); +} + #if INCLUDE_ALL_GCS //------------------------------------------------------ diff --git a/hotspot/src/cpu/s390/vm/macroAssembler_s390.hpp b/hotspot/src/cpu/s390/vm/macroAssembler_s390.hpp index 588bde6207e..2b4002a3bf4 100644 --- a/hotspot/src/cpu/s390/vm/macroAssembler_s390.hpp +++ b/hotspot/src/cpu/s390/vm/macroAssembler_s390.hpp @@ -726,6 +726,8 @@ class MacroAssembler: public Assembler { // Write to card table for modification at store_addr - register is destroyed afterwards. void card_write_barrier_post(Register store_addr, Register tmp); + void resolve_jobject(Register value, Register tmp1, Register tmp2); + #if INCLUDE_ALL_GCS // General G1 pre-barrier generator. // Purpose: record the previous value if it is not null. diff --git a/hotspot/src/cpu/s390/vm/sharedRuntime_s390.cpp b/hotspot/src/cpu/s390/vm/sharedRuntime_s390.cpp index ea498e3399c..89c3ae4032a 100644 --- a/hotspot/src/cpu/s390/vm/sharedRuntime_s390.cpp +++ b/hotspot/src/cpu/s390/vm/sharedRuntime_s390.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2016 SAP SE. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2272,13 +2272,9 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm, __ reset_last_Java_frame(); - // Unpack oop result + // Unpack oop result, e.g. JNIHandles::resolve result. if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - NearLabel L; - __ compare64_and_branch(Z_RET, (RegisterOrConstant)0L, Assembler::bcondEqual, L); - __ z_lg(Z_RET, 0, Z_RET); - __ bind(L); - __ verify_oop(Z_RET); + __ resolve_jobject(Z_RET, /* tmp1 */ Z_R13, /* tmp2 */ Z_R7); } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/s390/vm/templateInterpreterGenerator_s390.cpp b/hotspot/src/cpu/s390/vm/templateInterpreterGenerator_s390.cpp index 2084f36006f..20a9a3e9571 100644 --- a/hotspot/src/cpu/s390/vm/templateInterpreterGenerator_s390.cpp +++ b/hotspot/src/cpu/s390/vm/templateInterpreterGenerator_s390.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2016 SAP SE. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1695,14 +1695,11 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) { // from the jni handle to z_ijava_state.oop_temp. This is // necessary, because we reset the jni handle block below. // NOTE: frame::interpreter_frame_result() depends on this, too. - { NearLabel no_oop_result, store_oop_result; + { NearLabel no_oop_result; __ load_absolute_address(Z_R1, AbstractInterpreter::result_handler(T_OBJECT)); __ compareU64_and_branch(Z_R1, Rresult_handler, Assembler::bcondNotEqual, no_oop_result); - __ compareU64_and_branch(Rlresult, (intptr_t)0L, Assembler::bcondEqual, store_oop_result); - __ z_lg(Rlresult, 0, Rlresult); // unbox - __ bind(store_oop_result); + __ resolve_jobject(Rlresult, /* tmp1 */ Rmethod, /* tmp2 */ Z_R1); __ z_stg(Rlresult, oop_tmp_offset, Z_fp); - __ verify_oop(Rlresult); __ bind(no_oop_result); } diff --git a/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp b/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp index 7b4dcf193d3..613e662d65c 100644 --- a/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2754,15 +2754,30 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, __ verify_thread(); // G2_thread must be correct __ reset_last_Java_frame(); - // Unpack oop result + // Unbox oop result, e.g. JNIHandles::resolve value in I0. if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - Label L; - __ addcc(G0, I0, G0); - __ brx(Assembler::notZero, true, Assembler::pt, L); - __ delayed()->ld_ptr(I0, 0, I0); - __ mov(G0, I0); - __ bind(L); - __ verify_oop(I0); + Label done, not_weak; + __ br_null(I0, false, Assembler::pn, done); // Use NULL as-is. + __ delayed()->andcc(I0, JNIHandles::weak_tag_mask, G0); // Test for jweak + __ brx(Assembler::zero, true, Assembler::pt, not_weak); + __ delayed()->ld_ptr(I0, 0, I0); // Maybe resolve (untagged) jobject. + // Resolve jweak. + __ ld_ptr(I0, -JNIHandles::weak_tag_value, I0); +#if INCLUDE_ALL_GCS + if (UseG1GC) { + // Copy to O0 because macro doesn't allow pre_val in input reg. + __ mov(I0, O0); + __ g1_write_barrier_pre(noreg /* obj */, + noreg /* index */, + 0 /* offset */, + O0 /* pre_val */, + G3_scratch /* tmp */, + true /* preserve_o_regs */); + } +#endif // INCLUDE_ALL_GCS + __ bind(not_weak); + __ verify_oop(I0); + __ bind(done); } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/sparc/vm/templateInterpreterGenerator_sparc.cpp b/hotspot/src/cpu/sparc/vm/templateInterpreterGenerator_sparc.cpp index b677a1dd662..fd4e3ffd149 100644 --- a/hotspot/src/cpu/sparc/vm/templateInterpreterGenerator_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/templateInterpreterGenerator_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1516,11 +1516,23 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) { __ set((intptr_t)AbstractInterpreter::result_handler(T_OBJECT), G3_scratch); __ cmp_and_brx_short(G3_scratch, Lscratch, Assembler::notEqual, Assembler::pt, no_oop); - __ addcc(G0, O0, O0); - __ brx(Assembler::notZero, true, Assembler::pt, store_result); // if result is not NULL: - __ delayed()->ld_ptr(O0, 0, O0); // unbox it - __ mov(G0, O0); - + // Unbox oop result, e.g. JNIHandles::resolve value in O0. + __ br_null(O0, false, Assembler::pn, store_result); // Use NULL as-is. + __ delayed()->andcc(O0, JNIHandles::weak_tag_mask, G0); // Test for jweak + __ brx(Assembler::zero, true, Assembler::pt, store_result); + __ delayed()->ld_ptr(O0, 0, O0); // Maybe resolve (untagged) jobject. + // Resolve jweak. + __ ld_ptr(O0, -JNIHandles::weak_tag_value, O0); +#if INCLUDE_ALL_GCS + if (UseG1GC) { + __ g1_write_barrier_pre(noreg /* obj */, + noreg /* index */, + 0 /* offset */, + O0 /* pre_val */, + G3_scratch /* tmp */, + true /* preserve_o_regs */); + } +#endif // INCLUDE_ALL_GCS __ bind(store_result); // Store it where gc will look for it and result handler expects it. __ st_ptr(O0, FP, (frame::interpreter_frame_oop_temp_offset*wordSize) + STACK_BIAS); diff --git a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp index b6d32631582..9e2480f0116 100644 --- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp +++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -5129,6 +5129,36 @@ void MacroAssembler::vxorps(XMMRegister dst, XMMRegister nds, AddressLiteral src } +void MacroAssembler::resolve_jobject(Register value, + Register thread, + Register tmp) { + assert_different_registers(value, thread, tmp); + Label done, not_weak; + testptr(value, value); + jcc(Assembler::zero, done); // Use NULL as-is. + testptr(value, JNIHandles::weak_tag_mask); // Test for jweak tag. + jcc(Assembler::zero, not_weak); + // Resolve jweak. + movptr(value, Address(value, -JNIHandles::weak_tag_value)); + verify_oop(value); +#if INCLUDE_ALL_GCS + if (UseG1GC) { + g1_write_barrier_pre(noreg /* obj */, + value /* pre_val */, + thread /* thread */, + tmp /* tmp */, + true /* tosca_live */, + true /* expand_call */); + } +#endif // INCLUDE_ALL_GCS + jmp(done); + bind(not_weak); + // Resolve (untagged) jobject. + movptr(value, Address(value, 0)); + verify_oop(value); + bind(done); +} + ////////////////////////////////////////////////////////////////////////////////// #if INCLUDE_ALL_GCS diff --git a/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp b/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp index a3e81e58dc5..c76d5104ae2 100644 --- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp +++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -297,6 +297,8 @@ class MacroAssembler: public Assembler { void store_check(Register obj); // store check for obj - register is destroyed afterwards void store_check(Register obj, Address dst); // same as above, dst is exact store location (reg. is destroyed) + void resolve_jobject(Register value, Register thread, Register tmp); + #if INCLUDE_ALL_GCS void g1_write_barrier_pre(Register obj, diff --git a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp index ed317550e08..47b9fe5c627 100644 --- a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp +++ b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2226,14 +2226,11 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, __ reset_last_Java_frame(thread, false); - // Unpack oop result + // Unbox oop result, e.g. JNIHandles::resolve value. if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - Label L; - __ cmpptr(rax, (int32_t)NULL_WORD); - __ jcc(Assembler::equal, L); - __ movptr(rax, Address(rax, 0)); - __ bind(L); - __ verify_oop(rax); + __ resolve_jobject(rax /* value */, + thread /* thread */, + rcx /* tmp */); } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp index 4587b8caba6..d81e965d05d 100644 --- a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp +++ b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2579,14 +2579,11 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, __ reset_last_Java_frame(false); - // Unpack oop result + // Unbox oop result, e.g. JNIHandles::resolve value. if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - Label L; - __ testptr(rax, rax); - __ jcc(Assembler::zero, L); - __ movptr(rax, Address(rax, 0)); - __ bind(L); - __ verify_oop(rax); + __ resolve_jobject(rax /* value */, + r15_thread /* thread */, + rcx /* tmp */); } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp b/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp index eb5661bee00..9c02d44cdb8 100644 --- a/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp +++ b/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1193,16 +1193,16 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) { // and result handler will pick it up { - Label no_oop, store_result; + Label no_oop, not_weak, store_result; __ lea(t, ExternalAddress(AbstractInterpreter::result_handler(T_OBJECT))); __ cmpptr(t, Address(rbp, frame::interpreter_frame_result_handler_offset*wordSize)); __ jcc(Assembler::notEqual, no_oop); // retrieve result __ pop(ltos); - __ testptr(rax, rax); - __ jcc(Assembler::zero, store_result); - __ movptr(rax, Address(rax, 0)); - __ bind(store_result); + // Unbox oop result, e.g. JNIHandles::resolve value. + __ resolve_jobject(rax /* value */, + thread /* thread */, + t /* tmp */); __ movptr(Address(rbp, frame::interpreter_frame_oop_temp_offset*wordSize), rax); // keep stack depth as expected by pushing oop which will eventually be discarded __ push(ltos); diff --git a/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp b/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp index 1fcf7d9984b..f7c51092c82 100644 --- a/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp +++ b/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -406,10 +406,12 @@ int CppInterpreter::native_entry(Method* method, intptr_t UNUSED, TRAPS) { // oop_temp where the garbage collector can see it before // we release the handle it might be protected by. if (handler->result_type() == &ffi_type_pointer) { - if (result[0]) - istate->set_oop_temp(*(oop *) result[0]); - else + if (result[0] == 0) { istate->set_oop_temp(NULL); + } else { + jobject handle = reinterpret_cast(result[0]); + istate->set_oop_temp(JNIHandles::resolve(handle)); + } } // Reset handle block diff --git a/hotspot/src/share/vm/prims/jni.cpp b/hotspot/src/share/vm/prims/jni.cpp index f519e5e2788..acda443267a 100644 --- a/hotspot/src/share/vm/prims/jni.cpp +++ b/hotspot/src/share/vm/prims/jni.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -935,8 +935,7 @@ class JNI_ArgumentPusherVaArg : public JNI_ArgumentPusher { inline void get_long() { _arguments->push_long(va_arg(_ap, jlong)); } inline void get_float() { _arguments->push_float((jfloat)va_arg(_ap, jdouble)); } // float is coerced to double w/ va_arg inline void get_double() { _arguments->push_double(va_arg(_ap, jdouble)); } - inline void get_object() { jobject l = va_arg(_ap, jobject); - _arguments->push_oop(Handle((oop *)l, false)); } + inline void get_object() { _arguments->push_jobject(va_arg(_ap, jobject)); } inline void set_ap(va_list rap) { va_copy(_ap, rap); @@ -1025,7 +1024,7 @@ class JNI_ArgumentPusherArray : public JNI_ArgumentPusher { inline void get_long() { _arguments->push_long((_ap++)->j); } inline void get_float() { _arguments->push_float((_ap++)->f); } inline void get_double() { _arguments->push_double((_ap++)->d);} - inline void get_object() { _arguments->push_oop(Handle((oop *)(_ap++)->l, false)); } + inline void get_object() { _arguments->push_jobject((_ap++)->l); } inline void set_ap(const jvalue *rap) { _ap = rap; } diff --git a/hotspot/src/share/vm/prims/jvmtiEnv.cpp b/hotspot/src/share/vm/prims/jvmtiEnv.cpp index f9dc315a552..57292a2c8bc 100644 --- a/hotspot/src/share/vm/prims/jvmtiEnv.cpp +++ b/hotspot/src/share/vm/prims/jvmtiEnv.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1796,6 +1796,13 @@ JvmtiEnv::FollowReferences(jint heap_filter, jclass klass, jobject initial_objec } } + if (initial_object != NULL) { + oop init_obj = JNIHandles::resolve_external_guard(initial_object); + if (init_obj == NULL) { + return JVMTI_ERROR_INVALID_OBJECT; + } + } + Thread *thread = Thread::current(); HandleMark hm(thread); KlassHandle kh (thread, k_oop); diff --git a/hotspot/src/share/vm/runtime/javaCalls.cpp b/hotspot/src/share/vm/runtime/javaCalls.cpp index 5874699a1fc..d91a32a9f08 100644 --- a/hotspot/src/share/vm/runtime/javaCalls.cpp +++ b/hotspot/src/share/vm/runtime/javaCalls.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -328,9 +328,9 @@ void JavaCalls::call_helper(JavaValue* result, const methodHandle& method, JavaC // Verify the arguments if (CheckJNICalls) { - args->verify(method, result->get_type(), thread); + args->verify(method, result->get_type()); } - else debug_only(args->verify(method, result->get_type(), thread)); + else debug_only(args->verify(method, result->get_type())); #if INCLUDE_JVMCI } #else @@ -442,12 +442,43 @@ void JavaCalls::call_helper(JavaValue* result, const methodHandle& method, JavaC //-------------------------------------------------------------------------------------- // Implementation of JavaCallArguments +inline bool is_value_state_indirect_oop(uint state) { + assert(state != JavaCallArguments::value_state_oop, + "Checking for handles after removal"); + assert(state < JavaCallArguments::value_state_limit, + "Invalid value state %u", state); + return state != JavaCallArguments::value_state_primitive; +} + +inline oop resolve_indirect_oop(intptr_t value, uint state) { + switch (state) { + case JavaCallArguments::value_state_handle: + { + oop* ptr = reinterpret_cast(value); + return Handle::raw_resolve(ptr); + } + + case JavaCallArguments::value_state_jobject: + { + jobject obj = reinterpret_cast(value); + return JNIHandles::resolve(obj); + } + + default: + ShouldNotReachHere(); + return NULL; + } +} + intptr_t* JavaCallArguments::parameters() { // First convert all handles to oops for(int i = 0; i < _size; i++) { - if (_is_oop[i]) { - // Handle conversion - _value[i] = cast_from_oop(Handle::raw_resolve((oop *)_value[i])); + uint state = _value_state[i]; + assert(state != value_state_oop, "Multiple handle conversions"); + if (is_value_state_indirect_oop(state)) { + oop obj = resolve_indirect_oop(_value[i], state); + _value[i] = cast_from_oop(obj); + _value_state[i] = value_state_oop; } } // Return argument vector @@ -457,30 +488,42 @@ intptr_t* JavaCallArguments::parameters() { class SignatureChekker : public SignatureIterator { private: - bool *_is_oop; - int _pos; + int _pos; BasicType _return_type; - intptr_t* _value; - Thread* _thread; + u_char* _value_state; + intptr_t* _value; public: bool _is_return; - SignatureChekker(Symbol* signature, BasicType return_type, bool is_static, bool* is_oop, intptr_t* value, Thread* thread) : SignatureIterator(signature) { - _is_oop = is_oop; - _is_return = false; - _return_type = return_type; - _pos = 0; - _value = value; - _thread = thread; - + SignatureChekker(Symbol* signature, + BasicType return_type, + bool is_static, + u_char* value_state, + intptr_t* value) : + SignatureIterator(signature), + _pos(0), + _return_type(return_type), + _value_state(value_state), + _value(value), + _is_return(false) + { if (!is_static) { check_value(true); // Receiver must be an oop } } void check_value(bool type) { - guarantee(_is_oop[_pos++] == type, "signature does not match pushed arguments"); + uint state = _value_state[_pos++]; + if (type) { + guarantee(is_value_state_indirect_oop(state), + "signature does not match pushed arguments: %u at %d", + state, _pos - 1); + } else { + guarantee(state == JavaCallArguments::value_state_primitive, + "signature does not match pushed arguments: %u at %d", + state, _pos - 1); + } } void check_doing_return(bool state) { _is_return = state; } @@ -515,24 +558,20 @@ class SignatureChekker : public SignatureIterator { return; } - // verify handle and the oop pointed to by handle - int p = _pos; - bool bad = false; - // If argument is oop - if (_is_oop[p]) { - intptr_t v = _value[p]; - if (v != 0 ) { - size_t t = (size_t)v; - bad = (t < (size_t)os::vm_page_size() ) || !Handle::raw_resolve((oop *)v)->is_oop_or_null(true); - if (CheckJNICalls && bad) { - ReportJNIFatalError((JavaThread*)_thread, "Bad JNI oop argument"); - } - } - // for the regular debug case. - assert(!bad, "Bad JNI oop argument"); + intptr_t v = _value[_pos]; + if (v != 0) { + // v is a "handle" referring to an oop, cast to integral type. + // There shouldn't be any handles in very low memory. + guarantee((size_t)v >= (size_t)os::vm_page_size(), + "Bad JNI oop argument %d: " PTR_FORMAT, _pos, v); + // Verify the pointee. + oop vv = resolve_indirect_oop(v, _value_state[_pos]); + guarantee(vv->is_oop_or_null(true), + "Bad JNI oop argument %d: " PTR_FORMAT " -> " PTR_FORMAT, + _pos, v, p2i(vv)); } - check_value(true); + check_value(true); // Verify value state. } void do_bool() { check_int(T_BOOLEAN); } @@ -549,8 +588,7 @@ class SignatureChekker : public SignatureIterator { }; -void JavaCallArguments::verify(const methodHandle& method, BasicType return_type, - Thread *thread) { +void JavaCallArguments::verify(const methodHandle& method, BasicType return_type) { guarantee(method->size_of_parameters() == size_of_parameters(), "wrong no. of arguments pushed"); // Treat T_OBJECT and T_ARRAY as the same @@ -559,7 +597,11 @@ void JavaCallArguments::verify(const methodHandle& method, BasicType return_type // Check that oop information is correct Symbol* signature = method->signature(); - SignatureChekker sc(signature, return_type, method->is_static(),_is_oop, _value, thread); + SignatureChekker sc(signature, + return_type, + method->is_static(), + _value_state, + _value); sc.iterate_parameters(); sc.check_doing_return(true); sc.iterate_returntype(); diff --git a/hotspot/src/share/vm/runtime/javaCalls.hpp b/hotspot/src/share/vm/runtime/javaCalls.hpp index efe1f8b9813..e77abf7d36b 100644 --- a/hotspot/src/share/vm/runtime/javaCalls.hpp +++ b/hotspot/src/share/vm/runtime/javaCalls.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -80,11 +80,11 @@ class JavaCallArguments : public StackObj { _default_size = 8 // Must be at least # of arguments in JavaCalls methods }; - intptr_t _value_buffer [_default_size + 1]; - bool _is_oop_buffer[_default_size + 1]; + intptr_t _value_buffer [_default_size + 1]; + u_char _value_state_buffer[_default_size + 1]; intptr_t* _value; - bool* _is_oop; + u_char* _value_state; int _size; int _max_size; bool _start_at_zero; // Support late setting of receiver @@ -92,8 +92,8 @@ class JavaCallArguments : public StackObj { void initialize() { // Starts at first element to support set_receiver. - _value = &_value_buffer[1]; - _is_oop = &_is_oop_buffer[1]; + _value = &_value_buffer[1]; + _value_state = &_value_state_buffer[1]; _max_size = _default_size; _size = 0; @@ -101,6 +101,23 @@ class JavaCallArguments : public StackObj { JVMCI_ONLY(_alternative_target = NULL;) } + // Helper for push_oop and the like. The value argument is a + // "handle" that refers to an oop. We record the address of the + // handle rather than the designated oop. The handle is later + // resolved to the oop by parameters(). This delays the exposure of + // naked oops until it is GC-safe. + template + inline int push_oop_impl(T handle, int size) { + // JNITypes::put_obj expects an oop value, so we play fast and + // loose with the type system. The cast from handle type to oop + // *must* use a C-style cast. In a product build it performs a + // reinterpret_cast. In a debug build (more accurately, in a + // CHECK_UNHANDLED_OOPS build) it performs a static_cast, invoking + // the debug-only oop class's conversion from void* constructor. + JNITypes::put_obj((oop)handle, _value, size); // Updates size. + return size; // Return the updated size. + } + public: JavaCallArguments() { initialize(); } @@ -111,11 +128,12 @@ class JavaCallArguments : public StackObj { JavaCallArguments(int max_size) { if (max_size > _default_size) { - _value = NEW_RESOURCE_ARRAY(intptr_t, max_size + 1); - _is_oop = NEW_RESOURCE_ARRAY(bool, max_size + 1); + _value = NEW_RESOURCE_ARRAY(intptr_t, max_size + 1); + _value_state = NEW_RESOURCE_ARRAY(u_char, max_size + 1); - // Reserve room for potential receiver in value and is_oop - _value++; _is_oop++; + // Reserve room for potential receiver in value and state + _value++; + _value_state++; _max_size = max_size; _size = 0; @@ -136,25 +154,52 @@ class JavaCallArguments : public StackObj { } #endif - inline void push_oop(Handle h) { _is_oop[_size] = true; - JNITypes::put_obj((oop)h.raw_value(), _value, _size); } + // The possible values for _value_state elements. + enum { + value_state_primitive, + value_state_oop, + value_state_handle, + value_state_jobject, + value_state_limit + }; - inline void push_int(int i) { _is_oop[_size] = false; - JNITypes::put_int(i, _value, _size); } + inline void push_oop(Handle h) { + _value_state[_size] = value_state_handle; + _size = push_oop_impl(h.raw_value(), _size); + } - inline void push_double(double d) { _is_oop[_size] = false; _is_oop[_size + 1] = false; - JNITypes::put_double(d, _value, _size); } + inline void push_jobject(jobject h) { + _value_state[_size] = value_state_jobject; + _size = push_oop_impl(h, _size); + } - inline void push_long(jlong l) { _is_oop[_size] = false; _is_oop[_size + 1] = false; - JNITypes::put_long(l, _value, _size); } + inline void push_int(int i) { + _value_state[_size] = value_state_primitive; + JNITypes::put_int(i, _value, _size); + } - inline void push_float(float f) { _is_oop[_size] = false; - JNITypes::put_float(f, _value, _size); } + inline void push_double(double d) { + _value_state[_size] = value_state_primitive; + _value_state[_size + 1] = value_state_primitive; + JNITypes::put_double(d, _value, _size); + } + + inline void push_long(jlong l) { + _value_state[_size] = value_state_primitive; + _value_state[_size + 1] = value_state_primitive; + JNITypes::put_long(l, _value, _size); + } + + inline void push_float(float f) { + _value_state[_size] = value_state_primitive; + JNITypes::put_float(f, _value, _size); + } // receiver Handle receiver() { assert(_size > 0, "must at least be one argument"); - assert(_is_oop[0], "first argument must be an oop"); + assert(_value_state[0] == value_state_handle, + "first argument must be an oop"); assert(_value[0] != 0, "receiver must be not-null"); return Handle((oop*)_value[0], false); } @@ -162,11 +207,11 @@ class JavaCallArguments : public StackObj { void set_receiver(Handle h) { assert(_start_at_zero == false, "can only be called once"); _start_at_zero = true; - _is_oop--; + _value_state--; _value--; _size++; - _is_oop[0] = true; - _value[0] = (intptr_t)h.raw_value(); + _value_state[0] = value_state_handle; + push_oop_impl(h.raw_value(), 0); } // Converts all Handles to oops, and returns a reference to parameter vector @@ -174,7 +219,7 @@ class JavaCallArguments : public StackObj { int size_of_parameters() const { return _size; } // Verify that pushed arguments fits a given method - void verify(const methodHandle& method, BasicType return_type, Thread *thread); + void verify(const methodHandle& method, BasicType return_type); }; // All calls to Java have to go via JavaCalls. Sets up the stack frame diff --git a/hotspot/src/share/vm/runtime/jniHandles.cpp b/hotspot/src/share/vm/runtime/jniHandles.cpp index 679ade0eaca..f4aae3c20bf 100644 --- a/hotspot/src/share/vm/runtime/jniHandles.cpp +++ b/hotspot/src/share/vm/runtime/jniHandles.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,9 @@ #include "runtime/jniHandles.hpp" #include "runtime/mutexLocker.hpp" #include "runtime/thread.inline.hpp" +#if INCLUDE_ALL_GCS +#include "gc/g1/g1SATBCardTableModRefBS.hpp" +#endif JNIHandleBlock* JNIHandles::_global_handles = NULL; JNIHandleBlock* JNIHandles::_weak_global_handles = NULL; @@ -92,28 +95,48 @@ jobject JNIHandles::make_weak_global(Handle obj) { jobject res = NULL; if (!obj.is_null()) { // ignore null handles - MutexLocker ml(JNIGlobalHandle_lock); - assert(Universe::heap()->is_in_reserved(obj()), "sanity check"); - res = _weak_global_handles->allocate_handle(obj()); + { + MutexLocker ml(JNIGlobalHandle_lock); + assert(Universe::heap()->is_in_reserved(obj()), "sanity check"); + res = _weak_global_handles->allocate_handle(obj()); + } + // Add weak tag. + assert(is_ptr_aligned(res, weak_tag_alignment), "invariant"); + char* tptr = reinterpret_cast(res) + weak_tag_value; + res = reinterpret_cast(tptr); } else { CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops()); } return res; } +template +oop JNIHandles::resolve_jweak(jweak handle) { + assert(is_jweak(handle), "precondition"); + oop result = jweak_ref(handle); + result = guard_value(result); +#if INCLUDE_ALL_GCS + if (result != NULL && UseG1GC) { + G1SATBCardTableModRefBS::enqueue(result); + } +#endif // INCLUDE_ALL_GCS + return result; +} + +template oop JNIHandles::resolve_jweak(jweak); +template oop JNIHandles::resolve_jweak(jweak); void JNIHandles::destroy_global(jobject handle) { if (handle != NULL) { assert(is_global_handle(handle), "Invalid delete of global JNI handle"); - *((oop*)handle) = deleted_handle(); // Mark the handle as deleted, allocate will reuse it + jobject_ref(handle) = deleted_handle(); } } void JNIHandles::destroy_weak_global(jobject handle) { if (handle != NULL) { - assert(!CheckJNICalls || is_weak_global_handle(handle), "Invalid delete of weak global JNI handle"); - *((oop*)handle) = deleted_handle(); // Mark the handle as deleted, allocate will reuse it + jweak_ref(handle) = deleted_handle(); } } diff --git a/hotspot/src/share/vm/runtime/jniHandles.hpp b/hotspot/src/share/vm/runtime/jniHandles.hpp index ce37d940d7c..13e0e155740 100644 --- a/hotspot/src/share/vm/runtime/jniHandles.hpp +++ b/hotspot/src/share/vm/runtime/jniHandles.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,7 +40,28 @@ class JNIHandles : AllStatic { static JNIHandleBlock* _weak_global_handles; // First weak global handle block static oop _deleted_handle; // Sentinel marking deleted handles + inline static bool is_jweak(jobject handle); + inline static oop& jobject_ref(jobject handle); // NOT jweak! + inline static oop& jweak_ref(jobject handle); + + template inline static oop guard_value(oop value); + template inline static oop resolve_impl(jobject handle); + template static oop resolve_jweak(jweak handle); + public: + // Low tag bit in jobject used to distinguish a jweak. jweak is + // type equivalent to jobject, but there are places where we need to + // be able to distinguish jweak values from other jobjects, and + // is_weak_global_handle is unsuitable for performance reasons. To + // provide such a test we add weak_tag_value to the (aligned) byte + // address designated by the jobject to produce the corresponding + // jweak. Accessing the value of a jobject must account for it + // being a possibly offset jweak. + static const uintptr_t weak_tag_size = 1; + static const uintptr_t weak_tag_alignment = (1u << weak_tag_size); + static const uintptr_t weak_tag_mask = weak_tag_alignment - 1; + static const int weak_tag_value = 1; + // Resolve handle into oop inline static oop resolve(jobject handle); // Resolve externally provided handle into oop with some guards @@ -176,36 +197,85 @@ class JNIHandleBlock : public CHeapObj { #endif }; +inline bool JNIHandles::is_jweak(jobject handle) { + STATIC_ASSERT(weak_tag_size == 1); + STATIC_ASSERT(weak_tag_value == 1); + return (reinterpret_cast(handle) & weak_tag_mask) != 0; +} + +inline oop& JNIHandles::jobject_ref(jobject handle) { + assert(!is_jweak(handle), "precondition"); + return *reinterpret_cast(handle); +} + +inline oop& JNIHandles::jweak_ref(jobject handle) { + assert(is_jweak(handle), "precondition"); + char* ptr = reinterpret_cast(handle) - weak_tag_value; + return *reinterpret_cast(ptr); +} + +// external_guard is true if called from resolve_external_guard. +// Treat deleted (and possibly zapped) as NULL for external_guard, +// else as (asserted) error. +template +inline oop JNIHandles::guard_value(oop value) { + if (!external_guard) { + assert(value != badJNIHandle, "Pointing to zapped jni handle area"); + assert(value != deleted_handle(), "Used a deleted global handle"); + } else if ((value == badJNIHandle) || (value == deleted_handle())) { + value = NULL; + } + return value; +} + +// external_guard is true if called from resolve_external_guard. +template +inline oop JNIHandles::resolve_impl(jobject handle) { + assert(handle != NULL, "precondition"); + oop result; + if (is_jweak(handle)) { // Unlikely + result = resolve_jweak(handle); + } else { + result = jobject_ref(handle); + // Construction of jobjects canonicalize a null value into a null + // jobject, so for non-jweak the pointee should never be null. + assert(external_guard || result != NULL, + "Invalid value read from jni handle"); + result = guard_value(result); + } + return result; +} inline oop JNIHandles::resolve(jobject handle) { - oop result = (handle == NULL ? (oop)NULL : *(oop*)handle); - assert(result != NULL || (handle == NULL || !CheckJNICalls || is_weak_global_handle(handle)), "Invalid value read from jni handle"); - assert(result != badJNIHandle, "Pointing to zapped jni handle area"); + oop result = NULL; + if (handle != NULL) { + result = resolve_impl(handle); + } return result; -}; - +} +// Resolve some erroneous cases to NULL, rather than treating them as +// possibly unchecked errors. In particular, deleted handles are +// treated as NULL (though a deleted and later reallocated handle +// isn't detected). inline oop JNIHandles::resolve_external_guard(jobject handle) { - if (handle == NULL) return NULL; - oop result = *(oop*)handle; - if (result == NULL || result == badJNIHandle) return NULL; + oop result = NULL; + if (handle != NULL) { + result = resolve_impl(handle); + } return result; -}; - +} inline oop JNIHandles::resolve_non_null(jobject handle) { assert(handle != NULL, "JNI handle should not be null"); - oop result = *(oop*)handle; - assert(result != NULL, "Invalid value read from jni handle"); - assert(result != badJNIHandle, "Pointing to zapped jni handle area"); - // Don't let that private _deleted_handle object escape into the wild. - assert(result != deleted_handle(), "Used a deleted global handle."); + oop result = resolve_impl(handle); + assert(result != NULL, "NULL read from jni handle"); return result; -}; +} inline void JNIHandles::destroy_local(jobject handle) { if (handle != NULL) { - *((oop*)handle) = deleted_handle(); // Mark the handle as deleted, allocate will reuse it + jobject_ref(handle) = deleted_handle(); } } diff --git a/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp b/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp index 53fea3154b8..b9ac6a3ebf5 100644 --- a/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp +++ b/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright 2009, 2010 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -300,6 +300,7 @@ void SharkNativeWrapper::initialize(const char *name) { not_null, merge); builder()->SetInsertPoint(not_null); +#error Needs to be updated for tagged jweak; see JNIHandles. Value *unboxed_result = builder()->CreateLoad(result); builder()->CreateBr(merge); diff --git a/hotspot/test/runtime/jni/CallWithJNIWeak/CallWithJNIWeak.java b/hotspot/test/runtime/jni/CallWithJNIWeak/CallWithJNIWeak.java new file mode 100644 index 00000000000..491476c543a --- /dev/null +++ b/hotspot/test/runtime/jni/CallWithJNIWeak/CallWithJNIWeak.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8166188 + * @summary Test call of native function with JNI weak global ref. + * @modules java.base + * @run main/othervm/native CallWithJNIWeak +*/ + +public class CallWithJNIWeak { + static { + System.loadLibrary("CallWithJNIWeak"); + } + + static native Object doStuff(Object o); + static native Object doWithWeak(Object o); + + public static void main(String[] args) { + Object o = doStuff(Thread.currentThread()); + System.out.println(o); + } +} + diff --git a/hotspot/test/runtime/jni/CallWithJNIWeak/libCallWithJNIWeak.c b/hotspot/test/runtime/jni/CallWithJNIWeak/libCallWithJNIWeak.c new file mode 100644 index 00000000000..f0bfc4e6e86 --- /dev/null +++ b/hotspot/test/runtime/jni/CallWithJNIWeak/libCallWithJNIWeak.c @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +#include + +/* + * Class: CallWithJNIWeak + * Method: doStuff + * Signature: (Ljava/lang/Object;)Ljava/lang/Object; + */ +JNIEXPORT jobject JNICALL +Java_CallWithJNIWeak_doStuff(JNIEnv *env, jclass c, jobject o) { + jmethodID id = (*env)->GetStaticMethodID( + env, c, "doWithWeak", "(Ljava/lang/Object;)Ljava/lang/Object;"); + jweak w = (*env)->NewWeakGlobalRef(env, o); + jobject param = w; + (*env)->CallStaticVoidMethod(env, c, id, param); + return param; +} + +/* + * Class: CallWithJNIWeak + * Method: doWithWeak + * Signature: (Ljava/lang/Object;)Ljava/lang/Object; + */ +JNIEXPORT jobject JNICALL +Java_CallWithJNIWeak_doWithWeak(JNIEnv *env, jclass c, jobject o) { + jclass thr_class = (*env)->GetObjectClass(env, o); // o is java.lang.Thread + jmethodID id = (*env)->GetMethodID(env, thr_class, "isInterrupted", "()Z"); + jboolean b = (*env)->CallBooleanMethod(env, o, id); + return o; +} + diff --git a/hotspot/test/runtime/jni/ReturnJNIWeak/ReturnJNIWeak.java b/hotspot/test/runtime/jni/ReturnJNIWeak/ReturnJNIWeak.java new file mode 100644 index 00000000000..6d581000fb8 --- /dev/null +++ b/hotspot/test/runtime/jni/ReturnJNIWeak/ReturnJNIWeak.java @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @bug 8166188 + * @requires vm.opt.ExplicitGCInvokesConcurrent != true + * @summary Test return of JNI weak global refs from native calls. + * @modules java.base + * @run main/othervm/native -Xint ReturnJNIWeak + * @run main/othervm/native -Xcomp ReturnJNIWeak + */ + +public final class ReturnJNIWeak { + + static { + System.loadLibrary("ReturnJNIWeak"); + } + + private static final class TestObject { + public final int value; + + public TestObject(int value) { + this.value = value; + } + } + + private static volatile TestObject testObject = null; + + private static native void registerObject(Object o); + private static native void unregisterObject(); + private static native Object getObject(); + + // Create the test object and record it both strongly and weakly. + private static void remember(int value) { + TestObject o = new TestObject(value); + registerObject(o); + testObject = o; + } + + // Remove both strong and weak references to the current test object. + private static void forget() { + unregisterObject(); + testObject = null; + } + + // Verify the weakly recorded object + private static void checkValue(int value) throws Exception { + Object o = getObject(); + if (o == null) { + throw new RuntimeException("Weak reference unexpectedly null"); + } + TestObject t = (TestObject)o; + if (t.value != value) { + throw new RuntimeException("Incorrect value"); + } + } + + // Verify we can create a weak reference and get it back. + private static void testSanity() throws Exception { + System.out.println("running testSanity"); + int value = 5; + try { + remember(value); + checkValue(value); + } finally { + forget(); + } + } + + // Verify weak ref value survives across collection if strong ref exists. + private static void testSurvival() throws Exception { + System.out.println("running testSurvival"); + int value = 10; + try { + remember(value); + checkValue(value); + System.gc(); + // Verify weak ref still has expected value. + checkValue(value); + } finally { + forget(); + } + } + + // Verify weak ref cleared if no strong ref exists. + private static void testClear() throws Exception { + System.out.println("running testClear"); + int value = 15; + try { + remember(value); + checkValue(value); + // Verify still good. + checkValue(value); + // Drop reference. + testObject = null; + System.gc(); + // Verify weak ref cleared as expected. + Object recorded = getObject(); + if (recorded != null) { + throw new RuntimeException("expected clear"); + } + } finally { + forget(); + } + } + + public static void main(String[] args) throws Exception { + testSanity(); + testSurvival(); + testClear(); + } +} diff --git a/hotspot/test/runtime/jni/ReturnJNIWeak/libReturnJNIWeak.c b/hotspot/test/runtime/jni/ReturnJNIWeak/libReturnJNIWeak.c new file mode 100644 index 00000000000..12d7ae92e6e --- /dev/null +++ b/hotspot/test/runtime/jni/ReturnJNIWeak/libReturnJNIWeak.c @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * Native support for ReturnJNIWeak test. + */ + +#include "jni.h" + +static jweak registered = NULL; + +JNIEXPORT void JNICALL +Java_ReturnJNIWeak_registerObject(JNIEnv* env, + jclass jclazz, + jobject value) { + // assert registered == NULL + registered = (*env)->NewWeakGlobalRef(env, value); +} + +JNIEXPORT void JNICALL +Java_ReturnJNIWeak_unregisterObject(JNIEnv* env, jclass jclazz) { + if (registered != NULL) { + (*env)->DeleteWeakGlobalRef(env, registered); + registered = NULL; + } +} + +JNIEXPORT jobject JNICALL +Java_ReturnJNIWeak_getObject(JNIEnv* env, jclass jclazz) { + // assert registered != NULL + return registered; +} From c1a7b8e306da8d69626690fbcc743578daa89807 Mon Sep 17 00:00:00 2001 From: Amy Lu Date: Thu, 16 Feb 2017 13:38:09 +0800 Subject: [PATCH 226/447] 8174059: langtools test failed again on win32 with the trial reversion changes for limited win32 address space Reviewed-by: darcy --- .../javac/lambda/intersection/IntersectionTargetTypeTest.java | 1 + langtools/test/tools/javac/tree/JavacTreeScannerTest.java | 2 +- langtools/test/tools/javac/tree/SourceTreeScannerTest.java | 2 +- langtools/test/tools/javac/tree/TreePosTest.java | 2 +- langtools/test/tools/javac/varargs/7043922/T7043922.java | 1 + 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/langtools/test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java b/langtools/test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java index 47eb386b164..ce7bb163ed8 100644 --- a/langtools/test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java +++ b/langtools/test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java @@ -26,6 +26,7 @@ * @bug 8002099 8010822 * @summary Add support for intersection types in cast expression * @modules jdk.compiler/com.sun.tools.javac.util + * @run main/othervm IntersectionTargetTypeTest */ import com.sun.source.util.JavacTask; diff --git a/langtools/test/tools/javac/tree/JavacTreeScannerTest.java b/langtools/test/tools/javac/tree/JavacTreeScannerTest.java index b111d18ba86..66189f1a8ff 100644 --- a/langtools/test/tools/javac/tree/JavacTreeScannerTest.java +++ b/langtools/test/tools/javac/tree/JavacTreeScannerTest.java @@ -41,7 +41,7 @@ * jdk.compiler/com.sun.tools.javac.tree * jdk.compiler/com.sun.tools.javac.util * @build AbstractTreeScannerTest JavacTreeScannerTest - * @run main JavacTreeScannerTest -q -r . + * @run main/othervm JavacTreeScannerTest -q -r . */ import java.io.*; diff --git a/langtools/test/tools/javac/tree/SourceTreeScannerTest.java b/langtools/test/tools/javac/tree/SourceTreeScannerTest.java index c272425cc25..b08b36be904 100644 --- a/langtools/test/tools/javac/tree/SourceTreeScannerTest.java +++ b/langtools/test/tools/javac/tree/SourceTreeScannerTest.java @@ -41,7 +41,7 @@ * jdk.compiler/com.sun.tools.javac.tree * jdk.compiler/com.sun.tools.javac.util * @build AbstractTreeScannerTest SourceTreeScannerTest - * @run main SourceTreeScannerTest -q -r . + * @run main/othervm SourceTreeScannerTest -q -r . */ import java.io.*; diff --git a/langtools/test/tools/javac/tree/TreePosTest.java b/langtools/test/tools/javac/tree/TreePosTest.java index 835531fd669..9ab8a46bb29 100644 --- a/langtools/test/tools/javac/tree/TreePosTest.java +++ b/langtools/test/tools/javac/tree/TreePosTest.java @@ -108,7 +108,7 @@ import static com.sun.tools.javac.util.Position.NOPOS; * jdk.compiler/com.sun.tools.javac.file * jdk.compiler/com.sun.tools.javac.tree * jdk.compiler/com.sun.tools.javac.util - * @run main TreePosTest -q -r . + * @run main/othervm TreePosTest -q -r . */ public class TreePosTest { /** diff --git a/langtools/test/tools/javac/varargs/7043922/T7043922.java b/langtools/test/tools/javac/varargs/7043922/T7043922.java index b9624d027a3..5fc83af1826 100644 --- a/langtools/test/tools/javac/varargs/7043922/T7043922.java +++ b/langtools/test/tools/javac/varargs/7043922/T7043922.java @@ -28,6 +28,7 @@ * @modules jdk.compiler/com.sun.tools.javac.api * jdk.compiler/com.sun.tools.javac.file * jdk.compiler/com.sun.tools.javac.util + * @run main/othervm T7043922 */ import com.sun.source.util.JavacTask; From 33542ca32ca91131e54acf3179283c4440353c85 Mon Sep 17 00:00:00 2001 From: Prem Balakrishnan Date: Thu, 16 Feb 2017 12:05:40 +0530 Subject: [PATCH 227/447] 8162959: [HiDPI] screenshot artifacts using AWT Robot Reviewed-by: alexsch, prr --- .../classes/sun/lwawt/macosx/CRobot.java | 10 +- .../macosx/native/libawt_lwawt/awt/CRobot.m | 9 +- .../share/classes/java/awt/Robot.java | 161 +++++++++-- .../unix/classes/sun/awt/X11/XRobotPeer.java | 10 +- .../unix/native/libawt_xawt/awt/awt_Robot.c | 40 +-- .../native/libawt/windows/awt_Robot.cpp | 19 +- .../ScreenCaptureResolutionTest.java | 258 ++++++++++++++++++ .../HiDPIScreenCapture/ScreenCaptureTest.java | 182 ++++++++++++ 8 files changed, 615 insertions(+), 74 deletions(-) create mode 100644 jdk/test/java/awt/Robot/HiDPIScreenCapture/ScreenCaptureResolutionTest.java create mode 100644 jdk/test/java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CRobot.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CRobot.java index 940858e1d4f..744b85a0a05 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CRobot.java +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CRobot.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -174,7 +174,8 @@ class CRobot implements RobotPeer { @Override public int getRGBPixel(int x, int y) { int c[] = new int[1]; - getScreenPixels(new Rectangle(x, y, 1, 1), c); + double scale = fDevice.getScaleFactor(); + getScreenPixels(new Rectangle(x, y, (int) scale, (int) scale), c); return c[0]; } @@ -198,7 +199,8 @@ class CRobot implements RobotPeer { boolean isMouseMove); private native void keyEvent(int javaKeyCode, boolean keydown); private void getScreenPixels(Rectangle r, int[] pixels){ - nativeGetScreenPixels(r.x, r.y, r.width, r.height, pixels); + double scale = fDevice.getScaleFactor(); + nativeGetScreenPixels(r.x, r.y, r.width, r.height, scale, pixels); } - private native void nativeGetScreenPixels(int x, int y, int width, int height, int[] pixels); + private native void nativeGetScreenPixels(int x, int y, int width, int height, double scale, int[] pixels); } diff --git a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CRobot.m b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CRobot.m index d3ee81c2175..c394854a5c6 100644 --- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CRobot.m +++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CRobot.m @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -276,7 +276,7 @@ Java_sun_lwawt_macosx_CRobot_keyEvent JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CRobot_nativeGetScreenPixels (JNIEnv *env, jobject peer, - jint x, jint y, jint width, jint height, jintArray pixels) + jint x, jint y, jint width, jint height, jdouble scale, jintArray pixels) { JNF_COCOA_ENTER(env); @@ -285,10 +285,11 @@ Java_sun_lwawt_macosx_CRobot_nativeGetScreenPixels jint picWidth = width; jint picHeight = height; - CGRect screenRect = CGRectMake(picX, picY, picWidth, picHeight); + CGRect screenRect = CGRectMake(picX / scale, picY / scale, + picWidth / scale, picHeight / scale); CGImageRef screenPixelsImage = CGWindowListCreateImage(screenRect, kCGWindowListOptionOnScreenOnly, - kCGNullWindowID, kCGWindowImageDefault); + kCGNullWindowID, kCGWindowImageBestResolution); if (screenPixelsImage == NULL) { return; diff --git a/jdk/src/java.desktop/share/classes/java/awt/Robot.java b/jdk/src/java.desktop/share/classes/java/awt/Robot.java index d24ba5710b2..3f6604c8664 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/Robot.java +++ b/jdk/src/java.desktop/share/classes/java/awt/Robot.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,9 @@ package java.awt; import java.awt.event.InputEvent; import java.awt.event.KeyEvent; +import java.awt.geom.AffineTransform; +import java.awt.image.BaseMultiResolutionImage; +import java.awt.image.MultiResolutionImage; import java.awt.image.BufferedImage; import java.awt.image.DataBufferInt; import java.awt.image.DirectColorModel; @@ -391,6 +394,11 @@ public class Robot { * @return Color of the pixel */ public synchronized Color getPixelColor(int x, int y) { + AffineTransform tx = GraphicsEnvironment. + getLocalGraphicsEnvironment().getDefaultScreenDevice(). + getDefaultConfiguration().getDefaultTransform(); + x = (int) (x * tx.getScaleX()); + y = (int) (y * tx.getScaleY()); Color color = new Color(peer.getRGBPixel(x, y)); return color; } @@ -406,13 +414,69 @@ public class Robot { * @see AWTPermission */ public synchronized BufferedImage createScreenCapture(Rectangle screenRect) { + return createCompatibleImage(screenRect, false)[0]; + } + + /** + * Creates an image containing pixels read from the screen. + * This image does not include the mouse cursor. + * This method can be used in case there is a scaling transform + * from user space to screen (device) space. + * Typically this means that the display is a high resolution screen, + * although strictly it means any case in which there is such a transform. + * Returns a {@link java.awt.image.MultiResolutionImage}. + *

      + * For a non-scaled display, the {@code MultiResolutionImage} + * will have one image variant: + *

        + *
      • Base Image with user specified size. + *
      + *

      + * For a high resolution display where there is a scaling transform, + * the {@code MultiResolutionImage} will have two image variants: + *

        + *
      • Base Image with user specified size. This is scaled from the screen. + *
      • Native device resolution image with device size pixels. + *
      + *

      + * Example: + *

      +     *      Image nativeResImage;
      +     *      MultiResolutionImage mrImage = robot.createMultiResolutionScreenCapture(frame.getBounds());
      +     *      List resolutionVariants = mrImage.getResolutionVariants();
      +     *      if (resolutionVariants.size() > 1) {
      +     *          nativeResImage = resolutionVariants.get(1);
      +     *      } else {
      +     *          nativeResImage = resolutionVariants.get(0);
      +     *      } 
      + * @param screenRect Rect to capture in screen coordinates + * @return The captured image + * @throws IllegalArgumentException if {@code screenRect} width and height are not greater than zero + * @throws SecurityException if {@code readDisplayPixels} permission is not granted + * @see SecurityManager#checkPermission + * @see AWTPermission + * + * @since 9 + */ + public synchronized MultiResolutionImage + createMultiResolutionScreenCapture(Rectangle screenRect) { + + return new BaseMultiResolutionImage( + createCompatibleImage(screenRect, true)); + } + + private synchronized BufferedImage[] + createCompatibleImage(Rectangle screenRect, boolean isHiDPI) { + checkScreenCaptureAllowed(); checkValidRect(screenRect); - BufferedImage image; + BufferedImage lowResolutionImage; + BufferedImage highResolutionImage; DataBufferInt buffer; WritableRaster raster; + BufferedImage[] imageArray; if (screenCapCM == null) { /* @@ -422,31 +486,92 @@ public class Robot { */ screenCapCM = new DirectColorModel(24, - /* red mask */ 0x00FF0000, - /* green mask */ 0x0000FF00, - /* blue mask */ 0x000000FF); + /* red mask */ 0x00FF0000, + /* green mask */ 0x0000FF00, + /* blue mask */ 0x000000FF); } - // need to sync the toolkit prior to grabbing the pixels since in some - // cases rendering to the screen may be delayed - Toolkit.getDefaultToolkit().sync(); - - int pixels[]; int[] bandmasks = new int[3]; - - pixels = peer.getRGBPixels(screenRect); - buffer = new DataBufferInt(pixels, pixels.length); - bandmasks[0] = screenCapCM.getRedMask(); bandmasks[1] = screenCapCM.getGreenMask(); bandmasks[2] = screenCapCM.getBlueMask(); - raster = Raster.createPackedRaster(buffer, screenRect.width, screenRect.height, screenRect.width, bandmasks, null); - SunWritableRaster.makeTrackable(buffer); + // need to sync the toolkit prior to grabbing the pixels since in some + // cases rendering to the screen may be delayed + Toolkit.getDefaultToolkit().sync(); + AffineTransform tx = GraphicsEnvironment. + getLocalGraphicsEnvironment().getDefaultScreenDevice(). + getDefaultConfiguration().getDefaultTransform(); + double uiScaleX = tx.getScaleX(); + double uiScaleY = tx.getScaleY(); + int pixels[]; - image = new BufferedImage(screenCapCM, raster, false, null); + if (uiScaleX == 1 && uiScaleY == 1) { - return image; + pixels = peer.getRGBPixels(screenRect); + buffer = new DataBufferInt(pixels, pixels.length); + + bandmasks[0] = screenCapCM.getRedMask(); + bandmasks[1] = screenCapCM.getGreenMask(); + bandmasks[2] = screenCapCM.getBlueMask(); + + raster = Raster.createPackedRaster(buffer, screenRect.width, + screenRect.height, screenRect.width, bandmasks, null); + SunWritableRaster.makeTrackable(buffer); + + highResolutionImage = new BufferedImage(screenCapCM, raster, + false, null); + imageArray = new BufferedImage[1]; + imageArray[0] = highResolutionImage; + + } else { + + int sX = (int) Math.floor(screenRect.x * uiScaleX); + int sY = (int) Math.floor(screenRect.y * uiScaleY); + int sWidth = (int) Math.ceil(screenRect.width * uiScaleX); + int sHeight = (int) Math.ceil(screenRect.height * uiScaleY); + int temppixels[]; + Rectangle scaledRect = new Rectangle(sX, sY, sWidth, sHeight); + temppixels = peer.getRGBPixels(scaledRect); + + // HighResolutionImage + pixels = temppixels; + buffer = new DataBufferInt(pixels, pixels.length); + raster = Raster.createPackedRaster(buffer, scaledRect.width, + scaledRect.height, scaledRect.width, bandmasks, null); + SunWritableRaster.makeTrackable(buffer); + + highResolutionImage = new BufferedImage(screenCapCM, raster, + false, null); + + + // LowResolutionImage + lowResolutionImage = new BufferedImage(screenRect.width, + screenRect.height, highResolutionImage.getType()); + Graphics2D g = lowResolutionImage.createGraphics(); + g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, + RenderingHints.VALUE_INTERPOLATION_BILINEAR); + g.setRenderingHint(RenderingHints.KEY_RENDERING, + RenderingHints.VALUE_RENDER_QUALITY); + g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, + RenderingHints.VALUE_ANTIALIAS_ON); + g.drawImage(highResolutionImage, 0, 0, + screenRect.width, screenRect.height, + 0, 0, scaledRect.width, scaledRect.height, null); + g.dispose(); + + if(!isHiDPI) { + imageArray = new BufferedImage[1]; + imageArray[0] = lowResolutionImage; + } else { + imageArray = new BufferedImage[2]; + imageArray[0] = lowResolutionImage; + imageArray[1] = highResolutionImage; + } + + } + + return imageArray; } private static void checkValidRect(Rectangle rect) { diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XRobotPeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XRobotPeer.java index 0dbd8e00e9b..3d1189421c3 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XRobotPeer.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XRobotPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -115,8 +115,7 @@ class XRobotPeer implements RobotPeer { @Override public int getRGBPixel(int x, int y) { int pixelArray[] = new int[1]; - getRGBPixelsImpl(xgc, x, y, 1, 1, xgc.getScale(), pixelArray, - useGtk); + getRGBPixelsImpl(xgc, x, y, 1, 1, pixelArray, useGtk); return pixelArray[0]; } @@ -124,7 +123,7 @@ class XRobotPeer implements RobotPeer { public int [] getRGBPixels(Rectangle bounds) { int pixelArray[] = new int[bounds.width*bounds.height]; getRGBPixelsImpl(xgc, bounds.x, bounds.y, bounds.width, bounds.height, - xgc.getScale(), pixelArray, useGtk); + pixelArray, useGtk); return pixelArray; } @@ -140,6 +139,5 @@ class XRobotPeer implements RobotPeer { private static synchronized native void keyReleaseImpl(int keycode); private static synchronized native void getRGBPixelsImpl(X11GraphicsConfig xgc, - int x, int y, int width, int height, int scale, - int pixelArray[], boolean isGtkSupported); + int x, int y, int width, int height, int pixelArray[], boolean isGtkSupported); } diff --git a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c index b69e2c03965..3b08c197ec4 100644 --- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c +++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -276,7 +276,6 @@ Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl( JNIEnv *env, jint jy, jint jwidth, jint jheight, - jint scale, jintArray pixelArray, jboolean useGtk) { XImage *image; @@ -298,11 +297,6 @@ Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl( JNIEnv *env, AWT_LOCK(); - jint sx = jx * scale; - jint sy = jy * scale; - jint swidth = jwidth * scale; - jint sheight = jheight * scale; - rootWindow = XRootWindow(awt_display, adata->awt_visInfo.screen); if (!useGtk) { @@ -314,10 +308,10 @@ Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl( JNIEnv *env, } if (!XGetWindowAttributes(awt_display, rootWindow, &attr) - || sx + swidth <= attr.x - || attr.x + attr.width <= sx - || sy + sheight <= attr.y - || attr.y + attr.height <= sy) { + || jx + jwidth <= attr.x + || attr.x + attr.width <= jx + || jy + jheight <= attr.y + || attr.y + attr.height <= jy) { AWT_UNLOCK(); return; // Does not intersect with root window @@ -326,26 +320,25 @@ Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl( JNIEnv *env, gboolean gtk_failed = TRUE; jint _x, _y; - jint x = MAX(sx, attr.x); - jint y = MAX(sy, attr.y); - jint width = MIN(sx + swidth, attr.x + attr.width) - x; - jint height = MIN(sy + sheight, attr.y + attr.height) - y; + jint x = MAX(jx, attr.x); + jint y = MAX(jy, attr.y); + jint width = MIN(jx + jwidth, attr.x + attr.width) - x; + jint height = MIN(jy + jheight, attr.y + attr.height) - y; - - int dx = attr.x > sx ? attr.x - sx : 0; - int dy = attr.y > sy ? attr.y - sy : 0; + int dx = attr.x > jx ? attr.x - jx : 0; + int dy = attr.y > jy ? attr.y - jy : 0; int index; if (useGtk) { gtk->gdk_threads_enter(); gtk_failed = gtk->get_drawable_data(env, pixelArray, x, y, width, - height, jwidth, dx, dy, scale); + height, jwidth, dx, dy, 1); gtk->gdk_threads_leave(); } if (gtk_failed) { - image = getWindowImage(awt_display, rootWindow, sx, sy, swidth, sheight); + image = getWindowImage(awt_display, rootWindow, x, y, width, height); ary = (*env)->GetPrimitiveArrayCritical(env, pixelArray, NULL); @@ -355,15 +348,10 @@ Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl( JNIEnv *env, return; } - dx /= scale; - dy /= scale; - width /= scale; - height /= scale; - /* convert to Java ARGB pixels */ for (_y = 0; _y < height; _y++) { for (_x = 0; _x < width; _x++) { - jint pixel = (jint) XGetPixel(image, _x * scale, _y * scale); + jint pixel = (jint) XGetPixel(image, _x, _y); /* Note ignore upper * 32-bits on 64-bit * OSes. diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Robot.cpp b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Robot.cpp index 6666a6e2c95..12432ebf14f 100644 --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Robot.cpp +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Robot.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -224,24 +224,11 @@ void AwtRobot::GetRGBPixels(jint x, jint y, jint width, jint height, jintArray p AwtWin32GraphicsDevice::SelectPalette(hdcMem, primaryIndex); AwtWin32GraphicsDevice::RealizePalette(hdcMem, primaryIndex); - Devices::InstanceAccess devices; - AwtWin32GraphicsDevice *device = devices->GetDevice(primaryIndex); - int sWidth = (device == NULL) ? width : device->ScaleUpX(width); - int sHeight = (device == NULL) ? height : device->ScaleUpY(height); - // copy screen image to offscreen bitmap // CAPTUREBLT flag is required to capture WS_EX_LAYERED windows' contents // correctly on Win2K/XP - if (width == sWidth && height == sHeight) { - VERIFY(::BitBlt(hdcMem, 0, 0, width, height, hdcScreen, x, y, - SRCCOPY | CAPTUREBLT) != 0); - } else { - int sX = (device == NULL) ? x : device->ScaleUpX(x); - int sY = (device == NULL) ? y : device->ScaleUpY(y); - VERIFY(::StretchBlt(hdcMem, 0, 0, width, height, - hdcScreen, sX, sY, sWidth, sHeight, - SRCCOPY | CAPTUREBLT) != 0); - } + VERIFY(::BitBlt(hdcMem, 0, 0, width, height, hdcScreen, x, y, + SRCCOPY | CAPTUREBLT) != 0); static const int BITS_PER_PIXEL = 32; static const int BYTES_PER_PIXEL = BITS_PER_PIXEL/8; diff --git a/jdk/test/java/awt/Robot/HiDPIScreenCapture/ScreenCaptureResolutionTest.java b/jdk/test/java/awt/Robot/HiDPIScreenCapture/ScreenCaptureResolutionTest.java new file mode 100644 index 00000000000..ef1ac71d9ba --- /dev/null +++ b/jdk/test/java/awt/Robot/HiDPIScreenCapture/ScreenCaptureResolutionTest.java @@ -0,0 +1,258 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + + /* + * @test + * @bug 8162959 + * @summary Visually validate multiresolution screencapture. + * @run main/othervm/manual -Dsun.java2d.uiScale=2 ScreenCaptureResolutionTest + */ +import java.awt.AWTException; +import java.awt.Color; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.util.concurrent.CountDownLatch; +import javax.swing.JPanel; +import javax.swing.JTextArea; +import javax.swing.SwingUtilities; +import javax.swing.JButton; +import javax.swing.JFrame; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.concurrent.TimeUnit; +import javax.swing.ImageIcon; +import javax.swing.JLabel; +import java.awt.Robot; +import java.awt.image.BufferedImage; +import java.util.List; +import java.awt.Image; +import java.awt.image.MultiResolutionImage; + +public class ScreenCaptureResolutionTest { + + public static void main(String args[]) throws Exception { + + final CountDownLatch latch = new CountDownLatch(1); + TestUI test = new TestUI(latch); + + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + try { + test.createUI(); + } catch (Exception ex) { + throw new RuntimeException("Exception while creating UI"); + } + } + }); + latch.await(3, TimeUnit.SECONDS); + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + try { + test.validateScreenCapture(); + } catch (Exception ex) { + throw new RuntimeException("Exception while" + + " validating ScreenCapture"); + } + } + }); + boolean status = latch.await(5, TimeUnit.MINUTES); + if (!status) { + System.out.println("Test timed out."); + } + + SwingUtilities.invokeAndWait(new Runnable() { + @Override + public void run() { + try { + test.disposeUI(); + } catch (Exception ex) { + throw new RuntimeException("Exception while disposing UI"); + } + } + }); + + if (test.testResult == false) { + throw new RuntimeException("Test Failed."); + } + } +} + +class TestUI { + + private static JFrame mainFrame; + private static JFrame outputImageFrame; + private static JFrame inputImageFrame; + private static JPanel outputControlPanel; + private static JPanel mainControlPanel; + + private static JTextArea instructionTextArea; + + private static JPanel inputImagePanel; + private static JPanel resultButtonPanel; + private static JButton passButton; + private static JButton failButton; + + private static GridBagLayout layout; + private final CountDownLatch latch; + public boolean testResult = false; + + public TestUI(CountDownLatch latch) throws Exception { + this.latch = latch; + } + + public void validateScreenCapture() throws AWTException { + Robot robot = new Robot(); + outputControlPanel = new JPanel(layout); + GridBagConstraints ogbc = new GridBagConstraints(); + + MultiResolutionImage image + = robot.createMultiResolutionScreenCapture(inputImageFrame.getBounds()); + List imageList = image.getResolutionVariants(); + int size = imageList.size(); + BufferedImage lowResImage = (BufferedImage) imageList.get(0); + BufferedImage highResImage = (BufferedImage) imageList.get(1); + + outputImageFrame = new JFrame("Output"); + outputImageFrame.getContentPane().setLayout(new GridBagLayout()); + ogbc.gridx = 0; + ogbc.gridy = 0; + ogbc.fill = GridBagConstraints.HORIZONTAL; + outputControlPanel.add(new JLabel(new ImageIcon(lowResImage)), ogbc); + int width = lowResImage.getWidth(); + int height = lowResImage.getHeight(); + JLabel labelImg1 = new JLabel("LEFT:Width: " + width + + " Height: " + height); + ogbc.gridx = 0; + ogbc.gridy = 1; + outputControlPanel.add(labelImg1, ogbc); + ogbc.gridx = 1; + ogbc.gridy = 0; + outputControlPanel.add(new JLabel(new ImageIcon(highResImage)), ogbc); + width = highResImage.getWidth(); + height = highResImage.getHeight(); + JLabel labelImg2 = new JLabel("RIGHT:Width: " + width + + " Height: " + height); + ogbc.gridx = 1; + ogbc.gridy = 1; + outputControlPanel.add(labelImg2, ogbc); + outputControlPanel.setBackground(Color.GRAY); + outputImageFrame.add(outputControlPanel); + + outputImageFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + outputImageFrame.setBounds(600, 0, 400, 300); + outputImageFrame.setLocationRelativeTo(null); + outputImageFrame.setVisible(true); + } + + public final void createUI() throws Exception { + + mainFrame = new JFrame("ScreenCaptureResolutionTest"); + + layout = new GridBagLayout(); + mainControlPanel = new JPanel(layout); + resultButtonPanel = new JPanel(layout); + + GridBagConstraints gbc = new GridBagConstraints(); + + // Create Test instructions + String instructions + = "INSTRUCTIONS:" + + "\n Test to Visually validate MultiResolutionn Image. " + + "\n 1. Check if output window contains two screenshot " + + "\n of input window. " + + "\n 2. Right image should be twice the size of Left. " + + "\n 3. Quality of Right image should be better than Left. " + + "\n If all the three conditons are satisfied, then " + + "\n click pass else fail."; + instructionTextArea = new JTextArea(); + instructionTextArea.setText(instructions); + instructionTextArea.setEnabled(false); + instructionTextArea.setDisabledTextColor(Color.black); + instructionTextArea.setBackground(Color.white); + + gbc.gridx = 0; + gbc.gridy = 0; + gbc.fill = GridBagConstraints.HORIZONTAL; + mainControlPanel.add(instructionTextArea, gbc); + + gbc.gridx = 0; + gbc.gridy = 1; + + inputImagePanel = new JPanel(layout); + JLabel label = new JLabel("Resolution"); + inputImagePanel.add(label); + inputImageFrame = new JFrame("Input"); + inputImageFrame.add(inputImagePanel); + + inputImageFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + inputImageFrame.setBounds(100, 200, 100, 100); + inputImageFrame.setVisible(true); + + passButton = new JButton("Pass"); + passButton.setActionCommand("Pass"); + passButton.addActionListener((ActionEvent e) -> { + outputImageFrame.dispose(); + inputImageFrame.dispose(); + testResult = true; + mainFrame.dispose(); + latch.countDown(); + + }); + failButton = new JButton("Fail"); + failButton.setActionCommand("Fail"); + failButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + outputImageFrame.dispose(); + inputImageFrame.dispose(); + testResult = false; + mainFrame.dispose(); + latch.countDown(); + } + }); + gbc.gridx = 0; + gbc.gridy = 0; + resultButtonPanel.add(passButton, gbc); + gbc.gridx = 1; + gbc.gridy = 0; + resultButtonPanel.add(failButton, gbc); + + gbc.gridx = 0; + gbc.gridy = 2; + mainControlPanel.add(resultButtonPanel, gbc); + + mainFrame.add(mainControlPanel); + mainFrame.pack(); + mainFrame.setVisible(true); + } + + public void disposeUI() { + outputImageFrame.dispose(); + inputImageFrame.dispose(); + mainFrame.setVisible(false); + mainFrame.dispose(); + } + +} diff --git a/jdk/test/java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java b/jdk/test/java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java new file mode 100644 index 00000000000..7be3a918117 --- /dev/null +++ b/jdk/test/java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java @@ -0,0 +1,182 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + + /* + * @test + * @bug 8162959 + * @summary Validate output of createMultiResolutionScreenCapture + * new API which returns MultiResolutionImage. + * @run main/othervm -Dsun.java2d.uiScale=1 ScreenCaptureTest + * @run main/othervm -Dsun.java2d.uiScale=2 ScreenCaptureTest + */ +import java.awt.Dimension; +import java.awt.GraphicsEnvironment; +import java.awt.Image; +import java.awt.Rectangle; +import java.awt.Toolkit; +import java.awt.geom.AffineTransform; +import java.awt.image.BufferedImage; +import java.awt.image.MultiResolutionImage; +import java.awt.BorderLayout; +import java.awt.Canvas; +import java.awt.Color; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Panel; +import java.awt.Robot; +import java.util.List; + +public class ScreenCaptureTest { + + private static Robot robot; + private static Frame frame; + private static boolean isHiDPI = true; + private static final Color[] COLORS = { + Color.GREEN, Color.BLUE, Color.ORANGE, Color.RED}; + + public static void main(String[] args) throws Exception { + + frame = new Frame(); + frame.setBounds(0, 0, 400, 400); + frame.setUndecorated(true); + robot = new Robot(); + Panel panel = new Panel(new BorderLayout()); + Canvas canvas = new Canvas() { + public void paint(Graphics g) { + super.paint(g); + int w = getWidth(); + int h = getHeight(); + g.setColor(COLORS[0]); + g.fillRect(0, 0, w / 2, h / 2); + g.setColor(COLORS[1]); + g.fillRect(w / 2, 0, w / 2, h / 2); + g.setColor(COLORS[2]); + g.fillRect(0, h / 2, w / 2, h / 2); + g.setColor(COLORS[3]); + g.fillRect(w / 2, h / 2, w / 2, h / 2); + } + }; + + panel.add(canvas); + frame.add(panel); + frame.setVisible(true); + robot.delay(500); + robot.waitForIdle(); + + int w = frame.getWidth(); + int h = frame.getHeight(); + + // getPixelColor Test + // Check pixel color in first quardant GREEN; x=100, y=100 + if (!robot.getPixelColor(w / 4, h / 4).equals(COLORS[0])) { + throw new RuntimeException("Wrong Pixel Color! Expected GREEN"); + } + // Check pixel color in second quardant; BLUE, x=300, y=100 + if (!robot.getPixelColor(3 * w / 4, h / 4).equals(COLORS[1])) { + throw new RuntimeException("Wrong Pixel Color! Expected BLUE"); + } + // Check pixel color in third quardant; ORANGE, x=100, y=300 + if (!robot.getPixelColor(w / 4, 3 * h / 4).equals(COLORS[2])) { + throw new RuntimeException("Wrong Pixel Color! Expected ORANGE"); + } + // Check pixel color in fourth quardant; RED, x=300, y=300 + if (!robot.getPixelColor(3 * w / 4, 3 * h / 4).equals(COLORS[3])) { + throw new RuntimeException("Wrong Pixel Color! Expected RED"); + } + + // createScreenCaptureTest + AffineTransform tx = GraphicsEnvironment.getLocalGraphicsEnvironment() + .getDefaultScreenDevice().getDefaultConfiguration() + .getDefaultTransform(); + + if (tx.getScaleX() == 1 && tx.getScaleY() == 1) { + isHiDPI = false; + } + + MultiResolutionImage image + = robot.createMultiResolutionScreenCapture(frame.getBounds()); + List imageList = image.getResolutionVariants(); + int size = imageList.size(); + BufferedImage lowResImage; + BufferedImage highResImage; + + if (!isHiDPI) { + // Check if output is MultiResolutionImage with one variant + if (size != 1) { + throw new RuntimeException(" Invalid variant size"); + } + + lowResImage = (BufferedImage) imageList.get(0); + System.out.println(frame.getBounds()); + System.out.println(lowResImage.getWidth()+" "+lowResImage.getHeight()); + if (frame.getWidth() != lowResImage.getWidth() + || frame.getHeight() != lowResImage.getHeight()) { + throw new RuntimeException(" Invalid Image size"); + } + + } else { + // Check if output contains two variants. + if (size != 2) { + throw new RuntimeException(" Invalid variant size"); + } + + // Check if hight resolution image size is scale times low resolution image. + lowResImage = (BufferedImage) imageList.get(0); + highResImage = (BufferedImage) imageList.get(1); + + int lW = (int) lowResImage.getWidth(); + int lH = (int) lowResImage.getHeight(); + int hW = (int) highResImage.getWidth(); + int hH = (int) highResImage.getHeight(); + + if ( hW != (tx.getScaleX() * lW) || hH != (tx.getScaleY() * lH)) { + throw new RuntimeException(" Invalid Resolution Variants"); + } + + // Check if both image colors are same at some location. + if (lowResImage.getRGB(lW / 4, lH / 4) + != highResImage.getRGB(hW / 4, hH / 4)) { + throw new RuntimeException("Wrong image color!"); + } + + if (lowResImage.getRGB(3 * lW / 4, lH / 4) + != highResImage.getRGB(3 * hW / 4, hH / 4)) { + throw new RuntimeException("Wrong image color!"); + } + + if (lowResImage.getRGB(lW / 4, 3 * lH / 4) + != highResImage.getRGB(hW / 4, 3 * hH / 4)) { + throw new RuntimeException("Wrong image color!"); + } + + if (lowResImage.getRGB(3 * lW / 4, 3 * lH / 4) + != highResImage.getRGB(3 * hW / 4, 3 * hH / 4)) { + throw new RuntimeException("Wrong image color!"); + } + + } + + frame.dispose(); + } + +} From edd9cacaafd64e2922456e93d053b6a85fbf4bb1 Mon Sep 17 00:00:00 2001 From: Xueming Shen Date: Wed, 15 Feb 2017 22:50:35 -0800 Subject: [PATCH 228/447] 8175053: March 5 builds failed on Windows/install repo after JDK-8173207 Reviewed-by: mchung --- .../share/native/libzip/zlib/gzclose.c | 49 ++ .../share/native/libzip/zlib/gzguts.h | 242 ++++++ .../share/native/libzip/zlib/gzlib.c | 661 +++++++++++++++++ .../share/native/libzip/zlib/gzread.c | 678 +++++++++++++++++ .../share/native/libzip/zlib/gzwrite.c | 689 ++++++++++++++++++ .../native/libzip/zlib/patches/ChangeLog_java | 48 +- .../share/native/libzip/zlib/zconf.h | 2 - .../share/native/libzip/zlib/zutil.c | 2 - 8 files changed, 2350 insertions(+), 21 deletions(-) create mode 100644 jdk/src/java.base/share/native/libzip/zlib/gzclose.c create mode 100644 jdk/src/java.base/share/native/libzip/zlib/gzguts.h create mode 100644 jdk/src/java.base/share/native/libzip/zlib/gzlib.c create mode 100644 jdk/src/java.base/share/native/libzip/zlib/gzread.c create mode 100644 jdk/src/java.base/share/native/libzip/zlib/gzwrite.c diff --git a/jdk/src/java.base/share/native/libzip/zlib/gzclose.c b/jdk/src/java.base/share/native/libzip/zlib/gzclose.c new file mode 100644 index 00000000000..5cce4b03d2f --- /dev/null +++ b/jdk/src/java.base/share/native/libzip/zlib/gzclose.c @@ -0,0 +1,49 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* gzclose.c -- zlib gzclose() function + * Copyright (C) 2004, 2010 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "gzguts.h" + +/* gzclose() is in a separate file so that it is linked in only if it is used. + That way the other gzclose functions can be used instead to avoid linking in + unneeded compression or decompression routines. */ +int ZEXPORT gzclose(file) + gzFile file; +{ +#ifndef NO_GZCOMPRESS + gz_statep state; + + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + + return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); +#else + return gzclose_r(file); +#endif +} diff --git a/jdk/src/java.base/share/native/libzip/zlib/gzguts.h b/jdk/src/java.base/share/native/libzip/zlib/gzguts.h new file mode 100644 index 00000000000..26464b4e6c8 --- /dev/null +++ b/jdk/src/java.base/share/native/libzip/zlib/gzguts.h @@ -0,0 +1,242 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* gzguts.h -- zlib internal header definitions for gz* operations + * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#ifdef _LARGEFILE64_SOURCE +# ifndef _LARGEFILE_SOURCE +# define _LARGEFILE_SOURCE 1 +# endif +# ifdef _FILE_OFFSET_BITS +# undef _FILE_OFFSET_BITS +# endif +#endif + +#ifdef HAVE_HIDDEN +# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) +#else +# define ZLIB_INTERNAL +#endif + +#include +#include "zlib.h" +#ifdef STDC +# include +# include +# include +#endif + +#ifndef _POSIX_SOURCE +# define _POSIX_SOURCE +#endif +#include + +#ifdef _WIN32 +# include +#endif + +#if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32) +# include +#endif + +#if defined(_WIN32) || defined(__CYGWIN__) +# define WIDECHAR +#endif + +#ifdef WINAPI_FAMILY +# define open _open +# define read _read +# define write _write +# define close _close +#endif + +#ifdef NO_DEFLATE /* for compatibility with old definition */ +# define NO_GZCOMPRESS +#endif + +#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) +# ifndef HAVE_VSNPRINTF +# define HAVE_VSNPRINTF +# endif +#endif + +#if defined(__CYGWIN__) +# ifndef HAVE_VSNPRINTF +# define HAVE_VSNPRINTF +# endif +#endif + +#if defined(MSDOS) && defined(__BORLANDC__) && (BORLANDC > 0x410) +# ifndef HAVE_VSNPRINTF +# define HAVE_VSNPRINTF +# endif +#endif + +#ifndef HAVE_VSNPRINTF +# ifdef MSDOS +/* vsnprintf may exist on some MS-DOS compilers (DJGPP?), + but for now we just assume it doesn't. */ +# define NO_vsnprintf +# endif +# ifdef __TURBOC__ +# define NO_vsnprintf +# endif +# ifdef WIN32 +/* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */ +# if !defined(vsnprintf) && !defined(NO_vsnprintf) +# if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 ) +# define vsnprintf _vsnprintf +# endif +# endif +# endif +# ifdef __SASC +# define NO_vsnprintf +# endif +# ifdef VMS +# define NO_vsnprintf +# endif +# ifdef __OS400__ +# define NO_vsnprintf +# endif +# ifdef __MVS__ +# define NO_vsnprintf +# endif +#endif + +/* unlike snprintf (which is required in C99), _snprintf does not guarantee + null termination of the result -- however this is only used in gzlib.c where + the result is assured to fit in the space provided */ +#if defined(_MSC_VER) && _MSC_VER < 1900 +# define snprintf _snprintf +#endif + +#ifndef local +# define local static +#endif +/* since "static" is used to mean two completely different things in C, we + define "local" for the non-static meaning of "static", for readability + (compile with -Dlocal if your debugger can't find static symbols) */ + +/* gz* functions always use library allocation functions */ +#ifndef STDC + extern voidp malloc OF((uInt size)); + extern void free OF((voidpf ptr)); +#endif + +/* get errno and strerror definition */ +#if defined UNDER_CE +# include +# define zstrerror() gz_strwinerror((DWORD)GetLastError()) +#else +# ifndef NO_STRERROR +# include +# define zstrerror() strerror(errno) +# else +# define zstrerror() "stdio error (consult errno)" +# endif +#endif + +/* provide prototypes for these when building zlib without LFS */ +#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); + ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); +#endif + +/* default memLevel */ +#if MAX_MEM_LEVEL >= 8 +# define DEF_MEM_LEVEL 8 +#else +# define DEF_MEM_LEVEL MAX_MEM_LEVEL +#endif + +/* default i/o buffer size -- double this for output when reading (this and + twice this must be able to fit in an unsigned type) */ +#define GZBUFSIZE 8192 + +/* gzip modes, also provide a little integrity check on the passed structure */ +#define GZ_NONE 0 +#define GZ_READ 7247 +#define GZ_WRITE 31153 +#define GZ_APPEND 1 /* mode set to GZ_WRITE after the file is opened */ + +/* values for gz_state how */ +#define LOOK 0 /* look for a gzip header */ +#define COPY 1 /* copy input directly */ +#define GZIP 2 /* decompress a gzip stream */ + +/* internal gzip file state data structure */ +typedef struct { + /* exposed contents for gzgetc() macro */ + struct gzFile_s x; /* "x" for exposed */ + /* x.have: number of bytes available at x.next */ + /* x.next: next output data to deliver or write */ + /* x.pos: current position in uncompressed data */ + /* used for both reading and writing */ + int mode; /* see gzip modes above */ + int fd; /* file descriptor */ + char *path; /* path or fd for error messages */ + unsigned size; /* buffer size, zero if not allocated yet */ + unsigned want; /* requested buffer size, default is GZBUFSIZE */ + unsigned char *in; /* input buffer (double-sized when writing) */ + unsigned char *out; /* output buffer (double-sized when reading) */ + int direct; /* 0 if processing gzip, 1 if transparent */ + /* just for reading */ + int how; /* 0: get header, 1: copy, 2: decompress */ + z_off64_t start; /* where the gzip data started, for rewinding */ + int eof; /* true if end of input file reached */ + int past; /* true if read requested past end */ + /* just for writing */ + int level; /* compression level */ + int strategy; /* compression strategy */ + /* seek request */ + z_off64_t skip; /* amount to skip (already rewound if backwards) */ + int seek; /* true if seek request pending */ + /* error information */ + int err; /* error code */ + char *msg; /* error message */ + /* zlib inflate or deflate stream */ + z_stream strm; /* stream structure in-place (not a pointer) */ +} gz_state; +typedef gz_state FAR *gz_statep; + +/* shared functions */ +void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *)); +#if defined UNDER_CE +char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error)); +#endif + +/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t + value -- needed when comparing unsigned to z_off64_t, which is signed + (possible z_off64_t types off_t, off64_t, and long are all signed) */ +#ifdef INT_MAX +# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX) +#else +unsigned ZLIB_INTERNAL gz_intmax OF((void)); +# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) +#endif diff --git a/jdk/src/java.base/share/native/libzip/zlib/gzlib.c b/jdk/src/java.base/share/native/libzip/zlib/gzlib.c new file mode 100644 index 00000000000..a814dd8c7b6 --- /dev/null +++ b/jdk/src/java.base/share/native/libzip/zlib/gzlib.c @@ -0,0 +1,661 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* gzlib.c -- zlib functions common to reading and writing gzip files + * Copyright (C) 2004-2017 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "gzguts.h" + +#if defined(_WIN32) && !defined(__BORLANDC__) && !defined(__MINGW32__) +# define LSEEK _lseeki64 +#else +#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 +# define LSEEK lseek64 +#else +# define LSEEK lseek +#endif +#endif + +/* Local functions */ +local void gz_reset OF((gz_statep)); +local gzFile gz_open OF((const void *, int, const char *)); + +#if defined UNDER_CE + +/* Map the Windows error number in ERROR to a locale-dependent error message + string and return a pointer to it. Typically, the values for ERROR come + from GetLastError. + + The string pointed to shall not be modified by the application, but may be + overwritten by a subsequent call to gz_strwinerror + + The gz_strwinerror function does not change the current setting of + GetLastError. */ +char ZLIB_INTERNAL *gz_strwinerror (error) + DWORD error; +{ + static char buf[1024]; + + wchar_t *msgbuf; + DWORD lasterr = GetLastError(); + DWORD chars = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM + | FORMAT_MESSAGE_ALLOCATE_BUFFER, + NULL, + error, + 0, /* Default language */ + (LPVOID)&msgbuf, + 0, + NULL); + if (chars != 0) { + /* If there is an \r\n appended, zap it. */ + if (chars >= 2 + && msgbuf[chars - 2] == '\r' && msgbuf[chars - 1] == '\n') { + chars -= 2; + msgbuf[chars] = 0; + } + + if (chars > sizeof (buf) - 1) { + chars = sizeof (buf) - 1; + msgbuf[chars] = 0; + } + + wcstombs(buf, msgbuf, chars + 1); + LocalFree(msgbuf); + } + else { + sprintf(buf, "unknown win32 error (%ld)", error); + } + + SetLastError(lasterr); + return buf; +} + +#endif /* UNDER_CE */ + +/* Reset gzip file state */ +local void gz_reset(state) + gz_statep state; +{ + state->x.have = 0; /* no output data available */ + if (state->mode == GZ_READ) { /* for reading ... */ + state->eof = 0; /* not at end of file */ + state->past = 0; /* have not read past end yet */ + state->how = LOOK; /* look for gzip header */ + } + state->seek = 0; /* no seek request pending */ + gz_error(state, Z_OK, NULL); /* clear error */ + state->x.pos = 0; /* no uncompressed data yet */ + state->strm.avail_in = 0; /* no input data yet */ +} + +/* Open a gzip file either by name or file descriptor. */ +local gzFile gz_open(path, fd, mode) + const void *path; + int fd; + const char *mode; +{ + gz_statep state; + z_size_t len; + int oflag; +#ifdef O_CLOEXEC + int cloexec = 0; +#endif +#ifdef O_EXCL + int exclusive = 0; +#endif + + /* check input */ + if (path == NULL) + return NULL; + + /* allocate gzFile structure to return */ + state = (gz_statep)malloc(sizeof(gz_state)); + if (state == NULL) + return NULL; + state->size = 0; /* no buffers allocated yet */ + state->want = GZBUFSIZE; /* requested buffer size */ + state->msg = NULL; /* no error message yet */ + + /* interpret mode */ + state->mode = GZ_NONE; + state->level = Z_DEFAULT_COMPRESSION; + state->strategy = Z_DEFAULT_STRATEGY; + state->direct = 0; + while (*mode) { + if (*mode >= '0' && *mode <= '9') + state->level = *mode - '0'; + else + switch (*mode) { + case 'r': + state->mode = GZ_READ; + break; +#ifndef NO_GZCOMPRESS + case 'w': + state->mode = GZ_WRITE; + break; + case 'a': + state->mode = GZ_APPEND; + break; +#endif + case '+': /* can't read and write at the same time */ + free(state); + return NULL; + case 'b': /* ignore -- will request binary anyway */ + break; +#ifdef O_CLOEXEC + case 'e': + cloexec = 1; + break; +#endif +#ifdef O_EXCL + case 'x': + exclusive = 1; + break; +#endif + case 'f': + state->strategy = Z_FILTERED; + break; + case 'h': + state->strategy = Z_HUFFMAN_ONLY; + break; + case 'R': + state->strategy = Z_RLE; + break; + case 'F': + state->strategy = Z_FIXED; + break; + case 'T': + state->direct = 1; + break; + default: /* could consider as an error, but just ignore */ + ; + } + mode++; + } + + /* must provide an "r", "w", or "a" */ + if (state->mode == GZ_NONE) { + free(state); + return NULL; + } + + /* can't force transparent read */ + if (state->mode == GZ_READ) { + if (state->direct) { + free(state); + return NULL; + } + state->direct = 1; /* for empty file */ + } + + /* save the path name for error messages */ +#ifdef WIDECHAR + if (fd == -2) { + len = wcstombs(NULL, path, 0); + if (len == (z_size_t)-1) + len = 0; + } + else +#endif + len = strlen((const char *)path); + state->path = (char *)malloc(len + 1); + if (state->path == NULL) { + free(state); + return NULL; + } +#ifdef WIDECHAR + if (fd == -2) + if (len) + wcstombs(state->path, path, len + 1); + else + *(state->path) = 0; + else +#endif +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + (void)snprintf(state->path, len + 1, "%s", (const char *)path); +#else + strcpy(state->path, path); +#endif + + /* compute the flags for open() */ + oflag = +#ifdef O_LARGEFILE + O_LARGEFILE | +#endif +#ifdef O_BINARY + O_BINARY | +#endif +#ifdef O_CLOEXEC + (cloexec ? O_CLOEXEC : 0) | +#endif + (state->mode == GZ_READ ? + O_RDONLY : + (O_WRONLY | O_CREAT | +#ifdef O_EXCL + (exclusive ? O_EXCL : 0) | +#endif + (state->mode == GZ_WRITE ? + O_TRUNC : + O_APPEND))); + + /* open the file with the appropriate flags (or just use fd) */ + state->fd = fd > -1 ? fd : ( +#ifdef WIDECHAR + fd == -2 ? _wopen(path, oflag, 0666) : +#endif + open((const char *)path, oflag, 0666)); + if (state->fd == -1) { + free(state->path); + free(state); + return NULL; + } + if (state->mode == GZ_APPEND) { + LSEEK(state->fd, 0, SEEK_END); /* so gzoffset() is correct */ + state->mode = GZ_WRITE; /* simplify later checks */ + } + + /* save the current position for rewinding (only if reading) */ + if (state->mode == GZ_READ) { + state->start = LSEEK(state->fd, 0, SEEK_CUR); + if (state->start == -1) state->start = 0; + } + + /* initialize stream */ + gz_reset(state); + + /* return stream */ + return (gzFile)state; +} + +/* -- see zlib.h -- */ +gzFile ZEXPORT gzopen(path, mode) + const char *path; + const char *mode; +{ + return gz_open(path, -1, mode); +} + +/* -- see zlib.h -- */ +gzFile ZEXPORT gzopen64(path, mode) + const char *path; + const char *mode; +{ + return gz_open(path, -1, mode); +} + +/* -- see zlib.h -- */ +gzFile ZEXPORT gzdopen(fd, mode) + int fd; + const char *mode; +{ + char *path; /* identifier for error messages */ + gzFile gz; + + if (fd == -1 || (path = (char *)malloc(7 + 3 * sizeof(int))) == NULL) + return NULL; +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + (void)snprintf(path, 7 + 3 * sizeof(int), "", fd); +#else + sprintf(path, "", fd); /* for debugging */ +#endif + gz = gz_open(path, fd, mode); + free(path); + return gz; +} + +/* -- see zlib.h -- */ +#ifdef WIDECHAR +gzFile ZEXPORT gzopen_w(path, mode) + const wchar_t *path; + const char *mode; +{ + return gz_open(path, -2, mode); +} +#endif + +/* -- see zlib.h -- */ +int ZEXPORT gzbuffer(file, size) + gzFile file; + unsigned size; +{ + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return -1; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return -1; + + /* make sure we haven't already allocated memory */ + if (state->size != 0) + return -1; + + /* check and set requested size */ + if ((size << 1) < size) + return -1; /* need to be able to double it */ + if (size < 2) + size = 2; /* need two bytes to check magic header */ + state->want = size; + return 0; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzrewind(file) + gzFile file; +{ + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* check that we're reading and that there's no error */ + if (state->mode != GZ_READ || + (state->err != Z_OK && state->err != Z_BUF_ERROR)) + return -1; + + /* back up and start over */ + if (LSEEK(state->fd, state->start, SEEK_SET) == -1) + return -1; + gz_reset(state); + return 0; +} + +/* -- see zlib.h -- */ +z_off64_t ZEXPORT gzseek64(file, offset, whence) + gzFile file; + z_off64_t offset; + int whence; +{ + unsigned n; + z_off64_t ret; + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return -1; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return -1; + + /* check that there's no error */ + if (state->err != Z_OK && state->err != Z_BUF_ERROR) + return -1; + + /* can only seek from start or relative to current position */ + if (whence != SEEK_SET && whence != SEEK_CUR) + return -1; + + /* normalize offset to a SEEK_CUR specification */ + if (whence == SEEK_SET) + offset -= state->x.pos; + else if (state->seek) + offset += state->skip; + state->seek = 0; + + /* if within raw area while reading, just go there */ + if (state->mode == GZ_READ && state->how == COPY && + state->x.pos + offset >= 0) { + ret = LSEEK(state->fd, offset - state->x.have, SEEK_CUR); + if (ret == -1) + return -1; + state->x.have = 0; + state->eof = 0; + state->past = 0; + state->seek = 0; + gz_error(state, Z_OK, NULL); + state->strm.avail_in = 0; + state->x.pos += offset; + return state->x.pos; + } + + /* calculate skip amount, rewinding if needed for back seek when reading */ + if (offset < 0) { + if (state->mode != GZ_READ) /* writing -- can't go backwards */ + return -1; + offset += state->x.pos; + if (offset < 0) /* before start of file! */ + return -1; + if (gzrewind(file) == -1) /* rewind, then skip to offset */ + return -1; + } + + /* if reading, skip what's in output buffer (one less gzgetc() check) */ + if (state->mode == GZ_READ) { + n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > offset ? + (unsigned)offset : state->x.have; + state->x.have -= n; + state->x.next += n; + state->x.pos += n; + offset -= n; + } + + /* request skip (if not zero) */ + if (offset) { + state->seek = 1; + state->skip = offset; + } + return state->x.pos + offset; +} + +/* -- see zlib.h -- */ +z_off_t ZEXPORT gzseek(file, offset, whence) + gzFile file; + z_off_t offset; + int whence; +{ + z_off64_t ret; + + ret = gzseek64(file, (z_off64_t)offset, whence); + return ret == (z_off_t)ret ? (z_off_t)ret : -1; +} + +/* -- see zlib.h -- */ +z_off64_t ZEXPORT gztell64(file) + gzFile file; +{ + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return -1; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return -1; + + /* return position */ + return state->x.pos + (state->seek ? state->skip : 0); +} + +/* -- see zlib.h -- */ +z_off_t ZEXPORT gztell(file) + gzFile file; +{ + z_off64_t ret; + + ret = gztell64(file); + return ret == (z_off_t)ret ? (z_off_t)ret : -1; +} + +/* -- see zlib.h -- */ +z_off64_t ZEXPORT gzoffset64(file) + gzFile file; +{ + z_off64_t offset; + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return -1; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return -1; + + /* compute and return effective offset in file */ + offset = LSEEK(state->fd, 0, SEEK_CUR); + if (offset == -1) + return -1; + if (state->mode == GZ_READ) /* reading */ + offset -= state->strm.avail_in; /* don't count buffered input */ + return offset; +} + +/* -- see zlib.h -- */ +z_off_t ZEXPORT gzoffset(file) + gzFile file; +{ + z_off64_t ret; + + ret = gzoffset64(file); + return ret == (z_off_t)ret ? (z_off_t)ret : -1; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzeof(file) + gzFile file; +{ + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return 0; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return 0; + + /* return end-of-file state */ + return state->mode == GZ_READ ? state->past : 0; +} + +/* -- see zlib.h -- */ +const char * ZEXPORT gzerror(file, errnum) + gzFile file; + int *errnum; +{ + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return NULL; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return NULL; + + /* return error information */ + if (errnum != NULL) + *errnum = state->err; + return state->err == Z_MEM_ERROR ? "out of memory" : + (state->msg == NULL ? "" : state->msg); +} + +/* -- see zlib.h -- */ +void ZEXPORT gzclearerr(file) + gzFile file; +{ + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return; + + /* clear error and end-of-file */ + if (state->mode == GZ_READ) { + state->eof = 0; + state->past = 0; + } + gz_error(state, Z_OK, NULL); +} + +/* Create an error message in allocated memory and set state->err and + state->msg accordingly. Free any previous error message already there. Do + not try to free or allocate space if the error is Z_MEM_ERROR (out of + memory). Simply save the error message as a static string. If there is an + allocation failure constructing the error message, then convert the error to + out of memory. */ +void ZLIB_INTERNAL gz_error(state, err, msg) + gz_statep state; + int err; + const char *msg; +{ + /* free previously allocated message and clear */ + if (state->msg != NULL) { + if (state->err != Z_MEM_ERROR) + free(state->msg); + state->msg = NULL; + } + + /* if fatal, set state->x.have to 0 so that the gzgetc() macro fails */ + if (err != Z_OK && err != Z_BUF_ERROR) + state->x.have = 0; + + /* set error code, and if no message, then done */ + state->err = err; + if (msg == NULL) + return; + + /* for an out of memory error, return literal string when requested */ + if (err == Z_MEM_ERROR) + return; + + /* construct error message with path */ + if ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) == + NULL) { + state->err = Z_MEM_ERROR; + return; + } +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + (void)snprintf(state->msg, strlen(state->path) + strlen(msg) + 3, + "%s%s%s", state->path, ": ", msg); +#else + strcpy(state->msg, state->path); + strcat(state->msg, ": "); + strcat(state->msg, msg); +#endif +} + +#ifndef INT_MAX +/* portably return maximum value for an int (when limits.h presumed not + available) -- we need to do this to cover cases where 2's complement not + used, since C standard permits 1's complement and sign-bit representations, + otherwise we could just use ((unsigned)-1) >> 1 */ +unsigned ZLIB_INTERNAL gz_intmax() +{ + unsigned p, q; + + p = 1; + do { + q = p; + p <<= 1; + p++; + } while (p > q); + return q >> 1; +} +#endif diff --git a/jdk/src/java.base/share/native/libzip/zlib/gzread.c b/jdk/src/java.base/share/native/libzip/zlib/gzread.c new file mode 100644 index 00000000000..14394c59a9b --- /dev/null +++ b/jdk/src/java.base/share/native/libzip/zlib/gzread.c @@ -0,0 +1,678 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* gzread.c -- zlib functions for reading gzip files + * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "gzguts.h" + +/* Local functions */ +local int gz_load OF((gz_statep, unsigned char *, unsigned, unsigned *)); +local int gz_avail OF((gz_statep)); +local int gz_look OF((gz_statep)); +local int gz_decomp OF((gz_statep)); +local int gz_fetch OF((gz_statep)); +local int gz_skip OF((gz_statep, z_off64_t)); +local z_size_t gz_read OF((gz_statep, voidp, z_size_t)); + +/* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from + state->fd, and update state->eof, state->err, and state->msg as appropriate. + This function needs to loop on read(), since read() is not guaranteed to + read the number of bytes requested, depending on the type of descriptor. */ +local int gz_load(state, buf, len, have) + gz_statep state; + unsigned char *buf; + unsigned len; + unsigned *have; +{ + int ret; + unsigned get, max = ((unsigned)-1 >> 2) + 1; + + *have = 0; + do { + get = len - *have; + if (get > max) + get = max; + ret = read(state->fd, buf + *have, get); + if (ret <= 0) + break; + *have += (unsigned)ret; + } while (*have < len); + if (ret < 0) { + gz_error(state, Z_ERRNO, zstrerror()); + return -1; + } + if (ret == 0) + state->eof = 1; + return 0; +} + +/* Load up input buffer and set eof flag if last data loaded -- return -1 on + error, 0 otherwise. Note that the eof flag is set when the end of the input + file is reached, even though there may be unused data in the buffer. Once + that data has been used, no more attempts will be made to read the file. + If strm->avail_in != 0, then the current data is moved to the beginning of + the input buffer, and then the remainder of the buffer is loaded with the + available data from the input file. */ +local int gz_avail(state) + gz_statep state; +{ + unsigned got; + z_streamp strm = &(state->strm); + + if (state->err != Z_OK && state->err != Z_BUF_ERROR) + return -1; + if (state->eof == 0) { + if (strm->avail_in) { /* copy what's there to the start */ + unsigned char *p = state->in; + unsigned const char *q = strm->next_in; + unsigned n = strm->avail_in; + do { + *p++ = *q++; + } while (--n); + } + if (gz_load(state, state->in + strm->avail_in, + state->size - strm->avail_in, &got) == -1) + return -1; + strm->avail_in += got; + strm->next_in = state->in; + } + return 0; +} + +/* Look for gzip header, set up for inflate or copy. state->x.have must be 0. + If this is the first time in, allocate required memory. state->how will be + left unchanged if there is no more input data available, will be set to COPY + if there is no gzip header and direct copying will be performed, or it will + be set to GZIP for decompression. If direct copying, then leftover input + data from the input buffer will be copied to the output buffer. In that + case, all further file reads will be directly to either the output buffer or + a user buffer. If decompressing, the inflate state will be initialized. + gz_look() will return 0 on success or -1 on failure. */ +local int gz_look(state) + gz_statep state; +{ + z_streamp strm = &(state->strm); + + /* allocate read buffers and inflate memory */ + if (state->size == 0) { + /* allocate buffers */ + state->in = (unsigned char *)malloc(state->want); + state->out = (unsigned char *)malloc(state->want << 1); + if (state->in == NULL || state->out == NULL) { + free(state->out); + free(state->in); + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + state->size = state->want; + + /* allocate inflate memory */ + state->strm.zalloc = Z_NULL; + state->strm.zfree = Z_NULL; + state->strm.opaque = Z_NULL; + state->strm.avail_in = 0; + state->strm.next_in = Z_NULL; + if (inflateInit2(&(state->strm), 15 + 16) != Z_OK) { /* gunzip */ + free(state->out); + free(state->in); + state->size = 0; + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + } + + /* get at least the magic bytes in the input buffer */ + if (strm->avail_in < 2) { + if (gz_avail(state) == -1) + return -1; + if (strm->avail_in == 0) + return 0; + } + + /* look for gzip magic bytes -- if there, do gzip decoding (note: there is + a logical dilemma here when considering the case of a partially written + gzip file, to wit, if a single 31 byte is written, then we cannot tell + whether this is a single-byte file, or just a partially written gzip + file -- for here we assume that if a gzip file is being written, then + the header will be written in a single operation, so that reading a + single byte is sufficient indication that it is not a gzip file) */ + if (strm->avail_in > 1 && + strm->next_in[0] == 31 && strm->next_in[1] == 139) { + inflateReset(strm); + state->how = GZIP; + state->direct = 0; + return 0; + } + + /* no gzip header -- if we were decoding gzip before, then this is trailing + garbage. Ignore the trailing garbage and finish. */ + if (state->direct == 0) { + strm->avail_in = 0; + state->eof = 1; + state->x.have = 0; + return 0; + } + + /* doing raw i/o, copy any leftover input to output -- this assumes that + the output buffer is larger than the input buffer, which also assures + space for gzungetc() */ + state->x.next = state->out; + if (strm->avail_in) { + memcpy(state->x.next, strm->next_in, strm->avail_in); + state->x.have = strm->avail_in; + strm->avail_in = 0; + } + state->how = COPY; + state->direct = 1; + return 0; +} + +/* Decompress from input to the provided next_out and avail_out in the state. + On return, state->x.have and state->x.next point to the just decompressed + data. If the gzip stream completes, state->how is reset to LOOK to look for + the next gzip stream or raw data, once state->x.have is depleted. Returns 0 + on success, -1 on failure. */ +local int gz_decomp(state) + gz_statep state; +{ + int ret = Z_OK; + unsigned had; + z_streamp strm = &(state->strm); + + /* fill output buffer up to end of deflate stream */ + had = strm->avail_out; + do { + /* get more input for inflate() */ + if (strm->avail_in == 0 && gz_avail(state) == -1) + return -1; + if (strm->avail_in == 0) { + gz_error(state, Z_BUF_ERROR, "unexpected end of file"); + break; + } + + /* decompress and handle errors */ + ret = inflate(strm, Z_NO_FLUSH); + if (ret == Z_STREAM_ERROR || ret == Z_NEED_DICT) { + gz_error(state, Z_STREAM_ERROR, + "internal error: inflate stream corrupt"); + return -1; + } + if (ret == Z_MEM_ERROR) { + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + if (ret == Z_DATA_ERROR) { /* deflate stream invalid */ + gz_error(state, Z_DATA_ERROR, + strm->msg == NULL ? "compressed data error" : strm->msg); + return -1; + } + } while (strm->avail_out && ret != Z_STREAM_END); + + /* update available output */ + state->x.have = had - strm->avail_out; + state->x.next = strm->next_out - state->x.have; + + /* if the gzip stream completed successfully, look for another */ + if (ret == Z_STREAM_END) + state->how = LOOK; + + /* good decompression */ + return 0; +} + +/* Fetch data and put it in the output buffer. Assumes state->x.have is 0. + Data is either copied from the input file or decompressed from the input + file depending on state->how. If state->how is LOOK, then a gzip header is + looked for to determine whether to copy or decompress. Returns -1 on error, + otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the + end of the input file has been reached and all data has been processed. */ +local int gz_fetch(state) + gz_statep state; +{ + z_streamp strm = &(state->strm); + + do { + switch(state->how) { + case LOOK: /* -> LOOK, COPY (only if never GZIP), or GZIP */ + if (gz_look(state) == -1) + return -1; + if (state->how == LOOK) + return 0; + break; + case COPY: /* -> COPY */ + if (gz_load(state, state->out, state->size << 1, &(state->x.have)) + == -1) + return -1; + state->x.next = state->out; + return 0; + case GZIP: /* -> GZIP or LOOK (if end of gzip stream) */ + strm->avail_out = state->size << 1; + strm->next_out = state->out; + if (gz_decomp(state) == -1) + return -1; + } + } while (state->x.have == 0 && (!state->eof || strm->avail_in)); + return 0; +} + +/* Skip len uncompressed bytes of output. Return -1 on error, 0 on success. */ +local int gz_skip(state, len) + gz_statep state; + z_off64_t len; +{ + unsigned n; + + /* skip over len bytes or reach end-of-file, whichever comes first */ + while (len) + /* skip over whatever is in output buffer */ + if (state->x.have) { + n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > len ? + (unsigned)len : state->x.have; + state->x.have -= n; + state->x.next += n; + state->x.pos += n; + len -= n; + } + + /* output buffer empty -- return if we're at the end of the input */ + else if (state->eof && state->strm.avail_in == 0) + break; + + /* need more data to skip -- load up output buffer */ + else { + /* get more output, looking for header if required */ + if (gz_fetch(state) == -1) + return -1; + } + return 0; +} + +/* Read len bytes into buf from file, or less than len up to the end of the + input. Return the number of bytes read. If zero is returned, either the + end of file was reached, or there was an error. state->err must be + consulted in that case to determine which. */ +local z_size_t gz_read(state, buf, len) + gz_statep state; + voidp buf; + z_size_t len; +{ + z_size_t got; + unsigned n; + + /* if len is zero, avoid unnecessary operations */ + if (len == 0) + return 0; + + /* process a skip request */ + if (state->seek) { + state->seek = 0; + if (gz_skip(state, state->skip) == -1) + return 0; + } + + /* get len bytes to buf, or less than len if at the end */ + got = 0; + do { + /* set n to the maximum amount of len that fits in an unsigned int */ + n = -1; + if (n > len) + n = (unsigned)len; + + /* first just try copying data from the output buffer */ + if (state->x.have) { + if (state->x.have < n) + n = state->x.have; + memcpy(buf, state->x.next, n); + state->x.next += n; + state->x.have -= n; + } + + /* output buffer empty -- return if we're at the end of the input */ + else if (state->eof && state->strm.avail_in == 0) { + state->past = 1; /* tried to read past end */ + break; + } + + /* need output data -- for small len or new stream load up our output + buffer */ + else if (state->how == LOOK || n < (state->size << 1)) { + /* get more output, looking for header if required */ + if (gz_fetch(state) == -1) + return 0; + continue; /* no progress yet -- go back to copy above */ + /* the copy above assures that we will leave with space in the + output buffer, allowing at least one gzungetc() to succeed */ + } + + /* large len -- read directly into user buffer */ + else if (state->how == COPY) { /* read directly */ + if (gz_load(state, (unsigned char *)buf, n, &n) == -1) + return 0; + } + + /* large len -- decompress directly into user buffer */ + else { /* state->how == GZIP */ + state->strm.avail_out = n; + state->strm.next_out = (unsigned char *)buf; + if (gz_decomp(state) == -1) + return 0; + n = state->x.have; + state->x.have = 0; + } + + /* update progress */ + len -= n; + buf = (char *)buf + n; + got += n; + state->x.pos += n; + } while (len); + + /* return number of bytes read into user buffer */ + return got; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzread(file, buf, len) + gzFile file; + voidp buf; + unsigned len; +{ + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* check that we're reading and that there's no (serious) error */ + if (state->mode != GZ_READ || + (state->err != Z_OK && state->err != Z_BUF_ERROR)) + return -1; + + /* since an int is returned, make sure len fits in one, otherwise return + with an error (this avoids a flaw in the interface) */ + if ((int)len < 0) { + gz_error(state, Z_STREAM_ERROR, "request does not fit in an int"); + return -1; + } + + /* read len or fewer bytes to buf */ + len = (unsigned)gz_read(state, buf, len); + + /* check for an error */ + if (len == 0 && state->err != Z_OK && state->err != Z_BUF_ERROR) + return -1; + + /* return the number of bytes read (this is assured to fit in an int) */ + return (int)len; +} + +/* -- see zlib.h -- */ +z_size_t ZEXPORT gzfread(buf, size, nitems, file) + voidp buf; + z_size_t size; + z_size_t nitems; + gzFile file; +{ + z_size_t len; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return 0; + state = (gz_statep)file; + + /* check that we're reading and that there's no (serious) error */ + if (state->mode != GZ_READ || + (state->err != Z_OK && state->err != Z_BUF_ERROR)) + return 0; + + /* compute bytes to read -- error on overflow */ + len = nitems * size; + if (size && len / size != nitems) { + gz_error(state, Z_STREAM_ERROR, "request does not fit in a size_t"); + return 0; + } + + /* read len or fewer bytes to buf, return the number of full items read */ + return len ? gz_read(state, buf, len) / size : 0; +} + +/* -- see zlib.h -- */ +#ifdef Z_PREFIX_SET +# undef z_gzgetc +#else +# undef gzgetc +#endif +int ZEXPORT gzgetc(file) + gzFile file; +{ + int ret; + unsigned char buf[1]; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* check that we're reading and that there's no (serious) error */ + if (state->mode != GZ_READ || + (state->err != Z_OK && state->err != Z_BUF_ERROR)) + return -1; + + /* try output buffer (no need to check for skip request) */ + if (state->x.have) { + state->x.have--; + state->x.pos++; + return *(state->x.next)++; + } + + /* nothing there -- try gz_read() */ + ret = (int)gz_read(state, buf, 1); + return ret < 1 ? -1 : buf[0]; +} + +int ZEXPORT gzgetc_(file) +gzFile file; +{ + return gzgetc(file); +} + +/* -- see zlib.h -- */ +int ZEXPORT gzungetc(c, file) + int c; + gzFile file; +{ + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* check that we're reading and that there's no (serious) error */ + if (state->mode != GZ_READ || + (state->err != Z_OK && state->err != Z_BUF_ERROR)) + return -1; + + /* process a skip request */ + if (state->seek) { + state->seek = 0; + if (gz_skip(state, state->skip) == -1) + return -1; + } + + /* can't push EOF */ + if (c < 0) + return -1; + + /* if output buffer empty, put byte at end (allows more pushing) */ + if (state->x.have == 0) { + state->x.have = 1; + state->x.next = state->out + (state->size << 1) - 1; + state->x.next[0] = (unsigned char)c; + state->x.pos--; + state->past = 0; + return c; + } + + /* if no room, give up (must have already done a gzungetc()) */ + if (state->x.have == (state->size << 1)) { + gz_error(state, Z_DATA_ERROR, "out of room to push characters"); + return -1; + } + + /* slide output data if needed and insert byte before existing data */ + if (state->x.next == state->out) { + unsigned char *src = state->out + state->x.have; + unsigned char *dest = state->out + (state->size << 1); + while (src > state->out) + *--dest = *--src; + state->x.next = dest; + } + state->x.have++; + state->x.next--; + state->x.next[0] = (unsigned char)c; + state->x.pos--; + state->past = 0; + return c; +} + +/* -- see zlib.h -- */ +char * ZEXPORT gzgets(file, buf, len) + gzFile file; + char *buf; + int len; +{ + unsigned left, n; + char *str; + unsigned char *eol; + gz_statep state; + + /* check parameters and get internal structure */ + if (file == NULL || buf == NULL || len < 1) + return NULL; + state = (gz_statep)file; + + /* check that we're reading and that there's no (serious) error */ + if (state->mode != GZ_READ || + (state->err != Z_OK && state->err != Z_BUF_ERROR)) + return NULL; + + /* process a skip request */ + if (state->seek) { + state->seek = 0; + if (gz_skip(state, state->skip) == -1) + return NULL; + } + + /* copy output bytes up to new line or len - 1, whichever comes first -- + append a terminating zero to the string (we don't check for a zero in + the contents, let the user worry about that) */ + str = buf; + left = (unsigned)len - 1; + if (left) do { + /* assure that something is in the output buffer */ + if (state->x.have == 0 && gz_fetch(state) == -1) + return NULL; /* error */ + if (state->x.have == 0) { /* end of file */ + state->past = 1; /* read past end */ + break; /* return what we have */ + } + + /* look for end-of-line in current output buffer */ + n = state->x.have > left ? left : state->x.have; + eol = (unsigned char *)memchr(state->x.next, '\n', n); + if (eol != NULL) + n = (unsigned)(eol - state->x.next) + 1; + + /* copy through end-of-line, or remainder if not found */ + memcpy(buf, state->x.next, n); + state->x.have -= n; + state->x.next += n; + state->x.pos += n; + left -= n; + buf += n; + } while (left && eol == NULL); + + /* return terminated string, or if nothing, end of file */ + if (buf == str) + return NULL; + buf[0] = 0; + return str; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzdirect(file) + gzFile file; +{ + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return 0; + state = (gz_statep)file; + + /* if the state is not known, but we can find out, then do so (this is + mainly for right after a gzopen() or gzdopen()) */ + if (state->mode == GZ_READ && state->how == LOOK && state->x.have == 0) + (void)gz_look(state); + + /* return 1 if transparent, 0 if processing a gzip stream */ + return state->direct; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzclose_r(file) + gzFile file; +{ + int ret, err; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + + /* check that we're reading */ + if (state->mode != GZ_READ) + return Z_STREAM_ERROR; + + /* free memory and close file */ + if (state->size) { + inflateEnd(&(state->strm)); + free(state->out); + free(state->in); + } + err = state->err == Z_BUF_ERROR ? Z_BUF_ERROR : Z_OK; + gz_error(state, Z_OK, NULL); + free(state->path); + ret = close(state->fd); + free(state); + return ret ? Z_ERRNO : err; +} diff --git a/jdk/src/java.base/share/native/libzip/zlib/gzwrite.c b/jdk/src/java.base/share/native/libzip/zlib/gzwrite.c new file mode 100644 index 00000000000..7a73b7cadf3 --- /dev/null +++ b/jdk/src/java.base/share/native/libzip/zlib/gzwrite.c @@ -0,0 +1,689 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* gzwrite.c -- zlib functions for writing gzip files + * Copyright (C) 2004-2017 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "gzguts.h" + +/* Local functions */ +local int gz_init OF((gz_statep)); +local int gz_comp OF((gz_statep, int)); +local int gz_zero OF((gz_statep, z_off64_t)); +local z_size_t gz_write OF((gz_statep, voidpc, z_size_t)); + +/* Initialize state for writing a gzip file. Mark initialization by setting + state->size to non-zero. Return -1 on a memory allocation failure, or 0 on + success. */ +local int gz_init(state) + gz_statep state; +{ + int ret; + z_streamp strm = &(state->strm); + + /* allocate input buffer (double size for gzprintf) */ + state->in = (unsigned char *)malloc(state->want << 1); + if (state->in == NULL) { + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + + /* only need output buffer and deflate state if compressing */ + if (!state->direct) { + /* allocate output buffer */ + state->out = (unsigned char *)malloc(state->want); + if (state->out == NULL) { + free(state->in); + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + + /* allocate deflate memory, set up for gzip compression */ + strm->zalloc = Z_NULL; + strm->zfree = Z_NULL; + strm->opaque = Z_NULL; + ret = deflateInit2(strm, state->level, Z_DEFLATED, + MAX_WBITS + 16, DEF_MEM_LEVEL, state->strategy); + if (ret != Z_OK) { + free(state->out); + free(state->in); + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + strm->next_in = NULL; + } + + /* mark state as initialized */ + state->size = state->want; + + /* initialize write buffer if compressing */ + if (!state->direct) { + strm->avail_out = state->size; + strm->next_out = state->out; + state->x.next = strm->next_out; + } + return 0; +} + +/* Compress whatever is at avail_in and next_in and write to the output file. + Return -1 if there is an error writing to the output file or if gz_init() + fails to allocate memory, otherwise 0. flush is assumed to be a valid + deflate() flush value. If flush is Z_FINISH, then the deflate() state is + reset to start a new gzip stream. If gz->direct is true, then simply write + to the output file without compressing, and ignore flush. */ +local int gz_comp(state, flush) + gz_statep state; + int flush; +{ + int ret, writ; + unsigned have, put, max = ((unsigned)-1 >> 2) + 1; + z_streamp strm = &(state->strm); + + /* allocate memory if this is the first time through */ + if (state->size == 0 && gz_init(state) == -1) + return -1; + + /* write directly if requested */ + if (state->direct) { + while (strm->avail_in) { + put = strm->avail_in > max ? max : strm->avail_in; + writ = write(state->fd, strm->next_in, put); + if (writ < 0) { + gz_error(state, Z_ERRNO, zstrerror()); + return -1; + } + strm->avail_in -= (unsigned)writ; + strm->next_in += writ; + } + return 0; + } + + /* run deflate() on provided input until it produces no more output */ + ret = Z_OK; + do { + /* write out current buffer contents if full, or if flushing, but if + doing Z_FINISH then don't write until we get to Z_STREAM_END */ + if (strm->avail_out == 0 || (flush != Z_NO_FLUSH && + (flush != Z_FINISH || ret == Z_STREAM_END))) { + while (strm->next_out > state->x.next) { + put = strm->next_out - state->x.next > (int)max ? max : + (unsigned)(strm->next_out - state->x.next); + writ = write(state->fd, state->x.next, put); + if (writ < 0) { + gz_error(state, Z_ERRNO, zstrerror()); + return -1; + } + state->x.next += writ; + } + if (strm->avail_out == 0) { + strm->avail_out = state->size; + strm->next_out = state->out; + state->x.next = state->out; + } + } + + /* compress */ + have = strm->avail_out; + ret = deflate(strm, flush); + if (ret == Z_STREAM_ERROR) { + gz_error(state, Z_STREAM_ERROR, + "internal error: deflate stream corrupt"); + return -1; + } + have -= strm->avail_out; + } while (have); + + /* if that completed a deflate stream, allow another to start */ + if (flush == Z_FINISH) + deflateReset(strm); + + /* all done, no errors */ + return 0; +} + +/* Compress len zeros to output. Return -1 on a write error or memory + allocation failure by gz_comp(), or 0 on success. */ +local int gz_zero(state, len) + gz_statep state; + z_off64_t len; +{ + int first; + unsigned n; + z_streamp strm = &(state->strm); + + /* consume whatever's left in the input buffer */ + if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) + return -1; + + /* compress len zeros (len guaranteed > 0) */ + first = 1; + while (len) { + n = GT_OFF(state->size) || (z_off64_t)state->size > len ? + (unsigned)len : state->size; + if (first) { + memset(state->in, 0, n); + first = 0; + } + strm->avail_in = n; + strm->next_in = state->in; + state->x.pos += n; + if (gz_comp(state, Z_NO_FLUSH) == -1) + return -1; + len -= n; + } + return 0; +} + +/* Write len bytes from buf to file. Return the number of bytes written. If + the returned value is less than len, then there was an error. */ +local z_size_t gz_write(state, buf, len) + gz_statep state; + voidpc buf; + z_size_t len; +{ + z_size_t put = len; + + /* if len is zero, avoid unnecessary operations */ + if (len == 0) + return 0; + + /* allocate memory if this is the first time through */ + if (state->size == 0 && gz_init(state) == -1) + return 0; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return 0; + } + + /* for small len, copy to input buffer, otherwise compress directly */ + if (len < state->size) { + /* copy to input buffer, compress when full */ + do { + unsigned have, copy; + + if (state->strm.avail_in == 0) + state->strm.next_in = state->in; + have = (unsigned)((state->strm.next_in + state->strm.avail_in) - + state->in); + copy = state->size - have; + if (copy > len) + copy = (unsigned)len; + memcpy(state->in + have, buf, copy); + state->strm.avail_in += copy; + state->x.pos += copy; + buf = (const char *)buf + copy; + len -= copy; + if (len && gz_comp(state, Z_NO_FLUSH) == -1) + return 0; + } while (len); + } + else { + /* consume whatever's left in the input buffer */ + if (state->strm.avail_in && gz_comp(state, Z_NO_FLUSH) == -1) + return 0; + + /* directly compress user buffer to file */ + state->strm.next_in = (z_const Bytef *)buf; + do { + unsigned n = (unsigned)-1; + if (n > len) + n = (unsigned)len; + state->strm.avail_in = n; + state->x.pos += n; + if (gz_comp(state, Z_NO_FLUSH) == -1) + return 0; + len -= n; + } while (len); + } + + /* input was all buffered or compressed */ + return put; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzwrite(file, buf, len) + gzFile file; + voidpc buf; + unsigned len; +{ + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return 0; + state = (gz_statep)file; + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return 0; + + /* since an int is returned, make sure len fits in one, otherwise return + with an error (this avoids a flaw in the interface) */ + if ((int)len < 0) { + gz_error(state, Z_DATA_ERROR, "requested length does not fit in int"); + return 0; + } + + /* write len bytes from buf (the return value will fit in an int) */ + return (int)gz_write(state, buf, len); +} + +/* -- see zlib.h -- */ +z_size_t ZEXPORT gzfwrite(buf, size, nitems, file) + voidpc buf; + z_size_t size; + z_size_t nitems; + gzFile file; +{ + z_size_t len; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return 0; + state = (gz_statep)file; + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return 0; + + /* compute bytes to read -- error on overflow */ + len = nitems * size; + if (size && len / size != nitems) { + gz_error(state, Z_STREAM_ERROR, "request does not fit in a size_t"); + return 0; + } + + /* write len bytes to buf, return the number of full items written */ + return len ? gz_write(state, buf, len) / size : 0; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzputc(file, c) + gzFile file; + int c; +{ + unsigned have; + unsigned char buf[1]; + gz_statep state; + z_streamp strm; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return -1; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return -1; + } + + /* try writing to input buffer for speed (state->size == 0 if buffer not + initialized) */ + if (state->size) { + if (strm->avail_in == 0) + strm->next_in = state->in; + have = (unsigned)((strm->next_in + strm->avail_in) - state->in); + if (have < state->size) { + state->in[have] = (unsigned char)c; + strm->avail_in++; + state->x.pos++; + return c & 0xff; + } + } + + /* no room in buffer or not initialized, use gz_write() */ + buf[0] = (unsigned char)c; + if (gz_write(state, buf, 1) != 1) + return -1; + return c & 0xff; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzputs(file, str) + gzFile file; + const char *str; +{ + int ret; + z_size_t len; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return -1; + + /* write string */ + len = strlen(str); + ret = (int)gz_write(state, str, len); + return ret == 0 && len != 0 ? -1 : ret; +} + +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +#include + +/* -- see zlib.h -- */ +int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va) +{ + int len; + unsigned left; + char *next; + gz_statep state; + z_streamp strm; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return Z_STREAM_ERROR; + + /* make sure we have some buffer space */ + if (state->size == 0 && gz_init(state) == -1) + return state->err; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return state->err; + } + + /* do the printf() into the input buffer, put length in len -- the input + buffer is double-sized just for this function, so there is guaranteed to + be state->size bytes available after the current contents */ + if (strm->avail_in == 0) + strm->next_in = state->in; + next = (char *)(state->in + (strm->next_in - state->in) + strm->avail_in); + next[state->size - 1] = 0; +#ifdef NO_vsnprintf +# ifdef HAS_vsprintf_void + (void)vsprintf(next, format, va); + for (len = 0; len < state->size; len++) + if (next[len] == 0) break; +# else + len = vsprintf(next, format, va); +# endif +#else +# ifdef HAS_vsnprintf_void + (void)vsnprintf(next, state->size, format, va); + len = strlen(next); +# else + len = vsnprintf(next, state->size, format, va); +# endif +#endif + + /* check that printf() results fit in buffer */ + if (len == 0 || (unsigned)len >= state->size || next[state->size - 1] != 0) + return 0; + + /* update buffer and position, compress first half if past that */ + strm->avail_in += (unsigned)len; + state->x.pos += len; + if (strm->avail_in >= state->size) { + left = strm->avail_in - state->size; + strm->avail_in = state->size; + if (gz_comp(state, Z_NO_FLUSH) == -1) + return state->err; + memcpy(state->in, state->in + state->size, left); + strm->next_in = state->in; + strm->avail_in = left; + } + return len; +} + +int ZEXPORTVA gzprintf(gzFile file, const char *format, ...) +{ + va_list va; + int ret; + + va_start(va, format); + ret = gzvprintf(file, format, va); + va_end(va); + return ret; +} + +#else /* !STDC && !Z_HAVE_STDARG_H */ + +/* -- see zlib.h -- */ +int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, + a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) + gzFile file; + const char *format; + int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, + a11, a12, a13, a14, a15, a16, a17, a18, a19, a20; +{ + unsigned len, left; + char *next; + gz_statep state; + z_streamp strm; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that can really pass pointer in ints */ + if (sizeof(int) != sizeof(void *)) + return Z_STREAM_ERROR; + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return Z_STREAM_ERROR; + + /* make sure we have some buffer space */ + if (state->size == 0 && gz_init(state) == -1) + return state->error; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return state->error; + } + + /* do the printf() into the input buffer, put length in len -- the input + buffer is double-sized just for this function, so there is guaranteed to + be state->size bytes available after the current contents */ + if (strm->avail_in == 0) + strm->next_in = state->in; + next = (char *)(strm->next_in + strm->avail_in); + next[state->size - 1] = 0; +#ifdef NO_snprintf +# ifdef HAS_sprintf_void + sprintf(next, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, + a13, a14, a15, a16, a17, a18, a19, a20); + for (len = 0; len < size; len++) + if (next[len] == 0) + break; +# else + len = sprintf(next, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, + a12, a13, a14, a15, a16, a17, a18, a19, a20); +# endif +#else +# ifdef HAS_snprintf_void + snprintf(next, state->size, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, + a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); + len = strlen(next); +# else + len = snprintf(next, state->size, format, a1, a2, a3, a4, a5, a6, a7, a8, + a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); +# endif +#endif + + /* check that printf() results fit in buffer */ + if (len == 0 || len >= state->size || next[state->size - 1] != 0) + return 0; + + /* update buffer and position, compress first half if past that */ + strm->avail_in += len; + state->x.pos += len; + if (strm->avail_in >= state->size) { + left = strm->avail_in - state->size; + strm->avail_in = state->size; + if (gz_comp(state, Z_NO_FLUSH) == -1) + return state->err; + memcpy(state->in, state->in + state->size, left); + strm->next_in = state->in; + strm->avail_in = left; + } + return (int)len; +} + +#endif + +/* -- see zlib.h -- */ +int ZEXPORT gzflush(file, flush) + gzFile file; + int flush; +{ + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return Z_STREAM_ERROR; + + /* check flush parameter */ + if (flush < 0 || flush > Z_FINISH) + return Z_STREAM_ERROR; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return state->err; + } + + /* compress remaining data with requested flush */ + (void)gz_comp(state, flush); + return state->err; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzsetparams(file, level, strategy) + gzFile file; + int level; + int strategy; +{ + gz_statep state; + z_streamp strm; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return Z_STREAM_ERROR; + + /* if no change is requested, then do nothing */ + if (level == state->level && strategy == state->strategy) + return Z_OK; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return state->err; + } + + /* change compression parameters for subsequent input */ + if (state->size) { + /* flush previous input with previous parameters before changing */ + if (strm->avail_in && gz_comp(state, Z_BLOCK) == -1) + return state->err; + deflateParams(strm, level, strategy); + } + state->level = level; + state->strategy = strategy; + return Z_OK; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzclose_w(file) + gzFile file; +{ + int ret = Z_OK; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + + /* check that we're writing */ + if (state->mode != GZ_WRITE) + return Z_STREAM_ERROR; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + ret = state->err; + } + + /* flush, free memory, and close file */ + if (gz_comp(state, Z_FINISH) == -1) + ret = state->err; + if (state->size) { + if (!state->direct) { + (void)deflateEnd(&(state->strm)); + free(state->out); + } + free(state->in); + } + gz_error(state, Z_OK, NULL); + free(state->path); + if (close(state->fd) == -1) + ret = Z_ERRNO; + free(state); + return ret; +} diff --git a/jdk/src/java.base/share/native/libzip/zlib/patches/ChangeLog_java b/jdk/src/java.base/share/native/libzip/zlib/patches/ChangeLog_java index 86011279eba..d5615a62140 100644 --- a/jdk/src/java.base/share/native/libzip/zlib/patches/ChangeLog_java +++ b/jdk/src/java.base/share/native/libzip/zlib/patches/ChangeLog_java @@ -3,23 +3,18 @@ (2) zconf.h: - added _LP64 to make uLong a 32-bit int on 64-bit platform uLong -> 32-bit int - - commented out gz* related def -------------------------- 35,37d10 < /* for _LP64 */ < #include -< -89d61 -< /* -128d99 -< */ -423,426d393 -< +< +421,424d393 +< < #ifdef _LP64 < typedef unsigned int uLong; /* 32 bits or more */ < #else -428d394 +426d394 < #endif -------------------------- @@ -51,17 +46,36 @@ -------------------------- +(4) gzread.c -(4) zutil.c - commented out gz* -------------------------- -33d8 -< -35d9 -< /* -37d10 -< */ +343c319 +< n = (unsigned)len; +--- +> n = len; +424c400 +< len = (unsigned)gz_read(state, buf, len); +--- +> len = gz_read(state, buf, len); +496c472 +< ret = (int)gz_read(state, buf, 1); +--- +> ret = gz_read(state, buf, 1); -------------------------- +(5) gzwrite.c + +-------------------------- +236c212 +< copy = (unsigned)len; +--- +> copy = len; +256c232 +< n = (unsigned)len; +--- +> n = len; +-------------------------- + + diff --git a/jdk/src/java.base/share/native/libzip/zlib/zconf.h b/jdk/src/java.base/share/native/libzip/zlib/zconf.h index 515b33963ac..9b920116be8 100644 --- a/jdk/src/java.base/share/native/libzip/zlib/zconf.h +++ b/jdk/src/java.base/share/native/libzip/zlib/zconf.h @@ -86,7 +86,6 @@ # define deflate_copyright z_deflate_copyright # define get_crc_table z_get_crc_table # ifndef Z_SOLO -/* # define gz_error z_gz_error # define gz_intmax z_gz_intmax # define gz_strwinerror z_gz_strwinerror @@ -125,7 +124,6 @@ # define gzungetc z_gzungetc # define gzvprintf z_gzvprintf # define gzwrite z_gzwrite -*/ # endif # define inflate z_inflate # define inflateBack z_inflateBack diff --git a/jdk/src/java.base/share/native/libzip/zlib/zutil.c b/jdk/src/java.base/share/native/libzip/zlib/zutil.c index 3412cbde8f6..a0c88928068 100644 --- a/jdk/src/java.base/share/native/libzip/zlib/zutil.c +++ b/jdk/src/java.base/share/native/libzip/zlib/zutil.c @@ -32,9 +32,7 @@ #include "zutil.h" #ifndef Z_SOLO -/* # include "gzguts.h" -*/ #endif z_const char * const z_errmsg[10] = { From f696b8540295e9cd12bf2d0c676354b4d454b546 Mon Sep 17 00:00:00 2001 From: Vikrant Agarwal Date: Wed, 15 Feb 2017 23:35:52 -0800 Subject: [PATCH 229/447] 8174161: [TESTBUG] Create test for SwingSet DialogDemo Reviewed-by: serb, mrkam --- .../client/SwingSet/src/DialogDemoTest.java | 104 +++++++++++ .../client/SwingSet/src/TestHelpers.java | 24 +++ .../swingset3/demos/dialog/DialogDemo.java | 162 ++++++++++++++++++ .../src/org/netbeans/jemmy/WindowWaiter.java | 86 ++++++++++ .../jemmy/operators/ComponentOperator.java | 83 +++++++++ 5 files changed, 459 insertions(+) create mode 100644 jdk/test/sanity/client/SwingSet/src/DialogDemoTest.java create mode 100644 jdk/test/sanity/client/SwingSet/src/TestHelpers.java create mode 100644 jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/dialog/DialogDemo.java diff --git a/jdk/test/sanity/client/SwingSet/src/DialogDemoTest.java b/jdk/test/sanity/client/SwingSet/src/DialogDemoTest.java new file mode 100644 index 00000000000..69ee970373b --- /dev/null +++ b/jdk/test/sanity/client/SwingSet/src/DialogDemoTest.java @@ -0,0 +1,104 @@ + +/* + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +import org.jtregext.GuiTestListener; +import com.sun.swingset3.demos.dialog.DialogDemo; +import static com.sun.swingset3.demos.dialog.DialogDemo.*; +import java.awt.Dimension; +import java.awt.Point; +import javax.swing.JDialog; +import static org.testng.AssertJUnit.*; +import org.testng.annotations.Test; +import static org.jemmy2ext.JemmyExt.isIconified; +import static org.jemmy2ext.JemmyExt.ByClassChooser; +import org.netbeans.jemmy.ClassReference; +import org.netbeans.jemmy.ComponentChooser; +import static org.netbeans.jemmy.WindowWaiter.countWindows; +import org.netbeans.jemmy.operators.JFrameOperator; +import org.netbeans.jemmy.operators.JDialogOperator; +import org.netbeans.jemmy.operators.JLabelOperator; +import org.netbeans.jemmy.operators.JButtonOperator; +import org.testng.annotations.Listeners; + +/* + * @test + * @key headful + * @summary Verifies SwingSet3 DialogDemo by checking that separate JDialog is + * shown, it contains predefined label and no new dialogs are opened + * when the "Show JDialog..." button is clicked. + * + * @library /sanity/client/lib/jemmy/src + * @library /sanity/client/lib/Extensions/src + * @library /sanity/client/lib/SwingSet3/src + * @modules java.desktop + * java.logging + * @build org.jemmy2ext.JemmyExt + * @build com.sun.swingset3.demos.dialog.DialogDemo + * @run testng DialogDemoTest + */ +@Listeners(GuiTestListener.class) +public class DialogDemoTest { + + private final ComponentChooser jDialogClassChooser = new ByClassChooser(JDialog.class); + + @Test + public void test() throws Exception { + new ClassReference(DialogDemo.class.getCanonicalName()).startApplication(); + JFrameOperator mainFrame = new JFrameOperator(DIALOG_DEMO_TITLE); + JDialogOperator dialog = new JDialogOperator(DIALOG_TITLE); + JButtonOperator showJDialogButton = new JButtonOperator(mainFrame, SHOW_BUTTON_TITLE); + initialCheckWithLabel(mainFrame, dialog); + checkShowDialogButton(dialog, showJDialogButton); + TestHelpers.checkChangeSize(dialog, new Dimension(dialog.getSize().width * 2, + dialog.getSize().height * 2)); + TestHelpers.checkChangeLocation(dialog, new Point(dialog.getLocation().x + 100, + dialog.getLocation().y + 100)); + } + + private void initialCheckWithLabel(JFrameOperator frame, JDialogOperator jdo) { + JLabelOperator label = new JLabelOperator(jdo); + assertFalse("JFrame is not iconified", isIconified(frame)); + assertEquals("Only one JDialog is present", 1, + countWindows(jDialogClassChooser)); + assertEquals(LABEL_CONTENT, label.getText()); + } + + private void checkShowDialogButton(JDialogOperator jdo, JButtonOperator jbo) + throws InterruptedException { + //Check that the button does not change the number of JDialog + jbo.push(); + Thread.sleep(500); + assertEquals("Only one JDialog is present", 1, + countWindows(jDialogClassChooser)); + assertTrue("Check JDialog is visible", jdo.isVisible()); + jdo.requestClose(); + jdo.waitClosed(); + //Check that the button makes the JDialog visible + //and that 1 jDialog is present. + jbo.push(); + jdo.waitComponentVisible(true); + Thread.sleep(500); + assertEquals("Only one JDialog is present", 1, + countWindows(jDialogClassChooser)); + } +} diff --git a/jdk/test/sanity/client/SwingSet/src/TestHelpers.java b/jdk/test/sanity/client/SwingSet/src/TestHelpers.java new file mode 100644 index 00000000000..24c2e9d561e --- /dev/null +++ b/jdk/test/sanity/client/SwingSet/src/TestHelpers.java @@ -0,0 +1,24 @@ + +import java.awt.Dimension; +import java.awt.Point; + +import org.netbeans.jemmy.operators.ComponentOperator; + +public class TestHelpers { + + public static void checkChangeLocation(ComponentOperator component, + Point finalLocation) { + Point initialLocation = component.getLocation(); + component.setLocation(finalLocation); + component.waitComponentLocation(finalLocation); + component.setLocation(initialLocation); + } + + public static void checkChangeSize(ComponentOperator component, + Dimension dimensionFinal) { + Dimension dimensionInitial = component.getSize(); + component.setSize(dimensionFinal); + component.waitComponentSize(dimensionFinal); + component.setSize(dimensionInitial); + } +} diff --git a/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/dialog/DialogDemo.java b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/dialog/DialogDemo.java new file mode 100644 index 00000000000..4ff166cfd65 --- /dev/null +++ b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/dialog/DialogDemo.java @@ -0,0 +1,162 @@ +/* + * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.sun.swingset3.demos.dialog; + +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import javax.swing.*; +import javax.swing.border.EmptyBorder; +import com.sun.swingset3.DemoProperties; +import com.sun.swingset3.demos.DemoUtilities; +import com.sun.swingset3.demos.ResourceManager; +import com.sun.swingset3.demos.slider.SliderDemo; + +/** + * + * @author aim + */ +@DemoProperties( + value = "JDialog Demo", + category = "Toplevel Containers", + description = "Demonstrates JDialog, Swing's top-level dialog container.", + sourceFiles = { + "com/sun/swingset3/demos/dialog/DialogDemo.java", + "com/sun/swingset3/demos/DemoUtilities.java", + "com/sun/swingset3/demos/dialog/resources/images/DialogDemo.gif" + } +) +public class DialogDemo extends JPanel { + + private JDialog dialog; + private JComponent dialogSpaceholder; + + public static final String DIALOG_TITLE = "Demo JDialog"; + public static final String SHOW_BUTTON_TITLE = "Show JDialog..."; + public static final String LABEL_CONTENT = "I'm content."; + public static final String DIALOG_DEMO_TITLE = DialogDemo.class + .getAnnotation(DemoProperties.class).value(); + + public DialogDemo() { + initComponents(); + } + + protected void initComponents() { + dialog = createDialog(); + + setLayout(new BorderLayout()); + + add(createControlPanel(), BorderLayout.WEST); + dialogSpaceholder = createDialogSpaceholder(dialog); + add(dialogSpaceholder, BorderLayout.CENTER); + } + + private static JComponent createDialogSpaceholder(JDialog dialog) { + // Create placeholder panel to provide space in which to + // display the toplevel dialog so that the control panel is not + // obscured by it. + JPanel placeholder = new JPanel(); + Dimension prefSize = dialog.getPreferredSize(); + prefSize.width += 12; + prefSize.height += 12; + placeholder.setPreferredSize(prefSize); + return placeholder; + } + + protected JComponent createControlPanel() { + // Create control panel on Left + Box panel = Box.createVerticalBox(); + panel.setBorder(new EmptyBorder(8, 8, 8, 8)); + + // Create button to control visibility of frame + JButton showButton = new JButton(SHOW_BUTTON_TITLE); + showButton.addActionListener(new ShowActionListener()); + panel.add(showButton); + + return panel; + } + + private static JDialog createDialog() { + + //Create dialog + JDialog dialog = new JDialog(new JFrame(), DIALOG_TITLE, false); + // + + //Add dialog's content + JLabel label = new JLabel(LABEL_CONTENT); + label.setHorizontalAlignment(JLabel.CENTER); + label.setPreferredSize(new Dimension(200, 140)); + dialog.add(label); + // + + //Initialize dialog's size + // which will shrink-to-fit its contents + dialog.pack(); + // + + return dialog; + } + + public void start() { + DemoUtilities.setToplevelLocation(dialog, dialogSpaceholder, SwingConstants.CENTER); + showDialog(); + } + + public void stop() { + //Hide dialog + dialog.setVisible(false); + // + } + + public void showDialog() { + //Show dialog + // if dialog already visible, then bring to the front + if (dialog.isShowing()) { + dialog.toFront(); + } else { + dialog.setVisible(true); + } + // + } + + private class ShowActionListener implements ActionListener { + + public void actionPerformed(ActionEvent actionEvent) { + showDialog(); + } + } + + public static void main(String args[]) { + EventQueue.invokeLater(new Runnable() { + public void run() { + JFrame frame = new JFrame(DIALOG_DEMO_TITLE); + DialogDemo demo = new DialogDemo(); + frame.add(demo); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.pack(); + frame.setVisible(true); + demo.start(); + } + }); + } +} diff --git a/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/WindowWaiter.java b/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/WindowWaiter.java index 7d480000fd6..4ca6949fa71 100644 --- a/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/WindowWaiter.java +++ b/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/WindowWaiter.java @@ -25,6 +25,7 @@ package org.netbeans.jemmy; import java.awt.Component; import java.awt.Frame; import java.awt.Window; +import java.util.stream.Stream; /** * A WindowWaiter is a utility class used to look or wait for Windows. It @@ -282,6 +283,91 @@ public class WindowWaiter extends Waiter implements Timeoutable { return waitWindow(o, ch, 0); } + /** + * Wait till the count of windows which meet the the search criteria becomes + * equal to count. + * + * @param ch a component chooser used to define and apply the search + * criteria. + * @param count the number of expected windows meeting the search criteria. + * @throws InterruptedException + */ + public static void waitWindowCount(ComponentChooser ch, int count) + throws InterruptedException { + waitWindowCount(null, ch, count); + } + + /** + * Wait till the count of windows which meet the the search criteria becomes + * equal to count. + * + * @param owner The owner window of all the windows to be checked + * @param ch a component chooser used to define and apply the search + * criteria. + * @param count the number of expected windows meeting the search criteria. + * @throws InterruptedException + */ + public static void waitWindowCount(Window owner, ComponentChooser ch, int count) + throws InterruptedException { + Waiter stateWaiter = new Waiter<>(new Waitable() { + @Override + public String actionProduced(Void obj) { + return countWindows(owner, ch) == count ? "" : null; + } + + @Override + public String getDescription() { + return "Wait till the count of windows matching the criteria " + + "specified by ComponentChooser reaches :" + count; + } + + @Override + public String toString() { + return "Operator.waitState.Waitable{description = " + + getDescription() + '}'; + } + }); + stateWaiter.waitAction(null); + } + + /** + * Counts all the windows owned by the owner window which match the + * criterion specified by component chooser. + * + * @param owner The owner window of all the windows to be checked + * @param ch A component chooser used to define and apply the search + * criteria + * @return the number of matched windows + */ + public static int countWindows(Window owner, ComponentChooser ch) { + return new QueueTool().invokeAndWait(new QueueTool.QueueAction(null) { + + @Override + public Integer launch() { + Window[] windows; + if (owner == null) { + windows = Window.getWindows(); + } else { + windows = owner.getOwnedWindows(); + } + return (int) Stream.of(windows) + .filter(x -> ch.checkComponent(x)).count(); + } + }); + } + + /** + * Counts all the windows which match the criterion specified by component + * chooser. + * + * @param ch A component chooser used to define and apply the search + * criteria + * @return the number of matched windows + */ + public static int countWindows(ComponentChooser ch) { + return countWindows(null, ch); + } + @Override public String getDescription() { return chooser.getDescription(); diff --git a/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/ComponentOperator.java b/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/ComponentOperator.java index 804ad6e4449..3d647ed9df1 100644 --- a/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/ComponentOperator.java +++ b/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/ComponentOperator.java @@ -57,6 +57,8 @@ import java.io.PrintWriter; import java.util.Hashtable; import java.util.Locale; +import static java.lang.Math.abs; + import org.netbeans.jemmy.CharBindingMap; import org.netbeans.jemmy.ComponentChooser; import org.netbeans.jemmy.ComponentSearcher; @@ -1136,6 +1138,87 @@ public class ComponentOperator extends Operator }); } + /** + * Wait till the Size of the component becomes as expected. + * + * @param exactSize the exact expected size. + */ + public void waitComponentSize(Dimension exactSize) { + waitComponentSize(exactSize, exactSize); + } + + /** + * Wait till the Size of the component becomes between minSize and maxSize. + * + * @param minSize the minimum allowed size. + * @param maxSize the maximum allowed size. + */ + public void waitComponentSize(Dimension minSize, Dimension maxSize) { + waitState(new ComponentChooser() { + @Override + public boolean checkComponent(Component comp) { + Dimension componentSize = comp.getSize(); + return componentSize.height >= minSize.height + && componentSize.height <= maxSize.height + && componentSize.width >= minSize.width + && componentSize.width <= maxSize.width; + } + + @Override + public String getDescription() { + return "Component Size becomes between: " + minSize + + "and " + maxSize; + } + + @Override + public String toString() { + return "ComponentOperator.waitComponentSize" + + ".Waitable{description = " + getDescription() + '}'; + } + }); + } + + /** + * Wait till the component reaches exact location. + * + * @param exactlocation exact expected location. + */ + public void waitComponentLocation(Point exactlocation) { + waitComponentLocation(exactlocation, exactlocation); + } + + /** + * Wait till the component reaches location between minLocation and + * maxLocation + * + * @param minLocation minimum expected location. + * @param maxLocation maximum expected location. + */ + public void waitComponentLocation(Point minLocation, Point maxLocation) { + waitState(new ComponentChooser() { + @Override + public boolean checkComponent(Component comp) { + Point componentLocation = comp.getLocation(); + return componentLocation.x >= minLocation.x + && componentLocation.x <= maxLocation.x + && componentLocation.y >= minLocation.y + && componentLocation.y <= maxLocation.y; + } + + @Override + public String getDescription() { + return "Component reaches location between :" + minLocation + + "and " + maxLocation; + } + + @Override + public String toString() { + return "ComponentOperator.waitComponentLocation" + + ".Waitable{description = " + getDescription() + '}'; + } + }); + } + /** * Returns information about component. */ From e2a9410aa3d85df247fd513cbad74d1855283cac Mon Sep 17 00:00:00 2001 From: Vikrant Agarwal Date: Wed, 15 Feb 2017 23:43:50 -0800 Subject: [PATCH 230/447] 8172489: [TESTBUG] Create test for SwingSet DialogDemo Reviewed-by: shurailine, prr, mrkam --- .../drivers/scrolling/JSliderAPIDriver.java | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/drivers/scrolling/JSliderAPIDriver.java b/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/drivers/scrolling/JSliderAPIDriver.java index 290c431f6f6..9fbff80ce3e 100644 --- a/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/drivers/scrolling/JSliderAPIDriver.java +++ b/jdk/test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/drivers/scrolling/JSliderAPIDriver.java @@ -66,20 +66,15 @@ public class JSliderAPIDriver extends AbstractScrollDriver { if (adj.getScrollDirection() == ScrollAdjuster.DECREASE_SCROLL_DIRECTION) { newValue = (scroll.getValue() > scroll.getMinimum() + getUnitIncrement(scroll)) - ? scroll.getValue() - getUnitIncrement(scroll) - : scroll.getMinimum(); + ? scroll.getValue() - getUnitIncrement(scroll) + : scroll.getMinimum(); + scroll.setValue(newValue); } else if (adj.getScrollDirection() == ScrollAdjuster.INCREASE_SCROLL_DIRECTION) { newValue = (scroll.getValue() < scroll.getMaximum() - getUnitIncrement(scroll)) - ? scroll.getValue() + getUnitIncrement(scroll) - : scroll.getMaximum(); - } - setValue(oper, newValue); - } - - private void setValue(ComponentOperator oper, int value) { - if (value != -1) { - ((JSliderOperator) oper).setValue(value); + ? scroll.getValue() + getUnitIncrement(scroll) + : scroll.getMaximum(); + scroll.setValue(newValue); } } @@ -96,15 +91,16 @@ public class JSliderAPIDriver extends AbstractScrollDriver { if (adj.getScrollDirection() == ScrollAdjuster.DECREASE_SCROLL_DIRECTION) { newValue = (scroll.getValue() > scroll.getMinimum() + getBlockIncrement(scroll)) - ? scroll.getValue() - getBlockIncrement(scroll) - : scroll.getMinimum(); + ? scroll.getValue() - getBlockIncrement(scroll) + : scroll.getMinimum(); + scroll.setValue(newValue); } else if (adj.getScrollDirection() == ScrollAdjuster.INCREASE_SCROLL_DIRECTION) { newValue = (scroll.getValue() < scroll.getMaximum() - getBlockIncrement(scroll)) - ? scroll.getValue() + getBlockIncrement(scroll) - : scroll.getMaximum(); + ? scroll.getValue() + getBlockIncrement(scroll) + : scroll.getMaximum(); + scroll.setValue(newValue); } - setValue(oper, newValue); } @Override From 4e9173198a5df3227b3e415e91bc04779733cee5 Mon Sep 17 00:00:00 2001 From: Erik Joelsson Date: Thu, 16 Feb 2017 09:04:49 +0100 Subject: [PATCH 231/447] 8174895: test/TestCommon.gmk: value of JTREG_TESTVM_MEMORY_OPTION is missing Reviewed-by: dholmes, ihse --- test/TestCommon.gmk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/TestCommon.gmk b/test/TestCommon.gmk index 4aecf79a0fb..4529d7375a6 100644 --- a/test/TestCommon.gmk +++ b/test/TestCommon.gmk @@ -370,7 +370,7 @@ endif # Give tests access to JT_JAVA, see JDK-8141609 JTREG_BASIC_OPTIONS += -e:JDK8_HOME=${JT_JAVA} # Set other vm and test options -JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_OPTIONS:%=-vmoption:%) $(JAVA_VM_ARGS:%=-vmoption:%) +JTREG_TEST_OPTIONS += $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_OPTIONS:%=-vmoption:%) $(JAVA_VM_ARGS:%=-vmoption:%) ifeq ($(IGNORE_MARKED_TESTS), true) # Option to tell jtreg to not run tests marked with "ignore" From 32417007765e10a9ba4d8b001877ee6042076493 Mon Sep 17 00:00:00 2001 From: Jini George Date: Thu, 16 Feb 2017 17:40:12 +0530 Subject: [PATCH 232/447] 8175054: Move new TestPrintMdo.java to hotspot/test directory Fixing incorrect push caused by changeset 12633:c809fcb66c81 Reviewed-by: dholmes --- hotspot/{hotspot => }/test/serviceability/sa/TestPrintMdo.java | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename hotspot/{hotspot => }/test/serviceability/sa/TestPrintMdo.java (100%) diff --git a/hotspot/hotspot/test/serviceability/sa/TestPrintMdo.java b/hotspot/test/serviceability/sa/TestPrintMdo.java similarity index 100% rename from hotspot/hotspot/test/serviceability/sa/TestPrintMdo.java rename to hotspot/test/serviceability/sa/TestPrintMdo.java From 854b2dd10a8d7f9c04ec04ae0fa609c9d2204a09 Mon Sep 17 00:00:00 2001 From: Volker Simonis Date: Thu, 16 Feb 2017 09:40:51 +0100 Subject: [PATCH 233/447] 8174856: [TESTBUG] Missing DefineClass instances Reviewed-by: dholmes, ddmitriev --- hotspot/test/runtime/Metaspace/DefineClass.java | 1 + 1 file changed, 1 insertion(+) diff --git a/hotspot/test/runtime/Metaspace/DefineClass.java b/hotspot/test/runtime/Metaspace/DefineClass.java index 3e3f730b7db..4563e56366f 100644 --- a/hotspot/test/runtime/Metaspace/DefineClass.java +++ b/hotspot/test/runtime/Metaspace/DefineClass.java @@ -24,6 +24,7 @@ /** * @test * @bug 8173743 + * @requires vm.compMode != "Xcomp" * @summary Failures during class definition can lead to memory leaks in metaspace * @library /test/lib * @run main/othervm test.DefineClass defineClass From 149677280e668f9cb216068c08220813d40111d6 Mon Sep 17 00:00:00 2001 From: Roman Grigoriadi Date: Thu, 16 Feb 2017 13:14:39 +0300 Subject: [PATCH 234/447] 8174735: Update JAX-WS RI integration to latest version Reviewed-by: alanb, mchung, lancea --- .../internal/localization/Localizable.java | 6 +- .../localization/LocalizableMessage.java | 15 +- .../LocalizableMessageFactory.java | 4 +- .../internal/localization/Localizer.java | 7 +- .../localization/NullLocalizable.java | 12 +- .../xml/internal/bind/api/JAXBRIContext.java | 12 +- .../xml/internal/bind/v2/ContextFactory.java | 5 +- .../bind/v2/bytecode/package-info.java} | 24 +- .../internal/bind/v2/bytecode/package.html | 32 -- .../v2/model/annotation/package-info.java | 29 ++ .../bind/v2/model/annotation/package.html | 30 -- .../bind/v2/model/core/ErrorHandler.java | 11 +- .../bind/v2/model/core/PropertyKind.java | 4 +- .../bind/v2/model/core/RegistryInfo.java | 8 +- .../bind/v2/model/impl/package-info.java | 29 ++ .../internal/bind/v2/model/impl/package.html | 32 -- .../bind/v2/model/nav/package-info.java | 29 ++ .../internal/bind/v2/model/nav/package.html | 30 -- .../bind/v2/runtime/JAXBContextImpl.java | 20 +- .../bind/v2/runtime/package-info.java | 29 ++ .../xml/internal/bind/v2/runtime/package.html | 32 -- .../runtime/reflect/opt/AccessorInjector.java | 4 +- .../bind/v2/runtime/reflect/opt/Injector.java | 92 +++- .../v2/runtime/reflect/opt/package-info.java | 36 ++ .../bind/v2/runtime/reflect/opt/package.html | 39 -- .../bind/v2/runtime/reflect/package-info.java | 29 ++ .../bind/v2/runtime/reflect/package.html | 30 -- .../v2/runtime/unmarshaller/LocatorEx.java | 5 +- .../runtime/unmarshaller/StructureLoader.java | 29 +- .../v2/schemagen/xmlschema/package-info.java | 5 +- .../bind/v2/schemagen/xmlschema/package.html | 32 -- .../classes/javax/xml/bind/ContextFinder.java | 11 +- .../classes/javax/xml/bind/Messages.java | 5 +- .../javax/xml/bind/Messages.properties | 5 +- .../annotation/adapters/package-info.java | 46 ++ .../javax/xml/bind/helpers/package-info.java | 50 ++ .../classes/javax/xml/bind/package-info.java | 51 ++ .../javax/xml/bind/util/package-info.java | 45 ++ .../share/classes/module-info.java | 3 +- .../messaging/saaj/LazyEnvelopeSource.java | 5 +- .../messaging/saaj/SOAPExceptionImpl.java | 9 +- .../saaj/client/p2p/HttpSOAPConnection.java | 10 +- .../packaging/mime/MultipartDataSource.java | 4 +- .../mime/internet/BMMimeMultipart.java | 10 +- .../mime/internet/ContentDisposition.java | 6 +- .../packaging/mime/internet/ContentType.java | 12 +- .../mime/internet/HeaderTokenizer.java | 16 +- .../mime/internet/InternetHeaders.java | 50 +- .../packaging/mime/internet/MimeBodyPart.java | 74 ++- .../mime/internet/MimeMultipart.java | 40 +- .../mime/internet/MimePartDataSource.java | 12 +- .../packaging/mime/internet/MimeUtility.java | 40 +- .../mime/internet/SharedInputStream.java | 5 +- .../packaging/mime/util/ASCIIUtility.java | 40 +- .../mime/util/BASE64DecoderStream.java | 10 +- .../mime/util/BASE64EncoderStream.java | 11 +- .../packaging/mime/util/BEncoderStream.java | 6 +- .../packaging/mime/util/LineInputStream.java | 6 +- .../saaj/packaging/mime/util/OutputUtil.java | 7 +- .../packaging/mime/util/QEncoderStream.java | 8 +- .../packaging/mime/util/UUEncoderStream.java | 14 +- .../messaging/saaj/soap/Envelope.java | 11 +- .../soap/FastInfosetDataContentHandler.java | 17 +- .../saaj/soap/GifDataContentHandler.java | 12 +- .../saaj/soap/ImageDataContentHandler.java | 11 +- .../saaj/soap/JpegDataContentHandler.java | 21 +- .../messaging/saaj/soap/LazyEnvelope.java | 18 +- .../messaging/saaj/soap/MessageImpl.java | 46 +- .../soap/MultipartDataContentHandler.java | 11 +- .../messaging/saaj/soap/SOAPDocumentImpl.java | 449 +++++++++++++++++- .../messaging/saaj/soap/SOAPPartImpl.java | 116 +++-- .../soap/SOAPVersionMismatchException.java | 5 +- .../saaj/soap/StringDataContentHandler.java | 8 +- .../saaj/soap/XmlDataContentHandler.java | 10 +- .../messaging/saaj/soap/impl/BodyImpl.java | 20 +- .../messaging/saaj/soap/impl/CDATAImpl.java | 269 ++++++++++- .../messaging/saaj/soap/impl/DetailImpl.java | 10 +- .../saaj/soap/impl/ElementFactory.java | 102 +++- .../messaging/saaj/soap/impl/ElementImpl.java | 408 ++++++++++++++-- .../saaj/soap/impl/EnvelopeImpl.java | 11 +- .../saaj/soap/impl/FaultElementImpl.java | 7 +- .../messaging/saaj/soap/impl/FaultImpl.java | 33 +- .../messaging/saaj/soap/impl/HeaderImpl.java | 12 +- .../saaj/soap/impl/NodeListImpl.java | 61 +++ .../saaj/soap/impl/SOAPCommentImpl.java | 243 +++++++++- .../saaj/soap/impl/SOAPTextImpl.java | 266 ++++++++++- .../messaging/saaj/soap/name/NameImpl.java | 48 +- .../saaj/soap/ver1_1/Body1_1Impl.java | 7 +- .../saaj/soap/ver1_1/Detail1_1Impl.java | 8 +- .../saaj/soap/ver1_1/Envelope1_1Impl.java | 8 +- .../saaj/soap/ver1_1/Fault1_1Impl.java | 7 +- .../saaj/soap/ver1_1/Header1_1Impl.java | 7 +- .../saaj/soap/ver1_2/Body1_2Impl.java | 7 +- .../saaj/soap/ver1_2/Detail1_2Impl.java | 7 +- .../saaj/soap/ver1_2/Envelope1_2Impl.java | 7 +- .../saaj/soap/ver1_2/Fault1_2Impl.java | 9 +- .../saaj/soap/ver1_2/Header1_2Impl.java | 7 +- .../internal/messaging/saaj/util/Base64.java | 5 +- .../messaging/saaj/util/ByteOutputStream.java | 16 +- .../internal/messaging/saaj/util/JaxmURI.java | 18 +- .../messaging/saaj/util/ParseUtil.java | 6 +- .../messaging/saaj/util/ParserPool.java | 28 +- .../messaging/saaj/util/SAAJUtil.java | 13 +- .../EfficientStreamingTransformer.java | 16 +- .../api/message/saaj/SAAJMessageHeaders.java | 9 +- .../internal/ws/api/pipe/ThreadHelper.java | 12 +- .../internal/ws/api/server/MethodUtil.java | 48 +- .../ws/api/server/SDDocumentSource.java | 27 +- .../streaming/ContextClassloaderLocal.java | 39 +- .../ContextClassloaderLocal.properties | 26 - .../xml/internal/ws/binding/BindingImpl.java | 4 +- .../internal/ws/binding/SOAPBindingImpl.java | 13 +- .../internal/ws/client/sei/MethodUtil.java | 48 +- .../xmlutil/ContextClassloaderLocal.java | 39 +- .../ContextClassloaderLocal.properties | 26 - .../ws/developer/ContextClassloaderLocal.java | 39 +- .../sun/xml/internal/ws/model/Injector.java | 103 ++-- .../xml/internal/ws/model/RuntimeModeler.java | 3 +- .../xml/internal/ws/model/SOAPSEIModel.java | 27 +- .../ws/policy/privateutil/MethodUtil.java | 47 +- .../internal/ws/policy/util/MethodUtil.java | 293 ++++++++++++ .../ContextClassloaderLocal.properties | 2 +- .../ContextClassloaderLocalMessages.java | 71 +++ .../ws/spi/ContextClassloaderLocal.java | 39 +- .../transport/http/server/EndpointImpl.java | 47 +- .../ws/transport/http/server/ServerMgr.java | 51 +- .../sun/xml/internal/ws/util/MethodUtil.java | 293 ++++++++++++ .../xml/internal/ws/util/version.properties | 4 +- .../ws/util/xml/ContextClassloaderLocal.java | 39 +- .../internal/ws/util/xml/XmlCatalogUtil.java | 114 +++++ .../sun/xml/internal/ws/util/xml/XmlUtil.java | 94 +--- .../classes/javax/xml/soap/FactoryFinder.java | 12 +- .../share/classes/module-info.java | 1 + .../com/sun/codemodel/internal/JJavaName.java | 6 +- .../codemodel/internal/JModuleDirective.java | 4 +- .../internal/util/JavadocEscapeWriter.java | 4 +- .../internal/tools/DefaultAuthenticator.java | 46 +- .../istack/internal/tools/SecureLoader.java | 40 +- .../internal/jxc/MessageBundle.properties | 6 +- .../internal/jxc/MessageBundle_de.properties | 6 +- .../internal/jxc/MessageBundle_es.properties | 6 +- .../internal/jxc/MessageBundle_fr.properties | 6 +- .../internal/jxc/MessageBundle_it.properties | 6 +- .../internal/jxc/MessageBundle_ja.properties | 6 +- .../internal/jxc/MessageBundle_ko.properties | 6 +- .../jxc/MessageBundle_pt_BR.properties | 6 +- .../jxc/MessageBundle_zh_CN.properties | 6 +- .../jxc/MessageBundle_zh_TW.properties | 6 +- .../tools/internal/jxc/ap/package-info.java | 32 ++ .../sun/tools/internal/jxc/ap/package.html | 33 -- .../sun/tools/internal/xjc/CatalogUtil.java | 53 +++ .../internal/xjc/MessageBundle.properties | 12 +- .../internal/xjc/MessageBundle_de.properties | 12 +- .../internal/xjc/MessageBundle_es.properties | 12 +- .../internal/xjc/MessageBundle_fr.properties | 12 +- .../internal/xjc/MessageBundle_it.properties | 12 +- .../internal/xjc/MessageBundle_ja.properties | 12 +- .../internal/xjc/MessageBundle_ko.properties | 12 +- .../xjc/MessageBundle_pt_BR.properties | 12 +- .../xjc/MessageBundle_zh_CN.properties | 12 +- .../xjc/MessageBundle_zh_TW.properties | 12 +- .../com/sun/tools/internal/xjc/Options.java | 139 +++--- .../sun/tools/internal/xjc/SchemaCache.java | 8 +- .../xjc/api/impl/s2j/package-info.java | 29 ++ .../internal/xjc/api/impl/s2j/package.html | 30 -- .../tools/internal/xjc/api/package-info.java | 59 +++ .../sun/tools/internal/xjc/api/package.html | 64 --- .../generator/bean/field/package-info.java | 31 ++ .../xjc/generator/bean/field/package.html | 30 -- .../internal/xjc/model/nav/package-info.java | 41 ++ .../tools/internal/xjc/model/nav/package.html | 42 -- .../internal/xjc/outline/package-info.java | 35 ++ .../tools/internal/xjc/outline/package.html | 36 -- .../xjc/reader/dtd/bindinfo/package-info.java | 29 ++ .../xjc/reader/dtd/bindinfo/package.html | 26 - .../xjc/reader/gbind/package-info.java | 29 ++ .../internal/xjc/reader/gbind/package.html | 32 -- .../xjc/reader/internalizer/package-info.java | 29 ++ .../xjc/reader/internalizer/package.html | 26 - .../internal/xjc/reader/package-info.java | 29 ++ .../tools/internal/xjc/reader/package.html | 26 - .../xmlschema/bindinfo/package-info.java | 8 +- .../reader/xmlschema/bindinfo/package.html | 34 -- .../internal/xjc/runtime/package-info.java | 29 ++ .../tools/internal/xjc/runtime/package.html | 31 -- .../xml/internal/xsom/impl/ElementDecl.java | 31 +- .../xsom/impl/IdentityConstraintImpl.java | 14 +- .../xsom/impl/parser/NGCCRuntimeEx.java | 69 ++- .../sun/xml/internal/xsom/impl/util/Uri.java | 187 -------- .../ContextClassloaderLocal.properties | 2 +- .../ContextClassloaderLocalMessages.java | 69 +++ .../sun/tools/internal/ws/version.properties | 4 +- .../internal/ws/wscompile/WsgenTool.java | 36 +- .../internal/ws/wscompile/WsimportTool.java | 37 +- .../wsdl/parser/ContextClassloaderLocal.java | 39 +- .../parser/ContextClassloaderLocal.properties | 26 - 196 files changed, 5041 insertions(+), 2026 deletions(-) rename jaxws/src/{java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentFragment.java => java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/bytecode/package-info.java} (68%) delete mode 100644 jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/bytecode/package.html create mode 100644 jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/annotation/package-info.java delete mode 100644 jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/annotation/package.html create mode 100644 jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/impl/package-info.java delete mode 100644 jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/impl/package.html create mode 100644 jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/nav/package-info.java delete mode 100644 jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/nav/package.html create mode 100644 jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/package-info.java delete mode 100644 jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/package.html create mode 100644 jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/package-info.java delete mode 100644 jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/package.html create mode 100644 jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/package-info.java delete mode 100644 jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/package.html delete mode 100644 jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package.html create mode 100644 jaxws/src/java.xml.bind/share/classes/javax/xml/bind/annotation/adapters/package-info.java create mode 100644 jaxws/src/java.xml.bind/share/classes/javax/xml/bind/helpers/package-info.java create mode 100644 jaxws/src/java.xml.bind/share/classes/javax/xml/bind/package-info.java create mode 100644 jaxws/src/java.xml.bind/share/classes/javax/xml/bind/util/package-info.java create mode 100644 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/NodeListImpl.java delete mode 100644 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.properties delete mode 100644 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.properties create mode 100644 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/util/MethodUtil.java rename jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/{spi => resources}/ContextClassloaderLocal.properties (94%) create mode 100644 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ContextClassloaderLocalMessages.java create mode 100644 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/MethodUtil.java create mode 100644 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/XmlCatalogUtil.java create mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/package-info.java delete mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/package.html create mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/CatalogUtil.java create mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/api/impl/s2j/package-info.java delete mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/api/impl/s2j/package.html create mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/api/package-info.java delete mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/api/package.html create mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/generator/bean/field/package-info.java delete mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/generator/bean/field/package.html create mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/nav/package-info.java delete mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/nav/package.html create mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/outline/package-info.java delete mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/outline/package.html create mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/package-info.java delete mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/package.html create mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/gbind/package-info.java delete mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/gbind/package.html create mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/package-info.java delete mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/package.html create mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/package-info.java delete mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/package.html delete mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package.html create mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/runtime/package-info.java delete mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/runtime/package.html delete mode 100644 jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/util/Uri.java rename jaxws/src/{java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml => jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources}/ContextClassloaderLocal.properties (94%) create mode 100644 jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ContextClassloaderLocalMessages.java delete mode 100644 jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.properties diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizable.java b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizable.java index 2f4da84f319..0406d5b4c6b 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizable.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -54,9 +54,7 @@ public interface Localizable { public Object[] getArguments(); public String getResourceBundleName(); - public default ResourceBundle getResourceBundle(Locale locale) { - return null; - } + public ResourceBundle getResourceBundle(Locale locale); /** * Special constant that represents a message that diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessage.java b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessage.java index 1d7ace5146c..747110e350f 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessage.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,7 @@ import java.util.Arrays; import java.util.Locale; import java.util.ResourceBundle; + /** * @author WS Development Team */ @@ -42,13 +43,9 @@ public final class LocalizableMessage implements Localizable { private final String _key; private final Object[] _args; + @Deprecated public LocalizableMessage(String bundlename, String key, Object... args) { - _bundlename = bundlename; - _rbSupplier = null; - _key = key; - if(args==null) - args = new Object[0]; - _args = args; + this(bundlename, null, key, args); } public LocalizableMessage(String bundlename, ResourceBundleSupplier rbSupplier, @@ -61,15 +58,17 @@ public final class LocalizableMessage implements Localizable { _args = args; } - + @Override public String getKey() { return _key; } + @Override public Object[] getArguments() { return Arrays.copyOf(_args, _args.length); } + @Override public String getResourceBundleName() { return _bundlename; } diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java index bf8a28b76f3..e4d5a126962 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,6 +36,7 @@ public class LocalizableMessageFactory { private final String _bundlename; private final ResourceBundleSupplier _rbSupplier; + @Deprecated public LocalizableMessageFactory(String bundlename) { _bundlename = bundlename; _rbSupplier = null; @@ -58,4 +59,5 @@ public class LocalizableMessageFactory { */ ResourceBundle getResourceBundle(Locale locale); } + } diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizer.java b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizer.java index 2f78673eab0..a0436beafa1 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizer.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,6 @@ package com.sun.istack.internal.localization; -import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; import java.text.MessageFormat; import java.util.HashMap; import java.util.Locale; @@ -41,7 +40,7 @@ import java.util.ResourceBundle; public class Localizer { private final Locale _locale; - private final HashMap _resourceBundles; + private final HashMap _resourceBundles; public Localizer() { this(Locale.getDefault()); @@ -49,7 +48,7 @@ public class Localizer { public Localizer(Locale l) { _locale = l; - _resourceBundles = new HashMap(); + _resourceBundles = new HashMap<>(); } public Locale getLocale() { diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/NullLocalizable.java b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/NullLocalizable.java index e0fb44621f4..f9f0b7abe09 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/NullLocalizable.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/NullLocalizable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,9 @@ package com.sun.istack.internal.localization; +import java.util.Locale; +import java.util.ResourceBundle; + /** * {@link Localizable} that wraps a non-localizable string. * @@ -39,13 +42,20 @@ public final class NullLocalizable implements Localizable { this.msg = msg; } + @Override public String getKey() { return Localizable.NOT_LOCALIZABLE; } + @Override public Object[] getArguments() { return new Object[]{msg}; } + @Override public String getResourceBundleName() { return ""; } + @Override + public ResourceBundle getResourceBundle(Locale locale) { + return null; + } } diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/api/JAXBRIContext.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/api/JAXBRIContext.java index a27f0825fe8..fcf907d88ee 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/api/JAXBRIContext.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/api/JAXBRIContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -533,4 +533,14 @@ public abstract class JAXBRIContext extends JAXBContext { * @since 2.2.6 */ public static final String DISABLE_XML_SECURITY = "com.sun.xml.internal.bind.disableXmlSecurity"; + + /** + * If true and element namespace is not specified, namespace of parent element will be used. + * The default value is false. + * + * Boolean + * @since 2.3.0 + */ + public static final String BACKUP_WITH_PARENT_NAMESPACE = "com.sun.xml.internal.bind.backupWithParentNamespace"; + } diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/ContextFactory.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/ContextFactory.java index a18f79e1d58..73fe277419f 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/ContextFactory.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/ContextFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -112,6 +112,8 @@ public class ContextFactory { "is not active. Using JAXB's implementation"); } + Boolean backupWithParentNamespace = getPropertyValue(properties, JAXBRIContext.BACKUP_WITH_PARENT_NAMESPACE, Boolean.class); + RuntimeAnnotationReader ar = getPropertyValue(properties,JAXBRIContext.ANNOTATION_READER,RuntimeAnnotationReader.class); Collection tr = getPropertyValue(properties, JAXBRIContext.TYPE_REFERENCES, Collection.class); @@ -144,6 +146,7 @@ public class ContextFactory { builder.setSupressAccessorWarnings(supressAccessorWarnings); builder.setImprovedXsiTypeHandling(improvedXsiTypeHandling); builder.setDisableSecurityProcessing(disablesecurityProcessing); + builder.setBackupWithParentNamespace(backupWithParentNamespace); return builder.build(); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentFragment.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/bytecode/package-info.java similarity index 68% rename from jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentFragment.java rename to jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/bytecode/package-info.java index 1ffe4fffceb..848316f6c53 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentFragment.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/bytecode/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,22 +24,6 @@ */ /** -* -* @author SAAJ RI Development Team -*/ -package com.sun.xml.internal.messaging.saaj.soap; - -import com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl; -import com.sun.org.apache.xerces.internal.dom.DocumentFragmentImpl; - -public class SOAPDocumentFragment extends DocumentFragmentImpl { - - public SOAPDocumentFragment(CoreDocumentImpl ownerDoc) { - super(ownerDoc); - } - - public SOAPDocumentFragment() { - super(); - } - -} + * Code that deals with low level byte code manipulation. + */ +package com.sun.xml.internal.bind.v2.bytecode; diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/bytecode/package.html b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/bytecode/package.html deleted file mode 100644 index 092f6f3e5d2..00000000000 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/bytecode/package.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - Code that deals with low level byte code manipulation. - - diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/annotation/package-info.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/annotation/package-info.java new file mode 100644 index 00000000000..40328931c18 --- /dev/null +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/annotation/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Abstraction around reading annotations, to support internal/external annotations. + */ +package com.sun.xml.internal.bind.v2.model.annotation; diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/annotation/package.html b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/annotation/package.html deleted file mode 100644 index acc9be725ab..00000000000 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/annotation/package.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Abstraction around reading annotations, to support internal/external annotations. - diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/ErrorHandler.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/ErrorHandler.java index 5b97093d3fd..c584056f611 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/ErrorHandler.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/ErrorHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,24 +29,25 @@ import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException; /** * listen to static errors found during building a JAXB model from a set of classes. - * Implemented by the client of {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilder}. + * Implemented by the client of {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilderI}. * *

      * All the static errors have to be reported while constructing a - * model, not when a model is used (IOW, until the {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilder#link} completes. - * Internally, {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilder} wraps an {@link ErrorHandler} and all the model + * model, not when a model is used (IOW, until the {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilderI} completes. + * Internally, {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilderI} wraps an {@link ErrorHandler} and all the model * components should report errors through it. * *

      * {@link IllegalAnnotationException} is a checked exception to remind * the model classes to report it rather than to throw it. * - * @see com.sun.xml.internal.bind.v2.model.impl.ModelBuilder + * @see com.sun.xml.internal.bind.v2.model.impl.ModelBuilderI * @author Kohsuke Kawaguchi */ public interface ErrorHandler { /** * Receives a notification for an error in the annotated code. + * @param e */ void error( IllegalAnnotationException e ); } diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/PropertyKind.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/PropertyKind.java index c3406b7da6f..83caf8f4f04 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/PropertyKind.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/PropertyKind.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -57,7 +57,7 @@ public enum PropertyKind { public final boolean isOrdered; /** - * {@link com.sun.xml.internal.bind.v2.runtime.property.PropertyFactory} benefits from having index numbers assigned to + * {@code com.sun.xml.internal.bind.v2.runtime.property.PropertyFactory} benefits from having index numbers assigned to * {@link #ELEMENT}, {@link #REFERENCE}, and {@link #MAP} in this order. */ public final int propertyIndex; diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/RegistryInfo.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/RegistryInfo.java index 794c3396d25..9bfe5e04209 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/RegistryInfo.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/core/RegistryInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,18 +34,22 @@ import javax.xml.bind.annotation.XmlRegistry; * *

      * This interface is only meant to be used as a return type from - * {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilder}. + * {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilderI}. * * @author Kohsuke Kawaguchi + * @param + * @param */ public interface RegistryInfo { /** * Returns all the references to other types in this registry. + * @return */ Set> getReferences(); /** * Returns the class with {@link XmlRegistry}. + * @return */ C getClazz(); } diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/impl/package-info.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/impl/package-info.java new file mode 100644 index 00000000000..68abc10902c --- /dev/null +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/impl/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Implementation of the com.sun.xml.internal.bind.j2s.model package. + */ +package com.sun.xml.internal.bind.v2.model.impl; diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/impl/package.html b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/impl/package.html deleted file mode 100644 index e37eebd2ac4..00000000000 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/impl/package.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - -Implementation of the com.sun.xml.internal.bind.j2s.model package. - - diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/nav/package-info.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/nav/package-info.java new file mode 100644 index 00000000000..ea3b945f33c --- /dev/null +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/nav/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Abstraction around the reflection library, to support various reflection models (such as java.lang.reflect and Annotation Processing). + */ +package com.sun.xml.internal.bind.v2.model.nav; diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/nav/package.html b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/nav/package.html deleted file mode 100644 index 319f86c97b9..00000000000 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/nav/package.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Abstraction around the reflection library, to support various reflection models (such as java.lang.reflect and Annotation Processing). - diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java index 3c918598348..5a03996782a 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -241,6 +241,16 @@ public final class JAXBContextImpl extends JAXBRIContext { private Set xmlNsSet = null; + /** + * If true, despite the specification, unmarshall child element with parent namespace, if child namespace is not specified. + * The default value is null for System {code}com.sun.xml.internal.bind.backupWithParentNamespace{code} property to be used, + * and false is assumed if it's not set either. + * + * Boolean + * @since 2.3.0 + */ + public Boolean backupWithParentNamespace = null; + /** * Returns declared XmlNs annotations (from package-level annotation XmlSchema * @@ -263,6 +273,7 @@ public final class JAXBContextImpl extends JAXBRIContext { this.supressAccessorWarnings = builder.supressAccessorWarnings; this.improvedXsiTypeHandling = builder.improvedXsiTypeHandling; this.disableSecurityProcessing = builder.disableSecurityProcessing; + this.backupWithParentNamespace = builder.backupWithParentNamespace; Collection typeRefs = builder.typeRefs; @@ -1024,6 +1035,7 @@ public final class JAXBContextImpl extends JAXBRIContext { private boolean allNillable; private boolean improvedXsiTypeHandling = true; private boolean disableSecurityProcessing = true; + private Boolean backupWithParentNamespace = null; // null for System property to be used public JAXBContextBuilder() {}; @@ -1039,6 +1051,7 @@ public final class JAXBContextImpl extends JAXBRIContext { this.xmlAccessorFactorySupport = baseImpl.xmlAccessorFactorySupport; this.allNillable = baseImpl.allNillable; this.disableSecurityProcessing = baseImpl.disableSecurityProcessing; + this.backupWithParentNamespace = baseImpl.backupWithParentNamespace; } public JAXBContextBuilder setRetainPropertyInfo(boolean val) { @@ -1101,6 +1114,11 @@ public final class JAXBContextImpl extends JAXBRIContext { return this; } + public JAXBContextBuilder setBackupWithParentNamespace(Boolean backupWithParentNamespace) { + this.backupWithParentNamespace = backupWithParentNamespace; + return this; + } + public JAXBContextImpl build() throws JAXBException { // fool-proof diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/package-info.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/package-info.java new file mode 100644 index 00000000000..3ae977b9d19 --- /dev/null +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Code that implements JAXBContext, Unmarshaller, and Marshaller. + */ +package com.sun.xml.internal.bind.v2.runtime; diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/package.html b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/package.html deleted file mode 100644 index 2c45e53176e..00000000000 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/package.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - -Code that implements JAXBContext, Unmarshaller, and Marshaller. - - diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/AccessorInjector.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/AccessorInjector.java index 1be59952231..d2154319c48 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/AccessorInjector.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/AccessorInjector.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,7 +39,7 @@ class AccessorInjector { private static final Logger logger = Util.getClassLogger(); - protected static final boolean noOptimize = Runtime.version().major() >= 9 || + protected static final boolean noOptimize = Util.getSystemProperty(ClassTailor.class.getName()+".noOptimize")!=null; static { diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java index 17c99557d9f..9e00016d7e9 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,6 +40,11 @@ import java.util.logging.Logger; import com.sun.xml.internal.bind.Util; import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor; +import java.lang.reflect.Field; +import java.security.CodeSource; +import java.security.PrivilegedActionException; +import java.security.PrivilegedExceptionAction; +import java.security.ProtectionDomain; /** * A {@link ClassLoader} used to "inject" optimized accessor classes @@ -131,7 +136,7 @@ final class Injector { /** * Injected classes keyed by their names. */ - private final Map classes = new HashMap(); + private final Map classes = new HashMap<>(); private final ReentrantReadWriteLock rwl = new ReentrantReadWriteLock(); private final Lock r = rwl.readLock(); private final Lock w = rwl.writeLock(); @@ -141,26 +146,59 @@ final class Injector { * False otherwise, which happens if this classloader can't see {@link Accessor}. */ private final boolean loadable; - private static final Method defineClass; - private static final Method resolveClass; - private static final Method findLoadedClass; + private static Method defineClass; + private static Method resolveClass; + private static Method findLoadedClass; + private static Object U; static { - Method[] m = AccessController.doPrivileged( - new PrivilegedAction() { - @Override - public Method[] run() { - return new Method[]{ - getMethod(ClassLoader.class, "defineClass", String.class, byte[].class, Integer.TYPE, Integer.TYPE), - getMethod(ClassLoader.class, "resolveClass", Class.class), - getMethod(ClassLoader.class, "findLoadedClass", String.class) - }; - } + try { + Method[] m = AccessController.doPrivileged( + new PrivilegedAction() { + @Override + public Method[] run() { + return new Method[]{ + getMethod(ClassLoader.class, "defineClass", String.class, byte[].class, Integer.TYPE, Integer.TYPE), + getMethod(ClassLoader.class, "resolveClass", Class.class), + getMethod(ClassLoader.class, "findLoadedClass", String.class) + }; } - ); - defineClass = m[0]; - resolveClass = m[1]; - findLoadedClass = m[2]; + } + ); + defineClass = m[0]; + resolveClass = m[1]; + findLoadedClass = m[2]; + } catch (Throwable t) { + try { + U = AccessController.doPrivileged(new PrivilegedExceptionAction() { + @Override + public Object run() throws Exception { + Class u = Class.forName("sun.misc.Unsafe"); + Field theUnsafe = u.getDeclaredField("theUnsafe"); + theUnsafe.setAccessible(true); + return theUnsafe.get(null); + } + }); + defineClass = AccessController.doPrivileged(new PrivilegedExceptionAction() { + @Override + public Method run() throws Exception { + try { + return U.getClass().getMethod("defineClass", + new Class[]{String.class, + byte[].class, + Integer.TYPE, + Integer.TYPE, + ClassLoader.class, + ProtectionDomain.class}); + } catch (NoSuchMethodException | SecurityException ex) { + throw ex; + } + } + }); + } catch (SecurityException | PrivilegedActionException ex) { + Logger.getLogger(Injector.class.getName()).log(Level.SEVERE, null, ex); + } + } } private static Method getMethod(final Class c, final String methodname, final Class... params) { @@ -210,13 +248,11 @@ final class Injector { rlocked = false; //find loaded class from classloader - if (c == null) { + if (c == null && findLoadedClass != null) { try { c = (Class) findLoadedClass.invoke(parent, className.replace('/', '.')); - } catch (IllegalArgumentException e) { - logger.log(Level.FINE, "Unable to find " + className, e); - } catch (IllegalAccessException e) { + } catch (IllegalArgumentException | IllegalAccessException e) { logger.log(Level.FINE, "Unable to find " + className, e); } catch (InvocationTargetException e) { Throwable t = e.getTargetException(); @@ -253,9 +289,13 @@ final class Injector { // we need to inject a class into the try { - c = (Class) defineClass.invoke(parent, className.replace('/', '.'), image, 0, image.length); - resolveClass.invoke(parent, c); - } catch (IllegalAccessException e) { + if (resolveClass != null) { + c = (Class) defineClass.invoke(parent, className.replace('/', '.'), image, 0, image.length); + resolveClass.invoke(parent, c); + } else { + c = (Class) defineClass.invoke(U, className.replace('/', '.'), image, 0, image.length, parent, Injector.class.getProtectionDomain()); + } + } catch (IllegalAccessException e) { logger.log(Level.FINE, "Unable to inject " + className, e); return null; } catch (InvocationTargetException e) { diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/package-info.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/package-info.java new file mode 100644 index 00000000000..70ae20ccdd9 --- /dev/null +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/package-info.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Hosts optimized + * {@link com.sun.xml.internal.bind.v2.runtime.reflect.Accessor}, + * {@link com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor}, and {@link com.sun.xml.internal.bind.v2.runtime.Transducer}. + * + *

      How it works

      + *

      + * Most of the classes in this package are "templates." At run-time, A template class file is slightly modified to match + * the target Java Bean, then it will be loaded into the VM. + */ +package com.sun.xml.internal.bind.v2.runtime.reflect.opt; diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/package.html b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/package.html deleted file mode 100644 index 9039ffafb01..00000000000 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/package.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - -Hosts optimized -{@link com.sun.xml.internal.bind.v2.runtime.reflect.Accessor}, -{@link com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor}, and -{@link com.sun.xml.internal.bind.v2.runtime.Transducer}. - -

      How it works

      -

      - Most of the classes in this package are "templates." At run-time, - A template class file is slightly modified to match the target Java Bean, - then it will be loaded into the VM. - diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/package-info.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/package-info.java new file mode 100644 index 00000000000..35dfd4abe9d --- /dev/null +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Abstraction around accessing data of actual objects. + */ +package com.sun.xml.internal.bind.v2.runtime.reflect; diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/package.html b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/package.html deleted file mode 100644 index 36c5c915cf8..00000000000 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/reflect/package.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Abstraction around accessing data of actual objects. - diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LocatorEx.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LocatorEx.java index d1e67292e4e..8ae68be34c0 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LocatorEx.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LocatorEx.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,7 @@ import org.xml.sax.Locator; import org.w3c.dom.Node; /** - * Object that returns the current location that the {@link com.sun.xml.internal.bind.v2.runtime.unmarshaller.XmlVisitor} + * Object that returns the current location that the {@code com.sun.xml.internal.bind.v2.runtime.unmarshaller.XmlVisitor} * is parsing. * * @author Kohsuke Kawaguchi @@ -41,6 +41,7 @@ import org.w3c.dom.Node; public interface LocatorEx extends Locator { /** * Gets the current location in a {@link ValidationEventLocator} object. + * @return */ ValidationEventLocator getLocation(); diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java index 9becb9dd086..8141e4e5178 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,7 +31,9 @@ import java.util.Map; import javax.xml.namespace.QName; +import com.sun.xml.internal.bind.Util; import com.sun.xml.internal.bind.api.AccessorException; +import com.sun.xml.internal.bind.api.JAXBRIContext; import com.sun.xml.internal.bind.v2.WellKnownNamespace; import com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl; import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl; @@ -231,11 +233,26 @@ public final class StructureLoader extends Loader { @Override public void childElement(UnmarshallingContext.State state, TagName arg) throws SAXException { ChildLoader child = childUnmarshallers.get(arg.uri,arg.local); - if (child == null) { - child = catchAll; - if (child==null) { - super.childElement(state,arg); - return; + if(child == null) { + Boolean backupWithParentNamespace = ((JAXBContextImpl) state.getContext().getJAXBContext()).backupWithParentNamespace; + backupWithParentNamespace = backupWithParentNamespace != null + ? backupWithParentNamespace + : Boolean.parseBoolean(Util.getSystemProperty(JAXBRIContext.BACKUP_WITH_PARENT_NAMESPACE)); + if ((beanInfo != null) && (beanInfo.getTypeNames() != null) && backupWithParentNamespace) { + Iterator typeNamesIt = beanInfo.getTypeNames().iterator(); + QName parentQName = null; + if ((typeNamesIt != null) && (typeNamesIt.hasNext()) && (catchAll == null)) { + parentQName = (QName) typeNamesIt.next(); + String parentUri = parentQName.getNamespaceURI(); + child = childUnmarshallers.get(parentUri, arg.local); + } + } + if (child == null) { + child = catchAll; + if(child==null) { + super.childElement(state,arg); + return; + } } } diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package-info.java b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package-info.java index fbe7ff55cb5..f7b434e49d8 100644 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package-info.java +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,5 +23,8 @@ * questions. */ +/** + * XML Schema writer generated by TXW. + */ @com.sun.xml.internal.txw2.annotation.XmlNamespace("http://www.w3.org/2001/XMLSchema") package com.sun.xml.internal.bind.v2.schemagen.xmlschema; diff --git a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package.html b/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package.html deleted file mode 100644 index cce3c1b8ebf..00000000000 --- a/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - -XML Schema writer generated by TXW. - - diff --git a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/ContextFinder.java b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/ContextFinder.java index d31a1cbe0d7..d59b0e40471 100644 --- a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/ContextFinder.java +++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/ContextFinder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -158,7 +158,7 @@ class ContextFinder { Class spFactory = ServiceLoaderUtil.safeLoadClass(className, PLATFORM_DEFAULT_FACTORY_CLASS, classLoader); return newInstance(contextPath, spFactory, classLoader, properties); } catch (ClassNotFoundException x) { - throw new JAXBException(Messages.format(Messages.PROVIDER_NOT_FOUND, className), x); + throw new JAXBException(Messages.format(Messages.DEFAULT_PROVIDER_NOT_FOUND), x); } catch (RuntimeException | JAXBException x) { // avoid wrapping RuntimeException to JAXBException, @@ -228,7 +228,7 @@ class ContextFinder { } } - private static Object instantiateProviderIfNecessary(Class implClass) throws JAXBException { + private static Object instantiateProviderIfNecessary(final Class implClass) throws JAXBException { try { if (JAXBContextFactory.class.isAssignableFrom(implClass)) { return AccessController.doPrivileged(new PrivilegedExceptionAction() { @@ -254,7 +254,7 @@ class ContextFinder { try { spi = ServiceLoaderUtil.safeLoadClass(className, PLATFORM_DEFAULT_FACTORY_CLASS, getContextClassLoader()); } catch (ClassNotFoundException e) { - throw new JAXBException(e); + throw new JAXBException(Messages.format(Messages.DEFAULT_PROVIDER_NOT_FOUND), e); } if (logger.isLoggable(Level.FINE)) { @@ -525,6 +525,7 @@ class ContextFinder { } else { return (ClassLoader) java.security.AccessController.doPrivileged( new java.security.PrivilegedAction() { + @Override public java.lang.Object run() { return Thread.currentThread().getContextClassLoader(); } @@ -539,6 +540,7 @@ class ContextFinder { } else { return (ClassLoader) java.security.AccessController.doPrivileged( new java.security.PrivilegedAction() { + @Override public java.lang.Object run() { return c.getClassLoader(); } @@ -552,6 +554,7 @@ class ContextFinder { } else { return (ClassLoader) java.security.AccessController.doPrivileged( new java.security.PrivilegedAction() { + @Override public java.lang.Object run() { return ClassLoader.getSystemClassLoader(); } diff --git a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Messages.java b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Messages.java index a1ebb81f4ab..79ede4ff185 100644 --- a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Messages.java +++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Messages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -65,6 +65,9 @@ class Messages static final String PROVIDER_NOT_FOUND = // 1 arg "ContextFinder.ProviderNotFound"; + static final String DEFAULT_PROVIDER_NOT_FOUND = // 0 args + "ContextFinder.DefaultProviderNotFound"; + static final String COULD_NOT_INSTANTIATE = // 2 args "ContextFinder.CouldNotInstantiate"; diff --git a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Messages.properties b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Messages.properties index e6a930d67d4..548001abfe7 100644 --- a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Messages.properties +++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/Messages.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,9 @@ ContextFinder.ProviderNotFound = \ Provider {0} not found +ContextFinder.DefaultProviderNotFound = \ + Implementation of JAXB-API has not been found on module path or classpath. + ContextFinder.CouldNotInstantiate = \ Provider {0} could not be instantiated: {1} diff --git a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/annotation/adapters/package-info.java b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/annotation/adapters/package-info.java new file mode 100644 index 00000000000..d52ab7fa2bd --- /dev/null +++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/annotation/adapters/package-info.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * {@link javax.xml.bind.annotation.adapters.XmlAdapter} and its spec-defined + * sub-classes to allow arbitrary Java classes to be used with JAXB. + *

      + *

      Package Specification

      + *

      + *

      + *

      + *

      Related Documentation

      + *

      + * For overviews, tutorials, examples, guides, and tool documentation, + * please see: + *

      + * + * @see JAXB Website + */ +package javax.xml.bind.annotation.adapters; diff --git a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/helpers/package-info.java b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/helpers/package-info.java new file mode 100644 index 00000000000..c5c0bec28f1 --- /dev/null +++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/helpers/package-info.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JAXB Provider Use Only: Provides partial default implementations for + * some of the javax.xml.bind interfaces. + *

      + *

      + * JAXB Providers can extend these classes and implement the abstract + * methods. + *

      + *

      Package Specification

      + *

      + *

      + *

      + *

      Related Documentation

      + *

      + * For overviews, tutorials, examples, guides, and tool documentation, + * please see: + *

      + * + * @see JAXB Website + */ +package javax.xml.bind.helpers; diff --git a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/package-info.java b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/package-info.java new file mode 100644 index 00000000000..aa6ff577e52 --- /dev/null +++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/package-info.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides a runtime binding framework for client applications including + * unmarshalling, marshalling, and validation capabilities. + *

      + *

      + * JAXBContext is the client-entry point to the runtime binding + * framework. + *

      + *

      + *

      Package Specification

      + *

      + *

      + *

      + *

      Related Documentation

      + *

      + * For overviews, tutorials, examples, guides, and tool documentation, + * please see: + *

      + * + * @see JAXB Website + */ +package javax.xml.bind; diff --git a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/util/package-info.java b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/util/package-info.java new file mode 100644 index 00000000000..229d4343fc2 --- /dev/null +++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/util/package-info.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Useful client utility classes. + *

      + *

      Package Specification

      + *

      + *

      + *

      + *

      Related Documentation

      + *

      + * For overviews, tutorials, examples, guides, and tool documentation, + * please see: + *

      + * + * @see JAXB Website + */ +package javax.xml.bind.util; diff --git a/jaxws/src/java.xml.bind/share/classes/module-info.java b/jaxws/src/java.xml.bind/share/classes/module-info.java index ccf09cfbd9b..e5480771643 100644 --- a/jaxws/src/java.xml.bind/share/classes/module-info.java +++ b/jaxws/src/java.xml.bind/share/classes/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,6 +34,7 @@ module java.xml.bind { requires java.compiler; requires java.desktop; requires java.logging; + requires jdk.unsupported; uses javax.xml.bind.JAXBContextFactory; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/LazyEnvelopeSource.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/LazyEnvelopeSource.java index 151ae98e1fe..9136b3eb128 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/LazyEnvelopeSource.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/LazyEnvelopeSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,8 +39,7 @@ import javax.xml.stream.XMLStreamWriter; public interface LazyEnvelopeSource extends javax.xml.transform.Source { /** * Retrieve payload qname without materializing its contents - * @return - * @throws SOAPException + * @return payload QName */ public QName getPayloadQName(); public XMLStreamReader readToBodyStarTag() throws XMLStreamException; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java index 7adf460cbb6..2d98512528e 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -86,6 +86,7 @@ public class SOAPExceptionImpl extends SOAPException { /** * Constructs a SOAPExceptionImpl object initialized * with the given Throwable object. + * @param cause cause */ public SOAPExceptionImpl(Throwable cause) { super (cause.toString()); @@ -106,6 +107,7 @@ public class SOAPExceptionImpl extends SOAPException { * message of the embedded Throwable object, * if there is one */ + @Override public String getMessage() { String message = super.getMessage (); if (message == null && cause != null) { @@ -124,6 +126,7 @@ public class SOAPExceptionImpl extends SOAPException { * if there is none */ + @Override public Throwable getCause() { return cause; } @@ -157,6 +160,7 @@ public class SOAPExceptionImpl extends SOAPException { * method has already been called on this SOAPExceptionImpl * object */ + @Override public synchronized Throwable initCause(Throwable cause) { if(this.cause != null) { @@ -170,6 +174,7 @@ public class SOAPExceptionImpl extends SOAPException { return this; } + @Override public void printStackTrace() { super.printStackTrace(); if (cause != null) { @@ -178,6 +183,7 @@ public class SOAPExceptionImpl extends SOAPException { } } + @Override public void printStackTrace(PrintStream s) { super.printStackTrace(s); if (cause != null) { @@ -186,6 +192,7 @@ public class SOAPExceptionImpl extends SOAPException { } } + @Override public void printStackTrace(PrintWriter s) { super.printStackTrace(s); if (cause != null) { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java index 4ff655a0051..a032c589dfe 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -512,9 +512,13 @@ class HttpSOAPConnection extends SOAPConnection { : httpConnection.getInputStream()); // If no reply message is returned, // content-Length header field value is expected to be zero. - // InputStream#available() can't be used here - it just says no data *YET*! + // java SE 6 documentation says : + // available() : an estimate of the number of bytes that can be read + //(or skipped over) from this input stream without blocking + //or 0 when it reaches the end of the input stream. if ((httpIn == null ) - || (httpConnection.getContentLength() == 0)) { + || (httpConnection.getContentLength() == 0) + || (httpIn.available() == 0)) { response = null; log.warning("SAAJ0014.p2p.content.zero"); } else { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java index ee23205714b..f21f3d02398 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -69,7 +69,7 @@ public interface MultipartDataSource extends DataSource { * @return the MimeBodyPart * @exception IndexOutOfBoundsException if the given index * is out of range. - * @exception MessagingException + * @exception MessagingException thrown in case of error */ public MimeBodyPart getBodyPart(int index) throws MessagingException; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java index 34066fc32ac..96a7702e580 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -115,6 +115,8 @@ public class BMMimeMultipart extends MimeMultipart { * contentType field.

      * * MimeBodyParts may be added later. + * + * @param subtype subtype. */ public BMMimeMultipart(String subtype) { super(subtype); @@ -142,7 +144,9 @@ public class BMMimeMultipart extends MimeMultipart { * skips the 'preamble' and reads bytes till the terminating * boundary and creates MimeBodyParts for each part of the stream. * - * @param ds DataSource, can be a MultipartDataSource + * @param ds DataSource, can be a MultipartDataSource. + * @param ct content type. + * @exception MessagingException in case of error. */ public BMMimeMultipart(DataSource ds, ContentType ct) throws MessagingException { @@ -197,6 +201,7 @@ public class BMMimeMultipart extends MimeMultipart { * * @since JavaMail 1.2 */ + @Override protected void parse() throws MessagingException { if (parsed) return; @@ -694,6 +699,7 @@ public class BMMimeMultipart extends MimeMultipart { * separated by a boundary. */ + @Override public void writeTo(OutputStream os) throws IOException, MessagingException { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java index 448cb04777c..eab91196564 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -100,6 +100,7 @@ public class ContentDisposition { /** * Return the specified parameter value. Returns null * if this parameter is absent. + * @param name parameter name. * @return parameter value * @since JavaMail 1.2 */ @@ -123,7 +124,7 @@ public class ContentDisposition { /** * Set the primary type. Overrides existing primary type. - * @param primaryType primary type + * @param disposition disposition value * @since JavaMail 1.2 */ public void setDisposition(String disposition) { @@ -162,6 +163,7 @@ public class ContentDisposition { * @return RFC2045 style string * @since JavaMail 1.2 */ + @Override public String toString() { if (disposition == null) return null; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java index 4cbbae3e33d..1fc677d68d9 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -136,6 +136,7 @@ public final class ContentType { /** * Return the specified parameter value. Returns null * if this parameter is absent. + * @param name parameter name * @return parameter value */ public String getParameter(String name) { @@ -200,6 +201,7 @@ public final class ContentType { * * @return RFC2045 style string */ + @Override public String toString() { if (primaryType == null || subType == null) // need both return null; @@ -218,7 +220,7 @@ public final class ContentType { /** * Match with the specified ContentType object. This method * compares only the primaryType and - * subType . The parameters of both operands + * primaryType . The parameters of both operands * are ignored.

      * * For example, this method will return true when @@ -232,6 +234,8 @@ public final class ContentType { * and "text/*" * * @param cType to compare this against + * @return true if primaryType and subType + * match specified content type. */ public boolean match(ContentType cType) { // Match primaryType @@ -266,6 +270,10 @@ public final class ContentType { * For example, this method will return true when * comparing the ContentType for "text/plain" * with "text/*" + * + * @param s content type + * @return true if primaryType and subType + * match specified content type. */ public boolean match(String s) { try { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java index 4620bb0d484..0d9ee4ed3a5 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -95,14 +95,15 @@ public class HeaderTokenizer { * one of the following: *

        *
      • ATOM A sequence of ASCII characters - * delimited by either SPACE, CTL, "(", <"> or the - * specified SPECIALS + * delimited by either SPACE, CTL, "(", <"> or the + * specified SPECIALS
      • *
      • QUOTEDSTRING A sequence of ASCII characters - * within quotes + * within quotes
      • *
      • COMMENT A sequence of ASCII characters - * within "(" and ")". - *
      • EOF End of header + * within "(" and ")".
      • + *
      • EOF End of header
      • *
      + * @return type */ public int getType() { return type; @@ -176,6 +177,7 @@ public class HeaderTokenizer { * Constructor. The RFC822 defined delimiters - RFC822 - are * used to delimit ATOMS. Also comments are skipped and not * returned as tokens + * @param header The header that is tokenized. */ public HeaderTokenizer(String header) { this(header, RFC822); @@ -317,7 +319,7 @@ public class HeaderTokenizer { currentPos++; // re-position currentPos char ch[] = new char[1]; ch[0] = c; - return new Token((int)c, new String(ch)); + return new Token(c, new String(ch)); } // Check for ATOM diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java index bf39ee7540b..84616c89b96 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -48,13 +48,12 @@ import java.util.NoSuchElementException; * until the blank line that indicates end of header. The input stream * is positioned at the start of the body. The lines are stored * within the object and can be extracted as either Strings or - * {@link Header} objects.

      - *

      + * {@link Header} objects. + *

      * This class is mostly intended for service providers. MimeMessage - * and MimeBody use this class for holding their headers.

      - *

      - *


      A note on RFC822 and MIME headers

      - *

      + * and MimeBody use this class for holding their headers. + *


      A note on RFC822 and MIME headers + *

      * RFC822 and MIME header fields must contain only * US-ASCII characters. If a header contains non US-ASCII characters, * it must be encoded as per the rules in RFC 2047. The MimeUtility @@ -65,7 +64,7 @@ import java.util.NoSuchElementException; * header fields must be folded (wrapped) before being sent if they * exceed the line length limitation for the transport (1000 bytes for * SMTP). Received headers may have been folded. The application is - * responsible for folding and unfolding headers as appropriate.

      + * responsible for folding and unfolding headers as appropriate. * * @author John Mani * @author Bill Shannon @@ -90,12 +89,13 @@ public final class InternetHeaders { * Read and parse the given RFC822 message stream till the * blank line separating the header from the body. The input * stream is left positioned at the start of the body. The - * header lines are stored internally.

      - *

      + * header lines are stored internally. + *

      * For efficiency, wrap a BufferedInputStream around the actual * input stream and pass it as the parameter. * * @param is RFC822 input stream + * @exception MessagingException in case of error */ public InternetHeaders(InputStream is) throws MessagingException { load(is); @@ -104,13 +104,14 @@ public final class InternetHeaders { /** * Read and parse the given RFC822 message stream till the * blank line separating the header from the body. Store the - * header lines inside this InternetHeaders object.

      - *

      + * header lines inside this InternetHeaders object. + *

      * Note that the header lines are added into this InternetHeaders * object, so any existing headers in this object will not be * affected. * * @param is RFC822 input stream + * @exception MessagingException in case of error */ public void load(InputStream is) throws MessagingException { // Read header lines until a blank line. It is valid @@ -208,9 +209,9 @@ public final class InternetHeaders { /** * Change the first header line that matches name * to have value, adding a new header if no existing header - * matches. Remove all matching headers but the first.

      - *

      - * Note that RFC822 headers can only contain US-ASCII characters + * matches. Remove all matching headers but the first. + *

      + * Note that RFC822 headers can only contain US-ASCII characters. * * @param name header name * @param value header value @@ -242,8 +243,7 @@ public final class InternetHeaders { } /** - * Add a header with the specified name and value to the header list.

      - *

      + * Add a header with the specified name and value to the header list. * Note that RFC822 headers can only contain US-ASCII characters. * * @param name header name @@ -285,15 +285,15 @@ public final class InternetHeaders { * * @return Header objects */ - public List getAllHeaders() { + public FinalArrayList getAllHeaders() { return headers; // conceptually it should be read-only, but for performance reason I'm not wrapping it here } /** * Add an RFC822 header line to the header store. * If the line starts with a space or tab (a continuation line), - * add it to the last header line in the list.

      - *

      + * add it to the last header line in the list. + *

      * Note that RFC822 headers can only contain US-ASCII characters * * @param line raw RFC822 header line @@ -316,15 +316,19 @@ public final class InternetHeaders { /** * Return all the header lines as a collection + * + * @return list of header lines. */ public List getAllHeaderLines() { if(headerValueView==null) headerValueView = new AbstractList() { - public String get(int index) { + @Override + public String get(int index) { return headers.get(index).line; } - public int size() { + @Override + public int size() { return headers.size(); } }; @@ -368,6 +372,7 @@ class hdr implements Header { /* * Return the "name" part of the header line. */ + @Override public String getName() { return name; } @@ -375,6 +380,7 @@ class hdr implements Header { /* * Return the "value" part of the header line. */ + @Override public String getValue() { int i = line.indexOf(':'); if (i < 0) diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java index 6642dfa19ce..8aa7fe3f864 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,7 +32,6 @@ package com.sun.xml.internal.messaging.saaj.packaging.mime.internet; -import com.sun.xml.internal.messaging.saaj.packaging.mime.Header; import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException; import com.sun.xml.internal.messaging.saaj.packaging.mime.util.OutputUtil; import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream; @@ -52,12 +51,12 @@ import com.sun.xml.internal.org.jvnet.mimepull.MIMEPart; /** * This class represents a MIME body part. * MimeBodyParts are contained in MimeMultipart - * objects.

      - * + * objects. + *

      * MimeBodyPart uses the InternetHeaders class to parse - * and store the headers of that body part.

      + * and store the headers of that body part. * - *


      A note on RFC 822 and MIME headers

      + *


      A note on RFC 822 and MIME headers * * RFC 822 header fields must contain only * US-ASCII characters. MIME allows non ASCII characters to be present @@ -70,7 +69,7 @@ import com.sun.xml.internal.org.jvnet.mimepull.MIMEPart; * header fields must be folded (wrapped) before being sent if they * exceed the line length limitation for the transport (1000 bytes for * SMTP). Received headers may have been folded. The application is - * responsible for folding and unfolding headers as appropriate.

      + * responsible for folding and unfolding headers as appropriate. * * @author John Mani * @author Bill Shannon @@ -179,6 +178,8 @@ public final class MimeBodyPart { * the delimiter strings. * * @param is the body part Input Stream + * + * @exception MessagingException in case of error */ public MimeBodyPart(InputStream is) throws MessagingException { if (!(is instanceof ByteArrayInputStream) && @@ -216,6 +217,7 @@ public final class MimeBodyPart { * * @param headers The header of this part * @param content bytes representing the body of this part. + * @param len content length. */ public MimeBodyPart(InternetHeaders headers, byte[] content, int len) { this.headers = headers; @@ -242,6 +244,7 @@ public final class MimeBodyPart { /** * Return the containing MimeMultipart object, * or null if not known. + * @return parent part. */ public MimeMultipart getParent() { return parent; @@ -253,6 +256,7 @@ public final class MimeBodyPart { * addBodyPart method. parent may be * null if the MimeBodyPart is being removed * from its containing MimeMultipart. + * @param parent parent part * @since JavaMail 1.1 */ public void setParent(MimeMultipart parent) { @@ -351,6 +355,9 @@ public final class MimeBodyPart { * If the subType of mimeType is the * special character '*', then the subtype is ignored during the * comparison. + * + * @param mimeType string + * @return true if it is valid mime type */ public boolean isMimeType(String mimeType) { boolean result; @@ -375,6 +382,9 @@ public final class MimeBodyPart { * This implementation uses getHeader(name) * to obtain the requisite header field. * + * @return content disposition + * @exception MessagingException in case of error + * * @see #headers */ public String getDisposition() throws MessagingException { @@ -392,6 +402,9 @@ public final class MimeBodyPart { * If the disposition is null, any existing "Content-Disposition" * header field is removed. * + * @param disposition value + * + * @exception MessagingException in case of error * @exception IllegalStateException if this body part is * obtained from a READ_ONLY folder. */ @@ -423,6 +436,9 @@ public final class MimeBodyPart { * This implementation uses getHeader(name) * to obtain the requisite header field. * + * @return encoding + * @exception MessagingException in case of error + * * @see #headers */ public String getEncoding() throws MessagingException { @@ -465,6 +481,8 @@ public final class MimeBodyPart { * * This implementation uses getHeader(name) * to obtain the requisite header field. + * + * @return conent id */ public String getContentID() { return getHeader("Content-ID", null); @@ -475,6 +493,7 @@ public final class MimeBodyPart { * If the cid parameter is null, any existing * "Content-ID" is removed. * + * @param cid content id * @exception IllegalStateException if this body part is * obtained from a READ_ONLY folder. * @since JavaMail 1.3 @@ -493,6 +512,8 @@ public final class MimeBodyPart { * * This implementation uses getHeader(name) * to obtain the requisite header field. + * + * @return content MD5 sum */ public String getContentMD5() { return getHeader("Content-MD5", null); @@ -501,6 +522,8 @@ public final class MimeBodyPart { /** * Set the "Content-MD5" header field of this body part. * + * @param md5 content md5 sum + * * @exception IllegalStateException if this body part is * obtained from a READ_ONLY folder. */ @@ -516,6 +539,9 @@ public final class MimeBodyPart { * * This implementation uses getHeader(name) * to obtain the requisite header field. + * + * @return array of language tags + * @exception MessagingException in case of error */ public String[] getContentLanguage() throws MessagingException { String s = getHeader("Content-Language", null); @@ -663,6 +689,7 @@ public final class MimeBodyPart { * Returns null if both are absent. * * @return filename + * @exception MessagingException in case of error */ public String getFileName() throws MessagingException { String filename = null; @@ -692,6 +719,9 @@ public final class MimeBodyPart { * Sets the "filename" parameter of the "Content-Disposition" * header field of this body part. * + * @param filename filename + * + * @exception MessagingException in case of error * @exception IllegalStateException if this body part is * obtained from a READ_ONLY folder. */ @@ -769,9 +799,14 @@ public final class MimeBodyPart { * This implementation simply calls the getContentStream * method. * + * @return input stream + * + * @exception MessagingException in case of error + * * @see #getInputStream * @see #getContentStream * @since JavaMail 1.2 + * */ public InputStream getRawInputStream() throws MessagingException { return getContentStream(); @@ -782,24 +817,30 @@ public final class MimeBodyPart { * * The implementation provided here works just like the * the implementation in MimeMessage. + * + * @return data handler */ public DataHandler getDataHandler() { if (mimePart != null) { //return an inputstream return new DataHandler(new DataSource() { + @Override public InputStream getInputStream() throws IOException { return mimePart.read(); } + @Override public OutputStream getOutputStream() throws IOException { throw new UnsupportedOperationException("getOutputStream cannot be supported : You have enabled LazyAttachments Option"); } + @Override public String getContentType() { return mimePart.getContentType(); } + @Override public String getName() { return "MIMEPart Wrapped DataSource"; } @@ -890,6 +931,8 @@ public final class MimeBodyPart { * If the charset is already known, use the * setText() version that takes the charset parameter. * + * @param text string + * * @see #setText(String text, String charset) */ public void setText(String text) { @@ -902,6 +945,9 @@ public final class MimeBodyPart { * charset. The given Unicode string will be charset-encoded * using the specified charset. The charset is also used to set * the "charset" parameter. + * + * @param text string + * @param charset character set */ public void setText(String text, String charset) { if (charset == null) { @@ -932,7 +978,9 @@ public final class MimeBodyPart { /** * Output the body part as an RFC 822 format stream. * - * @exception MessagingException + * @param os output stream + * + * @exception MessagingException in case of error * @exception IOException if an error occurs writing to the * stream or if an error is generated * by the javax.activation layer. @@ -1033,6 +1081,8 @@ public final class MimeBodyPart { /** * Remove all headers with this name. + * + * @param name header name */ public void removeHeader(String name) { headers.removeHeader(name); @@ -1041,14 +1091,18 @@ public final class MimeBodyPart { /** * Return all the headers from this Message as an Enumeration of * Header objects. + * + * @return all headers */ - public List getAllHeaders() { + public FinalArrayList getAllHeaders() { return headers.getAllHeaders(); } /** * Add a header line to this body part + * + * @param line header line to add */ public void addHeaderLine(String line) { headers.addHeaderLine(line); @@ -1075,6 +1129,8 @@ public final class MimeBodyPart { *
      * In both cases this method is typically called by the * Message.saveChanges method. + * + * @exception MessagingException in case of error. */ protected void updateHeaders() throws MessagingException { DataHandler dh = getDataHandler(); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java index c9bc1170f0f..6c5bf210d13 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -133,6 +133,7 @@ public class MimeMultipart { * contentType field.

      * * MimeBodyParts may be added later. + * @param subtype subtype. */ public MimeMultipart(String subtype) { //super(); @@ -163,6 +164,8 @@ public class MimeMultipart { * This must be the same information as {@link DataSource#getContentType()}. * All the callers of this method seem to have this object handy, so * for performance reason this method accepts it. Can be null. + * + * @exception MessagingException in case of error */ public MimeMultipart(DataSource ds, ContentType ct) throws MessagingException { // 'ds' was not a MultipartDataSource, we have @@ -189,7 +192,8 @@ public class MimeMultipart { /** * Return the number of enclosed MimeBodyPart objects. * - * @return number of parts + * @return number of parts. + * @throws MessagingException in case of error. */ public int getCount() throws MessagingException { parse(); @@ -202,8 +206,8 @@ public class MimeMultipart { /** * Get the specified MimeBodyPart. BodyParts are numbered starting at 0. * - * @param index the index of the desired MimeBodyPart - * @return the MimeBodyPart + * @param index the index of the desired MimeBodyPart. + * @return the MimeBodyPart. * @exception MessagingException if no such MimeBodyPart exists */ public MimeBodyPart getBodyPart(int index) @@ -221,6 +225,7 @@ public class MimeMultipart { * * @param CID the ContentID of the desired part * @return the MimeBodyPart + * @exception MessagingException if no such MimeBodyPart exists. */ public MimeBodyPart getBodyPart(String CID) throws MessagingException { @@ -256,6 +261,8 @@ public class MimeMultipart { * expensive for a specific MimeMultipart subclass, then it * might itself want to track whether its internal state actually * did change, and do the header updating only if necessary. + * + * @exception MessagingException in case of error. */ protected void updateHeaders() throws MessagingException { for (int i = 0; i < parts.size(); i++) @@ -265,6 +272,11 @@ public class MimeMultipart { /** * Iterates through all the parts and outputs each Mime part * separated by a boundary. + * + * @param os output stream. + * + * @exception IOException if an I/O Error occurs. + * @exception MessagingException in case of error. */ public void writeTo(OutputStream os) throws IOException, MessagingException { @@ -291,6 +303,8 @@ public class MimeMultipart { * method is called by all other methods that need data for * the body parts, to make sure the data has been parsed. * + * @exception MessagingException in case of error. + * * @since JavaMail 1.2 */ protected void parse() throws MessagingException { @@ -490,8 +504,9 @@ public class MimeMultipart { * necessary. This implementation simply constructs and returns * an InternetHeaders object. * - * @param is the InputStream to read the headers from - * @exception MessagingException + * @param is the InputStream to read the headers from. + * @return headers. + * @exception MessagingException in case of error. * @since JavaMail 1.2 */ protected InternetHeaders createInternetHeaders(InputStream is) @@ -506,8 +521,10 @@ public class MimeMultipart { * necessary. This implementation simply constructs and returns * a MimeBodyPart object. * - * @param headers the headers for the body part - * @param content the content of the body part + * @param headers the headers for the body part. + * @param content the content of the body part. + * @param len the content length. + * @return MimeBodyPart * @since JavaMail 1.2 */ protected MimeBodyPart createMimeBodyPart(InternetHeaders headers, byte[] content, int len) { @@ -521,8 +538,9 @@ public class MimeMultipart { * necessary. This implementation simply constructs and returns * a MimeBodyPart object. * - * @param is InputStream containing the body part - * @exception MessagingException + * @param is InputStream containing the body part. + * @return MimeBodyPart. + * @exception MessagingException in case of error. * @since JavaMail 1.2 */ protected MimeBodyPart createMimeBodyPart(InputStream is) throws MessagingException { @@ -543,8 +561,8 @@ public class MimeMultipart { * a specific multipart subtype. * * @param mp MimeMultipart datasource + * @exception MessagingException in case of error. */ - protected void setMultipartDataSource(MultipartDataSource mp) throws MessagingException { contentType = new ContentType(mp.getContentType()); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java index 8d08e39e1eb..eb7b46c5656 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -50,6 +50,8 @@ public final class MimePartDataSource implements DataSource { /** * Constructor, that constructs a DataSource from a MimeBodyPart. + * + * @param part body part */ public MimePartDataSource(MimeBodyPart part) { this.part = part; @@ -68,6 +70,7 @@ public final class MimePartDataSource implements DataSource { * * @return decoded input stream */ + @Override public InputStream getInputStream() throws IOException { try { @@ -88,7 +91,8 @@ public final class MimePartDataSource implements DataSource { * * This implementation throws the UnknownServiceException. */ - public OutputStream getOutputStream() throws IOException { + @Override + public OutputStream getOutputStream() throws IOException { throw new UnknownServiceException(); } @@ -98,6 +102,7 @@ public final class MimePartDataSource implements DataSource { * This implementation just invokes the getContentType * method on the MimeBodyPart. */ + @Override public String getContentType() { return part.getContentType(); } @@ -107,7 +112,8 @@ public final class MimePartDataSource implements DataSource { * * This implementation just returns an empty string. */ - public String getName() { + @Override + public String getName() { try { return part.getFileName(); } catch (MessagingException mex) { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeUtility.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeUtility.java index 45f6cea11c1..87bdd6e6f5f 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeUtility.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeUtility.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -65,11 +65,11 @@ import com.sun.xml.internal.messaging.saaj.util.SAAJUtil; *

      * Note that to get the actual bytes of a mail-safe String (say, * for sending over SMTP), one must do - *

      + * 
        *
        *      byte[] bytes = string.getBytes("iso-8859-1");
        *
      - * 

      + *

      * * The setHeader and addHeader methods * on MimeMessage and MimeBodyPart assume that the given header values @@ -222,6 +222,10 @@ public class MimeUtility { * DataHandler uses a thread, a pair of pipe streams, * and the writeTo method to produce the data.

      * + * @param dh data handler + * + * @return encoding + * * @since JavaMail 1.2 */ public static String getEncoding(DataHandler dh) { @@ -294,6 +298,7 @@ public class MimeUtility { * @param is input stream * @param encoding the encoding of the stream. * @return decoded input stream. + * @exception MessagingException in case of error */ public static InputStream decode(InputStream is, String encoding) throws MessagingException { @@ -323,6 +328,7 @@ public class MimeUtility { * @param encoding the encoding of the stream. * @return output stream that applies the * specified encoding. + * @exception MessagingException in case of error */ public static OutputStream encode(OutputStream os, String encoding) throws MessagingException { @@ -358,6 +364,7 @@ public class MimeUtility { * with uuencode) * @return output stream that applies the * specified encoding. + * @exception MessagingException in case of error * @since JavaMail 1.2 */ public static OutputStream encode(OutputStream os, String encoding, @@ -397,7 +404,7 @@ public class MimeUtility { * "unstructured" RFC 822 headers.

      * * Example of usage: - *

      +     * 
            *
            *  MimeBodyPart part = ...
            *  String rawvalue = "FooBar Mailer, Japanese version 1.1"
      @@ -411,7 +418,7 @@ public class MimeUtility {
            *   // setHeader() failure
            *  }
            *
      -     * 

      + *

      * * @param text unicode string * @return Unicode string containing only US-ASCII characters @@ -446,6 +453,7 @@ public class MimeUtility { * encoded are in the ASCII charset, otherwise "B" encoding * is used. * @return Unicode string containing only US-ASCII characters + * @exception UnsupportedEncodingException in case of unsupported encoding */ public static String encodeText(String text, String charset, String encoding) @@ -464,7 +472,7 @@ public class MimeUtility { * returned as-is

      * * Example of usage: - *

      +     * 
            *
            *  MimeBodyPart part = ...
            *  String rawvalue = null;
      @@ -479,9 +487,10 @@ public class MimeUtility {
            *
            *  return value;
            *
      -     * 

      + *

      * * @param etext the possibly encoded value + * @return decoded text * @exception UnsupportedEncodingException if the charset * conversion failed. */ @@ -568,7 +577,7 @@ public class MimeUtility { * The InternetAddress class, for example, uses this to encode * it's 'phrase' component. * - * @param text unicode string + * @param word unicode string * @return Array of Unicode strings containing only US-ASCII * characters. * @exception UnsupportedEncodingException if the encoding fails @@ -590,7 +599,7 @@ public class MimeUtility { * The resulting bytes are then returned as a Unicode string * containing only ASCII characters.

      * - * @param text unicode string + * @param word unicode string * @param charset the MIME charset * @param encoding the encoding to be used. Currently supported * values are "B" and "Q". If this parameter is null, then @@ -720,6 +729,7 @@ public class MimeUtility { * fails, an UnsupportedEncodingException is thrown.

      * * @param eword the possibly encoded value + * @return deocoded word * @exception ParseException if the string is not an * encoded-word as per RFC 2047. * @exception UnsupportedEncodingException if the charset @@ -847,8 +857,8 @@ public class MimeUtility { * @param word word to be quoted * @param specials the set of special characters * @return the possibly quoted word - * @see javax.mail.internet.HeaderTokenizer#MIME - * @see javax.mail.internet.HeaderTokenizer#RFC822 + * @see com.sun.xml.internal.messaging.saaj.packaging.mime.internet.HeaderTokenizer#MIME + * @see com.sun.xml.internal.messaging.saaj.packaging.mime.internet.HeaderTokenizer#RFC822 */ public static String quote(String word, String specials) { int len = word.length(); @@ -1111,7 +1121,8 @@ public class MimeUtility { } catch (SecurityException sex) { class NullInputStream extends InputStream { - public int read() { + @Override + public int read() { return 0; } } @@ -1277,7 +1288,7 @@ public class MimeUtility { int l = s.length(); for (int i = 0; i < l; i++) { - if (nonascii((int)s.charAt(i))) // non-ascii + if (nonascii(s.charAt(i))) // non-ascii non_ascii++; else ascii++; @@ -1444,14 +1455,17 @@ class AsciiOutputStream extends OutputStream { checkEOL = encodeEolStrict && breakOnNonAscii; } + @Override public void write(int b) throws IOException { check(b); } + @Override public void write(byte b[]) throws IOException { write(b, 0, b.length); } + @Override public void write(byte b[], int off, int len) throws IOException { len += off; for (int i = off; i < len ; i++) diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/SharedInputStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/SharedInputStream.java index c650b6b39cc..4619c4dcd87 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/SharedInputStream.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/SharedInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -73,6 +73,9 @@ public interface SharedInputStream { /** * Writes the specified region to another {@link OutputStream}. + * @param start the starting position + * @param end the ending position + 1 + * @param out output stream */ public void writeTo(long start,long end, OutputStream out); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/ASCIIUtility.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/ASCIIUtility.java index 48a56e8068c..a85fc85dc67 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/ASCIIUtility.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/ASCIIUtility.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,9 +43,17 @@ public class ASCIIUtility { /** * Convert the bytes within the specified range of the given byte * array into a signed integer in the given radix . The range extends - * from start till, but not including end.

      + * from start till, but not including end. + * + * Based on java.lang.Integer.parseInt(). + * + * @param b bytes to convert to integer. + * @param start start of the range. + * @param end end of the range (not including). + * @param radix radix. + * + * @return integer. * - * Based on java.lang.Integer.parseInt() */ public static int parseInt(byte[] b, int start, int end, int radix) throws NumberFormatException { @@ -110,7 +118,14 @@ public class ASCIIUtility { /** * Convert the bytes within the specified range of the given byte * array into a String. The range extends from start - * till, but not including end.

      + * till, but not including end. + * + * @param b bytes to convert to integer. + * @param start start of the range. + * @param end end of the range (not including). + * + * @return integer. + * */ public static String toString(byte[] b, int start, int end) { int size = end - start; @@ -122,6 +137,15 @@ public class ASCIIUtility { return new String(theChars); } + /** + * Encodes specified String into a sequence of bytes using the platform's + * default charset, storing the result into a new byte array. + * + * @param s string to encode into byte array. + * + * @return byte array. + * + */ public static byte[] getBytes(String s) { char [] chars= s.toCharArray(); int size = chars.length; @@ -133,6 +157,13 @@ public class ASCIIUtility { } /** + * Converts input stream to array. + * + * @param is stream to convert to array. + * + * @return byte array. + * + * @throws IOException if an I/O error occurs. * * @deprecated * this is an expensive operation that require an additional @@ -140,6 +171,7 @@ public class ASCIIUtility { * Unless you absolutely need the exact size array, don't use this. * Use {@link ByteOutputStream} and {@link ByteOutputStream#write(InputStream)}. */ + @Deprecated public static byte[] getBytes(InputStream is) throws IOException { ByteOutputStream bos = null; try { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64DecoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64DecoderStream.java index 31f3e3695a6..972ccd2dba0 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64DecoderStream.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64DecoderStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -70,6 +70,7 @@ public class BASE64DecoderStream extends FilterInputStream { * @exception IOException if an I/O error occurs. * @see java.io.FilterInputStream#in */ + @Override public int read() throws IOException { if (index >= bufsize) { decode(); // Fills up buffer @@ -94,6 +95,7 @@ public class BASE64DecoderStream extends FilterInputStream { * the stream has been reached. * @exception IOException if an I/O error occurs. */ + @Override public int read(byte[] buf, int off, int len) throws IOException { int i, c; for (i = 0; i < len; i++) { @@ -112,6 +114,7 @@ public class BASE64DecoderStream extends FilterInputStream { * Tests if this input stream supports marks. Currently this class * does not support marks */ + @Override public boolean markSupported() { return false; // Maybe later .. } @@ -122,6 +125,7 @@ public class BASE64DecoderStream extends FilterInputStream { * a close approximation in case the original encoded stream * contains embedded CRLFs; since the CRLFs are discarded, not decoded */ + @Override public int available() throws IOException { // This is only an estimate, since in.available() // might include CRLFs too .. @@ -200,6 +204,10 @@ public class BASE64DecoderStream extends FilterInputStream { * in the IMAP AUTHENTICATE protocol, but not to decode the * entire content of a MIME part. * + * @param inbuf byte array to decode + * + * @return decoded byte array + * * NOTE: inbuf may only contain valid base64 characters. * Whitespace is not ignored. */ diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64EncoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64EncoderStream.java index d1c3350146b..843a334f933 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64EncoderStream.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64EncoderStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -80,6 +80,7 @@ public class BASE64EncoderStream extends FilterOutputStream { * @param len the number of bytes to write. * @exception IOException if an I/O error occurs. */ + @Override public void write(byte[] b, int off, int len) throws IOException { for (int i = 0; i < len; i++) write(b[off + i]); @@ -90,6 +91,7 @@ public class BASE64EncoderStream extends FilterOutputStream { * @param b the data to be written. * @exception IOException if an I/O error occurs. */ + @Override public void write(byte[] b) throws IOException { write(b, 0, b.length); } @@ -99,6 +101,7 @@ public class BASE64EncoderStream extends FilterOutputStream { * @param c the byte. * @exception IOException if an I/O error occurs. */ + @Override public void write(int c) throws IOException { buffer[bufsize++] = (byte)c; if (bufsize == 3) { // Encoding unit = 3 bytes @@ -112,6 +115,7 @@ public class BASE64EncoderStream extends FilterOutputStream { * to be encoded out to the stream. * @exception IOException if an I/O error occurs. */ + @Override public void flush() throws IOException { if (bufsize > 0) { // If there's unencoded characters in the buffer .. encode(); // .. encode them @@ -124,6 +128,7 @@ public class BASE64EncoderStream extends FilterOutputStream { * Forces any buffered output bytes to be encoded out to the stream * and closes this output stream */ + @Override public void close() throws IOException { flush(); out.close(); @@ -186,6 +191,10 @@ public class BASE64EncoderStream extends FilterOutputStream { * This method is suitable for short strings, such as those * in the IMAP AUTHENTICATE protocol, but not to encode the * entire content of a MIME part. + * + * @param inbuf byte array to encode. + * + * @return encoded byte array. */ public static byte[] encode(byte[] inbuf) { if (inbuf.length == 0) diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java index ec13f9e106d..a2a23d697b5 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -55,6 +55,10 @@ public class BEncoderStream extends BASE64EncoderStream { /** * Returns the length of the encoded version of this byte array. + * + * @param b byte array. + * + * @return length of the byte array. */ public static int encodedLength(byte[] b) { return ((b.length + 2)/3) * 4; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/LineInputStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/LineInputStream.java index 50390f56d2f..1d0533f5f43 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/LineInputStream.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/LineInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -64,6 +64,10 @@ public final class LineInputStream extends FilterInputStream { * * This class is similar to the deprecated * DataInputStream.readLine() + * + * @return line. + * + * @throws IOException if an I/O error occurs. */ public String readLine() throws IOException { InputStream in = this.in; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java index 92bd21eaa19..88239e07c19 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -54,6 +54,11 @@ public abstract class OutputUtil { /** * Writes a string as ASCII string. + * + * @param s string. + * @param out output stream. + * + * @throws IOException if an I/O error occurs. */ public static void writeAsAscii(String s,OutputStream out) throws IOException { int len = s.length(); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QEncoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QEncoderStream.java index 2cf6e31e7c5..272806bd591 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QEncoderStream.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QEncoderStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -69,6 +69,7 @@ public class QEncoderStream extends QPEncoderStream { * @param c the byte. * @exception IOException if an I/O error occurs. */ + @Override public void write(int c) throws IOException { c = c & 0xff; // Turn off the MSB. if (c == ' ') @@ -82,6 +83,11 @@ public class QEncoderStream extends QPEncoderStream { /** * Returns the length of the encoded version of this byte array. + * + * @param b byte array. + * @param encodingWord whether use word or text specials. + * + * @return length. */ public static int encodedLength(byte[] b, boolean encodingWord) { int len = 0; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUEncoderStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUEncoderStream.java index 9cd0216291d..49d9ec7a6e8 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUEncoderStream.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUEncoderStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -83,23 +83,29 @@ public class UUEncoderStream extends FilterOutputStream { /** * Set up the buffer name and permission mode. * This method has any effect only if it is invoked before - * you start writing into the output stream + * you start writing into the output stream. + * + * @param name name to set for the buffer. + * @param mode permission mode. */ public void setNameMode(String name, int mode) { this.name = name; this.mode = mode; } + @Override public void write(byte[] b, int off, int len) throws IOException { for (int i = 0; i < len; i++) write(b[off + i]); } + @Override public void write(byte[] data) throws IOException { write(data, 0, data.length); } - public void write(int c) throws IOException { + @Override + public void write(int c) throws IOException { /* buffer up characters till we get a line's worth, then encode * and write them out. Max number of characters allowed per * line is 45. @@ -112,6 +118,7 @@ public class UUEncoderStream extends FilterOutputStream { } } + @Override public void flush() throws IOException { if (bufsize > 0) { // If there's unencoded characters in the buffer writePrefix(); @@ -121,6 +128,7 @@ public class UUEncoderStream extends FilterOutputStream { out.flush(); } + @Override public void close() throws IOException { flush(); out.close(); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/Envelope.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/Envelope.java index 607e8c36c68..50ed0edaf98 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/Envelope.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/Envelope.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,16 +41,25 @@ import javax.xml.transform.Source; public interface Envelope extends SOAPEnvelope { /** * Get the content as a JAXP Source. + * + * @return source */ Source getContent(); /** * Output the content. + * + * @param out output stream. + * @exception IOException in case of an I/O error. */ void output(OutputStream out) throws IOException; /** * Output the content. + * + * @param out output stream + * @param isFastInfoset true if it is fast infoset. + * @exception IOException in case of an I/O error. */ void output(OutputStream out, boolean isFastInfoset) throws IOException; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/FastInfosetDataContentHandler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/FastInfosetDataContentHandler.java index e7223cca00e..4c8fb5a78f4 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/FastInfosetDataContentHandler.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/FastInfosetDataContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -47,9 +47,10 @@ public class FastInfosetDataContentHandler implements DataContentHandler { } /** - * return the DataFlavors for this DataContentHandler + * Return the DataFlavors for this DataContentHandler * @return The DataFlavors. */ + @Override public DataFlavor[] getTransferDataFlavors() { // throws Exception; DataFlavor flavors[] = new DataFlavor[1]; flavors[0] = new ActivationDataFlavor( @@ -59,11 +60,13 @@ public class FastInfosetDataContentHandler implements DataContentHandler { } /** - * return the Transfer Data of type DataFlavor from InputStream - * @param df The DataFlavor. - * @param ins The InputStream corresponding to the data. + * Return the Transfer Data of type DataFlavor from InputStream + * @param flavor The DataFlavor. + * @param dataSource DataSource. * @return The constructed Object. + * @exception IOException in case of an I/O error */ + @Override public Object getTransferData(DataFlavor flavor, DataSource dataSource) throws IOException { @@ -81,6 +84,7 @@ public class FastInfosetDataContentHandler implements DataContentHandler { return null; } + @Override public Object getContent(DataSource dataSource) throws IOException { try { return FastInfosetReflection.FastInfosetSource_new( @@ -92,10 +96,11 @@ public class FastInfosetDataContentHandler implements DataContentHandler { } /** - * construct an object from a byte stream + * Construct an object from a byte stream * (similar semantically to previous method, we are deciding * which one to support) */ + @Override public void writeTo(Object obj, String mimeType, OutputStream os) throws IOException { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/GifDataContentHandler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/GifDataContentHandler.java index 2ac41fcbe77..48ddb7a7d6e 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/GifDataContentHandler.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/GifDataContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -52,6 +52,7 @@ public class GifDataContentHandler extends Component implements DataContentHandl * * @return The DataFlavors */ + @Override public DataFlavor[] getTransferDataFlavors() { // throws Exception; return new DataFlavor[] { getDF()}; } @@ -60,9 +61,11 @@ public class GifDataContentHandler extends Component implements DataContentHandl * Return the Transfer Data of type DataFlavor from InputStream. * * @param df The DataFlavor - * @param ins The InputStream corresponding to the data + * @param ds The DataSource * @return String object + * @exception IOException in case of an I/O error */ + @Override public Object getTransferData(DataFlavor df, DataSource ds) throws IOException { // use myDF.equals to be sure to get ActivationDataFlavor.equals, @@ -73,6 +76,7 @@ public class GifDataContentHandler extends Component implements DataContentHandl return null; } + @Override public Object getContent(DataSource ds) throws IOException { InputStream is = ds.getInputStream(); int pos = 0; @@ -98,7 +102,11 @@ public class GifDataContentHandler extends Component implements DataContentHandl /** * Write the object to the output stream, using the specified MIME type. + * @param obj object to write + * @param type requested MIME type of the resulting byte stream + * @param os OutputStream */ + @Override public void writeTo(Object obj, String type, OutputStream os) throws IOException { if (obj != null && !(obj instanceof Image)) diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java index b66cbbdfa6c..8f063f155c9 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -67,8 +67,9 @@ public class ImageDataContentHandler extends Component * * @return The DataFlavors. */ + @Override public DataFlavor[] getTransferDataFlavors() { - return (DataFlavor[]) Arrays.copyOf(flavor, flavor.length); + return Arrays.copyOf(flavor, flavor.length); } /** @@ -80,6 +81,7 @@ public class ImageDataContentHandler extends Component * @param ds The DataSource representing the data to be converted. * @return The constructed Object. */ + @Override public Object getTransferData(DataFlavor df, DataSource ds) throws IOException { for (int i=0; i < flavor.length; i++) { @@ -98,6 +100,7 @@ public class ImageDataContentHandler extends Component * @param ds The DataSource representing the data to be converted. * @return The constructed Object. */ + @Override public Object getContent(DataSource ds) throws IOException { return ImageIO.read(new BufferedInputStream(ds.getInputStream())); } @@ -107,11 +110,11 @@ public class ImageDataContentHandler extends Component * and write it to the output stream. * * @param obj The object to be converted. - * @param mimeType The requested MIME type of the resulting byte stream. + * @param type The requested MIME type of the resulting byte stream. * @param os The output stream into which to write the converted * byte stream. */ - + @Override public void writeTo(Object obj, String type, OutputStream os) throws IOException { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/JpegDataContentHandler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/JpegDataContentHandler.java index 083c1de6bf7..83cfbe55b48 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/JpegDataContentHandler.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/JpegDataContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -47,9 +47,10 @@ public class JpegDataContentHandler public static final String STR_SRC = "java.awt.Image"; /** - * return the DataFlavors for this DataContentHandler + * Return the DataFlavors for this DataContentHandler * @return The DataFlavors. */ + @Override public DataFlavor[] getTransferDataFlavors() { // throws Exception; DataFlavor flavors[] = new DataFlavor[1]; @@ -67,11 +68,12 @@ public class JpegDataContentHandler } /** - * return the Transfer Data of type DataFlavor from InputStream - * @param df The DataFlavor. - * @param ins The InputStream corresponding to the data. + * Return the Transfer Data of type DataFlavor from InputStream + * @param df The DataFlavor + * @param ds The DataSource * @return The constructed Object. */ + @Override public Object getTransferData(DataFlavor df, DataSource ds) { // this is sort of hacky, but will work for the @@ -98,6 +100,7 @@ public class JpegDataContentHandler /** * */ + @Override public Object getContent(DataSource ds) { // throws Exception; InputStream inputStream = null; BufferedImage jpegLoadImage = null; @@ -109,14 +112,18 @@ public class JpegDataContentHandler } catch (Exception e) { } - return (Image) jpegLoadImage; + return jpegLoadImage; } /** - * construct an object from a byte stream + * Construct an object from a byte stream * (similar semantically to previous method, we are deciding * which one to support) + * @param obj object to write + * @param mimeType requested MIME type of the resulting byte stream + * @param os OutputStream */ + @Override public void writeTo(Object obj, String mimeType, OutputStream os) throws IOException { if (!mimeType.equals("image/jpeg")) diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LazyEnvelope.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LazyEnvelope.java index 1f83ca5cfde..5cf8b7addb7 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LazyEnvelope.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LazyEnvelope.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,24 +38,24 @@ public interface LazyEnvelope extends Envelope { /** * Retrieve payload qname without materializing its contents - * @return - * @throws SOAPException + * @return QName + * @throws SOAPException in case of an error */ public QName getPayloadQName() throws SOAPException; /** * Retrieve payload attribute value without materializing its contents - * @param localName - * @return - * @throws SOAPException + * @param localName local name + * @return payload attribute value + * @throws SOAPException in case of an error */ public String getPayloadAttributeValue(String localName) throws SOAPException; /** * Retrieve payload attribute value without materializing its contents - * @param qName - * @return - * @throws SOAPException + * @param qName QName + * @return payload attribute value + * @throws SOAPException in case of an error */ public String getPayloadAttributeValue(QName qName) throws SOAPException; } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java index c760f4a8502..a7df70323a4 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -95,7 +95,7 @@ public abstract class MessageImpl /** * True if this part is encoded using Fast Infoset. - * MIME -> application/fastinfoset + * MIME -> application/fastinfoset */ protected boolean isFastInfoset = false; @@ -202,6 +202,9 @@ public abstract class MessageImpl /** * Construct a new message. This will be invoked before message * sends. + * + * @param isFastInfoset whether it is fast infoset + * @param acceptFastInfoset whether to accept fast infoset */ protected MessageImpl(boolean isFastInfoset, boolean acceptFastInfoset) { this.isFastInfoset = isFastInfoset; @@ -214,6 +217,8 @@ public abstract class MessageImpl /** * Shallow copy. + * + * @param msg SoapMessage */ protected MessageImpl(SOAPMessage msg) { if (!(msg instanceof MessageImpl)) { @@ -233,14 +238,17 @@ public abstract class MessageImpl /** * @param stat * the mask value obtained from {@link #identifyContentType(ContentType)} + * @return true if SOAP 1.1 Content */ protected static boolean isSoap1_1Content(int stat) { return (stat & SOAP1_1_FLAG) != 0; } /** + * Check whether it is SOAP 1.2 content. * @param stat * the mask value obtained from {@link #identifyContentType(ContentType)} + * @return true if it is SOAP 1.2 content */ protected static boolean isSoap1_2Content(int stat) { return (stat & SOAP1_2_FLAG) != 0; @@ -298,6 +306,9 @@ public abstract class MessageImpl * Construct a message from an input stream. When messages are * received, there's two parts -- the transport headers and the * message content in a transport specific stream. + * @param headers MimeHeaders + * @param in InputStream + * @exception SOAPExceptionImpl in case of I/O error */ protected MessageImpl(MimeHeaders headers, final InputStream in) throws SOAPExceptionImpl { @@ -332,6 +343,7 @@ public abstract class MessageImpl * received, there's two parts -- the transport headers and the * message content in a transport specific stream. * + * @param headers headers * @param contentType * The parsed content type header from the headers variable. * This is redundant parameter, but it avoids reparsing this header again. @@ -339,6 +351,8 @@ public abstract class MessageImpl * The result of {@link #identifyContentType(ContentType)} over * the contentType parameter. This redundant parameter, but it avoids * recomputing this information again. + * @param in input stream + * @exception SOAPExceptionImpl in case of an error */ protected MessageImpl(MimeHeaders headers, final ContentType contentType, int stat, final InputStream in) throws SOAPExceptionImpl { init(headers, stat, contentType, in); @@ -425,18 +439,22 @@ public abstract class MessageImpl } else if ((stat & MIME_MULTIPART_FLAG) != 0) { final InputStream finalIn = in; DataSource ds = new DataSource() { + @Override public InputStream getInputStream() { return finalIn; } + @Override public OutputStream getOutputStream() { return null; } + @Override public String getContentType() { return contentType.toString(); } + @Override public String getName() { return ""; } @@ -591,10 +609,12 @@ public abstract class MessageImpl return Boolean.valueOf(lazyParsingProp.toString()); } } + @Override public Object getProperty(String property) { - return (String) properties.get(property); + return properties.get(property); } + @Override public void setProperty(String property, Object value) { verify(property, value); properties.put(property, value); @@ -722,6 +742,7 @@ public abstract class MessageImpl return "text/xml"; } + @Override public MimeHeaders getMimeHeaders() { return this.headers; } @@ -805,10 +826,12 @@ public abstract class MessageImpl saved = false; } + @Override public boolean saveRequired() { return saved != true; } + @Override public String getContentDescription() { String[] values = headers.getHeader("Content-Description"); if (values != null && values.length > 0) @@ -816,13 +839,16 @@ public abstract class MessageImpl return null; } + @Override public void setContentDescription(String description) { headers.setHeader("Content-Description", description); needsSave(); } + @Override public abstract SOAPPart getSOAPPart(); + @Override public void removeAllAttachments() { try { initializeAllAttachments(); @@ -836,6 +862,7 @@ public abstract class MessageImpl } } + @Override public int countAttachments() { try { initializeAllAttachments(); @@ -847,6 +874,7 @@ public abstract class MessageImpl return 0; } + @Override public void addAttachmentPart(AttachmentPart attachment) { try { initializeAllAttachments(); @@ -864,6 +892,7 @@ public abstract class MessageImpl static private final Iterator nullIter = Collections.EMPTY_LIST.iterator(); + @Override public Iterator getAttachments() { try { initializeAllAttachments(); @@ -897,12 +926,14 @@ public abstract class MessageImpl private MimeHeaders headers; private AttachmentPart nextAttachment; + @Override public boolean hasNext() { if (nextAttachment == null) nextAttachment = nextMatch(); return nextAttachment != null; } + @Override public AttachmentPart next() { if (nextAttachment != null) { AttachmentPart ret = nextAttachment; @@ -925,11 +956,13 @@ public abstract class MessageImpl return null; } + @Override public void remove() { iter.remove(); } } + @Override public Iterator getAttachments(MimeHeaders headers) { try { initializeAllAttachments(); @@ -942,6 +975,7 @@ public abstract class MessageImpl return new MimeMatchingIterator(headers); } + @Override public void removeAttachments(MimeHeaders headers) { try { initializeAllAttachments(); @@ -966,10 +1000,12 @@ public abstract class MessageImpl // needsSave(); } + @Override public AttachmentPart createAttachmentPart() { return new AttachmentPartImpl(); } + @Override public AttachmentPart getAttachment(SOAPElement element) throws SOAPException { try { @@ -1187,6 +1223,7 @@ public abstract class MessageImpl } } + @Override public void saveChanges() throws SOAPException { // suck in all the data from the attachments and have it @@ -1340,6 +1377,7 @@ public abstract class MessageImpl } + @Override public void writeTo(OutputStream out) throws SOAPException, IOException { if (saveRequired()){ this.optimizeAttachmentProcessing = true; @@ -1397,6 +1435,7 @@ public abstract class MessageImpl needsSave(); } + @Override public SOAPBody getSOAPBody() throws SOAPException { SOAPBody body = getSOAPPart().getEnvelope().getBody(); /*if (body == null) { @@ -1405,6 +1444,7 @@ public abstract class MessageImpl return body; } + @Override public SOAPHeader getSOAPHeader() throws SOAPException { SOAPHeader hdr = getSOAPPart().getEnvelope().getHeader(); /*if (hdr == null) { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MultipartDataContentHandler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MultipartDataContentHandler.java index fd31cd9533f..cc7696e5ee9 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MultipartDataContentHandler.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MultipartDataContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,6 +43,7 @@ public class MultipartDataContentHandler implements DataContentHandler { * * @return The DataFlavors */ + @Override public DataFlavor[] getTransferDataFlavors() { // throws Exception; return new DataFlavor[] { myDF }; } @@ -51,9 +52,10 @@ public class MultipartDataContentHandler implements DataContentHandler { * Return the Transfer Data of type DataFlavor from InputStream. * * @param df The DataFlavor - * @param ins The InputStream corresponding to the data + * @param ds The DataSource * @return String object */ + @Override public Object getTransferData(DataFlavor df, DataSource ds) { // use myDF.equals to be sure to get ActivationDataFlavor.equals, // which properly ignores Content-Type parameters in comparison @@ -65,7 +67,11 @@ public class MultipartDataContentHandler implements DataContentHandler { /** * Return the content. + * + * @param ds The DataSource + * @return content */ + @Override public Object getContent(DataSource ds) { try { return new MimeMultipart( @@ -78,6 +84,7 @@ public class MultipartDataContentHandler implements DataContentHandler { /** * Write the object to the output stream, using the specific MIME type. */ + @Override public void writeTo(Object obj, String mimeType, OutputStream os) throws IOException { if (obj instanceof MimeMultipart) { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java index 7dac69841a9..417cd9a9cc9 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,16 +29,42 @@ */ package com.sun.xml.internal.messaging.saaj.soap; -import java.util.logging.Logger; - -import com.sun.org.apache.xerces.internal.dom.DocumentImpl; -import org.w3c.dom.*; - -import com.sun.xml.internal.messaging.saaj.soap.impl.*; +import com.sun.xml.internal.messaging.saaj.soap.impl.CDATAImpl; +import com.sun.xml.internal.messaging.saaj.soap.impl.ElementFactory; +import com.sun.xml.internal.messaging.saaj.soap.impl.ElementImpl; +import com.sun.xml.internal.messaging.saaj.soap.impl.SOAPCommentImpl; +import com.sun.xml.internal.messaging.saaj.soap.impl.SOAPTextImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; +import com.sun.xml.internal.messaging.saaj.util.SAAJUtil; +import org.w3c.dom.Attr; +import org.w3c.dom.CDATASection; +import org.w3c.dom.Comment; +import org.w3c.dom.DOMConfiguration; +import org.w3c.dom.DOMException; +import org.w3c.dom.DOMImplementation; +import org.w3c.dom.Document; +import org.w3c.dom.DocumentFragment; +import org.w3c.dom.DocumentType; +import org.w3c.dom.Element; +import org.w3c.dom.EntityReference; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.ProcessingInstruction; +import org.w3c.dom.UserDataHandler; -public class SOAPDocumentImpl extends DocumentImpl implements SOAPDocument { +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.soap.SOAPElement; +import javax.xml.soap.SOAPException; +import java.text.MessageFormat; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Logger; + +public class SOAPDocumentImpl implements SOAPDocument, javax.xml.soap.Node, Document { private static final String XMLNS = "xmlns".intern(); protected static final Logger log = @@ -47,8 +73,24 @@ public class SOAPDocumentImpl extends DocumentImpl implements SOAPDocument { SOAPPartImpl enclosingSOAPPart; + private Document document; + + private Map domToSoap = new HashMap<>(); + public SOAPDocumentImpl(SOAPPartImpl enclosingDocument) { + document = createDocument(); this.enclosingSOAPPart = enclosingDocument; + register(this); + } + + private Document createDocument() { + DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance("com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl", SAAJUtil.getSystemClassLoader()); + try { + final DocumentBuilder documentBuilder = docFactory.newDocumentBuilder(); + return documentBuilder.newDocument(); + } catch (ParserConfigurationException e) { + throw new RuntimeException("Error creating xml document", e); + } } // public SOAPDocumentImpl(boolean grammarAccess) { @@ -81,7 +123,7 @@ public class SOAPDocumentImpl extends DocumentImpl implements SOAPDocument { } public DOMImplementation getImplementation() { - return super.getImplementation(); + return document.getImplementation(); } public Element getDocumentElement() { @@ -91,7 +133,7 @@ public class SOAPDocumentImpl extends DocumentImpl implements SOAPDocument { } protected Element doGetDocumentElement() { - return super.getDocumentElement(); + return document.getDocumentElement(); } public Element createElement(String tagName) throws DOMException { @@ -103,7 +145,7 @@ public class SOAPDocumentImpl extends DocumentImpl implements SOAPDocument { } public DocumentFragment createDocumentFragment() { - return new SOAPDocumentFragment(this); + return document.createDocumentFragment(); } public org.w3c.dom.Text createTextNode(String data) { @@ -139,7 +181,7 @@ public class SOAPDocumentImpl extends DocumentImpl implements SOAPDocument { } } - return super.createAttribute(name); + return document.createAttribute(name); } public EntityReference createEntityReference(String name) @@ -149,12 +191,15 @@ public class SOAPDocumentImpl extends DocumentImpl implements SOAPDocument { } public NodeList getElementsByTagName(String tagname) { - return super.getElementsByTagName(tagname); + return document.getElementsByTagName(tagname); } public org.w3c.dom.Node importNode(Node importedNode, boolean deep) throws DOMException { - return super.importNode(importedNode, deep); + final Node node = document.importNode(getDomNode(importedNode), deep); + return node instanceof Element ? + ElementFactory.createElement(this, (Element) node) + : node; } public Element createElementNS(String namespaceURI, String qualifiedName) @@ -168,26 +213,386 @@ public class SOAPDocumentImpl extends DocumentImpl implements SOAPDocument { public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException { - return super.createAttributeNS(namespaceURI, qualifiedName); + return document.createAttributeNS(namespaceURI, qualifiedName); } public NodeList getElementsByTagNameNS( String namespaceURI, String localName) { - return super.getElementsByTagNameNS(namespaceURI, localName); + return document.getElementsByTagNameNS(namespaceURI, localName); } public Element getElementById(String elementId) { - return super.getElementById(elementId); + return document.getElementById(elementId); } + @Override + public String getInputEncoding() { + return document.getInputEncoding(); + } + + @Override + public String getXmlEncoding() { + return document.getXmlEncoding(); + } + + @Override + public boolean getXmlStandalone() { + return document.getXmlStandalone(); + } + + @Override + public void setXmlStandalone(boolean xmlStandalone) throws DOMException { + document.setXmlStandalone(xmlStandalone); + } + + @Override + public String getXmlVersion() { + return document.getXmlVersion(); + } + + @Override + public void setXmlVersion(String xmlVersion) throws DOMException { + document.setXmlVersion(xmlVersion); + } + + @Override + public boolean getStrictErrorChecking() { + return document.getStrictErrorChecking(); + } + + @Override + public void setStrictErrorChecking(boolean strictErrorChecking) { + document.setStrictErrorChecking(strictErrorChecking); + } + + @Override + public String getDocumentURI() { + return document.getDocumentURI(); + } + + @Override + public void setDocumentURI(String documentURI) { + document.setDocumentURI(documentURI); + } + + @Override + public Node adoptNode(Node source) throws DOMException { + return document.adoptNode(source); + } + + @Override + public DOMConfiguration getDomConfig() { + return document.getDomConfig(); + } + + @Override + public void normalizeDocument() { + document.normalizeDocument(); + } + + @Override + public Node renameNode(Node n, String namespaceURI, String qualifiedName) throws DOMException { + return document.renameNode(n, namespaceURI, qualifiedName); + } + + @Override + public String getNodeName() { + return document.getNodeName(); + } + + @Override + public String getNodeValue() throws DOMException { + return document.getNodeValue(); + } + + @Override + public void setNodeValue(String nodeValue) throws DOMException { + document.setNodeValue(nodeValue); + } + + @Override + public short getNodeType() { + return document.getNodeType(); + } + + @Override + public Node getParentNode() { + return document.getParentNode(); + } + + @Override + public NodeList getChildNodes() { + return document.getChildNodes(); + } + + @Override + public Node getFirstChild() { + return document.getFirstChild(); + } + + @Override + public Node getLastChild() { + return document.getLastChild(); + } + + @Override + public Node getPreviousSibling() { + return document.getPreviousSibling(); + } + + @Override + public Node getNextSibling() { + return document.getNextSibling(); + } + + @Override + public NamedNodeMap getAttributes() { + return document.getAttributes(); + } + + @Override + public Document getOwnerDocument() { + return document.getOwnerDocument(); + } + + @Override + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return document.insertBefore(getDomNode(newChild), getDomNode(refChild)); + } + + @Override + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return document.replaceChild(getDomNode(newChild), getDomNode(oldChild)); + } + + @Override + public Node removeChild(Node oldChild) throws DOMException { + return document.removeChild(getDomNode(oldChild)); + } + + @Override + public Node appendChild(Node newChild) throws DOMException { + return document.appendChild(getDomNode(newChild)); + } + + @Override + public boolean hasChildNodes() { + return document.hasChildNodes(); + } + + @Override public Node cloneNode(boolean deep) { - SOAPPartImpl newSoapPart = getSOAPPart().doCloneNode(); - super.cloneNode(newSoapPart.getDocument(), deep); - return newSoapPart; + return document.cloneNode(deep); } - public void cloneNode(SOAPDocumentImpl newdoc, boolean deep) { - super.cloneNode(newdoc, deep); + @Override + public void normalize() { + document.normalize(); + } + + @Override + public boolean isSupported(String feature, String version) { + return document.isSupported(feature, version); + } + + @Override + public String getNamespaceURI() { + return document.getNamespaceURI(); + } + + @Override + public String getPrefix() { + return document.getPrefix(); + } + + @Override + public void setPrefix(String prefix) throws DOMException { + document.setPrefix(prefix); + } + + @Override + public String getLocalName() { + return document.getLocalName(); + } + + @Override + public boolean hasAttributes() { + return document.hasAttributes(); + } + + @Override + public String getBaseURI() { + return document.getBaseURI(); + } + + @Override + public short compareDocumentPosition(Node other) throws DOMException { + return document.compareDocumentPosition(other); + } + + @Override + public String getTextContent() throws DOMException { + return document.getTextContent(); + } + + @Override + public void setTextContent(String textContent) throws DOMException { + document.setTextContent(textContent); + } + + @Override + public boolean isSameNode(Node other) { + return document.isSameNode(other); + } + + @Override + public String lookupPrefix(String namespaceURI) { + return document.lookupPrefix(namespaceURI); + } + + @Override + public boolean isDefaultNamespace(String namespaceURI) { + return document.isDefaultNamespace(namespaceURI); + } + + @Override + public String lookupNamespaceURI(String prefix) { + return document.lookupNamespaceURI(prefix); + } + + @Override + public boolean isEqualNode(Node arg) { + return document.isEqualNode(arg); + } + + @Override + public Object getFeature(String feature, String version) { + return document.getFeature(feature, version); + } + + @Override + public Object setUserData(String key, Object data, UserDataHandler handler) { + return document.setUserData(key, data, handler); + } + + @Override + public Object getUserData(String key) { + return document.getUserData(key); + } + + public Document getDomDocument() { + return document; + } + + /** + * Insert a mapping information for {@link org.w3c.dom.Node} - {@link javax.xml.soap.Node}. + * + * In SAAJ, elements in DOM are expected to be interfaces of SAAJ, on the other hand in JDKs Xerces, + * they are casted to internal impl classes. After removal of SAAJ dependency + * to JDKs internal classes elements in DOM can never be both of them. + * + * @param node SAAJ wrapper node for w3c DOM node + */ + public void register(javax.xml.soap.Node node) { + final Node domElement = getDomNode(node); + if (domToSoap.containsKey(domElement)) { + throw new IllegalStateException("Element " + domElement.getNodeName() + + " is already registered"); + } + domToSoap.put(domElement, node); + } + + /** + * Find a soap wrapper for w3c dom node. + * + * @param node w3c dom node nullable + * @return soap wrapper for w3c dom node + * + * @throws + */ + public javax.xml.soap.Node find(Node node) { + return find(node, true); + } + + private javax.xml.soap.Node find(Node node, boolean required) { + if (node == null) { + return null; + } + if (node instanceof javax.xml.soap.Node) { + return (javax.xml.soap.Node) node; + } + final javax.xml.soap.Node found = domToSoap.get(node); + if (found == null && required) { + throw new IllegalArgumentException(MessageFormat.format("Cannot find SOAP wrapper for element {0}", node)); + } + return found; + } + + /** + * If corresponding soap wrapper exists for w3c dom node it is returned, + * if not passed dom element is returned. + * + * @param node w3c dom node + * @return soap wrapper or passed w3c dom node if not found + */ + public Node findIfPresent(Node node) { + final javax.xml.soap.Node found = find(node, false); + return found != null ? found : node; + } + + /** + * Extracts w3c dom node from corresponding soap wrapper. + * + * @param node soap or dom nullable + * @return dom node + */ + public Node getDomNode(Node node) { + if (node instanceof SOAPDocumentImpl) { + return ((SOAPDocumentImpl)node).getDomElement(); + } else if (node instanceof ElementImpl) { + return ((ElementImpl) node).getDomElement(); + } else if (node instanceof SOAPTextImpl) { + return ((SOAPTextImpl)node).getDomElement(); + } else if (node instanceof SOAPCommentImpl) { + return ((SOAPCommentImpl)node).getDomElement(); + } else if (node instanceof CDATAImpl) { + return ((CDATAImpl) node).getDomElement(); + } + return node; + } + + public Document getDomElement() { + return document; + } + + @Override + public String getValue() { + throw new UnsupportedOperationException(); + } + + @Override + public void setValue(String value) { + throw new UnsupportedOperationException(); + } + + @Override + public void setParentElement(SOAPElement parent) throws SOAPException { + throw new UnsupportedOperationException(); + } + + @Override + public SOAPElement getParentElement() { + throw new UnsupportedOperationException(); + } + + @Override + public void detachNode() { + throw new UnsupportedOperationException(); + } + + @Override + public void recycleNode() { + throw new UnsupportedOperationException(); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java index 19cc1b4ec30..49abddb9f94 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,29 +25,56 @@ package com.sun.xml.internal.messaging.saaj.soap; -import java.io.*; -import java.util.Iterator; -import java.util.logging.Logger; -import java.util.logging.Level; - -import javax.activation.DataHandler; -import javax.activation.DataSource; -import javax.xml.soap.*; -import javax.xml.transform.Source; -import javax.xml.transform.stream.StreamSource; - -import org.w3c.dom.*; - -import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeBodyPart; - import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; +import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeBodyPart; import com.sun.xml.internal.messaging.saaj.soap.impl.ElementImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.EnvelopeImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; -import com.sun.xml.internal.messaging.saaj.util.*; +import com.sun.xml.internal.messaging.saaj.util.ByteInputStream; +import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream; +import com.sun.xml.internal.messaging.saaj.util.FastInfosetReflection; +import com.sun.xml.internal.messaging.saaj.util.JAXMStreamSource; +import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; +import com.sun.xml.internal.messaging.saaj.util.MimeHeadersUtil; +import com.sun.xml.internal.messaging.saaj.util.SAAJUtil; +import com.sun.xml.internal.messaging.saaj.util.XMLDeclarationParser; +import org.w3c.dom.Attr; +import org.w3c.dom.CDATASection; +import org.w3c.dom.Comment; +import org.w3c.dom.DOMConfiguration; +import org.w3c.dom.DOMException; +import org.w3c.dom.DOMImplementation; +import org.w3c.dom.Document; +import org.w3c.dom.DocumentFragment; +import org.w3c.dom.DocumentType; +import org.w3c.dom.Element; +import org.w3c.dom.EntityReference; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.NodeList; +import org.w3c.dom.ProcessingInstruction; +import org.w3c.dom.UserDataHandler; +import javax.activation.DataHandler; +import javax.activation.DataSource; +import javax.xml.soap.MimeHeaders; +import javax.xml.soap.SOAPElement; +import javax.xml.soap.SOAPEnvelope; +import javax.xml.soap.SOAPException; +import javax.xml.soap.SOAPPart; +import javax.xml.transform.Source; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.sax.SAXSource; +import javax.xml.transform.stream.StreamSource; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.PushbackReader; +import java.io.Reader; +import java.io.UnsupportedEncodingException; +import java.util.Iterator; +import java.util.logging.Level; +import java.util.logging.Logger; /** * SOAPPartImpl is the first attachment. This contains the XML/SOAP document. @@ -128,20 +155,21 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { envelope = createEnvelopeFromSource(); } else { envelope = createEmptyEnvelope(null); - document.insertBefore(envelope, null); + document.insertBefore(((EnvelopeImpl) envelope).getDomElement(), null); } return envelope; } protected void lookForEnvelope() throws SOAPException { Element envelopeChildElement = document.doGetDocumentElement(); - if (envelopeChildElement == null || envelopeChildElement instanceof Envelope) { - envelope = (EnvelopeImpl) envelopeChildElement; - } else if (!(envelopeChildElement instanceof ElementImpl)) { + org.w3c.dom.Node soapEnvelope = document.findIfPresent(envelopeChildElement); + if (soapEnvelope == null || soapEnvelope instanceof Envelope) { + envelope = (EnvelopeImpl) soapEnvelope; + } else if (document.find(envelopeChildElement) == null) { log.severe("SAAJ0512.soap.incorrect.factory.used"); throw new SOAPExceptionImpl("Unable to create envelope: incorrect factory used during tree construction"); } else { - ElementImpl soapElement = (ElementImpl) envelopeChildElement; + ElementImpl soapElement = (ElementImpl) document.find(envelopeChildElement); if (soapElement.getLocalName().equalsIgnoreCase("Envelope")) { String prefix = soapElement.getPrefix(); String uri = (prefix == null) ? soapElement.getNamespaceURI() : soapElement.getNamespaceURI(prefix); @@ -498,7 +526,7 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { } public NamedNodeMap getAttributes() { - return document.getAttributes(); + return document.getDomDocument().getAttributes(); } public NodeList getChildNodes() { @@ -517,11 +545,11 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { } public String getLocalName() { - return document.getLocalName(); + return document.getDomDocument().getLocalName(); } public String getNamespaceURI() { - return document.getNamespaceURI(); + return document.getDomDocument().getNamespaceURI(); } public org.w3c.dom.Node getNextSibling() { @@ -530,11 +558,11 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { } public String getNodeName() { - return document.getNodeName(); + return document.getDomDocument().getNodeName(); } public short getNodeType() { - return document.getNodeType(); + return document.getDomDocument().getNodeType(); } public String getNodeValue() throws DOMException { @@ -542,23 +570,23 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { } public Document getOwnerDocument() { - return document.getOwnerDocument(); + return document.getDomDocument().getOwnerDocument(); } public org.w3c.dom.Node getParentNode() { - return document.getParentNode(); + return document.getDomDocument().getParentNode(); } public String getPrefix() { - return document.getPrefix(); + return document.getDomDocument().getPrefix(); } public org.w3c.dom.Node getPreviousSibling() { - return document.getPreviousSibling(); + return document.getDomDocument().getPreviousSibling(); } public boolean hasAttributes() { - return document.hasAttributes(); + return document.getDomDocument().hasAttributes(); } public boolean hasChildNodes() { @@ -575,7 +603,7 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { } public boolean isSupported(String arg0, String arg1) { - return document.isSupported(arg0, arg1); + return document.getDomDocument().isSupported(arg0, arg1); } public void normalize() { @@ -686,7 +714,7 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { } public DOMConfiguration getDomConfig() { - return document.getDomConfig(); + return document.getDomDocument().getDomConfig(); } public org.w3c.dom.Node adoptNode(org.w3c.dom.Node source) throws DOMException { @@ -699,7 +727,7 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { } public String getDocumentURI() { - return document.getDocumentURI(); + return document.getDomDocument().getDocumentURI(); } public void setStrictErrorChecking(boolean strictErrorChecking) { @@ -707,15 +735,15 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { } public String getInputEncoding() { - return document.getInputEncoding(); + return document.getDomDocument().getInputEncoding(); } public String getXmlEncoding() { - return document.getXmlEncoding(); + return document.getDomDocument().getXmlEncoding(); } public boolean getXmlStandalone() { - return document.getXmlStandalone(); + return document.getDomDocument().getXmlStandalone(); } public void setXmlStandalone(boolean xmlStandalone) throws DOMException { @@ -723,7 +751,7 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { } public String getXmlVersion() { - return document.getXmlVersion(); + return document.getDomDocument().getXmlVersion(); } public void setXmlVersion(String xmlVersion) throws DOMException { @@ -731,12 +759,12 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { } public boolean getStrictErrorChecking() { - return document.getStrictErrorChecking(); + return document.getDomDocument().getStrictErrorChecking(); } // DOM L3 methods from org.w3c.dom.Node public String getBaseURI() { - return document.getBaseURI(); + return document.getDomDocument().getBaseURI(); } public short compareDocumentPosition(org.w3c.dom.Node other) @@ -758,7 +786,7 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { } public String lookupPrefix(String namespaceURI) { - return document.lookupPrefix(namespaceURI); + return document.getDomDocument().lookupPrefix(namespaceURI); } public boolean isDefaultNamespace(String namespaceURI) { @@ -770,7 +798,7 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { } public boolean isEqualNode(org.w3c.dom.Node arg) { - return document.isEqualNode(arg); + return document.getDomDocument().isEqualNode(arg); } public Object getFeature(String feature, @@ -785,7 +813,7 @@ public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument { } public Object getUserData(String key) { - return document.getUserData(key); + return document.getDomDocument().getUserData(key); } public void recycleNode() { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPVersionMismatchException.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPVersionMismatchException.java index 96fcb591336..d4bd32cd9ef 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPVersionMismatchException.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/SOAPVersionMismatchException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -63,6 +63,9 @@ public class SOAPVersionMismatchException extends SOAPExceptionImpl { /** * Constructs a SOAPExceptionImpl object initialized * with the given Throwable object. + * + * @param cause a Throwable object that is to + * be embedded in this SOAPExceptionImpl object */ public SOAPVersionMismatchException(Throwable cause) { super(cause); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java index 1ee09435fb7..491f9eac303 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,7 @@ import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeUtility; import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.ContentType; /** - * JAF data content handler for text/plain --> String + * JAF data content handler for text/plain --> String * */ public class StringDataContentHandler implements DataContentHandler { @@ -51,6 +51,7 @@ public class StringDataContentHandler implements DataContentHandler { * * @return The DataFlavors */ + @Override public DataFlavor[] getTransferDataFlavors() { return new DataFlavor[] { getDF() }; } @@ -62,6 +63,7 @@ public class StringDataContentHandler implements DataContentHandler { * @param ds The DataSource corresponding to the data * @return String object */ + @Override public Object getTransferData(DataFlavor df, DataSource ds) throws IOException { // use myDF.equals to be sure to get ActivationDataFlavor.equals, @@ -72,6 +74,7 @@ public class StringDataContentHandler implements DataContentHandler { return null; } + @Override public Object getContent(DataSource ds) throws IOException { String enc = null; InputStreamReader is = null; @@ -120,6 +123,7 @@ public class StringDataContentHandler implements DataContentHandler { /** * Write the object to the output stream, using the specified MIME type. */ + @Override public void writeTo(Object obj, String type, OutputStream os) throws IOException { if (!(obj instanceof String)) diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java index dc5e06dca5b..5dea4672a3d 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -56,6 +56,7 @@ public class XmlDataContentHandler implements DataContentHandler { * return the DataFlavors for this DataContentHandler * @return The DataFlavors. */ + @Override public DataFlavor[] getTransferDataFlavors() { // throws Exception; DataFlavor flavors[] = new DataFlavor[2]; @@ -69,10 +70,11 @@ public class XmlDataContentHandler implements DataContentHandler { /** * return the Transfer Data of type DataFlavor from InputStream - * @param df The DataFlavor. - * @param ins The InputStream corresponding to the data. + * @param flavor The DataFlavor. + * @param dataSource The DataSource. * @return The constructed Object. */ + @Override public Object getTransferData(DataFlavor flavor, DataSource dataSource) throws IOException { if (flavor.getMimeType().startsWith("text/xml") || @@ -87,6 +89,7 @@ public class XmlDataContentHandler implements DataContentHandler { /** * */ + @Override public Object getContent(DataSource dataSource) throws IOException { return new StreamSource(dataSource.getInputStream()); } @@ -96,6 +99,7 @@ public class XmlDataContentHandler implements DataContentHandler { * (similar semantically to previous method, we are deciding * which one to support) */ + @Override public void writeTo(Object obj, String mimeType, OutputStream os) throws IOException { if (!mimeType.startsWith("text/xml") && !mimeType.startsWith("application/xml")) diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java index 8da4d8a59f8..4993bf71e7e 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,6 +36,7 @@ import javax.xml.stream.XMLStreamReader; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; +import com.sun.xml.internal.messaging.saaj.util.SAAJUtil; import org.w3c.dom.*; import org.w3c.dom.Node; @@ -60,6 +61,10 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { super(ownerDoc, bodyName); } + public BodyImpl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + protected abstract NameImpl getFaultName(String name); protected abstract boolean isFault(SOAPElement child); protected abstract SOAPBodyElement createBodyElement(Name name); @@ -155,7 +160,7 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { if (hasFault()) { if (fault == null) { //initialize fault member - fault = (SOAPFault) getFirstChildElement(); + fault = (SOAPFault) getSoapDocument().find(getFirstChildElement()); } return fault; } @@ -259,11 +264,12 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { } protected SOAPElement convertToSoapElement(Element element) { - if ((element instanceof SOAPBodyElement) && + final Node soapNode = getSoapDocument().findIfPresent(element); + if ((soapNode instanceof SOAPBodyElement) && //this check is required because ElementImpl currently // implements SOAPBodyElement - !(element.getClass().equals(ElementImpl.class))) { - return (SOAPElement) element; + !(soapNode.getClass().equals(ElementImpl.class))) { + return (SOAPElement) soapNode; } else { return replaceElementWithSOAPElement( element, @@ -314,7 +320,7 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { Document document = null; try { - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance("com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl", SAAJUtil.getSystemClassLoader()); factory.setNamespaceAware(true); DocumentBuilder builder = factory.newDocumentBuilder(); document = builder.newDocument(); @@ -440,7 +446,7 @@ public abstract class BodyImpl extends ElementImpl implements SOAPBody { //not lazy -Just get first child element and return its attribute Element elem = getFirstChildElement(); if (elem != null) { - return elem.getAttribute(localName); + return elem.getAttribute(getLocalName()); } } return null; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java index c64e3f80772..b406caf111e 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,10 +32,17 @@ import javax.xml.soap.SOAPException; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; +import com.sun.xml.internal.messaging.saaj.util.SAAJUtil; +import org.w3c.dom.CDATASection; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.Text; +import org.w3c.dom.UserDataHandler; -public class CDATAImpl - extends com.sun.org.apache.xerces.internal.dom.CDATASectionImpl - implements javax.xml.soap.Text { +public class CDATAImpl implements CDATASection, javax.xml.soap.Text { protected static final Logger log = Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN, @@ -44,8 +51,256 @@ public class CDATAImpl static final String cdataUC = " 0); + //this is because of BugfixTest#testCR7020991, after removal internal dependencies + //SOAPDocumentImpl#createAttribute is not called anymore from xerces parent + if (isQualifiedName) { + String nsUri = null; + String prefix = name.substring(0, name.indexOf(":")); + //cannot do anything to resolve the URI if prefix is not + //XMLNS. + if (XMLNS.equals(prefix)) { + nsUri = ElementImpl.XMLNS_URI; + setAttributeNS(nsUri, name, value); + return; + } + } + element.setAttribute(name, value); + } + + @Override + public void removeAttribute(String name) throws DOMException { + element.removeAttribute(name); + } + + @Override + public Attr getAttributeNode(String name) { + return element.getAttributeNode(name); + } + + @Override + public Attr setAttributeNode(Attr newAttr) throws DOMException { + return element.setAttributeNode(newAttr); + } + + @Override + public Attr removeAttributeNode(Attr oldAttr) throws DOMException { + return element.removeAttributeNode(oldAttr); + } + + @Override + public NodeList getElementsByTagName(String name) { + return new NodeListImpl(getSoapDocument(), element.getElementsByTagName(name)); + } + + @Override + public String getAttributeNS(String namespaceURI, String localName) throws DOMException { + return element.getAttributeNS(namespaceURI, localName); + } + protected static final Logger log = Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN, "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings"); @@ -72,22 +133,27 @@ public class ElementImpl */ public final static String XML_URI = "http://www.w3.org/XML/1998/namespace".intern(); + private final static String XMLNS = "xmlns".intern(); + public ElementImpl(SOAPDocumentImpl ownerDoc, Name name) { - super( - ownerDoc, - name.getURI(), - name.getQualifiedName(), - name.getLocalName()); + this.soapDocument = ownerDoc; + this.element = ownerDoc.getDomDocument().createElementNS(name.getURI(), name.getQualifiedName()); elementQName = NameImpl.convertToQName(name); + getSoapDocument().register(this); } public ElementImpl(SOAPDocumentImpl ownerDoc, QName name) { - super( - ownerDoc, - name.getNamespaceURI(), - getQualifiedName(name), - name.getLocalPart()); + this.soapDocument = ownerDoc; + this.element = ownerDoc.getDomDocument().createElementNS(name.getNamespaceURI(), getQualifiedName(name)); elementQName = name; + getSoapDocument().register(this); + } + + public ElementImpl(SOAPDocumentImpl ownerDoc, Element domElement) { + this.element = domElement; + this.soapDocument = ownerDoc; + this.elementQName = new QName(domElement.getNamespaceURI(), domElement.getLocalName()); + getSoapDocument().register(this); } public ElementImpl( @@ -95,9 +161,11 @@ public class ElementImpl String uri, String qualifiedName) { - super(ownerDoc, uri, qualifiedName); + this.soapDocument = ownerDoc; + this.element = ownerDoc.getDomDocument().createElementNS(uri, qualifiedName); elementQName = new QName(uri, getLocalPart(qualifiedName), getPrefix(qualifiedName)); + getSoapDocument().register(this); } public void ensureNamespaceIsDeclared(String prefix, String uri) { @@ -111,11 +179,132 @@ public class ElementImpl } public Document getOwnerDocument() { - Document doc = super.getOwnerDocument(); - if (doc instanceof SOAPDocument) - return ((SOAPDocument) doc).getDocument(); - else - return doc; + return soapDocument; + } + + @Override + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return element.insertBefore(getSoapDocument().getDomNode(newChild), getSoapDocument().getDomNode(refChild)); + } + + @Override + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return element.replaceChild(getSoapDocument().getDomNode(newChild), getSoapDocument().getDomNode(oldChild)); + } + + @Override + public Node removeChild(Node oldChild) throws DOMException { + return element.removeChild(getSoapDocument().getDomNode(oldChild)); + } + + @Override + public Node appendChild(Node newChild) throws DOMException { + return element.appendChild(getSoapDocument().getDomNode(newChild)); + } + + @Override + public boolean hasChildNodes() { + return element.hasChildNodes(); + } + + @Override + public Node cloneNode(boolean deep) { + return element.cloneNode(deep); + } + + @Override + public void normalize() { + element.normalize(); + } + + @Override + public boolean isSupported(String feature, String version) { + return element.isSupported(feature, version); + } + + @Override + public String getNamespaceURI() { + return element.getNamespaceURI(); + } + + @Override + public String getPrefix() { + return element.getPrefix(); + } + + @Override + public void setPrefix(String prefix) throws DOMException { + element.setPrefix(prefix); + } + + @Override + public String getLocalName() { + return element.getLocalName(); + } + + @Override + public boolean hasAttributes() { + return element.hasAttributes(); + } + + @Override + public String getBaseURI() { + return element.getBaseURI(); + } + + @Override + public short compareDocumentPosition(Node other) throws DOMException { + return element.compareDocumentPosition(other); + } + + @Override + public String getTextContent() throws DOMException { + return element.getTextContent(); + } + + @Override + public void setTextContent(String textContent) throws DOMException { + element.setTextContent(textContent); + } + + @Override + public boolean isSameNode(Node other) { + return element.isSameNode(other); + } + + @Override + public String lookupPrefix(String namespaceURI) { + return element.lookupPrefix(namespaceURI); + } + + @Override + public boolean isDefaultNamespace(String namespaceURI) { + return element.isDefaultNamespace(namespaceURI); + } + + @Override + public String lookupNamespaceURI(String prefix) { + return element.lookupNamespaceURI(prefix); + } + + @Override + public boolean isEqualNode(Node arg) { + return element.isEqualNode(arg); + } + + @Override + public Object getFeature(String feature, String version) { + return element.getFeature(feature, version); + } + + @Override + public Object setUserData(String key, Object data, UserDataHandler handler) { + return element.setUserData(key, data, handler); + } + + @Override + public Object getUserData(String key) { + return element.getUserData(key); } public SOAPElement addChildElement(Name name) throws SOAPException { @@ -353,13 +542,16 @@ public class ElementImpl // preserve the encodingStyle attr as it may get lost in the import String encodingStyle = element.getEncodingStyle(); - ElementImpl importedElement = (ElementImpl) importElement(element); + final Element domElement = ((ElementImpl) element).getDomElement(); + final Element importedElement = importElement(domElement); addNode(importedElement); - if (encodingStyle != null) - importedElement.setEncodingStyle(encodingStyle); + final SOAPElement converted = convertToSoapElement(importedElement); - return convertToSoapElement(importedElement); + if (encodingStyle != null) + converted.setEncodingStyle(encodingStyle); + + return converted; } protected Element importElement(Element element) { @@ -374,7 +566,7 @@ public class ElementImpl protected SOAPElement addElement(Name name) throws SOAPException { SOAPElement newElement = createElement(name); - addNode(newElement); + addNode(((ElementImpl) newElement).getDomElement()); return newElement; } @@ -411,7 +603,7 @@ public class ElementImpl } protected void addNode(org.w3c.dom.Node newElement) throws SOAPException { - insertBefore(newElement, null); + insertBefore(getSoapDocument().getDomNode(newElement), null); if (getOwnerDocument() instanceof DocumentFragment) return; @@ -431,7 +623,7 @@ public class ElementImpl Node child = getFirstChild(); while (child != null) { if (child instanceof Element) { - return ((Element) child); + return (Element) getSoapDocument().find(child); } child = child.getNextSibling(); } @@ -441,10 +633,12 @@ public class ElementImpl protected SOAPElement findChild(NameImpl name) { Node eachChild = getFirstChild(); while (eachChild != null) { - if (eachChild instanceof SOAPElement) { - SOAPElement eachChildSoap = (SOAPElement) eachChild; - if (eachChildSoap.getElementName().equals(name)) { - return eachChildSoap; + if (eachChild instanceof Element) { + SOAPElement eachChildSoap = (SOAPElement) getSoapDocument().find(eachChild); + if (eachChildSoap != null) { + if (eachChildSoap.getElementName().equals(name)) { + return eachChildSoap; + } } } eachChild = eachChild.getNextSibling(); @@ -474,14 +668,14 @@ public class ElementImpl protected SOAPElement addCDATA(String text) throws SOAPException { org.w3c.dom.Text cdata = - (org.w3c.dom.Text) getOwnerDocument().createCDATASection(text); + getOwnerDocument().createCDATASection(text); addNode(cdata); return this; } protected SOAPElement addText(String text) throws SOAPException { org.w3c.dom.Text textNode = - (org.w3c.dom.Text) getOwnerDocument().createTextNode(text); + getOwnerDocument().createTextNode(text); addNode(textNode); return this; } @@ -684,8 +878,9 @@ public class ElementImpl } protected SOAPElement convertToSoapElement(Element element) { - if (element instanceof SOAPElement) { - return (SOAPElement) element; + final Node soapNode = getSoapDocument().findIfPresent(element); + if (soapNode instanceof SOAPElement) { + return (SOAPElement) soapNode; } else { return replaceElementWithSOAPElement( element, @@ -693,7 +888,7 @@ public class ElementImpl } } - protected static SOAPElement replaceElementWithSOAPElement( + protected SOAPElement replaceElementWithSOAPElement( Element element, ElementImpl copy) { @@ -709,7 +904,7 @@ public class ElementImpl copy.insertBefore(nextChild, null); } - Node parent = element.getParentNode(); + Node parent = getSoapDocument().find(element.getParentNode()); if (parent != null) { parent.replaceChild(copy, element); } // XXX else throw an exception? @@ -727,8 +922,8 @@ public class ElementImpl if (next == null) { while (eachNode.hasNext()) { Node node = eachNode.next(); - if (node instanceof SOAPElement) { - next = node; + if (node instanceof Element) { + next = getSoapDocument().findIfPresent(node); break; } } @@ -899,14 +1094,14 @@ public class ElementImpl protected javax.xml.soap.Node getValueNode() { Iterator i = getChildElements(); while (i.hasNext()) { - javax.xml.soap.Node n = (javax.xml.soap.Node) i.next(); + Node n = i.next(); if (n.getNodeType() == org.w3c.dom.Node.TEXT_NODE || n.getNodeType() == org.w3c.dom.Node.CDATA_SECTION_NODE) { // TODO: Hack to fix text node split into multiple lines. normalize(); // Should remove the normalization step when this gets fixed in // DOM/Xerces. - return (javax.xml.soap.Node) n; + return getSoapDocument().find(n); } } return null; @@ -948,7 +1143,7 @@ public class ElementImpl if (parentNode instanceof SOAPDocument) { return null; } - return (SOAPElement) parentNode; + return (SOAPElement) getSoapDocument().find(parentNode); } protected String getSOAPNamespace() { @@ -975,7 +1170,7 @@ public class ElementImpl public void detachNode() { Node parent = getParentNode(); if (parent != null) { - parent.removeChild(this); + parent.removeChild(element); } encodingStyleAttribute.clearNameAndValue(); // Fix for CR: 6474641 @@ -1136,17 +1331,18 @@ public class ElementImpl return attribute == null ? null : attribute.getValue(); } - protected static Iterator getChildElementsFrom(final Element element) { + protected Iterator getChildElementsFrom(final Element element) { return new Iterator() { Node next = element.getFirstChild(); Node nextNext = null; Node last = null; + Node soapElement = getSoapDocument().findIfPresent(element); public boolean hasNext() { if (next != null) { return true; } - if (next == null && nextNext != null) { + if (nextNext != null) { next = nextNext; } @@ -1158,15 +1354,15 @@ public class ElementImpl last = next; next = null; - if ((element instanceof ElementImpl) - && (last instanceof Element)) { + if ((soapElement instanceof ElementImpl) + && (last instanceof Element)) { last = - ((ElementImpl) element).convertToSoapElement( - (Element) last); + ((ElementImpl) soapElement).convertToSoapElement( + (Element) last); } nextNext = last.getNextSibling(); - return last; + return getSoapDocument().findIfPresent(last); } throw new NoSuchElementException(); } @@ -1251,7 +1447,7 @@ public class ElementImpl // SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE.equals(value))) // return; - super.setAttributeNS(namespaceURI,qualifiedName,value); + element.setAttributeNS(namespaceURI,qualifiedName,value); //String tmpLocalName = this.getLocalName(); String tmpURI = this.getNamespaceURI(); boolean isIDNS = false; @@ -1270,4 +1466,116 @@ public class ElementImpl } + @Override + public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { + element.removeAttributeNS(namespaceURI, localName); + } + + @Override + public Attr getAttributeNodeNS(String namespaceURI, String localName) throws DOMException { + return element.getAttributeNodeNS(namespaceURI, localName); + } + + @Override + public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { + return element.setAttributeNodeNS(newAttr); + } + + @Override + public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException { + return new NodeListImpl(getSoapDocument(), element.getElementsByTagNameNS(namespaceURI, localName)); + } + + @Override + public boolean hasAttribute(String name) { + return element.hasAttribute(name); + } + + @Override + public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException { + return element.hasAttributeNS(namespaceURI, localName); + } + + @Override + public TypeInfo getSchemaTypeInfo() { + return element.getSchemaTypeInfo(); + } + + @Override + public void setIdAttribute(String name, boolean isId) throws DOMException { + element.setIdAttribute(name, isId); + } + + @Override + public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { + element.setIdAttributeNS(namespaceURI, localName, isId); + } + + @Override + public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { + element.setIdAttributeNode(idAttr, isId); + } + + @Override + public String getNodeName() { + return element.getNodeName(); + } + + @Override + public String getNodeValue() throws DOMException { + return element.getNodeValue(); + } + + @Override + public void setNodeValue(String nodeValue) throws DOMException { + element.setNodeValue(nodeValue); + } + + @Override + public short getNodeType() { + return element.getNodeType(); + } + + @Override + public Node getParentNode() { + return getSoapDocument().find(element.getParentNode()); + } + + @Override + public NodeList getChildNodes() { + return new NodeListImpl(getSoapDocument(), element.getChildNodes()); + } + + @Override + public Node getFirstChild() { + return getSoapDocument().findIfPresent(element.getFirstChild()); + } + + @Override + public Node getLastChild() { + return getSoapDocument().findIfPresent(element.getLastChild()); + } + + @Override + public Node getPreviousSibling() { + return getSoapDocument().findIfPresent(element.getPreviousSibling()); + } + + @Override + public Node getNextSibling() { + return getSoapDocument().findIfPresent(element.getNextSibling()); + } + + @Override + public NamedNodeMap getAttributes() { + return element.getAttributes(); + } + + public Element getDomElement() { + return element; + } + + public SOAPDocumentImpl getSoapDocument() { + return soapDocument; + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java index d73ba5b0cea..faaa3d8f61a 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -52,6 +52,7 @@ import com.sun.xml.internal.messaging.saaj.util.transform.EfficientStreamingTran import com.sun.xml.internal.org.jvnet.staxex.util.DOMStreamReader; import com.sun.xml.internal.org.jvnet.staxex.util.XMLStreamReaderToXMLStreamWriter; +import org.w3c.dom.Element; /** * Our implementation of the SOAP envelope. @@ -92,6 +93,10 @@ public abstract class EnvelopeImpl extends ElementImpl implements LazyEnvelope { addBody(); } + public EnvelopeImpl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + protected abstract NameImpl getHeaderName(String prefix); protected abstract NameImpl getBodyName(String prefix); @@ -122,7 +127,7 @@ public abstract class EnvelopeImpl extends ElementImpl implements LazyEnvelope { } header = (HeaderImpl) createElement(headerName); - insertBefore(header, firstChild); + insertBefore(header.getDomElement(), firstChild); header.ensureNamespaceIsDeclared(headerName.getPrefix(), headerName.getURI()); return header; @@ -161,7 +166,7 @@ public abstract class EnvelopeImpl extends ElementImpl implements LazyEnvelope { if (body == null) { NameImpl bodyName = getBodyName(prefix); body = (BodyImpl) createElement(bodyName); - insertBefore(body, null); + insertBefore(body.getDomElement(), null); body.ensureNamespaceIsDeclared(bodyName.getPrefix(), bodyName.getURI()); } else { log.severe("SAAJ0122.impl.body.already.exists"); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultElementImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultElementImpl.java index 2cf604af0cc..447039ed8e6 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultElementImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultElementImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,6 +34,7 @@ import javax.xml.soap.SOAPFaultElement; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; +import org.w3c.dom.Element; public abstract class FaultElementImpl extends ElementImpl @@ -47,6 +48,10 @@ public abstract class FaultElementImpl super(ownerDoc, qname); } + public FaultElementImpl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + protected abstract boolean isStandardFaultElement(); public SOAPElement setElementQName(QName newName) throws SOAPException { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultImpl.java index 218ce0a7f5c..86fdfcf3314 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,7 @@ import java.util.logging.Level; import javax.xml.namespace.QName; import javax.xml.soap.*; +import com.sun.xml.internal.messaging.saaj.util.SAAJUtil; import org.w3c.dom.Element; import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; @@ -53,6 +54,9 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { super(ownerDoc, name); } + public FaultImpl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } protected abstract NameImpl getDetailName(); protected abstract NameImpl getFaultCodeName(); @@ -83,6 +87,7 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { (SOAPFaultElement) findAndConvertChildElement(getFaultStringName()); } + @Override public void setFaultCode(String faultCode) throws SOAPException { setFaultCode( NameImpl.getLocalNameFromTagName(faultCode), @@ -131,6 +136,7 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { } } + @Override public void setFaultCode(Name faultCodeQName) throws SOAPException { setFaultCode( faultCodeQName.getLocalName(), @@ -138,6 +144,7 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { faultCodeQName.getURI()); } + @Override public void setFaultCode(QName faultCodeQName) throws SOAPException { setFaultCode( faultCodeQName.getLocalPart(), @@ -165,6 +172,7 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { detail = (Detail) findAndConvertChildElement(detailName); } + @Override public Detail getDetail() { if (detail == null) initializeDetail(); @@ -175,6 +183,7 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { return detail; } + @Override public Detail addDetail() throws SOAPException { if (detail == null) initializeDetail(); @@ -188,12 +197,15 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { } } + @Override public boolean hasDetail() { return (getDetail() != null); } + @Override public abstract void setFaultActor(String faultActor) throws SOAPException; + @Override public String getFaultActor() { if (this.faultActorElement == null) findFaultActorElement(); @@ -203,6 +215,7 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { return null; } + @Override public SOAPElement setElementQName(QName newName) throws SOAPException { log.log( @@ -213,11 +226,13 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { "Cannot change name for " + elementQName.getLocalPart() + " to " + newName.getLocalPart()); } + @Override protected SOAPElement convertToSoapElement(Element element) { - if (element instanceof SOAPFaultElement) { - return (SOAPElement) element; - } else if (element instanceof SOAPElement) { - SOAPElement soapElement = (SOAPElement) element; + final org.w3c.dom.Node soapNode = getSoapDocument().findIfPresent(element); + if (soapNode instanceof SOAPFaultElement) { + return (SOAPElement) soapNode; + } else if (soapNode instanceof SOAPElement) { + SOAPElement soapElement = (SOAPElement) soapNode; if (getDetailName().equals(soapElement.getElementName())) { return replaceElementWithSOAPElement(element, createDetail()); } else { @@ -233,12 +248,12 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { Name elementName = NameImpl.copyElementName(element); ElementImpl newElement; if (getDetailName().equals(elementName)) { - newElement = (ElementImpl) createDetail(); + newElement = createDetail(); } else { String localName = elementName.getLocalName(); if (isStandardFaultElement(localName)) newElement = - (ElementImpl) createSOAPFaultElement(elementName); + createSOAPFaultElement(elementName); else newElement = (ElementImpl) createElement(elementName); } @@ -284,6 +299,7 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { } } + @Override protected SOAPElement addElement(Name name) throws SOAPException { if (getDetailName().equals(name)) { return addDetail(); @@ -297,6 +313,7 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { return super.addElement(name); } + @Override protected SOAPElement addElement(QName name) throws SOAPException { return addElement(NameImpl.convertToName(name)); } @@ -311,6 +328,8 @@ public abstract class FaultImpl extends ElementImpl implements SOAPFault { /** * Convert an xml:lang attribute value into a Locale object + * @param xmlLang xml:lang attribute value + * @return Locale */ protected static Locale xmlLangToLocale(String xmlLang) { if (xmlLang == null) { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java index a9e4adb086d..0d9f7ad8ae4 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,7 @@ import java.util.logging.Level; import javax.xml.namespace.QName; import javax.xml.soap.*; +import com.sun.xml.internal.messaging.saaj.util.SAAJUtil; import org.w3c.dom.Element; import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; @@ -45,6 +46,10 @@ public abstract class HeaderImpl extends ElementImpl implements SOAPHeader { super(ownerDoc, name); } + public HeaderImpl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + protected abstract SOAPHeaderElement createHeaderElement(Name name) throws SOAPException; protected abstract SOAPHeaderElement createHeaderElement(QName name) @@ -276,8 +281,9 @@ public abstract class HeaderImpl extends ElementImpl implements SOAPHeader { } protected SOAPElement convertToSoapElement(Element element) { - if (element instanceof SOAPHeaderElement) { - return (SOAPElement) element; + final org.w3c.dom.Node soapNode = getSoapDocument().findIfPresent(element); + if (soapNode instanceof SOAPHeaderElement) { + return (SOAPElement) soapNode; } else { SOAPHeaderElement headerElement; try { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/NodeListImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/NodeListImpl.java new file mode 100644 index 00000000000..141265ac20f --- /dev/null +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/NodeListImpl.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.messaging.saaj.soap.impl; + +import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +import java.util.Objects; + +/** + * Node list wrapper, finding SOAP elements automatically when possible. + * + * @author Roman Grigoriadi + */ +public class NodeListImpl implements NodeList { + + private final SOAPDocumentImpl soapDocument; + + private final NodeList nodeList; + + public NodeListImpl(SOAPDocumentImpl soapDocument, NodeList nodeList) { + Objects.requireNonNull(soapDocument); + Objects.requireNonNull(soapDocument); + this.soapDocument = soapDocument; + this.nodeList = nodeList; + } + + @Override + public Node item(int index) { + return soapDocument.findIfPresent(nodeList.item(index)); + } + + @Override + public int getLength() { + return nodeList.getLength(); + } +} diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPCommentImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPCommentImpl.java index c306beb74f9..85fbb14aacd 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPCommentImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPCommentImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,14 +31,20 @@ import java.util.logging.Logger; import javax.xml.soap.SOAPElement; import javax.xml.soap.SOAPException; +import com.sun.xml.internal.messaging.saaj.util.SAAJUtil; +import org.w3c.dom.Comment; import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; import org.w3c.dom.Text; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; +import org.w3c.dom.UserDataHandler; public class SOAPCommentImpl - extends com.sun.org.apache.xerces.internal.dom.CommentImpl implements javax.xml.soap.Text, org.w3c.dom.Comment { protected static final Logger log = @@ -47,8 +53,236 @@ public class SOAPCommentImpl protected static ResourceBundle rb = log.getResourceBundle(); + @Override + public String getData() throws DOMException { + return comment.getData(); + } + + @Override + public void setData(String data) throws DOMException { + comment.setData(data); + } + + @Override + public int getLength() { + return comment.getLength(); + } + + @Override + public String substringData(int offset, int count) throws DOMException { + return comment.substringData(offset, count); + } + + @Override + public void appendData(String arg) throws DOMException { + comment.appendData(arg); + } + + @Override + public void insertData(int offset, String arg) throws DOMException { + comment.insertData(offset, arg); + } + + @Override + public void deleteData(int offset, int count) throws DOMException { + comment.deleteData(offset, count); + } + + @Override + public void replaceData(int offset, int count, String arg) throws DOMException { + comment.replaceData(offset, count, arg); + } + + @Override + public String getNodeName() { + return comment.getNodeName(); + } + + @Override + public String getNodeValue() throws DOMException { + return comment.getNodeValue(); + } + + @Override + public void setNodeValue(String nodeValue) throws DOMException { + comment.setNodeValue(nodeValue); + } + + @Override + public short getNodeType() { + return comment.getNodeType(); + } + + @Override + public Node getParentNode() { + return comment.getParentNode(); + } + + @Override + public NodeList getChildNodes() { + return comment.getChildNodes(); + } + + @Override + public Node getFirstChild() { + return comment.getFirstChild(); + } + + @Override + public Node getLastChild() { + return comment.getLastChild(); + } + + @Override + public Node getPreviousSibling() { + return comment.getPreviousSibling(); + } + + @Override + public Node getNextSibling() { + return comment.getNextSibling(); + } + + @Override + public NamedNodeMap getAttributes() { + return comment.getAttributes(); + } + + @Override + public Document getOwnerDocument() { + return comment.getOwnerDocument(); + } + + @Override + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return comment.insertBefore(newChild, refChild); + } + + @Override + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return comment.replaceChild(newChild, oldChild); + } + + @Override + public Node removeChild(Node oldChild) throws DOMException { + return comment.removeChild(oldChild); + } + + @Override + public Node appendChild(Node newChild) throws DOMException { + return comment.appendChild(newChild); + } + + @Override + public boolean hasChildNodes() { + return comment.hasChildNodes(); + } + + @Override + public Node cloneNode(boolean deep) { + return comment.cloneNode(deep); + } + + @Override + public void normalize() { + comment.normalize(); + } + + @Override + public boolean isSupported(String feature, String version) { + return comment.isSupported(feature, version); + } + + @Override + public String getNamespaceURI() { + return comment.getNamespaceURI(); + } + + @Override + public String getPrefix() { + return comment.getPrefix(); + } + + @Override + public void setPrefix(String prefix) throws DOMException { + comment.setPrefix(prefix); + } + + @Override + public String getLocalName() { + return comment.getLocalName(); + } + + @Override + public boolean hasAttributes() { + return comment.hasAttributes(); + } + + @Override + public String getBaseURI() { + return comment.getBaseURI(); + } + + @Override + public short compareDocumentPosition(Node other) throws DOMException { + return comment.compareDocumentPosition(other); + } + + @Override + public String getTextContent() throws DOMException { + return comment.getTextContent(); + } + + @Override + public void setTextContent(String textContent) throws DOMException { + comment.setTextContent(textContent); + } + + @Override + public boolean isSameNode(Node other) { + return comment.isSameNode(other); + } + + @Override + public String lookupPrefix(String namespaceURI) { + return comment.lookupPrefix(namespaceURI); + } + + @Override + public boolean isDefaultNamespace(String namespaceURI) { + return comment.isDefaultNamespace(namespaceURI); + } + + @Override + public String lookupNamespaceURI(String prefix) { + return comment.lookupNamespaceURI(prefix); + } + + @Override + public boolean isEqualNode(Node arg) { + return comment.isEqualNode(arg); + } + + @Override + public Object getFeature(String feature, String version) { + return comment.getFeature(feature, version); + } + + @Override + public Object setUserData(String key, Object data, UserDataHandler handler) { + return comment.setUserData(key, data, handler); + } + + @Override + public Object getUserData(String key) { + return comment.getUserData(key); + } + + private Comment comment; + public SOAPCommentImpl(SOAPDocumentImpl ownerDoc, String text) { - super(ownerDoc, text); + comment = ownerDoc.getDomDocument().createComment(text); + ownerDoc.register(this); } public String getValue() { @@ -111,4 +345,7 @@ public class SOAPCommentImpl throw new UnsupportedOperationException("Not Supported"); } + public Comment getDomElement() { + return comment; + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPTextImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPTextImpl.java index c088928ba90..076cacb202d 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPTextImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPTextImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,17 +32,271 @@ import javax.xml.soap.SOAPException; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.Text; +import org.w3c.dom.UserDataHandler; public class SOAPTextImpl - extends com.sun.org.apache.xerces.internal.dom.TextImpl implements javax.xml.soap.Text, org.w3c.dom.Text { + @Override + public Text splitText(int offset) throws DOMException { + return textNode.splitText(offset); + } + + @Override + public boolean isElementContentWhitespace() { + return textNode.isElementContentWhitespace(); + } + + @Override + public String getWholeText() { + return textNode.getWholeText(); + } + + @Override + public Text replaceWholeText(String content) throws DOMException { + return textNode.replaceWholeText(content); + } + + @Override + public String getData() throws DOMException { + return textNode.getData(); + } + + @Override + public void setData(String data) throws DOMException { + textNode.setData(data); + } + + @Override + public int getLength() { + return textNode.getLength(); + } + + @Override + public String substringData(int offset, int count) throws DOMException { + return textNode.substringData(offset, count); + } + + @Override + public void appendData(String arg) throws DOMException { + textNode.appendData(arg); + } + + @Override + public void insertData(int offset, String arg) throws DOMException { + textNode.insertData(offset, arg); + } + + @Override + public void deleteData(int offset, int count) throws DOMException { + textNode.deleteData(offset, count); + } + + @Override + public void replaceData(int offset, int count, String arg) throws DOMException { + textNode.replaceData(offset, count, arg); + } + + @Override + public String getNodeName() { + return textNode.getNodeName(); + } + + @Override + public String getNodeValue() throws DOMException { + return textNode.getNodeValue(); + } + + @Override + public void setNodeValue(String nodeValue) throws DOMException { + textNode.setNodeValue(nodeValue); + } + + @Override + public short getNodeType() { + return textNode.getNodeType(); + } + + @Override + public Node getParentNode() { + return textNode.getParentNode(); + } + + @Override + public NodeList getChildNodes() { + return textNode.getChildNodes(); + } + + @Override + public Node getFirstChild() { + return textNode.getFirstChild(); + } + + @Override + public Node getLastChild() { + return textNode.getLastChild(); + } + + @Override + public Node getPreviousSibling() { + return textNode.getPreviousSibling(); + } + + @Override + public Node getNextSibling() { + return textNode.getNextSibling(); + } + + @Override + public NamedNodeMap getAttributes() { + return textNode.getAttributes(); + } + + @Override + public Document getOwnerDocument() { + return textNode.getOwnerDocument(); + } + + @Override + public Node insertBefore(Node newChild, Node refChild) throws DOMException { + return textNode.insertBefore(newChild, refChild); + } + + @Override + public Node replaceChild(Node newChild, Node oldChild) throws DOMException { + return textNode.replaceChild(newChild, oldChild); + } + + @Override + public Node removeChild(Node oldChild) throws DOMException { + return textNode.removeChild(oldChild); + } + + @Override + public Node appendChild(Node newChild) throws DOMException { + return textNode.appendChild(newChild); + } + + @Override + public boolean hasChildNodes() { + return textNode.hasChildNodes(); + } + + @Override + public Node cloneNode(boolean deep) { + return textNode.cloneNode(deep); + } + + @Override + public void normalize() { + textNode.normalize(); + } + + @Override + public boolean isSupported(String feature, String version) { + return textNode.isSupported(feature, version); + } + + @Override + public String getNamespaceURI() { + return textNode.getNamespaceURI(); + } + + @Override + public String getPrefix() { + return textNode.getPrefix(); + } + + @Override + public void setPrefix(String prefix) throws DOMException { + textNode.setPrefix(prefix); + } + + @Override + public String getLocalName() { + return textNode.getLocalName(); + } + + @Override + public boolean hasAttributes() { + return textNode.hasAttributes(); + } + + @Override + public String getBaseURI() { + return textNode.getBaseURI(); + } + + @Override + public short compareDocumentPosition(Node other) throws DOMException { + return textNode.compareDocumentPosition(other); + } + + @Override + public String getTextContent() throws DOMException { + return textNode.getTextContent(); + } + + @Override + public void setTextContent(String textContent) throws DOMException { + textNode.setTextContent(textContent); + } + + @Override + public boolean isSameNode(Node other) { + return textNode.isSameNode(other); + } + + @Override + public String lookupPrefix(String namespaceURI) { + return textNode.lookupPrefix(namespaceURI); + } + + @Override + public boolean isDefaultNamespace(String namespaceURI) { + return textNode.isDefaultNamespace(namespaceURI); + } + + @Override + public String lookupNamespaceURI(String prefix) { + return textNode.lookupNamespaceURI(prefix); + } + + @Override + public boolean isEqualNode(Node arg) { + return textNode.isEqualNode(arg); + } + + @Override + public Object getFeature(String feature, String version) { + return textNode.getFeature(feature, version); + } + + @Override + public Object setUserData(String key, Object data, UserDataHandler handler) { + return textNode.setUserData(key, data, handler); + } + + @Override + public Object getUserData(String key) { + return textNode.getUserData(key); + } + protected static final Logger log = Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN, "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings"); + private Text textNode; + public SOAPTextImpl(SOAPDocumentImpl ownerDoc, String text) { - super(ownerDoc, text); + textNode = ownerDoc.getDomDocument().createTextNode(text); + ownerDoc.register(this); } public String getValue() { @@ -70,7 +324,7 @@ public class SOAPTextImpl public void detachNode() { org.w3c.dom.Node parent = getParentNode(); if (parent != null) { - parent.removeChild(this); + parent.removeChild(getDomElement()); } } @@ -88,4 +342,8 @@ public class SOAPTextImpl } return txt.startsWith(""); } + + public Text getDomElement() { + return textNode; + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java index 52399329148..86af99025eb 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -218,6 +218,7 @@ public class NameImpl implements Name { return prefix + ":" + localName; } + @Override public boolean equals(Object obj) { if (!(obj instanceof Name)) { return false; @@ -236,6 +237,7 @@ public class NameImpl implements Name { return true; } + @Override public int hashCode() { return localName.hashCode(); } @@ -245,6 +247,7 @@ public class NameImpl implements Name { * * @return a string for the local name. */ + @Override public String getLocalName() { return localName; } @@ -256,6 +259,7 @@ public class NameImpl implements Name { * * @return the prefix as a string. */ + @Override public String getPrefix() { return prefix; } @@ -265,6 +269,7 @@ public class NameImpl implements Name { * * @return the uri as a string. */ + @Override public String getURI() { return uri; } @@ -272,6 +277,7 @@ public class NameImpl implements Name { /** * Returns a String version of the name suitable for use in an XML document. */ + @Override public String getQualifiedName() { if (qualifiedName == null) { if (prefix != null && prefix.length() > 0) { @@ -285,6 +291,9 @@ public class NameImpl implements Name { /** * Create a name object for a SOAP1.1 Envelope. + * + * @param prefix prefix + * @return Envelope Name */ public static NameImpl createEnvelope1_1Name(String prefix) { return new Envelope1_1Name(prefix); @@ -292,6 +301,9 @@ public class NameImpl implements Name { /** * Create a name object for a SOAP1.2 Envelope. + * + * @param prefix prefix + * @return Envelope Name */ public static NameImpl createEnvelope1_2Name(String prefix) { return new Envelope1_2Name(prefix); @@ -299,6 +311,9 @@ public class NameImpl implements Name { /** * Create a name object for a SOAP1.1 Header. + * + * @param prefix prefix + * @return Header Name */ public static NameImpl createHeader1_1Name(String prefix) { return new Header1_1Name(prefix); @@ -306,6 +321,9 @@ public class NameImpl implements Name { /** * Create a name object for a SOAP1.2 Header. + * + * @param prefix prefix + * @return Header Name */ public static NameImpl createHeader1_2Name(String prefix) { return new Header1_2Name(prefix); @@ -313,6 +331,9 @@ public class NameImpl implements Name { /** * Create a name object for a SOAP1.1 Body. + * + * @param prefix prefix + * @return Body Name */ public static NameImpl createBody1_1Name(String prefix) { return new Body1_1Name(prefix); @@ -320,6 +341,9 @@ public class NameImpl implements Name { /** * Create a name object for a SOAP1.2 Body. + * + * @param prefix prefix + * @return Body Name */ public static NameImpl createBody1_2Name(String prefix) { return new Body1_2Name(prefix); @@ -327,20 +351,29 @@ public class NameImpl implements Name { /** * Create a name object for a SOAP1.1 Fault. + * + * @param prefix prefix + * @return Fault Name */ public static NameImpl createFault1_1Name(String prefix) { return new Fault1_1Name(prefix); } /** - * Create a name object for a SOAP1.2 NotUnderstood element. - */ + * Create a name object for a SOAP1.2 NotUnderstood element. + * + * @param prefix prefix + * @return NotUnderstood Name + */ public static NameImpl createNotUnderstood1_2Name(String prefix) { return new NotUnderstood1_2Name(prefix); } /** * Create a name object for a SOAP1.2 Upgrade element. + * + * @param prefix prefix + * @return Upgrade Name */ public static NameImpl createUpgrade1_2Name(String prefix) { return new Upgrade1_2Name(prefix); @@ -348,6 +381,9 @@ public class NameImpl implements Name { /** * Create a name object for a SOAP1.2 SupportedEnvelope Upgrade element. + * + * @param prefix prefix + * @return Supported Envelope Name */ public static NameImpl createSupportedEnvelope1_2Name(String prefix) { return new SupportedEnvelope1_2Name(prefix); @@ -358,6 +394,8 @@ public class NameImpl implements Name { * Fault, Reason or Detail. * * @param localName Local Name of element + * @param prefix prefix + * @return Fault Name */ public static NameImpl createFault1_2Name( String localName, @@ -369,6 +407,8 @@ public class NameImpl implements Name { * Create a name object for a SOAP1.2 Fault/Code or Subcode. * * @param localName Either "Code" or "Subcode" + * @param prefix prefix + * @return CodeSubcode Name */ public static NameImpl createCodeSubcode1_2Name( String prefix, @@ -378,6 +418,8 @@ public class NameImpl implements Name { /** * Create a name object for a SOAP1.1 Fault Detail. + * + * @return Detail Name */ public static NameImpl createDetail1_1Name() { return new Detail1_1Name(); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Body1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Body1_1Impl.java index 12fb6d02a4e..453abec8d51 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Body1_1Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Body1_1Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,12 +38,17 @@ import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.BodyImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; +import org.w3c.dom.Element; public class Body1_1Impl extends BodyImpl { public Body1_1Impl(SOAPDocumentImpl ownerDocument, String prefix) { super(ownerDocument, NameImpl.createBody1_1Name(prefix)); } + public Body1_1Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + public SOAPFault addSOAP12Fault(QName faultCode, String faultReason, Locale locale) { // log message here throw new UnsupportedOperationException("Not supported in SOAP 1.1"); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Detail1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Detail1_1Impl.java index 480ca25f8d2..acd4612488f 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Detail1_1Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Detail1_1Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,6 +36,7 @@ import javax.xml.soap.Name; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.DetailImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; +import org.w3c.dom.Element; public class Detail1_1Impl extends DetailImpl { @@ -45,6 +46,11 @@ public class Detail1_1Impl extends DetailImpl { public Detail1_1Impl(SOAPDocumentImpl ownerDoc) { super(ownerDoc, NameImpl.createDetail1_1Name()); } + + public Detail1_1Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + protected DetailEntry createDetailEntry(Name name) { return new DetailEntry1_1Impl( (SOAPDocumentImpl) getOwnerDocument(), diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Envelope1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Envelope1_1Impl.java index c517fab54f2..de55d8fa86c 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Envelope1_1Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Envelope1_1Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,6 +34,7 @@ import javax.xml.soap.SOAPException; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.EnvelopeImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; +import org.w3c.dom.Element; public class Envelope1_1Impl extends EnvelopeImpl { @@ -52,6 +53,11 @@ public class Envelope1_1Impl extends EnvelopeImpl { createHeader, createBody); } + + public Envelope1_1Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + protected NameImpl getBodyName(String prefix) { return NameImpl.createBody1_1Name(prefix); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java index 00b8fb65618..58c00c4823e 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -46,6 +46,7 @@ import com.sun.xml.internal.messaging.saaj.soap.impl.*; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; +import org.w3c.dom.Element; public class Fault1_1Impl extends FaultImpl { @@ -59,6 +60,10 @@ public class Fault1_1Impl extends FaultImpl { super(ownerDocument, NameImpl.createFault1_1Name(prefix)); } + public Fault1_1Impl(Element domElement, SOAPDocumentImpl ownerDoc) { + super(ownerDoc, domElement); + } + protected NameImpl getDetailName() { return NameImpl.createDetail1_1Name(); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java index a30911edbda..75b76d513f5 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,6 +40,7 @@ import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.HeaderImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; +import org.w3c.dom.Element; public class Header1_1Impl extends HeaderImpl { @@ -51,6 +52,10 @@ public class Header1_1Impl extends HeaderImpl { super(ownerDocument, NameImpl.createHeader1_1Name(prefix)); } + public Header1_1Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + protected NameImpl getNotUnderstoodName() { log.log( Level.SEVERE, diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java index abef584186d..1e57365b01c 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,6 +34,7 @@ import java.util.logging.Logger; import javax.xml.namespace.QName; import javax.xml.soap.*; +import org.w3c.dom.Element; import org.w3c.dom.Node; import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; @@ -52,6 +53,10 @@ public class Body1_2Impl extends BodyImpl { super(ownerDocument, NameImpl.createBody1_2Name(prefix)); } + public Body1_2Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + protected NameImpl getFaultName(String name) { return NameImpl.createFault1_2Name(name, null); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java index 32fb78ddfe4..455d6e4ee9d 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,6 +39,7 @@ import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.DetailImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; +import org.w3c.dom.Element; public class Detail1_2Impl extends DetailImpl { @@ -54,6 +55,10 @@ public class Detail1_2Impl extends DetailImpl { super(ownerDocument, NameImpl.createSOAP12Name("Detail")); } + public Detail1_2Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + protected DetailEntry createDetailEntry(Name name) { return new DetailEntry1_2Impl( ((SOAPDocument) getOwnerDocument()).getDocument(), diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java index 53840bccead..075a848b91b 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,6 +39,7 @@ import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.EnvelopeImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; +import org.w3c.dom.Element; public class Envelope1_2Impl extends EnvelopeImpl { @@ -50,6 +51,10 @@ public class Envelope1_2Impl extends EnvelopeImpl { super(ownerDoc, NameImpl.createEnvelope1_2Name(prefix)); } + public Envelope1_2Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + public Envelope1_2Impl( SOAPDocumentImpl ownerDoc, String prefix, diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java index 6d655f1ee12..3f206c13031 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,6 +42,7 @@ import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.*; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; +import org.w3c.dom.Element; public class Fault1_2Impl extends FaultImpl { @@ -68,6 +69,10 @@ public class Fault1_2Impl extends FaultImpl { super(ownerDocument, NameImpl.createFault1_2Name(null, prefix)); } + public Fault1_2Impl(Element domElement, SOAPDocumentImpl ownerDoc) { + super(ownerDoc, domElement); + } + protected NameImpl getDetailName() { return NameImpl.createSOAP12Name("Detail", getPrefix()); } @@ -521,7 +526,7 @@ public class Fault1_2Impl extends FaultImpl { } } if (element instanceof Detail1_2Impl) { - ElementImpl importedElement = (ElementImpl) importElement(element); + Element importedElement = importElement(element); addNode(importedElement); return convertToSoapElement(importedElement); } else diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java index e860c511885..ee9eeaac427 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,6 +41,7 @@ import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; import com.sun.xml.internal.messaging.saaj.soap.impl.HeaderImpl; import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl; import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; +import org.w3c.dom.Element; public class Header1_2Impl extends HeaderImpl { @@ -54,6 +55,10 @@ public class Header1_2Impl extends HeaderImpl { super(ownerDocument, NameImpl.createHeader1_2Name(prefix)); } + public Header1_2Impl(SOAPDocumentImpl ownerDoc, Element domElement) { + super(ownerDoc, domElement); + } + protected NameImpl getNotUnderstoodName() { return NameImpl.createNotUnderstood1_2Name(null); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/Base64.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/Base64.java index 30243489e5c..6e8aa0bd5f5 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/Base64.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/Base64.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,7 +37,6 @@ package com.sun.xml.internal.messaging.saaj.util; * This class is used by XML Schema binary format validation * * @author Jeffrey Rodriguez - * @version */ public final class Base64 { @@ -173,7 +172,7 @@ public final class Base64 { /** * Decodes Base64 data into octects * - * @param binaryData Byte array containing Base64 data + * @param base64Data Byte array containing Base64 data * @return Array containind decoded data. */ public byte[] decode( byte[] base64Data ) { diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java index c00da8308f6..5763bd78396 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,6 +42,7 @@ import java.io.ByteArrayInputStream; *

    28. doesn't do synchronization *
    29. allows access to the raw buffer *
    30. almost no parameter check + * */ public final class ByteOutputStream extends OutputStream { /** @@ -64,6 +65,9 @@ public final class ByteOutputStream extends OutputStream { /** * Copies all the bytes from this input into this buffer. + * + * @param in input stream. + * @exception IOException in case of an I/O error. */ public void write(InputStream in) throws IOException { if (in instanceof ByteArrayInputStream) { @@ -84,6 +88,7 @@ public final class ByteOutputStream extends OutputStream { } } + @Override public void write(int b) { ensureCapacity(1); buf[count] = (byte) b; @@ -102,18 +107,22 @@ public final class ByteOutputStream extends OutputStream { } } + @Override public void write(byte[] b, int off, int len) { ensureCapacity(len); System.arraycopy(b, off, buf, count, len); count += len; } + @Override public void write(byte[] b) { write(b, 0, b.length); } /** * Writes a string as ASCII string. + * + * @param s string to write. */ public void writeAsAscii(String s) { int len = s.length(); @@ -138,9 +147,12 @@ public final class ByteOutputStream extends OutputStream { * Evil buffer reallocation method. * Don't use it unless you absolutely have to. * + * @return byte array + * * @deprecated * because this is evil! */ + @Deprecated public byte toByteArray()[] { byte[] newbuf = new byte[count]; System.arraycopy(buf, 0, newbuf, 0, count); @@ -162,10 +174,12 @@ public final class ByteOutputStream extends OutputStream { * @return String translated from the buffer's contents. * @since JDK1.1 */ + @Override public String toString() { return new String(buf, 0, count); } + @Override public void close() { } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java index 4d9178876b2..131f1f5e5c1 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,8 +39,9 @@ import java.io.Serializable; * string and fragment) that may constitute a URI. *

      * Parsing of a URI specification is done according to the URI -* syntax described in RFC 2396. -* Every URI consists of a scheme, followed by a colon (':'), followed by a scheme-specific +* syntax described in +* RFC 2396. Every URI consists +* of a scheme, followed by a colon (':'), followed by a scheme-specific * part. For URIs that follow the "generic URI" syntax, the scheme- * specific part begins with two slashes ("//") and may be followed * by an authority segment (comprised of user information, host, and @@ -60,8 +61,6 @@ import java.io.Serializable; * default port for a specific scheme). Rather, it only knows the * grammar and basic set of operations that can be applied to a URI. * -* @version -* **********************************************************************/ public class JaxmURI implements Serializable { @@ -1106,6 +1105,7 @@ import java.io.Serializable; * @return true if p_test is a URI with all values equal to this * URI, false otherwise */ + @Override public boolean equals(Object p_test) { if (p_test instanceof JaxmURI) { JaxmURI testURI = (JaxmURI) p_test; @@ -1134,6 +1134,7 @@ import java.io.Serializable; return false; } + @Override public int hashCode() { // No members safe to use, just default to a constant. return 153214; @@ -1144,6 +1145,7 @@ import java.io.Serializable; * * @return the URI string specification */ + @Override public String toString() { StringBuilder uriSpecString = new StringBuilder(); @@ -1173,6 +1175,8 @@ import java.io.Serializable; * A scheme is conformant if it starts with an alphanumeric, and * contains only alphanumerics, '+','-' and '.'. * + * @param p_scheme scheme name + * * @return true if the scheme is conformant, false otherwise */ public static boolean isConformantSchemeName(String p_scheme) { @@ -1202,7 +1206,9 @@ import java.io.Serializable; * IPv4 address consists of four decimal digit groups separated by a * '.'. A hostname consists of domain labels (each of which must * begin and end with an alphanumeric but may contain '-') separated - & by a '.'. See RFC 2396 Section 3.2.2. + * by a '.'. See RFC 2396 Section 3.2.2. + * + * @param p_address address * * @return true if the string is a syntactically valid IPv4 address * or hostname diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ParseUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ParseUtil.java index 5d3c2d4e0db..032abd18430 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ParseUtil.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ParseUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,6 +40,10 @@ public class ParseUtil { * Returns a new String constructed from the specified String by replacing * the URL escape sequences and UTF8 encoding with the characters they * represent. + * + * @param s string + * + * @return decoded string */ public static String decode(String s) { StringBuilder sb = new StringBuilder(); diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ParserPool.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ParserPool.java index b9c503c9f7f..12e72995558 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ParserPool.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/ParserPool.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -45,8 +45,7 @@ public class ParserPool { public ParserPool(int capacity) { queue = new ArrayBlockingQueue(capacity); - //factory = SAXParserFactory.newInstance(); - factory = new com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl(); + factory = SAXParserFactory.newInstance("com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl", SAAJUtil.getSystemClassLoader()); factory.setNamespaceAware(true); for (int i = 0; i < capacity; i++) { try { @@ -79,30 +78,7 @@ public class ParserPool { public void returnParser(SAXParser saxParser) { saxParser.reset(); - resetSaxParser(saxParser); put(saxParser); } - - /** - * SAAJ Issue 46 :https://saaj.dev.java.net/issues/show_bug.cgi?id=46 - * Xerces does not provide a way to reset the SymbolTable - * So we are trying to reset it using the proprietary code below. - * Temporary Until the bug : https://jaxp.dev.java.net/issues/show_bug.cgi?id=59 - * is fixed. - * @param parser the parser from the pool whose Symbol Table needs to be reset. - */ - private void resetSaxParser(SAXParser parser) { - try { - //Object obj = parser.getProperty("http://apache.org/xml/properties/internal/symbol-table"); - com.sun.org.apache.xerces.internal.util.SymbolTable table = new com.sun.org.apache.xerces.internal.util.SymbolTable(); - parser.setProperty("http://apache.org/xml/properties/internal/symbol-table", table); - //obj = parser.getProperty("http://apache.org/xml/properties/internal/symbol-table"); - } catch (SAXNotRecognizedException ex) { - //nothing to do - } catch (SAXNotSupportedException ex) { - //nothing to do - } - } - } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/SAAJUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/SAAJUtil.java index 7f9cdc40a98..eafc1863f80 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/SAAJUtil.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/SAAJUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,8 @@ package com.sun.xml.internal.messaging.saaj.util; import java.security.AccessControlException; +import java.security.AccessController; +import java.security.PrivilegedAction; /** * @@ -48,4 +50,13 @@ public final class SAAJUtil { return null; } } + + public static ClassLoader getSystemClassLoader() { + return AccessController.doPrivileged(new PrivilegedAction() { + @Override + public ClassLoader run() { + return ClassLoader.getSystemClassLoader(); + } + }); + } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java index e11fb63f15d..94f4f3d67cf 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -107,11 +107,13 @@ public class EfficientStreamingTransformer } } + @Override public void clearParameters() { if (m_realTransformer != null) m_realTransformer.clearParameters(); } + @Override public javax.xml.transform.ErrorListener getErrorListener() { try { materialize(); @@ -122,6 +124,7 @@ public class EfficientStreamingTransformer return null; } + @Override public java.util.Properties getOutputProperties() { try { materialize(); @@ -132,6 +135,7 @@ public class EfficientStreamingTransformer return null; } + @Override public String getOutputProperty(String str) throws java.lang.IllegalArgumentException { try { @@ -143,6 +147,7 @@ public class EfficientStreamingTransformer return null; } + @Override public Object getParameter(String str) { try { materialize(); @@ -153,6 +158,7 @@ public class EfficientStreamingTransformer return null; } + @Override public javax.xml.transform.URIResolver getURIResolver() { try { materialize(); @@ -163,6 +169,7 @@ public class EfficientStreamingTransformer return null; } + @Override public void setErrorListener( javax.xml.transform.ErrorListener errorListener) throws java.lang.IllegalArgumentException { @@ -174,6 +181,7 @@ public class EfficientStreamingTransformer } } + @Override public void setOutputProperties(java.util.Properties properties) throws java.lang.IllegalArgumentException { try { @@ -184,6 +192,7 @@ public class EfficientStreamingTransformer } } + @Override public void setOutputProperty(String str, String str1) throws java.lang.IllegalArgumentException { try { @@ -194,6 +203,7 @@ public class EfficientStreamingTransformer } } + @Override public void setParameter(String str, Object obj) { try { materialize(); @@ -203,6 +213,7 @@ public class EfficientStreamingTransformer } } + @Override public void setURIResolver(javax.xml.transform.URIResolver uRIResolver) { try { materialize(); @@ -272,6 +283,7 @@ public class EfficientStreamingTransformer //------------------------------------------------------------------------ + @Override public void transform( javax.xml.transform.Source source, javax.xml.transform.Result result) @@ -409,6 +421,8 @@ public class EfficientStreamingTransformer * Return Transformer instance for this thread, allocating a new one if * necessary. Note that this method does not clear global parameters, * properties or any other data set on a previously used transformer. + * + * @return Transformer instance */ public static Transformer newTransformer() { //CR : 6813167 diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/message/saaj/SAAJMessageHeaders.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/message/saaj/SAAJMessageHeaders.java index 220dd8ea343..80f7d3bb6ea 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/message/saaj/SAAJMessageHeaders.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/message/saaj/SAAJMessageHeaders.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,6 +40,8 @@ import javax.xml.soap.SOAPHeader; import javax.xml.soap.SOAPHeaderElement; import javax.xml.soap.SOAPMessage; +import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl; +import com.sun.xml.internal.messaging.saaj.soap.impl.HeaderImpl; import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.message.Header; @@ -234,11 +236,12 @@ public class SAAJMessageHeaders implements MessageHeaders { if (soapHeader == null) { return null; } + SOAPDocumentImpl soapDocument = ((HeaderImpl)soapHeader).getSoapDocument(); SOAPHeaderElement headerElem = find(nsUri, localName); if (headerElem == null) { return null; } - headerElem = (SOAPHeaderElement) soapHeader.removeChild(headerElem); + headerElem = (SOAPHeaderElement) soapDocument.find(soapHeader.removeChild(headerElem)); //it might have been a nonSAAJHeader - remove from that map removeNonSAAJHeader(headerElem); @@ -330,7 +333,7 @@ public class SAAJMessageHeaders implements MessageHeaders { private void addNonSAAJHeader(SOAPHeaderElement headerElem, Header header) { if (nonSAAJHeaders == null) { - nonSAAJHeaders = new HashMap(); + nonSAAJHeaders = new HashMap<>(); } nonSAAJHeaders.put(headerElem, header); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/pipe/ThreadHelper.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/pipe/ThreadHelper.java index 25e0462c3bb..12fbb26e8bd 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/pipe/ThreadHelper.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/pipe/ThreadHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -68,9 +68,7 @@ final class ThreadHelper { Class cls = Class.forName(SAFE_THREAD_NAME); Constructor ctr = cls.getConstructor(Runnable.class); return new SunMiscThreadFactory(ctr); - } catch (ClassNotFoundException ignored) { - } catch (NoSuchMethodException ignored) { - } + } catch (ClassNotFoundException | NoSuchMethodException ignored) {} return new LegacyThreadFactory(); } } @@ -90,7 +88,9 @@ final class ThreadHelper { try { return ctr.newInstance(null, r, "toBeReplaced", 0, false); } catch (ReflectiveOperationException x) { - throw new InternalError(x); + InternalError ie = new InternalError(x.getMessage()); + ie.initCause(ie); + throw ie; } } } @@ -99,7 +99,7 @@ final class ThreadHelper { private static class SunMiscThreadFactory implements ThreadFactory { final Constructor ctr; SunMiscThreadFactory(Constructor ctr) { this.ctr = ctr; } - @Override public Thread newThread(Runnable r) { + @Override public Thread newThread(final Runnable r) { return AccessController.doPrivileged( new PrivilegedAction() { @Override diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/server/MethodUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/server/MethodUtil.java index c8497055678..b976434a7bd 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/server/MethodUtil.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/server/MethodUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,7 +31,7 @@ import java.util.logging.Level; import java.util.logging.Logger; /** - * Utility class to invoke sun.reflect.misc.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks + * Utility class to invoke com.sun.xml.internal.ws.util.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks * to java.lang,reflect.Method.invoke() * * Be careful, copy of this class exists in several packages, iny modification must be done to other copies too! @@ -39,43 +39,17 @@ import java.util.logging.Logger; class MethodUtil { private static final Logger LOGGER = Logger.getLogger(MethodUtil.class.getName()); - private static final Method INVOKE_METHOD; - - static { - Method method; - try { - Class clazz = Class.forName("sun.reflect.misc.MethodUtil"); - method = clazz.getMethod("invoke", Method.class, Object.class, Object[].class); - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil found; it will be used to invoke methods."); - } - } catch (Throwable t) { - method = null; - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil not found, probably non-Oracle JVM"); - } - } - INVOKE_METHOD = method; - } static Object invoke(Object target, Method method, Object[] args) throws IllegalAccessException, InvocationTargetException { - if (INVOKE_METHOD != null) { - // sun.reflect.misc.MethodUtil.invoke(method, owner, args) - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Invoking method using sun.reflect.misc.MethodUtil"); - } - try { - return INVOKE_METHOD.invoke(null, method, target, args); - } catch (InvocationTargetException ite) { - // unwrap invocation exception added by reflection code ... - throw unwrapException(ite); - } - } else { - // other then Oracle JDK ... - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Invoking method directly, probably non-Oracle JVM"); - } - return method.invoke(target, args); + // com.sun.xml.internal.ws.util.MethodUtil.invoke(method, owner, args) + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, "Invoking method using com.sun.xml.internal.ws.util.MethodUtil"); + } + try { + return com.sun.xml.internal.ws.util.MethodUtil.invoke(method, target, args); + } catch (InvocationTargetException ite) { + // unwrap invocation exception added by reflection code ... + throw unwrapException(ite); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/server/SDDocumentSource.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/server/SDDocumentSource.java index 0c774aa0308..59a18fe7992 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/server/SDDocumentSource.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/server/SDDocumentSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,9 +26,9 @@ package com.sun.xml.internal.ws.api.server; import com.sun.xml.internal.stream.buffer.XMLStreamBuffer; +import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory; import com.sun.xml.internal.ws.server.ServerRtException; import com.sun.xml.internal.ws.streaming.TidyXMLStreamReader; -import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamException; @@ -42,7 +42,7 @@ import java.net.URL; * SPI that provides the source of {@link SDDocument}. * *

      - * This abstract class could be implemented by appliations, or one of the + * This abstract class could be implemented by applications, or one of the * {@link #create} methods can be used. * * @author Kohsuke Kawaguchi @@ -85,28 +85,38 @@ public abstract class SDDocumentSource { /** * System ID of this document. + * @return */ public abstract URL getSystemId(); + public static SDDocumentSource create(final Class implClass, final String url) { + return create(url, implClass); + } + /** * Creates {@link SDDocumentSource} from an URL. + * @param url + * @return */ public static SDDocumentSource create(final URL url) { return new SDDocumentSource() { private final URL systemId = url; + @Override public XMLStreamReader read(XMLInputFactory xif) throws IOException, XMLStreamException { InputStream is = url.openStream(); return new TidyXMLStreamReader( xif.createXMLStreamReader(systemId.toExternalForm(),is), is); } + @Override public XMLStreamReader read() throws IOException, XMLStreamException { InputStream is = url.openStream(); return new TidyXMLStreamReader( XMLStreamReaderFactory.create(systemId.toExternalForm(),is,false), is); } + @Override public URL getSystemId() { return systemId; } @@ -120,19 +130,22 @@ public abstract class SDDocumentSource { * @param resolvingClass class used to read resource * @param path resource path */ - public static SDDocumentSource create(final Class resolvingClass, final String path) { + private static SDDocumentSource create(final String path, final Class resolvingClass) { return new SDDocumentSource() { + @Override public XMLStreamReader read(XMLInputFactory xif) throws IOException, XMLStreamException { InputStream is = inputStream(); return new TidyXMLStreamReader(xif.createXMLStreamReader(path,is), is); } + @Override public XMLStreamReader read() throws IOException, XMLStreamException { InputStream is = inputStream(); return new TidyXMLStreamReader(XMLStreamReaderFactory.create(path,is,false), is); } + @Override public URL getSystemId() { try { return new URL("file://" + path); @@ -157,17 +170,23 @@ public abstract class SDDocumentSource { /** * Creates a {@link SDDocumentSource} from {@link XMLStreamBuffer}. + * @param systemId + * @param xsb + * @return */ public static SDDocumentSource create(final URL systemId, final XMLStreamBuffer xsb) { return new SDDocumentSource() { + @Override public XMLStreamReader read(XMLInputFactory xif) throws XMLStreamException { return xsb.readAsXMLStreamReader(); } + @Override public XMLStreamReader read() throws XMLStreamException { return xsb.readAsXMLStreamReader(); } + @Override public URL getSystemId() { return systemId; } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.java index d62cb623a86..6c76e261341 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,10 +25,10 @@ package com.sun.xml.internal.ws.api.streaming; +import com.sun.xml.internal.ws.resources.ContextClassloaderLocalMessages; + import java.security.AccessController; import java.security.PrivilegedAction; -import java.text.MessageFormat; -import java.util.ResourceBundle; import java.util.WeakHashMap; /** @@ -36,9 +36,7 @@ import java.util.WeakHashMap; */ abstract class ContextClassloaderLocal { - private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; - - private WeakHashMap CACHE = new WeakHashMap(); + private WeakHashMap CACHE = new WeakHashMap<>(); public V get() throws Error { ClassLoader tccl = getContextClassLoader(); @@ -60,26 +58,21 @@ abstract class ContextClassloaderLocal { try { return initialValue(); } catch (Exception e) { - throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); + throw new Error(ContextClassloaderLocalMessages.FAILED_TO_CREATE_NEW_INSTANCE(getClass().getName()), e); } } - private static String format(String property, Object... args) { - String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); - return MessageFormat.format(text, args); - } - private static ClassLoader getContextClassLoader() { - return (ClassLoader) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - ClassLoader cl = null; - try { - cl = Thread.currentThread().getContextClassLoader(); - } catch (SecurityException ex) { - } - return cl; - } - }); + return AccessController.doPrivileged(new PrivilegedAction() { + @Override + public ClassLoader run() { + ClassLoader cl = null; + try { + cl = Thread.currentThread().getContextClassLoader(); + } catch (SecurityException ex) { + } + return cl; + } + }); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.properties deleted file mode 100644 index c0267b823ea..00000000000 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.properties +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/binding/BindingImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/binding/BindingImpl.java index 927fad4d4b0..536e388a4e8 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/binding/BindingImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/binding/BindingImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -75,7 +75,7 @@ public abstract class BindingImpl implements WSBinding { //This is reset when ever Binding.setHandlerChain() or SOAPBinding.setRoles() is called. private HandlerConfiguration handlerConfig; private final Set addedHeaders = new HashSet(); - private final Set knownHeaders = new HashSet(); + private final Set knownHeaders = Collections.synchronizedSet(new HashSet()); private final Set unmodKnownHeaders = Collections.unmodifiableSet(knownHeaders); private final BindingID bindingId; // Features that are set(enabled/disabled) on the binding diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/binding/SOAPBindingImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/binding/SOAPBindingImpl.java index 292ed73c135..f61114eb632 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/binding/SOAPBindingImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/binding/SOAPBindingImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,6 +42,8 @@ import javax.xml.ws.handler.Handler; import javax.xml.ws.soap.MTOMFeature; import javax.xml.ws.soap.SOAPBinding; import java.util.*; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; /** * @author WS Development Team @@ -57,6 +59,7 @@ public final class SOAPBindingImpl extends BindingImpl implements SOAPBinding { private Set portKnownHeaders = Collections.emptySet(); private Set bindingUnderstoodHeaders = new HashSet(); + private final Lock lock = new ReentrantLock(); /** * Use {@link BindingImpl#create(BindingID)} to create this. @@ -95,7 +98,13 @@ public final class SOAPBindingImpl extends BindingImpl implements SOAPBinding { * @param headers SOAP header names */ public void setPortKnownHeaders(@NotNull Set headers) { - this.portKnownHeaders = headers; + + try{ + lock.lock(); + this.portKnownHeaders = headers; + } finally { + lock.unlock(); + } } /** diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/client/sei/MethodUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/client/sei/MethodUtil.java index f0daea51faf..9194ce4ddd0 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/client/sei/MethodUtil.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/client/sei/MethodUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,7 +31,7 @@ import java.util.logging.Level; import java.util.logging.Logger; /** - * Utility class to invoke sun.reflect.misc.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks + * Utility class to invoke com.sun.xml.internal.ws.util.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks * to java.lang,reflect.Method.invoke() *

      * Be careful, copy of this class exists in several packages, iny modification must be done to other copies too! @@ -39,43 +39,17 @@ import java.util.logging.Logger; class MethodUtil { private static final Logger LOGGER = Logger.getLogger(MethodUtil.class.getName()); - private static final Method INVOKE_METHOD; - - static { - Method method; - try { - Class clazz = Class.forName("sun.reflect.misc.MethodUtil"); - method = clazz.getMethod("invoke", Method.class, Object.class, Object[].class); - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil found; it will be used to invoke methods."); - } - } catch (Throwable t) { - method = null; - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil not found, probably non-Oracle JVM"); - } - } - INVOKE_METHOD = method; - } static Object invoke(Object target, Method method, Object[] args) throws IllegalAccessException, InvocationTargetException { - if (INVOKE_METHOD != null) { - // sun.reflect.misc.MethodUtil.invoke(method, owner, args) - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Invoking method using sun.reflect.misc.MethodUtil"); - } - try { - return INVOKE_METHOD.invoke(null, method, target, args); - } catch (InvocationTargetException ite) { - // unwrap invocation exception added by reflection code ... - throw unwrapException(ite); - } - } else { - // other then Oracle JDK ... - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Invoking method directly, probably non-Oracle JVM"); - } - return method.invoke(target, args); + // com.sun.xml.internal.ws.util.MethodUtil.invoke(method, owner, args) + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, "Invoking method using com.sun.xml.internal.ws.util.MethodUtil"); + } + try { + return com.sun.xml.internal.ws.util.MethodUtil.invoke(method, target, args); + } catch (InvocationTargetException ite) { + // unwrap invocation exception added by reflection code ... + throw unwrapException(ite); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.java index 63809b00875..7ae8158bbf8 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,10 +25,10 @@ package com.sun.xml.internal.ws.commons.xmlutil; +import com.sun.xml.internal.ws.resources.ContextClassloaderLocalMessages; + import java.security.AccessController; import java.security.PrivilegedAction; -import java.text.MessageFormat; -import java.util.ResourceBundle; import java.util.WeakHashMap; /** @@ -36,9 +36,7 @@ import java.util.WeakHashMap; */ abstract class ContextClassloaderLocal { - private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; - - private WeakHashMap CACHE = new WeakHashMap(); + private WeakHashMap CACHE = new WeakHashMap<>(); public V get() throws Error { ClassLoader tccl = getContextClassLoader(); @@ -60,26 +58,21 @@ abstract class ContextClassloaderLocal { try { return initialValue(); } catch (Exception e) { - throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); + throw new Error(ContextClassloaderLocalMessages.FAILED_TO_CREATE_NEW_INSTANCE(getClass().getName()), e); } } - private static String format(String property, Object... args) { - String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); - return MessageFormat.format(text, args); - } - private static ClassLoader getContextClassLoader() { - return (ClassLoader) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - ClassLoader cl = null; - try { - cl = Thread.currentThread().getContextClassLoader(); - } catch (SecurityException ex) { - } - return cl; - } - }); + return AccessController.doPrivileged(new PrivilegedAction() { + @Override + public ClassLoader run() { + ClassLoader cl = null; + try { + cl = Thread.currentThread().getContextClassLoader(); + } catch (SecurityException ex) { + } + return cl; + } + }); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.properties deleted file mode 100644 index c0267b823ea..00000000000 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.properties +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.java index e7d0050e775..957607e8cae 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,10 +25,10 @@ package com.sun.xml.internal.ws.developer; +import com.sun.xml.internal.ws.resources.ContextClassloaderLocalMessages; + import java.security.AccessController; import java.security.PrivilegedAction; -import java.text.MessageFormat; -import java.util.ResourceBundle; import java.util.WeakHashMap; /** @@ -36,9 +36,7 @@ import java.util.WeakHashMap; */ abstract class ContextClassloaderLocal { - private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; - - private WeakHashMap CACHE = new WeakHashMap(); + private WeakHashMap CACHE = new WeakHashMap<>(); public V get() throws Error { ClassLoader tccl = getContextClassLoader(); @@ -60,26 +58,21 @@ abstract class ContextClassloaderLocal { try { return initialValue(); } catch (Exception e) { - throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); + throw new Error(ContextClassloaderLocalMessages.FAILED_TO_CREATE_NEW_INSTANCE(getClass().getName()), e); } } - private static String format(String property, Object... args) { - String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); - return MessageFormat.format(text, args); - } - private static ClassLoader getContextClassLoader() { - return (ClassLoader) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - ClassLoader cl = null; - try { - cl = Thread.currentThread().getContextClassLoader(); - } catch (SecurityException ex) { - } - return cl; - } - }); + return AccessController.doPrivileged(new PrivilegedAction() { + @Override + public ClassLoader run() { + ClassLoader cl = null; + try { + cl = Thread.currentThread().getContextClassLoader(); + } catch (SecurityException ex) { + } + return cl; + } + }); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/Injector.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/Injector.java index 158e0a9f8ef..adbcb7967bf 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/Injector.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/Injector.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,12 +25,16 @@ package com.sun.xml.internal.ws.model; +import java.lang.reflect.Field; import javax.xml.ws.WebServiceException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.net.URL; import java.security.AccessController; import java.security.PrivilegedAction; +import java.security.PrivilegedActionException; +import java.security.PrivilegedExceptionAction; +import java.security.ProtectionDomain; import java.util.logging.Level; import java.util.logging.Logger; @@ -44,31 +48,68 @@ final class Injector { private static final Logger LOGGER = Logger.getLogger(Injector.class.getName()); - private static final Method defineClass; - private static final Method resolveClass; - private static final Method getPackage; - private static final Method definePackage; + private static Method defineClass; + private static Method resolveClass; + private static Method getPackage; + private static Method definePackage; + private static Object U; static { - Method[] m = AccessController.doPrivileged( - new PrivilegedAction() { - @Override - public Method[] run() { - return new Method[]{ - getMethod(ClassLoader.class, "defineClass", String.class, byte[].class, Integer.TYPE, Integer.TYPE), - getMethod(ClassLoader.class, "resolveClass", Class.class), - getMethod(ClassLoader.class, "getPackage", String.class), - getMethod(ClassLoader.class, "definePackage", - String.class, String.class, String.class, String.class, - String.class, String.class, String.class, URL.class) - }; - } + try { + Method[] m = AccessController.doPrivileged( + new PrivilegedAction() { + @Override + public Method[] run() { + return new Method[]{ + getMethod(ClassLoader.class, "defineClass", String.class, byte[].class, Integer.TYPE, Integer.TYPE), + getMethod(ClassLoader.class, "resolveClass", Class.class), + getMethod(ClassLoader.class, "getPackage", String.class), + getMethod(ClassLoader.class, "definePackage", + String.class, String.class, String.class, String.class, + String.class, String.class, String.class, URL.class) + }; } - ); - defineClass = m[0]; - resolveClass = m[1]; - getPackage = m[2]; - definePackage = m[3]; + } + ); + defineClass = m[0]; + resolveClass = m[1]; + getPackage = m[2]; + definePackage = m[3]; + + } catch (Throwable t) { + try { + U = AccessController.doPrivileged(new PrivilegedExceptionAction() { + @Override + public Object run() throws Exception { + Class u = Class.forName("sun.misc.Unsafe"); + Field theUnsafe = u.getDeclaredField("theUnsafe"); + theUnsafe.setAccessible(true); + return theUnsafe.get(null); + } + }); + defineClass = AccessController.doPrivileged(new PrivilegedExceptionAction() { + @Override + public Method run() throws Exception { + try { + return U.getClass().getMethod("defineClass", + new Class[]{String.class, + byte[].class, + Integer.TYPE, + Integer.TYPE, + ClassLoader.class, + ProtectionDomain.class}); + } catch (NoSuchMethodException | SecurityException ex) { + throw ex; + } + } + }); + } catch (SecurityException | PrivilegedActionException ex) { + Logger.getLogger(Injector.class.getName()).log(Level.SEVERE, null, ex); + WebServiceException we = new WebServiceException(ex); + we.addSuppressed(t); + throw we; + } + } } private static Method getMethod(final Class c, final String methodname, final Class... params) { @@ -91,24 +132,26 @@ final class Injector { // nothing to do } try { + if (definePackage == null) { + return (Class) defineClass.invoke(U, className.replace('/', '.'), image, 0, image.length, cl, Injector.class.getProtectionDomain()); + } int packIndex = className.lastIndexOf('.'); if (packIndex != -1) { String pkgname = className.substring(0, packIndex); // Check if package already loaded. - Package pkg = (Package)getPackage.invoke(cl, pkgname); + Package pkg = (Package) getPackage.invoke(cl, pkgname); if (pkg == null) { definePackage.invoke(cl, pkgname, null, null, null, null, null, null, null); } } - Class c = (Class)defineClass.invoke(cl,className.replace('/','.'),image,0,image.length); + Class c = (Class) defineClass.invoke(cl, className.replace('/', '.'), image, 0, image.length); resolveClass.invoke(cl, c); return c; - } catch (IllegalAccessException e) { - LOGGER.log(Level.FINE,"Unable to inject "+className,e); - throw new WebServiceException(e); - } catch (InvocationTargetException e) { - LOGGER.log(Level.FINE,"Unable to inject "+className,e); + } catch (IllegalAccessException | InvocationTargetException e) { + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, "Unable to inject " + className, e); + } throw new WebServiceException(e); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/RuntimeModeler.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/RuntimeModeler.java index 29f852ed033..ad6f52f342e 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/RuntimeModeler.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/RuntimeModeler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -346,7 +346,6 @@ public class RuntimeModeler { } private boolean noWrapperGen() { - if (Runtime.version().major() >= 9) return true; Object o = config.properties().get(SuppressDocLitWrapperGeneration); return (o!= null && o instanceof Boolean) ? ((Boolean) o) : false; } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/SOAPSEIModel.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/SOAPSEIModel.java index 6879a6062dc..4e72aac154b 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/SOAPSEIModel.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/SOAPSEIModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,6 +33,8 @@ import javax.xml.namespace.QName; import java.util.HashSet; import java.util.Iterator; import java.util.Set; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; /** * Creates SOAP specific RuntimeModel @@ -41,6 +43,8 @@ import java.util.Set; */ public class SOAPSEIModel extends AbstractSEIModelImpl { + private final Lock lock = new ReentrantLock(); + public SOAPSEIModel(WebServiceFeatureList features) { super(features); } @@ -72,15 +76,22 @@ public class SOAPSEIModel extends AbstractSEIModelImpl { public Set getKnownHeaders() { Set headers = new HashSet(); - for (JavaMethodImpl method : getJavaMethods()) { - // fill in request headers - Iterator params = method.getRequestParameters().iterator(); - fillHeaders(params, headers, Mode.IN); + + try{ + lock.lock(); + for (JavaMethodImpl method : getJavaMethods()) { + // fill in request headers + Iterator params = method.getRequestParameters().iterator(); + fillHeaders(params, headers, Mode.IN); // fill in response headers - params = method.getResponseParameters().iterator(); - fillHeaders(params, headers, Mode.OUT); - } + params = method.getResponseParameters().iterator(); + fillHeaders(params, headers, Mode.OUT); + } + }finally + { + lock.unlock(); + } return headers; } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/privateutil/MethodUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/privateutil/MethodUtil.java index ad2ad4a6ef5..127f74476b3 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/privateutil/MethodUtil.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/privateutil/MethodUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,49 +31,22 @@ import java.util.logging.Level; import java.util.logging.Logger; /** - * Utility class to invoke sun.reflect.misc.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks + * Utility class to invoke com.sun.xml.internal.ws.policy.util.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks * to java.lang,reflect.Method.invoke() */ class MethodUtil { private static final Logger LOGGER = Logger.getLogger(MethodUtil.class.getName()); - private static final Method INVOKE_METHOD; - - static { - Method method; - try { - Class clazz = Class.forName("sun.reflect.misc.MethodUtil"); - method = clazz.getMethod("invoke", Method.class, Object.class, Object[].class); - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil found; it will be used to invoke methods."); - } - } catch (Throwable t) { - method = null; - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil not found, probably non-Oracle JVM"); - } - } - INVOKE_METHOD = method; - } static Object invoke(Object target, Method method, Object[] args) throws IllegalAccessException, InvocationTargetException { - if (INVOKE_METHOD != null) { - // sun.reflect.misc.MethodUtil.invoke(method, owner, args) - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Invoking method using sun.reflect.misc.MethodUtil"); - } - try { - return INVOKE_METHOD.invoke(null, method, target, args); - } catch (InvocationTargetException ite) { - // unwrap invocation exception added by reflection code ... - throw unwrapException(ite); - } - } else { - // other then Oracle JDK ... - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.log(Level.FINE, "Invoking method directly, probably non-Oracle JVM"); - } - return method.invoke(target, args); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, "Invoking method using com.sun.xml.internal.ws.policy.util.MethodUtil"); + } + try { + return com.sun.xml.internal.ws.policy.util.MethodUtil.invoke(method, target, args); + } catch (InvocationTargetException ite) { + // unwrap invocation exception added by reflection code ... + throw unwrapException(ite); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/util/MethodUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/util/MethodUtil.java new file mode 100644 index 00000000000..b8af4d28a37 --- /dev/null +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/util/MethodUtil.java @@ -0,0 +1,293 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.policy.util; + +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Proxy; +import java.security.AccessController; +import java.security.AllPermission; +import java.security.CodeSource; +import java.security.PermissionCollection; +import java.security.PrivilegedExceptionAction; +import java.security.SecureClassLoader; +import java.util.Arrays; + +/* + * This copies from sun.reflect.misc.MethodUtil to implement the trampoline + * code such that when a Method is invoked, it will be called through + * the trampoline that is defined by this MethodUtil class loader. + */ +class Trampoline { + static { + if (Trampoline.class.getClassLoader() == null) { + throw new Error( + "Trampoline must not be defined by the bootstrap classloader"); + } + } + + private static void ensureInvocableMethod(Method m) + throws InvocationTargetException { + Class clazz = m.getDeclaringClass(); + if (clazz.equals(AccessController.class) || + clazz.equals(Method.class) || + clazz.getName().startsWith("java.lang.invoke.")) + throw new InvocationTargetException( + new UnsupportedOperationException("invocation not supported")); + } + + private static Object invoke(Method m, Object obj, Object[] params) + throws InvocationTargetException, IllegalAccessException { + ensureInvocableMethod(m); + return m.invoke(obj, params); + } +} + +/* + * Create a trampoline class. + */ +public final class MethodUtil extends SecureClassLoader { + private static final String WS_UTIL_POLICY_PKG = "com.sun.xml.internal.ws.policy.util."; + private static final String TRAMPOLINE = WS_UTIL_POLICY_PKG + "Trampoline"; + private static final Method bounce = getTrampoline(); + private static final int DEFAULT_BUFFER_SIZE = 8192; + private static final int MAX_BUFFER_SIZE = Integer.MAX_VALUE - 8; + + + private MethodUtil() { + super(); + } + + /* + * Bounce through the trampoline. + */ + public static Object invoke(Method m, Object obj, Object[] params) + throws InvocationTargetException, IllegalAccessException { + try { + return bounce.invoke(null, m, obj, params); + } catch (InvocationTargetException ie) { + Throwable t = ie.getCause(); + + if (t instanceof InvocationTargetException) { + throw (InvocationTargetException) t; + } else if (t instanceof IllegalAccessException) { + throw (IllegalAccessException) t; + } else if (t instanceof RuntimeException) { + throw (RuntimeException) t; + } else if (t instanceof Error) { + throw (Error) t; + } else { + throw new Error("Unexpected invocation error", t); + } + } catch (IllegalAccessException iae) { + // this can't happen + throw new Error("Unexpected invocation error", iae); + } + } + + private static Method getTrampoline() { + try { + return AccessController.doPrivileged( + new PrivilegedExceptionAction() { + public Method run() throws Exception { + Class t = getTrampolineClass(); + Method b = t.getDeclaredMethod("invoke", + Method.class, Object.class, Object[].class); + b.setAccessible(true); + return b; + } + }); + } catch (Exception e) { + throw new InternalError("bouncer cannot be found", e); + } + } + + + protected synchronized Class loadClass(String name, boolean resolve) + throws ClassNotFoundException { + // First, check if the class has already been loaded + checkPackageAccess(name); + Class c = findLoadedClass(name); + if (c == null) { + try { + c = findClass(name); + } catch (ClassNotFoundException e) { + // Fall through ... + } + if (c == null) { + c = getParent().loadClass(name); + } + } + if (resolve) { + resolveClass(c); + } + return c; + } + + + protected Class findClass(final String name) + throws ClassNotFoundException { + if (!name.startsWith(WS_UTIL_POLICY_PKG)) { + throw new ClassNotFoundException(name); + } + String path = "/".concat(name.replace('.', '/').concat(".class")); + try (InputStream in = MethodUtil.class.getResourceAsStream(path)) { + byte[] b = readAllBytes(in); + return defineClass(name, b); + } catch (IOException e) { + throw new ClassNotFoundException(name, e); + } + } + + /** + * JDK9 {@link InputStream#readAllBytes()} substitution. + */ + private byte[] readAllBytes(InputStream in) throws IOException { + byte[] buf = new byte[DEFAULT_BUFFER_SIZE]; + int capacity = buf.length; + int nread = 0; + int n; + for (; ; ) { + // read to EOF which may read more or less than initial buffer size + while ((n = in.read(buf, nread, capacity - nread)) > 0) + nread += n; + + // if the last call to read returned -1, then we're done + if (n < 0) + break; + + // need to allocate a larger buffer + if (capacity <= MAX_BUFFER_SIZE - capacity) { + capacity = capacity << 1; + } else { + if (capacity == MAX_BUFFER_SIZE) + throw new OutOfMemoryError("Required array size too large"); + capacity = MAX_BUFFER_SIZE; + } + buf = Arrays.copyOf(buf, capacity); + } + return (capacity == nread) ? buf : Arrays.copyOf(buf, nread); + } + + + /* + * Define the proxy classes + */ + private Class defineClass(String name, byte[] b) throws IOException { + CodeSource cs = new CodeSource(null, (java.security.cert.Certificate[]) null); + if (!name.equals(TRAMPOLINE)) { + throw new IOException("MethodUtil: bad name " + name); + } + return defineClass(name, b, 0, b.length, cs); + } + + protected PermissionCollection getPermissions(CodeSource codesource) { + PermissionCollection perms = super.getPermissions(codesource); + perms.add(new AllPermission()); + return perms; + } + + private static Class getTrampolineClass() { + try { + return Class.forName(TRAMPOLINE, true, new MethodUtil()); + } catch (ClassNotFoundException e) { + } + return null; + } + + /** + * Checks package access on the given classname. + * This method is typically called when the Class instance is not + * available and the caller attempts to load a class on behalf + * the true caller (application). + */ + private static void checkPackageAccess(String name) { + SecurityManager s = System.getSecurityManager(); + if (s != null) { + String cname = name.replace('/', '.'); + if (cname.startsWith("[")) { + int b = cname.lastIndexOf('[') + 2; + if (b > 1 && b < cname.length()) { + cname = cname.substring(b); + } + } + int i = cname.lastIndexOf('.'); + if (i != -1) { + s.checkPackageAccess(cname.substring(0, i)); + } + } + } + + /** + * Checks package access on the given class. + *

      + * If it is a {@link Proxy#isProxyClass(Class)} that implements + * a non-public interface (i.e. may be in a non-restricted package), + * also check the package access on the proxy interfaces. + */ + private static void checkPackageAccess(Class clazz) { + checkPackageAccess(clazz.getName()); + if (isNonPublicProxyClass(clazz)) { + checkProxyPackageAccess(clazz); + } + } + + // Note that bytecode instrumentation tools may exclude 'sun.*' + // classes but not generated proxy classes and so keep it in com.sun.* + private static final String PROXY_PACKAGE = "com.sun.proxy"; + + /** + * Test if the given class is a proxy class that implements + * non-public interface. Such proxy class may be in a non-restricted + * package that bypasses checkPackageAccess. + */ + private static boolean isNonPublicProxyClass(Class cls) { + String name = cls.getName(); + int i = name.lastIndexOf('.'); + String pkg = (i != -1) ? name.substring(0, i) : ""; + return Proxy.isProxyClass(cls) && !pkg.startsWith(PROXY_PACKAGE); + } + + /** + * Check package access on the proxy interfaces that the given proxy class + * implements. + * + * @param clazz Proxy class object + */ + private static void checkProxyPackageAccess(Class clazz) { + SecurityManager s = System.getSecurityManager(); + if (s != null) { + // check proxy interfaces if the given class is a proxy class + if (Proxy.isProxyClass(clazz)) { + for (Class intf : clazz.getInterfaces()) { + checkPackageAccess(intf); + } + } + } + } +} diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ContextClassloaderLocal.properties similarity index 94% rename from jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.properties rename to jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ContextClassloaderLocal.properties index c0267b823ea..d79956811cb 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.properties +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ContextClassloaderLocal.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ContextClassloaderLocalMessages.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ContextClassloaderLocalMessages.java new file mode 100644 index 00000000000..d52a1ab00d3 --- /dev/null +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ContextClassloaderLocalMessages.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.resources; + +import java.util.Locale; +import java.util.ResourceBundle; +import javax.annotation.Generated; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; + + +/** + * Defines string formatting method for each constant in the resource file + * + */ +@Generated("com.sun.istack.internal.maven.ResourceGenMojo") +public final class ContextClassloaderLocalMessages { + + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.ContextClassloaderLocal"; + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new ContextClassloaderLocalMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); + + public static Localizable localizableFAILED_TO_CREATE_NEW_INSTANCE(Object arg0) { + return MESSAGE_FACTORY.getMessage("FAILED_TO_CREATE_NEW_INSTANCE", arg0); + } + + /** + * Failed to create new instance of {0} + * + */ + public static String FAILED_TO_CREATE_NEW_INSTANCE(Object arg0) { + return LOCALIZER.localize(localizableFAILED_TO_CREATE_NEW_INSTANCE(arg0)); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + + } + +} diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.java index cf0bf26eec3..976cdd1e7b5 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,10 +25,10 @@ package com.sun.xml.internal.ws.spi; +import com.sun.xml.internal.ws.resources.ContextClassloaderLocalMessages; + import java.security.AccessController; import java.security.PrivilegedAction; -import java.text.MessageFormat; -import java.util.ResourceBundle; import java.util.WeakHashMap; /** @@ -36,9 +36,7 @@ import java.util.WeakHashMap; */ abstract class ContextClassloaderLocal { - private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; - - private WeakHashMap CACHE = new WeakHashMap(); + private WeakHashMap CACHE = new WeakHashMap<>(); public V get() throws Error { ClassLoader tccl = getContextClassLoader(); @@ -60,26 +58,21 @@ abstract class ContextClassloaderLocal { try { return initialValue(); } catch (Exception e) { - throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); + throw new Error(ContextClassloaderLocalMessages.FAILED_TO_CREATE_NEW_INSTANCE(getClass().getName()), e); } } - private static String format(String property, Object... args) { - String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); - return MessageFormat.format(text, args); - } - private static ClassLoader getContextClassLoader() { - return (ClassLoader) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - ClassLoader cl = null; - try { - cl = Thread.currentThread().getContextClassLoader(); - } catch (SecurityException ex) { - } - return cl; - } - }); + return AccessController.doPrivileged(new PrivilegedAction() { + @Override + public ClassLoader run() { + ClassLoader cl = null; + try { + cl = Thread.currentThread().getContextClassLoader(); + } catch (SecurityException ex) { + } + return cl; + } + }); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/transport/http/server/EndpointImpl.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/transport/http/server/EndpointImpl.java index 9f23f51b43a..944dd388df6 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/transport/http/server/EndpointImpl.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/transport/http/server/EndpointImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -69,13 +69,11 @@ import org.w3c.dom.Element; /** * Implements {@link Endpoint}. - *

      - *

      + * * This class accumulates the information necessary to create * {@link WSEndpoint}, and then when {@link #publish} method * is called it will be created. - *

      - *

      + * * This object also allows accumulated information to be retrieved. * * @author Jitendra Kotamraju @@ -205,14 +203,17 @@ public class EndpointImpl extends Endpoint { invoker = null; } + @Override public Binding getBinding() { return binding; } + @Override public Object getImplementor() { return implementor; } + @Override public void publish(String address) { canPublish(); URL url; @@ -232,6 +233,7 @@ public class EndpointImpl extends Endpoint { ((HttpEndpoint) actualEndpoint).publish(address); } + @Override public void publish(Object serverContext) { canPublish(); if (!com.sun.net.httpserver.HttpContext.class.isAssignableFrom(serverContext.getClass())) { @@ -241,12 +243,14 @@ public class EndpointImpl extends Endpoint { ((HttpEndpoint) actualEndpoint).publish(serverContext); } + @Override public void publish(HttpContext serverContext) { canPublish(); createEndpoint(serverContext.getPath()); ((HttpEndpoint) actualEndpoint).publish(serverContext); } + @Override public void stop() { if (isPublished()) { ((HttpEndpoint) actualEndpoint).stop(); @@ -255,14 +259,17 @@ public class EndpointImpl extends Endpoint { } } + @Override public boolean isPublished() { return actualEndpoint != null; } + @Override public List getMetadata() { return metadata; } + @Override public void setMetadata(java.util.List metadata) { if (isPublished()) { throw new IllegalStateException("Cannot set Metadata. Endpoint is already published"); @@ -270,20 +277,24 @@ public class EndpointImpl extends Endpoint { this.metadata = metadata; } + @Override public Executor getExecutor() { return executor; } + @Override public void setExecutor(Executor executor) { this.executor = executor; } + @Override public Map getProperties() { - return new HashMap(properties); + return new HashMap<>(properties); } + @Override public void setProperties(Map map) { - this.properties = new HashMap(map); + this.properties = new HashMap<>(map); } /* @@ -335,7 +346,7 @@ public class EndpointImpl extends Endpoint { * reuse the Source object multiple times. */ private List buildDocList() { - List r = new ArrayList(); + List r = new ArrayList<>(); if (metadata != null) { for (Source source : metadata) { @@ -344,14 +355,8 @@ public class EndpointImpl extends Endpoint { String systemId = source.getSystemId(); r.add(SDDocumentSource.create(new URL(systemId), xsbr.getXMLStreamBuffer())); - } catch (TransformerException te) { + } catch (TransformerException | IOException | SAXException | ParserConfigurationException te) { throw new ServerRtException("server.rt.err", te); - } catch (IOException te) { - throw new ServerRtException("server.rt.err", te); - } catch (SAXException e) { - throw new ServerRtException("server.rt.err", e); - } catch (ParserConfigurationException e) { - throw new ServerRtException("server.rt.err", e); } } } @@ -367,11 +372,6 @@ public class EndpointImpl extends Endpoint { EndpointFactory.verifyImplementorClass(implClass, metadataReader); String wsdlLocation = EndpointFactory.getWsdlLocation(implClass, metadataReader); if (wsdlLocation != null) { - ClassLoader cl = implClass.getClassLoader(); - URL url = cl.getResource(wsdlLocation); - if (url != null) { - return SDDocumentSource.create(url); - } return SDDocumentSource.create(implClass, wsdlLocation); } return null; @@ -388,10 +388,12 @@ public class EndpointImpl extends Endpoint { } } + @Override public EndpointReference getEndpointReference(Element...referenceParameters) { return getEndpointReference(W3CEndpointReference.class, referenceParameters); } + @Override public T getEndpointReference(Class clazz, Element...referenceParameters) { if (!isPublished()) { throw new WebServiceException("Endpoint is not published yet"); @@ -458,13 +460,12 @@ public class EndpointImpl extends Endpoint { public void start(@NotNull WSWebServiceContext wsc, @NotNull WSEndpoint endpoint) { try { spiInvoker.inject(wsc); - } catch (IllegalAccessException e) { - throw new WebServiceException(e); - } catch (InvocationTargetException e) { + } catch (IllegalAccessException | InvocationTargetException e) { throw new WebServiceException(e); } } + @Override public Object invoke(@NotNull Packet p, @NotNull Method m, @NotNull Object... args) throws InvocationTargetException, IllegalAccessException { return spiInvoker.invoke(m, args); } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/transport/http/server/ServerMgr.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/transport/http/server/ServerMgr.java index 6455b83efa9..2d8ecee4cfc 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/transport/http/server/ServerMgr.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/transport/http/server/ServerMgr.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,8 +37,8 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.logging.Level; import java.util.logging.Logger; -import java.util.Optional; /** @@ -49,10 +49,10 @@ import java.util.Optional; final class ServerMgr { private static final ServerMgr serverMgr = new ServerMgr(); - private static final Logger logger = + private static final Logger LOGGER = Logger.getLogger( com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".server.http"); - private final Map servers = new HashMap(); + private final Map servers = new HashMap<>(); private ServerMgr() {} @@ -83,25 +83,26 @@ final class ServerMgr { synchronized(servers) { state = servers.get(inetAddress); if (state == null) { - final int finalPortNum = port; - Optional stateOpt = - servers.values() - .stream() - .filter(s -> s.getServer() - .getAddress() - .getPort() == finalPortNum) - .findAny(); - - if (inetAddress.getAddress().isAnyLocalAddress() && - stateOpt.isPresent()) { - state = stateOpt.get(); + ServerState free = null; + for (ServerState ss : servers.values()) { + if (port == ss.getServer().getAddress().getPort()) { + free = ss; + break; + } + } + if (inetAddress.getAddress().isAnyLocalAddress() && free != null) { + state = free; } else { - logger.fine("Creating new HTTP Server at "+inetAddress); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.fine("Creating new HTTP Server at "+inetAddress); + } // Creates server with default socket backlog server = HttpServer.create(inetAddress, 0); server.setExecutor(Executors.newCachedThreadPool()); String path = url.toURI().getPath(); - logger.fine("Creating HTTP Context at = "+path); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.fine("Creating HTTP Context at = "+path); + } HttpContext context = server.createContext(path); server.start(); @@ -110,7 +111,9 @@ final class ServerMgr { // or IP: 0.0.0.0 - which is used to monitor network traffic from any valid IP address inetAddress = server.getAddress(); - logger.fine("HTTP server started = "+inetAddress); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.fine("HTTP server started = "+inetAddress); + } state = new ServerState(server, path); servers.put(inetAddress, state); return context; @@ -121,11 +124,15 @@ final class ServerMgr { if (state.getPaths().contains(url.getPath())) { String err = "Context with URL path "+url.getPath()+ " already exists on the server "+server.getAddress(); - logger.fine(err); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.fine(err); + } throw new IllegalArgumentException(err); } - logger.fine("Creating HTTP Context at = "+url.getPath()); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.fine("Creating HTTP Context at = "+url.getPath()); + } HttpContext context = server.createContext(url.getPath()); state.oneMoreContext(url.getPath()); return context; @@ -157,7 +164,7 @@ final class ServerMgr { private static final class ServerState { private final HttpServer server; private int instances; - private Set paths = new HashSet(); + private final Set paths = new HashSet<>(); ServerState(HttpServer server, String path) { this.server = server; diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/MethodUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/MethodUtil.java new file mode 100644 index 00000000000..8eaf51e461f --- /dev/null +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/MethodUtil.java @@ -0,0 +1,293 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.util; + +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Proxy; +import java.security.AccessController; +import java.security.AllPermission; +import java.security.CodeSource; +import java.security.PermissionCollection; +import java.security.PrivilegedExceptionAction; +import java.security.SecureClassLoader; +import java.util.Arrays; + +/* + * This copies from sun.reflect.misc.MethodUtil to implement the trampoline + * code such that when a Method is invoked, it will be called through + * the trampoline that is defined by this MethodUtil class loader. + */ +class Trampoline { + static { + if (Trampoline.class.getClassLoader() == null) { + throw new Error( + "Trampoline must not be defined by the bootstrap classloader"); + } + } + + private static void ensureInvocableMethod(Method m) + throws InvocationTargetException { + Class clazz = m.getDeclaringClass(); + if (clazz.equals(AccessController.class) || + clazz.equals(Method.class) || + clazz.getName().startsWith("java.lang.invoke.")) + throw new InvocationTargetException( + new UnsupportedOperationException("invocation not supported")); + } + + private static Object invoke(Method m, Object obj, Object[] params) + throws InvocationTargetException, IllegalAccessException { + ensureInvocableMethod(m); + return m.invoke(obj, params); + } +} + +/* + * Create a trampoline class. + */ +public final class MethodUtil extends SecureClassLoader { + private static final String WS_UTIL_PKG = "com.sun.xml.internal.ws.util."; + private static final String TRAMPOLINE = WS_UTIL_PKG + "Trampoline"; + private static final Method bounce = getTrampoline(); + private static final int DEFAULT_BUFFER_SIZE = 8192; + private static final int MAX_BUFFER_SIZE = Integer.MAX_VALUE - 8; + + + private MethodUtil() { + super(); + } + + /* + * Bounce through the trampoline. + */ + public static Object invoke(Method m, Object obj, Object[] params) + throws InvocationTargetException, IllegalAccessException { + try { + return bounce.invoke(null, m, obj, params); + } catch (InvocationTargetException ie) { + Throwable t = ie.getCause(); + + if (t instanceof InvocationTargetException) { + throw (InvocationTargetException) t; + } else if (t instanceof IllegalAccessException) { + throw (IllegalAccessException) t; + } else if (t instanceof RuntimeException) { + throw (RuntimeException) t; + } else if (t instanceof Error) { + throw (Error) t; + } else { + throw new Error("Unexpected invocation error", t); + } + } catch (IllegalAccessException iae) { + // this can't happen + throw new Error("Unexpected invocation error", iae); + } + } + + private static Method getTrampoline() { + try { + return AccessController.doPrivileged( + new PrivilegedExceptionAction() { + public Method run() throws Exception { + Class t = getTrampolineClass(); + Method b = t.getDeclaredMethod("invoke", + Method.class, Object.class, Object[].class); + b.setAccessible(true); + return b; + } + }); + } catch (Exception e) { + throw new InternalError("bouncer cannot be found", e); + } + } + + + protected synchronized Class loadClass(String name, boolean resolve) + throws ClassNotFoundException { + // First, check if the class has already been loaded + checkPackageAccess(name); + Class c = findLoadedClass(name); + if (c == null) { + try { + c = findClass(name); + } catch (ClassNotFoundException e) { + // Fall through ... + } + if (c == null) { + c = getParent().loadClass(name); + } + } + if (resolve) { + resolveClass(c); + } + return c; + } + + + protected Class findClass(final String name) + throws ClassNotFoundException { + if (!name.startsWith(WS_UTIL_PKG)) { + throw new ClassNotFoundException(name); + } + String path = "/".concat(name.replace('.', '/').concat(".class")); + try (InputStream in = MethodUtil.class.getResourceAsStream(path)) { + byte[] b = readAllBytes(in); + return defineClass(name, b); + } catch (IOException e) { + throw new ClassNotFoundException(name, e); + } + } + + /** + * JDK9 {@link InputStream#readAllBytes()} substitution. + */ + private byte[] readAllBytes(InputStream in) throws IOException { + byte[] buf = new byte[DEFAULT_BUFFER_SIZE]; + int capacity = buf.length; + int nread = 0; + int n; + for (; ; ) { + // read to EOF which may read more or less than initial buffer size + while ((n = in.read(buf, nread, capacity - nread)) > 0) + nread += n; + + // if the last call to read returned -1, then we're done + if (n < 0) + break; + + // need to allocate a larger buffer + if (capacity <= MAX_BUFFER_SIZE - capacity) { + capacity = capacity << 1; + } else { + if (capacity == MAX_BUFFER_SIZE) + throw new OutOfMemoryError("Required array size too large"); + capacity = MAX_BUFFER_SIZE; + } + buf = Arrays.copyOf(buf, capacity); + } + return (capacity == nread) ? buf : Arrays.copyOf(buf, nread); + } + + + /* + * Define the proxy classes + */ + private Class defineClass(String name, byte[] b) throws IOException { + CodeSource cs = new CodeSource(null, (java.security.cert.Certificate[]) null); + if (!name.equals(TRAMPOLINE)) { + throw new IOException("MethodUtil: bad name " + name); + } + return defineClass(name, b, 0, b.length, cs); + } + + protected PermissionCollection getPermissions(CodeSource codesource) { + PermissionCollection perms = super.getPermissions(codesource); + perms.add(new AllPermission()); + return perms; + } + + private static Class getTrampolineClass() { + try { + return Class.forName(TRAMPOLINE, true, new MethodUtil()); + } catch (ClassNotFoundException e) { + } + return null; + } + + /** + * Checks package access on the given classname. + * This method is typically called when the Class instance is not + * available and the caller attempts to load a class on behalf + * the true caller (application). + */ + private static void checkPackageAccess(String name) { + SecurityManager s = System.getSecurityManager(); + if (s != null) { + String cname = name.replace('/', '.'); + if (cname.startsWith("[")) { + int b = cname.lastIndexOf('[') + 2; + if (b > 1 && b < cname.length()) { + cname = cname.substring(b); + } + } + int i = cname.lastIndexOf('.'); + if (i != -1) { + s.checkPackageAccess(cname.substring(0, i)); + } + } + } + + /** + * Checks package access on the given class. + *

      + * If it is a {@link Proxy#isProxyClass(Class)} that implements + * a non-public interface (i.e. may be in a non-restricted package), + * also check the package access on the proxy interfaces. + */ + private static void checkPackageAccess(Class clazz) { + checkPackageAccess(clazz.getName()); + if (isNonPublicProxyClass(clazz)) { + checkProxyPackageAccess(clazz); + } + } + + // Note that bytecode instrumentation tools may exclude 'sun.*' + // classes but not generated proxy classes and so keep it in com.sun.* + private static final String PROXY_PACKAGE = "com.sun.proxy"; + + /** + * Test if the given class is a proxy class that implements + * non-public interface. Such proxy class may be in a non-restricted + * package that bypasses checkPackageAccess. + */ + private static boolean isNonPublicProxyClass(Class cls) { + String name = cls.getName(); + int i = name.lastIndexOf('.'); + String pkg = (i != -1) ? name.substring(0, i) : ""; + return Proxy.isProxyClass(cls) && !pkg.startsWith(PROXY_PACKAGE); + } + + /** + * Check package access on the proxy interfaces that the given proxy class + * implements. + * + * @param clazz Proxy class object + */ + private static void checkProxyPackageAccess(Class clazz) { + SecurityManager s = System.getSecurityManager(); + if (s != null) { + // check proxy interfaces if the given class is a proxy class + if (Proxy.isProxyClass(clazz)) { + for (Class intf : clazz.getInterfaces()) { + checkPackageAccess(intf); + } + } + } + } +} diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/version.properties b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/version.properties index eedc7c2b359..82452acb3d7 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/version.properties +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/version.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,4 +26,4 @@ build-id=2.3.0-SNAPSHOT build-version=JAX-WS RI 2.3.0-SNAPSHOT major-version=2.3.0 -svn-revision=5c2c1fd2f2ab3b5c7cea25f79aa49e54cb84b7cc +svn-revision=e8c5e9697d9b27d83ff35d767939b2f55e667621 diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.java index 93a44b68050..715db421328 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,10 +25,10 @@ package com.sun.xml.internal.ws.util.xml; +import com.sun.xml.internal.ws.resources.ContextClassloaderLocalMessages; + import java.security.AccessController; import java.security.PrivilegedAction; -import java.text.MessageFormat; -import java.util.ResourceBundle; import java.util.WeakHashMap; /** @@ -36,9 +36,7 @@ import java.util.WeakHashMap; */ abstract class ContextClassloaderLocal { - private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; - - private WeakHashMap CACHE = new WeakHashMap(); + private WeakHashMap CACHE = new WeakHashMap<>(); public V get() throws Error { ClassLoader tccl = getContextClassLoader(); @@ -60,26 +58,21 @@ abstract class ContextClassloaderLocal { try { return initialValue(); } catch (Exception e) { - throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); + throw new Error(ContextClassloaderLocalMessages.FAILED_TO_CREATE_NEW_INSTANCE(getClass().getName()), e); } } - private static String format(String property, Object... args) { - String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); - return MessageFormat.format(text, args); - } - private static ClassLoader getContextClassLoader() { - return (ClassLoader) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - ClassLoader cl = null; - try { - cl = Thread.currentThread().getContextClassLoader(); - } catch (SecurityException ex) { - } - return cl; - } - }); + return AccessController.doPrivileged(new PrivilegedAction() { + @Override + public ClassLoader run() { + ClassLoader cl = null; + try { + cl = Thread.currentThread().getContextClassLoader(); + } catch (SecurityException ex) { + } + return cl; + } + }); } } diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/XmlCatalogUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/XmlCatalogUtil.java new file mode 100644 index 00000000000..d1ef8648bfc --- /dev/null +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/XmlCatalogUtil.java @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.util.xml; + +import com.sun.istack.internal.Nullable; +import com.sun.xml.internal.ws.server.ServerRtException; +import java.io.File; +import java.net.URI; +import java.net.URL; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Enumeration; +import javax.xml.catalog.CatalogFeatures; +import javax.xml.catalog.CatalogFeatures.Feature; +import javax.xml.catalog.CatalogManager; +import javax.xml.ws.WebServiceException; +import org.xml.sax.EntityResolver; + +/** + * + * @author lukas + */ +public class XmlCatalogUtil { + + // Cache CatalogFeatures instance for future usages. + // Resolve feature is set to "continue" value for backward compatibility. + private static final CatalogFeatures CATALOG_FEATURES + = CatalogFeatures.builder().with(Feature.RESOLVE, "continue").build(); + + /** + * Gets an EntityResolver using XML catalog + * + * @param catalogUrl + * @return + */ + public static EntityResolver createEntityResolver(@Nullable URL catalogUrl) { + ArrayList urlsArray = new ArrayList<>(); + EntityResolver er; + if (catalogUrl != null) { + urlsArray.add(catalogUrl); + } + try { + er = createCatalogResolver(urlsArray); + } catch (Exception e) { + throw new ServerRtException("server.rt.err", e); + } + return er; + } + + /** + * Gets a default EntityResolver for catalog at META-INF/jaxws-catalog.xml + * + * @return + */ + public static EntityResolver createDefaultCatalogResolver() { + EntityResolver er; + try { + /** + * Gets a URLs for catalog defined at META-INF/jaxws-catalog.xml + */ + ClassLoader cl = Thread.currentThread().getContextClassLoader(); + Enumeration catalogEnum; + if (cl == null) { + catalogEnum = ClassLoader.getSystemResources("META-INF/jax-ws-catalog.xml"); + } else { + catalogEnum = cl.getResources("META-INF/jax-ws-catalog.xml"); + } + er = createCatalogResolver(Collections.list(catalogEnum)); + } catch (Exception e) { + throw new WebServiceException(e); + } + + return er; + } + + /** + * Instantiate catalog resolver using new catalog API (javax.xml.catalog.*) + * added in JDK9. Usage of new API removes dependency on internal API + * (com.sun.org.apache.xml.internal) for modular runtime. + */ + private static EntityResolver createCatalogResolver(ArrayList urls) throws Exception { + // Prepare array of catalog URIs + URI[] uris = urls.stream() + .map(u -> URI.create(u.toExternalForm())) + .toArray(URI[]::new); + + //Create CatalogResolver with new JDK9+ API + return (EntityResolver) CatalogManager.catalogResolver(CATALOG_FEATURES, uris); + } + +} diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java index d84fa5e7d11..213b584b15a 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java @@ -26,30 +26,21 @@ package com.sun.xml.internal.ws.util.xml; import com.sun.istack.internal.Nullable; -import com.sun.xml.internal.ws.server.ServerRtException; import com.sun.xml.internal.ws.util.ByteArrayBuffer; import java.io.IOException; import java.io.InputStream; import java.io.OutputStreamWriter; import java.io.Writer; -import java.lang.reflect.Method; -import java.net.URI; import java.net.URL; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.ArrayList; -import java.util.Collections; -import java.util.Enumeration; import java.util.Iterator; import java.util.List; import java.util.StringTokenizer; import java.util.logging.Level; import java.util.logging.Logger; -import java.util.stream.Collectors; import javax.xml.XMLConstants; -import javax.xml.catalog.CatalogFeatures; -import javax.xml.catalog.CatalogFeatures.Feature; -import javax.xml.catalog.CatalogManager; import javax.xml.namespace.QName; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; @@ -65,7 +56,6 @@ import javax.xml.transform.sax.SAXTransformerFactory; import javax.xml.transform.sax.TransformerHandler; import javax.xml.transform.stream.StreamSource; import javax.xml.validation.SchemaFactory; -import javax.xml.ws.WebServiceException; import javax.xml.xpath.XPathFactory; import javax.xml.xpath.XPathFactoryConfigurationException; import org.w3c.dom.Attr; @@ -78,6 +68,8 @@ import org.xml.sax.EntityResolver; import org.xml.sax.ErrorHandler; import org.xml.sax.InputSource; import org.xml.sax.SAXException; +import org.xml.sax.SAXNotRecognizedException; +import org.xml.sax.SAXNotSupportedException; import org.xml.sax.SAXParseException; import org.xml.sax.XMLReader; @@ -184,7 +176,7 @@ public class XmlUtil { } public static List parseTokenList(String tokenList) { - List result = new ArrayList(); + List result = new ArrayList<>(); StringTokenizer tokenizer = new StringTokenizer(tokenList, " "); while (tokenizer.hasMoreTokens()) { result.add(tokenizer.nextToken()); @@ -247,6 +239,7 @@ public class XmlUtil { /** * Creates a new identity transformer. + * @return */ public static Transformer newTransformer() { try { @@ -258,9 +251,17 @@ public class XmlUtil { /** * Performs identity transformation. + * @param + * @param src + * @param result + * @return + * @throws javax.xml.transform.TransformerException + * @throws java.io.IOException + * @throws org.xml.sax.SAXException + * @throws javax.xml.parsers.ParserConfigurationException */ - public static - T identityTransform(Source src, T result) throws TransformerException, SAXException, ParserConfigurationException, IOException { + public static T identityTransform(Source src, T result) + throws TransformerException, SAXException, ParserConfigurationException, IOException { if (src instanceof StreamSource) { // work around a bug in JAXP in JDK6u4 and earlier where the namespace processing // is not turned on by default @@ -286,68 +287,25 @@ public class XmlUtil { return is; } - /* - * Gets an EntityResolver using XML catalog - */ - public static EntityResolver createEntityResolver(@Nullable URL catalogUrl) { - ArrayList urlsArray = new ArrayList(); - EntityResolver er; - if (catalogUrl != null) { - urlsArray.add(catalogUrl); - } - try { - er = createCatalogResolver(urlsArray); - } catch (Exception e) { - throw new ServerRtException("server.rt.err",e); - } - return er; + /** + * Gets an EntityResolver using XML catalog + * + * @param catalogUrl + * @return + */ + public static EntityResolver createEntityResolver(@Nullable URL catalogUrl) { + return XmlCatalogUtil.createEntityResolver(catalogUrl); } /** * Gets a default EntityResolver for catalog at META-INF/jaxws-catalog.xml + * + * @return */ public static EntityResolver createDefaultCatalogResolver() { - EntityResolver er; - try { - /** - * Gets a URLs for catalog defined at META-INF/jaxws-catalog.xml - */ - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - Enumeration catalogEnum; - if (cl == null) { - catalogEnum = ClassLoader.getSystemResources("META-INF/jax-ws-catalog.xml"); - } else { - catalogEnum = cl.getResources("META-INF/jax-ws-catalog.xml"); - } - er = createCatalogResolver(Collections.list(catalogEnum)); - } catch (Exception e) { - throw new WebServiceException(e); - } - - return er; + return XmlCatalogUtil.createDefaultCatalogResolver(); } - /** - * Instantiate catalog resolver using new catalog API (javax.xml.catalog.*) - * added in JDK9. Usage of new API removes dependency on internal API - * (com.sun.org.apache.xml.internal) for modular runtime. - */ - private static EntityResolver createCatalogResolver(ArrayList urls) throws Exception { - // Prepare array of catalog URIs - URI[] uris = urls.stream() - .map(u -> URI.create(u.toExternalForm())) - .toArray(URI[]::new); - - //Create CatalogResolver with new JDK9+ API - return (EntityResolver) CatalogManager.catalogResolver(catalogFeatures, uris); - } - - // Cache CatalogFeatures instance for future usages. - // Resolve feature is set to "continue" value for backward compatibility. - private static CatalogFeatures catalogFeatures = CatalogFeatures.builder() - .with(Feature.RESOLVE, "continue") - .build(); - /** * {@link ErrorHandler} that always treat the error as fatal. */ @@ -391,7 +349,7 @@ public class XmlUtil { SAXParserFactory factory = SAXParserFactory.newInstance(); try { factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !xmlSecurityDisabled(disableSecurity)); - } catch (Exception e) { + } catch (ParserConfigurationException | SAXNotRecognizedException | SAXNotSupportedException e) { LOGGER.log(Level.WARNING, "Factory [{0}] doesn't support secure xml processing!", new Object[]{factory.getClass().getName()}); } return factory; diff --git a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/FactoryFinder.java b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/FactoryFinder.java index ef5500a0627..190471cd9d5 100644 --- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/FactoryFinder.java +++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/FactoryFinder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -245,10 +245,14 @@ class FactoryFinder { return null; } - private static String getSystemProperty(String property) { + private static String getSystemProperty(final String property) { logger.log(Level.FINE, "Checking system property {0}", property); - String value = AccessController.doPrivileged( - (PrivilegedAction) () -> System.getProperty(property)); + String value = AccessController.doPrivileged(new PrivilegedAction() { + @Override + public String run() { + return System.getProperty(property); + } + }); logFound(value); return value; } diff --git a/jaxws/src/java.xml.ws/share/classes/module-info.java b/jaxws/src/java.xml.ws/share/classes/module-info.java index e8e43947623..9b4982d1fcd 100644 --- a/jaxws/src/java.xml.ws/share/classes/module-info.java +++ b/jaxws/src/java.xml.ws/share/classes/module-info.java @@ -38,6 +38,7 @@ module java.xml.ws { requires java.logging; requires java.management; requires jdk.httpserver; + requires jdk.unsupported; uses javax.xml.ws.spi.Provider; uses javax.xml.soap.MessageFactory; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JJavaName.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JJavaName.java index 1af2c5d9a31..fe7813ebc4e 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JJavaName.java +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JJavaName.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -85,8 +85,8 @@ public class JJavaName { * ("my_children","MyChildren","myChildren", and "MY-CHILDREN", "CODE003-children" respectively) *

      * Although this method only works for English words, it handles non-English - * words gracefully (by just returning it as-is.) For example, "日本語" - * will be returned as-is without modified, not "日本語s" + * words gracefully (by just returning it as-is.) For example, "{@literal 日本語}" + * will be returned as-is without modified, not "{@literal 日本語s}" *

      * This method doesn't handle suffixes very well. For example, passing * "person56" will return "person56s", not "people56". diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JModuleDirective.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JModuleDirective.java index 472aa508b28..af71cbd9218 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JModuleDirective.java +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JModuleDirective.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -101,7 +101,7 @@ public abstract class JModuleDirective { */ @Override public int hashCode() { - return 97 * (Integer.hashCode(getType().ordinal() + 1)) + name.hashCode(); + return 97 * (Integer.valueOf(getType().ordinal() + 1)).hashCode() + name.hashCode(); } /** diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/util/JavadocEscapeWriter.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/util/JavadocEscapeWriter.java index 9a9fae31705..a824946273c 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/util/JavadocEscapeWriter.java +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/util/JavadocEscapeWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,7 +37,7 @@ import java.io.Writer; * *

      * Note that this class doesn't escape other Unicode characters - * that are typically unsafe. For example, 愛 (A kanji + * that are typically unsafe. For example, {@literal 愛} (A kanji * that means "love") can be considered as unsafe because * javac with English Windows cannot accept this character in the * source code. diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/istack/internal/tools/DefaultAuthenticator.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/istack/internal/tools/DefaultAuthenticator.java index d4feaeecb91..c149697ea1c 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/istack/internal/tools/DefaultAuthenticator.java +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/istack/internal/tools/DefaultAuthenticator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,6 +33,7 @@ import java.io.IOException; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.lang.reflect.Field; +import java.lang.reflect.Method; import java.net.Authenticator; import java.net.Authenticator.RequestorType; import java.net.MalformedURLException; @@ -42,6 +43,8 @@ import java.net.URLDecoder; import java.net.URLEncoder; import java.security.AccessController; import java.security.PrivilegedAction; +import java.security.PrivilegedActionException; +import java.security.PrivilegedExceptionAction; import java.util.ArrayList; import java.util.List; import java.util.logging.Level; @@ -56,11 +59,12 @@ import org.xml.sax.helpers.LocatorImpl; */ public class DefaultAuthenticator extends Authenticator { + private static final Logger LOGGER = Logger.getLogger(DefaultAuthenticator.class.getName()); private static DefaultAuthenticator instance; private static Authenticator systemAuthenticator = getCurrentAuthenticator(); private String proxyUser; private String proxyPasswd; - private final List authInfo = new ArrayList(); + private final List authInfo = new ArrayList<>(); private static int counter = 0; DefaultAuthenticator() { @@ -145,10 +149,7 @@ public class DefaultAuthenticator extends Authenticator { fi = new FileInputStream(f); is = new InputStreamReader(fi, "UTF-8"); in = new BufferedReader(is); - } catch (UnsupportedEncodingException e) { - listener.onError(e, locator); - return; - } catch (FileNotFoundException e) { + } catch (UnsupportedEncodingException | FileNotFoundException e) { listener.onError(e, locator); return; } @@ -170,7 +171,7 @@ public class DefaultAuthenticator extends Authenticator { } } catch (IOException e) { listener.onError(e, locator); - Logger.getLogger(DefaultAuthenticator.class.getName()).log(Level.SEVERE, e.getMessage(), e); + LOGGER.log(Level.SEVERE, e.getMessage(), e); } } finally { try { @@ -184,7 +185,7 @@ public class DefaultAuthenticator extends Authenticator { fi.close(); } } catch (IOException ex) { - Logger.getLogger(DefaultAuthenticator.class.getName()).log(Level.SEVERE, null, ex); + LOGGER.log(Level.SEVERE, null, ex); } } } @@ -225,6 +226,29 @@ public class DefaultAuthenticator extends Authenticator { } static Authenticator getCurrentAuthenticator() { + try { + return AccessController.doPrivileged(new PrivilegedExceptionAction() { + @Override + public Authenticator run() throws Exception { + Method method = Authenticator.class.getMethod("getDefault"); + return (Authenticator) method.invoke(null); + } + + }); + } catch (PrivilegedActionException pae) { + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, null, pae); + } + Exception ex = pae.getException(); + if (!(ex instanceof NoSuchMethodException)) { + // if Authenticator.getDefault has not been found, + // we likely didn't get through sec, so return null + // and don't care about JDK version we're on + return null; + } + // or we're on JDK <9, so let's continue the old way... + } + final Field f = getTheAuthenticator(); if (f == null) { return null; @@ -239,7 +263,7 @@ public class DefaultAuthenticator extends Authenticator { } }); return (Authenticator) f.get(null); - } catch (Exception ex) { + } catch (IllegalAccessException | IllegalArgumentException ex) { return null; } finally { AccessController.doPrivileged(new PrivilegedAction() { @@ -255,7 +279,7 @@ public class DefaultAuthenticator extends Authenticator { private static Field getTheAuthenticator() { try { return Authenticator.class.getDeclaredField("theAuthenticator"); - } catch (Exception ex) { + } catch (NoSuchFieldException | SecurityException ex) { return null; } } @@ -277,7 +301,7 @@ public class DefaultAuthenticator extends Authenticator { @Override public void onError(Exception e, Locator loc) { System.err.println(getLocationString(loc) + ": " + e.getMessage()); - Logger.getLogger(DefaultAuthenticator.class.getName()).log(Level.SEVERE, e.getMessage(), e); + LOGGER.log(Level.SEVERE, e.getMessage(), e); } private String getLocationString(Locator l) { diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/istack/internal/tools/SecureLoader.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/istack/internal/tools/SecureLoader.java index 4c08e4da25f..4061f18702d 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/istack/internal/tools/SecureLoader.java +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/istack/internal/tools/SecureLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,9 @@ package com.sun.istack.internal.tools; +import java.security.AccessController; +import java.security.PrivilegedAction; + /** * Class defined for safe calls of getClassLoader methods of any kind (context/system/class * classloader. This MUST be package private and defined in every package which @@ -37,9 +40,10 @@ class SecureLoader { if (System.getSecurityManager() == null) { return Thread.currentThread().getContextClassLoader(); } else { - return (ClassLoader) java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { - public java.lang.Object run() { + return AccessController.doPrivileged( + new PrivilegedAction() { + @Override + public ClassLoader run() { return Thread.currentThread().getContextClassLoader(); } }); @@ -50,9 +54,10 @@ class SecureLoader { if (System.getSecurityManager() == null) { return c.getClassLoader(); } else { - return (ClassLoader) java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { - public java.lang.Object run() { + return AccessController.doPrivileged( + new PrivilegedAction() { + @Override + public ClassLoader run() { return c.getClassLoader(); } }); @@ -63,9 +68,10 @@ class SecureLoader { if (System.getSecurityManager() == null) { return ClassLoader.getSystemClassLoader(); } else { - return (ClassLoader) java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { - public java.lang.Object run() { + return AccessController.doPrivileged( + new PrivilegedAction() { + @Override + public ClassLoader run() { return ClassLoader.getSystemClassLoader(); } }); @@ -76,9 +82,10 @@ class SecureLoader { if (System.getSecurityManager() == null) { return cl.getParent(); } else { - return (ClassLoader) java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { - public java.lang.Object run() { + return AccessController.doPrivileged( + new PrivilegedAction() { + @Override + public ClassLoader run() { return cl.getParent(); } }); @@ -89,9 +96,10 @@ class SecureLoader { if (System.getSecurityManager() == null) { Thread.currentThread().setContextClassLoader(cl); } else { - java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { - public java.lang.Object run() { + AccessController.doPrivileged( + new PrivilegedAction() { + @Override + public ClassLoader run() { Thread.currentThread().setContextClassLoader(cl); return null; } diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle.properties index 0cc3e21ee84..0f2b377cc5b 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -30,10 +30,10 @@ BASEDIR_DOESNT_EXIST = \ Non-existent directory: {0} VERSION = \ - schemagen 2.3.0-SNAPSHOT + schemagen 2.3.0-b170215.1712 FULLVERSION = \ - schemagen full version "2.3.0-SNAPSHOT" + schemagen full version "2.3.0-b170215.1712" USAGE = \ Usage: schemagen [-options ...] \n\ diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_de.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_de.properties index 3158ce32236..be77744f1df 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_de.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = Nicht erkanntes {0} in Zeile {1} Spalte {2} BASEDIR_DOESNT_EXIST = Nicht vorhandenes Verzeichnis: {0} -VERSION = schemagen 2.3.0-SNAPSHOT +VERSION = schemagen 2.3.0-b170215.1712 -FULLVERSION = schemagen vollst\u00E4ndige Version "2.3.0-SNAPSHOT" +FULLVERSION = schemagen vollst\u00E4ndige Version "2.3.0-b170215.1712" USAGE = Verwendung: schemagen [-options ...] \nOptionen: \n\\ \\ \\ \\ -d : Gibt an, wo die von Prozessor und javac generierten Klassendateien gespeichert werden sollen\n\\ \\ \\ \\ -cp : Gibt an, wo die vom Benutzer angegebenen Dateien gespeichert sind\n\\ \\ \\ \\ -classpath : Gibt an, wo die vom Benutzer angegebenen Dateien gespeichert sind\n\\ \\ \\ \\ -encoding : Gibt die Codierung f\u00FCr die Annotationsverarbeitung/den javac-Aufruf an \n\\ \\ \\ \\ -episode : Generiert Episodendatei f\u00FCr separate Kompilierung\n\\ \\ \\ \\ -version : Zeigt Versionsinformation an\n\\ \\ \\ \\ -fullversion : Zeigt vollst\u00E4ndige Versionsinformationen an\n\\ \\ \\ \\ -help : Zeigt diese Verwendungsmeldung an diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_es.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_es.properties index 81d9274dc3c..632f594e2b5 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_es.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_es.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = Aparece un {0} inesperado en la l\u00EDnea {1} y la colu BASEDIR_DOESNT_EXIST = Directorio no existente: {0} -VERSION = schemagen 2.3.0-SNAPSHOT +VERSION = schemagen 2.3.0-b170215.1712 -FULLVERSION = versi\u00F3n completa de schemagen "2.3.0-SNAPSHOT" +FULLVERSION = versi\u00F3n completa de schemagen "2.3.0-b170215.1712" USAGE = Sintaxis: schemagen [-options ...] \nOpciones: \n\\ \\ \\ \\ -d : especifique d\u00F3nde se colocan los archivos de clase generados por javac y el procesador\n\\ \\ \\ \\ -cp : especifique d\u00F3nde se encuentran los archivos especificados por el usuario\n\\ \\ \\ \\ -encoding : especifique la codificaci\u00F3n que se va a utilizar para el procesamiento de anotaciones/llamada de javac\n\\ \\ \\ \\ -episode : genera un archivo de episodio para una compilaci\u00F3n diferente\n\\ \\ \\ \\ -version : muestra la informaci\u00F3n de la versi\u00F3n\n\\ \\ \\ \\ -fullversion : muestra la informaci\u00F3n completa de la versi\u00F3n\n\\ \\ \\ \\ -help : muestra este mensaje de sintaxis diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties index 597ce0e512b..6acdbba38d8 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = Un \u00E9l\u00E9ment {0} inattendu appara\u00EEt \u00E0 BASEDIR_DOESNT_EXIST = R\u00E9pertoire {0} inexistant -VERSION = schemagen 2.3.0-SNAPSHOT +VERSION = schemagen 2.3.0-b170215.1712 -FULLVERSION = version compl\u00E8te de schemagen "2.3.0-SNAPSHOT" +FULLVERSION = version compl\u00E8te de schemagen "2.3.0-b170215.1712" USAGE = Syntaxe : schemagen [-options ...] \nOptions : \n\ \ \ \ -d : indiquez o\u00F9 placer les fichiers de classe g\u00E9n\u00E9r\u00E9s par le processeur et le compilateur javac\n\ \ \ \ -cp : indiquez o\u00F9 trouver les fichiers sp\u00E9cifi\u00E9s par l'utilisateur\n\ \ \ \ -classpath : indiquez o\u00F9 trouver les fichiers sp\u00E9cifi\u00E9s par l'utilisateur\n\ \ \ \ -encoding : indiquez l'encodage \u00E0 utiliser pour l'appel de javac/traitement de l'annotation \n\ \ \ \ -episode : g\u00E9n\u00E9rez un fichier d'\u00E9pisode pour la compilation s\u00E9par\u00E9e\n\ \ \ \ -version : affichez les informations de version\n\ \ \ \ -fullversion : affichez les informations compl\u00E8tes de version\n\ \ \ \ -help : affichez ce message de syntaxe diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_it.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_it.properties index c7ef575e06e..00fe597645f 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_it.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_it.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = {0} imprevisto visualizzato sulla riga {1} colonna {2} BASEDIR_DOESNT_EXIST = Directory non esistente: {0} -VERSION = schemagen 2.3.0-SNAPSHOT +VERSION = schemagen 2.3.0-b170215.1712 -FULLVERSION = versione completa schemagen "2.3.0-SNAPSHOT" +FULLVERSION = versione completa schemagen "2.3.0-b170215.1712" USAGE = Uso: schemagen [-options ...] \nOpzioni: \n\ \ \ \ -d : specifica dove posizionare il processore e i file della classe generata javac\n\ \ \ \ -cp : specifica dove trovare i file specificati dall'utente\n\ \ \ \ -classpath : specifica dove trovare i file specificati dall'utente\n\ \ \ \ -encoding : specifica la codifica da usare per l'elaborazione dell'annotazione/richiamo javac \n\ \ \ \ -episode : genera il file di episodio per la compilazione separata\n\ \ \ \ -version : visualizza le informazioni sulla versione\n\ \ \ \ -fullversion : visualizza le informazioni sulla versione completa\n\ \ \ \ -help : visualizza questo messaggio sull'uso diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties index e07c234ff85..638e47d9ce5 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = \u4E88\u671F\u3057\u306A\u3044{0}\u304C\u884C{1}\u3001\u BASEDIR_DOESNT_EXIST = \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {0} -VERSION = schemagen 2.3.0-SNAPSHOT +VERSION = schemagen 2.3.0-b170215.1712 -FULLVERSION = schemagen\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.3.0-SNAPSHOT" +FULLVERSION = schemagen\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.3.0-b170215.1712" USAGE = \u4F7F\u7528\u65B9\u6CD5: schemagen [-options ...] \n\u30AA\u30D7\u30B7\u30E7\u30F3: \n\ \ \ \ -d : \u30D7\u30ED\u30BB\u30C3\u30B5\u304A\u3088\u3073javac\u304C\u751F\u6210\u3057\u305F\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u7F6E\u304F\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -cp : \u30E6\u30FC\u30B6\u30FC\u304C\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -classpath : \u30E6\u30FC\u30B6\u30FC\u304C\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -encoding : \u6CE8\u91C8\u51E6\u7406/javac\u547C\u51FA\u3057\u306B\u4F7F\u7528\u3059\u308B\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -episode : \u30B3\u30F3\u30D1\u30A4\u30EB\u3054\u3068\u306B\u30A8\u30D4\u30BD\u30FC\u30C9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u3057\u307E\u3059\n\ \ \ \ -version : \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\n\ \ \ \ -fullversion : \u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\n\ \ \ \ -help : \u3053\u306E\u4F7F\u7528\u4F8B\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3057\u307E\u3059 diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties index f4e5fa4d62e..416931124b3 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = \uC608\uC0C1\uCE58 \uC54A\uC740 {0}\uC774(\uAC00) {1}\uD BASEDIR_DOESNT_EXIST = \uC874\uC7AC\uD558\uC9C0 \uC54A\uB294 \uB514\uB809\uD1A0\uB9AC: {0} -VERSION = schemagen 2.3.0-SNAPSHOT +VERSION = schemagen 2.3.0-b170215.1712 -FULLVERSION = schemagen \uC815\uC2DD \uBC84\uC804 "2.3.0-SNAPSHOT" +FULLVERSION = schemagen \uC815\uC2DD \uBC84\uC804 "2.3.0-b170215.1712" USAGE = \uC0AC\uC6A9\uBC95: schemagen [-options ...] \n\uC635\uC158: \n\ \ \ \ -d : \uD504\uB85C\uC138\uC11C \uBC0F javac\uC5D0\uC11C \uC0DD\uC131\uD55C \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uBC30\uCE58\uD560 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -cp : \uC0AC\uC6A9\uC790\uAC00 \uC9C0\uC815\uD55C \uD30C\uC77C\uC744 \uCC3E\uC744 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -classpath : \uC0AC\uC6A9\uC790\uAC00 \uC9C0\uC815\uD55C \uD30C\uC77C\uC744 \uCC3E\uC744 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -encoding : \uC8FC\uC11D \uCC98\uB9AC/javac \uD638\uCD9C\uC5D0 \uC0AC\uC6A9\uD560 \uC778\uCF54\uB529\uC744 \uC9C0\uC815\uD569\uB2C8\uB2E4. \n\ \ \ \ -episode : \uBCC4\uB3C4 \uCEF4\uD30C\uC77C\uC744 \uC704\uD574 episode \uD30C\uC77C\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4.\n\ \ \ \ -version : \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n\ \ \ \ -fullversion : \uC815\uC2DD \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n\ \ \ \ -help : \uC774 \uC0AC\uC6A9\uBC95 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4. diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties index d56ca3894d5..6da2bc93337 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = {0} inesperado aparece na linha {1} coluna {2} BASEDIR_DOESNT_EXIST = Diret\u00F3rio n\u00E3o existente: {0} -VERSION = gera\u00E7\u00E3o do esquema 2.3.0-SNAPSHOT +VERSION = gera\u00E7\u00E3o do esquema 2.3.0-b170215.1712 -FULLVERSION = vers\u00E3o completa da gera\u00E7\u00E3o do esquema "2.3.0-SNAPSHOT" +FULLVERSION = vers\u00E3o completa da gera\u00E7\u00E3o do esquema "2.3.0-b170215.1712" USAGE = Uso: gera\u00E7\u00E3o do esquema [-options ...] \nOp\u00E7\u00F5es: \n\\ \\ \\ \\ -d : especificar onde colocar o processador e os arquivos da classe gerados por javac\n\\ \\ \\ \\ -cp : especificar onde localizar arquivos especificados pelo usu\u00E1rio\n\\ \\ \\ \\ -classpath : especificar onde localizar os arquivos especificados pelo usu\u00E1rio\n\\ \\ \\ \\ -encoding : especificar codifica\u00E7\u00E3o a ser usada para processamento de anota\u00E7\u00E3o/chamada javac \n\\ \\ \\ \\ -episode : gerar arquivo do epis\u00F3dio para compila\u00E7\u00E3o separada\n\\ \\ \\ \\ -version : exibir informa\u00E7\u00F5es da vers\u00E3o\n\\ \\ \\ \\ -fullversion : exibir informa\u00E7\u00F5es da vers\u00E3o completa\n\\ \\ \\ \\ -help : exibir esta mensagem de uso diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties index c1be9f0f704..beed169c9ae 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = \u5728\u7B2C {1} \u884C, \u7B2C {2} \u5217\u51FA\u73B0\u BASEDIR_DOESNT_EXIST = \u4E0D\u5B58\u5728\u7684\u76EE\u5F55: {0} -VERSION = schemagen 2.3.0-SNAPSHOT +VERSION = schemagen 2.3.0-b170215.1712 -FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.3.0-SNAPSHOT" +FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.3.0-b170215.1712" USAGE = \u7528\u6CD5: schemagen [-options ...] \n\u9009\u9879: \n\ \ \ \ -d : \u6307\u5B9A\u653E\u7F6E\u5904\u7406\u7A0B\u5E8F\u548C javac \u751F\u6210\u7684\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -cp : \u6307\u5B9A\u67E5\u627E\u7528\u6237\u6307\u5B9A\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -classpath : \u6307\u5B9A\u67E5\u627E\u7528\u6237\u6307\u5B9A\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -encoding : \u6307\u5B9A\u7528\u4E8E\u6CE8\u91CA\u5904\u7406/javac \u8C03\u7528\u7684\u7F16\u7801\n\ \ \ \ -episode : \u751F\u6210\u7247\u6BB5\u6587\u4EF6\u4EE5\u4F9B\u5355\u72EC\u7F16\u8BD1\n\ \ \ \ -version : \u663E\u793A\u7248\u672C\u4FE1\u606F\n\ \ \ \ -fullversion : \u663E\u793A\u5B8C\u6574\u7684\u7248\u672C\u4FE1\u606F\n\ \ \ \ -help : \u663E\u793A\u6B64\u7528\u6CD5\u6D88\u606F diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties index dcd7976be7c..01744696586 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = \u672A\u9810\u671F\u7684 {0} \u986F\u793A\u65BC\u884C {1 BASEDIR_DOESNT_EXIST = \u4E0D\u5B58\u5728\u7684\u76EE\u9304: {0} -VERSION = schemagen 2.3.0-SNAPSHOT +VERSION = schemagen 2.3.0-b170215.1712 -FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.3.0-SNAPSHOT" +FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.3.0-b170215.1712" USAGE = \u7528\u6CD5: schemagen [-options ...] \n\u9078\u9805: \n\\ \\ \\ \\ -d : \u6307\u5B9A\u8655\u7406\u5668\u4EE5\u53CA javac \u7522\u751F\u7684\u985E\u5225\u6A94\u6848\u653E\u7F6E\u4F4D\u7F6E\n\\ \\ \\ \\ -cp : \u6307\u5B9A\u8981\u5C0B\u627E\u4F7F\u7528\u8005\u6307\u5B9A\u6A94\u6848\u7684\u4F4D\u7F6E\n\\ \\ \\ \\ -classpath : \u6307\u5B9A\u8981\u5C0B\u627E\u4F7F\u7528\u8005\u6307\u5B9A\u6A94\u6848\u7684\u4F4D\u7F6E\n\\ \\ \\ \\ -encoding : \u6307\u5B9A\u8981\u7528\u65BC\u8A3B\u89E3\u8655\u7406/javac \u547C\u53EB\u7684\u7DE8\u78BC \n\\ \\ \\ \\ -episode : \u7522\u751F\u7368\u7ACB\u7DE8\u8B6F\u7684\u4E8B\u4EF6 (episode) \u6A94\u6848\n\\ \\ \\ \\ -version : \u986F\u793A\u7248\u672C\u8CC7\u8A0A\n\\ \\ \\ \\ -fullversion : \u986F\u793A\u5B8C\u6574\u7248\u672C\u8CC7\u8A0A\n\\ \\ \\ \\ -help : \u986F\u793A\u6B64\u7528\u6CD5\u8A0A\u606F diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/package-info.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/package-info.java new file mode 100644 index 00000000000..52b29b23e93 --- /dev/null +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/package-info.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Annotation Processing related code. + * + * This package hosts a driver that runs annotation processing for java-to-schema processing, + * and additional implementations that deal primarily with AP. + */ +package com.sun.tools.internal.jxc.ap; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/package.html b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/package.html deleted file mode 100644 index 8f893b55ef2..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ap/package.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - Annotation Processing related code. - - This package hosts a driver that runs annotation processing for java-to-schema processing, - and additional implementations that deal primarily with AP. - - diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/CatalogUtil.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/CatalogUtil.java new file mode 100644 index 00000000000..0d3dbc5839f --- /dev/null +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/CatalogUtil.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.tools.internal.xjc; + +import java.io.File; +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import javax.xml.catalog.CatalogFeatures; +import javax.xml.catalog.CatalogFeatures.Feature; +import javax.xml.catalog.CatalogManager; +import org.xml.sax.EntityResolver; + +/** + * + * @author lukas + */ +final class CatalogUtil { + + // Cache CatalogFeatures instance for future usages. + // Resolve feature is set to "continue" value for backward compatibility. + private static final CatalogFeatures CATALOG_FEATURES = CatalogFeatures.builder() + .with(Feature.RESOLVE, "continue") + .build(); + + static EntityResolver getCatalog(EntityResolver entityResolver, File catalogFile, ArrayList catalogUrls) throws IOException { + return CatalogManager.catalogResolver( + CATALOG_FEATURES, catalogUrls.stream().toArray(URI[]::new)); + } +} diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle.properties index 6a418f594ad..fa3f5b2f8f3 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -173,20 +173,20 @@ Driver.CompilingSchema = \ Driver.FailedToGenerateCode = \ Failed to produce code. -# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn +# DO NOT localize the 2.3.0-b170215.1712 string - it is a token for an mvn Driver.FilePrologComment = \ - This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0-SNAPSHOT \n\ + This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0-b170215.1712 \n\ See https://jaxb.java.net/ \n\ Any modifications to this file will be lost upon recompilation of the source schema. \n\ Generated on: {0} \n Driver.Version = \ - xjc 2.3.0-SNAPSHOT + xjc 2.3.0-b170215.1712 Driver.FullVersion = \ - xjc full version "2.3.0-SNAPSHOT" + xjc full version "2.3.0-b170215.1712" -Driver.BuildID = 2.3.0-SNAPSHOT +Driver.BuildID = 2.3.0-b170215.1712 # for JDK integration - include version in source zip jaxb.jdk.version=@@JAXB_JDK_VERSION@@ diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_de.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_de.properties index 7d645e92472..57e1bb38224 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_de.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -127,14 +127,14 @@ Driver.CompilingSchema = Ein Schema wird kompiliert ... Driver.FailedToGenerateCode = Code konnte nicht erzeugt werden. -# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn -Driver.FilePrologComment = Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0-SNAPSHOT generiert \nSiehe https://jaxb.java.net/ \n\u00c4nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren. \nGeneriert: {0} \n +# DO NOT localize the 2.3.0-b170215.1712 string - it is a token for an mvn +Driver.FilePrologComment = Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0-b170215.1712 generiert \nSiehe https://jaxb.java.net/ \n\u00c4nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren. \nGeneriert: {0} \n -Driver.Version = xjc 2.3.0-SNAPSHOT +Driver.Version = xjc 2.3.0-b170215.1712 -Driver.FullVersion = xjc vollst\u00E4ndige Version "2.3.0-SNAPSHOT" +Driver.FullVersion = xjc vollst\u00E4ndige Version "2.3.0-b170215.1712" -Driver.BuildID = 2.3.0-SNAPSHOT +Driver.BuildID = 2.3.0-b170215.1712 # for JDK integration - include version in source zip jaxb.jdk.version=@@JAXB_JDK_VERSION@@ diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_es.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_es.properties index e7196a558f3..63de1fab45b 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_es.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_es.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -127,14 +127,14 @@ Driver.CompilingSchema = Compilando un esquema... Driver.FailedToGenerateCode = Fallo al producir c\u00f3digo. -# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn -Driver.FilePrologComment = Este archivo ha sido generado por la arquitectura JavaTM para la implantaci\u00f3n de la referencia de enlace (JAXB) XML v2.3.0-SNAPSHOT \nVisite https://jaxb.java.net/ \nTodas las modificaciones realizadas en este archivo se perder\u00e1n si se vuelve a compilar el esquema de origen. \nGenerado el: {0} \n +# DO NOT localize the 2.3.0-b170215.1712 string - it is a token for an mvn +Driver.FilePrologComment = Este archivo ha sido generado por la arquitectura JavaTM para la implantaci\u00f3n de la referencia de enlace (JAXB) XML v2.3.0-b170215.1712 \nVisite https://jaxb.java.net/ \nTodas las modificaciones realizadas en este archivo se perder\u00e1n si se vuelve a compilar el esquema de origen. \nGenerado el: {0} \n -Driver.Version = xjc 2.3.0-SNAPSHOT +Driver.Version = xjc 2.3.0-b170215.1712 -Driver.FullVersion = versi\u00F3n completa de xjc "2.3.0-SNAPSHOT" +Driver.FullVersion = versi\u00F3n completa de xjc "2.3.0-b170215.1712" -Driver.BuildID = 2.3.0-SNAPSHOT +Driver.BuildID = 2.3.0-b170215.1712 # for JDK integration - include version in source zip jaxb.jdk.version=@@JAXB_JDK_VERSION@@ diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties index 6a1719d4042..5ad5ff87055 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -131,14 +131,14 @@ Driver.CompilingSchema = compilation d'un sch\u00e9ma... Driver.FailedToGenerateCode = Echec de la production du code. -# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn -Driver.FilePrologComment = Ce fichier a \u00e9t\u00e9 g\u00e9n\u00e9r\u00e9 par l''impl\u00e9mentation de r\u00e9f\u00e9rence JavaTM Architecture for XML Binding (JAXB), v2.3.0-SNAPSHOT \nVoir https://jaxb.java.net/ \nToute modification apport\u00e9e \u00e0 ce fichier sera perdue lors de la recompilation du sch\u00e9ma source. \nG\u00e9n\u00e9r\u00e9 le : {0} \n +# DO NOT localize the 2.3.0-b170215.1712 string - it is a token for an mvn +Driver.FilePrologComment = Ce fichier a \u00e9t\u00e9 g\u00e9n\u00e9r\u00e9 par l''impl\u00e9mentation de r\u00e9f\u00e9rence JavaTM Architecture for XML Binding (JAXB), v2.3.0-b170215.1712 \nVoir https://jaxb.java.net/ \nToute modification apport\u00e9e \u00e0 ce fichier sera perdue lors de la recompilation du sch\u00e9ma source. \nG\u00e9n\u00e9r\u00e9 le : {0} \n -Driver.Version = xjc 2.3.0-SNAPSHOT +Driver.Version = xjc 2.3.0-b170215.1712 -Driver.FullVersion = version compl\u00E8te xjc "2.3.0-SNAPSHOT" +Driver.FullVersion = version compl\u00E8te xjc "2.3.0-b170215.1712" -Driver.BuildID = 2.3.0-SNAPSHOT +Driver.BuildID = 2.3.0-b170215.1712 # for JDK integration - include version in source zip jaxb.jdk.version=@@JAXB_JDK_VERSION@@ diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_it.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_it.properties index a1762e7b93d..9d00dd77f4e 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_it.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_it.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -127,14 +127,14 @@ Driver.CompilingSchema = compilazione di uno schema in corso... Driver.FailedToGenerateCode = Produzione del codice non riuscita. -# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn -Driver.FilePrologComment = Questo file \u00e8 stato generato dall''architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.3.0-SNAPSHOT \nVedere https://jaxb.java.net/ \nQualsiasi modifica a questo file andr\u00e0 persa durante la ricompilazione dello schema di origine. \nGenerato il: {0} \n +# DO NOT localize the 2.3.0-b170215.1712 string - it is a token for an mvn +Driver.FilePrologComment = Questo file \u00e8 stato generato dall''architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.3.0-b170215.1712 \nVedere https://jaxb.java.net/ \nQualsiasi modifica a questo file andr\u00e0 persa durante la ricompilazione dello schema di origine. \nGenerato il: {0} \n -Driver.Version = xjc 2.3.0-SNAPSHOT +Driver.Version = xjc 2.3.0-b170215.1712 -Driver.FullVersion = versione completa xjc "2.3.0-SNAPSHOT" +Driver.FullVersion = versione completa xjc "2.3.0-b170215.1712" -Driver.BuildID = 2.3.0-SNAPSHOT +Driver.BuildID = 2.3.0-b170215.1712 # for JDK integration - include version in source zip jaxb.jdk.version=@@JAXB_JDK_VERSION@@ diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties index abdf441ddf4..c7a60c6e59a 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -127,14 +127,14 @@ Driver.CompilingSchema = \u30b9\u30ad\u30fc\u30de\u306e\u30b3\u30f3\u30d1\u30a4\ Driver.FailedToGenerateCode = \u30b3\u30fc\u30c9\u306e\u751f\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 -# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn -Driver.FilePrologComment = \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001JavaTM Architecture for XML Binding(JAXB) Reference Implementation\u3001v2.3.0-SNAPSHOT\u306b\u3088\u3063\u3066\u751f\u6210\u3055\u308c\u307e\u3057\u305f \nhttps://jaxb.java.net/\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044 \n\u30bd\u30fc\u30b9\u30fb\u30b9\u30ad\u30fc\u30de\u306e\u518d\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4\u306f\u5931\u308f\u308c\u307e\u3059\u3002 \n\u751f\u6210\u65e5: {0} \n +# DO NOT localize the 2.3.0-b170215.1712 string - it is a token for an mvn +Driver.FilePrologComment = \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001JavaTM Architecture for XML Binding(JAXB) Reference Implementation\u3001v2.3.0-b170215.1712\u306b\u3088\u3063\u3066\u751f\u6210\u3055\u308c\u307e\u3057\u305f \nhttps://jaxb.java.net/\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044 \n\u30bd\u30fc\u30b9\u30fb\u30b9\u30ad\u30fc\u30de\u306e\u518d\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4\u306f\u5931\u308f\u308c\u307e\u3059\u3002 \n\u751f\u6210\u65e5: {0} \n -Driver.Version = xjc 2.3.0-SNAPSHOT +Driver.Version = xjc 2.3.0-b170215.1712 -Driver.FullVersion = xjc\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.3.0-SNAPSHOT" +Driver.FullVersion = xjc\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.3.0-b170215.1712" -Driver.BuildID = 2.3.0-SNAPSHOT +Driver.BuildID = 2.3.0-b170215.1712 # for JDK integration - include version in source zip jaxb.jdk.version=@@JAXB_JDK_VERSION@@ diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties index d129d33031c..31018022265 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -127,14 +127,14 @@ Driver.CompilingSchema = \uc2a4\ud0a4\ub9c8\ub97c \ucef4\ud30c\uc77c\ud558\ub294 Driver.FailedToGenerateCode = \ucf54\ub4dc \uc0dd\uc131\uc744 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4. -# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn -Driver.FilePrologComment = \uc774 \ud30c\uc77c\uc740 JAXB(JavaTM Architecture for XML Binding) \ucc38\uc870 \uad6c\ud604 2.3.0-SNAPSHOT \ubc84\uc804\uc744 \ud1b5\ud574 \uc0dd\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \nhttps://jaxb.java.net/\ub97c \ucc38\uc870\ud558\uc2ed\uc2dc\uc624. \n\uc774 \ud30c\uc77c\uc744 \uc218\uc815\ud558\uba74 \uc18c\uc2a4 \uc2a4\ud0a4\ub9c8\ub97c \uc7ac\ucef4\ud30c\uc77c\ud560 \ub54c \uc218\uc815 \uc0ac\ud56d\uc774 \uc190\uc2e4\ub429\ub2c8\ub2e4. \n\uc0dd\uc131 \ub0a0\uc9dc: {0} \n +# DO NOT localize the 2.3.0-b170215.1712 string - it is a token for an mvn +Driver.FilePrologComment = \uc774 \ud30c\uc77c\uc740 JAXB(JavaTM Architecture for XML Binding) \ucc38\uc870 \uad6c\ud604 2.3.0-b170215.1712 \ubc84\uc804\uc744 \ud1b5\ud574 \uc0dd\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \nhttps://jaxb.java.net/\ub97c \ucc38\uc870\ud558\uc2ed\uc2dc\uc624. \n\uc774 \ud30c\uc77c\uc744 \uc218\uc815\ud558\uba74 \uc18c\uc2a4 \uc2a4\ud0a4\ub9c8\ub97c \uc7ac\ucef4\ud30c\uc77c\ud560 \ub54c \uc218\uc815 \uc0ac\ud56d\uc774 \uc190\uc2e4\ub429\ub2c8\ub2e4. \n\uc0dd\uc131 \ub0a0\uc9dc: {0} \n -Driver.Version = XJC 2.3.0-SNAPSHOT +Driver.Version = XJC 2.3.0-b170215.1712 -Driver.FullVersion = XJC \uC815\uC2DD \uBC84\uC804 "2.3.0-SNAPSHOT" +Driver.FullVersion = XJC \uC815\uC2DD \uBC84\uC804 "2.3.0-b170215.1712" -Driver.BuildID = 2.3.0-SNAPSHOT +Driver.BuildID = 2.3.0-b170215.1712 # for JDK integration - include version in source zip jaxb.jdk.version=@@JAXB_JDK_VERSION@@ diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties index 58083953f6d..71c827a099b 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -127,14 +127,14 @@ Driver.CompilingSchema = compilando um esquema... Driver.FailedToGenerateCode = Falha ao produzir o c\u00f3digo. -# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn -Driver.FilePrologComment = Este arquivo foi gerado pela Arquitetura JavaTM para Implementa\u00e7\u00e3o de Refer\u00eancia (JAXB) de Bind XML, v2.3.0-SNAPSHOT \nConsulte https://jaxb.java.net/ \nTodas as modifica\u00e7\u00f5es neste arquivo ser\u00e3o perdidas ap\u00f3s a recompila\u00e7\u00e3o do esquema de origem. \nGerado em: {0} \n +# DO NOT localize the 2.3.0-b170215.1712 string - it is a token for an mvn +Driver.FilePrologComment = Este arquivo foi gerado pela Arquitetura JavaTM para Implementa\u00e7\u00e3o de Refer\u00eancia (JAXB) de Bind XML, v2.3.0-b170215.1712 \nConsulte https://jaxb.java.net/ \nTodas as modifica\u00e7\u00f5es neste arquivo ser\u00e3o perdidas ap\u00f3s a recompila\u00e7\u00e3o do esquema de origem. \nGerado em: {0} \n -Driver.Version = xjc 2.3.0-SNAPSHOT +Driver.Version = xjc 2.3.0-b170215.1712 -Driver.FullVersion = vers\u00E3o completa de xjc "2.3.0-SNAPSHOT" +Driver.FullVersion = vers\u00E3o completa de xjc "2.3.0-b170215.1712" -Driver.BuildID = 2.3.0-SNAPSHOT +Driver.BuildID = 2.3.0-b170215.1712 # for JDK integration - include version in source zip jaxb.jdk.version=@@JAXB_JDK_VERSION@@ diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties index 34397261515..efd45c540e8 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -131,14 +131,14 @@ Driver.CompilingSchema = \u6b63\u5728\u7f16\u8bd1\u6a21\u5f0f... Driver.FailedToGenerateCode = \u65e0\u6cd5\u751f\u6210\u4ee3\u7801\u3002 -# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn -Driver.FilePrologComment = \u6b64\u6587\u4ef6\u662f\u7531 JavaTM Architecture for XML Binding (JAXB) \u5f15\u7528\u5b9e\u73b0 v2.3.0-SNAPSHOT \u751f\u6210\u7684\n\u8bf7\u8bbf\u95ee https://jaxb.java.net/ \n\u5728\u91cd\u65b0\u7f16\u8bd1\u6e90\u6a21\u5f0f\u65f6, \u5bf9\u6b64\u6587\u4ef6\u7684\u6240\u6709\u4fee\u6539\u90fd\u5c06\u4e22\u5931\u3002\n\u751f\u6210\u65f6\u95f4: {0} \n +# DO NOT localize the 2.3.0-b170215.1712 string - it is a token for an mvn +Driver.FilePrologComment = \u6b64\u6587\u4ef6\u662f\u7531 JavaTM Architecture for XML Binding (JAXB) \u5f15\u7528\u5b9e\u73b0 v2.3.0-b170215.1712 \u751f\u6210\u7684\n\u8bf7\u8bbf\u95ee https://jaxb.java.net/ \n\u5728\u91cd\u65b0\u7f16\u8bd1\u6e90\u6a21\u5f0f\u65f6, \u5bf9\u6b64\u6587\u4ef6\u7684\u6240\u6709\u4fee\u6539\u90fd\u5c06\u4e22\u5931\u3002\n\u751f\u6210\u65f6\u95f4: {0} \n -Driver.Version = xjc 2.3.0-SNAPSHOT +Driver.Version = xjc 2.3.0-b170215.1712 -Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.3.0-SNAPSHOT" +Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.3.0-b170215.1712" -Driver.BuildID = 2.3.0-SNAPSHOT +Driver.BuildID = 2.3.0-b170215.1712 # for JDK integration - include version in source zip jaxb.jdk.version=@@JAXB_JDK_VERSION@@ diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties index 2685c64a2bf..4889fc512ae 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -127,14 +127,14 @@ Driver.CompilingSchema = \u6b63\u5728\u7de8\u8b6f\u7db1\u8981... Driver.FailedToGenerateCode = \u7121\u6cd5\u7522\u751f\u7a0b\u5f0f\u78bc. -# DO NOT localize the 2.3.0-SNAPSHOT string - it is a token for an mvn -Driver.FilePrologComment = \u6b64\u6a94\u6848\u662f\u7531 JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0-SNAPSHOT \u6240\u7522\u751f \n\u8acb\u53c3\u95b1 https://jaxb.java.net/ \n\u4e00\u65e6\u91cd\u65b0\u7de8\u8b6f\u4f86\u6e90\u7db1\u8981, \u5c0d\u6b64\u6a94\u6848\u6240\u505a\u7684\u4efb\u4f55\u4fee\u6539\u90fd\u5c07\u6703\u907a\u5931. \n\u7522\u751f\u6642\u9593: {0} \n +# DO NOT localize the 2.3.0-b170215.1712 string - it is a token for an mvn +Driver.FilePrologComment = \u6b64\u6a94\u6848\u662f\u7531 JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0-b170215.1712 \u6240\u7522\u751f \n\u8acb\u53c3\u95b1 https://jaxb.java.net/ \n\u4e00\u65e6\u91cd\u65b0\u7de8\u8b6f\u4f86\u6e90\u7db1\u8981, \u5c0d\u6b64\u6a94\u6848\u6240\u505a\u7684\u4efb\u4f55\u4fee\u6539\u90fd\u5c07\u6703\u907a\u5931. \n\u7522\u751f\u6642\u9593: {0} \n -Driver.Version = xjc 2.3.0-SNAPSHOT +Driver.Version = xjc 2.3.0-b170215.1712 -Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.3.0-SNAPSHOT" +Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.3.0-b170215.1712" -Driver.BuildID = 2.3.0-SNAPSHOT +Driver.BuildID = 2.3.0-b170215.1712 # for JDK integration - include version in source zip jaxb.jdk.version=@@JAXB_JDK_VERSION@@ diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Options.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Options.java index 10c1bda5157..e1603cb9aaa 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Options.java +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Options.java @@ -25,6 +25,27 @@ package com.sun.tools.internal.xjc; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLClassLoader; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.Enumeration; +import java.util.HashSet; +import java.util.List; +import java.util.ServiceLoader; +import java.util.Set; + import com.sun.codemodel.internal.CodeWriter; import com.sun.codemodel.internal.JPackage; import com.sun.codemodel.internal.JResourceFile; @@ -37,40 +58,16 @@ import com.sun.tools.internal.xjc.generator.bean.field.FieldRendererFactory; import com.sun.tools.internal.xjc.model.Model; import com.sun.tools.internal.xjc.reader.Util; import com.sun.xml.internal.bind.api.impl.NameConverter; -import org.xml.sax.EntityResolver; -import org.xml.sax.InputSource; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.net.MalformedURLException; import java.net.URI; import java.net.URISyntaxException; -import java.net.URL; -import java.net.URLClassLoader; import java.nio.charset.Charset; import java.nio.charset.IllegalCharsetNameException; -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.Enumeration; -import java.util.HashSet; -import java.util.List; import java.util.Locale; -import java.util.ServiceLoader; -import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; -import javax.xml.catalog.CatalogFeatures; -import javax.xml.catalog.CatalogFeatures.Feature; -import javax.xml.catalog.CatalogManager; +import org.xml.sax.EntityResolver; +import org.xml.sax.InputSource; /** * Global options. @@ -181,7 +178,7 @@ public class Options public File targetDir = new File("."); /** - * Actually stores {@link CatalogResolver}, but the field + * On JDK 8 an odler stores {@code CatalogResolver}, but the field * type is made to {@link EntityResolver} so that XJC can be * used even if resolver.jar is not available in the classpath. */ @@ -208,9 +205,9 @@ public class Options /** * Input schema files as a list of {@link InputSource}s. */ - private final List grammars = new ArrayList(); + private final List grammars = new ArrayList<>(); - private final List bindFiles = new ArrayList(); + private final List bindFiles = new ArrayList<>(); // Proxy setting. private String proxyHost = null; @@ -220,7 +217,7 @@ public class Options /** * {@link Plugin}s that are enabled in this compilation. */ - public final List activePlugins = new ArrayList(); + public final List activePlugins = new ArrayList<>(); /** * All discovered {@link Plugin}s. @@ -233,7 +230,7 @@ public class Options /** * Set of URIs that plug-ins recognize as extension bindings. */ - public final Set pluginURIs = new HashSet(); + public final Set pluginURIs = new HashSet<>(); /** * This allocator has the final say on deciding the class name. @@ -357,6 +354,7 @@ public class Options * A plugins are enumerated when this method is called for the first time, * by taking {@link #classpaths} into account. That means * "-cp plugin.jar" has to come before you specify options to enable it. + * @return */ public List getAllPlugins() { if(allPlugins==null) { @@ -375,13 +373,15 @@ public class Options this.schemaLanguage = _schemaLanguage; } - /** Input schema files. */ + /** Input schema files. + * @return */ public InputSource[] getGrammars() { return grammars.toArray(new InputSource[grammars.size()]); } /** * Adds a new input schema. + * @param is */ public void addGrammar( InputSource is ) { grammars.add(absolutize(is)); @@ -402,6 +402,7 @@ public class Options /** * Recursively scan directories and add all XSD files in it. + * @param dir */ public void addGrammarRecursive( File dir ) { addRecursive(dir,".xsd",grammars); @@ -432,13 +433,15 @@ public class Options return is; } - /** Input external binding files. */ + /** Input external binding files. + * @return */ public InputSource[] getBindFiles() { return bindFiles.toArray(new InputSource[bindFiles.size()]); } /** * Adds a new binding file. + * @param is */ public void addBindFile( InputSource is ) { bindFiles.add(absolutize(is)); @@ -446,6 +449,7 @@ public class Options /** * Adds a new binding file. + * @param bindFile */ public void addBindFile( File bindFile ) { bindFiles.add(fileToInputSource(bindFile)); @@ -453,15 +457,18 @@ public class Options /** * Recursively scan directories and add all ".xjb" files in it. + * @param dir */ public void addBindFileRecursive( File dir ) { addRecursive(dir,".xjb",bindFiles); } - public final List classpaths = new ArrayList(); + public final List classpaths = new ArrayList<>(); /** * Gets a classLoader that can load classes specified via the * -classpath option. + * @param parent + * @return */ public ClassLoader getUserClassLoader( ClassLoader parent ) { if (classpaths.isEmpty()) @@ -482,6 +489,8 @@ public class Options * Parses an option {@code args[i]} and return * the number of tokens consumed. * + * @param args + * @param i * @return * 0 if the argument is not understood. Returning 0 * will let the caller report an error. @@ -610,10 +619,8 @@ public class Options Messages.format(Messages.NO_SUCH_FILE,file)); } - try { - BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file),"UTF-8")); + try (BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file),"UTF-8"))) { parseProxy(in.readLine()); - in.close(); } catch (IOException e) { throw new BadCommandLineException( Messages.format(Messages.FAILED_TO_PARSE,file,e.getMessage()),e); @@ -639,7 +646,9 @@ public class Options return 2; } if( args[i].equals("-catalog") ) { - // use javax.xml.catalog to resolve external entities. + // use Sun's "XML Entity and URI Resolvers" by Norman Walsh + // to resolve external entities. + // https://xerces.apache.org/xml-commons/components/resolver/resolver-article.html File catalogFile = new File(requireArgument("-catalog",args,++i)); try { @@ -652,6 +661,7 @@ public class Options } if( args[i].equals("-Xtest-class-name-allocator") ) { classNameAllocator = new ClassNameAllocator() { + @Override public String assignClassName(String packageName, String className) { System.out.printf("assignClassName(%s,%s)\n",packageName,className); return className+"_Type"; @@ -736,6 +746,11 @@ public class Options /** * Obtains an operand and reports an error if it's not there. + * @param optionName + * @param args + * @param i + * @return + * @throws com.sun.tools.internal.xjc.BadCommandLineException */ public String requireArgument(String optionName, String[] args, int i) throws BadCommandLineException { if (i == args.length || args[i].startsWith("-")) { @@ -773,34 +788,27 @@ public class Options } } - /** - * Adds a new catalog file. - */ - public void addCatalog(File catalogFile) throws IOException { - URI newUrl = catalogFile.toURI(); - if (!catalogUrls.contains(newUrl)) { - catalogUrls.add(newUrl); - } - try { - entityResolver = CatalogManager.catalogResolver(catalogFeatures, - catalogUrls.stream().toArray(URI[]::new)); - } catch (Exception ex) { - entityResolver = null; - } - } - // Since javax.xml.catalog is unmodifiable we need to track catalog // URLs added and create new catalog each time addCatalog is called private final ArrayList catalogUrls = new ArrayList<>(); - // Cache CatalogFeatures instance for future usages. - // Resolve feature is set to "continue" value for backward compatibility. - private static CatalogFeatures catalogFeatures = CatalogFeatures.builder() - .with(Feature.RESOLVE, "continue") - .build(); + /** + * Adds a new catalog file.Use created or existed resolver to parse new catalog file. + * @param catalogFile + * @throws java.io.IOException + */ + public void addCatalog(File catalogFile) throws IOException { + URI newUri = catalogFile.toURI(); + if (!catalogUrls.contains(newUri)) { + catalogUrls.add(newUri); + } + entityResolver = CatalogUtil.getCatalog(entityResolver, catalogFile, catalogUrls); + } + /** * Parses arguments and fill fields of this object. * + * @param args * @exception BadCommandLineException * thrown when there's a problem in the command-line arguments */ @@ -861,6 +869,8 @@ public class Options /** * Finds the {@code META-INF/sun-jaxb.episode} file to add as a binding customization. + * @param jar + * @throws com.sun.tools.internal.xjc.BadCommandLineException */ public void scanEpisodeFile(File jar) throws BadCommandLineException { try { @@ -879,6 +889,7 @@ public class Options /** * Guesses the schema language. + * @return */ public Language guessSchemaLanguage() { @@ -899,6 +910,8 @@ public class Options /** * Creates a configured CodeWriter that produces files into the specified directory. + * @return + * @throws java.io.IOException */ public CodeWriter createCodeWriter() throws IOException { return createCodeWriter(new FileCodeWriter( targetDir, readOnly, encoding )); @@ -906,6 +919,8 @@ public class Options /** * Creates a configured CodeWriter that produces files into the specified directory. + * @param core + * @return */ public CodeWriter createCodeWriter( CodeWriter core ) { if(noFileHeader) @@ -915,8 +930,8 @@ public class Options } /** - * Gets the string suitable to be used as the prolog comment baked into artifacts. - * This is the string like "This file was generated by the JAXB RI on YYYY/mm/dd..." + * Gets the string suitable to be used as the prolog comment baked into artifacts.This is the string like "This file was generated by the JAXB RI on YYYY/mm/dd..." + * @return */ public String getPrologComment() { // generate format syntax: 'at'

      + * This package provides a way to invoke XJC from within another program. The primary target of this API is the JAX-WS + * RI, but we hope that this API would be useful for other integration purposes as well. + * + *

      Getting Started: Using XJC

      + *

      + * To invoke XJC, a typical client would do something like this: + *

      + *    SchemaCompiler sc = XJC.createSchemaCompiler();
      + *    sc.parseSchema(new InputSource(schema1Url.toExternalForm()));
      + *    sc.parseSchema(new InputSource(schema2Url.toExternalForm()));
      + *    ...
      + *    S2JModel model = sc.bind();
      + * 
      + *

      + * The bind operation causes XJC to do the bulk of the work, such as figuring out what classes to generate, what + * methods/fields to generate, etc. The obtained model contains useful introspective information about how the binding + * was performed (such as the mapping between XML types and generated Java classes) + * + *

      + * Once the model is obtained, generate the code into the file system as follows: + *

      + *   JCodeModel cm = model.generateCode( null, ... );
      + *   cm.build(new FileCodeWriter(outputDir));
      + * 
      + * + *

      Implementation Note

      + *

      + * This package shouldn't contain any implementation code. + */ +package com.sun.tools.internal.xjc.api; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/api/package.html b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/api/package.html deleted file mode 100644 index 5ec97a80e19..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/api/package.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - -API for programmatic invocation of XJC and schemagen. - -

      -This package provides a way to invoke XJC from within another program. -The primary target of this API is the JAX-WS RI, but we hope that -this API would be useful for other integration purposes as well. - -

      Getting Started: Using XJC

      -

      -To invoke XJC, a typical client would do something like this: -

      -    SchemaCompiler sc = XJC.createSchemaCompiler();
      -    sc.parseSchema(new InputSource(schema1Url.toExternalForm()));
      -    sc.parseSchema(new InputSource(schema2Url.toExternalForm()));
      -    ...
      -    S2JModel model = sc.bind();
      -
      -

      -The bind operation causes XJC to do the bulk of the work, such as -figuring out what classes to generate, what methods/fields to generate, etc. -The obtained model contains useful introspective information about -how the binding was performed (such as the mapping between XML types -and generated Java classes) - -

      -Once the model is obtained, generate the code into the file system as follows: -

      -    JCodeModel cm = model.generateCode( null, ... );
      -    cm.build(new FileCodeWriter(outputDir));
      -
      - - -

      Implementation Note

      -

      -This package shouldn't contain any implementation code. - diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/generator/bean/field/package-info.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/generator/bean/field/package-info.java new file mode 100644 index 00000000000..28d16b99d11 --- /dev/null +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/generator/bean/field/package-info.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * FieldRenderer and its implementation classes. + * Unless you are deriving from these classes to define your own custom renderer, + * you shouldn't be using these classes directly. Use the outline package. + */ +package com.sun.tools.internal.xjc.generator.bean.field; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/generator/bean/field/package.html b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/generator/bean/field/package.html deleted file mode 100644 index 149a2f33f39..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/generator/bean/field/package.html +++ /dev/null @@ -1,30 +0,0 @@ - - -

      -FieldRenderer and its implementation classes. -Unless you are deriving from these classes to define your own custom renderer, -you shouldn't be using these classes directly. Use the outline package. -

      diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/nav/package-info.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/nav/package-info.java new file mode 100644 index 00000000000..f40b82a7150 --- /dev/null +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/nav/package-info.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + *

      + * Compile-time representation of Java type system. + * + *

      + * These classes are used as TypeT and ClassDeclT of the model parameterization. This implementaion is designed to be + * capable of representing pre-existing classes (such as java.lang.String) as well as the generated classes (represented + * as JDefinedClass.) + * + *

      Handling of Primitive Types

      + *

      + * Primitive types have two forms (int and Integer), and this complicates the binding process. For this reason, inside + * the front end, we always use the boxed types. We'll use the unboxed form only in the back end when we know the field + * doesn't need to represent the null value. + */ +package com.sun.tools.internal.xjc.model.nav; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/nav/package.html b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/nav/package.html deleted file mode 100644 index 24ecf544b4d..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/nav/package.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - -

      - Compile-time representation of Java type system. - -

      - These classes are used as TypeT and ClassDeclT of the model parameterization. - This implementaion is designed to be capable of representing pre-existing classes - (such as java.lang.String) as well as the generated classes (represented as JDefinedClass.) - -

      Handling of Primitive Types

      -

      - Primitive types have two forms (int and Integer), and this complicates the binding process. - For this reason, inside the front end, we always use the boxed types. We'll use the unboxed - form only in the back end when we know the field doesn't need to represent the null value. - diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/outline/package-info.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/outline/package-info.java new file mode 100644 index 00000000000..271f84ccebf --- /dev/null +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/outline/package-info.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides the outline of the generated Java source code so that + * additional processing (such as adding more annotations) can be + * done on the generated code. + * + *

      + * Code generation phase builds an outline little by little, while each step is using the outline built by the prior + * steps. + */ +package com.sun.tools.internal.xjc.outline; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/outline/package.html b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/outline/package.html deleted file mode 100644 index 371364c7a27..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/outline/package.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - Provides the outline of the generated Java source code so that - additional processings (such as adding more annotations) can be - done on the generated code. - -

      - Code generation phase builds an outline little by little, while - each step is using the outline built by the prior steps. - diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/package-info.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/package-info.java new file mode 100644 index 00000000000..11e9f94d952 --- /dev/null +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Object Model that represents DTD binding information. + */ +package com.sun.tools.internal.xjc.reader.dtd.bindinfo; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/package.html b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/package.html deleted file mode 100644 index 87bbd14bc37..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/package.html +++ /dev/null @@ -1,26 +0,0 @@ - - -

      Object Model that represents DTD binding information.

      diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/gbind/package-info.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/gbind/package-info.java new file mode 100644 index 00000000000..1faa04caa10 --- /dev/null +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/gbind/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Binary expressions are left-associative. IOW, ((A,B),C) instead of (A,(B,C)). + */ +package com.sun.tools.internal.xjc.reader.gbind; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/gbind/package.html b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/gbind/package.html deleted file mode 100644 index 36465475b32..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/gbind/package.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - Binary expressions are left-associative. IOW, ((A,B),C) instead of (A,(B,C)) - - diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/package-info.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/package-info.java new file mode 100644 index 00000000000..e32f91f28e4 --- /dev/null +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * internalization of external binding files and <jaxb:bindings> customizations. + */ +package com.sun.tools.internal.xjc.reader.internalizer; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/package.html b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/package.html deleted file mode 100644 index e6f2aa14379..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/internalizer/package.html +++ /dev/null @@ -1,26 +0,0 @@ - - -

      internalization of external binding files and <jaxb:bindings> customizations.

      diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/package-info.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/package-info.java new file mode 100644 index 00000000000..d6719858a56 --- /dev/null +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Front-end that reads schema(s) and produce BGM. + */ +package com.sun.tools.internal.xjc.reader; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/package.html b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/package.html deleted file mode 100644 index 7da51871e6a..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/package.html +++ /dev/null @@ -1,26 +0,0 @@ - - -

      Front-end that reads schema(s) and produce BGM.

      diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package-info.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package-info.java index 0c313cbcd1d..898bfcaab34 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package-info.java +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,12 @@ * questions. */ +/** + * Object Model that represents customization declarations. + * RelaxNGCC is used to parse + * XML syntax into this representation, and the other parts of XJC will use + * this object model. + */ @XmlSchema(elementFormDefault = QUALIFIED, namespace=Const.JAXB_NSURI) package com.sun.tools.internal.xjc.reader.xmlschema.bindinfo; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package.html b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package.html deleted file mode 100644 index e71625d1171..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package.html +++ /dev/null @@ -1,34 +0,0 @@ - - - -Object Model that represents customization declarations. - -

      - RelaxNGCC is used to parse - XML syntax into this representation, and the other parts of XJC will use - this object model. -

      - diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/runtime/package-info.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/runtime/package-info.java new file mode 100644 index 00000000000..5387ad02145 --- /dev/null +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/runtime/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Code generated into the user's packages in certain compilation mode. + */ +package com.sun.tools.internal.xjc.runtime; diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/runtime/package.html b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/runtime/package.html deleted file mode 100644 index 3e675192b04..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/runtime/package.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - Code generated into the user's packages in certain compilation mode. - - diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/ElementDecl.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/ElementDecl.java index c4a9f35d90b..e74b7e0a494 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/ElementDecl.java +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/ElementDecl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -70,7 +70,7 @@ public class ElementDecl extends DeclarationImpl implements XSElementDecl, Ref.T this.substHead = _substHead; this.substDisallowed = _substDisallowed; this.substExcluded = _substExcluded; - this.idConstraints = Collections.unmodifiableList((List)idConstraints); + this.idConstraints = (List) Collections.unmodifiableList((List)idConstraints); for (IdentityConstraintImpl idc : idConstraints) idc.setParent(this); @@ -80,42 +80,52 @@ public class ElementDecl extends DeclarationImpl implements XSElementDecl, Ref.T } private XmlString defaultValue; + @Override public XmlString getDefaultValue() { return defaultValue; } private XmlString fixedValue; + @Override public XmlString getFixedValue() { return fixedValue; } private boolean nillable; + @Override public boolean isNillable() { return nillable; } private boolean _abstract; + @Override public boolean isAbstract() { return _abstract; } private Ref.Type type; + @Override public XSType getType() { return type.getType(); } private Ref.Element substHead; + @Override public XSElementDecl getSubstAffiliation() { if(substHead==null) return null; return substHead.get(); } private int substDisallowed; + @Override public boolean isSubstitutionDisallowed( int method ) { return (substDisallowed&method)!=0; } private int substExcluded; + @Override public boolean isSubstitutionExcluded( int method ) { return (substExcluded&method)!=0; } private final List idConstraints; + @Override public List getIdentityConstraints() { return idConstraints; } private Boolean form; + @Override public Boolean getForm() { return form; } @@ -124,6 +134,7 @@ public class ElementDecl extends DeclarationImpl implements XSElementDecl, Ref.T /** * @deprecated */ + @Override public XSElementDecl[] listSubstitutables() { Set s = getSubstitutables(); return s.toArray(new XSElementDecl[s.size()]); @@ -135,6 +146,7 @@ public class ElementDecl extends DeclarationImpl implements XSElementDecl, Ref.T /** Unmodifieable view of {@link #substitutables}. */ private Set substitutablesView = null; + @Override public Set getSubstitutables() { if( substitutables==null ) { // if the field is null by the time this method @@ -194,42 +206,57 @@ public class ElementDecl extends DeclarationImpl implements XSElementDecl, Ref.T } } + @Override public boolean canBeSubstitutedBy(XSElementDecl e) { return getSubstitutables().contains(e); } + @Override public boolean isWildcard() { return false; } + @Override public boolean isModelGroupDecl() { return false; } + @Override public boolean isModelGroup() { return false; } + @Override public boolean isElementDecl() { return true; } + @Override public XSWildcard asWildcard() { return null; } + @Override public XSModelGroupDecl asModelGroupDecl() { return null; } + @Override public XSModelGroup asModelGroup() { return null; } + @Override public XSElementDecl asElementDecl() { return this; } + @Override public void visit( XSVisitor visitor ) { visitor.elementDecl(this); } + @Override public void visit( XSTermVisitor visitor ) { visitor.elementDecl(this); } + @Override public Object apply( XSTermFunction function ) { return function.elementDecl(this); } + @Override public T apply(XSTermFunctionWithParam function, P param) { return function.elementDecl(this,param); } + @Override public Object apply( XSFunction function ) { return function.elementDecl(this); } // Ref.Term implementation + @Override public XSTerm getTerm() { return this; } } diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/IdentityConstraintImpl.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/IdentityConstraintImpl.java index 2a4c69475e8..4ca87b29c52 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/IdentityConstraintImpl.java +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/IdentityConstraintImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -59,17 +59,19 @@ public class IdentityConstraintImpl extends ComponentImpl implements XSIdentityC this.name = name; this.selector = selector; selector.setParent(this); - this.fields = Collections.unmodifiableList((List)fields); + this.fields = (List) Collections.unmodifiableList((List)fields); for( XPathImpl xp : fields ) xp.setParent(this); this.refer = refer; } + @Override public void visit(XSVisitor visitor) { visitor.identityConstraint(this); } + @Override public T apply(XSFunction function) { return function.identityConstraint(this); } @@ -79,30 +81,37 @@ public class IdentityConstraintImpl extends ComponentImpl implements XSIdentityC parent.getOwnerSchema().addIdentityConstraint(this); } + @Override public XSElementDecl getParent() { return parent; } + @Override public String getName() { return name; } + @Override public String getTargetNamespace() { return getParent().getTargetNamespace(); } + @Override public short getCategory() { return category; } + @Override public XSXPath getSelector() { return selector; } + @Override public List getFields() { return fields; } + @Override public XSIdentityConstraint getReferencedKey() { if(category==KEYREF) return refer.get(); @@ -110,6 +119,7 @@ public class IdentityConstraintImpl extends ComponentImpl implements XSIdentityC throw new IllegalStateException("not a keyref"); } + @Override public XSIdentityConstraint get() { return this; } diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/parser/NGCCRuntimeEx.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/parser/NGCCRuntimeEx.java index 4e600c32e55..297ff889b6d 100644 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/parser/NGCCRuntimeEx.java +++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/parser/NGCCRuntimeEx.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,7 +34,6 @@ import com.sun.xml.internal.xsom.impl.UName; import com.sun.xml.internal.xsom.impl.Const; import com.sun.xml.internal.xsom.impl.parser.state.NGCCRuntime; import com.sun.xml.internal.xsom.impl.parser.state.Schema; -import com.sun.xml.internal.xsom.impl.util.Uri; import com.sun.xml.internal.xsom.parser.AnnotationParser; import com.sun.xml.internal.org.relaxng.datatype.ValidationContext; import org.xml.sax.Attributes; @@ -48,8 +47,10 @@ import org.xml.sax.helpers.LocatorImpl; import java.io.IOException; import java.net.URI; +import java.net.URL; import java.text.MessageFormat; import java.util.Stack; +import java.util.regex.Pattern; /** * NGCCRuntime extended with various utility methods for @@ -150,12 +151,15 @@ public class NGCCRuntimeEx extends NGCCRuntime implements PatcherManager { /* registers a patcher that will run after all the parsing has finished. */ + @Override public void addPatcher( Patch patcher ) { parser.patcherManager.addPatcher(patcher); } + @Override public void addErrorChecker( Patch patcher ) { parser.patcherManager.addErrorChecker(patcher); } + @Override public void reportError( String msg, Locator loc ) throws SAXException { parser.patcherManager.reportError(msg,loc); } @@ -188,8 +192,15 @@ public class NGCCRuntimeEx extends NGCCRuntime implements PatcherManager { EntityResolver er = parser.getEntityResolver(); String systemId = null; - if (relativeUri!=null) - systemId = Uri.resolve(baseUri,relativeUri); + if (relativeUri!=null) { + if (isAbsolute(relativeUri)) { + systemId = relativeUri; + } + if (baseUri == null || !isAbsolute(baseUri)) { + throw new IOException("Unable to resolve relative URI " + relativeUri + " because base URI is not absolute: " + baseUri); + } + systemId = new URL(new URL(baseUri), relativeUri).toString(); + } if (er!=null) { InputSource is = er.resolveEntity(namespaceURI,systemId); @@ -217,7 +228,21 @@ public class NGCCRuntimeEx extends NGCCRuntime implements PatcherManager { } } - /** Includes the specified schema. */ + private static final Pattern P = Pattern.compile(".*[/#?].*"); + + private static boolean isAbsolute(String uri) { + int i = uri.indexOf(':'); + if (i < 0) { + return false; + } + return !P.matcher(uri.substring(0, i)).matches(); + } + + /** + * Includes the specified schema. + * + * @param schemaLocation + * @throws org.xml.sax.SAXException */ public void includeSchema( String schemaLocation ) throws SAXException { NGCCRuntimeEx runtime = new NGCCRuntimeEx(parser,chameleonMode,this); runtime.currentSchema = this.currentSchema; @@ -235,7 +260,12 @@ public class NGCCRuntimeEx extends NGCCRuntime implements PatcherManager { true, currentSchema.getTargetNamespace(), getLocator() ); } - /** Imports the specified schema. */ + /** + * Imports the specified schema. + * + * @param ns + * @param schemaLocation + * @throws org.xml.sax.SAXException */ public void importSchema( String ns, String schemaLocation ) throws SAXException { NGCCRuntimeEx newRuntime = new NGCCRuntimeEx(parser,false,this); InputSource source = resolveRelativeURL(ns,schemaLocation); @@ -317,9 +347,13 @@ public class NGCCRuntimeEx extends NGCCRuntime implements PatcherManager { /** * Parses the specified entity. * + * @param source * @param importLocation * The source location of the import/include statement. * Used for reporting errors. + * @param includeMode + * @param expectedNamespace + * @throws org.xml.sax.SAXException */ public void parseEntity( InputSource source, boolean includeMode, String expectedNamespace, Locator importLocation ) throws SAXException { @@ -342,6 +376,8 @@ public class NGCCRuntimeEx extends NGCCRuntime implements PatcherManager { /** * Creates a new instance of annotation parser. + * + * @return Annotation parser */ public AnnotationParser createAnnotationParser() { if(parser.getAnnotationParserFactory()==null) @@ -351,14 +387,19 @@ public class NGCCRuntimeEx extends NGCCRuntime implements PatcherManager { } /** - * Gets the element name that contains the annotation element. - * This method works correctly only when called by the annotation handler. + * Gets the element name that contains the annotation element.This method works correctly only when called by the annotation handler. + * + * @return Element name */ public String getAnnotationContextElementName() { return elementNames.get( elementNames.size()-2 ); } - /** Creates a copy of the current locator object. */ + /** + * Creates a copy of the current locator object. + * + * @return Locator copy + */ public Locator copyLocator() { return new LocatorImpl(getLocator()); } @@ -397,6 +438,7 @@ public class NGCCRuntimeEx extends NGCCRuntime implements PatcherManager { this.uri = _uri; } + @Override public String resolveNamespacePrefix(String p) { if(p.equals(prefix)) return uri; if(previous==null) return null; @@ -408,14 +450,20 @@ public class NGCCRuntimeEx extends NGCCRuntime implements PatcherManager { private final Context previous; // XSDLib don't use those methods, so we cut a corner here. + @Override public String getBaseUri() { return null; } + @Override public boolean isNotation(String arg0) { return false; } + @Override public boolean isUnparsedEntity(String arg0) { return false; } } private Context currentContext=null; - /** Returns an immutable snapshot of the current context. */ + /** Returns an immutable snapshot of the current context. + * + * @return Snapshot of current context + */ public ValidationContext createValidationContext() { return currentContext; } @@ -446,6 +494,7 @@ public class NGCCRuntimeEx extends NGCCRuntime implements PatcherManager { * Parses UName under the given context. * @param qname Attribute name. * @return New {@link UName} instance based on attribute name. + * @throws org.xml.sax.SAXException */ public UName parseUName(final String qname ) throws SAXException { int idx = qname.indexOf(':'); diff --git a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/util/Uri.java b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/util/Uri.java deleted file mode 100644 index d6cddc7529b..00000000000 --- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/util/Uri.java +++ /dev/null @@ -1,187 +0,0 @@ -/* -Copyright (c) 2001, 2002 Thai Open Source Software Center Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of the Thai Open Source Software Center Ltd nor - the names of its contributors may be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -// @@3RD PARTY CODE@@ - -package com.sun.xml.internal.xsom.impl.util; - -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URL; - -public class Uri { - private static String utf8 = "UTF-8"; - - public static boolean isValid(String s) { - return isValidPercent(s) && isValidFragment(s) && isValidScheme(s); - } - - private static final String HEX_DIGITS = "0123456789abcdef"; - - public static String escapeDisallowedChars(String s) { - StringBuffer buf = null; - int len = s.length(); - int done = 0; - for (;;) { - int i = done; - for (;;) { - if (i == len) { - if (done == 0) - return s; - break; - } - if (isExcluded(s.charAt(i))) - break; - i++; - } - if (buf == null) - buf = new StringBuffer(); - if (i > done) { - buf.append(s.substring(done, i)); - done = i; - } - if (i == len) - break; - for (i++; i < len && isExcluded(s.charAt(i)); i++) - ; - String tem = s.substring(done, i); - byte[] bytes; - try { - bytes = tem.getBytes(utf8); - } - catch (UnsupportedEncodingException e) { - utf8 = "UTF8"; - try { - bytes = tem.getBytes(utf8); - } - catch (UnsupportedEncodingException e2) { - // Give up - return s; - } - } - for (int j = 0; j < bytes.length; j++) { - buf.append('%'); - buf.append(HEX_DIGITS.charAt((bytes[j] & 0xFF) >> 4)); - buf.append(HEX_DIGITS.charAt(bytes[j] & 0xF)); - } - done = i; - } - return buf.toString(); - } - - private static String excluded = "<>\"{}|\\^`"; - - private static boolean isExcluded(char c) { - return c <= 0x20 || c >= 0x7F || excluded.indexOf(c) >= 0; - } - - private static boolean isAlpha(char c) { - return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z'); - } - - private static boolean isHexDigit(char c) { - return ('a' <= c && c <= 'f') || ('A' <= c && c <= 'F') || isDigit(c); - } - - private static boolean isDigit(char c) { - return '0' <= c && c <= '9'; - } - - private static boolean isSchemeChar(char c) { - return isAlpha(c) || isDigit(c) || c == '+' || c == '-' || c =='.'; - } - - private static boolean isValidPercent(String s) { - int len = s.length(); - for (int i = 0; i < len; i++) - if (s.charAt(i) == '%') { - if (i + 2 >= len) - return false; - else if (!isHexDigit(s.charAt(i + 1)) - || !isHexDigit(s.charAt(i + 2))) - return false; - } - return true; - } - - private static boolean isValidFragment(String s) { - int i = s.indexOf('#'); - return i < 0 || s.indexOf('#', i + 1) < 0; - } - - private static boolean isValidScheme(String s) { - if (!isAbsolute(s)) - return true; - int i = s.indexOf(':'); - if (i == 0 - || i + 1 == s.length() - || !isAlpha(s.charAt(0))) - return false; - while (--i > 0) - if (!isSchemeChar(s.charAt(i))) - return false; - return true; - } - - public static String resolve(String baseUri, String uriReference) throws IOException { - if (isAbsolute(uriReference)) - return uriReference; - - if(baseUri==null) - throw new IOException("Unable to resolve relative URI "+uriReference+" without a base URI"); - - if(!isAbsolute(baseUri)) - throw new IOException("Unable to resolve relative URI "+uriReference+" because base URI is not absolute: "+baseUri); - - return new URL(new URL(baseUri), uriReference).toString(); - } - - public static boolean hasFragmentId(String uri) { - return uri.indexOf('#') >= 0; - } - - public static boolean isAbsolute(String uri) { - int i = uri.indexOf(':'); - if (i < 0) - return false; - while (--i >= 0) { - switch (uri.charAt(i)) { - case '#': - case '/': - case '?': - return false; - } - } - return true; - } -} diff --git a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.properties b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ContextClassloaderLocal.properties similarity index 94% rename from jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.properties rename to jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ContextClassloaderLocal.properties index c0267b823ea..d79956811cb 100644 --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.properties +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ContextClassloaderLocal.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ContextClassloaderLocalMessages.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ContextClassloaderLocalMessages.java new file mode 100644 index 00000000000..24584fa50aa --- /dev/null +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ContextClassloaderLocalMessages.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.tools.internal.ws.resources; + +import java.util.Locale; +import java.util.ResourceBundle; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; +import com.sun.istack.internal.localization.Localizer; + + +/** + * Defines string formatting method for each constant in the resource file + * + */ +public final class ContextClassloaderLocalMessages { + + private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.ContextClassloaderLocal"; + private final static LocalizableMessageFactory MESSAGE_FACTORY = new LocalizableMessageFactory(BUNDLE_NAME, new ContextClassloaderLocalMessages.BundleSupplier()); + private final static Localizer LOCALIZER = new Localizer(); + + public static Localizable localizableFAILED_TO_CREATE_NEW_INSTANCE(Object arg0) { + return MESSAGE_FACTORY.getMessage("FAILED_TO_CREATE_NEW_INSTANCE", arg0); + } + + /** + * Failed to create new instance of {0} + * + */ + public static String FAILED_TO_CREATE_NEW_INSTANCE(Object arg0) { + return LOCALIZER.localize(localizableFAILED_TO_CREATE_NEW_INSTANCE(arg0)); + } + + private static class BundleSupplier + implements ResourceBundleSupplier + { + + + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } + + } + +} diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/version.properties b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/version.properties index eedc7c2b359..82452acb3d7 100644 --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/version.properties +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/version.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,4 +26,4 @@ build-id=2.3.0-SNAPSHOT build-version=JAX-WS RI 2.3.0-SNAPSHOT major-version=2.3.0 -svn-revision=5c2c1fd2f2ab3b5c7cea25f79aa49e54cb84b7cc +svn-revision=e8c5e9697d9b27d83ff35d767939b2f55e667621 diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java index 4f29dc67fb4..e730c8e4ebb 100644 --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -144,12 +144,9 @@ public class WsgenTool { public boolean buildModel(String endpoint, Listener listener) throws BadCommandLineException { final ErrorReceiverFilter errReceiver = new ErrorReceiverFilter(listener); - List args = new ArrayList(6 + (options.nocompile ? 1 : 0) + List args = new ArrayList<>(6 + (options.nocompile ? 1 : 0) + (options.encoding != null ? 2 : 0)); - args.add("--add-modules"); - args.add("java.xml.ws"); - args.add("-d"); args.add(options.destDir.getAbsolutePath()); args.add("-classpath"); @@ -163,8 +160,27 @@ public class WsgenTool { args.add("-encoding"); args.add(options.encoding); } + + boolean addModules = true; if (options.javacOptions != null) { - args.addAll(options.getJavacOptions(args, listener)); + List javacOptions = options.getJavacOptions(args, listener); + for (int i = 0; i < javacOptions.size(); i++) { + String opt = javacOptions.get(i); + if ("-source".equals(opt) && 9 >= getVersion(javacOptions.get(i + 1))) { + addModules = false; + } + if ("-target".equals(opt) && 9 >= getVersion(javacOptions.get(i + 1))) { + addModules = false; + } + if ("--release".equals(opt) && 9 >= getVersion(javacOptions.get(i + 1))) { + addModules = false; + } + args.add(opt); + } + } + if (addModules) { + args.add("--add-modules"); + args.add("java.xml.ws"); } JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); @@ -227,7 +243,7 @@ public class WsgenTool { com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl) fac.createRuntime(config); final File[] wsdlFileName = new File[1]; // used to capture the generated WSDL file. - final Map schemaFiles = new HashMap(); + final Map schemaFiles = new HashMap<>(); WSDLGenInfo wsdlGenInfo = new WSDLGenInfo(); wsdlGenInfo.setSecureXmlProcessingDisabled(disableXmlSecurity); @@ -299,7 +315,7 @@ public class WsgenTool { } private List getExternalFiles(List exts) { - List files = new ArrayList(); + List files = new ArrayList<>(); for (String ext : exts) { // first try absolute path ... File file = new File(ext); @@ -341,6 +357,10 @@ public class WsgenTool { } } + private float getVersion(String s) { + return Float.parseFloat(s); + } + /** * "Namespace" for code needed to generate the report file. */ diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java index 3768118feb2..33664a05c7d 100644 --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -246,7 +246,7 @@ public class WsimportTool { } private void deleteGeneratedFiles() { - Set trackedRootPackages = new HashSet(); + Set trackedRootPackages = new HashSet<>(); if (options.clientjar != null) { //remove all non-java artifacts as they will packaged in jar. @@ -282,7 +282,7 @@ public class WsimportTool { private void addClassesToGeneratedFiles() throws IOException { Iterable generatedFiles = options.getGeneratedFiles(); - final List trackedClassFiles = new ArrayList(); + final List trackedClassFiles = new ArrayList<>(); for(File f: generatedFiles) { if(f.getName().endsWith(".java")) { String relativeDir = DirectoryUtil.getRelativePathfromCommonBase(f.getParentFile(),options.sourceDir); @@ -504,7 +504,7 @@ public class WsimportTool { } protected boolean compileGeneratedClasses(ErrorReceiver receiver, WsimportListener listener){ - List sourceFiles = new ArrayList(); + List sourceFiles = new ArrayList<>(); for (File f : options.getGeneratedFiles()) { if (f.exists() && f.getName().endsWith(".java")) { @@ -515,10 +515,7 @@ public class WsimportTool { if (sourceFiles.size() > 0) { String classDir = options.destDir.getAbsolutePath(); String classpathString = createClasspathString(); - List args = new ArrayList(); - - args.add("--add-modules"); - args.add("java.xml.ws"); + List args = new ArrayList<>(); args.add("-d"); args.add(classDir); @@ -534,8 +531,26 @@ public class WsimportTool { args.add(options.encoding); } + boolean addModules = true; if (options.javacOptions != null) { - args.addAll(options.getJavacOptions(args, listener)); + List javacOptions = options.getJavacOptions(args, listener); + for (int i = 0; i < javacOptions.size(); i++) { + String opt = javacOptions.get(i); + if ("-source".equals(opt) && 9 >= getVersion(javacOptions.get(i + 1))) { + addModules = false; + } + if ("-target".equals(opt) && 9 >= getVersion(javacOptions.get(i + 1))) { + addModules = false; + } + if ("--release".equals(opt) && 9 >= getVersion(javacOptions.get(i + 1))) { + addModules = false; + } + args.add(opt); + } + } + if (addModules) { + args.add("--add-modules"); + args.add("java.xml.ws"); } for (int i = 0; i < sourceFiles.size(); ++i) { @@ -572,4 +587,8 @@ public class WsimportTool { System.out.println(WscompileMessages.WSIMPORT_USAGE_EXTENSIONS()); System.out.println(WscompileMessages.WSIMPORT_USAGE_EXAMPLES()); } + + private float getVersion(String s) { + return Float.parseFloat(s); + } } diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.java b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.java index c8c847907cd..e15ab93b9c1 100644 --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.java +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,10 +25,10 @@ package com.sun.tools.internal.ws.wsdl.parser; +import com.sun.tools.internal.ws.resources.ContextClassloaderLocalMessages; + import java.security.AccessController; import java.security.PrivilegedAction; -import java.text.MessageFormat; -import java.util.ResourceBundle; import java.util.WeakHashMap; /** @@ -36,9 +36,7 @@ import java.util.WeakHashMap; */ abstract class ContextClassloaderLocal { - private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; - - private WeakHashMap CACHE = new WeakHashMap(); + private WeakHashMap CACHE = new WeakHashMap<>(); public V get() throws Error { ClassLoader tccl = getContextClassLoader(); @@ -60,26 +58,21 @@ abstract class ContextClassloaderLocal { try { return initialValue(); } catch (Exception e) { - throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); + throw new Error(ContextClassloaderLocalMessages.FAILED_TO_CREATE_NEW_INSTANCE(getClass().getName()), e); } } - private static String format(String property, Object... args) { - String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); - return MessageFormat.format(text, args); - } - private static ClassLoader getContextClassLoader() { - return (ClassLoader) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - ClassLoader cl = null; - try { - cl = Thread.currentThread().getContextClassLoader(); - } catch (SecurityException ex) { - } - return cl; - } - }); + return AccessController.doPrivileged(new PrivilegedAction() { + @Override + public ClassLoader run() { + ClassLoader cl = null; + try { + cl = Thread.currentThread().getContextClassLoader(); + } catch (SecurityException ex) { + } + return cl; + } + }); } } diff --git a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.properties b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.properties deleted file mode 100644 index c0267b823ea..00000000000 --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.properties +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} From 256cc336cd54a48d4cec49414722654c0b1ca5f5 Mon Sep 17 00:00:00 2001 From: Roman Grigoriadi Date: Thu, 16 Feb 2017 13:17:55 +0300 Subject: [PATCH 235/447] 8174735: Update JAX-WS RI integration to latest version Reviewed-by: alanb, mchung, lancea --- jdk/src/java.base/share/classes/module-info.java | 3 +-- jdk/src/java.base/share/lib/security/default.policy | 8 +++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/jdk/src/java.base/share/classes/module-info.java b/jdk/src/java.base/share/classes/module-info.java index 3ad3f4a096c..2923ad5ee7a 100644 --- a/jdk/src/java.base/share/classes/module-info.java +++ b/jdk/src/java.base/share/classes/module-info.java @@ -239,8 +239,7 @@ module java.base { java.management.rmi, java.rmi, java.sql.rowset, - java.xml, - java.xml.ws; + java.xml; exports sun.security.action to java.desktop, java.security.jgss; diff --git a/jdk/src/java.base/share/lib/security/default.policy b/jdk/src/java.base/share/lib/security/default.policy index 36521f38e1d..1a9df589fe1 100644 --- a/jdk/src/java.base/share/lib/security/default.policy +++ b/jdk/src/java.base/share/lib/security/default.policy @@ -69,6 +69,8 @@ grant codeBase "jrt:/java.sql.rowset" { }; grant codeBase "jrt:/java.xml.bind" { + permission java.lang.RuntimePermission + "accessClassInPackage.sun.misc"; permission java.lang.RuntimePermission "accessClassInPackage.com.sun.xml.internal.*"; permission java.lang.RuntimePermission @@ -105,17 +107,13 @@ grant codeBase "jrt:/java.xml.ws" { permission java.net.NetPermission "getProxySelector"; permission java.lang.RuntimePermission - "accessClassInPackage.com.sun.org.apache.xml.internal.resolver"; - permission java.lang.RuntimePermission - "accessClassInPackage.com.sun.org.apache.xml.internal.resolver.tools"; + "accessClassInPackage.sun.misc"; permission java.lang.RuntimePermission "accessClassInPackage.com.sun.xml.internal.*"; permission java.lang.RuntimePermission "accessClassInPackage.com.sun.istack.internal"; permission java.lang.RuntimePermission "accessClassInPackage.com.sun.istack.internal.*"; - permission java.lang.RuntimePermission - "accessClassInPackage.com.sun.org.apache.xerces.internal.*"; permission java.lang.RuntimePermission "accessDeclaredMembers"; permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; permission java.util.PropertyPermission "*", "read"; From 1e2d1c6104f393bb739d332081484350f767ccac Mon Sep 17 00:00:00 2001 From: Roman Grigoriadi Date: Thu, 16 Feb 2017 13:19:17 +0300 Subject: [PATCH 236/447] 8174735: Update JAX-WS RI integration to latest version Reviewed-by: alanb, mchung, lancea --- jaxp/src/java.xml/share/classes/module-info.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/jaxp/src/java.xml/share/classes/module-info.java b/jaxp/src/java.xml/share/classes/module-info.java index ec5d44f2edd..5182cda9f16 100644 --- a/jaxp/src/java.xml/share/classes/module-info.java +++ b/jaxp/src/java.xml/share/classes/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -55,12 +55,6 @@ module java.xml { exports org.xml.sax; exports org.xml.sax.ext; exports org.xml.sax.helpers; - exports com.sun.org.apache.xerces.internal.dom to - java.xml.ws; - exports com.sun.org.apache.xerces.internal.jaxp to - java.xml.ws; - exports com.sun.org.apache.xerces.internal.util to - java.xml.ws; exports com.sun.org.apache.xml.internal.dtm to java.xml.crypto; exports com.sun.org.apache.xml.internal.utils to From f77d4fccad61d3500161b7d51ceabc90f682e037 Mon Sep 17 00:00:00 2001 From: Prem Balakrishnan Date: Thu, 16 Feb 2017 16:30:43 +0530 Subject: [PATCH 237/447] 8175066: Compilation error due to tag in JDK-8162959 Reviewed-by: aghaisas, psadhukhan --- jdk/src/java.desktop/share/classes/java/awt/Robot.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jdk/src/java.desktop/share/classes/java/awt/Robot.java b/jdk/src/java.desktop/share/classes/java/awt/Robot.java index 3f6604c8664..bbc8289d0f1 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/Robot.java +++ b/jdk/src/java.desktop/share/classes/java/awt/Robot.java @@ -440,7 +440,7 @@ public class Robot { * *

      * Example: - *

      +     * 
      {@code
            *      Image nativeResImage;
            *      MultiResolutionImage mrImage = robot.createMultiResolutionScreenCapture(frame.getBounds());
            *      List resolutionVariants = mrImage.getResolutionVariants();
      @@ -448,7 +448,8 @@ public class Robot {
            *          nativeResImage = resolutionVariants.get(1);
            *      } else {
            *          nativeResImage = resolutionVariants.get(0);
      -     *      } 
      + * } + * }
      * @param screenRect Rect to capture in screen coordinates * @return The captured image * @throws IllegalArgumentException if {@code screenRect} width and height are not greater than zero From a141b69c1b6be5d3d70787f191d273c8be020bd7 Mon Sep 17 00:00:00 2001 From: Mark Sheppard Date: Thu, 16 Feb 2017 11:26:14 +0000 Subject: [PATCH 238/447] 8146299: Disable rmic -Xnew Reviewed-by: chegar, smarks, rriggs, mchung --- .../jdk.rmic/share/classes/sun/rmi/rmic/Main.java | 14 ++++++++------ jdk/test/ProblemList.txt | 2 -- jdk/test/sun/rmi/rmic/newrmic/equivalence/run.sh | 2 ++ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/Main.java b/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/Main.java index 288ad5270b8..938d8dc8cba 100644 --- a/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/Main.java +++ b/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/Main.java @@ -145,12 +145,14 @@ public class Main implements sun.rmi.rmic.Constants { * in parseArgs, so that none of the arguments will be nulled * before delegating to the new implementation. */ - for (int i = 0; i < argv.length; i++) { - if (argv[i].equals("-Xnew")) { - return (new sun.rmi.rmic.newrmic.Main(out, - program)).compile(argv); - } - } + // disable the -Xnew option as per JDK-8146299 and JDK-8145980 + // to allow further discussion how to progress with this feature + //for (int i = 0; i < argv.length; i++) { + // if (argv[i].equals("-Xnew")) { + // return (new sun.rmi.rmic.newrmic.Main(out, + // program)).compile(argv); + // } + //} if (!parseArgs(argv)) { return false; diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt index 518f9c77457..15dc8b7fe0b 100644 --- a/jdk/test/ProblemList.txt +++ b/jdk/test/ProblemList.txt @@ -199,8 +199,6 @@ java/rmi/activation/Activatable/extLoadedImpl/ext.sh 8062724 generic- java/rmi/activation/ActivationGroup/downloadActivationGroup/DownloadActivationGroup.java 8169569 windows-all -sun/rmi/rmic/newrmic/equivalence/run.sh 8145980 generic-all - java/rmi/registry/readTest/CodebaseTest.java 8173324 windows-all ############################################################################ diff --git a/jdk/test/sun/rmi/rmic/newrmic/equivalence/run.sh b/jdk/test/sun/rmi/rmic/newrmic/equivalence/run.sh index 27c86041414..a2e84bc116b 100644 --- a/jdk/test/sun/rmi/rmic/newrmic/equivalence/run.sh +++ b/jdk/test/sun/rmi/rmic/newrmic/equivalence/run.sh @@ -22,6 +22,8 @@ # # @test +# @ignore test is disabled, while further discussion on the rmic -Xnew feature +# takes place (c.f JDK-8146299, JDK-8145980). # @bug 4911536 # @summary This test verifies that the new implementation of rmic # generates equivalent classes as the old implementation, for a set From d859374f59eb633d1ece00ceaa643c1cbda7c296 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Thu, 16 Feb 2017 13:10:00 +0000 Subject: [PATCH 239/447] 8175071: Minor cleanup in Javadoc.gmk Reviewed-by: erikj, ihse --- make/Javadoc.gmk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make/Javadoc.gmk b/make/Javadoc.gmk index aa2a8b96d8b..d4c91474661 100644 --- a/make/Javadoc.gmk +++ b/make/Javadoc.gmk @@ -314,7 +314,7 @@ define SetupJavadocGenerationBody $1_INDEX_FILE := $$(JAVADOC_OUTPUTDIR)/$$($1_OUTPUT_DIRNAME)/index.html # Rule for actually running javadoc - $$($1_INDEX_FILE): $(BUILD_TOOLS_JDK) $$($1_VARDEPS_FILE) $$($1_PACKAGE_DEPS) $$($1_DEPS) + $$($1_INDEX_FILE): $$(BUILD_TOOLS_JDK) $$($1_VARDEPS_FILE) $$($1_PACKAGE_DEPS) $$($1_DEPS) $$(call LogWarn, Generating Javadoc from $$(words $$($1_PACKAGES)) package(s) for $$($1_OUTPUT_DIRNAME)) $$(call MakeDir, $$(@D)) ifneq ($$($1_PACKAGES_FILE), ) @@ -743,7 +743,7 @@ $(eval $(call IncludeCustomExtension, , Javadoc.gmk)) ################################################################################ -docs-javadoc: $(BUILD_TOOLS_JDK) $(TARGETS) +docs-javadoc: $(TARGETS) docs-copy: $(COPY_TARGETS) From ea91d06f5e801f7799b96104bcd169ca7ea21bf1 Mon Sep 17 00:00:00 2001 From: Frank Yuan Date: Thu, 16 Feb 2017 21:39:21 +0800 Subject: [PATCH 240/447] 8175043: Multiple jaxp tests failing across platforms Reviewed-by: weijun, joehw --- .../org/w3c/dom/ptests/NodeTest.java | 5 +- .../functional/test/astro/DocumentLSTest.java | 3 +- .../xml/jaxp/unittest/parsers/Bug6341770.java | 3 +- .../xml/jaxp/unittest/sax/Bug7057778Test.java | 3 +- .../jaxp/unittest/stream/Bug6688002Test.java | 10 ++-- .../ReaderToWriterTest.java | 6 ++- .../XMLStreamWriterTest/WriterTest.java | 48 ++++++++++--------- .../unittest/transform/Bug4693341Test.java | 6 ++- .../jaxp/unittest/transform/Bug4892774.java | 4 +- .../unittest/transform/Bug6216226Test.java | 3 +- .../unittest/transform/CR6935697Test.java | 4 +- .../unittest/transform/XSLTFunctionsTest.java | 6 ++- .../transform/util/TransformerUtil.java | 4 +- .../unittest/validation/CR6708840Test.java | 4 +- .../unittest/validation/ValidatorTest.java | 9 ++-- 15 files changed, 72 insertions(+), 46 deletions(-) diff --git a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NodeTest.java b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NodeTest.java index bb4d6b3574a..264ad06a95f 100644 --- a/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NodeTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/org/w3c/dom/ptests/NodeTest.java @@ -22,6 +22,7 @@ */ package org.w3c.dom.ptests; +import static jaxp.library.JAXPTestUtilities.USER_DIR; import static jaxp.library.JAXPTestUtilities.compareWithGold; import static jaxp.library.JAXPTestUtilities.tryRunWithTmpPermission; import static org.testng.Assert.assertEquals; @@ -157,7 +158,7 @@ public class NodeTest { Element element = (Element) document.getElementsByTagName("sender").item(0); parentElement.insertBefore(createTestDocumentFragment(document), element); - String outputfile = "InsertBefore.out"; + String outputfile = USER_DIR + "InsertBefore.out"; String goldfile = GOLDEN_DIR + "InsertBeforeGF.out"; tryRunWithTmpPermission(() -> outputXml(document, outputfile), new PropertyPermission("user.dir", "read")); assertTrue(compareWithGold(goldfile, outputfile)); @@ -175,7 +176,7 @@ public class NodeTest { Element element = (Element) document.getElementsByTagName("sender").item(0); parentElement.replaceChild(createTestDocumentFragment(document), element); - String outputfile = "ReplaceChild3.out"; + String outputfile = USER_DIR + "ReplaceChild3.out"; String goldfile = GOLDEN_DIR + "ReplaceChild3GF.out"; tryRunWithTmpPermission(() -> outputXml(document, outputfile), new PropertyPermission("user.dir", "read")); assertTrue(compareWithGold(goldfile, outputfile)); diff --git a/jaxp/test/javax/xml/jaxp/functional/test/astro/DocumentLSTest.java b/jaxp/test/javax/xml/jaxp/functional/test/astro/DocumentLSTest.java index acfe988c13a..673674b9e65 100644 --- a/jaxp/test/javax/xml/jaxp/functional/test/astro/DocumentLSTest.java +++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/DocumentLSTest.java @@ -22,6 +22,7 @@ */ package test.astro; +import static jaxp.library.JAXPTestUtilities.USER_DIR; import static jaxp.library.JAXPTestUtilities.filenameToURL; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; @@ -130,7 +131,7 @@ public class DocumentLSTest { impl = (DOMImplementationLS) db.getDOMImplementation(); LSSerializer domSerializer = impl.createLSSerializer(); MyDOMOutput mydomoutput = new MyDOMOutput(); - try (OutputStream os = new FileOutputStream("test.out")) { + try (OutputStream os = new FileOutputStream(USER_DIR + "test.out")) { mydomoutput.setByteStream(os); mydomoutput.setEncoding("UTF-8"); assertTrue(domSerializer.write(doc, mydomoutput)); diff --git a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6341770.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6341770.java index 942e7ffaed8..1bf27aa09a0 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6341770.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6341770.java @@ -23,6 +23,7 @@ package parsers; +import static jaxp.library.JAXPTestUtilities.USER_DIR; import static jaxp.library.JAXPTestUtilities.tryRunWithTmpPermission; import java.io.File; @@ -61,7 +62,7 @@ public class Bug6341770 { return; } try { - File dir = new File(ALPHA); + File dir = new File(USER_DIR + ALPHA); dir.delete(); dir.mkdir(); File main = new File(dir, "main.xml"); diff --git a/jaxp/test/javax/xml/jaxp/unittest/sax/Bug7057778Test.java b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug7057778Test.java index 4bd69f09765..be6dbc986f8 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/sax/Bug7057778Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug7057778Test.java @@ -23,6 +23,7 @@ package sax; +import static jaxp.library.JAXPTestUtilities.USER_DIR; import static jaxp.library.JAXPTestUtilities.getSystemProperty; import static jaxp.library.JAXPTestUtilities.tryRunWithTmpPermission; @@ -69,7 +70,7 @@ public class Bug7057778Test { @Test public void testParse() { File src = new File(getClass().getResource(xml).getFile()); - File dst = new File(xml1); + File dst = new File(USER_DIR + xml1); try { copyFile(src, dst); SAXParserFactory spf = SAXParserFactory.newInstance(); diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6688002Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6688002Test.java index 1c4ac758575..1d1f728009d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6688002Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6688002Test.java @@ -23,6 +23,8 @@ package stream; +import static jaxp.library.JAXPTestUtilities.USER_DIR; + import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.InputStream; @@ -67,15 +69,15 @@ public class Bug6688002Test { } public class MyRunnable implements Runnable { - final int no; + final String no; MyRunnable(int no) { - this.no = no; + this.no = String.valueOf(no); } public void run() { try { - FileOutputStream fos = new FileOutputStream("" + no); + FileOutputStream fos = new FileOutputStream(USER_DIR + no); XMLStreamWriter w = getWriter(fos); // System.out.println("Writer="+w+" Thread="+Thread.currentThread()); w.writeStartDocument(); @@ -89,7 +91,7 @@ public class Bug6688002Test { w.close(); fos.close(); - FileInputStream fis = new FileInputStream("" + no); + FileInputStream fis = new FileInputStream(USER_DIR + no); XMLStreamReader r = getReader(fis); while (r.hasNext()) { r.next(); diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/ReaderToWriterTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/ReaderToWriterTest.java index 3bd3ca25296..28b871afcd9 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/ReaderToWriterTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/ReaderToWriterTest.java @@ -23,6 +23,8 @@ package stream.XMLEventWriterTest; +import static jaxp.library.JAXPTestUtilities.USER_DIR; + import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; @@ -58,7 +60,7 @@ public class ReaderToWriterTest { private static final XMLOutputFactory XML_OUTPUT_FACTORY = XMLOutputFactory.newInstance(); private static final String INPUT_FILE = "W2JDLR4002TestService.wsdl.data"; - private static final String OUTPUT_FILE = "Encoded.wsdl"; + private static final String OUTPUT_FILE = USER_DIR + "Encoded.wsdl"; /** * Unit test for writing namespaces when namespaceURI == null. @@ -126,7 +128,7 @@ public class ReaderToWriterTest { try { InputStream in = getClass().getResourceAsStream("ReaderToWriterTest.wsdl"); - OutputStream out = new FileOutputStream("ReaderToWriterTest-out.xml"); + OutputStream out = new FileOutputStream(USER_DIR + "ReaderToWriterTest-out.xml"); XMLEventReader reader = XML_INPUT_FACTORY.createXMLEventReader(in); XMLEventWriter writer = XML_OUTPUT_FACTORY.createXMLEventWriter(out, "UTF-8"); diff --git a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/WriterTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/WriterTest.java index 7e681e343c4..abb9957a256 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/WriterTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/WriterTest.java @@ -23,6 +23,8 @@ package stream.XMLStreamWriterTest; +import static jaxp.library.JAXPTestUtilities.USER_DIR; + import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; @@ -84,7 +86,7 @@ public class WriterTest { System.out.println("Test StreamWriter with out any namespace functionality"); try { - String outputFile = files[0] + ".out"; + String outputFile = USER_DIR + files[0] + ".out"; System.out.println("Writing output to " + outputFile); xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING); @@ -98,7 +100,7 @@ public class WriterTest { xtw.flush(); xtw.close(); - Assert.assertTrue(checkResults(files[0] + ".out", files[0] + ".org")); + Assert.assertTrue(checkResults(outputFile, files[0] + ".org")); } catch (Exception ex) { Assert.fail("testOne Failed " + ex); @@ -113,7 +115,7 @@ public class WriterTest { System.out.println("Test StreamWriter's Namespace Context"); try { - String outputFile = files[1] + ".out"; + String outputFile = USER_DIR + files[1] + ".out"; System.out.println("Writing output to " + outputFile); xtw = outputFactory.createXMLStreamWriter(System.out); @@ -157,7 +159,7 @@ public class WriterTest { System.out.println("Test StreamWriter for proper element sequence."); try { - String outputFile = files[2] + ".out"; + String outputFile = USER_DIR + files[2] + ".out"; System.out.println("Writing output to " + outputFile); xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING); @@ -172,7 +174,7 @@ public class WriterTest { xtw.flush(); xtw.close(); - Assert.assertTrue(checkResults(files[2] + ".out", files[2] + ".org")); + Assert.assertTrue(checkResults(outputFile, files[2] + ".org")); } catch (Exception ex) { Assert.fail("testThree Failed " + ex); @@ -188,7 +190,7 @@ public class WriterTest { try { - String outputFile = files[3] + ".out"; + String outputFile = USER_DIR + files[3] + ".out"; System.out.println("Writing output to " + outputFile); xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING); @@ -205,7 +207,7 @@ public class WriterTest { xtw.flush(); xtw.close(); - Assert.assertTrue(checkResults(files[3] + ".out", files[3] + ".org")); + Assert.assertTrue(checkResults(outputFile, files[3] + ".org")); } catch (Exception ex) { Assert.fail("testFour Failed " + ex); @@ -221,7 +223,7 @@ public class WriterTest { try { - String outputFile = files[4] + ".out"; + String outputFile = USER_DIR + files[4] + ".out"; System.out.println("Writing output to " + outputFile); xtw = outputFactory.createXMLStreamWriter(System.out); @@ -265,7 +267,7 @@ public class WriterTest { xtw.writeEndDocument(); xtw.flush(); xtw.close(); - Assert.assertTrue(checkResults(files[4] + ".out", files[4] + ".org")); + Assert.assertTrue(checkResults(outputFile, files[4] + ".org")); System.out.println("Done"); } catch (Exception ex) { Assert.fail("testFive Failed " + ex); @@ -281,7 +283,7 @@ public class WriterTest { try { - String outputFile = files[5] + ".out"; + String outputFile = USER_DIR + files[5] + ".out"; System.out.println("Writing output to " + outputFile); xtw = outputFactory.createXMLStreamWriter(System.out); @@ -325,7 +327,7 @@ public class WriterTest { xtw.writeEndDocument(); xtw.flush(); xtw.close(); - Assert.assertTrue(checkResults(files[5] + ".out", files[5] + ".org")); + Assert.assertTrue(checkResults(outputFile, files[5] + ".org")); System.out.println("Done"); } catch (Exception ex) { Assert.fail("testSix Failed " + ex); @@ -341,7 +343,7 @@ public class WriterTest { try { - String outputFile = files[6] + ".out"; + String outputFile = USER_DIR + files[6] + ".out"; System.out.println("Writing output to " + outputFile); xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING); @@ -374,7 +376,7 @@ public class WriterTest { xtw.writeEndDocument(); xtw.flush(); xtw.close(); - Assert.assertTrue(checkResults(files[6] + ".out", files[6] + ".org")); + Assert.assertTrue(checkResults(outputFile, files[6] + ".org")); System.out.println("Done"); } catch (Exception ex) { Assert.fail("testSeven Failed " + ex); @@ -390,7 +392,7 @@ public class WriterTest { try { - String outputFile = files[7] + ".out"; + String outputFile = USER_DIR + files[7] + ".out"; System.out.println("Writing output to " + outputFile); outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, new Boolean(true)); xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING); @@ -424,7 +426,7 @@ public class WriterTest { xtw.flush(); xtw.close(); // check against testSeven.xml.org - Assert.assertTrue(checkResults(files[7] + ".out", files[7] + ".org")); + Assert.assertTrue(checkResults(outputFile, files[7] + ".org")); System.out.println("Done"); } catch (Exception ex) { ex.printStackTrace(); @@ -442,7 +444,7 @@ public class WriterTest { try { - String outputFile = files[8] + ".out"; + String outputFile = USER_DIR + files[8] + ".out"; System.out.println("Writing output to " + outputFile); outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, new Boolean(true)); xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING); @@ -476,7 +478,7 @@ public class WriterTest { xtw.flush(); xtw.close(); // check against testSeven.xml.org - Assert.assertTrue(checkResults(files[8] + ".out", files[7] + ".org")); + Assert.assertTrue(checkResults(outputFile, files[7] + ".org")); System.out.println("Done"); } catch (Exception ex) { Assert.fail("testNine Failed " + ex); @@ -491,7 +493,7 @@ public class WriterTest { System.out.println("Test StreamWriter supplied with no namespace information and" + "isRepairingNamespace is set to true."); try { - String outputFile = files[9] + ".out"; + String outputFile = USER_DIR + files[9] + ".out"; System.out.println("Writing output to " + outputFile); outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, new Boolean(true)); xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING); @@ -542,7 +544,7 @@ public class WriterTest { System.out.println("Test StreamWriter supplied with namespace information passed through startElement and" + "isRepairingNamespace is set to true."); try { - String outputFile = files[10] + ".out"; + String outputFile = USER_DIR + files[10] + ".out"; System.out.println("Writing output to " + outputFile); outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, new Boolean(true)); xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING); @@ -576,7 +578,7 @@ public class WriterTest { xtw.flush(); xtw.close(); // check against testSeven.xml.org - Assert.assertTrue(checkResults(files[10] + ".out", files[7] + ".org")); + Assert.assertTrue(checkResults(outputFile, files[7] + ".org")); System.out.println("Done"); } catch (Exception ex) { Assert.fail("testEleven Failed " + ex); @@ -592,7 +594,7 @@ public class WriterTest { try { - String outputFile = files[11] + ".out"; + String outputFile = USER_DIR + files[11] + ".out"; System.out.println("Writing output to " + outputFile); outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, new Boolean(true)); xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING); @@ -643,7 +645,7 @@ public class WriterTest { try { - String outputFile = files[12] + ".out"; + String outputFile = USER_DIR + files[12] + ".out"; System.out.println("Writing output to " + outputFile); outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, new Boolean(true)); xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING); @@ -695,7 +697,7 @@ public class WriterTest { try { - String outputFile = files[14] + ".out"; + String outputFile = USER_DIR + files[14] + ".out"; System.out.println("Writing output to " + outputFile); outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, new Boolean(true)); xtw = outputFactory.createXMLStreamWriter(new FileOutputStream(outputFile), ENCODING); diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341Test.java index 2b2a1e94506..1e4266d65e7 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341Test.java @@ -23,6 +23,8 @@ package transform; +import static jaxp.library.JAXPTestUtilities.USER_DIR; + import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; @@ -55,7 +57,7 @@ public class Bug4693341Test { // save dtd file to current working directory to avoid writing into source repository public void copyDTDtoWorkDir() throws IOException { try (FileInputStream dtdres = new FileInputStream(getClass().getResource("Bug4693341.dtd").getPath()); - FileOutputStream dtdwork = new FileOutputStream("Bug4693341.dtd");) { + FileOutputStream dtdwork = new FileOutputStream(USER_DIR + "Bug4693341.dtd");) { int n; byte[] buffer = new byte[1024]; while((n = dtdres.read(buffer)) > -1) { @@ -71,7 +73,7 @@ public class Bug4693341Test { copyDTDtoWorkDir(); - File outf = new File("Bug4693341.out"); + File outf = new File(USER_DIR + "Bug4693341.out"); StreamResult result = new StreamResult(new FileOutputStream(outf)); String in = getClass().getResource("Bug4693341.xml").getPath(); diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4892774.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4892774.java index cb92eb762ed..0419c1cf8bc 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4892774.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4892774.java @@ -23,6 +23,8 @@ package transform; +import static jaxp.library.JAXPTestUtilities.USER_DIR; + import java.io.File; import javax.xml.transform.Source; @@ -58,7 +60,7 @@ public class Bug4892774 { private final String XML_FILE = "catalog.xml"; private final String XML10_FILE = "catalog_10.xml"; // 1.0 version document - private final String TEMP_FILE = "tmp.xml"; + private final String TEMP_FILE = USER_DIR + "tmp.xml"; private final String EXPECTED_VERSION = "1.1"; static private Transformer idTransform = null; diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6216226Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6216226Test.java index 7031585a864..9ba16dbc9c1 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6216226Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6216226Test.java @@ -23,6 +23,7 @@ package transform; +import static jaxp.library.JAXPTestUtilities.USER_DIR; import static jaxp.library.JAXPTestUtilities.runWithTmpPermission; import java.io.File; @@ -52,7 +53,7 @@ public class Bug6216226Test { @Test public final void test() { try { - File test = new File("bug6216226.txt"); + File test = new File(USER_DIR + "bug6216226.txt"); TransformerFactory tf = TransformerFactory.newInstance(); Transformer xformer = tf.newTransformer(); StringReader st = new StringReader(""); diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6935697Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6935697Test.java index db8d8721d2e..fe65ee0e7a9 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/CR6935697Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6935697Test.java @@ -23,6 +23,8 @@ package transform; +import static jaxp.library.JAXPTestUtilities.USER_DIR; + import java.io.FileOutputStream; import javax.xml.transform.Result; @@ -65,7 +67,7 @@ public class CR6935697Test { Transformer xformer = template.newTransformer(); // Prepare the input and output files Source source = new StreamSource(getClass().getResourceAsStream(inFilename)); - Result result = new StreamResult(new FileOutputStream(outFilename)); + Result result = new StreamResult(new FileOutputStream(USER_DIR + outFilename)); // Apply the xsl file to the source file and write the result to the // output file xformer.transform(source, result); diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/XSLTFunctionsTest.java b/jaxp/test/javax/xml/jaxp/unittest/transform/XSLTFunctionsTest.java index 87360daf486..3f99410869b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/XSLTFunctionsTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/XSLTFunctionsTest.java @@ -23,6 +23,7 @@ package transform; +import java.io.FilePermission; import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; @@ -46,6 +47,7 @@ import static org.testng.Assert.assertEquals; import static jaxp.library.JAXPTestUtilities.runWithAllPerm; import static jaxp.library.JAXPTestUtilities.clearSystemProperty; import static jaxp.library.JAXPTestUtilities.setSystemProperty; +import static jaxp.library.JAXPTestUtilities.tryRunWithTmpPermission; import static jaxp.library.JAXPTestUtilities.getSystemProperty; /* @@ -77,7 +79,9 @@ public class XSLTFunctionsTest { Transformer t = tf.newTransformer(new StreamSource(new StringReader(xsl))); //Transform the xml - t.transform(new StreamSource(new StringReader(xml)), new StreamResult(new StringWriter())); + tryRunWithTmpPermission( + () -> t.transform(new StreamSource(new StringReader(xml)), new StreamResult(new StringWriter())), + new FilePermission(output, "write"), new FilePermission(redirect, "write")); // Verifies that the output is redirected successfully String userDir = getSystemProperty("user.dir"); diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/util/TransformerUtil.java b/jaxp/test/javax/xml/jaxp/unittest/transform/util/TransformerUtil.java index 61d7bfe09db..3294aeb93ae 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/transform/util/TransformerUtil.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/util/TransformerUtil.java @@ -23,6 +23,8 @@ package transform.util; +import static jaxp.library.JAXPTestUtilities.USER_DIR; + import java.io.InputStream; import javax.xml.parsers.DocumentBuilder; @@ -34,7 +36,7 @@ public abstract class TransformerUtil { protected String type; - protected final String TEMP_FILE = "tmp.xml"; + protected final String TEMP_FILE = USER_DIR + "tmp.xml"; public abstract Source prepareSource(InputStream is) throws Exception; diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/CR6708840Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/CR6708840Test.java index d3a0f1ef40c..71f55a4f3c4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/CR6708840Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/CR6708840Test.java @@ -23,6 +23,8 @@ package validation; +import static jaxp.library.JAXPTestUtilities.USER_DIR; + import java.io.File; import java.io.FileWriter; @@ -122,7 +124,7 @@ public class CR6708840Test { Validator schemaValidator = schemaGrammar.newValidator(); Source staxSrc = new StAXSource(staxReader); - File resultFile = new File("gMonths.result.xml"); + File resultFile = new File(USER_DIR + "gMonths.result.xml"); if (resultFile.exists()) { resultFile.delete(); } diff --git a/jaxp/test/javax/xml/jaxp/unittest/validation/ValidatorTest.java b/jaxp/test/javax/xml/jaxp/unittest/validation/ValidatorTest.java index 40ca0cc8d3a..22317b325bb 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/validation/ValidatorTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/ValidatorTest.java @@ -23,6 +23,7 @@ package validation; +import static jaxp.library.JAXPTestUtilities.USER_DIR; import static jaxp.library.JAXPTestUtilities.runWithTmpPermission; import java.io.File; @@ -61,7 +62,7 @@ public class ValidatorTest { File resultFile = null; try { - resultFile = new File("stax.result"); + resultFile = new File(USER_DIR + "stax.result"); if (resultFile.exists()) { resultFile.delete(); } @@ -88,7 +89,7 @@ public class ValidatorTest { File resultFile = null; try { - resultFile = new File("stax.result"); + resultFile = new File(USER_DIR + "stax.result"); if (resultFile.exists()) { resultFile.delete(); } @@ -117,7 +118,7 @@ public class ValidatorTest { // test valid gMonths File resultFile = null; try { - resultFile = new File("gMonths.result.xml"); + resultFile = new File(USER_DIR + "gMonths.result.xml"); if (resultFile.exists()) { resultFile.delete(); } @@ -144,7 +145,7 @@ public class ValidatorTest { // test invalid gMonths File invalidResultFile = null; try { - invalidResultFile = new File("gMonths-invalid.result.xml"); + invalidResultFile = new File(USER_DIR + "gMonths-invalid.result.xml"); if (invalidResultFile.exists()) { invalidResultFile.delete(); } From 8b70c12905d51c2a845db38416bc47f33f1353d9 Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Thu, 16 Feb 2017 17:21:03 +0300 Subject: [PATCH 241/447] 6622944: Use package-info.java instead of package.html within awt packages Reviewed-by: darcy --- .../java/awt/datatransfer/package-info.java | 42 +++++ .../java/awt/datatransfer/package.html | 64 -------- .../classes/java/awt/color/package-info.java | 34 ++++ .../share/classes/java/awt/color/package.html | 55 ------- .../java/awt/desktop/package-info.java | 32 ++++ .../classes/java/awt/desktop/package.html | 36 ----- .../classes/java/awt/dnd/package-info.java | 110 +++++++++++++ .../share/classes/java/awt/dnd/package.html | 146 ------------------ .../java/awt/dnd/peer/package-info.java | 33 ++++ .../classes/java/awt/dnd/peer/package.html | 51 ------ .../classes/java/awt/event/package-info.java | 37 +++++ .../share/classes/java/awt/event/package.html | 58 ------- .../classes/java/awt/font/package-info.java | 33 ++++ .../share/classes/java/awt/font/package.html | 53 ------- .../classes/java/awt/geom/package-info.java | 41 +++++ .../share/classes/java/awt/geom/package.html | 63 -------- .../classes/java/awt/im/package-info.java | 56 +++++++ .../share/classes/java/awt/im/package.html | 69 --------- .../classes/java/awt/im/spi/package-info.java | 101 ++++++++++++ .../classes/java/awt/im/spi/package.html | 125 --------------- .../classes/java/awt/image/package-info.java | 38 +++++ .../share/classes/java/awt/image/package.html | 58 ------- .../awt/image/renderable/package-info.java | 31 ++++ .../java/awt/image/renderable/package.html | 52 ------- .../share/classes/java/awt/package-info.java | 61 ++++++++ .../share/classes/java/awt/package.html | 83 ---------- .../classes/java/awt/peer/package-info.java | 31 ++++ .../share/classes/java/awt/peer/package.html | 51 ------ .../classes/java/awt/print/package-info.java | 37 +++++ .../share/classes/java/awt/print/package.html | 58 ------- 30 files changed, 717 insertions(+), 1022 deletions(-) create mode 100644 jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/package-info.java delete mode 100644 jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/package.html create mode 100644 jdk/src/java.desktop/share/classes/java/awt/color/package-info.java delete mode 100644 jdk/src/java.desktop/share/classes/java/awt/color/package.html create mode 100644 jdk/src/java.desktop/share/classes/java/awt/desktop/package-info.java delete mode 100644 jdk/src/java.desktop/share/classes/java/awt/desktop/package.html create mode 100644 jdk/src/java.desktop/share/classes/java/awt/dnd/package-info.java delete mode 100644 jdk/src/java.desktop/share/classes/java/awt/dnd/package.html create mode 100644 jdk/src/java.desktop/share/classes/java/awt/dnd/peer/package-info.java delete mode 100644 jdk/src/java.desktop/share/classes/java/awt/dnd/peer/package.html create mode 100644 jdk/src/java.desktop/share/classes/java/awt/event/package-info.java delete mode 100644 jdk/src/java.desktop/share/classes/java/awt/event/package.html create mode 100644 jdk/src/java.desktop/share/classes/java/awt/font/package-info.java delete mode 100644 jdk/src/java.desktop/share/classes/java/awt/font/package.html create mode 100644 jdk/src/java.desktop/share/classes/java/awt/geom/package-info.java delete mode 100644 jdk/src/java.desktop/share/classes/java/awt/geom/package.html create mode 100644 jdk/src/java.desktop/share/classes/java/awt/im/package-info.java delete mode 100644 jdk/src/java.desktop/share/classes/java/awt/im/package.html create mode 100644 jdk/src/java.desktop/share/classes/java/awt/im/spi/package-info.java delete mode 100644 jdk/src/java.desktop/share/classes/java/awt/im/spi/package.html create mode 100644 jdk/src/java.desktop/share/classes/java/awt/image/package-info.java delete mode 100644 jdk/src/java.desktop/share/classes/java/awt/image/package.html create mode 100644 jdk/src/java.desktop/share/classes/java/awt/image/renderable/package-info.java delete mode 100644 jdk/src/java.desktop/share/classes/java/awt/image/renderable/package.html create mode 100644 jdk/src/java.desktop/share/classes/java/awt/package-info.java delete mode 100644 jdk/src/java.desktop/share/classes/java/awt/package.html create mode 100644 jdk/src/java.desktop/share/classes/java/awt/peer/package-info.java delete mode 100644 jdk/src/java.desktop/share/classes/java/awt/peer/package.html create mode 100644 jdk/src/java.desktop/share/classes/java/awt/print/package-info.java delete mode 100644 jdk/src/java.desktop/share/classes/java/awt/print/package.html diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/package-info.java b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/package-info.java new file mode 100644 index 00000000000..c13a4be834b --- /dev/null +++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/package-info.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides interfaces and classes for transferring data between and within + * applications. It defines the notion of a "transferable" object, which is an + * object capable of being transferred between or within applications. An object + * identifies itself as being transferable by implementing the Transferable + * interface. + *

      + * It also provides a clipboard mechanism, which is an object that temporarily + * holds a transferable object that can be transferred between or within an + * application. The clipboard is typically used for copy and paste operations. + * Although it is possible to create a clipboard to use within an application, + * most applications will use the system clipboard to ensure the data can be + * transferred across applications running on the platform. + * + * @since 1.1 + */ +package java.awt.datatransfer; diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/package.html b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/package.html deleted file mode 100644 index c3b55e88340..00000000000 --- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/package.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - -Provides interfaces and classes for transferring data -between and within applications. It defines the notion of a -"transferable" object, which is an object capable of being -transferred between or within applications. An object identifies -itself as being transferable by implementing the Transferable -interface. -

      -It also provides a clipboard mechanism, which is an object that -temporarily holds a transferable object that can be transferred -between or within an application. The clipboard is typically used -for copy and paste operations. Although it is possible to create -a clipboard to use within an application, most applications will -use the system clipboard to ensure the data can be transferred -across applications running on the platform. - - - -@since 1.1 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/color/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/color/package-info.java new file mode 100644 index 00000000000..ea9d72f7e05 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/color/package-info.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides classes for color spaces. It contains an implementation of a color + * space based on the International Color Consortium (ICC) Profile Format + * Specification, Version 3.4, August 15, 1997. It also contains color profiles + * based on the ICC Profile Format Specification. + * + * @since 1.2 + */ +package java.awt.color; diff --git a/jdk/src/java.desktop/share/classes/java/awt/color/package.html b/jdk/src/java.desktop/share/classes/java/awt/color/package.html deleted file mode 100644 index 41fa95a2f8d..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/color/package.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - -Provides classes for color spaces. It contains an -implementation of a color space based on the International Color -Consortium (ICC) Profile Format Specification, Version 3.4, August 15, -1997. It also contains color profiles based on the ICC Profile Format -Specification. - - - -@since 1.2 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/desktop/package-info.java new file mode 100644 index 00000000000..7f74a1f2ed7 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/desktop/package-info.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides interfaces and classes for interaction with various desktop + * capabilities. + * + * @since 9 + */ +package java.awt.desktop; diff --git a/jdk/src/java.desktop/share/classes/java/awt/desktop/package.html b/jdk/src/java.desktop/share/classes/java/awt/desktop/package.html deleted file mode 100644 index c0043f4fc64..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/desktop/package.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - -Provides interfaces and classes for interaction with various -desktop capabilities. - -@since 9 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/dnd/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/dnd/package-info.java new file mode 100644 index 00000000000..c9561defd87 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/dnd/package-info.java @@ -0,0 +1,110 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Drag and Drop is a direct manipulation gesture found in many Graphical User + * Interface systems that provides a mechanism to transfer information between + * two entities logically associated with presentation elements in the GUI. + * Normally driven by a physical gesture of a human user using an appropriate + * input device, Drag and Drop provides both a mechanism to enable continuous + * feedback regarding the possible outcome of any subsequent data transfer to + * the user during navigation over the presentation elements in the GUI, and the + * facilities to provide for any subsequent data negotiation and transfer. + *

      + * This package defines the classes and interfaces necessary to perform Drag and + * Drop operations in Java. It defines classes for the drag-source and the + * drop-target, as well as events for transferring the data being dragged. This + * package also provides a means for giving visual feedback to the user + * throughout the duration of the Drag and Drop operation. + *

      + * A typical Drag and Drop operation can be decomposed into the following states + * (not entirely sequentially): + *

        + *
      • A {@code DragSource} comes into existence, associated with some + * presentation element ({@code Component}) in the GUI, to initiate a Drag + * and Drop of some potentially {@code Transferable} data.
      • + *
      • 1 or more {@code DropTarget}(s) come into/go out of existence, + * associated with presentation elements in the GUI (Components), + * potentially capable of consuming {@code Transferable} data types.
      • + *
      • A {@code DragGestureRecognizer} is obtained from the + * {@code DragSource} and is associated with a {@code Component} in order to + * track and identify any Drag initiating gesture by the user over the + * {@code Component}.
      • + *
      • A user makes a Drag gesture over the {@code Component}, which the + * registered {@code DragGestureRecognizer} detects, and notifies its + * {@code DragGestureListener} of. + *

        + * Note: Although this API consistently refers to the stimulus for a drag + * and drop operation being a physical gesture by a human user, this does + * not preclude a programmatically driven DnD operation given the + * appropriate implementation of a {@code DragSource}. This package + * contains the abstract class {@code MouseDragGestureRecognizer} for + * recognizing mouse device gestures. Other abstract subclasses may be + * provided by the platform to support other input devices or particular + * {@code Component} class semantics.

      • + *
      • The {@code DragGestureListener} causes the {@code DragSource} to + * initiate the Drag and Drop operation on behalf of the user, perhaps + * animating the GUI Cursor and/or rendering an {@code Image} of the item(s) + * that are the subject of the operation.
      • + *
      • As the user gestures navigate over {@code Component}(s) in the GUI + * with associated {@code DropTarget}(s), the {@code DragSource} receives + * notifications in order to provide "Drag Over" feedback effects, and the + * {@code DropTarget}(s) receive notifications in order to provide + * "Drag Under" feedback effects based upon the operation(s) supported and + * the data type(s) involved.
      • + *
      + *

      + * The gesture itself moves a logical cursor across the GUI hierarchy, + * intersecting the geometry of GUI Component(s), possibly resulting in the + * logical "Drag" cursor entering, crossing, and subsequently leaving + * {@code Component}(s) and associated {@code DropTarget}(s). + *

      + * The {@code DragSource} object manifests "Drag Over" feedback to the user, in + * the typical case by animating the GUI {@code Cursor} associated with the + * logical cursor. + *

      + * {@code DropTarget} objects manifest "Drag Under" feedback to the user, in the + * typical case, by rendering animations into their associated GUI + * {@code Component}(s) under the GUI Cursor. + *

      + * The determination of the feedback effects, and the ultimate success or + * failure of the data transfer, should one occur, is parameterized as follows: + *

        + *
      • By the transfer "operation" selected by the user, and supported by + * both the {@code DragSource} and {@code DropTarget}: Copy, Move or + * Reference(link).
      • + *
      • By the intersection of the set of data types provided by the + * {@code DragSource} and the set of data types comprehensible by the + * {@code DropTarget}.
      • + *
      • When the user terminates the drag operation, normally resulting in a + * successful Drop, both the {@code DragSource} and {@code DropTarget} + * receive notifications that include, and result in the type negotiation + * and transfer of, the information associated with the {@code DragSource} + * via a {@code Transferable} object.
      • + *
      + * + * @since 1.2 + */ +package java.awt.dnd; diff --git a/jdk/src/java.desktop/share/classes/java/awt/dnd/package.html b/jdk/src/java.desktop/share/classes/java/awt/dnd/package.html deleted file mode 100644 index 467348506a5..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/dnd/package.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - -Drag and Drop is a direct manipulation gesture found in many Graphical -User Interface systems that provides a mechanism to transfer -information between two entities logically associated with presentation -elements in the GUI. Normally driven by a physical gesture of a -human user using an appropriate input device, Drag and Drop provides both -a mechanism to enable continuous feedback regarding the -possible outcome of any subsequent data transfer to the user during -navigation over the presentation elements in the GUI, and the facilities -to provide for any subsequent data negotiation and transfer. -

      -This package defines the classes and interfaces necessary to perform Drag -and Drop operations in Java. It -defines classes for the drag-source and the drop-target, as well as -events for transferring the data being dragged. This package also provides -a means for giving visual feedback to the user throughout the -duration of the Drag and Drop operation. -

      -A typical Drag and Drop operation can be decomposed into the following -states (not entirely sequentially): -

        -
      • A DragSource comes into existence, -associated with some presentation -element (Component) in the GUI, to initiate a Drag and Drop of -some potentially Transferable data. -

        -
      • 1 or more DropTarget(s) come into/go out of -existence, associated -with presentation elements in the GUI (Components), potentially -capable of consuming Transferable data types. -

        -
      • A DragGestureRecognizer is -obtained from the DragSource and is -associated with a Component in order -to track and identify any Drag -initiating gesture by the user over the Component. -

        -
      • A user makes a Drag gesture over the Component, -which the registered -DragGestureRecognizer detects, and notifies its -DragGestureListener of. -

        -Note: Although this API consistently refers to the stimulus for a -drag and drop operation being a physical gesture by a human user, this -does not preclude a programmatically driven DnD operation given the -appropriate implementation of a DragSource. This package -contains the abstract class MouseDragGestureRecognizer for -recognizing mouse device gestures. Other abstract subclasses may be -provided by the platform to support other input devices or -particular Component class semantics. -

        -

      • The DragGestureListener causes the -DragSource to initiate the Drag -and Drop operation on behalf of the user, perhaps animating the -GUI Cursor and/or rendering an Image of the item(s) that are the -subject of the operation. -

        -
      • As the user gestures navigate over Component(s) -in the GUI with -associated DropTarget(s), the DragSource -receives notifications in order -to provide "Drag Over" feedback effects, and the DropTarget(s) -receive notifications in order to provide "Drag Under" feedback effects -based upon the operation(s) supported and the data type(s) involved. -
      -

      - -The gesture itself moves a logical cursor across the GUI hierarchy, -intersecting the geometry of GUI Component(s), possibly resulting in -the logical "Drag" cursor entering, crossing, and subsequently -leaving Component(s) and associated DropTarget(s). -

      -The DragSource object manifests "Drag Over" feedback to the user, in the typical case by animating the GUI Cursor associated with the -logical cursor. -

      -DropTarget objects manifest "Drag Under" feedback to the user, in -the typical case, by rendering animations into their associated GUI -Component(s) under the GUI Cursor. -

      -The determination of the feedback effects, and the ultimate success -or failure of the data transfer, should one occur, is parameterized -as follows: -

        -
      • By the transfer "operation" selected by the user, and supported by -both the DragSource and DropTarget: Copy, Move or Reference(link). -

        -
      • By the intersection of the set of data types provided by the -DragSource and the set of data types comprehensible by the -DropTarget. -

        -
      • When the user terminates the drag operation, normally resulting in a -successful Drop, both the DragSource and DropTarget -receive -notifications that include, and result in the type negotiation and -transfer of, the information associated with the DragSource via a -Transferable object. -
      - - - -@since 1.2 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/dnd/peer/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/dnd/peer/package-info.java new file mode 100644 index 00000000000..8505e24ea6a --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/dnd/peer/package-info.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides for interfacing with the underlying window system in order to access + * its platform-dependent drag-and-drop facilities. This package is only used by + * AWT toolkit developers. + * + * @since 1.2 + */ +package java.awt.dnd.peer; diff --git a/jdk/src/java.desktop/share/classes/java/awt/dnd/peer/package.html b/jdk/src/java.desktop/share/classes/java/awt/dnd/peer/package.html deleted file mode 100644 index 6c83292c2c6..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/dnd/peer/package.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - -Provides for interfacing with the underlying window system -in order to access its platform-dependent drag-and-drop facilities. -This package is only used by AWT toolkit developers. - - -

      Package Specification

      - -##### FILL IN ANY SPECS NEEDED BY JAVA COMPATIBILITY KIT ##### - - -

      Related Documentation

      - -For overviews, tutorials, examples, guides, and tool documentation, please see: - - - - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/event/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/event/package-info.java new file mode 100644 index 00000000000..c4dc383729f --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/event/package-info.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides interfaces and classes for dealing with different types of events + * fired by AWT components. See the {@link java.awt.AWTEvent java.awt.AWTEvent} + * class for details on the AWT event model. Events are fired by event sources. + * An event listener registers with an event source to receive notifications + * about the events of a particular type. This package defines events and event + * listeners, as well as event listener adapters, which are convenience classes + * to make easier the process of writing event listeners. + * + * @since 1.1 + */ +package java.awt.event; diff --git a/jdk/src/java.desktop/share/classes/java/awt/event/package.html b/jdk/src/java.desktop/share/classes/java/awt/event/package.html deleted file mode 100644 index 0e2ae752b3e..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/event/package.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - -Provides interfaces and classes for dealing with different -types of events fired by AWT components. See the java.awt.AWTEvent -class for details on the AWT event model. Events are fired by event -sources. An event listener registers with an event source to receive -notifications about the events of a particular type. This package -defines events and event listeners, as well as event listener -adapters, which are convenience classes to make easier the process of -writing event listeners. - - - -@since 1.1 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/font/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/font/package-info.java new file mode 100644 index 00000000000..6cdcd3dc367 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/font/package-info.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides classes and interface relating to fonts. It contains support for + * representing Type 1, Type 1 Multiple Master fonts, OpenType fonts, and + * TrueType fonts. + * + * @since 1.2 + */ +package java.awt.font; diff --git a/jdk/src/java.desktop/share/classes/java/awt/font/package.html b/jdk/src/java.desktop/share/classes/java/awt/font/package.html deleted file mode 100644 index 22e71ba1c59..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/font/package.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - -Provides classes and interface relating to fonts. It -contains support for representing Type 1, Type 1 Multiple Master -fonts, OpenType fonts, and TrueType fonts. - - - -@since 1.2 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/geom/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/geom/package-info.java new file mode 100644 index 00000000000..2ef69baf446 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/geom/package-info.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides the Java 2D classes for defining and performing operations on + * objects related to two-dimensional geometry. Some important features of the + * package include: + *
        + *
      • classes for manipulating geometry, such as AffineTransform and the + * PathIterator interface which is implemented by all Shape objects.
      • + *
      • classes that implement the Shape interface, such as CubicCurve2D, + * Ellipse2D, Line2D, Rectangle2D, and GeneralShape.
      • + *
      • the Area class which provides mechanisms for add (union), subtract, + * intersect, and exclusiveOR operations on other Shape objects.
      • + *
      + * + * @since 1.2 + */ +package java.awt.geom; diff --git a/jdk/src/java.desktop/share/classes/java/awt/geom/package.html b/jdk/src/java.desktop/share/classes/java/awt/geom/package.html deleted file mode 100644 index de8b62c9a6f..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/geom/package.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - -Provides the Java 2D classes for defining and performing operations -on objects related to two-dimensional geometry. Some important features -of the package include: -
        -
      • classes for manipulating geometry, such as AffineTransform and -the PathIterator interface which is implemented by all Shape objects. - -
      • classes that implement the Shape interface, such as -CubicCurve2D, Ellipse2D, Line2D, Rectangle2D, and GeneralShape. - -
      • the Area class which provides mechanisms for add (union), subtract, -intersect, and exclusiveOR operations on other Shape objects. -
      - - - -@since 1.2 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/im/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/im/package-info.java new file mode 100644 index 00000000000..59da280defe --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/im/package-info.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides classes and interfaces for the input method framework. This package + * enables text editing components to receive text input through input methods. + * Input methods are software components that let the user enter text in ways + * other than simple typing on a keyboard. They are commonly used to enter + * Japanese, Chinese, or Korean - languages using thousands of different + * characters - on keyboards with far fewer keys. However, the framework also + * supports input methods for other languages and the use of entirely different + * input mechanisms, such as handwriting or speech recognition. + * + *

      Package Specification

      + * + * + *

      Related Documentation

      + * For overviews, tutorials, examples, guides, and tool documentation, please + * see: + * + * + * @since 1.2 + */ +package java.awt.im; diff --git a/jdk/src/java.desktop/share/classes/java/awt/im/package.html b/jdk/src/java.desktop/share/classes/java/awt/im/package.html deleted file mode 100644 index 552ca18e0a4..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/im/package.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - -

      Provides classes and interfaces for the input method framework. -This package enables text editing components to receive text input -through input methods. Input methods are software components that let -the user enter text in ways other than simple typing on a keyboard. -They are commonly used to enter Japanese, Chinese, or Korean - -languages using thousands of different characters - on keyboards with -far fewer keys. However, the framework also supports input methods -for other languages and the use of entirely different input -mechanisms, such as handwriting or speech recognition.

      - -

      Package Specification

      - - - -

      Related Documentation

      - -

      For overviews, tutorials, examples, guides, and tool -documentation, please see:

      - - - -@since 1.2 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/im/spi/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/im/spi/package-info.java new file mode 100644 index 00000000000..c6badd26e0f --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/im/spi/package-info.java @@ -0,0 +1,101 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides interfaces that enable the development of input methods that can be + * used with any Java runtime environment. Input methods are software components + * that let the user enter text in ways other than simple typing on a keyboard. + * They are commonly used to enter Japanese, Chinese, or Korean - languages + * using thousands of different characters - on keyboards with far fewer keys. + * However, this package also allows the development of input methods for other + * languages and the use of entirely different input mechanisms, such as + * handwriting recognition. + * + *

      Package Specification

      + * + * + *

      Packaging Input Methods

      + * Input methods can be made available by adding them to the application's class + * path. The main JAR file of an input method must contain the file: + *
      + *     META-INF/services/java.awt.im.spi.InputMethodDescriptor
      + * 
      + * The file should contain a list of fully-qualified class names, one per line, + * of classes implementing the {@code java.awt.im.spi.InputMethodDescriptor} + * interface. Space and tab characters surrounding each name, as well as blank + * lines, are ignored. The comment character is {@code '#'} + * ({@code \u005Cu0023}); on each line all characters following the first + * comment character are ignored. The file must be encoded in UTF-8. + *

      + * For example, if the fully-qualified name of the class that implements + * {@code java.awt.im.spi.InputMethodDesciptor} for the Foo input + * method is {@code com.sun.ime.FooInputMethodDescriptor}, the file + * {@code META-INF/services/java.awt.im.spi.InputMethodDescriptor} + * contains a line: + *

      + *     com.sun.ime.FooInputMethodDescriptor
      + * 
      + * The input method must also provide at least two classes: one class + * implementing the {@code java.awt.im.spi.InputMethodDescriptor} interface, one + * class implementing the {@code java.awt.im.spi.InputMethod} interface. The + * input method should separate the implementations for these interfaces, so + * that loading of the class implementing {@code InputMethod} can be deferred + * until actually needed. + * + *

      Loading Input Methods

      + * The input method framework will usually defer loading of input method + * classes until they are absolutely needed. It loads only the + * {@code InputMethodDescriptor} implementations during AWT initialization. It + * loads an {@code InputMethod} implementation when the input method has been + * selected. + * + *

      Java Input Methods and Peered Text + * Components

      + * The Java input method framework intends to support all combinations of input + * methods (host input methods and Java input methods) and components (peered + * and lightweight). However, because of limitations in the underlying platform, + * it may not always be possible to enable the communication between Java input + * methods and peered AWT components. Support for this specific combination is + * therefore platform dependent. In Sun's Java SE Runtime Environments, this + * combination is supported on Windows, but not on Solaris. + * + *

      Related Documentation

      + * For overviews, tutorials, examples, guides, and tool documentation, please + * see: + * + * + * @since 1.3 + */ +package java.awt.im.spi; diff --git a/jdk/src/java.desktop/share/classes/java/awt/im/spi/package.html b/jdk/src/java.desktop/share/classes/java/awt/im/spi/package.html deleted file mode 100644 index 2e63c9297cd..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/im/spi/package.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - Package java.awt.im.spi Description - - - - - -

      Provides interfaces that enable the development of input methods -that can be used with any Java runtime environment. Input methods are -software components that let the user enter text in ways other than -simple typing on a keyboard. They are commonly used to enter -Japanese, Chinese, or Korean - languages using thousands of different -characters - on keyboards with far fewer keys. However, this package -also allows the development of input methods for other languages and -the use of entirely different input mechanisms, such as handwriting -recognition.

      - -

      Package Specification

      - - - -

      Packaging Input Methods

      - -

      Input methods can be made available by adding them to the application's -class path. The main JAR file of an input method must contain the -file:

      - -
          META-INF/services/java.awt.im.spi.InputMethodDescriptor
      - -

      The file should contain a list of fully-qualified class names, one -per line, of classes implementing the -java.awt.im.spi.InputMethodDescriptor interface. Space -and tab characters surrounding each name, as well as blank lines, are -ignored. The comment character is '#' -(\u0023); on each line all characters following the -first comment character are ignored. The file must be encoded in -UTF-8.

      - -

      For example, if the fully-qualified name of the class that -implements java.awt.im.spi.InputMethodDesciptor for the -Foo input method is -com.sun.ime.FooInputMethodDescriptor, the file -META-INF/services/java.awt.im.spi.InputMethodDescriptor -contains a line:

      - -
          com.sun.ime.FooInputMethodDescriptor
      - -

      The input method must also provide at least two classes: one class -implementing the java.awt.im.spi.InputMethodDescriptor -interface, one class implementing the -java.awt.im.spi.InputMethod interface. The input method -should separate the implementations for these interfaces, so that -loading of the class implementing InputMethod can be -deferred until actually needed.

      - -

      Loading Input Methods

      - -

      The input method framework will usually defer loading of input -method classes until they are absolutely needed. It loads only the -InputMethodDescriptor implementations during AWT -initialization. It loads an InputMethod implementation -when the input method has been selected.

      - -

      Java Input Methods and Peered Text -Components

      - -

      The Java input method framework intends to support all -combinations of input methods (host input methods and Java input -methods) and components (peered and lightweight). However, because of -limitations in the underlying platform, it may not always be possible -to enable the communication between Java input methods and peered AWT -components. Support for this specific combination is therefore -platform dependent. In Sun's Java SE Runtime Environments, this -combination is supported on Windows, but not on Solaris.

      - -

      Related Documentation

      - -

      For overviews, tutorials, examples, guides, and tool -documentation, please see:

      - - - -@since 1.3 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/image/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/image/package-info.java new file mode 100644 index 00000000000..d7be6d13963 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/image/package-info.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides classes for creating and modifying images. Images are processed + * using a streaming framework that involves an image producer, optional image + * filters, and an image consumer. This framework makes it possible to + * progressively render an image while it is being fetched and generated. + * Moreover, the framework allows an application to discard the storage used by + * an image and to regenerate it at any time. This package provides a number of + * image producers, consumers, and filters that you can configure for your image + * processing needs. + * + * @since 1.0 + */ +package java.awt.image; diff --git a/jdk/src/java.desktop/share/classes/java/awt/image/package.html b/jdk/src/java.desktop/share/classes/java/awt/image/package.html deleted file mode 100644 index 5ea3b800a63..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/image/package.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - -Provides classes for creating and modifying images. -Images are processed using a streaming framework that involves an -image producer, optional image filters, and an image consumer. This -framework makes it possible to progressively render an image while it -is being fetched and generated. Moreover, the framework allows an -application to discard the storage used by an image and to regenerate -it at any time. This package provides a number of image producers, -consumers, and filters that you can configure for your image -processing needs. - - -@since 1.0 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/image/renderable/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/image/renderable/package-info.java new file mode 100644 index 00000000000..dc02c0d5c2a --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/image/renderable/package-info.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides classes and interfaces for producing rendering-independent images. + * + * @since 1.2 + */ +package java.awt.image.renderable; diff --git a/jdk/src/java.desktop/share/classes/java/awt/image/renderable/package.html b/jdk/src/java.desktop/share/classes/java/awt/image/renderable/package.html deleted file mode 100644 index c75fb1f166b..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/image/renderable/package.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - -Provides classes and interfaces for producing -rendering-independent images. - - - -@since 1.2 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/package-info.java new file mode 100644 index 00000000000..b2335c33ead --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/package-info.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Contains all of the classes for creating user interfaces and for painting + * graphics and images. A user interface object such as a button or a scrollbar + * is called, in AWT terminology, a component. The Component class is the root + * of all AWT components. See Component for a detailed description of properties + * that all AWT components share. + *

      + * Some components fire events when a user interacts with the components. The + * AWTEvent class and its subclasses are used to represent the events that AWT + * components can fire. See AWTEvent for a description of the AWT event model. + *

      + * A container is a component that can contain components and other containers. + * A con tainer can also have a layout manager that controls the visual + * placement of components in the container. The AWT package contains several + * layout manager classes and an interface for building your own layout manager. + * See Container and LayoutManager for more information. + *

      + * Each {@code Component} object is limited in its maximum size and its location + * because the values are stored as an integer. Also, a platform may further + * restrict maximum size and location coordinates. The exact maximum values are + * dependent on the platform. There is no way to change these maximum values, + * either in Java code or in native code. These limitations also impose + * restrictions on component layout. If the bounds of a Component object exceed + * a platform limit, there is no way to properly arrange them within a Container + * object. The object's bounds are defined by any object's coordinate in + * combination with its size on a respective axis. + * + *

      Additional Specification

      + * + * + * @since 1.0 + */ +package java.awt; diff --git a/jdk/src/java.desktop/share/classes/java/awt/package.html b/jdk/src/java.desktop/share/classes/java/awt/package.html deleted file mode 100644 index ebab6ec0eb4..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/package.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - -Contains all of the classes for creating user -interfaces and for painting graphics and images. A user interface object such as a button or a -scrollbar is called, in AWT terminology, a component. The Component class is the root of all -AWT components. See Component for a detailed description of properties that all AWT -components share. -

      -Some components fire events when a user interacts with the components. The AWTEvent -class and its subclasses are used to represent the events that AWT components can fire. See -AWTEvent for a description of the AWT event model. -

      -A container is a component that can contain components and other containers. A con -tainer can also have a layout manager that controls the visual placement of components in the -container. The AWT package contains several layout manager classes and an interface for -building your own layout manager. See Container and LayoutManager for more information. -

      -Each {@code Component} object is limited in its maximum size and -its location because the values are stored as an integer. -Also, a platform may further restrict maximum size and location -coordinates. The exact maximum values are dependent on the platform. -There is no way to change these maximum values, either in Java -code or in native code. -These limitations also impose restrictions on component layout. -If the bounds of a Component object exceed a platform limit, -there is no way to properly arrange them within a Container object. -The object's bounds are defined by any object's coordinate -in combination with its size on a respective axis. - - -

      Additional Specification

      - - - - -@since 1.0 - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/peer/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/peer/package-info.java new file mode 100644 index 00000000000..49b68401db0 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/peer/package-info.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides for interfacing with the underlying window system. It is for + * accessing the platform-specific facilities in order to build AWT toolkits. It + * is only used by AWT toolkit developers. + */ +package java.awt.peer; diff --git a/jdk/src/java.desktop/share/classes/java/awt/peer/package.html b/jdk/src/java.desktop/share/classes/java/awt/peer/package.html deleted file mode 100644 index aeb98b2115d..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/peer/package.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - -Provides for interfacing with the underlying window system. -It is for accessing the platform-specific facilities in order to -build AWT toolkits. It is only used by AWT toolkit developers. - - -

      Package Specification

      - -##### FILL IN ANY SPECS NEEDED BY JAVA COMPATIBILITY KIT ##### - - -

      Related Documentation

      - -For overviews, tutorials, examples, guides, and tool documentation, please see: - - - - - diff --git a/jdk/src/java.desktop/share/classes/java/awt/print/package-info.java b/jdk/src/java.desktop/share/classes/java/awt/print/package-info.java new file mode 100644 index 00000000000..76dfb743339 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/java/awt/print/package-info.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides classes and interfaces for a general printing API. The API includes + * such features as: + *
        + *
      • the ability to specify document types
      • + *
      • mechanisms for control of page setup and page formats
      • + *
      • the ability to manage job control dialogs
      • + *
      + * + * @since 1.2 + */ +package java.awt.print; diff --git a/jdk/src/java.desktop/share/classes/java/awt/print/package.html b/jdk/src/java.desktop/share/classes/java/awt/print/package.html deleted file mode 100644 index 6c708d59c67..00000000000 --- a/jdk/src/java.desktop/share/classes/java/awt/print/package.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - -Provides classes and interfaces for a general printing API. The -API includes such features as: -
        -
      • the ability to specify document types -
      • mechanisms for control of page setup and page formats -
      • the ability to manage job control dialogs -
      - - - - -@since 1.2 - - From cf871d92f9a711ff9bf435da96393faa0c7af1dd Mon Sep 17 00:00:00 2001 From: Claes Redestad Date: Thu, 16 Feb 2017 17:28:50 +0100 Subject: [PATCH 242/447] 8175079: Lazy initialization of ImageReader breaks rmid Reviewed-by: alanb --- jdk/src/java.base/share/classes/java/lang/System.java | 3 --- .../share/classes/jdk/internal/module/ModuleBootstrap.java | 7 +------ 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/lang/System.java b/jdk/src/java.base/share/classes/java/lang/System.java index 106ad0fb291..c086071df0e 100644 --- a/jdk/src/java.base/share/classes/java/lang/System.java +++ b/jdk/src/java.base/share/classes/java/lang/System.java @@ -1945,9 +1945,6 @@ public final class System { // set security manager String cn = System.getProperty("java.security.manager"); if (cn != null) { - // ensure image reader for java.base is initialized before security manager - Object.class.getResource("module-info.class"); - if (cn.isEmpty() || "default".equals(cn)) { System.setSecurityManager(new SecurityManager()); } else { diff --git a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java index 6fe2e7423b7..b2c1b4b3548 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java @@ -115,12 +115,7 @@ public final class ModuleBootstrap { long t0 = System.nanoTime(); // system modules (may be patched) - ModuleFinder systemModules; - if (SystemModules.MODULE_NAMES.length > 0) { - systemModules = SystemModuleFinder.getInstance(); - } else { - systemModules = ModuleFinder.ofSystem(); - } + ModuleFinder systemModules = ModuleFinder.ofSystem(); PerfCounters.systemModulesTime.addElapsedTimeFrom(t0); From d66ab6ffc5b85f640033fb9331b62763b4df1b1a Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 16 Feb 2017 17:12:57 +0000 Subject: [PATCH 243/447] Added tag jdk-9+157 for changeset 4416065868c1 --- .hgtags-top-repo | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags-top-repo b/.hgtags-top-repo index 57426de99cb..fa1549ee400 100644 --- a/.hgtags-top-repo +++ b/.hgtags-top-repo @@ -399,3 +399,4 @@ ef056360ddf3977d7d2ddbeb456a4d612d19ea05 jdk-9+152 8d26916eaa21b689835ffc1c0dbf12470aa9be61 jdk-9+154 688a3863c00ebc089ab17ee1fc46272cbbd96815 jdk-9+155 783ec7542cf7154e5d2b87f55bb97d28f81e9ada jdk-9+156 +4eb77fb98952dc477a4229575c81d2263a9ce711 jdk-9+157 From 4485a22c48253406b26ddafabb2be8e4f6709e7a Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 16 Feb 2017 17:12:58 +0000 Subject: [PATCH 244/447] Added tag jdk-9+157 for changeset a7bc2b7f62f6 --- hotspot/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/hotspot/.hgtags b/hotspot/.hgtags index 328609950e1..a7d55906af4 100644 --- a/hotspot/.hgtags +++ b/hotspot/.hgtags @@ -559,3 +559,4 @@ a82cb5350cad96a0b4de496afebe3ded89f27efa jdk-9+146 a9fdfd55835ef9dccb7f317b07249bd66653b874 jdk-9+154 f3b3d77a1751897413aae43ac340a130b6fa2ae1 jdk-9+155 43139c588ea48b6504e52b6c3dec530b17b1fdb4 jdk-9+156 +b2d0a906afd73dcf27f572217eb1be0f196ec16c jdk-9+157 From 9ebf61728fdedccb38a7df0906993a6bcb54f600 Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 16 Feb 2017 17:12:59 +0000 Subject: [PATCH 245/447] Added tag jdk-9+157 for changeset 0002f2c38eaa --- jaxp/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jaxp/.hgtags b/jaxp/.hgtags index 3edeb788b0e..cd6573d791c 100644 --- a/jaxp/.hgtags +++ b/jaxp/.hgtags @@ -399,3 +399,4 @@ f85154af719f99a3b4d81b67a8b4c18a650d10f9 jdk-9+150 7fa738305436d14c0926df0f04892890cacc766b jdk-9+154 48fa77af153288b08ba794e1616a7b0685f3b67e jdk-9+155 e930c373aaa4e0e712c9a25ba4b03d473b48c294 jdk-9+156 +412df235a8a229469a2cb9e7bb274d43277077d2 jdk-9+157 From 4d186caf70068993778d62794d46b8aa272ee39a Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 16 Feb 2017 17:12:59 +0000 Subject: [PATCH 246/447] Added tag jdk-9+157 for changeset 3c68ef249093 --- jaxws/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jaxws/.hgtags b/jaxws/.hgtags index 237bdacc027..779500bc653 100644 --- a/jaxws/.hgtags +++ b/jaxws/.hgtags @@ -402,3 +402,4 @@ c48b4d4768b1c2b8fe5d1a844ca13732e5dfbe2a jdk-9+151 34af95c7dbff74f3448fcdb7d745524e8a1cc88a jdk-9+154 9b9918656c97724fd89c04a8547043bbd37f5935 jdk-9+155 7c829eba781409b4fe15392639289af1553dcf63 jdk-9+156 +b7e70e1e0154e1d2c69f814e03a8800ef8634fe0 jdk-9+157 From 09d136cc5b80d9b7cc3d511d396d1ed00a8a0a42 Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 16 Feb 2017 17:13:00 +0000 Subject: [PATCH 247/447] Added tag jdk-9+157 for changeset 83505546dec3 --- jdk/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jdk/.hgtags b/jdk/.hgtags index e6379a2ee4f..1fb4412a479 100644 --- a/jdk/.hgtags +++ b/jdk/.hgtags @@ -399,3 +399,4 @@ a20f2cf90762673e1bc4980fd6597e70a2578045 jdk-9+152 c97e7a8b8da062b9070df442f9cf308e10845fb7 jdk-9+154 e170c858888e83d5c0994504599b6ed7a1fb0cfc jdk-9+155 7d64e541a6c04c714bcad4c8b553db912f827cd5 jdk-9+156 +fdfa7b2fe9a7db06792eae20f97748f3e85bb83a jdk-9+157 From d9169e12482a6c0fa6bcc1ddebb9f4fb15781b10 Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 16 Feb 2017 17:13:01 +0000 Subject: [PATCH 248/447] Added tag jdk-9+157 for changeset 8d8593871575 --- langtools/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/langtools/.hgtags b/langtools/.hgtags index 7776525787b..b2a35038943 100644 --- a/langtools/.hgtags +++ b/langtools/.hgtags @@ -399,3 +399,4 @@ e5a42ddaf633fde14b983f740ae0e7e490741fd1 jdk-9+150 6a9dd3d893b0a493a3e5d8d392815b5ee76a02d9 jdk-9+154 dfcfdb2db85f1bb434209f56ca557ea6f9830aa8 jdk-9+155 6f91e41163bc09e9b3ec72e8d1185f39296ee5d4 jdk-9+156 +162b521af7bb097019a8afaa44e1f8069ce274eb jdk-9+157 From e03241a6db72e4ff10395dc26fd0e9bdc6dd2cad Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 16 Feb 2017 17:13:01 +0000 Subject: [PATCH 249/447] Added tag jdk-9+157 for changeset abd8bc4c4c9d --- nashorn/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/nashorn/.hgtags b/nashorn/.hgtags index 08ec4aa8a02..4cde035fae8 100644 --- a/nashorn/.hgtags +++ b/nashorn/.hgtags @@ -390,3 +390,4 @@ ddc52e72757086a75a54371e8e7f56a3f89f1e55 jdk-9+152 a84b49cfee63716975535abae2865ffef4dd6474 jdk-9+154 f9bb37a817b3cd3b758a60f3c68258a6554eb382 jdk-9+155 d577398d31111be4bdaa08008247cf4242eaea94 jdk-9+156 +f6070efba6af0dc003e24ca736426c93e99ee96a jdk-9+157 From 298e3a2dcc49d0f0f6a16c9df696d3b4fc16afa8 Mon Sep 17 00:00:00 2001 From: "Daniel D. Daugherty" Date: Thu, 16 Feb 2017 10:41:19 -0800 Subject: [PATCH 250/447] 8175086: [BACKOUT] fix for JDK-8166188 Reviewed-by: kbarrett, jwilhelm, dcubed --- hotspot/make/test/JtregNative.gmk | 4 +- .../cpu/aarch64/vm/sharedRuntime_aarch64.cpp | 32 +-- .../templateInterpreterGenerator_aarch64.cpp | 27 +-- hotspot/src/cpu/arm/vm/interp_masm_arm.cpp | 181 ++++++++++++++- hotspot/src/cpu/arm/vm/interp_masm_arm.hpp | 23 +- hotspot/src/cpu/arm/vm/macroAssembler_arm.cpp | 215 +----------------- hotspot/src/cpu/arm/vm/macroAssembler_arm.hpp | 25 +- hotspot/src/cpu/arm/vm/sharedRuntime_arm.cpp | 20 +- .../vm/templateInterpreterGenerator_arm.cpp | 35 +-- hotspot/src/cpu/ppc/vm/frame_ppc.cpp | 9 +- hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp | 34 +-- hotspot/src/cpu/ppc/vm/macroAssembler_ppc.hpp | 6 +- hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp | 13 +- .../vm/templateInterpreterGenerator_ppc.cpp | 11 +- .../src/cpu/s390/vm/macroAssembler_s390.cpp | 28 --- .../src/cpu/s390/vm/macroAssembler_s390.hpp | 2 - .../src/cpu/s390/vm/sharedRuntime_s390.cpp | 12 +- .../vm/templateInterpreterGenerator_s390.cpp | 11 +- .../src/cpu/sparc/vm/sharedRuntime_sparc.cpp | 33 +-- .../vm/templateInterpreterGenerator_sparc.cpp | 24 +- hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp | 32 +-- hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp | 4 +- .../src/cpu/x86/vm/sharedRuntime_x86_32.cpp | 13 +- .../src/cpu/x86/vm/sharedRuntime_x86_64.cpp | 13 +- .../vm/templateInterpreterGenerator_x86.cpp | 12 +- .../src/cpu/zero/vm/cppInterpreter_zero.cpp | 10 +- hotspot/src/share/vm/prims/jni.cpp | 7 +- hotspot/src/share/vm/prims/jvmtiEnv.cpp | 9 +- hotspot/src/share/vm/runtime/javaCalls.cpp | 118 ++++------ hotspot/src/share/vm/runtime/javaCalls.hpp | 95 ++------ hotspot/src/share/vm/runtime/jniHandles.cpp | 37 +-- hotspot/src/share/vm/runtime/jniHandles.hpp | 106 ++------- .../src/share/vm/shark/sharkNativeWrapper.cpp | 3 +- .../jni/CallWithJNIWeak/CallWithJNIWeak.java | 45 ---- .../jni/CallWithJNIWeak/libCallWithJNIWeak.c | 53 ----- .../jni/ReturnJNIWeak/ReturnJNIWeak.java | 132 ----------- .../jni/ReturnJNIWeak/libReturnJNIWeak.c | 52 ----- 37 files changed, 427 insertions(+), 1059 deletions(-) delete mode 100644 hotspot/test/runtime/jni/CallWithJNIWeak/CallWithJNIWeak.java delete mode 100644 hotspot/test/runtime/jni/CallWithJNIWeak/libCallWithJNIWeak.c delete mode 100644 hotspot/test/runtime/jni/ReturnJNIWeak/ReturnJNIWeak.java delete mode 100644 hotspot/test/runtime/jni/ReturnJNIWeak/libReturnJNIWeak.c diff --git a/hotspot/make/test/JtregNative.gmk b/hotspot/make/test/JtregNative.gmk index 42eb76af57e..7223733367a 100644 --- a/hotspot/make/test/JtregNative.gmk +++ b/hotspot/make/test/JtregNative.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -48,8 +48,6 @@ BUILD_HOTSPOT_JTREG_NATIVE_SRC := \ $(HOTSPOT_TOPDIR)/test/runtime/jni/PrivateInterfaceMethods \ $(HOTSPOT_TOPDIR)/test/runtime/jni/ToStringInInterfaceTest \ $(HOTSPOT_TOPDIR)/test/runtime/jni/CalleeSavedRegisters \ - $(HOTSPOT_TOPDIR)/test/runtime/jni/CallWithJNIWeak \ - $(HOTSPOT_TOPDIR)/test/runtime/jni/ReturnJNIWeak \ $(HOTSPOT_TOPDIR)/test/runtime/modules/getModuleJNI \ $(HOTSPOT_TOPDIR)/test/runtime/SameObject \ $(HOTSPOT_TOPDIR)/test/runtime/BoolReturn \ diff --git a/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp index a286102e7b1..01e0eeb1fc1 100644 --- a/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, 2015, Red Hat Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -2052,31 +2052,13 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, __ reset_last_Java_frame(false); - // Unbox oop result, e.g. JNIHandles::resolve result. + // Unpack oop result if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - Label done, not_weak; - __ cbz(r0, done); // Use NULL as-is. - STATIC_ASSERT(JNIHandles::weak_tag_mask == 1u); - __ tbz(r0, 0, not_weak); // Test for jweak tag. - // Resolve jweak. - __ ldr(r0, Address(r0, -JNIHandles::weak_tag_value)); - __ verify_oop(r0); -#if INCLUDE_ALL_GCS - if (UseG1GC) { - __ g1_write_barrier_pre(noreg /* obj */, - r0 /* pre_val */, - rthread /* thread */, - rscratch1 /* tmp */, - true /* tosca_live */, - true /* expand_call */); - } -#endif // INCLUDE_ALL_GCS - __ b(done); - __ bind(not_weak); - // Resolve (untagged) jobject. - __ ldr(r0, Address(r0, 0)); - __ verify_oop(r0); - __ bind(done); + Label L; + __ cbz(r0, L); + __ ldr(r0, Address(r0, 0)); + __ bind(L); + __ verify_oop(r0); } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp index 6f44292c55a..90dcd6c1a2c 100644 --- a/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, Red Hat Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -1399,32 +1399,13 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) { // and result handler will pick it up { - Label no_oop, not_weak, store_result; + Label no_oop, store_result; __ adr(t, ExternalAddress(AbstractInterpreter::result_handler(T_OBJECT))); __ cmp(t, result_handler); __ br(Assembler::NE, no_oop); - // Unbox oop result, e.g. JNIHandles::resolve result. + // retrieve result __ pop(ltos); - __ cbz(r0, store_result); // Use NULL as-is. - STATIC_ASSERT(JNIHandles::weak_tag_mask == 1u); - __ tbz(r0, 0, not_weak); // Test for jweak tag. - // Resolve jweak. - __ ldr(r0, Address(r0, -JNIHandles::weak_tag_value)); -#if INCLUDE_ALL_GCS - if (UseG1GC) { - __ enter(); // Barrier may call runtime. - __ g1_write_barrier_pre(noreg /* obj */, - r0 /* pre_val */, - rthread /* thread */, - t /* tmp */, - true /* tosca_live */, - true /* expand_call */); - __ leave(); - } -#endif // INCLUDE_ALL_GCS - __ b(store_result); - __ bind(not_weak); - // Resolve (untagged) jobject. + __ cbz(r0, store_result); __ ldr(r0, Address(r0, 0)); __ bind(store_result); __ str(r0, Address(rfp, frame::interpreter_frame_oop_temp_offset*wordSize)); diff --git a/hotspot/src/cpu/arm/vm/interp_masm_arm.cpp b/hotspot/src/cpu/arm/vm/interp_masm_arm.cpp index 96df37c275e..2f41b102a85 100644 --- a/hotspot/src/cpu/arm/vm/interp_masm_arm.cpp +++ b/hotspot/src/cpu/arm/vm/interp_masm_arm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -476,6 +476,185 @@ void InterpreterMacroAssembler::set_card(Register card_table_base, Address card_ } ////////////////////////////////////////////////////////////////////////////////// +#if INCLUDE_ALL_GCS + +// G1 pre-barrier. +// Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). +// If store_addr != noreg, then previous value is loaded from [store_addr]; +// in such case store_addr and new_val registers are preserved; +// otherwise pre_val register is preserved. +void InterpreterMacroAssembler::g1_write_barrier_pre(Register store_addr, + Register new_val, + Register pre_val, + Register tmp1, + Register tmp2) { + Label done; + Label runtime; + + if (store_addr != noreg) { + assert_different_registers(store_addr, new_val, pre_val, tmp1, tmp2, noreg); + } else { + assert (new_val == noreg, "should be"); + assert_different_registers(pre_val, tmp1, tmp2, noreg); + } + + Address in_progress(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + + SATBMarkQueue::byte_offset_of_active())); + Address index(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + + SATBMarkQueue::byte_offset_of_index())); + Address buffer(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + + SATBMarkQueue::byte_offset_of_buf())); + + // Is marking active? + assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "adjust this code"); + ldrb(tmp1, in_progress); + cbz(tmp1, done); + + // Do we need to load the previous value? + if (store_addr != noreg) { + load_heap_oop(pre_val, Address(store_addr, 0)); + } + + // Is the previous value null? + cbz(pre_val, done); + + // Can we store original value in the thread's buffer? + // Is index == 0? + // (The index field is typed as size_t.) + + ldr(tmp1, index); // tmp1 := *index_adr + ldr(tmp2, buffer); + + subs(tmp1, tmp1, wordSize); // tmp1 := tmp1 - wordSize + b(runtime, lt); // If negative, goto runtime + + str(tmp1, index); // *index_adr := tmp1 + + // Record the previous value + str(pre_val, Address(tmp2, tmp1)); + b(done); + + bind(runtime); + + // save the live input values +#ifdef AARCH64 + if (store_addr != noreg) { + raw_push(store_addr, new_val); + } else { + raw_push(pre_val, ZR); + } +#else + if (store_addr != noreg) { + // avoid raw_push to support any ordering of store_addr and new_val + push(RegisterSet(store_addr) | RegisterSet(new_val)); + } else { + push(pre_val); + } +#endif // AARCH64 + + if (pre_val != R0) { + mov(R0, pre_val); + } + mov(R1, Rthread); + + call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), R0, R1); + +#ifdef AARCH64 + if (store_addr != noreg) { + raw_pop(store_addr, new_val); + } else { + raw_pop(pre_val, ZR); + } +#else + if (store_addr != noreg) { + pop(RegisterSet(store_addr) | RegisterSet(new_val)); + } else { + pop(pre_val); + } +#endif // AARCH64 + + bind(done); +} + +// G1 post-barrier. +// Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). +void InterpreterMacroAssembler::g1_write_barrier_post(Register store_addr, + Register new_val, + Register tmp1, + Register tmp2, + Register tmp3) { + + Address queue_index(Rthread, in_bytes(JavaThread::dirty_card_queue_offset() + + DirtyCardQueue::byte_offset_of_index())); + Address buffer(Rthread, in_bytes(JavaThread::dirty_card_queue_offset() + + DirtyCardQueue::byte_offset_of_buf())); + + BarrierSet* bs = Universe::heap()->barrier_set(); + CardTableModRefBS* ct = (CardTableModRefBS*)bs; + Label done; + Label runtime; + + // Does store cross heap regions? + + eor(tmp1, store_addr, new_val); +#ifdef AARCH64 + logical_shift_right(tmp1, tmp1, HeapRegion::LogOfHRGrainBytes); + cbz(tmp1, done); +#else + movs(tmp1, AsmOperand(tmp1, lsr, HeapRegion::LogOfHRGrainBytes)); + b(done, eq); +#endif + + // crosses regions, storing NULL? + + cbz(new_val, done); + + // storing region crossing non-NULL, is card already dirty? + const Register card_addr = tmp1; + assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code"); + + mov_address(tmp2, (address)ct->byte_map_base, symbolic_Relocation::card_table_reference); + add(card_addr, tmp2, AsmOperand(store_addr, lsr, CardTableModRefBS::card_shift)); + + ldrb(tmp2, Address(card_addr)); + cmp(tmp2, (int)G1SATBCardTableModRefBS::g1_young_card_val()); + b(done, eq); + + membar(MacroAssembler::Membar_mask_bits(MacroAssembler::StoreLoad), tmp2); + + assert(CardTableModRefBS::dirty_card_val() == 0, "adjust this code"); + ldrb(tmp2, Address(card_addr)); + cbz(tmp2, done); + + // storing a region crossing, non-NULL oop, card is clean. + // dirty card and log. + + strb(zero_register(tmp2), Address(card_addr)); + + ldr(tmp2, queue_index); + ldr(tmp3, buffer); + + subs(tmp2, tmp2, wordSize); + b(runtime, lt); // go to runtime if now negative + + str(tmp2, queue_index); + + str(card_addr, Address(tmp3, tmp2)); + b(done); + + bind(runtime); + + if (card_addr != R0) { + mov(R0, card_addr); + } + mov(R1, Rthread); + call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post), R0, R1); + + bind(done); +} + +#endif // INCLUDE_ALL_GCS +////////////////////////////////////////////////////////////////////////////////// // Java Expression Stack diff --git a/hotspot/src/cpu/arm/vm/interp_masm_arm.hpp b/hotspot/src/cpu/arm/vm/interp_masm_arm.hpp index 39e60226bf6..5c753753f95 100644 --- a/hotspot/src/cpu/arm/vm/interp_masm_arm.hpp +++ b/hotspot/src/cpu/arm/vm/interp_masm_arm.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -146,6 +146,27 @@ class InterpreterMacroAssembler: public MacroAssembler { void set_card(Register card_table_base, Address card_table_addr, Register tmp); +#if INCLUDE_ALL_GCS + // G1 pre-barrier. + // Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). + // If store_addr != noreg, then previous value is loaded from [store_addr]; + // in such case store_addr and new_val registers are preserved; + // otherwise pre_val register is preserved. + void g1_write_barrier_pre(Register store_addr, + Register new_val, + Register pre_val, + Register tmp1, + Register tmp2); + + // G1 post-barrier. + // Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). + void g1_write_barrier_post(Register store_addr, + Register new_val, + Register tmp1, + Register tmp2, + Register tmp3); +#endif // INCLUDE_ALL_GCS + void pop_ptr(Register r); void pop_i(Register r = R0_tos); #ifdef AARCH64 diff --git a/hotspot/src/cpu/arm/vm/macroAssembler_arm.cpp b/hotspot/src/cpu/arm/vm/macroAssembler_arm.cpp index 2eb2a551002..ada7d3fc485 100644 --- a/hotspot/src/cpu/arm/vm/macroAssembler_arm.cpp +++ b/hotspot/src/cpu/arm/vm/macroAssembler_arm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2211,219 +2211,6 @@ void MacroAssembler::biased_locking_exit(Register obj_reg, Register tmp_reg, Lab b(done, eq); } - -void MacroAssembler::resolve_jobject(Register value, - Register tmp1, - Register tmp2) { - assert_different_registers(value, tmp1, tmp2); - Label done, not_weak; - cbz(value, done); // Use NULL as-is. - STATIC_ASSERT(JNIHandles::weak_tag_mask == 1u); - tbz(value, 0, not_weak); // Test for jweak tag. - // Resolve jweak. - ldr(value, Address(value, -JNIHandles::weak_tag_value)); - verify_oop(value); -#if INCLUDE_ALL_GCS - if (UseG1GC) { - g1_write_barrier_pre(noreg, // store_addr - noreg, // new_val - value, // pre_val - tmp1, // tmp1 - tmp2); // tmp2 - } -#endif // INCLUDE_ALL_GCS - b(done); - bind(not_weak); - // Resolve (untagged) jobject. - ldr(value, Address(value)); - verify_oop(value); - bind(done); -} - - -////////////////////////////////////////////////////////////////////////////////// - -#if INCLUDE_ALL_GCS - -// G1 pre-barrier. -// Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). -// If store_addr != noreg, then previous value is loaded from [store_addr]; -// in such case store_addr and new_val registers are preserved; -// otherwise pre_val register is preserved. -void MacroAssembler::g1_write_barrier_pre(Register store_addr, - Register new_val, - Register pre_val, - Register tmp1, - Register tmp2) { - Label done; - Label runtime; - - if (store_addr != noreg) { - assert_different_registers(store_addr, new_val, pre_val, tmp1, tmp2, noreg); - } else { - assert (new_val == noreg, "should be"); - assert_different_registers(pre_val, tmp1, tmp2, noreg); - } - - Address in_progress(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + - SATBMarkQueue::byte_offset_of_active())); - Address index(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + - SATBMarkQueue::byte_offset_of_index())); - Address buffer(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + - SATBMarkQueue::byte_offset_of_buf())); - - // Is marking active? - assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "adjust this code"); - ldrb(tmp1, in_progress); - cbz(tmp1, done); - - // Do we need to load the previous value? - if (store_addr != noreg) { - load_heap_oop(pre_val, Address(store_addr, 0)); - } - - // Is the previous value null? - cbz(pre_val, done); - - // Can we store original value in the thread's buffer? - // Is index == 0? - // (The index field is typed as size_t.) - - ldr(tmp1, index); // tmp1 := *index_adr - ldr(tmp2, buffer); - - subs(tmp1, tmp1, wordSize); // tmp1 := tmp1 - wordSize - b(runtime, lt); // If negative, goto runtime - - str(tmp1, index); // *index_adr := tmp1 - - // Record the previous value - str(pre_val, Address(tmp2, tmp1)); - b(done); - - bind(runtime); - - // save the live input values -#ifdef AARCH64 - if (store_addr != noreg) { - raw_push(store_addr, new_val); - } else { - raw_push(pre_val, ZR); - } -#else - if (store_addr != noreg) { - // avoid raw_push to support any ordering of store_addr and new_val - push(RegisterSet(store_addr) | RegisterSet(new_val)); - } else { - push(pre_val); - } -#endif // AARCH64 - - if (pre_val != R0) { - mov(R0, pre_val); - } - mov(R1, Rthread); - - call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), R0, R1); - -#ifdef AARCH64 - if (store_addr != noreg) { - raw_pop(store_addr, new_val); - } else { - raw_pop(pre_val, ZR); - } -#else - if (store_addr != noreg) { - pop(RegisterSet(store_addr) | RegisterSet(new_val)); - } else { - pop(pre_val); - } -#endif // AARCH64 - - bind(done); -} - -// G1 post-barrier. -// Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). -void MacroAssembler::g1_write_barrier_post(Register store_addr, - Register new_val, - Register tmp1, - Register tmp2, - Register tmp3) { - - Address queue_index(Rthread, in_bytes(JavaThread::dirty_card_queue_offset() + - DirtyCardQueue::byte_offset_of_index())); - Address buffer(Rthread, in_bytes(JavaThread::dirty_card_queue_offset() + - DirtyCardQueue::byte_offset_of_buf())); - - BarrierSet* bs = Universe::heap()->barrier_set(); - CardTableModRefBS* ct = (CardTableModRefBS*)bs; - Label done; - Label runtime; - - // Does store cross heap regions? - - eor(tmp1, store_addr, new_val); -#ifdef AARCH64 - logical_shift_right(tmp1, tmp1, HeapRegion::LogOfHRGrainBytes); - cbz(tmp1, done); -#else - movs(tmp1, AsmOperand(tmp1, lsr, HeapRegion::LogOfHRGrainBytes)); - b(done, eq); -#endif - - // crosses regions, storing NULL? - - cbz(new_val, done); - - // storing region crossing non-NULL, is card already dirty? - const Register card_addr = tmp1; - assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code"); - - mov_address(tmp2, (address)ct->byte_map_base, symbolic_Relocation::card_table_reference); - add(card_addr, tmp2, AsmOperand(store_addr, lsr, CardTableModRefBS::card_shift)); - - ldrb(tmp2, Address(card_addr)); - cmp(tmp2, (int)G1SATBCardTableModRefBS::g1_young_card_val()); - b(done, eq); - - membar(MacroAssembler::Membar_mask_bits(MacroAssembler::StoreLoad), tmp2); - - assert(CardTableModRefBS::dirty_card_val() == 0, "adjust this code"); - ldrb(tmp2, Address(card_addr)); - cbz(tmp2, done); - - // storing a region crossing, non-NULL oop, card is clean. - // dirty card and log. - - strb(zero_register(tmp2), Address(card_addr)); - - ldr(tmp2, queue_index); - ldr(tmp3, buffer); - - subs(tmp2, tmp2, wordSize); - b(runtime, lt); // go to runtime if now negative - - str(tmp2, queue_index); - - str(card_addr, Address(tmp3, tmp2)); - b(done); - - bind(runtime); - - if (card_addr != R0) { - mov(R0, card_addr); - } - mov(R1, Rthread); - call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post), R0, R1); - - bind(done); -} - -#endif // INCLUDE_ALL_GCS - -////////////////////////////////////////////////////////////////////////////////// - #ifdef AARCH64 void MacroAssembler::load_sized_value(Register dst, Address src, size_t size_in_bytes, bool is_signed) { diff --git a/hotspot/src/cpu/arm/vm/macroAssembler_arm.hpp b/hotspot/src/cpu/arm/vm/macroAssembler_arm.hpp index e6f73353cb9..770bba6c8a1 100644 --- a/hotspot/src/cpu/arm/vm/macroAssembler_arm.hpp +++ b/hotspot/src/cpu/arm/vm/macroAssembler_arm.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -402,29 +402,6 @@ public: void biased_locking_enter_with_cas(Register obj_reg, Register old_mark_reg, Register new_mark_reg, Register tmp, Label& slow_case, int* counter_addr); - void resolve_jobject(Register value, Register tmp1, Register tmp2); - -#if INCLUDE_ALL_GCS - // G1 pre-barrier. - // Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). - // If store_addr != noreg, then previous value is loaded from [store_addr]; - // in such case store_addr and new_val registers are preserved; - // otherwise pre_val register is preserved. - void g1_write_barrier_pre(Register store_addr, - Register new_val, - Register pre_val, - Register tmp1, - Register tmp2); - - // G1 post-barrier. - // Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). - void g1_write_barrier_post(Register store_addr, - Register new_val, - Register tmp1, - Register tmp2, - Register tmp3); -#endif // INCLUDE_ALL_GCS - #ifndef AARCH64 void nop() { mov(R0, R0); diff --git a/hotspot/src/cpu/arm/vm/sharedRuntime_arm.cpp b/hotspot/src/cpu/arm/vm/sharedRuntime_arm.cpp index 48f096473c3..9b37b4fe6dc 100644 --- a/hotspot/src/cpu/arm/vm/sharedRuntime_arm.cpp +++ b/hotspot/src/cpu/arm/vm/sharedRuntime_arm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1732,7 +1732,14 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, case T_FLOAT : // fall through case T_DOUBLE : /* nothing to do */ break; case T_OBJECT : // fall through - case T_ARRAY : break; // See JNIHandles::resolve below + case T_ARRAY : { + Label L; + __ cbz(R0, L); + __ ldr(R0, Address(R0)); + __ verify_oop(R0); + __ bind(L); + break; + } default: ShouldNotReachHere(); } @@ -1741,14 +1748,13 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, if (CheckJNICalls) { __ str(__ zero_register(Rtemp), Address(Rthread, JavaThread::pending_jni_exception_check_fn_offset())); } -#endif // AARCH64 - // Unbox oop result, e.g. JNIHandles::resolve value in R0. + // Unhandle the result if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - __ resolve_jobject(R0, // value - Rtemp, // tmp1 - R1_tmp); // tmp2 + __ cmp(R0, 0); + __ ldr(R0, Address(R0), ne); } +#endif // AARCH64 // Any exception pending? __ ldr(Rtemp, Address(Rthread, Thread::pending_exception_offset())); diff --git a/hotspot/src/cpu/arm/vm/templateInterpreterGenerator_arm.cpp b/hotspot/src/cpu/arm/vm/templateInterpreterGenerator_arm.cpp index 7fda747ad48..743510e09a7 100644 --- a/hotspot/src/cpu/arm/vm/templateInterpreterGenerator_arm.cpp +++ b/hotspot/src/cpu/arm/vm/templateInterpreterGenerator_arm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1240,25 +1240,28 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) { __ str(__ zero_register(Rtemp), Address(Rthread, JavaThread::pending_jni_exception_check_fn_offset())); } - // Unbox oop result, e.g. JNIHandles::resolve result if it's an oop. - { - Label Lnot_oop; + // Unbox if the result is non-zero object #ifdef AARCH64 + { + Label L, Lnull; __ mov_slow(Rtemp, AbstractInterpreter::result_handler(T_OBJECT)); __ cmp(Rresult_handler, Rtemp); - __ b(Lnot_oop, ne); -#else // !AARCH64 - // For ARM32, Rresult_handler is -1 for oop result, 0 otherwise. - __ cbz(Rresult_handler, Lnot_oop); -#endif // !AARCH64 - Register value = AARCH64_ONLY(Rsaved_result) NOT_AARCH64(Rsaved_result_lo); - __ resolve_jobject(value, // value - Rtemp, // tmp1 - R1_tmp); // tmp2 - // Store resolved result in frame for GC visibility. - __ str(value, Address(FP, frame::interpreter_frame_oop_temp_offset * wordSize)); - __ bind(Lnot_oop); + __ b(L, ne); + __ cbz(Rsaved_result, Lnull); + __ ldr(Rsaved_result, Address(Rsaved_result)); + __ bind(Lnull); + // Store oop on the stack for GC + __ str(Rsaved_result, Address(FP, frame::interpreter_frame_oop_temp_offset * wordSize)); + __ bind(L); } +#else + __ tst(Rsaved_result_lo, Rresult_handler); + __ ldr(Rsaved_result_lo, Address(Rsaved_result_lo), ne); + + // Store oop on the stack for GC + __ cmp(Rresult_handler, 0); + __ str(Rsaved_result_lo, Address(FP, frame::interpreter_frame_oop_temp_offset * wordSize), ne); +#endif // AARCH64 #ifdef AARCH64 // Restore SP (drop native parameters area), to keep SP in sync with extended_sp in frame diff --git a/hotspot/src/cpu/ppc/vm/frame_ppc.cpp b/hotspot/src/cpu/ppc/vm/frame_ppc.cpp index b6a538681f6..131a931c2c1 100644 --- a/hotspot/src/cpu/ppc/vm/frame_ppc.cpp +++ b/hotspot/src/cpu/ppc/vm/frame_ppc.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2017 SAP SE. All rights reserved. + * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2015 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -171,7 +171,10 @@ BasicType frame::interpreter_frame_result(oop* oop_result, jvalue* value_result) switch (method->result_type()) { case T_OBJECT: case T_ARRAY: { - *oop_result = JNIHandles::resolve(*(jobject*)lresult); + oop* obj_p = *(oop**)lresult; + oop obj = (obj_p == NULL) ? (oop)NULL : *obj_p; + assert(obj == NULL || Universe::heap()->is_in(obj), "sanity check"); + *oop_result = obj; break; } // We use std/stfd to store the values. diff --git a/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp b/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp index 6eb27c78f17..a5d5613a414 100644 --- a/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp +++ b/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2017 SAP SE. All rights reserved. + * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2016 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -3033,34 +3033,6 @@ void MacroAssembler::card_table_write(jbyte* byte_map_base, Register Rtmp, Regis stbx(R0, Rtmp, Robj); } -// Kills R31 if value is a volatile register. -void MacroAssembler::resolve_jobject(Register value, Register tmp1, Register tmp2, bool needs_frame) { - Label done; - cmpdi(CCR0, value, 0); - beq(CCR0, done); // Use NULL as-is. - - clrrdi(tmp1, value, JNIHandles::weak_tag_size); -#if INCLUDE_ALL_GCS - if (UseG1GC) { andi_(tmp2, value, JNIHandles::weak_tag_mask); } -#endif - ld(value, 0, tmp1); // Resolve (untagged) jobject. - -#if INCLUDE_ALL_GCS - if (UseG1GC) { - Label not_weak; - beq(CCR0, not_weak); // Test for jweak tag. - verify_oop(value); - g1_write_barrier_pre(noreg, // obj - noreg, // offset - value, // pre_val - tmp1, tmp2, needs_frame); - bind(not_weak); - } -#endif // INCLUDE_ALL_GCS - verify_oop(value); - bind(done); -} - #if INCLUDE_ALL_GCS // General G1 pre-barrier generator. // Goal: record the previous value if it is not null. @@ -3122,7 +3094,7 @@ void MacroAssembler::g1_write_barrier_pre(Register Robj, RegisterOrConstant offs bind(runtime); - // May need to preserve LR. Also needed if current frame is not compatible with C calling convention. + // VM call need frame to access(write) O register. if (needs_frame) { save_LR_CR(Rtmp1); push_frame_reg_args(0, Rtmp2); diff --git a/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.hpp b/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.hpp index 0b1b2a0befa..11b966a82c9 100644 --- a/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.hpp +++ b/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.hpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2017 SAP SE. All rights reserved. + * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2016 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -649,8 +649,6 @@ class MacroAssembler: public Assembler { void card_write_barrier_post(Register Rstore_addr, Register Rnew_val, Register Rtmp); void card_table_write(jbyte* byte_map_base, Register Rtmp, Register Robj); - void resolve_jobject(Register value, Register tmp1, Register tmp2, bool needs_frame); - #if INCLUDE_ALL_GCS // General G1 pre-barrier generator. void g1_write_barrier_pre(Register Robj, RegisterOrConstant offset, Register Rpre_val, diff --git a/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp b/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp index dc36aa77da2..784595f11be 100644 --- a/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp +++ b/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2017 SAP SE. All rights reserved. + * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2016 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2477,11 +2477,16 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm, __ reset_last_Java_frame(); - // Unbox oop result, e.g. JNIHandles::resolve value. + // Unpack oop result. // -------------------------------------------------------------------------- if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - __ resolve_jobject(R3_RET, r_temp_1, r_temp_2, /* needs_frame */ false); // kills R31 + Label skip_unboxing; + __ cmpdi(CCR0, R3_RET, 0); + __ beq(CCR0, skip_unboxing); + __ ld(R3_RET, 0, R3_RET); + __ bind(skip_unboxing); + __ verify_oop(R3_RET); } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/ppc/vm/templateInterpreterGenerator_ppc.cpp b/hotspot/src/cpu/ppc/vm/templateInterpreterGenerator_ppc.cpp index ab87c204018..56810938a53 100644 --- a/hotspot/src/cpu/ppc/vm/templateInterpreterGenerator_ppc.cpp +++ b/hotspot/src/cpu/ppc/vm/templateInterpreterGenerator_ppc.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2015, 2017 SAP SE. All rights reserved. + * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -401,8 +401,11 @@ address TemplateInterpreterGenerator::generate_result_handler_for(BasicType type case T_LONG: break; case T_OBJECT: - // JNIHandles::resolve result. - __ resolve_jobject(R3_RET, R11_scratch1, R12_scratch2, /* needs_frame */ true); // kills R31 + // unbox result if not null + __ cmpdi(CCR0, R3_RET, 0); + __ beq(CCR0, done); + __ ld(R3_RET, 0, R3_RET); + __ verify_oop(R3_RET); break; case T_FLOAT: break; diff --git a/hotspot/src/cpu/s390/vm/macroAssembler_s390.cpp b/hotspot/src/cpu/s390/vm/macroAssembler_s390.cpp index d5776117436..0f78e5a6250 100644 --- a/hotspot/src/cpu/s390/vm/macroAssembler_s390.cpp +++ b/hotspot/src/cpu/s390/vm/macroAssembler_s390.cpp @@ -3439,34 +3439,6 @@ void MacroAssembler::card_write_barrier_post(Register store_addr, Register tmp) z_mvi(0, store_addr, 0); // Store byte 0. } -void MacroAssembler::resolve_jobject(Register value, Register tmp1, Register tmp2) { - NearLabel Ldone; - z_ltgr(tmp1, value); - z_bre(Ldone); // Use NULL result as-is. - - z_nill(value, ~JNIHandles::weak_tag_mask); - z_lg(value, 0, value); // Resolve (untagged) jobject. - -#if INCLUDE_ALL_GCS - if (UseG1GC) { - NearLabel Lnot_weak; - z_tmll(tmp1, JNIHandles::weak_tag_mask); // Test for jweak tag. - z_braz(Lnot_weak); - verify_oop(value); - g1_write_barrier_pre(noreg /* obj */, - noreg /* offset */, - value /* pre_val */, - noreg /* val */, - tmp1 /* tmp1 */, - tmp2 /* tmp2 */, - true /* pre_val_needed */); - bind(Lnot_weak); - } -#endif // INCLUDE_ALL_GCS - verify_oop(value); - bind(Ldone); -} - #if INCLUDE_ALL_GCS //------------------------------------------------------ diff --git a/hotspot/src/cpu/s390/vm/macroAssembler_s390.hpp b/hotspot/src/cpu/s390/vm/macroAssembler_s390.hpp index 2b4002a3bf4..588bde6207e 100644 --- a/hotspot/src/cpu/s390/vm/macroAssembler_s390.hpp +++ b/hotspot/src/cpu/s390/vm/macroAssembler_s390.hpp @@ -726,8 +726,6 @@ class MacroAssembler: public Assembler { // Write to card table for modification at store_addr - register is destroyed afterwards. void card_write_barrier_post(Register store_addr, Register tmp); - void resolve_jobject(Register value, Register tmp1, Register tmp2); - #if INCLUDE_ALL_GCS // General G1 pre-barrier generator. // Purpose: record the previous value if it is not null. diff --git a/hotspot/src/cpu/s390/vm/sharedRuntime_s390.cpp b/hotspot/src/cpu/s390/vm/sharedRuntime_s390.cpp index 89c3ae4032a..ea498e3399c 100644 --- a/hotspot/src/cpu/s390/vm/sharedRuntime_s390.cpp +++ b/hotspot/src/cpu/s390/vm/sharedRuntime_s390.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2016, 2017 SAP SE. All rights reserved. + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2272,9 +2272,13 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm, __ reset_last_Java_frame(); - // Unpack oop result, e.g. JNIHandles::resolve result. + // Unpack oop result if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - __ resolve_jobject(Z_RET, /* tmp1 */ Z_R13, /* tmp2 */ Z_R7); + NearLabel L; + __ compare64_and_branch(Z_RET, (RegisterOrConstant)0L, Assembler::bcondEqual, L); + __ z_lg(Z_RET, 0, Z_RET); + __ bind(L); + __ verify_oop(Z_RET); } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/s390/vm/templateInterpreterGenerator_s390.cpp b/hotspot/src/cpu/s390/vm/templateInterpreterGenerator_s390.cpp index 20a9a3e9571..2084f36006f 100644 --- a/hotspot/src/cpu/s390/vm/templateInterpreterGenerator_s390.cpp +++ b/hotspot/src/cpu/s390/vm/templateInterpreterGenerator_s390.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2016, 2017 SAP SE. All rights reserved. + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1695,11 +1695,14 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) { // from the jni handle to z_ijava_state.oop_temp. This is // necessary, because we reset the jni handle block below. // NOTE: frame::interpreter_frame_result() depends on this, too. - { NearLabel no_oop_result; + { NearLabel no_oop_result, store_oop_result; __ load_absolute_address(Z_R1, AbstractInterpreter::result_handler(T_OBJECT)); __ compareU64_and_branch(Z_R1, Rresult_handler, Assembler::bcondNotEqual, no_oop_result); - __ resolve_jobject(Rlresult, /* tmp1 */ Rmethod, /* tmp2 */ Z_R1); + __ compareU64_and_branch(Rlresult, (intptr_t)0L, Assembler::bcondEqual, store_oop_result); + __ z_lg(Rlresult, 0, Rlresult); // unbox + __ bind(store_oop_result); __ z_stg(Rlresult, oop_tmp_offset, Z_fp); + __ verify_oop(Rlresult); __ bind(no_oop_result); } diff --git a/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp b/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp index 613e662d65c..7b4dcf193d3 100644 --- a/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2754,30 +2754,15 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, __ verify_thread(); // G2_thread must be correct __ reset_last_Java_frame(); - // Unbox oop result, e.g. JNIHandles::resolve value in I0. + // Unpack oop result if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - Label done, not_weak; - __ br_null(I0, false, Assembler::pn, done); // Use NULL as-is. - __ delayed()->andcc(I0, JNIHandles::weak_tag_mask, G0); // Test for jweak - __ brx(Assembler::zero, true, Assembler::pt, not_weak); - __ delayed()->ld_ptr(I0, 0, I0); // Maybe resolve (untagged) jobject. - // Resolve jweak. - __ ld_ptr(I0, -JNIHandles::weak_tag_value, I0); -#if INCLUDE_ALL_GCS - if (UseG1GC) { - // Copy to O0 because macro doesn't allow pre_val in input reg. - __ mov(I0, O0); - __ g1_write_barrier_pre(noreg /* obj */, - noreg /* index */, - 0 /* offset */, - O0 /* pre_val */, - G3_scratch /* tmp */, - true /* preserve_o_regs */); - } -#endif // INCLUDE_ALL_GCS - __ bind(not_weak); - __ verify_oop(I0); - __ bind(done); + Label L; + __ addcc(G0, I0, G0); + __ brx(Assembler::notZero, true, Assembler::pt, L); + __ delayed()->ld_ptr(I0, 0, I0); + __ mov(G0, I0); + __ bind(L); + __ verify_oop(I0); } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/sparc/vm/templateInterpreterGenerator_sparc.cpp b/hotspot/src/cpu/sparc/vm/templateInterpreterGenerator_sparc.cpp index fd4e3ffd149..b677a1dd662 100644 --- a/hotspot/src/cpu/sparc/vm/templateInterpreterGenerator_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/templateInterpreterGenerator_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1516,23 +1516,11 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) { __ set((intptr_t)AbstractInterpreter::result_handler(T_OBJECT), G3_scratch); __ cmp_and_brx_short(G3_scratch, Lscratch, Assembler::notEqual, Assembler::pt, no_oop); - // Unbox oop result, e.g. JNIHandles::resolve value in O0. - __ br_null(O0, false, Assembler::pn, store_result); // Use NULL as-is. - __ delayed()->andcc(O0, JNIHandles::weak_tag_mask, G0); // Test for jweak - __ brx(Assembler::zero, true, Assembler::pt, store_result); - __ delayed()->ld_ptr(O0, 0, O0); // Maybe resolve (untagged) jobject. - // Resolve jweak. - __ ld_ptr(O0, -JNIHandles::weak_tag_value, O0); -#if INCLUDE_ALL_GCS - if (UseG1GC) { - __ g1_write_barrier_pre(noreg /* obj */, - noreg /* index */, - 0 /* offset */, - O0 /* pre_val */, - G3_scratch /* tmp */, - true /* preserve_o_regs */); - } -#endif // INCLUDE_ALL_GCS + __ addcc(G0, O0, O0); + __ brx(Assembler::notZero, true, Assembler::pt, store_result); // if result is not NULL: + __ delayed()->ld_ptr(O0, 0, O0); // unbox it + __ mov(G0, O0); + __ bind(store_result); // Store it where gc will look for it and result handler expects it. __ st_ptr(O0, FP, (frame::interpreter_frame_oop_temp_offset*wordSize) + STACK_BIAS); diff --git a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp index 9e2480f0116..b6d32631582 100644 --- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp +++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -5129,36 +5129,6 @@ void MacroAssembler::vxorps(XMMRegister dst, XMMRegister nds, AddressLiteral src } -void MacroAssembler::resolve_jobject(Register value, - Register thread, - Register tmp) { - assert_different_registers(value, thread, tmp); - Label done, not_weak; - testptr(value, value); - jcc(Assembler::zero, done); // Use NULL as-is. - testptr(value, JNIHandles::weak_tag_mask); // Test for jweak tag. - jcc(Assembler::zero, not_weak); - // Resolve jweak. - movptr(value, Address(value, -JNIHandles::weak_tag_value)); - verify_oop(value); -#if INCLUDE_ALL_GCS - if (UseG1GC) { - g1_write_barrier_pre(noreg /* obj */, - value /* pre_val */, - thread /* thread */, - tmp /* tmp */, - true /* tosca_live */, - true /* expand_call */); - } -#endif // INCLUDE_ALL_GCS - jmp(done); - bind(not_weak); - // Resolve (untagged) jobject. - movptr(value, Address(value, 0)); - verify_oop(value); - bind(done); -} - ////////////////////////////////////////////////////////////////////////////////// #if INCLUDE_ALL_GCS diff --git a/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp b/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp index c76d5104ae2..a3e81e58dc5 100644 --- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp +++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -297,8 +297,6 @@ class MacroAssembler: public Assembler { void store_check(Register obj); // store check for obj - register is destroyed afterwards void store_check(Register obj, Address dst); // same as above, dst is exact store location (reg. is destroyed) - void resolve_jobject(Register value, Register thread, Register tmp); - #if INCLUDE_ALL_GCS void g1_write_barrier_pre(Register obj, diff --git a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp index 47b9fe5c627..ed317550e08 100644 --- a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp +++ b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2226,11 +2226,14 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, __ reset_last_Java_frame(thread, false); - // Unbox oop result, e.g. JNIHandles::resolve value. + // Unpack oop result if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - __ resolve_jobject(rax /* value */, - thread /* thread */, - rcx /* tmp */); + Label L; + __ cmpptr(rax, (int32_t)NULL_WORD); + __ jcc(Assembler::equal, L); + __ movptr(rax, Address(rax, 0)); + __ bind(L); + __ verify_oop(rax); } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp index d81e965d05d..4587b8caba6 100644 --- a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp +++ b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2579,11 +2579,14 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, __ reset_last_Java_frame(false); - // Unbox oop result, e.g. JNIHandles::resolve value. + // Unpack oop result if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - __ resolve_jobject(rax /* value */, - r15_thread /* thread */, - rcx /* tmp */); + Label L; + __ testptr(rax, rax); + __ jcc(Assembler::zero, L); + __ movptr(rax, Address(rax, 0)); + __ bind(L); + __ verify_oop(rax); } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp b/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp index 9c02d44cdb8..eb5661bee00 100644 --- a/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp +++ b/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1193,16 +1193,16 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) { // and result handler will pick it up { - Label no_oop, not_weak, store_result; + Label no_oop, store_result; __ lea(t, ExternalAddress(AbstractInterpreter::result_handler(T_OBJECT))); __ cmpptr(t, Address(rbp, frame::interpreter_frame_result_handler_offset*wordSize)); __ jcc(Assembler::notEqual, no_oop); // retrieve result __ pop(ltos); - // Unbox oop result, e.g. JNIHandles::resolve value. - __ resolve_jobject(rax /* value */, - thread /* thread */, - t /* tmp */); + __ testptr(rax, rax); + __ jcc(Assembler::zero, store_result); + __ movptr(rax, Address(rax, 0)); + __ bind(store_result); __ movptr(Address(rbp, frame::interpreter_frame_oop_temp_offset*wordSize), rax); // keep stack depth as expected by pushing oop which will eventually be discarded __ push(ltos); diff --git a/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp b/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp index f7c51092c82..1fcf7d9984b 100644 --- a/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp +++ b/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -406,12 +406,10 @@ int CppInterpreter::native_entry(Method* method, intptr_t UNUSED, TRAPS) { // oop_temp where the garbage collector can see it before // we release the handle it might be protected by. if (handler->result_type() == &ffi_type_pointer) { - if (result[0] == 0) { + if (result[0]) + istate->set_oop_temp(*(oop *) result[0]); + else istate->set_oop_temp(NULL); - } else { - jobject handle = reinterpret_cast(result[0]); - istate->set_oop_temp(JNIHandles::resolve(handle)); - } } // Reset handle block diff --git a/hotspot/src/share/vm/prims/jni.cpp b/hotspot/src/share/vm/prims/jni.cpp index acda443267a..f519e5e2788 100644 --- a/hotspot/src/share/vm/prims/jni.cpp +++ b/hotspot/src/share/vm/prims/jni.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -935,7 +935,8 @@ class JNI_ArgumentPusherVaArg : public JNI_ArgumentPusher { inline void get_long() { _arguments->push_long(va_arg(_ap, jlong)); } inline void get_float() { _arguments->push_float((jfloat)va_arg(_ap, jdouble)); } // float is coerced to double w/ va_arg inline void get_double() { _arguments->push_double(va_arg(_ap, jdouble)); } - inline void get_object() { _arguments->push_jobject(va_arg(_ap, jobject)); } + inline void get_object() { jobject l = va_arg(_ap, jobject); + _arguments->push_oop(Handle((oop *)l, false)); } inline void set_ap(va_list rap) { va_copy(_ap, rap); @@ -1024,7 +1025,7 @@ class JNI_ArgumentPusherArray : public JNI_ArgumentPusher { inline void get_long() { _arguments->push_long((_ap++)->j); } inline void get_float() { _arguments->push_float((_ap++)->f); } inline void get_double() { _arguments->push_double((_ap++)->d);} - inline void get_object() { _arguments->push_jobject((_ap++)->l); } + inline void get_object() { _arguments->push_oop(Handle((oop *)(_ap++)->l, false)); } inline void set_ap(const jvalue *rap) { _ap = rap; } diff --git a/hotspot/src/share/vm/prims/jvmtiEnv.cpp b/hotspot/src/share/vm/prims/jvmtiEnv.cpp index 57292a2c8bc..f9dc315a552 100644 --- a/hotspot/src/share/vm/prims/jvmtiEnv.cpp +++ b/hotspot/src/share/vm/prims/jvmtiEnv.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1796,13 +1796,6 @@ JvmtiEnv::FollowReferences(jint heap_filter, jclass klass, jobject initial_objec } } - if (initial_object != NULL) { - oop init_obj = JNIHandles::resolve_external_guard(initial_object); - if (init_obj == NULL) { - return JVMTI_ERROR_INVALID_OBJECT; - } - } - Thread *thread = Thread::current(); HandleMark hm(thread); KlassHandle kh (thread, k_oop); diff --git a/hotspot/src/share/vm/runtime/javaCalls.cpp b/hotspot/src/share/vm/runtime/javaCalls.cpp index d91a32a9f08..5874699a1fc 100644 --- a/hotspot/src/share/vm/runtime/javaCalls.cpp +++ b/hotspot/src/share/vm/runtime/javaCalls.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -328,9 +328,9 @@ void JavaCalls::call_helper(JavaValue* result, const methodHandle& method, JavaC // Verify the arguments if (CheckJNICalls) { - args->verify(method, result->get_type()); + args->verify(method, result->get_type(), thread); } - else debug_only(args->verify(method, result->get_type())); + else debug_only(args->verify(method, result->get_type(), thread)); #if INCLUDE_JVMCI } #else @@ -442,43 +442,12 @@ void JavaCalls::call_helper(JavaValue* result, const methodHandle& method, JavaC //-------------------------------------------------------------------------------------- // Implementation of JavaCallArguments -inline bool is_value_state_indirect_oop(uint state) { - assert(state != JavaCallArguments::value_state_oop, - "Checking for handles after removal"); - assert(state < JavaCallArguments::value_state_limit, - "Invalid value state %u", state); - return state != JavaCallArguments::value_state_primitive; -} - -inline oop resolve_indirect_oop(intptr_t value, uint state) { - switch (state) { - case JavaCallArguments::value_state_handle: - { - oop* ptr = reinterpret_cast(value); - return Handle::raw_resolve(ptr); - } - - case JavaCallArguments::value_state_jobject: - { - jobject obj = reinterpret_cast(value); - return JNIHandles::resolve(obj); - } - - default: - ShouldNotReachHere(); - return NULL; - } -} - intptr_t* JavaCallArguments::parameters() { // First convert all handles to oops for(int i = 0; i < _size; i++) { - uint state = _value_state[i]; - assert(state != value_state_oop, "Multiple handle conversions"); - if (is_value_state_indirect_oop(state)) { - oop obj = resolve_indirect_oop(_value[i], state); - _value[i] = cast_from_oop(obj); - _value_state[i] = value_state_oop; + if (_is_oop[i]) { + // Handle conversion + _value[i] = cast_from_oop(Handle::raw_resolve((oop *)_value[i])); } } // Return argument vector @@ -488,42 +457,30 @@ intptr_t* JavaCallArguments::parameters() { class SignatureChekker : public SignatureIterator { private: - int _pos; + bool *_is_oop; + int _pos; BasicType _return_type; - u_char* _value_state; - intptr_t* _value; + intptr_t* _value; + Thread* _thread; public: bool _is_return; - SignatureChekker(Symbol* signature, - BasicType return_type, - bool is_static, - u_char* value_state, - intptr_t* value) : - SignatureIterator(signature), - _pos(0), - _return_type(return_type), - _value_state(value_state), - _value(value), - _is_return(false) - { + SignatureChekker(Symbol* signature, BasicType return_type, bool is_static, bool* is_oop, intptr_t* value, Thread* thread) : SignatureIterator(signature) { + _is_oop = is_oop; + _is_return = false; + _return_type = return_type; + _pos = 0; + _value = value; + _thread = thread; + if (!is_static) { check_value(true); // Receiver must be an oop } } void check_value(bool type) { - uint state = _value_state[_pos++]; - if (type) { - guarantee(is_value_state_indirect_oop(state), - "signature does not match pushed arguments: %u at %d", - state, _pos - 1); - } else { - guarantee(state == JavaCallArguments::value_state_primitive, - "signature does not match pushed arguments: %u at %d", - state, _pos - 1); - } + guarantee(_is_oop[_pos++] == type, "signature does not match pushed arguments"); } void check_doing_return(bool state) { _is_return = state; } @@ -558,20 +515,24 @@ class SignatureChekker : public SignatureIterator { return; } - intptr_t v = _value[_pos]; - if (v != 0) { - // v is a "handle" referring to an oop, cast to integral type. - // There shouldn't be any handles in very low memory. - guarantee((size_t)v >= (size_t)os::vm_page_size(), - "Bad JNI oop argument %d: " PTR_FORMAT, _pos, v); - // Verify the pointee. - oop vv = resolve_indirect_oop(v, _value_state[_pos]); - guarantee(vv->is_oop_or_null(true), - "Bad JNI oop argument %d: " PTR_FORMAT " -> " PTR_FORMAT, - _pos, v, p2i(vv)); + // verify handle and the oop pointed to by handle + int p = _pos; + bool bad = false; + // If argument is oop + if (_is_oop[p]) { + intptr_t v = _value[p]; + if (v != 0 ) { + size_t t = (size_t)v; + bad = (t < (size_t)os::vm_page_size() ) || !Handle::raw_resolve((oop *)v)->is_oop_or_null(true); + if (CheckJNICalls && bad) { + ReportJNIFatalError((JavaThread*)_thread, "Bad JNI oop argument"); + } + } + // for the regular debug case. + assert(!bad, "Bad JNI oop argument"); } - check_value(true); // Verify value state. + check_value(true); } void do_bool() { check_int(T_BOOLEAN); } @@ -588,7 +549,8 @@ class SignatureChekker : public SignatureIterator { }; -void JavaCallArguments::verify(const methodHandle& method, BasicType return_type) { +void JavaCallArguments::verify(const methodHandle& method, BasicType return_type, + Thread *thread) { guarantee(method->size_of_parameters() == size_of_parameters(), "wrong no. of arguments pushed"); // Treat T_OBJECT and T_ARRAY as the same @@ -597,11 +559,7 @@ void JavaCallArguments::verify(const methodHandle& method, BasicType return_type // Check that oop information is correct Symbol* signature = method->signature(); - SignatureChekker sc(signature, - return_type, - method->is_static(), - _value_state, - _value); + SignatureChekker sc(signature, return_type, method->is_static(),_is_oop, _value, thread); sc.iterate_parameters(); sc.check_doing_return(true); sc.iterate_returntype(); diff --git a/hotspot/src/share/vm/runtime/javaCalls.hpp b/hotspot/src/share/vm/runtime/javaCalls.hpp index e77abf7d36b..efe1f8b9813 100644 --- a/hotspot/src/share/vm/runtime/javaCalls.hpp +++ b/hotspot/src/share/vm/runtime/javaCalls.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -80,11 +80,11 @@ class JavaCallArguments : public StackObj { _default_size = 8 // Must be at least # of arguments in JavaCalls methods }; - intptr_t _value_buffer [_default_size + 1]; - u_char _value_state_buffer[_default_size + 1]; + intptr_t _value_buffer [_default_size + 1]; + bool _is_oop_buffer[_default_size + 1]; intptr_t* _value; - u_char* _value_state; + bool* _is_oop; int _size; int _max_size; bool _start_at_zero; // Support late setting of receiver @@ -92,8 +92,8 @@ class JavaCallArguments : public StackObj { void initialize() { // Starts at first element to support set_receiver. - _value = &_value_buffer[1]; - _value_state = &_value_state_buffer[1]; + _value = &_value_buffer[1]; + _is_oop = &_is_oop_buffer[1]; _max_size = _default_size; _size = 0; @@ -101,23 +101,6 @@ class JavaCallArguments : public StackObj { JVMCI_ONLY(_alternative_target = NULL;) } - // Helper for push_oop and the like. The value argument is a - // "handle" that refers to an oop. We record the address of the - // handle rather than the designated oop. The handle is later - // resolved to the oop by parameters(). This delays the exposure of - // naked oops until it is GC-safe. - template - inline int push_oop_impl(T handle, int size) { - // JNITypes::put_obj expects an oop value, so we play fast and - // loose with the type system. The cast from handle type to oop - // *must* use a C-style cast. In a product build it performs a - // reinterpret_cast. In a debug build (more accurately, in a - // CHECK_UNHANDLED_OOPS build) it performs a static_cast, invoking - // the debug-only oop class's conversion from void* constructor. - JNITypes::put_obj((oop)handle, _value, size); // Updates size. - return size; // Return the updated size. - } - public: JavaCallArguments() { initialize(); } @@ -128,12 +111,11 @@ class JavaCallArguments : public StackObj { JavaCallArguments(int max_size) { if (max_size > _default_size) { - _value = NEW_RESOURCE_ARRAY(intptr_t, max_size + 1); - _value_state = NEW_RESOURCE_ARRAY(u_char, max_size + 1); + _value = NEW_RESOURCE_ARRAY(intptr_t, max_size + 1); + _is_oop = NEW_RESOURCE_ARRAY(bool, max_size + 1); - // Reserve room for potential receiver in value and state - _value++; - _value_state++; + // Reserve room for potential receiver in value and is_oop + _value++; _is_oop++; _max_size = max_size; _size = 0; @@ -154,52 +136,25 @@ class JavaCallArguments : public StackObj { } #endif - // The possible values for _value_state elements. - enum { - value_state_primitive, - value_state_oop, - value_state_handle, - value_state_jobject, - value_state_limit - }; + inline void push_oop(Handle h) { _is_oop[_size] = true; + JNITypes::put_obj((oop)h.raw_value(), _value, _size); } - inline void push_oop(Handle h) { - _value_state[_size] = value_state_handle; - _size = push_oop_impl(h.raw_value(), _size); - } + inline void push_int(int i) { _is_oop[_size] = false; + JNITypes::put_int(i, _value, _size); } - inline void push_jobject(jobject h) { - _value_state[_size] = value_state_jobject; - _size = push_oop_impl(h, _size); - } + inline void push_double(double d) { _is_oop[_size] = false; _is_oop[_size + 1] = false; + JNITypes::put_double(d, _value, _size); } - inline void push_int(int i) { - _value_state[_size] = value_state_primitive; - JNITypes::put_int(i, _value, _size); - } + inline void push_long(jlong l) { _is_oop[_size] = false; _is_oop[_size + 1] = false; + JNITypes::put_long(l, _value, _size); } - inline void push_double(double d) { - _value_state[_size] = value_state_primitive; - _value_state[_size + 1] = value_state_primitive; - JNITypes::put_double(d, _value, _size); - } - - inline void push_long(jlong l) { - _value_state[_size] = value_state_primitive; - _value_state[_size + 1] = value_state_primitive; - JNITypes::put_long(l, _value, _size); - } - - inline void push_float(float f) { - _value_state[_size] = value_state_primitive; - JNITypes::put_float(f, _value, _size); - } + inline void push_float(float f) { _is_oop[_size] = false; + JNITypes::put_float(f, _value, _size); } // receiver Handle receiver() { assert(_size > 0, "must at least be one argument"); - assert(_value_state[0] == value_state_handle, - "first argument must be an oop"); + assert(_is_oop[0], "first argument must be an oop"); assert(_value[0] != 0, "receiver must be not-null"); return Handle((oop*)_value[0], false); } @@ -207,11 +162,11 @@ class JavaCallArguments : public StackObj { void set_receiver(Handle h) { assert(_start_at_zero == false, "can only be called once"); _start_at_zero = true; - _value_state--; + _is_oop--; _value--; _size++; - _value_state[0] = value_state_handle; - push_oop_impl(h.raw_value(), 0); + _is_oop[0] = true; + _value[0] = (intptr_t)h.raw_value(); } // Converts all Handles to oops, and returns a reference to parameter vector @@ -219,7 +174,7 @@ class JavaCallArguments : public StackObj { int size_of_parameters() const { return _size; } // Verify that pushed arguments fits a given method - void verify(const methodHandle& method, BasicType return_type); + void verify(const methodHandle& method, BasicType return_type, Thread *thread); }; // All calls to Java have to go via JavaCalls. Sets up the stack frame diff --git a/hotspot/src/share/vm/runtime/jniHandles.cpp b/hotspot/src/share/vm/runtime/jniHandles.cpp index f4aae3c20bf..679ade0eaca 100644 --- a/hotspot/src/share/vm/runtime/jniHandles.cpp +++ b/hotspot/src/share/vm/runtime/jniHandles.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,9 +31,6 @@ #include "runtime/jniHandles.hpp" #include "runtime/mutexLocker.hpp" #include "runtime/thread.inline.hpp" -#if INCLUDE_ALL_GCS -#include "gc/g1/g1SATBCardTableModRefBS.hpp" -#endif JNIHandleBlock* JNIHandles::_global_handles = NULL; JNIHandleBlock* JNIHandles::_weak_global_handles = NULL; @@ -95,48 +92,28 @@ jobject JNIHandles::make_weak_global(Handle obj) { jobject res = NULL; if (!obj.is_null()) { // ignore null handles - { - MutexLocker ml(JNIGlobalHandle_lock); - assert(Universe::heap()->is_in_reserved(obj()), "sanity check"); - res = _weak_global_handles->allocate_handle(obj()); - } - // Add weak tag. - assert(is_ptr_aligned(res, weak_tag_alignment), "invariant"); - char* tptr = reinterpret_cast(res) + weak_tag_value; - res = reinterpret_cast(tptr); + MutexLocker ml(JNIGlobalHandle_lock); + assert(Universe::heap()->is_in_reserved(obj()), "sanity check"); + res = _weak_global_handles->allocate_handle(obj()); } else { CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops()); } return res; } -template -oop JNIHandles::resolve_jweak(jweak handle) { - assert(is_jweak(handle), "precondition"); - oop result = jweak_ref(handle); - result = guard_value(result); -#if INCLUDE_ALL_GCS - if (result != NULL && UseG1GC) { - G1SATBCardTableModRefBS::enqueue(result); - } -#endif // INCLUDE_ALL_GCS - return result; -} - -template oop JNIHandles::resolve_jweak(jweak); -template oop JNIHandles::resolve_jweak(jweak); void JNIHandles::destroy_global(jobject handle) { if (handle != NULL) { assert(is_global_handle(handle), "Invalid delete of global JNI handle"); - jobject_ref(handle) = deleted_handle(); + *((oop*)handle) = deleted_handle(); // Mark the handle as deleted, allocate will reuse it } } void JNIHandles::destroy_weak_global(jobject handle) { if (handle != NULL) { - jweak_ref(handle) = deleted_handle(); + assert(!CheckJNICalls || is_weak_global_handle(handle), "Invalid delete of weak global JNI handle"); + *((oop*)handle) = deleted_handle(); // Mark the handle as deleted, allocate will reuse it } } diff --git a/hotspot/src/share/vm/runtime/jniHandles.hpp b/hotspot/src/share/vm/runtime/jniHandles.hpp index 13e0e155740..ce37d940d7c 100644 --- a/hotspot/src/share/vm/runtime/jniHandles.hpp +++ b/hotspot/src/share/vm/runtime/jniHandles.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,28 +40,7 @@ class JNIHandles : AllStatic { static JNIHandleBlock* _weak_global_handles; // First weak global handle block static oop _deleted_handle; // Sentinel marking deleted handles - inline static bool is_jweak(jobject handle); - inline static oop& jobject_ref(jobject handle); // NOT jweak! - inline static oop& jweak_ref(jobject handle); - - template inline static oop guard_value(oop value); - template inline static oop resolve_impl(jobject handle); - template static oop resolve_jweak(jweak handle); - public: - // Low tag bit in jobject used to distinguish a jweak. jweak is - // type equivalent to jobject, but there are places where we need to - // be able to distinguish jweak values from other jobjects, and - // is_weak_global_handle is unsuitable for performance reasons. To - // provide such a test we add weak_tag_value to the (aligned) byte - // address designated by the jobject to produce the corresponding - // jweak. Accessing the value of a jobject must account for it - // being a possibly offset jweak. - static const uintptr_t weak_tag_size = 1; - static const uintptr_t weak_tag_alignment = (1u << weak_tag_size); - static const uintptr_t weak_tag_mask = weak_tag_alignment - 1; - static const int weak_tag_value = 1; - // Resolve handle into oop inline static oop resolve(jobject handle); // Resolve externally provided handle into oop with some guards @@ -197,85 +176,36 @@ class JNIHandleBlock : public CHeapObj { #endif }; -inline bool JNIHandles::is_jweak(jobject handle) { - STATIC_ASSERT(weak_tag_size == 1); - STATIC_ASSERT(weak_tag_value == 1); - return (reinterpret_cast(handle) & weak_tag_mask) != 0; -} - -inline oop& JNIHandles::jobject_ref(jobject handle) { - assert(!is_jweak(handle), "precondition"); - return *reinterpret_cast(handle); -} - -inline oop& JNIHandles::jweak_ref(jobject handle) { - assert(is_jweak(handle), "precondition"); - char* ptr = reinterpret_cast(handle) - weak_tag_value; - return *reinterpret_cast(ptr); -} - -// external_guard is true if called from resolve_external_guard. -// Treat deleted (and possibly zapped) as NULL for external_guard, -// else as (asserted) error. -template -inline oop JNIHandles::guard_value(oop value) { - if (!external_guard) { - assert(value != badJNIHandle, "Pointing to zapped jni handle area"); - assert(value != deleted_handle(), "Used a deleted global handle"); - } else if ((value == badJNIHandle) || (value == deleted_handle())) { - value = NULL; - } - return value; -} - -// external_guard is true if called from resolve_external_guard. -template -inline oop JNIHandles::resolve_impl(jobject handle) { - assert(handle != NULL, "precondition"); - oop result; - if (is_jweak(handle)) { // Unlikely - result = resolve_jweak(handle); - } else { - result = jobject_ref(handle); - // Construction of jobjects canonicalize a null value into a null - // jobject, so for non-jweak the pointee should never be null. - assert(external_guard || result != NULL, - "Invalid value read from jni handle"); - result = guard_value(result); - } - return result; -} inline oop JNIHandles::resolve(jobject handle) { - oop result = NULL; - if (handle != NULL) { - result = resolve_impl(handle); - } + oop result = (handle == NULL ? (oop)NULL : *(oop*)handle); + assert(result != NULL || (handle == NULL || !CheckJNICalls || is_weak_global_handle(handle)), "Invalid value read from jni handle"); + assert(result != badJNIHandle, "Pointing to zapped jni handle area"); return result; -} +}; + -// Resolve some erroneous cases to NULL, rather than treating them as -// possibly unchecked errors. In particular, deleted handles are -// treated as NULL (though a deleted and later reallocated handle -// isn't detected). inline oop JNIHandles::resolve_external_guard(jobject handle) { - oop result = NULL; - if (handle != NULL) { - result = resolve_impl(handle); - } + if (handle == NULL) return NULL; + oop result = *(oop*)handle; + if (result == NULL || result == badJNIHandle) return NULL; return result; -} +}; + inline oop JNIHandles::resolve_non_null(jobject handle) { assert(handle != NULL, "JNI handle should not be null"); - oop result = resolve_impl(handle); - assert(result != NULL, "NULL read from jni handle"); + oop result = *(oop*)handle; + assert(result != NULL, "Invalid value read from jni handle"); + assert(result != badJNIHandle, "Pointing to zapped jni handle area"); + // Don't let that private _deleted_handle object escape into the wild. + assert(result != deleted_handle(), "Used a deleted global handle."); return result; -} +}; inline void JNIHandles::destroy_local(jobject handle) { if (handle != NULL) { - jobject_ref(handle) = deleted_handle(); + *((oop*)handle) = deleted_handle(); // Mark the handle as deleted, allocate will reuse it } } diff --git a/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp b/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp index b9ac6a3ebf5..53fea3154b8 100644 --- a/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp +++ b/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright 2009, 2010 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -300,7 +300,6 @@ void SharkNativeWrapper::initialize(const char *name) { not_null, merge); builder()->SetInsertPoint(not_null); -#error Needs to be updated for tagged jweak; see JNIHandles. Value *unboxed_result = builder()->CreateLoad(result); builder()->CreateBr(merge); diff --git a/hotspot/test/runtime/jni/CallWithJNIWeak/CallWithJNIWeak.java b/hotspot/test/runtime/jni/CallWithJNIWeak/CallWithJNIWeak.java deleted file mode 100644 index 491476c543a..00000000000 --- a/hotspot/test/runtime/jni/CallWithJNIWeak/CallWithJNIWeak.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 8166188 - * @summary Test call of native function with JNI weak global ref. - * @modules java.base - * @run main/othervm/native CallWithJNIWeak -*/ - -public class CallWithJNIWeak { - static { - System.loadLibrary("CallWithJNIWeak"); - } - - static native Object doStuff(Object o); - static native Object doWithWeak(Object o); - - public static void main(String[] args) { - Object o = doStuff(Thread.currentThread()); - System.out.println(o); - } -} - diff --git a/hotspot/test/runtime/jni/CallWithJNIWeak/libCallWithJNIWeak.c b/hotspot/test/runtime/jni/CallWithJNIWeak/libCallWithJNIWeak.c deleted file mode 100644 index f0bfc4e6e86..00000000000 --- a/hotspot/test/runtime/jni/CallWithJNIWeak/libCallWithJNIWeak.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -#include - -/* - * Class: CallWithJNIWeak - * Method: doStuff - * Signature: (Ljava/lang/Object;)Ljava/lang/Object; - */ -JNIEXPORT jobject JNICALL -Java_CallWithJNIWeak_doStuff(JNIEnv *env, jclass c, jobject o) { - jmethodID id = (*env)->GetStaticMethodID( - env, c, "doWithWeak", "(Ljava/lang/Object;)Ljava/lang/Object;"); - jweak w = (*env)->NewWeakGlobalRef(env, o); - jobject param = w; - (*env)->CallStaticVoidMethod(env, c, id, param); - return param; -} - -/* - * Class: CallWithJNIWeak - * Method: doWithWeak - * Signature: (Ljava/lang/Object;)Ljava/lang/Object; - */ -JNIEXPORT jobject JNICALL -Java_CallWithJNIWeak_doWithWeak(JNIEnv *env, jclass c, jobject o) { - jclass thr_class = (*env)->GetObjectClass(env, o); // o is java.lang.Thread - jmethodID id = (*env)->GetMethodID(env, thr_class, "isInterrupted", "()Z"); - jboolean b = (*env)->CallBooleanMethod(env, o, id); - return o; -} - diff --git a/hotspot/test/runtime/jni/ReturnJNIWeak/ReturnJNIWeak.java b/hotspot/test/runtime/jni/ReturnJNIWeak/ReturnJNIWeak.java deleted file mode 100644 index 6d581000fb8..00000000000 --- a/hotspot/test/runtime/jni/ReturnJNIWeak/ReturnJNIWeak.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* @test - * @bug 8166188 - * @requires vm.opt.ExplicitGCInvokesConcurrent != true - * @summary Test return of JNI weak global refs from native calls. - * @modules java.base - * @run main/othervm/native -Xint ReturnJNIWeak - * @run main/othervm/native -Xcomp ReturnJNIWeak - */ - -public final class ReturnJNIWeak { - - static { - System.loadLibrary("ReturnJNIWeak"); - } - - private static final class TestObject { - public final int value; - - public TestObject(int value) { - this.value = value; - } - } - - private static volatile TestObject testObject = null; - - private static native void registerObject(Object o); - private static native void unregisterObject(); - private static native Object getObject(); - - // Create the test object and record it both strongly and weakly. - private static void remember(int value) { - TestObject o = new TestObject(value); - registerObject(o); - testObject = o; - } - - // Remove both strong and weak references to the current test object. - private static void forget() { - unregisterObject(); - testObject = null; - } - - // Verify the weakly recorded object - private static void checkValue(int value) throws Exception { - Object o = getObject(); - if (o == null) { - throw new RuntimeException("Weak reference unexpectedly null"); - } - TestObject t = (TestObject)o; - if (t.value != value) { - throw new RuntimeException("Incorrect value"); - } - } - - // Verify we can create a weak reference and get it back. - private static void testSanity() throws Exception { - System.out.println("running testSanity"); - int value = 5; - try { - remember(value); - checkValue(value); - } finally { - forget(); - } - } - - // Verify weak ref value survives across collection if strong ref exists. - private static void testSurvival() throws Exception { - System.out.println("running testSurvival"); - int value = 10; - try { - remember(value); - checkValue(value); - System.gc(); - // Verify weak ref still has expected value. - checkValue(value); - } finally { - forget(); - } - } - - // Verify weak ref cleared if no strong ref exists. - private static void testClear() throws Exception { - System.out.println("running testClear"); - int value = 15; - try { - remember(value); - checkValue(value); - // Verify still good. - checkValue(value); - // Drop reference. - testObject = null; - System.gc(); - // Verify weak ref cleared as expected. - Object recorded = getObject(); - if (recorded != null) { - throw new RuntimeException("expected clear"); - } - } finally { - forget(); - } - } - - public static void main(String[] args) throws Exception { - testSanity(); - testSurvival(); - testClear(); - } -} diff --git a/hotspot/test/runtime/jni/ReturnJNIWeak/libReturnJNIWeak.c b/hotspot/test/runtime/jni/ReturnJNIWeak/libReturnJNIWeak.c deleted file mode 100644 index 12d7ae92e6e..00000000000 --- a/hotspot/test/runtime/jni/ReturnJNIWeak/libReturnJNIWeak.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * Native support for ReturnJNIWeak test. - */ - -#include "jni.h" - -static jweak registered = NULL; - -JNIEXPORT void JNICALL -Java_ReturnJNIWeak_registerObject(JNIEnv* env, - jclass jclazz, - jobject value) { - // assert registered == NULL - registered = (*env)->NewWeakGlobalRef(env, value); -} - -JNIEXPORT void JNICALL -Java_ReturnJNIWeak_unregisterObject(JNIEnv* env, jclass jclazz) { - if (registered != NULL) { - (*env)->DeleteWeakGlobalRef(env, registered); - registered = NULL; - } -} - -JNIEXPORT jobject JNICALL -Java_ReturnJNIWeak_getObject(JNIEnv* env, jclass jclazz) { - // assert registered != NULL - return registered; -} From a66653d1dc6c2951920c1efd3b29388d718c8697 Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Thu, 16 Feb 2017 12:26:23 -0800 Subject: [PATCH 251/447] 8175033: (se) Improve internal timing of java/nio/channels/Selector/WakeupAfterClose.java Add print of expected ClosedSelectorException Reviewed-by: alanb --- jdk/test/java/nio/channels/Selector/WakeupAfterClose.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jdk/test/java/nio/channels/Selector/WakeupAfterClose.java b/jdk/test/java/nio/channels/Selector/WakeupAfterClose.java index 273893ed215..da4c806460e 100644 --- a/jdk/test/java/nio/channels/Selector/WakeupAfterClose.java +++ b/jdk/test/java/nio/channels/Selector/WakeupAfterClose.java @@ -27,8 +27,9 @@ * @key intermittent */ -import java.nio.channels.Selector; import java.io.IOException; +import java.nio.channels.ClosedSelectorException; +import java.nio.channels.Selector; public class WakeupAfterClose { @@ -41,6 +42,9 @@ public class WakeupAfterClose { sel.select(); } catch (IOException x) { x.printStackTrace(); + } catch (ClosedSelectorException y) { + System.err.println + ("Caught expected ClosedSelectorException"); } } }; From ed6e5e01876da1126907c008937e402ee70c539d Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Thu, 16 Feb 2017 12:49:44 -0800 Subject: [PATCH 252/447] 8175048: javadoc does not decode options containing '=' and ':' correctly Reviewed-by: ksrini --- .../share/classes/jdk/javadoc/internal/tool/ToolOption.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java index 72d585cd633..29d8a1cdf9e 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java @@ -412,9 +412,7 @@ public enum ToolOption { static ToolOption get(String name) { String oname = name; - if (name.contains(":")) { - oname = name.substring(0, name.indexOf(':') + 1); - } else if (name.contains("=")) { + if (name.startsWith("--") && name.contains("=")) { oname = name.substring(0, name.indexOf('=')); } for (ToolOption o : values()) { From 86b3483d3b85b48ed046d02685830c68befc3904 Mon Sep 17 00:00:00 2001 From: Dmitry Markov Date: Thu, 16 Feb 2017 23:56:51 +0300 Subject: [PATCH 253/447] 8175025: The copyright section in the test/java/awt/font/TextLayout/DiacriticsDrawingTest.java should be updated Reviewed-by: serb, vadim --- .../TextLayout/DiacriticsDrawingTest.java | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/jdk/test/java/awt/font/TextLayout/DiacriticsDrawingTest.java b/jdk/test/java/awt/font/TextLayout/DiacriticsDrawingTest.java index 4920b8166df..49bdc392a92 100644 --- a/jdk/test/java/awt/font/TextLayout/DiacriticsDrawingTest.java +++ b/jdk/test/java/awt/font/TextLayout/DiacriticsDrawingTest.java @@ -1,17 +1,24 @@ /* * Copyright 2017 JetBrains s.r.o. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. * - * http://www.apache.org/licenses/LICENSE-2.0 + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. */ /* @test From eff1703b33df3e7f6fba3b56dbc37eb653504204 Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Thu, 16 Feb 2017 14:55:34 -0800 Subject: [PATCH 254/447] 8175041: Add success message to java/nio/channels/FileChannel/LoopingTruncate.java Print "Test succeeded" to stdout at the end of main() Reviewed-by: alanb --- jdk/test/java/nio/channels/FileChannel/LoopingTruncate.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jdk/test/java/nio/channels/FileChannel/LoopingTruncate.java b/jdk/test/java/nio/channels/FileChannel/LoopingTruncate.java index f81712c1f97..4623c9cc3ec 100644 --- a/jdk/test/java/nio/channels/FileChannel/LoopingTruncate.java +++ b/jdk/test/java/nio/channels/FileChannel/LoopingTruncate.java @@ -76,5 +76,8 @@ public class LoopingTruncate { } finally { Files.deleteIfExists(path); } + + System.out.println("Test succeeded."); + System.out.flush(); } } From 323338dfaf7c1b3e6b14104b944805d9f78c92c4 Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Thu, 16 Feb 2017 14:56:49 -0800 Subject: [PATCH 255/447] 8175042: Add success message to java/io/FileInputStream/LargeFileAvailable.java Print "Test succeeded" to stdout at the end of main() Reviewed-by: lancea --- jdk/test/java/io/FileInputStream/LargeFileAvailable.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jdk/test/java/io/FileInputStream/LargeFileAvailable.java b/jdk/test/java/io/FileInputStream/LargeFileAvailable.java index 94f6f856c2a..9d0d014786a 100644 --- a/jdk/test/java/io/FileInputStream/LargeFileAvailable.java +++ b/jdk/test/java/io/FileInputStream/LargeFileAvailable.java @@ -71,6 +71,9 @@ public class LargeFileAvailable { } finally { file.delete(); } + + System.out.println("Test succeeded."); + System.out.flush(); } // Skip toSkip number of bytes and expect that the available() method From 9edbb439a0899280f8333e6d04db09758c2141c8 Mon Sep 17 00:00:00 2001 From: Weijun Wang Date: Fri, 17 Feb 2017 10:27:09 +0800 Subject: [PATCH 256/447] 8175120: Remove old tests on kdc timeout policy Reviewed-by: xuelei --- jdk/test/sun/security/krb5/auto/BadKdc.java | 221 -------------- jdk/test/sun/security/krb5/auto/BadKdc1.java | 59 ---- jdk/test/sun/security/krb5/auto/BadKdc2.java | 55 ---- jdk/test/sun/security/krb5/auto/BadKdc3.java | 50 ---- jdk/test/sun/security/krb5/auto/BadKdc4.java | 50 ---- .../sun/security/krb5/auto/CommMatcher.java | 86 ------ .../sun/security/krb5/auto/MaxRetries.java | 278 ------------------ .../sun/security/krb5/auto/TcpTimeout.java | 107 ------- jdk/test/sun/security/krb5/auto/UdpTcp.java | 71 ----- 9 files changed, 977 deletions(-) delete mode 100644 jdk/test/sun/security/krb5/auto/BadKdc.java delete mode 100644 jdk/test/sun/security/krb5/auto/BadKdc1.java delete mode 100644 jdk/test/sun/security/krb5/auto/BadKdc2.java delete mode 100644 jdk/test/sun/security/krb5/auto/BadKdc3.java delete mode 100644 jdk/test/sun/security/krb5/auto/BadKdc4.java delete mode 100644 jdk/test/sun/security/krb5/auto/CommMatcher.java delete mode 100644 jdk/test/sun/security/krb5/auto/MaxRetries.java delete mode 100644 jdk/test/sun/security/krb5/auto/TcpTimeout.java delete mode 100644 jdk/test/sun/security/krb5/auto/UdpTcp.java diff --git a/jdk/test/sun/security/krb5/auto/BadKdc.java b/jdk/test/sun/security/krb5/auto/BadKdc.java deleted file mode 100644 index d1ace1a4157..00000000000 --- a/jdk/test/sun/security/krb5/auto/BadKdc.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -import java.io.*; -import java.net.BindException; -import java.net.DatagramPacket; -import java.net.DatagramSocket; -import java.net.InetAddress; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import javax.security.auth.login.LoginException; -import sun.security.krb5.Asn1Exception; -import sun.security.krb5.Config; - -public class BadKdc { - - // Matches the krb5 debug output: - // >>> KDCCommunication: kdc=kdc.rabbit.hole UDP:14319, timeout=2000,... - // ^ kdc# ^ timeout - static final Pattern re = Pattern.compile( - ">>> KDCCommunication: kdc=kdc.rabbit.hole UDP:(\\d)...., " + - "timeout=(\\d+),"); - - // Ratio for timeout values of all timeout tests. Not final so that - // each test can choose their own. - static float ratio = 2f; - - static void setRatio(float ratio) { - BadKdc.ratio = ratio; - } - - static float getRatio() { - return ratio; - } - - // Gets real timeout value. This method is called when writing krb5.conf - static int toReal(int from) { - return (int)(from * ratio + .5); - } - - // De-ratio a millisecond value to second - static int toSymbolicSec(int from) { - return (int)(from / ratio / 1000f + 0.5); - } - - /* - * There are several cases this test fails: - * - * 1. The random selected port is used by another process. No good way to - * prevent this happening, coz krb5.conf must be written before KDC starts. - * There are two different outcomes: - * - * a. Cannot start the KDC. A BindException thrown. - * b. When trying to access a non-existing KDC, a response is received! - * Most likely a Asn1Exception thrown - * - * 2. Even if a KDC is started, and more than 20 seconds pass by, a timeout - * can still happens for the first UDP request. In fact, the KDC did not - * received it at all. This happens on almost all platforms, especially - * solaris-i586 and solaris-x64. - * - * To avoid them: - * - * 1. Catch those exceptions and ignore - * - * 2. a. Make the timeout longer? useless - * b. Read the output carefully, if there is a timeout, it's OK. - * Just make sure the retries times and KDCs are correct. - * This is tough. - * c. Feed the KDC a UDP packet first. The current "solution". - */ - public static void go(String... expected) - throws Exception { - try { - go0(expected); - } catch (BindException be) { - System.out.println("The random port is used by another process"); - } catch (LoginException le) { - Throwable cause = le.getCause(); - if (cause instanceof Asn1Exception) { - System.out.println("Bad packet possibly from another process"); - return; - } - throw le; - } - } - - public static void go0(String... expected) - throws Exception { - System.setProperty("sun.security.krb5.debug", "true"); - - // Idle UDP sockets will trigger a SocketTimeoutException, without it, - // a PortUnreachableException will be thrown. - DatagramSocket d1 = null, d2 = null, d3 = null; - - // Make sure KDCs' ports starts with 1 and 2 and 3, - // useful for checking debug output. - int p1 = 10000 + new java.util.Random().nextInt(10000); - int p2 = 20000 + new java.util.Random().nextInt(10000); - int p3 = 30000 + new java.util.Random().nextInt(10000); - - FileWriter fw = new FileWriter("alternative-krb5.conf"); - - fw.write("[libdefaults]\n" + - "default_realm = " + OneKDC.REALM + "\n" + - "kdc_timeout = " + toReal(2000) + "\n"); - fw.write("[realms]\n" + OneKDC.REALM + " = {\n" + - "kdc = " + OneKDC.KDCHOST + ":" + p1 + "\n" + - "kdc = " + OneKDC.KDCHOST + ":" + p2 + "\n" + - "kdc = " + OneKDC.KDCHOST + ":" + p3 + "\n" + - "}\n"); - - fw.close(); - System.setProperty("java.security.krb5.conf", "alternative-krb5.conf"); - Config.refresh(); - - // Turn on k3 only - d1 = new DatagramSocket(p1); - d2 = new DatagramSocket(p2); - KDC k3 = on(p3); - - test(expected[0]); - test(expected[1]); - Config.refresh(); - test(expected[2]); - - k3.terminate(); // shutdown k3 - d3 = new DatagramSocket(p3); - - d2.close(); - on(p2); // k2 is on - - test(expected[3]); - d1.close(); - on(p1); // k1 and k2 is on - test(expected[4]); - - d3.close(); - } - - private static KDC on(int p) throws Exception { - KDC k = new KDC(OneKDC.REALM, OneKDC.KDCHOST, p, true); - k.addPrincipal(OneKDC.USER, OneKDC.PASS); - k.addPrincipalRandKey("krbtgt/" + OneKDC.REALM); - // Feed a packet to newly started KDC to warm it up - System.err.println("-------- IGNORE THIS ERROR MESSAGE --------"); - new DatagramSocket().send( - new DatagramPacket("Hello".getBytes(), 5, - InetAddress.getByName(OneKDC.KDCHOST), p)); - return k; - } - - private static void test(String expected) throws Exception { - ByteArrayOutputStream bo = new ByteArrayOutputStream(); - System.out.println("----------------- TEST -----------------"); - try { - test0(bo, expected); - } catch (Exception e) { - System.out.println("----------------- ERROR -----------------"); - System.out.println(new String(bo.toByteArray())); - System.out.println("--------------- ERROR END ---------------"); - throw e; - } - } - - /** - * One round of test for max_retries and timeout. - * @param expected the expected kdc# timeout kdc# timeout... - */ - private static void test0(ByteArrayOutputStream bo, String expected) - throws Exception { - PrintStream oldout = System.out; - boolean failed = false; - System.setOut(new PrintStream(bo)); - try { - Context.fromUserPass(OneKDC.USER, OneKDC.PASS, false); - } catch (Exception e) { - failed = true; - } finally { - System.setOut(oldout); - } - - String[] lines = new String(bo.toByteArray()).split("\n"); - StringBuilder sb = new StringBuilder(); - for (String line: lines) { - Matcher m = re.matcher(line); - if (m.find()) { - System.out.println(line); - sb.append(m.group(1)) - .append(toSymbolicSec(Integer.parseInt(m.group(2)))); - } - } - if (failed) sb.append('-'); - - String output = sb.toString(); - System.out.println("Expected: " + expected + ", actual " + output); - if (!output.matches(expected)) { - throw new Exception("Does not match"); - } - } -} diff --git a/jdk/test/sun/security/krb5/auto/BadKdc1.java b/jdk/test/sun/security/krb5/auto/BadKdc1.java deleted file mode 100644 index 0ac77b60868..00000000000 --- a/jdk/test/sun/security/krb5/auto/BadKdc1.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843127 - * @run main/othervm/timeout=300 BadKdc1 - * @summary krb5 should not try to access unavailable kdc too often - */ - -import java.security.Security; - -public class BadKdc1 { - - public static void main(String[] args) - throws Exception { - - // 5 sec is default timeout for tryLess - if (BadKdc.getRatio() > 2.5) { - Security.setProperty("krb5.kdc.bad.policy", - "tryLess:1," + BadKdc.toReal(2000)); - } else { - Security.setProperty("krb5.kdc.bad.policy", "tryLess"); - } - - BadKdc.go( - "121212222222(32){1,3}1222(32){1,3}", // 1 2 - // The above line means try kdc1 for 2 seconds then kdc1 - // for 2 seconds... finally kdc3 for 2 seconds. - "1222(32){1,3}1222(32){1,3}", // 1 2 - // refresh - "121212222222(32){1,3}1222(32){1,3}", // 1 2 - // k3 off k2 on - "(122212(22){1,3}|1222323232-)", // 1 - // k1 on - "(12(12){1,3}|122212|122232-)" // empty - ); - } -} diff --git a/jdk/test/sun/security/krb5/auto/BadKdc2.java b/jdk/test/sun/security/krb5/auto/BadKdc2.java deleted file mode 100644 index a490ca73c87..00000000000 --- a/jdk/test/sun/security/krb5/auto/BadKdc2.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843127 - * @run main/othervm/timeout=300 BadKdc2 - * @summary krb5 should not try to access unavailable kdc too often - */ - -import java.io.*; -import java.security.Security; - -public class BadKdc2 { - - public static void main(String[] args) - throws Exception { - - // 1 sec is too short. - BadKdc.setRatio(3.0f); - - Security.setProperty( - "krb5.kdc.bad.policy", "tryLess:2," + BadKdc.toReal(1000)); - BadKdc.go( - "121212222222(32){1,3}11112121(32){1,3}", // 1 2 - "11112121(32){1,3}11112121(32){1,3}", // 1 2 - // refresh - "121212222222(32){1,3}11112121(32){1,3}", // 1 2 - // k3 off k2 on - "1111(21){1,3}1111(22){1,3}", // 1 - // k1 on - "(11){1,3}(12){1,3}" // empty - ); - } -} diff --git a/jdk/test/sun/security/krb5/auto/BadKdc3.java b/jdk/test/sun/security/krb5/auto/BadKdc3.java deleted file mode 100644 index 4bafd9a2ffe..00000000000 --- a/jdk/test/sun/security/krb5/auto/BadKdc3.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843127 - * @run main/othervm/timeout=300 BadKdc3 - * @summary krb5 should not try to access unavailable kdc too often - */ - -import java.io.*; -import java.security.Security; - -public class BadKdc3 { - - public static void main(String[] args) - throws Exception { - Security.setProperty("krb5.kdc.bad.policy", "tryLast"); - BadKdc.go( - "121212222222(32){2,4}", // 1 2 - "(32){2,4}", // 1 2 - // refresh - "121212222222(32){2,4}", // 1 2 - // k3 off k2 on - "323232121212(22){2,4}", // 1 3 - // k1 on - "(22){2,4}" // 1 3 - ); - } -} diff --git a/jdk/test/sun/security/krb5/auto/BadKdc4.java b/jdk/test/sun/security/krb5/auto/BadKdc4.java deleted file mode 100644 index 8d64db2faca..00000000000 --- a/jdk/test/sun/security/krb5/auto/BadKdc4.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843127 - * @run main/othervm/timeout=300 BadKdc4 - * @summary krb5 should not try to access unavailable kdc too often - */ - -import java.io.*; -import java.security.Security; - -public class BadKdc4 { - - public static void main(String[] args) - throws Exception { - Security.setProperty("krb5.kdc.bad.policy", ""); - BadKdc.go( - "121212222222(32){1,3}121212222222(32){1,3}", - "121212222222(32){1,3}121212222222(32){1,3}", - // refresh - "121212222222(32){1,3}121212222222(32){1,3}", - // k3 off k2 on - "121212(22){1,3}121212(22){1,3}", - // k1 on - "(12){2,4}" - ); - } -} diff --git a/jdk/test/sun/security/krb5/auto/CommMatcher.java b/jdk/test/sun/security/krb5/auto/CommMatcher.java deleted file mode 100644 index 1cfe25a5d4d..00000000000 --- a/jdk/test/sun/security/krb5/auto/CommMatcher.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -import java.util.ArrayList; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * Matches the krb5 debug output: - * >>> KDCCommunication: kdc=host UDP:11555, timeout=100,Attempt =1, #bytes=138 - * - * Example: - * CommMatcher cm = new CommMatcher(); - * cm.addPort(12345).addPort(23456); - * for (String line : debugOutput) { - * if (cm.match(line)) { - * println("KDC: %c, %s, Timeout: %d\n", - * cm.kdc(), cm.protocol(), cm.timeout()); - * } - * } - */ -public class CommMatcher { - - static final Pattern re = Pattern.compile( - ">>> KDCCommunication: kdc=\\S+ (TCP|UDP):(\\d+), " + - "timeout=(\\d+),Attempt\\s*=(\\d+)"); - - List kdcPorts = new ArrayList<>(); - Matcher matcher; - - /** - * Add KDC ports one by one. The 1st KDC will be 'a' in {@link #kdc()}, - * 2nd is 'b', etc, etc. - */ - public CommMatcher addPort(int port) { - if (port > 0) { - kdcPorts.add(port); - } else { - kdcPorts.clear(); - } - return this; - } - - public boolean match(String line) { - matcher = re.matcher(line); - return matcher.find(); - } - - public String protocol() { - return matcher.group(1); - } - - public char kdc() { - int port = Integer.parseInt(matcher.group(2)); - return (char)(kdcPorts.indexOf(port) + 'a'); - } - - public int timeout() { - return BadKdc.toSymbolicSec(Integer.parseInt(matcher.group(3))); - } - - public int attempt() { - return Integer.parseInt(matcher.group(4)); - } -} diff --git a/jdk/test/sun/security/krb5/auto/MaxRetries.java b/jdk/test/sun/security/krb5/auto/MaxRetries.java deleted file mode 100644 index 973873a6524..00000000000 --- a/jdk/test/sun/security/krb5/auto/MaxRetries.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6844193 - * @compile -XDignore.symbol.file MaxRetries.java - * @run main/othervm/timeout=300 MaxRetries - * @summary support max_retries in krb5.conf - */ - -import javax.security.auth.login.LoginException; -import java.io.*; -import java.net.DatagramSocket; -import java.security.Security; - -public class MaxRetries { - - static int idlePort = -1; - static CommMatcher cm = new CommMatcher(); - - public static void main(String[] args) - throws Exception { - - System.setProperty("sun.security.krb5.debug", "true"); - OneKDC kdc = new OneKDC(null).writeJAASConf(); - - // An idle UDP socket to prevent PortUnreachableException - DatagramSocket ds = new DatagramSocket(); - idlePort = ds.getLocalPort(); - - cm.addPort(idlePort); - cm.addPort(kdc.getPort()); - - System.setProperty("java.security.krb5.conf", "alternative-krb5.conf"); - - Security.setProperty("krb5.kdc.bad.policy", "trylast"); - - // We always make the real timeout to be 1 second - BadKdc.setRatio(0.25f); - rewriteMaxRetries(4); - - // Explanation: In this case, max_retries=4 and timeout=4s. - // For AS-REQ without preauth, we will see 4 4s timeout on kdc#1 - // ("a4" repeat 4 times), and one 4s timeout on kdc#2 ("b4"). For - // AS-REQ with preauth, one 4s timeout on kdc#2 (second "b4"). - // we tolerate 4 real timeout on kdc#2, so make it "(b4){2,6}". - test1("a4a4a4a4b4b4", "a4a4a4a4(b4){2,6}"); - test1("b4b4", "(b4){2,6}"); - - BadKdc.setRatio(1f); - rewriteMaxRetries(1); - // Explanation: Since max_retries=1 only, we could fail in 1st or 2nd - // AS-REQ to kdc#2. - String actual = test1("a1b1b1", "(a1b1b1|a1b1x|a1b1b1x)"); - if (actual.endsWith("x")) { - // If 1st attempt fails, all bads are back available - test1("a1b1b1", "(a1b1b1|a1b1x|a1b1b1x)"); - } else { - test1("b1b1", "(b1b1|b1x|b1b1x)"); - } - - BadKdc.setRatio(0.2f); - rewriteMaxRetries(-1); - test1("a5a5a5b5b5", "a5a5a5(b5){2,4}"); - test1("b5b5", "(b5){2,4}"); - - BadKdc.setRatio(0.25f); - Security.setProperty("krb5.kdc.bad.policy", - "tryless:1,1000"); - rewriteMaxRetries(4); - test1("a4a4a4a4b4a4b4", "a4a4a4a4(b4){1,3}a4(b4){1,3}"); - test1("a4b4a4b4", "a4(b4){1,3}a4(b4){1,3}"); - - BadKdc.setRatio(1f); - rewriteMaxRetries(1); - actual = test1("a1b1a1b1", "(a1b1|a1b1x|a1b1a1b1|a1b1a1b1x)"); - if (actual.endsWith("x")) { - test1("a1b1a1b1", "(a1b1|a1b1x|a1b1a1b1|a1b1a1b1x)"); - } else { - test1("a1b1a1b1", "(a1b1|a1b1x|a1b1a1b1|a1b1a1b1x)"); - } - - BadKdc.setRatio(.2f); - rewriteMaxRetries(-1); - test1("a5a5a5b5a5b5", "a5a5a5(b5){1,2}a5(b5){1,2}"); - test1("a5b5a5b5", "a5(b5){1,2}a5(b5){1,2}"); - - BadKdc.setRatio(1f); - rewriteMaxRetries(2); - if (BadKdc.toReal(2000) > 1000) { - // Explanation: if timeout is longer than 1s in tryLess, - // we will see "a1" at 2nd kdc#1 access - test1("a2a2b2a1b2", "a2a2(b2){1,2}a1(b2){1,2}"); - } else { - test1("a2a2b2a2b2", "a2a2(b2){1,2}a2(b2){1,2}"); - } - - BadKdc.setRatio(1f); - - rewriteUdpPrefLimit(-1, -1); // default, no limit - test2("UDP"); - - rewriteUdpPrefLimit(10, -1); // global rules - test2("TCP"); - - rewriteUdpPrefLimit(10, 10000); // realm rules - test2("UDP"); - - rewriteUdpPrefLimit(10000, 10); // realm rules - test2("TCP"); - - ds.close(); - } - - /** - * One round of test for max_retries and timeout. - * - * @param exact the expected exact match, where no timeout - * happens for real KDCs - * @param relaxed the expected relaxed match, where some timeout - * could happen for real KDCs - * @return the actual result - */ - private static String test1(String exact, String relaxed) throws Exception { - ByteArrayOutputStream bo = new ByteArrayOutputStream(); - PrintStream oldout = System.out; - System.setOut(new PrintStream(bo)); - boolean failed = false; - long start = System.nanoTime(); - try { - Context c = Context.fromJAAS("client"); - } catch (LoginException e) { - failed = true; - } - System.setOut(oldout); - - String[] lines = new String(bo.toByteArray()).split("\n"); - System.out.println("----------------- TEST (" + exact - + ") -----------------"); - - // Result, a series of timeout + kdc# - StringBuilder sb = new StringBuilder(); - for (String line: lines) { - if (cm.match(line)) { - System.out.println(line); - sb.append(cm.kdc()).append(cm.timeout()); - } - } - if (failed) { - sb.append("x"); - } - System.out.println("Time: " + (System.nanoTime() - start) / 1000000000d); - String actual = sb.toString(); - System.out.println("Actual: " + actual); - if (actual.equals(exact)) { - System.out.println("Exact match: " + exact); - } else if (actual.matches(relaxed)) { - System.out.println("!!!! Tolerant match: " + relaxed); - } else { - throw new Exception("Match neither " + exact + " nor " + relaxed); - } - return actual; - } - - /** - * One round of test for udp_preference_limit. - * @param proto the expected protocol used - */ - private static void test2(String proto) throws Exception { - ByteArrayOutputStream bo = new ByteArrayOutputStream(); - PrintStream oldout = System.out; - System.setOut(new PrintStream(bo)); - Context c = Context.fromJAAS("client"); - System.setOut(oldout); - - int count = 2; - String[] lines = new String(bo.toByteArray()).split("\n"); - System.out.println("----------------- TEST -----------------"); - for (String line: lines) { - if (cm.match(line)) { - System.out.println(line); - count--; - if (!cm.protocol().equals(proto)) { - throw new Exception("Wrong protocol value"); - } - } - } - if (count != 0) { - throw new Exception("Retry count is " + count + " less"); - } - } - - /** - * Set udp_preference_limit for global and realm - */ - private static void rewriteUdpPrefLimit(int global, int realm) - throws Exception { - BufferedReader fr = new BufferedReader(new FileReader(OneKDC.KRB5_CONF)); - FileWriter fw = new FileWriter("alternative-krb5.conf"); - while (true) { - String s = fr.readLine(); - if (s == null) { - break; - } - if (s.startsWith("[realms]")) { - // Reconfig global setting - fw.write("kdc_timeout = 5000\n"); - if (global != -1) { - fw.write("udp_preference_limit = " + global + "\n"); - } - } else if (s.trim().startsWith("kdc = ")) { - if (realm != -1) { - // Reconfig for realm - fw.write(" udp_preference_limit = " + realm + "\n"); - } - } - fw.write(s + "\n"); - } - fr.close(); - fw.close(); - sun.security.krb5.Config.refresh(); - } - - /** - * Set max_retries and timeout value for realm. The global value is always - * 3 and 5000. - * - * @param value max_retries and timeout/1000 for a realm, -1 means none. - */ - private static void rewriteMaxRetries(int value) throws Exception { - BufferedReader fr = new BufferedReader(new FileReader(OneKDC.KRB5_CONF)); - FileWriter fw = new FileWriter("alternative-krb5.conf"); - while (true) { - String s = fr.readLine(); - if (s == null) { - break; - } - if (s.startsWith("[realms]")) { - // Reconfig global setting - fw.write("max_retries = 3\n"); - fw.write("kdc_timeout = " + BadKdc.toReal(5000) + "\n"); - } else if (s.trim().startsWith("kdc = ")) { - if (value != -1) { - // Reconfig for realm - fw.write(" max_retries = " + value + "\n"); - fw.write(" kdc_timeout = " + BadKdc.toReal(value*1000) + "\n"); - } - // Add a bad KDC as the first candidate - fw.write(" kdc = localhost:" + idlePort + "\n"); - } - fw.write(s + "\n"); - } - fr.close(); - fw.close(); - sun.security.krb5.Config.refresh(); - } -} diff --git a/jdk/test/sun/security/krb5/auto/TcpTimeout.java b/jdk/test/sun/security/krb5/auto/TcpTimeout.java deleted file mode 100644 index 45699fbe5ad..00000000000 --- a/jdk/test/sun/security/krb5/auto/TcpTimeout.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6952519 - * @compile -XDignore.symbol.file TcpTimeout.java - * @run main/othervm TcpTimeout - * @summary kdc_timeout is not being honoured when using TCP - */ - -import java.io.*; -import java.net.ServerSocket; -import sun.security.krb5.Config; - -public class TcpTimeout { - public static void main(String[] args) - throws Exception { - - // Set debug to grab debug output like ">>> KDCCommunication" - System.setProperty("sun.security.krb5.debug", "true"); - - // Called before new ServerSocket on p1 and p2 to make sure - // customized nameservice is used - KDC k = new KDC(OneKDC.REALM, OneKDC.KDCHOST, 0, true); - int p3 = k.getPort(); - k.addPrincipal(OneKDC.USER, OneKDC.PASS); - k.addPrincipalRandKey("krbtgt/" + OneKDC.REALM); - - // Start two listener that does not communicate, simulate timeout - ServerSocket ss1 = null; - ServerSocket ss2 = null; - - try { - ss1 = new ServerSocket(0); - ss2 = new ServerSocket(0); - int p1 = ss1.getLocalPort(); - int p2 = ss2.getLocalPort(); - - FileWriter fw = new FileWriter("alternative-krb5.conf"); - - fw.write("[libdefaults]\n" + - "udp_preference_limit = 1\n" + - "max_retries = 2\n" + - "default_realm = " + OneKDC.REALM + "\n" + - "kdc_timeout = " + BadKdc.toReal(5000) + "\n"); - fw.write("[realms]\n" + OneKDC.REALM + " = {\n" + - "kdc = " + OneKDC.KDCHOST + ":" + p1 + "\n" + - "kdc = " + OneKDC.KDCHOST + ":" + p2 + "\n" + - "kdc = " + OneKDC.KDCHOST + ":" + p3 + "\n" + - "}\n"); - - fw.close(); - System.setProperty("java.security.krb5.conf", - "alternative-krb5.conf"); - Config.refresh(); - - System.out.println("Ports opened on " + p1 + ", " + p2 + ", " + p3); - - // The correct behavior should be: - // 5 sec on p1, 5 sec on p1, fail - // 5 sec on p2, 5 sec on p2, fail - // p3 ok, p3 ok again for preauth. - int count = 6; - - ByteArrayOutputStream bo = new ByteArrayOutputStream(); - PrintStream oldout = System.out; - System.setOut(new PrintStream(bo)); - Context c = Context.fromUserPass(OneKDC.USER, OneKDC.PASS, false); - System.setOut(oldout); - - String[] lines = new String(bo.toByteArray()).split("\n"); - for (String line: lines) { - if (line.startsWith(">>> KDCCommunication")) { - System.out.println(line); - count--; - } - } - if (count != 0) { - throw new Exception("Retry count is " + count + " less"); - } - } finally { - if (ss1 != null) ss1.close(); - if (ss2 != null) ss2.close(); - } - } -} diff --git a/jdk/test/sun/security/krb5/auto/UdpTcp.java b/jdk/test/sun/security/krb5/auto/UdpTcp.java deleted file mode 100644 index ae54b793527..00000000000 --- a/jdk/test/sun/security/krb5/auto/UdpTcp.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 4966382 8039132 - * @run main/othervm UdpTcp UDP - * @run main/othervm UdpTcp TCP - * @summary udp or tcp - */ - -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; -import sun.security.krb5.Config; - -public class UdpTcp { - - public static void main(String[] args) - throws Exception { - - System.setProperty("sun.security.krb5.debug", "true"); - - OneKDC kdc = new OneKDC(null); - kdc.writeJAASConf(); - - // Two styles of kdc_timeout setting. One global, one realm-specific. - if (args[0].equals("UDP")) { - KDC.saveConfig(OneKDC.KRB5_CONF, kdc, - "kdc_timeout = 10s"); - } else { - kdc.addConf("kdc_timeout = 10s"); - KDC.saveConfig(OneKDC.KRB5_CONF, kdc, - "udp_preference_limit = 1"); - } - Config.refresh(); - - ByteArrayOutputStream bo = new ByteArrayOutputStream(); - PrintStream oldout = System.out; - System.setOut(new PrintStream(bo)); - Context.fromUserPass(OneKDC.USER, OneKDC.PASS, false); - System.setOut(oldout); - - for (String line: new String(bo.toByteArray()).split("\n")) { - if (line.contains(">>> KDCCommunication")) { - if (!line.contains(args[0]) || !line.contains("timeout=10000")) { - throw new Exception("No " + args[0] + " in: " + line); - } - } - } - } -} From 12ca4e48e7c95c7b4babd63f164525c41fc01fe6 Mon Sep 17 00:00:00 2001 From: Amy Lu Date: Fri, 17 Feb 2017 14:10:24 +0800 Subject: [PATCH 257/447] 8175062: Mark java/nio/channels/AsyncCloseAndInterrupt.java as intermittently failing Reviewed-by: bpb --- jdk/test/java/nio/channels/AsyncCloseAndInterrupt.java | 1 + 1 file changed, 1 insertion(+) diff --git a/jdk/test/java/nio/channels/AsyncCloseAndInterrupt.java b/jdk/test/java/nio/channels/AsyncCloseAndInterrupt.java index 8f6bf999f11..654697f3cda 100644 --- a/jdk/test/java/nio/channels/AsyncCloseAndInterrupt.java +++ b/jdk/test/java/nio/channels/AsyncCloseAndInterrupt.java @@ -25,6 +25,7 @@ * @bug 4460583 4470470 4840199 6419424 6710579 6596323 6824135 6395224 7142919 * 8151582 8068693 8153209 * @run main/othervm AsyncCloseAndInterrupt + * @key intermittent * @summary Comprehensive test of asynchronous closing and interruption * @author Mark Reinhold */ From 0d93c1d68ed36569655f2e7396c49c0d68575711 Mon Sep 17 00:00:00 2001 From: Magnus Ihse Bursie Date: Fri, 17 Feb 2017 14:55:35 +0100 Subject: [PATCH 258/447] 8175165: Don't process JceSecurity.java.template if crypto sources is not present Reviewed-by: erikj --- jdk/make/gensrc/GensrcMisc.gmk | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/jdk/make/gensrc/GensrcMisc.gmk b/jdk/make/gensrc/GensrcMisc.gmk index 6b5dcf9e6b6..9a03f118b82 100644 --- a/jdk/make/gensrc/GensrcMisc.gmk +++ b/jdk/make/gensrc/GensrcMisc.gmk @@ -116,11 +116,13 @@ else JCE_DEFAULT_POLICY = limited endif -$(eval $(call SetupTextFileProcessing, BUILD_JCESECURITY_JAVA, \ - SOURCE_FILES := $(JDK_TOPDIR)/src/java.base/share/classes/javax/crypto/JceSecurity.java.template, \ - OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/javax/crypto/JceSecurity.java, \ - REPLACEMENTS := \ +ifneq ($(wildcard $(JDK_TOPDIR)/src/java.base/share/classes/javax/crypto/JceSecurity.java.template), ) + $(eval $(call SetupTextFileProcessing, BUILD_JCESECURITY_JAVA, \ + SOURCE_FILES := $(JDK_TOPDIR)/src/java.base/share/classes/javax/crypto/JceSecurity.java.template, \ + OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/javax/crypto/JceSecurity.java, \ + REPLACEMENTS := \ @@JCE_DEFAULT_POLICY@@ => $(JCE_DEFAULT_POLICY), \ -)) + )) -GENSRC_JAVA_BASE += $(BUILD_JCESECURITY_JAVA) + GENSRC_JAVA_BASE += $(BUILD_JCESECURITY_JAVA) +endif From a82c165dd516bc90b32212c839bc3a0060569dd1 Mon Sep 17 00:00:00 2001 From: Vicente Romero Date: Thu, 16 Feb 2017 14:47:39 -0800 Subject: [PATCH 259/447] 8174805: JavacTrees should use Types.skipTypeVars() to get the upper bound of type variables Reviewed-by: jjg, ksrini --- .../com/sun/tools/javac/api/JavacTrees.java | 2 +- .../TestTypeVariableLinks.java | 55 +++++++++++++++++++ .../doclet/testTypeVariableLinks/pkg1/C.java | 53 ++++++++++++++++++ 3 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 langtools/test/jdk/javadoc/doclet/testTypeVariableLinks/TestTypeVariableLinks.java create mode 100644 langtools/test/jdk/javadoc/doclet/testTypeVariableLinks/pkg1/C.java diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java index beb39842621..f57ab01b584 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java @@ -483,7 +483,7 @@ public class JavacTrees extends DocTrees { paramTypes = lb.toList(); } - ClassSymbol sym = (ClassSymbol) types.cvarUpperBound(tsym.type).tsym; + ClassSymbol sym = (ClassSymbol) types.skipTypeVars(tsym.type, false).tsym; Symbol msym = (memberName == sym.name) ? findConstructor(sym, paramTypes) diff --git a/langtools/test/jdk/javadoc/doclet/testTypeVariableLinks/TestTypeVariableLinks.java b/langtools/test/jdk/javadoc/doclet/testTypeVariableLinks/TestTypeVariableLinks.java new file mode 100644 index 00000000000..9d1672fca26 --- /dev/null +++ b/langtools/test/jdk/javadoc/doclet/testTypeVariableLinks/TestTypeVariableLinks.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8174805 + * @summary JavacTrees should use Types.skipTypeVars() to get the upper bound of type variables + * @library ../lib + * @modules jdk.javadoc/jdk.javadoc.internal.tool + * @build JavadocTester + * @run main TestTypeVariableLinks + */ + +public class TestTypeVariableLinks extends JavadocTester { + + public static void main(String... args) throws Exception { + TestTypeVariableLinks tester = new TestTypeVariableLinks(); + tester.runTests(); + } + + @Test + void test1() { + javadoc("-d", "out", "-sourcepath", testSrc, "-package", "pkg1"); + checkExit(Exit.OK); + + checkOutput("pkg1/C.html", true, + "
      Linking to Object.equals() Object.equals(Object)
      "); + checkOutput("pkg1/C.html", true, + "
      Linking to List.clear() List.clear()
      "); + checkOutput("pkg1/C.html", true, + "
      Linking to Additional.doAction() Additional.doAction()
      "); + checkOutput("pkg1/C.html", true, + "
      Linking to I.abstractAction() I.abstractAction()
      "); + } +} diff --git a/langtools/test/jdk/javadoc/doclet/testTypeVariableLinks/pkg1/C.java b/langtools/test/jdk/javadoc/doclet/testTypeVariableLinks/pkg1/C.java new file mode 100644 index 00000000000..5a16761de4e --- /dev/null +++ b/langtools/test/jdk/javadoc/doclet/testTypeVariableLinks/pkg1/C.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package pkg1; + +import java.util.List; + +public class C, G extends Additional & I> { + /** + * Linking to Object.equals() {@link T#equals(Object)} + */ + public void m1() {} + /** + * Linking to List.clear() {@link F#clear()} + */ + public void m2() {} + /** + * Linking to Additional.doAction() {@link G#doAction()} + */ + public void m3() {} + /** + * Linking to I.abstractAction() {@link G#abstractAction()} + */ + public void m4() {} +} + +class Additional { + public void doAction() {} +} + +interface I { + void abstractAction(); +} From d0db608122f9850f7252b5795b30c10aa4eff9fd Mon Sep 17 00:00:00 2001 From: Roland Westrelin Date: Thu, 16 Feb 2017 15:14:44 -0800 Subject: [PATCH 260/447] 8175097: [TESTBUG] 8174164 fix missed the test Reviewed-by: kvn --- .../compiler/c2/TestReplacedNodesOSR.java | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 hotspot/test/compiler/c2/TestReplacedNodesOSR.java diff --git a/hotspot/test/compiler/c2/TestReplacedNodesOSR.java b/hotspot/test/compiler/c2/TestReplacedNodesOSR.java new file mode 100644 index 00000000000..926295e496e --- /dev/null +++ b/hotspot/test/compiler/c2/TestReplacedNodesOSR.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2017, Red Hat, Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 8174164 + * @summary SafePointNode::_replaced_nodes breaks with irreducible loops + * @run main/othervm -XX:-BackgroundCompilation TestReplacedNodesOSR + * + */ + +public class TestReplacedNodesOSR { + + static Object dummy; + + static interface I { + } + + static class A implements I { + } + + static final class MyException extends Exception { + } + + static final A obj = new A(); + static I static_field() { return obj; } + + // When OSR compiled, this method has an irreducible loop + static void test(int v, MyException e) { + int i = 0; + for (;;) { + if (i == 1000) { + break; + } + try { + if ((i%2) == 0) { + int j = 0; + for (;;) { + j++; + if (i+j != v) { + if (j == 1000) { + break; + } + } else { + A a = (A)static_field(); + // replaced node recorded here + throw e; + } + } + } + } catch(MyException ex) { + } + i++; + // replaced node applied on return of the method + // replaced node used here + dummy = static_field(); + } + } + + + static public void main(String[] args) { + for (int i = 0; i < 1000; i++) { + test(1100, new MyException()); + } + } +} From 7d969ccd5589f4b07aea72165bee38b405a10cab Mon Sep 17 00:00:00 2001 From: Vladimir Kozlov Date: Thu, 16 Feb 2017 15:46:09 -0800 Subject: [PATCH 261/447] 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci Rename jdk.vm.ci and jdk.vm.compiler modules to jdk.internal.vm.ci and jdk.internal.vm.compiler. Reviewed-by: mchung, ihse, dnsimon --- hotspot/.hgignore | 22 +++++----- hotspot/make/CompileTools.gmk | 4 +- ...mk => Gensrc-jdk.internal.vm.compiler.gmk} | 38 +++++++++--------- hotspot/make/ide/CreateVSProject.gmk | 4 +- .../jdk.aot/share/classes/module-info.java | 4 +- .../src/jdk/vm/ci/aarch64/AArch64.java | 0 .../src/jdk/vm/ci/aarch64/AArch64Kind.java | 0 .../src/jdk/vm/ci/amd64/AMD64.java | 0 .../src/jdk/vm/ci/amd64/AMD64Kind.java | 0 .../classes/jdk.vm.ci.code/overview.html | 0 .../src/jdk/vm/ci/code/Architecture.java | 0 .../src/jdk/vm/ci/code/BailoutException.java | 0 .../src/jdk/vm/ci/code/BytecodeFrame.java | 0 .../src/jdk/vm/ci/code/BytecodePosition.java | 0 .../src/jdk/vm/ci/code/CallingConvention.java | 0 .../src/jdk/vm/ci/code/CodeCacheProvider.java | 0 .../src/jdk/vm/ci/code/CodeUtil.java | 0 .../jdk/vm/ci/code/CompilationRequest.java | 0 .../vm/ci/code/CompilationRequestResult.java | 0 .../src/jdk/vm/ci/code/CompiledCode.java | 0 .../src/jdk/vm/ci/code/DebugInfo.java | 0 .../src/jdk/vm/ci/code/InstalledCode.java | 0 .../code/InvalidInstalledCodeException.java | 0 .../src/jdk/vm/ci/code/Location.java | 0 .../src/jdk/vm/ci/code/MemoryBarriers.java | 0 .../src/jdk/vm/ci/code/ReferenceMap.java | 0 .../src/jdk/vm/ci/code/Register.java | 0 .../src/jdk/vm/ci/code/RegisterArray.java | 0 .../jdk/vm/ci/code/RegisterAttributes.java | 0 .../src/jdk/vm/ci/code/RegisterConfig.java | 0 .../jdk/vm/ci/code/RegisterSaveLayout.java | 0 .../src/jdk/vm/ci/code/RegisterValue.java | 0 .../src/jdk/vm/ci/code/StackLockValue.java | 0 .../src/jdk/vm/ci/code/StackSlot.java | 0 .../jdk/vm/ci/code/SuppressFBWarnings.java | 0 .../src/jdk/vm/ci/code/TargetDescription.java | 0 .../src/jdk/vm/ci/code/ValueKindFactory.java | 0 .../src/jdk/vm/ci/code/ValueUtil.java | 0 .../src/jdk/vm/ci/code/VirtualObject.java | 0 .../src/jdk/vm/ci/code/package-info.java | 0 .../src/jdk/vm/ci/code/site/Call.java | 0 .../vm/ci/code/site/ConstantReference.java | 0 .../src/jdk/vm/ci/code/site/DataPatch.java | 0 .../vm/ci/code/site/DataSectionReference.java | 0 .../jdk/vm/ci/code/site/ExceptionHandler.java | 0 .../src/jdk/vm/ci/code/site/Infopoint.java | 0 .../jdk/vm/ci/code/site/InfopointReason.java | 0 .../src/jdk/vm/ci/code/site/Mark.java | 0 .../src/jdk/vm/ci/code/site/Reference.java | 0 .../src/jdk/vm/ci/code/site/Site.java | 0 .../jdk/vm/ci/code/stack/InspectedFrame.java | 0 .../ci/code/stack/InspectedFrameVisitor.java | 0 .../vm/ci/code/stack/StackIntrospection.java | 0 .../src/jdk/vm/ci/common/InitTimer.java | 0 .../src/jdk/vm/ci/common/JVMCIError.java | 0 .../jdk/vm/ci/common/SuppressFBWarnings.java | 0 .../AArch64HotSpotJVMCIBackendFactory.java | 0 .../aarch64/AArch64HotSpotRegisterConfig.java | 0 .../aarch64/AArch64HotSpotVMConfig.java | 0 .../AMD64HotSpotJVMCIBackendFactory.java | 0 .../amd64/AMD64HotSpotRegisterConfig.java | 0 .../hotspot/amd64/AMD64HotSpotVMConfig.java | 0 .../SPARCHotSpotJVMCIBackendFactory.java | 0 .../sparc/SPARCHotSpotRegisterConfig.java | 0 .../hotspot/sparc/SPARCHotSpotVMConfig.java | 0 .../src/jdk/vm/ci/hotspot/CompilerToVM.java | 0 .../jdk/vm/ci/hotspot/EmptyEventProvider.java | 0 .../src/jdk/vm/ci/hotspot/EventProvider.java | 0 .../hotspot/HotSpotCallingConventionType.java | 0 .../ci/hotspot/HotSpotCodeCacheProvider.java | 0 .../ci/hotspot/HotSpotCompilationRequest.java | 0 .../HotSpotCompilationRequestResult.java | 0 .../vm/ci/hotspot/HotSpotCompiledCode.java | 0 .../vm/ci/hotspot/HotSpotCompiledNmethod.java | 0 .../HotSpotCompressedNullConstant.java | 0 .../jdk/vm/ci/hotspot/HotSpotConstant.java | 0 .../vm/ci/hotspot/HotSpotConstantPool.java | 0 .../HotSpotConstantReflectionProvider.java | 0 .../ci/hotspot/HotSpotForeignCallTarget.java | 0 .../vm/ci/hotspot/HotSpotInstalledCode.java | 0 .../hotspot/HotSpotJVMCIBackendFactory.java | 0 .../hotspot/HotSpotJVMCICompilerConfig.java | 0 .../hotspot/HotSpotJVMCICompilerFactory.java | 0 .../HotSpotJVMCIMetaAccessContext.java | 0 .../vm/ci/hotspot/HotSpotJVMCIRuntime.java | 0 .../hotspot/HotSpotJVMCIRuntimeProvider.java | 0 .../jdk/vm/ci/hotspot/HotSpotJavaType.java | 0 .../hotspot/HotSpotMemoryAccessProvider.java | 0 .../HotSpotMemoryAccessProviderImpl.java | 0 .../ci/hotspot/HotSpotMetaAccessProvider.java | 0 .../jdk/vm/ci/hotspot/HotSpotMetaData.java | 0 .../ci/hotspot/HotSpotMetaspaceConstant.java | 0 .../hotspot/HotSpotMetaspaceConstantImpl.java | 0 .../src/jdk/vm/ci/hotspot/HotSpotMethod.java | 0 .../jdk/vm/ci/hotspot/HotSpotMethodData.java | 0 .../ci/hotspot/HotSpotMethodDataAccessor.java | 0 .../HotSpotMethodHandleAccessProvider.java | 0 .../ci/hotspot/HotSpotMethodUnresolved.java | 0 .../jdk/vm/ci/hotspot/HotSpotModifiers.java | 0 .../src/jdk/vm/ci/hotspot/HotSpotNmethod.java | 0 .../vm/ci/hotspot/HotSpotObjectConstant.java | 0 .../ci/hotspot/HotSpotObjectConstantImpl.java | 0 .../vm/ci/hotspot/HotSpotProfilingInfo.java | 0 .../vm/ci/hotspot/HotSpotReferenceMap.java | 0 .../ci/hotspot/HotSpotResolvedJavaField.java | 0 .../hotspot/HotSpotResolvedJavaFieldImpl.java | 0 .../ci/hotspot/HotSpotResolvedJavaMethod.java | 0 .../HotSpotResolvedJavaMethodImpl.java | 0 .../ci/hotspot/HotSpotResolvedJavaType.java | 0 .../ci/hotspot/HotSpotResolvedObjectType.java | 0 .../HotSpotResolvedObjectTypeImpl.java | 0 .../hotspot/HotSpotResolvedPrimitiveType.java | 0 .../jdk/vm/ci/hotspot/HotSpotRuntimeStub.java | 0 .../ci/hotspot/HotSpotSentinelConstant.java | 0 .../jdk/vm/ci/hotspot/HotSpotSignature.java | 0 .../vm/ci/hotspot/HotSpotSpeculationLog.java | 0 .../hotspot/HotSpotStackFrameReference.java | 0 .../ci/hotspot/HotSpotStackIntrospection.java | 0 .../vm/ci/hotspot/HotSpotUnresolvedField.java | 0 .../ci/hotspot/HotSpotUnresolvedJavaType.java | 0 .../jdk/vm/ci/hotspot/HotSpotVMConfig.java | 0 .../vm/ci/hotspot/HotSpotVMConfigAccess.java | 0 .../vm/ci/hotspot/HotSpotVMConfigStore.java | 0 .../vm/ci/hotspot/HotSpotVMEventListener.java | 0 .../vm/ci/hotspot/MetaspaceWrapperObject.java | 0 .../jdk/vm/ci/hotspot/SuppressFBWarnings.java | 0 .../src/jdk/vm/ci/hotspot/UnsafeAccess.java | 0 .../src/jdk/vm/ci/hotspot/VMField.java | 0 .../src/jdk/vm/ci/hotspot/VMFlag.java | 0 .../jdk/vm/ci/hotspot/VMIntrinsicMethod.java | 0 .../classes/jdk.vm.ci.meta/overview.html | 0 .../jdk/vm/ci/meta/AbstractJavaProfile.java | 0 .../jdk/vm/ci/meta/AbstractProfiledItem.java | 0 .../src/jdk/vm/ci/meta/AllocatableValue.java | 0 .../src/jdk/vm/ci/meta/Assumptions.java | 0 .../src/jdk/vm/ci/meta/Constant.java | 0 .../src/jdk/vm/ci/meta/ConstantPool.java | 0 .../ci/meta/ConstantReflectionProvider.java | 0 .../jdk/vm/ci/meta/DefaultProfilingInfo.java | 0 .../jdk/vm/ci/meta/DeoptimizationAction.java | 0 .../jdk/vm/ci/meta/DeoptimizationReason.java | 0 .../src/jdk/vm/ci/meta/ExceptionHandler.java | 0 .../src/jdk/vm/ci/meta/InvokeTarget.java | 0 .../src/jdk/vm/ci/meta/JavaConstant.java | 0 .../src/jdk/vm/ci/meta/JavaField.java | 0 .../src/jdk/vm/ci/meta/JavaKind.java | 0 .../src/jdk/vm/ci/meta/JavaMethod.java | 0 .../src/jdk/vm/ci/meta/JavaMethodProfile.java | 0 .../src/jdk/vm/ci/meta/JavaType.java | 0 .../src/jdk/vm/ci/meta/JavaTypeProfile.java | 0 .../src/jdk/vm/ci/meta/JavaValue.java | 0 .../src/jdk/vm/ci/meta/LineNumberTable.java | 0 .../src/jdk/vm/ci/meta/Local.java | 0 .../jdk/vm/ci/meta/LocalVariableTable.java | 0 .../jdk/vm/ci/meta/MemoryAccessProvider.java | 0 .../jdk/vm/ci/meta/MetaAccessProvider.java | 0 .../src/jdk/vm/ci/meta/MetaUtil.java | 0 .../ci/meta/MethodHandleAccessProvider.java | 0 .../src/jdk/vm/ci/meta/ModifiersProvider.java | 0 .../src/jdk/vm/ci/meta/NullConstant.java | 0 .../src/jdk/vm/ci/meta/PlatformKind.java | 0 .../src/jdk/vm/ci/meta/PrimitiveConstant.java | 0 .../src/jdk/vm/ci/meta/ProfilingInfo.java | 0 .../src/jdk/vm/ci/meta/RawConstant.java | 0 .../src/jdk/vm/ci/meta/ResolvedJavaField.java | 0 .../jdk/vm/ci/meta/ResolvedJavaMethod.java | 0 .../src/jdk/vm/ci/meta/ResolvedJavaType.java | 0 .../jdk/vm/ci/meta/SerializableConstant.java | 0 .../src/jdk/vm/ci/meta/Signature.java | 0 .../src/jdk/vm/ci/meta/SpeculationLog.java | 0 .../jdk/vm/ci/meta/SuppressFBWarnings.java | 0 .../src/jdk/vm/ci/meta/TriState.java | 0 .../src/jdk/vm/ci/meta/VMConstant.java | 0 .../src/jdk/vm/ci/meta/Value.java | 0 .../src/jdk/vm/ci/meta/ValueKind.java | 0 .../src/jdk/vm/ci/meta/package-info.java | 0 .../src/jdk/vm/ci/runtime/JVMCI.java | 0 .../src/jdk/vm/ci/runtime/JVMCIBackend.java | 0 .../src/jdk/vm/ci/runtime/JVMCICompiler.java | 0 .../vm/ci/runtime/JVMCICompilerFactory.java | 0 .../src/jdk/vm/ci/runtime/JVMCIRuntime.java | 0 .../jdk.vm.ci.services/.checkstyle_checks.xml | 0 .../jdk/vm/ci/services/JVMCIPermission.java | 0 .../vm/ci/services/JVMCIServiceLocator.java | 0 .../src/jdk/vm/ci/services/Services.java | 0 .../src/jdk/vm/ci/sparc/SPARC.java | 0 .../src/jdk/vm/ci/sparc/SPARCKind.java | 0 .../share/classes/module-info.java | 30 +++++++------- .../.mx.graal/.project | 0 .../.mx.graal/.pydevproject | 0 .../org.eclipse.jdt.core.prefs | 0 .../.mx.graal/mx_graal.py | 0 .../.mx.graal/mx_graal_9.py | 0 .../.mx.graal/mx_graal_bench.py | 0 .../.mx.graal/outputparser.py | 0 .../.mx.graal/sanitycheck.py | 0 .../.mx.graal/suite.py | 0 .../share/classes/module-info.java | 4 +- .../api/collections/CollectionsProvider.java | 0 .../DefaultCollectionsProvider.java | 0 .../test/AllocationInstrumentationTest.java | 0 .../test/BlackholeDirectiveTest.java | 0 .../test/ControlFlowAnchorDirectiveTest.java | 0 .../test/DeoptimizeDirectiveTest.java | 0 .../test/IsMethodInlineDirectiveTest.java | 0 .../test/IterationDirectiveTest.java | 0 .../test/LockInstrumentationTest.java | 0 .../directives/test/OpaqueDirectiveTest.java | 0 .../test/ProbabilityDirectiveTest.java | 0 .../test/RootNameDirectiveTest.java | 0 .../api/directives/test/TinyInstrumentor.java | 0 .../api/directives/GraalDirectives.java | 0 .../api/replacements/ClassSubstitution.java | 0 .../compiler/api/replacements/Fold.java | 0 .../api/replacements/MethodSubstitution.java | 0 .../MethodSubstitutionRegistry.java | 0 .../compiler/api/replacements/Snippet.java | 0 .../SnippetReflectionProvider.java | 0 .../replacements/SnippetTemplateCache.java | 0 .../api/runtime/GraalJVMCICompiler.java | 0 .../compiler/api/runtime/GraalRuntime.java | 0 .../org/graalvm/compiler/api/test/Graal.java | 0 .../compiler/api/test/GraalAPITest.java | 0 .../test/AArch64MacroAssemblerTest.java | 0 .../aarch64/test/TestProtectedAssembler.java | 0 .../compiler/asm/aarch64/AArch64Address.java | 0 .../asm/aarch64/AArch64Assembler.java | 0 .../asm/aarch64/AArch64MacroAssembler.java | 0 .../compiler/asm/amd64/test/BitOpsTest.java | 0 .../test/IncrementDecrementMacroTest.java | 0 .../asm/amd64/test/SimpleAssemblerTest.java | 0 .../compiler/asm/amd64/AMD64Address.java | 0 .../compiler/asm/amd64/AMD64AsmOptions.java | 0 .../compiler/asm/amd64/AMD64Assembler.java | 0 .../asm/amd64/AMD64InstructionAttr.java | 0 .../asm/amd64/AMD64MacroAssembler.java | 0 .../compiler/asm/sparc/test/BitSpecTest.java | 0 .../asm/sparc/test/SPARCAssemblerTest.java | 0 .../compiler/asm/sparc/SPARCAddress.java | 0 .../compiler/asm/sparc/SPARCAssembler.java | 0 .../asm/sparc/SPARCInstructionCounter.java | 0 .../asm/sparc/SPARCMacroAssembler.java | 0 .../compiler/asm/test/AssemblerTest.java | 0 .../graalvm/compiler/asm/AbstractAddress.java | 0 .../org/graalvm/compiler/asm/AsmOptions.java | 0 .../org/graalvm/compiler/asm/Assembler.java | 0 .../src/org/graalvm/compiler/asm/Buffer.java | 0 .../src/org/graalvm/compiler/asm/Label.java | 0 .../src/org/graalvm/compiler/asm/NumUtil.java | 0 .../compiler/bytecode/BridgeMethodUtils.java | 0 .../graalvm/compiler/bytecode/Bytecode.java | 0 .../bytecode/BytecodeDisassembler.java | 0 .../bytecode/BytecodeLookupSwitch.java | 0 .../compiler/bytecode/BytecodeProvider.java | 0 .../compiler/bytecode/BytecodeStream.java | 0 .../compiler/bytecode/BytecodeSwitch.java | 0 .../bytecode/BytecodeTableSwitch.java | 0 .../graalvm/compiler/bytecode/Bytecodes.java | 0 .../org/graalvm/compiler/bytecode/Bytes.java | 0 .../bytecode/ResolvedJavaMethodBytecode.java | 0 .../ResolvedJavaMethodBytecodeProvider.java | 0 .../compiler/code/CompilationResult.java | 0 .../graalvm/compiler/code/DataSection.java | 0 .../compiler/code/DisassemblerProvider.java | 0 .../graalvm/compiler/code/HexCodeFile.java | 0 .../code/HexCodeFileDisassemblerProvider.java | 0 .../graalvm/compiler/code/SourceMapping.java | 0 .../SourceStackTraceBailoutException.java | 0 .../common/PermanentBailoutException.java | 0 .../common/RetryableBailoutException.java | 0 .../core/aarch64/AArch64AddressLowering.java | 0 .../core/aarch64/AArch64AddressNode.java | 0 .../AArch64ArithmeticLIRGenerator.java | 0 .../core/aarch64/AArch64FloatConvertOp.java | 0 .../core/aarch64/AArch64LIRGenerator.java | 0 .../core/aarch64/AArch64LIRKindTool.java | 0 .../core/aarch64/AArch64MoveFactory.java | 0 .../core/aarch64/AArch64NodeLIRBuilder.java | 0 .../core/aarch64/AArch64NodeMatchRules.java | 0 .../core/aarch64/AArch64SuitesProvider.java | 0 .../core/amd64/test/AMD64AllocatorTest.java | 0 .../amd64/test/ConstantStackMoveTest.java | 0 .../core/amd64/test/MatchRuleTest.java | 0 .../core/amd64/test/StackStoreTest.java | 0 .../core/amd64/AMD64AddressLowering.java | 0 .../compiler/core/amd64/AMD64AddressNode.java | 0 .../amd64/AMD64ArithmeticLIRGenerator.java | 0 .../core/amd64/AMD64LIRGenerator.java | 0 .../compiler/core/amd64/AMD64LIRKindTool.java | 0 .../compiler/core/amd64/AMD64MoveFactory.java | 0 .../core/amd64/AMD64MoveFactoryBase.java | 0 .../core/amd64/AMD64NodeLIRBuilder.java | 0 .../core/amd64/AMD64NodeMatchRules.java | 0 .../core/amd64/AMD64SuitesProvider.java | 0 .../core/common/CollectionsFactory.java | 0 .../core/common/CompilationIdentifier.java | 0 .../common/CompilationRequestIdentifier.java | 0 .../core/common/FieldIntrospection.java | 0 .../graalvm/compiler/core/common/Fields.java | 0 .../compiler/core/common/FieldsScanner.java | 0 .../compiler/core/common/GraalOptions.java | 0 .../graalvm/compiler/core/common/LIRKind.java | 0 .../core/common/LinkedIdentityHashMap.java | 0 .../core/common/LocationIdentity.java | 0 .../core/common/SuppressFBWarnings.java | 0 .../compiler/core/common/UnsafeAccess.java | 0 .../alloc/BiDirectionalTraceBuilder.java | 0 .../core/common/alloc/ComputeBlockOrder.java | 0 .../alloc/RegisterAllocationConfig.java | 0 .../common/alloc/SingleBlockTraceBuilder.java | 0 .../compiler/core/common/alloc/Trace.java | 0 .../core/common/alloc/TraceBuilderResult.java | 0 .../compiler/core/common/alloc/TraceMap.java | 0 .../common/alloc/TraceStatisticsPrinter.java | 0 .../alloc/UniDirectionalTraceBuilder.java | 0 .../compiler/core/common/calc/Condition.java | 0 .../core/common/calc/FloatConvert.java | 0 .../core/common/calc/UnsignedMath.java | 0 .../core/common/cfg/AbstractBlockBase.java | 0 .../common/cfg/AbstractControlFlowGraph.java | 0 .../compiler/core/common/cfg/BlockMap.java | 0 .../compiler/core/common/cfg/CFGVerifier.java | 0 .../cfg/DominatorOptimizationProblem.java | 0 .../compiler/core/common/cfg/Loop.java | 0 .../core/common/cfg/PrintableCFG.java | 0 ...PrintableDominatorOptimizationProblem.java | 0 .../core/common/cfg/PropertyConsumable.java | 0 .../core/common/spi/CodeGenProviders.java | 0 .../common/spi/ConstantFieldProvider.java | 0 .../common/spi/ForeignCallDescriptor.java | 0 .../core/common/spi/ForeignCallLinkage.java | 0 .../core/common/spi/ForeignCallsProvider.java | 0 .../common/spi/JavaConstantFieldProvider.java | 0 .../compiler/core/common/spi/LIRKindTool.java | 0 .../core/common/type/AbstractObjectStamp.java | 0 .../common/type/AbstractPointerStamp.java | 0 .../core/common/type/ArithmeticOpTable.java | 0 .../core/common/type/ArithmeticStamp.java | 0 .../core/common/type/DataPointerConstant.java | 0 .../compiler/core/common/type/FloatStamp.java | 0 .../core/common/type/IllegalStamp.java | 0 .../core/common/type/IntegerStamp.java | 0 .../core/common/type/ObjectStamp.java | 0 .../core/common/type/PrimitiveStamp.java | 0 .../core/common/type/RawPointerStamp.java | 0 .../compiler/core/common/type/Stamp.java | 0 .../core/common/type/StampFactory.java | 0 .../compiler/core/common/type/StampPair.java | 0 .../core/common/type/TypeReference.java | 0 .../compiler/core/common/type/VoidStamp.java | 0 .../compiler/core/common/util/ArrayMap.java | 0 .../compiler/core/common/util/ArraySet.java | 0 .../compiler/core/common/util/BitMap2D.java | 0 .../core/common/util/CompilationAlarm.java | 0 .../core/common/util/FrequencyEncoder.java | 0 .../compiler/core/common/util/IntList.java | 0 .../compiler/core/common/util/ModuleAPI.java | 0 .../core/common/util/TypeConversion.java | 0 .../compiler/core/common/util/TypeReader.java | 0 .../compiler/core/common/util/TypeWriter.java | 0 .../core/common/util/UnsafeAccess.java | 0 .../common/util/UnsafeArrayTypeReader.java | 0 .../common/util/UnsafeArrayTypeWriter.java | 0 .../compiler/core/common/util/Util.java | 0 .../javax.annotation.processing.Processor | 0 .../core/match/processor/MatchProcessor.java | 0 .../core/sparc/test/SPARCAllocatorTest.java | 0 .../core/sparc/SPARCAddressLowering.java | 0 .../sparc/SPARCArithmeticLIRGenerator.java | 0 .../core/sparc/SPARCImmediateAddressNode.java | 0 .../core/sparc/SPARCIndexedAddressNode.java | 0 ...RCIntegerCompareCanonicalizationPhase.java | 0 .../core/sparc/SPARCLIRGenerator.java | 0 .../compiler/core/sparc/SPARCLIRKindTool.java | 0 .../compiler/core/sparc/SPARCMoveFactory.java | 0 .../core/sparc/SPARCNodeLIRBuilder.java | 0 .../core/sparc/SPARCNodeMatchRules.java | 0 .../core/sparc/SPARCSuitesProvider.java | 0 .../graalvm/compiler/core/test/AllocSpy.java | 0 .../core/test/BoxingEliminationTest.java | 0 .../compiler/core/test/BoxingTest.java | 0 .../core/test/CheckGraalInvariants.java | 0 .../core/test/CommonedConstantsTest.java | 0 .../core/test/CompareCanonicalizerTest.java | 0 .../core/test/ConcreteSubtypeTest.java | 0 .../compiler/core/test/ConditionTest.java | 0 ...lEliminationLoadFieldConstantFoldTest.java | 0 .../test/ConditionalEliminationMulTest.java | 0 .../test/ConditionalEliminationTest1.java | 0 .../test/ConditionalEliminationTest10.java | 0 .../test/ConditionalEliminationTest11.java | 0 .../test/ConditionalEliminationTest2.java | 0 .../test/ConditionalEliminationTest3.java | 0 .../test/ConditionalEliminationTest4.java | 0 .../test/ConditionalEliminationTest5.java | 0 .../test/ConditionalEliminationTest6.java | 0 .../test/ConditionalEliminationTest7.java | 0 .../test/ConditionalEliminationTest8.java | 0 .../test/ConditionalEliminationTest9.java | 0 .../test/ConditionalEliminationTestBase.java | 0 .../test/ConstantArrayReadFoldingTest.java | 0 .../core/test/CooperativePhaseTest.java | 0 .../core/test/CopyOfVirtualizationTest.java | 0 .../compiler/core/test/CountedLoopTest.java | 0 .../core/test/DegeneratedLoopsTest.java | 0 .../core/test/DontReuseArgumentSpaceTest.java | 0 .../compiler/core/test/EnumSwitchTest.java | 0 .../core/test/FinalizableSubclassTest.java | 0 .../test/FindUniqueConcreteMethodBugTest.java | 0 .../test/FindUniqueDefaultMethodTest.java | 0 .../core/test/FloatOptimizationTest.java | 0 .../compiler/core/test/FloatingReadTest.java | 0 .../test/GraalCompilerAssumptionsTest.java | 0 .../compiler/core/test/GraalCompilerTest.java | 0 .../compiler/core/test/GraphEncoderTest.java | 0 .../compiler/core/test/GraphScheduleTest.java | 0 .../test/GuardEliminationCornerCasesTest.java | 0 .../core/test/GuardedIntrinsicTest.java | 0 .../compiler/core/test/HashCodeTest.java | 0 .../core/test/IfCanonicalizerTest.java | 0 .../compiler/core/test/IfReorderTest.java | 0 .../core/test/ImplicitNullCheckTest.java | 0 .../core/test/InfopointReasonTest.java | 0 .../test/InstalledCodeInvalidationTest.java | 0 .../test/IntegerEqualsCanonicalizerTest.java | 0 .../core/test/IntegerStampMulFoldTest.java | 0 .../core/test/InterfaceMethodHandleTest.java | 0 .../core/test/InvokeExceptionTest.java | 0 .../compiler/core/test/InvokeHintsTest.java | 0 .../core/test/LockEliminationTest.java | 0 .../compiler/core/test/LongNodeChainTest.java | 0 .../compiler/core/test/LoopUnswitchTest.java | 0 .../core/test/MarkUnsafeAccessTest.java | 0 .../core/test/MemoryArithmeticTest.java | 0 .../core/test/MemoryScheduleTest.java | 0 .../core/test/MergeCanonicalizerTest.java | 0 .../test/MethodHandleEagerResolution.java | 0 .../compiler/core/test/MonitorGraphTest.java | 0 .../compiler/core/test/NestedLoopTest.java | 0 .../core/test/NodePosIteratorTest.java | 0 .../core/test/NodePropertiesTest.java | 0 .../core/test/OnStackReplacementTest.java | 0 .../core/test/OptionsVerifierTest.java | 0 .../compiler/core/test/PhiCreationTests.java | 0 .../compiler/core/test/ProfilingInfoTest.java | 0 .../core/test/PushNodesThroughPiTest.java | 0 .../compiler/core/test/PushThroughIfTest.java | 0 .../core/test/ReadAfterCheckCastTest.java | 0 .../test/ReassociateAndCanonicalTest.java | 0 .../core/test/ReentrantBlockIteratorTest.java | 0 .../core/test/ReferenceGetLoopTest.java | 0 .../core/test/ScalarTypeSystemTest.java | 0 .../compiler/core/test/SchedulingTest.java | 0 .../compiler/core/test/SchedulingTest2.java | 0 .../core/test/ShortCircuitNodeTest.java | 0 .../compiler/core/test/SimpleCFGTest.java | 0 .../core/test/StampCanonicalizerTest.java | 0 .../core/test/StaticInterfaceFieldTest.java | 0 .../compiler/core/test/StraighteningTest.java | 0 .../compiler/core/test/TypeSystemTest.java | 0 .../compiler/core/test/TypeWriterTest.java | 0 .../core/test/UnbalancedMonitorsTest.java | 0 .../core/test/UnsafeReadEliminationTest.java | 0 .../core/test/VerifyBailoutUsageTest.java | 0 .../core/test/VerifyDebugUsageTest.java | 0 .../core/test/VerifyVirtualizableTest.java | 0 .../core/test/backend/AllocatorTest.java | 0 .../core/test/backend/BackendTest.java | 0 .../core/test/debug/MethodMetricsTest.java | 0 .../core/test/debug/MethodMetricsTest1.java | 0 .../core/test/debug/MethodMetricsTest2.java | 0 .../core/test/debug/MethodMetricsTest3.java | 0 .../core/test/debug/MethodMetricsTest4.java | 0 .../core/test/debug/MethodMetricsTest5.java | 0 .../core/test/debug/MethodMetricsTest6.java | 0 .../MethodMetricsTestInterception01.java | 0 .../MethodMetricsTestInterception02.java | 0 .../test/debug/VerifyMethodMetricsTest.java | 0 .../core/test/deopt/CompiledMethodTest.java | 0 .../core/test/deopt/MonitorDeoptTest.java | 0 .../test/deopt/SafepointRethrowDeoptTest.java | 0 .../SynchronizedMethodDeoptimizationTest.java | 0 .../compiler/core/test/ea/EAMergingTest.java | 0 .../compiler/core/test/ea/EATestBase.java | 0 .../test/ea/EarlyReadEliminationTest.java | 0 .../core/test/ea/EscapeAnalysisTest.java | 0 .../core/test/ea/NestedBoxingTest.java | 0 .../core/test/ea/PEAAssertionsTest.java | 0 .../core/test/ea/PEAReadEliminationTest.java | 0 .../test/ea/PartialEscapeAnalysisTest.java | 0 .../compiler/core/test/ea/PoorMansEATest.java | 0 .../compiler/core/test/ea/UnsafeEATest.java | 0 .../core/test/inlining/InliningTest.java | 0 .../test/inlining/RecursiveInliningTest.java | 0 .../core/test/tutorial/GraalTutorial.java | 0 .../core/test/tutorial/InvokeGraal.java | 0 .../core/test/tutorial/StaticAnalysis.java | 0 .../test/tutorial/StaticAnalysisTests.java | 0 .../graalvm/compiler/core/CompilerThread.java | 0 .../compiler/core/CompilerThreadFactory.java | 0 .../graalvm/compiler/core/GraalCompiler.java | 0 .../compiler/core/GraalCompilerOptions.java | 0 .../GraalDebugInitializationParticipant.java | 0 .../compiler/core/LIRGenerationPhase.java | 0 .../compiler/core/gen/BytecodeParserTool.java | 0 .../compiler/core/gen/DebugInfoBuilder.java | 0 .../compiler/core/gen/InstructionPrinter.java | 0 .../compiler/core/gen/NodeLIRBuilder.java | 0 .../compiler/core/gen/NodeMatchRules.java | 0 .../compiler/core/gen/package-info.java | 0 .../core/match/ComplexMatchResult.java | 0 .../core/match/ComplexMatchValue.java | 0 .../compiler/core/match/MatchContext.java | 0 .../compiler/core/match/MatchGenerator.java | 0 .../compiler/core/match/MatchPattern.java | 0 .../compiler/core/match/MatchRule.java | 0 .../core/match/MatchRuleRegistry.java | 0 .../compiler/core/match/MatchRules.java | 0 .../compiler/core/match/MatchStatement.java | 0 .../core/match/MatchStatementSet.java | 0 .../compiler/core/match/MatchableNode.java | 0 .../compiler/core/match/MatchableNodes.java | 0 .../graalvm/compiler/core/package-info.java | 0 .../phases/CoreCompilerConfiguration.java | 0 .../phases/EconomyCompilerConfiguration.java | 0 .../compiler/core/phases/EconomyHighTier.java | 0 .../compiler/core/phases/EconomyLowTier.java | 0 .../compiler/core/phases/EconomyMidTier.java | 0 .../phases/GraphChangeMonitoringPhase.java | 0 .../compiler/core/phases/HighTier.java | 0 .../graalvm/compiler/core/phases/LowTier.java | 0 .../graalvm/compiler/core/phases/MidTier.java | 0 .../graalvm/compiler/core/target/Backend.java | 0 .../compiler/debug/test/CSVUtilTest.java | 0 .../debug/test/DebugHistogramTest.java | 0 .../compiler/debug/test/DebugTimerTest.java | 0 .../org/graalvm/compiler/debug/CSVUtil.java | 0 .../src/org/graalvm/compiler/debug/Debug.java | 0 .../compiler/debug/DebugCloseable.java | 0 .../graalvm/compiler/debug/DebugConfig.java | 0 .../compiler/debug/DebugConfigCustomizer.java | 0 .../compiler/debug/DebugConfigScope.java | 0 .../graalvm/compiler/debug/DebugCounter.java | 0 .../compiler/debug/DebugDumpHandler.java | 0 .../compiler/debug/DebugDumpScope.java | 0 .../compiler/debug/DebugEnvironment.java | 0 .../graalvm/compiler/debug/DebugFilter.java | 0 .../compiler/debug/DebugHistogram.java | 0 .../debug/DebugInitializationParticipant.java | 0 .../compiler/debug/DebugMemUseTracker.java | 0 .../compiler/debug/DebugMethodMetrics.java | 0 .../graalvm/compiler/debug/DebugTimer.java | 0 .../compiler/debug/DebugValueFactory.java | 0 .../compiler/debug/DebugVerifyHandler.java | 0 .../compiler/debug/DelegatingDebugConfig.java | 0 .../graalvm/compiler/debug/Fingerprint.java | 0 .../compiler/debug/GraalDebugConfig.java | 0 .../graalvm/compiler/debug/GraalError.java | 0 .../org/graalvm/compiler/debug/Indent.java | 0 .../compiler/debug/JavaMethodContext.java | 0 .../org/graalvm/compiler/debug/LogStream.java | 0 .../graalvm/compiler/debug/Management.java | 0 .../graalvm/compiler/debug/MethodFilter.java | 0 .../src/org/graalvm/compiler/debug/TTY.java | 0 .../compiler/debug/TTYStreamProvider.java | 0 .../graalvm/compiler/debug/TimeSource.java | 0 .../compiler/debug/TopLevelDebugConfig.java | 0 .../debug/internal/AccumulatedDebugValue.java | 0 .../debug/internal/CloseableCounterImpl.java | 0 .../compiler/debug/internal/CounterImpl.java | 0 .../internal/DebugHistogramAsciiPrinter.java | 0 .../debug/internal/DebugHistogramImpl.java | 0 .../internal/DebugHistogramRPrinter.java | 0 .../compiler/debug/internal/DebugScope.java | 0 .../compiler/debug/internal/DebugValue.java | 0 .../debug/internal/DebugValueMap.java | 0 .../debug/internal/DebugValuesPrinter.java | 0 .../compiler/debug/internal/KeyRegistry.java | 0 .../debug/internal/MemUseTrackerImpl.java | 0 .../compiler/debug/internal/TimerImpl.java | 0 .../internal/method/MethodMetricsImpl.java | 0 .../method/MethodMetricsInlineeScopeInfo.java | 0 .../internal/method/MethodMetricsPrinter.java | 0 .../method/MethodMetricsRootScopeInfo.java | 0 .../compiler/graph/test/NodeMapTest.java | 0 .../compiler/graph/test/NodeUsagesTests.java | 0 .../graph/test/NodeValidationChecksTest.java | 0 .../graph/test/TestNodeInterface.java | 0 .../graph/test/TypedNodeIteratorTest.java | 0 .../graph/test/TypedNodeIteratorTest2.java | 0 .../test/matchers/NodeIterableContains.java | 0 .../test/matchers/NodeIterableCount.java | 0 .../test/matchers/NodeIterableIsEmpty.java | 0 .../.checkstyle_checks.xml | 0 .../graalvm/compiler/graph/CachedGraph.java | 0 .../graph/DefaultNodeCollectionsProvider.java | 0 .../src/org/graalvm/compiler/graph/Edges.java | 0 .../compiler/graph/GraalGraphError.java | 0 .../src/org/graalvm/compiler/graph/Graph.java | 0 .../compiler/graph/GraphNodeIterator.java | 0 .../graalvm/compiler/graph/InputEdges.java | 0 .../compiler/graph/IterableNodeType.java | 0 .../src/org/graalvm/compiler/graph/Node.java | 0 .../graalvm/compiler/graph/NodeBitMap.java | 0 .../org/graalvm/compiler/graph/NodeClass.java | 0 .../graph/NodeCollectionsProvider.java | 0 .../org/graalvm/compiler/graph/NodeFlood.java | 0 .../compiler/graph/NodeIdAccessor.java | 0 .../graalvm/compiler/graph/NodeInputList.java | 0 .../graalvm/compiler/graph/NodeInterface.java | 0 .../org/graalvm/compiler/graph/NodeList.java | 0 .../org/graalvm/compiler/graph/NodeMap.java | 0 .../graalvm/compiler/graph/NodeNodeMap.java | 0 .../compiler/graph/NodeSourcePosition.java | 0 .../org/graalvm/compiler/graph/NodeStack.java | 0 .../compiler/graph/NodeSuccessorList.java | 0 .../graalvm/compiler/graph/NodeUnionFind.java | 0 .../compiler/graph/NodeUsageIterable.java | 0 .../compiler/graph/NodeUsageIterator.java | 0 .../graph/NodeUsageWithModCountIterator.java | 0 .../graalvm/compiler/graph/NodeWorkList.java | 0 .../org/graalvm/compiler/graph/Position.java | 0 .../compiler/graph/SuccessorEdges.java | 0 .../graph/TypedGraphNodeIterator.java | 0 .../graalvm/compiler/graph/UnsafeAccess.java | 0 .../compiler/graph/VerificationError.java | 0 .../graph/iterators/FilteredNodeIterable.java | 0 .../graph/iterators/NodeIterable.java | 0 .../graph/iterators/NodeIterator.java | 0 .../graph/iterators/NodePredicate.java | 0 .../graph/iterators/NodePredicates.java | 0 .../PredicatedProxyNodeIterator.java | 0 .../graalvm/compiler/graph/package-info.java | 0 .../compiler/graph/spi/Canonicalizable.java | 0 .../compiler/graph/spi/CanonicalizerTool.java | 0 .../compiler/graph/spi/Simplifiable.java | 0 .../compiler/graph/spi/SimplifierTool.java | 0 .../aarch64/AArch64HotSpotBackend.java | 0 .../aarch64/AArch64HotSpotBackendFactory.java | 0 .../AArch64HotSpotCRuntimeCallEpilogueOp.java | 0 .../AArch64HotSpotCRuntimeCallPrologueOp.java | 0 .../AArch64HotSpotDeoptimizeCallerOp.java | 0 .../aarch64/AArch64HotSpotDeoptimizeOp.java | 0 .../AArch64HotSpotDirectStaticCallOp.java | 0 .../AArch64HotSpotDirectVirtualCallOp.java | 0 .../aarch64/AArch64HotSpotEpilogueOp.java | 0 .../AArch64HotSpotForeignCallsProvider.java | 0 ...tSpotJumpToExceptionHandlerInCallerOp.java | 0 .../aarch64/AArch64HotSpotLIRGenerator.java | 0 .../aarch64/AArch64HotSpotLIRKindTool.java | 0 .../AArch64HotSpotLoweringProvider.java | 0 .../hotspot/aarch64/AArch64HotSpotMove.java | 0 .../aarch64/AArch64HotSpotMoveFactory.java | 0 .../aarch64/AArch64HotSpotNodeLIRBuilder.java | 0 .../AArch64HotSpotPatchReturnAddressOp.java | 0 ...Arch64HotSpotRegisterAllocationConfig.java | 0 .../aarch64/AArch64HotSpotReturnOp.java | 0 .../aarch64/AArch64HotSpotSafepointOp.java | 0 .../AArch64HotSpotStrategySwitchOp.java | 0 .../aarch64/AArch64HotSpotUnwindOp.java | 0 .../aarch64/AArch64IndirectCallOp.java | 0 .../aarch64/AArchHotSpotNodeCostProvider.java | 0 .../test/AMD64HotSpotFrameOmissionTest.java | 0 .../amd64/test/CompressedNullCheckTest.java | 0 .../amd64/test/DataPatchInConstantsTest.java | 0 .../hotspot/amd64/test/StubAVXTest.java | 0 .../amd64/AMD64DeoptimizationStub.java | 0 .../hotspot/amd64/AMD64DeoptimizeOp.java | 0 .../amd64/AMD64HotSpotAddressLowering.java | 0 .../AMD64HotSpotArithmeticLIRGenerator.java | 0 .../hotspot/amd64/AMD64HotSpotBackend.java | 0 .../amd64/AMD64HotSpotBackendFactory.java | 0 .../AMD64HotSpotCRuntimeCallEpilogueOp.java | 0 .../AMD64HotSpotCRuntimeCallPrologueOp.java | 0 .../AMD64HotSpotConstantRetrievalOp.java | 0 .../hotspot/amd64/AMD64HotSpotCounterOp.java | 0 .../amd64/AMD64HotSpotDeoptimizeCallerOp.java | 0 .../amd64/AMD64HotSpotDirectStaticCallOp.java | 0 ...4HotSpotEnterUnpackFramesStackFrameOp.java | 0 .../amd64/AMD64HotSpotEpilogueBlockEndOp.java | 0 .../hotspot/amd64/AMD64HotSpotEpilogueOp.java | 0 .../AMD64HotSpotForeignCallsProvider.java | 0 ...tSpotJumpToExceptionHandlerInCallerOp.java | 0 .../amd64/AMD64HotSpotLIRGenerator.java | 0 .../amd64/AMD64HotSpotLIRKindTool.java | 0 .../AMD64HotSpotLeaveCurrentStackFrameOp.java | 0 ...64HotSpotLeaveDeoptimizedStackFrameOp.java | 0 ...4HotSpotLeaveUnpackFramesStackFrameOp.java | 0 .../amd64/AMD64HotSpotLoadAddressOp.java | 0 .../amd64/AMD64HotSpotLoadConfigValueOp.java | 0 .../amd64/AMD64HotSpotLoweringProvider.java | 0 .../amd64/AMD64HotSpotMathIntrinsicOp.java | 0 .../hotspot/amd64/AMD64HotSpotMove.java | 0 .../amd64/AMD64HotSpotMoveFactory.java | 0 .../amd64/AMD64HotSpotNodeCostProvider.java | 0 .../amd64/AMD64HotSpotNodeLIRBuilder.java | 0 .../AMD64HotSpotPatchReturnAddressOp.java | 0 .../AMD64HotSpotPushInterpreterFrameOp.java | 0 .../AMD64HotSpotRegisterAllocationConfig.java | 0 .../amd64/AMD64HotSpotRestoreRbpOp.java | 0 .../hotspot/amd64/AMD64HotSpotReturnOp.java | 0 .../amd64/AMD64HotSpotSafepointOp.java | 0 .../amd64/AMD64HotSpotStrategySwitchOp.java | 0 .../amd64/AMD64HotSpotSuitesProvider.java | 0 .../hotspot/amd64/AMD64HotSpotUnwindOp.java | 0 .../AMD64HotspotDirectVirtualCallOp.java | 0 .../hotspot/amd64/AMD64IndirectCallOp.java | 0 .../compiler/hotspot/amd64/AMD64MathStub.java | 0 .../hotspot/amd64/AMD64RawNativeCallNode.java | 0 .../hotspot/amd64/AMD64TailcallOp.java | 0 .../hotspot/amd64/AMD64UncommonTrapStub.java | 0 .../lir/test/ExceedMaxOopMapStackOffset.java | 0 .../sparc/SPARCDeoptimizationStub.java | 0 .../hotspot/sparc/SPARCDeoptimizeOp.java | 0 .../hotspot/sparc/SPARCHotSpotBackend.java | 0 .../sparc/SPARCHotSpotBackendFactory.java | 0 .../SPARCHotSpotCRuntimeCallEpilogueOp.java | 0 .../SPARCHotSpotCRuntimeCallPrologueOp.java | 0 .../hotspot/sparc/SPARCHotSpotCounterOp.java | 0 .../sparc/SPARCHotSpotDeoptimizeCallerOp.java | 0 ...CHotSpotEnterUnpackFramesStackFrameOp.java | 0 .../hotspot/sparc/SPARCHotSpotEpilogueOp.java | 0 .../SPARCHotSpotForeignCallsProvider.java | 0 ...tSpotJumpToExceptionHandlerInCallerOp.java | 0 .../SPARCHotSpotJumpToExceptionHandlerOp.java | 0 .../sparc/SPARCHotSpotLIRGenerator.java | 0 .../sparc/SPARCHotSpotLIRKindTool.java | 0 .../SPARCHotSpotLeaveCurrentStackFrameOp.java | 0 ...RCHotSpotLeaveDeoptimizedStackFrameOp.java | 0 ...CHotSpotLeaveUnpackFramesStackFrameOp.java | 0 .../sparc/SPARCHotSpotLoweringProvider.java | 0 .../hotspot/sparc/SPARCHotSpotMove.java | 0 .../sparc/SPARCHotSpotMoveFactory.java | 0 .../sparc/SPARCHotSpotNodeCostProvider.java | 0 .../sparc/SPARCHotSpotNodeLIRBuilder.java | 0 .../SPARCHotSpotPatchReturnAddressOp.java | 0 .../SPARCHotSpotPushInterpreterFrameOp.java | 0 .../SPARCHotSpotRegisterAllocationConfig.java | 0 .../hotspot/sparc/SPARCHotSpotReturnOp.java | 0 .../sparc/SPARCHotSpotSafepointOp.java | 0 .../sparc/SPARCHotSpotStrategySwitchOp.java | 0 .../hotspot/sparc/SPARCHotSpotUnwindOp.java | 0 .../sparc/SPARCHotspotDirectStaticCallOp.java | 0 .../SPARCHotspotDirectVirtualCallOp.java | 0 .../hotspot/sparc/SPARCIndirectCallOp.java | 0 .../hotspot/sparc/SPARCUncommonTrapStub.java | 0 .../test/AheadOfTimeCompilationTest.java | 0 .../test/ArrayCopyIntrinsificationTest.java | 0 .../hotspot/test/CRC32SubstitutionsTest.java | 0 .../hotspot/test/CheckGraalIntrinsics.java | 0 .../hotspot/test/ClassSubstitutionsTests.java | 0 .../hotspot/test/CompileTheWorldTest.java | 0 .../hotspot/test/CompressedOopTest.java | 0 .../test/ConstantPoolSubstitutionsTests.java | 0 .../compiler/hotspot/test/DataPatchTest.java | 0 .../hotspot/test/ExplicitExceptionTest.java | 0 .../test/ForeignCallDeoptimizeTest.java | 0 .../hotspot/test/GraalOSRLockTest.java | 0 .../compiler/hotspot/test/GraalOSRTest.java | 0 .../hotspot/test/GraalOSRTestBase.java | 0 .../test/HotSpotCryptoSubstitutionTest.java | 0 .../test/HotSpotGraalCompilerTest.java | 0 .../test/HotSpotMethodSubstitutionTest.java | 0 .../hotspot/test/HotSpotMonitorValueTest.java | 0 .../hotspot/test/HotSpotNmethodTest.java | 0 .../test/HotSpotNodeSubstitutionsTest.java | 0 .../test/HotSpotResolvedJavaFieldTest.java | 0 .../test/HotSpotResolvedObjectTypeTest.java | 0 .../test/InstalledCodeExecuteHelperTest.java | 0 .../hotspot/test/JVMCIInfopointErrorTest.java | 0 .../test/LoadJavaMirrorWithKlassTest.java | 0 .../hotspot/test/MemoryUsageBenchmark.java | 0 .../hotspot/test/TestIntrinsicCompiles.java | 0 .../hotspot/test/TestSHASubstitutions.java | 0 .../test/WriteBarrierAdditionTest.java | 0 .../test/WriteBarrierVerificationTest.java | 0 .../hotspot/AOTGraalHotSpotVMConfig.java | 0 .../compiler/hotspot/BootstrapWatchDog.java | 0 .../compiler/hotspot/CompilationCounters.java | 0 .../hotspot/CompilationStatistics.java | 0 .../compiler/hotspot/CompilationTask.java | 0 .../compiler/hotspot/CompilationWatchDog.java | 0 .../compiler/hotspot/CompileTheWorld.java | 0 .../hotspot/CompileTheWorldOptions.java | 0 .../hotspot/CompilerConfigurationFactory.java | 0 .../CompilerRuntimeHotSpotVMConfig.java | 0 .../compiler/hotspot/CompressEncoding.java | 0 .../CoreCompilerConfigurationFactory.java | 0 .../EconomyCompilerConfigurationFactory.java | 0 .../compiler/hotspot/FingerprintUtil.java | 0 .../hotspot/GraalHotSpotVMConfig.java | 0 .../compiler/hotspot/HotSpotBackend.java | 0 .../hotspot/HotSpotBackendFactory.java | 0 .../hotspot/HotSpotCompilationIdentifier.java | 0 .../hotspot/HotSpotCompiledCodeBuilder.java | 0 .../compiler/hotspot/HotSpotCounterOp.java | 0 .../compiler/hotspot/HotSpotDataBuilder.java | 0 .../hotspot/HotSpotDebugInfoBuilder.java | 0 .../hotspot/HotSpotForeignCallLinkage.java | 0 .../HotSpotForeignCallLinkageImpl.java | 0 .../hotspot/HotSpotGraalCompiler.java | 0 .../hotspot/HotSpotGraalCompilerFactory.java | 0 .../HotSpotGraalJVMCIServiceLocator.java | 0 .../compiler/hotspot/HotSpotGraalRuntime.java | 0 .../hotspot/HotSpotGraalRuntimeProvider.java | 0 .../hotspot/HotSpotGraalVMEventListener.java | 0 .../compiler/hotspot/HotSpotHostBackend.java | 0 .../hotspot/HotSpotInstructionProfiling.java | 0 .../hotspot/HotSpotLIRGenerationResult.java | 0 .../compiler/hotspot/HotSpotLIRGenerator.java | 0 .../compiler/hotspot/HotSpotLockStack.java | 0 .../hotspot/HotSpotNodeLIRBuilder.java | 0 .../hotspot/HotSpotReferenceMapBuilder.java | 0 .../hotspot/HotSpotReplacementsImpl.java | 0 .../hotspot/HotSpotTTYStreamProvider.java | 0 .../compiler/hotspot/JVMCIVersionCheck.java | 0 .../compiler/hotspot/PrintStreamOption.java | 0 .../hotspot/debug/BenchmarkCounters.java | 0 .../hotspot/lir/HotSpotZapRegistersPhase.java | 0 .../meta/DefaultHotSpotLoweringProvider.java | 0 .../meta/HotSpotAOTProfilingPlugin.java | 0 .../HotSpotClassInitializationPlugin.java | 0 .../meta/HotSpotConstantFieldProvider.java | 0 .../meta/HotSpotConstantLoadAction.java | 0 .../meta/HotSpotDisassemblerProvider.java | 0 .../meta/HotSpotForeignCallsProvider.java | 0 .../meta/HotSpotForeignCallsProviderImpl.java | 0 .../HotSpotGraalConstantFieldProvider.java | 0 .../meta/HotSpotGraphBuilderPlugins.java | 0 .../meta/HotSpotHostForeignCallsProvider.java | 0 .../meta/HotSpotInvocationPlugins.java | 0 .../hotspot/meta/HotSpotLoweringProvider.java | 0 .../hotspot/meta/HotSpotNodePlugin.java | 0 .../hotspot/meta/HotSpotProfilingPlugin.java | 0 .../hotspot/meta/HotSpotProviders.java | 0 .../hotspot/meta/HotSpotRegisters.java | 0 .../meta/HotSpotRegistersProvider.java | 0 .../HotSpotSnippetReflectionProvider.java | 0 .../hotspot/meta/HotSpotStampProvider.java | 0 .../hotspot/meta/HotSpotSuitesProvider.java | 0 .../meta/HotSpotWordOperationPlugin.java | 0 .../hotspot/nodes/AcquiredCASLockNode.java | 0 .../compiler/hotspot/nodes/AllocaNode.java | 0 .../hotspot/nodes/ArrayRangeWriteBarrier.java | 0 .../hotspot/nodes/BeginLockScopeNode.java | 0 .../hotspot/nodes/CompressionNode.java | 0 .../nodes/ComputeObjectAddressNode.java | 0 .../hotspot/nodes/CurrentJavaThreadNode.java | 0 .../hotspot/nodes/CurrentLockNode.java | 0 ...DeoptimizationFetchUnrollInfoCallNode.java | 0 .../hotspot/nodes/DeoptimizeCallerNode.java | 0 .../hotspot/nodes/DeoptimizingStubCall.java | 0 .../hotspot/nodes/DimensionsNode.java | 0 .../nodes/DirectCompareAndSwapNode.java | 0 .../hotspot/nodes/EndLockScopeNode.java | 0 .../EnterUnpackFramesStackFrameNode.java | 0 .../nodes/FastAcquireBiasedLockNode.java | 0 .../nodes/G1ArrayRangePostWriteBarrier.java | 0 .../nodes/G1ArrayRangePreWriteBarrier.java | 0 .../hotspot/nodes/G1PostWriteBarrier.java | 0 .../hotspot/nodes/G1PreWriteBarrier.java | 0 .../nodes/G1ReferentFieldReadBarrier.java | 0 .../hotspot/nodes/GetObjectAddressNode.java | 0 .../nodes/GraalHotSpotVMConfigNode.java | 0 .../nodes/HotSpotDirectCallTargetNode.java | 0 .../nodes/HotSpotIndirectCallTargetNode.java | 0 .../nodes/HotSpotNodeCostProvider.java | 0 .../JumpToExceptionHandlerInCallerNode.java | 0 .../nodes/JumpToExceptionHandlerNode.java | 0 .../nodes/LeaveCurrentStackFrameNode.java | 0 .../nodes/LeaveDeoptimizedStackFrameNode.java | 0 .../LeaveUnpackFramesStackFrameNode.java | 0 .../hotspot/nodes/LoadIndexedPointerNode.java | 0 .../hotspot/nodes/MonitorCounterNode.java | 0 .../hotspot/nodes/ObjectWriteBarrier.java | 0 .../hotspot/nodes/PatchReturnAddressNode.java | 0 .../nodes/PushInterpreterFrameNode.java | 0 .../hotspot/nodes/SaveAllRegistersNode.java | 0 .../nodes/SerialArrayRangeWriteBarrier.java | 0 .../hotspot/nodes/SerialWriteBarrier.java | 0 .../hotspot/nodes/SnippetAnchorNode.java | 0 .../nodes/SnippetLocationProxyNode.java | 0 .../hotspot/nodes/StubForeignCallNode.java | 0 .../compiler/hotspot/nodes/StubStartNode.java | 0 .../hotspot/nodes/UncommonTrapCallNode.java | 0 .../compiler/hotspot/nodes/VMErrorNode.java | 0 .../compiler/hotspot/nodes/WriteBarrier.java | 0 .../hotspot/nodes/aot/EncodedSymbolNode.java | 0 .../nodes/aot/InitializeKlassNode.java | 0 .../nodes/aot/InitializeKlassStubCall.java | 0 .../aot/LoadConstantIndirectlyFixedNode.java | 0 .../nodes/aot/LoadConstantIndirectlyNode.java | 0 .../aot/LoadMethodCountersIndirectlyNode.java | 0 .../nodes/aot/LoadMethodCountersNode.java | 0 .../nodes/aot/ResolveConstantNode.java | 0 .../nodes/aot/ResolveConstantStubCall.java | 0 .../aot/ResolveMethodAndLoadCountersNode.java | 0 .../ResolveMethodAndLoadCountersStubCall.java | 0 .../nodes/profiling/ProfileBranchNode.java | 0 .../nodes/profiling/ProfileInvokeNode.java | 0 .../hotspot/nodes/profiling/ProfileNode.java | 0 .../ProfileWithNotificationNode.java | 0 .../nodes/profiling/RandomSeedNode.java | 0 .../nodes/type/HotSpotLIRKindTool.java | 0 .../hotspot/nodes/type/KlassPointerStamp.java | 0 .../nodes/type/MetaspacePointerStamp.java | 0 .../type/MethodCountersPointerStamp.java | 0 .../nodes/type/MethodPointerStamp.java | 0 .../hotspot/nodes/type/NarrowOopStamp.java | 0 .../compiler/hotspot/package-info.java | 0 .../phases/AheadOfTimeVerificationPhase.java | 0 .../phases/LoadJavaMirrorWithKlassPhase.java | 0 .../phases/OnStackReplacementPhase.java | 0 .../phases/WriteBarrierAdditionPhase.java | 0 .../phases/WriteBarrierVerificationPhase.java | 0 .../hotspot/phases/aot/AOTInliningPolicy.java | 0 ...EliminateRedundantInitializationPhase.java | 0 .../phases/aot/ReplaceConstantNodesPhase.java | 0 .../profiling/FinalizeProfileNodesPhase.java | 0 .../replacements/AESCryptSubstitutions.java | 0 .../replacements/AssertionSnippets.java | 0 .../replacements/BigIntegerSubstitutions.java | 0 .../replacements/CRC32Substitutions.java | 0 .../replacements/CallSiteTargetNode.java | 0 .../CipherBlockChainingSubstitutions.java | 0 .../hotspot/replacements/ClassGetHubNode.java | 0 .../replacements/EncodedSymbolConstant.java | 0 .../replacements/HashCodeSnippets.java | 0 .../HotSpotClassSubstitutions.java | 0 .../replacements/HotSpotReplacementsUtil.java | 0 .../replacements/HotspotSnippetsOptions.java | 0 .../hotspot/replacements/HubGetClassNode.java | 0 .../replacements/IdentityHashCodeNode.java | 0 .../replacements/InstanceOfSnippets.java | 0 .../replacements/KlassLayoutHelperNode.java | 0 .../LoadExceptionObjectSnippets.java | 0 .../hotspot/replacements/MonitorSnippets.java | 0 .../replacements/NewObjectSnippets.java | 0 .../hotspot/replacements/ObjectCloneNode.java | 0 .../replacements/ObjectCloneSnippets.java | 0 .../replacements/ObjectSubstitutions.java | 0 .../ReflectionGetCallerClassNode.java | 0 .../replacements/ReflectionSubstitutions.java | 0 .../replacements/SHA2Substitutions.java | 0 .../replacements/SHA5Substitutions.java | 0 .../replacements/SHASubstitutions.java | 0 .../replacements/StringToBytesSnippets.java | 0 .../replacements/ThreadSubstitutions.java | 0 .../replacements/TypeCheckSnippetUtils.java | 0 .../hotspot/replacements/UnsafeAccess.java | 0 .../replacements/UnsafeLoadSnippets.java | 0 .../replacements/WriteBarrierSnippets.java | 0 .../aot/ResolveConstantSnippets.java | 0 .../arraycopy/ArrayCopyCallNode.java | 0 .../replacements/arraycopy/ArrayCopyNode.java | 0 .../arraycopy/ArrayCopySlowPathNode.java | 0 .../arraycopy/ArrayCopySnippets.java | 0 .../arraycopy/ArrayCopyUnrollNode.java | 0 .../arraycopy/CheckcastArrayCopyCallNode.java | 0 .../arraycopy/UnsafeArrayCopyNode.java | 0 .../arraycopy/UnsafeArrayCopySnippets.java | 0 .../ProbabilisticProfileSnippets.java | 0 .../profiling/ProfileSnippets.java | 0 .../stubs/ArrayStoreExceptionStub.java | 0 .../hotspot/stubs/ClassCastExceptionStub.java | 0 .../hotspot/stubs/CreateExceptionStub.java | 0 .../hotspot/stubs/DeoptimizationStub.java | 0 .../hotspot/stubs/ExceptionHandlerStub.java | 0 .../hotspot/stubs/ForeignCallStub.java | 0 .../compiler/hotspot/stubs/NewArrayStub.java | 0 .../hotspot/stubs/NewInstanceStub.java | 0 .../stubs/NullPointerExceptionStub.java | 0 .../stubs/OutOfBoundsExceptionStub.java | 0 .../compiler/hotspot/stubs/SnippetStub.java | 0 .../graalvm/compiler/hotspot/stubs/Stub.java | 0 .../stubs/StubCompilationIdentifier.java | 0 .../compiler/hotspot/stubs/StubOptions.java | 0 .../compiler/hotspot/stubs/StubUtil.java | 0 .../hotspot/stubs/UncommonTrapStub.java | 0 .../stubs/UnwindExceptionToCallerStub.java | 0 .../compiler/hotspot/stubs/VerifyOopStub.java | 0 .../hotspot/word/HotSpotOperation.java | 0 .../hotspot/word/HotSpotWordTypes.java | 0 .../compiler/hotspot/word/KlassPointer.java | 0 .../hotspot/word/MetaspacePointer.java | 0 .../hotspot/word/MethodCountersPointer.java | 0 .../compiler/hotspot/word/MethodPointer.java | 0 .../hotspot/word/PointerCastNode.java | 0 .../compiler/java/BciBlockMapping.java | 0 .../graalvm/compiler/java/BytecodeParser.java | 0 .../compiler/java/BytecodeParserOptions.java | 0 .../java/ComputeLoopFrequenciesClosure.java | 0 .../compiler/java/DefaultSuitesProvider.java | 0 .../compiler/java/FrameStateBuilder.java | 0 .../compiler/java/GraphBuilderPhase.java | 0 .../compiler/java/JsrNotSupportedBailout.java | 0 .../org/graalvm/compiler/java/JsrScope.java | 0 .../compiler/java/LargeLocalLiveness.java | 0 .../graalvm/compiler/java/LocalLiveness.java | 0 .../compiler/java/SmallLocalLiveness.java | 0 .../compiler/java/SuitesProviderBase.java | 0 .../src/org/graalvm/compiler/jtt/JTTTest.java | 0 .../compiler/jtt/backend/ConstantPhiTest.java | 0 .../compiler/jtt/backend/EmptyMethodTest.java | 0 .../jtt/backend/LargeConstantSectionTest.java | 0 .../compiler/jtt/bytecode/BC_aaload.java | 0 .../compiler/jtt/bytecode/BC_aaload_1.java | 0 .../compiler/jtt/bytecode/BC_aastore.java | 0 .../compiler/jtt/bytecode/BC_aload_0.java | 0 .../compiler/jtt/bytecode/BC_aload_1.java | 0 .../compiler/jtt/bytecode/BC_aload_2.java | 0 .../compiler/jtt/bytecode/BC_aload_3.java | 0 .../compiler/jtt/bytecode/BC_anewarray.java | 0 .../compiler/jtt/bytecode/BC_areturn.java | 0 .../compiler/jtt/bytecode/BC_arraylength.java | 0 .../compiler/jtt/bytecode/BC_athrow.java | 0 .../compiler/jtt/bytecode/BC_baload.java | 0 .../compiler/jtt/bytecode/BC_bastore.java | 0 .../compiler/jtt/bytecode/BC_caload.java | 0 .../compiler/jtt/bytecode/BC_castore.java | 0 .../compiler/jtt/bytecode/BC_checkcast01.java | 0 .../compiler/jtt/bytecode/BC_checkcast02.java | 0 .../compiler/jtt/bytecode/BC_checkcast03.java | 0 .../graalvm/compiler/jtt/bytecode/BC_d2f.java | 0 .../compiler/jtt/bytecode/BC_d2i01.java | 0 .../compiler/jtt/bytecode/BC_d2i02.java | 0 .../compiler/jtt/bytecode/BC_d2l01.java | 0 .../compiler/jtt/bytecode/BC_d2l02.java | 0 .../compiler/jtt/bytecode/BC_d2l03.java | 0 .../compiler/jtt/bytecode/BC_dadd.java | 0 .../compiler/jtt/bytecode/BC_daload.java | 0 .../compiler/jtt/bytecode/BC_dastore.java | 0 .../compiler/jtt/bytecode/BC_dcmp01.java | 0 .../compiler/jtt/bytecode/BC_dcmp02.java | 0 .../compiler/jtt/bytecode/BC_dcmp03.java | 0 .../compiler/jtt/bytecode/BC_dcmp04.java | 0 .../compiler/jtt/bytecode/BC_dcmp05.java | 0 .../compiler/jtt/bytecode/BC_dcmp06.java | 0 .../compiler/jtt/bytecode/BC_dcmp07.java | 0 .../compiler/jtt/bytecode/BC_dcmp08.java | 0 .../compiler/jtt/bytecode/BC_dcmp09.java | 0 .../compiler/jtt/bytecode/BC_dcmp10.java | 0 .../compiler/jtt/bytecode/BC_ddiv.java | 0 .../compiler/jtt/bytecode/BC_dmul.java | 0 .../compiler/jtt/bytecode/BC_dneg.java | 0 .../compiler/jtt/bytecode/BC_dneg2.java | 0 .../compiler/jtt/bytecode/BC_double_base.java | 0 .../compiler/jtt/bytecode/BC_drem.java | 0 .../compiler/jtt/bytecode/BC_dreturn.java | 0 .../compiler/jtt/bytecode/BC_dsub.java | 0 .../compiler/jtt/bytecode/BC_dsub2.java | 0 .../graalvm/compiler/jtt/bytecode/BC_f2d.java | 0 .../compiler/jtt/bytecode/BC_f2i01.java | 0 .../compiler/jtt/bytecode/BC_f2i02.java | 0 .../compiler/jtt/bytecode/BC_f2l01.java | 0 .../compiler/jtt/bytecode/BC_f2l02.java | 0 .../compiler/jtt/bytecode/BC_fadd.java | 0 .../compiler/jtt/bytecode/BC_faload.java | 0 .../compiler/jtt/bytecode/BC_fastore.java | 0 .../compiler/jtt/bytecode/BC_fcmp01.java | 0 .../compiler/jtt/bytecode/BC_fcmp02.java | 0 .../compiler/jtt/bytecode/BC_fcmp03.java | 0 .../compiler/jtt/bytecode/BC_fcmp04.java | 0 .../compiler/jtt/bytecode/BC_fcmp05.java | 0 .../compiler/jtt/bytecode/BC_fcmp06.java | 0 .../compiler/jtt/bytecode/BC_fcmp07.java | 0 .../compiler/jtt/bytecode/BC_fcmp08.java | 0 .../compiler/jtt/bytecode/BC_fcmp09.java | 0 .../compiler/jtt/bytecode/BC_fcmp10.java | 0 .../compiler/jtt/bytecode/BC_fdiv.java | 0 .../compiler/jtt/bytecode/BC_fload.java | 0 .../compiler/jtt/bytecode/BC_fload_2.java | 0 .../compiler/jtt/bytecode/BC_float_base.java | 0 .../compiler/jtt/bytecode/BC_fmul.java | 0 .../compiler/jtt/bytecode/BC_fneg.java | 0 .../compiler/jtt/bytecode/BC_frem.java | 0 .../compiler/jtt/bytecode/BC_freturn.java | 0 .../compiler/jtt/bytecode/BC_fsub.java | 0 .../compiler/jtt/bytecode/BC_getfield.java | 0 .../compiler/jtt/bytecode/BC_getfield_b.java | 0 .../compiler/jtt/bytecode/BC_getfield_c.java | 0 .../compiler/jtt/bytecode/BC_getfield_d.java | 0 .../compiler/jtt/bytecode/BC_getfield_f.java | 0 .../compiler/jtt/bytecode/BC_getfield_i.java | 0 .../compiler/jtt/bytecode/BC_getfield_l.java | 0 .../compiler/jtt/bytecode/BC_getfield_o.java | 0 .../compiler/jtt/bytecode/BC_getfield_s.java | 0 .../compiler/jtt/bytecode/BC_getfield_z.java | 0 .../compiler/jtt/bytecode/BC_getstatic_b.java | 0 .../compiler/jtt/bytecode/BC_getstatic_c.java | 0 .../compiler/jtt/bytecode/BC_getstatic_d.java | 0 .../compiler/jtt/bytecode/BC_getstatic_f.java | 0 .../compiler/jtt/bytecode/BC_getstatic_i.java | 0 .../compiler/jtt/bytecode/BC_getstatic_l.java | 0 .../compiler/jtt/bytecode/BC_getstatic_s.java | 0 .../compiler/jtt/bytecode/BC_getstatic_z.java | 0 .../graalvm/compiler/jtt/bytecode/BC_i2b.java | 0 .../graalvm/compiler/jtt/bytecode/BC_i2c.java | 0 .../graalvm/compiler/jtt/bytecode/BC_i2d.java | 0 .../graalvm/compiler/jtt/bytecode/BC_i2f.java | 0 .../graalvm/compiler/jtt/bytecode/BC_i2l.java | 0 .../graalvm/compiler/jtt/bytecode/BC_i2s.java | 0 .../compiler/jtt/bytecode/BC_iadd.java | 0 .../compiler/jtt/bytecode/BC_iadd2.java | 0 .../compiler/jtt/bytecode/BC_iadd3.java | 0 .../compiler/jtt/bytecode/BC_iadd_const0.java | 0 .../compiler/jtt/bytecode/BC_iadd_const1.java | 0 .../compiler/jtt/bytecode/BC_iadd_const2.java | 0 .../compiler/jtt/bytecode/BC_iadd_const3.java | 0 .../compiler/jtt/bytecode/BC_iaload.java | 0 .../compiler/jtt/bytecode/BC_iand.java | 0 .../compiler/jtt/bytecode/BC_iastore.java | 0 .../compiler/jtt/bytecode/BC_iconst.java | 0 .../compiler/jtt/bytecode/BC_idiv.java | 0 .../compiler/jtt/bytecode/BC_idiv2.java | 0 .../compiler/jtt/bytecode/BC_ifeq.java | 0 .../compiler/jtt/bytecode/BC_ifeq_2.java | 0 .../compiler/jtt/bytecode/BC_ifeq_3.java | 0 .../compiler/jtt/bytecode/BC_ifge.java | 0 .../compiler/jtt/bytecode/BC_ifge_2.java | 0 .../compiler/jtt/bytecode/BC_ifge_3.java | 0 .../compiler/jtt/bytecode/BC_ifgt.java | 0 .../compiler/jtt/bytecode/BC_ificmplt1.java | 0 .../compiler/jtt/bytecode/BC_ificmplt2.java | 0 .../compiler/jtt/bytecode/BC_ificmpne1.java | 0 .../compiler/jtt/bytecode/BC_ificmpne2.java | 0 .../compiler/jtt/bytecode/BC_ifle.java | 0 .../compiler/jtt/bytecode/BC_iflt.java | 0 .../compiler/jtt/bytecode/BC_ifne.java | 0 .../compiler/jtt/bytecode/BC_ifnonnull.java | 0 .../compiler/jtt/bytecode/BC_ifnonnull_2.java | 0 .../compiler/jtt/bytecode/BC_ifnonnull_3.java | 0 .../compiler/jtt/bytecode/BC_ifnull.java | 0 .../compiler/jtt/bytecode/BC_ifnull_2.java | 0 .../compiler/jtt/bytecode/BC_ifnull_3.java | 0 .../compiler/jtt/bytecode/BC_iinc_1.java | 0 .../compiler/jtt/bytecode/BC_iinc_2.java | 0 .../compiler/jtt/bytecode/BC_iinc_3.java | 0 .../compiler/jtt/bytecode/BC_iinc_4.java | 0 .../compiler/jtt/bytecode/BC_iload_0.java | 0 .../compiler/jtt/bytecode/BC_iload_0_1.java | 0 .../compiler/jtt/bytecode/BC_iload_0_2.java | 0 .../compiler/jtt/bytecode/BC_iload_1.java | 0 .../compiler/jtt/bytecode/BC_iload_1_1.java | 0 .../compiler/jtt/bytecode/BC_iload_2.java | 0 .../compiler/jtt/bytecode/BC_iload_3.java | 0 .../compiler/jtt/bytecode/BC_imul.java | 0 .../compiler/jtt/bytecode/BC_ineg.java | 0 .../compiler/jtt/bytecode/BC_instanceof.java | 0 .../jtt/bytecode/BC_instanceof01.java | 0 .../jtt/bytecode/BC_invokeinterface.java | 0 .../jtt/bytecode/BC_invokespecial.java | 0 .../jtt/bytecode/BC_invokespecial2.java | 0 .../jtt/bytecode/BC_invokestatic.java | 0 .../jtt/bytecode/BC_invokevirtual.java | 0 .../graalvm/compiler/jtt/bytecode/BC_ior.java | 0 .../compiler/jtt/bytecode/BC_irem.java | 0 .../compiler/jtt/bytecode/BC_irem2.java | 0 .../compiler/jtt/bytecode/BC_irem3.java | 0 .../compiler/jtt/bytecode/BC_ireturn.java | 0 .../compiler/jtt/bytecode/BC_ishl.java | 0 .../compiler/jtt/bytecode/BC_ishr.java | 0 .../compiler/jtt/bytecode/BC_isub.java | 0 .../compiler/jtt/bytecode/BC_iushr.java | 0 .../compiler/jtt/bytecode/BC_ixor.java | 0 .../graalvm/compiler/jtt/bytecode/BC_l2d.java | 0 .../graalvm/compiler/jtt/bytecode/BC_l2f.java | 0 .../graalvm/compiler/jtt/bytecode/BC_l2i.java | 0 .../compiler/jtt/bytecode/BC_l2i_2.java | 0 .../compiler/jtt/bytecode/BC_ladd.java | 0 .../compiler/jtt/bytecode/BC_ladd2.java | 0 .../compiler/jtt/bytecode/BC_laload.java | 0 .../compiler/jtt/bytecode/BC_land.java | 0 .../compiler/jtt/bytecode/BC_lastore.java | 0 .../compiler/jtt/bytecode/BC_lcmp.java | 0 .../compiler/jtt/bytecode/BC_ldc_01.java | 0 .../compiler/jtt/bytecode/BC_ldc_02.java | 0 .../compiler/jtt/bytecode/BC_ldc_03.java | 0 .../compiler/jtt/bytecode/BC_ldc_04.java | 0 .../compiler/jtt/bytecode/BC_ldc_05.java | 0 .../compiler/jtt/bytecode/BC_ldc_06.java | 0 .../compiler/jtt/bytecode/BC_ldiv.java | 0 .../compiler/jtt/bytecode/BC_ldiv2.java | 0 .../compiler/jtt/bytecode/BC_ldiv3.java | 0 .../compiler/jtt/bytecode/BC_lload_0.java | 0 .../compiler/jtt/bytecode/BC_lload_01.java | 0 .../compiler/jtt/bytecode/BC_lload_1.java | 0 .../compiler/jtt/bytecode/BC_lload_2.java | 0 .../compiler/jtt/bytecode/BC_lload_3.java | 0 .../compiler/jtt/bytecode/BC_lmul.java | 0 .../compiler/jtt/bytecode/BC_lneg.java | 0 .../jtt/bytecode/BC_lookupswitch01.java | 0 .../jtt/bytecode/BC_lookupswitch02.java | 0 .../jtt/bytecode/BC_lookupswitch03.java | 0 .../jtt/bytecode/BC_lookupswitch04.java | 0 .../jtt/bytecode/BC_lookupswitch05.java | 0 .../graalvm/compiler/jtt/bytecode/BC_lor.java | 0 .../compiler/jtt/bytecode/BC_lrem.java | 0 .../compiler/jtt/bytecode/BC_lrem2.java | 0 .../compiler/jtt/bytecode/BC_lreturn.java | 0 .../compiler/jtt/bytecode/BC_lshl.java | 0 .../compiler/jtt/bytecode/BC_lshr.java | 0 .../compiler/jtt/bytecode/BC_lshr02.java | 0 .../compiler/jtt/bytecode/BC_lsub.java | 0 .../compiler/jtt/bytecode/BC_lushr.java | 0 .../compiler/jtt/bytecode/BC_lxor.java | 0 .../jtt/bytecode/BC_monitorenter.java | 0 .../jtt/bytecode/BC_monitorenter02.java | 0 .../jtt/bytecode/BC_multianewarray01.java | 0 .../jtt/bytecode/BC_multianewarray02.java | 0 .../jtt/bytecode/BC_multianewarray03.java | 0 .../jtt/bytecode/BC_multianewarray04.java | 0 .../graalvm/compiler/jtt/bytecode/BC_new.java | 0 .../compiler/jtt/bytecode/BC_newarray.java | 0 .../compiler/jtt/bytecode/BC_putfield_01.java | 0 .../compiler/jtt/bytecode/BC_putfield_02.java | 0 .../compiler/jtt/bytecode/BC_putfield_03.java | 0 .../compiler/jtt/bytecode/BC_putfield_04.java | 0 .../compiler/jtt/bytecode/BC_putstatic.java | 0 .../compiler/jtt/bytecode/BC_saload.java | 0 .../compiler/jtt/bytecode/BC_sastore.java | 0 .../compiler/jtt/bytecode/BC_tableswitch.java | 0 .../jtt/bytecode/BC_tableswitch2.java | 0 .../jtt/bytecode/BC_tableswitch3.java | 0 .../jtt/bytecode/BC_tableswitch4.java | 0 .../compiler/jtt/bytecode/BC_wide01.java | 0 .../compiler/jtt/bytecode/BC_wide02.java | 0 .../compiler/jtt/except/BC_aaload0.java | 0 .../compiler/jtt/except/BC_aaload1.java | 0 .../compiler/jtt/except/BC_aastore0.java | 0 .../compiler/jtt/except/BC_aastore1.java | 0 .../compiler/jtt/except/BC_anewarray.java | 0 .../compiler/jtt/except/BC_arraylength.java | 0 .../compiler/jtt/except/BC_athrow0.java | 0 .../compiler/jtt/except/BC_athrow1.java | 0 .../compiler/jtt/except/BC_athrow2.java | 0 .../compiler/jtt/except/BC_athrow3.java | 0 .../compiler/jtt/except/BC_baload.java | 0 .../compiler/jtt/except/BC_bastore.java | 0 .../compiler/jtt/except/BC_caload.java | 0 .../compiler/jtt/except/BC_castore.java | 0 .../compiler/jtt/except/BC_checkcast.java | 0 .../compiler/jtt/except/BC_checkcast1.java | 0 .../compiler/jtt/except/BC_checkcast2.java | 0 .../compiler/jtt/except/BC_checkcast3.java | 0 .../compiler/jtt/except/BC_checkcast4.java | 0 .../compiler/jtt/except/BC_checkcast5.java | 0 .../compiler/jtt/except/BC_checkcast6.java | 0 .../compiler/jtt/except/BC_daload.java | 0 .../compiler/jtt/except/BC_dastore.java | 0 .../compiler/jtt/except/BC_faload.java | 0 .../compiler/jtt/except/BC_fastore.java | 0 .../compiler/jtt/except/BC_getfield.java | 0 .../compiler/jtt/except/BC_getfield1.java | 0 .../compiler/jtt/except/BC_iaload.java | 0 .../compiler/jtt/except/BC_iastore.java | 0 .../graalvm/compiler/jtt/except/BC_idiv.java | 0 .../graalvm/compiler/jtt/except/BC_idiv2.java | 0 .../jtt/except/BC_invokespecial01.java | 0 .../jtt/except/BC_invokevirtual01.java | 0 .../jtt/except/BC_invokevirtual02.java | 0 .../graalvm/compiler/jtt/except/BC_irem.java | 0 .../compiler/jtt/except/BC_laload.java | 0 .../compiler/jtt/except/BC_lastore.java | 0 .../graalvm/compiler/jtt/except/BC_ldiv.java | 0 .../graalvm/compiler/jtt/except/BC_ldiv2.java | 0 .../graalvm/compiler/jtt/except/BC_lrem.java | 0 .../compiler/jtt/except/BC_monitorenter.java | 0 .../jtt/except/BC_multianewarray.java | 0 .../compiler/jtt/except/BC_newarray.java | 0 .../compiler/jtt/except/BC_putfield.java | 0 .../compiler/jtt/except/BC_saload.java | 0 .../compiler/jtt/except/BC_sastore.java | 0 .../compiler/jtt/except/Catch_Loop01.java | 0 .../compiler/jtt/except/Catch_Loop02.java | 0 .../compiler/jtt/except/Catch_Loop03.java | 0 .../compiler/jtt/except/Catch_NASE_1.java | 0 .../compiler/jtt/except/Catch_NASE_2.java | 0 .../compiler/jtt/except/Catch_NPE_00.java | 0 .../compiler/jtt/except/Catch_NPE_01.java | 0 .../compiler/jtt/except/Catch_NPE_02.java | 0 .../compiler/jtt/except/Catch_NPE_03.java | 0 .../compiler/jtt/except/Catch_NPE_04.java | 0 .../compiler/jtt/except/Catch_NPE_05.java | 0 .../compiler/jtt/except/Catch_NPE_06.java | 0 .../compiler/jtt/except/Catch_NPE_07.java | 0 .../compiler/jtt/except/Catch_NPE_08.java | 0 .../compiler/jtt/except/Catch_NPE_09.java | 0 .../compiler/jtt/except/Catch_NPE_10.java | 0 .../compiler/jtt/except/Catch_NPE_11.java | 0 .../except/Catch_StackOverflowError_01.java | 0 .../except/Catch_StackOverflowError_02.java | 0 .../except/Catch_StackOverflowError_03.java | 0 .../compiler/jtt/except/Catch_Two01.java | 0 .../compiler/jtt/except/Catch_Two02.java | 0 .../compiler/jtt/except/Catch_Two03.java | 0 .../compiler/jtt/except/Catch_Unresolved.java | 0 .../jtt/except/Catch_Unresolved01.java | 0 .../jtt/except/Catch_Unresolved02.java | 0 .../jtt/except/Catch_Unresolved03.java | 0 .../compiler/jtt/except/Except_Locals.java | 0 .../jtt/except/Except_Synchronized01.java | 0 .../jtt/except/Except_Synchronized02.java | 0 .../jtt/except/Except_Synchronized03.java | 0 .../jtt/except/Except_Synchronized04.java | 0 .../jtt/except/Except_Synchronized05.java | 0 .../compiler/jtt/except/Finally01.java | 0 .../compiler/jtt/except/Finally02.java | 0 .../jtt/except/StackTrace_AIOOBE_00.java | 0 .../jtt/except/StackTrace_CCE_00.java | 0 .../jtt/except/StackTrace_NPE_00.java | 0 .../jtt/except/StackTrace_NPE_01.java | 0 .../jtt/except/StackTrace_NPE_02.java | 0 .../jtt/except/StackTrace_NPE_03.java | 0 .../compiler/jtt/except/Throw_InCatch01.java | 0 .../compiler/jtt/except/Throw_InCatch02.java | 0 .../compiler/jtt/except/Throw_InCatch03.java | 0 .../compiler/jtt/except/Throw_InNested.java | 0 .../compiler/jtt/except/Throw_NPE_01.java | 0 .../jtt/except/Throw_Synchronized01.java | 0 .../jtt/except/Throw_Synchronized02.java | 0 .../jtt/except/Throw_Synchronized03.java | 0 .../jtt/except/Throw_Synchronized04.java | 0 .../jtt/except/Throw_Synchronized05.java | 0 .../jtt/except/UntrustedInterfaces.java | 0 .../compiler/jtt/hotpath/HP_allocate01.java | 0 .../compiler/jtt/hotpath/HP_allocate02.java | 0 .../compiler/jtt/hotpath/HP_allocate03.java | 0 .../compiler/jtt/hotpath/HP_allocate04.java | 0 .../compiler/jtt/hotpath/HP_array01.java | 0 .../compiler/jtt/hotpath/HP_array02.java | 0 .../compiler/jtt/hotpath/HP_array03.java | 0 .../compiler/jtt/hotpath/HP_array04.java | 0 .../compiler/jtt/hotpath/HP_control01.java | 0 .../compiler/jtt/hotpath/HP_control02.java | 0 .../compiler/jtt/hotpath/HP_convert01.java | 0 .../compiler/jtt/hotpath/HP_count.java | 0 .../compiler/jtt/hotpath/HP_dead01.java | 0 .../compiler/jtt/hotpath/HP_demo01.java | 0 .../compiler/jtt/hotpath/HP_field01.java | 0 .../compiler/jtt/hotpath/HP_field02.java | 0 .../compiler/jtt/hotpath/HP_field03.java | 0 .../compiler/jtt/hotpath/HP_field04.java | 0 .../graalvm/compiler/jtt/hotpath/HP_idea.java | 0 .../compiler/jtt/hotpath/HP_inline01.java | 0 .../compiler/jtt/hotpath/HP_inline02.java | 0 .../compiler/jtt/hotpath/HP_invoke01.java | 0 .../graalvm/compiler/jtt/hotpath/HP_life.java | 0 .../compiler/jtt/hotpath/HP_nest01.java | 0 .../compiler/jtt/hotpath/HP_nest02.java | 0 .../compiler/jtt/hotpath/HP_scope01.java | 0 .../compiler/jtt/hotpath/HP_scope02.java | 0 .../compiler/jtt/hotpath/HP_series.java | 0 .../compiler/jtt/hotpath/HP_trees01.java | 0 .../compiler/jtt/hotspot/Test6186134.java | 0 .../compiler/jtt/hotspot/Test6196102.java | 0 .../compiler/jtt/hotspot/Test6753639.java | 0 .../compiler/jtt/hotspot/Test6823354.java | 0 .../compiler/jtt/hotspot/Test6850611.java | 0 .../compiler/jtt/hotspot/Test6959129.java | 0 .../compiler/jtt/hotspot/Test7005594.java | 0 .../compiler/jtt/jdk/CharacterBits.java | 0 .../compiler/jtt/jdk/Class_getName.java | 0 .../compiler/jtt/jdk/DivideUnsigned.java | 0 .../graalvm/compiler/jtt/jdk/EnumMap01.java | 0 .../graalvm/compiler/jtt/jdk/EnumMap02.java | 0 .../graalvm/compiler/jtt/jdk/IntegerBits.java | 0 .../graalvm/compiler/jtt/jdk/LongBits.java | 0 .../graalvm/compiler/jtt/jdk/ShortBits.java | 0 .../jtt/jdk/System_currentTimeMillis01.java | 0 .../jtt/jdk/System_currentTimeMillis02.java | 0 .../compiler/jtt/jdk/System_nanoTime01.java | 0 .../compiler/jtt/jdk/System_nanoTime02.java | 0 .../compiler/jtt/jdk/System_setOut.java | 0 .../compiler/jtt/jdk/Thread_setName.java | 0 .../compiler/jtt/jdk/UnsafeAccess01.java | 0 .../jtt/jdk/UnsafeAllocateInstance01.java | 0 .../jtt/jdk/Unsafe_compareAndSwap.java | 0 .../jdk/Unsafe_compareAndSwapNullCheck.java | 0 .../compiler/jtt/lang/Boxed_TYPE_01.java | 0 .../compiler/jtt/lang/Bridge_method01.java | 0 .../jtt/lang/ClassLoader_loadClass01.java | 0 .../compiler/jtt/lang/Class_Literal01.java | 0 .../compiler/jtt/lang/Class_asSubclass01.java | 0 .../compiler/jtt/lang/Class_cast01.java | 0 .../compiler/jtt/lang/Class_cast02.java | 0 .../compiler/jtt/lang/Class_forName01.java | 0 .../compiler/jtt/lang/Class_forName02.java | 0 .../compiler/jtt/lang/Class_forName03.java | 0 .../compiler/jtt/lang/Class_forName04.java | 0 .../compiler/jtt/lang/Class_forName05.java | 0 .../jtt/lang/Class_getComponentType01.java | 0 .../jtt/lang/Class_getInterfaces01.java | 0 .../jtt/lang/Class_getModifiers01.java | 0 .../jtt/lang/Class_getModifiers02.java | 0 .../compiler/jtt/lang/Class_getName01.java | 0 .../compiler/jtt/lang/Class_getName02.java | 0 .../jtt/lang/Class_getSimpleName01.java | 0 .../jtt/lang/Class_getSimpleName02.java | 0 .../jtt/lang/Class_getSuperClass01.java | 0 .../compiler/jtt/lang/Class_isArray01.java | 0 .../jtt/lang/Class_isAssignableFrom01.java | 0 .../jtt/lang/Class_isAssignableFrom02.java | 0 .../jtt/lang/Class_isAssignableFrom03.java | 0 .../compiler/jtt/lang/Class_isInstance01.java | 0 .../compiler/jtt/lang/Class_isInstance02.java | 0 .../compiler/jtt/lang/Class_isInstance03.java | 0 .../compiler/jtt/lang/Class_isInstance04.java | 0 .../compiler/jtt/lang/Class_isInstance05.java | 0 .../compiler/jtt/lang/Class_isInstance06.java | 0 .../compiler/jtt/lang/Class_isInstance07.java | 0 .../jtt/lang/Class_isInterface01.java | 0 .../jtt/lang/Class_isPrimitive01.java | 0 .../graalvm/compiler/jtt/lang/Double_01.java | 0 .../compiler/jtt/lang/Double_conditional.java | 0 .../compiler/jtt/lang/Double_toString.java | 0 .../graalvm/compiler/jtt/lang/Float_01.java | 0 .../graalvm/compiler/jtt/lang/Float_02.java | 0 .../graalvm/compiler/jtt/lang/Float_03.java | 0 .../compiler/jtt/lang/Float_conditional.java | 0 .../compiler/jtt/lang/Int_greater01.java | 0 .../compiler/jtt/lang/Int_greater02.java | 0 .../compiler/jtt/lang/Int_greater03.java | 0 .../compiler/jtt/lang/Int_greaterEqual01.java | 0 .../compiler/jtt/lang/Int_greaterEqual02.java | 0 .../compiler/jtt/lang/Int_greaterEqual03.java | 0 .../graalvm/compiler/jtt/lang/Int_less01.java | 0 .../graalvm/compiler/jtt/lang/Int_less02.java | 0 .../graalvm/compiler/jtt/lang/Int_less03.java | 0 .../compiler/jtt/lang/Int_lessEqual01.java | 0 .../compiler/jtt/lang/Int_lessEqual02.java | 0 .../compiler/jtt/lang/Int_lessEqual03.java | 0 .../compiler/jtt/lang/JDK_ClassLoaders01.java | 0 .../compiler/jtt/lang/JDK_ClassLoaders02.java | 0 .../compiler/jtt/lang/LambdaEagerTest.java | 0 .../compiler/jtt/lang/Long_greater01.java | 0 .../compiler/jtt/lang/Long_greater02.java | 0 .../compiler/jtt/lang/Long_greater03.java | 0 .../jtt/lang/Long_greaterEqual01.java | 0 .../jtt/lang/Long_greaterEqual02.java | 0 .../jtt/lang/Long_greaterEqual03.java | 0 .../compiler/jtt/lang/Long_less01.java | 0 .../compiler/jtt/lang/Long_less02.java | 0 .../compiler/jtt/lang/Long_less03.java | 0 .../compiler/jtt/lang/Long_lessEqual01.java | 0 .../compiler/jtt/lang/Long_lessEqual02.java | 0 .../compiler/jtt/lang/Long_lessEqual03.java | 0 .../jtt/lang/Long_reverseBytes01.java | 0 .../jtt/lang/Long_reverseBytes02.java | 0 .../graalvm/compiler/jtt/lang/Math_abs.java | 0 .../graalvm/compiler/jtt/lang/Math_cos.java | 0 .../graalvm/compiler/jtt/lang/Math_exact.java | 0 .../graalvm/compiler/jtt/lang/Math_exp.java | 0 .../graalvm/compiler/jtt/lang/Math_log.java | 0 .../graalvm/compiler/jtt/lang/Math_log10.java | 0 .../graalvm/compiler/jtt/lang/Math_pow.java | 0 .../graalvm/compiler/jtt/lang/Math_round.java | 0 .../graalvm/compiler/jtt/lang/Math_sin.java | 0 .../graalvm/compiler/jtt/lang/Math_sqrt.java | 0 .../graalvm/compiler/jtt/lang/Math_tan.java | 0 .../compiler/jtt/lang/Object_clone01.java | 0 .../compiler/jtt/lang/Object_clone02.java | 0 .../compiler/jtt/lang/Object_equals01.java | 0 .../compiler/jtt/lang/Object_getClass01.java | 0 .../compiler/jtt/lang/Object_hashCode01.java | 0 .../compiler/jtt/lang/Object_hashCode02.java | 0 .../compiler/jtt/lang/Object_notify01.java | 0 .../compiler/jtt/lang/Object_notify02.java | 0 .../compiler/jtt/lang/Object_notifyAll01.java | 0 .../compiler/jtt/lang/Object_notifyAll02.java | 0 .../compiler/jtt/lang/Object_toString01.java | 0 .../compiler/jtt/lang/Object_toString02.java | 0 .../compiler/jtt/lang/Object_wait01.java | 0 .../compiler/jtt/lang/Object_wait02.java | 0 .../compiler/jtt/lang/Object_wait03.java | 0 .../jtt/lang/ProcessEnvironment_init.java | 0 .../compiler/jtt/lang/StringCoding_Scale.java | 0 .../compiler/jtt/lang/String_intern01.java | 0 .../compiler/jtt/lang/String_intern02.java | 0 .../compiler/jtt/lang/String_intern03.java | 0 .../compiler/jtt/lang/String_valueOf01.java | 0 .../jtt/lang/System_identityHashCode01.java | 0 .../compiler/jtt/loop/DegeneratedLoop.java | 0 .../org/graalvm/compiler/jtt/loop/Loop01.java | 0 .../org/graalvm/compiler/jtt/loop/Loop02.java | 0 .../org/graalvm/compiler/jtt/loop/Loop03.java | 0 .../org/graalvm/compiler/jtt/loop/Loop04.java | 0 .../org/graalvm/compiler/jtt/loop/Loop05.java | 0 .../org/graalvm/compiler/jtt/loop/Loop06.java | 0 .../org/graalvm/compiler/jtt/loop/Loop07.java | 0 .../graalvm/compiler/jtt/loop/Loop07_2.java | 0 .../org/graalvm/compiler/jtt/loop/Loop08.java | 0 .../org/graalvm/compiler/jtt/loop/Loop09.java | 0 .../graalvm/compiler/jtt/loop/Loop09_2.java | 0 .../org/graalvm/compiler/jtt/loop/Loop11.java | 0 .../org/graalvm/compiler/jtt/loop/Loop12.java | 0 .../org/graalvm/compiler/jtt/loop/Loop13.java | 0 .../org/graalvm/compiler/jtt/loop/Loop14.java | 0 .../org/graalvm/compiler/jtt/loop/Loop15.java | 0 .../org/graalvm/compiler/jtt/loop/Loop16.java | 0 .../org/graalvm/compiler/jtt/loop/Loop17.java | 0 .../graalvm/compiler/jtt/loop/LoopEscape.java | 0 .../graalvm/compiler/jtt/loop/LoopInline.java | 0 .../compiler/jtt/loop/LoopLastIndexOf.java | 0 .../compiler/jtt/loop/LoopNewInstance.java | 0 .../compiler/jtt/loop/LoopParseLong.java | 0 .../graalvm/compiler/jtt/loop/LoopPhi.java | 0 .../jtt/loop/LoopPhiResolutionTest.java | 0 .../compiler/jtt/loop/LoopSpilling.java | 0 .../compiler/jtt/loop/LoopSwitch01.java | 0 .../graalvm/compiler/jtt/loop/LoopUnroll.java | 0 .../SpillLoopPhiVariableAtDefinition.java | 0 .../compiler/jtt/micro/ArrayCompare01.java | 0 .../compiler/jtt/micro/ArrayCompare02.java | 0 .../compiler/jtt/micro/BC_invokevirtual2.java | 0 .../compiler/jtt/micro/BigByteParams01.java | 0 .../compiler/jtt/micro/BigDoubleParams02.java | 0 .../compiler/jtt/micro/BigFloatParams01.java | 0 .../compiler/jtt/micro/BigFloatParams02.java | 0 .../compiler/jtt/micro/BigIntParams01.java | 0 .../compiler/jtt/micro/BigIntParams02.java | 0 .../jtt/micro/BigInterfaceParams01.java | 0 .../compiler/jtt/micro/BigLongParams02.java | 0 .../compiler/jtt/micro/BigMixedParams01.java | 0 .../compiler/jtt/micro/BigMixedParams02.java | 0 .../compiler/jtt/micro/BigMixedParams03.java | 0 .../compiler/jtt/micro/BigMixedParams04.java | 0 .../compiler/jtt/micro/BigObjectParams01.java | 0 .../compiler/jtt/micro/BigObjectParams02.java | 0 .../jtt/micro/BigParamsAlignment.java | 0 .../compiler/jtt/micro/BigShortParams01.java | 0 .../jtt/micro/BigVirtualParams01.java | 0 .../compiler/jtt/micro/Bubblesort.java | 0 .../compiler/jtt/micro/ConstantLoadTest.java | 0 .../graalvm/compiler/jtt/micro/Fibonacci.java | 0 .../compiler/jtt/micro/FloatingReads.java | 0 .../jtt/micro/InvokeInterface_01.java | 0 .../jtt/micro/InvokeInterface_02.java | 0 .../jtt/micro/InvokeInterface_03.java | 0 .../jtt/micro/InvokeInterface_04.java | 0 .../compiler/jtt/micro/InvokeVirtual_01.java | 0 .../compiler/jtt/micro/InvokeVirtual_02.java | 0 .../graalvm/compiler/jtt/micro/Matrix01.java | 0 .../compiler/jtt/micro/ReferenceMap01.java | 0 .../compiler/jtt/micro/StrangeFrames.java | 0 .../compiler/jtt/micro/String_format01.java | 0 .../compiler/jtt/micro/String_format02.java | 0 .../compiler/jtt/micro/VarArgs_String01.java | 0 .../compiler/jtt/micro/VarArgs_Unroll.java | 0 .../compiler/jtt/micro/VarArgs_boolean01.java | 0 .../compiler/jtt/micro/VarArgs_byte01.java | 0 .../compiler/jtt/micro/VarArgs_char01.java | 0 .../compiler/jtt/micro/VarArgs_double01.java | 0 .../compiler/jtt/micro/VarArgs_float01.java | 0 .../compiler/jtt/micro/VarArgs_int01.java | 0 .../compiler/jtt/micro/VarArgs_long01.java | 0 .../compiler/jtt/micro/VarArgs_short01.java | 0 .../compiler/jtt/optimize/ABCE_01.java | 0 .../compiler/jtt/optimize/ABCE_02.java | 0 .../compiler/jtt/optimize/ABCE_03.java | 0 .../compiler/jtt/optimize/ArrayCopy01.java | 0 .../compiler/jtt/optimize/ArrayCopy02.java | 0 .../compiler/jtt/optimize/ArrayCopy03.java | 0 .../compiler/jtt/optimize/ArrayCopy04.java | 0 .../compiler/jtt/optimize/ArrayCopy05.java | 0 .../compiler/jtt/optimize/ArrayCopy06.java | 0 .../jtt/optimize/ArrayCopyGeneric.java | 0 .../compiler/jtt/optimize/ArrayLength01.java | 0 .../compiler/jtt/optimize/BC_idiv_16.java | 0 .../compiler/jtt/optimize/BC_idiv_4.java | 0 .../compiler/jtt/optimize/BC_imul_16.java | 0 .../compiler/jtt/optimize/BC_imul_4.java | 0 .../compiler/jtt/optimize/BC_ldiv_16.java | 0 .../compiler/jtt/optimize/BC_ldiv_4.java | 0 .../compiler/jtt/optimize/BC_lmul_16.java | 0 .../compiler/jtt/optimize/BC_lmul_4.java | 0 .../compiler/jtt/optimize/BC_lshr_C16.java | 0 .../compiler/jtt/optimize/BC_lshr_C24.java | 0 .../compiler/jtt/optimize/BC_lshr_C32.java | 0 .../compiler/jtt/optimize/BlockSkip01.java | 0 .../compiler/jtt/optimize/BoxingIdentity.java | 0 .../graalvm/compiler/jtt/optimize/Cmov01.java | 0 .../graalvm/compiler/jtt/optimize/Cmov02.java | 0 .../compiler/jtt/optimize/Conditional01.java | 0 .../optimize/ConditionalElimination01.java | 0 .../optimize/ConditionalElimination02.java | 0 .../compiler/jtt/optimize/ConvertCompare.java | 0 .../compiler/jtt/optimize/DeadCode01.java | 0 .../compiler/jtt/optimize/DeadCode02.java | 0 .../compiler/jtt/optimize/Fold_Cast01.java | 0 .../compiler/jtt/optimize/Fold_Convert01.java | 0 .../compiler/jtt/optimize/Fold_Convert02.java | 0 .../compiler/jtt/optimize/Fold_Convert03.java | 0 .../compiler/jtt/optimize/Fold_Convert04.java | 0 .../compiler/jtt/optimize/Fold_Double01.java | 0 .../compiler/jtt/optimize/Fold_Double02.java | 0 .../compiler/jtt/optimize/Fold_Double03.java | 0 .../compiler/jtt/optimize/Fold_Float01.java | 0 .../compiler/jtt/optimize/Fold_Float02.java | 0 .../jtt/optimize/Fold_InstanceOf01.java | 0 .../compiler/jtt/optimize/Fold_Int01.java | 0 .../compiler/jtt/optimize/Fold_Int02.java | 0 .../compiler/jtt/optimize/Fold_Long01.java | 0 .../compiler/jtt/optimize/Fold_Long02.java | 0 .../compiler/jtt/optimize/Fold_Math01.java | 0 .../compiler/jtt/optimize/InferStamp01.java | 0 .../compiler/jtt/optimize/Inline01.java | 0 .../compiler/jtt/optimize/Inline02.java | 0 .../graalvm/compiler/jtt/optimize/LLE_01.java | 0 .../jtt/optimize/List_reorder_bug.java | 0 .../graalvm/compiler/jtt/optimize/Logic0.java | 0 .../jtt/optimize/LongToSomethingArray01.java | 0 .../graalvm/compiler/jtt/optimize/NCE_01.java | 0 .../graalvm/compiler/jtt/optimize/NCE_02.java | 0 .../graalvm/compiler/jtt/optimize/NCE_03.java | 0 .../graalvm/compiler/jtt/optimize/NCE_04.java | 0 .../jtt/optimize/NCE_FlowSensitive01.java | 0 .../jtt/optimize/NCE_FlowSensitive02.java | 0 .../jtt/optimize/NCE_FlowSensitive03.java | 0 .../jtt/optimize/NCE_FlowSensitive04.java | 0 .../jtt/optimize/NCE_FlowSensitive05.java | 0 .../compiler/jtt/optimize/Narrow_byte01.java | 0 .../compiler/jtt/optimize/Narrow_byte02.java | 0 .../compiler/jtt/optimize/Narrow_byte03.java | 0 .../compiler/jtt/optimize/Narrow_char01.java | 0 .../compiler/jtt/optimize/Narrow_char02.java | 0 .../compiler/jtt/optimize/Narrow_char03.java | 0 .../compiler/jtt/optimize/Narrow_short01.java | 0 .../compiler/jtt/optimize/Narrow_short02.java | 0 .../compiler/jtt/optimize/Narrow_short03.java | 0 .../compiler/jtt/optimize/NestedLoop_EA.java | 0 .../graalvm/compiler/jtt/optimize/Phi01.java | 0 .../graalvm/compiler/jtt/optimize/Phi02.java | 0 .../graalvm/compiler/jtt/optimize/Phi03.java | 0 .../jtt/optimize/ReassociateConstants.java | 0 .../jtt/optimize/Reduce_Convert01.java | 0 .../jtt/optimize/Reduce_Double01.java | 0 .../compiler/jtt/optimize/Reduce_Float01.java | 0 .../compiler/jtt/optimize/Reduce_Int01.java | 0 .../compiler/jtt/optimize/Reduce_Int02.java | 0 .../compiler/jtt/optimize/Reduce_Int03.java | 0 .../compiler/jtt/optimize/Reduce_Int04.java | 0 .../jtt/optimize/Reduce_IntShift01.java | 0 .../jtt/optimize/Reduce_IntShift02.java | 0 .../compiler/jtt/optimize/Reduce_Long01.java | 0 .../compiler/jtt/optimize/Reduce_Long02.java | 0 .../compiler/jtt/optimize/Reduce_Long03.java | 0 .../compiler/jtt/optimize/Reduce_Long04.java | 0 .../jtt/optimize/Reduce_LongShift01.java | 0 .../jtt/optimize/Reduce_LongShift02.java | 0 .../jtt/optimize/SchedulingBug_01.java | 0 .../jtt/optimize/SignExtendShort.java | 0 .../compiler/jtt/optimize/Switch01.java | 0 .../compiler/jtt/optimize/Switch02.java | 0 .../compiler/jtt/optimize/TypeCastElem.java | 0 .../compiler/jtt/optimize/UnsafeDeopt.java | 0 .../compiler/jtt/optimize/VN_Cast01.java | 0 .../compiler/jtt/optimize/VN_Cast02.java | 0 .../compiler/jtt/optimize/VN_Convert01.java | 0 .../compiler/jtt/optimize/VN_Convert02.java | 0 .../compiler/jtt/optimize/VN_Double01.java | 0 .../compiler/jtt/optimize/VN_Double02.java | 0 .../compiler/jtt/optimize/VN_Field01.java | 0 .../compiler/jtt/optimize/VN_Field02.java | 0 .../compiler/jtt/optimize/VN_Float01.java | 0 .../compiler/jtt/optimize/VN_Float02.java | 0 .../jtt/optimize/VN_InstanceOf01.java | 0 .../jtt/optimize/VN_InstanceOf02.java | 0 .../jtt/optimize/VN_InstanceOf03.java | 0 .../compiler/jtt/optimize/VN_Int01.java | 0 .../compiler/jtt/optimize/VN_Int02.java | 0 .../compiler/jtt/optimize/VN_Int03.java | 0 .../compiler/jtt/optimize/VN_Long01.java | 0 .../compiler/jtt/optimize/VN_Long02.java | 0 .../compiler/jtt/optimize/VN_Long03.java | 0 .../compiler/jtt/optimize/VN_Loop01.java | 0 .../compiler/jtt/reflect/Array_get01.java | 0 .../compiler/jtt/reflect/Array_get02.java | 0 .../compiler/jtt/reflect/Array_get03.java | 0 .../jtt/reflect/Array_getBoolean01.java | 0 .../compiler/jtt/reflect/Array_getByte01.java | 0 .../compiler/jtt/reflect/Array_getChar01.java | 0 .../jtt/reflect/Array_getDouble01.java | 0 .../jtt/reflect/Array_getFloat01.java | 0 .../compiler/jtt/reflect/Array_getInt01.java | 0 .../jtt/reflect/Array_getLength01.java | 0 .../compiler/jtt/reflect/Array_getLong01.java | 0 .../jtt/reflect/Array_getShort01.java | 0 .../jtt/reflect/Array_newInstance01.java | 0 .../jtt/reflect/Array_newInstance02.java | 0 .../jtt/reflect/Array_newInstance03.java | 0 .../jtt/reflect/Array_newInstance04.java | 0 .../jtt/reflect/Array_newInstance05.java | 0 .../jtt/reflect/Array_newInstance06.java | 0 .../compiler/jtt/reflect/Array_set01.java | 0 .../compiler/jtt/reflect/Array_set02.java | 0 .../compiler/jtt/reflect/Array_set03.java | 0 .../jtt/reflect/Array_setBoolean01.java | 0 .../compiler/jtt/reflect/Array_setByte01.java | 0 .../compiler/jtt/reflect/Array_setChar01.java | 0 .../jtt/reflect/Array_setDouble01.java | 0 .../jtt/reflect/Array_setFloat01.java | 0 .../compiler/jtt/reflect/Array_setInt01.java | 0 .../compiler/jtt/reflect/Array_setLong01.java | 0 .../jtt/reflect/Array_setShort01.java | 0 .../jtt/reflect/Class_getDeclaredField01.java | 0 .../reflect/Class_getDeclaredMethod01.java | 0 .../jtt/reflect/Class_getField01.java | 0 .../jtt/reflect/Class_getField02.java | 0 .../jtt/reflect/Class_getMethod01.java | 0 .../jtt/reflect/Class_getMethod02.java | 0 .../jtt/reflect/Class_newInstance01.java | 0 .../jtt/reflect/Class_newInstance02.java | 0 .../jtt/reflect/Class_newInstance03.java | 0 .../jtt/reflect/Class_newInstance06.java | 0 .../jtt/reflect/Class_newInstance07.java | 0 .../compiler/jtt/reflect/Field_get01.java | 0 .../compiler/jtt/reflect/Field_get02.java | 0 .../compiler/jtt/reflect/Field_get03.java | 0 .../compiler/jtt/reflect/Field_get04.java | 0 .../compiler/jtt/reflect/Field_getType01.java | 0 .../compiler/jtt/reflect/Field_set01.java | 0 .../compiler/jtt/reflect/Field_set02.java | 0 .../compiler/jtt/reflect/Field_set03.java | 0 .../compiler/jtt/reflect/Invoke_except01.java | 0 .../compiler/jtt/reflect/Invoke_main01.java | 0 .../compiler/jtt/reflect/Invoke_main02.java | 0 .../compiler/jtt/reflect/Invoke_main03.java | 0 .../jtt/reflect/Invoke_virtual01.java | 0 .../reflect/Method_getParameterTypes01.java | 0 .../jtt/reflect/Method_getReturnType01.java | 0 .../jtt/threads/Monitor_contended01.java | 0 .../jtt/threads/Monitor_notowner01.java | 0 .../compiler/jtt/threads/Monitorenter01.java | 0 .../compiler/jtt/threads/Monitorenter02.java | 0 .../compiler/jtt/threads/Object_wait01.java | 0 .../compiler/jtt/threads/Object_wait02.java | 0 .../compiler/jtt/threads/Object_wait03.java | 0 .../compiler/jtt/threads/Object_wait04.java | 0 .../jtt/threads/SynchronizedLoopExit01.java | 0 .../compiler/jtt/threads/ThreadLocal01.java | 0 .../compiler/jtt/threads/ThreadLocal02.java | 0 .../compiler/jtt/threads/ThreadLocal03.java | 0 .../jtt/threads/Thread_currentThread01.java | 0 .../jtt/threads/Thread_getState01.java | 0 .../jtt/threads/Thread_getState02.java | 0 .../jtt/threads/Thread_holdsLock01.java | 0 .../jtt/threads/Thread_isAlive01.java | 0 .../jtt/threads/Thread_isInterrupted01.java | 0 .../jtt/threads/Thread_isInterrupted02.java | 0 .../jtt/threads/Thread_isInterrupted03.java | 0 .../jtt/threads/Thread_isInterrupted04.java | 0 .../jtt/threads/Thread_isInterrupted05.java | 0 .../compiler/jtt/threads/Thread_join01.java | 0 .../compiler/jtt/threads/Thread_join02.java | 0 .../compiler/jtt/threads/Thread_join03.java | 0 .../compiler/jtt/threads/Thread_new01.java | 0 .../compiler/jtt/threads/Thread_new02.java | 0 .../jtt/threads/Thread_setPriority01.java | 0 .../compiler/jtt/threads/Thread_sleep01.java | 0 .../compiler/jtt/threads/Thread_yield01.java | 0 .../lir/aarch64/AArch64AddressValue.java | 0 .../AArch64ArithmeticLIRGeneratorTool.java | 0 .../lir/aarch64/AArch64ArithmeticOp.java | 0 .../lir/aarch64/AArch64BitManipulationOp.java | 0 .../lir/aarch64/AArch64BlockEndOp.java | 0 .../lir/aarch64/AArch64BreakpointOp.java | 0 .../compiler/lir/aarch64/AArch64Call.java | 0 .../compiler/lir/aarch64/AArch64Compare.java | 0 .../lir/aarch64/AArch64ControlFlow.java | 0 .../compiler/lir/aarch64/AArch64FrameMap.java | 0 .../lir/aarch64/AArch64FrameMapBuilder.java | 0 .../lir/aarch64/AArch64LIRInstruction.java | 0 .../compiler/lir/aarch64/AArch64Move.java | 0 .../compiler/lir/aarch64/AArch64PauseOp.java | 0 .../lir/aarch64/AArch64PrefetchOp.java | 0 .../lir/aarch64/AArch64ReinterpretOp.java | 0 .../lir/aarch64/AArch64SignExtendOp.java | 0 .../compiler/lir/amd64/AMD64AddressValue.java | 0 .../compiler/lir/amd64/AMD64Arithmetic.java | 0 .../AMD64ArithmeticLIRGeneratorTool.java | 0 .../lir/amd64/AMD64ArrayEqualsOp.java | 0 .../compiler/lir/amd64/AMD64Binary.java | 0 .../lir/amd64/AMD64BinaryConsumer.java | 0 .../compiler/lir/amd64/AMD64BlockEndOp.java | 0 .../compiler/lir/amd64/AMD64BreakpointOp.java | 0 .../compiler/lir/amd64/AMD64ByteSwapOp.java | 0 .../compiler/lir/amd64/AMD64CCall.java | 0 .../graalvm/compiler/lir/amd64/AMD64Call.java | 0 .../lir/amd64/AMD64ClearRegisterOp.java | 0 .../compiler/lir/amd64/AMD64ControlFlow.java | 0 .../compiler/lir/amd64/AMD64FrameMap.java | 0 .../lir/amd64/AMD64FrameMapBuilder.java | 0 .../lir/amd64/AMD64LIRInstruction.java | 0 .../lir/amd64/AMD64MathIntrinsicBinaryOp.java | 0 .../lir/amd64/AMD64MathIntrinsicUnaryOp.java | 0 .../graalvm/compiler/lir/amd64/AMD64Move.java | 0 .../compiler/lir/amd64/AMD64MulDivOp.java | 0 .../compiler/lir/amd64/AMD64PauseOp.java | 0 .../compiler/lir/amd64/AMD64PrefetchOp.java | 0 .../lir/amd64/AMD64ReadTimestampCounter.java | 0 .../lir/amd64/AMD64RestoreRegistersOp.java | 0 .../lir/amd64/AMD64SaveRegistersOp.java | 0 .../compiler/lir/amd64/AMD64ShiftOp.java | 0 .../compiler/lir/amd64/AMD64SignExtendOp.java | 0 .../compiler/lir/amd64/AMD64Unary.java | 0 .../compiler/lir/amd64/AMD64VZeroUpper.java | 0 .../lir/amd64/AMD64ZapRegistersOp.java | 0 .../compiler/lir/amd64/AMD64ZapStackOp.java | 0 .../phases/StackMoveOptimizationPhase.java | 0 .../lir/jtt/ConstantStackCastTest.java | 0 .../org/graalvm/compiler/lir/jtt/LIRTest.java | 0 .../lir/jtt/LIRTestSpecification.java | 0 .../graalvm/compiler/lir/jtt/LIRTestTest.java | 0 .../lir/jtt/SPARCBranchBailoutTest.java | 0 .../compiler/lir/jtt/StackMoveTest.java | 0 .../compiler/lir/sparc/SPARCAddressValue.java | 0 .../compiler/lir/sparc/SPARCArithmetic.java | 0 .../lir/sparc/SPARCArrayEqualsOp.java | 0 .../lir/sparc/SPARCBitManipulationOp.java | 0 .../compiler/lir/sparc/SPARCBlockEndOp.java | 0 .../compiler/lir/sparc/SPARCBreakpointOp.java | 0 .../compiler/lir/sparc/SPARCByteSwapOp.java | 0 .../graalvm/compiler/lir/sparc/SPARCCall.java | 0 .../compiler/lir/sparc/SPARCControlFlow.java | 0 .../sparc/SPARCDelayedControlTransfer.java | 0 .../lir/sparc/SPARCFloatCompareOp.java | 0 .../compiler/lir/sparc/SPARCFrameMap.java | 0 .../lir/sparc/SPARCFrameMapBuilder.java | 0 .../lir/sparc/SPARCImmediateAddressValue.java | 0 .../lir/sparc/SPARCIndexedAddressValue.java | 0 .../compiler/lir/sparc/SPARCJumpOp.java | 0 .../lir/sparc/SPARCLIRInstruction.java | 0 .../lir/sparc/SPARCLIRInstructionMixin.java | 0 .../sparc/SPARCLoadConstantTableBaseOp.java | 0 .../graalvm/compiler/lir/sparc/SPARCMove.java | 0 .../compiler/lir/sparc/SPARCOP3Op.java | 0 .../compiler/lir/sparc/SPARCOPFOp.java | 0 .../compiler/lir/sparc/SPARCPauseOp.java | 0 .../compiler/lir/sparc/SPARCPrefetchOp.java | 0 .../lir/sparc/SPARCSaveRegistersOp.java | 0 .../sparc/SPARCTailDelayedLIRInstruction.java | 0 .../test/CompositeValueReplacementTest1.java | 0 .../lir/test/GenericValueMapTest.java | 0 .../TraceGlobalMoveResolutionMappingTest.java | 0 .../BailoutAndRestartBackendException.java | 0 .../graalvm/compiler/lir/CompositeValue.java | 0 .../compiler/lir/CompositeValueClass.java | 0 .../graalvm/compiler/lir/ConstantValue.java | 0 .../compiler/lir/ControlFlowOptimizer.java | 0 .../compiler/lir/EdgeMoveOptimizer.java | 0 .../graalvm/compiler/lir/FullInfopointOp.java | 0 .../lir/InstructionStateProcedure.java | 0 .../lir/InstructionValueConsumer.java | 0 .../lir/InstructionValueProcedure.java | 0 .../src/org/graalvm/compiler/lir/LIR.java | 0 .../graalvm/compiler/lir/LIRFrameState.java | 0 .../compiler/lir/LIRInsertionBuffer.java | 0 .../graalvm/compiler/lir/LIRInstruction.java | 0 .../compiler/lir/LIRInstructionClass.java | 0 .../compiler/lir/LIRIntrospection.java | 0 .../graalvm/compiler/lir/LIRValueUtil.java | 0 .../org/graalvm/compiler/lir/LIRVerifier.java | 0 .../org/graalvm/compiler/lir/LabelRef.java | 0 .../compiler/lir/NullCheckOptimizer.java | 0 .../src/org/graalvm/compiler/lir/Opcode.java | 0 .../lir/RedundantMoveElimination.java | 0 .../org/graalvm/compiler/lir/StandardOp.java | 0 .../graalvm/compiler/lir/StateProcedure.java | 0 .../graalvm/compiler/lir/SwitchStrategy.java | 0 .../graalvm/compiler/lir/ValueConsumer.java | 0 .../graalvm/compiler/lir/ValueProcedure.java | 0 .../org/graalvm/compiler/lir/Variable.java | 0 .../compiler/lir/VirtualStackSlot.java | 0 .../lir/alloc/AllocationStageVerifier.java | 0 .../lir/alloc/OutOfRegistersException.java | 0 .../lir/alloc/SaveCalleeSaveRegisters.java | 0 .../compiler/lir/alloc/lsra/Interval.java | 0 .../lir/alloc/lsra/IntervalWalker.java | 0 .../compiler/lir/alloc/lsra/LinearScan.java | 0 .../lsra/LinearScanAssignLocationsPhase.java | 0 .../LinearScanEliminateSpillMovePhase.java | 0 .../alloc/lsra/LinearScanIntervalDumper.java | 0 .../lsra/LinearScanLifetimeAnalysisPhase.java | 0 .../LinearScanOptimizeSpillPositionPhase.java | 0 .../lir/alloc/lsra/LinearScanPhase.java | 0 .../LinearScanRegisterAllocationPhase.java | 0 .../lsra/LinearScanResolveDataFlowPhase.java | 0 .../lir/alloc/lsra/LinearScanWalker.java | 0 .../compiler/lir/alloc/lsra/MoveResolver.java | 0 .../lsra/OptimizingLinearScanWalker.java | 0 .../compiler/lir/alloc/lsra/Range.java | 0 .../lir/alloc/lsra/RegisterVerifier.java | 0 .../lir/alloc/lsra/ssa/SSALinearScan.java | 0 .../SSALinearScanEliminateSpillMovePhase.java | 0 .../SSALinearScanLifetimeAnalysisPhase.java | 0 .../SSALinearScanResolveDataFlowPhase.java | 0 .../lir/alloc/lsra/ssa/SSAMoveResolver.java | 0 .../DefaultTraceRegisterAllocationPolicy.java | 0 .../alloc/trace/ShadowedRegisterValue.java | 0 .../lir/alloc/trace/TraceAllocationPhase.java | 0 .../lir/alloc/trace/TraceBuilderPhase.java | 0 .../trace/TraceGlobalMoveResolutionPhase.java | 0 .../alloc/trace/TraceGlobalMoveResolver.java | 0 .../trace/TraceRegisterAllocationPhase.java | 0 .../trace/TraceRegisterAllocationPolicy.java | 0 .../compiler/lir/alloc/trace/TraceUtil.java | 0 .../alloc/trace/TrivialTraceAllocator.java | 0 .../lir/alloc/trace/bu/BottomUpAllocator.java | 0 .../lir/alloc/trace/lsra/FixedInterval.java | 0 .../lir/alloc/trace/lsra/FixedRange.java | 0 .../lir/alloc/trace/lsra/IntervalHint.java | 0 .../alloc/trace/lsra/RegisterVerifier.java | 0 .../lir/alloc/trace/lsra/TraceInterval.java | 0 .../alloc/trace/lsra/TraceIntervalWalker.java | 0 .../lsra/TraceLinearScanAllocationPhase.java | 0 .../TraceLinearScanAssignLocationsPhase.java | 0 ...raceLinearScanEliminateSpillMovePhase.java | 0 .../TraceLinearScanLifetimeAnalysisPhase.java | 0 .../trace/lsra/TraceLinearScanPhase.java | 0 ...raceLinearScanRegisterAllocationPhase.java | 0 .../TraceLinearScanResolveDataFlowPhase.java | 0 .../trace/lsra/TraceLinearScanWalker.java | 0 .../trace/lsra/TraceLocalMoveResolver.java | 0 .../lir/asm/ArrayDataPointerConstant.java | 0 .../lir/asm/CompilationResultBuilder.java | 0 .../asm/CompilationResultBuilderFactory.java | 0 .../graalvm/compiler/lir/asm/DataBuilder.java | 0 .../compiler/lir/asm/FrameContext.java | 0 .../constopt/ConstantLoadOptimization.java | 0 .../compiler/lir/constopt/ConstantTree.java | 0 .../lir/constopt/ConstantTreeAnalyzer.java | 0 .../compiler/lir/constopt/DefUseTree.java | 0 .../compiler/lir/constopt/UseEntry.java | 0 .../compiler/lir/constopt/VariableMap.java | 0 .../compiler/lir/debug/IntervalDumper.java | 0 .../lir/debug/LIRGenerationDebugContext.java | 0 .../compiler/lir/dfa/LocationMarker.java | 0 .../compiler/lir/dfa/LocationMarkerPhase.java | 0 .../lir/dfa/MarkBasePointersPhase.java | 0 .../compiler/lir/dfa/RegStackValueSet.java | 0 .../compiler/lir/dfa/UniqueWorkList.java | 0 .../compiler/lir/framemap/FrameMap.java | 0 .../lir/framemap/FrameMapBuilder.java | 0 .../lir/framemap/FrameMapBuilderImpl.java | 0 .../lir/framemap/FrameMapBuilderTool.java | 0 .../lir/framemap/ReferenceMapBuilder.java | 0 .../lir/framemap/SimpleVirtualStackSlot.java | 0 .../lir/framemap/VirtualStackSlotRange.java | 0 .../lir/gen/ArithmeticLIRGenerator.java | 0 .../lir/gen/ArithmeticLIRGeneratorTool.java | 0 .../compiler/lir/gen/BlockValueMap.java | 0 .../lir/gen/DiagnosticLIRGeneratorTool.java | 0 .../compiler/lir/gen/LIRGenerationResult.java | 0 .../compiler/lir/gen/LIRGenerator.java | 0 .../compiler/lir/gen/LIRGeneratorTool.java | 0 .../graalvm/compiler/lir/gen/PhiResolver.java | 0 .../lir/gen/VerifyingMoveFactory.java | 0 .../compiler/lir/phases/AllocationPhase.java | 0 .../compiler/lir/phases/AllocationStage.java | 0 .../lir/phases/EconomyAllocationStage.java | 0 ...conomyPostAllocationOptimizationStage.java | 0 ...EconomyPreAllocationOptimizationStage.java | 0 .../compiler/lir/phases/GenericContext.java | 0 .../graalvm/compiler/lir/phases/LIRPhase.java | 0 .../compiler/lir/phases/LIRPhaseSuite.java | 0 .../compiler/lir/phases/LIRSuites.java | 0 .../PostAllocationOptimizationPhase.java | 0 .../PostAllocationOptimizationStage.java | 0 .../PreAllocationOptimizationPhase.java | 0 .../PreAllocationOptimizationStage.java | 0 .../lir/profiling/MethodProfilingPhase.java | 0 .../compiler/lir/profiling/MoveProfiler.java | 0 .../lir/profiling/MoveProfilingPhase.java | 0 .../compiler/lir/profiling/MoveType.java | 0 .../org/graalvm/compiler/lir/ssa/SSAUtil.java | 0 .../graalvm/compiler/lir/ssa/SSAVerifier.java | 0 .../compiler/lir/ssi/FastSSIBuilder.java | 0 .../graalvm/compiler/lir/ssi/SSIBuilder.java | 0 .../compiler/lir/ssi/SSIBuilderBase.java | 0 .../lir/ssi/SSIConstructionPhase.java | 0 .../org/graalvm/compiler/lir/ssi/SSIUtil.java | 0 .../graalvm/compiler/lir/ssi/SSIVerifier.java | 0 .../FixPointIntervalBuilder.java | 0 .../stackslotalloc/LSStackSlotAllocator.java | 0 .../SimpleStackSlotAllocator.java | 0 .../lir/stackslotalloc/StackInterval.java | 0 .../stackslotalloc/StackIntervalDumper.java | 0 .../StackSlotAllocatorUtil.java | 0 .../compiler/lir/util/GenericValueMap.java | 0 .../compiler/lir/util/IndexedValueMap.java | 0 .../compiler/lir/util/RegisterMap.java | 0 .../graalvm/compiler/lir/util/ValueMap.java | 0 .../graalvm/compiler/lir/util/ValueSet.java | 0 .../util/VariableVirtualStackValueMap.java | 0 .../loop/phases/ContextlessLoopPhase.java | 0 .../loop/phases/LoopFullUnrollPhase.java | 0 .../loop/phases/LoopPeelingPhase.java | 0 .../compiler/loop/phases/LoopPhase.java | 0 .../phases/LoopSafepointEliminationPhase.java | 0 .../loop/phases/LoopTransformations.java | 0 .../loop/phases/LoopUnswitchingPhase.java | 0 .../phases/ReassociateInvariantPhase.java | 0 .../compiler/loop/BasicInductionVariable.java | 0 .../compiler/loop/CountedLoopInfo.java | 0 .../compiler/loop/DefaultLoopPolicies.java | 0 .../DerivedConvertedInductionVariable.java | 0 .../loop/DerivedInductionVariable.java | 0 .../loop/DerivedOffsetInductionVariable.java | 0 .../loop/DerivedScaledInductionVariable.java | 0 .../compiler/loop/InductionVariable.java | 0 .../src/org/graalvm/compiler/loop/LoopEx.java | 0 .../graalvm/compiler/loop/LoopFragment.java | 0 .../compiler/loop/LoopFragmentInside.java | 0 .../loop/LoopFragmentInsideBefore.java | 0 .../compiler/loop/LoopFragmentInsideFrom.java | 0 .../compiler/loop/LoopFragmentWhole.java | 0 .../graalvm/compiler/loop/LoopPolicies.java | 0 .../org/graalvm/compiler/loop/LoopsData.java | 0 .../org/graalvm/compiler/loop/MathUtil.java | 0 .../benchmarks/ArrayDuplicationBenchmark.java | 0 .../benchmarks/GuardedIntrinsicBenchmark.java | 0 .../benchmarks/MathFunctionBenchmark.java | 0 .../micro/benchmarks/SimpleSyncBenchmark.java | 0 .../src/micro/benchmarks/package-info.java | 0 .../ConditionalEliminationBenchmark.java | 0 .../FrameStateAssigmentPhaseBenchmark.java | 0 .../microbenchmarks/graal/GraalBenchmark.java | 0 .../graal/GraphCopyBenchmark.java | 0 .../microbenchmarks/graal/NodeBenchmark.java | 0 .../graal/SchedulePhaseBenchmark.java | 0 .../microbenchmarks/graal/TestJMH.java | 0 .../graal/util/FrameStateAssignmentState.java | 0 .../graal/util/GraalState.java | 0 .../microbenchmarks/graal/util/GraalUtil.java | 0 .../graal/util/GraphState.java | 0 .../graal/util/MethodSpec.java | 0 .../graal/util/NodesState.java | 0 .../graal/util/ScheduleState.java | 0 .../lir/CompileTimeBenchmark.java | 0 .../lir/GraalCompilerState.java | 0 .../lir/RegisterAllocationTimeBenchmark.java | 0 .../lir/trace/ControlFlowGraphState.java | 0 .../lir/trace/TraceBuilderBenchmark.java | 0 .../trace/TraceLSRAIntervalBuildingBench.java | 0 .../javax.annotation.processing.Processor | 0 .../nodeinfo/processor/ElementException.java | 0 .../processor/GraphNodeProcessor.java | 0 .../nodeinfo/processor/GraphNodeVerifier.java | 0 .../graalvm/compiler/nodeinfo/InputType.java | 0 .../graalvm/compiler/nodeinfo/NodeCycles.java | 0 .../graalvm/compiler/nodeinfo/NodeInfo.java | 0 .../graalvm/compiler/nodeinfo/NodeSize.java | 0 .../compiler/nodeinfo/StructuralInput.java | 0 .../graalvm/compiler/nodeinfo/Verbosity.java | 0 .../nodes/test/AbstractObjectStampTest.java | 0 .../test/IfNodeCanonicalizationTest.java | 0 .../compiler/nodes/test/IntegerStampTest.java | 0 .../compiler/nodes/test/LoopLivenessTest.java | 0 .../nodes/test/LoopPhiCanonicalizerTest.java | 0 .../test/NegateNodeCanonicalizationTest.java | 0 .../nodes/test/ObjectStampJoinTest.java | 0 .../nodes/test/ObjectStampMeetTest.java | 0 .../compiler/nodes/test/ObjectStampTest.java | 0 .../ReinterpretStampDoubleToLongTest.java | 0 .../test/ReinterpretStampFloatToIntTest.java | 0 .../test/ReinterpretStampIntToFloatTest.java | 0 .../ReinterpretStampLongToDoubleTest.java | 0 .../nodes/test/ReinterpretStampTest.java | 0 .../nodes/test/ShortCircuitOrNodeTest.java | 0 .../compiler/nodes/AbstractBeginNode.java | 0 .../nodes/AbstractDeoptimizeNode.java | 0 .../compiler/nodes/AbstractEndNode.java | 0 .../nodes/AbstractFixedGuardNode.java | 0 .../compiler/nodes/AbstractLocalNode.java | 0 .../compiler/nodes/AbstractMergeNode.java | 0 .../compiler/nodes/AbstractStateSplit.java | 0 .../compiler/nodes/ArithmeticOperation.java | 0 .../org/graalvm/compiler/nodes/BeginNode.java | 0 .../compiler/nodes/BeginStateSplitNode.java | 0 .../compiler/nodes/BinaryOpLogicNode.java | 0 .../compiler/nodes/BreakpointNode.java | 0 .../compiler/nodes/CallTargetNode.java | 0 .../nodes/CanonicalizableLocation.java | 0 .../compiler/nodes/ConditionAnchorNode.java | 0 .../graalvm/compiler/nodes/ConstantNode.java | 0 .../compiler/nodes/ControlSinkNode.java | 0 .../compiler/nodes/ControlSplitNode.java | 0 .../compiler/nodes/DeoptimizeNode.java | 0 .../nodes/DeoptimizingFixedWithNextNode.java | 0 .../compiler/nodes/DeoptimizingGuard.java | 0 .../compiler/nodes/DeoptimizingNode.java | 0 .../compiler/nodes/DirectCallTargetNode.java | 0 .../compiler/nodes/DynamicDeoptimizeNode.java | 0 .../graalvm/compiler/nodes/DynamicPiNode.java | 0 .../graalvm/compiler/nodes/EncodedGraph.java | 0 .../org/graalvm/compiler/nodes/EndNode.java | 0 .../compiler/nodes/EntryMarkerNode.java | 0 .../compiler/nodes/EntryProxyNode.java | 0 .../compiler/nodes/FieldLocationIdentity.java | 0 .../compiler/nodes/FixedGuardNode.java | 0 .../org/graalvm/compiler/nodes/FixedNode.java | 0 .../compiler/nodes/FixedNodeInterface.java | 0 .../compiler/nodes/FixedWithNextNode.java | 0 .../compiler/nodes/FloatingAnchoredNode.java | 0 .../compiler/nodes/FloatingGuardedNode.java | 0 .../graalvm/compiler/nodes/FrameState.java | 0 .../compiler/nodes/FullInfopointNode.java | 0 .../graalvm/compiler/nodes/GraphDecoder.java | 0 .../graalvm/compiler/nodes/GraphEncoder.java | 0 .../org/graalvm/compiler/nodes/GuardNode.java | 0 .../graalvm/compiler/nodes/GuardPhiNode.java | 0 .../compiler/nodes/GuardProxyNode.java | 0 .../compiler/nodes/GuardedValueNode.java | 0 .../org/graalvm/compiler/nodes/IfNode.java | 0 .../nodes/IndirectCallTargetNode.java | 0 .../org/graalvm/compiler/nodes/Invoke.java | 0 .../graalvm/compiler/nodes/InvokeNode.java | 0 .../nodes/InvokeWithExceptionNode.java | 0 .../compiler/nodes/KillingBeginNode.java | 0 .../compiler/nodes/LogicConstantNode.java | 0 .../compiler/nodes/LogicNegationNode.java | 0 .../org/graalvm/compiler/nodes/LogicNode.java | 0 .../graalvm/compiler/nodes/LoopBeginNode.java | 0 .../graalvm/compiler/nodes/LoopEndNode.java | 0 .../graalvm/compiler/nodes/LoopExitNode.java | 0 .../compiler/nodes/LoweredCallTargetNode.java | 0 .../org/graalvm/compiler/nodes/MergeNode.java | 0 .../compiler/nodes/NamedLocationIdentity.java | 0 .../graalvm/compiler/nodes/ParameterNode.java | 0 .../org/graalvm/compiler/nodes/PauseNode.java | 0 .../org/graalvm/compiler/nodes/PhiNode.java | 0 .../graalvm/compiler/nodes/PiArrayNode.java | 0 .../org/graalvm/compiler/nodes/PiNode.java | 0 .../compiler/nodes/PrefetchAllocateNode.java | 0 .../org/graalvm/compiler/nodes/ProxyNode.java | 0 .../graalvm/compiler/nodes/ReturnNode.java | 0 .../graalvm/compiler/nodes/SafepointNode.java | 0 .../compiler/nodes/ShortCircuitOrNode.java | 0 .../nodes/SimplifyingGraphDecoder.java | 0 .../org/graalvm/compiler/nodes/StartNode.java | 0 .../graalvm/compiler/nodes/StateSplit.java | 0 .../compiler/nodes/StructuredGraph.java | 0 .../compiler/nodes/TypeCheckHints.java | 0 .../compiler/nodes/UnaryOpLogicNode.java | 0 .../graalvm/compiler/nodes/UnwindNode.java | 0 .../org/graalvm/compiler/nodes/ValueNode.java | 0 .../compiler/nodes/ValueNodeInterface.java | 0 .../graalvm/compiler/nodes/ValueNodeUtil.java | 0 .../graalvm/compiler/nodes/ValuePhiNode.java | 0 .../compiler/nodes/ValueProxyNode.java | 0 .../graalvm/compiler/nodes/VirtualState.java | 0 .../graalvm/compiler/nodes/calc/AbsNode.java | 0 .../graalvm/compiler/nodes/calc/AddNode.java | 0 .../graalvm/compiler/nodes/calc/AndNode.java | 0 .../nodes/calc/BinaryArithmeticNode.java | 0 .../compiler/nodes/calc/BinaryNode.java | 0 .../compiler/nodes/calc/CompareNode.java | 0 .../compiler/nodes/calc/ConditionalNode.java | 0 .../compiler/nodes/calc/ConvertNode.java | 0 .../graalvm/compiler/nodes/calc/DivNode.java | 0 .../compiler/nodes/calc/FixedBinaryNode.java | 0 .../compiler/nodes/calc/FloatConvertNode.java | 0 .../compiler/nodes/calc/FloatEqualsNode.java | 0 .../nodes/calc/FloatLessThanNode.java | 0 .../compiler/nodes/calc/FloatingNode.java | 0 .../compiler/nodes/calc/IntegerBelowNode.java | 0 .../nodes/calc/IntegerConvertNode.java | 0 .../nodes/calc/IntegerDivRemNode.java | 0 .../nodes/calc/IntegerEqualsNode.java | 0 .../nodes/calc/IntegerLessThanNode.java | 0 .../compiler/nodes/calc/IntegerTestNode.java | 0 .../compiler/nodes/calc/IsNullNode.java | 0 .../compiler/nodes/calc/LeftShiftNode.java | 0 .../graalvm/compiler/nodes/calc/MulNode.java | 0 .../compiler/nodes/calc/NarrowNode.java | 0 .../nodes/calc/NarrowableArithmeticNode.java | 0 .../compiler/nodes/calc/NegateNode.java | 0 .../nodes/calc/NormalizeCompareNode.java | 0 .../graalvm/compiler/nodes/calc/NotNode.java | 0 .../compiler/nodes/calc/ObjectEqualsNode.java | 0 .../graalvm/compiler/nodes/calc/OrNode.java | 0 .../nodes/calc/PointerEqualsNode.java | 0 .../compiler/nodes/calc/ReinterpretNode.java | 0 .../graalvm/compiler/nodes/calc/RemNode.java | 0 .../compiler/nodes/calc/RightShiftNode.java | 0 .../compiler/nodes/calc/ShiftNode.java | 0 .../compiler/nodes/calc/SignExtendNode.java | 0 .../compiler/nodes/calc/SignedDivNode.java | 0 .../compiler/nodes/calc/SignedRemNode.java | 0 .../graalvm/compiler/nodes/calc/SqrtNode.java | 0 .../graalvm/compiler/nodes/calc/SubNode.java | 0 .../nodes/calc/UnaryArithmeticNode.java | 0 .../compiler/nodes/calc/UnaryNode.java | 0 .../compiler/nodes/calc/UnsignedDivNode.java | 0 .../compiler/nodes/calc/UnsignedRemNode.java | 0 .../nodes/calc/UnsignedRightShiftNode.java | 0 .../graalvm/compiler/nodes/calc/XorNode.java | 0 .../compiler/nodes/calc/ZeroExtendNode.java | 0 .../org/graalvm/compiler/nodes/cfg/Block.java | 0 .../compiler/nodes/cfg/ControlFlowGraph.java | 0 .../graalvm/compiler/nodes/cfg/HIRLoop.java | 0 .../compiler/nodes/cfg/LocationSet.java | 0 .../nodes/debug/BindToRegisterNode.java | 0 .../compiler/nodes/debug/BlackholeNode.java | 0 .../nodes/debug/ControlFlowAnchorNode.java | 0 .../nodes/debug/ControlFlowAnchored.java | 0 .../nodes/debug/DynamicCounterNode.java | 0 .../compiler/nodes/debug/OpaqueNode.java | 0 .../nodes/debug/SpillRegistersNode.java | 0 .../nodes/debug/StringToBytesNode.java | 0 .../compiler/nodes/debug/VerifyHeapNode.java | 0 .../compiler/nodes/debug/WeakCounterNode.java | 0 .../InstrumentationBeginNode.java | 0 .../InstrumentationEndNode.java | 0 .../InstrumentationInliningCallback.java | 0 .../instrumentation/InstrumentationNode.java | 0 .../instrumentation/IsMethodInlinedNode.java | 0 .../instrumentation/MonitorProxyNode.java | 0 .../debug/instrumentation/RootNameNode.java | 0 .../nodes/extended/AnchoringNode.java | 0 .../nodes/extended/ArrayRangeWriteNode.java | 0 .../compiler/nodes/extended/BoxNode.java | 0 .../nodes/extended/BranchProbabilityNode.java | 0 .../nodes/extended/BytecodeExceptionNode.java | 0 .../nodes/extended/FixedValueAnchorNode.java | 0 .../nodes/extended/ForeignCallNode.java | 0 .../compiler/nodes/extended/GetClassNode.java | 0 .../compiler/nodes/extended/GuardedNode.java | 0 .../nodes/extended/GuardedUnsafeLoadNode.java | 0 .../compiler/nodes/extended/GuardingNode.java | 0 .../nodes/extended/IntegerSwitchNode.java | 0 .../compiler/nodes/extended/JavaReadNode.java | 0 .../nodes/extended/JavaWriteNode.java | 0 .../compiler/nodes/extended/LoadHubNode.java | 0 .../nodes/extended/LoadMethodNode.java | 0 .../compiler/nodes/extended/MembarNode.java | 0 .../compiler/nodes/extended/MonitorEnter.java | 0 .../compiler/nodes/extended/MonitorExit.java | 0 .../nodes/extended/NullCheckNode.java | 0 .../compiler/nodes/extended/OSRLocalNode.java | 0 .../compiler/nodes/extended/OSRStartNode.java | 0 .../compiler/nodes/extended/StoreHubNode.java | 0 .../compiler/nodes/extended/SwitchNode.java | 0 .../compiler/nodes/extended/UnboxNode.java | 0 .../nodes/extended/UnsafeAccessNode.java | 0 .../nodes/extended/UnsafeCopyNode.java | 0 .../nodes/extended/UnsafeLoadNode.java | 0 .../nodes/extended/UnsafeMemoryLoadNode.java | 0 .../nodes/extended/UnsafeMemoryStoreNode.java | 0 .../nodes/extended/UnsafeStoreNode.java | 0 .../nodes/extended/ValueAnchorNode.java | 0 .../ClassInitializationPlugin.java | 0 .../graphbuilderconf/ForeignCallPlugin.java | 0 .../GeneratedInvocationPlugin.java | 0 .../GraphBuilderConfiguration.java | 0 .../graphbuilderconf/GraphBuilderContext.java | 0 .../graphbuilderconf/GraphBuilderPlugin.java | 0 .../graphbuilderconf/GraphBuilderTool.java | 0 .../graphbuilderconf/InlineInvokePlugin.java | 0 .../graphbuilderconf/IntrinsicContext.java | 0 .../graphbuilderconf/InvocationPlugin.java | 0 .../graphbuilderconf/InvocationPlugins.java | 0 .../graphbuilderconf/LoopExplosionPlugin.java | 0 .../MethodSubstitutionPlugin.java | 0 .../NodeIntrinsicPluginFactory.java | 0 .../nodes/graphbuilderconf/NodePlugin.java | 0 .../graphbuilderconf/ParameterPlugin.java | 0 .../graphbuilderconf/ProfilingPlugin.java | 0 .../nodes/graphbuilderconf/TypePlugin.java | 0 .../nodes/java/AbstractNewArrayNode.java | 0 .../nodes/java/AbstractNewObjectNode.java | 0 .../compiler/nodes/java/AccessArrayNode.java | 0 .../compiler/nodes/java/AccessFieldNode.java | 0 .../nodes/java/AccessIndexedNode.java | 0 .../nodes/java/AccessMonitorNode.java | 0 .../compiler/nodes/java/ArrayLengthNode.java | 0 .../nodes/java/AtomicReadAndAddNode.java | 0 .../nodes/java/AtomicReadAndWriteNode.java | 0 .../nodes/java/ClassIsAssignableFromNode.java | 0 .../nodes/java/CompareAndSwapNode.java | 0 .../nodes/java/DynamicNewArrayNode.java | 0 .../nodes/java/DynamicNewInstanceNode.java | 0 .../nodes/java/ExceptionObjectNode.java | 0 .../nodes/java/FinalFieldBarrierNode.java | 0 .../nodes/java/ForeignCallDescriptors.java | 0 .../nodes/java/InstanceOfDynamicNode.java | 0 .../compiler/nodes/java/InstanceOfNode.java | 0 .../nodes/java/LoadExceptionObjectNode.java | 0 .../compiler/nodes/java/LoadFieldNode.java | 0 .../compiler/nodes/java/LoadIndexedNode.java | 0 .../java/LoweredAtomicReadAndWriteNode.java | 0 .../nodes/java/LoweredCompareAndSwapNode.java | 0 .../nodes/java/MethodCallTargetNode.java | 0 .../compiler/nodes/java/MonitorEnterNode.java | 0 .../compiler/nodes/java/MonitorExitNode.java | 0 .../compiler/nodes/java/MonitorIdNode.java | 0 .../compiler/nodes/java/NewArrayNode.java | 0 .../compiler/nodes/java/NewInstanceNode.java | 0 .../nodes/java/NewMultiArrayNode.java | 0 .../nodes/java/RawMonitorEnterNode.java | 0 .../nodes/java/RegisterFinalizerNode.java | 0 .../compiler/nodes/java/StoreFieldNode.java | 0 .../compiler/nodes/java/StoreIndexedNode.java | 0 .../compiler/nodes/java/TypeSwitchNode.java | 0 .../memory/AbstractMemoryCheckpoint.java | 0 .../nodes/memory/AbstractWriteNode.java | 0 .../graalvm/compiler/nodes/memory/Access.java | 0 .../nodes/memory/FixedAccessNode.java | 0 .../nodes/memory/FloatableAccessNode.java | 0 .../nodes/memory/FloatingAccessNode.java | 0 .../nodes/memory/FloatingReadNode.java | 0 .../compiler/nodes/memory/HeapAccess.java | 0 .../compiler/nodes/memory/MemoryAccess.java | 0 .../nodes/memory/MemoryAnchorNode.java | 0 .../nodes/memory/MemoryCheckpoint.java | 0 .../compiler/nodes/memory/MemoryMap.java | 0 .../compiler/nodes/memory/MemoryMapNode.java | 0 .../compiler/nodes/memory/MemoryNode.java | 0 .../compiler/nodes/memory/MemoryPhiNode.java | 0 .../compiler/nodes/memory/ReadNode.java | 0 .../compiler/nodes/memory/WriteNode.java | 0 .../nodes/memory/address/AddressNode.java | 0 .../memory/address/OffsetAddressNode.java | 0 .../nodes/memory/address/RawAddressNode.java | 0 .../nodes/spi/ArithmeticLIRLowerable.java | 0 .../nodes/spi/ArrayLengthProvider.java | 0 .../nodes/spi/DefaultNodeCostProvider.java | 0 .../compiler/nodes/spi/LIRLowerable.java | 0 .../compiler/nodes/spi/LimitedValueProxy.java | 0 .../graalvm/compiler/nodes/spi/Lowerable.java | 0 .../compiler/nodes/spi/LoweringProvider.java | 0 .../compiler/nodes/spi/LoweringTool.java | 0 .../compiler/nodes/spi/MemoryProxy.java | 0 .../compiler/nodes/spi/NodeCostProvider.java | 0 .../nodes/spi/NodeLIRBuilderTool.java | 0 .../compiler/nodes/spi/NodeValueMap.java | 0 .../compiler/nodes/spi/NodeWithState.java | 0 .../compiler/nodes/spi/PiPushable.java | 0 .../org/graalvm/compiler/nodes/spi/Proxy.java | 0 .../compiler/nodes/spi/Replacements.java | 0 .../compiler/nodes/spi/StampProvider.java | 0 .../nodes/spi/UncheckedInterfaceProvider.java | 0 .../compiler/nodes/spi/ValueProxy.java | 0 .../compiler/nodes/spi/Virtualizable.java | 0 .../nodes/spi/VirtualizableAllocation.java | 0 .../compiler/nodes/spi/VirtualizerTool.java | 0 .../compiler/nodes/type/StampTool.java | 0 .../compiler/nodes/util/ConstantFoldUtil.java | 0 .../compiler/nodes/util/GraphUtil.java | 0 .../nodes/virtual/AllocatedObjectNode.java | 0 .../nodes/virtual/CommitAllocationNode.java | 0 .../nodes/virtual/EnsureVirtualizedNode.java | 0 .../nodes/virtual/EscapeObjectState.java | 0 .../compiler/nodes/virtual/LockState.java | 0 .../nodes/virtual/VirtualArrayNode.java | 0 .../nodes/virtual/VirtualBoxingNode.java | 0 .../nodes/virtual/VirtualInstanceNode.java | 0 .../nodes/virtual/VirtualObjectNode.java | 0 .../javax.annotation.processing.Processor | 0 .../options/processor/OptionProcessor.java | 0 .../test/NestedBooleanOptionValueTest.java | 0 .../options/test/TestOptionValue.java | 0 .../compiler/options/DerivedOptionValue.java | 0 .../compiler/options/EnumOptionValue.java | 0 .../options/NestedBooleanOptionValue.java | 0 .../org/graalvm/compiler/options/Option.java | 0 .../compiler/options/OptionDescriptor.java | 0 .../compiler/options/OptionDescriptors.java | 0 .../graalvm/compiler/options/OptionType.java | 0 .../graalvm/compiler/options/OptionValue.java | 0 .../compiler/options/OptionsParser.java | 0 .../compiler/options/StableOptionValue.java | 0 .../compiler/options/UniquePathUtilities.java | 0 .../phases/common/test/StampFactoryTest.java | 0 .../phases/common/AbstractInliningPhase.java | 0 .../phases/common/AddressLoweringPhase.java | 0 .../phases/common/CanonicalizerPhase.java | 0 .../common/ConvertDeoptimizeToGuardPhase.java | 0 .../common/DeadCodeEliminationPhase.java | 0 .../common/DeoptimizationGroupingPhase.java | 0 .../DominatorConditionalEliminationPhase.java | 0 .../phases/common/ExpandLogicPhase.java | 0 .../phases/common/FloatingReadPhase.java | 0 .../common/FrameStateAssignmentPhase.java | 0 .../phases/common/GuardLoweringPhase.java | 0 .../common/IncrementalCanonicalizerPhase.java | 0 .../IterativeConditionalEliminationPhase.java | 0 .../compiler/phases/common/LazyValue.java | 0 .../phases/common/LockEliminationPhase.java | 0 .../common/LoopSafepointInsertionPhase.java | 0 .../compiler/phases/common/LoweringPhase.java | 0 .../phases/common/NonNullParametersPhase.java | 0 .../common/OptimizeGuardAnchorsPhase.java | 0 .../common/ProfileCompiledMethodsPhase.java | 0 .../phases/common/PushThroughPiPhase.java | 0 .../phases/common/RemoveValueProxyPhase.java | 0 .../common/UseTrappingNullChecksPhase.java | 0 .../common/ValueAnchorCleanupPhase.java | 0 .../common/VerifyHeapAtReturnPhase.java | 0 .../phases/common/inlining/InliningPhase.java | 0 .../phases/common/inlining/InliningUtil.java | 0 .../inlining/info/AbstractInlineInfo.java | 0 .../inlining/info/AssumptionInlineInfo.java | 0 .../common/inlining/info/ExactInlineInfo.java | 0 .../common/inlining/info/InlineInfo.java | 0 .../info/MultiTypeGuardInlineInfo.java | 0 .../inlining/info/TypeGuardInlineInfo.java | 0 .../common/inlining/info/elem/Inlineable.java | 0 .../inlining/info/elem/InlineableGraph.java | 0 .../policy/AbstractInliningPolicy.java | 0 .../inlining/policy/GreedyInliningPolicy.java | 0 .../policy/InlineEverythingPolicy.java | 0 .../InlineMethodSubstitutionsPolicy.java | 0 .../inlining/policy/InliningPolicy.java | 0 .../inlining/walker/CallsiteHolder.java | 0 .../walker/CallsiteHolderExplorable.java | 0 .../walker/ComputeInliningRelevance.java | 0 .../common/inlining/walker/InliningData.java | 0 .../inlining/walker/InliningIterator.java | 0 .../inlining/walker/MethodInvocation.java | 0 .../ExtractInstrumentationPhase.java | 0 ...HighTierReconcileInstrumentationPhase.java | 0 .../InlineInstrumentationPhase.java | 0 .../MidTierReconcileInstrumentationPhase.java | 0 .../common/util/HashSetNodeEventListener.java | 0 .../graalvm/compiler/phases/BasePhase.java | 0 .../org/graalvm/compiler/phases/LazyName.java | 0 .../phases/OptimisticOptimizations.java | 0 .../org/graalvm/compiler/phases/Phase.java | 0 .../graalvm/compiler/phases/PhaseSuite.java | 0 .../graalvm/compiler/phases/VerifyPhase.java | 0 .../phases/contract/NodeCostUtil.java | 0 .../phases/contract/PhaseSizeContract.java | 0 .../graph/FixedNodeProbabilityCache.java | 0 .../compiler/phases/graph/InferStamps.java | 0 .../compiler/phases/graph/MergeableState.java | 0 .../phases/graph/PostOrderNodeIterator.java | 0 .../phases/graph/ReentrantBlockIterator.java | 0 .../phases/graph/ReentrantNodeIterator.java | 0 .../phases/graph/ScheduledNodeIterator.java | 0 .../graph/ScopedPostOrderNodeIterator.java | 0 .../phases/graph/SinglePassNodeIterator.java | 0 .../graph/StatelessPostOrderNodeIterator.java | 0 .../compiler/phases/graph/package-info.java | 0 .../graalvm/compiler/phases/package-info.java | 0 .../phases/schedule/BlockClosure.java | 0 .../schedule/MemoryScheduleVerification.java | 0 .../phases/schedule/SchedulePhase.java | 0 .../phases/tiers/CompilerConfiguration.java | 0 .../phases/tiers/HighTierContext.java | 0 .../compiler/phases/tiers/LowTierContext.java | 0 .../compiler/phases/tiers/MidTierContext.java | 0 .../compiler/phases/tiers/PhaseContext.java | 0 .../graalvm/compiler/phases/tiers/Suites.java | 0 .../compiler/phases/tiers/SuitesCreator.java | 0 .../compiler/phases/tiers/SuitesProvider.java | 0 .../compiler/phases/tiers/TargetProvider.java | 0 .../compiler/phases/util/BlockWorkList.java | 0 .../compiler/phases/util/GraphOrder.java | 0 .../phases/util/MethodDebugValueName.java | 0 .../compiler/phases/util/Providers.java | 0 .../phases/verify/VerifyBailoutUsage.java | 0 .../verify/VerifyCallerSensitiveMethods.java | 0 .../phases/verify/VerifyDebugUsage.java | 0 .../phases/verify/VerifyUpdateUsages.java | 0 .../phases/verify/VerifyUsageWithEquals.java | 0 .../verify/VerifyVirtualizableUsage.java | 0 .../printer/BasicIdealGraphPrinter.java | 0 .../compiler/printer/BinaryGraphPrinter.java | 0 .../graalvm/compiler/printer/CFGPrinter.java | 0 .../compiler/printer/CFGPrinterObserver.java | 0 .../printer/CanonicalStringGraphPrinter.java | 0 .../compiler/printer/CompilationPrinter.java | 0 .../printer/GraalDebugConfigCustomizer.java | 0 .../compiler/printer/GraphPrinter.java | 0 .../printer/GraphPrinterDumpHandler.java | 0 .../compiler/printer/IdealGraphPrinter.java | 0 .../printer/NoDeadCodeVerifyHandler.java | 0 .../aarch64/AArch64CountLeadingZerosNode.java | 0 .../AArch64FloatArithmeticSnippets.java | 0 .../aarch64/AArch64GraphBuilderPlugins.java | 0 .../AArch64IntegerArithmeticSnippets.java | 0 .../aarch64/AArch64IntegerSubstitutions.java | 0 .../aarch64/AArch64LongSubstitutions.java | 0 .../amd64/AMD64ConvertSnippets.java | 0 .../amd64/AMD64CountLeadingZerosNode.java | 0 .../amd64/AMD64CountTrailingZerosNode.java | 0 .../amd64/AMD64FloatConvertNode.java | 0 .../amd64/AMD64GraphBuilderPlugins.java | 0 .../amd64/AMD64MathSubstitutions.java | 0 .../replacements/amd64/AMD64RoundNode.java | 0 .../sparc/SPARCGraphBuilderPlugins.java | 0 .../test/ArrayStoreBytecodeExceptionTest.java | 0 .../test/ArraysSubstitutionsTest.java | 0 .../replacements/test/BitOpNodesTest.java | 0 .../test/BytecodeExceptionTest.java | 0 .../test/ClassCastBytecodeExceptionTest.java | 0 .../test/CompiledExceptionHandlerTest.java | 0 .../CompiledNullPointerExceptionTest.java | 0 .../test/DeoptimizeOnExceptionTest.java | 0 .../replacements/test/DerivedOopTest.java | 0 .../test/DynamicNewArrayTest.java | 0 .../compiler/replacements/test/EdgesTest.java | 0 .../compiler/replacements/test/FoldTest.java | 0 .../test/IndexOobBytecodeExceptionTest.java | 0 .../test/InstanceOfDynamicTest.java | 0 .../replacements/test/InstanceOfTest.java | 0 .../test/IntegerMulExactFoldTest.java | 0 .../test/IntegerSubOverflowsTest.java | 0 .../replacements/test/InvokeTest.java | 0 .../test/MethodSubstitutionTest.java | 0 .../replacements/test/MonitorTest.java | 0 .../replacements/test/NewArrayTest.java | 0 .../replacements/test/NewInstanceTest.java | 0 .../replacements/test/NewMultiArrayTest.java | 0 .../test/NullBytecodeExceptionTest.java | 0 .../replacements/test/ObjectAccessTest.java | 0 .../replacements/test/PEGraphDecoderTest.java | 0 .../replacements/test/PointerTest.java | 0 .../test/PointerTrackingTest.java | 0 .../test/ReplacementsParseTest.java | 0 .../test/StandardMethodSubstitutionsTest.java | 0 .../test/StringEqualsConstantTest.java | 0 .../test/StringHashConstantTest.java | 0 .../test/StringSubstitutionsTest.java | 0 .../replacements/test/SubstitutionsTest.java | 0 .../replacements/test/TypeCheckTest.java | 0 .../test/UnsafeSubstitutionsTest.java | 0 .../test/UnsignedIntegerTest.java | 0 .../replacements/test/UnsignedMathTest.java | 0 .../test/UnwindExceptionToCallerTest.java | 0 .../compiler/replacements/test/WordTest.java | 0 .../ClassfileBytecodeProviderTest.java | 0 .../test/classfile/RedefineIntrinsicTest.java | 0 .../javax.annotation.processing.Processor | 0 .../verifier/APHotSpotSignature.java | 0 .../verifier/AbstractVerifier.java | 0 .../verifier/ClassSubstitutionVerifier.java | 0 .../replacements/verifier/FoldVerifier.java | 0 .../verifier/GeneratedFoldPlugin.java | 0 .../GeneratedNodeIntrinsicPlugin.java | 0 .../verifier/GeneratedPlugin.java | 0 .../verifier/InjectedDependencies.java | 0 .../verifier/MethodSubstitutionVerifier.java | 0 .../verifier/NodeIntrinsicVerifier.java | 0 .../verifier/PluginGenerator.java | 0 .../verifier/VerifierAnnotationProcessor.java | 0 .../replacements/ArraySubstitutions.java | 0 .../replacements/ArraysSubstitutions.java | 0 .../compiler/replacements/BoxingSnippets.java | 0 .../replacements/CachingPEGraphDecoder.java | 0 .../ConstantBindingParameterPlugin.java | 0 .../DefaultJavaLoweringProvider.java | 0 .../compiler/replacements/GraphKit.java | 0 .../InlineDuringParsingPlugin.java | 0 .../InlineGraalDirectivesPlugin.java | 0 .../InstanceOfSnippetsTemplates.java | 0 .../replacements/IntegerSubstitutions.java | 0 .../replacements/IntrinsicGraphBuilder.java | 0 .../compiler/replacements/JavacBug.java | 0 .../graalvm/compiler/replacements/Log.java | 0 .../replacements/LongSubstitutions.java | 0 .../replacements/MethodHandlePlugin.java | 0 .../NodeIntrinsificationProvider.java | 0 .../compiler/replacements/PEGraphDecoder.java | 0 .../replacements/ReplacementsImpl.java | 0 .../replacements/ReplacementsUtil.java | 0 .../compiler/replacements/SnippetCounter.java | 0 .../replacements/SnippetCounterNode.java | 0 .../replacements/SnippetTemplate.java | 0 .../compiler/replacements/Snippets.java | 0 .../StandardGraphBuilderPlugins.java | 0 .../replacements/StringSubstitutions.java | 0 .../replacements/WordOperationPlugin.java | 0 .../replacements/classfile/Classfile.java | 0 .../classfile/ClassfileBytecode.java | 0 .../classfile/ClassfileBytecodeProvider.java | 0 .../classfile/ClassfileConstant.java | 0 .../classfile/ClassfileConstantPool.java | 0 .../replacements/nodes/ArrayEqualsNode.java | 0 .../replacements/nodes/AssertionNode.java | 0 .../nodes/BasicArrayCopyNode.java | 0 .../nodes/BasicObjectCloneNode.java | 0 .../nodes/BinaryMathIntrinsicNode.java | 0 .../replacements/nodes/BitCountNode.java | 0 .../nodes/BitScanForwardNode.java | 0 .../nodes/BitScanReverseNode.java | 0 .../replacements/nodes/CStringConstant.java | 0 .../nodes/DirectObjectStoreNode.java | 0 .../replacements/nodes/DirectStoreNode.java | 0 .../replacements/nodes/ExplodeLoopNode.java | 0 .../nodes/LoadSnippetVarargParameterNode.java | 0 .../replacements/nodes/MacroNode.java | 0 .../nodes/MacroStateSplitNode.java | 0 .../replacements/nodes/MethodHandleNode.java | 0 .../nodes/PureFunctionMacroNode.java | 0 .../replacements/nodes/ReadRegisterNode.java | 0 .../ResolvedMethodHandleCallTargetNode.java | 0 .../replacements/nodes/ReverseBytesNode.java | 0 .../nodes/UnaryMathIntrinsicNode.java | 0 .../nodes/VirtualizableInvokeMacroNode.java | 0 .../replacements/nodes/WriteRegisterNode.java | 0 .../nodes/arithmetic/IntegerAddExactNode.java | 0 .../arithmetic/IntegerAddExactSplitNode.java | 0 .../IntegerExactArithmeticNode.java | 0 .../IntegerExactArithmeticSplitNode.java | 0 .../nodes/arithmetic/IntegerMulExactNode.java | 0 .../arithmetic/IntegerMulExactSplitNode.java | 0 .../nodes/arithmetic/IntegerMulHighNode.java | 0 .../nodes/arithmetic/IntegerSubExactNode.java | 0 .../arithmetic/IntegerSubExactSplitNode.java | 0 .../nodes/arithmetic/UnsignedMulHighNode.java | 0 .../compiler/runtime/RuntimeProvider.java | 0 .../org/graalvm/compiler/salver/Salver.java | 0 .../salver/SalverDebugConfigCustomizer.java | 0 .../compiler/salver/SalverOptions.java | 0 .../compiler/salver/data/DataDict.java | 0 .../compiler/salver/data/DataList.java | 0 .../salver/dumper/AbstractGraalDumper.java | 0 .../dumper/AbstractMethodScopeDumper.java | 0 .../dumper/AbstractSerializerDumper.java | 0 .../compiler/salver/dumper/Dumper.java | 0 .../compiler/salver/dumper/GraphDumper.java | 0 .../salver/handler/AbstractDumpHandler.java | 0 .../handler/AbstractGraalDumpHandler.java | 0 .../compiler/salver/handler/DumpHandler.java | 0 .../salver/handler/GraphDumpHandler.java | 0 .../graalvm/compiler/salver/package-info.java | 0 .../salver/serialize/AbstractSerializer.java | 0 .../salver/serialize/JSONSerializer.java | 0 .../compiler/salver/serialize/Serializer.java | 0 .../compiler/salver/util/ECIDUtil.java | 0 .../compiler/salver/util/MethodContext.java | 0 .../salver/writer/ChannelDumpWriter.java | 0 .../compiler/salver/writer/DumpWriter.java | 0 .../javax.annotation.processing.Processor | 0 .../processor/ServiceProviderProcessor.java | 0 .../serviceprovider/GraalServices.java | 0 .../serviceprovider/ServiceProvider.java | 0 .../compiler/test/ExportingClassLoader.java | 0 .../org/graalvm/compiler/test/GraalTest.java | 0 .../org/graalvm/compiler/test/JLRModule.java | 0 .../graalvm/compiler/test/SubprocessUtil.java | 0 .../.checkstyle.exclude | 0 .../virtual/bench/PartialEscapeBench.java | 0 .../nodes/MaterializedObjectState.java | 0 .../virtual/nodes/VirtualObjectState.java | 0 .../phases/ea/EarlyReadEliminationPhase.java | 0 .../virtual/phases/ea/EffectList.java | 0 .../virtual/phases/ea/EffectsBlockState.java | 0 .../virtual/phases/ea/EffectsClosure.java | 0 .../virtual/phases/ea/EffectsPhase.java | 0 .../virtual/phases/ea/GraphEffectList.java | 0 .../virtual/phases/ea/ObjectState.java | 0 .../ea/PEReadEliminationBlockState.java | 0 .../phases/ea/PEReadEliminationClosure.java | 0 .../phases/ea/PartialEscapeBlockState.java | 0 .../phases/ea/PartialEscapeClosure.java | 0 .../virtual/phases/ea/PartialEscapePhase.java | 0 .../phases/ea/ReadEliminationBlockState.java | 0 .../phases/ea/ReadEliminationClosure.java | 0 .../virtual/phases/ea/VirtualUtil.java | 0 .../phases/ea/VirtualizerToolImpl.java | 0 .../graalvm/compiler/word/AtomicUnsigned.java | 0 .../org/graalvm/compiler/word/AtomicWord.java | 0 .../compiler/word/BarrieredAccess.java | 0 .../graalvm/compiler/word/ComparableWord.java | 0 .../graalvm/compiler/word/ObjectAccess.java | 0 .../org/graalvm/compiler/word/Pointer.java | 0 .../graalvm/compiler/word/PointerBase.java | 0 .../graalvm/compiler/word/PointerUtils.java | 0 .../src/org/graalvm/compiler/word/Signed.java | 0 .../graalvm/compiler/word/UnsafeAccess.java | 0 .../org/graalvm/compiler/word/Unsigned.java | 0 .../graalvm/compiler/word/UnsignedUtils.java | 0 .../src/org/graalvm/compiler/word/Word.java | 0 .../org/graalvm/compiler/word/WordBase.java | 0 .../org/graalvm/compiler/word/WordTypes.java | 0 .../compiler/word/nodes/WordCastNode.java | 0 hotspot/src/share/vm/aot/aotLoader.cpp | 4 +- hotspot/src/share/vm/runtime/arguments.cpp | 2 +- .../jvmci/JVM_GetJVMCIRuntimeTest.java | 2 +- .../jvmci/SecurityRestrictionsTest.java | 4 +- .../jdk/vm/ci/hotspot/CompilerToVMHelper.java | 0 .../jdk/vm/ci/hotspot/MetaAccessWrapper.java | 0 .../hotspot/PublicMetaspaceWrapperObject.java | 0 .../compilerToVM/AllocateCompileIdTest.java | 6 +-- .../AsResolvedJavaMethodTest.java | 8 ++-- .../compilerToVM/CollectCountersTest.java | 4 +- .../jvmci/compilerToVM/DebugOutputTest.java | 4 +- .../compilerToVM/DisassembleCodeBlobTest.java | 6 +-- .../DoNotInlineOrCompileTest.java | 6 +-- .../ExecuteInstalledCodeTest.java | 40 +++++++++---------- .../FindUniqueConcreteMethodTest.java | 10 ++--- .../jvmci/compilerToVM/GetBytecodeTest.java | 6 +-- .../compilerToVM/GetClassInitializerTest.java | 4 +- .../compilerToVM/GetConstantPoolTest.java | 10 ++--- .../compilerToVM/GetExceptionTableTest.java | 6 +-- .../jvmci/compilerToVM/GetFlagValueTest.java | 4 +- .../compilerToVM/GetImplementorTest.java | 4 +- .../compilerToVM/GetLineNumberTableTest.java | 6 +-- .../GetLocalVariableTableTest.java | 6 +-- .../GetMaxCallTargetOffsetTest.java | 4 +- .../compilerToVM/GetNextStackFrameTest.java | 8 ++-- .../GetResolvedJavaMethodTest.java | 6 +-- .../compilerToVM/GetResolvedJavaTypeTest.java | 8 ++-- .../GetStackTraceElementTest.java | 6 +-- .../jvmci/compilerToVM/GetSymbolTest.java | 8 ++-- .../GetVtableIndexForInterfaceTest.java | 6 +-- .../HasCompiledCodeForOSRTest.java | 6 +-- .../HasFinalizableSubclassTest.java | 4 +- .../HasNeverInlineDirectiveTest.java | 6 +-- .../InvalidateInstalledCodeTest.java | 8 ++-- .../jvmci/compilerToVM/IsCompilableTest.java | 6 +-- .../jvmci/compilerToVM/IsMatureTest.java | 4 +- .../compilerToVM/IsMatureVsReprofileTest.java | 6 +-- .../JVM_RegisterJVMCINatives.java | 4 +- .../compilerToVM/LookupKlassInPoolTest.java | 8 ++-- .../LookupKlassRefIndexInPoolTest.java | 8 ++-- .../compilerToVM/LookupMethodInPoolTest.java | 8 ++-- .../LookupNameAndTypeRefIndexInPoolTest.java | 8 ++-- .../compilerToVM/LookupNameInPoolTest.java | 8 ++-- .../LookupSignatureInPoolTest.java | 8 ++-- .../jvmci/compilerToVM/LookupTypeTest.java | 4 +- .../MaterializeVirtualObjectTest.java | 8 ++-- ...ethodIsIgnoredBySecurityStackWalkTest.java | 6 +-- .../compilerToVM/ReadConfigurationTest.java | 4 +- .../jvmci/compilerToVM/ReprofileTest.java | 8 ++-- .../ResolveConstantInPoolTest.java | 8 ++-- .../compilerToVM/ResolveFieldInPoolTest.java | 8 ++-- .../jvmci/compilerToVM/ResolveMethodTest.java | 6 +-- ...solvePossiblyCachedConstantInPoolTest.java | 8 ++-- .../compilerToVM/ResolveTypeInPoolTest.java | 8 ++-- .../ShouldDebugNonSafepointsTest.java | 4 +- .../compilerToVM/ShouldInlineMethodTest.java | 6 +-- .../errors/TestInvalidCompilationResult.java | 12 +++--- .../jvmci/errors/TestInvalidDebugInfo.java | 12 +++--- .../jvmci/errors/TestInvalidOopMap.java | 12 +++--- ...JvmciNotifyBootstrapFinishedEventTest.java | 11 ++--- .../events/JvmciNotifyInstallEventTest.java | 13 +++--- .../jvmci/events/JvmciShutdownEventTest.java | 9 +++-- .../jdk/vm/ci/code/test/DataPatchTest.java | 14 +++---- .../code/test/InterpreterFrameSizeTest.java | 16 ++++---- .../code/test/MaxOopMapStackOffsetTest.java | 16 ++++---- .../jdk/vm/ci/code/test/NativeCallTest.java | 16 ++++---- .../code/test/SimpleCodeInstallationTest.java | 14 +++---- .../vm/ci/code/test/SimpleDebugInfoTest.java | 14 +++---- .../code/test/VirtualObjectDebugInfoTest.java | 14 +++---- ...HotSpotConstantReflectionProviderTest.java | 6 +-- .../test/MemoryAccessProviderTest.java | 8 ++-- .../test/MethodHandleAccessProviderTest.java | 6 +-- .../jdk/vm/ci/runtime/test/ConstantTest.java | 4 +- .../vm/ci/runtime/test/RedefineClassTest.java | 4 +- ...lvedJavaTypeResolveConcreteMethodTest.java | 4 +- .../ResolvedJavaTypeResolveMethodTest.java | 4 +- .../test/TestConstantReflectionProvider.java | 4 +- .../jdk/vm/ci/runtime/test/TestJavaField.java | 4 +- .../vm/ci/runtime/test/TestJavaMethod.java | 4 +- .../jdk/vm/ci/runtime/test/TestJavaType.java | 4 +- .../runtime/test/TestMetaAccessProvider.java | 4 +- .../runtime/test/TestResolvedJavaField.java | 4 +- .../runtime/test/TestResolvedJavaMethod.java | 4 +- .../ci/runtime/test/TestResolvedJavaType.java | 6 +-- .../compiler/jvmci/meta/StableFieldTest.java | 6 +-- 2765 files changed, 359 insertions(+), 354 deletions(-) rename hotspot/make/gensrc/{Gensrc-jdk.vm.compiler.gmk => Gensrc-jdk.internal.vm.compiler.gmk} (78%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.aarch64/src/jdk/vm/ci/aarch64/AArch64.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.aarch64/src/jdk/vm/ci/aarch64/AArch64Kind.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/AMD64.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/AMD64Kind.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/overview.html (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Architecture.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BailoutException.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodeFrame.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodePosition.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CallingConvention.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CodeCacheProvider.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CodeUtil.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationRequest.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationRequestResult.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompiledCode.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/DebugInfo.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/InstalledCode.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/InvalidInstalledCodeException.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Location.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/MemoryBarriers.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ReferenceMap.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Register.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterArray.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterAttributes.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterConfig.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterSaveLayout.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterValue.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/StackLockValue.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/StackSlot.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/SuppressFBWarnings.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/TargetDescription.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ValueKindFactory.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ValueUtil.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/VirtualObject.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/package-info.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Call.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/ConstantReference.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataPatch.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataSectionReference.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/ExceptionHandler.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Infopoint.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/InfopointReason.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Mark.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Reference.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Site.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/InspectedFrame.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/InspectedFrameVisitor.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/StackIntrospection.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/InitTimer.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/JVMCIError.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/SuppressFBWarnings.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotJVMCIBackendFactory.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotRegisterConfig.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotVMConfig.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotJVMCIBackendFactory.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotRegisterConfig.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotVMConfig.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotJVMCIBackendFactory.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotRegisterConfig.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotVMConfig.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EmptyEventProvider.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EventProvider.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCallingConventionType.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompilationRequest.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompilationRequestResult.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledCode.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledNmethod.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompressedNullConstant.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstant.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotForeignCallTarget.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotInstalledCode.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIBackendFactory.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerConfig.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerFactory.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIMetaAccessContext.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntimeProvider.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJavaType.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProvider.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProviderImpl.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaAccessProvider.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaData.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaspaceConstant.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaspaceConstantImpl.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethod.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodData.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodDataAccessor.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodHandleAccessProvider.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodUnresolved.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotModifiers.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotNmethod.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotObjectConstant.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotObjectConstantImpl.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotProfilingInfo.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotReferenceMap.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaField.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethod.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaType.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectType.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedPrimitiveType.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotRuntimeStub.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSentinelConstant.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSignature.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSpeculationLog.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotStackFrameReference.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotStackIntrospection.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotUnresolvedField.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotUnresolvedJavaType.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigStore.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMEventListener.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/MetaspaceWrapperObject.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/SuppressFBWarnings.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/UnsafeAccess.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMField.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMFlag.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMIntrinsicMethod.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/overview.html (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AbstractJavaProfile.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AbstractProfiledItem.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AllocatableValue.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Assumptions.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Constant.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantPool.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantReflectionProvider.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DefaultProfilingInfo.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DeoptimizationAction.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DeoptimizationReason.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ExceptionHandler.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/InvokeTarget.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaConstant.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaField.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaKind.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaMethod.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaMethodProfile.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaType.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaTypeProfile.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaValue.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/LineNumberTable.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Local.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/LocalVariableTable.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MemoryAccessProvider.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MetaAccessProvider.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MetaUtil.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MethodHandleAccessProvider.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ModifiersProvider.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/NullConstant.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/PlatformKind.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/PrimitiveConstant.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ProfilingInfo.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/RawConstant.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaField.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaMethod.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaType.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SerializableConstant.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Signature.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SpeculationLog.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SuppressFBWarnings.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/TriState.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/VMConstant.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Value.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ValueKind.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/package-info.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCI.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCIBackend.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCICompiler.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCICompilerFactory.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCIRuntime.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.services/.checkstyle_checks.xml (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIPermission.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIServiceLocator.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/Services.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.sparc/src/jdk/vm/ci/sparc/SPARC.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/jdk.vm.ci.sparc/src/jdk/vm/ci/sparc/SPARCKind.java (100%) rename hotspot/src/{jdk.vm.ci => jdk.internal.vm.ci}/share/classes/module-info.java (80%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/.mx.graal/.project (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/.mx.graal/.pydevproject (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/.mx.graal/eclipse-settings/org.eclipse.jdt.core.prefs (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/.mx.graal/mx_graal.py (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/.mx.graal/mx_graal_9.py (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/.mx.graal/mx_graal_bench.py (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/.mx.graal/outputparser.py (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/.mx.graal/sanitycheck.py (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/.mx.graal/suite.py (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/module-info.java (98%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.collections/src/org/graalvm/compiler/api/collections/CollectionsProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.collections/src/org/graalvm/compiler/api/collections/DefaultCollectionsProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/AllocationInstrumentationTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/BlackholeDirectiveTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/ControlFlowAnchorDirectiveTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/DeoptimizeDirectiveTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/IsMethodInlineDirectiveTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/IterationDirectiveTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/LockInstrumentationTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/OpaqueDirectiveTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/ProbabilityDirectiveTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/RootNameDirectiveTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/TinyInstrumentor.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.directives/src/org/graalvm/compiler/api/directives/GraalDirectives.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/ClassSubstitution.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/Fold.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/MethodSubstitution.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/MethodSubstitutionRegistry.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/Snippet.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/SnippetReflectionProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/SnippetTemplateCache.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/GraalJVMCICompiler.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/GraalRuntime.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.test/src/org/graalvm/compiler/api/test/Graal.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.api.test/src/org/graalvm/compiler/api/test/GraalAPITest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm.aarch64.test/src/org/graalvm/compiler/asm/aarch64/test/AArch64MacroAssemblerTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm.aarch64.test/src/org/graalvm/compiler/asm/aarch64/test/TestProtectedAssembler.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64Address.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64Assembler.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64MacroAssembler.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/BitOpsTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/IncrementDecrementMacroTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/SimpleAssemblerTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64Address.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64AsmOptions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64Assembler.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64InstructionAttr.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64MacroAssembler.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm.sparc.test/src/org/graalvm/compiler/asm/sparc/test/BitSpecTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm.sparc.test/src/org/graalvm/compiler/asm/sparc/test/SPARCAssemblerTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCAddress.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCAssembler.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCInstructionCounter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCMacroAssembler.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm.test/src/org/graalvm/compiler/asm/test/AssemblerTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/AbstractAddress.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/AsmOptions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Assembler.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Buffer.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Label.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/NumUtil.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BridgeMethodUtils.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytecode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeDisassembler.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeLookupSwitch.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeStream.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeSwitch.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeTableSwitch.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytecodes.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytes.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/ResolvedJavaMethodBytecode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/ResolvedJavaMethodBytecodeProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/CompilationResult.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/DataSection.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/DisassemblerProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/HexCodeFile.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/HexCodeFileDisassemblerProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/SourceMapping.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/SourceStackTraceBailoutException.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.common/src/org/graalvm/compiler/common/PermanentBailoutException.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.common/src/org/graalvm/compiler/common/RetryableBailoutException.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64AddressLowering.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64AddressNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64ArithmeticLIRGenerator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64FloatConvertOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRGenerator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRKindTool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64MoveFactory.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeLIRBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeMatchRules.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64SuitesProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/AMD64AllocatorTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/ConstantStackMoveTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/MatchRuleTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/StackStoreTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64AddressLowering.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64AddressNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64ArithmeticLIRGenerator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64LIRGenerator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64LIRKindTool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64MoveFactory.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64MoveFactoryBase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64NodeLIRBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64NodeMatchRules.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64SuitesProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CollectionsFactory.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CompilationIdentifier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CompilationRequestIdentifier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/FieldIntrospection.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/Fields.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/FieldsScanner.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/GraalOptions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LIRKind.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LinkedIdentityHashMap.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LocationIdentity.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/SuppressFBWarnings.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/UnsafeAccess.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/BiDirectionalTraceBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/ComputeBlockOrder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/RegisterAllocationConfig.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/SingleBlockTraceBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/Trace.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceBuilderResult.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceMap.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceStatisticsPrinter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/UniDirectionalTraceBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/Condition.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/FloatConvert.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/UnsignedMath.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/AbstractBlockBase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/AbstractControlFlowGraph.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/BlockMap.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/CFGVerifier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/DominatorOptimizationProblem.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/Loop.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PrintableCFG.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PrintableDominatorOptimizationProblem.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PropertyConsumable.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/CodeGenProviders.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ConstantFieldProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallDescriptor.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallLinkage.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallsProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/JavaConstantFieldProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/LIRKindTool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/AbstractObjectStamp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/AbstractPointerStamp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ArithmeticOpTable.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ArithmeticStamp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/DataPointerConstant.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/FloatStamp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/IllegalStamp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/IntegerStamp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ObjectStamp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/PrimitiveStamp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/RawPointerStamp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/Stamp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/StampFactory.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/StampPair.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/TypeReference.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/VoidStamp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ArrayMap.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ArraySet.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/BitMap2D.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/CompilationAlarm.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/FrequencyEncoder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/IntList.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ModuleAPI.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeConversion.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeReader.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeWriter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeAccess.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeArrayTypeReader.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeArrayTypeWriter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/Util.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.match.processor/src/META-INF/services/javax.annotation.processing.Processor (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.match.processor/src/org/graalvm/compiler/core/match/processor/MatchProcessor.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.sparc.test/src/org/graalvm/compiler/core/sparc/test/SPARCAllocatorTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCAddressLowering.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCArithmeticLIRGenerator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCImmediateAddressNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCIndexedAddressNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCIntegerCompareCanonicalizationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCLIRGenerator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCLIRKindTool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCMoveFactory.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCNodeLIRBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCNodeMatchRules.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCSuitesProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/AllocSpy.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/BoxingEliminationTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/BoxingTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CheckGraalInvariants.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CommonedConstantsTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CompareCanonicalizerTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConcreteSubtypeTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationLoadFieldConstantFoldTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationMulTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest1.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest10.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest11.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest3.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest4.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest5.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest6.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest7.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest8.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest9.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTestBase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConstantArrayReadFoldingTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CooperativePhaseTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CopyOfVirtualizationTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CountedLoopTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/DegeneratedLoopsTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/DontReuseArgumentSpaceTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/EnumSwitchTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FinalizableSubclassTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FindUniqueConcreteMethodBugTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FindUniqueDefaultMethodTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatOptimizationTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatingReadTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraalCompilerAssumptionsTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraalCompilerTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraphEncoderTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraphScheduleTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GuardEliminationCornerCasesTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GuardedIntrinsicTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/HashCodeTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IfCanonicalizerTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IfReorderTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ImplicitNullCheckTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InfopointReasonTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InstalledCodeInvalidationTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IntegerEqualsCanonicalizerTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IntegerStampMulFoldTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InterfaceMethodHandleTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeExceptionTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeHintsTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LockEliminationTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LongNodeChainTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LoopUnswitchTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MarkUnsafeAccessTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MemoryArithmeticTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MemoryScheduleTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MergeCanonicalizerTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MethodHandleEagerResolution.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MonitorGraphTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NestedLoopTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NodePosIteratorTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NodePropertiesTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/OnStackReplacementTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/OptionsVerifierTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PhiCreationTests.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ProfilingInfoTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PushNodesThroughPiTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PushThroughIfTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReadAfterCheckCastTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReassociateAndCanonicalTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReentrantBlockIteratorTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReferenceGetLoopTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ScalarTypeSystemTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SchedulingTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SchedulingTest2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ShortCircuitNodeTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SimpleCFGTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StampCanonicalizerTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StaticInterfaceFieldTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StraighteningTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeSystemTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeWriterTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnbalancedMonitorsTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnsafeReadEliminationTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyBailoutUsageTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyDebugUsageTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyVirtualizableTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/AllocatorTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/BackendTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest1.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest3.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest4.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest5.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest6.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTestInterception01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTestInterception02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/VerifyMethodMetricsTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/CompiledMethodTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/MonitorDeoptTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/SafepointRethrowDeoptTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/SynchronizedMethodDeoptimizationTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EAMergingTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EATestBase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EarlyReadEliminationTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EscapeAnalysisTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/NestedBoxingTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PEAAssertionsTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PEAReadEliminationTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PartialEscapeAnalysisTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PoorMansEATest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/UnsafeEATest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/inlining/InliningTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/inlining/RecursiveInliningTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/GraalTutorial.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/InvokeGraal.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/StaticAnalysis.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/StaticAnalysisTests.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/CompilerThread.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/CompilerThreadFactory.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalCompiler.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalCompilerOptions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalDebugInitializationParticipant.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/LIRGenerationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/BytecodeParserTool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/DebugInfoBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/InstructionPrinter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeLIRBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeMatchRules.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/package-info.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/ComplexMatchResult.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/ComplexMatchValue.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchContext.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchGenerator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchPattern.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRule.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRuleRegistry.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRules.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchStatement.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchStatementSet.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchableNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchableNodes.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/package-info.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/CoreCompilerConfiguration.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyCompilerConfiguration.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyHighTier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyLowTier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyMidTier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/GraphChangeMonitoringPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/HighTier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/LowTier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/MidTier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/target/Backend.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/CSVUtilTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/DebugHistogramTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/DebugTimerTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/CSVUtil.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Debug.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugCloseable.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfig.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfigCustomizer.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfigScope.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugCounter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugDumpHandler.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugDumpScope.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugEnvironment.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugFilter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugHistogram.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugInitializationParticipant.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugMemUseTracker.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugMethodMetrics.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugTimer.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugValueFactory.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugVerifyHandler.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DelegatingDebugConfig.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Fingerprint.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/GraalDebugConfig.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/GraalError.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Indent.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/JavaMethodContext.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/LogStream.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Management.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/MethodFilter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TTY.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TTYStreamProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TimeSource.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TopLevelDebugConfig.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/AccumulatedDebugValue.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/CloseableCounterImpl.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/CounterImpl.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramAsciiPrinter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramImpl.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramRPrinter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugScope.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValue.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValueMap.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValuesPrinter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/KeyRegistry.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/MemUseTrackerImpl.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/TimerImpl.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsImpl.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsInlineeScopeInfo.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsPrinter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsRootScopeInfo.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeMapTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeUsagesTests.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeValidationChecksTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TestNodeInterface.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TypedNodeIteratorTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TypedNodeIteratorTest2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableContains.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableCount.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableIsEmpty.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/.checkstyle_checks.xml (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/CachedGraph.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/DefaultNodeCollectionsProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Edges.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/GraalGraphError.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Graph.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/GraphNodeIterator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/InputEdges.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/IterableNodeType.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Node.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeBitMap.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeClass.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeCollectionsProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeFlood.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeIdAccessor.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeInputList.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeInterface.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeList.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeMap.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeNodeMap.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeSourcePosition.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeStack.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeSuccessorList.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUnionFind.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageIterable.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageIterator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageWithModCountIterator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeWorkList.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Position.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/SuccessorEdges.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/TypedGraphNodeIterator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/UnsafeAccess.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/VerificationError.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/FilteredNodeIterable.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodeIterable.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodeIterator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodePredicate.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodePredicates.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/PredicatedProxyNodeIterator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/package-info.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/Canonicalizable.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/CanonicalizerTool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/Simplifiable.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/SimplifierTool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotBackend.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotBackendFactory.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotCRuntimeCallEpilogueOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotCRuntimeCallPrologueOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDeoptimizeCallerOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDeoptimizeOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDirectStaticCallOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDirectVirtualCallOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotEpilogueOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotForeignCallsProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotJumpToExceptionHandlerInCallerOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRGenerator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRKindTool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLoweringProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotMove.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotMoveFactory.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotNodeLIRBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotPatchReturnAddressOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotRegisterAllocationConfig.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotReturnOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotSafepointOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotStrategySwitchOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotUnwindOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64IndirectCallOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArchHotSpotNodeCostProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/AMD64HotSpotFrameOmissionTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/CompressedNullCheckTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/DataPatchInConstantsTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/StubAVXTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64DeoptimizationStub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64DeoptimizeOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotAddressLowering.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotArithmeticLIRGenerator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotBackend.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotBackendFactory.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCRuntimeCallEpilogueOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCRuntimeCallPrologueOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotConstantRetrievalOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCounterOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotDeoptimizeCallerOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotDirectStaticCallOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEnterUnpackFramesStackFrameOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEpilogueBlockEndOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEpilogueOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotForeignCallsProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotJumpToExceptionHandlerInCallerOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRGenerator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRKindTool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveCurrentStackFrameOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveDeoptimizedStackFrameOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveUnpackFramesStackFrameOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadAddressOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadConfigValueOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoweringProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMathIntrinsicOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMove.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMoveFactory.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotNodeCostProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotNodeLIRBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotPatchReturnAddressOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotPushInterpreterFrameOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotRegisterAllocationConfig.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotRestoreRbpOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotReturnOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotSafepointOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotStrategySwitchOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotSuitesProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotUnwindOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotspotDirectVirtualCallOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64IndirectCallOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64MathStub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64RawNativeCallNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64TailcallOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64UncommonTrapStub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.lir.test/src/org/graalvm/compiler/hotspot/lir/test/ExceedMaxOopMapStackOffset.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCDeoptimizationStub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCDeoptimizeOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotBackend.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotBackendFactory.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCRuntimeCallEpilogueOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCRuntimeCallPrologueOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCounterOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotDeoptimizeCallerOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotEnterUnpackFramesStackFrameOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotEpilogueOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotForeignCallsProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerInCallerOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLIRGenerator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLIRKindTool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveCurrentStackFrameOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveDeoptimizedStackFrameOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveUnpackFramesStackFrameOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLoweringProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotMove.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotMoveFactory.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotNodeCostProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotNodeLIRBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotPatchReturnAddressOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotPushInterpreterFrameOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotRegisterAllocationConfig.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotReturnOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotSafepointOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotStrategySwitchOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotUnwindOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotspotDirectStaticCallOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotspotDirectVirtualCallOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCIndirectCallOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCUncommonTrapStub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/AheadOfTimeCompilationTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ArrayCopyIntrinsificationTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CRC32SubstitutionsTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CheckGraalIntrinsics.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ClassSubstitutionsTests.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorldTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompressedOopTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ConstantPoolSubstitutionsTests.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/DataPatchTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ExplicitExceptionTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ForeignCallDeoptimizeTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRLockTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRTestBase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotCryptoSubstitutionTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotGraalCompilerTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotMethodSubstitutionTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotMonitorValueTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotNmethodTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotNodeSubstitutionsTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotResolvedJavaFieldTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotResolvedObjectTypeTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/InstalledCodeExecuteHelperTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/JVMCIInfopointErrorTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/LoadJavaMirrorWithKlassTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/MemoryUsageBenchmark.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/TestIntrinsicCompiles.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/TestSHASubstitutions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/WriteBarrierAdditionTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/WriteBarrierVerificationTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/AOTGraalHotSpotVMConfig.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/BootstrapWatchDog.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationCounters.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationStatistics.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationTask.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationWatchDog.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompileTheWorld.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompileTheWorldOptions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilerConfigurationFactory.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilerRuntimeHotSpotVMConfig.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompressEncoding.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CoreCompilerConfigurationFactory.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/EconomyCompilerConfigurationFactory.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/FingerprintUtil.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackend.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackendFactory.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCompilationIdentifier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCompiledCodeBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCounterOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotDataBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotDebugInfoBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotForeignCallLinkage.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotForeignCallLinkageImpl.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompiler.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompilerFactory.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalJVMCIServiceLocator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalRuntime.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalRuntimeProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalVMEventListener.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotHostBackend.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotInstructionProfiling.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerationResult.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLockStack.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotNodeLIRBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReferenceMapBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReplacementsImpl.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotTTYStreamProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/JVMCIVersionCheck.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/PrintStreamOption.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/debug/BenchmarkCounters.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/lir/HotSpotZapRegistersPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/DefaultHotSpotLoweringProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotAOTProfilingPlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotClassInitializationPlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotConstantFieldProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotConstantLoadAction.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotDisassemblerProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotForeignCallsProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotForeignCallsProviderImpl.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraalConstantFieldProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotHostForeignCallsProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotInvocationPlugins.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotLoweringProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotNodePlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotProfilingPlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotProviders.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotRegisters.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotRegistersProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotSnippetReflectionProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotStampProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotSuitesProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotWordOperationPlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/AcquiredCASLockNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/AllocaNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ArrayRangeWriteBarrier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/BeginLockScopeNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CompressionNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ComputeObjectAddressNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CurrentJavaThreadNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CurrentLockNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizationFetchUnrollInfoCallNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizeCallerNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizingStubCall.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DimensionsNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DirectCompareAndSwapNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/EndLockScopeNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/EnterUnpackFramesStackFrameNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/FastAcquireBiasedLockNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ArrayRangePostWriteBarrier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ArrayRangePreWriteBarrier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1PostWriteBarrier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1PreWriteBarrier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ReferentFieldReadBarrier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GetObjectAddressNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GraalHotSpotVMConfigNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotDirectCallTargetNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotIndirectCallTargetNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotNodeCostProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/JumpToExceptionHandlerInCallerNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/JumpToExceptionHandlerNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveCurrentStackFrameNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveDeoptimizedStackFrameNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveUnpackFramesStackFrameNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LoadIndexedPointerNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/MonitorCounterNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ObjectWriteBarrier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/PatchReturnAddressNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/PushInterpreterFrameNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SaveAllRegistersNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SerialArrayRangeWriteBarrier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SerialWriteBarrier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SnippetAnchorNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SnippetLocationProxyNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/StubForeignCallNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/StubStartNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/UncommonTrapCallNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/VMErrorNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/WriteBarrier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/EncodedSymbolNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/InitializeKlassNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/InitializeKlassStubCall.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadConstantIndirectlyFixedNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadConstantIndirectlyNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadMethodCountersIndirectlyNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadMethodCountersNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveConstantNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveConstantStubCall.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveMethodAndLoadCountersNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveMethodAndLoadCountersStubCall.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileBranchNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileInvokeNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileWithNotificationNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/RandomSeedNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/HotSpotLIRKindTool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/KlassPointerStamp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MetaspacePointerStamp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MethodCountersPointerStamp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MethodPointerStamp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/NarrowOopStamp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/package-info.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/AheadOfTimeVerificationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/LoadJavaMirrorWithKlassPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/OnStackReplacementPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/WriteBarrierAdditionPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/WriteBarrierVerificationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/AOTInliningPolicy.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/EliminateRedundantInitializationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/ReplaceConstantNodesPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/profiling/FinalizeProfileNodesPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/AESCryptSubstitutions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/AssertionSnippets.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/BigIntegerSubstitutions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CRC32Substitutions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CallSiteTargetNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CipherBlockChainingSubstitutions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ClassGetHubNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/EncodedSymbolConstant.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HashCodeSnippets.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotClassSubstitutions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotReplacementsUtil.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotspotSnippetsOptions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HubGetClassNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/IdentityHashCodeNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/InstanceOfSnippets.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/KlassLayoutHelperNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/LoadExceptionObjectSnippets.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/MonitorSnippets.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/NewObjectSnippets.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectCloneNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectCloneSnippets.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectSubstitutions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ReflectionGetCallerClassNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ReflectionSubstitutions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHA2Substitutions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHA5Substitutions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHASubstitutions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/StringToBytesSnippets.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ThreadSubstitutions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/TypeCheckSnippetUtils.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/UnsafeAccess.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/UnsafeLoadSnippets.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/WriteBarrierSnippets.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/aot/ResolveConstantSnippets.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyCallNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopySlowPathNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopySnippets.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyUnrollNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/CheckcastArrayCopyCallNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/UnsafeArrayCopyNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/UnsafeArrayCopySnippets.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/profiling/ProbabilisticProfileSnippets.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/profiling/ProfileSnippets.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ArrayStoreExceptionStub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ClassCastExceptionStub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/CreateExceptionStub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/DeoptimizationStub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ExceptionHandlerStub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ForeignCallStub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NewArrayStub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NewInstanceStub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NullPointerExceptionStub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/OutOfBoundsExceptionStub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/SnippetStub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/Stub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubCompilationIdentifier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubOptions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubUtil.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/UncommonTrapStub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/UnwindExceptionToCallerStub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/VerifyOopStub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/HotSpotOperation.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/HotSpotWordTypes.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/KlassPointer.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MetaspacePointer.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MethodCountersPointer.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MethodPointer.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/PointerCastNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BciBlockMapping.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BytecodeParser.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BytecodeParserOptions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/ComputeLoopFrequenciesClosure.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/DefaultSuitesProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/FrameStateBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/GraphBuilderPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/JsrNotSupportedBailout.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/JsrScope.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/LargeLocalLiveness.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/LocalLiveness.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/SmallLocalLiveness.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/SuitesProviderBase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/JTTTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/ConstantPhiTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/EmptyMethodTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/LargeConstantSectionTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aaload.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aaload_1.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aastore.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_0.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_1.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_3.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_anewarray.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_areturn.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_arraylength.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_athrow.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_baload.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_bastore.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_caload.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_castore.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2f.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2i01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2i02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dadd.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_daload.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dastore.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp05.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp06.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp07.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp08.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp09.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp10.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ddiv.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dmul.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dneg.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dneg2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_double_base.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_drem.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dreturn.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dsub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dsub2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2d.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2i01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2i02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2l01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2l02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fadd.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_faload.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fastore.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp05.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp06.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp07.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp08.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp09.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp10.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fdiv.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fload.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fload_2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_float_base.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fmul.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fneg.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_frem.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_freturn.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fsub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_b.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_c.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_d.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_f.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_i.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_l.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_o.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_s.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_z.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_b.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_c.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_d.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_f.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_i.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_l.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_s.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_z.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2b.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2c.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2d.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2f.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2l.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2s.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd3.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const0.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const1.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const3.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iaload.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iand.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iastore.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iconst.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_idiv.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_idiv2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq_2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq_3.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge_2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge_3.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifgt.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmplt1.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmplt2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmpne1.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmpne2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifle.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iflt.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifne.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull_2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull_3.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull_2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull_3.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_1.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_3.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_4.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0_1.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0_2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_1.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_1_1.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_3.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_imul.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ineg.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_instanceof.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_instanceof01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokeinterface.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokespecial.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokespecial2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokestatic.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokevirtual.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ior.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem3.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ireturn.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ishl.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ishr.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_isub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iushr.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ixor.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2d.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2f.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2i.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2i_2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ladd.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ladd2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_laload.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_land.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lastore.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lcmp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_05.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_06.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv3.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_0.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_1.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_3.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lmul.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lneg.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch05.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lor.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lrem.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lrem2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lreturn.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshl.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshr.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshr02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lsub.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lushr.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lxor.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_monitorenter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_monitorenter02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_new.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_newarray.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putstatic.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_saload.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_sastore.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch3.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch4.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_wide01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_wide02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aaload0.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aaload1.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aastore0.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aastore1.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_anewarray.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_arraylength.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow0.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow1.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow3.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_baload.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_bastore.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_caload.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_castore.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast1.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast3.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast4.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast5.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast6.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_daload.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_dastore.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_faload.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_fastore.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_getfield.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_getfield1.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_iaload.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_iastore.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_idiv.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_idiv2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokespecial01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokevirtual01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokevirtual02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_irem.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_laload.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_lastore.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_ldiv.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_ldiv2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_lrem.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_monitorenter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_multianewarray.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_newarray.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_putfield.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_saload.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_sastore.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NASE_1.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NASE_2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_00.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_05.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_06.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_07.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_08.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_09.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_10.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_11.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Locals.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized05.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Finally01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Finally02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_AIOOBE_00.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_CCE_00.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_00.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InNested.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_NPE_01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized05.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/UntrustedInterfaces.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_control01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_control02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_convert01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_count.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_dead01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_demo01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_idea.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_inline01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_inline02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_invoke01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_life.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_nest01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_nest02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_scope01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_scope02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_series.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_trees01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6186134.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6196102.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6753639.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6823354.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6850611.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6959129.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test7005594.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/CharacterBits.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Class_getName.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/DivideUnsigned.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/EnumMap01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/EnumMap02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/IntegerBits.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/LongBits.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/ShortBits.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_currentTimeMillis01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_currentTimeMillis02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_nanoTime01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_nanoTime02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_setOut.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Thread_setName.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/UnsafeAccess01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/UnsafeAllocateInstance01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Unsafe_compareAndSwap.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Unsafe_compareAndSwapNullCheck.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Boxed_TYPE_01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Bridge_method01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/ClassLoader_loadClass01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_Literal01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_asSubclass01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_cast01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_cast02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName05.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getComponentType01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getInterfaces01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getModifiers01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getModifiers02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getName01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getName02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSimpleName01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSimpleName02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSuperClass01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isArray01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance05.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance06.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance07.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInterface01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isPrimitive01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_conditional.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_toString.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_conditional.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/JDK_ClassLoaders01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/JDK_ClassLoaders02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/LambdaEagerTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_reverseBytes01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_reverseBytes02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_abs.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_cos.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_exact.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_exp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_log.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_log10.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_pow.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_round.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_sin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_sqrt.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_tan.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_clone01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_clone02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_equals01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_getClass01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_hashCode01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_hashCode02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notify01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notify02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notifyAll01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notifyAll02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_toString01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_toString02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/ProcessEnvironment_init.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/StringCoding_Scale.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_valueOf01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/System_identityHashCode01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/DegeneratedLoop.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop05.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop06.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop07.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop07_2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop08.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop09.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop09_2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop11.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop12.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop13.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop14.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop15.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop16.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop17.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopEscape.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopInline.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopLastIndexOf.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopNewInstance.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopParseLong.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopPhi.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopPhiResolutionTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopSpilling.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopSwitch01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopUnroll.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/SpillLoopPhiVariableAtDefinition.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ArrayCompare01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ArrayCompare02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BC_invokevirtual2.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigByteParams01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigDoubleParams02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigFloatParams01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigFloatParams02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigIntParams01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigIntParams02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigInterfaceParams01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigLongParams02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigObjectParams01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigObjectParams02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigParamsAlignment.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigShortParams01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigVirtualParams01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Bubblesort.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ConstantLoadTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Fibonacci.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/FloatingReads.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeVirtual_01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeVirtual_02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Matrix01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ReferenceMap01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/StrangeFrames.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/String_format01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/String_format02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_String01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_Unroll.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_boolean01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_byte01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_char01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_double01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_float01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_int01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_long01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_short01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy05.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy06.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopyGeneric.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayLength01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_idiv_16.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_idiv_4.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_imul_16.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_imul_4.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_ldiv_16.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_ldiv_4.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lmul_16.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lmul_4.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C16.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C24.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C32.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BlockSkip01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BoxingIdentity.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Cmov01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Cmov02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Conditional01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConditionalElimination01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConditionalElimination02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConvertCompare.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/DeadCode01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/DeadCode02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Cast01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Float01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Float02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_InstanceOf01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Int01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Int02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Long01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Long02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Math01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/InferStamp01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Inline01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Inline02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/LLE_01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/List_reorder_bug.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Logic0.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/LongToSomethingArray01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive05.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NestedLoop_EA.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ReassociateConstants.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Convert01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Double01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Float01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_IntShift01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_IntShift02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_LongShift01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_LongShift02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/SchedulingBug_01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/SignExtendShort.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Switch01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Switch02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/TypeCastElem.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/UnsafeDeopt.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Cast01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Cast02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Convert01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Convert02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Double01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Double02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Field01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Field02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Float01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Float02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Loop01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getBoolean01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getByte01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getChar01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getDouble01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getFloat01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getInt01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getLength01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getLong01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getShort01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance05.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance06.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setBoolean01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setByte01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setChar01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setDouble01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setFloat01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setInt01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setLong01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setShort01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getDeclaredField01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getDeclaredMethod01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getField01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getField02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getMethod01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getMethod02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance06.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance07.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_getType01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_except01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_virtual01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Method_getParameterTypes01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Method_getReturnType01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitor_contended01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitor_notowner01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitorenter01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitorenter02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/SynchronizedLoopExit01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_currentThread01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_getState01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_getState02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_holdsLock01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isAlive01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted04.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted05.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join03.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_new01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_new02.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_setPriority01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_sleep01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_yield01.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64AddressValue.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ArithmeticLIRGeneratorTool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ArithmeticOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BitManipulationOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BlockEndOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BreakpointOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Call.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Compare.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ControlFlow.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64FrameMap.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64FrameMapBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64LIRInstruction.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Move.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64PauseOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64PrefetchOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ReinterpretOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64SignExtendOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64AddressValue.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Arithmetic.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArithmeticLIRGeneratorTool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArrayEqualsOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Binary.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BinaryConsumer.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BlockEndOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BreakpointOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ByteSwapOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64CCall.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Call.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ClearRegisterOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ControlFlow.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64FrameMap.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64FrameMapBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64LIRInstruction.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MathIntrinsicBinaryOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MathIntrinsicUnaryOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Move.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MulDivOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64PauseOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64PrefetchOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ReadTimestampCounter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64RestoreRegistersOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64SaveRegistersOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ShiftOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64SignExtendOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Unary.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64VZeroUpper.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ZapRegistersOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ZapStackOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/phases/StackMoveOptimizationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/ConstantStackCastTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTestSpecification.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTestTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/SPARCBranchBailoutTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/StackMoveTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCAddressValue.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCArithmetic.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCArrayEqualsOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBitManipulationOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBlockEndOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBreakpointOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCByteSwapOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCCall.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCControlFlow.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCDelayedControlTransfer.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFloatCompareOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFrameMap.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFrameMapBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCImmediateAddressValue.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCIndexedAddressValue.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCJumpOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLIRInstruction.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLIRInstructionMixin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLoadConstantTableBaseOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCMove.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCOP3Op.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCOPFOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCPauseOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCPrefetchOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCSaveRegistersOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCTailDelayedLIRInstruction.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/CompositeValueReplacementTest1.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/GenericValueMapTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/alloc/trace/TraceGlobalMoveResolutionMappingTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/BailoutAndRestartBackendException.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/CompositeValue.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/CompositeValueClass.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ConstantValue.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ControlFlowOptimizer.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/EdgeMoveOptimizer.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/FullInfopointOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionStateProcedure.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionValueConsumer.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionValueProcedure.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIR.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRFrameState.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInsertionBuffer.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInstruction.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInstructionClass.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRIntrospection.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRValueUtil.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRVerifier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LabelRef.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/NullCheckOptimizer.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/Opcode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/RedundantMoveElimination.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/StandardOp.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/StateProcedure.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/SwitchStrategy.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ValueConsumer.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ValueProcedure.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/Variable.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/VirtualStackSlot.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/AllocationStageVerifier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/OutOfRegistersException.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/SaveCalleeSaveRegisters.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/Interval.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/IntervalWalker.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScan.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanAssignLocationsPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanEliminateSpillMovePhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanIntervalDumper.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanLifetimeAnalysisPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanOptimizeSpillPositionPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanRegisterAllocationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanResolveDataFlowPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanWalker.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/MoveResolver.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/OptimizingLinearScanWalker.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/Range.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/RegisterVerifier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScan.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanEliminateSpillMovePhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanLifetimeAnalysisPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanResolveDataFlowPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSAMoveResolver.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/DefaultTraceRegisterAllocationPolicy.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/ShadowedRegisterValue.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceAllocationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceBuilderPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceGlobalMoveResolutionPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceGlobalMoveResolver.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceRegisterAllocationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceRegisterAllocationPolicy.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceUtil.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TrivialTraceAllocator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/bu/BottomUpAllocator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/FixedInterval.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/FixedRange.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/IntervalHint.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/RegisterVerifier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceInterval.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceIntervalWalker.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanAllocationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanAssignLocationsPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanEliminateSpillMovePhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanLifetimeAnalysisPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanRegisterAllocationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanResolveDataFlowPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanWalker.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLocalMoveResolver.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/ArrayDataPointerConstant.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilderFactory.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/DataBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/FrameContext.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantLoadOptimization.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantTree.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantTreeAnalyzer.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/DefUseTree.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/UseEntry.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/VariableMap.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/debug/IntervalDumper.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/debug/LIRGenerationDebugContext.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/LocationMarker.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/LocationMarkerPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/MarkBasePointersPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/RegStackValueSet.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/UniqueWorkList.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMap.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilderImpl.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilderTool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/ReferenceMapBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/SimpleVirtualStackSlot.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/VirtualStackSlotRange.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/ArithmeticLIRGenerator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/ArithmeticLIRGeneratorTool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/BlockValueMap.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/DiagnosticLIRGeneratorTool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGenerationResult.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGenerator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGeneratorTool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/PhiResolver.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/VerifyingMoveFactory.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/AllocationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/AllocationStage.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyAllocationStage.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyPostAllocationOptimizationStage.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyPreAllocationOptimizationStage.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/GenericContext.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRPhaseSuite.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRSuites.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PostAllocationOptimizationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PostAllocationOptimizationStage.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PreAllocationOptimizationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PreAllocationOptimizationStage.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MethodProfilingPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveProfiler.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveProfilingPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveType.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssa/SSAUtil.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssa/SSAVerifier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/FastSSIBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIBuilderBase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIConstructionPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIUtil.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIVerifier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/FixPointIntervalBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/LSStackSlotAllocator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/SimpleStackSlotAllocator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackInterval.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackIntervalDumper.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackSlotAllocatorUtil.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/GenericValueMap.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/IndexedValueMap.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/RegisterMap.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/ValueMap.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/ValueSet.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/VariableVirtualStackValueMap.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/ContextlessLoopPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopFullUnrollPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopPeelingPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopSafepointEliminationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopTransformations.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopUnswitchingPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/ReassociateInvariantPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/BasicInductionVariable.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/CountedLoopInfo.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DefaultLoopPolicies.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedConvertedInductionVariable.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedInductionVariable.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedOffsetInductionVariable.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedScaledInductionVariable.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/InductionVariable.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopEx.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragment.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInside.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInsideBefore.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInsideFrom.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentWhole.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopPolicies.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopsData.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/MathUtil.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/ArrayDuplicationBenchmark.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/GuardedIntrinsicBenchmark.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/MathFunctionBenchmark.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/SimpleSyncBenchmark.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/package-info.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/ConditionalEliminationBenchmark.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/FrameStateAssigmentPhaseBenchmark.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/GraalBenchmark.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/GraphCopyBenchmark.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/NodeBenchmark.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/SchedulePhaseBenchmark.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/TestJMH.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/FrameStateAssignmentState.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraalState.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraalUtil.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraphState.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/MethodSpec.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/NodesState.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/ScheduleState.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/CompileTimeBenchmark.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/GraalCompilerState.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/RegisterAllocationTimeBenchmark.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/ControlFlowGraphState.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/TraceBuilderBenchmark.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/TraceLSRAIntervalBuildingBench.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodeinfo.processor/src/META-INF/services/javax.annotation.processing.Processor (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/ElementException.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/GraphNodeProcessor.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/GraphNodeVerifier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/InputType.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeCycles.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeInfo.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeSize.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/StructuralInput.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/Verbosity.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/AbstractObjectStampTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/IfNodeCanonicalizationTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/IntegerStampTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/LoopLivenessTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/LoopPhiCanonicalizerTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/NegateNodeCanonicalizationTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampJoinTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampMeetTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampDoubleToLongTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampFloatToIntTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampIntToFloatTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampLongToDoubleTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ShortCircuitOrNodeTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractBeginNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractDeoptimizeNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractEndNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractFixedGuardNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractLocalNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractMergeNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractStateSplit.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ArithmeticOperation.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BeginNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BeginStateSplitNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BinaryOpLogicNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BreakpointNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/CallTargetNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/CanonicalizableLocation.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ConditionAnchorNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ConstantNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ControlSinkNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ControlSplitNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizeNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingFixedWithNextNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingGuard.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DirectCallTargetNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DynamicDeoptimizeNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DynamicPiNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EncodedGraph.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EndNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EntryMarkerNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EntryProxyNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FieldLocationIdentity.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedGuardNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedNodeInterface.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedWithNextNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FloatingAnchoredNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FloatingGuardedNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FrameState.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FullInfopointNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GraphDecoder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GraphEncoder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardPhiNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardProxyNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardedValueNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IfNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IndirectCallTargetNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/Invoke.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/InvokeNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/InvokeWithExceptionNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/KillingBeginNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicConstantNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicNegationNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopBeginNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopEndNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopExitNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoweredCallTargetNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/MergeNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/NamedLocationIdentity.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ParameterNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PauseNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PhiNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PiArrayNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PiNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PrefetchAllocateNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ProxyNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ReturnNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/SafepointNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ShortCircuitOrNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/SimplifyingGraphDecoder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StartNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StateSplit.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StructuredGraph.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/TypeCheckHints.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/UnaryOpLogicNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/UnwindNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNodeInterface.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNodeUtil.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValuePhiNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueProxyNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/VirtualState.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AbsNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AddNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AndNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/BinaryArithmeticNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/BinaryNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/CompareNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ConditionalNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ConvertNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/DivNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FixedBinaryNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatConvertNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatEqualsNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatLessThanNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatingNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerBelowNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerConvertNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerDivRemNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerEqualsNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerLessThanNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerTestNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IsNullNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/LeftShiftNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/MulNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NarrowNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NarrowableArithmeticNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NegateNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NormalizeCompareNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NotNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ObjectEqualsNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/OrNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/PointerEqualsNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ReinterpretNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/RemNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/RightShiftNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ShiftNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignExtendNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignedDivNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignedRemNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SqrtNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SubNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnaryArithmeticNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnaryNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedDivNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedRemNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedRightShiftNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/XorNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ZeroExtendNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/Block.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/ControlFlowGraph.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/HIRLoop.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/LocationSet.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/BindToRegisterNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/BlackholeNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/ControlFlowAnchorNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/ControlFlowAnchored.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/DynamicCounterNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/OpaqueNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/SpillRegistersNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/StringToBytesNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/VerifyHeapNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/WeakCounterNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationBeginNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationEndNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationInliningCallback.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/IsMethodInlinedNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/MonitorProxyNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/RootNameNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/AnchoringNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ArrayRangeWriteNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BoxNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BranchProbabilityNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BytecodeExceptionNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/FixedValueAnchorNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ForeignCallNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GetClassNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardedNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardedUnsafeLoadNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardingNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/IntegerSwitchNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/JavaReadNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/JavaWriteNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/LoadHubNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/LoadMethodNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MembarNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MonitorEnter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MonitorExit.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/NullCheckNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/OSRLocalNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/OSRStartNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/StoreHubNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/SwitchNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnboxNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeAccessNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeCopyNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeLoadNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeMemoryLoadNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeMemoryStoreNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeStoreNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ValueAnchorNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ClassInitializationPlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ForeignCallPlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GeneratedInvocationPlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderConfiguration.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderContext.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderPlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderTool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InlineInvokePlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/IntrinsicContext.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugins.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/LoopExplosionPlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/MethodSubstitutionPlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/NodeIntrinsicPluginFactory.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/NodePlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ParameterPlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ProfilingPlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/TypePlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AbstractNewArrayNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AbstractNewObjectNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessArrayNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessFieldNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessIndexedNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessMonitorNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ArrayLengthNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AtomicReadAndAddNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AtomicReadAndWriteNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ClassIsAssignableFromNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/CompareAndSwapNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/DynamicNewArrayNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/DynamicNewInstanceNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ExceptionObjectNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/FinalFieldBarrierNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ForeignCallDescriptors.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/InstanceOfDynamicNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/InstanceOfNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadExceptionObjectNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadFieldNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadIndexedNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoweredAtomicReadAndWriteNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoweredCompareAndSwapNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MethodCallTargetNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorEnterNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorExitNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorIdNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewArrayNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewInstanceNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewMultiArrayNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/RawMonitorEnterNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/RegisterFinalizerNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/StoreFieldNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/StoreIndexedNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/TypeSwitchNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/AbstractMemoryCheckpoint.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/AbstractWriteNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/Access.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FixedAccessNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatableAccessNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatingAccessNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatingReadNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/HeapAccess.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryAccess.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryAnchorNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryCheckpoint.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryMap.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryMapNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryPhiNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/ReadNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/WriteNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/AddressNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/OffsetAddressNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/RawAddressNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ArithmeticLIRLowerable.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ArrayLengthProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/DefaultNodeCostProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LIRLowerable.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LimitedValueProxy.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Lowerable.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LoweringProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LoweringTool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/MemoryProxy.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeCostProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeLIRBuilderTool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeValueMap.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeWithState.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/PiPushable.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Proxy.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Replacements.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/StampProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/UncheckedInterfaceProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ValueProxy.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Virtualizable.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/VirtualizableAllocation.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/VirtualizerTool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/type/StampTool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/util/ConstantFoldUtil.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/util/GraphUtil.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/AllocatedObjectNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/CommitAllocationNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/EnsureVirtualizedNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/EscapeObjectState.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/LockState.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualArrayNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualBoxingNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualInstanceNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualObjectNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.options.processor/src/META-INF/services/javax.annotation.processing.Processor (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.options.processor/src/org/graalvm/compiler/options/processor/OptionProcessor.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.options.test/src/org/graalvm/compiler/options/test/NestedBooleanOptionValueTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.options.test/src/org/graalvm/compiler/options/test/TestOptionValue.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/DerivedOptionValue.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/EnumOptionValue.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/NestedBooleanOptionValue.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/Option.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionDescriptor.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionDescriptors.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionType.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionValue.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionsParser.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/StableOptionValue.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/UniquePathUtilities.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common.test/src/org/graalvm/compiler/phases/common/test/StampFactoryTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/AbstractInliningPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/AddressLoweringPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/CanonicalizerPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ConvertDeoptimizeToGuardPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DeadCodeEliminationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DeoptimizationGroupingPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DominatorConditionalEliminationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ExpandLogicPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/FloatingReadPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/FrameStateAssignmentPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/GuardLoweringPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/IncrementalCanonicalizerPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/IterativeConditionalEliminationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LazyValue.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LockEliminationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LoopSafepointInsertionPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LoweringPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/NonNullParametersPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/OptimizeGuardAnchorsPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ProfileCompiledMethodsPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/PushThroughPiPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/RemoveValueProxyPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/UseTrappingNullChecksPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ValueAnchorCleanupPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/VerifyHeapAtReturnPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/InliningPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/InliningUtil.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/AbstractInlineInfo.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/AssumptionInlineInfo.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/ExactInlineInfo.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/InlineInfo.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/MultiTypeGuardInlineInfo.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/TypeGuardInlineInfo.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/elem/Inlineable.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/elem/InlineableGraph.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/AbstractInliningPolicy.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/GreedyInliningPolicy.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InlineEverythingPolicy.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InlineMethodSubstitutionsPolicy.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InliningPolicy.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/CallsiteHolder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/CallsiteHolderExplorable.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/ComputeInliningRelevance.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/InliningData.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/InliningIterator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/MethodInvocation.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/ExtractInstrumentationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/HighTierReconcileInstrumentationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/InlineInstrumentationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/MidTierReconcileInstrumentationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/util/HashSetNodeEventListener.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/BasePhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/LazyName.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/OptimisticOptimizations.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/Phase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/PhaseSuite.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/VerifyPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/contract/NodeCostUtil.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/contract/PhaseSizeContract.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/FixedNodeProbabilityCache.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/InferStamps.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/MergeableState.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/PostOrderNodeIterator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ReentrantBlockIterator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ReentrantNodeIterator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ScheduledNodeIterator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ScopedPostOrderNodeIterator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/SinglePassNodeIterator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/StatelessPostOrderNodeIterator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/package-info.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/package-info.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/BlockClosure.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/MemoryScheduleVerification.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/SchedulePhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/CompilerConfiguration.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/HighTierContext.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/LowTierContext.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/MidTierContext.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/PhaseContext.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/Suites.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/SuitesCreator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/SuitesProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/TargetProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/BlockWorkList.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/GraphOrder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/MethodDebugValueName.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/Providers.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyBailoutUsage.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyCallerSensitiveMethods.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyDebugUsage.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyUpdateUsages.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyUsageWithEquals.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyVirtualizableUsage.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/BasicIdealGraphPrinter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/BinaryGraphPrinter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CFGPrinter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CFGPrinterObserver.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CanonicalStringGraphPrinter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CompilationPrinter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraalDebugConfigCustomizer.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinterDumpHandler.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/IdealGraphPrinter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/NoDeadCodeVerifyHandler.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64CountLeadingZerosNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64FloatArithmeticSnippets.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64GraphBuilderPlugins.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64IntegerArithmeticSnippets.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64IntegerSubstitutions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64LongSubstitutions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64ConvertSnippets.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64CountLeadingZerosNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64CountTrailingZerosNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64FloatConvertNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64GraphBuilderPlugins.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64MathSubstitutions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64RoundNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.sparc/src/org/graalvm/compiler/replacements/sparc/SPARCGraphBuilderPlugins.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ArrayStoreBytecodeExceptionTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ArraysSubstitutionsTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/BitOpNodesTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/BytecodeExceptionTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ClassCastBytecodeExceptionTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/CompiledExceptionHandlerTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/CompiledNullPointerExceptionTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DeoptimizeOnExceptionTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DerivedOopTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DynamicNewArrayTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/EdgesTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/FoldTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IndexOobBytecodeExceptionTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InstanceOfDynamicTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InstanceOfTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerMulExactFoldTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerSubOverflowsTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InvokeTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MethodSubstitutionTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MonitorTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewArrayTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewInstanceTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewMultiArrayTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NullBytecodeExceptionTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ObjectAccessTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PEGraphDecoderTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PointerTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PointerTrackingTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ReplacementsParseTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StandardMethodSubstitutionsTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringEqualsConstantTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringHashConstantTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringSubstitutionsTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/SubstitutionsTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/TypeCheckTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsafeSubstitutionsTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsignedIntegerTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsignedMathTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnwindExceptionToCallerTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/WordTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/classfile/ClassfileBytecodeProviderTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/classfile/RedefineIntrinsicTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.verifier/src/META-INF/services/javax.annotation.processing.Processor (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/APHotSpotSignature.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/AbstractVerifier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/ClassSubstitutionVerifier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/FoldVerifier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedFoldPlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedNodeIntrinsicPlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedPlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/InjectedDependencies.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/MethodSubstitutionVerifier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/NodeIntrinsicVerifier.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/PluginGenerator.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/VerifierAnnotationProcessor.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ArraySubstitutions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ArraysSubstitutions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/BoxingSnippets.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/CachingPEGraphDecoder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ConstantBindingParameterPlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/DefaultJavaLoweringProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/GraphKit.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InlineDuringParsingPlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InlineGraalDirectivesPlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InstanceOfSnippetsTemplates.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/IntegerSubstitutions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/IntrinsicGraphBuilder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/JavacBug.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/Log.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/LongSubstitutions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/MethodHandlePlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/NodeIntrinsificationProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/PEGraphDecoder.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ReplacementsImpl.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ReplacementsUtil.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetCounter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetCounterNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetTemplate.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/Snippets.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StringSubstitutions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/WordOperationPlugin.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileBytecode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileBytecodeProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileConstant.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileConstantPool.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ArrayEqualsNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/AssertionNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BasicArrayCopyNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BasicObjectCloneNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BinaryMathIntrinsicNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitCountNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitScanForwardNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitScanReverseNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/CStringConstant.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/DirectObjectStoreNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/DirectStoreNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ExplodeLoopNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/LoadSnippetVarargParameterNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MacroNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MacroStateSplitNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MethodHandleNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/PureFunctionMacroNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ReadRegisterNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ResolvedMethodHandleCallTargetNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ReverseBytesNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/UnaryMathIntrinsicNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/VirtualizableInvokeMacroNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/WriteRegisterNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerAddExactNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerAddExactSplitNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerExactArithmeticNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerExactArithmeticSplitNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulExactNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulExactSplitNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulHighNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerSubExactNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerSubExactSplitNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/UnsignedMulHighNode.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.runtime/src/org/graalvm/compiler/runtime/RuntimeProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/Salver.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/SalverDebugConfigCustomizer.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/SalverOptions.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/data/DataDict.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/data/DataList.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractGraalDumper.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractMethodScopeDumper.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractSerializerDumper.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/Dumper.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/GraphDumper.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/AbstractDumpHandler.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/AbstractGraalDumpHandler.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/DumpHandler.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/GraphDumpHandler.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/package-info.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/AbstractSerializer.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/JSONSerializer.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/Serializer.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/util/ECIDUtil.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/util/MethodContext.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/writer/ChannelDumpWriter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/writer/DumpWriter.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.serviceprovider.processor/src/META-INF/services/javax.annotation.processing.Processor (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.serviceprovider.processor/src/org/graalvm/compiler/serviceprovider/processor/ServiceProviderProcessor.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/GraalServices.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/ServiceProvider.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/ExportingClassLoader.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/GraalTest.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/JLRModule.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/SubprocessUtil.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.virtual.bench/.checkstyle.exclude (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.virtual.bench/src/org/graalvm/compiler/virtual/bench/PartialEscapeBench.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/nodes/MaterializedObjectState.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/nodes/VirtualObjectState.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EarlyReadEliminationPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectList.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsBlockState.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsClosure.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsPhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/GraphEffectList.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ObjectState.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PEReadEliminationBlockState.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PEReadEliminationClosure.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapeBlockState.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapeClosure.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapePhase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationBlockState.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationClosure.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/VirtualUtil.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/VirtualizerToolImpl.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/AtomicUnsigned.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/AtomicWord.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/BarrieredAccess.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/ComparableWord.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/ObjectAccess.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Pointer.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/PointerBase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/PointerUtils.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Signed.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/UnsafeAccess.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Unsigned.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/UnsignedUtils.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Word.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/WordBase.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/WordTypes.java (100%) rename hotspot/src/{jdk.vm.compiler => jdk.internal.vm.compiler}/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/nodes/WordCastNode.java (100%) rename hotspot/test/compiler/jvmci/common/patches/{jdk.vm.ci => jdk.internal.vm.ci}/jdk/vm/ci/hotspot/CompilerToVMHelper.java (100%) rename hotspot/test/compiler/jvmci/common/patches/{jdk.vm.ci => jdk.internal.vm.ci}/jdk/vm/ci/hotspot/MetaAccessWrapper.java (100%) rename hotspot/test/compiler/jvmci/common/patches/{jdk.vm.ci => jdk.internal.vm.ci}/jdk/vm/ci/hotspot/PublicMetaspaceWrapperObject.java (100%) diff --git a/hotspot/.hgignore b/hotspot/.hgignore index 0c053adb87c..db11ccf9c54 100644 --- a/hotspot/.hgignore +++ b/hotspot/.hgignore @@ -15,10 +15,10 @@ ^\.mx.jvmci/hotspot/eclipse/.* ^\.idea/ ^workingsets.xml -^src/jdk.vm.ci/share/classes/\w[\w\.]*/.*\.xml -^src/jdk.vm.ci/share/classes/\w[\w\.]*/.*\.iml -^src/jdk.vm.ci/share/classes/\w[\w\.]*/nbproject -^src/jdk.vm.ci/share/classes/\w[\w\.]*/\..* +^src/jdk.internal.vm.ci/share/classes/\w[\w\.]*/.*\.xml +^src/jdk.internal.vm.ci/share/classes/\w[\w\.]*/.*\.iml +^src/jdk.internal.vm.ci/share/classes/\w[\w\.]*/nbproject +^src/jdk.internal.vm.ci/share/classes/\w[\w\.]*/\..* ^test/compiler/jvmci/\w[\w\.]*/.*\.xml ^test/compiler/jvmci/\w[\w\.]*/.*\.iml ^test/compiler/jvmci/\w[\w\.]*/nbproject @@ -27,15 +27,15 @@ ^test/compiler/aot/\w[\w\.]*/.*\.iml ^test/compiler/aot/\w[\w\.]*/nbproject ^test/compiler/aot/\w[\w\.]*/\..* -^src/jdk.vm.compiler/\.mx.graal/env -^src/jdk.vm.compiler/\.mx.graal/.*\.pyc -^src/jdk.vm.compiler/\.mx.graal/eclipse-launches/.* +^src/jdk.internal.vm.compiler/\.mx.graal/env +^src/jdk.internal.vm.compiler/\.mx.graal/.*\.pyc +^src/jdk.internal.vm.compiler/\.mx.graal/eclipse-launches/.* ^src/jdk.aot/share/classes/\w[\w\.]*/.*\.xml ^src/jdk.aot/share/classes/\w[\w\.]*/.*\.iml ^src/jdk.aot/share/classes/\w[\w\.]*/nbproject ^src/jdk.aot/share/classes/\w[\w\.]*/\..* -^src/jdk.vm.compiler/share/classes/\w[\w\.]*/.*\.xml -^src/jdk.vm.compiler/share/classes/\w[\w\.]*/.*\.iml -^src/jdk.vm.compiler/share/classes/\w[\w\.]*/nbproject -^src/jdk.vm.compiler/share/classes/\w[\w\.]*/\..* +^src/jdk.internal.vm.compiler/share/classes/\w[\w\.]*/.*\.xml +^src/jdk.internal.vm.compiler/share/classes/\w[\w\.]*/.*\.iml +^src/jdk.internal.vm.compiler/share/classes/\w[\w\.]*/nbproject +^src/jdk.internal.vm.compiler/share/classes/\w[\w\.]*/\..* diff --git a/hotspot/make/CompileTools.gmk b/hotspot/make/CompileTools.gmk index ea6c504e283..c80632226cf 100644 --- a/hotspot/make/CompileTools.gmk +++ b/hotspot/make/CompileTools.gmk @@ -38,9 +38,9 @@ TARGETS := $(eval $(call IncludeCustomExtension, hotspot, CompileTools.gmk)) ifeq ($(INCLUDE_GRAAL), true) - VM_CI_SRC_DIR := $(HOTSPOT_TOPDIR)/src/jdk.vm.ci/share/classes + VM_CI_SRC_DIR := $(HOTSPOT_TOPDIR)/src/jdk.internal.vm.ci/share/classes - SRC_DIR := $(HOTSPOT_TOPDIR)/src/jdk.vm.compiler/share/classes + SRC_DIR := $(HOTSPOT_TOPDIR)/src/jdk.internal.vm.compiler/share/classes ############################################################################## # Compile the annotation processors diff --git a/hotspot/make/gensrc/Gensrc-jdk.vm.compiler.gmk b/hotspot/make/gensrc/Gensrc-jdk.internal.vm.compiler.gmk similarity index 78% rename from hotspot/make/gensrc/Gensrc-jdk.vm.compiler.gmk rename to hotspot/make/gensrc/Gensrc-jdk.internal.vm.compiler.gmk index f12a2e9a5a2..268a6b237a1 100644 --- a/hotspot/make/gensrc/Gensrc-jdk.vm.compiler.gmk +++ b/hotspot/make/gensrc/Gensrc-jdk.internal.vm.compiler.gmk @@ -28,7 +28,7 @@ default: all include $(SPEC) include MakeBase.gmk -$(eval $(call IncludeCustomExtension, hotspot, gensrc/Gensrc-jdk.vm.compiler.gmk)) +$(eval $(call IncludeCustomExtension, hotspot, gensrc/Gensrc-jdk.internal.vm.compiler.gmk)) GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE) SRC_DIR := $(HOTSPOT_TOPDIR)/src/$(MODULE)/share/classes @@ -81,23 +81,23 @@ PROCESSOR_JARS := \ PROCESSOR_PATH := $(call PathList, $(PROCESSOR_JARS)) ADD_EXPORTS := \ - --add-exports jdk.vm.ci/jdk.vm.ci.aarch64=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.amd64=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.code=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.code.site=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.code.stack=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.common=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.hotspot=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.hotspot.aarch64=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.hotspot.amd64=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.hotspot.events=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.hotspot.sparc=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.hotspotvmconfig=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.inittimer=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.meta=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.runtime=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.services=ALL-UNNAMED \ - --add-exports jdk.vm.ci/jdk.vm.ci.sparc=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.aarch64=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.amd64=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.code=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.code.site=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.code.stack=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.common=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.events=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.sparc=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspotvmconfig=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.inittimer=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.meta=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.runtime=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.services=ALL-UNNAMED \ + --add-exports jdk.internal.vm.ci/jdk.vm.ci.sparc=ALL-UNNAMED \ # $(GENSRC_DIR)/_gensrc_proc_done: $(PROC_SRCS) $(PROCESSOR_JARS) @@ -138,7 +138,7 @@ $(GENSRC_DIR)/module-info.java.extra: $(GENSRC_DIR)/_gensrc_proc_done $(ECHO) "uses org.graalvm.compiler.options.OptionDescriptors;" >> $@; \ $(ECHO) "provides org.graalvm.compiler.options.OptionDescriptors with" >> $@; \ for i in $$($(FIND) $(GENSRC_DIR) -name '*_OptionDescriptors.java'); do \ - c=$$($(ECHO) $$i | $(SED) 's:.*/jdk\.vm\.compiler/\(.*\)\.java:\1:' | $(TR) '/' '.'); \ + c=$$($(ECHO) $$i | $(SED) 's:.*/jdk\.internal\.vm\.compiler/\(.*\)\.java:\1:' | $(TR) '/' '.'); \ $(ECHO) " $$c," >> $@; \ done; \ $(ECHO) " ;" >> $@; diff --git a/hotspot/make/ide/CreateVSProject.gmk b/hotspot/make/ide/CreateVSProject.gmk index db0aca87e28..2a9da913ab7 100644 --- a/hotspot/make/ide/CreateVSProject.gmk +++ b/hotspot/make/ide/CreateVSProject.gmk @@ -112,8 +112,10 @@ ifeq ($(OPENJDK_TARGET_OS), windows) -relativeSrcInclude src \ -hidePath .hg \ -hidePath .jcheck \ + -hidePath jdk.aot \ -hidePath jdk.hotspot.agent \ - -hidePath jdk.vm.ci \ + -hidePath jdk.internal.vm.ci \ + -hidePath jdk.internal.vm.compiler \ -hidePath jdk.jfr \ -compiler VC10 \ -jdkTargetRoot $(call FixPath, $(JDK_OUTPUTDIR)) \ diff --git a/hotspot/src/jdk.aot/share/classes/module-info.java b/hotspot/src/jdk.aot/share/classes/module-info.java index 3105d8b6bef..14d11197356 100644 --- a/hotspot/src/jdk.aot/share/classes/module-info.java +++ b/hotspot/src/jdk.aot/share/classes/module-info.java @@ -25,6 +25,6 @@ module jdk.aot { requires jdk.management; - requires jdk.vm.ci; - requires jdk.vm.compiler; + requires jdk.internal.vm.ci; + requires jdk.internal.vm.compiler; } diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.aarch64/src/jdk/vm/ci/aarch64/AArch64.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.aarch64/src/jdk/vm/ci/aarch64/AArch64.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.aarch64/src/jdk/vm/ci/aarch64/AArch64.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.aarch64/src/jdk/vm/ci/aarch64/AArch64.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.aarch64/src/jdk/vm/ci/aarch64/AArch64Kind.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.aarch64/src/jdk/vm/ci/aarch64/AArch64Kind.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.aarch64/src/jdk/vm/ci/aarch64/AArch64Kind.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.aarch64/src/jdk/vm/ci/aarch64/AArch64Kind.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/AMD64.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/AMD64.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/AMD64.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/AMD64.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/AMD64Kind.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/AMD64Kind.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/AMD64Kind.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/AMD64Kind.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/overview.html b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/overview.html similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/overview.html rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/overview.html diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Architecture.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Architecture.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Architecture.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Architecture.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BailoutException.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BailoutException.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BailoutException.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BailoutException.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodeFrame.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodeFrame.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodeFrame.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodeFrame.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodePosition.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodePosition.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodePosition.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodePosition.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CallingConvention.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CallingConvention.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CallingConvention.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CallingConvention.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CodeCacheProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CodeCacheProvider.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CodeCacheProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CodeCacheProvider.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CodeUtil.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CodeUtil.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CodeUtil.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CodeUtil.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationRequest.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationRequest.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationRequest.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationRequest.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationRequestResult.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationRequestResult.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationRequestResult.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationRequestResult.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompiledCode.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompiledCode.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompiledCode.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/CompiledCode.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/DebugInfo.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/DebugInfo.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/DebugInfo.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/DebugInfo.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/InstalledCode.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/InstalledCode.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/InstalledCode.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/InstalledCode.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/InvalidInstalledCodeException.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/InvalidInstalledCodeException.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/InvalidInstalledCodeException.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/InvalidInstalledCodeException.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Location.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Location.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Location.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Location.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/MemoryBarriers.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/MemoryBarriers.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/MemoryBarriers.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/MemoryBarriers.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ReferenceMap.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ReferenceMap.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ReferenceMap.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ReferenceMap.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Register.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Register.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Register.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/Register.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterArray.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterArray.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterArray.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterArray.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterAttributes.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterAttributes.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterAttributes.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterAttributes.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterConfig.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterConfig.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterConfig.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterConfig.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterSaveLayout.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterSaveLayout.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterSaveLayout.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterSaveLayout.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterValue.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterValue.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterValue.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/RegisterValue.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/StackLockValue.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/StackLockValue.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/StackLockValue.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/StackLockValue.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/StackSlot.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/StackSlot.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/StackSlot.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/StackSlot.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/SuppressFBWarnings.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/SuppressFBWarnings.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/SuppressFBWarnings.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/SuppressFBWarnings.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/TargetDescription.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/TargetDescription.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/TargetDescription.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/TargetDescription.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ValueKindFactory.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ValueKindFactory.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ValueKindFactory.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ValueKindFactory.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ValueUtil.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ValueUtil.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ValueUtil.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/ValueUtil.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/VirtualObject.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/VirtualObject.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/VirtualObject.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/VirtualObject.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/package-info.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/package-info.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/package-info.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/package-info.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Call.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Call.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Call.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Call.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/ConstantReference.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/ConstantReference.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/ConstantReference.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/ConstantReference.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataPatch.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataPatch.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataPatch.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataPatch.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataSectionReference.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataSectionReference.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataSectionReference.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/DataSectionReference.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/ExceptionHandler.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/ExceptionHandler.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/ExceptionHandler.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/ExceptionHandler.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Infopoint.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Infopoint.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Infopoint.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Infopoint.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/InfopointReason.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/InfopointReason.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/InfopointReason.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/InfopointReason.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Mark.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Mark.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Mark.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Mark.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Reference.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Reference.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Reference.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Reference.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Site.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Site.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Site.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Site.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/InspectedFrame.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/InspectedFrame.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/InspectedFrame.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/InspectedFrame.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/InspectedFrameVisitor.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/InspectedFrameVisitor.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/InspectedFrameVisitor.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/InspectedFrameVisitor.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/StackIntrospection.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/StackIntrospection.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/StackIntrospection.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/StackIntrospection.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/InitTimer.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/InitTimer.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/InitTimer.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/InitTimer.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/JVMCIError.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/JVMCIError.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/JVMCIError.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/JVMCIError.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/SuppressFBWarnings.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/SuppressFBWarnings.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/SuppressFBWarnings.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/SuppressFBWarnings.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotJVMCIBackendFactory.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotJVMCIBackendFactory.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotJVMCIBackendFactory.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotJVMCIBackendFactory.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotRegisterConfig.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotRegisterConfig.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotRegisterConfig.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotRegisterConfig.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotVMConfig.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotVMConfig.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotVMConfig.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotVMConfig.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotJVMCIBackendFactory.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotJVMCIBackendFactory.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotJVMCIBackendFactory.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotJVMCIBackendFactory.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotRegisterConfig.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotRegisterConfig.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotRegisterConfig.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotRegisterConfig.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotVMConfig.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotVMConfig.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotVMConfig.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotVMConfig.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotJVMCIBackendFactory.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotJVMCIBackendFactory.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotJVMCIBackendFactory.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotJVMCIBackendFactory.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotRegisterConfig.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotRegisterConfig.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotRegisterConfig.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotRegisterConfig.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotVMConfig.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotVMConfig.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotVMConfig.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotVMConfig.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EmptyEventProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EmptyEventProvider.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EmptyEventProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EmptyEventProvider.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EventProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EventProvider.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EventProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EventProvider.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCallingConventionType.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCallingConventionType.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCallingConventionType.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCallingConventionType.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompilationRequest.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompilationRequest.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompilationRequest.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompilationRequest.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompilationRequestResult.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompilationRequestResult.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompilationRequestResult.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompilationRequestResult.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledCode.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledCode.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledCode.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledCode.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledNmethod.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledNmethod.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledNmethod.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledNmethod.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompressedNullConstant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompressedNullConstant.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompressedNullConstant.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompressedNullConstant.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstant.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstant.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstant.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotForeignCallTarget.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotForeignCallTarget.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotForeignCallTarget.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotForeignCallTarget.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotInstalledCode.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotInstalledCode.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotInstalledCode.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotInstalledCode.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIBackendFactory.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIBackendFactory.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIBackendFactory.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIBackendFactory.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerConfig.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerConfig.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerConfig.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerConfig.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerFactory.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerFactory.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerFactory.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerFactory.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIMetaAccessContext.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIMetaAccessContext.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIMetaAccessContext.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIMetaAccessContext.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntimeProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntimeProvider.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntimeProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntimeProvider.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJavaType.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJavaType.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJavaType.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJavaType.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProvider.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProvider.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProviderImpl.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProviderImpl.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProviderImpl.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProviderImpl.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaAccessProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaAccessProvider.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaAccessProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaAccessProvider.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaData.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaData.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaData.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaData.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaspaceConstant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaspaceConstant.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaspaceConstant.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaspaceConstant.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaspaceConstantImpl.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaspaceConstantImpl.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaspaceConstantImpl.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMetaspaceConstantImpl.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethod.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethod.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethod.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethod.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodData.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodData.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodData.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodData.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodDataAccessor.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodDataAccessor.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodDataAccessor.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodDataAccessor.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodHandleAccessProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodHandleAccessProvider.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodHandleAccessProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodHandleAccessProvider.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodUnresolved.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodUnresolved.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodUnresolved.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodUnresolved.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotModifiers.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotModifiers.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotModifiers.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotModifiers.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotNmethod.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotNmethod.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotNmethod.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotNmethod.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotObjectConstant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotObjectConstant.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotObjectConstant.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotObjectConstant.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotObjectConstantImpl.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotObjectConstantImpl.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotObjectConstantImpl.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotObjectConstantImpl.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotProfilingInfo.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotProfilingInfo.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotProfilingInfo.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotProfilingInfo.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotReferenceMap.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotReferenceMap.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotReferenceMap.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotReferenceMap.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaField.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaField.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaField.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaField.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethod.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethod.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethod.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethod.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaType.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaType.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaType.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaType.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectType.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectType.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectType.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectType.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedPrimitiveType.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedPrimitiveType.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedPrimitiveType.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedPrimitiveType.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotRuntimeStub.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotRuntimeStub.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotRuntimeStub.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotRuntimeStub.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSentinelConstant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSentinelConstant.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSentinelConstant.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSentinelConstant.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSignature.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSignature.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSignature.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSignature.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSpeculationLog.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSpeculationLog.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSpeculationLog.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSpeculationLog.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotStackFrameReference.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotStackFrameReference.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotStackFrameReference.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotStackFrameReference.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotStackIntrospection.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotStackIntrospection.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotStackIntrospection.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotStackIntrospection.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotUnresolvedField.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotUnresolvedField.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotUnresolvedField.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotUnresolvedField.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotUnresolvedJavaType.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotUnresolvedJavaType.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotUnresolvedJavaType.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotUnresolvedJavaType.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigStore.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigStore.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigStore.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigStore.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMEventListener.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMEventListener.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMEventListener.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMEventListener.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/MetaspaceWrapperObject.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/MetaspaceWrapperObject.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/MetaspaceWrapperObject.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/MetaspaceWrapperObject.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/SuppressFBWarnings.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/SuppressFBWarnings.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/SuppressFBWarnings.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/SuppressFBWarnings.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/UnsafeAccess.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/UnsafeAccess.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/UnsafeAccess.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/UnsafeAccess.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMField.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMField.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMField.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMField.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMFlag.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMFlag.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMFlag.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMFlag.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMIntrinsicMethod.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMIntrinsicMethod.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMIntrinsicMethod.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/VMIntrinsicMethod.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/overview.html b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/overview.html similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/overview.html rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/overview.html diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AbstractJavaProfile.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AbstractJavaProfile.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AbstractJavaProfile.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AbstractJavaProfile.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AbstractProfiledItem.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AbstractProfiledItem.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AbstractProfiledItem.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AbstractProfiledItem.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AllocatableValue.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AllocatableValue.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AllocatableValue.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/AllocatableValue.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Assumptions.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Assumptions.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Assumptions.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Assumptions.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Constant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Constant.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Constant.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Constant.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantPool.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantPool.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantPool.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantPool.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantReflectionProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantReflectionProvider.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantReflectionProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantReflectionProvider.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DefaultProfilingInfo.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DefaultProfilingInfo.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DefaultProfilingInfo.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DefaultProfilingInfo.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DeoptimizationAction.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DeoptimizationAction.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DeoptimizationAction.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DeoptimizationAction.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DeoptimizationReason.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DeoptimizationReason.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DeoptimizationReason.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/DeoptimizationReason.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ExceptionHandler.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ExceptionHandler.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ExceptionHandler.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ExceptionHandler.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/InvokeTarget.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/InvokeTarget.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/InvokeTarget.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/InvokeTarget.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaConstant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaConstant.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaConstant.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaConstant.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaField.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaField.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaField.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaField.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaKind.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaKind.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaKind.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaKind.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaMethod.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaMethod.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaMethod.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaMethod.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaMethodProfile.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaMethodProfile.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaMethodProfile.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaMethodProfile.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaType.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaType.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaType.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaType.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaTypeProfile.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaTypeProfile.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaTypeProfile.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaTypeProfile.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaValue.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaValue.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaValue.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaValue.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/LineNumberTable.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/LineNumberTable.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/LineNumberTable.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/LineNumberTable.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Local.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Local.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Local.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Local.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/LocalVariableTable.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/LocalVariableTable.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/LocalVariableTable.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/LocalVariableTable.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MemoryAccessProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MemoryAccessProvider.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MemoryAccessProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MemoryAccessProvider.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MetaAccessProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MetaAccessProvider.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MetaAccessProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MetaAccessProvider.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MetaUtil.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MetaUtil.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MetaUtil.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MetaUtil.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MethodHandleAccessProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MethodHandleAccessProvider.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MethodHandleAccessProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MethodHandleAccessProvider.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ModifiersProvider.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ModifiersProvider.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ModifiersProvider.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ModifiersProvider.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/NullConstant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/NullConstant.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/NullConstant.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/NullConstant.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/PlatformKind.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/PlatformKind.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/PlatformKind.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/PlatformKind.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/PrimitiveConstant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/PrimitiveConstant.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/PrimitiveConstant.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/PrimitiveConstant.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ProfilingInfo.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ProfilingInfo.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ProfilingInfo.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ProfilingInfo.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/RawConstant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/RawConstant.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/RawConstant.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/RawConstant.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaField.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaField.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaField.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaField.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaMethod.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaMethod.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaMethod.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaMethod.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaType.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaType.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaType.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaType.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SerializableConstant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SerializableConstant.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SerializableConstant.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SerializableConstant.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Signature.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Signature.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Signature.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Signature.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SpeculationLog.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SpeculationLog.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SpeculationLog.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SpeculationLog.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SuppressFBWarnings.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SuppressFBWarnings.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SuppressFBWarnings.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/SuppressFBWarnings.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/TriState.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/TriState.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/TriState.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/TriState.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/VMConstant.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/VMConstant.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/VMConstant.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/VMConstant.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Value.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Value.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Value.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Value.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ValueKind.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ValueKind.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ValueKind.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ValueKind.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/package-info.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/package-info.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/package-info.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/package-info.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCI.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCI.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCI.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCI.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCIBackend.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCIBackend.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCIBackend.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCIBackend.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCICompiler.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCICompiler.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCICompiler.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCICompiler.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCICompilerFactory.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCICompilerFactory.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCICompilerFactory.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCICompilerFactory.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCIRuntime.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCIRuntime.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCIRuntime.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCIRuntime.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.services/.checkstyle_checks.xml b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/.checkstyle_checks.xml similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.services/.checkstyle_checks.xml rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/.checkstyle_checks.xml diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIPermission.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIPermission.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIPermission.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIPermission.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIServiceLocator.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIServiceLocator.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIServiceLocator.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIServiceLocator.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/Services.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/Services.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/Services.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/Services.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.sparc/src/jdk/vm/ci/sparc/SPARC.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.sparc/src/jdk/vm/ci/sparc/SPARC.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.sparc/src/jdk/vm/ci/sparc/SPARC.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.sparc/src/jdk/vm/ci/sparc/SPARC.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.sparc/src/jdk/vm/ci/sparc/SPARCKind.java b/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.sparc/src/jdk/vm/ci/sparc/SPARCKind.java similarity index 100% rename from hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.sparc/src/jdk/vm/ci/sparc/SPARCKind.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.sparc/src/jdk/vm/ci/sparc/SPARCKind.java diff --git a/hotspot/src/jdk.vm.ci/share/classes/module-info.java b/hotspot/src/jdk.internal.vm.ci/share/classes/module-info.java similarity index 80% rename from hotspot/src/jdk.vm.ci/share/classes/module-info.java rename to hotspot/src/jdk.internal.vm.ci/share/classes/module-info.java index 744442b1cdb..441651a1643 100644 --- a/hotspot/src/jdk.vm.ci/share/classes/module-info.java +++ b/hotspot/src/jdk.internal.vm.ci/share/classes/module-info.java @@ -23,8 +23,8 @@ * questions. */ -module jdk.vm.ci { - exports jdk.vm.ci.services; +module jdk.internal.vm.ci { + exports jdk.vm.ci.services to jdk.internal.vm.compiler; uses jdk.vm.ci.services.JVMCIServiceLocator; uses jdk.vm.ci.hotspot.HotSpotJVMCIBackendFactory; @@ -35,35 +35,35 @@ module jdk.vm.ci { jdk.vm.ci.hotspot.sparc.SPARCHotSpotJVMCIBackendFactory; exports jdk.vm.ci.aarch64 to - jdk.vm.compiler; + jdk.internal.vm.compiler; exports jdk.vm.ci.amd64 to jdk.aot, - jdk.vm.compiler; + jdk.internal.vm.compiler; exports jdk.vm.ci.code to jdk.aot, - jdk.vm.compiler; + jdk.internal.vm.compiler; exports jdk.vm.ci.code.site to jdk.aot, - jdk.vm.compiler; + jdk.internal.vm.compiler; exports jdk.vm.ci.code.stack to - jdk.vm.compiler; + jdk.internal.vm.compiler; exports jdk.vm.ci.common to - jdk.vm.compiler; + jdk.internal.vm.compiler; exports jdk.vm.ci.hotspot to jdk.aot, - jdk.vm.compiler; + jdk.internal.vm.compiler; exports jdk.vm.ci.hotspot.aarch64 to - jdk.vm.compiler; + jdk.internal.vm.compiler; exports jdk.vm.ci.hotspot.amd64 to - jdk.vm.compiler; + jdk.internal.vm.compiler; exports jdk.vm.ci.hotspot.sparc to - jdk.vm.compiler; + jdk.internal.vm.compiler; exports jdk.vm.ci.meta to jdk.aot, - jdk.vm.compiler; + jdk.internal.vm.compiler; exports jdk.vm.ci.runtime to jdk.aot, - jdk.vm.compiler; + jdk.internal.vm.compiler; exports jdk.vm.ci.sparc to - jdk.vm.compiler; + jdk.internal.vm.compiler; } diff --git a/hotspot/src/jdk.vm.compiler/.mx.graal/.project b/hotspot/src/jdk.internal.vm.compiler/.mx.graal/.project similarity index 100% rename from hotspot/src/jdk.vm.compiler/.mx.graal/.project rename to hotspot/src/jdk.internal.vm.compiler/.mx.graal/.project diff --git a/hotspot/src/jdk.vm.compiler/.mx.graal/.pydevproject b/hotspot/src/jdk.internal.vm.compiler/.mx.graal/.pydevproject similarity index 100% rename from hotspot/src/jdk.vm.compiler/.mx.graal/.pydevproject rename to hotspot/src/jdk.internal.vm.compiler/.mx.graal/.pydevproject diff --git a/hotspot/src/jdk.vm.compiler/.mx.graal/eclipse-settings/org.eclipse.jdt.core.prefs b/hotspot/src/jdk.internal.vm.compiler/.mx.graal/eclipse-settings/org.eclipse.jdt.core.prefs similarity index 100% rename from hotspot/src/jdk.vm.compiler/.mx.graal/eclipse-settings/org.eclipse.jdt.core.prefs rename to hotspot/src/jdk.internal.vm.compiler/.mx.graal/eclipse-settings/org.eclipse.jdt.core.prefs diff --git a/hotspot/src/jdk.vm.compiler/.mx.graal/mx_graal.py b/hotspot/src/jdk.internal.vm.compiler/.mx.graal/mx_graal.py similarity index 100% rename from hotspot/src/jdk.vm.compiler/.mx.graal/mx_graal.py rename to hotspot/src/jdk.internal.vm.compiler/.mx.graal/mx_graal.py diff --git a/hotspot/src/jdk.vm.compiler/.mx.graal/mx_graal_9.py b/hotspot/src/jdk.internal.vm.compiler/.mx.graal/mx_graal_9.py similarity index 100% rename from hotspot/src/jdk.vm.compiler/.mx.graal/mx_graal_9.py rename to hotspot/src/jdk.internal.vm.compiler/.mx.graal/mx_graal_9.py diff --git a/hotspot/src/jdk.vm.compiler/.mx.graal/mx_graal_bench.py b/hotspot/src/jdk.internal.vm.compiler/.mx.graal/mx_graal_bench.py similarity index 100% rename from hotspot/src/jdk.vm.compiler/.mx.graal/mx_graal_bench.py rename to hotspot/src/jdk.internal.vm.compiler/.mx.graal/mx_graal_bench.py diff --git a/hotspot/src/jdk.vm.compiler/.mx.graal/outputparser.py b/hotspot/src/jdk.internal.vm.compiler/.mx.graal/outputparser.py similarity index 100% rename from hotspot/src/jdk.vm.compiler/.mx.graal/outputparser.py rename to hotspot/src/jdk.internal.vm.compiler/.mx.graal/outputparser.py diff --git a/hotspot/src/jdk.vm.compiler/.mx.graal/sanitycheck.py b/hotspot/src/jdk.internal.vm.compiler/.mx.graal/sanitycheck.py similarity index 100% rename from hotspot/src/jdk.vm.compiler/.mx.graal/sanitycheck.py rename to hotspot/src/jdk.internal.vm.compiler/.mx.graal/sanitycheck.py diff --git a/hotspot/src/jdk.vm.compiler/.mx.graal/suite.py b/hotspot/src/jdk.internal.vm.compiler/.mx.graal/suite.py similarity index 100% rename from hotspot/src/jdk.vm.compiler/.mx.graal/suite.py rename to hotspot/src/jdk.internal.vm.compiler/.mx.graal/suite.py diff --git a/hotspot/src/jdk.vm.compiler/share/classes/module-info.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/module-info.java similarity index 98% rename from hotspot/src/jdk.vm.compiler/share/classes/module-info.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/module-info.java index 7c456485659..783eef09fa5 100644 --- a/hotspot/src/jdk.vm.compiler/share/classes/module-info.java +++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/module-info.java @@ -23,11 +23,11 @@ * questions. */ -module jdk.vm.compiler { +module jdk.internal.vm.compiler { requires java.instrument; requires java.management; requires jdk.management; - requires jdk.vm.ci; + requires jdk.internal.vm.ci; // sun.misc.Unsafe is used requires jdk.unsupported; diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.collections/src/org/graalvm/compiler/api/collections/CollectionsProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.collections/src/org/graalvm/compiler/api/collections/CollectionsProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.collections/src/org/graalvm/compiler/api/collections/CollectionsProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.collections/src/org/graalvm/compiler/api/collections/CollectionsProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.collections/src/org/graalvm/compiler/api/collections/DefaultCollectionsProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.collections/src/org/graalvm/compiler/api/collections/DefaultCollectionsProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.collections/src/org/graalvm/compiler/api/collections/DefaultCollectionsProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.collections/src/org/graalvm/compiler/api/collections/DefaultCollectionsProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/AllocationInstrumentationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/AllocationInstrumentationTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/AllocationInstrumentationTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/AllocationInstrumentationTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/BlackholeDirectiveTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/BlackholeDirectiveTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/BlackholeDirectiveTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/BlackholeDirectiveTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/ControlFlowAnchorDirectiveTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/ControlFlowAnchorDirectiveTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/ControlFlowAnchorDirectiveTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/ControlFlowAnchorDirectiveTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/DeoptimizeDirectiveTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/DeoptimizeDirectiveTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/DeoptimizeDirectiveTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/DeoptimizeDirectiveTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/IsMethodInlineDirectiveTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/IsMethodInlineDirectiveTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/IsMethodInlineDirectiveTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/IsMethodInlineDirectiveTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/IterationDirectiveTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/IterationDirectiveTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/IterationDirectiveTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/IterationDirectiveTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/LockInstrumentationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/LockInstrumentationTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/LockInstrumentationTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/LockInstrumentationTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/OpaqueDirectiveTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/OpaqueDirectiveTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/OpaqueDirectiveTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/OpaqueDirectiveTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/ProbabilityDirectiveTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/ProbabilityDirectiveTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/ProbabilityDirectiveTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/ProbabilityDirectiveTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/RootNameDirectiveTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/RootNameDirectiveTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/RootNameDirectiveTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/RootNameDirectiveTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/TinyInstrumentor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/TinyInstrumentor.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/TinyInstrumentor.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/TinyInstrumentor.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives/src/org/graalvm/compiler/api/directives/GraalDirectives.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives/src/org/graalvm/compiler/api/directives/GraalDirectives.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.directives/src/org/graalvm/compiler/api/directives/GraalDirectives.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives/src/org/graalvm/compiler/api/directives/GraalDirectives.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/ClassSubstitution.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/ClassSubstitution.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/ClassSubstitution.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/ClassSubstitution.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/Fold.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/Fold.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/Fold.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/Fold.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/MethodSubstitution.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/MethodSubstitution.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/MethodSubstitution.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/MethodSubstitution.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/MethodSubstitutionRegistry.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/MethodSubstitutionRegistry.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/MethodSubstitutionRegistry.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/MethodSubstitutionRegistry.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/Snippet.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/Snippet.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/Snippet.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/Snippet.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/SnippetReflectionProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/SnippetReflectionProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/SnippetReflectionProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/SnippetReflectionProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/SnippetTemplateCache.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/SnippetTemplateCache.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/SnippetTemplateCache.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/SnippetTemplateCache.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/GraalJVMCICompiler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/GraalJVMCICompiler.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/GraalJVMCICompiler.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/GraalJVMCICompiler.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/GraalRuntime.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/GraalRuntime.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/GraalRuntime.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.runtime/src/org/graalvm/compiler/api/runtime/GraalRuntime.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.test/src/org/graalvm/compiler/api/test/Graal.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.test/src/org/graalvm/compiler/api/test/Graal.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.test/src/org/graalvm/compiler/api/test/Graal.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.test/src/org/graalvm/compiler/api/test/Graal.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.test/src/org/graalvm/compiler/api/test/GraalAPITest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.test/src/org/graalvm/compiler/api/test/GraalAPITest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.api.test/src/org/graalvm/compiler/api/test/GraalAPITest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.test/src/org/graalvm/compiler/api/test/GraalAPITest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64.test/src/org/graalvm/compiler/asm/aarch64/test/AArch64MacroAssemblerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64.test/src/org/graalvm/compiler/asm/aarch64/test/AArch64MacroAssemblerTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64.test/src/org/graalvm/compiler/asm/aarch64/test/AArch64MacroAssemblerTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64.test/src/org/graalvm/compiler/asm/aarch64/test/AArch64MacroAssemblerTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64.test/src/org/graalvm/compiler/asm/aarch64/test/TestProtectedAssembler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64.test/src/org/graalvm/compiler/asm/aarch64/test/TestProtectedAssembler.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64.test/src/org/graalvm/compiler/asm/aarch64/test/TestProtectedAssembler.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64.test/src/org/graalvm/compiler/asm/aarch64/test/TestProtectedAssembler.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64Address.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64Address.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64Address.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64Address.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64Assembler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64Assembler.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64Assembler.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64Assembler.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64MacroAssembler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64MacroAssembler.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64MacroAssembler.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64MacroAssembler.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/BitOpsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/BitOpsTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/BitOpsTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/BitOpsTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/IncrementDecrementMacroTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/IncrementDecrementMacroTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/IncrementDecrementMacroTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/IncrementDecrementMacroTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/SimpleAssemblerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/SimpleAssemblerTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/SimpleAssemblerTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64.test/src/org/graalvm/compiler/asm/amd64/test/SimpleAssemblerTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64Address.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64Address.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64Address.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64Address.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64AsmOptions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64AsmOptions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64AsmOptions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64AsmOptions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64Assembler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64Assembler.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64Assembler.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64Assembler.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64InstructionAttr.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64InstructionAttr.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64InstructionAttr.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64InstructionAttr.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64MacroAssembler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64MacroAssembler.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64MacroAssembler.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64MacroAssembler.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc.test/src/org/graalvm/compiler/asm/sparc/test/BitSpecTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc.test/src/org/graalvm/compiler/asm/sparc/test/BitSpecTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc.test/src/org/graalvm/compiler/asm/sparc/test/BitSpecTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc.test/src/org/graalvm/compiler/asm/sparc/test/BitSpecTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc.test/src/org/graalvm/compiler/asm/sparc/test/SPARCAssemblerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc.test/src/org/graalvm/compiler/asm/sparc/test/SPARCAssemblerTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc.test/src/org/graalvm/compiler/asm/sparc/test/SPARCAssemblerTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc.test/src/org/graalvm/compiler/asm/sparc/test/SPARCAssemblerTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCAddress.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCAddress.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCAddress.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCAddress.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCAssembler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCAssembler.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCAssembler.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCAssembler.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCInstructionCounter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCInstructionCounter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCInstructionCounter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCInstructionCounter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCMacroAssembler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCMacroAssembler.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCMacroAssembler.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCMacroAssembler.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.test/src/org/graalvm/compiler/asm/test/AssemblerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.test/src/org/graalvm/compiler/asm/test/AssemblerTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm.test/src/org/graalvm/compiler/asm/test/AssemblerTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.test/src/org/graalvm/compiler/asm/test/AssemblerTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/AbstractAddress.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/AbstractAddress.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/AbstractAddress.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/AbstractAddress.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/AsmOptions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/AsmOptions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/AsmOptions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/AsmOptions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Assembler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Assembler.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Assembler.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Assembler.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Buffer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Buffer.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Buffer.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Buffer.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Label.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Label.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Label.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Label.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/NumUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/NumUtil.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/NumUtil.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/NumUtil.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BridgeMethodUtils.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BridgeMethodUtils.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BridgeMethodUtils.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BridgeMethodUtils.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytecode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytecode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytecode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytecode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeDisassembler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeDisassembler.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeDisassembler.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeDisassembler.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeLookupSwitch.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeLookupSwitch.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeLookupSwitch.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeLookupSwitch.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeStream.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeStream.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeStream.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeStream.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeSwitch.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeSwitch.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeSwitch.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeSwitch.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeTableSwitch.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeTableSwitch.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeTableSwitch.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/BytecodeTableSwitch.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytecodes.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytecodes.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytecodes.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytecodes.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytes.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytes.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytes.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/Bytes.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/ResolvedJavaMethodBytecode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/ResolvedJavaMethodBytecode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/ResolvedJavaMethodBytecode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/ResolvedJavaMethodBytecode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/ResolvedJavaMethodBytecodeProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/ResolvedJavaMethodBytecodeProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/ResolvedJavaMethodBytecodeProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.bytecode/src/org/graalvm/compiler/bytecode/ResolvedJavaMethodBytecodeProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/CompilationResult.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/CompilationResult.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/CompilationResult.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/CompilationResult.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/DataSection.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/DataSection.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/DataSection.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/DataSection.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/DisassemblerProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/DisassemblerProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/DisassemblerProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/DisassemblerProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/HexCodeFile.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/HexCodeFile.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/HexCodeFile.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/HexCodeFile.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/HexCodeFileDisassemblerProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/HexCodeFileDisassemblerProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/HexCodeFileDisassemblerProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/HexCodeFileDisassemblerProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/SourceMapping.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/SourceMapping.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/SourceMapping.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/SourceMapping.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/SourceStackTraceBailoutException.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/SourceStackTraceBailoutException.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/SourceStackTraceBailoutException.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/SourceStackTraceBailoutException.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.common/src/org/graalvm/compiler/common/PermanentBailoutException.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.common/src/org/graalvm/compiler/common/PermanentBailoutException.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.common/src/org/graalvm/compiler/common/PermanentBailoutException.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.common/src/org/graalvm/compiler/common/PermanentBailoutException.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.common/src/org/graalvm/compiler/common/RetryableBailoutException.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.common/src/org/graalvm/compiler/common/RetryableBailoutException.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.common/src/org/graalvm/compiler/common/RetryableBailoutException.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.common/src/org/graalvm/compiler/common/RetryableBailoutException.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64AddressLowering.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64AddressLowering.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64AddressLowering.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64AddressLowering.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64AddressNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64AddressNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64AddressNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64AddressNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64ArithmeticLIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64ArithmeticLIRGenerator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64ArithmeticLIRGenerator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64ArithmeticLIRGenerator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64FloatConvertOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64FloatConvertOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64FloatConvertOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64FloatConvertOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRGenerator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRGenerator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRGenerator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRKindTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRKindTool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRKindTool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRKindTool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64MoveFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64MoveFactory.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64MoveFactory.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64MoveFactory.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeLIRBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeLIRBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeLIRBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeLIRBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeMatchRules.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeMatchRules.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeMatchRules.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeMatchRules.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64SuitesProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64SuitesProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64SuitesProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64SuitesProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/AMD64AllocatorTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/AMD64AllocatorTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/AMD64AllocatorTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/AMD64AllocatorTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/ConstantStackMoveTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/ConstantStackMoveTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/ConstantStackMoveTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/ConstantStackMoveTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/MatchRuleTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/MatchRuleTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/MatchRuleTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/MatchRuleTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/StackStoreTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/StackStoreTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/StackStoreTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/StackStoreTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64AddressLowering.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64AddressLowering.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64AddressLowering.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64AddressLowering.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64AddressNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64AddressNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64AddressNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64AddressNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64ArithmeticLIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64ArithmeticLIRGenerator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64ArithmeticLIRGenerator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64ArithmeticLIRGenerator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64LIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64LIRGenerator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64LIRGenerator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64LIRGenerator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64LIRKindTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64LIRKindTool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64LIRKindTool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64LIRKindTool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64MoveFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64MoveFactory.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64MoveFactory.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64MoveFactory.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64MoveFactoryBase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64MoveFactoryBase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64MoveFactoryBase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64MoveFactoryBase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64NodeLIRBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64NodeLIRBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64NodeLIRBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64NodeLIRBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64NodeMatchRules.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64NodeMatchRules.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64NodeMatchRules.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64NodeMatchRules.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64SuitesProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64SuitesProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64SuitesProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64SuitesProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CollectionsFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CollectionsFactory.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CollectionsFactory.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CollectionsFactory.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CompilationIdentifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CompilationIdentifier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CompilationIdentifier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CompilationIdentifier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CompilationRequestIdentifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CompilationRequestIdentifier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CompilationRequestIdentifier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CompilationRequestIdentifier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/FieldIntrospection.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/FieldIntrospection.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/FieldIntrospection.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/FieldIntrospection.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/Fields.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/Fields.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/Fields.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/Fields.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/FieldsScanner.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/FieldsScanner.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/FieldsScanner.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/FieldsScanner.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/GraalOptions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/GraalOptions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/GraalOptions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/GraalOptions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LIRKind.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LIRKind.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LIRKind.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LIRKind.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LinkedIdentityHashMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LinkedIdentityHashMap.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LinkedIdentityHashMap.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LinkedIdentityHashMap.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LocationIdentity.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LocationIdentity.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LocationIdentity.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LocationIdentity.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/SuppressFBWarnings.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/SuppressFBWarnings.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/SuppressFBWarnings.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/SuppressFBWarnings.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/UnsafeAccess.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/UnsafeAccess.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/UnsafeAccess.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/UnsafeAccess.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/BiDirectionalTraceBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/BiDirectionalTraceBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/BiDirectionalTraceBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/BiDirectionalTraceBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/ComputeBlockOrder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/ComputeBlockOrder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/ComputeBlockOrder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/ComputeBlockOrder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/RegisterAllocationConfig.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/RegisterAllocationConfig.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/RegisterAllocationConfig.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/RegisterAllocationConfig.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/SingleBlockTraceBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/SingleBlockTraceBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/SingleBlockTraceBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/SingleBlockTraceBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/Trace.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/Trace.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/Trace.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/Trace.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceBuilderResult.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceBuilderResult.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceBuilderResult.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceBuilderResult.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceMap.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceMap.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceMap.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceStatisticsPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceStatisticsPrinter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceStatisticsPrinter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/TraceStatisticsPrinter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/UniDirectionalTraceBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/UniDirectionalTraceBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/UniDirectionalTraceBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/alloc/UniDirectionalTraceBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/Condition.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/Condition.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/Condition.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/Condition.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/FloatConvert.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/FloatConvert.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/FloatConvert.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/FloatConvert.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/UnsignedMath.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/UnsignedMath.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/UnsignedMath.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/calc/UnsignedMath.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/AbstractBlockBase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/AbstractBlockBase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/AbstractBlockBase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/AbstractBlockBase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/AbstractControlFlowGraph.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/AbstractControlFlowGraph.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/AbstractControlFlowGraph.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/AbstractControlFlowGraph.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/BlockMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/BlockMap.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/BlockMap.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/BlockMap.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/CFGVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/CFGVerifier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/CFGVerifier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/CFGVerifier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/DominatorOptimizationProblem.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/DominatorOptimizationProblem.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/DominatorOptimizationProblem.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/DominatorOptimizationProblem.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/Loop.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/Loop.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/Loop.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/Loop.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PrintableCFG.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PrintableCFG.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PrintableCFG.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PrintableCFG.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PrintableDominatorOptimizationProblem.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PrintableDominatorOptimizationProblem.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PrintableDominatorOptimizationProblem.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PrintableDominatorOptimizationProblem.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PropertyConsumable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PropertyConsumable.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PropertyConsumable.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/PropertyConsumable.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/CodeGenProviders.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/CodeGenProviders.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/CodeGenProviders.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/CodeGenProviders.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ConstantFieldProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ConstantFieldProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ConstantFieldProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ConstantFieldProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallDescriptor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallDescriptor.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallDescriptor.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallDescriptor.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallLinkage.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallLinkage.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallLinkage.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallLinkage.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallsProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallsProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallsProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/ForeignCallsProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/JavaConstantFieldProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/JavaConstantFieldProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/JavaConstantFieldProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/JavaConstantFieldProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/LIRKindTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/LIRKindTool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/LIRKindTool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/spi/LIRKindTool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/AbstractObjectStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/AbstractObjectStamp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/AbstractObjectStamp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/AbstractObjectStamp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/AbstractPointerStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/AbstractPointerStamp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/AbstractPointerStamp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/AbstractPointerStamp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ArithmeticOpTable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ArithmeticOpTable.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ArithmeticOpTable.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ArithmeticOpTable.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ArithmeticStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ArithmeticStamp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ArithmeticStamp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ArithmeticStamp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/DataPointerConstant.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/DataPointerConstant.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/DataPointerConstant.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/DataPointerConstant.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/FloatStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/FloatStamp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/FloatStamp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/FloatStamp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/IllegalStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/IllegalStamp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/IllegalStamp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/IllegalStamp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/IntegerStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/IntegerStamp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/IntegerStamp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/IntegerStamp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ObjectStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ObjectStamp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ObjectStamp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/ObjectStamp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/PrimitiveStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/PrimitiveStamp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/PrimitiveStamp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/PrimitiveStamp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/RawPointerStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/RawPointerStamp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/RawPointerStamp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/RawPointerStamp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/Stamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/Stamp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/Stamp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/Stamp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/StampFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/StampFactory.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/StampFactory.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/StampFactory.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/StampPair.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/StampPair.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/StampPair.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/StampPair.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/TypeReference.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/TypeReference.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/TypeReference.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/TypeReference.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/VoidStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/VoidStamp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/VoidStamp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/VoidStamp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ArrayMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ArrayMap.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ArrayMap.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ArrayMap.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ArraySet.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ArraySet.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ArraySet.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ArraySet.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/BitMap2D.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/BitMap2D.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/BitMap2D.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/BitMap2D.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/CompilationAlarm.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/CompilationAlarm.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/CompilationAlarm.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/CompilationAlarm.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/FrequencyEncoder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/FrequencyEncoder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/FrequencyEncoder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/FrequencyEncoder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/IntList.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/IntList.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/IntList.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/IntList.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ModuleAPI.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ModuleAPI.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ModuleAPI.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/ModuleAPI.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeConversion.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeConversion.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeConversion.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeConversion.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeReader.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeReader.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeReader.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeReader.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeWriter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeWriter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeWriter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/TypeWriter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeAccess.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeAccess.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeAccess.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeAccess.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeArrayTypeReader.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeArrayTypeReader.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeArrayTypeReader.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeArrayTypeReader.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeArrayTypeWriter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeArrayTypeWriter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeArrayTypeWriter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/UnsafeArrayTypeWriter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/Util.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/Util.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/Util.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/Util.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.match.processor/src/META-INF/services/javax.annotation.processing.Processor b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.match.processor/src/META-INF/services/javax.annotation.processing.Processor similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.match.processor/src/META-INF/services/javax.annotation.processing.Processor rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.match.processor/src/META-INF/services/javax.annotation.processing.Processor diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.match.processor/src/org/graalvm/compiler/core/match/processor/MatchProcessor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.match.processor/src/org/graalvm/compiler/core/match/processor/MatchProcessor.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.match.processor/src/org/graalvm/compiler/core/match/processor/MatchProcessor.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.match.processor/src/org/graalvm/compiler/core/match/processor/MatchProcessor.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc.test/src/org/graalvm/compiler/core/sparc/test/SPARCAllocatorTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc.test/src/org/graalvm/compiler/core/sparc/test/SPARCAllocatorTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc.test/src/org/graalvm/compiler/core/sparc/test/SPARCAllocatorTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc.test/src/org/graalvm/compiler/core/sparc/test/SPARCAllocatorTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCAddressLowering.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCAddressLowering.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCAddressLowering.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCAddressLowering.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCArithmeticLIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCArithmeticLIRGenerator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCArithmeticLIRGenerator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCArithmeticLIRGenerator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCImmediateAddressNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCImmediateAddressNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCImmediateAddressNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCImmediateAddressNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCIndexedAddressNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCIndexedAddressNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCIndexedAddressNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCIndexedAddressNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCIntegerCompareCanonicalizationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCIntegerCompareCanonicalizationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCIntegerCompareCanonicalizationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCIntegerCompareCanonicalizationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCLIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCLIRGenerator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCLIRGenerator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCLIRGenerator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCLIRKindTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCLIRKindTool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCLIRKindTool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCLIRKindTool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCMoveFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCMoveFactory.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCMoveFactory.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCMoveFactory.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCNodeLIRBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCNodeLIRBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCNodeLIRBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCNodeLIRBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCNodeMatchRules.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCNodeMatchRules.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCNodeMatchRules.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCNodeMatchRules.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCSuitesProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCSuitesProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCSuitesProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCSuitesProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/AllocSpy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/AllocSpy.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/AllocSpy.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/AllocSpy.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/BoxingEliminationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/BoxingEliminationTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/BoxingEliminationTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/BoxingEliminationTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/BoxingTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/BoxingTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/BoxingTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/BoxingTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CheckGraalInvariants.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CheckGraalInvariants.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CheckGraalInvariants.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CheckGraalInvariants.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CommonedConstantsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CommonedConstantsTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CommonedConstantsTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CommonedConstantsTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CompareCanonicalizerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CompareCanonicalizerTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CompareCanonicalizerTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CompareCanonicalizerTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConcreteSubtypeTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConcreteSubtypeTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConcreteSubtypeTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConcreteSubtypeTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationLoadFieldConstantFoldTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationLoadFieldConstantFoldTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationLoadFieldConstantFoldTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationLoadFieldConstantFoldTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationMulTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationMulTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationMulTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationMulTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest1.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest1.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest1.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest10.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest10.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest10.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest10.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest11.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest11.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest11.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest11.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest3.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest3.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest3.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest4.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest4.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest4.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest4.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest5.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest5.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest5.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest5.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest6.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest6.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest6.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest6.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest7.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest7.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest7.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest7.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest8.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest8.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest8.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest8.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest9.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest9.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest9.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest9.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTestBase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTestBase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTestBase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTestBase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConstantArrayReadFoldingTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConstantArrayReadFoldingTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConstantArrayReadFoldingTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConstantArrayReadFoldingTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CooperativePhaseTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CooperativePhaseTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CooperativePhaseTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CooperativePhaseTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CopyOfVirtualizationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CopyOfVirtualizationTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CopyOfVirtualizationTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CopyOfVirtualizationTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CountedLoopTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CountedLoopTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CountedLoopTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CountedLoopTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/DegeneratedLoopsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/DegeneratedLoopsTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/DegeneratedLoopsTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/DegeneratedLoopsTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/DontReuseArgumentSpaceTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/DontReuseArgumentSpaceTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/DontReuseArgumentSpaceTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/DontReuseArgumentSpaceTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/EnumSwitchTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/EnumSwitchTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/EnumSwitchTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/EnumSwitchTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FinalizableSubclassTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FinalizableSubclassTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FinalizableSubclassTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FinalizableSubclassTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FindUniqueConcreteMethodBugTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FindUniqueConcreteMethodBugTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FindUniqueConcreteMethodBugTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FindUniqueConcreteMethodBugTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FindUniqueDefaultMethodTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FindUniqueDefaultMethodTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FindUniqueDefaultMethodTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FindUniqueDefaultMethodTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatOptimizationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatOptimizationTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatOptimizationTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatOptimizationTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatingReadTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatingReadTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatingReadTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatingReadTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraalCompilerAssumptionsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraalCompilerAssumptionsTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraalCompilerAssumptionsTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraalCompilerAssumptionsTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraalCompilerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraalCompilerTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraalCompilerTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraalCompilerTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraphEncoderTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraphEncoderTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraphEncoderTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraphEncoderTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraphScheduleTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraphScheduleTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraphScheduleTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraphScheduleTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GuardEliminationCornerCasesTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GuardEliminationCornerCasesTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GuardEliminationCornerCasesTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GuardEliminationCornerCasesTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GuardedIntrinsicTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GuardedIntrinsicTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GuardedIntrinsicTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GuardedIntrinsicTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/HashCodeTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/HashCodeTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/HashCodeTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/HashCodeTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IfCanonicalizerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IfCanonicalizerTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IfCanonicalizerTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IfCanonicalizerTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IfReorderTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IfReorderTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IfReorderTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IfReorderTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ImplicitNullCheckTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ImplicitNullCheckTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ImplicitNullCheckTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ImplicitNullCheckTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InfopointReasonTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InfopointReasonTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InfopointReasonTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InfopointReasonTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InstalledCodeInvalidationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InstalledCodeInvalidationTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InstalledCodeInvalidationTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InstalledCodeInvalidationTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IntegerEqualsCanonicalizerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IntegerEqualsCanonicalizerTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IntegerEqualsCanonicalizerTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IntegerEqualsCanonicalizerTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IntegerStampMulFoldTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IntegerStampMulFoldTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IntegerStampMulFoldTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IntegerStampMulFoldTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InterfaceMethodHandleTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InterfaceMethodHandleTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InterfaceMethodHandleTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InterfaceMethodHandleTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeExceptionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeExceptionTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeExceptionTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeExceptionTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeHintsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeHintsTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeHintsTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeHintsTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LockEliminationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LockEliminationTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LockEliminationTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LockEliminationTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LongNodeChainTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LongNodeChainTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LongNodeChainTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LongNodeChainTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LoopUnswitchTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LoopUnswitchTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LoopUnswitchTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LoopUnswitchTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MarkUnsafeAccessTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MarkUnsafeAccessTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MarkUnsafeAccessTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MarkUnsafeAccessTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MemoryArithmeticTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MemoryArithmeticTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MemoryArithmeticTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MemoryArithmeticTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MemoryScheduleTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MemoryScheduleTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MemoryScheduleTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MemoryScheduleTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MergeCanonicalizerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MergeCanonicalizerTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MergeCanonicalizerTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MergeCanonicalizerTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MethodHandleEagerResolution.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MethodHandleEagerResolution.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MethodHandleEagerResolution.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MethodHandleEagerResolution.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MonitorGraphTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MonitorGraphTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MonitorGraphTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MonitorGraphTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NestedLoopTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NestedLoopTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NestedLoopTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NestedLoopTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NodePosIteratorTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NodePosIteratorTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NodePosIteratorTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NodePosIteratorTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NodePropertiesTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NodePropertiesTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NodePropertiesTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NodePropertiesTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/OnStackReplacementTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/OnStackReplacementTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/OnStackReplacementTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/OnStackReplacementTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/OptionsVerifierTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/OptionsVerifierTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/OptionsVerifierTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/OptionsVerifierTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PhiCreationTests.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PhiCreationTests.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PhiCreationTests.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PhiCreationTests.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ProfilingInfoTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ProfilingInfoTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ProfilingInfoTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ProfilingInfoTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PushNodesThroughPiTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PushNodesThroughPiTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PushNodesThroughPiTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PushNodesThroughPiTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PushThroughIfTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PushThroughIfTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PushThroughIfTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PushThroughIfTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReadAfterCheckCastTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReadAfterCheckCastTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReadAfterCheckCastTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReadAfterCheckCastTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReassociateAndCanonicalTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReassociateAndCanonicalTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReassociateAndCanonicalTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReassociateAndCanonicalTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReentrantBlockIteratorTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReentrantBlockIteratorTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReentrantBlockIteratorTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReentrantBlockIteratorTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReferenceGetLoopTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReferenceGetLoopTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReferenceGetLoopTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReferenceGetLoopTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ScalarTypeSystemTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ScalarTypeSystemTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ScalarTypeSystemTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ScalarTypeSystemTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SchedulingTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SchedulingTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SchedulingTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SchedulingTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SchedulingTest2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SchedulingTest2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SchedulingTest2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SchedulingTest2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ShortCircuitNodeTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ShortCircuitNodeTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ShortCircuitNodeTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ShortCircuitNodeTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SimpleCFGTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SimpleCFGTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SimpleCFGTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SimpleCFGTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StampCanonicalizerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StampCanonicalizerTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StampCanonicalizerTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StampCanonicalizerTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StaticInterfaceFieldTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StaticInterfaceFieldTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StaticInterfaceFieldTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StaticInterfaceFieldTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StraighteningTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StraighteningTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StraighteningTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StraighteningTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeSystemTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeSystemTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeSystemTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeSystemTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeWriterTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeWriterTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeWriterTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeWriterTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnbalancedMonitorsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnbalancedMonitorsTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnbalancedMonitorsTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnbalancedMonitorsTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnsafeReadEliminationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnsafeReadEliminationTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnsafeReadEliminationTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnsafeReadEliminationTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyBailoutUsageTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyBailoutUsageTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyBailoutUsageTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyBailoutUsageTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyDebugUsageTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyDebugUsageTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyDebugUsageTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyDebugUsageTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyVirtualizableTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyVirtualizableTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyVirtualizableTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/VerifyVirtualizableTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/AllocatorTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/AllocatorTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/AllocatorTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/AllocatorTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/BackendTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/BackendTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/BackendTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/BackendTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest1.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest1.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest1.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest3.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest3.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest3.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest4.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest4.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest4.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest4.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest5.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest5.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest5.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest5.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest6.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest6.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest6.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTest6.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTestInterception01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTestInterception01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTestInterception01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTestInterception01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTestInterception02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTestInterception02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTestInterception02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/MethodMetricsTestInterception02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/VerifyMethodMetricsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/VerifyMethodMetricsTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/VerifyMethodMetricsTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/debug/VerifyMethodMetricsTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/CompiledMethodTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/CompiledMethodTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/CompiledMethodTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/CompiledMethodTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/MonitorDeoptTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/MonitorDeoptTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/MonitorDeoptTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/MonitorDeoptTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/SafepointRethrowDeoptTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/SafepointRethrowDeoptTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/SafepointRethrowDeoptTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/SafepointRethrowDeoptTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/SynchronizedMethodDeoptimizationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/SynchronizedMethodDeoptimizationTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/SynchronizedMethodDeoptimizationTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/SynchronizedMethodDeoptimizationTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EAMergingTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EAMergingTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EAMergingTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EAMergingTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EATestBase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EATestBase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EATestBase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EATestBase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EarlyReadEliminationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EarlyReadEliminationTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EarlyReadEliminationTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EarlyReadEliminationTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EscapeAnalysisTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EscapeAnalysisTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EscapeAnalysisTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EscapeAnalysisTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/NestedBoxingTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/NestedBoxingTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/NestedBoxingTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/NestedBoxingTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PEAAssertionsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PEAAssertionsTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PEAAssertionsTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PEAAssertionsTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PEAReadEliminationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PEAReadEliminationTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PEAReadEliminationTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PEAReadEliminationTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PartialEscapeAnalysisTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PartialEscapeAnalysisTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PartialEscapeAnalysisTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PartialEscapeAnalysisTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PoorMansEATest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PoorMansEATest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PoorMansEATest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PoorMansEATest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/UnsafeEATest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/UnsafeEATest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/UnsafeEATest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/UnsafeEATest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/inlining/InliningTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/inlining/InliningTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/inlining/InliningTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/inlining/InliningTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/inlining/RecursiveInliningTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/inlining/RecursiveInliningTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/inlining/RecursiveInliningTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/inlining/RecursiveInliningTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/GraalTutorial.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/GraalTutorial.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/GraalTutorial.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/GraalTutorial.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/InvokeGraal.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/InvokeGraal.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/InvokeGraal.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/InvokeGraal.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/StaticAnalysis.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/StaticAnalysis.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/StaticAnalysis.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/StaticAnalysis.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/StaticAnalysisTests.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/StaticAnalysisTests.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/StaticAnalysisTests.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/StaticAnalysisTests.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/CompilerThread.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/CompilerThread.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/CompilerThread.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/CompilerThread.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/CompilerThreadFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/CompilerThreadFactory.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/CompilerThreadFactory.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/CompilerThreadFactory.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalCompiler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalCompiler.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalCompiler.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalCompiler.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalCompilerOptions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalCompilerOptions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalCompilerOptions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalCompilerOptions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalDebugInitializationParticipant.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalDebugInitializationParticipant.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalDebugInitializationParticipant.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/GraalDebugInitializationParticipant.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/LIRGenerationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/LIRGenerationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/LIRGenerationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/LIRGenerationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/BytecodeParserTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/BytecodeParserTool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/BytecodeParserTool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/BytecodeParserTool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/DebugInfoBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/DebugInfoBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/DebugInfoBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/DebugInfoBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/InstructionPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/InstructionPrinter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/InstructionPrinter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/InstructionPrinter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeLIRBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeLIRBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeLIRBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeLIRBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeMatchRules.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeMatchRules.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeMatchRules.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeMatchRules.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/package-info.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/package-info.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/package-info.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/package-info.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/ComplexMatchResult.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/ComplexMatchResult.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/ComplexMatchResult.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/ComplexMatchResult.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/ComplexMatchValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/ComplexMatchValue.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/ComplexMatchValue.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/ComplexMatchValue.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchContext.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchContext.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchContext.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchGenerator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchGenerator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchGenerator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchPattern.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchPattern.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchPattern.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchPattern.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRule.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRule.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRule.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRule.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRuleRegistry.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRuleRegistry.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRuleRegistry.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRuleRegistry.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRules.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRules.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRules.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchRules.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchStatement.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchStatement.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchStatement.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchStatement.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchStatementSet.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchStatementSet.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchStatementSet.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchStatementSet.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchableNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchableNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchableNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchableNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchableNodes.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchableNodes.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchableNodes.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/match/MatchableNodes.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/package-info.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/package-info.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/package-info.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/package-info.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/CoreCompilerConfiguration.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/CoreCompilerConfiguration.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/CoreCompilerConfiguration.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/CoreCompilerConfiguration.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyCompilerConfiguration.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyCompilerConfiguration.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyCompilerConfiguration.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyCompilerConfiguration.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyHighTier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyHighTier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyHighTier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyHighTier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyLowTier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyLowTier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyLowTier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyLowTier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyMidTier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyMidTier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyMidTier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyMidTier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/GraphChangeMonitoringPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/GraphChangeMonitoringPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/GraphChangeMonitoringPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/GraphChangeMonitoringPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/HighTier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/HighTier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/HighTier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/HighTier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/LowTier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/LowTier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/LowTier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/LowTier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/MidTier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/MidTier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/MidTier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/MidTier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/target/Backend.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/target/Backend.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/target/Backend.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/target/Backend.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/CSVUtilTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/CSVUtilTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/CSVUtilTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/CSVUtilTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/DebugHistogramTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/DebugHistogramTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/DebugHistogramTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/DebugHistogramTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/DebugTimerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/DebugTimerTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/DebugTimerTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug.test/src/org/graalvm/compiler/debug/test/DebugTimerTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/CSVUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/CSVUtil.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/CSVUtil.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/CSVUtil.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Debug.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Debug.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Debug.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Debug.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugCloseable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugCloseable.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugCloseable.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugCloseable.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfig.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfig.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfig.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfig.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfigCustomizer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfigCustomizer.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfigCustomizer.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfigCustomizer.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfigScope.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfigScope.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfigScope.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugConfigScope.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugCounter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugCounter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugCounter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugCounter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugDumpHandler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugDumpHandler.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugDumpHandler.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugDumpHandler.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugDumpScope.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugDumpScope.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugDumpScope.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugDumpScope.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugEnvironment.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugEnvironment.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugEnvironment.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugEnvironment.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugFilter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugFilter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugFilter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugFilter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugHistogram.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugHistogram.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugHistogram.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugHistogram.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugInitializationParticipant.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugInitializationParticipant.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugInitializationParticipant.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugInitializationParticipant.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugMemUseTracker.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugMemUseTracker.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugMemUseTracker.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugMemUseTracker.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugMethodMetrics.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugMethodMetrics.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugMethodMetrics.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugMethodMetrics.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugTimer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugTimer.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugTimer.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugTimer.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugValueFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugValueFactory.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugValueFactory.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugValueFactory.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugVerifyHandler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugVerifyHandler.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugVerifyHandler.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugVerifyHandler.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DelegatingDebugConfig.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DelegatingDebugConfig.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DelegatingDebugConfig.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DelegatingDebugConfig.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Fingerprint.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Fingerprint.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Fingerprint.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Fingerprint.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/GraalDebugConfig.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/GraalDebugConfig.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/GraalDebugConfig.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/GraalDebugConfig.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/GraalError.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/GraalError.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/GraalError.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/GraalError.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Indent.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Indent.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Indent.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Indent.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/JavaMethodContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/JavaMethodContext.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/JavaMethodContext.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/JavaMethodContext.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/LogStream.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/LogStream.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/LogStream.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/LogStream.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Management.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Management.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Management.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Management.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/MethodFilter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/MethodFilter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/MethodFilter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/MethodFilter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TTY.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TTY.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TTY.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TTY.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TTYStreamProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TTYStreamProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TTYStreamProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TTYStreamProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TimeSource.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TimeSource.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TimeSource.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TimeSource.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TopLevelDebugConfig.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TopLevelDebugConfig.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TopLevelDebugConfig.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/TopLevelDebugConfig.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/AccumulatedDebugValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/AccumulatedDebugValue.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/AccumulatedDebugValue.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/AccumulatedDebugValue.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/CloseableCounterImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/CloseableCounterImpl.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/CloseableCounterImpl.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/CloseableCounterImpl.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/CounterImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/CounterImpl.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/CounterImpl.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/CounterImpl.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramAsciiPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramAsciiPrinter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramAsciiPrinter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramAsciiPrinter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramImpl.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramImpl.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramImpl.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramRPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramRPrinter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramRPrinter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugHistogramRPrinter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugScope.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugScope.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugScope.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugScope.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValue.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValue.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValue.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValueMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValueMap.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValueMap.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValueMap.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValuesPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValuesPrinter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValuesPrinter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/DebugValuesPrinter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/KeyRegistry.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/KeyRegistry.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/KeyRegistry.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/KeyRegistry.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/MemUseTrackerImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/MemUseTrackerImpl.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/MemUseTrackerImpl.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/MemUseTrackerImpl.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/TimerImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/TimerImpl.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/TimerImpl.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/TimerImpl.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsImpl.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsImpl.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsImpl.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsInlineeScopeInfo.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsInlineeScopeInfo.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsInlineeScopeInfo.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsInlineeScopeInfo.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsPrinter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsPrinter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsPrinter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsRootScopeInfo.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsRootScopeInfo.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsRootScopeInfo.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/internal/method/MethodMetricsRootScopeInfo.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeMapTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeMapTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeMapTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeMapTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeUsagesTests.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeUsagesTests.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeUsagesTests.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeUsagesTests.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeValidationChecksTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeValidationChecksTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeValidationChecksTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/NodeValidationChecksTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TestNodeInterface.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TestNodeInterface.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TestNodeInterface.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TestNodeInterface.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TypedNodeIteratorTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TypedNodeIteratorTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TypedNodeIteratorTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TypedNodeIteratorTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TypedNodeIteratorTest2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TypedNodeIteratorTest2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TypedNodeIteratorTest2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/TypedNodeIteratorTest2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableContains.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableContains.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableContains.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableContains.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableCount.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableCount.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableCount.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableCount.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableIsEmpty.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableIsEmpty.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableIsEmpty.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph.test/src/org/graalvm/compiler/graph/test/matchers/NodeIterableIsEmpty.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/.checkstyle_checks.xml b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/.checkstyle_checks.xml similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/.checkstyle_checks.xml rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/.checkstyle_checks.xml diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/CachedGraph.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/CachedGraph.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/CachedGraph.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/CachedGraph.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/DefaultNodeCollectionsProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/DefaultNodeCollectionsProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/DefaultNodeCollectionsProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/DefaultNodeCollectionsProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Edges.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Edges.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Edges.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Edges.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/GraalGraphError.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/GraalGraphError.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/GraalGraphError.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/GraalGraphError.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Graph.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Graph.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Graph.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Graph.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/GraphNodeIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/GraphNodeIterator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/GraphNodeIterator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/GraphNodeIterator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/InputEdges.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/InputEdges.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/InputEdges.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/InputEdges.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/IterableNodeType.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/IterableNodeType.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/IterableNodeType.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/IterableNodeType.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Node.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Node.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Node.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Node.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeBitMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeBitMap.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeBitMap.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeBitMap.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeClass.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeClass.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeClass.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeClass.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeCollectionsProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeCollectionsProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeCollectionsProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeCollectionsProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeFlood.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeFlood.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeFlood.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeFlood.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeIdAccessor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeIdAccessor.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeIdAccessor.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeIdAccessor.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeInputList.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeInputList.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeInputList.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeInputList.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeInterface.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeInterface.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeInterface.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeInterface.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeList.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeList.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeList.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeList.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeMap.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeMap.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeMap.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeNodeMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeNodeMap.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeNodeMap.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeNodeMap.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeSourcePosition.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeSourcePosition.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeSourcePosition.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeSourcePosition.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeStack.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeStack.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeStack.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeStack.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeSuccessorList.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeSuccessorList.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeSuccessorList.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeSuccessorList.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUnionFind.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUnionFind.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUnionFind.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUnionFind.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageIterable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageIterable.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageIterable.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageIterable.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageIterator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageIterator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageIterator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageWithModCountIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageWithModCountIterator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageWithModCountIterator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeUsageWithModCountIterator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeWorkList.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeWorkList.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeWorkList.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/NodeWorkList.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Position.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Position.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Position.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Position.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/SuccessorEdges.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/SuccessorEdges.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/SuccessorEdges.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/SuccessorEdges.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/TypedGraphNodeIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/TypedGraphNodeIterator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/TypedGraphNodeIterator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/TypedGraphNodeIterator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/UnsafeAccess.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/UnsafeAccess.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/UnsafeAccess.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/UnsafeAccess.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/VerificationError.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/VerificationError.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/VerificationError.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/VerificationError.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/FilteredNodeIterable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/FilteredNodeIterable.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/FilteredNodeIterable.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/FilteredNodeIterable.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodeIterable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodeIterable.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodeIterable.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodeIterable.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodeIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodeIterator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodeIterator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodeIterator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodePredicate.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodePredicate.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodePredicate.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodePredicate.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodePredicates.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodePredicates.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodePredicates.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/NodePredicates.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/PredicatedProxyNodeIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/PredicatedProxyNodeIterator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/PredicatedProxyNodeIterator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/iterators/PredicatedProxyNodeIterator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/package-info.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/package-info.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/package-info.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/package-info.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/Canonicalizable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/Canonicalizable.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/Canonicalizable.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/Canonicalizable.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/CanonicalizerTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/CanonicalizerTool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/CanonicalizerTool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/CanonicalizerTool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/Simplifiable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/Simplifiable.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/Simplifiable.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/Simplifiable.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/SimplifierTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/SimplifierTool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/SimplifierTool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/spi/SimplifierTool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotBackend.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotBackend.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotBackend.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotBackend.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotBackendFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotBackendFactory.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotBackendFactory.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotBackendFactory.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotCRuntimeCallEpilogueOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotCRuntimeCallEpilogueOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotCRuntimeCallEpilogueOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotCRuntimeCallEpilogueOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotCRuntimeCallPrologueOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotCRuntimeCallPrologueOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotCRuntimeCallPrologueOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotCRuntimeCallPrologueOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDeoptimizeCallerOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDeoptimizeCallerOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDeoptimizeCallerOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDeoptimizeCallerOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDeoptimizeOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDeoptimizeOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDeoptimizeOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDeoptimizeOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDirectStaticCallOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDirectStaticCallOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDirectStaticCallOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDirectStaticCallOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDirectVirtualCallOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDirectVirtualCallOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDirectVirtualCallOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotDirectVirtualCallOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotEpilogueOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotEpilogueOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotEpilogueOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotEpilogueOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotForeignCallsProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotForeignCallsProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotForeignCallsProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotForeignCallsProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotJumpToExceptionHandlerInCallerOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotJumpToExceptionHandlerInCallerOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotJumpToExceptionHandlerInCallerOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotJumpToExceptionHandlerInCallerOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRGenerator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRGenerator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRGenerator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRKindTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRKindTool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRKindTool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRKindTool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLoweringProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLoweringProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLoweringProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLoweringProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotMove.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotMove.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotMove.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotMove.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotMoveFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotMoveFactory.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotMoveFactory.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotMoveFactory.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotNodeLIRBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotNodeLIRBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotNodeLIRBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotNodeLIRBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotPatchReturnAddressOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotPatchReturnAddressOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotPatchReturnAddressOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotPatchReturnAddressOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotRegisterAllocationConfig.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotRegisterAllocationConfig.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotRegisterAllocationConfig.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotRegisterAllocationConfig.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotReturnOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotReturnOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotReturnOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotReturnOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotSafepointOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotSafepointOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotSafepointOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotSafepointOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotStrategySwitchOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotStrategySwitchOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotStrategySwitchOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotStrategySwitchOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotUnwindOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotUnwindOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotUnwindOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotUnwindOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64IndirectCallOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64IndirectCallOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64IndirectCallOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64IndirectCallOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArchHotSpotNodeCostProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArchHotSpotNodeCostProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArchHotSpotNodeCostProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArchHotSpotNodeCostProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/AMD64HotSpotFrameOmissionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/AMD64HotSpotFrameOmissionTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/AMD64HotSpotFrameOmissionTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/AMD64HotSpotFrameOmissionTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/CompressedNullCheckTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/CompressedNullCheckTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/CompressedNullCheckTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/CompressedNullCheckTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/DataPatchInConstantsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/DataPatchInConstantsTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/DataPatchInConstantsTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/DataPatchInConstantsTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/StubAVXTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/StubAVXTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/StubAVXTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/StubAVXTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64DeoptimizationStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64DeoptimizationStub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64DeoptimizationStub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64DeoptimizationStub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64DeoptimizeOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64DeoptimizeOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64DeoptimizeOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64DeoptimizeOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotAddressLowering.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotAddressLowering.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotAddressLowering.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotAddressLowering.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotArithmeticLIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotArithmeticLIRGenerator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotArithmeticLIRGenerator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotArithmeticLIRGenerator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotBackend.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotBackend.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotBackend.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotBackend.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotBackendFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotBackendFactory.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotBackendFactory.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotBackendFactory.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCRuntimeCallEpilogueOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCRuntimeCallEpilogueOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCRuntimeCallEpilogueOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCRuntimeCallEpilogueOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCRuntimeCallPrologueOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCRuntimeCallPrologueOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCRuntimeCallPrologueOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCRuntimeCallPrologueOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotConstantRetrievalOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotConstantRetrievalOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotConstantRetrievalOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotConstantRetrievalOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCounterOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCounterOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCounterOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotCounterOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotDeoptimizeCallerOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotDeoptimizeCallerOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotDeoptimizeCallerOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotDeoptimizeCallerOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotDirectStaticCallOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotDirectStaticCallOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotDirectStaticCallOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotDirectStaticCallOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEnterUnpackFramesStackFrameOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEnterUnpackFramesStackFrameOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEnterUnpackFramesStackFrameOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEnterUnpackFramesStackFrameOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEpilogueBlockEndOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEpilogueBlockEndOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEpilogueBlockEndOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEpilogueBlockEndOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEpilogueOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEpilogueOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEpilogueOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotEpilogueOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotForeignCallsProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotForeignCallsProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotForeignCallsProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotForeignCallsProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotJumpToExceptionHandlerInCallerOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotJumpToExceptionHandlerInCallerOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotJumpToExceptionHandlerInCallerOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotJumpToExceptionHandlerInCallerOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRGenerator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRGenerator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRGenerator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRKindTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRKindTool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRKindTool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRKindTool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveCurrentStackFrameOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveCurrentStackFrameOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveCurrentStackFrameOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveCurrentStackFrameOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveDeoptimizedStackFrameOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveDeoptimizedStackFrameOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveDeoptimizedStackFrameOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveDeoptimizedStackFrameOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveUnpackFramesStackFrameOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveUnpackFramesStackFrameOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveUnpackFramesStackFrameOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLeaveUnpackFramesStackFrameOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadAddressOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadAddressOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadAddressOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadAddressOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadConfigValueOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadConfigValueOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadConfigValueOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoadConfigValueOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoweringProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoweringProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoweringProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLoweringProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMathIntrinsicOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMathIntrinsicOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMathIntrinsicOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMathIntrinsicOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMove.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMove.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMove.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMove.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMoveFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMoveFactory.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMoveFactory.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMoveFactory.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotNodeCostProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotNodeCostProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotNodeCostProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotNodeCostProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotNodeLIRBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotNodeLIRBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotNodeLIRBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotNodeLIRBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotPatchReturnAddressOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotPatchReturnAddressOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotPatchReturnAddressOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotPatchReturnAddressOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotPushInterpreterFrameOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotPushInterpreterFrameOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotPushInterpreterFrameOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotPushInterpreterFrameOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotRegisterAllocationConfig.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotRegisterAllocationConfig.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotRegisterAllocationConfig.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotRegisterAllocationConfig.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotRestoreRbpOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotRestoreRbpOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotRestoreRbpOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotRestoreRbpOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotReturnOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotReturnOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotReturnOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotReturnOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotSafepointOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotSafepointOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotSafepointOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotSafepointOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotStrategySwitchOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotStrategySwitchOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotStrategySwitchOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotStrategySwitchOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotSuitesProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotSuitesProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotSuitesProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotSuitesProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotUnwindOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotUnwindOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotUnwindOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotUnwindOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotspotDirectVirtualCallOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotspotDirectVirtualCallOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotspotDirectVirtualCallOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotspotDirectVirtualCallOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64IndirectCallOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64IndirectCallOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64IndirectCallOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64IndirectCallOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64MathStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64MathStub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64MathStub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64MathStub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64RawNativeCallNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64RawNativeCallNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64RawNativeCallNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64RawNativeCallNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64TailcallOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64TailcallOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64TailcallOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64TailcallOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64UncommonTrapStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64UncommonTrapStub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64UncommonTrapStub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64UncommonTrapStub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.lir.test/src/org/graalvm/compiler/hotspot/lir/test/ExceedMaxOopMapStackOffset.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.lir.test/src/org/graalvm/compiler/hotspot/lir/test/ExceedMaxOopMapStackOffset.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.lir.test/src/org/graalvm/compiler/hotspot/lir/test/ExceedMaxOopMapStackOffset.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.lir.test/src/org/graalvm/compiler/hotspot/lir/test/ExceedMaxOopMapStackOffset.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCDeoptimizationStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCDeoptimizationStub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCDeoptimizationStub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCDeoptimizationStub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCDeoptimizeOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCDeoptimizeOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCDeoptimizeOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCDeoptimizeOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotBackend.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotBackend.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotBackend.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotBackend.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotBackendFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotBackendFactory.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotBackendFactory.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotBackendFactory.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCRuntimeCallEpilogueOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCRuntimeCallEpilogueOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCRuntimeCallEpilogueOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCRuntimeCallEpilogueOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCRuntimeCallPrologueOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCRuntimeCallPrologueOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCRuntimeCallPrologueOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCRuntimeCallPrologueOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCounterOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCounterOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCounterOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotCounterOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotDeoptimizeCallerOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotDeoptimizeCallerOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotDeoptimizeCallerOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotDeoptimizeCallerOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotEnterUnpackFramesStackFrameOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotEnterUnpackFramesStackFrameOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotEnterUnpackFramesStackFrameOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotEnterUnpackFramesStackFrameOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotEpilogueOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotEpilogueOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotEpilogueOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotEpilogueOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotForeignCallsProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotForeignCallsProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotForeignCallsProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotForeignCallsProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerInCallerOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerInCallerOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerInCallerOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerInCallerOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotJumpToExceptionHandlerOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLIRGenerator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLIRGenerator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLIRGenerator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLIRKindTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLIRKindTool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLIRKindTool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLIRKindTool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveCurrentStackFrameOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveCurrentStackFrameOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveCurrentStackFrameOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveCurrentStackFrameOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveDeoptimizedStackFrameOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveDeoptimizedStackFrameOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveDeoptimizedStackFrameOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveDeoptimizedStackFrameOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveUnpackFramesStackFrameOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveUnpackFramesStackFrameOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveUnpackFramesStackFrameOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLeaveUnpackFramesStackFrameOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLoweringProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLoweringProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLoweringProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLoweringProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotMove.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotMove.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotMove.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotMove.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotMoveFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotMoveFactory.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotMoveFactory.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotMoveFactory.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotNodeCostProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotNodeCostProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotNodeCostProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotNodeCostProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotNodeLIRBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotNodeLIRBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotNodeLIRBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotNodeLIRBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotPatchReturnAddressOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotPatchReturnAddressOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotPatchReturnAddressOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotPatchReturnAddressOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotPushInterpreterFrameOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotPushInterpreterFrameOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotPushInterpreterFrameOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotPushInterpreterFrameOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotRegisterAllocationConfig.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotRegisterAllocationConfig.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotRegisterAllocationConfig.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotRegisterAllocationConfig.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotReturnOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotReturnOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotReturnOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotReturnOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotSafepointOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotSafepointOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotSafepointOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotSafepointOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotStrategySwitchOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotStrategySwitchOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotStrategySwitchOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotStrategySwitchOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotUnwindOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotUnwindOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotUnwindOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotUnwindOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotspotDirectStaticCallOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotspotDirectStaticCallOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotspotDirectStaticCallOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotspotDirectStaticCallOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotspotDirectVirtualCallOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotspotDirectVirtualCallOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotspotDirectVirtualCallOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotspotDirectVirtualCallOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCIndirectCallOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCIndirectCallOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCIndirectCallOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCIndirectCallOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCUncommonTrapStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCUncommonTrapStub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCUncommonTrapStub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCUncommonTrapStub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/AheadOfTimeCompilationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/AheadOfTimeCompilationTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/AheadOfTimeCompilationTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/AheadOfTimeCompilationTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ArrayCopyIntrinsificationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ArrayCopyIntrinsificationTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ArrayCopyIntrinsificationTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ArrayCopyIntrinsificationTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CRC32SubstitutionsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CRC32SubstitutionsTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CRC32SubstitutionsTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CRC32SubstitutionsTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CheckGraalIntrinsics.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CheckGraalIntrinsics.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CheckGraalIntrinsics.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CheckGraalIntrinsics.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ClassSubstitutionsTests.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ClassSubstitutionsTests.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ClassSubstitutionsTests.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ClassSubstitutionsTests.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorldTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorldTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorldTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorldTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompressedOopTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompressedOopTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompressedOopTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompressedOopTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ConstantPoolSubstitutionsTests.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ConstantPoolSubstitutionsTests.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ConstantPoolSubstitutionsTests.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ConstantPoolSubstitutionsTests.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/DataPatchTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/DataPatchTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/DataPatchTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/DataPatchTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ExplicitExceptionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ExplicitExceptionTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ExplicitExceptionTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ExplicitExceptionTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ForeignCallDeoptimizeTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ForeignCallDeoptimizeTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ForeignCallDeoptimizeTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ForeignCallDeoptimizeTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRLockTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRLockTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRLockTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRLockTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRTestBase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRTestBase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRTestBase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/GraalOSRTestBase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotCryptoSubstitutionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotCryptoSubstitutionTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotCryptoSubstitutionTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotCryptoSubstitutionTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotGraalCompilerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotGraalCompilerTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotGraalCompilerTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotGraalCompilerTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotMethodSubstitutionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotMethodSubstitutionTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotMethodSubstitutionTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotMethodSubstitutionTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotMonitorValueTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotMonitorValueTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotMonitorValueTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotMonitorValueTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotNmethodTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotNmethodTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotNmethodTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotNmethodTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotNodeSubstitutionsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotNodeSubstitutionsTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotNodeSubstitutionsTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotNodeSubstitutionsTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotResolvedJavaFieldTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotResolvedJavaFieldTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotResolvedJavaFieldTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotResolvedJavaFieldTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotResolvedObjectTypeTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotResolvedObjectTypeTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotResolvedObjectTypeTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotResolvedObjectTypeTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/InstalledCodeExecuteHelperTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/InstalledCodeExecuteHelperTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/InstalledCodeExecuteHelperTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/InstalledCodeExecuteHelperTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/JVMCIInfopointErrorTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/JVMCIInfopointErrorTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/JVMCIInfopointErrorTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/JVMCIInfopointErrorTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/LoadJavaMirrorWithKlassTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/LoadJavaMirrorWithKlassTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/LoadJavaMirrorWithKlassTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/LoadJavaMirrorWithKlassTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/MemoryUsageBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/MemoryUsageBenchmark.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/MemoryUsageBenchmark.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/MemoryUsageBenchmark.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/TestIntrinsicCompiles.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/TestIntrinsicCompiles.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/TestIntrinsicCompiles.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/TestIntrinsicCompiles.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/TestSHASubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/TestSHASubstitutions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/TestSHASubstitutions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/TestSHASubstitutions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/WriteBarrierAdditionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/WriteBarrierAdditionTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/WriteBarrierAdditionTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/WriteBarrierAdditionTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/WriteBarrierVerificationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/WriteBarrierVerificationTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/WriteBarrierVerificationTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/WriteBarrierVerificationTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/AOTGraalHotSpotVMConfig.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/AOTGraalHotSpotVMConfig.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/AOTGraalHotSpotVMConfig.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/AOTGraalHotSpotVMConfig.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/BootstrapWatchDog.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/BootstrapWatchDog.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/BootstrapWatchDog.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/BootstrapWatchDog.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationCounters.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationCounters.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationCounters.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationCounters.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationStatistics.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationStatistics.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationStatistics.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationStatistics.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationTask.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationTask.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationTask.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationTask.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationWatchDog.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationWatchDog.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationWatchDog.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationWatchDog.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompileTheWorld.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompileTheWorld.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompileTheWorld.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompileTheWorld.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompileTheWorldOptions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompileTheWorldOptions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompileTheWorldOptions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompileTheWorldOptions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilerConfigurationFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilerConfigurationFactory.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilerConfigurationFactory.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilerConfigurationFactory.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilerRuntimeHotSpotVMConfig.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilerRuntimeHotSpotVMConfig.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilerRuntimeHotSpotVMConfig.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilerRuntimeHotSpotVMConfig.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompressEncoding.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompressEncoding.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompressEncoding.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompressEncoding.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CoreCompilerConfigurationFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CoreCompilerConfigurationFactory.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CoreCompilerConfigurationFactory.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CoreCompilerConfigurationFactory.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/EconomyCompilerConfigurationFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/EconomyCompilerConfigurationFactory.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/EconomyCompilerConfigurationFactory.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/EconomyCompilerConfigurationFactory.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/FingerprintUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/FingerprintUtil.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/FingerprintUtil.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/FingerprintUtil.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackend.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackend.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackend.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackend.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackendFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackendFactory.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackendFactory.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackendFactory.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCompilationIdentifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCompilationIdentifier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCompilationIdentifier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCompilationIdentifier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCompiledCodeBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCompiledCodeBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCompiledCodeBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCompiledCodeBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCounterOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCounterOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCounterOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCounterOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotDataBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotDataBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotDataBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotDataBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotDebugInfoBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotDebugInfoBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotDebugInfoBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotDebugInfoBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotForeignCallLinkage.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotForeignCallLinkage.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotForeignCallLinkage.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotForeignCallLinkage.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotForeignCallLinkageImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotForeignCallLinkageImpl.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotForeignCallLinkageImpl.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotForeignCallLinkageImpl.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompiler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompiler.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompiler.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompiler.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompilerFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompilerFactory.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompilerFactory.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompilerFactory.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalJVMCIServiceLocator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalJVMCIServiceLocator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalJVMCIServiceLocator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalJVMCIServiceLocator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalRuntime.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalRuntime.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalRuntime.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalRuntime.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalRuntimeProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalRuntimeProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalRuntimeProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalRuntimeProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalVMEventListener.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalVMEventListener.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalVMEventListener.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalVMEventListener.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotHostBackend.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotHostBackend.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotHostBackend.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotHostBackend.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotInstructionProfiling.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotInstructionProfiling.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotInstructionProfiling.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotInstructionProfiling.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerationResult.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerationResult.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerationResult.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerationResult.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLIRGenerator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLockStack.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLockStack.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLockStack.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotLockStack.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotNodeLIRBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotNodeLIRBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotNodeLIRBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotNodeLIRBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReferenceMapBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReferenceMapBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReferenceMapBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReferenceMapBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReplacementsImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReplacementsImpl.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReplacementsImpl.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReplacementsImpl.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotTTYStreamProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotTTYStreamProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotTTYStreamProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotTTYStreamProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/JVMCIVersionCheck.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/JVMCIVersionCheck.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/JVMCIVersionCheck.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/JVMCIVersionCheck.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/PrintStreamOption.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/PrintStreamOption.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/PrintStreamOption.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/PrintStreamOption.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/debug/BenchmarkCounters.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/debug/BenchmarkCounters.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/debug/BenchmarkCounters.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/debug/BenchmarkCounters.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/lir/HotSpotZapRegistersPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/lir/HotSpotZapRegistersPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/lir/HotSpotZapRegistersPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/lir/HotSpotZapRegistersPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/DefaultHotSpotLoweringProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/DefaultHotSpotLoweringProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/DefaultHotSpotLoweringProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/DefaultHotSpotLoweringProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotAOTProfilingPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotAOTProfilingPlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotAOTProfilingPlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotAOTProfilingPlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotClassInitializationPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotClassInitializationPlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotClassInitializationPlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotClassInitializationPlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotConstantFieldProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotConstantFieldProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotConstantFieldProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotConstantFieldProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotConstantLoadAction.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotConstantLoadAction.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotConstantLoadAction.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotConstantLoadAction.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotDisassemblerProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotDisassemblerProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotDisassemblerProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotDisassemblerProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotForeignCallsProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotForeignCallsProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotForeignCallsProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotForeignCallsProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotForeignCallsProviderImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotForeignCallsProviderImpl.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotForeignCallsProviderImpl.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotForeignCallsProviderImpl.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraalConstantFieldProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraalConstantFieldProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraalConstantFieldProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraalConstantFieldProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotHostForeignCallsProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotHostForeignCallsProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotHostForeignCallsProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotHostForeignCallsProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotInvocationPlugins.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotInvocationPlugins.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotInvocationPlugins.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotInvocationPlugins.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotLoweringProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotLoweringProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotLoweringProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotLoweringProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotNodePlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotNodePlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotNodePlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotNodePlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotProfilingPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotProfilingPlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotProfilingPlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotProfilingPlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotProviders.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotProviders.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotProviders.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotProviders.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotRegisters.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotRegisters.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotRegisters.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotRegisters.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotRegistersProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotRegistersProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotRegistersProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotRegistersProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotSnippetReflectionProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotSnippetReflectionProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotSnippetReflectionProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotSnippetReflectionProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotStampProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotStampProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotStampProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotStampProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotSuitesProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotSuitesProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotSuitesProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotSuitesProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotWordOperationPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotWordOperationPlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotWordOperationPlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotWordOperationPlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/AcquiredCASLockNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/AcquiredCASLockNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/AcquiredCASLockNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/AcquiredCASLockNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/AllocaNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/AllocaNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/AllocaNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/AllocaNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ArrayRangeWriteBarrier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ArrayRangeWriteBarrier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ArrayRangeWriteBarrier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ArrayRangeWriteBarrier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/BeginLockScopeNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/BeginLockScopeNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/BeginLockScopeNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/BeginLockScopeNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CompressionNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CompressionNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CompressionNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CompressionNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ComputeObjectAddressNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ComputeObjectAddressNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ComputeObjectAddressNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ComputeObjectAddressNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CurrentJavaThreadNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CurrentJavaThreadNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CurrentJavaThreadNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CurrentJavaThreadNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CurrentLockNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CurrentLockNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CurrentLockNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/CurrentLockNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizationFetchUnrollInfoCallNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizationFetchUnrollInfoCallNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizationFetchUnrollInfoCallNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizationFetchUnrollInfoCallNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizeCallerNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizeCallerNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizeCallerNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizeCallerNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizingStubCall.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizingStubCall.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizingStubCall.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DeoptimizingStubCall.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DimensionsNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DimensionsNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DimensionsNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DimensionsNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DirectCompareAndSwapNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DirectCompareAndSwapNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DirectCompareAndSwapNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/DirectCompareAndSwapNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/EndLockScopeNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/EndLockScopeNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/EndLockScopeNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/EndLockScopeNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/EnterUnpackFramesStackFrameNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/EnterUnpackFramesStackFrameNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/EnterUnpackFramesStackFrameNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/EnterUnpackFramesStackFrameNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/FastAcquireBiasedLockNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/FastAcquireBiasedLockNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/FastAcquireBiasedLockNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/FastAcquireBiasedLockNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ArrayRangePostWriteBarrier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ArrayRangePostWriteBarrier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ArrayRangePostWriteBarrier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ArrayRangePostWriteBarrier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ArrayRangePreWriteBarrier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ArrayRangePreWriteBarrier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ArrayRangePreWriteBarrier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ArrayRangePreWriteBarrier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1PostWriteBarrier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1PostWriteBarrier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1PostWriteBarrier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1PostWriteBarrier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1PreWriteBarrier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1PreWriteBarrier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1PreWriteBarrier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1PreWriteBarrier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ReferentFieldReadBarrier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ReferentFieldReadBarrier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ReferentFieldReadBarrier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ReferentFieldReadBarrier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GetObjectAddressNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GetObjectAddressNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GetObjectAddressNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GetObjectAddressNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GraalHotSpotVMConfigNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GraalHotSpotVMConfigNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GraalHotSpotVMConfigNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/GraalHotSpotVMConfigNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotDirectCallTargetNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotDirectCallTargetNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotDirectCallTargetNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotDirectCallTargetNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotIndirectCallTargetNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotIndirectCallTargetNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotIndirectCallTargetNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotIndirectCallTargetNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotNodeCostProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotNodeCostProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotNodeCostProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/HotSpotNodeCostProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/JumpToExceptionHandlerInCallerNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/JumpToExceptionHandlerInCallerNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/JumpToExceptionHandlerInCallerNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/JumpToExceptionHandlerInCallerNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/JumpToExceptionHandlerNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/JumpToExceptionHandlerNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/JumpToExceptionHandlerNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/JumpToExceptionHandlerNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveCurrentStackFrameNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveCurrentStackFrameNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveCurrentStackFrameNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveCurrentStackFrameNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveDeoptimizedStackFrameNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveDeoptimizedStackFrameNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveDeoptimizedStackFrameNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveDeoptimizedStackFrameNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveUnpackFramesStackFrameNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveUnpackFramesStackFrameNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveUnpackFramesStackFrameNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LeaveUnpackFramesStackFrameNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LoadIndexedPointerNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LoadIndexedPointerNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LoadIndexedPointerNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/LoadIndexedPointerNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/MonitorCounterNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/MonitorCounterNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/MonitorCounterNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/MonitorCounterNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ObjectWriteBarrier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ObjectWriteBarrier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ObjectWriteBarrier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ObjectWriteBarrier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/PatchReturnAddressNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/PatchReturnAddressNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/PatchReturnAddressNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/PatchReturnAddressNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/PushInterpreterFrameNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/PushInterpreterFrameNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/PushInterpreterFrameNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/PushInterpreterFrameNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SaveAllRegistersNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SaveAllRegistersNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SaveAllRegistersNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SaveAllRegistersNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SerialArrayRangeWriteBarrier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SerialArrayRangeWriteBarrier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SerialArrayRangeWriteBarrier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SerialArrayRangeWriteBarrier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SerialWriteBarrier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SerialWriteBarrier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SerialWriteBarrier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SerialWriteBarrier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SnippetAnchorNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SnippetAnchorNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SnippetAnchorNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SnippetAnchorNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SnippetLocationProxyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SnippetLocationProxyNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SnippetLocationProxyNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SnippetLocationProxyNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/StubForeignCallNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/StubForeignCallNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/StubForeignCallNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/StubForeignCallNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/StubStartNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/StubStartNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/StubStartNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/StubStartNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/UncommonTrapCallNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/UncommonTrapCallNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/UncommonTrapCallNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/UncommonTrapCallNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/VMErrorNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/VMErrorNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/VMErrorNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/VMErrorNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/WriteBarrier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/WriteBarrier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/WriteBarrier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/WriteBarrier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/EncodedSymbolNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/EncodedSymbolNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/EncodedSymbolNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/EncodedSymbolNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/InitializeKlassNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/InitializeKlassNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/InitializeKlassNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/InitializeKlassNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/InitializeKlassStubCall.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/InitializeKlassStubCall.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/InitializeKlassStubCall.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/InitializeKlassStubCall.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadConstantIndirectlyFixedNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadConstantIndirectlyFixedNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadConstantIndirectlyFixedNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadConstantIndirectlyFixedNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadConstantIndirectlyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadConstantIndirectlyNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadConstantIndirectlyNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadConstantIndirectlyNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadMethodCountersIndirectlyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadMethodCountersIndirectlyNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadMethodCountersIndirectlyNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadMethodCountersIndirectlyNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadMethodCountersNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadMethodCountersNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadMethodCountersNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/LoadMethodCountersNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveConstantNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveConstantNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveConstantNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveConstantNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveConstantStubCall.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveConstantStubCall.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveConstantStubCall.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveConstantStubCall.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveMethodAndLoadCountersNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveMethodAndLoadCountersNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveMethodAndLoadCountersNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveMethodAndLoadCountersNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveMethodAndLoadCountersStubCall.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveMethodAndLoadCountersStubCall.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveMethodAndLoadCountersStubCall.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveMethodAndLoadCountersStubCall.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileBranchNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileBranchNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileBranchNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileBranchNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileInvokeNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileInvokeNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileInvokeNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileInvokeNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileWithNotificationNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileWithNotificationNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileWithNotificationNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/ProfileWithNotificationNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/RandomSeedNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/RandomSeedNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/RandomSeedNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/profiling/RandomSeedNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/HotSpotLIRKindTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/HotSpotLIRKindTool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/HotSpotLIRKindTool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/HotSpotLIRKindTool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/KlassPointerStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/KlassPointerStamp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/KlassPointerStamp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/KlassPointerStamp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MetaspacePointerStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MetaspacePointerStamp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MetaspacePointerStamp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MetaspacePointerStamp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MethodCountersPointerStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MethodCountersPointerStamp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MethodCountersPointerStamp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MethodCountersPointerStamp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MethodPointerStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MethodPointerStamp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MethodPointerStamp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/MethodPointerStamp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/NarrowOopStamp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/NarrowOopStamp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/NarrowOopStamp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/type/NarrowOopStamp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/package-info.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/package-info.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/package-info.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/package-info.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/AheadOfTimeVerificationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/AheadOfTimeVerificationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/AheadOfTimeVerificationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/AheadOfTimeVerificationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/LoadJavaMirrorWithKlassPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/LoadJavaMirrorWithKlassPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/LoadJavaMirrorWithKlassPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/LoadJavaMirrorWithKlassPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/OnStackReplacementPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/OnStackReplacementPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/OnStackReplacementPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/OnStackReplacementPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/WriteBarrierAdditionPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/WriteBarrierAdditionPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/WriteBarrierAdditionPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/WriteBarrierAdditionPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/WriteBarrierVerificationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/WriteBarrierVerificationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/WriteBarrierVerificationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/WriteBarrierVerificationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/AOTInliningPolicy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/AOTInliningPolicy.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/AOTInliningPolicy.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/AOTInliningPolicy.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/EliminateRedundantInitializationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/EliminateRedundantInitializationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/EliminateRedundantInitializationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/EliminateRedundantInitializationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/ReplaceConstantNodesPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/ReplaceConstantNodesPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/ReplaceConstantNodesPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/aot/ReplaceConstantNodesPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/profiling/FinalizeProfileNodesPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/profiling/FinalizeProfileNodesPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/profiling/FinalizeProfileNodesPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/profiling/FinalizeProfileNodesPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/AESCryptSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/AESCryptSubstitutions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/AESCryptSubstitutions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/AESCryptSubstitutions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/AssertionSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/AssertionSnippets.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/AssertionSnippets.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/AssertionSnippets.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/BigIntegerSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/BigIntegerSubstitutions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/BigIntegerSubstitutions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/BigIntegerSubstitutions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CRC32Substitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CRC32Substitutions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CRC32Substitutions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CRC32Substitutions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CallSiteTargetNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CallSiteTargetNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CallSiteTargetNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CallSiteTargetNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CipherBlockChainingSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CipherBlockChainingSubstitutions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CipherBlockChainingSubstitutions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CipherBlockChainingSubstitutions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ClassGetHubNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ClassGetHubNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ClassGetHubNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ClassGetHubNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/EncodedSymbolConstant.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/EncodedSymbolConstant.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/EncodedSymbolConstant.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/EncodedSymbolConstant.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HashCodeSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HashCodeSnippets.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HashCodeSnippets.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HashCodeSnippets.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotClassSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotClassSubstitutions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotClassSubstitutions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotClassSubstitutions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotReplacementsUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotReplacementsUtil.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotReplacementsUtil.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotReplacementsUtil.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotspotSnippetsOptions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotspotSnippetsOptions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotspotSnippetsOptions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotspotSnippetsOptions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HubGetClassNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HubGetClassNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HubGetClassNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HubGetClassNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/IdentityHashCodeNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/IdentityHashCodeNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/IdentityHashCodeNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/IdentityHashCodeNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/InstanceOfSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/InstanceOfSnippets.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/InstanceOfSnippets.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/InstanceOfSnippets.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/KlassLayoutHelperNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/KlassLayoutHelperNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/KlassLayoutHelperNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/KlassLayoutHelperNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/LoadExceptionObjectSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/LoadExceptionObjectSnippets.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/LoadExceptionObjectSnippets.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/LoadExceptionObjectSnippets.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/MonitorSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/MonitorSnippets.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/MonitorSnippets.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/MonitorSnippets.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/NewObjectSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/NewObjectSnippets.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/NewObjectSnippets.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/NewObjectSnippets.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectCloneNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectCloneNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectCloneNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectCloneNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectCloneSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectCloneSnippets.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectCloneSnippets.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectCloneSnippets.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectSubstitutions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectSubstitutions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectSubstitutions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ReflectionGetCallerClassNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ReflectionGetCallerClassNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ReflectionGetCallerClassNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ReflectionGetCallerClassNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ReflectionSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ReflectionSubstitutions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ReflectionSubstitutions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ReflectionSubstitutions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHA2Substitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHA2Substitutions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHA2Substitutions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHA2Substitutions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHA5Substitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHA5Substitutions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHA5Substitutions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHA5Substitutions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHASubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHASubstitutions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHASubstitutions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHASubstitutions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/StringToBytesSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/StringToBytesSnippets.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/StringToBytesSnippets.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/StringToBytesSnippets.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ThreadSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ThreadSubstitutions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ThreadSubstitutions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ThreadSubstitutions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/TypeCheckSnippetUtils.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/TypeCheckSnippetUtils.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/TypeCheckSnippetUtils.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/TypeCheckSnippetUtils.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/UnsafeAccess.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/UnsafeAccess.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/UnsafeAccess.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/UnsafeAccess.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/UnsafeLoadSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/UnsafeLoadSnippets.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/UnsafeLoadSnippets.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/UnsafeLoadSnippets.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/WriteBarrierSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/WriteBarrierSnippets.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/WriteBarrierSnippets.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/WriteBarrierSnippets.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/aot/ResolveConstantSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/aot/ResolveConstantSnippets.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/aot/ResolveConstantSnippets.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/aot/ResolveConstantSnippets.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyCallNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyCallNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyCallNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyCallNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopySlowPathNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopySlowPathNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopySlowPathNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopySlowPathNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopySnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopySnippets.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopySnippets.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopySnippets.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyUnrollNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyUnrollNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyUnrollNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/ArrayCopyUnrollNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/CheckcastArrayCopyCallNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/CheckcastArrayCopyCallNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/CheckcastArrayCopyCallNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/CheckcastArrayCopyCallNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/UnsafeArrayCopyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/UnsafeArrayCopyNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/UnsafeArrayCopyNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/UnsafeArrayCopyNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/UnsafeArrayCopySnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/UnsafeArrayCopySnippets.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/UnsafeArrayCopySnippets.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/arraycopy/UnsafeArrayCopySnippets.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/profiling/ProbabilisticProfileSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/profiling/ProbabilisticProfileSnippets.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/profiling/ProbabilisticProfileSnippets.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/profiling/ProbabilisticProfileSnippets.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/profiling/ProfileSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/profiling/ProfileSnippets.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/profiling/ProfileSnippets.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/profiling/ProfileSnippets.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ArrayStoreExceptionStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ArrayStoreExceptionStub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ArrayStoreExceptionStub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ArrayStoreExceptionStub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ClassCastExceptionStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ClassCastExceptionStub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ClassCastExceptionStub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ClassCastExceptionStub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/CreateExceptionStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/CreateExceptionStub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/CreateExceptionStub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/CreateExceptionStub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/DeoptimizationStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/DeoptimizationStub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/DeoptimizationStub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/DeoptimizationStub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ExceptionHandlerStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ExceptionHandlerStub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ExceptionHandlerStub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ExceptionHandlerStub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ForeignCallStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ForeignCallStub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ForeignCallStub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ForeignCallStub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NewArrayStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NewArrayStub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NewArrayStub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NewArrayStub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NewInstanceStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NewInstanceStub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NewInstanceStub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NewInstanceStub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NullPointerExceptionStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NullPointerExceptionStub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NullPointerExceptionStub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/NullPointerExceptionStub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/OutOfBoundsExceptionStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/OutOfBoundsExceptionStub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/OutOfBoundsExceptionStub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/OutOfBoundsExceptionStub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/SnippetStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/SnippetStub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/SnippetStub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/SnippetStub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/Stub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/Stub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/Stub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/Stub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubCompilationIdentifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubCompilationIdentifier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubCompilationIdentifier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubCompilationIdentifier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubOptions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubOptions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubOptions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubOptions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubUtil.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubUtil.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/StubUtil.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/UncommonTrapStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/UncommonTrapStub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/UncommonTrapStub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/UncommonTrapStub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/UnwindExceptionToCallerStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/UnwindExceptionToCallerStub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/UnwindExceptionToCallerStub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/UnwindExceptionToCallerStub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/VerifyOopStub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/VerifyOopStub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/VerifyOopStub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/VerifyOopStub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/HotSpotOperation.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/HotSpotOperation.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/HotSpotOperation.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/HotSpotOperation.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/HotSpotWordTypes.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/HotSpotWordTypes.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/HotSpotWordTypes.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/HotSpotWordTypes.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/KlassPointer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/KlassPointer.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/KlassPointer.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/KlassPointer.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MetaspacePointer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MetaspacePointer.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MetaspacePointer.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MetaspacePointer.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MethodCountersPointer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MethodCountersPointer.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MethodCountersPointer.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MethodCountersPointer.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MethodPointer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MethodPointer.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MethodPointer.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/MethodPointer.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/PointerCastNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/PointerCastNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/PointerCastNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/word/PointerCastNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BciBlockMapping.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BciBlockMapping.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BciBlockMapping.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BciBlockMapping.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BytecodeParser.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BytecodeParser.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BytecodeParser.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BytecodeParser.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BytecodeParserOptions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BytecodeParserOptions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BytecodeParserOptions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BytecodeParserOptions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/ComputeLoopFrequenciesClosure.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/ComputeLoopFrequenciesClosure.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/ComputeLoopFrequenciesClosure.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/ComputeLoopFrequenciesClosure.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/DefaultSuitesProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/DefaultSuitesProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/DefaultSuitesProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/DefaultSuitesProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/FrameStateBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/FrameStateBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/FrameStateBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/FrameStateBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/GraphBuilderPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/GraphBuilderPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/GraphBuilderPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/GraphBuilderPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/JsrNotSupportedBailout.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/JsrNotSupportedBailout.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/JsrNotSupportedBailout.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/JsrNotSupportedBailout.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/JsrScope.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/JsrScope.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/JsrScope.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/JsrScope.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/LargeLocalLiveness.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/LargeLocalLiveness.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/LargeLocalLiveness.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/LargeLocalLiveness.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/LocalLiveness.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/LocalLiveness.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/LocalLiveness.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/LocalLiveness.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/SmallLocalLiveness.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/SmallLocalLiveness.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/SmallLocalLiveness.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/SmallLocalLiveness.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/SuitesProviderBase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/SuitesProviderBase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/SuitesProviderBase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/SuitesProviderBase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/JTTTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/JTTTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/JTTTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/JTTTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/ConstantPhiTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/ConstantPhiTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/ConstantPhiTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/ConstantPhiTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/EmptyMethodTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/EmptyMethodTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/EmptyMethodTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/EmptyMethodTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/LargeConstantSectionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/LargeConstantSectionTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/LargeConstantSectionTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/LargeConstantSectionTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aaload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aaload.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aaload.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aaload.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aaload_1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aaload_1.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aaload_1.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aaload_1.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aastore.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aastore.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aastore.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_0.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_0.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_0.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_0.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_1.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_1.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_1.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_3.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_3.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_aload_3.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_anewarray.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_anewarray.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_anewarray.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_anewarray.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_areturn.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_areturn.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_areturn.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_areturn.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_arraylength.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_arraylength.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_arraylength.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_arraylength.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_athrow.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_athrow.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_athrow.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_athrow.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_baload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_baload.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_baload.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_baload.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_bastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_bastore.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_bastore.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_bastore.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_caload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_caload.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_caload.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_caload.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_castore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_castore.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_castore.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_castore.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_checkcast03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2f.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2f.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2f.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2f.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2i01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2i01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2i01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2i01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2i02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2i02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2i02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2i02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_d2l03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dadd.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dadd.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dadd.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dadd.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_daload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_daload.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_daload.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_daload.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dastore.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dastore.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dastore.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp05.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp05.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp05.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp06.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp06.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp06.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp06.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp07.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp07.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp07.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp07.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp08.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp08.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp08.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp08.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp09.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp09.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp09.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp09.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp10.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp10.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp10.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dcmp10.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ddiv.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ddiv.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ddiv.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ddiv.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dmul.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dmul.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dmul.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dmul.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dneg.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dneg.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dneg.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dneg.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dneg2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dneg2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dneg2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dneg2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_double_base.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_double_base.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_double_base.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_double_base.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_drem.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_drem.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_drem.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_drem.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dreturn.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dreturn.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dreturn.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dreturn.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dsub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dsub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dsub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dsub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dsub2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dsub2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dsub2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_dsub2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2d.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2d.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2d.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2d.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2i01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2i01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2i01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2i01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2i02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2i02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2i02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2i02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2l01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2l01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2l01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2l01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2l02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2l02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2l02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_f2l02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fadd.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fadd.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fadd.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fadd.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_faload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_faload.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_faload.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_faload.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fastore.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fastore.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fastore.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp05.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp05.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp05.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp06.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp06.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp06.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp06.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp07.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp07.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp07.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp07.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp08.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp08.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp08.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp08.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp09.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp09.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp09.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp09.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp10.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp10.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp10.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fcmp10.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fdiv.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fdiv.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fdiv.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fdiv.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fload.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fload.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fload.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fload_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fload_2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fload_2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fload_2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_float_base.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_float_base.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_float_base.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_float_base.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fmul.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fmul.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fmul.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fmul.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fneg.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fneg.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fneg.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fneg.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_frem.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_frem.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_frem.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_frem.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_freturn.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_freturn.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_freturn.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_freturn.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fsub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fsub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fsub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_fsub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_b.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_b.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_b.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_b.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_c.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_c.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_c.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_c.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_d.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_d.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_d.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_d.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_f.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_f.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_f.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_f.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_i.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_i.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_i.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_i.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_l.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_l.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_l.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_l.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_o.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_o.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_o.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_o.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_s.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_s.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_s.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_s.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_z.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_z.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_z.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getfield_z.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_b.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_b.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_b.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_b.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_c.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_c.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_c.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_c.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_d.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_d.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_d.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_d.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_f.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_f.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_f.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_f.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_i.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_i.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_i.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_i.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_l.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_l.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_l.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_l.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_s.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_s.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_s.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_s.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_z.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_z.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_z.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_getstatic_z.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2b.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2b.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2b.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2b.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2c.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2c.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2c.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2c.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2d.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2d.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2d.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2d.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2f.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2f.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2f.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2f.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2l.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2l.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2l.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2l.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2s.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2s.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2s.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_i2s.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd3.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd3.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd3.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const0.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const0.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const0.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const0.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const1.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const1.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const1.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const3.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const3.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iadd_const3.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iaload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iaload.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iaload.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iaload.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iand.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iand.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iand.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iand.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iastore.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iastore.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iastore.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iconst.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iconst.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iconst.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iconst.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_idiv.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_idiv.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_idiv.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_idiv.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_idiv2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_idiv2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_idiv2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_idiv2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq_2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq_2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq_2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq_3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq_3.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq_3.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifeq_3.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge_2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge_2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge_2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge_3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge_3.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge_3.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifge_3.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifgt.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifgt.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifgt.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifgt.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmplt1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmplt1.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmplt1.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmplt1.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmplt2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmplt2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmplt2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmplt2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmpne1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmpne1.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmpne1.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmpne1.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmpne2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmpne2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmpne2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ificmpne2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifle.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifle.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifle.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifle.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iflt.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iflt.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iflt.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iflt.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifne.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifne.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifne.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifne.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull_2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull_2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull_2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull_3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull_3.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull_3.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnonnull_3.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull_2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull_2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull_2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull_3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull_3.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull_3.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ifnull_3.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_1.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_1.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_1.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_3.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_3.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_3.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_4.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_4.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_4.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iinc_4.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0_1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0_1.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0_1.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0_1.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0_2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0_2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_0_2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_1.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_1.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_1.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_1_1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_1_1.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_1_1.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_1_1.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_3.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_3.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iload_3.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_imul.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_imul.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_imul.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_imul.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ineg.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ineg.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ineg.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ineg.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_instanceof.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_instanceof.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_instanceof.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_instanceof.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_instanceof01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_instanceof01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_instanceof01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_instanceof01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokeinterface.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokeinterface.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokeinterface.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokeinterface.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokespecial.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokespecial.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokespecial.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokespecial.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokespecial2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokespecial2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokespecial2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokespecial2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokestatic.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokestatic.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokestatic.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokestatic.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokevirtual.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokevirtual.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokevirtual.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_invokevirtual.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ior.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ior.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ior.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ior.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem3.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem3.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_irem3.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ireturn.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ireturn.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ireturn.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ireturn.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ishl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ishl.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ishl.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ishl.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ishr.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ishr.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ishr.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ishr.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_isub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_isub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_isub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_isub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iushr.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iushr.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iushr.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_iushr.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ixor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ixor.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ixor.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ixor.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2d.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2d.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2d.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2d.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2f.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2f.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2f.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2f.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2i.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2i.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2i.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2i.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2i_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2i_2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2i_2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_l2i_2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ladd.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ladd.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ladd.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ladd.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ladd2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ladd2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ladd2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ladd2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_laload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_laload.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_laload.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_laload.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_land.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_land.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_land.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_land.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lastore.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lastore.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lastore.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lcmp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lcmp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lcmp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lcmp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_05.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_05.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_05.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_06.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_06.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_06.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldc_06.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv3.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv3.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv3.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_0.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_0.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_0.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_0.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_1.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_1.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_1.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_3.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_3.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lload_3.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lmul.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lmul.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lmul.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lmul.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lneg.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lneg.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lneg.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lneg.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch05.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch05.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lookupswitch05.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lor.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lor.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lor.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lrem.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lrem.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lrem.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lrem.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lrem2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lrem2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lrem2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lrem2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lreturn.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lreturn.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lreturn.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lreturn.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshl.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshl.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshl.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshr.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshr.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshr.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshr.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshr02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshr02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshr02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lshr02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lsub.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lsub.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lsub.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lsub.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lushr.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lushr.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lushr.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lushr.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lxor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lxor.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lxor.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_lxor.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_monitorenter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_monitorenter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_monitorenter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_monitorenter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_monitorenter02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_monitorenter02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_monitorenter02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_monitorenter02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_multianewarray04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_new.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_new.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_new.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_new.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_newarray.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_newarray.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_newarray.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_newarray.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putfield_04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putstatic.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putstatic.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putstatic.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_putstatic.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_saload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_saload.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_saload.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_saload.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_sastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_sastore.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_sastore.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_sastore.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch3.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch3.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch3.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch4.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch4.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch4.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_tableswitch4.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_wide01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_wide01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_wide01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_wide01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_wide02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_wide02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_wide02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_wide02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aaload0.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aaload0.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aaload0.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aaload0.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aaload1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aaload1.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aaload1.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aaload1.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aastore0.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aastore0.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aastore0.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aastore0.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aastore1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aastore1.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aastore1.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_aastore1.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_anewarray.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_anewarray.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_anewarray.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_anewarray.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_arraylength.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_arraylength.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_arraylength.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_arraylength.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow0.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow0.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow0.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow0.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow1.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow1.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow1.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow3.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow3.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_athrow3.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_baload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_baload.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_baload.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_baload.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_bastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_bastore.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_bastore.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_bastore.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_caload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_caload.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_caload.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_caload.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_castore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_castore.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_castore.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_castore.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast1.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast1.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast1.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast3.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast3.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast3.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast3.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast4.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast4.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast4.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast4.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast5.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast5.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast5.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast5.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast6.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast6.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast6.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_checkcast6.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_daload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_daload.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_daload.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_daload.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_dastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_dastore.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_dastore.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_dastore.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_faload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_faload.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_faload.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_faload.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_fastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_fastore.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_fastore.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_fastore.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_getfield.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_getfield.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_getfield.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_getfield.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_getfield1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_getfield1.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_getfield1.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_getfield1.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_iaload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_iaload.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_iaload.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_iaload.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_iastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_iastore.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_iastore.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_iastore.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_idiv.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_idiv.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_idiv.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_idiv.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_idiv2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_idiv2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_idiv2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_idiv2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokespecial01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokespecial01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokespecial01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokespecial01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokevirtual01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokevirtual01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokevirtual01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokevirtual01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokevirtual02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokevirtual02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokevirtual02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_invokevirtual02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_irem.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_irem.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_irem.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_irem.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_laload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_laload.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_laload.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_laload.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_lastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_lastore.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_lastore.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_lastore.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_ldiv.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_ldiv.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_ldiv.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_ldiv.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_ldiv2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_ldiv2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_ldiv2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_ldiv2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_lrem.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_lrem.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_lrem.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_lrem.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_monitorenter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_monitorenter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_monitorenter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_monitorenter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_multianewarray.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_multianewarray.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_multianewarray.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_multianewarray.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_newarray.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_newarray.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_newarray.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_newarray.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_putfield.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_putfield.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_putfield.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_putfield.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_saload.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_saload.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_saload.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_saload.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_sastore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_sastore.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_sastore.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/BC_sastore.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Loop03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NASE_1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NASE_1.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NASE_1.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NASE_1.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NASE_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NASE_2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NASE_2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NASE_2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_00.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_00.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_00.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_00.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_05.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_05.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_05.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_06.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_06.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_06.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_06.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_07.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_07.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_07.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_07.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_08.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_08.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_08.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_08.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_09.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_09.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_09.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_09.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_10.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_10.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_10.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_10.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_11.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_11.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_11.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_NPE_11.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_StackOverflowError_03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Two03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Catch_Unresolved03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Locals.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Locals.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Locals.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Locals.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized05.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized05.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Except_Synchronized05.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Finally01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Finally01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Finally01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Finally01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Finally02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Finally02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Finally02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Finally02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_AIOOBE_00.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_AIOOBE_00.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_AIOOBE_00.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_AIOOBE_00.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_CCE_00.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_CCE_00.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_CCE_00.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_CCE_00.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_00.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_00.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_00.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_00.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/StackTrace_NPE_03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InCatch03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InNested.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InNested.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InNested.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_InNested.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_NPE_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_NPE_01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_NPE_01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_NPE_01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized05.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized05.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/Throw_Synchronized05.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/UntrustedInterfaces.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/UntrustedInterfaces.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/UntrustedInterfaces.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/UntrustedInterfaces.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_allocate04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_array04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_control01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_control01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_control01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_control01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_control02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_control02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_control02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_control02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_convert01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_convert01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_convert01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_convert01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_count.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_count.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_count.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_count.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_dead01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_dead01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_dead01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_dead01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_demo01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_demo01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_demo01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_demo01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_field04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_idea.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_idea.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_idea.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_idea.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_inline01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_inline01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_inline01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_inline01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_inline02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_inline02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_inline02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_inline02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_invoke01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_invoke01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_invoke01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_invoke01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_life.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_life.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_life.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_life.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_nest01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_nest01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_nest01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_nest01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_nest02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_nest02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_nest02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_nest02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_scope01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_scope01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_scope01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_scope01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_scope02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_scope02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_scope02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_scope02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_series.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_series.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_series.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_series.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_trees01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_trees01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_trees01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotpath/HP_trees01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6186134.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6186134.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6186134.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6186134.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6196102.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6196102.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6196102.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6196102.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6753639.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6753639.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6753639.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6753639.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6823354.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6823354.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6823354.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6823354.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6850611.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6850611.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6850611.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6850611.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6959129.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6959129.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6959129.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test6959129.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test7005594.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test7005594.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test7005594.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/hotspot/Test7005594.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/CharacterBits.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/CharacterBits.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/CharacterBits.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/CharacterBits.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Class_getName.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Class_getName.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Class_getName.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Class_getName.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/DivideUnsigned.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/DivideUnsigned.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/DivideUnsigned.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/DivideUnsigned.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/EnumMap01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/EnumMap01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/EnumMap01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/EnumMap01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/EnumMap02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/EnumMap02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/EnumMap02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/EnumMap02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/IntegerBits.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/IntegerBits.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/IntegerBits.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/IntegerBits.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/LongBits.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/LongBits.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/LongBits.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/LongBits.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/ShortBits.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/ShortBits.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/ShortBits.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/ShortBits.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_currentTimeMillis01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_currentTimeMillis01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_currentTimeMillis01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_currentTimeMillis01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_currentTimeMillis02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_currentTimeMillis02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_currentTimeMillis02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_currentTimeMillis02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_nanoTime01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_nanoTime01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_nanoTime01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_nanoTime01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_nanoTime02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_nanoTime02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_nanoTime02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_nanoTime02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_setOut.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_setOut.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_setOut.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/System_setOut.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Thread_setName.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Thread_setName.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Thread_setName.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Thread_setName.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/UnsafeAccess01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/UnsafeAccess01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/UnsafeAccess01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/UnsafeAccess01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/UnsafeAllocateInstance01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/UnsafeAllocateInstance01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/UnsafeAllocateInstance01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/UnsafeAllocateInstance01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Unsafe_compareAndSwap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Unsafe_compareAndSwap.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Unsafe_compareAndSwap.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Unsafe_compareAndSwap.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Unsafe_compareAndSwapNullCheck.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Unsafe_compareAndSwapNullCheck.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Unsafe_compareAndSwapNullCheck.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/jdk/Unsafe_compareAndSwapNullCheck.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Boxed_TYPE_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Boxed_TYPE_01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Boxed_TYPE_01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Boxed_TYPE_01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Bridge_method01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Bridge_method01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Bridge_method01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Bridge_method01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/ClassLoader_loadClass01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/ClassLoader_loadClass01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/ClassLoader_loadClass01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/ClassLoader_loadClass01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_Literal01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_Literal01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_Literal01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_Literal01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_asSubclass01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_asSubclass01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_asSubclass01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_asSubclass01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_cast01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_cast01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_cast01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_cast01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_cast02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_cast02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_cast02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_cast02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName05.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName05.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_forName05.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getComponentType01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getComponentType01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getComponentType01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getComponentType01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getInterfaces01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getInterfaces01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getInterfaces01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getInterfaces01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getModifiers01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getModifiers01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getModifiers01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getModifiers01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getModifiers02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getModifiers02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getModifiers02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getModifiers02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getName01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getName01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getName01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getName01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getName02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getName02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getName02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getName02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSimpleName01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSimpleName01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSimpleName01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSimpleName01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSimpleName02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSimpleName02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSimpleName02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSimpleName02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSuperClass01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSuperClass01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSuperClass01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_getSuperClass01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isArray01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isArray01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isArray01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isArray01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isAssignableFrom03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance05.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance05.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance05.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance06.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance06.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance06.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance06.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance07.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance07.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance07.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInstance07.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInterface01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInterface01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInterface01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isInterface01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isPrimitive01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isPrimitive01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isPrimitive01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Class_isPrimitive01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_conditional.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_conditional.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_conditional.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_conditional.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_toString.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_toString.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_toString.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Double_toString.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_conditional.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_conditional.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_conditional.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Float_conditional.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greater03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_greaterEqual03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_less03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Int_lessEqual03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/JDK_ClassLoaders01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/JDK_ClassLoaders01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/JDK_ClassLoaders01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/JDK_ClassLoaders01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/JDK_ClassLoaders02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/JDK_ClassLoaders02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/JDK_ClassLoaders02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/JDK_ClassLoaders02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/LambdaEagerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/LambdaEagerTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/LambdaEagerTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/LambdaEagerTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greater03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_greaterEqual03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_less03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_lessEqual03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_reverseBytes01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_reverseBytes01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_reverseBytes01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_reverseBytes01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_reverseBytes02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_reverseBytes02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_reverseBytes02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Long_reverseBytes02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_abs.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_abs.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_abs.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_abs.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_cos.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_cos.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_cos.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_cos.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_exact.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_exact.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_exact.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_exact.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_exp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_exp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_exp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_exp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_log.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_log.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_log.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_log.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_log10.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_log10.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_log10.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_log10.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_pow.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_pow.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_pow.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_pow.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_round.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_round.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_round.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_round.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_sin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_sin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_sin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_sin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_sqrt.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_sqrt.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_sqrt.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_sqrt.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_tan.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_tan.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_tan.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Math_tan.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_clone01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_clone01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_clone01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_clone01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_clone02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_clone02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_clone02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_clone02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_equals01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_equals01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_equals01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_equals01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_getClass01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_getClass01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_getClass01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_getClass01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_hashCode01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_hashCode01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_hashCode01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_hashCode01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_hashCode02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_hashCode02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_hashCode02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_hashCode02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notify01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notify01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notify01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notify01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notify02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notify02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notify02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notify02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notifyAll01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notifyAll01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notifyAll01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notifyAll01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notifyAll02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notifyAll02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notifyAll02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_notifyAll02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_toString01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_toString01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_toString01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_toString01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_toString02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_toString02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_toString02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_toString02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/Object_wait03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/ProcessEnvironment_init.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/ProcessEnvironment_init.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/ProcessEnvironment_init.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/ProcessEnvironment_init.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/StringCoding_Scale.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/StringCoding_Scale.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/StringCoding_Scale.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/StringCoding_Scale.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_intern03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_valueOf01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_valueOf01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_valueOf01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/String_valueOf01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/System_identityHashCode01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/System_identityHashCode01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/System_identityHashCode01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/lang/System_identityHashCode01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/DegeneratedLoop.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/DegeneratedLoop.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/DegeneratedLoop.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/DegeneratedLoop.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop05.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop05.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop05.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop06.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop06.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop06.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop06.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop07.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop07.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop07.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop07.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop07_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop07_2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop07_2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop07_2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop08.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop08.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop08.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop08.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop09.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop09.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop09.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop09.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop09_2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop09_2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop09_2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop09_2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop11.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop11.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop11.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop11.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop12.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop12.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop12.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop12.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop13.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop13.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop13.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop13.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop14.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop14.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop14.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop14.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop15.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop15.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop15.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop15.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop16.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop16.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop16.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop16.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop17.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop17.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop17.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/Loop17.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopEscape.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopEscape.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopEscape.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopEscape.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopInline.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopInline.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopInline.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopInline.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopLastIndexOf.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopLastIndexOf.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopLastIndexOf.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopLastIndexOf.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopNewInstance.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopNewInstance.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopNewInstance.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopNewInstance.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopParseLong.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopParseLong.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopParseLong.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopParseLong.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopPhi.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopPhi.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopPhi.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopPhi.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopPhiResolutionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopPhiResolutionTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopPhiResolutionTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopPhiResolutionTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopSpilling.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopSpilling.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopSpilling.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopSpilling.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopSwitch01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopSwitch01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopSwitch01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopSwitch01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopUnroll.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopUnroll.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopUnroll.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/LoopUnroll.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/SpillLoopPhiVariableAtDefinition.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/SpillLoopPhiVariableAtDefinition.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/SpillLoopPhiVariableAtDefinition.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/loop/SpillLoopPhiVariableAtDefinition.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ArrayCompare01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ArrayCompare01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ArrayCompare01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ArrayCompare01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ArrayCompare02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ArrayCompare02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ArrayCompare02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ArrayCompare02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BC_invokevirtual2.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BC_invokevirtual2.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BC_invokevirtual2.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BC_invokevirtual2.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigByteParams01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigByteParams01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigByteParams01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigByteParams01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigDoubleParams02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigDoubleParams02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigDoubleParams02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigDoubleParams02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigFloatParams01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigFloatParams01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigFloatParams01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigFloatParams01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigFloatParams02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigFloatParams02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigFloatParams02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigFloatParams02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigIntParams01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigIntParams01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigIntParams01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigIntParams01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigIntParams02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigIntParams02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigIntParams02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigIntParams02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigInterfaceParams01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigInterfaceParams01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigInterfaceParams01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigInterfaceParams01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigLongParams02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigLongParams02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigLongParams02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigLongParams02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigMixedParams04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigObjectParams01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigObjectParams01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigObjectParams01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigObjectParams01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigObjectParams02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigObjectParams02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigObjectParams02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigObjectParams02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigParamsAlignment.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigParamsAlignment.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigParamsAlignment.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigParamsAlignment.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigShortParams01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigShortParams01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigShortParams01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigShortParams01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigVirtualParams01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigVirtualParams01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigVirtualParams01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/BigVirtualParams01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Bubblesort.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Bubblesort.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Bubblesort.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Bubblesort.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ConstantLoadTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ConstantLoadTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ConstantLoadTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ConstantLoadTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Fibonacci.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Fibonacci.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Fibonacci.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Fibonacci.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/FloatingReads.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/FloatingReads.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/FloatingReads.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/FloatingReads.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeInterface_04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeVirtual_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeVirtual_01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeVirtual_01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeVirtual_01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeVirtual_02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeVirtual_02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeVirtual_02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/InvokeVirtual_02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Matrix01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Matrix01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Matrix01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/Matrix01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ReferenceMap01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ReferenceMap01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ReferenceMap01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/ReferenceMap01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/StrangeFrames.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/StrangeFrames.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/StrangeFrames.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/StrangeFrames.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/String_format01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/String_format01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/String_format01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/String_format01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/String_format02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/String_format02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/String_format02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/String_format02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_String01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_String01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_String01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_String01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_Unroll.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_Unroll.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_Unroll.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_Unroll.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_boolean01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_boolean01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_boolean01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_boolean01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_byte01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_byte01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_byte01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_byte01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_char01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_char01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_char01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_char01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_double01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_double01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_double01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_double01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_float01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_float01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_float01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_float01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_int01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_int01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_int01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_int01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_long01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_long01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_long01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_long01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_short01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_short01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_short01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/micro/VarArgs_short01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ABCE_03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy05.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy05.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy05.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy06.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy06.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy06.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy06.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopyGeneric.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopyGeneric.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopyGeneric.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopyGeneric.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayLength01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayLength01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayLength01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayLength01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_idiv_16.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_idiv_16.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_idiv_16.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_idiv_16.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_idiv_4.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_idiv_4.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_idiv_4.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_idiv_4.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_imul_16.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_imul_16.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_imul_16.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_imul_16.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_imul_4.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_imul_4.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_imul_4.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_imul_4.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_ldiv_16.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_ldiv_16.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_ldiv_16.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_ldiv_16.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_ldiv_4.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_ldiv_4.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_ldiv_4.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_ldiv_4.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lmul_16.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lmul_16.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lmul_16.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lmul_16.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lmul_4.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lmul_4.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lmul_4.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lmul_4.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C16.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C16.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C16.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C16.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C24.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C24.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C24.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C24.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C32.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C32.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C32.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BC_lshr_C32.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BlockSkip01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BlockSkip01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BlockSkip01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BlockSkip01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BoxingIdentity.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BoxingIdentity.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BoxingIdentity.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/BoxingIdentity.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Cmov01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Cmov01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Cmov01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Cmov01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Cmov02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Cmov02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Cmov02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Cmov02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Conditional01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Conditional01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Conditional01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Conditional01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConditionalElimination01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConditionalElimination01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConditionalElimination01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConditionalElimination01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConditionalElimination02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConditionalElimination02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConditionalElimination02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConditionalElimination02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConvertCompare.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConvertCompare.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConvertCompare.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ConvertCompare.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/DeadCode01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/DeadCode01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/DeadCode01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/DeadCode01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/DeadCode02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/DeadCode02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/DeadCode02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/DeadCode02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Cast01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Cast01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Cast01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Cast01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Convert04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Double03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Float01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Float01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Float01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Float01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Float02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Float02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Float02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Float02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_InstanceOf01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_InstanceOf01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_InstanceOf01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_InstanceOf01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Int01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Int01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Int01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Int01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Int02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Int02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Int02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Int02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Long01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Long01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Long01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Long01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Long02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Long02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Long02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Long02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Math01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Math01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Math01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Fold_Math01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/InferStamp01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/InferStamp01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/InferStamp01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/InferStamp01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Inline01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Inline01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Inline01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Inline01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Inline02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Inline02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Inline02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Inline02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/LLE_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/LLE_01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/LLE_01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/LLE_01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/List_reorder_bug.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/List_reorder_bug.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/List_reorder_bug.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/List_reorder_bug.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Logic0.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Logic0.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Logic0.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Logic0.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/LongToSomethingArray01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/LongToSomethingArray01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/LongToSomethingArray01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/LongToSomethingArray01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive05.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive05.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NCE_FlowSensitive05.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_byte03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_char03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Narrow_short03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NestedLoop_EA.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NestedLoop_EA.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NestedLoop_EA.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NestedLoop_EA.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Phi03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ReassociateConstants.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ReassociateConstants.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ReassociateConstants.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ReassociateConstants.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Convert01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Convert01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Convert01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Convert01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Double01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Double01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Double01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Double01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Float01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Float01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Float01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Float01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Int04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_IntShift01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_IntShift01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_IntShift01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_IntShift01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_IntShift02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_IntShift02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_IntShift02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_IntShift02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_Long04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_LongShift01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_LongShift01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_LongShift01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_LongShift01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_LongShift02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_LongShift02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_LongShift02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Reduce_LongShift02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/SchedulingBug_01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/SchedulingBug_01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/SchedulingBug_01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/SchedulingBug_01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/SignExtendShort.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/SignExtendShort.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/SignExtendShort.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/SignExtendShort.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Switch01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Switch01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Switch01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Switch01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Switch02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Switch02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Switch02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/Switch02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/TypeCastElem.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/TypeCastElem.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/TypeCastElem.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/TypeCastElem.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/UnsafeDeopt.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/UnsafeDeopt.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/UnsafeDeopt.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/UnsafeDeopt.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Cast01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Cast01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Cast01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Cast01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Cast02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Cast02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Cast02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Cast02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Convert01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Convert01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Convert01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Convert01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Convert02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Convert02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Convert02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Convert02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Double01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Double01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Double01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Double01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Double02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Double02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Double02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Double02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Field01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Field01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Field01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Field01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Field02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Field02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Field02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Field02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Float01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Float01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Float01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Float01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Float02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Float02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Float02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Float02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_InstanceOf03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Int03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Long03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Loop01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Loop01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Loop01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/VN_Loop01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_get03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getBoolean01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getBoolean01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getBoolean01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getBoolean01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getByte01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getByte01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getByte01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getByte01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getChar01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getChar01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getChar01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getChar01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getDouble01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getDouble01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getDouble01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getDouble01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getFloat01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getFloat01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getFloat01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getFloat01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getInt01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getInt01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getInt01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getInt01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getLength01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getLength01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getLength01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getLength01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getLong01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getLong01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getLong01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getLong01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getShort01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getShort01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getShort01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_getShort01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance05.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance05.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance05.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance06.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance06.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance06.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_newInstance06.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_set03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setBoolean01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setBoolean01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setBoolean01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setBoolean01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setByte01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setByte01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setByte01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setByte01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setChar01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setChar01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setChar01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setChar01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setDouble01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setDouble01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setDouble01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setDouble01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setFloat01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setFloat01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setFloat01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setFloat01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setInt01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setInt01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setInt01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setInt01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setLong01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setLong01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setLong01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setLong01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setShort01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setShort01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setShort01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Array_setShort01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getDeclaredField01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getDeclaredField01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getDeclaredField01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getDeclaredField01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getDeclaredMethod01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getDeclaredMethod01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getDeclaredMethod01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getDeclaredMethod01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getField01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getField01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getField01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getField01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getField02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getField02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getField02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getField02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getMethod01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getMethod01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getMethod01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getMethod01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getMethod02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getMethod02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getMethod02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_getMethod02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance06.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance06.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance06.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance06.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance07.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance07.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance07.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Class_newInstance07.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_get04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_getType01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_getType01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_getType01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_getType01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Field_set03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_except01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_except01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_except01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_except01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_main03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_virtual01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_virtual01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_virtual01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Invoke_virtual01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Method_getParameterTypes01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Method_getParameterTypes01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Method_getParameterTypes01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Method_getParameterTypes01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Method_getReturnType01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Method_getReturnType01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Method_getReturnType01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/reflect/Method_getReturnType01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitor_contended01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitor_contended01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitor_contended01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitor_contended01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitor_notowner01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitor_notowner01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitor_notowner01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitor_notowner01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitorenter01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitorenter01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitorenter01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitorenter01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitorenter02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitorenter02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitorenter02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Monitorenter02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Object_wait04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/SynchronizedLoopExit01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/SynchronizedLoopExit01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/SynchronizedLoopExit01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/SynchronizedLoopExit01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/ThreadLocal03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_currentThread01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_currentThread01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_currentThread01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_currentThread01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_getState01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_getState01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_getState01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_getState01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_getState02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_getState02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_getState02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_getState02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_holdsLock01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_holdsLock01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_holdsLock01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_holdsLock01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isAlive01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isAlive01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isAlive01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isAlive01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted04.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted04.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted04.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted04.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted05.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted05.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted05.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_isInterrupted05.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join03.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join03.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join03.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_join03.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_new01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_new01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_new01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_new01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_new02.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_new02.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_new02.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_new02.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_setPriority01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_setPriority01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_setPriority01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_setPriority01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_sleep01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_sleep01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_sleep01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_sleep01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_yield01.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_yield01.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_yield01.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/Thread_yield01.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64AddressValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64AddressValue.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64AddressValue.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64AddressValue.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ArithmeticLIRGeneratorTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ArithmeticLIRGeneratorTool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ArithmeticLIRGeneratorTool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ArithmeticLIRGeneratorTool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ArithmeticOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ArithmeticOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ArithmeticOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ArithmeticOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BitManipulationOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BitManipulationOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BitManipulationOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BitManipulationOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BlockEndOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BlockEndOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BlockEndOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BlockEndOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BreakpointOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BreakpointOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BreakpointOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64BreakpointOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Call.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Call.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Call.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Call.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Compare.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Compare.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Compare.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Compare.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ControlFlow.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ControlFlow.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ControlFlow.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ControlFlow.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64FrameMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64FrameMap.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64FrameMap.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64FrameMap.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64FrameMapBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64FrameMapBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64FrameMapBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64FrameMapBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64LIRInstruction.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64LIRInstruction.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64LIRInstruction.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64LIRInstruction.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Move.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Move.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Move.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64Move.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64PauseOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64PauseOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64PauseOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64PauseOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64PrefetchOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64PrefetchOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64PrefetchOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64PrefetchOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ReinterpretOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ReinterpretOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ReinterpretOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ReinterpretOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64SignExtendOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64SignExtendOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64SignExtendOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64SignExtendOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64AddressValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64AddressValue.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64AddressValue.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64AddressValue.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Arithmetic.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Arithmetic.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Arithmetic.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Arithmetic.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArithmeticLIRGeneratorTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArithmeticLIRGeneratorTool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArithmeticLIRGeneratorTool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArithmeticLIRGeneratorTool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArrayEqualsOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArrayEqualsOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArrayEqualsOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArrayEqualsOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Binary.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Binary.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Binary.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Binary.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BinaryConsumer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BinaryConsumer.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BinaryConsumer.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BinaryConsumer.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BlockEndOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BlockEndOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BlockEndOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BlockEndOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BreakpointOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BreakpointOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BreakpointOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64BreakpointOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ByteSwapOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ByteSwapOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ByteSwapOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ByteSwapOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64CCall.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64CCall.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64CCall.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64CCall.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Call.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Call.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Call.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Call.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ClearRegisterOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ClearRegisterOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ClearRegisterOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ClearRegisterOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ControlFlow.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ControlFlow.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ControlFlow.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ControlFlow.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64FrameMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64FrameMap.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64FrameMap.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64FrameMap.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64FrameMapBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64FrameMapBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64FrameMapBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64FrameMapBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64LIRInstruction.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64LIRInstruction.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64LIRInstruction.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64LIRInstruction.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MathIntrinsicBinaryOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MathIntrinsicBinaryOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MathIntrinsicBinaryOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MathIntrinsicBinaryOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MathIntrinsicUnaryOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MathIntrinsicUnaryOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MathIntrinsicUnaryOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MathIntrinsicUnaryOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Move.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Move.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Move.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Move.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MulDivOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MulDivOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MulDivOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MulDivOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64PauseOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64PauseOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64PauseOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64PauseOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64PrefetchOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64PrefetchOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64PrefetchOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64PrefetchOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ReadTimestampCounter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ReadTimestampCounter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ReadTimestampCounter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ReadTimestampCounter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64RestoreRegistersOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64RestoreRegistersOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64RestoreRegistersOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64RestoreRegistersOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64SaveRegistersOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64SaveRegistersOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64SaveRegistersOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64SaveRegistersOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ShiftOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ShiftOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ShiftOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ShiftOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64SignExtendOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64SignExtendOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64SignExtendOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64SignExtendOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Unary.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Unary.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Unary.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Unary.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64VZeroUpper.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64VZeroUpper.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64VZeroUpper.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64VZeroUpper.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ZapRegistersOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ZapRegistersOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ZapRegistersOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ZapRegistersOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ZapStackOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ZapStackOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ZapStackOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ZapStackOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/phases/StackMoveOptimizationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/phases/StackMoveOptimizationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/phases/StackMoveOptimizationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/phases/StackMoveOptimizationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/ConstantStackCastTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/ConstantStackCastTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/ConstantStackCastTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/ConstantStackCastTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTestSpecification.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTestSpecification.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTestSpecification.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTestSpecification.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTestTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTestTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTestTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/LIRTestTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/SPARCBranchBailoutTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/SPARCBranchBailoutTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/SPARCBranchBailoutTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/SPARCBranchBailoutTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/StackMoveTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/StackMoveTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/StackMoveTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.jtt/src/org/graalvm/compiler/lir/jtt/StackMoveTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCAddressValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCAddressValue.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCAddressValue.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCAddressValue.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCArithmetic.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCArithmetic.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCArithmetic.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCArithmetic.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCArrayEqualsOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCArrayEqualsOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCArrayEqualsOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCArrayEqualsOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBitManipulationOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBitManipulationOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBitManipulationOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBitManipulationOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBlockEndOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBlockEndOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBlockEndOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBlockEndOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBreakpointOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBreakpointOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBreakpointOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCBreakpointOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCByteSwapOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCByteSwapOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCByteSwapOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCByteSwapOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCCall.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCCall.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCCall.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCCall.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCControlFlow.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCControlFlow.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCControlFlow.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCControlFlow.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCDelayedControlTransfer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCDelayedControlTransfer.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCDelayedControlTransfer.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCDelayedControlTransfer.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFloatCompareOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFloatCompareOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFloatCompareOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFloatCompareOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFrameMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFrameMap.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFrameMap.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFrameMap.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFrameMapBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFrameMapBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFrameMapBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCFrameMapBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCImmediateAddressValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCImmediateAddressValue.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCImmediateAddressValue.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCImmediateAddressValue.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCIndexedAddressValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCIndexedAddressValue.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCIndexedAddressValue.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCIndexedAddressValue.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCJumpOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCJumpOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCJumpOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCJumpOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLIRInstruction.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLIRInstruction.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLIRInstruction.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLIRInstruction.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLIRInstructionMixin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLIRInstructionMixin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLIRInstructionMixin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLIRInstructionMixin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLoadConstantTableBaseOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLoadConstantTableBaseOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLoadConstantTableBaseOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCLoadConstantTableBaseOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCMove.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCMove.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCMove.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCMove.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCOP3Op.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCOP3Op.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCOP3Op.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCOP3Op.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCOPFOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCOPFOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCOPFOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCOPFOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCPauseOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCPauseOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCPauseOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCPauseOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCPrefetchOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCPrefetchOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCPrefetchOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCPrefetchOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCSaveRegistersOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCSaveRegistersOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCSaveRegistersOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCSaveRegistersOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCTailDelayedLIRInstruction.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCTailDelayedLIRInstruction.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCTailDelayedLIRInstruction.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.sparc/src/org/graalvm/compiler/lir/sparc/SPARCTailDelayedLIRInstruction.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/CompositeValueReplacementTest1.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/CompositeValueReplacementTest1.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/CompositeValueReplacementTest1.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/CompositeValueReplacementTest1.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/GenericValueMapTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/GenericValueMapTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/GenericValueMapTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/GenericValueMapTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/alloc/trace/TraceGlobalMoveResolutionMappingTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/alloc/trace/TraceGlobalMoveResolutionMappingTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/alloc/trace/TraceGlobalMoveResolutionMappingTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.test/src/org/graalvm/compiler/lir/test/alloc/trace/TraceGlobalMoveResolutionMappingTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/BailoutAndRestartBackendException.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/BailoutAndRestartBackendException.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/BailoutAndRestartBackendException.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/BailoutAndRestartBackendException.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/CompositeValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/CompositeValue.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/CompositeValue.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/CompositeValue.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/CompositeValueClass.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/CompositeValueClass.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/CompositeValueClass.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/CompositeValueClass.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ConstantValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ConstantValue.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ConstantValue.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ConstantValue.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ControlFlowOptimizer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ControlFlowOptimizer.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ControlFlowOptimizer.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ControlFlowOptimizer.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/EdgeMoveOptimizer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/EdgeMoveOptimizer.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/EdgeMoveOptimizer.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/EdgeMoveOptimizer.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/FullInfopointOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/FullInfopointOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/FullInfopointOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/FullInfopointOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionStateProcedure.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionStateProcedure.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionStateProcedure.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionStateProcedure.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionValueConsumer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionValueConsumer.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionValueConsumer.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionValueConsumer.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionValueProcedure.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionValueProcedure.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionValueProcedure.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/InstructionValueProcedure.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIR.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIR.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIR.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIR.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRFrameState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRFrameState.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRFrameState.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRFrameState.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInsertionBuffer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInsertionBuffer.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInsertionBuffer.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInsertionBuffer.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInstruction.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInstruction.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInstruction.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInstruction.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInstructionClass.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInstructionClass.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInstructionClass.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRInstructionClass.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRIntrospection.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRIntrospection.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRIntrospection.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRIntrospection.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRValueUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRValueUtil.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRValueUtil.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRValueUtil.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRVerifier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRVerifier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRVerifier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LabelRef.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LabelRef.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LabelRef.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LabelRef.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/NullCheckOptimizer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/NullCheckOptimizer.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/NullCheckOptimizer.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/NullCheckOptimizer.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/Opcode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/Opcode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/Opcode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/Opcode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/RedundantMoveElimination.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/RedundantMoveElimination.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/RedundantMoveElimination.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/RedundantMoveElimination.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/StandardOp.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/StandardOp.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/StandardOp.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/StandardOp.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/StateProcedure.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/StateProcedure.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/StateProcedure.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/StateProcedure.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/SwitchStrategy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/SwitchStrategy.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/SwitchStrategy.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/SwitchStrategy.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ValueConsumer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ValueConsumer.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ValueConsumer.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ValueConsumer.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ValueProcedure.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ValueProcedure.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ValueProcedure.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ValueProcedure.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/Variable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/Variable.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/Variable.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/Variable.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/VirtualStackSlot.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/VirtualStackSlot.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/VirtualStackSlot.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/VirtualStackSlot.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/AllocationStageVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/AllocationStageVerifier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/AllocationStageVerifier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/AllocationStageVerifier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/OutOfRegistersException.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/OutOfRegistersException.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/OutOfRegistersException.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/OutOfRegistersException.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/SaveCalleeSaveRegisters.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/SaveCalleeSaveRegisters.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/SaveCalleeSaveRegisters.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/SaveCalleeSaveRegisters.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/Interval.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/Interval.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/Interval.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/Interval.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/IntervalWalker.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/IntervalWalker.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/IntervalWalker.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/IntervalWalker.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScan.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScan.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScan.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScan.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanAssignLocationsPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanAssignLocationsPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanAssignLocationsPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanAssignLocationsPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanEliminateSpillMovePhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanEliminateSpillMovePhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanEliminateSpillMovePhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanEliminateSpillMovePhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanIntervalDumper.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanIntervalDumper.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanIntervalDumper.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanIntervalDumper.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanLifetimeAnalysisPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanLifetimeAnalysisPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanLifetimeAnalysisPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanLifetimeAnalysisPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanOptimizeSpillPositionPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanOptimizeSpillPositionPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanOptimizeSpillPositionPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanOptimizeSpillPositionPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanRegisterAllocationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanRegisterAllocationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanRegisterAllocationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanRegisterAllocationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanResolveDataFlowPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanResolveDataFlowPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanResolveDataFlowPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanResolveDataFlowPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanWalker.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanWalker.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanWalker.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanWalker.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/MoveResolver.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/MoveResolver.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/MoveResolver.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/MoveResolver.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/OptimizingLinearScanWalker.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/OptimizingLinearScanWalker.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/OptimizingLinearScanWalker.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/OptimizingLinearScanWalker.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/Range.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/Range.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/Range.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/Range.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/RegisterVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/RegisterVerifier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/RegisterVerifier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/RegisterVerifier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScan.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScan.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScan.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScan.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanEliminateSpillMovePhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanEliminateSpillMovePhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanEliminateSpillMovePhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanEliminateSpillMovePhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanLifetimeAnalysisPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanLifetimeAnalysisPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanLifetimeAnalysisPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanLifetimeAnalysisPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanResolveDataFlowPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanResolveDataFlowPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanResolveDataFlowPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSALinearScanResolveDataFlowPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSAMoveResolver.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSAMoveResolver.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSAMoveResolver.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/ssa/SSAMoveResolver.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/DefaultTraceRegisterAllocationPolicy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/DefaultTraceRegisterAllocationPolicy.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/DefaultTraceRegisterAllocationPolicy.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/DefaultTraceRegisterAllocationPolicy.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/ShadowedRegisterValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/ShadowedRegisterValue.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/ShadowedRegisterValue.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/ShadowedRegisterValue.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceAllocationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceAllocationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceAllocationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceAllocationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceBuilderPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceBuilderPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceBuilderPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceBuilderPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceGlobalMoveResolutionPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceGlobalMoveResolutionPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceGlobalMoveResolutionPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceGlobalMoveResolutionPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceGlobalMoveResolver.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceGlobalMoveResolver.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceGlobalMoveResolver.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceGlobalMoveResolver.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceRegisterAllocationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceRegisterAllocationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceRegisterAllocationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceRegisterAllocationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceRegisterAllocationPolicy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceRegisterAllocationPolicy.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceRegisterAllocationPolicy.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceRegisterAllocationPolicy.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceUtil.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceUtil.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceUtil.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TrivialTraceAllocator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TrivialTraceAllocator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TrivialTraceAllocator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TrivialTraceAllocator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/bu/BottomUpAllocator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/bu/BottomUpAllocator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/bu/BottomUpAllocator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/bu/BottomUpAllocator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/FixedInterval.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/FixedInterval.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/FixedInterval.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/FixedInterval.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/FixedRange.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/FixedRange.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/FixedRange.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/FixedRange.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/IntervalHint.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/IntervalHint.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/IntervalHint.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/IntervalHint.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/RegisterVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/RegisterVerifier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/RegisterVerifier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/RegisterVerifier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceInterval.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceInterval.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceInterval.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceInterval.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceIntervalWalker.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceIntervalWalker.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceIntervalWalker.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceIntervalWalker.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanAllocationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanAllocationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanAllocationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanAllocationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanAssignLocationsPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanAssignLocationsPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanAssignLocationsPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanAssignLocationsPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanEliminateSpillMovePhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanEliminateSpillMovePhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanEliminateSpillMovePhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanEliminateSpillMovePhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanLifetimeAnalysisPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanLifetimeAnalysisPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanLifetimeAnalysisPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanLifetimeAnalysisPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanRegisterAllocationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanRegisterAllocationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanRegisterAllocationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanRegisterAllocationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanResolveDataFlowPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanResolveDataFlowPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanResolveDataFlowPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanResolveDataFlowPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanWalker.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanWalker.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanWalker.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLinearScanWalker.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLocalMoveResolver.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLocalMoveResolver.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLocalMoveResolver.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/lsra/TraceLocalMoveResolver.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/ArrayDataPointerConstant.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/ArrayDataPointerConstant.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/ArrayDataPointerConstant.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/ArrayDataPointerConstant.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilderFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilderFactory.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilderFactory.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilderFactory.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/DataBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/DataBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/DataBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/DataBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/FrameContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/FrameContext.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/FrameContext.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/FrameContext.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantLoadOptimization.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantLoadOptimization.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantLoadOptimization.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantLoadOptimization.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantTree.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantTree.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantTree.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantTree.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantTreeAnalyzer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantTreeAnalyzer.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantTreeAnalyzer.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/ConstantTreeAnalyzer.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/DefUseTree.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/DefUseTree.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/DefUseTree.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/DefUseTree.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/UseEntry.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/UseEntry.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/UseEntry.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/UseEntry.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/VariableMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/VariableMap.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/VariableMap.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/constopt/VariableMap.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/debug/IntervalDumper.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/debug/IntervalDumper.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/debug/IntervalDumper.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/debug/IntervalDumper.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/debug/LIRGenerationDebugContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/debug/LIRGenerationDebugContext.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/debug/LIRGenerationDebugContext.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/debug/LIRGenerationDebugContext.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/LocationMarker.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/LocationMarker.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/LocationMarker.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/LocationMarker.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/LocationMarkerPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/LocationMarkerPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/LocationMarkerPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/LocationMarkerPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/MarkBasePointersPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/MarkBasePointersPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/MarkBasePointersPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/MarkBasePointersPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/RegStackValueSet.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/RegStackValueSet.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/RegStackValueSet.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/RegStackValueSet.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/UniqueWorkList.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/UniqueWorkList.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/UniqueWorkList.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/dfa/UniqueWorkList.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMap.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMap.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMap.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilderImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilderImpl.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilderImpl.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilderImpl.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilderTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilderTool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilderTool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/FrameMapBuilderTool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/ReferenceMapBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/ReferenceMapBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/ReferenceMapBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/ReferenceMapBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/SimpleVirtualStackSlot.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/SimpleVirtualStackSlot.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/SimpleVirtualStackSlot.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/SimpleVirtualStackSlot.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/VirtualStackSlotRange.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/VirtualStackSlotRange.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/VirtualStackSlotRange.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/framemap/VirtualStackSlotRange.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/ArithmeticLIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/ArithmeticLIRGenerator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/ArithmeticLIRGenerator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/ArithmeticLIRGenerator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/ArithmeticLIRGeneratorTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/ArithmeticLIRGeneratorTool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/ArithmeticLIRGeneratorTool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/ArithmeticLIRGeneratorTool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/BlockValueMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/BlockValueMap.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/BlockValueMap.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/BlockValueMap.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/DiagnosticLIRGeneratorTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/DiagnosticLIRGeneratorTool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/DiagnosticLIRGeneratorTool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/DiagnosticLIRGeneratorTool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGenerationResult.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGenerationResult.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGenerationResult.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGenerationResult.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGenerator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGenerator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGenerator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGeneratorTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGeneratorTool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGeneratorTool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGeneratorTool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/PhiResolver.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/PhiResolver.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/PhiResolver.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/PhiResolver.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/VerifyingMoveFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/VerifyingMoveFactory.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/VerifyingMoveFactory.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/VerifyingMoveFactory.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/AllocationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/AllocationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/AllocationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/AllocationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/AllocationStage.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/AllocationStage.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/AllocationStage.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/AllocationStage.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyAllocationStage.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyAllocationStage.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyAllocationStage.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyAllocationStage.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyPostAllocationOptimizationStage.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyPostAllocationOptimizationStage.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyPostAllocationOptimizationStage.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyPostAllocationOptimizationStage.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyPreAllocationOptimizationStage.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyPreAllocationOptimizationStage.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyPreAllocationOptimizationStage.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/EconomyPreAllocationOptimizationStage.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/GenericContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/GenericContext.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/GenericContext.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/GenericContext.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRPhaseSuite.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRPhaseSuite.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRPhaseSuite.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRPhaseSuite.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRSuites.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRSuites.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRSuites.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/LIRSuites.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PostAllocationOptimizationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PostAllocationOptimizationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PostAllocationOptimizationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PostAllocationOptimizationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PostAllocationOptimizationStage.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PostAllocationOptimizationStage.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PostAllocationOptimizationStage.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PostAllocationOptimizationStage.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PreAllocationOptimizationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PreAllocationOptimizationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PreAllocationOptimizationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PreAllocationOptimizationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PreAllocationOptimizationStage.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PreAllocationOptimizationStage.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PreAllocationOptimizationStage.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/phases/PreAllocationOptimizationStage.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MethodProfilingPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MethodProfilingPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MethodProfilingPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MethodProfilingPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveProfiler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveProfiler.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveProfiler.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveProfiler.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveProfilingPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveProfilingPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveProfilingPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveProfilingPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveType.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveType.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveType.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/profiling/MoveType.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssa/SSAUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssa/SSAUtil.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssa/SSAUtil.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssa/SSAUtil.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssa/SSAVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssa/SSAVerifier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssa/SSAVerifier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssa/SSAVerifier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/FastSSIBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/FastSSIBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/FastSSIBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/FastSSIBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIBuilderBase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIBuilderBase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIBuilderBase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIBuilderBase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIConstructionPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIConstructionPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIConstructionPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIConstructionPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIUtil.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIUtil.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIUtil.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIVerifier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIVerifier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/ssi/SSIVerifier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/FixPointIntervalBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/FixPointIntervalBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/FixPointIntervalBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/FixPointIntervalBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/LSStackSlotAllocator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/LSStackSlotAllocator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/LSStackSlotAllocator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/LSStackSlotAllocator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/SimpleStackSlotAllocator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/SimpleStackSlotAllocator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/SimpleStackSlotAllocator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/SimpleStackSlotAllocator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackInterval.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackInterval.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackInterval.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackInterval.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackIntervalDumper.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackIntervalDumper.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackIntervalDumper.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackIntervalDumper.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackSlotAllocatorUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackSlotAllocatorUtil.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackSlotAllocatorUtil.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/stackslotalloc/StackSlotAllocatorUtil.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/GenericValueMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/GenericValueMap.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/GenericValueMap.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/GenericValueMap.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/IndexedValueMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/IndexedValueMap.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/IndexedValueMap.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/IndexedValueMap.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/RegisterMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/RegisterMap.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/RegisterMap.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/RegisterMap.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/ValueMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/ValueMap.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/ValueMap.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/ValueMap.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/ValueSet.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/ValueSet.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/ValueSet.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/ValueSet.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/VariableVirtualStackValueMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/VariableVirtualStackValueMap.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/VariableVirtualStackValueMap.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/util/VariableVirtualStackValueMap.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/ContextlessLoopPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/ContextlessLoopPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/ContextlessLoopPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/ContextlessLoopPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopFullUnrollPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopFullUnrollPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopFullUnrollPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopFullUnrollPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopPeelingPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopPeelingPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopPeelingPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopPeelingPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopSafepointEliminationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopSafepointEliminationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopSafepointEliminationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopSafepointEliminationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopTransformations.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopTransformations.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopTransformations.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopTransformations.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopUnswitchingPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopUnswitchingPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopUnswitchingPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopUnswitchingPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/ReassociateInvariantPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/ReassociateInvariantPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/ReassociateInvariantPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/ReassociateInvariantPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/BasicInductionVariable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/BasicInductionVariable.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/BasicInductionVariable.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/BasicInductionVariable.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/CountedLoopInfo.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/CountedLoopInfo.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/CountedLoopInfo.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/CountedLoopInfo.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DefaultLoopPolicies.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DefaultLoopPolicies.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DefaultLoopPolicies.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DefaultLoopPolicies.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedConvertedInductionVariable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedConvertedInductionVariable.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedConvertedInductionVariable.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedConvertedInductionVariable.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedInductionVariable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedInductionVariable.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedInductionVariable.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedInductionVariable.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedOffsetInductionVariable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedOffsetInductionVariable.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedOffsetInductionVariable.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedOffsetInductionVariable.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedScaledInductionVariable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedScaledInductionVariable.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedScaledInductionVariable.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DerivedScaledInductionVariable.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/InductionVariable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/InductionVariable.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/InductionVariable.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/InductionVariable.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopEx.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopEx.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopEx.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopEx.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragment.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragment.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragment.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragment.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInside.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInside.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInside.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInside.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInsideBefore.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInsideBefore.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInsideBefore.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInsideBefore.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInsideFrom.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInsideFrom.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInsideFrom.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInsideFrom.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentWhole.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentWhole.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentWhole.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentWhole.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopPolicies.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopPolicies.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopPolicies.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopPolicies.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopsData.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopsData.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopsData.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopsData.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/MathUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/MathUtil.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/MathUtil.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/MathUtil.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/ArrayDuplicationBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/ArrayDuplicationBenchmark.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/ArrayDuplicationBenchmark.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/ArrayDuplicationBenchmark.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/GuardedIntrinsicBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/GuardedIntrinsicBenchmark.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/GuardedIntrinsicBenchmark.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/GuardedIntrinsicBenchmark.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/MathFunctionBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/MathFunctionBenchmark.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/MathFunctionBenchmark.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/MathFunctionBenchmark.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/SimpleSyncBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/SimpleSyncBenchmark.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/SimpleSyncBenchmark.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/SimpleSyncBenchmark.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/package-info.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/package-info.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/package-info.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/micro/benchmarks/package-info.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/ConditionalEliminationBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/ConditionalEliminationBenchmark.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/ConditionalEliminationBenchmark.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/ConditionalEliminationBenchmark.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/FrameStateAssigmentPhaseBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/FrameStateAssigmentPhaseBenchmark.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/FrameStateAssigmentPhaseBenchmark.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/FrameStateAssigmentPhaseBenchmark.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/GraalBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/GraalBenchmark.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/GraalBenchmark.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/GraalBenchmark.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/GraphCopyBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/GraphCopyBenchmark.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/GraphCopyBenchmark.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/GraphCopyBenchmark.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/NodeBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/NodeBenchmark.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/NodeBenchmark.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/NodeBenchmark.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/SchedulePhaseBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/SchedulePhaseBenchmark.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/SchedulePhaseBenchmark.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/SchedulePhaseBenchmark.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/TestJMH.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/TestJMH.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/TestJMH.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/TestJMH.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/FrameStateAssignmentState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/FrameStateAssignmentState.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/FrameStateAssignmentState.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/FrameStateAssignmentState.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraalState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraalState.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraalState.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraalState.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraalUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraalUtil.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraalUtil.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraalUtil.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraphState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraphState.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraphState.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraphState.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/MethodSpec.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/MethodSpec.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/MethodSpec.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/MethodSpec.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/NodesState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/NodesState.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/NodesState.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/NodesState.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/ScheduleState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/ScheduleState.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/ScheduleState.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/ScheduleState.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/CompileTimeBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/CompileTimeBenchmark.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/CompileTimeBenchmark.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/CompileTimeBenchmark.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/GraalCompilerState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/GraalCompilerState.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/GraalCompilerState.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/GraalCompilerState.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/RegisterAllocationTimeBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/RegisterAllocationTimeBenchmark.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/RegisterAllocationTimeBenchmark.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/RegisterAllocationTimeBenchmark.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/ControlFlowGraphState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/ControlFlowGraphState.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/ControlFlowGraphState.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/ControlFlowGraphState.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/TraceBuilderBenchmark.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/TraceBuilderBenchmark.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/TraceBuilderBenchmark.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/TraceBuilderBenchmark.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/TraceLSRAIntervalBuildingBench.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/TraceLSRAIntervalBuildingBench.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/TraceLSRAIntervalBuildingBench.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/lir/trace/TraceLSRAIntervalBuildingBench.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/META-INF/services/javax.annotation.processing.Processor b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/META-INF/services/javax.annotation.processing.Processor similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/META-INF/services/javax.annotation.processing.Processor rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/META-INF/services/javax.annotation.processing.Processor diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/ElementException.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/ElementException.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/ElementException.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/ElementException.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/GraphNodeProcessor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/GraphNodeProcessor.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/GraphNodeProcessor.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/GraphNodeProcessor.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/GraphNodeVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/GraphNodeVerifier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/GraphNodeVerifier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo.processor/src/org/graalvm/compiler/nodeinfo/processor/GraphNodeVerifier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/InputType.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/InputType.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/InputType.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/InputType.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeCycles.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeCycles.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeCycles.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeCycles.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeInfo.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeInfo.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeInfo.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeInfo.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeSize.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeSize.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeSize.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/NodeSize.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/StructuralInput.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/StructuralInput.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/StructuralInput.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/StructuralInput.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/Verbosity.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/Verbosity.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/Verbosity.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodeinfo/src/org/graalvm/compiler/nodeinfo/Verbosity.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/AbstractObjectStampTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/AbstractObjectStampTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/AbstractObjectStampTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/AbstractObjectStampTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/IfNodeCanonicalizationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/IfNodeCanonicalizationTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/IfNodeCanonicalizationTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/IfNodeCanonicalizationTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/IntegerStampTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/IntegerStampTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/IntegerStampTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/IntegerStampTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/LoopLivenessTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/LoopLivenessTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/LoopLivenessTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/LoopLivenessTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/LoopPhiCanonicalizerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/LoopPhiCanonicalizerTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/LoopPhiCanonicalizerTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/LoopPhiCanonicalizerTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/NegateNodeCanonicalizationTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/NegateNodeCanonicalizationTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/NegateNodeCanonicalizationTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/NegateNodeCanonicalizationTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampJoinTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampJoinTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampJoinTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampJoinTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampMeetTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampMeetTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampMeetTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampMeetTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ObjectStampTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampDoubleToLongTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampDoubleToLongTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampDoubleToLongTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampDoubleToLongTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampFloatToIntTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampFloatToIntTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampFloatToIntTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampFloatToIntTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampIntToFloatTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampIntToFloatTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampIntToFloatTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampIntToFloatTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampLongToDoubleTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampLongToDoubleTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampLongToDoubleTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampLongToDoubleTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ReinterpretStampTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ShortCircuitOrNodeTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ShortCircuitOrNodeTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ShortCircuitOrNodeTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ShortCircuitOrNodeTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractBeginNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractBeginNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractBeginNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractBeginNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractDeoptimizeNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractDeoptimizeNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractDeoptimizeNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractDeoptimizeNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractEndNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractEndNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractEndNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractEndNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractFixedGuardNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractFixedGuardNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractFixedGuardNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractFixedGuardNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractLocalNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractLocalNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractLocalNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractLocalNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractMergeNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractMergeNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractMergeNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractMergeNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractStateSplit.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractStateSplit.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractStateSplit.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/AbstractStateSplit.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ArithmeticOperation.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ArithmeticOperation.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ArithmeticOperation.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ArithmeticOperation.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BeginNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BeginNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BeginNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BeginNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BeginStateSplitNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BeginStateSplitNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BeginStateSplitNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BeginStateSplitNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BinaryOpLogicNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BinaryOpLogicNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BinaryOpLogicNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BinaryOpLogicNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BreakpointNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BreakpointNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BreakpointNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/BreakpointNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/CallTargetNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/CallTargetNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/CallTargetNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/CallTargetNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/CanonicalizableLocation.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/CanonicalizableLocation.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/CanonicalizableLocation.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/CanonicalizableLocation.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ConditionAnchorNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ConditionAnchorNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ConditionAnchorNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ConditionAnchorNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ConstantNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ConstantNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ConstantNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ConstantNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ControlSinkNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ControlSinkNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ControlSinkNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ControlSinkNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ControlSplitNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ControlSplitNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ControlSplitNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ControlSplitNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizeNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizeNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizeNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizeNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingFixedWithNextNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingFixedWithNextNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingFixedWithNextNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingFixedWithNextNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingGuard.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingGuard.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingGuard.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingGuard.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DeoptimizingNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DirectCallTargetNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DirectCallTargetNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DirectCallTargetNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DirectCallTargetNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DynamicDeoptimizeNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DynamicDeoptimizeNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DynamicDeoptimizeNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DynamicDeoptimizeNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DynamicPiNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DynamicPiNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DynamicPiNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/DynamicPiNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EncodedGraph.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EncodedGraph.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EncodedGraph.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EncodedGraph.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EndNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EndNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EndNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EndNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EntryMarkerNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EntryMarkerNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EntryMarkerNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EntryMarkerNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EntryProxyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EntryProxyNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EntryProxyNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/EntryProxyNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FieldLocationIdentity.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FieldLocationIdentity.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FieldLocationIdentity.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FieldLocationIdentity.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedGuardNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedGuardNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedGuardNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedGuardNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedNodeInterface.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedNodeInterface.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedNodeInterface.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedNodeInterface.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedWithNextNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedWithNextNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedWithNextNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FixedWithNextNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FloatingAnchoredNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FloatingAnchoredNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FloatingAnchoredNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FloatingAnchoredNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FloatingGuardedNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FloatingGuardedNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FloatingGuardedNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FloatingGuardedNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FrameState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FrameState.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FrameState.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FrameState.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FullInfopointNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FullInfopointNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FullInfopointNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FullInfopointNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GraphDecoder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GraphDecoder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GraphDecoder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GraphDecoder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GraphEncoder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GraphEncoder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GraphEncoder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GraphEncoder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardPhiNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardPhiNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardPhiNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardPhiNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardProxyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardProxyNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardProxyNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardProxyNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardedValueNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardedValueNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardedValueNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardedValueNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IfNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IfNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IfNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IfNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IndirectCallTargetNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IndirectCallTargetNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IndirectCallTargetNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IndirectCallTargetNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/Invoke.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/Invoke.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/Invoke.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/Invoke.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/InvokeNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/InvokeNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/InvokeNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/InvokeNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/InvokeWithExceptionNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/InvokeWithExceptionNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/InvokeWithExceptionNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/InvokeWithExceptionNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/KillingBeginNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/KillingBeginNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/KillingBeginNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/KillingBeginNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicConstantNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicConstantNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicConstantNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicConstantNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicNegationNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicNegationNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicNegationNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicNegationNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LogicNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopBeginNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopBeginNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopBeginNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopBeginNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopEndNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopEndNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopEndNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopEndNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopExitNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopExitNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopExitNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopExitNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoweredCallTargetNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoweredCallTargetNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoweredCallTargetNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoweredCallTargetNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/MergeNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/MergeNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/MergeNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/MergeNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/NamedLocationIdentity.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/NamedLocationIdentity.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/NamedLocationIdentity.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/NamedLocationIdentity.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ParameterNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ParameterNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ParameterNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ParameterNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PauseNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PauseNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PauseNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PauseNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PhiNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PhiNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PhiNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PhiNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PiArrayNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PiArrayNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PiArrayNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PiArrayNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PiNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PiNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PiNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PiNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PrefetchAllocateNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PrefetchAllocateNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PrefetchAllocateNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/PrefetchAllocateNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ProxyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ProxyNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ProxyNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ProxyNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ReturnNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ReturnNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ReturnNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ReturnNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/SafepointNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/SafepointNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/SafepointNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/SafepointNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ShortCircuitOrNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ShortCircuitOrNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ShortCircuitOrNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ShortCircuitOrNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/SimplifyingGraphDecoder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/SimplifyingGraphDecoder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/SimplifyingGraphDecoder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/SimplifyingGraphDecoder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StartNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StartNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StartNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StartNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StateSplit.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StateSplit.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StateSplit.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StateSplit.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StructuredGraph.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StructuredGraph.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StructuredGraph.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StructuredGraph.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/TypeCheckHints.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/TypeCheckHints.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/TypeCheckHints.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/TypeCheckHints.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/UnaryOpLogicNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/UnaryOpLogicNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/UnaryOpLogicNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/UnaryOpLogicNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/UnwindNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/UnwindNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/UnwindNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/UnwindNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNodeInterface.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNodeInterface.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNodeInterface.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNodeInterface.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNodeUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNodeUtil.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNodeUtil.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueNodeUtil.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValuePhiNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValuePhiNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValuePhiNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValuePhiNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueProxyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueProxyNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueProxyNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueProxyNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/VirtualState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/VirtualState.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/VirtualState.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/VirtualState.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AbsNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AbsNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AbsNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AbsNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AddNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AddNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AddNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AddNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AndNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AndNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AndNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AndNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/BinaryArithmeticNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/BinaryArithmeticNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/BinaryArithmeticNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/BinaryArithmeticNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/BinaryNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/BinaryNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/BinaryNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/BinaryNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/CompareNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/CompareNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/CompareNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/CompareNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ConditionalNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ConditionalNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ConditionalNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ConditionalNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ConvertNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ConvertNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ConvertNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ConvertNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/DivNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/DivNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/DivNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/DivNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FixedBinaryNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FixedBinaryNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FixedBinaryNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FixedBinaryNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatConvertNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatConvertNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatConvertNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatConvertNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatEqualsNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatEqualsNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatEqualsNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatEqualsNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatLessThanNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatLessThanNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatLessThanNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatLessThanNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatingNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatingNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatingNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatingNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerBelowNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerBelowNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerBelowNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerBelowNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerConvertNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerConvertNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerConvertNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerConvertNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerDivRemNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerDivRemNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerDivRemNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerDivRemNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerEqualsNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerEqualsNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerEqualsNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerEqualsNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerLessThanNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerLessThanNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerLessThanNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerLessThanNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerTestNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerTestNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerTestNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerTestNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IsNullNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IsNullNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IsNullNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IsNullNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/LeftShiftNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/LeftShiftNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/LeftShiftNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/LeftShiftNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/MulNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/MulNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/MulNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/MulNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NarrowNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NarrowNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NarrowNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NarrowNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NarrowableArithmeticNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NarrowableArithmeticNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NarrowableArithmeticNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NarrowableArithmeticNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NegateNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NegateNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NegateNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NegateNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NormalizeCompareNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NormalizeCompareNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NormalizeCompareNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NormalizeCompareNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NotNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NotNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NotNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/NotNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ObjectEqualsNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ObjectEqualsNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ObjectEqualsNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ObjectEqualsNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/OrNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/OrNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/OrNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/OrNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/PointerEqualsNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/PointerEqualsNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/PointerEqualsNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/PointerEqualsNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ReinterpretNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ReinterpretNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ReinterpretNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ReinterpretNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/RemNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/RemNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/RemNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/RemNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/RightShiftNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/RightShiftNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/RightShiftNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/RightShiftNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ShiftNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ShiftNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ShiftNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ShiftNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignExtendNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignExtendNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignExtendNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignExtendNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignedDivNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignedDivNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignedDivNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignedDivNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignedRemNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignedRemNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignedRemNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SignedRemNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SqrtNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SqrtNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SqrtNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SqrtNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SubNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SubNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SubNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/SubNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnaryArithmeticNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnaryArithmeticNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnaryArithmeticNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnaryArithmeticNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnaryNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnaryNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnaryNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnaryNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedDivNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedDivNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedDivNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedDivNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedRemNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedRemNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedRemNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedRemNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedRightShiftNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedRightShiftNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedRightShiftNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/UnsignedRightShiftNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/XorNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/XorNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/XorNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/XorNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ZeroExtendNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ZeroExtendNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ZeroExtendNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/ZeroExtendNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/Block.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/Block.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/Block.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/Block.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/ControlFlowGraph.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/ControlFlowGraph.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/ControlFlowGraph.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/ControlFlowGraph.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/HIRLoop.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/HIRLoop.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/HIRLoop.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/HIRLoop.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/LocationSet.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/LocationSet.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/LocationSet.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/LocationSet.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/BindToRegisterNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/BindToRegisterNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/BindToRegisterNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/BindToRegisterNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/BlackholeNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/BlackholeNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/BlackholeNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/BlackholeNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/ControlFlowAnchorNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/ControlFlowAnchorNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/ControlFlowAnchorNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/ControlFlowAnchorNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/ControlFlowAnchored.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/ControlFlowAnchored.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/ControlFlowAnchored.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/ControlFlowAnchored.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/DynamicCounterNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/DynamicCounterNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/DynamicCounterNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/DynamicCounterNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/OpaqueNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/OpaqueNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/OpaqueNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/OpaqueNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/SpillRegistersNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/SpillRegistersNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/SpillRegistersNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/SpillRegistersNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/StringToBytesNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/StringToBytesNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/StringToBytesNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/StringToBytesNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/VerifyHeapNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/VerifyHeapNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/VerifyHeapNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/VerifyHeapNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/WeakCounterNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/WeakCounterNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/WeakCounterNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/WeakCounterNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationBeginNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationBeginNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationBeginNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationBeginNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationEndNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationEndNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationEndNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationEndNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationInliningCallback.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationInliningCallback.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationInliningCallback.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationInliningCallback.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/InstrumentationNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/IsMethodInlinedNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/IsMethodInlinedNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/IsMethodInlinedNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/IsMethodInlinedNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/MonitorProxyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/MonitorProxyNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/MonitorProxyNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/MonitorProxyNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/RootNameNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/RootNameNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/RootNameNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/instrumentation/RootNameNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/AnchoringNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/AnchoringNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/AnchoringNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/AnchoringNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ArrayRangeWriteNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ArrayRangeWriteNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ArrayRangeWriteNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ArrayRangeWriteNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BoxNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BoxNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BoxNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BoxNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BranchProbabilityNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BranchProbabilityNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BranchProbabilityNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BranchProbabilityNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BytecodeExceptionNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BytecodeExceptionNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BytecodeExceptionNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BytecodeExceptionNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/FixedValueAnchorNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/FixedValueAnchorNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/FixedValueAnchorNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/FixedValueAnchorNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ForeignCallNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ForeignCallNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ForeignCallNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ForeignCallNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GetClassNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GetClassNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GetClassNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GetClassNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardedNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardedNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardedNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardedNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardedUnsafeLoadNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardedUnsafeLoadNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardedUnsafeLoadNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardedUnsafeLoadNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardingNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardingNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardingNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/GuardingNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/IntegerSwitchNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/IntegerSwitchNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/IntegerSwitchNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/IntegerSwitchNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/JavaReadNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/JavaReadNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/JavaReadNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/JavaReadNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/JavaWriteNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/JavaWriteNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/JavaWriteNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/JavaWriteNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/LoadHubNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/LoadHubNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/LoadHubNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/LoadHubNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/LoadMethodNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/LoadMethodNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/LoadMethodNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/LoadMethodNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MembarNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MembarNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MembarNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MembarNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MonitorEnter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MonitorEnter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MonitorEnter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MonitorEnter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MonitorExit.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MonitorExit.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MonitorExit.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MonitorExit.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/NullCheckNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/NullCheckNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/NullCheckNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/NullCheckNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/OSRLocalNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/OSRLocalNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/OSRLocalNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/OSRLocalNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/OSRStartNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/OSRStartNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/OSRStartNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/OSRStartNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/StoreHubNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/StoreHubNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/StoreHubNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/StoreHubNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/SwitchNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/SwitchNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/SwitchNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/SwitchNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnboxNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnboxNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnboxNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnboxNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeAccessNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeAccessNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeAccessNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeAccessNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeCopyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeCopyNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeCopyNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeCopyNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeLoadNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeLoadNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeLoadNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeLoadNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeMemoryLoadNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeMemoryLoadNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeMemoryLoadNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeMemoryLoadNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeMemoryStoreNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeMemoryStoreNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeMemoryStoreNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeMemoryStoreNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeStoreNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeStoreNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeStoreNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeStoreNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ValueAnchorNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ValueAnchorNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ValueAnchorNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ValueAnchorNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ClassInitializationPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ClassInitializationPlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ClassInitializationPlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ClassInitializationPlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ForeignCallPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ForeignCallPlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ForeignCallPlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ForeignCallPlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GeneratedInvocationPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GeneratedInvocationPlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GeneratedInvocationPlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GeneratedInvocationPlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderConfiguration.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderConfiguration.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderConfiguration.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderConfiguration.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderContext.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderContext.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderContext.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderPlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderPlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderPlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderTool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderTool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderTool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InlineInvokePlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InlineInvokePlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InlineInvokePlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InlineInvokePlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/IntrinsicContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/IntrinsicContext.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/IntrinsicContext.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/IntrinsicContext.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugins.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugins.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugins.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugins.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/LoopExplosionPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/LoopExplosionPlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/LoopExplosionPlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/LoopExplosionPlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/MethodSubstitutionPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/MethodSubstitutionPlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/MethodSubstitutionPlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/MethodSubstitutionPlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/NodeIntrinsicPluginFactory.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/NodeIntrinsicPluginFactory.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/NodeIntrinsicPluginFactory.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/NodeIntrinsicPluginFactory.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/NodePlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/NodePlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/NodePlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/NodePlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ParameterPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ParameterPlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ParameterPlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ParameterPlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ProfilingPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ProfilingPlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ProfilingPlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/ProfilingPlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/TypePlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/TypePlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/TypePlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/TypePlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AbstractNewArrayNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AbstractNewArrayNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AbstractNewArrayNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AbstractNewArrayNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AbstractNewObjectNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AbstractNewObjectNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AbstractNewObjectNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AbstractNewObjectNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessArrayNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessArrayNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessArrayNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessArrayNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessFieldNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessFieldNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessFieldNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessFieldNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessIndexedNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessIndexedNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessIndexedNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessIndexedNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessMonitorNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessMonitorNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessMonitorNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AccessMonitorNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ArrayLengthNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ArrayLengthNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ArrayLengthNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ArrayLengthNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AtomicReadAndAddNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AtomicReadAndAddNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AtomicReadAndAddNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AtomicReadAndAddNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AtomicReadAndWriteNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AtomicReadAndWriteNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AtomicReadAndWriteNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AtomicReadAndWriteNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ClassIsAssignableFromNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ClassIsAssignableFromNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ClassIsAssignableFromNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ClassIsAssignableFromNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/CompareAndSwapNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/CompareAndSwapNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/CompareAndSwapNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/CompareAndSwapNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/DynamicNewArrayNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/DynamicNewArrayNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/DynamicNewArrayNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/DynamicNewArrayNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/DynamicNewInstanceNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/DynamicNewInstanceNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/DynamicNewInstanceNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/DynamicNewInstanceNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ExceptionObjectNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ExceptionObjectNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ExceptionObjectNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ExceptionObjectNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/FinalFieldBarrierNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/FinalFieldBarrierNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/FinalFieldBarrierNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/FinalFieldBarrierNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ForeignCallDescriptors.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ForeignCallDescriptors.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ForeignCallDescriptors.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ForeignCallDescriptors.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/InstanceOfDynamicNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/InstanceOfDynamicNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/InstanceOfDynamicNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/InstanceOfDynamicNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/InstanceOfNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/InstanceOfNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/InstanceOfNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/InstanceOfNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadExceptionObjectNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadExceptionObjectNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadExceptionObjectNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadExceptionObjectNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadFieldNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadFieldNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadFieldNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadFieldNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadIndexedNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadIndexedNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadIndexedNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoadIndexedNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoweredAtomicReadAndWriteNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoweredAtomicReadAndWriteNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoweredAtomicReadAndWriteNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoweredAtomicReadAndWriteNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoweredCompareAndSwapNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoweredCompareAndSwapNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoweredCompareAndSwapNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoweredCompareAndSwapNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MethodCallTargetNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MethodCallTargetNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MethodCallTargetNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MethodCallTargetNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorEnterNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorEnterNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorEnterNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorEnterNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorExitNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorExitNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorExitNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorExitNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorIdNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorIdNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorIdNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorIdNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewArrayNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewArrayNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewArrayNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewArrayNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewInstanceNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewInstanceNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewInstanceNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewInstanceNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewMultiArrayNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewMultiArrayNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewMultiArrayNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewMultiArrayNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/RawMonitorEnterNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/RawMonitorEnterNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/RawMonitorEnterNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/RawMonitorEnterNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/RegisterFinalizerNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/RegisterFinalizerNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/RegisterFinalizerNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/RegisterFinalizerNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/StoreFieldNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/StoreFieldNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/StoreFieldNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/StoreFieldNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/StoreIndexedNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/StoreIndexedNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/StoreIndexedNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/StoreIndexedNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/TypeSwitchNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/TypeSwitchNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/TypeSwitchNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/TypeSwitchNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/AbstractMemoryCheckpoint.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/AbstractMemoryCheckpoint.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/AbstractMemoryCheckpoint.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/AbstractMemoryCheckpoint.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/AbstractWriteNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/AbstractWriteNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/AbstractWriteNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/AbstractWriteNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/Access.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/Access.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/Access.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/Access.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FixedAccessNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FixedAccessNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FixedAccessNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FixedAccessNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatableAccessNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatableAccessNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatableAccessNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatableAccessNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatingAccessNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatingAccessNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatingAccessNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatingAccessNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatingReadNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatingReadNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatingReadNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FloatingReadNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/HeapAccess.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/HeapAccess.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/HeapAccess.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/HeapAccess.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryAccess.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryAccess.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryAccess.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryAccess.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryAnchorNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryAnchorNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryAnchorNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryAnchorNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryCheckpoint.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryCheckpoint.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryCheckpoint.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryCheckpoint.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryMap.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryMap.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryMap.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryMapNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryMapNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryMapNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryMapNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryPhiNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryPhiNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryPhiNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryPhiNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/ReadNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/ReadNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/ReadNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/ReadNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/WriteNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/WriteNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/WriteNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/WriteNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/AddressNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/AddressNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/AddressNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/AddressNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/OffsetAddressNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/OffsetAddressNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/OffsetAddressNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/OffsetAddressNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/RawAddressNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/RawAddressNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/RawAddressNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/RawAddressNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ArithmeticLIRLowerable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ArithmeticLIRLowerable.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ArithmeticLIRLowerable.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ArithmeticLIRLowerable.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ArrayLengthProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ArrayLengthProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ArrayLengthProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ArrayLengthProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/DefaultNodeCostProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/DefaultNodeCostProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/DefaultNodeCostProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/DefaultNodeCostProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LIRLowerable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LIRLowerable.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LIRLowerable.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LIRLowerable.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LimitedValueProxy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LimitedValueProxy.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LimitedValueProxy.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LimitedValueProxy.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Lowerable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Lowerable.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Lowerable.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Lowerable.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LoweringProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LoweringProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LoweringProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LoweringProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LoweringTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LoweringTool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LoweringTool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/LoweringTool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/MemoryProxy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/MemoryProxy.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/MemoryProxy.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/MemoryProxy.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeCostProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeCostProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeCostProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeCostProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeLIRBuilderTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeLIRBuilderTool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeLIRBuilderTool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeLIRBuilderTool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeValueMap.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeValueMap.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeValueMap.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeValueMap.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeWithState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeWithState.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeWithState.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/NodeWithState.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/PiPushable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/PiPushable.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/PiPushable.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/PiPushable.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Proxy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Proxy.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Proxy.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Proxy.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Replacements.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Replacements.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Replacements.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Replacements.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/StampProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/StampProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/StampProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/StampProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/UncheckedInterfaceProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/UncheckedInterfaceProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/UncheckedInterfaceProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/UncheckedInterfaceProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ValueProxy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ValueProxy.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ValueProxy.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/ValueProxy.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Virtualizable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Virtualizable.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Virtualizable.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Virtualizable.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/VirtualizableAllocation.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/VirtualizableAllocation.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/VirtualizableAllocation.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/VirtualizableAllocation.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/VirtualizerTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/VirtualizerTool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/VirtualizerTool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/VirtualizerTool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/type/StampTool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/type/StampTool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/type/StampTool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/type/StampTool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/util/ConstantFoldUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/util/ConstantFoldUtil.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/util/ConstantFoldUtil.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/util/ConstantFoldUtil.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/util/GraphUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/util/GraphUtil.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/util/GraphUtil.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/util/GraphUtil.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/AllocatedObjectNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/AllocatedObjectNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/AllocatedObjectNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/AllocatedObjectNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/CommitAllocationNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/CommitAllocationNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/CommitAllocationNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/CommitAllocationNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/EnsureVirtualizedNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/EnsureVirtualizedNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/EnsureVirtualizedNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/EnsureVirtualizedNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/EscapeObjectState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/EscapeObjectState.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/EscapeObjectState.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/EscapeObjectState.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/LockState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/LockState.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/LockState.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/LockState.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualArrayNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualArrayNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualArrayNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualArrayNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualBoxingNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualBoxingNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualBoxingNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualBoxingNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualInstanceNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualInstanceNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualInstanceNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualInstanceNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualObjectNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualObjectNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualObjectNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/VirtualObjectNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options.processor/src/META-INF/services/javax.annotation.processing.Processor b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options.processor/src/META-INF/services/javax.annotation.processing.Processor similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options.processor/src/META-INF/services/javax.annotation.processing.Processor rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options.processor/src/META-INF/services/javax.annotation.processing.Processor diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options.processor/src/org/graalvm/compiler/options/processor/OptionProcessor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options.processor/src/org/graalvm/compiler/options/processor/OptionProcessor.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options.processor/src/org/graalvm/compiler/options/processor/OptionProcessor.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options.processor/src/org/graalvm/compiler/options/processor/OptionProcessor.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options.test/src/org/graalvm/compiler/options/test/NestedBooleanOptionValueTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options.test/src/org/graalvm/compiler/options/test/NestedBooleanOptionValueTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options.test/src/org/graalvm/compiler/options/test/NestedBooleanOptionValueTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options.test/src/org/graalvm/compiler/options/test/NestedBooleanOptionValueTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options.test/src/org/graalvm/compiler/options/test/TestOptionValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options.test/src/org/graalvm/compiler/options/test/TestOptionValue.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options.test/src/org/graalvm/compiler/options/test/TestOptionValue.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options.test/src/org/graalvm/compiler/options/test/TestOptionValue.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/DerivedOptionValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/DerivedOptionValue.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/DerivedOptionValue.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/DerivedOptionValue.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/EnumOptionValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/EnumOptionValue.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/EnumOptionValue.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/EnumOptionValue.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/NestedBooleanOptionValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/NestedBooleanOptionValue.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/NestedBooleanOptionValue.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/NestedBooleanOptionValue.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/Option.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/Option.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/Option.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/Option.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionDescriptor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionDescriptor.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionDescriptor.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionDescriptor.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionDescriptors.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionDescriptors.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionDescriptors.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionDescriptors.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionType.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionType.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionType.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionType.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionValue.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionValue.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionValue.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionsParser.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionsParser.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionsParser.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionsParser.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/StableOptionValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/StableOptionValue.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/StableOptionValue.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/StableOptionValue.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/UniquePathUtilities.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/UniquePathUtilities.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/UniquePathUtilities.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/UniquePathUtilities.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common.test/src/org/graalvm/compiler/phases/common/test/StampFactoryTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common.test/src/org/graalvm/compiler/phases/common/test/StampFactoryTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common.test/src/org/graalvm/compiler/phases/common/test/StampFactoryTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common.test/src/org/graalvm/compiler/phases/common/test/StampFactoryTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/AbstractInliningPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/AbstractInliningPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/AbstractInliningPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/AbstractInliningPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/AddressLoweringPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/AddressLoweringPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/AddressLoweringPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/AddressLoweringPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/CanonicalizerPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/CanonicalizerPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/CanonicalizerPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/CanonicalizerPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ConvertDeoptimizeToGuardPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ConvertDeoptimizeToGuardPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ConvertDeoptimizeToGuardPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ConvertDeoptimizeToGuardPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DeadCodeEliminationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DeadCodeEliminationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DeadCodeEliminationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DeadCodeEliminationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DeoptimizationGroupingPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DeoptimizationGroupingPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DeoptimizationGroupingPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DeoptimizationGroupingPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DominatorConditionalEliminationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DominatorConditionalEliminationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DominatorConditionalEliminationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/DominatorConditionalEliminationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ExpandLogicPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ExpandLogicPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ExpandLogicPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ExpandLogicPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/FloatingReadPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/FloatingReadPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/FloatingReadPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/FloatingReadPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/FrameStateAssignmentPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/FrameStateAssignmentPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/FrameStateAssignmentPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/FrameStateAssignmentPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/GuardLoweringPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/GuardLoweringPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/GuardLoweringPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/GuardLoweringPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/IncrementalCanonicalizerPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/IncrementalCanonicalizerPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/IncrementalCanonicalizerPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/IncrementalCanonicalizerPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/IterativeConditionalEliminationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/IterativeConditionalEliminationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/IterativeConditionalEliminationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/IterativeConditionalEliminationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LazyValue.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LazyValue.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LazyValue.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LazyValue.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LockEliminationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LockEliminationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LockEliminationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LockEliminationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LoopSafepointInsertionPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LoopSafepointInsertionPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LoopSafepointInsertionPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LoopSafepointInsertionPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LoweringPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LoweringPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LoweringPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LoweringPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/NonNullParametersPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/NonNullParametersPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/NonNullParametersPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/NonNullParametersPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/OptimizeGuardAnchorsPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/OptimizeGuardAnchorsPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/OptimizeGuardAnchorsPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/OptimizeGuardAnchorsPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ProfileCompiledMethodsPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ProfileCompiledMethodsPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ProfileCompiledMethodsPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ProfileCompiledMethodsPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/PushThroughPiPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/PushThroughPiPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/PushThroughPiPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/PushThroughPiPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/RemoveValueProxyPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/RemoveValueProxyPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/RemoveValueProxyPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/RemoveValueProxyPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/UseTrappingNullChecksPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/UseTrappingNullChecksPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/UseTrappingNullChecksPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/UseTrappingNullChecksPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ValueAnchorCleanupPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ValueAnchorCleanupPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ValueAnchorCleanupPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ValueAnchorCleanupPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/VerifyHeapAtReturnPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/VerifyHeapAtReturnPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/VerifyHeapAtReturnPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/VerifyHeapAtReturnPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/InliningPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/InliningPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/InliningPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/InliningPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/InliningUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/InliningUtil.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/InliningUtil.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/InliningUtil.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/AbstractInlineInfo.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/AbstractInlineInfo.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/AbstractInlineInfo.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/AbstractInlineInfo.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/AssumptionInlineInfo.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/AssumptionInlineInfo.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/AssumptionInlineInfo.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/AssumptionInlineInfo.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/ExactInlineInfo.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/ExactInlineInfo.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/ExactInlineInfo.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/ExactInlineInfo.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/InlineInfo.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/InlineInfo.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/InlineInfo.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/InlineInfo.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/MultiTypeGuardInlineInfo.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/MultiTypeGuardInlineInfo.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/MultiTypeGuardInlineInfo.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/MultiTypeGuardInlineInfo.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/TypeGuardInlineInfo.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/TypeGuardInlineInfo.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/TypeGuardInlineInfo.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/TypeGuardInlineInfo.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/elem/Inlineable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/elem/Inlineable.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/elem/Inlineable.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/elem/Inlineable.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/elem/InlineableGraph.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/elem/InlineableGraph.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/elem/InlineableGraph.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/elem/InlineableGraph.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/AbstractInliningPolicy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/AbstractInliningPolicy.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/AbstractInliningPolicy.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/AbstractInliningPolicy.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/GreedyInliningPolicy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/GreedyInliningPolicy.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/GreedyInliningPolicy.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/GreedyInliningPolicy.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InlineEverythingPolicy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InlineEverythingPolicy.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InlineEverythingPolicy.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InlineEverythingPolicy.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InlineMethodSubstitutionsPolicy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InlineMethodSubstitutionsPolicy.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InlineMethodSubstitutionsPolicy.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InlineMethodSubstitutionsPolicy.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InliningPolicy.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InliningPolicy.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InliningPolicy.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/policy/InliningPolicy.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/CallsiteHolder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/CallsiteHolder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/CallsiteHolder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/CallsiteHolder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/CallsiteHolderExplorable.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/CallsiteHolderExplorable.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/CallsiteHolderExplorable.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/CallsiteHolderExplorable.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/ComputeInliningRelevance.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/ComputeInliningRelevance.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/ComputeInliningRelevance.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/ComputeInliningRelevance.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/InliningData.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/InliningData.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/InliningData.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/InliningData.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/InliningIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/InliningIterator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/InliningIterator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/InliningIterator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/MethodInvocation.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/MethodInvocation.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/MethodInvocation.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/walker/MethodInvocation.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/ExtractInstrumentationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/ExtractInstrumentationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/ExtractInstrumentationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/ExtractInstrumentationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/HighTierReconcileInstrumentationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/HighTierReconcileInstrumentationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/HighTierReconcileInstrumentationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/HighTierReconcileInstrumentationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/InlineInstrumentationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/InlineInstrumentationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/InlineInstrumentationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/InlineInstrumentationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/MidTierReconcileInstrumentationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/MidTierReconcileInstrumentationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/MidTierReconcileInstrumentationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/instrumentation/MidTierReconcileInstrumentationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/util/HashSetNodeEventListener.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/util/HashSetNodeEventListener.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/util/HashSetNodeEventListener.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/util/HashSetNodeEventListener.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/BasePhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/BasePhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/BasePhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/BasePhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/LazyName.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/LazyName.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/LazyName.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/LazyName.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/OptimisticOptimizations.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/OptimisticOptimizations.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/OptimisticOptimizations.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/OptimisticOptimizations.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/Phase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/Phase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/Phase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/Phase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/PhaseSuite.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/PhaseSuite.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/PhaseSuite.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/PhaseSuite.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/VerifyPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/VerifyPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/VerifyPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/VerifyPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/contract/NodeCostUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/contract/NodeCostUtil.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/contract/NodeCostUtil.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/contract/NodeCostUtil.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/contract/PhaseSizeContract.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/contract/PhaseSizeContract.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/contract/PhaseSizeContract.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/contract/PhaseSizeContract.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/FixedNodeProbabilityCache.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/FixedNodeProbabilityCache.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/FixedNodeProbabilityCache.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/FixedNodeProbabilityCache.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/InferStamps.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/InferStamps.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/InferStamps.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/InferStamps.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/MergeableState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/MergeableState.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/MergeableState.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/MergeableState.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/PostOrderNodeIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/PostOrderNodeIterator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/PostOrderNodeIterator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/PostOrderNodeIterator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ReentrantBlockIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ReentrantBlockIterator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ReentrantBlockIterator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ReentrantBlockIterator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ReentrantNodeIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ReentrantNodeIterator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ReentrantNodeIterator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ReentrantNodeIterator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ScheduledNodeIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ScheduledNodeIterator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ScheduledNodeIterator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ScheduledNodeIterator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ScopedPostOrderNodeIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ScopedPostOrderNodeIterator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ScopedPostOrderNodeIterator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/ScopedPostOrderNodeIterator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/SinglePassNodeIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/SinglePassNodeIterator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/SinglePassNodeIterator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/SinglePassNodeIterator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/StatelessPostOrderNodeIterator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/StatelessPostOrderNodeIterator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/StatelessPostOrderNodeIterator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/StatelessPostOrderNodeIterator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/package-info.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/package-info.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/package-info.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/package-info.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/package-info.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/package-info.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/package-info.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/package-info.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/BlockClosure.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/BlockClosure.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/BlockClosure.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/BlockClosure.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/MemoryScheduleVerification.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/MemoryScheduleVerification.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/MemoryScheduleVerification.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/MemoryScheduleVerification.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/SchedulePhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/SchedulePhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/SchedulePhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/SchedulePhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/CompilerConfiguration.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/CompilerConfiguration.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/CompilerConfiguration.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/CompilerConfiguration.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/HighTierContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/HighTierContext.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/HighTierContext.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/HighTierContext.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/LowTierContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/LowTierContext.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/LowTierContext.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/LowTierContext.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/MidTierContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/MidTierContext.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/MidTierContext.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/MidTierContext.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/PhaseContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/PhaseContext.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/PhaseContext.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/PhaseContext.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/Suites.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/Suites.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/Suites.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/Suites.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/SuitesCreator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/SuitesCreator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/SuitesCreator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/SuitesCreator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/SuitesProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/SuitesProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/SuitesProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/SuitesProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/TargetProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/TargetProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/TargetProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/TargetProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/BlockWorkList.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/BlockWorkList.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/BlockWorkList.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/BlockWorkList.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/GraphOrder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/GraphOrder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/GraphOrder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/GraphOrder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/MethodDebugValueName.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/MethodDebugValueName.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/MethodDebugValueName.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/MethodDebugValueName.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/Providers.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/Providers.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/Providers.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/util/Providers.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyBailoutUsage.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyBailoutUsage.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyBailoutUsage.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyBailoutUsage.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyCallerSensitiveMethods.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyCallerSensitiveMethods.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyCallerSensitiveMethods.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyCallerSensitiveMethods.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyDebugUsage.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyDebugUsage.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyDebugUsage.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyDebugUsage.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyUpdateUsages.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyUpdateUsages.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyUpdateUsages.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyUpdateUsages.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyUsageWithEquals.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyUsageWithEquals.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyUsageWithEquals.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyUsageWithEquals.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyVirtualizableUsage.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyVirtualizableUsage.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyVirtualizableUsage.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/verify/VerifyVirtualizableUsage.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/BasicIdealGraphPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/BasicIdealGraphPrinter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/BasicIdealGraphPrinter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/BasicIdealGraphPrinter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/BinaryGraphPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/BinaryGraphPrinter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/BinaryGraphPrinter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/BinaryGraphPrinter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CFGPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CFGPrinter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CFGPrinter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CFGPrinter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CFGPrinterObserver.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CFGPrinterObserver.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CFGPrinterObserver.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CFGPrinterObserver.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CanonicalStringGraphPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CanonicalStringGraphPrinter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CanonicalStringGraphPrinter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CanonicalStringGraphPrinter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CompilationPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CompilationPrinter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CompilationPrinter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/CompilationPrinter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraalDebugConfigCustomizer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraalDebugConfigCustomizer.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraalDebugConfigCustomizer.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraalDebugConfigCustomizer.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinterDumpHandler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinterDumpHandler.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinterDumpHandler.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinterDumpHandler.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/IdealGraphPrinter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/IdealGraphPrinter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/IdealGraphPrinter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/IdealGraphPrinter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/NoDeadCodeVerifyHandler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/NoDeadCodeVerifyHandler.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/NoDeadCodeVerifyHandler.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/NoDeadCodeVerifyHandler.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64CountLeadingZerosNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64CountLeadingZerosNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64CountLeadingZerosNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64CountLeadingZerosNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64FloatArithmeticSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64FloatArithmeticSnippets.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64FloatArithmeticSnippets.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64FloatArithmeticSnippets.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64GraphBuilderPlugins.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64GraphBuilderPlugins.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64GraphBuilderPlugins.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64GraphBuilderPlugins.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64IntegerArithmeticSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64IntegerArithmeticSnippets.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64IntegerArithmeticSnippets.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64IntegerArithmeticSnippets.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64IntegerSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64IntegerSubstitutions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64IntegerSubstitutions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64IntegerSubstitutions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64LongSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64LongSubstitutions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64LongSubstitutions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64LongSubstitutions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64ConvertSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64ConvertSnippets.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64ConvertSnippets.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64ConvertSnippets.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64CountLeadingZerosNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64CountLeadingZerosNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64CountLeadingZerosNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64CountLeadingZerosNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64CountTrailingZerosNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64CountTrailingZerosNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64CountTrailingZerosNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64CountTrailingZerosNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64FloatConvertNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64FloatConvertNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64FloatConvertNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64FloatConvertNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64GraphBuilderPlugins.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64GraphBuilderPlugins.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64GraphBuilderPlugins.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64GraphBuilderPlugins.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64MathSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64MathSubstitutions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64MathSubstitutions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64MathSubstitutions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64RoundNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64RoundNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64RoundNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64RoundNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.sparc/src/org/graalvm/compiler/replacements/sparc/SPARCGraphBuilderPlugins.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.sparc/src/org/graalvm/compiler/replacements/sparc/SPARCGraphBuilderPlugins.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.sparc/src/org/graalvm/compiler/replacements/sparc/SPARCGraphBuilderPlugins.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.sparc/src/org/graalvm/compiler/replacements/sparc/SPARCGraphBuilderPlugins.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ArrayStoreBytecodeExceptionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ArrayStoreBytecodeExceptionTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ArrayStoreBytecodeExceptionTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ArrayStoreBytecodeExceptionTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ArraysSubstitutionsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ArraysSubstitutionsTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ArraysSubstitutionsTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ArraysSubstitutionsTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/BitOpNodesTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/BitOpNodesTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/BitOpNodesTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/BitOpNodesTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/BytecodeExceptionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/BytecodeExceptionTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/BytecodeExceptionTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/BytecodeExceptionTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ClassCastBytecodeExceptionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ClassCastBytecodeExceptionTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ClassCastBytecodeExceptionTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ClassCastBytecodeExceptionTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/CompiledExceptionHandlerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/CompiledExceptionHandlerTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/CompiledExceptionHandlerTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/CompiledExceptionHandlerTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/CompiledNullPointerExceptionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/CompiledNullPointerExceptionTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/CompiledNullPointerExceptionTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/CompiledNullPointerExceptionTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DeoptimizeOnExceptionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DeoptimizeOnExceptionTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DeoptimizeOnExceptionTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DeoptimizeOnExceptionTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DerivedOopTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DerivedOopTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DerivedOopTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DerivedOopTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DynamicNewArrayTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DynamicNewArrayTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DynamicNewArrayTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DynamicNewArrayTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/EdgesTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/EdgesTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/EdgesTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/EdgesTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/FoldTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/FoldTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/FoldTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/FoldTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IndexOobBytecodeExceptionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IndexOobBytecodeExceptionTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IndexOobBytecodeExceptionTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IndexOobBytecodeExceptionTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InstanceOfDynamicTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InstanceOfDynamicTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InstanceOfDynamicTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InstanceOfDynamicTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InstanceOfTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InstanceOfTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InstanceOfTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InstanceOfTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerMulExactFoldTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerMulExactFoldTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerMulExactFoldTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerMulExactFoldTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerSubOverflowsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerSubOverflowsTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerSubOverflowsTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerSubOverflowsTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InvokeTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InvokeTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InvokeTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/InvokeTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MethodSubstitutionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MethodSubstitutionTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MethodSubstitutionTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MethodSubstitutionTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MonitorTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MonitorTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MonitorTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MonitorTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewArrayTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewArrayTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewArrayTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewArrayTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewInstanceTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewInstanceTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewInstanceTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewInstanceTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewMultiArrayTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewMultiArrayTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewMultiArrayTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NewMultiArrayTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NullBytecodeExceptionTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NullBytecodeExceptionTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NullBytecodeExceptionTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/NullBytecodeExceptionTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ObjectAccessTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ObjectAccessTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ObjectAccessTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ObjectAccessTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PEGraphDecoderTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PEGraphDecoderTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PEGraphDecoderTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PEGraphDecoderTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PointerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PointerTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PointerTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PointerTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PointerTrackingTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PointerTrackingTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PointerTrackingTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PointerTrackingTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ReplacementsParseTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ReplacementsParseTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ReplacementsParseTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ReplacementsParseTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StandardMethodSubstitutionsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StandardMethodSubstitutionsTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StandardMethodSubstitutionsTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StandardMethodSubstitutionsTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringEqualsConstantTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringEqualsConstantTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringEqualsConstantTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringEqualsConstantTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringHashConstantTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringHashConstantTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringHashConstantTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringHashConstantTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringSubstitutionsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringSubstitutionsTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringSubstitutionsTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StringSubstitutionsTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/SubstitutionsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/SubstitutionsTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/SubstitutionsTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/SubstitutionsTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/TypeCheckTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/TypeCheckTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/TypeCheckTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/TypeCheckTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsafeSubstitutionsTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsafeSubstitutionsTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsafeSubstitutionsTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsafeSubstitutionsTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsignedIntegerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsignedIntegerTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsignedIntegerTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsignedIntegerTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsignedMathTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsignedMathTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsignedMathTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnsignedMathTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnwindExceptionToCallerTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnwindExceptionToCallerTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnwindExceptionToCallerTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/UnwindExceptionToCallerTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/WordTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/WordTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/WordTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/WordTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/classfile/ClassfileBytecodeProviderTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/classfile/ClassfileBytecodeProviderTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/classfile/ClassfileBytecodeProviderTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/classfile/ClassfileBytecodeProviderTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/classfile/RedefineIntrinsicTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/classfile/RedefineIntrinsicTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/classfile/RedefineIntrinsicTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/classfile/RedefineIntrinsicTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/META-INF/services/javax.annotation.processing.Processor b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/META-INF/services/javax.annotation.processing.Processor similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/META-INF/services/javax.annotation.processing.Processor rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/META-INF/services/javax.annotation.processing.Processor diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/APHotSpotSignature.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/APHotSpotSignature.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/APHotSpotSignature.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/APHotSpotSignature.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/AbstractVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/AbstractVerifier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/AbstractVerifier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/AbstractVerifier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/ClassSubstitutionVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/ClassSubstitutionVerifier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/ClassSubstitutionVerifier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/ClassSubstitutionVerifier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/FoldVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/FoldVerifier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/FoldVerifier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/FoldVerifier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedFoldPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedFoldPlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedFoldPlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedFoldPlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedNodeIntrinsicPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedNodeIntrinsicPlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedNodeIntrinsicPlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedNodeIntrinsicPlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedPlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedPlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/GeneratedPlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/InjectedDependencies.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/InjectedDependencies.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/InjectedDependencies.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/InjectedDependencies.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/MethodSubstitutionVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/MethodSubstitutionVerifier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/MethodSubstitutionVerifier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/MethodSubstitutionVerifier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/NodeIntrinsicVerifier.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/NodeIntrinsicVerifier.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/NodeIntrinsicVerifier.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/NodeIntrinsicVerifier.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/PluginGenerator.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/PluginGenerator.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/PluginGenerator.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/PluginGenerator.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/VerifierAnnotationProcessor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/VerifierAnnotationProcessor.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/VerifierAnnotationProcessor.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.verifier/src/org/graalvm/compiler/replacements/verifier/VerifierAnnotationProcessor.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ArraySubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ArraySubstitutions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ArraySubstitutions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ArraySubstitutions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ArraysSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ArraysSubstitutions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ArraysSubstitutions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ArraysSubstitutions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/BoxingSnippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/BoxingSnippets.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/BoxingSnippets.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/BoxingSnippets.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/CachingPEGraphDecoder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/CachingPEGraphDecoder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/CachingPEGraphDecoder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/CachingPEGraphDecoder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ConstantBindingParameterPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ConstantBindingParameterPlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ConstantBindingParameterPlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ConstantBindingParameterPlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/DefaultJavaLoweringProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/DefaultJavaLoweringProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/DefaultJavaLoweringProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/DefaultJavaLoweringProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/GraphKit.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/GraphKit.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/GraphKit.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/GraphKit.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InlineDuringParsingPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InlineDuringParsingPlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InlineDuringParsingPlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InlineDuringParsingPlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InlineGraalDirectivesPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InlineGraalDirectivesPlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InlineGraalDirectivesPlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InlineGraalDirectivesPlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InstanceOfSnippetsTemplates.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InstanceOfSnippetsTemplates.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InstanceOfSnippetsTemplates.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/InstanceOfSnippetsTemplates.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/IntegerSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/IntegerSubstitutions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/IntegerSubstitutions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/IntegerSubstitutions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/IntrinsicGraphBuilder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/IntrinsicGraphBuilder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/IntrinsicGraphBuilder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/IntrinsicGraphBuilder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/JavacBug.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/JavacBug.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/JavacBug.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/JavacBug.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/Log.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/Log.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/Log.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/Log.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/LongSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/LongSubstitutions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/LongSubstitutions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/LongSubstitutions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/MethodHandlePlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/MethodHandlePlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/MethodHandlePlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/MethodHandlePlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/NodeIntrinsificationProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/NodeIntrinsificationProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/NodeIntrinsificationProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/NodeIntrinsificationProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/PEGraphDecoder.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/PEGraphDecoder.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/PEGraphDecoder.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/PEGraphDecoder.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ReplacementsImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ReplacementsImpl.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ReplacementsImpl.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ReplacementsImpl.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ReplacementsUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ReplacementsUtil.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ReplacementsUtil.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ReplacementsUtil.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetCounter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetCounter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetCounter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetCounter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetCounterNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetCounterNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetCounterNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetCounterNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetTemplate.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetTemplate.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetTemplate.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetTemplate.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/Snippets.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/Snippets.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/Snippets.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/Snippets.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StringSubstitutions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StringSubstitutions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StringSubstitutions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StringSubstitutions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/WordOperationPlugin.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/WordOperationPlugin.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/WordOperationPlugin.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/WordOperationPlugin.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileBytecode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileBytecode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileBytecode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileBytecode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileBytecodeProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileBytecodeProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileBytecodeProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileBytecodeProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileConstant.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileConstant.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileConstant.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileConstant.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileConstantPool.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileConstantPool.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileConstantPool.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/ClassfileConstantPool.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ArrayEqualsNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ArrayEqualsNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ArrayEqualsNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ArrayEqualsNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/AssertionNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/AssertionNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/AssertionNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/AssertionNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BasicArrayCopyNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BasicArrayCopyNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BasicArrayCopyNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BasicArrayCopyNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BasicObjectCloneNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BasicObjectCloneNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BasicObjectCloneNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BasicObjectCloneNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BinaryMathIntrinsicNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BinaryMathIntrinsicNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BinaryMathIntrinsicNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BinaryMathIntrinsicNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitCountNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitCountNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitCountNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitCountNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitScanForwardNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitScanForwardNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitScanForwardNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitScanForwardNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitScanReverseNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitScanReverseNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitScanReverseNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BitScanReverseNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/CStringConstant.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/CStringConstant.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/CStringConstant.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/CStringConstant.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/DirectObjectStoreNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/DirectObjectStoreNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/DirectObjectStoreNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/DirectObjectStoreNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/DirectStoreNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/DirectStoreNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/DirectStoreNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/DirectStoreNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ExplodeLoopNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ExplodeLoopNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ExplodeLoopNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ExplodeLoopNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/LoadSnippetVarargParameterNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/LoadSnippetVarargParameterNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/LoadSnippetVarargParameterNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/LoadSnippetVarargParameterNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MacroNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MacroNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MacroNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MacroNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MacroStateSplitNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MacroStateSplitNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MacroStateSplitNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MacroStateSplitNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MethodHandleNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MethodHandleNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MethodHandleNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MethodHandleNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/PureFunctionMacroNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/PureFunctionMacroNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/PureFunctionMacroNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/PureFunctionMacroNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ReadRegisterNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ReadRegisterNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ReadRegisterNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ReadRegisterNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ResolvedMethodHandleCallTargetNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ResolvedMethodHandleCallTargetNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ResolvedMethodHandleCallTargetNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ResolvedMethodHandleCallTargetNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ReverseBytesNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ReverseBytesNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ReverseBytesNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/ReverseBytesNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/UnaryMathIntrinsicNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/UnaryMathIntrinsicNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/UnaryMathIntrinsicNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/UnaryMathIntrinsicNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/VirtualizableInvokeMacroNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/VirtualizableInvokeMacroNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/VirtualizableInvokeMacroNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/VirtualizableInvokeMacroNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/WriteRegisterNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/WriteRegisterNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/WriteRegisterNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/WriteRegisterNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerAddExactNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerAddExactNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerAddExactNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerAddExactNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerAddExactSplitNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerAddExactSplitNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerAddExactSplitNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerAddExactSplitNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerExactArithmeticNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerExactArithmeticNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerExactArithmeticNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerExactArithmeticNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerExactArithmeticSplitNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerExactArithmeticSplitNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerExactArithmeticSplitNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerExactArithmeticSplitNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulExactNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulExactNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulExactNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulExactNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulExactSplitNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulExactSplitNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulExactSplitNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulExactSplitNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulHighNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulHighNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulHighNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulHighNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerSubExactNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerSubExactNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerSubExactNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerSubExactNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerSubExactSplitNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerSubExactSplitNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerSubExactSplitNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerSubExactSplitNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/UnsignedMulHighNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/UnsignedMulHighNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/UnsignedMulHighNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/UnsignedMulHighNode.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.runtime/src/org/graalvm/compiler/runtime/RuntimeProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.runtime/src/org/graalvm/compiler/runtime/RuntimeProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.runtime/src/org/graalvm/compiler/runtime/RuntimeProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.runtime/src/org/graalvm/compiler/runtime/RuntimeProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/Salver.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/Salver.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/Salver.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/Salver.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/SalverDebugConfigCustomizer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/SalverDebugConfigCustomizer.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/SalverDebugConfigCustomizer.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/SalverDebugConfigCustomizer.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/SalverOptions.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/SalverOptions.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/SalverOptions.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/SalverOptions.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/data/DataDict.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/data/DataDict.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/data/DataDict.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/data/DataDict.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/data/DataList.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/data/DataList.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/data/DataList.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/data/DataList.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractGraalDumper.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractGraalDumper.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractGraalDumper.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractGraalDumper.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractMethodScopeDumper.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractMethodScopeDumper.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractMethodScopeDumper.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractMethodScopeDumper.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractSerializerDumper.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractSerializerDumper.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractSerializerDumper.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/AbstractSerializerDumper.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/Dumper.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/Dumper.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/Dumper.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/Dumper.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/GraphDumper.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/GraphDumper.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/GraphDumper.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/dumper/GraphDumper.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/AbstractDumpHandler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/AbstractDumpHandler.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/AbstractDumpHandler.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/AbstractDumpHandler.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/AbstractGraalDumpHandler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/AbstractGraalDumpHandler.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/AbstractGraalDumpHandler.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/AbstractGraalDumpHandler.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/DumpHandler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/DumpHandler.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/DumpHandler.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/DumpHandler.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/GraphDumpHandler.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/GraphDumpHandler.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/GraphDumpHandler.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/handler/GraphDumpHandler.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/package-info.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/package-info.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/package-info.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/package-info.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/AbstractSerializer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/AbstractSerializer.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/AbstractSerializer.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/AbstractSerializer.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/JSONSerializer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/JSONSerializer.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/JSONSerializer.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/JSONSerializer.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/Serializer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/Serializer.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/Serializer.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/serialize/Serializer.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/util/ECIDUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/util/ECIDUtil.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/util/ECIDUtil.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/util/ECIDUtil.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/util/MethodContext.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/util/MethodContext.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/util/MethodContext.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/util/MethodContext.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/writer/ChannelDumpWriter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/writer/ChannelDumpWriter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/writer/ChannelDumpWriter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/writer/ChannelDumpWriter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/writer/DumpWriter.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/writer/DumpWriter.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/writer/DumpWriter.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.salver/src/org/graalvm/compiler/salver/writer/DumpWriter.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider.processor/src/META-INF/services/javax.annotation.processing.Processor b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider.processor/src/META-INF/services/javax.annotation.processing.Processor similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider.processor/src/META-INF/services/javax.annotation.processing.Processor rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider.processor/src/META-INF/services/javax.annotation.processing.Processor diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider.processor/src/org/graalvm/compiler/serviceprovider/processor/ServiceProviderProcessor.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider.processor/src/org/graalvm/compiler/serviceprovider/processor/ServiceProviderProcessor.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider.processor/src/org/graalvm/compiler/serviceprovider/processor/ServiceProviderProcessor.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider.processor/src/org/graalvm/compiler/serviceprovider/processor/ServiceProviderProcessor.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/GraalServices.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/GraalServices.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/GraalServices.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/GraalServices.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/ServiceProvider.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/ServiceProvider.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/ServiceProvider.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.serviceprovider/src/org/graalvm/compiler/serviceprovider/ServiceProvider.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/ExportingClassLoader.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/ExportingClassLoader.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/ExportingClassLoader.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/ExportingClassLoader.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/GraalTest.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/GraalTest.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/GraalTest.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/GraalTest.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/JLRModule.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/JLRModule.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/JLRModule.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/JLRModule.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/SubprocessUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/SubprocessUtil.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/SubprocessUtil.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/SubprocessUtil.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual.bench/.checkstyle.exclude b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual.bench/.checkstyle.exclude similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual.bench/.checkstyle.exclude rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual.bench/.checkstyle.exclude diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual.bench/src/org/graalvm/compiler/virtual/bench/PartialEscapeBench.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual.bench/src/org/graalvm/compiler/virtual/bench/PartialEscapeBench.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual.bench/src/org/graalvm/compiler/virtual/bench/PartialEscapeBench.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual.bench/src/org/graalvm/compiler/virtual/bench/PartialEscapeBench.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/nodes/MaterializedObjectState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/nodes/MaterializedObjectState.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/nodes/MaterializedObjectState.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/nodes/MaterializedObjectState.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/nodes/VirtualObjectState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/nodes/VirtualObjectState.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/nodes/VirtualObjectState.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/nodes/VirtualObjectState.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EarlyReadEliminationPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EarlyReadEliminationPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EarlyReadEliminationPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EarlyReadEliminationPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectList.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectList.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectList.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectList.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsBlockState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsBlockState.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsBlockState.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsBlockState.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsClosure.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsClosure.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsClosure.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsClosure.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsPhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsPhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsPhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/EffectsPhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/GraphEffectList.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/GraphEffectList.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/GraphEffectList.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/GraphEffectList.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ObjectState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ObjectState.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ObjectState.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ObjectState.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PEReadEliminationBlockState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PEReadEliminationBlockState.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PEReadEliminationBlockState.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PEReadEliminationBlockState.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PEReadEliminationClosure.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PEReadEliminationClosure.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PEReadEliminationClosure.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PEReadEliminationClosure.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapeBlockState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapeBlockState.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapeBlockState.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapeBlockState.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapeClosure.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapeClosure.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapeClosure.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapeClosure.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapePhase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapePhase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapePhase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PartialEscapePhase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationBlockState.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationBlockState.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationBlockState.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationBlockState.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationClosure.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationClosure.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationClosure.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationClosure.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/VirtualUtil.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/VirtualUtil.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/VirtualUtil.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/VirtualUtil.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/VirtualizerToolImpl.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/VirtualizerToolImpl.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/VirtualizerToolImpl.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/VirtualizerToolImpl.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/AtomicUnsigned.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/AtomicUnsigned.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/AtomicUnsigned.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/AtomicUnsigned.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/AtomicWord.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/AtomicWord.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/AtomicWord.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/AtomicWord.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/BarrieredAccess.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/BarrieredAccess.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/BarrieredAccess.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/BarrieredAccess.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/ComparableWord.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/ComparableWord.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/ComparableWord.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/ComparableWord.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/ObjectAccess.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/ObjectAccess.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/ObjectAccess.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/ObjectAccess.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Pointer.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Pointer.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Pointer.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Pointer.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/PointerBase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/PointerBase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/PointerBase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/PointerBase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/PointerUtils.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/PointerUtils.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/PointerUtils.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/PointerUtils.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Signed.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Signed.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Signed.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Signed.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/UnsafeAccess.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/UnsafeAccess.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/UnsafeAccess.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/UnsafeAccess.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Unsigned.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Unsigned.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Unsigned.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Unsigned.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/UnsignedUtils.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/UnsignedUtils.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/UnsignedUtils.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/UnsignedUtils.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Word.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Word.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Word.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/Word.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/WordBase.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/WordBase.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/WordBase.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/WordBase.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/WordTypes.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/WordTypes.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/WordTypes.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/WordTypes.java diff --git a/hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/nodes/WordCastNode.java b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/nodes/WordCastNode.java similarity index 100% rename from hotspot/src/jdk.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/nodes/WordCastNode.java rename to hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.word/src/org/graalvm/compiler/word/nodes/WordCastNode.java diff --git a/hotspot/src/share/vm/aot/aotLoader.cpp b/hotspot/src/share/vm/aot/aotLoader.cpp index 0dbf9ff72e4..bd2cc8f58f0 100644 --- a/hotspot/src/share/vm/aot/aotLoader.cpp +++ b/hotspot/src/share/vm/aot/aotLoader.cpp @@ -113,8 +113,8 @@ static const char* modules[] = { "java.logging", "jdk.compiler", "jdk.scripting.nashorn", - "jdk.vm.ci", - "jdk.vm.compiler" + "jdk.internal.vm.ci", + "jdk.internal.vm.compiler" }; void AOTLoader::initialize() { diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp index cdb6169e484..2bd540222a7 100644 --- a/hotspot/src/share/vm/runtime/arguments.cpp +++ b/hotspot/src/share/vm/runtime/arguments.cpp @@ -3705,7 +3705,7 @@ jint Arguments::finalize_vm_init_args() { #if INCLUDE_JVMCI if (EnableJVMCI && - !create_numbered_property("jdk.module.addmods", "jdk.vm.ci", addmods_count++)) { + !create_numbered_property("jdk.module.addmods", "jdk.internal.vm.ci", addmods_count++)) { return JNI_ENOMEM; } #endif diff --git a/hotspot/test/compiler/jvmci/JVM_GetJVMCIRuntimeTest.java b/hotspot/test/compiler/jvmci/JVM_GetJVMCIRuntimeTest.java index 481334f4ca4..67fe462368e 100644 --- a/hotspot/test/compiler/jvmci/JVM_GetJVMCIRuntimeTest.java +++ b/hotspot/test/compiler/jvmci/JVM_GetJVMCIRuntimeTest.java @@ -27,7 +27,7 @@ * @requires vm.jvmci * @library /test/lib / * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.runtime * @run main/othervm -XX:+UnlockExperimentalVMOptions * -Dcompiler.jvmci.JVM_GetJVMCIRuntimeTest.positive=true * -XX:+EnableJVMCI diff --git a/hotspot/test/compiler/jvmci/SecurityRestrictionsTest.java b/hotspot/test/compiler/jvmci/SecurityRestrictionsTest.java index b86cfbf6dd9..a52e19b3817 100644 --- a/hotspot/test/compiler/jvmci/SecurityRestrictionsTest.java +++ b/hotspot/test/compiler/jvmci/SecurityRestrictionsTest.java @@ -28,8 +28,8 @@ * @library /test/lib / * @library common/patches * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions * -XX:+EnableJVMCI * compiler.jvmci.SecurityRestrictionsTest diff --git a/hotspot/test/compiler/jvmci/common/patches/jdk.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java b/hotspot/test/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java similarity index 100% rename from hotspot/test/compiler/jvmci/common/patches/jdk.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java rename to hotspot/test/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/CompilerToVMHelper.java diff --git a/hotspot/test/compiler/jvmci/common/patches/jdk.vm.ci/jdk/vm/ci/hotspot/MetaAccessWrapper.java b/hotspot/test/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/MetaAccessWrapper.java similarity index 100% rename from hotspot/test/compiler/jvmci/common/patches/jdk.vm.ci/jdk/vm/ci/hotspot/MetaAccessWrapper.java rename to hotspot/test/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/MetaAccessWrapper.java diff --git a/hotspot/test/compiler/jvmci/common/patches/jdk.vm.ci/jdk/vm/ci/hotspot/PublicMetaspaceWrapperObject.java b/hotspot/test/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/PublicMetaspaceWrapperObject.java similarity index 100% rename from hotspot/test/compiler/jvmci/common/patches/jdk.vm.ci/jdk/vm/ci/hotspot/PublicMetaspaceWrapperObject.java rename to hotspot/test/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/PublicMetaspaceWrapperObject.java diff --git a/hotspot/test/compiler/jvmci/compilerToVM/AllocateCompileIdTest.java b/hotspot/test/compiler/jvmci/compilerToVM/AllocateCompileIdTest.java index adfece82f94..7aaf6bd4cb9 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/AllocateCompileIdTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/AllocateCompileIdTest.java @@ -30,10 +30,10 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. diff --git a/hotspot/test/compiler/jvmci/compilerToVM/AsResolvedJavaMethodTest.java b/hotspot/test/compiler/jvmci/compilerToVM/AsResolvedJavaMethodTest.java index 09e8f0e2b5b..19fc495c4ec 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/AsResolvedJavaMethodTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/AsResolvedJavaMethodTest.java @@ -30,10 +30,10 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.meta - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.meta + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * compiler.jvmci.compilerToVM.AsResolvedJavaMethodTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/CollectCountersTest.java b/hotspot/test/compiler/jvmci/compilerToVM/CollectCountersTest.java index 507c56987d7..f729894dd55 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/CollectCountersTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/CollectCountersTest.java @@ -28,8 +28,8 @@ * @library / /test/lib/ * @library ../common/patches * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run main/othervm -XX:+UnlockExperimentalVMOptions * -XX:+EnableJVMCI * -XX:JVMCICounterSize=0 diff --git a/hotspot/test/compiler/jvmci/compilerToVM/DebugOutputTest.java b/hotspot/test/compiler/jvmci/compilerToVM/DebugOutputTest.java index 806c2e7e349..a66a448b5b1 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/DebugOutputTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/DebugOutputTest.java @@ -28,8 +28,8 @@ * @library / /test/lib * @library ../common/patches * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm compiler.jvmci.compilerToVM.DebugOutputTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/DisassembleCodeBlobTest.java b/hotspot/test/compiler/jvmci/compilerToVM/DisassembleCodeBlobTest.java index 9101d2a66e5..09f9b94d426 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/DisassembleCodeBlobTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/DisassembleCodeBlobTest.java @@ -30,10 +30,10 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @build sun.hotspot.WhiteBox * compiler.jvmci.compilerToVM.DisassembleCodeBlobTest * @run driver ClassFileInstaller sun.hotspot.WhiteBox diff --git a/hotspot/test/compiler/jvmci/compilerToVM/DoNotInlineOrCompileTest.java b/hotspot/test/compiler/jvmci/compilerToVM/DoNotInlineOrCompileTest.java index 57e2e1fea1c..f77ea7e3109 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/DoNotInlineOrCompileTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/DoNotInlineOrCompileTest.java @@ -30,10 +30,10 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ExecuteInstalledCodeTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ExecuteInstalledCodeTest.java index 5d7c4d376ba..02e4b68c938 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ExecuteInstalledCodeTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ExecuteInstalledCodeTest.java @@ -21,6 +21,26 @@ * questions. */ +/* + * @test + * @bug 8136421 + * @requires vm.jvmci + * @library /test/lib / + * @library ../common/patches + * @modules java.base/jdk.internal.misc + * @modules java.base/jdk.internal.org.objectweb.asm + * java.base/jdk.internal.org.objectweb.asm.tree + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox + * sun.hotspot.WhiteBox$WhiteBoxPermission + * @run main/othervm -Xbootclasspath/a:. + * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI + * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI + * compiler.jvmci.compilerToVM.ExecuteInstalledCodeTest + */ + package compiler.jvmci.compilerToVM; import jdk.test.lib.Asserts; @@ -36,26 +56,6 @@ import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.List; -/* - * @test - * @bug 8136421 - * @requires vm.jvmci - * @library /test/lib / - * @library ../common/patches - * @modules java.base/jdk.internal.misc - * @modules java.base/jdk.internal.org.objectweb.asm - * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox - * @run driver ClassFileInstaller sun.hotspot.WhiteBox - * sun.hotspot.WhiteBox$WhiteBoxPermission - * @run main/othervm -Xbootclasspath/a:. - * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI - * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI - * compiler.jvmci.compilerToVM.ExecuteInstalledCodeTest - */ - public class ExecuteInstalledCodeTest { public static void main(String[] args) { diff --git a/hotspot/test/compiler/jvmci/compilerToVM/FindUniqueConcreteMethodTest.java b/hotspot/test/compiler/jvmci/compilerToVM/FindUniqueConcreteMethodTest.java index 4f39cf05c6c..e00f3ffe0bc 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/FindUniqueConcreteMethodTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/FindUniqueConcreteMethodTest.java @@ -30,11 +30,11 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * compiler.jvmci.compilerToVM.FindUniqueConcreteMethodTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetBytecodeTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetBytecodeTest.java index e959482d0f1..37f358fbc95 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetBytecodeTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetBytecodeTest.java @@ -30,9 +30,9 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * compiler.jvmci.compilerToVM.GetBytecodeTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetClassInitializerTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetClassInitializerTest.java index 5dcc9f4e7e7..57eb96b56d3 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetClassInitializerTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetClassInitializerTest.java @@ -28,8 +28,8 @@ * @library / /test/lib * @library ../common/patches * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * compiler.jvmci.compilerToVM.GetClassInitializerTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetConstantPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetConstantPoolTest.java index 2aa39371567..da4eae2e827 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetConstantPoolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetConstantPoolTest.java @@ -29,12 +29,12 @@ * @library ../common/patches * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm - java.base/jdk.internal.org.objectweb.asm.tree - jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.code + * java.base/jdk.internal.org.objectweb.asm.tree + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.code * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions * -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetExceptionTableTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetExceptionTableTest.java index af7c9bb8985..018c51b34eb 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetExceptionTableTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetExceptionTableTest.java @@ -30,9 +30,9 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * compiler.jvmci.compilerToVM.GetExceptionTableTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetFlagValueTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetFlagValueTest.java index e1c46a18dee..b074ca8140d 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetFlagValueTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetFlagValueTest.java @@ -27,11 +27,11 @@ * @requires vm.jvmci * @library / /test/lib * @library ../common/patches - * @modules jdk.vm.ci/jdk.vm.ci.hotspot:+open + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot:+open * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. * compiler.jvmci.compilerToVM.GetFlagValueTest diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetImplementorTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetImplementorTest.java index 3811c74abf6..1da08edb16a 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetImplementorTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetImplementorTest.java @@ -28,8 +28,8 @@ * @library / /test/lib/ * @library ../common/patches * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * compiler.jvmci.compilerToVM.GetImplementorTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetLineNumberTableTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetLineNumberTableTest.java index 33b20f2f4bb..c9812d73621 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetLineNumberTableTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetLineNumberTableTest.java @@ -31,9 +31,9 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * compiler.jvmci.compilerToVM.GetLineNumberTableTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetLocalVariableTableTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetLocalVariableTableTest.java index 8202d1260c1..8ab8f16c4f4 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetLocalVariableTableTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetLocalVariableTableTest.java @@ -30,13 +30,13 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code * @clean compiler.jvmci.compilerToVM.* * @compile -g DummyInterface.java * @compile -g DummyAbstractClass.java * @compile -g DummyClass.java - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * compiler.jvmci.compilerToVM.GetLocalVariableTableTest * @clean compiler.jvmci.compilerToVM.* diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetMaxCallTargetOffsetTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetMaxCallTargetOffsetTest.java index 0923e10c9b7..bf43ca431b6 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetMaxCallTargetOffsetTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetMaxCallTargetOffsetTest.java @@ -28,8 +28,8 @@ * @library / /test/lib/ * @library ../common/patches * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * compiler.jvmci.compilerToVM.GetMaxCallTargetOffsetTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetNextStackFrameTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetNextStackFrameTest.java index 0b079f3741f..c01bd02de4b 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetNextStackFrameTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetNextStackFrameTest.java @@ -30,10 +30,10 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.meta - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.meta + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * compiler.jvmci.compilerToVM.GetNextStackFrameTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodTest.java index b50dd8e1e2e..ef47d2d8d9b 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodTest.java @@ -28,10 +28,10 @@ * @library / /test/lib * @library ../common/patches * @modules java.base/jdk.internal.misc:+open - * @modules jdk.vm.ci/jdk.vm.ci.hotspot:+open + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot:+open * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper - * jdk.vm.ci/jdk.vm.ci.hotspot.PublicMetaspaceWrapperObject + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot.PublicMetaspaceWrapperObject * sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaTypeTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaTypeTest.java index 483f1416e93..bbf288ee2e3 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaTypeTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaTypeTest.java @@ -28,11 +28,11 @@ * @library / /test/lib * @library ../common/patches * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.meta + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.meta * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper - * jdk.vm.ci/jdk.vm.ci.hotspot.PublicMetaspaceWrapperObject + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot.PublicMetaspaceWrapperObject * sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetStackTraceElementTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetStackTraceElementTest.java index 0c3e4ba92cc..63e43426e8b 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetStackTraceElementTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetStackTraceElementTest.java @@ -30,9 +30,9 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * compiler.jvmci.compilerToVM.GetStackTraceElementTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetSymbolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetSymbolTest.java index 87c40534e7b..ddefd572316 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetSymbolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetSymbolTest.java @@ -30,10 +30,10 @@ * @modules java.base/jdk.internal.misc:+open * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * @modules jdk.vm.ci/jdk.vm.ci.hotspot:+open - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.meta - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot:+open + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.meta + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * compiler.jvmci.compilerToVM.GetSymbolTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetVtableIndexForInterfaceTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetVtableIndexForInterfaceTest.java index 8cfc1d89cf9..af8eabeafef 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/GetVtableIndexForInterfaceTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/GetVtableIndexForInterfaceTest.java @@ -30,9 +30,9 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * compiler.jvmci.compilerToVM.GetVtableIndexForInterfaceTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/HasCompiledCodeForOSRTest.java b/hotspot/test/compiler/jvmci/compilerToVM/HasCompiledCodeForOSRTest.java index 969a7f6d5ff..010c230f139 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/HasCompiledCodeForOSRTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/HasCompiledCodeForOSRTest.java @@ -30,10 +30,10 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. diff --git a/hotspot/test/compiler/jvmci/compilerToVM/HasFinalizableSubclassTest.java b/hotspot/test/compiler/jvmci/compilerToVM/HasFinalizableSubclassTest.java index 57ec63acd3e..c56176e0b14 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/HasFinalizableSubclassTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/HasFinalizableSubclassTest.java @@ -28,8 +28,8 @@ * @library / /test/lib * @library ../common/patches * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * compiler.jvmci.compilerToVM.HasFinalizableSubclassTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/HasNeverInlineDirectiveTest.java b/hotspot/test/compiler/jvmci/compilerToVM/HasNeverInlineDirectiveTest.java index 7efd8d2d994..1f2a1e26412 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/HasNeverInlineDirectiveTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/HasNeverInlineDirectiveTest.java @@ -30,10 +30,10 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. diff --git a/hotspot/test/compiler/jvmci/compilerToVM/InvalidateInstalledCodeTest.java b/hotspot/test/compiler/jvmci/compilerToVM/InvalidateInstalledCodeTest.java index 828dc7788d5..66566c2f60f 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/InvalidateInstalledCodeTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/InvalidateInstalledCodeTest.java @@ -30,11 +30,11 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.runtime * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @build compiler.jvmci.compilerToVM.InvalidateInstalledCodeTest * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox diff --git a/hotspot/test/compiler/jvmci/compilerToVM/IsCompilableTest.java b/hotspot/test/compiler/jvmci/compilerToVM/IsCompilableTest.java index 5d187489864..b11c080a8cf 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/IsCompilableTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/IsCompilableTest.java @@ -30,10 +30,10 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. diff --git a/hotspot/test/compiler/jvmci/compilerToVM/IsMatureTest.java b/hotspot/test/compiler/jvmci/compilerToVM/IsMatureTest.java index e1427d0becb..329990e2a7d 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/IsMatureTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/IsMatureTest.java @@ -28,9 +28,9 @@ * @library / /test/lib * ../common/patches * @modules java.base/jdk.internal.misc - * jdk.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.hotspot * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission diff --git a/hotspot/test/compiler/jvmci/compilerToVM/IsMatureVsReprofileTest.java b/hotspot/test/compiler/jvmci/compilerToVM/IsMatureVsReprofileTest.java index ba47d417cad..b9d36abdbc3 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/IsMatureVsReprofileTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/IsMatureVsReprofileTest.java @@ -30,9 +30,9 @@ * @modules java.base/jdk.internal.misc * java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission diff --git a/hotspot/test/compiler/jvmci/compilerToVM/JVM_RegisterJVMCINatives.java b/hotspot/test/compiler/jvmci/compilerToVM/JVM_RegisterJVMCINatives.java index 826868ae54d..0c0e60bfd39 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/JVM_RegisterJVMCINatives.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/JVM_RegisterJVMCINatives.java @@ -27,8 +27,8 @@ * @requires vm.jvmci * @library /test/lib / * @modules java.base/jdk.internal.misc:open - * @modules jdk.vm.ci/jdk.vm.ci.hotspot:open - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot:open + * jdk.internal.vm.ci/jdk.vm.ci.runtime * @run main/othervm -XX:+UnlockExperimentalVMOptions * -Dcompiler.jvmci.compilerToVM.JVM_RegisterJVMCINatives.positive=true * -XX:+EnableJVMCI diff --git a/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassInPoolTest.java index 690ef34b195..16afdf9a925 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassInPoolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassInPoolTest.java @@ -32,11 +32,11 @@ * java.base/jdk.internal.reflect * java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.meta * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. diff --git a/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassRefIndexInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassRefIndexInPoolTest.java index e53d695161d..3bc88b930b1 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassRefIndexInPoolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassRefIndexInPoolTest.java @@ -31,11 +31,11 @@ * java.base/jdk.internal.reflect * java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.meta * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions diff --git a/hotspot/test/compiler/jvmci/compilerToVM/LookupMethodInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/LookupMethodInPoolTest.java index f6d139c3b05..a0eafe8c78a 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/LookupMethodInPoolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupMethodInPoolTest.java @@ -31,11 +31,11 @@ * java.base/jdk.internal.reflect * java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions diff --git a/hotspot/test/compiler/jvmci/compilerToVM/LookupNameAndTypeRefIndexInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/LookupNameAndTypeRefIndexInPoolTest.java index ed376e04e41..01e4eb13afc 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/LookupNameAndTypeRefIndexInPoolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupNameAndTypeRefIndexInPoolTest.java @@ -31,11 +31,11 @@ * java.base/jdk.internal.reflect * java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.meta * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions diff --git a/hotspot/test/compiler/jvmci/compilerToVM/LookupNameInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/LookupNameInPoolTest.java index e01f023f716..459e577abb0 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/LookupNameInPoolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupNameInPoolTest.java @@ -31,11 +31,11 @@ * java.base/jdk.internal.reflect * java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.meta * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission diff --git a/hotspot/test/compiler/jvmci/compilerToVM/LookupSignatureInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/LookupSignatureInPoolTest.java index 3dc8a64bdd2..e8cf4347b5a 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/LookupSignatureInPoolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupSignatureInPoolTest.java @@ -31,11 +31,11 @@ * java.base/jdk.internal.reflect * java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.meta * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission diff --git a/hotspot/test/compiler/jvmci/compilerToVM/LookupTypeTest.java b/hotspot/test/compiler/jvmci/compilerToVM/LookupTypeTest.java index 225da6983e4..50a48e2527f 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/LookupTypeTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupTypeTest.java @@ -28,8 +28,8 @@ * @library / /test/lib * @library ../common/patches * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * compiler.jvmci.compilerToVM.LookupTypeTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java b/hotspot/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java index 5f9875d226d..ef0d3ccca8b 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java @@ -32,11 +32,11 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.meta * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xmixed -Xbatch -Xbootclasspath/a:. diff --git a/hotspot/test/compiler/jvmci/compilerToVM/MethodIsIgnoredBySecurityStackWalkTest.java b/hotspot/test/compiler/jvmci/compilerToVM/MethodIsIgnoredBySecurityStackWalkTest.java index 6f87bcfcd2d..ea5834f46db 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/MethodIsIgnoredBySecurityStackWalkTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/MethodIsIgnoredBySecurityStackWalkTest.java @@ -31,9 +31,9 @@ * @modules java.base/jdk.internal.reflect * java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * compiler.jvmci.compilerToVM.MethodIsIgnoredBySecurityStackWalkTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ReadConfigurationTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ReadConfigurationTest.java index 4b9a7d37ed4..01476b2cfa5 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ReadConfigurationTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ReadConfigurationTest.java @@ -28,8 +28,8 @@ * @library / /test/lib * @library ../common/patches * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @build compiler.jvmci.compilerToVM.ReadConfigurationTest * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * compiler.jvmci.compilerToVM.ReadConfigurationTest diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ReprofileTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ReprofileTest.java index 9953d4c596a..e563106bca6 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ReprofileTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ReprofileTest.java @@ -30,11 +30,11 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.meta * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ResolveConstantInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ResolveConstantInPoolTest.java index 63aef07deee..b54f7c585f5 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ResolveConstantInPoolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ResolveConstantInPoolTest.java @@ -30,11 +30,11 @@ * @modules java.base/jdk.internal.misc * java.base/jdk.internal.reflect * java.base/jdk.internal.org.objectweb.asm - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.meta * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java index 640387a18c1..59f84b03adc 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java @@ -31,11 +31,11 @@ * java.base/jdk.internal.reflect * java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ResolveMethodTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ResolveMethodTest.java index 248077d615e..b594c1a4b78 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ResolveMethodTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ResolveMethodTest.java @@ -30,9 +30,9 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * compiler.jvmci.compilerToVM.ResolveMethodTest */ diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ResolvePossiblyCachedConstantInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ResolvePossiblyCachedConstantInPoolTest.java index ca91e75011f..94f5fc393d2 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ResolvePossiblyCachedConstantInPoolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ResolvePossiblyCachedConstantInPoolTest.java @@ -31,11 +31,11 @@ * java.base/jdk.internal.reflect * java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.meta * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ResolveTypeInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ResolveTypeInPoolTest.java index 3f48fd2f7b0..fe2aeee2590 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ResolveTypeInPoolTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ResolveTypeInPoolTest.java @@ -31,11 +31,11 @@ * @modules java.base/jdk.internal.misc * java.base/jdk.internal.reflect * java.base/jdk.internal.org.objectweb.asm - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.meta * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ShouldDebugNonSafepointsTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ShouldDebugNonSafepointsTest.java index 18a571ba660..0cefb66e711 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ShouldDebugNonSafepointsTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ShouldDebugNonSafepointsTest.java @@ -28,8 +28,8 @@ * @library / /test/lib/ * @library ../common/patches * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * -XX:+UnlockDiagnosticVMOptions * -XX:+DebugNonSafepoints diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ShouldInlineMethodTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ShouldInlineMethodTest.java index 675a1364041..7b1ee718486 100644 --- a/hotspot/test/compiler/jvmci/compilerToVM/ShouldInlineMethodTest.java +++ b/hotspot/test/compiler/jvmci/compilerToVM/ShouldInlineMethodTest.java @@ -30,10 +30,10 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. diff --git a/hotspot/test/compiler/jvmci/errors/TestInvalidCompilationResult.java b/hotspot/test/compiler/jvmci/errors/TestInvalidCompilationResult.java index 7ef5f8e4800..53932082a96 100644 --- a/hotspot/test/compiler/jvmci/errors/TestInvalidCompilationResult.java +++ b/hotspot/test/compiler/jvmci/errors/TestInvalidCompilationResult.java @@ -24,12 +24,12 @@ /** * @test * @requires vm.jvmci - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.code.site - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.common + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.common * @compile CodeInstallerTest.java * @run junit/othervm -da:jdk.vm.ci... -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.jvmci.errors.TestInvalidCompilationResult */ diff --git a/hotspot/test/compiler/jvmci/errors/TestInvalidDebugInfo.java b/hotspot/test/compiler/jvmci/errors/TestInvalidDebugInfo.java index 8d3e92b1912..90af63bc297 100644 --- a/hotspot/test/compiler/jvmci/errors/TestInvalidDebugInfo.java +++ b/hotspot/test/compiler/jvmci/errors/TestInvalidDebugInfo.java @@ -24,12 +24,12 @@ /** * @test * @requires vm.jvmci - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.code.site - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.common + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.common * @compile CodeInstallerTest.java * @run junit/othervm -da:jdk.vm.ci... -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.jvmci.errors.TestInvalidDebugInfo */ diff --git a/hotspot/test/compiler/jvmci/errors/TestInvalidOopMap.java b/hotspot/test/compiler/jvmci/errors/TestInvalidOopMap.java index 2e3f5f65e97..f94b83e1161 100644 --- a/hotspot/test/compiler/jvmci/errors/TestInvalidOopMap.java +++ b/hotspot/test/compiler/jvmci/errors/TestInvalidOopMap.java @@ -24,12 +24,12 @@ /** * @test * @requires vm.jvmci - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.code.site - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.common + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.common * @compile CodeInstallerTest.java * @run junit/othervm -da:jdk.vm.ci... -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.jvmci.errors.TestInvalidOopMap */ diff --git a/hotspot/test/compiler/jvmci/events/JvmciNotifyBootstrapFinishedEventTest.java b/hotspot/test/compiler/jvmci/events/JvmciNotifyBootstrapFinishedEventTest.java index 84a4c90938b..f9e3392384a 100644 --- a/hotspot/test/compiler/jvmci/events/JvmciNotifyBootstrapFinishedEventTest.java +++ b/hotspot/test/compiler/jvmci/events/JvmciNotifyBootstrapFinishedEventTest.java @@ -30,12 +30,13 @@ * @modules java.base/jdk.internal.misc * java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.services * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @build compiler.jvmci.common.JVMCIHelpers * @run driver jdk.test.lib.FileInstaller ./JvmciNotifyBootstrapFinishedEventTest.config * ./META-INF/services/jdk.vm.ci.services.JVMCIServiceLocator diff --git a/hotspot/test/compiler/jvmci/events/JvmciNotifyInstallEventTest.java b/hotspot/test/compiler/jvmci/events/JvmciNotifyInstallEventTest.java index bb888c36a00..6b7bf298d7a 100644 --- a/hotspot/test/compiler/jvmci/events/JvmciNotifyInstallEventTest.java +++ b/hotspot/test/compiler/jvmci/events/JvmciNotifyInstallEventTest.java @@ -30,13 +30,14 @@ * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.org.objectweb.asm * java.base/jdk.internal.org.objectweb.asm.tree - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.code.site - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.services * - * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper + * @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper * @build compiler.jvmci.common.JVMCIHelpers * @run driver jdk.test.lib.FileInstaller ./JvmciNotifyInstallEventTest.config * ./META-INF/services/jdk.vm.ci.services.JVMCIServiceLocator diff --git a/hotspot/test/compiler/jvmci/events/JvmciShutdownEventTest.java b/hotspot/test/compiler/jvmci/events/JvmciShutdownEventTest.java index 76f6538bac6..40069651d59 100644 --- a/hotspot/test/compiler/jvmci/events/JvmciShutdownEventTest.java +++ b/hotspot/test/compiler/jvmci/events/JvmciShutdownEventTest.java @@ -27,10 +27,11 @@ * @requires vm.jvmci * @library /test/lib / * @modules java.base/jdk.internal.misc - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.services * * @build compiler.jvmci.common.JVMCIHelpers * compiler.jvmci.events.JvmciShutdownEventListener diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/DataPatchTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/DataPatchTest.java index 10a968f696c..dadc40112c3 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/DataPatchTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/DataPatchTest.java @@ -25,13 +25,13 @@ * @test * @requires vm.jvmci & (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9") * @library / - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.code.site - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.amd64 - * jdk.vm.ci/jdk.vm.ci.sparc + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.amd64 + * jdk.internal.vm.ci/jdk.vm.ci.sparc * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.DataPatchTest */ diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/InterpreterFrameSizeTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/InterpreterFrameSizeTest.java index 05d8bdb9c44..003093cd75b 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/InterpreterFrameSizeTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/InterpreterFrameSizeTest.java @@ -24,14 +24,14 @@ /** * @test * @requires vm.jvmci & (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9") - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.code.site - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.common - * jdk.vm.ci/jdk.vm.ci.amd64 - * jdk.vm.ci/jdk.vm.ci.sparc + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.common + * jdk.internal.vm.ci/jdk.vm.ci.amd64 + * jdk.internal.vm.ci/jdk.vm.ci.sparc * @compile CodeInstallationTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.InterpreterFrameSizeTest */ diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/MaxOopMapStackOffsetTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/MaxOopMapStackOffsetTest.java index 78965574ff2..2197a221ff5 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/MaxOopMapStackOffsetTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/MaxOopMapStackOffsetTest.java @@ -25,14 +25,14 @@ * @test * @requires vm.jvmci & (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9") * @library / - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.code.site - * jdk.vm.ci/jdk.vm.ci.common - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.amd64 - * jdk.vm.ci/jdk.vm.ci.sparc + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.common + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.amd64 + * jdk.internal.vm.ci/jdk.vm.ci.sparc * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.MaxOopMapStackOffsetTest */ diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java index 49a52f8c01e..61f0e729fa4 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java @@ -25,14 +25,14 @@ * @test * @requires vm.jvmci & (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9") * @library /test/lib / - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.code.site - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.common - * jdk.vm.ci/jdk.vm.ci.amd64 - * jdk.vm.ci/jdk.vm.ci.sparc + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.common + * jdk.internal.vm.ci/jdk.vm.ci.amd64 + * jdk.internal.vm.ci/jdk.vm.ci.sparc * @compile CodeInstallationTest.java TestHotSpotVMConfig.java NativeCallTest.java TestAssembler.java sparc/SPARCTestAssembler.java amd64/AMD64TestAssembler.java * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Xbootclasspath/a:. jdk.vm.ci.code.test.NativeCallTest */ diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java index 908eaf6e79a..64023862c51 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java @@ -25,13 +25,13 @@ * @test * @requires vm.jvmci & (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9") * @library / - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.code.site - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.amd64 - * jdk.vm.ci/jdk.vm.ci.sparc + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.amd64 + * jdk.internal.vm.ci/jdk.vm.ci.sparc * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.SimpleCodeInstallationTest */ diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java index 6f3833ed9fd..251d8e39e13 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java @@ -25,13 +25,13 @@ * @test * @requires vm.jvmci & (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9") * @library / - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.code.site - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.amd64 - * jdk.vm.ci/jdk.vm.ci.sparc + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.amd64 + * jdk.internal.vm.ci/jdk.vm.ci.sparc * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.SimpleDebugInfoTest */ diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/VirtualObjectDebugInfoTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/VirtualObjectDebugInfoTest.java index c0dadbbc99e..b4bdcbfe060 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/VirtualObjectDebugInfoTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/VirtualObjectDebugInfoTest.java @@ -25,13 +25,13 @@ * @test * @requires vm.jvmci & (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9") * @library / - * @modules jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.code - * jdk.vm.ci/jdk.vm.ci.code.site - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.amd64 - * jdk.vm.ci/jdk.vm.ci.sparc + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.code + * jdk.internal.vm.ci/jdk.vm.ci.code.site + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.amd64 + * jdk.internal.vm.ci/jdk.vm.ci.sparc * @compile CodeInstallationTest.java DebugInfoTest.java TestAssembler.java TestHotSpotVMConfig.java amd64/AMD64TestAssembler.java sparc/SPARCTestAssembler.java * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.code.test.VirtualObjectDebugInfoTest */ diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/HotSpotConstantReflectionProviderTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/HotSpotConstantReflectionProviderTest.java index b3ee6312348..2b989707e54 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/HotSpotConstantReflectionProviderTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/HotSpotConstantReflectionProviderTest.java @@ -24,9 +24,9 @@ /* * @test jdk.vm.ci.hotspot.test.HotSpotConstantReflectionProviderTest * @requires vm.jvmci - * @modules jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.hotspot + * @modules jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.hotspot * java.base/jdk.internal.vm.annotation * java.base/jdk.internal.misc * @library /test/lib /compiler/jvmci/jdk.vm.ci.hotspot.test/src diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderTest.java index bbf4c3a1ab9..4381c2264c3 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderTest.java @@ -26,10 +26,10 @@ * @bug 8152341 * @requires vm.jvmci * @library /test/lib /compiler/jvmci/jdk.vm.ci.hotspot.test/src - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.common - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.hotspot + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.common + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.hotspot * java.base/jdk.internal.misc * @run testng/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * jdk.vm.ci.hotspot.test.MemoryAccessProviderTest diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MethodHandleAccessProviderTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MethodHandleAccessProviderTest.java index 153cfc9698e..be431e4dcec 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MethodHandleAccessProviderTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MethodHandleAccessProviderTest.java @@ -28,9 +28,9 @@ * @requires vm.jvmci * @library /test/lib /compiler/jvmci/jdk.vm.ci.hotspot.test/src * @modules java.base/java.lang.invoke:+open - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime - * @modules jdk.vm.ci/jdk.vm.ci.hotspot:+open + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot:+open * @run testng/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI * jdk.vm.ci.hotspot.test.MethodHandleAccessProviderTest */ diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ConstantTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ConstantTest.java index fb0f1a2bd80..b71d6652233 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ConstantTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ConstantTest.java @@ -25,8 +25,8 @@ * @test * @requires vm.jvmci * @library ../../../../../ - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.ConstantTest */ diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java index 8f0ce0c2cc9..78546acb1ef 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java @@ -25,8 +25,8 @@ * @test * @requires vm.jvmci * @library ../../../../../ - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * jdk.attach * java.base/jdk.internal.misc * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.RedefineClassTest diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveConcreteMethodTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveConcreteMethodTest.java index 78c5a79f81c..e2696af874a 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveConcreteMethodTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveConcreteMethodTest.java @@ -24,8 +24,8 @@ /** * @test * @requires vm.jvmci - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.ResolvedJavaTypeResolveConcreteMethodTest */ diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveMethodTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveMethodTest.java index f4b15b2dc82..de501751059 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveMethodTest.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveMethodTest.java @@ -24,8 +24,8 @@ /** * @test * @requires vm.jvmci - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.ResolvedJavaTypeResolveMethodTest */ diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestConstantReflectionProvider.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestConstantReflectionProvider.java index 43cd69f0352..7afeee0f6cf 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestConstantReflectionProvider.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestConstantReflectionProvider.java @@ -25,8 +25,8 @@ * @test * @requires vm.jvmci * @library ../../../../../ - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestConstantReflectionProvider */ diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaField.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaField.java index 792901898a3..7e2f4f2b299 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaField.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaField.java @@ -25,8 +25,8 @@ * @test * @requires vm.jvmci * @library ../../../../../ - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestJavaField */ diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaMethod.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaMethod.java index a8edfec11e5..3f30b1565ed 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaMethod.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaMethod.java @@ -25,8 +25,8 @@ * @test * @requires vm.jvmci * @library ../../../../../ - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestJavaMethod */ diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaType.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaType.java index 669b579d51b..710a4302916 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaType.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaType.java @@ -25,8 +25,8 @@ * @test * @requires vm.jvmci * @library ../../../../../ - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestJavaType */ diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestMetaAccessProvider.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestMetaAccessProvider.java index 37d7d5233da..d66f5954e9c 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestMetaAccessProvider.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestMetaAccessProvider.java @@ -25,8 +25,8 @@ * @test * @requires vm.jvmci * @library ../../../../../ - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestMetaAccessProvider */ diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java index 48a6dc8613e..0755e0cba60 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java @@ -25,8 +25,8 @@ * @test * @requires vm.jvmci * @library ../../../../../ - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestResolvedJavaField */ diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java index 5087814bdaf..fe65ad2801b 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java @@ -25,8 +25,8 @@ * @test * @requires vm.jvmci * @library ../../../../../ - * @modules jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * @modules jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * java.base/jdk.internal.misc * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestResolvedJavaMethod */ diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java index e8f9f9ba082..91e36fc5364 100644 --- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java +++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java @@ -26,9 +26,9 @@ * @requires vm.jvmci * @library ../../../../../ * @modules java.base/jdk.internal.reflect - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime - * jdk.vm.ci/jdk.vm.ci.common + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.common * java.base/jdk.internal.misc * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestResolvedJavaType */ diff --git a/hotspot/test/compiler/jvmci/meta/StableFieldTest.java b/hotspot/test/compiler/jvmci/meta/StableFieldTest.java index 147811f6b6f..905d84452aa 100644 --- a/hotspot/test/compiler/jvmci/meta/StableFieldTest.java +++ b/hotspot/test/compiler/jvmci/meta/StableFieldTest.java @@ -28,9 +28,9 @@ * @library /test/lib / * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.vm.annotation - * jdk.vm.ci/jdk.vm.ci.hotspot - * jdk.vm.ci/jdk.vm.ci.meta - * jdk.vm.ci/jdk.vm.ci.runtime + * jdk.internal.vm.ci/jdk.vm.ci.hotspot + * jdk.internal.vm.ci/jdk.vm.ci.meta + * jdk.internal.vm.ci/jdk.vm.ci.runtime * * @compile StableFieldTest.java * @run driver ClassFileInstaller compiler.jvmci.meta.StableFieldTest From 1fa4d6038d2fa09a2d713e89b217c7cb96d29f88 Mon Sep 17 00:00:00 2001 From: Vladimir Kozlov Date: Thu, 16 Feb 2017 15:48:40 -0800 Subject: [PATCH 262/447] 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci Rename jdk.vm.ci and jdk.vm.compiler modules to jdk.internal.vm.ci and jdk.internal.vm.compiler. Reviewed-by: mchung, ihse, dnsimon --- jdk/src/java.base/share/classes/module-info.java | 6 +++--- jdk/src/java.base/share/lib/security/default.policy | 2 +- .../java.base/unix/classes/module-info.java.extra | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/jdk/src/java.base/share/classes/module-info.java b/jdk/src/java.base/share/classes/module-info.java index 3ad3f4a096c..d6ad8cf67ef 100644 --- a/jdk/src/java.base/share/classes/module-info.java +++ b/jdk/src/java.base/share/classes/module-info.java @@ -136,7 +136,7 @@ module java.base { jdk.jartool, jdk.jlink, jdk.scripting.nashorn, - jdk.vm.ci; + jdk.internal.vm.ci; exports jdk.internal.org.objectweb.asm.tree to jdk.jlink; exports jdk.internal.org.objectweb.asm.util to @@ -175,7 +175,7 @@ module java.base { jdk.scripting.nashorn, jdk.scripting.nashorn.shell, jdk.unsupported, - jdk.vm.ci; + jdk.internal.vm.ci; exports jdk.internal.perf to java.desktop, java.management, @@ -193,7 +193,7 @@ module java.base { jdk.unsupported; exports jdk.internal.vm.annotation to jdk.unsupported, - jdk.vm.ci; + jdk.internal.vm.ci; exports jdk.internal.util.jar to jdk.jartool, jdk.jdeps, diff --git a/jdk/src/java.base/share/lib/security/default.policy b/jdk/src/java.base/share/lib/security/default.policy index 36521f38e1d..d3b7112f0d5 100644 --- a/jdk/src/java.base/share/lib/security/default.policy +++ b/jdk/src/java.base/share/lib/security/default.policy @@ -216,6 +216,6 @@ grant { permission java.lang.RuntimePermission "accessClassInPackage.com.apple.*"; }; -grant codeBase "jrt:/jdk.vm.compiler" { +grant codeBase "jrt:/jdk.internal.vm.compiler" { permission java.security.AllPermission; }; diff --git a/jdk/src/java.base/unix/classes/module-info.java.extra b/jdk/src/java.base/unix/classes/module-info.java.extra index 43f85b0309a..833b0964309 100644 --- a/jdk/src/java.base/unix/classes/module-info.java.extra +++ b/jdk/src/java.base/unix/classes/module-info.java.extra @@ -23,14 +23,14 @@ * questions. */ -// jdk.vm.compiler uses Unsafe and VM classes from jdk.internal.misc -exports jdk.internal.misc to jdk.vm.compiler; -opens jdk.internal.misc to jdk.vm.compiler; +// jdk.internal.vm.compiler uses Unsafe and VM classes from jdk.internal.misc +exports jdk.internal.misc to jdk.internal.vm.compiler; +opens jdk.internal.misc to jdk.internal.vm.compiler; -// jdk.vm.compiler uses com.sun.crypto.provider to generate crypto intrinsics -opens com.sun.crypto.provider to jdk.vm.compiler; +// jdk.internal.vm.compiler uses com.sun.crypto.provider to generate crypto intrinsics +opens com.sun.crypto.provider to jdk.internal.vm.compiler; -exports jdk.internal.module to jdk.vm.compiler; +exports jdk.internal.module to jdk.internal.vm.compiler; // AOT uses jdk.internal.misc.Unsafe exports jdk.internal.misc to jdk.aot; From ef5d58f98b79526d61e95e0c2a869f7eaf77f674 Mon Sep 17 00:00:00 2001 From: Vladimir Kozlov Date: Thu, 16 Feb 2017 15:51:01 -0800 Subject: [PATCH 263/447] 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci Rename jdk.vm.ci and jdk.vm.compiler modules to jdk.internal.vm.ci and jdk.internal.vm.compiler. Reviewed-by: mchung, ihse, dnsimon --- common/autoconf/generated-configure.sh | 10 +++++----- common/autoconf/hotspot.m4 | 6 +++--- make/CompileJavaModules.gmk | 16 ++++++++-------- make/Main.gmk | 16 ++++++++-------- make/common/Modules.gmk | 6 +++--- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index d9fe823764e..4acd93ec6ef 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -5170,7 +5170,7 @@ VS_SDK_PLATFORM_NAME_2013= #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1487032350 +DATE_WHEN_GENERATED=1487289045 ############################################################################### # @@ -52643,12 +52643,12 @@ $as_echo "no, forced" >&6; } # Only enable AOT on linux-X64. if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then - if test -e "$HOTSPOT_TOPDIR/src/jdk.vm.compiler"; then + if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then ENABLE_AOT="true" else ENABLE_AOT="false" if test "x$enable_aot" = "xyes"; then - as_fn_error $? "Cannot build AOT without hotspot/src/jdk.vm.compiler sources. Remove --enable-aot." "$LINENO" 5 + as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5 fi fi else @@ -64379,8 +64379,8 @@ $as_echo "$JVM_FEATURES" >&6; } JVM_FEATURES_jvmci="" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.vm.compiler should be built" >&5 -$as_echo_n "checking if jdk.vm.compiler should be built... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5 +$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; } if [[ " $JVM_FEATURES " =~ " graal " ]] ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5 $as_echo "yes, forced" >&6; } diff --git a/common/autoconf/hotspot.m4 b/common/autoconf/hotspot.m4 index b295b015a9f..acf2a5fe185 100644 --- a/common/autoconf/hotspot.m4 +++ b/common/autoconf/hotspot.m4 @@ -215,12 +215,12 @@ AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_AOT], # Only enable AOT on linux-X64. if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then - if test -e "$HOTSPOT_TOPDIR/src/jdk.vm.compiler"; then + if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then ENABLE_AOT="true" else ENABLE_AOT="false" if test "x$enable_aot" = "xyes"; then - AC_MSG_ERROR([Cannot build AOT without hotspot/src/jdk.vm.compiler sources. Remove --enable-aot.]) + AC_MSG_ERROR([Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot.]) fi fi else @@ -327,7 +327,7 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES], JVM_FEATURES_jvmci="" fi - AC_MSG_CHECKING([if jdk.vm.compiler should be built]) + AC_MSG_CHECKING([if jdk.internal.vm.compiler should be built]) if HOTSPOT_CHECK_JVM_FEATURE(graal); then AC_MSG_RESULT([yes, forced]) if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then diff --git a/make/CompileJavaModules.gmk b/make/CompileJavaModules.gmk index 0b54c856da4..525f6ba1ec3 100644 --- a/make/CompileJavaModules.gmk +++ b/make/CompileJavaModules.gmk @@ -462,13 +462,13 @@ jdk.internal.jvmstat_COPY := aliasmap # JVMCI compilers make use of that information for various sanity checks. # Don't use Indy strings concatenation to have good JVMCI startup performance. -jdk.vm.ci_ADD_JAVAC_FLAGS := -parameters -Xlint:-exports -XDstringConcat=inline +jdk.internal.vm.ci_ADD_JAVAC_FLAGS := -parameters -Xlint:-exports -XDstringConcat=inline ################################################################################ -jdk.vm.compiler_ADD_JAVAC_FLAGS := -parameters -XDstringConcat=inline +jdk.internal.vm.compiler_ADD_JAVAC_FLAGS := -parameters -XDstringConcat=inline -jdk.vm.compiler_EXCLUDES += \ +jdk.internal.vm.compiler_EXCLUDES += \ org.graalvm.compiler.core.match.processor \ org.graalvm.compiler.nodeinfo.processor \ org.graalvm.compiler.options.processor \ @@ -557,16 +557,16 @@ MODULESOURCEPATH := $(call GetModuleSrcPath) # Add imported modules to the modulepath MODULEPATH := $(call PathList, $(IMPORT_MODULES_CLASSES)) -ifeq ($(MODULE), jdk.vm.ci) - ## WORKAROUND jdk.vm.ci source structure issue +ifeq ($(MODULE), jdk.internal.vm.ci) + ## WORKAROUND jdk.internal.vm.ci source structure issue JVMCI_MODULESOURCEPATH := $(MODULESOURCEPATH) \ $(subst /$(MODULE)/,/*/, $(filter-out %processor/src, \ - $(wildcard $(HOTSPOT_TOPDIR)/src/jdk.vm.ci/share/classes/*/src))) + $(wildcard $(HOTSPOT_TOPDIR)/src/$(MODULE)/share/classes/*/src))) MODULESOURCEPATH := $(call PathList, $(JVMCI_MODULESOURCEPATH)) endif -ifeq ($(MODULE), jdk.vm.compiler) - ## WORKAROUND jdk.vm.compiler source structure issue +ifeq ($(MODULE), jdk.internal.vm.compiler) + ## WORKAROUND jdk.internal.vm.compiler source structure issue VM_COMPILER_MODULESOURCEPATH := $(MODULESOURCEPATH) \ $(subst /$(MODULE)/,/*/, $(filter-out %processor/src %test/src %jtt/src %bench/src %microbenchmarks/src, \ $(wildcard $(HOTSPOT_TOPDIR)/src/$(MODULE)/share/classes/*/src))) diff --git a/make/Main.gmk b/make/Main.gmk index 18cac690f96..820fbc4e68d 100644 --- a/make/Main.gmk +++ b/make/Main.gmk @@ -633,16 +633,16 @@ else # in javadoc. java.desktop-gensrc-jdk: java.base-gensrc - # The annotation processing for jdk.vm.ci and jdk.vm.compiler needs classes - # from the current JDK. - jdk.vm.ci-gensrc-hotspot: $(addsuffix -java, \ - $(call FindTransitiveDepsForModule, jdk.vm.ci)) - jdk.vm.compiler-gensrc-hotspot: $(addsuffix -java, \ - $(call FindTransitiveDepsForModule, jdk.vm.compiler)) + # The annotation processing for jdk.internal.vm.ci and jdk.internal.vm.compiler + # needs classes from the current JDK. + jdk.internal.vm.ci-gensrc-hotspot: $(addsuffix -java, \ + $(call FindTransitiveDepsForModule, jdk.internal.vm.ci)) + jdk.internal.vm.compiler-gensrc-hotspot: $(addsuffix -java, \ + $(call FindTransitiveDepsForModule, jdk.internal.vm.compiler)) - # For jdk.vm.compiler, the gensrc step is generating a module-info.java.extra + # For jdk.internal.vm.compiler, the gensrc step is generating a module-info.java.extra # file to be processed by the gensrc-moduleinfo target. - jdk.vm.compiler-gensrc-moduleinfo: jdk.vm.compiler-gensrc-hotspot + jdk.internal.vm.compiler-gensrc-moduleinfo: jdk.internal.vm.compiler-gensrc-hotspot # Explicitly add dependencies for special targets java.base-java: unpack-sec diff --git a/make/common/Modules.gmk b/make/common/Modules.gmk index edc565f82e2..8e8b7712255 100644 --- a/make/common/Modules.gmk +++ b/make/common/Modules.gmk @@ -63,7 +63,7 @@ BOOT_MODULES += \ jdk.net \ jdk.sctp \ jdk.unsupported \ - jdk.vm.ci \ + jdk.internal.vm.ci \ # # to be deprivileged @@ -114,7 +114,7 @@ PLATFORM_MODULES += \ jdk.scripting.nashorn \ jdk.security.auth \ jdk.security.jgss \ - jdk.vm.compiler \ + jdk.internal.vm.compiler \ jdk.xml.dom \ jdk.zipfs \ # @@ -147,7 +147,7 @@ endif # Filter out Graal specific modules if Graal build is disabled ifeq ($(INCLUDE_GRAAL), false) - MODULES_FILTER += jdk.vm.compiler + MODULES_FILTER += jdk.internal.vm.compiler endif ################################################################################ From 69c0f2aba4cbf189c4c8ada30a43afe5999622e4 Mon Sep 17 00:00:00 2001 From: Vladimir Kozlov Date: Mon, 27 Feb 2017 15:59:22 -0800 Subject: [PATCH 264/447] 8175516: JNI exception pending in jdk_tools_jaotc_jnilibelf_JNILibELFAPI.c:97 Add missing NULL checks Reviewed-by: iveresov --- .../jdk_tools_jaotc_jnilibelf_JNILibELFAPI.c | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/hotspot/src/jdk.aot/unix/native/libjelfshim/jdk_tools_jaotc_jnilibelf_JNILibELFAPI.c b/hotspot/src/jdk.aot/unix/native/libjelfshim/jdk_tools_jaotc_jnilibelf_JNILibELFAPI.c index d6d69cb439a..b64bc2dfdbc 100644 --- a/hotspot/src/jdk.aot/unix/native/libjelfshim/jdk_tools_jaotc_jnilibelf_JNILibELFAPI.c +++ b/hotspot/src/jdk.aot/unix/native/libjelfshim/jdk_tools_jaotc_jnilibelf_JNILibELFAPI.c @@ -70,18 +70,17 @@ JNIEXPORT jint JNICALL Java_jdk_tools_jaotc_jnilibelf_JNILibELFAPI_elf_1version */ static jlong getNativeAddress(JNIEnv* env, jobject ptrObj) { - jclass ptrClass; - jfieldID fidNumber; jlong nativeAddress = -1; - assert (ptrObj != NULL); + assert (ptrObj != NULL); // Get a reference to ptr object's class - ptrClass = (*env)->GetObjectClass(env, ptrObj); - - // Get the Field ID of the instance variables "address" - fidNumber = (*env)->GetFieldID(env, ptrClass, "address", "J"); - if (fidNumber != NULL) { - // Get the long given the Field ID - nativeAddress = (*env)->GetLongField(env, ptrObj, fidNumber); + jclass ptrClass = (*env)->GetObjectClass(env, ptrObj); + if (ptrClass != NULL) { + // Get the Field ID of the instance variables "address" + jfieldID fidNumber = (*env)->GetFieldID(env, ptrClass, "address", "J"); + if (fidNumber != NULL) { + // Get the long given the Field ID + nativeAddress = (*env)->GetLongField(env, ptrObj, fidNumber); + } } // fprintf(stderr, "Native address : %lx\n", nativeAddress); return nativeAddress; @@ -91,10 +90,15 @@ static jlong getNativeAddress(JNIEnv* env, jobject ptrObj) { * Box the nativeAddress as a Pointer object. */ static jobject makePointerObject(JNIEnv* env, jlong nativeAddr) { + jobject retObj = NULL; jclass ptrClass = (*env)->FindClass(env, "jdk/tools/jaotc/jnilibelf/Pointer"); - // Call back constructor to allocate a Pointer object, with an int argument - jmethodID constructorId = (*env)->GetMethodID(env, ptrClass, "", "(J)V"); - jobject retObj = (*env)->NewObject(env, ptrClass, constructorId, nativeAddr); + if (ptrClass != NULL) { + // Call back constructor to allocate a Pointer object, with an int argument + jmethodID constructorId = (*env)->GetMethodID(env, ptrClass, "", "(J)V"); + if (constructorId != NULL) { + retObj = (*env)->NewObject(env, ptrClass, constructorId, nativeAddr); + } + } return retObj; } From 1830b30f19cff2181bde870a445ad54369dc70da Mon Sep 17 00:00:00 2001 From: Jini George Date: Tue, 28 Feb 2017 10:10:14 +0530 Subject: [PATCH 265/447] 8175512: new TestPrintMdo.java fails with -XX:TieredStopAtLevel=1 Avoid running the test for -XX:TieredStopAtLevel=1 due to the lack of mdo data from JIT in this case. Reviewed-by: dsamersoff, sspitsyn --- hotspot/test/serviceability/sa/TestPrintMdo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotspot/test/serviceability/sa/TestPrintMdo.java b/hotspot/test/serviceability/sa/TestPrintMdo.java index 0681aa02514..48b0b0840b8 100644 --- a/hotspot/test/serviceability/sa/TestPrintMdo.java +++ b/hotspot/test/serviceability/sa/TestPrintMdo.java @@ -39,7 +39,7 @@ import jdk.test.lib.Asserts; /* * @test * @library /test/lib - * @requires vm.flavor == "server" & !vm.emulatedClient + * @requires vm.flavor == "server" & !vm.emulatedClient & !(vm.opt.TieredStopAtLevel == 1) * @build jdk.test.lib.apps.* * @run main/othervm TestPrintMdo */ From 90fdff0e704ce15abcf2f985f8bfc3a766a397c1 Mon Sep 17 00:00:00 2001 From: Mikael Gerdin Date: Fri, 17 Feb 2017 13:16:54 +0100 Subject: [PATCH 266/447] 8175085: [REDO] G1 Needs pre barrier on dereference of weak JNI handles Reviewed-by: kbarrett, dcubed, tschatzl --- hotspot/make/test/JtregNative.gmk | 4 +- .../aarch64/vm/jniFastGetField_aarch64.cpp | 7 +- .../cpu/aarch64/vm/sharedRuntime_aarch64.cpp | 32 ++- .../templateInterpreterGenerator_aarch64.cpp | 27 ++- hotspot/src/cpu/arm/vm/interp_masm_arm.cpp | 181 +-------------- hotspot/src/cpu/arm/vm/interp_masm_arm.hpp | 23 +- .../src/cpu/arm/vm/jniFastGetField_arm.cpp | 10 +- hotspot/src/cpu/arm/vm/macroAssembler_arm.cpp | 215 +++++++++++++++++- hotspot/src/cpu/arm/vm/macroAssembler_arm.hpp | 25 +- hotspot/src/cpu/arm/vm/sharedRuntime_arm.cpp | 24 +- .../vm/templateInterpreterGenerator_arm.cpp | 35 ++- hotspot/src/cpu/ppc/vm/frame_ppc.cpp | 9 +- hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp | 34 ++- hotspot/src/cpu/ppc/vm/macroAssembler_ppc.hpp | 6 +- hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp | 13 +- .../vm/templateInterpreterGenerator_ppc.cpp | 11 +- .../src/cpu/s390/vm/macroAssembler_s390.cpp | 28 +++ .../src/cpu/s390/vm/macroAssembler_s390.hpp | 2 + .../src/cpu/s390/vm/sharedRuntime_s390.cpp | 12 +- .../vm/templateInterpreterGenerator_s390.cpp | 11 +- .../cpu/sparc/vm/jniFastGetField_sparc.cpp | 5 +- .../src/cpu/sparc/vm/sharedRuntime_sparc.cpp | 33 ++- .../vm/templateInterpreterGenerator_sparc.cpp | 24 +- .../src/cpu/x86/vm/jniFastGetField_x86_32.cpp | 11 +- .../src/cpu/x86/vm/jniFastGetField_x86_64.cpp | 8 +- hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp | 39 +++- hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp | 5 +- .../src/cpu/x86/vm/sharedRuntime_x86_32.cpp | 13 +- .../src/cpu/x86/vm/sharedRuntime_x86_64.cpp | 13 +- .../vm/templateInterpreterGenerator_x86.cpp | 12 +- .../src/cpu/zero/vm/cppInterpreter_zero.cpp | 10 +- hotspot/src/share/vm/prims/jni.cpp | 7 +- hotspot/src/share/vm/prims/jvmtiEnv.cpp | 9 +- hotspot/src/share/vm/runtime/javaCalls.cpp | 118 ++++++---- hotspot/src/share/vm/runtime/javaCalls.hpp | 95 ++++++-- hotspot/src/share/vm/runtime/jniHandles.cpp | 37 ++- hotspot/src/share/vm/runtime/jniHandles.hpp | 106 +++++++-- .../src/share/vm/shark/sharkNativeWrapper.cpp | 3 +- .../jni/CallWithJNIWeak/CallWithJNIWeak.java | 72 ++++++ .../jni/CallWithJNIWeak/libCallWithJNIWeak.c | 142 ++++++++++++ .../jni/ReturnJNIWeak/ReturnJNIWeak.java | 132 +++++++++++ .../jni/ReturnJNIWeak/libReturnJNIWeak.c | 52 +++++ 42 files changed, 1221 insertions(+), 434 deletions(-) create mode 100644 hotspot/test/runtime/jni/CallWithJNIWeak/CallWithJNIWeak.java create mode 100644 hotspot/test/runtime/jni/CallWithJNIWeak/libCallWithJNIWeak.c create mode 100644 hotspot/test/runtime/jni/ReturnJNIWeak/ReturnJNIWeak.java create mode 100644 hotspot/test/runtime/jni/ReturnJNIWeak/libReturnJNIWeak.c diff --git a/hotspot/make/test/JtregNative.gmk b/hotspot/make/test/JtregNative.gmk index 7223733367a..42eb76af57e 100644 --- a/hotspot/make/test/JtregNative.gmk +++ b/hotspot/make/test/JtregNative.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -48,6 +48,8 @@ BUILD_HOTSPOT_JTREG_NATIVE_SRC := \ $(HOTSPOT_TOPDIR)/test/runtime/jni/PrivateInterfaceMethods \ $(HOTSPOT_TOPDIR)/test/runtime/jni/ToStringInInterfaceTest \ $(HOTSPOT_TOPDIR)/test/runtime/jni/CalleeSavedRegisters \ + $(HOTSPOT_TOPDIR)/test/runtime/jni/CallWithJNIWeak \ + $(HOTSPOT_TOPDIR)/test/runtime/jni/ReturnJNIWeak \ $(HOTSPOT_TOPDIR)/test/runtime/modules/getModuleJNI \ $(HOTSPOT_TOPDIR)/test/runtime/SameObject \ $(HOTSPOT_TOPDIR)/test/runtime/BoolReturn \ diff --git a/hotspot/src/cpu/aarch64/vm/jniFastGetField_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/jniFastGetField_aarch64.cpp index b2f21031f18..a09c5230dc4 100644 --- a/hotspot/src/cpu/aarch64/vm/jniFastGetField_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/jniFastGetField_aarch64.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, Red Hat Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -82,6 +82,11 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) { __ eor(robj, robj, rcounter); // obj, since // robj ^ rcounter ^ rcounter == robj // robj is address dependent on rcounter. + + // If mask changes we need to ensure that the inverse is still encodable as an immediate + STATIC_ASSERT(JNIHandles::weak_tag_mask == 1); + __ andr(robj, robj, ~JNIHandles::weak_tag_mask); + __ ldr(robj, Address(robj, 0)); // *obj __ lsr(roffset, c_rarg2, 2); // offset diff --git a/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp index 01e0eeb1fc1..a286102e7b1 100644 --- a/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, 2015, Red Hat Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -2052,13 +2052,31 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, __ reset_last_Java_frame(false); - // Unpack oop result + // Unbox oop result, e.g. JNIHandles::resolve result. if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - Label L; - __ cbz(r0, L); - __ ldr(r0, Address(r0, 0)); - __ bind(L); - __ verify_oop(r0); + Label done, not_weak; + __ cbz(r0, done); // Use NULL as-is. + STATIC_ASSERT(JNIHandles::weak_tag_mask == 1u); + __ tbz(r0, 0, not_weak); // Test for jweak tag. + // Resolve jweak. + __ ldr(r0, Address(r0, -JNIHandles::weak_tag_value)); + __ verify_oop(r0); +#if INCLUDE_ALL_GCS + if (UseG1GC) { + __ g1_write_barrier_pre(noreg /* obj */, + r0 /* pre_val */, + rthread /* thread */, + rscratch1 /* tmp */, + true /* tosca_live */, + true /* expand_call */); + } +#endif // INCLUDE_ALL_GCS + __ b(done); + __ bind(not_weak); + // Resolve (untagged) jobject. + __ ldr(r0, Address(r0, 0)); + __ verify_oop(r0); + __ bind(done); } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp index 90dcd6c1a2c..6f44292c55a 100644 --- a/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, Red Hat Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -1399,13 +1399,32 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) { // and result handler will pick it up { - Label no_oop, store_result; + Label no_oop, not_weak, store_result; __ adr(t, ExternalAddress(AbstractInterpreter::result_handler(T_OBJECT))); __ cmp(t, result_handler); __ br(Assembler::NE, no_oop); - // retrieve result + // Unbox oop result, e.g. JNIHandles::resolve result. __ pop(ltos); - __ cbz(r0, store_result); + __ cbz(r0, store_result); // Use NULL as-is. + STATIC_ASSERT(JNIHandles::weak_tag_mask == 1u); + __ tbz(r0, 0, not_weak); // Test for jweak tag. + // Resolve jweak. + __ ldr(r0, Address(r0, -JNIHandles::weak_tag_value)); +#if INCLUDE_ALL_GCS + if (UseG1GC) { + __ enter(); // Barrier may call runtime. + __ g1_write_barrier_pre(noreg /* obj */, + r0 /* pre_val */, + rthread /* thread */, + t /* tmp */, + true /* tosca_live */, + true /* expand_call */); + __ leave(); + } +#endif // INCLUDE_ALL_GCS + __ b(store_result); + __ bind(not_weak); + // Resolve (untagged) jobject. __ ldr(r0, Address(r0, 0)); __ bind(store_result); __ str(r0, Address(rfp, frame::interpreter_frame_oop_temp_offset*wordSize)); diff --git a/hotspot/src/cpu/arm/vm/interp_masm_arm.cpp b/hotspot/src/cpu/arm/vm/interp_masm_arm.cpp index 2f41b102a85..96df37c275e 100644 --- a/hotspot/src/cpu/arm/vm/interp_masm_arm.cpp +++ b/hotspot/src/cpu/arm/vm/interp_masm_arm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -476,185 +476,6 @@ void InterpreterMacroAssembler::set_card(Register card_table_base, Address card_ } ////////////////////////////////////////////////////////////////////////////////// -#if INCLUDE_ALL_GCS - -// G1 pre-barrier. -// Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). -// If store_addr != noreg, then previous value is loaded from [store_addr]; -// in such case store_addr and new_val registers are preserved; -// otherwise pre_val register is preserved. -void InterpreterMacroAssembler::g1_write_barrier_pre(Register store_addr, - Register new_val, - Register pre_val, - Register tmp1, - Register tmp2) { - Label done; - Label runtime; - - if (store_addr != noreg) { - assert_different_registers(store_addr, new_val, pre_val, tmp1, tmp2, noreg); - } else { - assert (new_val == noreg, "should be"); - assert_different_registers(pre_val, tmp1, tmp2, noreg); - } - - Address in_progress(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + - SATBMarkQueue::byte_offset_of_active())); - Address index(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + - SATBMarkQueue::byte_offset_of_index())); - Address buffer(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + - SATBMarkQueue::byte_offset_of_buf())); - - // Is marking active? - assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "adjust this code"); - ldrb(tmp1, in_progress); - cbz(tmp1, done); - - // Do we need to load the previous value? - if (store_addr != noreg) { - load_heap_oop(pre_val, Address(store_addr, 0)); - } - - // Is the previous value null? - cbz(pre_val, done); - - // Can we store original value in the thread's buffer? - // Is index == 0? - // (The index field is typed as size_t.) - - ldr(tmp1, index); // tmp1 := *index_adr - ldr(tmp2, buffer); - - subs(tmp1, tmp1, wordSize); // tmp1 := tmp1 - wordSize - b(runtime, lt); // If negative, goto runtime - - str(tmp1, index); // *index_adr := tmp1 - - // Record the previous value - str(pre_val, Address(tmp2, tmp1)); - b(done); - - bind(runtime); - - // save the live input values -#ifdef AARCH64 - if (store_addr != noreg) { - raw_push(store_addr, new_val); - } else { - raw_push(pre_val, ZR); - } -#else - if (store_addr != noreg) { - // avoid raw_push to support any ordering of store_addr and new_val - push(RegisterSet(store_addr) | RegisterSet(new_val)); - } else { - push(pre_val); - } -#endif // AARCH64 - - if (pre_val != R0) { - mov(R0, pre_val); - } - mov(R1, Rthread); - - call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), R0, R1); - -#ifdef AARCH64 - if (store_addr != noreg) { - raw_pop(store_addr, new_val); - } else { - raw_pop(pre_val, ZR); - } -#else - if (store_addr != noreg) { - pop(RegisterSet(store_addr) | RegisterSet(new_val)); - } else { - pop(pre_val); - } -#endif // AARCH64 - - bind(done); -} - -// G1 post-barrier. -// Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). -void InterpreterMacroAssembler::g1_write_barrier_post(Register store_addr, - Register new_val, - Register tmp1, - Register tmp2, - Register tmp3) { - - Address queue_index(Rthread, in_bytes(JavaThread::dirty_card_queue_offset() + - DirtyCardQueue::byte_offset_of_index())); - Address buffer(Rthread, in_bytes(JavaThread::dirty_card_queue_offset() + - DirtyCardQueue::byte_offset_of_buf())); - - BarrierSet* bs = Universe::heap()->barrier_set(); - CardTableModRefBS* ct = (CardTableModRefBS*)bs; - Label done; - Label runtime; - - // Does store cross heap regions? - - eor(tmp1, store_addr, new_val); -#ifdef AARCH64 - logical_shift_right(tmp1, tmp1, HeapRegion::LogOfHRGrainBytes); - cbz(tmp1, done); -#else - movs(tmp1, AsmOperand(tmp1, lsr, HeapRegion::LogOfHRGrainBytes)); - b(done, eq); -#endif - - // crosses regions, storing NULL? - - cbz(new_val, done); - - // storing region crossing non-NULL, is card already dirty? - const Register card_addr = tmp1; - assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code"); - - mov_address(tmp2, (address)ct->byte_map_base, symbolic_Relocation::card_table_reference); - add(card_addr, tmp2, AsmOperand(store_addr, lsr, CardTableModRefBS::card_shift)); - - ldrb(tmp2, Address(card_addr)); - cmp(tmp2, (int)G1SATBCardTableModRefBS::g1_young_card_val()); - b(done, eq); - - membar(MacroAssembler::Membar_mask_bits(MacroAssembler::StoreLoad), tmp2); - - assert(CardTableModRefBS::dirty_card_val() == 0, "adjust this code"); - ldrb(tmp2, Address(card_addr)); - cbz(tmp2, done); - - // storing a region crossing, non-NULL oop, card is clean. - // dirty card and log. - - strb(zero_register(tmp2), Address(card_addr)); - - ldr(tmp2, queue_index); - ldr(tmp3, buffer); - - subs(tmp2, tmp2, wordSize); - b(runtime, lt); // go to runtime if now negative - - str(tmp2, queue_index); - - str(card_addr, Address(tmp3, tmp2)); - b(done); - - bind(runtime); - - if (card_addr != R0) { - mov(R0, card_addr); - } - mov(R1, Rthread); - call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post), R0, R1); - - bind(done); -} - -#endif // INCLUDE_ALL_GCS -////////////////////////////////////////////////////////////////////////////////// // Java Expression Stack diff --git a/hotspot/src/cpu/arm/vm/interp_masm_arm.hpp b/hotspot/src/cpu/arm/vm/interp_masm_arm.hpp index 5c753753f95..39e60226bf6 100644 --- a/hotspot/src/cpu/arm/vm/interp_masm_arm.hpp +++ b/hotspot/src/cpu/arm/vm/interp_masm_arm.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -146,27 +146,6 @@ class InterpreterMacroAssembler: public MacroAssembler { void set_card(Register card_table_base, Address card_table_addr, Register tmp); -#if INCLUDE_ALL_GCS - // G1 pre-barrier. - // Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). - // If store_addr != noreg, then previous value is loaded from [store_addr]; - // in such case store_addr and new_val registers are preserved; - // otherwise pre_val register is preserved. - void g1_write_barrier_pre(Register store_addr, - Register new_val, - Register pre_val, - Register tmp1, - Register tmp2); - - // G1 post-barrier. - // Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). - void g1_write_barrier_post(Register store_addr, - Register new_val, - Register tmp1, - Register tmp2, - Register tmp3); -#endif // INCLUDE_ALL_GCS - void pop_ptr(Register r); void pop_i(Register r = R0_tos); #ifdef AARCH64 diff --git a/hotspot/src/cpu/arm/vm/jniFastGetField_arm.cpp b/hotspot/src/cpu/arm/vm/jniFastGetField_arm.cpp index f9bd9f37970..65f929b1025 100644 --- a/hotspot/src/cpu/arm/vm/jniFastGetField_arm.cpp +++ b/hotspot/src/cpu/arm/vm/jniFastGetField_arm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -119,6 +119,14 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) { __ ldr_s32(Rsafept_cnt, Address(Rsafepoint_counter_addr)); __ tbnz(Rsafept_cnt, 0, slow_case); +#ifdef AARCH64 + // If mask changes we need to ensure that the inverse is still encodable as an immediate + STATIC_ASSERT(JNIHandles::weak_tag_mask == 1); + __ andr(R1, R1, ~JNIHandles::weak_tag_mask); +#else + __ bic(R1, R1, JNIHandles::weak_tag_mask); +#endif + if (os::is_MP()) { // Address dependency restricts memory access ordering. It's cheaper than explicit LoadLoad barrier __ andr(Rtmp1, Rsafept_cnt, (unsigned)1); diff --git a/hotspot/src/cpu/arm/vm/macroAssembler_arm.cpp b/hotspot/src/cpu/arm/vm/macroAssembler_arm.cpp index ada7d3fc485..2eb2a551002 100644 --- a/hotspot/src/cpu/arm/vm/macroAssembler_arm.cpp +++ b/hotspot/src/cpu/arm/vm/macroAssembler_arm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2211,6 +2211,219 @@ void MacroAssembler::biased_locking_exit(Register obj_reg, Register tmp_reg, Lab b(done, eq); } + +void MacroAssembler::resolve_jobject(Register value, + Register tmp1, + Register tmp2) { + assert_different_registers(value, tmp1, tmp2); + Label done, not_weak; + cbz(value, done); // Use NULL as-is. + STATIC_ASSERT(JNIHandles::weak_tag_mask == 1u); + tbz(value, 0, not_weak); // Test for jweak tag. + // Resolve jweak. + ldr(value, Address(value, -JNIHandles::weak_tag_value)); + verify_oop(value); +#if INCLUDE_ALL_GCS + if (UseG1GC) { + g1_write_barrier_pre(noreg, // store_addr + noreg, // new_val + value, // pre_val + tmp1, // tmp1 + tmp2); // tmp2 + } +#endif // INCLUDE_ALL_GCS + b(done); + bind(not_weak); + // Resolve (untagged) jobject. + ldr(value, Address(value)); + verify_oop(value); + bind(done); +} + + +////////////////////////////////////////////////////////////////////////////////// + +#if INCLUDE_ALL_GCS + +// G1 pre-barrier. +// Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). +// If store_addr != noreg, then previous value is loaded from [store_addr]; +// in such case store_addr and new_val registers are preserved; +// otherwise pre_val register is preserved. +void MacroAssembler::g1_write_barrier_pre(Register store_addr, + Register new_val, + Register pre_val, + Register tmp1, + Register tmp2) { + Label done; + Label runtime; + + if (store_addr != noreg) { + assert_different_registers(store_addr, new_val, pre_val, tmp1, tmp2, noreg); + } else { + assert (new_val == noreg, "should be"); + assert_different_registers(pre_val, tmp1, tmp2, noreg); + } + + Address in_progress(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + + SATBMarkQueue::byte_offset_of_active())); + Address index(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + + SATBMarkQueue::byte_offset_of_index())); + Address buffer(Rthread, in_bytes(JavaThread::satb_mark_queue_offset() + + SATBMarkQueue::byte_offset_of_buf())); + + // Is marking active? + assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "adjust this code"); + ldrb(tmp1, in_progress); + cbz(tmp1, done); + + // Do we need to load the previous value? + if (store_addr != noreg) { + load_heap_oop(pre_val, Address(store_addr, 0)); + } + + // Is the previous value null? + cbz(pre_val, done); + + // Can we store original value in the thread's buffer? + // Is index == 0? + // (The index field is typed as size_t.) + + ldr(tmp1, index); // tmp1 := *index_adr + ldr(tmp2, buffer); + + subs(tmp1, tmp1, wordSize); // tmp1 := tmp1 - wordSize + b(runtime, lt); // If negative, goto runtime + + str(tmp1, index); // *index_adr := tmp1 + + // Record the previous value + str(pre_val, Address(tmp2, tmp1)); + b(done); + + bind(runtime); + + // save the live input values +#ifdef AARCH64 + if (store_addr != noreg) { + raw_push(store_addr, new_val); + } else { + raw_push(pre_val, ZR); + } +#else + if (store_addr != noreg) { + // avoid raw_push to support any ordering of store_addr and new_val + push(RegisterSet(store_addr) | RegisterSet(new_val)); + } else { + push(pre_val); + } +#endif // AARCH64 + + if (pre_val != R0) { + mov(R0, pre_val); + } + mov(R1, Rthread); + + call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), R0, R1); + +#ifdef AARCH64 + if (store_addr != noreg) { + raw_pop(store_addr, new_val); + } else { + raw_pop(pre_val, ZR); + } +#else + if (store_addr != noreg) { + pop(RegisterSet(store_addr) | RegisterSet(new_val)); + } else { + pop(pre_val); + } +#endif // AARCH64 + + bind(done); +} + +// G1 post-barrier. +// Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). +void MacroAssembler::g1_write_barrier_post(Register store_addr, + Register new_val, + Register tmp1, + Register tmp2, + Register tmp3) { + + Address queue_index(Rthread, in_bytes(JavaThread::dirty_card_queue_offset() + + DirtyCardQueue::byte_offset_of_index())); + Address buffer(Rthread, in_bytes(JavaThread::dirty_card_queue_offset() + + DirtyCardQueue::byte_offset_of_buf())); + + BarrierSet* bs = Universe::heap()->barrier_set(); + CardTableModRefBS* ct = (CardTableModRefBS*)bs; + Label done; + Label runtime; + + // Does store cross heap regions? + + eor(tmp1, store_addr, new_val); +#ifdef AARCH64 + logical_shift_right(tmp1, tmp1, HeapRegion::LogOfHRGrainBytes); + cbz(tmp1, done); +#else + movs(tmp1, AsmOperand(tmp1, lsr, HeapRegion::LogOfHRGrainBytes)); + b(done, eq); +#endif + + // crosses regions, storing NULL? + + cbz(new_val, done); + + // storing region crossing non-NULL, is card already dirty? + const Register card_addr = tmp1; + assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code"); + + mov_address(tmp2, (address)ct->byte_map_base, symbolic_Relocation::card_table_reference); + add(card_addr, tmp2, AsmOperand(store_addr, lsr, CardTableModRefBS::card_shift)); + + ldrb(tmp2, Address(card_addr)); + cmp(tmp2, (int)G1SATBCardTableModRefBS::g1_young_card_val()); + b(done, eq); + + membar(MacroAssembler::Membar_mask_bits(MacroAssembler::StoreLoad), tmp2); + + assert(CardTableModRefBS::dirty_card_val() == 0, "adjust this code"); + ldrb(tmp2, Address(card_addr)); + cbz(tmp2, done); + + // storing a region crossing, non-NULL oop, card is clean. + // dirty card and log. + + strb(zero_register(tmp2), Address(card_addr)); + + ldr(tmp2, queue_index); + ldr(tmp3, buffer); + + subs(tmp2, tmp2, wordSize); + b(runtime, lt); // go to runtime if now negative + + str(tmp2, queue_index); + + str(card_addr, Address(tmp3, tmp2)); + b(done); + + bind(runtime); + + if (card_addr != R0) { + mov(R0, card_addr); + } + mov(R1, Rthread); + call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post), R0, R1); + + bind(done); +} + +#endif // INCLUDE_ALL_GCS + +////////////////////////////////////////////////////////////////////////////////// + #ifdef AARCH64 void MacroAssembler::load_sized_value(Register dst, Address src, size_t size_in_bytes, bool is_signed) { diff --git a/hotspot/src/cpu/arm/vm/macroAssembler_arm.hpp b/hotspot/src/cpu/arm/vm/macroAssembler_arm.hpp index 770bba6c8a1..e6f73353cb9 100644 --- a/hotspot/src/cpu/arm/vm/macroAssembler_arm.hpp +++ b/hotspot/src/cpu/arm/vm/macroAssembler_arm.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -402,6 +402,29 @@ public: void biased_locking_enter_with_cas(Register obj_reg, Register old_mark_reg, Register new_mark_reg, Register tmp, Label& slow_case, int* counter_addr); + void resolve_jobject(Register value, Register tmp1, Register tmp2); + +#if INCLUDE_ALL_GCS + // G1 pre-barrier. + // Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). + // If store_addr != noreg, then previous value is loaded from [store_addr]; + // in such case store_addr and new_val registers are preserved; + // otherwise pre_val register is preserved. + void g1_write_barrier_pre(Register store_addr, + Register new_val, + Register pre_val, + Register tmp1, + Register tmp2); + + // G1 post-barrier. + // Blows all volatile registers (R0-R3 on 32-bit ARM, R0-R18 on AArch64, Rtemp, LR). + void g1_write_barrier_post(Register store_addr, + Register new_val, + Register tmp1, + Register tmp2, + Register tmp3); +#endif // INCLUDE_ALL_GCS + #ifndef AARCH64 void nop() { mov(R0, R0); diff --git a/hotspot/src/cpu/arm/vm/sharedRuntime_arm.cpp b/hotspot/src/cpu/arm/vm/sharedRuntime_arm.cpp index 9b37b4fe6dc..48f096473c3 100644 --- a/hotspot/src/cpu/arm/vm/sharedRuntime_arm.cpp +++ b/hotspot/src/cpu/arm/vm/sharedRuntime_arm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1732,14 +1732,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, case T_FLOAT : // fall through case T_DOUBLE : /* nothing to do */ break; case T_OBJECT : // fall through - case T_ARRAY : { - Label L; - __ cbz(R0, L); - __ ldr(R0, Address(R0)); - __ verify_oop(R0); - __ bind(L); - break; - } + case T_ARRAY : break; // See JNIHandles::resolve below default: ShouldNotReachHere(); } @@ -1748,14 +1741,15 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, if (CheckJNICalls) { __ str(__ zero_register(Rtemp), Address(Rthread, JavaThread::pending_jni_exception_check_fn_offset())); } - - // Unhandle the result - if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - __ cmp(R0, 0); - __ ldr(R0, Address(R0), ne); - } #endif // AARCH64 + // Unbox oop result, e.g. JNIHandles::resolve value in R0. + if (ret_type == T_OBJECT || ret_type == T_ARRAY) { + __ resolve_jobject(R0, // value + Rtemp, // tmp1 + R1_tmp); // tmp2 + } + // Any exception pending? __ ldr(Rtemp, Address(Rthread, Thread::pending_exception_offset())); __ mov(SP, FP); diff --git a/hotspot/src/cpu/arm/vm/templateInterpreterGenerator_arm.cpp b/hotspot/src/cpu/arm/vm/templateInterpreterGenerator_arm.cpp index 743510e09a7..7fda747ad48 100644 --- a/hotspot/src/cpu/arm/vm/templateInterpreterGenerator_arm.cpp +++ b/hotspot/src/cpu/arm/vm/templateInterpreterGenerator_arm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1240,28 +1240,25 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) { __ str(__ zero_register(Rtemp), Address(Rthread, JavaThread::pending_jni_exception_check_fn_offset())); } - // Unbox if the result is non-zero object -#ifdef AARCH64 + // Unbox oop result, e.g. JNIHandles::resolve result if it's an oop. { - Label L, Lnull; + Label Lnot_oop; +#ifdef AARCH64 __ mov_slow(Rtemp, AbstractInterpreter::result_handler(T_OBJECT)); __ cmp(Rresult_handler, Rtemp); - __ b(L, ne); - __ cbz(Rsaved_result, Lnull); - __ ldr(Rsaved_result, Address(Rsaved_result)); - __ bind(Lnull); - // Store oop on the stack for GC - __ str(Rsaved_result, Address(FP, frame::interpreter_frame_oop_temp_offset * wordSize)); - __ bind(L); + __ b(Lnot_oop, ne); +#else // !AARCH64 + // For ARM32, Rresult_handler is -1 for oop result, 0 otherwise. + __ cbz(Rresult_handler, Lnot_oop); +#endif // !AARCH64 + Register value = AARCH64_ONLY(Rsaved_result) NOT_AARCH64(Rsaved_result_lo); + __ resolve_jobject(value, // value + Rtemp, // tmp1 + R1_tmp); // tmp2 + // Store resolved result in frame for GC visibility. + __ str(value, Address(FP, frame::interpreter_frame_oop_temp_offset * wordSize)); + __ bind(Lnot_oop); } -#else - __ tst(Rsaved_result_lo, Rresult_handler); - __ ldr(Rsaved_result_lo, Address(Rsaved_result_lo), ne); - - // Store oop on the stack for GC - __ cmp(Rresult_handler, 0); - __ str(Rsaved_result_lo, Address(FP, frame::interpreter_frame_oop_temp_offset * wordSize), ne); -#endif // AARCH64 #ifdef AARCH64 // Restore SP (drop native parameters area), to keep SP in sync with extended_sp in frame diff --git a/hotspot/src/cpu/ppc/vm/frame_ppc.cpp b/hotspot/src/cpu/ppc/vm/frame_ppc.cpp index 131a931c2c1..b6a538681f6 100644 --- a/hotspot/src/cpu/ppc/vm/frame_ppc.cpp +++ b/hotspot/src/cpu/ppc/vm/frame_ppc.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2015 SAP SE. All rights reserved. + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -171,10 +171,7 @@ BasicType frame::interpreter_frame_result(oop* oop_result, jvalue* value_result) switch (method->result_type()) { case T_OBJECT: case T_ARRAY: { - oop* obj_p = *(oop**)lresult; - oop obj = (obj_p == NULL) ? (oop)NULL : *obj_p; - assert(obj == NULL || Universe::heap()->is_in(obj), "sanity check"); - *oop_result = obj; + *oop_result = JNIHandles::resolve(*(jobject*)lresult); break; } // We use std/stfd to store the values. diff --git a/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp b/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp index a5d5613a414..6eb27c78f17 100644 --- a/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp +++ b/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2016 SAP SE. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -3033,6 +3033,34 @@ void MacroAssembler::card_table_write(jbyte* byte_map_base, Register Rtmp, Regis stbx(R0, Rtmp, Robj); } +// Kills R31 if value is a volatile register. +void MacroAssembler::resolve_jobject(Register value, Register tmp1, Register tmp2, bool needs_frame) { + Label done; + cmpdi(CCR0, value, 0); + beq(CCR0, done); // Use NULL as-is. + + clrrdi(tmp1, value, JNIHandles::weak_tag_size); +#if INCLUDE_ALL_GCS + if (UseG1GC) { andi_(tmp2, value, JNIHandles::weak_tag_mask); } +#endif + ld(value, 0, tmp1); // Resolve (untagged) jobject. + +#if INCLUDE_ALL_GCS + if (UseG1GC) { + Label not_weak; + beq(CCR0, not_weak); // Test for jweak tag. + verify_oop(value); + g1_write_barrier_pre(noreg, // obj + noreg, // offset + value, // pre_val + tmp1, tmp2, needs_frame); + bind(not_weak); + } +#endif // INCLUDE_ALL_GCS + verify_oop(value); + bind(done); +} + #if INCLUDE_ALL_GCS // General G1 pre-barrier generator. // Goal: record the previous value if it is not null. @@ -3094,7 +3122,7 @@ void MacroAssembler::g1_write_barrier_pre(Register Robj, RegisterOrConstant offs bind(runtime); - // VM call need frame to access(write) O register. + // May need to preserve LR. Also needed if current frame is not compatible with C calling convention. if (needs_frame) { save_LR_CR(Rtmp1); push_frame_reg_args(0, Rtmp2); diff --git a/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.hpp b/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.hpp index 11b966a82c9..0b1b2a0befa 100644 --- a/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.hpp +++ b/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.hpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2016 SAP SE. All rights reserved. + * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -649,6 +649,8 @@ class MacroAssembler: public Assembler { void card_write_barrier_post(Register Rstore_addr, Register Rnew_val, Register Rtmp); void card_table_write(jbyte* byte_map_base, Register Rtmp, Register Robj); + void resolve_jobject(Register value, Register tmp1, Register tmp2, bool needs_frame); + #if INCLUDE_ALL_GCS // General G1 pre-barrier generator. void g1_write_barrier_pre(Register Robj, RegisterOrConstant offset, Register Rpre_val, diff --git a/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp b/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp index 784595f11be..dc36aa77da2 100644 --- a/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp +++ b/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2016 SAP SE. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2477,16 +2477,11 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm, __ reset_last_Java_frame(); - // Unpack oop result. + // Unbox oop result, e.g. JNIHandles::resolve value. // -------------------------------------------------------------------------- if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - Label skip_unboxing; - __ cmpdi(CCR0, R3_RET, 0); - __ beq(CCR0, skip_unboxing); - __ ld(R3_RET, 0, R3_RET); - __ bind(skip_unboxing); - __ verify_oop(R3_RET); + __ resolve_jobject(R3_RET, r_temp_1, r_temp_2, /* needs_frame */ false); // kills R31 } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/ppc/vm/templateInterpreterGenerator_ppc.cpp b/hotspot/src/cpu/ppc/vm/templateInterpreterGenerator_ppc.cpp index 56810938a53..ab87c204018 100644 --- a/hotspot/src/cpu/ppc/vm/templateInterpreterGenerator_ppc.cpp +++ b/hotspot/src/cpu/ppc/vm/templateInterpreterGenerator_ppc.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2015, 2016 SAP SE. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -401,11 +401,8 @@ address TemplateInterpreterGenerator::generate_result_handler_for(BasicType type case T_LONG: break; case T_OBJECT: - // unbox result if not null - __ cmpdi(CCR0, R3_RET, 0); - __ beq(CCR0, done); - __ ld(R3_RET, 0, R3_RET); - __ verify_oop(R3_RET); + // JNIHandles::resolve result. + __ resolve_jobject(R3_RET, R11_scratch1, R12_scratch2, /* needs_frame */ true); // kills R31 break; case T_FLOAT: break; diff --git a/hotspot/src/cpu/s390/vm/macroAssembler_s390.cpp b/hotspot/src/cpu/s390/vm/macroAssembler_s390.cpp index 0f78e5a6250..d5776117436 100644 --- a/hotspot/src/cpu/s390/vm/macroAssembler_s390.cpp +++ b/hotspot/src/cpu/s390/vm/macroAssembler_s390.cpp @@ -3439,6 +3439,34 @@ void MacroAssembler::card_write_barrier_post(Register store_addr, Register tmp) z_mvi(0, store_addr, 0); // Store byte 0. } +void MacroAssembler::resolve_jobject(Register value, Register tmp1, Register tmp2) { + NearLabel Ldone; + z_ltgr(tmp1, value); + z_bre(Ldone); // Use NULL result as-is. + + z_nill(value, ~JNIHandles::weak_tag_mask); + z_lg(value, 0, value); // Resolve (untagged) jobject. + +#if INCLUDE_ALL_GCS + if (UseG1GC) { + NearLabel Lnot_weak; + z_tmll(tmp1, JNIHandles::weak_tag_mask); // Test for jweak tag. + z_braz(Lnot_weak); + verify_oop(value); + g1_write_barrier_pre(noreg /* obj */, + noreg /* offset */, + value /* pre_val */, + noreg /* val */, + tmp1 /* tmp1 */, + tmp2 /* tmp2 */, + true /* pre_val_needed */); + bind(Lnot_weak); + } +#endif // INCLUDE_ALL_GCS + verify_oop(value); + bind(Ldone); +} + #if INCLUDE_ALL_GCS //------------------------------------------------------ diff --git a/hotspot/src/cpu/s390/vm/macroAssembler_s390.hpp b/hotspot/src/cpu/s390/vm/macroAssembler_s390.hpp index 588bde6207e..2b4002a3bf4 100644 --- a/hotspot/src/cpu/s390/vm/macroAssembler_s390.hpp +++ b/hotspot/src/cpu/s390/vm/macroAssembler_s390.hpp @@ -726,6 +726,8 @@ class MacroAssembler: public Assembler { // Write to card table for modification at store_addr - register is destroyed afterwards. void card_write_barrier_post(Register store_addr, Register tmp); + void resolve_jobject(Register value, Register tmp1, Register tmp2); + #if INCLUDE_ALL_GCS // General G1 pre-barrier generator. // Purpose: record the previous value if it is not null. diff --git a/hotspot/src/cpu/s390/vm/sharedRuntime_s390.cpp b/hotspot/src/cpu/s390/vm/sharedRuntime_s390.cpp index ea498e3399c..89c3ae4032a 100644 --- a/hotspot/src/cpu/s390/vm/sharedRuntime_s390.cpp +++ b/hotspot/src/cpu/s390/vm/sharedRuntime_s390.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2016 SAP SE. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2272,13 +2272,9 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm, __ reset_last_Java_frame(); - // Unpack oop result + // Unpack oop result, e.g. JNIHandles::resolve result. if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - NearLabel L; - __ compare64_and_branch(Z_RET, (RegisterOrConstant)0L, Assembler::bcondEqual, L); - __ z_lg(Z_RET, 0, Z_RET); - __ bind(L); - __ verify_oop(Z_RET); + __ resolve_jobject(Z_RET, /* tmp1 */ Z_R13, /* tmp2 */ Z_R7); } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/s390/vm/templateInterpreterGenerator_s390.cpp b/hotspot/src/cpu/s390/vm/templateInterpreterGenerator_s390.cpp index 2084f36006f..20a9a3e9571 100644 --- a/hotspot/src/cpu/s390/vm/templateInterpreterGenerator_s390.cpp +++ b/hotspot/src/cpu/s390/vm/templateInterpreterGenerator_s390.cpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2016 SAP SE. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1695,14 +1695,11 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) { // from the jni handle to z_ijava_state.oop_temp. This is // necessary, because we reset the jni handle block below. // NOTE: frame::interpreter_frame_result() depends on this, too. - { NearLabel no_oop_result, store_oop_result; + { NearLabel no_oop_result; __ load_absolute_address(Z_R1, AbstractInterpreter::result_handler(T_OBJECT)); __ compareU64_and_branch(Z_R1, Rresult_handler, Assembler::bcondNotEqual, no_oop_result); - __ compareU64_and_branch(Rlresult, (intptr_t)0L, Assembler::bcondEqual, store_oop_result); - __ z_lg(Rlresult, 0, Rlresult); // unbox - __ bind(store_oop_result); + __ resolve_jobject(Rlresult, /* tmp1 */ Rmethod, /* tmp2 */ Z_R1); __ z_stg(Rlresult, oop_tmp_offset, Z_fp); - __ verify_oop(Rlresult); __ bind(no_oop_result); } diff --git a/hotspot/src/cpu/sparc/vm/jniFastGetField_sparc.cpp b/hotspot/src/cpu/sparc/vm/jniFastGetField_sparc.cpp index 6d3f05a2aab..ff9fcd69472 100644 --- a/hotspot/src/cpu/sparc/vm/jniFastGetField_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/jniFastGetField_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -68,6 +68,7 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) { __ andcc (G4, 1, G0); __ br (Assembler::notZero, false, Assembler::pn, label1); __ delayed()->srl (O2, 2, O4); + __ andn (O1, JNIHandles::weak_tag_mask, O1); __ ld_ptr (O1, 0, O5); assert(count < LIST_CAPACITY, "LIST_CAPACITY too small"); @@ -147,6 +148,7 @@ address JNI_FastGetField::generate_fast_get_long_field() { __ andcc (G4, 1, G0); __ br (Assembler::notZero, false, Assembler::pn, label1); __ delayed()->srl (O2, 2, O4); + __ andn (O1, JNIHandles::weak_tag_mask, O1); __ ld_ptr (O1, 0, O5); __ add (O5, O4, O5); @@ -219,6 +221,7 @@ address JNI_FastGetField::generate_fast_get_float_field0(BasicType type) { __ andcc (G4, 1, G0); __ br (Assembler::notZero, false, Assembler::pn, label1); __ delayed()->srl (O2, 2, O4); + __ andn (O1, JNIHandles::weak_tag_mask, O1); __ ld_ptr (O1, 0, O5); assert(count < LIST_CAPACITY, "LIST_CAPACITY too small"); diff --git a/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp b/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp index 7b4dcf193d3..613e662d65c 100644 --- a/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2754,15 +2754,30 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, __ verify_thread(); // G2_thread must be correct __ reset_last_Java_frame(); - // Unpack oop result + // Unbox oop result, e.g. JNIHandles::resolve value in I0. if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - Label L; - __ addcc(G0, I0, G0); - __ brx(Assembler::notZero, true, Assembler::pt, L); - __ delayed()->ld_ptr(I0, 0, I0); - __ mov(G0, I0); - __ bind(L); - __ verify_oop(I0); + Label done, not_weak; + __ br_null(I0, false, Assembler::pn, done); // Use NULL as-is. + __ delayed()->andcc(I0, JNIHandles::weak_tag_mask, G0); // Test for jweak + __ brx(Assembler::zero, true, Assembler::pt, not_weak); + __ delayed()->ld_ptr(I0, 0, I0); // Maybe resolve (untagged) jobject. + // Resolve jweak. + __ ld_ptr(I0, -JNIHandles::weak_tag_value, I0); +#if INCLUDE_ALL_GCS + if (UseG1GC) { + // Copy to O0 because macro doesn't allow pre_val in input reg. + __ mov(I0, O0); + __ g1_write_barrier_pre(noreg /* obj */, + noreg /* index */, + 0 /* offset */, + O0 /* pre_val */, + G3_scratch /* tmp */, + true /* preserve_o_regs */); + } +#endif // INCLUDE_ALL_GCS + __ bind(not_weak); + __ verify_oop(I0); + __ bind(done); } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/sparc/vm/templateInterpreterGenerator_sparc.cpp b/hotspot/src/cpu/sparc/vm/templateInterpreterGenerator_sparc.cpp index b677a1dd662..fd4e3ffd149 100644 --- a/hotspot/src/cpu/sparc/vm/templateInterpreterGenerator_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/templateInterpreterGenerator_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1516,11 +1516,23 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) { __ set((intptr_t)AbstractInterpreter::result_handler(T_OBJECT), G3_scratch); __ cmp_and_brx_short(G3_scratch, Lscratch, Assembler::notEqual, Assembler::pt, no_oop); - __ addcc(G0, O0, O0); - __ brx(Assembler::notZero, true, Assembler::pt, store_result); // if result is not NULL: - __ delayed()->ld_ptr(O0, 0, O0); // unbox it - __ mov(G0, O0); - + // Unbox oop result, e.g. JNIHandles::resolve value in O0. + __ br_null(O0, false, Assembler::pn, store_result); // Use NULL as-is. + __ delayed()->andcc(O0, JNIHandles::weak_tag_mask, G0); // Test for jweak + __ brx(Assembler::zero, true, Assembler::pt, store_result); + __ delayed()->ld_ptr(O0, 0, O0); // Maybe resolve (untagged) jobject. + // Resolve jweak. + __ ld_ptr(O0, -JNIHandles::weak_tag_value, O0); +#if INCLUDE_ALL_GCS + if (UseG1GC) { + __ g1_write_barrier_pre(noreg /* obj */, + noreg /* index */, + 0 /* offset */, + O0 /* pre_val */, + G3_scratch /* tmp */, + true /* preserve_o_regs */); + } +#endif // INCLUDE_ALL_GCS __ bind(store_result); // Store it where gc will look for it and result handler expects it. __ st_ptr(O0, FP, (frame::interpreter_frame_oop_temp_offset*wordSize) + STACK_BIAS); diff --git a/hotspot/src/cpu/x86/vm/jniFastGetField_x86_32.cpp b/hotspot/src/cpu/x86/vm/jniFastGetField_x86_32.cpp index a45e0eb9aa3..719bf8ce560 100644 --- a/hotspot/src/cpu/x86/vm/jniFastGetField_x86_32.cpp +++ b/hotspot/src/cpu/x86/vm/jniFastGetField_x86_32.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -85,6 +85,9 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) { __ movptr (rdx, Address(rsp, 2*wordSize)); // obj } __ movptr(rax, Address(rsp, 3*wordSize)); // jfieldID + + __ clear_jweak_tag(rdx); + __ movptr(rdx, Address(rdx, 0)); // *obj __ shrptr (rax, 2); // offset @@ -202,6 +205,9 @@ address JNI_FastGetField::generate_fast_get_long_field() { __ movptr(rdx, Address(rsp, 3*wordSize)); // obj } __ movptr(rsi, Address(rsp, 4*wordSize)); // jfieldID + + __ clear_jweak_tag(rdx); + __ movptr(rdx, Address(rdx, 0)); // *obj __ shrptr(rsi, 2); // offset @@ -291,6 +297,9 @@ address JNI_FastGetField::generate_fast_get_float_field0(BasicType type) { __ movptr(rdx, Address(rsp, 2*wordSize)); // obj } __ movptr(rax, Address(rsp, 3*wordSize)); // jfieldID + + __ clear_jweak_tag(rdx); + __ movptr(rdx, Address(rdx, 0)); // *obj __ shrptr(rax, 2); // offset diff --git a/hotspot/src/cpu/x86/vm/jniFastGetField_x86_64.cpp b/hotspot/src/cpu/x86/vm/jniFastGetField_x86_64.cpp index 7286fd124b8..f18aa684266 100644 --- a/hotspot/src/cpu/x86/vm/jniFastGetField_x86_64.cpp +++ b/hotspot/src/cpu/x86/vm/jniFastGetField_x86_64.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -80,6 +80,9 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) { // robj ^ rcounter ^ rcounter == robj // robj is data dependent on rcounter. } + + __ clear_jweak_tag(robj); + __ movptr(robj, Address(robj, 0)); // *obj __ mov (roffset, c_rarg2); __ shrptr(roffset, 2); // offset @@ -178,6 +181,9 @@ address JNI_FastGetField::generate_fast_get_float_field0(BasicType type) { // robj ^ rcounter ^ rcounter == robj // robj is data dependent on rcounter. } + + __ clear_jweak_tag(robj); + __ movptr(robj, Address(robj, 0)); // *obj __ mov (roffset, c_rarg2); __ shrptr(roffset, 2); // offset diff --git a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp index b6d32631582..f2c8393fb12 100644 --- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp +++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -5129,6 +5129,43 @@ void MacroAssembler::vxorps(XMMRegister dst, XMMRegister nds, AddressLiteral src } +void MacroAssembler::resolve_jobject(Register value, + Register thread, + Register tmp) { + assert_different_registers(value, thread, tmp); + Label done, not_weak; + testptr(value, value); + jcc(Assembler::zero, done); // Use NULL as-is. + testptr(value, JNIHandles::weak_tag_mask); // Test for jweak tag. + jcc(Assembler::zero, not_weak); + // Resolve jweak. + movptr(value, Address(value, -JNIHandles::weak_tag_value)); + verify_oop(value); +#if INCLUDE_ALL_GCS + if (UseG1GC) { + g1_write_barrier_pre(noreg /* obj */, + value /* pre_val */, + thread /* thread */, + tmp /* tmp */, + true /* tosca_live */, + true /* expand_call */); + } +#endif // INCLUDE_ALL_GCS + jmp(done); + bind(not_weak); + // Resolve (untagged) jobject. + movptr(value, Address(value, 0)); + verify_oop(value); + bind(done); +} + +void MacroAssembler::clear_jweak_tag(Register possibly_jweak) { + const int32_t inverted_jweak_mask = ~static_cast(JNIHandles::weak_tag_mask); + STATIC_ASSERT(inverted_jweak_mask == -2); // otherwise check this code + // The inverted mask is sign-extended + andptr(possibly_jweak, inverted_jweak_mask); +} + ////////////////////////////////////////////////////////////////////////////////// #if INCLUDE_ALL_GCS diff --git a/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp b/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp index a3e81e58dc5..39b2e1a5305 100644 --- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp +++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -297,6 +297,9 @@ class MacroAssembler: public Assembler { void store_check(Register obj); // store check for obj - register is destroyed afterwards void store_check(Register obj, Address dst); // same as above, dst is exact store location (reg. is destroyed) + void resolve_jobject(Register value, Register thread, Register tmp); + void clear_jweak_tag(Register possibly_jweak); + #if INCLUDE_ALL_GCS void g1_write_barrier_pre(Register obj, diff --git a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp index ed317550e08..47b9fe5c627 100644 --- a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp +++ b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2226,14 +2226,11 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, __ reset_last_Java_frame(thread, false); - // Unpack oop result + // Unbox oop result, e.g. JNIHandles::resolve value. if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - Label L; - __ cmpptr(rax, (int32_t)NULL_WORD); - __ jcc(Assembler::equal, L); - __ movptr(rax, Address(rax, 0)); - __ bind(L); - __ verify_oop(rax); + __ resolve_jobject(rax /* value */, + thread /* thread */, + rcx /* tmp */); } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp index 4587b8caba6..d81e965d05d 100644 --- a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp +++ b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2579,14 +2579,11 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm, __ reset_last_Java_frame(false); - // Unpack oop result + // Unbox oop result, e.g. JNIHandles::resolve value. if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - Label L; - __ testptr(rax, rax); - __ jcc(Assembler::zero, L); - __ movptr(rax, Address(rax, 0)); - __ bind(L); - __ verify_oop(rax); + __ resolve_jobject(rax /* value */, + r15_thread /* thread */, + rcx /* tmp */); } if (CheckJNICalls) { diff --git a/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp b/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp index eb5661bee00..9c02d44cdb8 100644 --- a/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp +++ b/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1193,16 +1193,16 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) { // and result handler will pick it up { - Label no_oop, store_result; + Label no_oop, not_weak, store_result; __ lea(t, ExternalAddress(AbstractInterpreter::result_handler(T_OBJECT))); __ cmpptr(t, Address(rbp, frame::interpreter_frame_result_handler_offset*wordSize)); __ jcc(Assembler::notEqual, no_oop); // retrieve result __ pop(ltos); - __ testptr(rax, rax); - __ jcc(Assembler::zero, store_result); - __ movptr(rax, Address(rax, 0)); - __ bind(store_result); + // Unbox oop result, e.g. JNIHandles::resolve value. + __ resolve_jobject(rax /* value */, + thread /* thread */, + t /* tmp */); __ movptr(Address(rbp, frame::interpreter_frame_oop_temp_offset*wordSize), rax); // keep stack depth as expected by pushing oop which will eventually be discarded __ push(ltos); diff --git a/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp b/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp index 1fcf7d9984b..f7c51092c82 100644 --- a/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp +++ b/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -406,10 +406,12 @@ int CppInterpreter::native_entry(Method* method, intptr_t UNUSED, TRAPS) { // oop_temp where the garbage collector can see it before // we release the handle it might be protected by. if (handler->result_type() == &ffi_type_pointer) { - if (result[0]) - istate->set_oop_temp(*(oop *) result[0]); - else + if (result[0] == 0) { istate->set_oop_temp(NULL); + } else { + jobject handle = reinterpret_cast(result[0]); + istate->set_oop_temp(JNIHandles::resolve(handle)); + } } // Reset handle block diff --git a/hotspot/src/share/vm/prims/jni.cpp b/hotspot/src/share/vm/prims/jni.cpp index f519e5e2788..acda443267a 100644 --- a/hotspot/src/share/vm/prims/jni.cpp +++ b/hotspot/src/share/vm/prims/jni.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -935,8 +935,7 @@ class JNI_ArgumentPusherVaArg : public JNI_ArgumentPusher { inline void get_long() { _arguments->push_long(va_arg(_ap, jlong)); } inline void get_float() { _arguments->push_float((jfloat)va_arg(_ap, jdouble)); } // float is coerced to double w/ va_arg inline void get_double() { _arguments->push_double(va_arg(_ap, jdouble)); } - inline void get_object() { jobject l = va_arg(_ap, jobject); - _arguments->push_oop(Handle((oop *)l, false)); } + inline void get_object() { _arguments->push_jobject(va_arg(_ap, jobject)); } inline void set_ap(va_list rap) { va_copy(_ap, rap); @@ -1025,7 +1024,7 @@ class JNI_ArgumentPusherArray : public JNI_ArgumentPusher { inline void get_long() { _arguments->push_long((_ap++)->j); } inline void get_float() { _arguments->push_float((_ap++)->f); } inline void get_double() { _arguments->push_double((_ap++)->d);} - inline void get_object() { _arguments->push_oop(Handle((oop *)(_ap++)->l, false)); } + inline void get_object() { _arguments->push_jobject((_ap++)->l); } inline void set_ap(const jvalue *rap) { _ap = rap; } diff --git a/hotspot/src/share/vm/prims/jvmtiEnv.cpp b/hotspot/src/share/vm/prims/jvmtiEnv.cpp index f9dc315a552..57292a2c8bc 100644 --- a/hotspot/src/share/vm/prims/jvmtiEnv.cpp +++ b/hotspot/src/share/vm/prims/jvmtiEnv.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1796,6 +1796,13 @@ JvmtiEnv::FollowReferences(jint heap_filter, jclass klass, jobject initial_objec } } + if (initial_object != NULL) { + oop init_obj = JNIHandles::resolve_external_guard(initial_object); + if (init_obj == NULL) { + return JVMTI_ERROR_INVALID_OBJECT; + } + } + Thread *thread = Thread::current(); HandleMark hm(thread); KlassHandle kh (thread, k_oop); diff --git a/hotspot/src/share/vm/runtime/javaCalls.cpp b/hotspot/src/share/vm/runtime/javaCalls.cpp index 5874699a1fc..d91a32a9f08 100644 --- a/hotspot/src/share/vm/runtime/javaCalls.cpp +++ b/hotspot/src/share/vm/runtime/javaCalls.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -328,9 +328,9 @@ void JavaCalls::call_helper(JavaValue* result, const methodHandle& method, JavaC // Verify the arguments if (CheckJNICalls) { - args->verify(method, result->get_type(), thread); + args->verify(method, result->get_type()); } - else debug_only(args->verify(method, result->get_type(), thread)); + else debug_only(args->verify(method, result->get_type())); #if INCLUDE_JVMCI } #else @@ -442,12 +442,43 @@ void JavaCalls::call_helper(JavaValue* result, const methodHandle& method, JavaC //-------------------------------------------------------------------------------------- // Implementation of JavaCallArguments +inline bool is_value_state_indirect_oop(uint state) { + assert(state != JavaCallArguments::value_state_oop, + "Checking for handles after removal"); + assert(state < JavaCallArguments::value_state_limit, + "Invalid value state %u", state); + return state != JavaCallArguments::value_state_primitive; +} + +inline oop resolve_indirect_oop(intptr_t value, uint state) { + switch (state) { + case JavaCallArguments::value_state_handle: + { + oop* ptr = reinterpret_cast(value); + return Handle::raw_resolve(ptr); + } + + case JavaCallArguments::value_state_jobject: + { + jobject obj = reinterpret_cast(value); + return JNIHandles::resolve(obj); + } + + default: + ShouldNotReachHere(); + return NULL; + } +} + intptr_t* JavaCallArguments::parameters() { // First convert all handles to oops for(int i = 0; i < _size; i++) { - if (_is_oop[i]) { - // Handle conversion - _value[i] = cast_from_oop(Handle::raw_resolve((oop *)_value[i])); + uint state = _value_state[i]; + assert(state != value_state_oop, "Multiple handle conversions"); + if (is_value_state_indirect_oop(state)) { + oop obj = resolve_indirect_oop(_value[i], state); + _value[i] = cast_from_oop(obj); + _value_state[i] = value_state_oop; } } // Return argument vector @@ -457,30 +488,42 @@ intptr_t* JavaCallArguments::parameters() { class SignatureChekker : public SignatureIterator { private: - bool *_is_oop; - int _pos; + int _pos; BasicType _return_type; - intptr_t* _value; - Thread* _thread; + u_char* _value_state; + intptr_t* _value; public: bool _is_return; - SignatureChekker(Symbol* signature, BasicType return_type, bool is_static, bool* is_oop, intptr_t* value, Thread* thread) : SignatureIterator(signature) { - _is_oop = is_oop; - _is_return = false; - _return_type = return_type; - _pos = 0; - _value = value; - _thread = thread; - + SignatureChekker(Symbol* signature, + BasicType return_type, + bool is_static, + u_char* value_state, + intptr_t* value) : + SignatureIterator(signature), + _pos(0), + _return_type(return_type), + _value_state(value_state), + _value(value), + _is_return(false) + { if (!is_static) { check_value(true); // Receiver must be an oop } } void check_value(bool type) { - guarantee(_is_oop[_pos++] == type, "signature does not match pushed arguments"); + uint state = _value_state[_pos++]; + if (type) { + guarantee(is_value_state_indirect_oop(state), + "signature does not match pushed arguments: %u at %d", + state, _pos - 1); + } else { + guarantee(state == JavaCallArguments::value_state_primitive, + "signature does not match pushed arguments: %u at %d", + state, _pos - 1); + } } void check_doing_return(bool state) { _is_return = state; } @@ -515,24 +558,20 @@ class SignatureChekker : public SignatureIterator { return; } - // verify handle and the oop pointed to by handle - int p = _pos; - bool bad = false; - // If argument is oop - if (_is_oop[p]) { - intptr_t v = _value[p]; - if (v != 0 ) { - size_t t = (size_t)v; - bad = (t < (size_t)os::vm_page_size() ) || !Handle::raw_resolve((oop *)v)->is_oop_or_null(true); - if (CheckJNICalls && bad) { - ReportJNIFatalError((JavaThread*)_thread, "Bad JNI oop argument"); - } - } - // for the regular debug case. - assert(!bad, "Bad JNI oop argument"); + intptr_t v = _value[_pos]; + if (v != 0) { + // v is a "handle" referring to an oop, cast to integral type. + // There shouldn't be any handles in very low memory. + guarantee((size_t)v >= (size_t)os::vm_page_size(), + "Bad JNI oop argument %d: " PTR_FORMAT, _pos, v); + // Verify the pointee. + oop vv = resolve_indirect_oop(v, _value_state[_pos]); + guarantee(vv->is_oop_or_null(true), + "Bad JNI oop argument %d: " PTR_FORMAT " -> " PTR_FORMAT, + _pos, v, p2i(vv)); } - check_value(true); + check_value(true); // Verify value state. } void do_bool() { check_int(T_BOOLEAN); } @@ -549,8 +588,7 @@ class SignatureChekker : public SignatureIterator { }; -void JavaCallArguments::verify(const methodHandle& method, BasicType return_type, - Thread *thread) { +void JavaCallArguments::verify(const methodHandle& method, BasicType return_type) { guarantee(method->size_of_parameters() == size_of_parameters(), "wrong no. of arguments pushed"); // Treat T_OBJECT and T_ARRAY as the same @@ -559,7 +597,11 @@ void JavaCallArguments::verify(const methodHandle& method, BasicType return_type // Check that oop information is correct Symbol* signature = method->signature(); - SignatureChekker sc(signature, return_type, method->is_static(),_is_oop, _value, thread); + SignatureChekker sc(signature, + return_type, + method->is_static(), + _value_state, + _value); sc.iterate_parameters(); sc.check_doing_return(true); sc.iterate_returntype(); diff --git a/hotspot/src/share/vm/runtime/javaCalls.hpp b/hotspot/src/share/vm/runtime/javaCalls.hpp index efe1f8b9813..e77abf7d36b 100644 --- a/hotspot/src/share/vm/runtime/javaCalls.hpp +++ b/hotspot/src/share/vm/runtime/javaCalls.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -80,11 +80,11 @@ class JavaCallArguments : public StackObj { _default_size = 8 // Must be at least # of arguments in JavaCalls methods }; - intptr_t _value_buffer [_default_size + 1]; - bool _is_oop_buffer[_default_size + 1]; + intptr_t _value_buffer [_default_size + 1]; + u_char _value_state_buffer[_default_size + 1]; intptr_t* _value; - bool* _is_oop; + u_char* _value_state; int _size; int _max_size; bool _start_at_zero; // Support late setting of receiver @@ -92,8 +92,8 @@ class JavaCallArguments : public StackObj { void initialize() { // Starts at first element to support set_receiver. - _value = &_value_buffer[1]; - _is_oop = &_is_oop_buffer[1]; + _value = &_value_buffer[1]; + _value_state = &_value_state_buffer[1]; _max_size = _default_size; _size = 0; @@ -101,6 +101,23 @@ class JavaCallArguments : public StackObj { JVMCI_ONLY(_alternative_target = NULL;) } + // Helper for push_oop and the like. The value argument is a + // "handle" that refers to an oop. We record the address of the + // handle rather than the designated oop. The handle is later + // resolved to the oop by parameters(). This delays the exposure of + // naked oops until it is GC-safe. + template + inline int push_oop_impl(T handle, int size) { + // JNITypes::put_obj expects an oop value, so we play fast and + // loose with the type system. The cast from handle type to oop + // *must* use a C-style cast. In a product build it performs a + // reinterpret_cast. In a debug build (more accurately, in a + // CHECK_UNHANDLED_OOPS build) it performs a static_cast, invoking + // the debug-only oop class's conversion from void* constructor. + JNITypes::put_obj((oop)handle, _value, size); // Updates size. + return size; // Return the updated size. + } + public: JavaCallArguments() { initialize(); } @@ -111,11 +128,12 @@ class JavaCallArguments : public StackObj { JavaCallArguments(int max_size) { if (max_size > _default_size) { - _value = NEW_RESOURCE_ARRAY(intptr_t, max_size + 1); - _is_oop = NEW_RESOURCE_ARRAY(bool, max_size + 1); + _value = NEW_RESOURCE_ARRAY(intptr_t, max_size + 1); + _value_state = NEW_RESOURCE_ARRAY(u_char, max_size + 1); - // Reserve room for potential receiver in value and is_oop - _value++; _is_oop++; + // Reserve room for potential receiver in value and state + _value++; + _value_state++; _max_size = max_size; _size = 0; @@ -136,25 +154,52 @@ class JavaCallArguments : public StackObj { } #endif - inline void push_oop(Handle h) { _is_oop[_size] = true; - JNITypes::put_obj((oop)h.raw_value(), _value, _size); } + // The possible values for _value_state elements. + enum { + value_state_primitive, + value_state_oop, + value_state_handle, + value_state_jobject, + value_state_limit + }; - inline void push_int(int i) { _is_oop[_size] = false; - JNITypes::put_int(i, _value, _size); } + inline void push_oop(Handle h) { + _value_state[_size] = value_state_handle; + _size = push_oop_impl(h.raw_value(), _size); + } - inline void push_double(double d) { _is_oop[_size] = false; _is_oop[_size + 1] = false; - JNITypes::put_double(d, _value, _size); } + inline void push_jobject(jobject h) { + _value_state[_size] = value_state_jobject; + _size = push_oop_impl(h, _size); + } - inline void push_long(jlong l) { _is_oop[_size] = false; _is_oop[_size + 1] = false; - JNITypes::put_long(l, _value, _size); } + inline void push_int(int i) { + _value_state[_size] = value_state_primitive; + JNITypes::put_int(i, _value, _size); + } - inline void push_float(float f) { _is_oop[_size] = false; - JNITypes::put_float(f, _value, _size); } + inline void push_double(double d) { + _value_state[_size] = value_state_primitive; + _value_state[_size + 1] = value_state_primitive; + JNITypes::put_double(d, _value, _size); + } + + inline void push_long(jlong l) { + _value_state[_size] = value_state_primitive; + _value_state[_size + 1] = value_state_primitive; + JNITypes::put_long(l, _value, _size); + } + + inline void push_float(float f) { + _value_state[_size] = value_state_primitive; + JNITypes::put_float(f, _value, _size); + } // receiver Handle receiver() { assert(_size > 0, "must at least be one argument"); - assert(_is_oop[0], "first argument must be an oop"); + assert(_value_state[0] == value_state_handle, + "first argument must be an oop"); assert(_value[0] != 0, "receiver must be not-null"); return Handle((oop*)_value[0], false); } @@ -162,11 +207,11 @@ class JavaCallArguments : public StackObj { void set_receiver(Handle h) { assert(_start_at_zero == false, "can only be called once"); _start_at_zero = true; - _is_oop--; + _value_state--; _value--; _size++; - _is_oop[0] = true; - _value[0] = (intptr_t)h.raw_value(); + _value_state[0] = value_state_handle; + push_oop_impl(h.raw_value(), 0); } // Converts all Handles to oops, and returns a reference to parameter vector @@ -174,7 +219,7 @@ class JavaCallArguments : public StackObj { int size_of_parameters() const { return _size; } // Verify that pushed arguments fits a given method - void verify(const methodHandle& method, BasicType return_type, Thread *thread); + void verify(const methodHandle& method, BasicType return_type); }; // All calls to Java have to go via JavaCalls. Sets up the stack frame diff --git a/hotspot/src/share/vm/runtime/jniHandles.cpp b/hotspot/src/share/vm/runtime/jniHandles.cpp index 679ade0eaca..f4aae3c20bf 100644 --- a/hotspot/src/share/vm/runtime/jniHandles.cpp +++ b/hotspot/src/share/vm/runtime/jniHandles.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,9 @@ #include "runtime/jniHandles.hpp" #include "runtime/mutexLocker.hpp" #include "runtime/thread.inline.hpp" +#if INCLUDE_ALL_GCS +#include "gc/g1/g1SATBCardTableModRefBS.hpp" +#endif JNIHandleBlock* JNIHandles::_global_handles = NULL; JNIHandleBlock* JNIHandles::_weak_global_handles = NULL; @@ -92,28 +95,48 @@ jobject JNIHandles::make_weak_global(Handle obj) { jobject res = NULL; if (!obj.is_null()) { // ignore null handles - MutexLocker ml(JNIGlobalHandle_lock); - assert(Universe::heap()->is_in_reserved(obj()), "sanity check"); - res = _weak_global_handles->allocate_handle(obj()); + { + MutexLocker ml(JNIGlobalHandle_lock); + assert(Universe::heap()->is_in_reserved(obj()), "sanity check"); + res = _weak_global_handles->allocate_handle(obj()); + } + // Add weak tag. + assert(is_ptr_aligned(res, weak_tag_alignment), "invariant"); + char* tptr = reinterpret_cast(res) + weak_tag_value; + res = reinterpret_cast(tptr); } else { CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops()); } return res; } +template +oop JNIHandles::resolve_jweak(jweak handle) { + assert(is_jweak(handle), "precondition"); + oop result = jweak_ref(handle); + result = guard_value(result); +#if INCLUDE_ALL_GCS + if (result != NULL && UseG1GC) { + G1SATBCardTableModRefBS::enqueue(result); + } +#endif // INCLUDE_ALL_GCS + return result; +} + +template oop JNIHandles::resolve_jweak(jweak); +template oop JNIHandles::resolve_jweak(jweak); void JNIHandles::destroy_global(jobject handle) { if (handle != NULL) { assert(is_global_handle(handle), "Invalid delete of global JNI handle"); - *((oop*)handle) = deleted_handle(); // Mark the handle as deleted, allocate will reuse it + jobject_ref(handle) = deleted_handle(); } } void JNIHandles::destroy_weak_global(jobject handle) { if (handle != NULL) { - assert(!CheckJNICalls || is_weak_global_handle(handle), "Invalid delete of weak global JNI handle"); - *((oop*)handle) = deleted_handle(); // Mark the handle as deleted, allocate will reuse it + jweak_ref(handle) = deleted_handle(); } } diff --git a/hotspot/src/share/vm/runtime/jniHandles.hpp b/hotspot/src/share/vm/runtime/jniHandles.hpp index ce37d940d7c..13e0e155740 100644 --- a/hotspot/src/share/vm/runtime/jniHandles.hpp +++ b/hotspot/src/share/vm/runtime/jniHandles.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,7 +40,28 @@ class JNIHandles : AllStatic { static JNIHandleBlock* _weak_global_handles; // First weak global handle block static oop _deleted_handle; // Sentinel marking deleted handles + inline static bool is_jweak(jobject handle); + inline static oop& jobject_ref(jobject handle); // NOT jweak! + inline static oop& jweak_ref(jobject handle); + + template inline static oop guard_value(oop value); + template inline static oop resolve_impl(jobject handle); + template static oop resolve_jweak(jweak handle); + public: + // Low tag bit in jobject used to distinguish a jweak. jweak is + // type equivalent to jobject, but there are places where we need to + // be able to distinguish jweak values from other jobjects, and + // is_weak_global_handle is unsuitable for performance reasons. To + // provide such a test we add weak_tag_value to the (aligned) byte + // address designated by the jobject to produce the corresponding + // jweak. Accessing the value of a jobject must account for it + // being a possibly offset jweak. + static const uintptr_t weak_tag_size = 1; + static const uintptr_t weak_tag_alignment = (1u << weak_tag_size); + static const uintptr_t weak_tag_mask = weak_tag_alignment - 1; + static const int weak_tag_value = 1; + // Resolve handle into oop inline static oop resolve(jobject handle); // Resolve externally provided handle into oop with some guards @@ -176,36 +197,85 @@ class JNIHandleBlock : public CHeapObj { #endif }; +inline bool JNIHandles::is_jweak(jobject handle) { + STATIC_ASSERT(weak_tag_size == 1); + STATIC_ASSERT(weak_tag_value == 1); + return (reinterpret_cast(handle) & weak_tag_mask) != 0; +} + +inline oop& JNIHandles::jobject_ref(jobject handle) { + assert(!is_jweak(handle), "precondition"); + return *reinterpret_cast(handle); +} + +inline oop& JNIHandles::jweak_ref(jobject handle) { + assert(is_jweak(handle), "precondition"); + char* ptr = reinterpret_cast(handle) - weak_tag_value; + return *reinterpret_cast(ptr); +} + +// external_guard is true if called from resolve_external_guard. +// Treat deleted (and possibly zapped) as NULL for external_guard, +// else as (asserted) error. +template +inline oop JNIHandles::guard_value(oop value) { + if (!external_guard) { + assert(value != badJNIHandle, "Pointing to zapped jni handle area"); + assert(value != deleted_handle(), "Used a deleted global handle"); + } else if ((value == badJNIHandle) || (value == deleted_handle())) { + value = NULL; + } + return value; +} + +// external_guard is true if called from resolve_external_guard. +template +inline oop JNIHandles::resolve_impl(jobject handle) { + assert(handle != NULL, "precondition"); + oop result; + if (is_jweak(handle)) { // Unlikely + result = resolve_jweak(handle); + } else { + result = jobject_ref(handle); + // Construction of jobjects canonicalize a null value into a null + // jobject, so for non-jweak the pointee should never be null. + assert(external_guard || result != NULL, + "Invalid value read from jni handle"); + result = guard_value(result); + } + return result; +} inline oop JNIHandles::resolve(jobject handle) { - oop result = (handle == NULL ? (oop)NULL : *(oop*)handle); - assert(result != NULL || (handle == NULL || !CheckJNICalls || is_weak_global_handle(handle)), "Invalid value read from jni handle"); - assert(result != badJNIHandle, "Pointing to zapped jni handle area"); + oop result = NULL; + if (handle != NULL) { + result = resolve_impl(handle); + } return result; -}; - +} +// Resolve some erroneous cases to NULL, rather than treating them as +// possibly unchecked errors. In particular, deleted handles are +// treated as NULL (though a deleted and later reallocated handle +// isn't detected). inline oop JNIHandles::resolve_external_guard(jobject handle) { - if (handle == NULL) return NULL; - oop result = *(oop*)handle; - if (result == NULL || result == badJNIHandle) return NULL; + oop result = NULL; + if (handle != NULL) { + result = resolve_impl(handle); + } return result; -}; - +} inline oop JNIHandles::resolve_non_null(jobject handle) { assert(handle != NULL, "JNI handle should not be null"); - oop result = *(oop*)handle; - assert(result != NULL, "Invalid value read from jni handle"); - assert(result != badJNIHandle, "Pointing to zapped jni handle area"); - // Don't let that private _deleted_handle object escape into the wild. - assert(result != deleted_handle(), "Used a deleted global handle."); + oop result = resolve_impl(handle); + assert(result != NULL, "NULL read from jni handle"); return result; -}; +} inline void JNIHandles::destroy_local(jobject handle) { if (handle != NULL) { - *((oop*)handle) = deleted_handle(); // Mark the handle as deleted, allocate will reuse it + jobject_ref(handle) = deleted_handle(); } } diff --git a/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp b/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp index 53fea3154b8..b9ac6a3ebf5 100644 --- a/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp +++ b/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright 2009, 2010 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -300,6 +300,7 @@ void SharkNativeWrapper::initialize(const char *name) { not_null, merge); builder()->SetInsertPoint(not_null); +#error Needs to be updated for tagged jweak; see JNIHandles. Value *unboxed_result = builder()->CreateLoad(result); builder()->CreateBr(merge); diff --git a/hotspot/test/runtime/jni/CallWithJNIWeak/CallWithJNIWeak.java b/hotspot/test/runtime/jni/CallWithJNIWeak/CallWithJNIWeak.java new file mode 100644 index 00000000000..3aaec5e4fd5 --- /dev/null +++ b/hotspot/test/runtime/jni/CallWithJNIWeak/CallWithJNIWeak.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8166188 + * @summary Test call of native function with JNI weak global ref. + * @modules java.base + * @run main/othervm/native CallWithJNIWeak + */ + +public class CallWithJNIWeak { + static { + System.loadLibrary("CallWithJNIWeak"); + } + + private static native void testJNIFieldAccessors(CallWithJNIWeak o); + + // The field initializations must be kept in sync with the JNI code + // which reads verifies the values of these fields. + private int i = 1; + private long j = 2; + private boolean z = true; + private char c = 'a'; + private short s = 3; + private float f = 1.0f; + private double d = 2.0; + private Object l; + + private CallWithJNIWeak() { + this.l = this; + } + + private native void weakReceiverTest0(); + private void weakReceiverTest() { + weakReceiverTest0(); + } + + private synchronized void synchonizedWeakReceiverTest() { + this.notifyAll(); + } + + + private static native void runTests(CallWithJNIWeak o); + + public static void main(String[] args) { + CallWithJNIWeak w = new CallWithJNIWeak(); + for (int i = 0; i < 20000; i++) { + runTests(w); + } + } +} diff --git a/hotspot/test/runtime/jni/CallWithJNIWeak/libCallWithJNIWeak.c b/hotspot/test/runtime/jni/CallWithJNIWeak/libCallWithJNIWeak.c new file mode 100644 index 00000000000..83a5784c1e8 --- /dev/null +++ b/hotspot/test/runtime/jni/CallWithJNIWeak/libCallWithJNIWeak.c @@ -0,0 +1,142 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +#include + +/* + * Class: CallWithJNIWeak + * Method: testJNIFieldAccessors + * Signature: (LCallWithJNIWeak;)V + */ +JNIEXPORT void JNICALL +Java_CallWithJNIWeak_testJNIFieldAccessors(JNIEnv *env, jclass clazz, jobject this) { + // Make sure that we have a weak reference to the receiver + + jweak self = (*env)->NewWeakGlobalRef(env, this); + + jclass this_class = (*env)->GetObjectClass(env, self); + + jclass exception = (*env)->FindClass(env, "java/lang/RuntimeException"); + + jfieldID id_i = (*env)->GetFieldID(env, this_class, "i", "I"); + jfieldID id_j = (*env)->GetFieldID(env, this_class, "j", "J"); + jfieldID id_z = (*env)->GetFieldID(env, this_class, "z", "Z"); + jfieldID id_c = (*env)->GetFieldID(env, this_class, "c", "C"); + jfieldID id_s = (*env)->GetFieldID(env, this_class, "s", "S"); + jfieldID id_f = (*env)->GetFieldID(env, this_class, "f", "F"); + jfieldID id_d = (*env)->GetFieldID(env, this_class, "d", "D"); + jfieldID id_l = (*env)->GetFieldID(env, this_class, "l", "Ljava/lang/Object;"); + jvalue v; + +#define CHECK(variable, expected) \ + do { \ + if ((variable) != (expected)) { \ + (*env)->ThrowNew(env, exception, #variable" != " #expected); \ + return; \ + } \ + } while(0) + + // The values checked below must be kept in sync with the Java source file. + + v.i = (*env)->GetIntField(env, self, id_i); + CHECK(v.i, 1); + + v.j = (*env)->GetLongField(env, self, id_j); + CHECK(v.j, 2); + + v.z = (*env)->GetBooleanField(env, self, id_z); + CHECK(v.z, JNI_TRUE); + + v.c = (*env)->GetCharField(env, self, id_c); + CHECK(v.c, 'a'); + + v.s = (*env)->GetShortField(env, self, id_s); + CHECK(v.s, 3); + + v.f = (*env)->GetFloatField(env, self, id_f); + CHECK(v.f, 1.0f); + + v.d = (*env)->GetDoubleField(env, self, id_d); + CHECK(v.d, 2.0); + +#undef CHECK + + v.l = (*env)->GetObjectField(env, self, id_l); + if (v.l == NULL) { + (*env)->ThrowNew(env, exception, "Object field was null"); + return; + } + { + jclass clz = (*env)->GetObjectClass(env, v.l); + if (!(*env)->IsSameObject(env, clazz, clz)) { + (*env)->ThrowNew(env, exception, "Bad object class"); + } + } + + (*env)->DeleteWeakGlobalRef(env, self); +} + +/* + * Class: CallWithJNIWeak + * Method: runTests + * Signature: (LCallWithJNIWeak;)V + */ +JNIEXPORT void JNICALL +Java_CallWithJNIWeak_runTests(JNIEnv *env, jclass clazz, jobject this) { + jweak that = (*env)->NewWeakGlobalRef(env, this); + { + jmethodID method = (*env)->GetStaticMethodID(env, + clazz, "testJNIFieldAccessors", "(LCallWithJNIWeak;)V"); + (*env)->CallStaticVoidMethod(env, clazz, method, that); + if ((*env)->ExceptionCheck(env)) { + return; + } + } + + { + jmethodID method = (*env)->GetMethodID(env, clazz, "weakReceiverTest", "()V"); + (*env)->CallVoidMethod(env, that, method); + if ((*env)->ExceptionCheck(env)) { + return; + } + } + + { + jmethodID method = (*env)->GetMethodID(env, clazz, "synchonizedWeakReceiverTest", "()V"); + (*env)->CallVoidMethod(env, that, method); + if ((*env)->ExceptionCheck(env)) { + return; + } + } + (*env)->DeleteWeakGlobalRef(env, that); +} + +/* + * Class: CallWithJNIWeak + * Method: weakReceiverTest0 + * Signature: ()V + */ +JNIEXPORT void JNICALL +Java_CallWithJNIWeak_weakReceiverTest0(JNIEnv *env, jobject obj) { + (*env)->GetObjectClass(env, obj); +} diff --git a/hotspot/test/runtime/jni/ReturnJNIWeak/ReturnJNIWeak.java b/hotspot/test/runtime/jni/ReturnJNIWeak/ReturnJNIWeak.java new file mode 100644 index 00000000000..6d581000fb8 --- /dev/null +++ b/hotspot/test/runtime/jni/ReturnJNIWeak/ReturnJNIWeak.java @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @bug 8166188 + * @requires vm.opt.ExplicitGCInvokesConcurrent != true + * @summary Test return of JNI weak global refs from native calls. + * @modules java.base + * @run main/othervm/native -Xint ReturnJNIWeak + * @run main/othervm/native -Xcomp ReturnJNIWeak + */ + +public final class ReturnJNIWeak { + + static { + System.loadLibrary("ReturnJNIWeak"); + } + + private static final class TestObject { + public final int value; + + public TestObject(int value) { + this.value = value; + } + } + + private static volatile TestObject testObject = null; + + private static native void registerObject(Object o); + private static native void unregisterObject(); + private static native Object getObject(); + + // Create the test object and record it both strongly and weakly. + private static void remember(int value) { + TestObject o = new TestObject(value); + registerObject(o); + testObject = o; + } + + // Remove both strong and weak references to the current test object. + private static void forget() { + unregisterObject(); + testObject = null; + } + + // Verify the weakly recorded object + private static void checkValue(int value) throws Exception { + Object o = getObject(); + if (o == null) { + throw new RuntimeException("Weak reference unexpectedly null"); + } + TestObject t = (TestObject)o; + if (t.value != value) { + throw new RuntimeException("Incorrect value"); + } + } + + // Verify we can create a weak reference and get it back. + private static void testSanity() throws Exception { + System.out.println("running testSanity"); + int value = 5; + try { + remember(value); + checkValue(value); + } finally { + forget(); + } + } + + // Verify weak ref value survives across collection if strong ref exists. + private static void testSurvival() throws Exception { + System.out.println("running testSurvival"); + int value = 10; + try { + remember(value); + checkValue(value); + System.gc(); + // Verify weak ref still has expected value. + checkValue(value); + } finally { + forget(); + } + } + + // Verify weak ref cleared if no strong ref exists. + private static void testClear() throws Exception { + System.out.println("running testClear"); + int value = 15; + try { + remember(value); + checkValue(value); + // Verify still good. + checkValue(value); + // Drop reference. + testObject = null; + System.gc(); + // Verify weak ref cleared as expected. + Object recorded = getObject(); + if (recorded != null) { + throw new RuntimeException("expected clear"); + } + } finally { + forget(); + } + } + + public static void main(String[] args) throws Exception { + testSanity(); + testSurvival(); + testClear(); + } +} diff --git a/hotspot/test/runtime/jni/ReturnJNIWeak/libReturnJNIWeak.c b/hotspot/test/runtime/jni/ReturnJNIWeak/libReturnJNIWeak.c new file mode 100644 index 00000000000..12d7ae92e6e --- /dev/null +++ b/hotspot/test/runtime/jni/ReturnJNIWeak/libReturnJNIWeak.c @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * Native support for ReturnJNIWeak test. + */ + +#include "jni.h" + +static jweak registered = NULL; + +JNIEXPORT void JNICALL +Java_ReturnJNIWeak_registerObject(JNIEnv* env, + jclass jclazz, + jobject value) { + // assert registered == NULL + registered = (*env)->NewWeakGlobalRef(env, value); +} + +JNIEXPORT void JNICALL +Java_ReturnJNIWeak_unregisterObject(JNIEnv* env, jclass jclazz) { + if (registered != NULL) { + (*env)->DeleteWeakGlobalRef(env, registered); + registered = NULL; + } +} + +JNIEXPORT jobject JNICALL +Java_ReturnJNIWeak_getObject(JNIEnv* env, jclass jclazz) { + // assert registered != NULL + return registered; +} From ada23c9fef9b6e1b3cd5d3f92da06d7d4da0ed19 Mon Sep 17 00:00:00 2001 From: Claes Redestad Date: Fri, 17 Feb 2017 18:12:53 +0100 Subject: [PATCH 267/447] 8175026: Capture build-time parameters to --generate-jli-classes Reviewed-by: mchung, ihse --- make/GenerateLinkOptData.gmk | 10 +++++++++- make/Images.gmk | 2 +- make/Main.gmk | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/make/GenerateLinkOptData.gmk b/make/GenerateLinkOptData.gmk index 43e388ddab4..f754ed36a8c 100644 --- a/make/GenerateLinkOptData.gmk +++ b/make/GenerateLinkOptData.gmk @@ -49,7 +49,7 @@ TARGETS += $(CLASSLIST_JAR) LINK_OPT_DIR := $(SUPPORT_OUTPUTDIR)/link_opt CLASSLIST_FILE := $(LINK_OPT_DIR)/classlist -JLI_TRACE_FILE := $(LINK_OPT_DIR)/jli_trace.out +JLI_TRACE_FILE := $(LINK_OPT_DIR)/default_jli_trace.txt # If an external buildjdk has been supplied, we don't build a separate interim # image, so just use the external build jdk instead. @@ -83,6 +83,14 @@ $(eval $(call SetupCopyFiles, COPY_CLASSLIST, \ TARGETS += $(COPY_CLASSLIST) +# Copy the default_jli_trace.txt file into jdk.jlink +$(eval $(call SetupCopyFiles, COPY_JLI_TRACE, \ + FILES := $(JLI_TRACE_FILE), \ + DEST := $(JDK_OUTPUTDIR)/modules/jdk.jlink/jdk/tools/jlink/internal/plugins, \ +)) + +TARGETS += $(COPY_JLI_TRACE) + ################################################################################ all: $(TARGETS) diff --git a/make/Images.gmk b/make/Images.gmk index 09740cb53d9..2272b427dab 100644 --- a/make/Images.gmk +++ b/make/Images.gmk @@ -105,7 +105,7 @@ JLINK_ORDER_RESOURCES := **module-info.class JLINK_JLI_CLASSES := ifeq ($(ENABLE_GENERATE_CLASSLIST), true) JLINK_ORDER_RESOURCES += @$(SUPPORT_OUTPUTDIR)/link_opt/classlist - JLINK_JLI_CLASSES := --generate-jli-classes=@$(SUPPORT_OUTPUTDIR)/link_opt/jli_trace.out + JLINK_JLI_CLASSES := --generate-jli-classes=@$(SUPPORT_OUTPUTDIR)/link_opt/default_jli_trace.txt endif JLINK_ORDER_RESOURCES += \ /java.base/java/** \ diff --git a/make/Main.gmk b/make/Main.gmk index 18cac690f96..280673e5f4e 100644 --- a/make/Main.gmk +++ b/make/Main.gmk @@ -727,7 +727,7 @@ else generate-link-opt-data: buildtools-jdk # The generated classlist needs to go into java.base-jmod. - java.base-jmod jdk-image jre-image: generate-link-opt-data + java.base-jmod jdk.jlink-jmod jdk-image jre-image: generate-link-opt-data endif release-file: create-source-revision-tracker From 179e55625baa293c7b508828bedfd29896535197 Mon Sep 17 00:00:00 2001 From: Claes Redestad Date: Fri, 17 Feb 2017 18:12:55 +0100 Subject: [PATCH 268/447] 8175026: Capture build-time parameters to --generate-jli-classes Reviewed-by: mchung --- .../plugins/GenerateJLIClassesPlugin.java | 173 +++++++++++++----- .../tools/jlink/resources/plugins.properties | 18 +- 2 files changed, 138 insertions(+), 53 deletions(-) diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java index 00a90f2f13a..99771fe4965 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java @@ -24,14 +24,17 @@ */ package jdk.tools.jlink.internal.plugins; +import java.io.BufferedReader; import java.io.File; import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; import java.lang.invoke.MethodType; +import java.lang.module.ModuleDescriptor; import java.nio.file.Files; -import java.util.ArrayList; import java.util.EnumSet; -import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.Set; import java.util.TreeMap; import java.util.TreeSet; @@ -51,8 +54,13 @@ import jdk.tools.jlink.plugin.Plugin; public final class GenerateJLIClassesPlugin implements Plugin { private static final String NAME = "generate-jli-classes"; + private static final String IGNORE_VERSION = "ignore-version"; private static final String DESCRIPTION = PluginsResourceBundle.getDescription(NAME); + private static final String IGNORE_VERSION_WARNING = NAME + ".ignore.version.warn"; + private static final String VERSION_MISMATCH_WARNING = NAME + ".version.mismatch.warn"; + + private static final String DEFAULT_TRACE_FILE = "default_jli_trace.txt"; private static final String DIRECT_HOLDER = "java/lang/invoke/DirectMethodHandle$Holder"; private static final String DMH_INVOKE_VIRTUAL = "invokeVirtual"; @@ -69,11 +77,15 @@ public final class GenerateJLIClassesPlugin implements Plugin { private static final JavaLangInvokeAccess JLIA = SharedSecrets.getJavaLangInvokeAccess(); - Set speciesTypes; + Set speciesTypes = Set.of(); - Set invokerTypes; + Set invokerTypes = Set.of(); - Map> dmhMethods; + Map> dmhMethods = Map.of(); + + String mainArgument; + + boolean ignoreVersion; public GenerateJLIClassesPlugin() { } @@ -157,69 +169,101 @@ public final class GenerateJLIClassesPlugin implements Plugin { @Override public void configure(Map config) { - String mainArgument = config.get(NAME); + mainArgument = config.get(NAME); + ignoreVersion = Boolean.parseBoolean(config.get(IGNORE_VERSION)); + } + public void initialize(ResourcePool in) { // Start with the default configuration - Set defaultBMHSpecies = defaultSpecies(); - // Expand BMH species signatures - defaultBMHSpecies = defaultBMHSpecies.stream() + speciesTypes = defaultSpecies().stream() .map(type -> expandSignature(type)) .collect(Collectors.toSet()); - Set defaultInvokerTypes = defaultInvokers(); - validateMethodTypes(defaultInvokerTypes); + invokerTypes = defaultInvokers(); + validateMethodTypes(invokerTypes); - Map> defaultDmhMethods = defaultDMHMethods(); - for (Set dmhMethodTypes : defaultDmhMethods.values()) { + dmhMethods = defaultDMHMethods(); + for (Set dmhMethodTypes : dmhMethods.values()) { validateMethodTypes(dmhMethodTypes); } // Extend the default configuration with the contents in the supplied - // input file + // input file - if none was supplied we look for the default file if (mainArgument == null || !mainArgument.startsWith("@")) { - speciesTypes = defaultBMHSpecies; - invokerTypes = defaultInvokerTypes; - dmhMethods = defaultDmhMethods; + try (InputStream traceFile = + this.getClass().getResourceAsStream(DEFAULT_TRACE_FILE)) { + if (traceFile != null) { + readTraceConfig( + new BufferedReader( + new InputStreamReader(traceFile)).lines()); + } + } catch (Exception e) { + throw new PluginException("Couldn't read " + DEFAULT_TRACE_FILE, e); + } } else { File file = new File(mainArgument.substring(1)); if (file.exists()) { - // Use TreeSet/TreeMap to keep things sorted in a deterministic - // order to avoid scrambling the layout on small changes and to - // ease finding methods in the generated code - speciesTypes = new TreeSet<>(defaultBMHSpecies); - invokerTypes = new TreeSet<>(defaultInvokerTypes); - dmhMethods = new TreeMap<>(); - for (Map.Entry> entry : defaultDmhMethods.entrySet()) { - dmhMethods.put(entry.getKey(), new TreeSet<>(entry.getValue())); - } - fileLines(file) - .map(line -> line.split(" ")) - .forEach(parts -> { - switch (parts[0]) { - case "[BMH_RESOLVE]": - speciesTypes.add(expandSignature(parts[1])); - break; - case "[LF_RESOLVE]": - String methodType = parts[3]; - validateMethodType(methodType); - if (parts[1].contains("Invokers")) { - invokerTypes.add(methodType); - } else if (parts[1].contains("DirectMethodHandle")) { - String dmh = parts[2]; - // ignore getObject etc for now (generated - // by default) - if (DMH_METHOD_TYPE_MAP.containsKey(dmh)) { - addDMHMethodType(dmh, methodType); - } - } - break; - default: break; // ignore - } - }); + readTraceConfig(fileLines(file)); } } } + private boolean checkVersion(Runtime.Version linkedVersion) { + Runtime.Version baseVersion = Runtime.version(); + if (baseVersion.major() != linkedVersion.major() || + baseVersion.minor() != linkedVersion.minor()) { + return false; + } + return true; + } + + private Runtime.Version getLinkedVersion(ResourcePool in) { + ModuleDescriptor.Version version = in.moduleView() + .findModule("java.base") + .get() + .descriptor() + .version() + .orElseThrow(() -> new PluginException("No version defined in " + + "the java.base being linked")); + return Runtime.Version.parse(version.toString()); + } + + private void readTraceConfig(Stream lines) { + // Use TreeSet/TreeMap to keep things sorted in a deterministic + // order to avoid scrambling the layout on small changes and to + // ease finding methods in the generated code + speciesTypes = new TreeSet<>(speciesTypes); + invokerTypes = new TreeSet<>(invokerTypes); + TreeMap> newDMHMethods = new TreeMap<>(); + for (Map.Entry> entry : dmhMethods.entrySet()) { + newDMHMethods.put(entry.getKey(), new TreeSet<>(entry.getValue())); + } + dmhMethods = newDMHMethods; + lines.map(line -> line.split(" ")) + .forEach(parts -> { + switch (parts[0]) { + case "[BMH_RESOLVE]": + speciesTypes.add(expandSignature(parts[1])); + break; + case "[LF_RESOLVE]": + String methodType = parts[3]; + validateMethodType(methodType); + if (parts[1].contains("Invokers")) { + invokerTypes.add(methodType); + } else if (parts[1].contains("DirectMethodHandle")) { + String dmh = parts[2]; + // ignore getObject etc for now (generated + // by default) + if (DMH_METHOD_TYPE_MAP.containsKey(dmh)) { + addDMHMethodType(dmh, methodType); + } + } + break; + default: break; // ignore + } + }); + } + private void addDMHMethodType(String dmh, String methodType) { validateMethodType(methodType); Set methodTypes = dmhMethods.get(dmh); @@ -265,6 +309,25 @@ public final class GenerateJLIClassesPlugin implements Plugin { @Override public ResourcePool transform(ResourcePool in, ResourcePoolBuilder out) { + if (ignoreVersion) { + System.out.println( + PluginsResourceBundle + .getMessage(IGNORE_VERSION_WARNING)); + } else if (!checkVersion(getLinkedVersion(in))) { + // The linked images are not version compatible + if (mainArgument != null) { + // Log a mismatch warning if an argument was specified + System.out.println( + PluginsResourceBundle + .getMessage(VERSION_MISMATCH_WARNING, + getLinkedVersion(in), + Runtime.version())); + } + in.transformAndCopy(entry -> entry, out); + return out.build(); + } + + initialize(in); // Copy all but DMH_ENTRY to out in.transformAndCopy(entry -> { // filter out placeholder entries @@ -277,8 +340,18 @@ public final class GenerateJLIClassesPlugin implements Plugin { return entry; } }, out); + + // Generate BMH Species classes speciesTypes.forEach(types -> generateBMHClass(types, out)); + + // Generate LambdaForm Holder classes generateHolderClasses(out); + + // Let it go + speciesTypes = null; + invokerTypes = null; + dmhMethods = null; + return out.build(); } diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties index 2ba726f6350..819c3530fc9 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties @@ -75,11 +75,23 @@ where is \"man\" or \"headers". exclude-jmod-section.description=\ Specify a JMOD section to exclude -generate-jli-classes.argument=@filename +generate-jli-classes.argument=@filename[:ignore-version=] generate-jli-classes.description=\ -Takes a file hinting to jlink what java.lang.invoke classes to pre-generate. If\n\ -this flag is not specified a default set of classes will be generated. +Specify a file listing the java.lang.invoke classes to pre-generate. \n\ +By default, this plugin may use a builtin list of classes to pre-generate. \n\ +If this plugin runs on a different runtime version than the image being \n\ +created then code generation will be disabled by default to guarantee \n\ +correctness - add ignore-version=true to override this. + +generate-jli-classes.ignore.version.warn=\ +WARNING: --generate-jli-classes set to ignore version mismatch between \n\ +JDK running jlink and target image. + +generate-jli-classes.version.mismatch.warn=\ +WARNING: Pre-generation of JLI classes is only supported when linking \n\ +the same version of java.base ({0}) as the JDK running jlink ({1}), \n\ +class generation skipped - specify ignore-version to override. system-modules.argument=retainModuleTarget From e309127c9edf03156d5a22937fc5896ad5565b03 Mon Sep 17 00:00:00 2001 From: Vladimir Kozlov Date: Fri, 17 Feb 2017 21:06:59 -0800 Subject: [PATCH 269/447] 8175052: [AOT] jaotc does not accept file name with .class Reviewed-by: iveresov --- .../classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Main.java | 4 +++- .../src/jdk/tools/jaotc/collect/ClassSearch.java | 2 +- .../src/jdk/tools/jaotc/collect/SearchFor.java | 6 +++--- .../jaotc/collect/classname/ClassNameSourceProvider.java | 6 +++++- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Main.java b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Main.java index a98dc8d2d81..933e91acaf4 100644 --- a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Main.java +++ b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Main.java @@ -625,7 +625,9 @@ public class Main implements LogPrinter { private void reportError(Throwable e) { log.println("Error: " + e.getMessage()); - e.printStackTrace(log); + if (options.info) { + e.printStackTrace(log); + } log.flush(); } diff --git a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/ClassSearch.java b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/ClassSearch.java index 3fd63b2c0b8..603da038e80 100644 --- a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/ClassSearch.java +++ b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/ClassSearch.java @@ -77,7 +77,7 @@ public class ClassSearch { } if (found == null) { - throw new InternalError("Failed to find: " + searchFor.toString()); + throw new InternalError("Failed to find " + searchFor.getType() + " file: " + searchFor.getName()); } return found; } diff --git a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/SearchFor.java b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/SearchFor.java index 49e0cdd9945..cf6a583ae61 100644 --- a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/SearchFor.java +++ b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/SearchFor.java @@ -27,7 +27,7 @@ public class SearchFor { private final String type; public SearchFor(String name) { - this(name, "unknown"); + this(name, ""); } public SearchFor(String name, String type) { @@ -36,7 +36,7 @@ public class SearchFor { } public boolean isUnknown() { - return "unknown".equals(type); + return "".equals(type); } public String getType() { @@ -49,6 +49,6 @@ public class SearchFor { @Override public String toString() { - return type + ":" + name; + return type + ": " + name; } } diff --git a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/classname/ClassNameSourceProvider.java b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/classname/ClassNameSourceProvider.java index b5bc2804ed4..e46060848fa 100644 --- a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/classname/ClassNameSourceProvider.java +++ b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/classname/ClassNameSourceProvider.java @@ -31,7 +31,7 @@ import java.nio.file.Path; import java.nio.file.Paths; public class ClassNameSourceProvider implements SourceProvider { - public final static String TYPE = "classname"; + public final static String TYPE = "class"; private final ClassLoader classLoader; public ClassNameSourceProvider(FileSupport fileSupport) { @@ -47,6 +47,10 @@ public class ClassNameSourceProvider implements SourceProvider { @Override public ClassSource findSource(String name, SearchPath searchPath) { + Path path = Paths.get(name); + if (ClassSource.pathIsClassFile(path)) { + name = ClassSource.makeClassName(path); + } try { classLoader.loadClass(name); return new ClassNameSource(name, classLoader); From 9b234db3916386081a27c3b6a898134312d0180c Mon Sep 17 00:00:00 2001 From: Igor Veresov Date: Fri, 17 Feb 2017 21:54:30 -0800 Subject: [PATCH 270/447] 8175217: [AOT] Fix suite.py after module renaming Fix paths in suite.py Reviewed-by: kvn --- hotspot/.mx.jvmci/suite.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/hotspot/.mx.jvmci/suite.py b/hotspot/.mx.jvmci/suite.py index 359c2b2ae3a..9415623d92b 100644 --- a/hotspot/.mx.jvmci/suite.py +++ b/hotspot/.mx.jvmci/suite.py @@ -43,7 +43,7 @@ suite = { # ------------- JVMCI:Service ------------- "jdk.vm.ci.services" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "javaCompliance" : "9", "workingSets" : "API,JVMCI", @@ -52,7 +52,7 @@ suite = { # ------------- JVMCI:API ------------- "jdk.vm.ci.common" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "checkstyle" : "jdk.vm.ci.services", "javaCompliance" : "9", @@ -60,7 +60,7 @@ suite = { }, "jdk.vm.ci.meta" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "checkstyle" : "jdk.vm.ci.services", "javaCompliance" : "9", @@ -68,7 +68,7 @@ suite = { }, "jdk.vm.ci.code" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "dependencies" : ["jdk.vm.ci.meta"], "checkstyle" : "jdk.vm.ci.services", @@ -92,7 +92,7 @@ suite = { }, "jdk.vm.ci.runtime" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "dependencies" : [ "jdk.vm.ci.code", @@ -119,7 +119,7 @@ suite = { # ------------- JVMCI:HotSpot ------------- "jdk.vm.ci.aarch64" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "dependencies" : ["jdk.vm.ci.code"], "checkstyle" : "jdk.vm.ci.services", @@ -128,7 +128,7 @@ suite = { }, "jdk.vm.ci.amd64" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "dependencies" : ["jdk.vm.ci.code"], "checkstyle" : "jdk.vm.ci.services", @@ -137,7 +137,7 @@ suite = { }, "jdk.vm.ci.sparc" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "dependencies" : ["jdk.vm.ci.code"], "checkstyle" : "jdk.vm.ci.services", @@ -146,7 +146,7 @@ suite = { }, "jdk.vm.ci.hotspot" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "dependencies" : [ "jdk.vm.ci.common", @@ -175,7 +175,7 @@ suite = { }, "jdk.vm.ci.hotspot.aarch64" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "dependencies" : [ "jdk.vm.ci.aarch64", @@ -187,7 +187,7 @@ suite = { }, "jdk.vm.ci.hotspot.amd64" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "dependencies" : [ "jdk.vm.ci.amd64", @@ -199,7 +199,7 @@ suite = { }, "jdk.vm.ci.hotspot.sparc" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "sourceDirs" : ["src"], "dependencies" : [ "jdk.vm.ci.sparc", @@ -221,12 +221,12 @@ suite = { # ------------- Distributions ------------- "JVMCI_SERVICES" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "dependencies" : ["jdk.vm.ci.services"], }, "JVMCI_API" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "dependencies" : [ "jdk.vm.ci.runtime", "jdk.vm.ci.common", @@ -240,7 +240,7 @@ suite = { }, "JVMCI_HOTSPOT" : { - "subDir" : "src/jdk.vm.ci/share/classes", + "subDir" : "src/jdk.internal.vm.ci/share/classes", "dependencies" : [ "jdk.vm.ci.hotspot.aarch64", "jdk.vm.ci.hotspot.amd64", From e3af634a14f3d119d80253deef745cd8b815ce35 Mon Sep 17 00:00:00 2001 From: Amy Lu Date: Mon, 20 Feb 2017 15:32:37 +0800 Subject: [PATCH 271/447] 8175240: Problem list org/omg/CORBA/OrbPropertiesTest.java Reviewed-by: alanb --- jdk/test/ProblemList.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt index 15dc8b7fe0b..d57954149a2 100644 --- a/jdk/test/ProblemList.txt +++ b/jdk/test/ProblemList.txt @@ -310,4 +310,6 @@ javax/rmi/PortableRemoteObject/8146975/RmiIiopReturnValueTest.java 8169737 linux javax/xml/ws/clientjar/TestWsImport.java 8173317 generic-all +org/omg/CORBA/OrbPropertiesTest.java 8175177 generic-all + ############################################################################ From fb7b579de9809189149b78fee98d0f3550e58c7c Mon Sep 17 00:00:00 2001 From: Manajit Halder Date: Mon, 20 Feb 2017 15:59:25 +0530 Subject: [PATCH 272/447] 7119774: [macosx] test ComponentMousePositionTest sometimes fail on Mac Reviewed-by: serb, arapte --- .../MouseInfo/ComponentMousePositionTest.java | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 jdk/test/java/awt/MouseInfo/ComponentMousePositionTest.java diff --git a/jdk/test/java/awt/MouseInfo/ComponentMousePositionTest.java b/jdk/test/java/awt/MouseInfo/ComponentMousePositionTest.java new file mode 100644 index 00000000000..f3ecef92828 --- /dev/null +++ b/jdk/test/java/awt/MouseInfo/ComponentMousePositionTest.java @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + + /* + @test + @key headful + @bug 4009555 7119774 + @summary Test for Component's method getMousePosition() + @run main ComponentMousePositionTest + */ +import java.awt.Frame; +import java.awt.Panel; +import java.awt.Button; +import java.awt.Dimension; +import java.awt.Point; +import java.awt.Robot; +import java.awt.AWTException; + +public class ComponentMousePositionTest { + + public void changeMousePosition() { + Frame frame = new Frame(); + Panel panel = new Panel(); + Button button = new Button("Button"); + Button overlappedButton = new Button("Overlapped button"); + Dimension BUTTON_DIMENSION = new Dimension(100, 100); + Dimension FRAME_DIMENSION = new Dimension(200, 200); + Point POINT_WITHOUT_COMPONENTS = new Point(10, 10); + Point FIRST_BUTTON_LOCATION = new Point(20, 20); + Point SECOND_BUTTON_LOCATION = new Point(30, 30); + + button.setSize(BUTTON_DIMENSION); + button.setLocation(FIRST_BUTTON_LOCATION); + overlappedButton.setSize(BUTTON_DIMENSION); + overlappedButton.setLocation(SECOND_BUTTON_LOCATION); + + panel.setLayout(null); + panel.add(button); + panel.add(overlappedButton); + frame.add(panel); + Robot robot; + + try { + robot = new Robot(); + frame.setSize(FRAME_DIMENSION); + frame.setVisible(true); + robot.delay(2000); + + Point p = button.getLocationOnScreen(); + robot.mouseMove(p.x + button.getWidth() + / 2, p.y + button.getHeight() / 2); + robot.waitForIdle(); + + Point pMousePosition = button.getMousePosition(); + if (pMousePosition == null) { + throw new RuntimeException("Test failed: " + + "Component.getMousePosition() returned null result " + + "inside Component"); + } + + if (pMousePosition.x != button.getWidth() / 2 + || pMousePosition.y != button.getHeight() / 2) { + throw new RuntimeException("Test failed: " + + "Component.getMousePosition() returned incorrect " + + "result inside Component"); + } + + pMousePosition = overlappedButton.getMousePosition(); + if (pMousePosition != null) { + throw new RuntimeException("Test failed: Overlapped component " + + "did not return null result when a pointer was inside" + + " the components bounds."); + } + robot.mouseMove(panel.getLocationOnScreen().x + + POINT_WITHOUT_COMPONENTS.x, + panel.getLocationOnScreen().y + + POINT_WITHOUT_COMPONENTS.y); + robot.waitForIdle(); + + pMousePosition = button.getMousePosition(); + if (pMousePosition != null) { + throw new RuntimeException("FAILED: " + + "Component.getMousePosition() returned non-null " + + "results outside Component"); + } + + } catch (AWTException e) { + throw new RuntimeException("FAILED: AWTException by Robot" + e); + } finally { + frame.dispose(); + } + } + + public static void main(String args[]) { + ComponentMousePositionTest mousePos = new ComponentMousePositionTest(); + mousePos.changeMousePosition(); + } +} From e477609f73e8a9ab82aaf6c8f436ea001694374e Mon Sep 17 00:00:00 2001 From: Kevin Walls Date: Tue, 21 Feb 2017 02:27:01 -0800 Subject: [PATCH 273/447] 8162795: [REDO] MemberNameTable doesn't purge stale entries Re-application of the change in JDK-8152271. Reviewed-by: coleenp, sspitsyn --- .../src/share/vm/classfile/javaClasses.cpp | 11 ++++- .../src/share/vm/classfile/javaClasses.hpp | 4 +- hotspot/src/share/vm/oops/instanceKlass.cpp | 11 +++-- hotspot/src/share/vm/oops/instanceKlass.hpp | 4 +- hotspot/src/share/vm/prims/jvm.cpp | 4 +- hotspot/src/share/vm/prims/methodHandles.cpp | 41 ++++++++++++++----- hotspot/src/share/vm/prims/methodHandles.hpp | 7 ++-- 7 files changed, 59 insertions(+), 23 deletions(-) diff --git a/hotspot/src/share/vm/classfile/javaClasses.cpp b/hotspot/src/share/vm/classfile/javaClasses.cpp index 84e618a4a50..62f27770365 100644 --- a/hotspot/src/share/vm/classfile/javaClasses.cpp +++ b/hotspot/src/share/vm/classfile/javaClasses.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -3247,6 +3247,15 @@ void java_lang_invoke_MemberName::set_vmindex(oop mname, intptr_t index) { mname->address_field_put(_vmindex_offset, (address) index); } +bool java_lang_invoke_MemberName::equals(oop mn1, oop mn2) { + if (mn1 == mn2) { + return true; + } + return (vmtarget(mn1) == vmtarget(mn2) && flags(mn1) == flags(mn2) && + vmindex(mn1) == vmindex(mn2) && + clazz(mn1) == clazz(mn2)); +} + oop java_lang_invoke_LambdaForm::vmentry(oop lform) { assert(is_instance(lform), "wrong type"); return lform->obj_field(_vmentry_offset); diff --git a/hotspot/src/share/vm/classfile/javaClasses.hpp b/hotspot/src/share/vm/classfile/javaClasses.hpp index 52dfe4590ab..fc934b89791 100644 --- a/hotspot/src/share/vm/classfile/javaClasses.hpp +++ b/hotspot/src/share/vm/classfile/javaClasses.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1086,6 +1086,8 @@ class java_lang_invoke_MemberName: AllStatic { static int flags_offset_in_bytes() { return _flags_offset; } static int vmtarget_offset_in_bytes() { return _vmtarget_offset; } static int vmindex_offset_in_bytes() { return _vmindex_offset; } + + static bool equals(oop mt1, oop mt2); }; diff --git a/hotspot/src/share/vm/oops/instanceKlass.cpp b/hotspot/src/share/vm/oops/instanceKlass.cpp index 41f5fd143a8..c0e97c58227 100644 --- a/hotspot/src/share/vm/oops/instanceKlass.cpp +++ b/hotspot/src/share/vm/oops/instanceKlass.cpp @@ -2806,7 +2806,7 @@ nmethod* InstanceKlass::lookup_osr_nmethod(const Method* m, int bci, int comp_le return NULL; } -bool InstanceKlass::add_member_name(Handle mem_name) { +oop InstanceKlass::add_member_name(Handle mem_name, bool intern) { jweak mem_name_wref = JNIHandles::make_weak_global(mem_name); MutexLocker ml(MemberNameTable_lock); DEBUG_ONLY(NoSafepointVerifier nsv); @@ -2816,7 +2816,7 @@ bool InstanceKlass::add_member_name(Handle mem_name) { // is called! Method* method = (Method*)java_lang_invoke_MemberName::vmtarget(mem_name()); if (method->is_obsolete()) { - return false; + return NULL; } else if (method->is_old()) { // Replace method with redefined version java_lang_invoke_MemberName::set_vmtarget(mem_name(), method_with_idnum(method->method_idnum())); @@ -2825,8 +2825,11 @@ bool InstanceKlass::add_member_name(Handle mem_name) { if (_member_names == NULL) { _member_names = new (ResourceObj::C_HEAP, mtClass) MemberNameTable(idnum_allocated_count()); } - _member_names->add_member_name(mem_name_wref); - return true; + if (intern) { + return _member_names->find_or_add_member_name(mem_name_wref); + } else { + return _member_names->add_member_name(mem_name_wref); + } } // ----------------------------------------------------------------------------------------------------- diff --git a/hotspot/src/share/vm/oops/instanceKlass.hpp b/hotspot/src/share/vm/oops/instanceKlass.hpp index 015a86c7e9c..1756b9fc86d 100644 --- a/hotspot/src/share/vm/oops/instanceKlass.hpp +++ b/hotspot/src/share/vm/oops/instanceKlass.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1359,7 +1359,7 @@ public: // JSR-292 support MemberNameTable* member_names() { return _member_names; } void set_member_names(MemberNameTable* member_names) { _member_names = member_names; } - bool add_member_name(Handle member_name); + oop add_member_name(Handle member_name, bool intern); public: // JVMTI support diff --git a/hotspot/src/share/vm/prims/jvm.cpp b/hotspot/src/share/vm/prims/jvm.cpp index 2955463852e..71b0ea3e2e2 100644 --- a/hotspot/src/share/vm/prims/jvm.cpp +++ b/hotspot/src/share/vm/prims/jvm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -684,7 +684,7 @@ JVM_ENTRY(jobject, JVM_Clone(JNIEnv* env, jobject handle)) // This can safepoint and redefine method, so need both new_obj and method // in a handle, for two different reasons. new_obj can move, method can be // deleted if nothing is using it on the stack. - m->method_holder()->add_member_name(new_obj()); + m->method_holder()->add_member_name(new_obj(), false); } } diff --git a/hotspot/src/share/vm/prims/methodHandles.cpp b/hotspot/src/share/vm/prims/methodHandles.cpp index abde0dd02ed..c25b306a7f0 100644 --- a/hotspot/src/share/vm/prims/methodHandles.cpp +++ b/hotspot/src/share/vm/prims/methodHandles.cpp @@ -176,7 +176,7 @@ oop MethodHandles::init_MemberName(Handle mname, Handle target) { return NULL; } -oop MethodHandles::init_method_MemberName(Handle mname, CallInfo& info) { +oop MethodHandles::init_method_MemberName(Handle mname, CallInfo& info, bool intern) { assert(info.resolved_appendix().is_null(), "only normal methods here"); methodHandle m = info.resolved_method(); assert(m.not_null(), "null method handle"); @@ -277,13 +277,7 @@ oop MethodHandles::init_method_MemberName(Handle mname, CallInfo& info) { // If relevant, the vtable or itable value is stored as vmindex. // This is done eagerly, since it is readily available without // constructing any new objects. - // TO DO: maybe intern mname_oop - if (m->method_holder()->add_member_name(mname)) { - return mname(); - } else { - // Redefinition caused this to fail. Return NULL (and an exception?) - return NULL; - } + return m->method_holder()->add_member_name(mname, intern); } oop MethodHandles::init_field_MemberName(Handle mname, fieldDescriptor& fd, bool is_setter) { @@ -973,7 +967,9 @@ int MethodHandles::find_MemberNames(KlassHandle k, if (!java_lang_invoke_MemberName::is_instance(result())) return -99; // caller bug! CallInfo info(m); - oop saved = MethodHandles::init_method_MemberName(result, info); + // Since this is going through the methods to create MemberNames, don't search + // for matching methods already in the table + oop saved = MethodHandles::init_method_MemberName(result, info, /*intern*/false); if (saved != result()) results->obj_at_put(rfill-1, saved); // show saved instance to user } else if (++overflow >= overflow_limit) { @@ -1054,9 +1050,34 @@ MemberNameTable::~MemberNameTable() { } } -void MemberNameTable::add_member_name(jweak mem_name_wref) { +oop MemberNameTable::add_member_name(jweak mem_name_wref) { assert_locked_or_safepoint(MemberNameTable_lock); this->push(mem_name_wref); + return JNIHandles::resolve(mem_name_wref); +} + +oop MemberNameTable::find_or_add_member_name(jweak mem_name_wref) { + assert_locked_or_safepoint(MemberNameTable_lock); + oop new_mem_name = JNIHandles::resolve(mem_name_wref); + + // Find matching member name in the list. + // This is linear because these are short lists. + int len = this->length(); + int new_index = len; + for (int idx = 0; idx < len; idx++) { + oop mname = JNIHandles::resolve(this->at(idx)); + if (mname == NULL) { + new_index = idx; + continue; + } + if (java_lang_invoke_MemberName::equals(new_mem_name, mname)) { + JNIHandles::destroy_weak_global(mem_name_wref); + return mname; + } + } + // Not found, push the new one, or reuse empty slot + this->at_put_grow(new_index, mem_name_wref); + return new_mem_name; } #if INCLUDE_JVMTI diff --git a/hotspot/src/share/vm/prims/methodHandles.hpp b/hotspot/src/share/vm/prims/methodHandles.hpp index 4a825464fb8..3a5e90305fe 100644 --- a/hotspot/src/share/vm/prims/methodHandles.hpp +++ b/hotspot/src/share/vm/prims/methodHandles.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -66,7 +66,7 @@ class MethodHandles: AllStatic { static Handle new_MemberName(TRAPS); // must be followed by init_MemberName static oop init_MemberName(Handle mname_h, Handle target_h); // compute vmtarget/vmindex from target static oop init_field_MemberName(Handle mname_h, fieldDescriptor& fd, bool is_setter = false); - static oop init_method_MemberName(Handle mname_h, CallInfo& info); + static oop init_method_MemberName(Handle mname_h, CallInfo& info, bool intern = true); static int method_ref_kind(Method* m, bool do_dispatch_if_possible = true); static int find_MemberNames(KlassHandle k, Symbol* name, Symbol* sig, int mflags, KlassHandle caller, @@ -235,7 +235,8 @@ class MemberNameTable : public GrowableArray { public: MemberNameTable(int methods_cnt); ~MemberNameTable(); - void add_member_name(jweak mem_name_ref); + oop add_member_name(jweak mem_name_ref); + oop find_or_add_member_name(jweak mem_name_ref); #if INCLUDE_JVMTI // RedefineClasses() API support: From 4a259fb5ddc45821f03f2869c2519de7cc9e38c4 Mon Sep 17 00:00:00 2001 From: Sergey Kuksenko Date: Tue, 21 Feb 2017 11:08:34 +0000 Subject: [PATCH 274/447] 8175274: Fix httpclient asynchronous usage Reviewed-by: dfuchs, michaelm --- .../classes/jdk/incubator/http/Exchange.java | 65 ++--- .../jdk/incubator/http/ExchangeImpl.java | 48 +--- .../jdk/incubator/http/Http1Exchange.java | 16 +- .../jdk/incubator/http/Http2Connection.java | 9 +- .../jdk/incubator/http/HttpClientImpl.java | 2 +- .../jdk/incubator/http/MultiExchange.java | 122 ++++----- .../http/PlainTunnelingConnection.java | 2 +- .../jdk/incubator/http/SSLConnection.java | 17 +- .../classes/jdk/incubator/http/Stream.java | 156 ++++++------ .../internal/common/AsyncDataReadQueue.java | 212 +++++++++++++++ .../http/internal/common/MinimalFuture.java | 29 +++ .../httpclient/http2/FixedThreadPoolTest.java | 241 ++++++++++++++++++ 12 files changed, 668 insertions(+), 251 deletions(-) create mode 100644 jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/AsyncDataReadQueue.java create mode 100644 jdk/test/java/net/httpclient/http2/FixedThreadPoolTest.java diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Exchange.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Exchange.java index 8dbeed6ec47..d5019c956af 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Exchange.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Exchange.java @@ -27,7 +27,6 @@ package jdk.incubator.http; import java.io.IOException; import java.net.InetSocketAddress; -import java.net.Proxy; import java.net.ProxySelector; import java.net.SocketPermission; import java.net.URI; @@ -71,7 +70,6 @@ final class Exchange { final Executor parentExecutor; final HttpRequest.BodyProcessor requestProcessor; boolean upgrading; // to HTTP/2 - volatile Executor responseExecutor; final PushGroup pushGroup; // buffer for receiving response headers @@ -139,7 +137,7 @@ final class Exchange { } public CompletableFuture readBodyAsync(HttpResponse.BodyHandler handler) { - return exchImpl.readBodyAsync(handler, true, responseExecutor); + return exchImpl.readBodyAsync(handler, true, parentExecutor); } public void cancel() { @@ -224,7 +222,8 @@ final class Exchange { return checkForUpgrade(resp, exchImpl); } else { - exchImpl.sendRequest(); + exchImpl.sendHeadersOnly(); + exchImpl.sendBody(); Response resp = exchImpl.getResponse(); HttpResponseImpl.logResponse(resp); return checkForUpgrade(resp, exchImpl); @@ -235,8 +234,6 @@ final class Exchange { // will be a non null responseAsync if expect continue returns an error public CompletableFuture responseAsync() { - // take one thread from supplied executor to handle response headers and body - responseExecutor = Utils.singleThreadExecutor(parentExecutor); return responseAsyncImpl(null); } @@ -267,20 +264,18 @@ final class Exchange { Log.logTrace("Sending Expect: 100-Continue"); return exchImpl .sendHeadersAsync() - .thenCompose((v) -> exchImpl.getResponseAsync(responseExecutor)) + .thenCompose(v -> exchImpl.getResponseAsync(parentExecutor)) .thenCompose((Response r1) -> { HttpResponseImpl.logResponse(r1); int rcode = r1.statusCode(); if (rcode == 100) { Log.logTrace("Received 100-Continue: sending body"); - return exchImpl.sendBodyAsync(parentExecutor) - .thenCompose((v) -> exchImpl.getResponseAsync(responseExecutor)) - .thenCompose((Response r2) -> { - return checkForUpgradeAsync(r2, exchImpl); - }).thenApply((Response r) -> { - HttpResponseImpl.logResponse(r); - return r; - }); + CompletableFuture cf = + exchImpl.sendBodyAsync() + .thenCompose(exIm -> exIm.getResponseAsync(parentExecutor)); + cf = wrapForUpgrade(cf); + cf = wrapForLog(cf); + return cf; } else { Log.logTrace("Expectation failed: Received {0}", rcode); @@ -289,26 +284,38 @@ final class Exchange { "Unable to handle 101 while waiting for 100"); return MinimalFuture.failedFuture(failed); } - return exchImpl.readBodyAsync(this::ignoreBody, false, responseExecutor) - .thenApply((v) -> { - return r1; - }); + return exchImpl.readBodyAsync(this::ignoreBody, false, parentExecutor) + .thenApply(v -> r1); } }); } else { - return exchImpl - .sendRequestAsync(parentExecutor) - .thenCompose((v) -> exchImpl.getResponseAsync(responseExecutor)) - .thenCompose((Response r1) -> { - return checkForUpgradeAsync(r1, exchImpl); - }) - .thenApply((Response response) -> { - HttpResponseImpl.logResponse(response); - return response; - }); + CompletableFuture cf = exchImpl + .sendHeadersAsync() + .thenCompose(ExchangeImpl::sendBodyAsync) + .thenCompose(exIm -> exIm.getResponseAsync(parentExecutor)); + cf = wrapForUpgrade(cf); + cf = wrapForLog(cf); + return cf; } } + private CompletableFuture wrapForUpgrade(CompletableFuture cf) { + if (upgrading) { + return cf.thenCompose(r -> checkForUpgradeAsync(r, exchImpl)); + } + return cf; + } + + private CompletableFuture wrapForLog(CompletableFuture cf) { + if (Log.requests()) { + return cf.thenApply(response -> { + HttpResponseImpl.logResponse(response); + return response; + }); + } + return cf; + } + HttpResponse.BodyProcessor ignoreBody(int status, HttpHeaders hdrs) { return HttpResponse.BodyProcessor.discard((T)null); } diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ExchangeImpl.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ExchangeImpl.java index 0ddcf081acd..f938a8f7e79 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ExchangeImpl.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ExchangeImpl.java @@ -102,16 +102,12 @@ abstract class ExchangeImpl { // Blocking impl but in async style - CompletableFuture sendHeadersAsync() { - CompletableFuture cf = new MinimalFuture<>(); - try { - sendHeadersOnly(); - cf.complete(null); - } catch (Throwable t) { - cf.completeExceptionally(t); - } + CompletableFuture> sendHeadersAsync() { // this is blocking. cf will already be completed. - return cf; + return MinimalFuture.supply(() -> { + sendHeadersOnly(); + return this; + }); } /** @@ -156,39 +152,13 @@ abstract class ExchangeImpl { // Async version of sendBody(). This only used when body sent separately // to headers (100 continue) - CompletableFuture sendBodyAsync(Executor executor) { - CompletableFuture cf = new MinimalFuture<>(); - executor.execute(() -> { - try { - sendBody(); - cf.complete(null); - } catch (Throwable t) { - cf.completeExceptionally(t); - } + CompletableFuture> sendBodyAsync() { + return MinimalFuture.supply(() -> { + sendBody(); + return this; }); - return cf; } - /** - * Sends the entire request (headers and body) blocking. - */ - void sendRequest() throws IOException, InterruptedException { - sendHeadersOnly(); - sendBody(); - } - - CompletableFuture sendRequestAsync(Executor executor) { - CompletableFuture cf = new MinimalFuture<>(); - executor.execute(() -> { - try { - sendRequest(); - cf.complete(null); - } catch (Throwable t) { - cf.completeExceptionally(t); - } - }); - return cf; - } /** * Cancels a request. Not currently exposed through API. */ diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http1Exchange.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http1Exchange.java index 4e489895ea5..5003dd6b861 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http1Exchange.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http1Exchange.java @@ -194,17 +194,11 @@ class Http1Exchange extends ExchangeImpl { } CompletableFuture getResponseAsyncImpl(Executor executor) { - CompletableFuture cf = new MinimalFuture<>(); - executor.execute(() -> { - try { - response = new Http1Response<>(connection, Http1Exchange.this); - response.readHeaders(); - cf.complete(response.response()); - } catch (Throwable e) { - cf.completeExceptionally(e); - } - }); - return cf; + return MinimalFuture.supply( () -> { + response = new Http1Response<>(connection, Http1Exchange.this); + response.readHeaders(); + return response.response(); + }, executor); } @Override diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2Connection.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2Connection.java index d68436cc14f..40826d57ceb 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2Connection.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2Connection.java @@ -241,14 +241,7 @@ class Http2Connection { Http2ClientImpl client2, Exchange exchange, ByteBuffer initial) { - CompletableFuture cf = new MinimalFuture<>(); - try { - Http2Connection c = new Http2Connection(connection, client2, exchange, initial); - cf.complete(c); - } catch (IOException | InterruptedException e) { - cf.completeExceptionally(e); - } - return cf; + return MinimalFuture.supply(() -> new Http2Connection(connection, client2, exchange, initial)); } /** diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpClientImpl.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpClientImpl.java index 4d9a8efd991..dc5f0201a88 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpClientImpl.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpClientImpl.java @@ -235,7 +235,7 @@ class HttpClientImpl extends HttpClient { sendAsync(HttpRequest req, HttpResponse.BodyHandler responseHandler) { MultiExchange mex = new MultiExchange<>(req, this, responseHandler); - return mex.responseAsync(null) + return mex.responseAsync() .thenApply((HttpResponseImpl b) -> (HttpResponse) b); } diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/MultiExchange.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/MultiExchange.java index 4c55c508826..7ad145dc5bb 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/MultiExchange.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/MultiExchange.java @@ -35,6 +35,8 @@ import java.util.concurrent.CompletionException; import java.util.concurrent.ExecutionException; import java.util.function.BiFunction; import java.util.concurrent.Executor; +import java.util.function.UnaryOperator; + import jdk.incubator.http.internal.common.Log; import jdk.incubator.http.internal.common.MinimalFuture; import jdk.incubator.http.internal.common.Pair; @@ -150,8 +152,7 @@ class MultiExchange { Exchange currExchange = getExchange(); requestFilters(r); Response response = currExchange.response(); - Pair filterResult = responseFilters(response); - HttpRequestImpl newreq = filterResult.second; + HttpRequestImpl newreq = responseFilters(response); if (newreq == null) { if (attempts > 1) { Log.logError("Succeeded on attempt: " + attempts); @@ -213,23 +214,7 @@ class MultiExchange { Log.logTrace("All filters applied"); } - // Filters are assumed to be non-blocking so the async - // versions of these methods just call the blocking ones - - private CompletableFuture requestFiltersAsync(HttpRequestImpl r) { - CompletableFuture cf = new MinimalFuture<>(); - try { - requestFilters(r); - cf.complete(null); - } catch(Throwable e) { - cf.completeExceptionally(e); - } - return cf; - } - - - private Pair - responseFilters(Response response) throws IOException + private HttpRequestImpl responseFilters(Response response) throws IOException { Log.logTrace("Applying response filters"); for (HeaderFilter filter : filters) { @@ -237,24 +222,11 @@ class MultiExchange { HttpRequestImpl newreq = filter.response(response); if (newreq != null) { Log.logTrace("New request: stopping filters"); - return pair(null, newreq); + return newreq; } } Log.logTrace("All filters applied"); - return pair(response, null); - } - - private CompletableFuture> - responseFiltersAsync(Response response) - { - CompletableFuture> cf = new MinimalFuture<>(); - try { - Pair n = responseFilters(response); // assumed to be fast - cf.complete(n); - } catch (Throwable e) { - cf.completeExceptionally(e); - } - return cf; + return null; } public void cancel() { @@ -267,24 +239,27 @@ class MultiExchange { getExchange().cancel(cause); } - public CompletableFuture> responseAsync(Void v) { - return responseAsync1(null) + public CompletableFuture> responseAsync() { + CompletableFuture start = new MinimalFuture<>(); + CompletableFuture> cf = responseAsync0(start); + start.completeAsync( () -> null, executor); // trigger execution + return cf; + } + + private CompletableFuture> responseAsync0(CompletableFuture start) { + return start.thenCompose( v -> responseAsyncImpl()) .thenCompose((Response r) -> { Exchange exch = getExchange(); return exch.readBodyAsync(responseHandler) - .thenApply((T body) -> { - Pair result = new Pair<>(r, body); - return result; - }); - }) - .thenApply((Pair result) -> { - return new HttpResponseImpl<>(userRequest, result.first, result.second, getExchange()); + .thenApply((T body) -> new HttpResponseImpl<>(userRequest, r, body, exch)); }); } CompletableFuture multiResponseAsync() { - CompletableFuture> mainResponse = responseAsync(null) - .thenApply((HttpResponseImpl b) -> { + CompletableFuture start = new MinimalFuture<>(); + CompletableFuture> cf = responseAsync0(start); + CompletableFuture> mainResponse = + cf.thenApply((HttpResponseImpl b) -> { multiResponseHandler.onResponse(b); return (HttpResponse)b; }); @@ -295,10 +270,12 @@ class MultiExchange { // All push promises received by now. pushGroup.noMorePushes(true); }); - return multiResponseHandler.completion(pushGroup.groupResult(), pushGroup.pushesCF()); + CompletableFuture res = multiResponseHandler.completion(pushGroup.groupResult(), pushGroup.pushesCF()); + start.completeAsync( () -> null, executor); // trigger execution + return res; } - private CompletableFuture responseAsync1(Void v) { + private CompletableFuture responseAsyncImpl() { CompletableFuture cf; if (++attempts > max_attempts) { cf = MinimalFuture.failedFuture(new IOException("Too many retries")); @@ -307,48 +284,51 @@ class MultiExchange { timedEvent = new TimedEvent(currentreq.duration()); client.registerTimer(timedEvent); } + try { + // 1. Apply request filters + requestFilters(currentreq); + } catch (IOException e) { + return MinimalFuture.failedFuture(e); + } Exchange exch = getExchange(); - // 1. Apply request filters - cf = requestFiltersAsync(currentreq) - // 2. get response - .thenCompose((v1) -> { - return exch.responseAsync(); - }) - // 3. Apply response filters - .thenCompose(this::responseFiltersAsync) - // 4. Check filter result and repeat or continue - .thenCompose((Pair pair) -> { - Response resp = pair.first; - if (resp != null) { + // 2. get response + cf = exch.responseAsync() + .thenCompose((Response response) -> { + HttpRequestImpl newrequest = null; + try { + // 3. Apply response filters + newrequest = responseFilters(response); + } catch (IOException e) { + return MinimalFuture.failedFuture(e); + } + // 4. Check filter result and repeat or continue + if (newrequest == null) { if (attempts > 1) { Log.logError("Succeeded on attempt: " + attempts); } - return MinimalFuture.completedFuture(resp); + return MinimalFuture.completedFuture(response); } else { - currentreq = pair.second; - Exchange previous = exch; + currentreq = newrequest; setExchange(new Exchange<>(currentreq, this, acc)); //reads body off previous, and then waits for next response - return responseAsync1(null); + return responseAsyncImpl(); } }) - // 5. Convert result to Pair - .handle((BiFunction>) Pair::new) - // 6. Handle errors and cancel any timer set - .thenCompose((Pair obj) -> { - Response response = obj.first; + // 5. Handle errors and cancel any timer set + .handle((response, ex) -> { if (response != null) { return MinimalFuture.completedFuture(response); } // all exceptions thrown are handled here - CompletableFuture error = getExceptionalCF(obj.second); + CompletableFuture error = getExceptionalCF(ex); if (error == null) { cancelTimer(); - return responseAsync1(null); + return responseAsyncImpl(); } else { return error; } - }); + }) + .thenCompose(UnaryOperator.identity()); } return cf; } diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainTunnelingConnection.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainTunnelingConnection.java index f093e391b64..f85c68e6b71 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainTunnelingConnection.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainTunnelingConnection.java @@ -50,7 +50,7 @@ class PlainTunnelingConnection extends HttpConnection { .thenCompose((Void v) -> { HttpRequestImpl req = new HttpRequestImpl("CONNECT", client, address); MultiExchange mconnectExchange = new MultiExchange<>(req, client, this::ignore); - return mconnectExchange.responseAsync(null) + return mconnectExchange.responseAsync() .thenCompose((HttpResponseImpl resp) -> { CompletableFuture cf = new MinimalFuture<>(); if (resp.statusCode() != 200) { diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/SSLConnection.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/SSLConnection.java index 60fce9ebcb7..cb2177d7507 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/SSLConnection.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/SSLConnection.java @@ -50,18 +50,11 @@ class SSLConnection extends HttpConnection { @Override public CompletableFuture connectAsync() { return delegate.connectAsync() - .thenCompose((Void v) -> { - CompletableFuture cf = new MinimalFuture<>(); - try { - this.sslDelegate = new SSLDelegate(delegate.channel(), - client, - alpn); - cf.complete(null); - } catch (IOException e) { - cf.completeExceptionally(e); - } - return cf; - }); + .thenCompose((Void v) -> + MinimalFuture.supply( () -> { + this.sslDelegate = new SSLDelegate(delegate.channel(), client, alpn); + return null; + })); } @Override diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Stream.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Stream.java index 0b1274654ca..bf288685cf1 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Stream.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Stream.java @@ -39,6 +39,8 @@ import java.util.concurrent.Flow; import java.util.concurrent.Flow.Subscription; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import java.util.function.Consumer; + import jdk.incubator.http.internal.common.*; import jdk.incubator.http.internal.frame.*; import jdk.incubator.http.internal.hpack.DecodingCallback; @@ -96,7 +98,7 @@ import jdk.incubator.http.internal.hpack.DecodingCallback; */ class Stream extends ExchangeImpl { - final Queue inputQ; + final AsyncDataReadQueue inputQ = new AsyncDataReadQueue(); /** * This stream's identifier. Assigned lazily by the HTTP2Connection before @@ -169,7 +171,7 @@ class Stream extends ExchangeImpl { { CompletableFuture cf = readBodyAsync(handler, returnToCache, - this::executeInline); + null); try { return cf.join(); } catch (CompletionException e) { @@ -177,10 +179,6 @@ class Stream extends ExchangeImpl { } } - void executeInline(Runnable r) { - r.run(); - } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -189,60 +187,69 @@ class Stream extends ExchangeImpl { return sb.toString(); } + private boolean receiveDataFrame(Http2Frame frame) throws IOException, InterruptedException { + if (frame instanceof ResetFrame) { + handleReset((ResetFrame) frame); + return true; + } else if (!(frame instanceof DataFrame)) { + assert false; + return true; + } + DataFrame df = (DataFrame) frame; + // RFC 7540 6.1: + // The entire DATA frame payload is included in flow control, + // including the Pad Length and Padding fields if present + int len = df.payloadLength(); + ByteBufferReference[] buffers = df.getData(); + for (ByteBufferReference b : buffers) { + ByteBuffer buf = b.get(); + if (buf.hasRemaining()) { + publisher.acceptData(Optional.of(buf)); + } + } + connection.windowUpdater.update(len); + if (df.getFlag(DataFrame.END_STREAM)) { + setEndStreamReceived(); + publisher.acceptData(Optional.empty()); + return false; + } + // Don't send window update on a stream which is + // closed or half closed. + windowUpdater.update(len); + return true; + } + // pushes entire response body into response processor // blocking when required by local or remote flow control CompletableFuture receiveData(Executor executor) { CompletableFuture cf = responseProcessor .getBody() .toCompletableFuture(); - - executor.execute(() -> { - Http2Frame frame; - DataFrame df = null; - try { - if (!endStreamReceived()) { - do { - frame = inputQ.take(); - if (frame instanceof ResetFrame) { - handleReset((ResetFrame)frame); - continue; - } else if (!(frame instanceof DataFrame)) { - assert false; - continue; - } - df = (DataFrame) frame; - // RFC 7540 6.1: - // The entire DATA frame payload is included in flow control, - // including the Pad Length and Padding fields if present - int len = df.payloadLength(); - ByteBufferReference[] buffers = df.getData(); - for (ByteBufferReference b : buffers) { - publisher.acceptData(Optional.of(b.get())); - } - connection.windowUpdater.update(len); - if (df.getFlag(DataFrame.END_STREAM)) { - break; - } - // Don't send window update on a stream which is - // closed or half closed. - windowUpdater.update(len); - } while (true); - setEndStreamReceived(); - } - publisher.acceptData(Optional.empty()); - } catch (Throwable e) { - Log.logTrace("receiveData: {0}", e.toString()); - e.printStackTrace(); - cf.completeExceptionally(e); - publisher.acceptError(e); - } - }); + Consumer onError = e -> { + Log.logTrace("receiveData: {0}", e.toString()); + e.printStackTrace(); + cf.completeExceptionally(e); + publisher.acceptError(e); + }; + if (executor == null) { + inputQ.blockingReceive(this::receiveDataFrame, onError); + } else { + inputQ.asyncReceive(executor, this::receiveDataFrame, onError); + } return cf; } @Override - void sendBody() throws IOException, InterruptedException { - sendBodyImpl(); + void sendBody() throws IOException { + try { + sendBodyImpl().join(); + } catch (CompletionException e) { + throw Utils.getIOException(e); + } + } + + CompletableFuture> sendBodyAsync() { + return sendBodyImpl().thenApply( v -> this); } @SuppressWarnings("unchecked") @@ -268,7 +275,6 @@ class Stream extends ExchangeImpl { }; this.requestPseudoHeaders = new HttpHeadersImpl(); // NEW - this.inputQ = new Queue<>(); this.publisher = new BlockingPushPublisher<>(); this.windowUpdater = new StreamWindowUpdateSender(connection); } @@ -673,6 +679,10 @@ class Stream extends ExchangeImpl { response_cfs.add(cf); } } + if (executor != null && !cf.isDone()) { + // protect from executing later chain of CompletableFuture operations from SelectorManager thread + cf = cf.thenApplyAsync(r -> r, executor); + } Log.logTrace("Response future (stream={0}) is: {1}", streamid, cf); PushGroup pg = exchange.getPushGroup(); if (pg != null) { @@ -743,20 +753,12 @@ class Stream extends ExchangeImpl { } } - private void waitForCompletion() throws IOException { - try { - requestBodyCF.join(); - } catch (CompletionException e) { - throw Utils.getIOException(e); - } - } - - void sendBodyImpl() throws IOException, InterruptedException { + CompletableFuture sendBodyImpl() { RequestSubscriber subscriber = new RequestSubscriber(requestContentLen); subscriber.setClient(client); requestProcessor.subscribe(subscriber); - waitForCompletion(); - requestSent(); + requestBodyCF.whenComplete((v,t) -> requestSent()); + return requestBodyCF; } @Override @@ -846,30 +848,24 @@ class Stream extends ExchangeImpl { // error record it in the PushGroup. The error method is called // with a null value when no error occurred (is a no-op) @Override - CompletableFuture sendBodyAsync(Executor executor) { - return super.sendBodyAsync(executor) - .whenComplete((Void v, Throwable t) -> { - pushGroup.pushError(t); - }); + CompletableFuture> sendBodyAsync() { + return super.sendBodyAsync() + .whenComplete((ExchangeImpl v, Throwable t) -> pushGroup.pushError(t)); } @Override - CompletableFuture sendHeadersAsync() { + CompletableFuture> sendHeadersAsync() { return super.sendHeadersAsync() - .whenComplete((Void v, Throwable t) -> { - pushGroup.pushError(t); - }); - } - - @Override - CompletableFuture sendRequestAsync(Executor executor) { - return super.sendRequestAsync(executor) - .whenComplete((v, t) -> pushGroup.pushError(t)); + .whenComplete((ExchangeImpl ex, Throwable t) -> pushGroup.pushError(t)); } @Override CompletableFuture getResponseAsync(Executor executor) { - return pushCF.whenComplete((v, t) -> pushGroup.pushError(t)); + CompletableFuture cf = pushCF.whenComplete((v, t) -> pushGroup.pushError(t)); + if(executor!=null && !cf.isDone()) { + cf = cf.thenApplyAsync( r -> r, executor); + } + return cf; } @Override @@ -887,7 +883,8 @@ class Stream extends ExchangeImpl { HttpResponseImpl.logResponse(r); pushCF.complete(r); // not strictly required for push API // start reading the body using the obtained BodyProcessor - readBodyAsync(getPushHandler(), false, getExchange().executor()) + CompletableFuture start = new MinimalFuture<>(); + start.thenCompose( v -> readBodyAsync(getPushHandler(), false, getExchange().executor())) .whenComplete((T body, Throwable t) -> { if (t != null) { responseCF.completeExceptionally(t); @@ -896,6 +893,7 @@ class Stream extends ExchangeImpl { responseCF.complete(response); } }); + start.completeAsync(() -> null, getExchange().executor()); } @Override diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/AsyncDataReadQueue.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/AsyncDataReadQueue.java new file mode 100644 index 00000000000..2557c1f9459 --- /dev/null +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/AsyncDataReadQueue.java @@ -0,0 +1,212 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package jdk.incubator.http.internal.common; + +import jdk.incubator.http.internal.frame.DataFrame; +import jdk.incubator.http.internal.frame.Http2Frame; + +import java.io.Closeable; +import java.io.IOException; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.Executor; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Consumer; + +/** + * Http2Frame Producer-Consumer queue which either allows to consume all frames in blocking way + * or allows to consume it asynchronously. In the latter case put operation from the producer thread + * executes consume operation in the given executor. + */ +public class AsyncDataReadQueue implements Closeable { + + @FunctionalInterface + public interface DataConsumer { + /** + * + * @param t - frame + * @return true if consuming should be continued. false when END_STREAM was received. + * @throws Throwable + */ + boolean accept(Http2Frame t) throws Throwable; + } + + private static final int BLOCKING = 0; + private static final int FLUSHING = 1; + private static final int REFLUSHING = 2; + private static final int ASYNC = 3; + private static final int CLOSED = 4; + + + private final AtomicInteger state = new AtomicInteger(BLOCKING); + private final BlockingQueue queue = new LinkedBlockingQueue<>(); + private Executor executor; + private DataConsumer onData; + private Consumer onError; + + public AsyncDataReadQueue() { + } + + public boolean tryPut(Http2Frame f) { + if(state.get() == CLOSED) { + return false; + } else { + queue.offer(f); + flushAsync(false); + return true; + } + } + + public void put(Http2Frame f) throws IOException { + if(!tryPut(f)) + throw new IOException("stream closed"); + } + + public void blockingReceive(DataConsumer onData, Consumer onError) { + if (state.get() == CLOSED) { + onError.accept(new IOException("stream closed")); + return; + } + assert state.get() == BLOCKING; + try { + while (onData.accept(queue.take())); + assert state.get() == CLOSED; + } catch (Throwable e) { + onError.accept(e); + } + } + + public void asyncReceive(Executor executor, DataConsumer onData, + Consumer onError) { + if (state.get() == CLOSED) { + onError.accept(new IOException("stream closed")); + return; + } + + assert state.get() == BLOCKING; + + // Validates that fields not already set. + if (!checkCanSet("executor", this.executor, onError) + || !checkCanSet("onData", this.onData, onError) + || !checkCanSet("onError", this.onError, onError)) { + return; + } + + this.executor = executor; + this.onData = onData; + this.onError = onError; + + // This will report an error if asyncReceive is called twice, + // because we won't be in BLOCKING state if that happens + if (!this.state.compareAndSet(BLOCKING, ASYNC)) { + onError.accept(new IOException( + new IllegalStateException("State: "+this.state.get()))); + return; + } + + flushAsync(true); + } + + private static boolean checkCanSet(String name, T oldval, Consumer onError) { + if (oldval != null) { + onError.accept(new IOException( + new IllegalArgumentException(name))); + return false; + } + return true; + } + + @Override + public void close() { + int prevState = state.getAndSet(CLOSED); + if(prevState == BLOCKING) { + // wake up blocked take() + queue.offer(new DataFrame(0, DataFrame.END_STREAM, new ByteBufferReference[0])); + } + } + + private void flushAsync(boolean alreadyInExecutor) { + while(true) { + switch (state.get()) { + case BLOCKING: + case CLOSED: + case REFLUSHING: + return; + case ASYNC: + if(state.compareAndSet(ASYNC, FLUSHING)) { + if(alreadyInExecutor) { + flushLoop(); + } else { + executor.execute(this::flushLoop); + } + return; + } + break; + case FLUSHING: + if(state.compareAndSet(FLUSHING, REFLUSHING)) { + return; + } + break; + } + } + } + + private void flushLoop() { + try { + while(true) { + Http2Frame frame = queue.poll(); + while (frame != null) { + if(!onData.accept(frame)) { + assert state.get() == CLOSED; + return; // closed + } + frame = queue.poll(); + } + switch (state.get()) { + case BLOCKING: + assert false; + break; + case ASYNC: + throw new RuntimeException("Shouldn't happen"); + case FLUSHING: + if(state.compareAndSet(FLUSHING, ASYNC)) { + return; + } + break; + case REFLUSHING: + // We need to check if new elements were put after last + // poll() and do graceful exit + state.compareAndSet(REFLUSHING, FLUSHING); + break; + case CLOSED: + return; + } + } + } catch (Throwable e) { + onError.accept(e); + close(); + } + } +} diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/MinimalFuture.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/MinimalFuture.java index 78dd707b957..bd338e4b294 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/MinimalFuture.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/common/MinimalFuture.java @@ -26,6 +26,7 @@ package jdk.incubator.http.internal.common; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; import java.util.concurrent.CompletionStage; import java.util.concurrent.Executor; import java.util.function.BiConsumer; @@ -40,6 +41,11 @@ import java.util.concurrent.atomic.AtomicLong; */ public final class MinimalFuture extends CompletableFuture { + @FunctionalInterface + public interface ExceptionalSupplier { + U get() throws Throwable; + } + final static AtomicLong TOKENS = new AtomicLong(); final long id; @@ -56,6 +62,29 @@ public final class MinimalFuture extends CompletableFuture { return f; } + public static CompletableFuture supply(ExceptionalSupplier supplier) { + CompletableFuture cf = new MinimalFuture<>(); + try { + U value = supplier.get(); + cf.complete(value); + } catch (Throwable t) { + cf.completeExceptionally(t); + } + return cf; + } + + public static CompletableFuture supply(ExceptionalSupplier supplier, Executor executor) { + CompletableFuture cf = new MinimalFuture<>(); + cf.completeAsync( () -> { + try { + return supplier.get(); + } catch (Throwable ex) { + throw new CompletionException(ex); + } + }, executor); + return cf; + } + public MinimalFuture() { super(); this.id = TOKENS.incrementAndGet(); diff --git a/jdk/test/java/net/httpclient/http2/FixedThreadPoolTest.java b/jdk/test/java/net/httpclient/http2/FixedThreadPoolTest.java new file mode 100644 index 00000000000..39676149e3a --- /dev/null +++ b/jdk/test/java/net/httpclient/http2/FixedThreadPoolTest.java @@ -0,0 +1,241 @@ +/* + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8087112 + * @library /lib/testlibrary server + * @build jdk.testlibrary.SimpleSSLContext + * @modules jdk.incubator.httpclient/jdk.incubator.http.internal.common + * jdk.incubator.httpclient/jdk.incubator.http.internal.frame + * jdk.incubator.httpclient/jdk.incubator.http.internal.hpack + * @run testng/othervm -Djdk.httpclient.HttpClient.log=ssl,requests,responses,errors FixedThreadPoolTest + */ + +import java.net.*; +import jdk.incubator.http.*; +import static jdk.incubator.http.HttpClient.Version.HTTP_2; +import javax.net.ssl.*; +import java.nio.file.*; +import java.util.concurrent.*; +import jdk.testlibrary.SimpleSSLContext; +import static jdk.incubator.http.HttpRequest.BodyProcessor.fromFile; +import static jdk.incubator.http.HttpRequest.BodyProcessor.fromString; +import static jdk.incubator.http.HttpResponse.BodyHandler.asFile; +import static jdk.incubator.http.HttpResponse.BodyHandler.asString; + +import org.testng.annotations.Test; + +@Test +public class FixedThreadPoolTest { + static int httpPort, httpsPort; + static Http2TestServer httpServer, httpsServer; + static HttpClient client = null; + static ExecutorService exec; + static SSLContext sslContext; + + static String httpURIString, httpsURIString; + + static void initialize() throws Exception { + try { + SimpleSSLContext sslct = new SimpleSSLContext(); + sslContext = sslct.get(); + client = getClient(); + httpServer = new Http2TestServer(false, 0, exec, sslContext); + httpServer.addHandler(new EchoHandler(), "/"); + httpPort = httpServer.getAddress().getPort(); + + httpsServer = new Http2TestServer(true, 0, exec, sslContext); + httpsServer.addHandler(new EchoHandler(), "/"); + + httpsPort = httpsServer.getAddress().getPort(); + httpURIString = "http://127.0.0.1:" + httpPort + "/foo/"; + httpsURIString = "https://127.0.0.1:" + httpsPort + "/bar/"; + + httpServer.start(); + httpsServer.start(); + } catch (Throwable e) { + System.err.println("Throwing now"); + e.printStackTrace(); + throw e; + } + } + + @Test(timeOut=3000000) + public static void test() throws Exception { + try { + initialize(); + simpleTest(false); + simpleTest(true); + streamTest(false); + streamTest(true); + paramsTest(); + Thread.sleep(1000 * 4); + } catch (Exception | Error tt) { + tt.printStackTrace(); + throw tt; + } finally { + httpServer.stop(); + httpsServer.stop(); + exec.shutdownNow(); + } + } + + static HttpClient getClient() { + if (client == null) { + exec = Executors.newCachedThreadPool(); + client = HttpClient.newBuilder() + .executor(Executors.newFixedThreadPool(2)) + .sslContext(sslContext) + .version(HTTP_2) + .build(); + } + return client; + } + + static URI getURI(boolean secure) { + if (secure) + return URI.create(httpsURIString); + else + return URI.create(httpURIString); + } + + static void checkStatus(int expected, int found) throws Exception { + if (expected != found) { + System.err.printf ("Test failed: wrong status code %d/%d\n", + expected, found); + throw new RuntimeException("Test failed"); + } + } + + static void checkStrings(String expected, String found) throws Exception { + if (!expected.equals(found)) { + System.err.printf ("Test failed: wrong string %s/%s\n", + expected, found); + throw new RuntimeException("Test failed"); + } + } + + static Void compareFiles(Path path1, Path path2) { + return TestUtil.compareFiles(path1, path2); + } + + static Path tempFile() { + return TestUtil.tempFile(); + } + + static final String SIMPLE_STRING = "Hello world Goodbye world"; + + static final int LOOPS = 32; + static final int FILESIZE = 64 * 1024 + 200; + + static void streamTest(boolean secure) throws Exception { + URI uri = getURI(secure); + System.err.printf("streamTest %b to %s\n" , secure, uri); + + HttpClient client = getClient(); + Path src = TestUtil.getAFile(FILESIZE * 4); + HttpRequest req = HttpRequest.newBuilder(uri) + .POST(fromFile(src)) + .build(); + + Path dest = Paths.get("streamtest.txt"); + dest.toFile().delete(); + CompletableFuture response = client.sendAsync(req, asFile(dest)) + .thenApply(resp -> { + if (resp.statusCode() != 200) + throw new RuntimeException(); + return resp.body(); + }); + response.join(); + compareFiles(src, dest); + System.err.println("DONE"); + } + + static void paramsTest() throws Exception { + System.err.println("paramsTest"); + Http2TestServer server = new Http2TestServer(true, 0, exec, sslContext); + server.addHandler((t -> { + SSLSession s = t.getSSLSession(); + String prot = s.getProtocol(); + if (prot.equals("TLSv1.2")) { + t.sendResponseHeaders(200, -1); + } else { + System.err.printf("Protocols =%s\n", prot); + t.sendResponseHeaders(500, -1); + } + }), "/"); + server.start(); + int port = server.getAddress().getPort(); + URI u = new URI("https://127.0.0.1:"+port+"/foo"); + HttpClient client = getClient(); + HttpRequest req = HttpRequest.newBuilder(u).build(); + HttpResponse resp = client.sendAsync(req, asString()).get(); + int stat = resp.statusCode(); + if (stat != 200) { + throw new RuntimeException("paramsTest failed " + + Integer.toString(stat)); + } + } + + static void simpleTest(boolean secure) throws Exception { + URI uri = getURI(secure); + System.err.println("Request to " + uri); + + // Do a simple warmup request + + HttpClient client = getClient(); + HttpRequest req = HttpRequest.newBuilder(uri) + .POST(fromString(SIMPLE_STRING)) + .build(); + HttpResponse response = client.sendAsync(req, asString()).get(); + HttpHeaders h = response.headers(); + + checkStatus(200, response.statusCode()); + + String responseBody = response.body(); + checkStrings(SIMPLE_STRING, responseBody); + + checkStrings(h.firstValue("x-hello").get(), "world"); + checkStrings(h.firstValue("x-bye").get(), "universe"); + + // Do loops asynchronously + + CompletableFuture[] responses = new CompletableFuture[LOOPS]; + final Path source = TestUtil.getAFile(FILESIZE); + HttpRequest request = HttpRequest.newBuilder(uri) + .POST(fromFile(source)) + .build(); + for (int i = 0; i < LOOPS; i++) { + responses[i] = client.sendAsync(request, asFile(tempFile())) + //.thenApply(resp -> compareFiles(resp.body(), source)); + .thenApply(resp -> { + System.out.printf("Resp status %d body size %d\n", + resp.statusCode(), resp.body().toFile().length()); + return compareFiles(resp.body(), source); + }); + } + CompletableFuture.allOf(responses).join(); + System.err.println("DONE"); + } +} From a712ebbffb8031b4332657b1820f98298c8978aa Mon Sep 17 00:00:00 2001 From: Amit Sapre Date: Tue, 21 Feb 2017 17:33:08 +0530 Subject: [PATCH 275/447] 8174915: Improve error handing for Jdp tests under sun/management/jdp Added checks for abnormal exits of spawn process by test cases Reviewed-by: dholmes, dfuchs, sspitsyn --- jdk/test/sun/management/jdp/DynamicLauncher.java | 5 +++++ jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/jdk/test/sun/management/jdp/DynamicLauncher.java b/jdk/test/sun/management/jdp/DynamicLauncher.java index 934002c056b..f55d0c8b671 100644 --- a/jdk/test/sun/management/jdp/DynamicLauncher.java +++ b/jdk/test/sun/management/jdp/DynamicLauncher.java @@ -58,6 +58,11 @@ public abstract class DynamicLauncher { } } } while (tryAgain); + output.shouldHaveExitValue(0); + // java.lang.Exception is thrown by JdpTestCase if something goes wrong + // for instance - see JdpTestCase::shutdown() + output.shouldNotContain("java.lang.Exception:"); + output.shouldNotContain("Error: Could not find or load main class"); } protected OutputAnalyzer runVM() throws Exception { diff --git a/jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java b/jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java index d79e2245870..993cf930846 100644 --- a/jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java +++ b/jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java @@ -40,7 +40,6 @@ public class JdpJmxRemoteDynamicPortTest extends DynamicLauncher { public static void main(String[] args) throws Exception { DynamicLauncher launcher = new JdpJmxRemoteDynamicPortTest(); launcher.run(); - launcher.getProcessOutpoutAnalyzer().stderrShouldNotContain("java.lang.Exception:"); } protected String[] options() { From cf801acb7171bdcbae40802aeadf88c6232d234b Mon Sep 17 00:00:00 2001 From: Erik Joelsson Date: Tue, 21 Feb 2017 13:47:27 +0100 Subject: [PATCH 276/447] 8175271: Race in GenerateLinkOptData.gmk Reviewed-by: redestad, ihse --- make/GenerateLinkOptData.gmk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/make/GenerateLinkOptData.gmk b/make/GenerateLinkOptData.gmk index f754ed36a8c..60c80ea47ca 100644 --- a/make/GenerateLinkOptData.gmk +++ b/make/GenerateLinkOptData.gmk @@ -69,7 +69,7 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR) # The jli trace is created by the same recipe as classlist. By declaring these # dependencies, make will correctly rebuild both jli trace and classlist -# incrementally using the single recpie above. +# incrementally using the single recipe above. $(CLASSLIST_FILE): $(JLI_TRACE_FILE) $(JLI_TRACE_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR) @@ -89,6 +89,11 @@ $(eval $(call SetupCopyFiles, COPY_JLI_TRACE, \ DEST := $(JDK_OUTPUTDIR)/modules/jdk.jlink/jdk/tools/jlink/internal/plugins, \ )) +# Because of the single recipe for jli trace and classlist above, the +# COPY_JLI_TRACE rule needs to explicitly add the classlist file as a +# prerequisite. +$(COPY_JLI_TRACE): $(CLASSLIST_FILE) + TARGETS += $(COPY_JLI_TRACE) ################################################################################ From 9e6e4fe8bf59b6557b69285c7975557b75b28063 Mon Sep 17 00:00:00 2001 From: Li Jiang Date: Tue, 21 Feb 2017 05:58:23 -0800 Subject: [PATCH 277/447] 8172956: JDK9 message drop 30 l10n resource file updates - open Reviewed-by: joehw, mchung, smarks, sherman, henryjen --- .../launcher/resources/launcher_de.properties | 15 +++----- .../launcher/resources/launcher_es.properties | 17 ++++----- .../launcher/resources/launcher_fr.properties | 18 ++++----- .../launcher/resources/launcher_it.properties | 16 +++----- .../launcher/resources/launcher_ja.properties | 19 ++++------ .../launcher/resources/launcher_ko.properties | 18 ++++----- .../resources/launcher_pt_BR.properties | 16 +++----- .../launcher/resources/launcher_sv.properties | 16 +++----- .../resources/launcher_zh_CN.properties | 18 ++++----- .../resources/launcher_zh_TW.properties | 18 ++++----- .../apple/laf/resources/aqua_de.properties | 4 +- .../rmi/server/resources/rmid_de.properties | 4 +- .../rmi/server/resources/rmid_es.properties | 4 +- .../rmi/server/resources/rmid_fr.properties | 4 +- .../rmi/server/resources/rmid_it.properties | 4 +- .../rmi/server/resources/rmid_ja.properties | 4 +- .../rmi/server/resources/rmid_ko.properties | 4 +- .../server/resources/rmid_pt_BR.properties | 4 +- .../rmi/server/resources/rmid_sv.properties | 4 +- .../server/resources/rmid_zh_CN.properties | 4 +- .../server/resources/rmid_zh_TW.properties | 4 +- .../sun/tools/jar/resources/jar_de.properties | 19 +++++++--- .../sun/tools/jar/resources/jar_es.properties | 19 +++++++--- .../sun/tools/jar/resources/jar_fr.properties | 19 +++++++--- .../sun/tools/jar/resources/jar_it.properties | 17 ++++++--- .../sun/tools/jar/resources/jar_ja.properties | 19 +++++++--- .../sun/tools/jar/resources/jar_ko.properties | 17 ++++++--- .../tools/jar/resources/jar_pt_BR.properties | 21 +++++++---- .../sun/tools/jar/resources/jar_sv.properties | 19 +++++++--- .../tools/jar/resources/jar_zh_CN.properties | 17 ++++++--- .../tools/jar/resources/jar_zh_TW.properties | 17 ++++++--- .../tools/jlink/resources/jlink_ja.properties | 37 ++++++++++++------- .../jlink/resources/jlink_zh_CN.properties | 37 ++++++++++++------- .../tools/jmod/resources/jmod_ja.properties | 19 +++++++--- .../jmod/resources/jmod_zh_CN.properties | 19 +++++++--- 35 files changed, 292 insertions(+), 219 deletions(-) diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties index 2272ae9fa24..b3d9295af56 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -24,21 +24,18 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = Verwendung: {0} [Optionen] Klasse [Argumente...]\n (zur Ausf\u00FChrung einer Klasse)\n oder {0} [Optionen] -jar JAR-Datei [Argumente...]\n (zur Ausf\u00FChrung einer JAR-Datei)\n oder {0} [Optionen] -p -m [/] [Argumente...]\n (zur Ausf\u00FChrung der Hauptklasse in einem Modul)\nwobei "Optionen" Folgendes umfasst:\n +java.launcher.opt.header = Verwendung: {0} [Optionen] Klasse [Argumente...]\n (zur Ausf\u00FChrung einer Klasse)\n oder {0} [Optionen] -jar JAR-Datei [Argumente...]\n (zur Ausf\u00FChrung einer JAR-Datei)\n oder {0} [Optionen] -p -m [/] [Argumente...]\n (zur Ausf\u00FChrung der Hauptklasse in einem Modul)\nwobei "Optionen" Folgendes umfasst:\n\n java.launcher.opt.datamodel =\ -d{0}\t Veraltet, wird in einem zuk\u00FCnftigen Release entfernt\n java.launcher.opt.vmselect =\ {0}\t zur Auswahl der "{1}" VM\n java.launcher.opt.hotspot =\ {0}\t ist ein Synonym f\u00FCr die "{1}" VM [verworfen]\n -java.launcher.ergo.message1 =\ Die Standard-VM ist {0} -java.launcher.ergo.message2 =\ weil die Ausf\u00FChrung auf einem Server-Class-Rechner erfolgt.\n +# Translators please note do not translate the options themselves +java.launcher.opt.footer =-cp \n -classpath \n --class-path \n Eine durch {0} getrennte Liste mit Verzeichnissen, JAR-Archiven\n und ZIP-Archiven zur Suche nach Klassendateien.\n -p \n --module-path ...\n Eine durch {0} getrennte Liste mit Verzeichnissen, wobei jedes Verzeichnis\n ein Modulverzeichnis ist.\n --upgrade-module-path ...\n Eine durch {0} getrennte Liste mit Verzeichnissen, wobei jedes Verzeichnis\n ein Verzeichnis mit Modulen ist, die upgradef\u00E4hige\n Module im Laufzeitimage ersetzen\n -m [/]\n --module [/]\n Das anf\u00E4ngliche aufzul\u00F6sende Modul und der Name der auszuf\u00FChrenden\n Hauptklasse, wenn nicht durch das Modul angegeben\n --add-modules [,...]\n Zus\u00E4tzlich zum anf\u00E4nglichen Modul aufzul\u00F6sende Root-Module.\n kann auch ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH sein.\n --limit-modules [,...]\n Begrenzt die Gesamtheit der beobachtbaren Module\n --list-modules [[,...]]\n F\u00FChrt die beobachtbaren Module auf und beendet den Vorgang\n --dry-run Erstellt VM, f\u00FChrt jedoch die Hauptmethode nicht aus.\n Diese --dry-run-Option kann zur Validierung der Befehlszeilenoptionen,\n etwa der Modulsystemkonfiguration, n\u00FCtzlich sein.\n -D=\n Legt eine Systemeigenschaft fest\n -verbose:[class|gc|jni]\n Aktiviert Verbose-Ausgabe\n -version Druckt die Produktversion in den Fehlerstream und beendet den Vorgang\n --version Druckt die Produktversion in den Ausgabestream und beendet den Vorgang\n -showversion Druckt die Produktversion in den Fehlerstream und f\u00E4hrt fort\n --show-version\n Druckt die Produktversion in den Ausgabestream und f\u00E4hrt fort\n -? -h -help\n Gibt diese Hilfemeldung in den Fehlerstream aus\n --help Gibt diese Hilfemeldung in den Ausgabestream aus\n -X Gibt Hilfe zu zus\u00E4tzlichen Optionen in den Fehlerstream aus\n --help-extra Gibt Hilfe zu zus\u00E4tzlichen Optionen in den Ausgabestream aus\n -ea[:...|:]\n -enableassertions[:...|:]\n Aktiviert Assertions mit angegebener Granularit\u00E4t\n -da[:...|:]\n -disableassertions[:...|:]\n Deaktiviert Assertions mit angegebener Granularit\u00E4t\n -esa | -enablesystemassertions\n Aktiviert System-Assertions\n -dsa | -disablesystemassertions\n Deaktiviert System-Assertions\n -agentlib:[=]\n L\u00E4dt native Agent Library , Beispiel: -agentlib:jdwp\n siehe auch -agentlib:jdwp=help\n -agentpath:[=]\n L\u00E4dt native Agent Library nach vollst\u00E4ndigem Pfadnamen\n -javaagent:[=]\n L\u00E4dt Java-Programmiersprachen-Agent, siehe java.lang.instrument\n -splash:\n Zeigt Begr\u00FC\u00DFungsbildschirm mit angegebenem Bild an\n HiDPI-skalierte Bilder werden automatisch unterst\u00FCtzt und verwendet,\n sofern verf\u00FCgbar. Der nicht skalierte Bilddateiname, z.B. image.ext,\n muss immer als Argument an die Option -splash \u00FCbergeben \ +werden.\n Das geeignetste skalierte Bild wird automatisch\n ausgew\u00E4hlt.\n Weitere Informationen finden Sie in der Dokumentation zur SplashScreen-API.\n @ Liest Optionen aus der angegebenen Datei\n\nZur Angabe eines Arguments f\u00FCr eine lange Option k\u00F6nnen Sie --= oder\n-- verwenden.\n # Translators please note do not translate the options themselves -java.launcher.opt.footer =\ -cp \n -classpath \n --class-path \n Eine durch {0} getrennte Liste mit Verzeichnissen, JAR-Archiven\n und ZIP-Archiven zur Suche nach Klassendateien.\n -p \n --module-path ...\n Eine durch {0} getrennte Liste mit Verzeichnissen, wobei jedes Verzeichnis\n ein Modulverzeichnis ist.\n --upgrade-module-path ...\n Eine durch {0} getrennte Liste mit Verzeichnissen, wobei jedes Verzeichnis\n ein Verzeichnis mit Modulen ist, die upgradef\u00E4hige\n Module im Laufzeitimage ersetzen\n -m [/]\n --module [/]\n Das anf\u00E4ngliche aufzul\u00F6sende Modul und der Name der auszuf\u00FChrenden\n Hauptklasse, wenn nicht durch das Modul angegeben\n --add-modules [,...]\n Zus\u00E4tzlich zu dem anf\u00E4nglichen Modul aufzul\u00F6sende Root-Module.\n kann auch ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH sein.\n --limit-modules [,...]\n Begrenzt die gesamten beobachtbaren Module\n --list-modules [[,...]]\n F\u00FChrt die beobachtbaren Module auf und beendet den Vorgang\n --dry-run Erstellt VM, f\u00FChrt jedoch die Hauptmethode nicht aus.\n Diese --dry-run-Option kann zur Validierung der Befehlszeilenoptionen\n n\u00FCtzlich sein, wie der Modulsystemkonfiguration.\n -D=\n Setzt eine Systemeigenschaft\n -verbose:[class|gc|jni]\n Aktiviert Verbose-Ausgabe\n -version Druckt Produktversion und beendet den Vorgang\n -showversion Druckt Produktversion und f\u00E4hrt fort\n -? -help --help\n Gibt diese Hilfemeldung aus\n -X Gibt Hilfe zu Nicht-Standardoptionen aus\n -ea[:...|:]\n -enableassertions[:...|:]\n Aktiviert Assertions mit angegebener Granularit\u00E4t\n -da[:...|:]\n -disableassertions[:...|:]\n Deaktiviert Assertions mit angegebener Granularit\u00E4t\n -esa | -enablesystemassertions\n Aktiviert System-Assertions\n -dsa | -disablesystemassertions\n Deaktiviert System-Assertions\n -agentlib:[=]\n L\u00E4dt native Agent Library , Beispiel: -agentlib:jdwp\n siehe auch -agentlib:jdwp=help\n -agentpath:[=]\n L\u00E4dt native Agent Library nach vollst\u00E4ndigem Pfadnamen\n -javaagent:[=]\n L\u00E4dt Java-Programmiersprachen-Agent, siehe java.lang.instrument\n -splash:\n Zeigt Begr\u00FC\u00DFungsbildschirm mit angegebenem Bild an\n HiDPI-skalierte Bilder werden automatisch unterst\u00FCtzt und verwendet,\n sofern verf\u00FCgbar. Der nicht skalierte Bilddateiname, z.B. image.ext,\n muss immer als Argument an die Option -splash \u00FCbergeben werden.\n Das geeignetste skalierte Bild wird automatisch\n ausgew\u00E4hlt.\n Weitere Informationen finden Sie in der Dokumentation zu SplashScreen-API.\n @ Liest Optionen aus der angegebenen Datei\nZur Angabe eines Arguments f\u00FCr eine lange Option k\u00F6nnen Sie --= oder\n-- verwenden.\n -See Weitere Einzelheiten finden Sie unter http://www.oracle.com/technetwork/java/javase/documentation/index.html. - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch Deaktiviert Hintergrundkompilierung\n -Xbootclasspath/a:\n an Ende von Bootstrap-Klassenpfad anh\u00E4ngen\n -Xcheck:jni F\u00FChrt zus\u00E4tzliche Pr\u00FCfungen f\u00FCr JNI-Funktionen aus\n -Xcomp Erzwingt Kompilierung von Methoden beim ersten Aufruf\n -Xdebug Wird zur Abw\u00E4rtskompatiblit\u00E4t bereitgestellt\n -Xdiag Zeigt zus\u00E4tzliche Diagnosemeldungen\n -Xdiag:resolver Zeigt Resolver-Diagnosemeldungen\n -Xfuture Aktiviert strengste Pr\u00FCfungen, als m\u00F6glicher zuk\u00FCnftiger Standardwert erwartet\n -Xint Nur Ausf\u00FChrung im interpretierten Modus\n -Xinternalversion\n Zeigt detailliertere JVM-Versionsinformationen an als die\n -version-Option\n -Xloggc: Protokolliert GC-Status in einer Datei mit Zeitstempeln\n -Xmixed Ausf\u00FChrung im gemischten Modus (Standard)\n -Xmn Setzt die anf\u00E4ngliche und maximale Gr\u00F6\u00DFe (in Byte) des Heaps\n f\u00FCr die junge Generation (Nursery)\n -Xms Setzt die anf\u00E4ngliche Java-Heap-Gr\u00F6\u00DFe\n -Xmx Setzt die maximale Java-Heap-Gr\u00F6\u00DFe\n -Xnoclassgc Deaktiviert die Klassen-Garbage Collection\n -Xprof Gibt CPU-Profilierungsdaten aus\n -Xrs Reduziert die Verwendung von BS-Signalen durch Java/VM (siehe Dokumentation)\n -Xshare:auto Verwendet freigegebene Klassendaten, wenn m\u00F6glich (Standard)\n -Xshare:off Versucht nicht, freigegebene Klassendaten zu verwenden\n -Xshare:on Erfordert die Verwendung von freigegebenen Klassendaten, verl\u00E4uft sonst nicht erfolgreich.\n -XshowSettings Zeigt alle Einstellungen und f\u00E4hrt fort\n -XshowSettings:all\n Zeigt alle Einstellungen und f\u00E4hrt fort\n -XshowSettings:locale\n Zeigt alle gebietsschemabezogenen Einstellungen und f\u00E4hrt fort\n -XshowSettings:properties\n Zeigt alle Eigenschaftseinstellungen und f\u00E4hrt fort\n -XshowSettings:vm Zeigt alle VM-bezogenen Einstellungen und f\u00E4hrt fort\n -Xss Setzt Stackgr\u00F6\u00DFe des Java-Threads\n -Xverify Setzt den Modus der Bytecodeverifizierung\n --add-reads =(,)*\n Aktualisiert , damit gelesen wird, ungeachtet \n der Moduldeklaration. \n kann ALL-UNNAMED sein, um alle unbenannten\n Module zu lesen.\n --add-exports /=(,)*\n Aktualisiert , um in zu exportieren,\n ungeachtet der Moduldeklaration.\n kann ALL-UNNAMED sein, um in alle \n unbenannten Module zu exportieren.\n --disable-@files Deaktiviert das weitere Einblenden der Argumentdatei\n --patch-module =({0})*\n Setzt ein Modul au\u00DFer Kraft oder erweitert ein Modul mit Klassen und Ressourcen\n in JAR-Dateien oder -Verzeichnissen.\n\nDiese Optionen sind Nicht-Standardoptionen und k\u00F6nnen ohne Ank\u00FCndigung ge\u00E4ndert werden.\n +java.launcher.X.usage=\n -Xbatch Deaktiviert Hintergrundkompilierung\n -Xbootclasspath/a: \n an Ende von Bootstrap-Klassenpfad anh\u00E4ngen\n -Xcheck:jni F\u00FChrt zus\u00E4tzliche Pr\u00FCfungen f\u00FCr JNI-Funktionen aus\n -Xcomp Erzwingt Kompilierung von Methoden beim ersten Aufruf\n -Xdebug Wird zur Abw\u00E4rtskompatiblit\u00E4t bereitgestellt\n -Xdiag Zeigt zus\u00E4tzliche Diagnosemeldungen an\n -Xdiag:resolver Zeigt Resolver-Diagnosemeldungen an\n -Xfuture Aktiviert strengste Pr\u00FCfungen, wird als m\u00F6glicher zuk\u00FCnftiger Standardwert erwartet\n -Xint Nur Ausf\u00FChrung im interpretierten Modus\n -Xinternalversion\n Zeigt detailliertere JVM-Versionsinformationen an als die\n Option -version\n -Xloggc: Protokolliert GC-Status in einer Datei mit Zeitstempeln\n -Xmixed Ausf\u00FChrung im gemischten Modus (Standard)\n -Xmn Legt die anf\u00E4ngliche und maximale Gr\u00F6\u00DFe (in Byte) des Heaps\n f\u00FCr die junge Generation (Nursery) fest\n -Xms Legt die anf\u00E4ngliche Java-Heap-Gr\u00F6\u00DFe fest\n -Xmx Legt die maximale Java-Heap-Gr\u00F6\u00DFe fest\n -Xnoclassgc Deaktiviert die Klassen-Garbage Collection\n -Xprof Gibt CPU-Profilierungsdaten aus\n -Xrs Reduziert die Verwendung von BS-Signalen durch Java/VM (siehe Dokumentation)\n -Xshare:auto Verwendet, wenn m\u00F6glich, freigegebene Klassendaten (Standard)\n -Xshare:off Versucht, keine freigegebene Klassendaten zu verwenden\n -Xshare:on Erfordert die Verwendung von freigegebenen Klassendaten, verl\u00E4uft sonst nicht erfolgreich.\n -XshowSettings Zeigt alle Einstellungen an und f\u00E4hrt fort\n -XshowSettings:all\n Zeigt alle Einstellungen an und f\u00E4hrt fort\n -XshowSettings:locale\n Zeigt alle gebietsschemabezogenen Einstellungen an und f\u00E4hrt fort\n -XshowSettings:properties\n Zeigt alle Eigenschaftseinstellungen an und f\u00E4hrt fort\n -XshowSettings:vm Zeigt alle VM-bezogenen Einstellungen an und f\u00E4hrt fort\n -Xss Legt Stack-Gr\u00F6\u00DFe des Java-Threads fest\n -Xverify Legt den Modus der Bytecodeverifizierung fest\n --add-reads =(,)*\n Aktualisiert , damit ungeachtet der\n der Moduldeklaration gelesen wird. \n kann ALL-UNNAMED sein, um alle unbenannten\n Module zu lesen.\n --add-exports /=(,)*\n Aktualisiert , um ungeachtet der Moduldeklaration\n in zu exportieren.\n kann ALL-UNNAMED sein, um in alle \n unbenannten Module zu exportieren.\n --add-opens /=(,)*\n Aktualisiert , um ungeachtet der Moduldeklaration\n in zu \u00F6ffnen.\n --disable-@files Deaktiviert das weitere Einblenden der Argumentdatei\n --patch-module =({0})*\n \u00DCberschreibt oder erweitert ein Modul in JAR-Dateien\n oder -Verzeichnissen mit Klassen und Ressourcen.\n\nDiese zus\u00E4tzlichen Optionen k\u00F6nnen ohne Vorank\u00FCndigung ge\u00E4ndert werden. # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\nDie folgenden Optionen sind f\u00FCr Mac OS X spezifisch:\n -XstartOnFirstThread\n main()-Methode f\u00FCr den ersten (AppKit) Thread ausf\u00FChren\n -Xdock:name=\n Den im Dock angezeigten Standardanwendungsnamen \u00FCberschreiben\n -Xdock:icon=\n Das im Dock angezeigte Standardsymbol \u00FCberschreiben\n\n diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_es.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_es.properties index c8370841ab9..12052a2df6a 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_es.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_es.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -24,22 +24,19 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = Sintaxis: {0} [opciones] class [argumentos...]\n (para ejecutar una clase)\n o {0} [opciones] -jar jarfile [argumentos...]\n (para ejecutar un archivo jar)\n o {0} [opciones] -p -m [/] [argumentos...]\n (para ejecutar la clase principal en un m\u00F3dulo)\ndonde las opciones incluyen:\n +java.launcher.opt.header = Sintaxis: {0} [opciones] class [argumentos...]\n (para ejecutar una clase)\n o {0} [opciones] -jar jarfile [argumentos...]\n (para ejecutar un archivo jar)\n o {0} [opciones] -p -m [/] [argumentos...]\n (para ejecutar la clase principal en un m\u00F3dulo)\ndonde las opciones incluyen:\n\n java.launcher.opt.datamodel =\ -d{0}\t Anticuada, se eliminar\u00E1 en una versi\u00F3n futura\n java.launcher.opt.vmselect =\ {0}\t para seleccionar la VM "{1}"\n java.launcher.opt.hotspot =\ {0}\t es un sin\u00F3nimo de la VM "{1}" [anticuada]\n -java.launcher.ergo.message1 =\ La VM por defecto es {0} -java.launcher.ergo.message2 =\ porque la ejecuci\u00F3n se est\u00E1 llevando a cabo en una m\u00E1quina de clase de servidor.\n +# Translators please note do not translate the options themselves +java.launcher.opt.footer =-cp \n -classpath \n --class-path \n Lista separada por {0} de directorios, archivos JAR\n y archivos ZIP para buscar archivos de clase.\n -p \n --module-path ...\n Lista separada por {0} de directorios, cada directorio\n es un directorio de m\u00F3dulos.\n --upgrade-module-path ...\n Lista separada por {0} de directorios, cada directorio\n es un directorio de m\u00F3dulos que sustituye a los m\u00F3dulos\n actualizables en la imagen de tiempo de ejecuci\u00F3n\n -m [/]\n --module [/]\n m\u00F3dulo inicial que resolver y nombre de la clase principal\n que ejecutar si el m\u00F3dulo no la especifica\n --add-modules [,...]\n m\u00F3dulos ra\u00EDz que resolver, adem\u00E1s del m\u00F3dulo inicial.\n tambi\u00E9n puede ser ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --limit-modules [,...]\n limitar el universo de los m\u00F3dulos observables\n --list-modules [[,...]]\n mostrar los m\u00F3dulos observables y salir\n --dry-run crear VM pero no ejecutar m\u00E9todo principal.\n Esta opci\u00F3n --dry-run puede ser \u00FAtil para validar las\n opciones de l\u00EDnea de comandos como la configuraci\u00F3n del sistema de m\u00F3dulo.\n -D=\n definir una propiedad del sistema\n -verbose:[class|gc|jni]\n activar la salida detallada\n -version imprimir la versi\u00F3n del producto en el flujo de errores y salir\n ---version imprimir la versi\u00F3n del producto en el flujo de salida y salir\n -showversion imprimir la versi\u00F3n del producto en el flujo de errores y continuar\n --show-version\n imprimir la versi\u00F3n del producto en el flujo de salida y continuar\n -? -h -help\n imprimir este mensaje de ayuda en el flujo de errores\n --help imprimir este mensaje de ayuda en el flujo de salida\n -X imprimir la ayuda de opciones adicionales en el flujo de errores\n --help-extra imprimir la ayuda de opciones adicionales en el fujo de salida\n -ea[:...|:]\n -enableassertions[:...|:]\n activar afirmaciones con la granularidad especificada\n -da[:...|:]\n -disableassertions[:...|:]\n desactivar afirmaciones con la granularidad especificada\n -esa | -enablesystemassertions\n activar afirmaciones del sistema\n -dsa | -disablesystemassertions\n desactivar afirmaciones del sistema\n -agentlib:[=]\n cargar biblioteca de agentes nativos , por ejemplo, -agentlib:jdwp\n ver tambi\u00E9n -agentlib:jdwp=help\n -agentpath:[=]\n cargar biblioteca de agentes nativos por nombre de ruta completo\n -javaagent:[=]\n cargar agente de lenguaje de programaci\u00F3n Java, ver java.lang.instrument\n -splash:\n mostrar pantalla de presentaci\u00F3n con la imagen especificada\n Las im\u00E1genes a escala HiDPI est\u00E1n \ +soportadas y se usan autom\u00E1ticamente\n si est\u00E1n disponibles. El nombre de archivo de la imagen sin escala, por ejemplo, image.ext,\n siempre debe transferirse como el argumento en la opci\u00F3n -splash.\n La imagen a escala m\u00E1s adecuada que se haya proporcionado se escoger\u00E1\n autom\u00E1ticamente.\n Consulte la documentaci\u00F3n de la API de la pantalla de presentaci\u00F3n para obtener m\u00E1s informaci\u00F3n.\n en leer opciones del archivo especificado\nPara especificar un argumento para una opci\u00F3n larga, puede usar --= o\n-- . # Translators please note do not translate the options themselves -java.launcher.opt.footer =\ -cp \n -classpath \n --class-path \n Lista separada por {0} de directorios, archivos JAR\n y archivos ZIP para buscar archivos de clase.\n -p \n --module-path ...\n Lista separada por {0} de directorios, cada directorio\n es un directorio de m\u00F3dulos.\n --upgrade-module-path ...\n Lista separada por {0} de directorios, cada directorio\n es un directorio de m\u00F3dulos que sustituye a los m\u00F3dulos\n actualizables en la imagen de tiempo de ejecuci\u00F3n\n -m [/]\n --module [/]\n m\u00F3dulo inicial que resolver y nombre de la clase principal\n que ejecutar si el m\u00F3dulo no la especifica\n --add-modules [,...]\n m\u00F3dulos ra\u00EDz que resolver, adem\u00E1s del m\u00F3dulo inicial.\n tambi\u00E9n puede ser ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --limit-modules [,...]\n limitar el universo de los m\u00F3dulos observables\n --list-modules [[,...]]\n mostrar los m\u00F3dulos observables y salir\n --dry-run crear VM pero no ejecutar m\u00E9todo principal.\n Esta opci\u00F3n --dry-run puede ser \u00FAtil para validar las\n opciones de l\u00EDnea de comandos como la configuraci\u00F3n del sistema de m\u00F3dulo.\n -D=\n definir una propiedad del sistema\n -verbose:[class|gc|jni]\n activar la salida detallada\n -version imprimir la versi\u00F3n del producto y salir\n -showversion imprimir la versi\u00F3n del producto y continuar\n -? -help --help\n imprimir este mensaje de ayuda\n -X imprimir la ayuda de opciones no est\u00E1ndar\n -ea[:...|:]\n -enableassertions[:...|:]\n activar afirmaciones con la granularidad especificada\n -da[:...|:]\n -disableassertions[:...|:]\n desactivar afirmaciones con la granularidad especificada\n -esa | -enablesystemassertions\n activar afirmaciones del sistema\n -dsa | -disablesystemassertions\n desactivar afirmaciones del sistema\n -agentlib:[=]\n cargar biblioteca de agentes nativos , por ejemplo, -agentlib:jdwp\n ver tambi\u00E9n -agentlib:jdwp=help\n -agentpath:[=]\n cargar biblioteca de agentes nativos por nombre de ruta completo\n -javaagent:[=]\n cargar agente de lenguaje de programaci\u00F3n Java, ver java.lang.instrument\n -splash:\n mostrar pantalla de bienvenida con la imagen especificada\n Las im\u00E1genes a escala HiDPI est\u00E1n soportadas y se usan autom\u00E1ticamente\n si est\u00E1n disponibles. El nombre de archivo de la imagen sin escala, por ejemplo, image.ext,\n siempre debe transferirse como el argumento en la opci\u00F3n -splash.\n La imagen a escala m\u00E1s adecuada que se haya proporcionado se escoger\u00E1\n autom\u00E1ticamente.\n Consulte la documentaci\u00F3n de \ -la API de la pantalla de bienvenida para obtener m\u00E1s informaci\u00F3n.\n en leer opciones del archivo especificado\nPara especificar un argumento para una opci\u00F3n larga, puede usar --= o\n-- .\n -See http://www.oracle.com/technetwork/java/javase/documentation/index.html para obtener m\u00E1s informaci\u00F3n. - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch desactivar compilaci\u00F3n de fondo\n -Xbootclasspath/a:\n agregar al final de la ruta de la clase de inicializaci\u00F3n de datos\n -Xcheck:jni realizar comprobaciones adicionales para las funciones de JNI\n -Xcomp fuerza la compilaci\u00F3n de m\u00E9todos en la primera llamada\n -Xdebug se proporciona para ofrecer compatibilidad con versiones anteriores\n -Xdiag mostrar mensajes de diagn\u00F3stico adicionales\n -Xdiag:resolver mostrar mensajes de diagn\u00F3stico de resoluci\u00F3n\n -Xfuture activar las comprobaciones m\u00E1s estrictas, anticip\u00E1ndose al futuro valor por defecto\n -Xint solo ejecuci\u00F3n de modo interpretado\n -Xinternalversion\n muestra una informaci\u00F3n de la versi\u00F3n de JVM m\u00E1s detallada que la\n opci\u00F3n -version\n -Xloggc: registrar el estado de GC en un archivo con registros de hora\n -Xmixed ejecuci\u00F3n de modo mixto (por defecto)\n -Xmn define el tama\u00F1o inicial y m\u00E1ximo (en bytes) de la pila\n para la generaci\u00F3n m\u00E1s joven (espacio infantil)\n -Xms define el tama\u00F1o inicial de la pila de Java\n -Xmx define el tama\u00F1o m\u00E1ximo de la pila de Java\n -Xnoclassgc desactivar la recolecci\u00F3n de basura de clases\n -Xprof datos de creaci\u00F3n de perfiles de CPU de salida\n -Xrs reducir el uso de se\u00F1ales de sistema operativo por parte de Java/VM (consulte la documentaci\u00F3n)\n -Xshare:auto usar datos de clase compartidos si es posible (valor por defecto)\n -Xshare:off no intentar usar datos de clase compartidos\n -Xshare:on es obligatorio el uso de datos de clase compartidos, de lo contrario se producir\u00E1 un fallo.\n -XshowSettings mostrar toda la configuraci\u00F3n y continuar\n -XshowSettings:all\n mostrar todos los valores y continuar\n -XshowSettings:locale\n mostrar todos los valores relacionados con la configuraci\u00F3n regional y continuar\n -XshowSettings:properties\n mostrar todos los valores de propiedad y continuar\n -XshowSettings:vm mostrar todos los valores relacionados con vm y continuar\n -Xss definir tama\u00F1o de la pila del thread de Java\n -Xverify define el modo del verificador de c\u00F3digo de bytes\n --add-reads =(,)*\n actualiza para leer , independientemente\n de la declaraci\u00F3n del m\u00F3dulo. \n puede ser ALL-UNNAMED para leer todos los\n m\u00F3dulos sin nombre.\n --add-exports /=(,)*\n actualiza para exportar en ,\n independientemente de la declaraci\u00F3n del m\u00F3dulo.\n puede ser ALL-UNNAMED para exportar a todos los\n m\u00F3dulos sin nombre.\n --disable-@files desactivar la ampliaci\u00F3n de archivos de m\u00E1s argumentos\n --patch-module =({0})*\n Aumentar o anular un m\u00F3dulo con clases y recursos\n en directorios y archivos JAR\n\nEstas opciones no son est\u00E1ndar y est\u00E1n sujetas a cambio sin previo aviso.\n +java.launcher.X.usage=-Xbatch desactivar compilaci\u00F3n de fondo\n -Xbootclasspath/a:\n agregar al final de la ruta de la clase de inicializaci\u00F3n de datos\n -Xcheck:jni realizar comprobaciones adicionales para las funciones de JNI\n -Xcomp fuerza la compilaci\u00F3n de m\u00E9todos en la primera llamada\n -Xdebug se proporciona para ofrecer compatibilidad con versiones anteriores\n -Xdiag mostrar mensajes de diagn\u00F3stico adicionales\n -Xdiag:resolver mostrar mensajes de diagn\u00F3stico de resoluci\u00F3n\n -Xfuture activar las comprobaciones m\u00E1s estrictas, anticip\u00E1ndose al futuro valor por defecto\n -Xint solo ejecuci\u00F3n de modo interpretado\n -Xinternalversion\n muestra una informaci\u00F3n de la versi\u00F3n de JVM m\u00E1s detallada que la\n opci\u00F3n -version\n -Xloggc: registrar el estado de GC en un archivo con registros de hora\n -Xmixed ejecuci\u00F3n de modo mixto (por defecto)\n -Xmn define el tama\u00F1o inicial y m\u00E1ximo (en bytes) de la pila\n para la generaci\u00F3n m\u00E1s joven (espacio infantil)\n -Xms define el tama\u00F1o inicial de la pila de Java\n -Xmx define el tama\u00F1o m\u00E1ximo de la pila de Java\n -Xnoclassgc desactivar la recolecci\u00F3n de basura de clases\n -Xprof datos de creaci\u00F3n de perfiles de CPU de salida\n -Xrs reducir el uso de se\u00F1ales de sistema operativo por parte de Java/VM (consulte la documentaci\u00F3n)\n -Xshare:auto usar datos de clase compartidos si es posible (valor por defecto)\n -Xshare:off no intentar usar datos de clase compartidos\n -Xshare:on es obligatorio el uso de datos de clase compartidos, de lo contrario se producir\u00E1 un fallo.\n -XshowSettings mostrar toda la configuraci\u00F3n y continuar\n -XshowSettings:all\n mostrar todos los valores y continuar\n -XshowSettings:locale\n mostrar todos los valores relacionados con la configuraci\u00F3n regional y continuar\n -XshowSettings:properties\n mostrar todos los valores de propiedad y continuar\n -XshowSettings:vm mostrar todos los valores relacionados con vm y continuar\n -Xss definir tama\u00F1o de la pila del thread de Java\n -Xverify define el modo del verificador de c\u00F3digo de bytes\n --add-reads =(,)*\n actualiza para leer , independientemente\n de la declaraci\u00F3n del m\u00F3dulo. \n puede ser ALL-UNNAMED para leer todos los\n m\u00F3dulos sin nombre.\n --add-exports /=(,)*\n actualiza para exportar en ,\n independientemente de la declaraci\u00F3n del m\u00F3dulo.\n puede ser ALL-UNNAMED para exportar a todos los\n m\u00F3dulos sin nombre.\n --add-opens /=(,)*\n actualiza para abrir en\n , independientemente de la declaraci\u00F3n del m\u00F3dulo.\n --disable-@files desactivar la ampliaci\u00F3n de archivos de m\u00E1s argumentos\n --patch-module =({0})*\n Aumentar o anular un m\u00F3dulo con clases y recursos\n en directorios o archivos JAR\n\nEstas opciones \ +son adicionales y est\u00E1n sujetas a cambio sin previo aviso. # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\nLas siguientes opciones son espec\u00EDficas para Mac OS X:\n -XstartOnFirstThread\n ejecutar el m\u00E9todo main() del primer thread (AppKit)\n -Xdock:name=\n sustituir al nombre por defecto de la aplicaci\u00F3n que se muestra en el Dock\n -Xdock:icon=\n sustituir al icono por defecto que se muestra en el Dock\n\n diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_fr.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_fr.properties index 974388514ba..49179530b44 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_fr.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_fr.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -24,23 +24,19 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = Syntaxe : {0} [options] class [args...]\n (pour l''ex\u00E9cution d''une classe)\n ou {0} [options] -jar jarfile [args...]\n (pour l''ex\u00E9cution d''un fichier JAR)\n ou {0} [options] -p -m [/] [args...]\n (pour l''ex\u00E9cution de la classe principale dans un module)\no\u00F9 options comprend les \u00E9l\u00E9ments suivants :\n +java.launcher.opt.header = Syntaxe : {0} [options] class [args...]\n (pour l''ex\u00E9cution d''une classe)\n ou {0} [options] -jar jarfile [args...]\n (pour l''ex\u00E9cution d''un fichier JAR)\n ou {0} [options] -p -m [/] [args...]\n (pour l''ex\u00E9cution de la classe principale dans un module)\n\no\u00F9 options comprend les \u00E9l\u00E9ments suivants :\n\n java.launcher.opt.datamodel =\ -d{0}\t En phase d''abandon, sera enlev\u00E9 dans une version future\n java.launcher.opt.vmselect =\ {0}\t pour s\u00E9lectionner la machine virtuelle "{1}"\n java.launcher.opt.hotspot =\ {0}\t est un synonyme pour la machine virtuelle "{1}" [en phase d''abandon]\n -java.launcher.ergo.message1 =\ La machine virtuelle par d\u00E9faut est {0} -java.launcher.ergo.message2 =\ car vous ex\u00E9cutez une machine de classe de serveur.\n +# Translators please note do not translate the options themselves +java.launcher.opt.footer =\ -cp \n -classpath \n --class-path \n Liste de r\u00E9pertoires, d''archives JAR\n et d''archives ZIP s\u00E9par\u00E9s par des {0} dans laquelle rechercher les fichiers de classe.\n -p \n --module-path ...\n Liste de r\u00E9pertoires s\u00E9par\u00E9s par des {0}, chaque r\u00E9pertoire\n est un r\u00E9pertoire de modules.\n --upgrade-module-path ...\n Liste de r\u00E9pertoires s\u00E9par\u00E9s par des {0}, chaque r\u00E9pertoire\n est un r\u00E9pertoire de modules qui remplacent des modules\n pouvant \u00EAtre mis \u00E0 niveau dans l''image d''ex\u00E9cution\n -m [/]\n --module [/]\n module initial \u00E0 r\u00E9soudre et nom de la classe principale\n \u00E0 ex\u00E9cuter si elle n''est pas indiqu\u00E9e par le module\n --add-modules [,...]\n modules racine \u00E0 r\u00E9soudre en plus du module initial.\n peut \u00E9galement \u00EAtre ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --limit-modules [,...]\n limitation de l''univers de modules observables\n --list-modules [[,...]]\n \u00E9num\u00E9ration des modules observables et fin de l''op\u00E9ration\n --dry-run cr\u00E9e une machine virtuelle mais n''ex\u00E9cute pas la m\u00E9thode principale.\n Cette option --dry-run peut s''av\u00E9rer utile pour la validation des\n options de ligne de commandes telles que la configuration syst\u00E8me de module.\n -D=\n d\u00E9finition d''une propri\u00E9t\u00E9 syst\u00E8me\n -verbose:[class|gc|jni]\n activation de la sortie en mode verbose\n -version affichage de la version du produit dans le flux d''erreur et fin de l''op\u00E9ration\n --version affichage de la version du produit dans le flux de sortie et fin de l''op\u00E9ration\n -showversion affichage de la version du produit dans le flux d''erreur et poursuite de l''op\u00E9ration\n --show-version\n affichage de la version du produit dans le flux de sortie et poursuite de l''op\u00E9ration\n -? -h -help\n affichage de ce message d''aide dans le flux d''erreur\n --help affichage de ce message d''aide dans le flux de sortie\n -X affichage de l''aide sur les options suppl\u00E9mentaires dans le flux d''erreur\n --help-extra affichage de l''aide sur les options suppl\u00E9mentaires dans le flux de sortie\n -ea[:...|:]\n -enableassertions[:...|:]\n activation des assertions avec la granularit\u00E9 indiqu\u00E9e\n -da[:...|:]\n -disableassertions[:...|:]\n d\u00E9sactivation des assertions avec la granularit\u00E9 indiqu\u00E9e\n -esa | -enablesystemassertions\n activation des assertions syst\u00E8me\n -dsa | -disablesystemassertions\n d\u00E9sactivation des assertions syst\u00E8me\n -agentlib:[=]\n chargement de la biblioth\u00E8que d''agents natifs , par exemple : -agentlib:jdwp\n voir aussi -agentlib:jdwp=help\n -agentpath:[=]\n chargement de la biblioth\u00E8que d''agents natifs via le chemin d''acc\u00E8s complet\n \ +-javaagent:[=]\n chargement de l''agent de langage de programmation Java, voir java.lang.instrument\n -splash:\n affichage de l''\u00E9cran d''accueil avec l''image indiqu\u00E9e\n Les images redimensionn\u00E9es HiDPI sont automatiquement prises en charge et utilis\u00E9es\n si elles sont disponibles. Le nom de fichier d''une image non redimensionn\u00E9e, par ex. image.ext,\n doit toujours \u00EAtre transmis comme argument \u00E0 l''option -splash.\n L''image redimensionn\u00E9e fournie la plus appropri\u00E9e sera automatiquement\n s\u00E9lectionn\u00E9e.\n Pour plus d''informations, reportez-vous \u00E0 la documentation relative \u00E0 l''API SplashScreen.\n @ lecture des options \u00E0 partir du fichier indiqu\u00E9\n\nPour indiquer un argument pour une option longue, vous pouvez utiliser --= ou\n-- .\n # Translators please note do not translate the options themselves -java.launcher.opt.footer =\ -cp \n -classpath \n --class-path \n Liste de r\u00E9pertoires, d''archives JAR\n et d''archives ZIP s\u00E9par\u00E9s par des {0} dans laquelle rechercher les fichiers de classe.\n -p \n --module-path ...\n Liste de r\u00E9pertoires s\u00E9par\u00E9s par des {0}, chaque r\u00E9pertoire\n est un r\u00E9pertoire de modules.\n --upgrade-module-path ...\n Liste de r\u00E9pertoires s\u00E9par\u00E9s par des {0}, chaque r\u00E9pertoire\n est un r\u00E9pertoire de modules qui remplace des modules\n pouvant \u00EAtre mis \u00E0 niveau dans l''image d''ex\u00E9cution\n -m [/]\n --module [/]\n module initial \u00E0 r\u00E9soudre et nom de la classe principale\n \u00E0 ex\u00E9cuter si elle n''est pas indiqu\u00E9e par le module\n --add-modules [,...]\n modules racine \u00E0 r\u00E9soudre en plus du module initial.\n peut \u00E9galement \u00EAtre ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --limit-modules [,...]\n limitation de l''univers de modules observables\n --list-modules [[,...]]\n \u00E9num\u00E9ration des modules observables et fin de l''op\u00E9ration\n --dry-run cr\u00E9e une machine virtuelle mais n''ex\u00E9cute pas la m\u00E9thode principale.\n Cette option --dry-run peut s''av\u00E9rer utile pour la validation des\n options de ligne de commandes telles que la configuration syst\u00E8me de module.\n -D=\n d\u00E9finition d''une propri\u00E9t\u00E9 syst\u00E8me\n -verbose:[class|gc|jni]\n activation de la sortie en mode verbose\n -version affichage de la version du produit et fin de l''op\u00E9ration\n -showversion affichage de la version du produit et poursuite de l''op\u00E9ration\n -? -help --help\n affichage du message d''aide\n -X affichage de l''aide sur les options non standard\n -ea[:...|:]\n -enableassertions[:...|:]\n activation des assertions avec la granularit\u00E9 sp\u00E9cifi\u00E9e\n -da[:...|:]\n -disableassertions[:...|:]\n d\u00E9sactivation des assertions avec la granularit\u00E9 sp\u00E9cifi\u00E9e\n -esa | -enablesystemassertions\n activation des assertions syst\u00E8me\n -dsa | -disablesystemassertions\n d\u00E9sactivation des assertions syst\u00E8me\n -agentlib:[=]\n chargement de la biblioth\u00E8que d''agent natif , par exemple : -agentlib:jdwp\n voir aussi -agentlib:jdwp=help\n -agentpath:[=]\n chargement de la biblioth\u00E8que d''agent natif via le chemin d''acc\u00E8s complet\n -javaagent:[=]\n chargement de l''agent du langage de programmation Java, voir java.lang.instrument\n -splash:\n affichage de l''\u00E9cran d''accueil avec l''image indiqu\u00E9e\n Les images redimensionn\u00E9es HiDPI sont automatiquement prises en charge et utilis\u00E9es\n si elles sont disponibles. Le nom de fichier d''une image non redimensionn\u00E9e, par ex. image.ext,\n doit toujours \ -\u00EAtre transmis comme argument \u00E0 l''option -splash.\n L''image redimensionn\u00E9e fournie la plus appropri\u00E9e sera automatiquement\n s\u00E9lectionn\u00E9e.\n Pour plus d''informations, reportez-vous \u00E0 la documentation relative \u00E0 l''API SplashScreen.\n @ lire les options \u00E0 partir du fichier indiqu\u00E9\nPour indiquer un argument pour une option longue, vous pouvez utiliser --= ou\n-- .\n -See http://www.oracle.com/technetwork/java/javase/documentation/index.html pour plus de d\u00E9tails. - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch d\u00E9sactivation de la compilation en arri\u00E8re-plan\n -Xbootclasspath/a:\n ajout \u00E0 la fin du chemin de classe bootstrap\n -Xcheck:jni ex\u00E9cution de contr\u00F4les suppl\u00E9mentaires pour les fonctions JNI\n -Xcomp force la compilation de m\u00E9thodes au premier appel\n -Xdebug fourni pour la compatibilit\u00E9 amont\n -Xdiag affichage de messages de diagnostic suppl\u00E9mentaires\n -Xdiag:resolver affichage de messages de diagnostic du r\u00E9solveur\n -Xfuture activation des contr\u00F4les les plus stricts en vue d''anticiper la future valeur par d\u00E9faut\n -Xint ex\u00E9cution en mode interpr\u00E9t\u00E9 uniquement\n -Xinternalversion\n affiche des informations de version JVM plus d\u00E9taill\u00E9es que\n l''option -version\n -Xloggc: journalisation du statut de l''op\u00E9ration de ramasse-miette dans un fichier avec horodatage\n -Xmixed ex\u00E9cution en mode mixte (valeur par d\u00E9faut)\n -Xmn d\u00E9finit les tailles initiale et maximale (en octets) de la portion de m\u00E9moire\n pour la jeune g\u00E9n\u00E9ration (nursery)\n -Xms d\u00E9finition de la taille initiale des portions de m\u00E9moire Java\n -Xmx d\u00E9finition de la taille maximale des portions de m\u00E9moire Java\n -Xnoclassgc d\u00E9sactivation de l''op\u00E9ration de ramasse-miette de la classe\n -Xprof sortie des donn\u00E9es de profilage d''UC\n -Xrs r\u00E9duction de l''utilisation des signaux OS par Java/la machine virtuelle (voir documentation)\n -Xshare:auto utilisation des donn\u00E9es de classe partag\u00E9es si possible (valeur par d\u00E9faut)\n -Xshare:off aucune tentative d''utilisation des donn\u00E9es de classe partag\u00E9es\n -Xshare:on utilisation des donn\u00E9es de classe partag\u00E9es obligatoire ou \u00E9chec de l''op\u00E9ration\n -XshowSettings affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n -XshowSettings:all\n affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n -XshowSettings:locale\n affichage de tous les param\u00E8tres d''environnement local et poursuite de l''op\u00E9ration\n -XshowSettings:properties\n affichage de tous les param\u00E8tres de propri\u00E9t\u00E9 et poursuite de l''op\u00E9ration\n -XshowSettings:vm affichage de tous les param\u00E8tres de machine virtuelle et poursuite de l''op\u00E9ration\n -Xss d\u00E9finition de la taille de pile de threads Java\n -Xverify d\u00E9finit le mode du v\u00E9rificateur de code ex\u00E9cutable\n --add-reads =(,)*\n met \u00E0 jour pour lire , sans tenir compte\n de la d\u00E9claration de module. \n peut \u00EAtre ALL-UNNAMED pour lire tous les modules\n sans nom.\n --add-exports /=(,)*\n met \u00E0 jour pour exporter vers ,\n sans tenir compte de la d\u00E9claration de module.\n peut \u00EAtre ALL-UNNAMED pour effectuer un export vers tous\n les modules sans nom.\n --disable-@files d\u00E9sactivation d''autres d\u00E9veloppements de fichier d''argument\n --patch-module =({0})*\n Remplacement ou augmentation d''un module avec des classes et des ressources\n dans des \ -fichiers ou des r\u00E9pertoires JAR.\n\nCes options ne sont pas standard et peuvent \u00EAtre modifi\u00E9es sans pr\u00E9avis.\n +java.launcher.X.usage=\n -Xbatch d\u00E9sactivation de la compilation en arri\u00E8re-plan\n -Xbootclasspath/a:\n ajout \u00E0 la fin du chemin de classe bootstrap\n -Xcheck:jni ex\u00E9cution de contr\u00F4les suppl\u00E9mentaires pour les fonctions JNI\n -Xcomp force la compilation de m\u00E9thodes au premier appel\n -Xdebug fourni pour la compatibilit\u00E9 amont\n -Xdiag affichage de messages de diagnostic suppl\u00E9mentaires\n -Xdiag:resolver affichage de messages de diagnostic du r\u00E9solveur\n -Xfuture activation des contr\u00F4les les plus stricts en vue d''anticiper la future valeur par d\u00E9faut\n -Xint ex\u00E9cution en mode interpr\u00E9t\u00E9 uniquement\n -Xinternalversion\n affiche des informations de version JVM plus d\u00E9taill\u00E9es que\n l''option -version\n -Xloggc: journalisation du statut de l''op\u00E9ration de ramasse-miette dans un fichier avec horodatage\n -Xmixed ex\u00E9cution en mode mixte (valeur par d\u00E9faut)\n -Xmn d\u00E9finit les tailles initiale et maximale (en octets) de la portion de m\u00E9moire\n pour la jeune g\u00E9n\u00E9ration (nursery)\n -Xms d\u00E9finition de la taille initiale des portions de m\u00E9moire Java\n -Xmx d\u00E9finition de la taille maximale des portions de m\u00E9moire Java\n -Xnoclassgc d\u00E9sactivation de l''op\u00E9ration de ramasse-miette de la classe\n -Xprof sortie des donn\u00E9es de profilage d''UC\n -Xrs r\u00E9duction de l''utilisation des signaux OS par Java/la machine virtuelle (voir documentation)\n -Xshare:auto utilisation des donn\u00E9es de classe partag\u00E9es si possible (valeur par d\u00E9faut)\n -Xshare:off aucune tentative d''utilisation des donn\u00E9es de classe partag\u00E9es\n -Xshare:on utilisation des donn\u00E9es de classe partag\u00E9es obligatoire ou \u00E9chec de l''op\u00E9ration\n -XshowSettings affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n -XshowSettings:all\n affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n -XshowSettings:locale\n affichage de tous les param\u00E8tres d''environnement local et poursuite de l''op\u00E9ration\n -XshowSettings:properties\n affichage de tous les param\u00E8tres de propri\u00E9t\u00E9 et poursuite de l''op\u00E9ration\n -XshowSettings:vm affichage de tous les param\u00E8tres de machine virtuelle et poursuite de l''op\u00E9ration\n -Xss d\u00E9finition de la taille de pile de threads Java\n -Xverify d\u00E9finit le mode du v\u00E9rificateur de code ex\u00E9cutable\n --add-reads =(,)*\n met \u00E0 jour pour lire , sans tenir compte\n de la d\u00E9claration de module. \n peut \u00EAtre ALL-UNNAMED pour lire tous les modules\n sans nom.\n --add-exports /=(,)*\n met \u00E0 jour pour exporter vers ,\n sans tenir compte de la d\u00E9claration de module.\n peut \u00EAtre ALL-UNNAMED pour effectuer un export vers tous\n les modules sans nom.\n --add-opens /=(,)*\n met \u00E0 jour pour ouvrir vers\n \ +, sans tenir compte de la d\u00E9claration de module\n --disable-@files d\u00E9sactivation d''autres d\u00E9veloppements de fichier d''argument\n --patch-module =({0})*\n Remplacement ou augmentation d''un module avec des classes et des ressources\n dans des fichiers ou des r\u00E9pertoires JAR.\n\nCes options suppl\u00E9mentaires peuvent \u00EAtre modifi\u00E9es sans pr\u00E9avis.\n # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\nLes options suivantes sont propres \u00E0 Mac OS X :\n -XstartOnFirstThread\n ex\u00E9cute la m\u00E9thode main() sur le premier thread (AppKit)\n -Xdock:name=\n remplace le nom d'application par d\u00E9faut affich\u00E9 dans l'ancrage\n -Xdock:icon=\n remplace l'ic\u00F4ne par d\u00E9faut affich\u00E9e dans l'ancrage\n\n diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_it.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_it.properties index d06e6997728..7be6b1f81fd 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_it.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_it.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -24,22 +24,18 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = Uso: {0} [opzioni] class [argomenti...]\n (per eseguire una classe)\n oppure {0} [opzioni] -jar jarfile [argomenti...]\n (per eseguire un file jar)\n oppure {0} [opzioni] -p -m [/] [argomenti...]\n (per eseguire la classe principale in un modulo)\ndove opzioni include:\n +java.launcher.opt.header = Uso: {0} [opzioni] class [argomenti...]\n (per eseguire una classe)\n oppure {0} [opzioni] -jar jarfile [argomenti...]\n (per eseguire un file jar)\n oppure {0} [opzioni] -p -m [/] [argomenti...]\n (per eseguire la classe principale in un modulo)\ndove opzioni include:\n\n java.launcher.opt.datamodel =\ -d{0}\t opzione non pi\u00F9 valida; verr\u00E0 rimossa in una release futura\n java.launcher.opt.vmselect =\ {0}\t per selezionare la VM "{1}"\n java.launcher.opt.hotspot =\ {0}\t \u00E8 un sinonimo per la VM "{1}" [non valido]\n -java.launcher.ergo.message1 =\ La VM predefinita \u00E8 {0} -java.launcher.ergo.message2 =\ perch\u00E9 si utilizza un computer di classe server.\n +# Translators please note do not translate the options themselves +java.launcher.opt.footer =\ -cp \n -classpath \n --class-path \n Lista separata da {0} di directory, archivi JAR\n e archivi ZIP utilizzata per la ricerca di file di classe.\n -p \n -module-path ...\n Lista separata da {0} di directory; ciascuna directory\n \u00E8 una directory di moduli.\n -upgrade-module-path ...\n Lista separata da {0} di directory; ciascuna directory\n \u00E8 una directory dei moduli che sostituiscono i moduli\n aggiornabili nell''immagine in fase di esecuzione.\n -m [/]\n --module [/]\n Il modulo iniziale da risolvere e il nome della classe\n principale da eseguire se non specificata dal modulo.\n -add-modules [,...]\n Moduli root da risolvere in aggiunta al modulo iniziale.\n pu\u00F2 essere anche ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n -limit-modules [,...]\n Limita l''universe dei moduli osservabili.\n -list-modules[:[,...]]\n Elenca i moduli osservabili ed esce.\n --dry-run Crea la VM ma non esegue il metodo principale.\n Pu\u00F2 essere utile, ad esempio, per la convalida delle opzioni della\n riga di comando utilizzate per la configurazione del sistema di moduli.\n -D=\n Imposta una propriet\u00E0 di sistema.\n -verbose:[class|gc|jni]\n Abilita l''output descrittivo.\n -version Visualizza la versione del prodotto ed esce.\n --version Visualizza la versione del prodotto nel flusso di output ed esce.\n -showversion Visualizza la versione del prodotto nel flusso di errori e continua.\n --show-version\n Visualizza la versione del prodotto nel flusso di output e continua.\n -? -h -help\n Visualizza questo messaggio della Guida nel flusso di errori.\n --help Visualizza questo messaggio della Guida nel flusso di output.\n -X Visualizza la Guida relativa alle opzioni non standard nel flusso di errori.\n --help-extra Visualizza la Guida relativa alle opzioni non standard nel flusso di output.\n -ea[:...|:]\n -enableassertions[:...|:]\n Abilita le asserzioni con la granularit\u00E0 specificata.\n -da[:...|:]\n -disableassertions[:...|:]\n Disabilita le asserzioni con la granularit\u00E0 specificata.\n -esa | -enablesystemassertions\n Abilita le asserzioni di sistema.\n -dsa | -disablesystemassertions\n Disabilita le asserzioni di sistema.\n -agentlib:[=]\n Carica la libreria agenti nativa , ad esempio -agentlib:jdwp.\n Vedere anche -agentlib:jdwp=help.\n -agentpath:[=]\n Carica la libreria agenti nativa con il percorso completo.\n -javaagent:[=]\n Carica l''agente del linguaggio di programmazione Java. Vedere java.lang.instrument.\n -splash:\n Mostra la schermata iniziale con l''immagine specificata.\n Le immagini ridimensionate HiDPI sono supportate e utilizzate automaticamente\n se disponibili. I nomi file delle immagini non ridimensionate, ad esempio image.ext,\n devono \ +essere sempre passati come argomenti all''opzione -splash.\n Verr\u00E0 scelta automaticamente l''immagine ridimensionata pi\u00F9 appropriata\n fornita.\n Per ulteriori informazioni, vedere la documentazione relativa all''API SplashScreen.\n @ Legge le opzioni dal file specificato.\n\nPer specificare un argomento per un''opzione lunga, \u00E8 possibile utilizzare --= o\n-- .\n # Translators please note do not translate the options themselves -java.launcher.opt.footer =\ -cp \n -classpath \n --class-path \n Lista separata da {0} di directory e di archivi JAR\n e ZIP utilizzata per la ricerca di file di classe.\n -p \n -module-path ...\n Lista separata da {0} di directory; ciascuna directory\n \u00E8 una directory di moduli.\n -upgrade-module-path ...\n Lista separata da {0} di directory; ciascuna directory\n \u00E8 una directory dei moduli che sostituiscono i moduli\n aggiornabili nell''immagine in fase di esecuzione.\n -m [/]\n --module [/]\n Il modulo iniziale da risolvere e il nome della classe\n principale da eseguire se non specificata dal modulo.\n -add-modules [,...]\n Moduli root da risolvere in aggiunta al modulo iniziale.\n pu\u00F2 essere anche ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n -limit-modules [,...]\n Limita l''universe dei moduli osservabili.\n -list-modules[:[,...]]\n Elenca i moduli osservabili ed esce.\n --dry-run Crea la VM ma non esegue il metodo principale.\n Pu\u00F2 essere utile, ad esempio, per la convalida delle opzioni della\n riga di comando utilizzate per la configurazione del sistema di moduli.\n -D=\n Imposta una propriet\u00E0 di sistema.\n -verbose:[class|gc|jni]\n Abilita l''output descrittivo.\n -version Visualizza la versione del prodotto ed esce.\n -showversion Visualizza la versione del prodotto e continua\n -? -help --help\n Visualizza questo messaggio della Guida.\n -X Visualizza la Guida relativa alle opzioni non standard.\n -ea[:...|:]\n -enableassertions[:...|:]\n Abilita le asserzioni con la granularit\u00E0 specificata.\n -da[:...|:]\n -disableassertions[:...|:]\n Disabilita le asserzioni con la granularit\u00E0 specificata.\n -esa | -enablesystemassertions\n Abilita le asserzioni di sistema.\n -dsa | -disablesystemassertions\n Disabilita le asserzioni di sistema.\n -agentlib:[=]\n Carica la libreria agenti nativa , ad esempio -agentlib:jdwp.\n Vedere anche -agentlib:jdwp=help.\n -agentpath:[=]\n Carica la libreria agenti nativa con il percorso completo.\n -javaagent:[=]\n Carica l''agente del linguaggio di programmazione Java. Vedere java.lang.instrument.\n -splash:\n Mostra la schermata iniziale con l''immagine specificata.\n Le immagini ridimensionate HiDPI sono supportate e utilizzate automaticamente\n se disponibili. I nomi file delle immagini non ridimensionate, ad esempio image.ext,\n devono essere sempre passati come argomenti all''opzione -splash.\n Verr\u00E0 scelta automaticamente l''immagine ridimensionata pi\u00F9 appropriata\n fornita.\n Per ulteriori informazioni, vedere la documentazione relativa all''API SplashScreen.\n @ legge le opzioni dal file specificato.\nPer specificare un argomento per un''opzione lunga, \u00E8 possibile \ -utilizzare --= o\n-- . -See Per ulteriori dettagli, vedere http://www.oracle.com/technetwork/java/javase/documentation/index.html. - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch disabilita la compilazione in background\n -Xbootclasspath/a:\n aggiunge alla fine del classpath di bootstrap\n -Xcheck:jni esegue controlli aggiuntivi per le funzioni JNI\n -Xcomp forza la compilazione dei metodi al primo richiamo\n -Xdebug fornito per la compatibilit\u00E0 con le versioni precedenti\n -Xdiag mostra ulteriori messaggi diagnostici\n -Xdiag:resolver mostra i messaggi diagnostici del resolver\n -Xfuture abilita i controlli pi\u00F9 limitativi anticipando le impostazioni predefinite future\n -Xint esecuzione solo in modalit\u00E0 convertita\n -Xinternalversion\n visualizza informazioni pi\u00F9 dettagliate sulla versione JVM rispetto\n all''opzione -version\n -Xloggc: registra lo stato GC in un file con indicatori orari\n -Xmixed esecuzione in modalit\u00E0 mista (impostazione predefinita)\n -Xmn imposta le dimensioni iniziale e massima (in byte) dell''heap\n per la young generation (nursery)\n -Xms imposta la dimensione heap Java iniziale\n -Xmx imposta la dimensione heap Java massima\n -Xnoclassgc disabilta la garbage collection della classe\n -Xprof visualizza i dati di profilo della CPU\n -Xrs riduce l''uso di segnali del sistema operativo da Java/VM (vedere la documentazione)\n -Xshare:auto utilizza i dati di classe condivisi se possibile (impostazione predefinita)\n -Xshare:off non tenta di utilizzare i dati di classe condivisi\n -Xshare:on richiede l''uso dei dati di classe condivisi, altrimenti l''esecuzione non riesce.\n -XshowSettings mostra tutte le impostazioni e continua\n -XshowSettings:all\n mostra tutte le impostazioni e continua\n -XshowSettings:locale\n mostra tutte le impostazioni correlate alle impostazioni nazionali e continua\n -XshowSettings:properties\n mostra tutte le impostazioni delle propriet\u00E0 e continua\n -XshowSettings:vm mostra tutte le impostazioni correlate alla VM e continua\n -Xss imposta la dimensione dello stack di thread Java\n -Xverify imposta la modalit\u00E0 del verificatore bytecode\n --add-reads:=(,)*\n aggiorna per leggere , indipendentemente\n dalla dichiarazione del modulo.\n pu\u00F2 essere ALL-UNNAMED per leggere tutti i\n moduli senza nome.\n -add-exports:/=(,)*\n aggiorna per esportare in ,\n indipendentemente dalla dichiarazione del modulo.\n pu\u00F2 essere ALL-UNNAMED per esportare tutti i\n moduli senza nome.\n --disable-@files disabilita l''ulteriore espansione del file di argomenti\n -patch-module =({0})*\n sostituisce o migliora un modulo con classi e risorse\n in file JAR o directory\n\nQueste opzioni non sono opzioni standard e sono soggette a modifiche senza preavviso.\n +java.launcher.X.usage=\n -Xbatch Disabilita la compilazione in background.\n -Xbootclasspath/a:\n Aggiunge alla fine del classpath di bootstrap.\n -Xcheck:jni Esegue controlli aggiuntivi per le funzioni JNI.\n -Xcomp Forza la compilazione dei metodi al primo richiamo.\n -Xdebug Fornito per la compatibilit\u00E0 con le versioni precedenti.\n -Xdiag Mostra ulteriori messaggi diagnostici.\n -Xdiag:resolver Mostra i messaggi diagnostici del resolver.\n -Xfuture Abilita i controlli pi\u00F9 limitativi anticipando le impostazioni predefinite future.\n -Xint Esecuzione solo in modalit\u00E0 convertita.\n -Xinternalversion\n Visualizza informazioni pi\u00F9 dettagliate sulla versione JVM rispetto\n all''opzione -version.\n -Xloggc: Registra lo stato GC in un file con indicatori orari.\n -Xmixed Esecuzione in modalit\u00E0 mista (impostazione predefinita).\n -Xmn Imposta le dimensioni iniziale e massima (in byte) dell''heap\n per la young generation (nursery).\n -Xms Imposta la dimensione heap Java iniziale.\n -Xmx Imposta la dimensione heap Java massima.\n -Xnoclassgc Disabilta la garbage collection della classe.\n -Xprof Visualizza i dati di profilo della CPU.\n -Xrs Riduce l''uso di segnali del sistema operativo da Java/VM (vedere la documentazione).\n -Xshare:auto Utilizza i dati di classe condivisi se possibile (impostazione predefinita).\n -Xshare:off Non tenta di utilizzare i dati di classe condivisi.\n -Xshare:on Richiede l''uso dei dati di classe condivisi, altrimenti l''esecuzione non riesce.\n -XshowSettings Mostra tutte le impostazioni e continua.\n -XshowSettings:all\n Mostra tutte le impostazioni e continua.\n -XshowSettings:locale\n Mostra tutte le impostazioni correlate alle impostazioni nazionali e continua.\n -XshowSettings:properties\n Mostra tutte le impostazioni delle propriet\u00E0 e continua.\n -XshowSettings:vm Mostra tutte le impostazioni correlate alla VM e continua.\n -Xss Imposta la dimensione dello stack di thread Java.\n -Xverify Imposta la modalit\u00E0 del verificatore bytecode.\n --add-reads:=(,)*\n Aggiorna per leggere , indipendentemente\n dalla dichiarazione del modulo.\n pu\u00F2 essere ALL-UNNAMED per leggere tutti i\n moduli senza nome.\n -add-exports:/=(,)*\n Aggiorna per esportare in ,\n indipendentemente dalla dichiarazione del modulo.\n pu\u00F2 essere ALL-UNNAMED per esportare tutti i\n moduli senza nome.\n --add-opens /=(,)*\n Aggiorna per aprire in\n , indipendentemente dalla dichiarazione del modulo.\n --disable-@files Disabilita l''ulteriore espansione del file di argomenti.\n -patch-module =({0})*\n Sostituisce o migliora un modulo con classi e risorse\n in file JAR o directory.\n\nQueste opzioni non sono opzioni standard e sono soggette a modifiche senza preavviso.\n # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\nLe opzioni riportate di seguito sono specifiche del sistema operativo Mac OS X:\n -XstartOnFirstThread\n Esegue il metodo main() sul primo thread (AppKit).\n -Xdock:name=\n Sostituisce il nome applicazione predefinito visualizzato nel dock\n -Xdock:icon=\n Sostituisce l'icona predefinita visualizzata nel dock\n\n diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties index 996a8065a87..57453ce57e4 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -24,23 +24,20 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = \u4F7F\u7528\u65B9\u6CD5: {0} [options] class [args...]\n (\u30AF\u30E9\u30B9\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n \u307E\u305F\u306F {0} [options] -jar jarfile [args...]\n (jar\u30D5\u30A1\u30A4\u30EB\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n \u307E\u305F\u306F {0} [options] -p -m [/] [args...]\n (\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n +java.launcher.opt.header = \u4F7F\u7528\u65B9\u6CD5: {0} [options] class [args...]\n (\u30AF\u30E9\u30B9\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n \u307E\u305F\u306F {0} [options] -jar jarfile [args...]\n (jar\u30D5\u30A1\u30A4\u30EB\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n \u307E\u305F\u306F {0} [options] -p -m [/] [args...]\n (\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\n java.launcher.opt.datamodel =\ -d{0}\t \u63A8\u5968\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u4ECA\u5F8C\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u308B\u4E88\u5B9A\u3067\u3059\n java.launcher.opt.vmselect =\ {0}\t "{1}" VM\u3092\u9078\u629E\u3059\u308B\u5834\u5408\n java.launcher.opt.hotspot =\ {0}\t \u306F"{1}" VM\u306E\u30B7\u30CE\u30CB\u30E0\u3067\u3059 [\u975E\u63A8\u5968]\n -java.launcher.ergo.message1 =\ \u30C7\u30D5\u30A9\u30EB\u30C8VM\u306F{0}\u3067\u3059 -java.launcher.ergo.message2 =\ \u3053\u308C\u306F\u30B5\u30FC\u30D0\u30FC\u30AF\u30E9\u30B9\u306E\u30DE\u30B7\u30F3\u3067\u5B9F\u884C\u3057\u3066\u3044\u308B\u305F\u3081\u3067\u3059\u3002\n +# Translators please note do not translate the options themselves +java.launcher.opt.footer =\ -cp <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n -classpath <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n --class-path <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n \u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3001JAR\u30A2\u30FC\u30AB\u30A4\u30D6\n \u304A\u3088\u3073ZIP\u30A2\u30FC\u30AB\u30A4\u30D6\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3002\n -p <\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9>\n --module-path <\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9>...\n \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3002\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\n \u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\u3002\n --upgrade-module-path <\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9>...\n \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3002\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\n \u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30A4\u30E1\u30FC\u30B8\u3067\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\n \u7F6E\u63DB\u3059\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\n -m [/]\n --module [/]\n \u89E3\u6C7A\u3059\u308B\u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u304A\u3088\u3073\u30E2\u30B8\u30E5\u30FC\u30EB\u3067\u6307\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u306B\n \u5B9F\u884C\u3059\u308B\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u306E\u540D\u524D\n --add-modules [,...]\n \u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u52A0\u3048\u3066\u89E3\u6C7A\u3059\u308B\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3002\n \u306B\u306F\u3001ALL-DEFAULT\u3001ALL-SYSTEM\u3001\n ALL-MODULE-PATH\u3082\u4F7F\u7528\u3067\u304D\u308B\u3002\n --limit-modules [,...]\n \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u9818\u57DF\u3092\u5236\u9650\u3059\u308B\n --list-modules [[,...]]\n \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u4E00\u89A7\u3092\u8868\u793A\u3057\u3066\u7D42\u4E86\u3059\u308B\n --dry-run VM\u3092\u4F5C\u6210\u3059\u308B\u304C\u3001\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u306F\u5B9F\u884C\u3057\u306A\u3044\u3002\n \u3053\u306E--dry-run\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30B7\u30B9\u30C6\u30E0\u69CB\u6210\u306A\u3069\u306E\n \u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u691C\u8A3C\u3059\u308B\u5834\u5408\u306B\u4FBF\u5229\u3067\u3059\u3002\n -D=\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u8A2D\u5B9A\u3059\u308B\n -verbose:[class|gc|jni]\n \u8A73\u7D30\u306A\u51FA\u529B\u3092\u884C\u3046\n -version \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3059\u308B\n --version \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3059\u308B\n \ +-showversion \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3059\u308B\n --show-version\n \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3059\u308B\n -? -h -help\n \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3059\u308B\n --help \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3059\u308B\n -X \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u95A2\u3059\u308B\u30D8\u30EB\u30D7\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3059\u308B\n --help-extra \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u95A2\u3059\u308B\u30D8\u30EB\u30D7\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3059\u308B\n -ea[:...|:]\n -enableassertions[:...|:]\n \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3059\u308B\n -da[:...|:]\n -disableassertions[:...|:]\n \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n -esa | -enablesystemassertions\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3059\u308B\n -dsa | -disablesystemassertions\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n -agentlib:[=]\n \u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3002\u4F8B: -agentlib:jdwp\n -agentlib:jdwp=help\u3082\u53C2\u7167\n -agentpath:[=]\n \u30D5\u30EB\u30D1\u30B9\u540D\u3067\u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30ED\u30FC\u30C9\u3059\u308B\n -javaagent:[=]\n Java\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3002java.lang.instrument\u3092\u53C2\u7167\n -splash:\n \u6307\u5B9A\u3057\u305F\u30A4\u30E1\u30FC\u30B8\u3067\u30B9\u30D7\u30E9\u30C3\u30B7\u30E5\u753B\u9762\u3092\u8868\u793A\u3059\u308B\n HiDPI\u306B\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u3055\u308C\u305F\u30A4\u30E1\u30FC\u30B8\u304C\u81EA\u52D5\u7684\u306B\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3001\n \u4F7F\u7528\u3067\u304D\u308C\u3070\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\u5FC5\u305A\u3001\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\n \u3055\u308C\u306A\u3044\u30A4\u30E1\u30FC\u30B8\u306E\u30D5\u30A1\u30A4\u30EB\u540D\u3001\u305F\u3068\u3048\u3070image.ext\u3092\u3001\n \u5F15\u6570\u3068\u3057\u3066-splash\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u6E21\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n \u6307\u5B9A\u3055\u308C\u305F\u6700\u3082\u9069\u5207\u306A\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u6E08\u30A4\u30E1\u30FC\u30B8\u304C\u81EA\u52D5\u7684\u306B\n \u9078\u629E\u3055\u308C\u307E\u3059\u3002\n \u8A73\u7D30\u306FSplashScreen API\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n @ \ +\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8AAD\u307F\u53D6\u308B\n\nlong\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u5F15\u6570\u3092\u6307\u5B9A\u3059\u308B\u306B\u306F\u3001--=\u307E\u305F\u306F-- \u3092\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\n # Translators please note do not translate the options themselves -java.launcher.opt.footer =\ -cp <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n -classpath <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n --class-path <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n \u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3001\n JAR\u30A2\u30FC\u30AB\u30A4\u30D6\u304A\u3088\u3073ZIP\u30A2\u30FC\u30AB\u30A4\u30D6\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3002\n -p <\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9>\n --module-path <\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9>...\n \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3002\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\n \u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\u3002\n --upgrade-module-path <\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9>...\n \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3002\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\n \u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30A4\u30E1\u30FC\u30B8\u3067\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u7F6E\u63DB\u3059\u308B\n \u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\n -m [/]\n --module [/]\n \u89E3\u6C7A\u3059\u308B\u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u304A\u3088\u3073\u30E2\u30B8\u30E5\u30FC\u30EB\u3067\u6307\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u306B\n \u5B9F\u884C\u3059\u308B\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u306E\u540D\u524D\n --add-modules [,...]\n \u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u52A0\u3048\u3066\u89E3\u6C7A\u3059\u308B\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3002\n \u306FALL-DEFAULT\u3001ALL-SYSTEM\u3001ALL-MODULE-PATH\n \u306B\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u3059\u3002\n --limit-modules [,...]\n \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u9818\u57DF\u3092\u5236\u9650\u3059\u308B\n --list-modules [[,...]]\n \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u4E00\u89A7\u3092\u8868\u793A\u3057\u3066\u7D42\u4E86\u3059\u308B\n --dry-run VM\u3092\u4F5C\u6210\u3059\u308B\u304C\u3001\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u306F\u5B9F\u884C\u3057\u306A\u3044\u3002\n \u3053\u306E--dry-run\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30B7\u30B9\u30C6\u30E0\u69CB\u6210\u306A\u3069\u306E\n \u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u691C\u8A3C\u3059\u308B\u5834\u5408\u306B\u4FBF\u5229\u3067\u3059\u3002\n -D=\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u8A2D\u5B9A\u3059\u308B\n -verbose:[class|gc|jni]\n \u8A73\u7D30\u306A\u51FA\u529B\u3092\u884C\u3046\n -version \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3059\u308B\n -showversion \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3059\u308B\n -? -help --help\n \ -\u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3059\u308B\n -X \u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u95A2\u3059\u308B\u30D8\u30EB\u30D7\u3092\u51FA\u529B\u3059\u308B\n -ea[:...|:]\n -enableassertions[:...|:]\n \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3059\u308B\n -da[:...|:]\n -disableassertions[:...|:]\n \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n -esa | -enablesystemassertions\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3059\u308B\n -dsa | -disablesystemassertions\n \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n -agentlib:[=]\n \u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3002\u4F8B: -agentlib:jdwp\n -agentlib:jdwp=help\u3082\u53C2\u7167\n -agentpath:[=]\n \u30D5\u30EB\u30D1\u30B9\u540D\u3067\u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30ED\u30FC\u30C9\u3059\u308B\n -javaagent:[=]\n Java\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3002java.lang.instrument\u3092\u53C2\u7167\n -splash:\n \u6307\u5B9A\u3057\u305F\u30A4\u30E1\u30FC\u30B8\u3067\u30B9\u30D7\u30E9\u30C3\u30B7\u30E5\u753B\u9762\u3092\u8868\u793A\u3059\u308B\n \u53EF\u80FD\u3067\u3042\u308C\u3070\u3001HiDPI\u30B9\u30B1\u30FC\u30EB\u306E\u30A4\u30E1\u30FC\u30B8\u304C\u81EA\u52D5\u7684\u306B\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\n \u30B9\u30B1\u30FC\u30EB\u306A\u3057\u306E\u30A4\u30E1\u30FC\u30B8\u306E\u30D5\u30A1\u30A4\u30EB\u540D(image.ext\u306A\u3069)\u306F\u3001\n \u5E38\u306B-splash\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u3068\u3057\u3066\u6E21\u3055\u308C\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n \u6307\u5B9A\u3055\u308C\u305F\u6700\u9069\u306A\u30B9\u30B1\u30FC\u30EB\u306E\u30A4\u30E1\u30FC\u30B8\u304C\u81EA\u52D5\u7684\u306B\n \u9078\u629E\u3055\u308C\u307E\u3059\u3002\n \u8A73\u7D30\u306FSplashScreen API\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n @ \u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8AAD\u307F\u53D6\u308B\n\u9577\u3044\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u3092\u6307\u5B9A\u3059\u308B\u5834\u5408\u3001--=\u307E\u305F\u306F\n-- \u3092\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\n -See \u8A73\u7D30\u306F\u3001http://www.oracle.com/technetwork/java/javase/documentation/index.html\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002 - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch \u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u7121\u52B9\u306B\u3059\u308B\n -Xbootclasspath/a:<{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB>\n \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306E\u6700\u5F8C\u306B\u8FFD\u52A0\u3059\u308B\n -Xcheck:jni JNI\u95A2\u6570\u306B\u5BFE\u3059\u308B\u8FFD\u52A0\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u5B9F\u884C\u3059\u308B\n -Xcomp \u521D\u56DE\u547C\u51FA\u3057\u6642\u306B\u30E1\u30BD\u30C3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u5F37\u5236\u3059\u308B\n -Xdebug \u4E0B\u4F4D\u4E92\u63DB\u6027\u306E\u305F\u3081\u306B\u63D0\u4F9B\n -Xdiag \u8FFD\u52A0\u306E\u8A3A\u65AD\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3059\u308B\n -Xdiag:resolver \u30EA\u30BE\u30EB\u30D0\u8A3A\u65AD\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3059\u308B\n -Xfuture \u5C06\u6765\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u898B\u8D8A\u3057\u3066\u3001\u6700\u3082\u53B3\u5BC6\u306A\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u306B\u3059\u308B\n -Xint \u30A4\u30F3\u30BF\u30D7\u30EA\u30BF\u30FB\u30E2\u30FC\u30C9\u306E\u5B9F\u884C\u306E\u307F\n -Xinternalversion\n -version\u30AA\u30D7\u30B7\u30E7\u30F3\u3088\u308A\u8A73\u7D30\u306AJVM\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\n \u8868\u793A\u3059\u308B\n -Xloggc: \u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u4ED8\u3044\u305F\u30D5\u30A1\u30A4\u30EB\u306BGC\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u30ED\u30B0\u3092\u8A18\u9332\u3059\u308B\n -Xmixed \u6DF7\u5408\u30E2\u30FC\u30C9\u306E\u5B9F\u884C(\u30C7\u30D5\u30A9\u30EB\u30C8)\n -Xmn \u82E5\u3044\u4E16\u4EE3(\u30CA\u30FC\u30B5\u30EA)\u306E\u30D2\u30FC\u30D7\u306E\u521D\u671F\u304A\u3088\u3073\u6700\u5927\u30B5\u30A4\u30BA(\u30D0\u30A4\u30C8\u5358\u4F4D)\n \u3092\u8A2D\u5B9A\u3059\u308B\n -Xms Java\u306E\u521D\u671F\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xmx Java\u306E\u6700\u5927\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xnoclassgc \u30AF\u30E9\u30B9\u306E\u30AC\u30D9\u30FC\u30B8\u30FB\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n -Xprof CPU\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u30FB\u30C7\u30FC\u30BF\u3092\u51FA\u529B\u3059\u308B\n -Xrs Java/VM\u306B\u3088\u308BOS\u30B7\u30B0\u30CA\u30EB\u306E\u4F7F\u7528\u3092\u524A\u6E1B\u3059\u308B(\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167)\n -Xshare:auto \u53EF\u80FD\u3067\u3042\u308C\u3070\u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8)\n -Xshare:off \u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3057\u3088\u3046\u3068\u3057\u306A\u3044\n -Xshare:on \u5171\u6709\u30AF\u30E9\u30B9\u30FB\u30C7\u30FC\u30BF\u306E\u4F7F\u7528\u3092\u5FC5\u9808\u306B\u3057\u3001\u3067\u304D\u306A\u3051\u308C\u3070\u5931\u6557\u3059\u308B\u3002\n -XshowSettings \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:all\n \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:locale\n \u3059\u3079\u3066\u306E\u30ED\u30B1\u30FC\u30EB\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:properties\n \ -\u3059\u3079\u3066\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:vm \u3059\u3079\u3066\u306EVM\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -Xss Java\u306E\u30B9\u30EC\u30C3\u30C9\u30FB\u30B9\u30BF\u30C3\u30AF\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xverify \u30D0\u30A4\u30C8\u30B3\u30FC\u30C9\u691C\u8A3C\u6A5F\u80FD\u306E\u30E2\u30FC\u30C9\u3092\u8A2D\u5B9A\u3059\u308B\n --add-reads =(,)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\u3092\u66F4\u65B0\u3057\u3066\n \u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059\u3002 \n \u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\n \u8AAD\u307F\u53D6\u308C\u307E\u3059\u3002\n --add-exports /=(,)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\u3092\u66F4\u65B0\u3057\u3066\u3092\u306B\n \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002\n \u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\n \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3067\u304D\u307E\u3059\u3002\n --disable-@files \u3055\u3089\u306A\u308B\u5F15\u6570\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u3092\u7121\u52B9\u306B\u3059\u308B\n --patch-module =({0})*\n JAR\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30EA\u30BD\u30FC\u30B9\u3067\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u307E\u305F\u306F\n \u62E1\u5F35\u3057\u307E\u3059\u3002\n\n\u3053\u308C\u3089\u306F\u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u3042\u308A\u4E88\u544A\u306A\u3057\u306B\u5909\u66F4\u3055\u308C\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002\n +java.launcher.X.usage=\n -Xbatch \u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u7121\u52B9\u306B\u3059\u308B\n -Xbootclasspath/a:<{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB>\n \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306E\u6700\u5F8C\u306B\u8FFD\u52A0\u3059\u308B\n -Xcheck:jni JNI\u95A2\u6570\u306B\u5BFE\u3059\u308B\u8FFD\u52A0\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u5B9F\u884C\u3059\u308B\n -Xcomp \u521D\u56DE\u547C\u51FA\u3057\u6642\u306B\u30E1\u30BD\u30C3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u5F37\u5236\u3059\u308B\n -Xdebug \u4E0B\u4F4D\u4E92\u63DB\u6027\u306E\u305F\u3081\u306B\u63D0\u4F9B\n -Xdiag \u8FFD\u52A0\u306E\u8A3A\u65AD\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3059\u308B\n -Xdiag:resolver \u30EA\u30BE\u30EB\u30D0\u8A3A\u65AD\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3059\u308B\n -Xfuture \u5C06\u6765\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u898B\u8D8A\u3057\u3066\u3001\u6700\u3082\u53B3\u5BC6\u306A\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u306B\u3059\u308B\n -Xint \u30A4\u30F3\u30BF\u30D7\u30EA\u30BF\u30FB\u30E2\u30FC\u30C9\u306E\u5B9F\u884C\u306E\u307F\n -Xinternalversion\n -version\u30AA\u30D7\u30B7\u30E7\u30F3\u3088\u308A\u8A73\u7D30\u306AJVM\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\n \u8868\u793A\u3059\u308B\n -Xloggc: \u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u4ED8\u3044\u305F\u30D5\u30A1\u30A4\u30EB\u306BGC\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u30ED\u30B0\u3092\u8A18\u9332\u3059\u308B\n -Xmixed \u6DF7\u5408\u30E2\u30FC\u30C9\u306E\u5B9F\u884C(\u30C7\u30D5\u30A9\u30EB\u30C8)\n -Xmn \u82E5\u3044\u4E16\u4EE3(\u30CA\u30FC\u30B5\u30EA)\u306E\u30D2\u30FC\u30D7\u306E\u521D\u671F\u304A\u3088\u3073\u6700\u5927\u30B5\u30A4\u30BA(\u30D0\u30A4\u30C8\u5358\u4F4D)\n \u3092\u8A2D\u5B9A\u3059\u308B\n -Xms Java\u306E\u521D\u671F\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xmx Java\u306E\u6700\u5927\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xnoclassgc \u30AF\u30E9\u30B9\u306E\u30AC\u30D9\u30FC\u30B8\u30FB\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n -Xprof CPU\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u30FB\u30C7\u30FC\u30BF\u3092\u51FA\u529B\u3059\u308B\n -Xrs Java/VM\u306B\u3088\u308BOS\u30B7\u30B0\u30CA\u30EB\u306E\u4F7F\u7528\u3092\u524A\u6E1B\u3059\u308B(\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167)\n -Xshare:auto \u53EF\u80FD\u3067\u3042\u308C\u3070\u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8)\n -Xshare:off \u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3057\u3088\u3046\u3068\u3057\u306A\u3044\n -Xshare:on \u5171\u6709\u30AF\u30E9\u30B9\u30FB\u30C7\u30FC\u30BF\u306E\u4F7F\u7528\u3092\u5FC5\u9808\u306B\u3057\u3001\u3067\u304D\u306A\u3051\u308C\u3070\u5931\u6557\u3059\u308B\u3002\n -XshowSettings \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:all\n \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:locale\n \u3059\u3079\u3066\u306E\u30ED\u30B1\u30FC\u30EB\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:properties\n \ +\u3059\u3079\u3066\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -XshowSettings:vm \u3059\u3079\u3066\u306EVM\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n -Xss Java\u306E\u30B9\u30EC\u30C3\u30C9\u30FB\u30B9\u30BF\u30C3\u30AF\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xverify \u30D0\u30A4\u30C8\u30B3\u30FC\u30C9\u691C\u8A3C\u6A5F\u80FD\u306E\u30E2\u30FC\u30C9\u3092\u8A2D\u5B9A\u3059\u308B\n --add-reads =(,)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\u3092\u66F4\u65B0\u3057\u3066\n \u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059\u3002 \n \u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\n \u8AAD\u307F\u53D6\u308C\u307E\u3059\u3002\n --add-exports /=(,)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\u3092\u66F4\u65B0\u3057\u3066\u3092\u306B\n \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002\n \u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\n \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3067\u304D\u307E\u3059\u3002\n --add-opens /=(,)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\u3092\u66F4\u65B0\u3057\u3066\n \u3092\u306B\u958B\u304D\u307E\u3059\u3002\n --disable-@files \u3055\u3089\u306A\u308B\u5F15\u6570\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u3092\u7121\u52B9\u306B\u3059\u308B\n --patch-module =({0})*\n JAR\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30EA\u30BD\u30FC\u30B9\u3067\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\n \u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u307E\u305F\u306F\u62E1\u5F35\u3057\u307E\u3059\u3002\n\n\u3053\u308C\u3089\u306F\u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u3042\u308A\u4E88\u544A\u306A\u3057\u306B\u5909\u66F4\u3055\u308C\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002\n # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\n\u6B21\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306FMac OS X\u56FA\u6709\u3067\u3059:\n -XstartOnFirstThread\n main()\u30E1\u30BD\u30C3\u30C9\u3092\u6700\u521D(AppKit)\u306E\u30B9\u30EC\u30C3\u30C9\u3067\u5B9F\u884C\u3059\u308B\n -Xdock:name=\n Dock\u306B\u8868\u793A\u3055\u308C\u308B\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u540D\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n -Xdock:icon=\n Dock\u306B\u8868\u793A\u3055\u308C\u308B\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30A2\u30A4\u30B3\u30F3\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n\n diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ko.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ko.properties index a734e614e2a..e543dc7b325 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ko.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ko.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -24,23 +24,19 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = \uC0AC\uC6A9\uBC95: {0} [options] class [args...]\n (\uD074\uB798\uC2A4 \uC2E4\uD589)\n \uB610\uB294 {0} [options] -jar jarfile [args...]\n (jar \uD30C\uC77C \uC2E4\uD589)\n \uB610\uB294 {0} [options] -p -m [/] [args...]\n (\uBAA8\uB4C8\uC758 \uAE30\uBCF8 \uD074\uB798\uC2A4 \uC2E4\uD589)\n\uC5EC\uAE30\uC11C options\uB294 \uB2E4\uC74C\uACFC \uAC19\uC2B5\uB2C8\uB2E4.\n +java.launcher.opt.header = \uC0AC\uC6A9\uBC95: {0} [options] class [args...]\n (\uD074\uB798\uC2A4 \uC2E4\uD589)\n \uB610\uB294 {0} [options] -jar jarfile [args...]\n (jar \uD30C\uC77C \uC2E4\uD589)\n \uB610\uB294 {0} [options] -p -m [/] [args...]\n (\uBAA8\uB4C8\uC758 \uAE30\uBCF8 \uD074\uB798\uC2A4 \uC2E4\uD589)\n\uC5EC\uAE30\uC11C options\uB294 \uB2E4\uC74C\uACFC \uAC19\uC2B5\uB2C8\uB2E4.\n\n java.launcher.opt.datamodel =\ -d{0}\t \uB354 \uC774\uC0C1 \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC74C. \uC774\uD6C4 \uB9B4\uB9AC\uC2A4\uC5D0\uC11C \uC81C\uAC70\uB429\uB2C8\uB2E4.\n java.launcher.opt.vmselect =\ {0}\t "{1}" VM\uC744 \uC120\uD0DD\uD569\uB2C8\uB2E4.\n java.launcher.opt.hotspot =\ {0}\t "{1}" VM\uC758 \uB3D9\uC758\uC5B4\uC785\uB2C8\uB2E4[\uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC74C].\n -java.launcher.ergo.message1 =\ \uAE30\uBCF8 VM\uC740 {0}\uC785\uB2C8\uB2E4. -java.launcher.ergo.message2 =\ \uC11C\uBC84\uAE09 \uC2DC\uC2A4\uD15C\uC5D0\uC11C \uC2E4\uD589 \uC911\uC774\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4.\n +# Translators please note do not translate the options themselves +java.launcher.opt.footer =\ -cp <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n -classpath <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n --class-path <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uAC80\uC0C9\uD560 {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC,\n JAR \uC544\uCE74\uC774\uBE0C \uBC0F ZIP \uC544\uCE74\uC774\uBE0C \uBAA9\uB85D\uC785\uB2C8\uB2E4.\n -p <\uBAA8\uB4C8 \uACBD\uB85C>\n -module-path <\uBAA8\uB4C8 \uACBD\uB85C>...\n {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uC785\uB2C8\uB2E4.\n -upgrade-module-path <\uBAA8\uB4C8 \uACBD\uB85C>...\n {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uB85C, \uB7F0\uD0C0\uC784 \uC774\uBBF8\uC9C0\uC5D0\uC11C \uC5C5\uADF8\uB808\uC774\uB4DC\n \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB300\uCCB4\uD569\uB2C8\uB2E4.\n -m <\uBAA8\uB4C8>[/<\uAE30\uBCF8 \uD074\uB798\uC2A4>]\n --module <\uBAA8\uB4C8 \uC774\uB984>[/<\uAE30\uBCF8 \uD074\uB798\uC2A4>]\n \uBD84\uC11D\uD560 \uCD08\uAE30 \uBAA8\uB4C8 \uBC0F \uBAA8\uB4C8\uC5D0\uC11C \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uACBD\uC6B0 \uC2E4\uD589\uD560\n \uAE30\uBCF8 \uD074\uB798\uC2A4\uC758 \uC774\uB984\uC785\uB2C8\uB2E4.\n --add-modules <\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]\n \uCD08\uAE30 \uBAA8\uB4C8 \uC678\uC5D0 \uBD84\uC11D\uD560 \uB8E8\uD2B8 \uBAA8\uB4C8\uC785\uB2C8\uB2E4.\n <\uBAA8\uB4C8 \uC774\uB984>\uC740 ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH\uC77C \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4.\n --limit-modules <\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]\n \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB098\uC5F4\uD558\uACE0 \uC885\uB8CC \uBC94\uC704\uB97C \uC81C\uD55C\uD569\uB2C8\uB2E4.\n --list-modules[<\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]]\n \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB098\uC5F4\uD55C \uD6C4 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n --dry-run VM\uC744 \uC0DD\uC131\uD558\uC9C0\uB9CC \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uC2E4\uD589\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n \uC774 --dry-run \uC635\uC158\uC740 \uBAA8\uB4C8 \uC2DC\uC2A4\uD15C \uAD6C\uC131\uACFC \uAC19\uC740 \uBA85\uB839\uD589\n \uC635\uC158\uC744 \uAC80\uC99D\uD558\uB294 \uB370 \uC720\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n -D<\uC774\uB984>=<\uAC12>\n \uC2DC\uC2A4\uD15C \uC18D\uC131\uC744 \uC124\uC815\uD569\uB2C8\uB2E4.\n -verbose:[class|gc|jni]\n \uC0C1\uC138 \uC815\uBCF4 \uCD9C\uB825\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -version \uC81C\uD488 \uBC84\uC804\uC744 \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD55C \uD6C4 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n --version \uC81C\uD488 \uBC84\uC804\uC744 \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD55C \uD6C4 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n -showversion \uC81C\uD488 \uBC84\uC804\uC744 \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n --show-version\n \uC81C\uD488 \uBC84\uC804\uC744 \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -? -h -help\n \uC774 \uB3C4\uC6C0\uB9D0 \uBA54\uC2DC\uC9C0\uB97C \uC624\uB958 \ +\uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n --help \uC774 \uB3C4\uC6C0\uB9D0 \uBA54\uC2DC\uC9C0\uB97C \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n -X \uCD94\uAC00 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n --help-extra \uCD94\uAC00 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n -ea[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n -enableassertions[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -da[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n -disableassertions[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -esa | -enablesystemassertions\n \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -dsa | -disablesystemassertions\n \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -agentlib:<\uB77C\uC774\uBE0C\uB7EC\uB9AC \uC774\uB984>[=<\uC635\uC158>]\n \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC <\uB77C\uC774\uBE0C\uB7EC\uB9AC \uC774\uB984>\uC744 \uB85C\uB4DC\uD569\uB2C8\uB2E4(\uC608: -agentlib:jdwp).\n -agentlib:jdwp=help\uB3C4 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n -agentpath:<\uACBD\uB85C \uC774\uB984>[=<\uC635\uC158>]\n \uC804\uCCB4 \uACBD\uB85C \uC774\uB984\uC744 \uC0AC\uC6A9\uD558\uC5EC \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4.\n -javaagent:[=<\uC635\uC158>]\n Java \uD504\uB85C\uADF8\uB798\uBC0D \uC5B8\uC5B4 \uC5D0\uC774\uC804\uD2B8\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4. java.lang.instrument\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n -splash:<\uC774\uBBF8\uC9C0 \uACBD\uB85C>\n \uC774\uBBF8\uC9C0\uAC00 \uC9C0\uC815\uB41C \uC2A4\uD50C\uB798\uC2DC \uD654\uBA74\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n HiDPI\uB85C \uC870\uC815\uB41C \uC774\uBBF8\uC9C0\uAC00 \uC790\uB3D9\uC73C\uB85C \uC9C0\uC6D0\uB418\uACE0 \uAC00\uB2A5\uD55C \uACBD\uC6B0\n \uC0AC\uC6A9\uB429\uB2C8\uB2E4. \uBBF8\uC870\uC815 \uC774\uBBF8\uC9C0 \uD30C\uC77C \uC774\uB984(\uC608: image.ext)\uC740\n \uD56D\uC0C1 -splash \uC635\uC158\uC5D0 \uC778\uC218\uB85C \uC804\uB2EC\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.\n \uAC00\uC7A5 \uC801\uC808\uD788 \uC870\uC815\uB41C \uC774\uBBF8\uC9C0\uAC00 \uC790\uB3D9\uC73C\uB85C\n \uCC44\uD0DD\uB429\uB2C8\uB2E4.\n \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 SplashScreen API \uC124\uBA85\uC11C\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n @<\uD30C\uC77C \uACBD\uB85C> \uC9C0\uC815\uB41C \uD30C\uC77C\uC5D0\uC11C \uC635\uC158\uC744 \uC77D\uC2B5\uB2C8\uB2E4.\n\nlong \uC635\uC158\uC5D0 \uB300\uD55C \uC778\uC218\uB97C \uC9C0\uC815\uD558\uB824\uBA74 --<\uC774\uB984>=<\uAC12> \uB610\uB294\n--<\uC774\uB984> <\uAC12>\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n # Translators please note do not translate the options themselves -java.launcher.opt.footer =\ -cp <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n -classpath <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n --class-path <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uAC80\uC0C9\uD560 {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC,\n JAR \uC544\uCE74\uC774\uBE0C \uBC0F ZIP \uC544\uCE74\uC774\uBE0C \uBAA9\uB85D\uC785\uB2C8\uB2E4.\n -p <\uBAA8\uB4C8 \uACBD\uB85C>\n --module-path <\uBAA8\uB4C8 \uACBD\uB85C>...\n {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uC785\uB2C8\uB2E4.\n --upgrade-module-path <\uBAA8\uB4C8 \uACBD\uB85C>...\n {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uB85C, \uB7F0\uD0C0\uC784 \uC774\uBBF8\uC9C0\uC5D0\uC11C \uC5C5\uADF8\uB808\uC774\uB4DC\n \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB300\uCCB4\uD569\uB2C8\uB2E4.\n -m <\uBAA8\uB4C8>[/<\uAE30\uBCF8 \uD074\uB798\uC2A4>]\n --module <\uBAA8\uB4C8 \uC774\uB984>[/<\uAE30\uBCF8 \uD074\uB798\uC2A4>]\n \uBD84\uC11D\uD560 \uCD08\uAE30 \uBAA8\uB4C8 \uBC0F \uBAA8\uB4C8\uC5D0\uC11C \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uACBD\uC6B0 \uC2E4\uD589\uD560\n \uAE30\uBCF8 \uD074\uB798\uC2A4\uC758 \uC774\uB984\uC785\uB2C8\uB2E4.\n --add-modules <\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]\n \uCD08\uAE30 \uBAA8\uB4C8 \uC678\uC5D0 \uBD84\uC11D\uD560 \uB8E8\uD2B8 \uBAA8\uB4C8\uC785\uB2C8\uB2E4.\n <\uBAA8\uB4C8 \uC774\uB984>\uC740 ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH\uC77C \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4.\n --limit-modules <\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]\n \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC758 \uBC94\uC704\uB97C \uC81C\uD55C\uD569\uB2C8\uB2E4.\n --list-modules [<\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]]\n \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB098\uC5F4\uD55C \uD6C4 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n --dry-run VM\uC744 \uC0DD\uC131\uD558\uC9C0\uB9CC \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uC2E4\uD589\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n \uC774 --dry-run \uC635\uC158\uC740 \uBAA8\uB4C8 \uC2DC\uC2A4\uD15C \uAD6C\uC131\uACFC \uAC19\uC740 \uBA85\uB839\uD589\n \uC635\uC158\uC744 \uAC80\uC99D\uD558\uB294 \uB370 \uC720\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n -D<\uC774\uB984>=<\uAC12>\n \uC2DC\uC2A4\uD15C \uC18D\uC131\uC744 \uC124\uC815\uD569\uB2C8\uB2E4.\n -verbose:[class|gc|jni]\n \uC0C1\uC138 \uC815\uBCF4 \uCD9C\uB825\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -version \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD55C \uD6C4 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n -showversion \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -? -help --help\n \uC774 \uB3C4\uC6C0\uB9D0 \uBA54\uC2DC\uC9C0\uB97C \uC778\uC1C4\uD569\uB2C8\uB2E4.\n -X \uBE44\uD45C\uC900 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n -ea[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n -enableassertions[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \ -\uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -da[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n -disableassertions[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -esa | -enablesystemassertions\n \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -dsa | -disablesystemassertions\n \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -agentlib:<\uB77C\uC774\uBE0C\uB7EC\uB9AC \uC774\uB984>[=<\uC635\uC158>]\n \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC <\uB77C\uC774\uBE0C\uB7EC\uB9AC \uC774\uB984>\uC744 \uB85C\uB4DC\uD569\uB2C8\uB2E4(\uC608: -agentlib:jdwp).\n -agentlib:jdwp=help\uB3C4 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n -agentpath:<\uACBD\uB85C \uC774\uB984>[=<\uC635\uC158>]\n \uC804\uCCB4 \uACBD\uB85C \uC774\uB984\uC744 \uC0AC\uC6A9\uD558\uC5EC \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4.\n -javaagent:[=<\uC635\uC158>]\n Java \uD504\uB85C\uADF8\uB798\uBC0D \uC5B8\uC5B4 \uC5D0\uC774\uC804\uD2B8\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4. java.lang.instrument\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n -splash:<\uC774\uBBF8\uC9C0 \uACBD\uB85C>\n \uC774\uBBF8\uC9C0\uAC00 \uC9C0\uC815\uB41C \uC2A4\uD50C\uB798\uC2DC \uD654\uBA74\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n HiDPI\uB85C \uC870\uC815\uB41C \uC774\uBBF8\uC9C0\uAC00 \uC790\uB3D9\uC73C\uB85C \uC9C0\uC6D0\uB418\uACE0 \uAC00\uB2A5\uD55C \uACBD\uC6B0\n \uC0AC\uC6A9\uB429\uB2C8\uB2E4. \uBBF8\uC870\uC815 \uC774\uBBF8\uC9C0 \uD30C\uC77C \uC774\uB984(\uC608: image.ext)\uC740\n \uD56D\uC0C1 -splash \uC635\uC158\uC5D0 \uC778\uC218\uB85C \uC804\uB2EC\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.\n \uAC00\uC7A5 \uC801\uC808\uD788 \uC870\uC815\uB41C \uC774\uBBF8\uC9C0\uAC00 \uC790\uB3D9\uC73C\uB85C \uCC44\uD0DD\uB429\uB2C8\uB2E4.\n \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 SplashScreen API \uC124\uBA85\uC11C\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n @<\uD30C\uC77C \uACBD\uB85C> \uC9C0\uC815\uB41C \uD30C\uC77C\uC5D0\uC11C \uC635\uC158\uC744 \uC77D\uC2B5\uB2C8\uB2E4.\nlong \uC635\uC158\uC5D0 \uB300\uD55C \uC778\uC218\uB97C \uC9C0\uC815\uD558\uB824\uBA74 --<\uC774\uB984>=<\uAC12> \uB610\uB294 --<\uC774\uB984> <\uAC12>\uC744\n\uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n -See \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 http://www.oracle.com/technetwork/java/javase/documentation/index.html\uC744 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624. - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch \uBC31\uADF8\uB77C\uC6B4\uB4DC \uCEF4\uD30C\uC77C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xbootclasspath/a:<{0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C>\n \uBD80\uD2B8\uC2A4\uD2B8\uB7A9 \uD074\uB798\uC2A4 \uACBD\uB85C \uB05D\uC5D0 \uCD94\uAC00\uD569\uB2C8\uB2E4.\n -Xcheck:jni JNI \uD568\uC218\uC5D0 \uB300\uD55C \uCD94\uAC00 \uAC80\uC0AC\uB97C \uC218\uD589\uD569\uB2C8\uB2E4.\n -Xcomp \uCCAB\uBC88\uC9F8 \uD638\uCD9C\uC5D0\uC11C \uBA54\uC18C\uB4DC \uCEF4\uD30C\uC77C\uC744 \uAC15\uC81C\uD569\uB2C8\uB2E4.\n -Xdebug \uC5ED \uD638\uD658\uC131\uC744 \uC704\uD574 \uC81C\uACF5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\n -Xdiag \uCD94\uAC00 \uC9C4\uB2E8 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n -Xdiag:resolver \uBD84\uC11D\uAE30 \uC9C4\uB2E8 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n -Xfuture \uBBF8\uB798 \uAE30\uBCF8\uAC12\uC744 \uC608\uCE21\uD558\uC5EC \uAC00\uC7A5 \uC5C4\uACA9\uD55C \uAC80\uC0AC\uB97C \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xint \uD574\uC11D\uB41C \uBAA8\uB4DC\uB9CC \uC2E4\uD589\uD569\uB2C8\uB2E4.\n -Xinternalversion\n -version \uC635\uC158\uBCF4\uB2E4 \uC0C1\uC138\uD55C JVM \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n -Xloggc: \uC2DC\uAC04 \uAE30\uB85D\uACFC \uD568\uAED8 \uD30C\uC77C\uC5D0 GC \uC0C1\uD0DC\uB97C \uAE30\uB85D\uD569\uB2C8\uB2E4.\n -Xmixed \uD63C\uD569 \uBAA8\uB4DC\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n -Xmn \uC80A\uC740 \uC138\uB300(Nursery)\uB97C \uC704\uD574 \uD799\uC758 \uCD08\uAE30 \uBC0F \uCD5C\uB300\n \uD06C\uAE30(\uBC14\uC774\uD2B8)\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xms \uCD08\uAE30 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xmx \uCD5C\uB300 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xnoclassgc \uD074\uB798\uC2A4\uC758 \uBD88\uD544\uC694\uD55C \uC815\uBCF4 \uBAA8\uC74C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xprof CPU \uD504\uB85C\uD30C\uC77C \uC791\uC131 \uB370\uC774\uD130\uB97C \uCD9C\uB825\uD569\uB2C8\uB2E4.\n -Xrs Java/VM\uC5D0 \uC758\uD55C OS \uC2E0\uD638 \uC0AC\uC6A9\uC744 \uC904\uC785\uB2C8\uB2E4(\uC124\uBA85\uC11C \uCC38\uC870).\n -Xshare:auto \uAC00\uB2A5\uD55C \uACBD\uC6B0 \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n -Xshare:off \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130 \uC0AC\uC6A9\uC744 \uC2DC\uB3C4\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n -Xshare:on \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4. \uADF8\uB807\uC9C0 \uC54A\uC744 \uACBD\uC6B0 \uC2E4\uD328\uD569\uB2C8\uB2E4.\n -XshowSettings \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:all\n \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:locale\n \uBAA8\uB4E0 \uB85C\uCF00\uC77C \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:properties\n \uBAA8\uB4E0 \uC18D\uC131 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:vm \uBAA8\uB4E0 VM \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -Xss Java \uC2A4\uB808\uB4DC \uC2A4\uD0DD \ -\uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xverify \uBC14\uC774\uD2B8\uCF54\uB4DC \uAC80\uC99D\uC790\uC758 \uBAA8\uB4DC\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n --add-reads =(,)*\n \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 \uC744 \uC77D\uB3C4\uB85D\n \uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n \uC740 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4E0 \uBAA8\uB4C8\uC744 \uC77D\uC744 \uC218 \uC788\uB294\n ALL-UNNAMED\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n --add-exports /=(,)*\n \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 \uB97C \uB85C \uC775\uC2A4\uD3EC\uD2B8\uD558\uB3C4\uB85D\n \uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n \uC740 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4E0 \uBAA8\uB4C8\uB85C \uC775\uC2A4\uD3EC\uD2B8\uD560 \uC218 \uC788\uB294\n ALL-UNNAMED\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n --disable-@files \uCD94\uAC00 \uC778\uC218 \uD30C\uC77C \uD655\uC7A5\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n --patch-module =({0})*\n JAR \uD30C\uC77C/\uB514\uB809\uD1A0\uB9AC\uC758 \uD074\uB798\uC2A4\uC640 \uB9AC\uC18C\uC2A4\uB85C\n \uBAA8\uB4C8\uC744 \uBB34\uD6A8\uD654\uD558\uAC70\uB098 \uC778\uC218\uD654\uD569\uB2C8\uB2E4.\n\n\uC774 \uC635\uC158\uC740 \uBE44\uD45C\uC900 \uC635\uC158\uC774\uBBC0\uB85C \uD1B5\uC9C0 \uC5C6\uC774 \uBCC0\uACBD\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n +java.launcher.X.usage=\n -Xbatch \uBC31\uADF8\uB77C\uC6B4\uB4DC \uCEF4\uD30C\uC77C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xbootclasspath/a:<{0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C>\n \uBD80\uD2B8\uC2A4\uD2B8\uB7A9 \uD074\uB798\uC2A4 \uACBD\uB85C \uB05D\uC5D0 \uCD94\uAC00\uD569\uB2C8\uB2E4.\n -Xcheck:jni JNI \uD568\uC218\uC5D0 \uB300\uD55C \uCD94\uAC00 \uAC80\uC0AC\uB97C \uC218\uD589\uD569\uB2C8\uB2E4.\n -Xcomp \uCCAB\uBC88\uC9F8 \uD638\uCD9C\uC5D0\uC11C \uBA54\uC18C\uB4DC \uCEF4\uD30C\uC77C\uC744 \uAC15\uC81C\uD569\uB2C8\uB2E4.\n -Xdebug \uC5ED \uD638\uD658\uC131\uC744 \uC704\uD574 \uC81C\uACF5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\n -Xdiag \uCD94\uAC00 \uC9C4\uB2E8 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n -Xdiag:resolver \uBD84\uC11D\uAE30 \uC9C4\uB2E8 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n -Xfuture \uBBF8\uB798 \uAE30\uBCF8\uAC12\uC744 \uC608\uCE21\uD558\uC5EC \uAC00\uC7A5 \uC5C4\uACA9\uD55C \uAC80\uC0AC\uB97C \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xint \uD574\uC11D\uB41C \uBAA8\uB4DC\uB9CC \uC2E4\uD589\uD569\uB2C8\uB2E4.\n -Xinternalversion\n -version \uC635\uC158\uBCF4\uB2E4 \uC0C1\uC138\uD55C JVM \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n -Xloggc: \uC2DC\uAC04 \uAE30\uB85D\uACFC \uD568\uAED8 \uD30C\uC77C\uC5D0 GC \uC0C1\uD0DC\uB97C \uAE30\uB85D\uD569\uB2C8\uB2E4.\n -Xmixed \uD63C\uD569 \uBAA8\uB4DC\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n -Xmn \uC80A\uC740 \uC138\uB300(Nursery)\uB97C \uC704\uD574 \uD799\uC758 \uCD08\uAE30 \uBC0F \uCD5C\uB300\n \uD06C\uAE30(\uBC14\uC774\uD2B8)\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xms \uCD08\uAE30 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xmx \uCD5C\uB300 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xnoclassgc \uD074\uB798\uC2A4\uC758 \uBD88\uD544\uC694\uD55C \uC815\uBCF4 \uBAA8\uC74C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xprof CPU \uD504\uB85C\uD30C\uC77C \uC791\uC131 \uB370\uC774\uD130\uB97C \uCD9C\uB825\uD569\uB2C8\uB2E4.\n -Xrs Java/VM\uC5D0 \uC758\uD55C OS \uC2E0\uD638 \uC0AC\uC6A9\uC744 \uC904\uC785\uB2C8\uB2E4(\uC124\uBA85\uC11C \uCC38\uC870).\n -Xshare:auto \uAC00\uB2A5\uD55C \uACBD\uC6B0 \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n -Xshare:off \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130 \uC0AC\uC6A9\uC744 \uC2DC\uB3C4\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n -Xshare:on \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4. \uADF8\uB807\uC9C0 \uC54A\uC744 \uACBD\uC6B0 \uC2E4\uD328\uD569\uB2C8\uB2E4.\n -XshowSettings \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:all\n \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:locale\n \uBAA8\uB4E0 \uB85C\uCF00\uC77C \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:properties\n \uBAA8\uB4E0 \uC18D\uC131 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -XshowSettings:vm \uBAA8\uB4E0 VM \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n -Xss Java \uC2A4\uB808\uB4DC \uC2A4\uD0DD \ +\uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xverify \uBC14\uC774\uD2B8\uCF54\uB4DC \uAC80\uC99D\uC790\uC758 \uBAA8\uB4DC\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n --add-reads =(,)*\n \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 \uC744 \uC77D\uB3C4\uB85D\n \uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n \uC740 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4E0 \uBAA8\uB4C8\uC744 \uC77D\uC744 \uC218 \uC788\uB294\n ALL-UNNAMED\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n --add-exports /=(,)*\n \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 \uB97C \uB85C \uC775\uC2A4\uD3EC\uD2B8\uD558\uB3C4\uB85D\n \uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n \uC740 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4E0 \uBAA8\uB4C8\uB85C \uC775\uC2A4\uD3EC\uD2B8\uD560 \uC218 \uC788\uB294\n ALL-UNNAMED\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n --add-opens /=(,)*\n \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 \uB97C \uB85C \uC5F4\uB3C4\uB85D\n \uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n --disable-@files \uCD94\uAC00 \uC778\uC218 \uD30C\uC77C \uD655\uC7A5\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n --patch-module =({0})*\n JAR \uD30C\uC77C \uB610\uB294 \uB514\uB809\uD1A0\uB9AC\uC758 \uD074\uB798\uC2A4\uC640 \uB9AC\uC18C\uC2A4\uB85C\n \uBAA8\uB4C8\uC744 \uBB34\uD6A8\uD654\uD558\uAC70\uB098 \uC778\uC218\uD654\uD569\uB2C8\uB2E4.\n\n\uC774\uB7EC\uD55C \uCD94\uAC00 \uC635\uC158\uC740 \uD1B5\uC9C0 \uC5C6\uC774 \uBCC0\uACBD\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\n\uB2E4\uC74C\uC740 Mac OS X\uC5D0 \uD2B9\uC815\uB41C \uC635\uC158\uC785\uB2C8\uB2E4.\n -XstartOnFirstThread\n \uCCAB\uBC88\uC9F8 (AppKit) \uC2A4\uB808\uB4DC\uC5D0 main() \uBA54\uC18C\uB4DC\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4.\n -Xdock:name=\n \uACE0\uC815\uC73C\uB85C \uD45C\uC2DC\uB41C \uAE30\uBCF8 \uC560\uD50C\uB9AC\uCF00\uC774\uC158 \uC774\uB984\uC744 \uBB34\uD6A8\uD654\uD569\uB2C8\uB2E4.\n -Xdock:icon=\n \uACE0\uC815\uC73C\uB85C \uD45C\uC2DC\uB41C \uAE30\uBCF8 \uC544\uC774\uCF58\uC744 \uBB34\uD6A8\uD654\uD569\uB2C8\uB2E4.\n\n diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_pt_BR.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_pt_BR.properties index 1d8421df7a8..e83e6d594c8 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_pt_BR.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_pt_BR.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -24,22 +24,18 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = Uso: {0} [options] class [args...]\n (para executar uma classe)\n ou {0} [options] -jar jarfile [args...]\n (para executar um arquivo jar)\n or {0} [options] -p -m [/] [args...]\n (para executar a classe principal em um m\u00F3dulo)\nem que as op\u00E7\u00F5es incluem:\n +java.launcher.opt.header = Uso: {0} [options] class [args...]\n (para executar uma classe)\n ou {0} [options] -jar jarfile [args...]\n (para executar um arquivo jar)\n or {0} [options] -p -m [/] [args...]\n (para executar a classe principal em um m\u00F3dulo)\nem que as op\u00E7\u00F5es incluem:\n\n java.launcher.opt.datamodel =\ -d{0}\t Obsoleto, ser\u00E1 removido em uma futura release\n java.launcher.opt.vmselect =\ {0}\t para selecionar a VM "{1}"\n java.launcher.opt.hotspot =\ {0}\t \u00E9 um sin\u00F4nimo da VM "{1}" [obsoleto]\n -java.launcher.ergo.message1 =\ A VM padr\u00E3o \u00E9 {0} -java.launcher.ergo.message2 =\ porque a execu\u00E7\u00E3o est\u00E1 sendo feita em uma m\u00E1quina de classe de servidor.\n +# Translators please note do not translate the options themselves +java.launcher.opt.footer =\ -cp \n -classpath \n --class-path \n Uma lista separada por {0} de diret\u00F3rios, arquivos compactados JAR\n e arquivos ZIP nos quais procurar arquivos de classe.\n -p \n --module-path ...\n Uma lista separada por {0} de diret\u00F3rios, cada um sendo um\n diret\u00F3rio de m\u00F3dulos.\n --upgrade-module-path ...\n Uma lista separada por {0} de diret\u00F3rios, cada um\n um diret\u00F3rio de m\u00F3dulos que substituem m\u00F3dulos\n atualiz\u00E1veis na imagem de runtime\n -m [/]\n --module [/]\n o m\u00F3dulo inicial a ser resolvido e o nome da classe principal\n a ser executada se n\u00E3o especificado pelo m\u00F3dulo\n --add-modules [,...]\n m\u00F3dulos raiz a serem resolvidos al\u00E9m do m\u00F3dulo inicial.\n pode ser tamb\u00E9m ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --limit-modules [,...]\n limitar o universo dos m\u00F3dulos observ\u00E1veis\n --list-modules [[,...]]\n listar os m\u00F3dulos observ\u00E1veis e sair\n --dry-run criar VM, mas n\u00E3o executar o m\u00E9todo principal.\n Esta op\u00E7\u00E3o --dry-run pode ser \u00FAtil para validar as\n op\u00E7\u00F5es de linha de comando, como a configura\u00E7\u00E3o do sistema de m\u00F3dulos.\n -D=\n definir uma propriedade do sistema\n -verbose:[class|gc|jni]\n ativar sa\u00EDda detalhada\n -version imprimir vers\u00E3o do produto no fluxo de erros e sair\n --version imprimir vers\u00E3o do produto no fluxo de sa\u00EDda e sair\n -showversion imprimir vers\u00E3o do produto no fluxo de sa\u00EDda e continuar\n --show-version\n imprimir vers\u00E3o do produto no fluxo de sa\u00EDda e continuar\n -? -h -help\n imprimir esta mensagem de ajuda no fluxo de erros\n --help imprimir esta mensagem de ajuda no fluxo de sa\u00EDda\n -X imprimir ajuda sobre op\u00E7\u00F5es extras no fluxo de erros\n --help-extra imprimir ajuda sobre op\u00E7\u00F5es extras no fluxo de sa\u00EDda\n -ea[:...|:]\n -enableassertions[:...|:]\n ativar asser\u00E7\u00F5es com granularidade especificada\n -da[:...|:]\n -disableassertions[:...|:]\n desativar asser\u00E7\u00F5es com granularidade especificada\n -esa | -enablesystemassertions\n ativar asser\u00E7\u00F5es de sistema\n -dsa | -disablesystemassertions\n desativar asser\u00E7\u00F5es de sistema\n -agentlib:[=]\n carregar biblioteca de agente nativo ; por exemplo, -agentlib:jdwp\n ver tamb\u00E9m -agentlib:jdwp=help\n -agentpath:[=]\n carregar biblioteca de agente nativo por nome do caminho completo\n -javaagent:[=]\n carregar agente de linguagem de programa\u00E7\u00E3o Java; ver java.lang.instrument\n -splash:\n mostrar tela de apresenta\u00E7\u00E3o com imagem especificada\n Imagens em escala HiDPI ser\u00E3o automaticamente suportadas e usadas\n se dispon\u00EDveis. O \ +nome do arquivo de imagem sem escala, por exemplo, image.ext,\n sempre dever\u00E1 ser informado como argumento para a op\u00E7\u00E3o -splash.\n A imagem em escala mais apropriada fornecida ser\u00E1 selecionada\n automaticamente.\n Consulte a documenta\u00E7\u00E3o da API SplashScreen para obter mais informa\u00E7\u00F5es.\n @ op\u00E7\u00F5es de leitura do arquivo especificado\n\nPara especificar um argumento para uma op\u00E7\u00E3o longa, voc\u00EA pode usar --= ou\n-- .\n # Translators please note do not translate the options themselves -java.launcher.opt.footer =\ -cp \n -classpath \n --class-path \n Uma lista separada por {0} de diret\u00F3rios, arquivos compactados JAR\n e ZIP para pesquisa de arquivos de classe.\n -p \n --module-path ...\n Uma lista separada por {0} de diret\u00F3rios, cada um\n sendo um diret\u00F3rio de m\u00F3dulos.\n --upgrade-module-path ...\n Uma lista separada por {0} de diret\u00F3rios, cada um sendo\n um diret\u00F3rio de m\u00F3dulos que substituem m\u00F3dulos atualiz\u00E1veis\n por upgrade na imagem do runtime\n -m [/]\n --module [/]\n o m\u00F3dulo inicial a ser resolvido e o nome da classe principal\n a ser executada se o m\u00F3dulo n\u00E3o especificar\n --add-modules [,...]\n m\u00F3dulos-raiz a serem resolvidos al\u00E9m do m\u00F3dulo inicial.\n tamb\u00E9m pode ser ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH.\n --limit-modules [,...]\n limitar o universo de m\u00F3dulos observ\u00E1veis\n --list-modules [[,...]]\n listar os m\u00F3dulos observ\u00E1veis e sair\n --dry-run criar VM, mas n\u00E3o executar o m\u00E9todo principal.\n Esta op\u00E7\u00E3o --dry-run pode ser \u00FAtil para validar as\n op\u00E7\u00F5es da linha de comando, como a configura\u00E7\u00E3o do sistema do m\u00F3dulo.\n -D=\n definir uma propriedade do sistema\n -verbose:[class|gc|jni]\n ativar sa\u00EDda detalhada\n -version imprimir vers\u00E3o do produto e sair\n -showversion imprimir vers\u00E3o do produto e continuar\n -? -help --help\n imprimir esta mensagem de ajuda\n -X imprimir a ajuda em op\u00E7\u00F5es n\u00E3o padr\u00E3o\n -ea[:...|:]\n -enableassertions[:...|:]\n ativar asser\u00E7\u00F5es com granularidade especificada\n -da[:...|:]\n -disableassertions[:...|:]\n desativar asser\u00E7\u00F5es com granularidade especificada\n -esa | -enablesystemassertions\n ativar asser\u00E7\u00F5es do sistema\n -dsa | -disablesystemassertions\n desativar asser\u00E7\u00F5es do sistema\n -agentlib:[=]\n carregar biblioteca de agentes nativa ; por exemplo, -agentlib:jdwp\n consulte tamb\u00E9m -agentlib:jdwp=help\n -agentpath:[=]\n carregar biblioteca de agentes nativa por nome de caminho completo\n -javaagent:[=]\n carregar agente de linguagem de programa\u00E7\u00E3o Java; consulte java.lang.instrument\n -splash:\n mostrar tela de abertura com imagem especificada\n Imagens HiDPI dimensionadas s\u00E3o suportadas automaticamente e utilizadas\n se dispon\u00EDveis. O nome do arquivo de imagem n\u00E3o dimensionada, por exemplo, image.ext,\n deve ser informado sempre como argumento para a op\u00E7\u00E3o -splash.\n A imagem dimensionada mais apropriada fornecida ser\u00E1 selecionada\n automaticamente.\n Consulte a documenta\u00E7\u00E3o da API de Tela de Abertura para obter mais \ -informa\u00E7\u00F5es.\n @ op\u00E7\u00F5es de leitura do arquivo especificado\nPara especificar um argumento para uma op\u00E7\u00E3o longa, voc\u00EA pode usar --= ou\n-- .\n -See http://www.oracle.com/technetwork/java/javase/documentation/index.html para obter mais detalhes. - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch desativar compila\u00E7\u00E3o em segundo plano\n -Xbootclasspath/a:\n anexar ao final do caminho de classe bootstrap\n -Xcheck:jni executar verifica\u00E7\u00F5es adicionais de fun\u00E7\u00F5es JNI\n -Xcomp for\u00E7a a compila\u00E7\u00E3o de m\u00E9todos na primeira chamada\n -Xdebug fornecido para fins de compatibilidade reversa\n -Xdiag mostrar mensagens de diagn\u00F3stico adicionais\n -Xdiag:resolver mostrar mensagens de diagn\u00F3stico do resolvedor\n -Xfuture ativar verifica\u00E7\u00F5es mais rigorosas, antecipando padr\u00E3o futuro\n -Xint somente execu\u00E7\u00E3o em modo interpretado\n -Xinternalversion\n exibe informa\u00E7\u00F5es mais detalhadas de vers\u00E3o da JVM do que a\n op\u00E7\u00E3o -version\n -Xloggc: registrar status de GC em um arquivo com time-stamps\n -Xmixed execu\u00E7\u00E3o em modo misto (padr\u00E3o)\n -Xmn define o tamanho inicial e m\u00E1ximo (em bytes) do heap\n para a gera\u00E7\u00E3o jovem (infantil)\n -Xms definir tamanho do heap Java inicial\n -Xmx definir tamanho do heap Java m\u00E1ximo\n -Xnoclassgc desativar coleta de lixo de classe\n -Xprof emitir dados de perfil de cpu\n -Xrs reduzir uso de sinais do SO por Java/VM (consultar documenta\u00E7\u00E3o)\n -Xshare:auto usar dados de classe compartilhados, se poss\u00EDvel (padr\u00E3o)\n -Xshare:off n\u00E3o tentar usar dados de classe compartilhados\n -Xshare:on exigir o uso de dados de classe compartilhados; caso contr\u00E1rio, falhar\u00E1.\n -XshowSettings mostrar todas as defini\u00E7\u00F5es e continuar\n -XshowSettings:all\n mostrar todas as defini\u00E7\u00F5es e continuar\n -XshowSettings:locale\n mostrar todas as defini\u00E7\u00F5es relativas a localidade e continuar\n -XshowSettings:properties\n mostrar todas as defini\u00E7\u00F5es de propriedade e continuar\n -XshowSettings:vm mostrar todas as defini\u00E7\u00F5es relativas a vm e continuar\n -Xss definir tamanho de pilha de thread java\n -Xverify define o modo do verificador de c\u00F3digo de byte\n --add-reads =(,)*\n atualiza para ler , independentemente\n da declara\u00E7\u00E3o do m\u00F3dulo. \n pode ser ALL-UNNAMED para ler todos os m\u00F3dulos\n sem nome.\n --add-exports /=(,)*\n atualiza para exportar para ,\n independentemente da declara\u00E7\u00E3o do m\u00F3dulo.\n pode ser ALL-UNNAMED para exportar para todos\n os m\u00F3dulos sem nome.\n --disable-@files desativar expans\u00E3o de arquivo de argumento adicional\n --patch-module =({0})*\n Substituir ou aumentar um m\u00F3dulo com classes e recursos\n em arquivo JAR ou diret\u00F3rios.\n\nEssas op\u00E7\u00F5es n\u00E3o s\u00E3o padr\u00E3o e est\u00E3o sujeitas a altera\u00E7\u00E3o sem aviso.\n +java.launcher.X.usage=\n -Xbatch desativar compila\u00E7\u00E3o em segundo plano\n -Xbootclasspath/a:\n anexar ao final do caminho de classe de bootstrap\n -Xcheck:jni executar verifica\u00E7\u00F5es adicionais de fun\u00E7\u00F5es JNI\n -Xcomp for\u00E7a a compila\u00E7\u00E3o de m\u00E9todos na primeira chamada\n -Xdebug fornecido para compatibilidade reversa\n -Xdiag mostrar mensagens adicionais de diagn\u00F3stico\n -Xdiag:resolver mostrar mensagens de diagn\u00F3stico do resolvedor\n -Xfuture ativar verifica\u00E7\u00F5es mais estritas, antecipando padr\u00E3o futuro\n -Xint somente execu\u00E7\u00E3o de modo interpretado\n -Xinternalversion\n exibe informa\u00E7\u00F5es mais detalhadas da vers\u00E3o da JVM do que a\n op\u00E7\u00E3o -version\n -Xloggc: registrar status de GC em um arquivo com time-stamps\n -Xmixed execu\u00E7\u00E3o em modo misto (padr\u00E3o)\n -Xmn define o tamanho inicial e m\u00E1ximo (em bytes) do heap\n para a gera\u00E7\u00E3o jovem (infantil)\n -Xms definir tamanho inicial do heap Java\n -Xmx definir tamanho m\u00E1ximo do heap Java\n -Xnoclassgc desativar coleta de lixo de classe\n -Xprof gerar dados de perfil de cpu\n -Xrs reduzir uso de sinais do SO por Java/VM (ver documenta\u00E7\u00E3o)\n -Xshare:auto usar dados de classe compartilhados se poss\u00EDvel (padr\u00E3o)\n -Xshare:off n\u00E3o tentar usar dados de classe compartilhados\n -Xshare:on exigido o uso de dados de classe compartilhados; caso contr\u00E1rio, falhar\u00E1.\n -XshowSettings mostrar todas as defini\u00E7\u00F5es e continuar\n -XshowSettings:all\n mostrar todas as defini\u00E7\u00F5es e continuar\n -XshowSettings:locale\n mostrar todas as defini\u00E7\u00F5es relacionadas a localidade e continuar\n -XshowSettings:properties\n mostrar todas as defini\u00E7\u00F5es de propriedade e continuar\n -XshowSettings:vm mostrar todas as defini\u00E7\u00F5es relacionadas a vm e continuar\n -Xss definir tamanho da pilha de thread java\n -Xverify define o modo do verificador de c\u00F3digo de byte\n --add-reads =(,)*\n atualiza para ler , independentemente\n da declara\u00E7\u00E3o de m\u00F3dulo. \n pode ser ALL-UNNAMED para ler todos os m\u00F3dulos\n sem nome.\n --add-exports /=(,)*\n atualiza para exportar para ,\n independentemente da declara\u00E7\u00E3o de m\u00F3dulo.\n pode ser ALL-UNNAMED para exportar todos os\n m\u00F3dulos sem nome.\n --add-opens /=(,)*\n atualiza para abrir para\n , independentemente da declara\u00E7\u00E3o de m\u00F3dulo.\n --disable-@files desativar expans\u00E3o de arquivo de argumento adicional\n --patch-module =({0})*\n Substitui ou amplia um m\u00F3dulo com classes e recursos\n em arquivos ou diret\u00F3rios JAR.\n\nEssas op\u00E7\u00F5es extras est\u00E3o sujeitas a altera\u00E7\u00E3o sem aviso.\n # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\nAs op\u00E7\u00F5es a seguir s\u00E3o espec\u00EDficas para o Mac OS X:\n -XstartOnFirstThread\n executa o m\u00E9todo main() no primeiro thread (AppKit)\n -Xdock:name=\n substitui o nome do aplicativo padr\u00E3o exibido no encaixe\n -Xdock:icon=\n substitui o \u00EDcone exibido no encaixe\n\n diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_sv.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_sv.properties index c456d6102bf..4a66d707b48 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_sv.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_sv.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -24,22 +24,18 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = Syntax: {0} [options] class [args...]\n (f\u00F6r att k\u00F6ra en klass)\n eller {0} [options] -jar jarfile [args...]\n (f\u00F6r att k\u00F6ra en jar-fil)\n eller {0} [options] -p -m [/] [args...]\n (f\u00F6r att k\u00F6ra huvudklassen i en modul)\nmed alternativen:\n +java.launcher.opt.header = Syntax: {0} [options] class [args...]\n (f\u00F6r att k\u00F6ra en klass)\n eller {0} [options] -jar jarfile [args...]\n (f\u00F6r att k\u00F6ra en jar-fil)\n eller {0} [options] -p -m [/] [args...]\n (f\u00F6r att k\u00F6ra huvudklassen i en modul)\nmed alternativen:\n\n java.launcher.opt.datamodel =\ -d{0}\t Inaktuellt, tas bort i en framtida utg\u00E5va\n java.launcher.opt.vmselect =\ {0}\t f\u00F6r att v\u00E4lja "{1}" VM\n java.launcher.opt.hotspot =\ {0}\t \u00E4r en synonym f\u00F6r "{1}" VM [inaktuell]\n -java.launcher.ergo.message1 =\ Standard-VM \u00E4r {0} -java.launcher.ergo.message2 =\ eftersom du k\u00F6r en serverklassmaskin.\n +# Translators please note do not translate the options themselves +java.launcher.opt.footer =\ -cp \n -classpath \n --class-path \n En lista \u00F6ver kataloger, JAR-arkiv och ZIP-arkiv att\n s\u00F6ka efter klassfiler i, avgr\u00E4nsad med {0}.\n -p \n --module-path ...\n En lista \u00F6ver kataloger, d\u00E4r varje katalog \u00E4r en katalog\n med moduler, avgr\u00E4nsad med {0}.\n --upgrade-module-path ...\n En lista \u00F6ver kataloger, d\u00E4r varje katalog \u00E4r en katalog\n med moduler som ers\u00E4tter uppgraderingsbara moduler\n i exekveringsavbilden, avgr\u00E4nsad med {0} \n -m [/]\n --module [/]\n den ursprungliga modulen att l\u00F6sa och namnet p\u00E5 huvudklassen\n att k\u00F6ra, om den inte anges av modulen\n --add-modules [,...]\n rotmoduler att l\u00F6sa f\u00F6rutom den ursprungliga modulen.\n kan \u00E4ven vara ALL-DEFAULT, ALL-SYSTEM och\n ALL-MODULE-PATH.\n --limit-modules [,...]\n begr\u00E4nsa universumet med observerbara moduler\n --list-modules [[,...]]\n lista de observerbara modulerna och avsluta\n --dry-run skapa VM:en men k\u00F6r inte huvudmetoden.\n Det h\u00E4r alternativet kan vara anv\u00E4ndbart f\u00F6r att validera\n kommandoradsalternativen, som modulsystemkonfigurationen.\n -D=\n ange en systemegenskap\n -verbose:[class|gc|jni]\n aktivera utf\u00F6rliga utdata\n -version skriv ut produktversion till felstr\u00F6mmen och avsluta\n --version skriv ut produktversion till utdatastr\u00F6mmen och avsluta\n -showversion skriv ut produktversion till felstr\u00F6mmen och forts\u00E4tt\n --show-version\n skriv ut produktversion till utdatastr\u00F6mmen och forts\u00E4tt\n -? -h -help\n skriv ut det h\u00E4r hj\u00E4lpmeddelandet till felstr\u00F6mmen\n --help skriv ut det h\u00E4r hj\u00E4lpmeddelandet till utdatastr\u00F6mmen\n -X skriv ut hj\u00E4lp f\u00F6r icke-standardalternativ till felstr\u00F6mmen\n --help-extra skriv ut hj\u00E4lp f\u00F6r icke-standardalternativ till utdatastr\u00F6mmen\n -ea[:...|:]\n -enableassertions[:...|:]\n aktivera verifieringar med den angivna detaljgraden\n -da[:...|:]\n -disableassertions[:...|:]\n avaktivera verifieringar med den angivna detaljgraden\n -esa | -enablesystemassertions\n aktivera systemverifieringar\n -dsa | -disablesystemassertions\n avaktivera systemverifieringar\n -agentlib:[=]\n ladda det ursprungliga agentbiblioteket , exempel: -agentlib:jdwp\n se \u00E4ven -agentlib:jdwp=help\n -agentpath:[=]\n ladda det ursprungliga agentbiblioteket med fullst\u00E4ndigt s\u00F6kv\u00E4gsnamn\n -javaagent:[=]\n ladda agenten f\u00F6r programmeringsspr\u00E5ket Java, se java.lang.instrument\n -splash:\n visa v\u00E4lkomstsk\u00E4rmen med den angivna bilden\n HiDPI-skal\u00E4ndrade bilder st\u00F6ds automatiskt och anv\u00E4nds om de \u00E4r\n tillg\u00E4ngliga. Filnamnet p\u00E5 den \ +oskal\u00E4ndrade bilden, t.ex.\n bild.filtill\u00E4gg, ska alltid \u00F6verf\u00F6ras som argument till\n alternativet -splash.\n Den l\u00E4mpligaste skal\u00E4ndrade bilden v\u00E4ljs automatiskt.\n Mer information finns i dokumentationen f\u00F6r API:t SplashScreen.\n @ l\u00E4s alternativ fr\u00E5n den angivna filen\n\nOm du vill ange ett argument f\u00F6r ett l\u00E5ngt alternativ kan du anv\u00E4nda --=\neller -- . # Translators please note do not translate the options themselves -java.launcher.opt.footer =\ -cp \n -classpath \n --class-path \n En lista \u00F6ver kataloger, JAR-arkiv och ZIP-arkiv att\n s\u00F6ka efter klassfiler i, avgr\u00E4nsad med {0}.\n -p \n --module-path ...\n En lista \u00F6ver kataloger, d\u00E4r varje katalog \u00E4r en katalog\n med moduler, avgr\u00E4nsad med {0}.\n --upgrade-module-path ...\n En lista \u00F6ver kataloger, d\u00E4r varje katalog \u00E4r en katalog\n med moduler som ers\u00E4tter uppgraderingsbara moduler\n i exekveringsavbilden, avgr\u00E4nsad med {0} \n -m [/]\n --module [/]\n den ursprungliga modulen att l\u00F6sa och namnet p\u00E5 huvudklassen\n att k\u00F6ra, om den inte anges av modulen\n --add-modules [,...]\n rotmoduler att l\u00F6sa f\u00F6rutom den ursprungliga modulen.\n kan \u00E4ven vara ALL-DEFAULT, ALL-SYSTEM och\n ALL-MODULE-PATH.\n --limit-modules [,...]\n begr\u00E4nsa universumet med observerbara moduler\n --list-modules [[,...]]\n lista de observerbara modulerna och avsluta\n --dry-run skapa VM:en men k\u00F6r inte huvudmetoden.\n Det h\u00E4r alternativet kan vara anv\u00E4ndbart f\u00F6r att validera\n kommandoradsalternativen, som modulsystemkonfigurationen.\n -D=\n ange en systemegenskap\n -verbose:[class|gc|jni]\n aktivera utf\u00F6rliga utdata\n -version skriv ut produktversion och avsluta\n -showversion skriv ut produktversion och forts\u00E4tt\n -? -help --help\n skriv ut det h\u00E4r hj\u00E4lpmeddelandet\n -X skriv ut hj\u00E4lp f\u00F6r icke-standardalternativ\n -ea[:...|:]\n -enableassertions[:...|:]\n aktivera verifieringar med den angivna detaljgraden\n -da[:...|:]\n -disableassertions[:...|:]\n avaktivera verifieringar med den angivna detaljgraden\n -esa | -enablesystemassertions\n aktivera systemverifieringar\n -dsa | -disablesystemassertions\n avaktivera systemverifieringar\n -agentlib:[=]\n ladda det ursprungliga agentbiblioteket , exempel: -agentlib:jdwp\n se \u00E4ven -agentlib:jdwp=help\n -agentpath:[=]\n ladda det ursprungliga agentbiblioteket med fullst\u00E4ndigt s\u00F6kv\u00E4gsnamn\n -javaagent:[=]\n ladda agenten f\u00F6r programmeringsspr\u00E5ket Java, se java.lang.instrument\n -splash:\n visa v\u00E4lkomstsk\u00E4rmen med den angivna bilden\n HiDPI-skal\u00E4ndrade bilder st\u00F6ds automatiskt och anv\u00E4nds om de \u00E4r\n tillg\u00E4ngliga. Filnamnet p\u00E5 den oskal\u00E4ndrade bilden, t.ex.\n bild.filtill\u00E4gg, ska alltid \u00F6verf\u00F6ras som argument till\n alternativet -splash.\n Den l\u00E4mpligaste skal\u00E4ndrade bilden v\u00E4ljs automatiskt.\n Mer information finns i dokumentationen f\u00F6r API:t SplashScreen.\n @ l\u00E4s alternativ fr\u00E5n den angivna filen\nOm du vill ange ett argument f\u00F6r \ -ett l\u00E5ngt alternativ kan du anv\u00E4nda --=\neller -- .\n -See Se http://www.oracle.com/technetwork/java/javase/documentation/index.html f\u00F6r mer information. - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch avaktivera bakgrundskompilering\n -Xbootclasspath/a:\n l\u00E4gg till sist i klass\u00F6kv\u00E4gen f\u00F6r programladdning\n -Xcheck:jni utf\u00F6r fler kontroller f\u00F6r JNI-funktioner\n -Xcomp tvingar kompilering av metoder vid det f\u00F6rsta anropet\n -Xdebug tillhandah\u00E5lls f\u00F6r bak\u00E5tkompatibilitet\n -Xdiag visa fler diagnostiska meddelanden\n -Xdiag:resolver visa diagnostiska meddelanden f\u00F6r matchning\n -Xfuture aktivera str\u00E4ngaste kontroller, f\u00F6rv\u00E4ntad framtida standard\n -Xint endast exekvering i tolkat l\u00E4ge\n -Xinternalversion\n visar mer detaljerad information om JVM-version \u00E4n\n alternativet -version\n -Xloggc: logga GC-status till en fil med tidsst\u00E4mplar\n -Xmixed exekvering i blandat l\u00E4ge (standard)\n -Xmn anger ursprunglig och maximal storlek (i byte) f\u00F6r h\u00F6gen f\u00F6r\n generationen med nyare objekt (h\u00F6gen f\u00F6r tilldelning av nya objekt)\n -Xms ange ursprunglig storlek f\u00F6r Java-heap-utrymmet\n -Xmx ange st\u00F6rsta storlek f\u00F6r Java-heap-utrymmet\n -Xnoclassgc avaktivera klasskr\u00E4pinsamling\n -Xprof utdata f\u00F6r processorprofilering\n -Xrs minska operativsystemssignalanv\u00E4ndning f\u00F6r Java/VM (se dokumentationen)\n -Xshare:auto anv\u00E4nd delade klassdata om m\u00F6jligt (standard)\n -Xshare:off f\u00F6rs\u00F6k inte anv\u00E4nda delade klassdata\n -Xshare:on kr\u00E4v anv\u00E4ndning av delade klassdata, utf\u00F6r inte i annat fall.\n -XshowSettings visa alla inst\u00E4llningar och forts\u00E4tt\n -XshowSettings:all\n visa alla inst\u00E4llningar och forts\u00E4tt\n -XshowSettings:locale\n visa alla spr\u00E5kkonventionsrelaterade inst\u00E4llningar och forts\u00E4tt\n -XshowSettings:properties\n visa alla egenskapsinst\u00E4llningar och forts\u00E4tt\n -XshowSettings:vm visa alla vm-relaterade inst\u00E4llningar och forts\u00E4tt\n -Xss ange storlek f\u00F6r java-tr\u00E5dsstacken\n -Xverify anger l\u00E4ge f\u00F6r bytekodverifieraren\n --add-reads =(,)*\n uppdaterar att l\u00E4sa , oavsett\n moduldeklarationen. \n kan vara ALL-UNNAMED f\u00F6r att l\u00E4sa alla\n ej namngivna moduler.\n --add-exports /=(,)*\n uppdaterar att exportera till ,\n oavsett moduldeklarationen.\n kan vara ALL-UNNAMED f\u00F6r att exportera till alla\n ej namngivna moduler.\n --disable-@files avaktivera ytterligare argumentfilsut\u00F6kning\n --patch-module =({0})*\n \u00C5sidos\u00E4tt eller ut\u00F6ka en modul med klasser och resurser\n i JAR-filer eller kataloger.\n\nDe h\u00E4r alternativen \u00E4r icke-standardalternativ och kan \u00E4ndras utan f\u00F6reg\u00E5ende meddelande.\n +java.launcher.X.usage=\n -Xbatch avaktivera bakgrundskompilering\n -Xbootclasspath/a:\n l\u00E4gg till sist i klass\u00F6kv\u00E4gen f\u00F6r programladdning\n -Xcheck:jni utf\u00F6r fler kontroller f\u00F6r JNI-funktioner\n -Xcomp tvingar kompilering av metoder vid det f\u00F6rsta anropet\n -Xdebug tillhandah\u00E5lls f\u00F6r bak\u00E5tkompatibilitet\n -Xdiag visa fler diagnostiska meddelanden\n -Xdiag:resolver visa diagnostiska meddelanden f\u00F6r matchning\n -Xfuture aktivera str\u00E4ngaste kontroller, f\u00F6rv\u00E4ntad framtida standard\n -Xint endast exekvering i tolkat l\u00E4ge\n -Xinternalversion\n visar mer detaljerad information om JVM-version \u00E4n\n alternativet -version\n -Xloggc: logga GC-status till en fil med tidsst\u00E4mplar\n -Xmixed exekvering i blandat l\u00E4ge (standard)\n -Xmn anger ursprunglig och maximal storlek (i byte) f\u00F6r h\u00F6gen f\u00F6r\n generationen med nyare objekt (h\u00F6gen f\u00F6r tilldelning av nya objekt)\n -Xms ange ursprunglig storlek f\u00F6r Java-heap-utrymmet\n -Xmx ange st\u00F6rsta storlek f\u00F6r Java-heap-utrymmet\n -Xnoclassgc avaktivera klasskr\u00E4pinsamling\n -Xprof utdata f\u00F6r processorprofilering\n -Xrs minska operativsystemssignalanv\u00E4ndning f\u00F6r Java/VM (se dokumentationen)\n -Xshare:auto anv\u00E4nd delade klassdata om m\u00F6jligt (standard)\n -Xshare:off f\u00F6rs\u00F6k inte anv\u00E4nda delade klassdata\n -Xshare:on kr\u00E4v anv\u00E4ndning av delade klassdata, utf\u00F6r inte i annat fall.\n -XshowSettings visa alla inst\u00E4llningar och forts\u00E4tt\n -XshowSettings:all\n visa alla inst\u00E4llningar och forts\u00E4tt\n -XshowSettings:locale\n visa alla spr\u00E5kkonventionsrelaterade inst\u00E4llningar och forts\u00E4tt\n -XshowSettings:properties\n visa alla egenskapsinst\u00E4llningar och forts\u00E4tt\n -XshowSettings:vm visa alla vm-relaterade inst\u00E4llningar och forts\u00E4tt\n -Xss ange storlek f\u00F6r java-tr\u00E5dsstacken\n -Xverify anger l\u00E4ge f\u00F6r bytekodverifieraren\n --add-reads =(,)*\n uppdaterar f\u00F6r att l\u00E4sa , oavsett\n moduldeklarationen. \n kan vara ALL-UNNAMED f\u00F6r att l\u00E4sa alla\n ej namngivna moduler.\n --add-exports /=(,)*\n uppdaterar f\u00F6r att exportera till ,\n oavsett moduldeklarationen.\n kan vara ALL-UNNAMED f\u00F6r att exportera till alla\n ej namngivna moduler.\n --add-opens /=(,)*\n uppdaterar f\u00F6r att \u00F6ppna till\n , oavsett moduldeklarationen.\n --disable-@files avaktivera ytterligare argumentfilsut\u00F6kning\n --patch-module =({0})*\n \u00C5sidos\u00E4tt eller ut\u00F6ka en modul med klasser och resurser\n i JAR-filer eller kataloger.\n\nDe h\u00E4r extra alternativen kan \u00E4ndras utan f\u00F6reg\u00E5ende meddelande. # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\nF\u00F6ljande alternativ \u00E4r Mac OS X-specifika:\n -XstartOnFirstThread\n k\u00F6r main()-metoden p\u00E5 den f\u00F6rsta (AppKit)-tr\u00E5den\n -Xdock:name=\n \u00E5sidos\u00E4tt det standardapplikationsnamn som visas i dockan\n -Xdock:icon=\n \u00E5sidos\u00E4tt den standardikon som visas i dockan\n\n diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties index b2043dad703..70975375e3a 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -24,23 +24,19 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = \u7528\u6CD5: {0} [options] class [args...]\n (\u6267\u884C\u7C7B)\n \u6216 {0} [options] -jar jarfile [args...]\n (\u6267\u884C jar \u6587\u4EF6)\n \u6216 {0} [options] -p <\u6A21\u5757\u8DEF\u5F84> -m <\u6A21\u5757\u540D\u79F0>[/<\u6A21\u5757\u7C7B>] [args...]\n (\u6267\u884C\u6A21\u5757\u4E2D\u7684\u4E3B\u7C7B)\n\u5176\u4E2D\u9009\u9879\u5305\u62EC:\n +java.launcher.opt.header = \u7528\u6CD5: {0} [options] class [args...]\n (\u6267\u884C\u7C7B)\n \u6216 {0} [options] -jar jarfile [args...]\n (\u6267\u884C jar \u6587\u4EF6)\n \u6216 {0} [options] -p <\u6A21\u5757\u8DEF\u5F84> -m <\u6A21\u5757\u540D\u79F0>[/<\u6A21\u5757\u7C7B>] [args...]\n (\u6267\u884C\u6A21\u5757\u4E2D\u7684\u4E3B\u7C7B)\n\u5176\u4E2D\u9009\u9879\u5305\u62EC:\n\n java.launcher.opt.datamodel =\ -d{0}\t \u5DF2\u8FC7\u65F6, \u5728\u4EE5\u540E\u7684\u53D1\u884C\u7248\u4E2D\u5C06\u88AB\u5220\u9664\n java.launcher.opt.vmselect =\ {0}\t \u9009\u62E9 "{1}" VM\n java.launcher.opt.hotspot =\ {0}\t \u662F "{1}" VM \u7684\u540C\u4E49\u8BCD [\u5DF2\u8FC7\u65F6]\n -java.launcher.ergo.message1 =\ \u9ED8\u8BA4 VM \u662F {0} -java.launcher.ergo.message2 =\ \u56E0\u4E3A\u60A8\u662F\u5728\u670D\u52A1\u5668\u7C7B\u8BA1\u7B97\u673A\u4E0A\u8FD0\u884C\u3002\n +# Translators please note do not translate the options themselves +java.launcher.opt.footer =\ -cp <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n -classpath <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n --class-path <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n \u7528\u4E8E\u641C\u7D22\u7C7B\u6587\u4EF6\u7684\u76EE\u5F55, JAR \u6863\u6848\n \u548C ZIP \u6863\u6848\u7684\u5217\u8868, \u4F7F\u7528 {0} \u5206\u9694\u3002\n -p <\u6A21\u5757\u8DEF\u5F84>\n --module-path <\u6A21\u5757\u8DEF\u5F84>...\n \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55\u3002\n --upgrade-module-path <\u6A21\u5757\u8DEF\u5F84>...\n \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55, \u8FD9\u4E9B\u6A21\u5757\n \u7528\u4E8E\u66FF\u6362\u8FD0\u884C\u65F6\u6620\u50CF\u4E2D\u7684\u53EF\u5347\u7EA7\u6A21\u5757\n -m <\u6A21\u5757>[/<\u4E3B\u7C7B>]\n --module <\u6A21\u5757\u540D\u79F0>[/<\u4E3B\u7C7B>]\n \u8981\u89E3\u6790\u7684\u521D\u59CB\u6A21\u5757, \u4EE5\u53CA\u5728\u672A\u7531\u6A21\u5757\u6307\u5B9A\u65F6\n \u8981\u6267\u884C\u7684\u4E3B\u7C7B\u540D\u79F0\n --add-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n \u9664\u4E86\u521D\u59CB\u6A21\u5757\u4E4B\u5916\u8981\u89E3\u6790\u7684\u6839\u6A21\u5757\u3002\n <\u6A21\u5757\u540D\u79F0> \u8FD8\u53EF\u4EE5\u4E3A ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH\u3002\n --limit-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n \u9650\u5236\u53EF\u89C2\u5BDF\u6A21\u5757\u7684\u9886\u57DF\n --list-modules [<\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]]\n \u5217\u51FA\u53EF\u89C2\u5BDF\u6A21\u5757\u5E76\u9000\u51FA\n --dry-run \u521B\u5EFA VM \u4F46\u4E0D\u6267\u884C main \u65B9\u6CD5\u3002\n \u6B64 --dry-run \u9009\u9879\u5BF9\u4E8E\u9A8C\u8BC1\u8BF8\u5982\n \u6A21\u5757\u7CFB\u7EDF\u914D\u7F6E\u8FD9\u6837\u7684\u547D\u4EE4\u884C\u9009\u9879\u53EF\u80FD\u662F\u975E\u5E38\u6709\u7528\u7684\u3002\n -D<\u540D\u79F0>=<\u503C>\n \u8BBE\u7F6E\u7CFB\u7EDF\u5C5E\u6027\n -verbose:[class|gc|jni]\n \u542F\u7528\u8BE6\u7EC6\u8F93\u51FA\n -version \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\u5E76\u9000\u51FA\n --version \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\u5E76\u9000\u51FA\n -showversion \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\u5E76\u7EE7\u7EED\n --show-version\n \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\u5E76\u7EE7\u7EED\n -? -h -help\n \u5C06\u6B64\u5E2E\u52A9\u6D88\u606F\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\n --help \u5C06\u6B64\u5E2E\u52A9\u6D88\u606F\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\n -X \u5C06\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\n --help-extra \u5C06\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\n -ea[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n -enableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n \u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u542F\u7528\u65AD\u8A00\n -da[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n -disableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n \u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u7981\u7528\u65AD\u8A00\n -esa | -enablesystemassertions\n \u542F\u7528\u7CFB\u7EDF\u65AD\u8A00\n -dsa | \ +-disablesystemassertions\n \u7981\u7528\u7CFB\u7EDF\u65AD\u8A00\n -agentlib:<\u5E93\u540D>[=<\u9009\u9879>]\n \u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93 <\u5E93\u540D>, \u4F8B\u5982 -agentlib:jdwp\n \u53E6\u8BF7\u53C2\u9605 -agentlib:jdwp=help\n -agentpath:<\u8DEF\u5F84\u540D>[=<\u9009\u9879>]\n \u6309\u5B8C\u6574\u8DEF\u5F84\u540D\u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93\n -javaagent:[=<\u9009\u9879>]\n \u52A0\u8F7D Java \u7F16\u7A0B\u8BED\u8A00\u4EE3\u7406, \u8BF7\u53C2\u9605 java.lang.instrument\n -splash:<\u56FE\u50CF\u8DEF\u5F84>\n \u4F7F\u7528\u6307\u5B9A\u7684\u56FE\u50CF\u663E\u793A\u542F\u52A8\u5C4F\u5E55\n \u81EA\u52A8\u652F\u6301\u548C\u4F7F\u7528 HiDPI \u7F29\u653E\u56FE\u50CF\n (\u5982\u679C\u53EF\u7528)\u3002\u672A\u7F29\u653E\u7684\u56FE\u50CF\u6587\u4EF6\u540D (\u4F8B\u5982, image.ext)\n \u5E94\u59CB\u7EC8\u4F5C\u4E3A\u53C2\u6570\u4F20\u9012\u7ED9 -splash \u9009\u9879\u3002\n \u5C06\u81EA\u52A8\u9009\u53D6\u63D0\u4F9B\u7684\u6700\u9002\u5F53\u7684\u7F29\u653E\n \u56FE\u50CF\u3002\n \u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605 SplashScreen API \u6587\u6863\u3002\n @<\u6587\u4EF6\u8DEF\u5F84> \u4ECE\u6307\u5B9A\u6587\u4EF6\u4E2D\u8BFB\u53D6\u9009\u9879\n\n\u8981\u4E3A\u957F\u9009\u9879\u6307\u5B9A\u53C2\u6570, \u53EF\u4EE5\u4F7F\u7528 --<\u540D\u79F0>=<\u503C> \u6216\n--<\u540D\u79F0> <\u503C>\u3002\n # Translators please note do not translate the options themselves -java.launcher.opt.footer =\ -cp <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n -classpath <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n --class-path <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n \u7528\u4E8E\u641C\u7D22\u7C7B\u6587\u4EF6\u7684\u76EE\u5F55, JAR \u6863\u6848\n \u548C ZIP \u6863\u6848\u7684\u5217\u8868, \u4F7F\u7528 {0} \u5206\u9694\u3002\n -p <\u6A21\u5757\u8DEF\u5F84>\n --module-path <\u6A21\u5757\u8DEF\u5F84>...\n \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55\u3002\n --upgrade-module-path <\u6A21\u5757\u8DEF\u5F84>...\n \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55, \u8FD9\u4E9B\u6A21\u5757\n \u7528\u4E8E\u66FF\u6362\u8FD0\u884C\u65F6\u6620\u50CF\u4E2D\u7684\u53EF\u5347\u7EA7\u6A21\u5757\n -m <\u6A21\u5757>[/<\u4E3B\u7C7B>]\n --module <\u6A21\u5757\u540D\u79F0>[/<\u4E3B\u7C7B>]\n \u8981\u89E3\u6790\u7684\u521D\u59CB\u6A21\u5757, \u4EE5\u53CA\u5728\u672A\u7531\u6A21\u5757\u6307\u5B9A\u65F6\n \u8981\u6267\u884C\u7684\u4E3B\u7C7B\u540D\u79F0\n --add-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n \u9664\u4E86\u521D\u59CB\u6A21\u5757\u4E4B\u5916\u8981\u89E3\u6790\u7684\u6839\u6A21\u5757\u3002\n <\u6A21\u5757\u540D\u79F0> \u8FD8\u53EF\u4EE5\u4E3A ALL-DEFAULT, ALL-SYSTEM,\n ALL-MODULE-PATH\u3002\n --limit-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n \u9650\u5236\u53EF\u89C2\u5BDF\u6A21\u5757\u7684\u9886\u57DF\n --list-modules [<\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]]\n \u5217\u51FA\u53EF\u89C2\u5BDF\u6A21\u5757\u5E76\u9000\u51FA\n --dry-run \u521B\u5EFA VM \u4F46\u4E0D\u6267\u884C\u4E3B\u65B9\u6CD5\u3002\n \u6B64 --dry-run \u9009\u9879\u5BF9\u4E8E\u9A8C\u8BC1\u8BF8\u5982\n \u6A21\u5757\u7CFB\u7EDF\u914D\u7F6E\u8FD9\u6837\u7684\u547D\u4EE4\u884C\u9009\u9879\u53EF\u80FD\u662F\u975E\u5E38\u6709\u7528\u7684\u3002\n -D<\u540D\u79F0>=<\u503C>\n \u8BBE\u7F6E\u7CFB\u7EDF\u5C5E\u6027\n -verbose:[class|gc|jni]\n \u542F\u7528\u8BE6\u7EC6\u8F93\u51FA\n -version \u8F93\u51FA\u4EA7\u54C1\u7248\u672C\u5E76\u9000\u51FA\n -showversion \u8F93\u51FA\u4EA7\u54C1\u7248\u672C\u5E76\u7EE7\u7EED\n -? -help --help\n \u8F93\u51FA\u6B64\u5E2E\u52A9\u6D88\u606F\n -X \u8F93\u51FA\u975E\u6807\u51C6\u9009\u9879\u7684\u5E2E\u52A9\n -ea[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n -enableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n \u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u542F\u7528\u65AD\u8A00\n -da[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n -disableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n \u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u7981\u7528\u65AD\u8A00\n -esa | -enablesystemassertions\n \u542F\u7528\u7CFB\u7EDF\u65AD\u8A00\n -dsa | -disablesystemassertions\n \u7981\u7528\u7CFB\u7EDF\u65AD\u8A00\n -agentlib:<\u5E93\u540D>[=<\u9009\u9879>]\n \u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93 <\u5E93\u540D>, \u4F8B\u5982 -agentlib:jdwp\n \u53E6\u8BF7\u53C2\u9605 -agentlib:jdwp=help\n -agentpath:<\u8DEF\u5F84\u540D>[=<\u9009\u9879>]\n \u6309\u5B8C\u6574\u8DEF\u5F84\u540D\u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93\n -javaagent:[=<\u9009\u9879>]\n \u52A0\u8F7D \ -Java \u7F16\u7A0B\u8BED\u8A00\u4EE3\u7406, \u8BF7\u53C2\u9605 java.lang.instrument\n -splash:<\u56FE\u50CF\u8DEF\u5F84>\n \u4F7F\u7528\u6307\u5B9A\u7684\u56FE\u50CF\u663E\u793A\u542F\u52A8\u5C4F\u5E55\n \u81EA\u52A8\u652F\u6301\u548C\u4F7F\u7528 HiDPI \u7F29\u653E\u56FE\u50CF\n (\u5982\u679C\u53EF\u7528)\u3002\u672A\u7F29\u653E\u7684\u56FE\u50CF\u6587\u4EF6\u540D (\u4F8B\u5982, image.ext)\n \u5E94\u59CB\u7EC8\u4F5C\u4E3A\u53C2\u6570\u4F20\u9012\u7ED9 -splash \u9009\u9879\u3002\n \u5C06\u81EA\u52A8\u9009\u53D6\u63D0\u4F9B\u7684\u6700\u9002\u5F53\u7684\u7F29\u653E\n \u56FE\u50CF\u3002\n \u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605 SplashScreen API \u6587\u6863\u3002\n @<\u6587\u4EF6\u8DEF\u5F84> \u4ECE\u6307\u5B9A\u6587\u4EF6\u4E2D\u8BFB\u53D6\u9009\u9879\n\u8981\u4E3A\u957F\u9009\u9879\u6307\u5B9A\u53C2\u6570, \u53EF\u4EE5\u4F7F\u7528 --<\u540D\u79F0>=<\u503C> \u6216\n--<\u540D\u79F0> <\u503C>\u3002\n -See \u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605 http://www.oracle.com/technetwork/java/javase/documentation/index.html\u3002 - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch \u7981\u7528\u540E\u53F0\u7F16\u8BD1\n -Xbootclasspath/a:<\u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u548C zip/jar \u6587\u4EF6>\n \u9644\u52A0\u5728\u5F15\u5BFC\u7C7B\u8DEF\u5F84\u672B\u5C3E\n -Xcheck:jni \u5BF9 JNI \u51FD\u6570\u6267\u884C\u5176\u4ED6\u68C0\u67E5\n -Xcomp \u5728\u9996\u6B21\u8C03\u7528\u65F6\u5F3A\u5236\u7F16\u8BD1\u65B9\u6CD5\n -Xdebug \u4E3A\u5B9E\u73B0\u5411\u540E\u517C\u5BB9\u800C\u63D0\u4F9B\n -Xdiag \u663E\u793A\u9644\u52A0\u8BCA\u65AD\u6D88\u606F\n -Xdiag:resolver \u663E\u793A\u89E3\u6790\u5668\u8BCA\u65AD\u6D88\u606F\n -Xfuture \u542F\u7528\u6700\u4E25\u683C\u7684\u68C0\u67E5, \u9884\u671F\u5C06\u6765\u7684\u9ED8\u8BA4\u503C\n -Xint \u4EC5\u89E3\u91CA\u6A21\u5F0F\u6267\u884C\n -Xinternalversion\n \u663E\u793A\u6BD4 -version \u9009\u9879\u66F4\u8BE6\u7EC6\u7684 JVM\n \u7248\u672C\u4FE1\u606F\n -Xloggc:<\u6587\u4EF6> \u5C06 GC \u72B6\u6001\u8BB0\u5F55\u5728\u6587\u4EF6\u4E2D (\u5E26\u65F6\u95F4\u6233)\n -Xmixed \u6DF7\u5408\u6A21\u5F0F\u6267\u884C (\u9ED8\u8BA4\u503C)\n -Xmn<\u5927\u5C0F> \u4E3A\u5E74\u8F7B\u4EE3 (\u65B0\u751F\u4EE3) \u8BBE\u7F6E\u521D\u59CB\u548C\u6700\u5927\u5806\u5927\u5C0F\n (\u4EE5\u5B57\u8282\u4E3A\u5355\u4F4D)\n -Xms<\u5927\u5C0F> \u8BBE\u7F6E\u521D\u59CB Java \u5806\u5927\u5C0F\n -Xmx<\u5927\u5C0F> \u8BBE\u7F6E\u6700\u5927 Java \u5806\u5927\u5C0F\n -Xnoclassgc \u7981\u7528\u7C7B\u5783\u573E\u6536\u96C6\n -Xprof \u8F93\u51FA cpu \u914D\u7F6E\u6587\u4EF6\u6570\u636E\n -Xrs \u51CF\u5C11 Java/VM \u5BF9\u64CD\u4F5C\u7CFB\u7EDF\u4FE1\u53F7\u7684\u4F7F\u7528 (\u8BF7\u53C2\u9605\u6587\u6863)\n -Xshare:auto \u5728\u53EF\u80FD\u7684\u60C5\u51B5\u4E0B\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E (\u9ED8\u8BA4\u503C)\n -Xshare:off \u4E0D\u5C1D\u8BD5\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E\n -Xshare:on \u8981\u6C42\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E, \u5426\u5219\u5C06\u5931\u8D25\u3002\n -XshowSettings \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:all\n \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:locale\n \u663E\u793A\u6240\u6709\u4E0E\u533A\u57DF\u8BBE\u7F6E\u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EEDe\n -XshowSettings:properties\n \u663E\u793A\u6240\u6709\u5C5E\u6027\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:vm \u663E\u793A\u6240\u6709\u4E0E vm \u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -Xss<\u5927\u5C0F> \u8BBE\u7F6E Java \u7EBF\u7A0B\u5806\u6808\u5927\u5C0F\n -Xverify \u8BBE\u7F6E\u5B57\u8282\u7801\u9A8C\u8BC1\u5668\u7684\u6A21\u5F0F\n --add-reads <\u6A21\u5757>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u8BFB\u53D6 <\u76EE\u6807\u6A21\u5757>,\n \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n <\u76EE\u6807\u6A21\u5757> \u53EF\u4EE5\u662F ALL-UNNAMED \u4EE5\u8BFB\u53D6\u6240\u6709\u672A\u547D\u540D\n \u6A21\u5757\u3002\n --add-exports <\u6A21\u5757>/<\u7A0B\u5E8F\u5305>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u5C06 <\u7A0B\u5E8F\u5305> \u5BFC\u51FA\u5230 <\u76EE\u6807\u6A21\u5757>,\n \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n <\u76EE\u6807\u6A21\u5757> \u53EF\u4EE5\u662F ALL-UNNAMED \u4EE5\u5BFC\u51FA\u6240\u6709\n \u672A\u547D\u540D\u6A21\u5757\u3002\n --disable-@files \u7981\u6B62\u8FDB\u4E00\u6B65\u6269\u5C55\u53C2\u6570\u6587\u4EF6\n --patch-module \ -<\u6A21\u5757>=<\u6587\u4EF6>({0}<\u6587\u4EF6>)*\n \u4F7F\u7528 JAR \u6587\u4EF6\u6216\u76EE\u5F55\u4E2D\u7684\u7C7B\u548C\u8D44\u6E90\n \u8986\u76D6\u6216\u589E\u5F3A\u6A21\u5757\u3002\n\n\u8FD9\u4E9B\u9009\u9879\u662F\u975E\u6807\u51C6\u9009\u9879, \u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n +java.launcher.X.usage=\n -Xbatch \u7981\u7528\u540E\u53F0\u7F16\u8BD1\n -Xbootclasspath/a:<\u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u548C zip/jar \u6587\u4EF6>\n \u9644\u52A0\u5728\u5F15\u5BFC\u7C7B\u8DEF\u5F84\u672B\u5C3E\n -Xcheck:jni \u5BF9 JNI \u51FD\u6570\u6267\u884C\u5176\u4ED6\u68C0\u67E5\n -Xcomp \u5728\u9996\u6B21\u8C03\u7528\u65F6\u5F3A\u5236\u7F16\u8BD1\u65B9\u6CD5\n -Xdebug \u4E3A\u5B9E\u73B0\u5411\u540E\u517C\u5BB9\u800C\u63D0\u4F9B\n -Xdiag \u663E\u793A\u9644\u52A0\u8BCA\u65AD\u6D88\u606F\n -Xdiag:resolver \u663E\u793A\u89E3\u6790\u5668\u8BCA\u65AD\u6D88\u606F\n -Xfuture \u542F\u7528\u6700\u4E25\u683C\u7684\u68C0\u67E5, \u9884\u671F\u5C06\u6765\u7684\u9ED8\u8BA4\u503C\n -Xint \u4EC5\u89E3\u91CA\u6A21\u5F0F\u6267\u884C\n -Xinternalversion\n \u663E\u793A\u6BD4 -version \u9009\u9879\u66F4\u8BE6\u7EC6\u7684 JVM\n \u7248\u672C\u4FE1\u606F\n -Xloggc:<\u6587\u4EF6> \u5C06 GC \u72B6\u6001\u8BB0\u5F55\u5728\u6587\u4EF6\u4E2D (\u5E26\u65F6\u95F4\u6233)\n -Xmixed \u6DF7\u5408\u6A21\u5F0F\u6267\u884C (\u9ED8\u8BA4\u503C)\n -Xmn<\u5927\u5C0F> \u4E3A\u5E74\u8F7B\u4EE3 (\u65B0\u751F\u4EE3) \u8BBE\u7F6E\u521D\u59CB\u548C\u6700\u5927\u5806\u5927\u5C0F\n (\u4EE5\u5B57\u8282\u4E3A\u5355\u4F4D)\n -Xms<\u5927\u5C0F> \u8BBE\u7F6E\u521D\u59CB Java \u5806\u5927\u5C0F\n -Xmx<\u5927\u5C0F> \u8BBE\u7F6E\u6700\u5927 Java \u5806\u5927\u5C0F\n -Xnoclassgc \u7981\u7528\u7C7B\u5783\u573E\u6536\u96C6\n -Xprof \u8F93\u51FA cpu \u5206\u6790\u6570\u636E\n -Xrs \u51CF\u5C11 Java/VM \u5BF9\u64CD\u4F5C\u7CFB\u7EDF\u4FE1\u53F7\u7684\u4F7F\u7528 (\u8BF7\u53C2\u9605\u6587\u6863)\n -Xshare:auto \u5728\u53EF\u80FD\u7684\u60C5\u51B5\u4E0B\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E (\u9ED8\u8BA4\u503C)\n -Xshare:off \u4E0D\u5C1D\u8BD5\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E\n -Xshare:on \u8981\u6C42\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E, \u5426\u5219\u5C06\u5931\u8D25\u3002\n -XshowSettings \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:all\n \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:locale\n \u663E\u793A\u6240\u6709\u4E0E\u533A\u57DF\u8BBE\u7F6E\u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EEDe\n -XshowSettings:properties\n \u663E\u793A\u6240\u6709\u5C5E\u6027\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -XshowSettings:vm \u663E\u793A\u6240\u6709\u4E0E vm \u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n -Xss<\u5927\u5C0F> \u8BBE\u7F6E Java \u7EBF\u7A0B\u5806\u6808\u5927\u5C0F\n -Xverify \u8BBE\u7F6E\u5B57\u8282\u7801\u9A8C\u8BC1\u5668\u7684\u6A21\u5F0F\n --add-reads <\u6A21\u5757>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u8BFB\u53D6 <\u76EE\u6807\u6A21\u5757>,\n \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n <\u76EE\u6807\u6A21\u5757> \u53EF\u4EE5\u662F ALL-UNNAMED \u4EE5\u8BFB\u53D6\u6240\u6709\u672A\u547D\u540D\n \u6A21\u5757\u3002\n --add-exports <\u6A21\u5757>/<\u7A0B\u5E8F\u5305>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u5C06 <\u7A0B\u5E8F\u5305> \u5BFC\u51FA\u5230 <\u76EE\u6807\u6A21\u5757>,\n \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n <\u76EE\u6807\u6A21\u5757> \u53EF\u4EE5\u662F ALL-UNNAMED \u4EE5\u5BFC\u51FA\u6240\u6709\n \u672A\u547D\u540D\u6A21\u5757\u3002\n --add-opens \ +<\u6A21\u5757>/<\u7A0B\u5E8F\u5305>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u5728 <\u76EE\u6807\u6A21\u5757> \u4E2D\n \u6253\u5F00 <\u7A0B\u5E8F\u5305>, \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n --disable-@files \u7981\u6B62\u8FDB\u4E00\u6B65\u6269\u5C55\u53C2\u6570\u6587\u4EF6\n --patch-module <\u6A21\u5757>=<\u6587\u4EF6>({0}<\u6587\u4EF6>)*\n \u4F7F\u7528 JAR \u6587\u4EF6\u6216\u76EE\u5F55\u4E2D\u7684\u7C7B\u548C\u8D44\u6E90\n \u8986\u76D6\u6216\u589E\u5F3A\u6A21\u5757\u3002\n\n\u8FD9\u4E9B\u989D\u5916\u9009\u9879\u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\n\u4EE5\u4E0B\u9009\u9879\u4E3A Mac OS X \u7279\u5B9A\u7684\u9009\u9879:\n -XstartOnFirstThread\n \u5728\u7B2C\u4E00\u4E2A (AppKit) \u7EBF\u7A0B\u4E0A\u8FD0\u884C main() \u65B9\u6CD5\n -Xdock:name=<\u5E94\u7528\u7A0B\u5E8F\u540D\u79F0>\n \u8986\u76D6\u505C\u9760\u680F\u4E2D\u663E\u793A\u7684\u9ED8\u8BA4\u5E94\u7528\u7A0B\u5E8F\u540D\u79F0\n -Xdock:icon=<\u56FE\u6807\u6587\u4EF6\u7684\u8DEF\u5F84>\n \u8986\u76D6\u505C\u9760\u680F\u4E2D\u663E\u793A\u7684\u9ED8\u8BA4\u56FE\u6807\n\n diff --git a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_TW.properties b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_TW.properties index 38815af2ae4..af484c784e2 100644 --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_TW.properties +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_TW.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -24,23 +24,19 @@ # # Translators please note do not translate the options themselves -java.launcher.opt.header = \u7528\u6CD5: {0} [options] class [args...]\n (\u7528\u65BC\u57F7\u884C\u985E\u5225)\n \u6216 {0} [options] -jar jarfile [args...]\n (\u7528\u65BC\u57F7\u884C jar \u6A94\u6848)\n \u6216 {0} [options] -p -m [/] [args...]\n (\u7528\u65BC\u57F7\u884C\u6A21\u7D44\u4E2D\u7684\u4E3B\u8981\u985E\u5225)\n\u5176\u4E2D\u7684\u9078\u9805\u5305\u62EC:\n +java.launcher.opt.header = \u7528\u6CD5: {0} [options] class [args...]\n (\u7528\u65BC\u57F7\u884C\u985E\u5225)\n \u6216 {0} [options] -jar jarfile [args...]\n (\u7528\u65BC\u57F7\u884C jar \u6A94\u6848)\n \u6216 {0} [options] -p -m [/] [args...]\n (\u7528\u65BC\u57F7\u884C\u6A21\u7D44\u4E2D\u7684\u4E3B\u8981\u985E\u5225)\n\u5176\u4E2D\u7684\u9078\u9805\u5305\u62EC:\n\n java.launcher.opt.datamodel =\ -d{0}\t \u5DF2\u4E0D\u518D\u4F7F\u7528\uFF0C\u5C07\u65BC\u672A\u4F86\u7248\u672C\u4E2D\u79FB\u9664\n java.launcher.opt.vmselect =\ {0}\t \u9078\u53D6 "{1}" VM\n java.launcher.opt.hotspot =\ {0}\t \u662F "{1}" VM \u7684\u540C\u7FA9\u5B57 [\u5DF2\u4E0D\u518D\u4F7F\u7528]\n -java.launcher.ergo.message1 =\ \u9810\u8A2D\u7684 VM \u70BA {0} -java.launcher.ergo.message2 =\ \u56E0\u70BA\u60A8\u6B63\u5728\u4F3A\u670D\u5668\u985E\u5225\u6A5F\u5668\u4E0A\u57F7\u884C\u3002\n +# Translators please note do not translate the options themselves +java.launcher.opt.footer =\ -cp \n -classpath \n --class-path \n \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u3001JAR \u5B58\u6A94\u4EE5\u53CA\n ZIP \u5B58\u6A94\u6E05\u55AE\uFF0C\u5C07\u5728\u5176\u4E2D\u641C\u5C0B\u985E\u5225\u6A94\u6848\u3002\n -p \n --module-path ...\n \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n \u90FD\u662F\u4E00\u500B\u6A21\u7D44\u76EE\u9304\u3002\n --upgrade-module-path ...\n \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n \u90FD\u662F\u4E00\u500B\u6A21\u7D44\u76EE\u9304\uFF0C \u7576\u4E2D\u7684\u6A21\u7D44\u53EF\u53D6\u4EE3\n \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5F71\u50CF\u4E2D\u7684\u53EF\u5347\u7D1A\u6A21\u7D44\n -m [/]\n --module [/]\n \u8981\u89E3\u6790\u7684\u8D77\u59CB\u6A21\u7D44\uFF0C\u4EE5\u53CA\u8981\u57F7\u884C\u4E4B\u4E3B\u8981\u985E\u5225\n \u7684\u540D\u7A31 (\u82E5\u6A21\u7D44\u672A\u6307\u5B9A\u7684\u8A71)\n --add-modules [,...]\n \u9664\u4E86\u8D77\u59CB\u6A21\u7D44\u5916\uFF0C\u8981\u89E3\u6790\u7684\u6839\u6A21\u7D44\u3002\n \u4E5F\u53EF\u4EE5\u662F ALL-DEFAULT\u3001ALL-SYSTEM\u3001\n ALL-MODULE-PATH\u3002\n --limit-modules [,...]\n \u9650\u5236\u53EF\u76E3\u6E2C\u6A21\u7D44\u7684\u7BC4\u570D\n --list-modules [[,...]]\n \u5217\u51FA\u53EF\u76E3\u6E2C\u6A21\u7D44\u4E26\u7D50\u675F\n --dry-run \u5EFA\u7ACB VM \u4F46\u4E0D\u57F7\u884C\u4E3B\u8981\u65B9\u6CD5\u3002\n \u6B64 --dry-run \u9078\u9805\u5C0D\u65BC\u9A57\u8B49\u547D\u4EE4\u884C\u9078\u9805\n (\u4F8B\u5982\u6A21\u7D44\u7CFB\u7D71\u7D44\u614B) \u5F88\u6709\u7528\u3002\n -D=\n \u8A2D\u5B9A\u7CFB\u7D71\u5C6C\u6027\n -verbose:[class|gc|jni]\n \u555F\u7528\u8A73\u7D30\u8CC7\u8A0A\u8F38\u51FA\n -version \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7D50\u675F\n --version \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7D50\u675F\n -showversion \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7E7C\u7E8C\n --show-version\n \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7E7C\u7E8C\n -? -h -help\n \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u6B64\u8AAA\u660E\u8A0A\u606F\n --help \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u6B64\u8AAA\u660E\u8A0A\u606F\n -X \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u984D\u5916\u9078\u9805\u7684\u8AAA\u660E\n --help-extra \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u984D\u5916\u9078\u9805\u7684\u8AAA\u660E\n -ea[:...|:]\n -enableassertions[:...|:]\n \u555F\u7528\u6307\u5B9A\u4E4B\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n -da[:...|:]\n -disableassertions[:...|:]\n \u505C\u7528\u6307\u5B9A\u4E4B\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n -esa | -enablesystemassertions\n \u555F\u7528\u7CFB\u7D71\u5BA3\u544A\n -dsa | -disablesystemassertions\n \u505C\u7528\u7CFB\u7D71\u5BA3\u544A\n -agentlib:[=]\n \u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB \uFF0C\u4F8B\u5982 -agentlib:jdwp\n \u53E6\u8ACB\u53C3\u95B1 \ +-agentlib:jdwp=help\n -agentpath:[=]\n \u4F9D\u5B8C\u6574\u8DEF\u5F91\u540D\u7A31\u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB\n -javaagent:[=]\n \u8F09\u5165 Java \u7A0B\u5F0F\u8A9E\u8A00\u4EE3\u7406\u7A0B\u5F0F\uFF0C\u8ACB\u53C3\u95B1 java.lang.instrument\n -splash:\n \u986F\u793A\u542B\u6307\u5B9A\u5F71\u50CF\u7684\u8EDF\u9AD4\u8CC7\u8A0A\u756B\u9762\n \u7CFB\u7D71\u6703\u81EA\u52D5\u652F\u63F4\u4E26\u4F7F\u7528 HiDPI \u5DF2\u7E2E\u653E\u5F71\u50CF\n (\u5982\u679C\u53EF\u7528\u7684\u8A71)\u3002\u672A\u7E2E\u653E\u5F71\u50CF\u6A94\u6848\u540D\u7A31 (\u4F8B\u5982 image.ext)\n \u61C9\u4E00\u5F8B\u4EE5\u5F15\u6578\u7684\u5F62\u5F0F\u50B3\u9001\u5230 -splash \u9078\u9805\u3002\n \u7CFB\u7D71\u6703\u81EA\u52D5\u5F9E\u63D0\u4F9B\u7684\u5DF2\u7E2E\u653E\u5F71\u50CF\u4E2D\u9078\u64C7\u6700\u9069\u5408\u7684\n \u5DF2\u7E2E\u653E\u5F71\u50CF\u3002\n \u8ACB\u53C3\u95B1 SplashScreen API \u6587\u4EF6\uFF0C\u4EE5\u77AD\u89E3\u8A73\u7D30\u8CC7\u8A0A\u3002\n @ \u5F9E\u6307\u5B9A\u7684\u6A94\u6848\u8B80\u53D6\u9078\u9805\n\n\u82E5\u8981\u6307\u5B9A\u9577\u9078\u9805\u7684\u5F15\u6578\uFF0C\u53EF\u4EE5\u4F7F\u7528 --= \u6216\n-- \u3002\n # Translators please note do not translate the options themselves -java.launcher.opt.footer =\ -cp \n -classpath \n --class-path \n \u5C07\u5728\u5176\u4E2D\u641C\u5C0B\u985E\u5225\u6A94\u6848\u4E4B\u4EE5 {0} \u5340\u9694\u7684\n \u76EE\u9304\u3001JAR \u5B58\u6A94\u4EE5\u53CA ZIP \u5B58\u6A94\u6E05\u55AE\u3002\n -p \n --module-path ...\n \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n \u662F\u4E00\u500B\u6A21\u7D44\u76EE\u9304\u3002\n --upgrade-module-path ...\n \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n \u90FD\u662F\u4E00\u500B\u6A21\u7D44\u76EE\u9304\uFF0C\u7576\u4E2D\u7684\u6A21\u7D44\u53EF\u53D6\u4EE3\n \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5F71\u50CF\u4E2D\u7684\u53EF\u5347\u7D1A\u6A21\u7D44\n -m [/]\n --module [/]\n \u8981\u89E3\u6790\u7684\u8D77\u59CB\u6A21\u7D44\uFF0C\u4EE5\u53CA\u6A21\u7D44\u672A\u6307\u5B9A\u6642\n \u6240\u8981\u57F7\u884C\u4E4B\u4E3B\u8981\u985E\u5225\u7684\u540D\u7A31\n --add-modules [,...]\n \u9664\u4E86\u8D77\u59CB\u6A21\u7D44\u5916\uFF0C\u8981\u89E3\u6790\u7684\u6839\u6A21\u7D44\u3002\n \u4E5F\u53EF\u4EE5\u662F ALL-DEFAULT\u3001ALL-SYSTEM\u3001\n ALL-MODULE-PATH\u3002\n --limit-modules [,...]\n \u9650\u5236\u53EF\u76E3\u6E2C\u6A21\u7D44\u7684\u7BC4\u570D\n --list-modules [[,...]]\n \u5217\u51FA\u53EF\u76E3\u6E2C\u6A21\u7D44\u4E26\u7D50\u675F\n --dry-run \u5EFA\u7ACB VM \u4F46\u4E0D\u57F7\u884C\u4E3B\u8981\u65B9\u6CD5\u3002\n \u6B64 --dry-run \u9078\u9805\u5C0D\u65BC\u9A57\u8B49\u547D\u4EE4\u884C\u9078\u9805\n (\u4F8B\u5982\u6A21\u7D44\u7CFB\u7D71\u7D44\u614B) \u6703\u5F88\u6709\u7528\u3002\n -D=\n \u8A2D\u5B9A\u7CFB\u7D71\u5C6C\u6027\n -verbose:[class|gc|jni]\n \u555F\u7528\u8A73\u7D30\u8CC7\u8A0A\u8F38\u51FA\n -version \u5217\u5370\u7522\u54C1\u7248\u672C\u4E26\u7D50\u675F\n -showversion \u5217\u5370\u7522\u54C1\u7248\u672C\u4E26\u7E7C\u7E8C\n -? -help --help\n \u5217\u5370\u672C\u8AAA\u660E\u8A0A\u606F\n -X \u5217\u5370\u975E\u6A19\u6E96\u9078\u9805\u7684\u8AAA\u660E\n -ea[:...|:]\n -enableassertions[:...|:]\n \u555F\u7528\u6307\u5B9A\u4E4B\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n -da[:...|:]\n -disableassertions[:...|:]\n \u505C\u7528\u6307\u5B9A\u4E4B\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n -esa | -enablesystemassertions\n \u555F\u7528\u7CFB\u7D71\u5BA3\u544A\n -dsa | -disablesystemassertions\n \u505C\u7528\u7CFB\u7D71\u5BA3\u544A\n -agentlib:[=]\n \u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB \uFF0C\u4F8B\u5982 -agentlib:jdwp\n \u53E6\u8ACB\u53C3\u95B1 -agentlib:jdwp=help\n -agentpath:[=]\n \u4F7F\u7528\u5B8C\u6574\u8DEF\u5F91\u540D\u7A31\u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB\n -javaagent:[=]\n \u8F09\u5165 Java \u7A0B\u5F0F\u8A9E\u8A00\u4EE3\u7406\u7A0B\u5F0F\uFF0C\u8ACB\u53C3\u95B1 java.lang.instrument\n -splash:\n \u986F\u793A\u542B\u6307\u5B9A\u5F71\u50CF\u7684\u8EDF\u9AD4\u8CC7\u8A0A\u756B\u9762\n \ -\u7CFB\u7D71\u6703\u81EA\u52D5\u652F\u63F4\u4E26\u4F7F\u7528 HiDPI \u5DF2\u7E2E\u653E\u5F71\u50CF\n (\u5982\u679C\u53EF\u7528\u7684\u8A71)\u3002\u672A\u7E2E\u653E\u5F71\u50CF\u6A94\u6848\u540D\u7A31 (\u4F8B\u5982 image.ext)\n \u61C9\u4E00\u5F8B\u4EE5\u5F15\u6578\u7684\u5F62\u5F0F\u50B3\u9001\u5230 -splash \u9078\u9805\u3002\n \u7CFB\u7D71\u6703\u81EA\u52D5\u5F9E\u63D0\u4F9B\u7684\u5DF2\u7E2E\u653E\u5F71\u50CF\u4E2D\u9078\u64C7\u6700\u9069\u5408\u7684\n \u5DF2\u7E2E\u653E\u5F71\u50CF\u3002\n \u8ACB\u53C3\u95B1 SplashScreen API \u6587\u4EF6\uFF0C\u4EE5\u53D6\u5F97\u66F4\u591A\u8CC7\u8A0A\u3002\n @ \u5F9E\u6307\u5B9A\u7684\u6A94\u6848\u8B80\u53D6\u9078\u9805\n\u82E5\u8981\u6307\u5B9A\u9577\u9078\u9805\u7684\u5F15\u6578\uFF0C\u53EF\u4EE5\u4F7F\u7528 --= \u6216\n-- \u3002\n -See \u8ACB\u53C3\u95B1 http://www.oracle.com/technetwork/java/javase/documentation/index.html \u66B8\u89E3\u8A73\u7D30\u8CC7\u8A0A\u3002 - -# Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch \u505C\u7528\u80CC\u666F\u7DE8\u8B6F\n -Xbootclasspath/a:\n \u52A0\u5728\u555F\u52D5\u5B89\u88DD\u985E\u5225\u8DEF\u5F91\u7684\u7D50\u5C3E\n -Xcheck:jni \u57F7\u884C\u5176\u4ED6\u7684 JNI \u51FD\u6578\u6AA2\u67E5\n -Xcomp \u5F37\u5236\u7DE8\u8B6F\u7B2C\u4E00\u500B\u547C\u53EB\u7684\u65B9\u6CD5\n -Xdebug \u70BA\u56DE\u6EAF\u76F8\u5BB9\u6027\u63D0\u4F9B\n -Xdiag \u986F\u793A\u5176\u4ED6\u8A3A\u65B7\u8A0A\u606F\n -Xdiag:resolver \u986F\u793A\u89E3\u6790\u5668\u8A3A\u65B7\u8A0A\u606F\n -Xfuture \u555F\u7528\u6700\u56B4\u683C\u7684\u6AA2\u67E5\uFF0C\u9810\u5148\u4F5C\u70BA\u5C07\u4F86\u7684\u9810\u8A2D\n -Xint \u50C5\u9650\u89E3\u8B6F\u6A21\u5F0F\u57F7\u884C\n -Xinternalversion\n \u986F\u793A\u6BD4\u4F7F\u7528 -version \u9078\u9805\u6642\u66F4\u70BA\u8A73\u7D30\u7684\n JVM \u7248\u672C\u8CC7\u8A0A\n -Xloggc: \u5C07 GC \u72C0\u614B\u548C\u6642\u6233\u8A18\u9304\u81F3\u6A94\u6848\n -Xmixed \u6DF7\u5408\u6A21\u5F0F\u57F7\u884C (\u9810\u8A2D)\n -Xmn \u91DD\u5C0D\u65B0\u751F\u4EE3 (\u990A\u6210\u5340) \u8A2D\u5B9A\u5806\u96C6\u7684\u8D77\u59CB\u5927\u5C0F\u548C\n \u5927\u5C0F\u4E0A\u9650 (\u4F4D\u5143\u7D44)\n -Xms \u8A2D\u5B9A\u8D77\u59CB Java \u5806\u96C6\u5927\u5C0F\n -Xmx \u8A2D\u5B9A Java \u5806\u96C6\u5927\u5C0F\u4E0A\u9650\n -Xnoclassgc \u505C\u7528\u985E\u5225\u8CC7\u6E90\u56DE\u6536\n -Xprof \u8F38\u51FA cpu \u5206\u6790\u8CC7\u6599\n -Xrs \u6E1B\u5C11 Java/VM \u4F7F\u7528\u4F5C\u696D\u7CFB\u7D71\u4FE1\u865F (\u8ACB\u53C3\u95B1\u6587\u4EF6)\n -Xshare:auto \u76E1\u53EF\u80FD\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599 (\u9810\u8A2D)\n -Xshare:off \u4E0D\u5617\u8A66\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\n -Xshare:on \u9700\u8981\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\uFF0C\u5426\u5247\u5931\u6557\u3002\n -XshowSettings \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -XshowSettings:all\n \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -XshowSettings:locale\n \u986F\u793A\u6240\u6709\u5730\u5340\u8A2D\u5B9A\u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -XshowSettings:properties\n \u986F\u793A\u6240\u6709\u5C6C\u6027\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -XshowSettings:vm \u986F\u793A\u6240\u6709 VM \u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -Xss \u8A2D\u5B9A Java \u57F7\u884C\u7DD2\u5806\u758A\u5927\u5C0F\n -Xverify \u8A2D\u5B9A Bytecode \u9A57\u8B49\u7A0B\u5F0F\u6A21\u5F0F\n --add-reads =(,)*\n \u7121\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\uFF0C\u66F4\u65B0 \u4EE5\n \u8B80\u53D6 \u3002\n \u53EF\u5C07 \u8A2D\u70BA ALL-UNNAMED \u4EE5\u8B80\u53D6\u6240\u6709\u672A\u547D\u540D\u7684\n \u6A21\u7D44\u3002\n --add-exports /=(,)*\n \u7121\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\uFF0C\u66F4\u65B0 \u4EE5\u4FBF\u5C07 \n \u532F\u51FA\u81F3 \u3002\n \u53EF\u5C07 \u8A2D\u70BA ALL-UNNAMED \u4EE5\u532F\u51FA\u81F3\u6240\u6709\n \u672A\u547D\u540D\u7684\u6A21\u7D44\u3002\n --disable-@files \u505C\u7528\u9032\u4E00\u6B65\u7684\u5F15\u6578\u6A94\u6848\u64F4\u5145\n --patch-module =({0})*\n \u8986\u5BEB\u6216\u52A0\u5F37 JAR \u6A94\u6848\u6216\u76EE\u9304\u4E2D\n \ -\u542B\u6709\u985E\u5225\u548C\u8CC7\u6E90\u7684\u6A21\u7D44\u3002\n\n\u4E0A\u8FF0\u9078\u9805\u4E0D\u662F\u6A19\u6E96\u9078\u9805\uFF0C\u82E5\u6709\u8B8A\u66F4\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n +java.launcher.X.usage=\n -Xbatch \u505C\u7528\u80CC\u666F\u7DE8\u8B6F\n -Xbootclasspath/a:\n \u9644\u52A0\u81F3\u555F\u52D5\u5B89\u88DD\u985E\u5225\u8DEF\u5F91\u7684\u7D50\u5C3E\n -Xcheck:jni \u57F7\u884C\u5176\u4ED6\u7684 JNI \u51FD\u6578\u6AA2\u67E5\n -Xcomp \u5F37\u5236\u7DE8\u8B6F\u7B2C\u4E00\u500B\u547C\u53EB\u7684\u65B9\u6CD5\n -Xdebug \u91DD\u5C0D\u56DE\u6EAF\u76F8\u5BB9\u6027\u63D0\u4F9B\n -Xdiag \u986F\u793A\u5176\u4ED6\u8A3A\u65B7\u8A0A\u606F\n -Xdiag:resolver \u986F\u793A\u89E3\u6790\u5668\u8A3A\u65B7\u8A0A\u606F\n -Xfuture \u555F\u7528\u6700\u56B4\u683C\u7684\u6AA2\u67E5\uFF0C\u9810\u5148\u4F5C\u70BA\u5C07\u4F86\u7684\u9810\u8A2D\n -Xint \u50C5\u9650\u89E3\u8B6F\u6A21\u5F0F\u57F7\u884C\n -Xinternalversion\n \u986F\u793A\u6BD4 -version \u9078\u9805\u66F4\u70BA\u8A73\u7D30\u7684\n JVM \u7248\u672C\u8CC7\u8A0A\n -Xloggc: \u5C07 GC \u72C0\u614B\u8A18\u9304\u81F3\u6A94\u6848\u4E14\u9023\u540C\u6642\u6233\n -Xmixed \u6DF7\u5408\u6A21\u5F0F\u57F7\u884C (\u9810\u8A2D)\n -Xmn \u8A2D\u5B9A\u65B0\u751F\u4EE3 (\u990A\u6210\u5340) \u4E4B\u5806\u96C6\u7684\u8D77\u59CB\u5927\u5C0F\u548C\n \u5927\u5C0F\u4E0A\u9650 (\u4F4D\u5143\u7D44)\n -Xms \u8A2D\u5B9A\u8D77\u59CB Java \u5806\u96C6\u5927\u5C0F\n -Xmx \u8A2D\u5B9A Java \u5806\u96C6\u5927\u5C0F\u4E0A\u9650\n -Xnoclassgc \u505C\u7528\u985E\u5225\u8CC7\u6E90\u56DE\u6536\n -Xprof \u8F38\u51FA cpu \u5206\u6790\u8CC7\u6599\n -Xrs \u6E1B\u5C11 Java/VM \u4F7F\u7528\u4F5C\u696D\u7CFB\u7D71\u4FE1\u865F (\u8ACB\u53C3\u95B1\u6587\u4EF6)\n -Xshare:auto \u5728\u53EF\u80FD\u7684\u60C5\u6CC1\u4E0B\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599 (\u9810\u8A2D)\n -Xshare:off \u4E0D\u5617\u8A66\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\n -Xshare:on \u9700\u8981\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\uFF0C\u5426\u5247\u6703\u5931\u6557\u3002\n -XshowSettings \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -XshowSettings:all\n \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -XshowSettings:locale\n \u986F\u793A\u6240\u6709\u5730\u5340\u8A2D\u5B9A\u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -XshowSettings:properties\n \u986F\u793A\u6240\u6709\u5C6C\u6027\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -XshowSettings:vm \u986F\u793A\u6240\u6709 VM \u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n -Xss \u8A2D\u5B9A Java \u57F7\u884C\u7DD2\u5806\u758A\u5927\u5C0F\n -Xverify \u8A2D\u5B9A Bytecode \u9A57\u8B49\u7A0B\u5F0F\u7684\u6A21\u5F0F\n --add-reads =(,)*\n \u66F4\u65B0 \u4EE5\u8B80\u53D6 \uFF0C\u7121\u8AD6\n \u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002 \n \u53EF\u5C07 \u8A2D\u70BA ALL-UNNAMED \u4EE5\u8B80\u53D6\u6240\u6709\u672A\u547D\u540D\u7684\n \u6A21\u7D44\u3002\n --add-exports /=(,)*\n \u66F4\u65B0 \u4EE5\u4FBF\u5C07 \u532F\u51FA\u81F3 \uFF0C\n \u7121\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002\n \u53EF\u5C07 \u8A2D\u70BA ALL-UNNAMED \u4EE5\u532F\u51FA\u81F3\u6240\u6709\n \u672A\u547D\u540D\u7684\u6A21\u7D44\u3002\n --add-opens /=(,)*\n \u66F4\u65B0 \ +\u4EE5\u4FBF\u5C07 \u958B\u555F\u81F3\n \uFF0C\u7121\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002\n --disable-@files \u505C\u7528\u9032\u4E00\u6B65\u7684\u5F15\u6578\u6A94\u6848\u64F4\u5145\n --patch-module =({0})*\n \u8986\u5BEB\u6216\u52A0\u5F37\u542B\u6709 JAR \u6A94\u6848\u6216\u76EE\u9304\u4E2D\n \u985E\u5225\u548C\u8CC7\u6E90\u7684\u6A21\u7D44\u3002\n\n\u4E0A\u8FF0\u7684\u984D\u5916\u9078\u9805\u82E5\u6709\u8B8A\u66F4\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\n\u4E0B\u5217\u662F Mac OS X \u7279\u5B9A\u9078\u9805:\n -XstartOnFirstThread\n \u5728\u7B2C\u4E00\u500B (AppKit) \u57F7\u884C\u7DD2\u57F7\u884C main() \u65B9\u6CD5\n -Xdock:name=\n \u8986\u5BEB\u7D50\u5408\u8AAA\u660E\u756B\u9762\u4E2D\u986F\u793A\u7684\u9810\u8A2D\u61C9\u7528\u7A0B\u5F0F\u540D\u7A31\n -Xdock:icon=\n \u8986\u5BEB\u7D50\u5408\u8AAA\u660E\u756B\u9762\u4E2D\u986F\u793A\u7684\u9810\u8A2D\u5716\u793A\n\n diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/resources/aqua_de.properties b/jdk/src/java.desktop/macosx/classes/com/apple/laf/resources/aqua_de.properties index b85ed0c8547..83105561c30 100644 --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/resources/aqua_de.properties +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/resources/aqua_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -46,7 +46,7 @@ FileChooser.saveButton.textAndMnemonic=Speichern FileChooser.openButton.textAndMnemonic=\u00D6ffnen FileChooser.saveDialogTitle.textAndMnemonic=Speichern FileChooser.openDialogTitle.textAndMnemonic=\u00D6ffnen -FileChooser.updateButton.textAndMnemonic=Updaten +FileChooser.updateButton.textAndMnemonic=Aktualisieren FileChooser.helpButton.textAndMnemonic=Hilfe FileChooser.directoryOpenButton.textAndMnemonic=\u00D6ffnen diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_de.properties b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_de.properties index 4198822fd6b..757228cc3cb 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_de.properties +++ b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_de.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ rmid.group.inactive=rmid: Aktivierungsgruppe inaktiv: {0} # "Activation.main", "sun.rmi.activation.execPolicy", "ExecPermission" and # "ExecOptionPermission" should not be translated, since they refer to # class/permission names. -rmid.exec.perms.inadequate=Activation.main: Warnung: Systemeigenschaft sun.rmi.activation.execPolicy\nnicht angegeben, und keine ExecPermissions/ExecOptionPermissions\nerteilt. Darauf folgende Aktivierungsversuche sind m\u00F6glicherweise aufgrund erfolgloser\nBerechtigungspr\u00FCfungen ExecPermission/ExecOptionPermission nicht erfolgreich. Weitere\nDokumentation zur Konfiguration von rmid-Sicherheit finden Sie unter:\n\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/win32/rmid.html\n +rmid.exec.perms.inadequate=Activation.main: Warnung: Es wurde keine Systemeigenschaft sun.rmi.activation.execPolicy\nangegeben und keine ExecPermissions/ExecOptionPermissions\nerteilt. Nachfolgende Aktivierungsversuche scheitern m\u00F6glicherweise aufgrund\nnicht erfolgreicher Berechtigungspr\u00FCfungen ExecPermission/ExecOptionPermission. \nInformationen zur Sicherheitskonfiguration finden Sie in der rmid-Dokumentation.\n # "rmid", "-port", "-log", "-stop", "-C" and "-J" should not be translated, # because they are syntax diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_es.properties b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_es.properties index b250cb83461..1cc1b6477b8 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_es.properties +++ b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_es.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ rmid.group.inactive=rmid: grupo de activaci\u00F3n inactivo: {0} # "Activation.main", "sun.rmi.activation.execPolicy", "ExecPermission" and # "ExecOptionPermission" should not be translated, since they refer to # class/permission names. -rmid.exec.perms.inadequate=Activation.main: advertencia: no se han especificado las propiedades del sistema sun.rmi.activation.execPolicy\ny no se han otorgado ExecPermissions/ExecOptionPermissions;\nlos intentos de activaci\u00F3n posteriores pueden fallar debido a\ncomprobaciones de permiso ExecPermission/ExecOptionPermission incorrectas. Para\nobtener documentaci\u00F3n sobre c\u00F3mo configurar la seguridad rmid, rem\u00EDtase a:\n\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/win32/rmid.html\n +rmid.exec.perms.inadequate=Activation.main: advertencia: no se han especificado las propiedades del sistema sun.rmi.activation.execPolicy\ny no se han otorgado ExecPermissions/ExecOptionPermissions;\nlos intentos de activaci\u00F3n posteriores pueden fallar debido a\ncomprobaciones de permiso ExecPermission/ExecOptionPermission incorrectas. \nPara configurar la seguridad, consulte la documentaci\u00F3n sobre rmid.\n # "rmid", "-port", "-log", "-stop", "-C" and "-J" should not be translated, # because they are syntax diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_fr.properties b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_fr.properties index d589941496d..807b24a16e4 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_fr.properties +++ b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_fr.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ rmid.group.inactive=rmid : groupe d''activation inactif : {0} # "Activation.main", "sun.rmi.activation.execPolicy", "ExecPermission" and # "ExecOptionPermission" should not be translated, since they refer to # class/permission names. -rmid.exec.perms.inadequate=Activation.main: avertissement : propri\u00E9t\u00E9 syst\u00E8me sun.rmi.activation.execPolicy\nnon sp\u00E9cifi\u00E9e et ExecPermissions/ExecOptionPermissions\nnon autoris\u00E9s ; les tentatives d'activation suivantes risquent d'\u00E9chouer en raison de la v\u00E9rification des droits\nExecPermission/ExecOptionPermission. Pour obtenir de la\ndocumentation sur la configuration de la s\u00E9curit\u00E9 rmid, reportez-vous \u00E0 :\n\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html\nhttp://javasun.com/j2se/1.4/docs/tooldocs/win32/rmid.html\n +rmid.exec.perms.inadequate=Activation.main : avertissement : propri\u00E9t\u00E9 syst\u00E8me sun.rmi.activation.execPolicy\nnon indiqu\u00E9e et ExecPermissions/ExecOptionPermissions\nnon accord\u00E9s ; les tentatives d'activation suivantes risquent d'\u00E9chouer en raison de la v\u00E9rification des droits\nExecPermission/ExecOptionPermission. \nPour configurer la s\u00E9curit\u00E9, reportez-vous \u00E0 la documentation rmid.\n # "rmid", "-port", "-log", "-stop", "-C" and "-J" should not be translated, # because they are syntax diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_it.properties b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_it.properties index d415613ad90..21c8b8f35c1 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_it.properties +++ b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_it.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ rmid.group.inactive=rmid: gruppo attivazione inattivo: {0} # "Activation.main", "sun.rmi.activation.execPolicy", "ExecPermission" and # "ExecOptionPermission" should not be translated, since they refer to # class/permission names. -rmid.exec.perms.inadequate=Activation.main: avvertenza: sistema sun.rmi.activation.execPolicy\nPropriet\u00E0 non specificata e nessun ExecPermissions/ExecOptionPermissions\ngarantito. I tentativi di attivazione successivi potrebbero fallire a causa di \ncontrolli di autorizzazione ExecPermission/ExecOptionPermission non andati a buon fine. Per\nla documentazione e le modalit\u00E0 di configurazione della sicurezza rmid, fare riferimento a (informazioni in inglese):\n\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/win32/rmid.html\n +rmid.exec.perms.inadequate=Activation.main: avvertenza: propriet\u00E0 di sistema sun.rmi.activation.execPolicy\nnon specificata e nessun ExecPermissions/ExecOptionPermissions\nconcesso. I tentativi di attivazione successivi potrebbero fallire a causa di \ncontrolli di autorizzazione ExecPermission/ExecOptionPermission non riusciti.\nPer configurare la sicurezza, fare riferimento alla documentazione rmid.\n # "rmid", "-port", "-log", "-stop", "-C" and "-J" should not be translated, # because they are syntax diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_ja.properties b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_ja.properties index 7d5ae8eb1f4..51960acef0a 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_ja.properties +++ b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_ja.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ rmid.group.inactive=rmid: \u8D77\u52D5\u30B0\u30EB\u30FC\u30D7\u304C\u505C\u6B62 # "Activation.main", "sun.rmi.activation.execPolicy", "ExecPermission" and # "ExecOptionPermission" should not be translated, since they refer to # class/permission names. -rmid.exec.perms.inadequate=Activation.main: \u8B66\u544A:sun.rmi.activation.execPolicy\u30B7\u30B9\u30C6\u30E0\n\u30D7\u30ED\u30D1\u30C6\u30A3\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u3001\u307E\u305F\u306F\nExecPermissions/ExecOptionPermissions\u304C\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093\u3002\nExecPermissions/ExecOptionPermissions\u30A2\u30AF\u30BB\u30B9\u6A29\u691C\u67FB\u3067\u8A31\u53EF\u3055\u308C\n\u306A\u3044\u305F\u3081\u3001\u5F8C\u306B\u7D9A\u304F\u8D77\u52D5\u306F\u5931\u6557\u3059\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\nrmid\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u69CB\u6210\u65B9\u6CD5\u306B\u3064\u3044\u3066\u306F\u3001\u6B21\u306E\u30DE\u30CB\u30E5\u30A2\u30EB\u3092\u53C2\u7167\u3057\u3066\n\u304F\u3060\u3055\u3044\u3002\n\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/win32/rmid.html\n +rmid.exec.perms.inadequate=Activation.main: \u8B66\u544A:sun.rmi.activation.execPolicy\u30B7\u30B9\u30C6\u30E0\n\u30D7\u30ED\u30D1\u30C6\u30A3\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u3001\u307E\u305F\u306FExecPermissions/ExecOptionPermissions\u304C\n\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093\u3002ExecPermissions/ExecOptionPermissions\u30A2\u30AF\u30BB\u30B9\u6A29\u691C\u67FB\u3067\u8A31\u53EF\u3055\u308C\n\u306A\u3044\u305F\u3081\u3001\u5F8C\u306B\u7D9A\u304F\u8D77\u52D5\u306F\u5931\u6557\u3059\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\n\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u3092\u78BA\u8A8D\u3059\u308B\u306B\u306F\u3001rmid\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n # "rmid", "-port", "-log", "-stop", "-C" and "-J" should not be translated, # because they are syntax diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_ko.properties b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_ko.properties index 1fd81e8e2f1..da505f2c3d8 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_ko.properties +++ b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_ko.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ rmid.group.inactive=rmid: \uD65C\uC131\uD654 \uADF8\uB8F9 \uBE44\uD65C\uC131: {0 # "Activation.main", "sun.rmi.activation.execPolicy", "ExecPermission" and # "ExecOptionPermission" should not be translated, since they refer to # class/permission names. -rmid.exec.perms.inadequate=Activation.main: \uACBD\uACE0: sun.rmi.activation.execPolicy \uC2DC\uC2A4\uD15C \uC18D\uC131\uC774\n\uC9C0\uC815\uB418\uC9C0 \uC54A\uC558\uC73C\uBA70 ExecPermissions/ExecOptionPermissions\uAC00 \uBD80\uC5EC\uB418\uC9C0\n\uC54A\uC558\uC2B5\uB2C8\uB2E4. \uD65C\uC131\uD654\uB97C \uACC4\uC18D \uC2DC\uB3C4\uD558\uBA74 ExecPermission/ExecOptionPermission\n\uAD8C\uD55C \uAC80\uC0AC \uC2E4\uD328\uB85C \uC778\uD574 \uC2E4\uD328\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\nrmid \uBCF4\uC548 \uAD6C\uC131 \uBC29\uBC95\uC5D0 \uB300\uD55C \uC124\uBA85\uC11C\uB294 \uB2E4\uC74C \uC6F9 \uC0AC\uC774\uD2B8\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/win32/rmid.html\n +rmid.exec.perms.inadequate=Activation.main: \uACBD\uACE0: sun.rmi.activation.execPolicy \uC2DC\uC2A4\uD15C \uC18D\uC131\uC774\n\uC9C0\uC815\uB418\uC9C0 \uC54A\uC558\uC73C\uBA70 ExecPermissions/ExecOptionPermissions\uAC00 \uBD80\uC5EC\uB418\uC9C0\n\uC54A\uC558\uC2B5\uB2C8\uB2E4. \uD65C\uC131\uD654\uB97C \uACC4\uC18D \uC2DC\uB3C4\uD558\uBA74 ExecPermission/ExecOptionPermission\n\uAD8C\uD55C \uAC80\uC0AC \uC2E4\uD328\uB85C \uC778\uD574 \uC2E4\uD328\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n\uBCF4\uC548\uC744 \uAD6C\uC131\uD558\uB824\uBA74 rmid \uC124\uBA85\uC11C\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n # "rmid", "-port", "-log", "-stop", "-C" and "-J" should not be translated, # because they are syntax diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_pt_BR.properties b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_pt_BR.properties index cdbdcdf06e6..a4e6087b3ae 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_pt_BR.properties +++ b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_pt_BR.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ rmid.group.inactive=rmid: grupo de ativa\u00E7\u00E3o inativo: {0} # "Activation.main", "sun.rmi.activation.execPolicy", "ExecPermission" and # "ExecOptionPermission" should not be translated, since they refer to # class/permission names. -rmid.exec.perms.inadequate=Activation.main: advert\u00EAncia: propriedade do sistema sun.rmi.activation.execPolicy\nn\u00E3o registrada e nenhuma ExecPermission/ExecOptionPermission\nconcedida; as tentativas de ativa\u00E7\u00E3o seguintes podem falhar devido a verifica\u00E7\u00F5es malsucedidas da permiss\u00E3o\nExecPermission/ExecOptionPermission. Para obter\ndocumenta\u00E7\u00E3o sobre como configurar a seguran\u00E7a rmid, consulte:\n\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/win32/rmid.html\n +rmid.exec.perms.inadequate=Activation.main: warning: sun.rmi.activation.execPolicy system\npropriedade n\u00E3o especificada e nenhuma permiss\u00E3o ExecPermissions/ExecOptionPermissions\nconcedida; as tentativas subsequentes de ativa\u00E7\u00E3o poder\u00E3o falhar por causa das\nverifica\u00E7\u00F5es malsucedidas da permiss\u00E3o ExecPermission/ExecOptionPermission. \nPara configurar a seguran\u00E7a, consulte a documenta\u00E7\u00E3o do rmid.\n # "rmid", "-port", "-log", "-stop", "-C" and "-J" should not be translated, # because they are syntax diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_sv.properties b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_sv.properties index d1bb850ede9..bfa7b84292f 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_sv.properties +++ b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_sv.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ rmid.group.inactive=rmid: aktiveringsgruppen \u00E4r inaktiv: {0} # "Activation.main", "sun.rmi.activation.execPolicy", "ExecPermission" and # "ExecOptionPermission" should not be translated, since they refer to # class/permission names. -rmid.exec.perms.inadequate=Activation.main: varning: systemegenskapen sun.rmi.activation.execPolicy\n\u00E4r inte specificerad och inga ExecPermissions/ExecOptionPermissions\nhar utdelats. Efterf\u00F6ljande aktiveringsf\u00F6rs\u00F6k kanske inte utf\u00F6rs p\u00E5 grund av ej utf\u00F6rda\nkontroller av ExecPermission/ExecOptionPermission-beh\u00F6righet. Mer\ninformation om hur du konfigurerar rmid-s\u00E4kerhet finns i:\n\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/win32/rmid.html\n +rmid.exec.perms.inadequate=Activation.main: Varning: Systemegenskapen sun.rmi.activation.execPolicy\nhar inte angetts och inga ExecPermissions/ExecOptionPermissions har\ntilldelats. Efterf\u00F6ljande aktiveringsf\u00F6rs\u00F6k kanske inte utf\u00F6rs p\u00E5 grund\nav ej utf\u00F6rda ExecPermission/ExecOptionPermission-beh\u00F6righetskontroller. \nOm du vill konfigurera s\u00E4kerhet l\u00E4ser du i dokumentationen f\u00F6r rmid. # "rmid", "-port", "-log", "-stop", "-C" and "-J" should not be translated, # because they are syntax diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_zh_CN.properties b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_zh_CN.properties index 6bb22560066..5c3ef01c62a 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_zh_CN.properties +++ b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_zh_CN.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ rmid.group.inactive=rmid: \u6FC0\u6D3B\u7EC4\u65E0\u6548: {0} # "Activation.main", "sun.rmi.activation.execPolicy", "ExecPermission" and # "ExecOptionPermission" should not be translated, since they refer to # class/permission names. -rmid.exec.perms.inadequate=Activation.main: \u8B66\u544A: sun.rmi.activation.execPolicy \u7CFB\u7EDF\n\u5C5E\u6027\u672A\u88AB\u6307\u5B9A\u4E14 ExecPermissions/ExecOptionPermissions\n\u5747\u672A\u88AB\u6388\u6743\u3002\u968F\u540E\u7684\u6FC0\u6D3B\u5C1D\u8BD5\u5931\u8D25, \u539F\u56E0\u662F\u5BF9\nExecPermission/ExecOptionPermission \u7684\u6743\u9650\u68C0\u67E5\u5931\u8D25\u3002\u6709\u5173\u5982\u4F55\n\u914D\u7F6E rmid \u5B89\u5168\u6027\u7684\u6587\u6863\u8BF4\u660E, \u8BF7\u53C2\u9605: \n\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/win32/rmid.html\n +rmid.exec.perms.inadequate=Activation.main: \u8B66\u544A: \u672A\u6307\u5B9A sun.rmi.activation.execPolicy\n\u7CFB\u7EDF\u5C5E\u6027\u5E76\u4E14\u672A\u6388\u4E88 ExecPermissions/ExecOptionPermissions\u3002\n\u7531\u4E8E\u5BF9 ExecPermission/ExecOptionPermission \u7684\n\u6743\u9650\u68C0\u67E5\u5931\u8D25, \u968F\u540E\u7684\u6FC0\u6D3B\u5C1D\u8BD5\u53EF\u80FD\u4F1A\u5931\u8D25\u3002\n\u8981\u914D\u7F6E\u5B89\u5168\u6027, \u8BF7\u53C2\u9605 rmid \u6587\u6863\u3002\n # "rmid", "-port", "-log", "-stop", "-C" and "-J" should not be translated, # because they are syntax diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_zh_TW.properties b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_zh_TW.properties index 1a32abcb448..e7f018d089a 100644 --- a/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_zh_TW.properties +++ b/jdk/src/java.rmi/share/classes/sun/rmi/server/resources/rmid_zh_TW.properties @@ -1,6 +1,6 @@ # # -# Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,7 @@ rmid.group.inactive=rmid: \u555F\u52D5\u7FA4\u7D44\u672A\u5728\u4F7F\u7528\u4E2D # "Activation.main", "sun.rmi.activation.execPolicy", "ExecPermission" and # "ExecOptionPermission" should not be translated, since they refer to # class/permission names. -rmid.exec.perms.inadequate=Activation.main: \u8B66\u544A: sun.rmi.activation.execPolicy \u7CFB\u7D71\n\u5C6C\u6027\u672A\u6307\u5B9A\uFF0C\u4E26\u4E14\u672A\u6388\u4E88 ExecPermissions/ExecOptionPermissions; \n\u5F8C\u7E8C\u7684\u555F\u52D5\u5617\u8A66\u53EF\u80FD\u6703\u56E0\u70BA\u672A\u6210\u529F\u7684\nExecPermission/ExecOptionPermission \u6B0A\u9650\u6AA2\u67E5\u800C\u5931\u6557\u3002\u5982\u9700\n\u95DC\u65BC\u5982\u4F55\u8A2D\u5B9A rmid \u5B89\u5168\u7684\u8AAA\u660E\u6587\u4EF6\uFF0C\u8ACB\u53C3\u8003:\n\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmid.html\nhttp://java.sun.com/j2se/1.4/docs/tooldocs/win32/rmid.html\n +rmid.exec.perms.inadequate=Activation.main: \u8B66\u544A: sun.rmi.activation.execPolicy \u7CFB\u7D71\n\u5C6C\u6027\u672A\u6307\u5B9A\uFF0C\u800C\u4E14\u672A\u6388\u4E88 ExecPermissions/ExecOptionPermissions;\n\u5F8C\u7E8C\u7684\u555F\u52D5\u5617\u8A66\u53EF\u80FD\u6703\u56E0\u70BA\u4E0D\u6210\u529F\u7684\nExecPermission/ExecOptionPermission \u6B0A\u9650\u6AA2\u67E5\u800C\u5931\u6557\u3002\n\u5982\u9700\u8A2D\u5B9A\u5B89\u5168\uFF0C\u8ACB\u53C3\u8003 rmid \u6587\u4EF6\u3002\n # "rmid", "-port", "-log", "-stop", "-C" and "-J" should not be translated, # because they are syntax diff --git a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties index a8892cbf2ca..df9aa3adefb 100644 --- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties +++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ # questions. # -error.multiple.main.operations=Sie k\u00F6nnen nicht mehrere "-cuxtid"-Optionen angeben +error.multiple.main.operations=Es ist nicht m\u00F6glich, mehrere "-cuxtid"-Optionen anzugeben error.cant.open=\u00D6ffnen nicht m\u00F6glich: {0} error.illegal.option=Ung\u00FCltige Option: {0} error.unrecognized.option=Unbekannte Option: {0} @@ -33,6 +33,8 @@ error.bad.option=Eine der Optionen -{ctxu} muss angegeben werden. error.bad.cflag=Kennzeichen "c" erfordert Angabe von Manifest oder Eingabedateien. error.bad.uflag=Kennzeichen "u" erfordert Angabe von Manifest, Kennzeichen "e" oder Eingabedateien. error.bad.eflag=Kennzeichen "e" und Manifest mit dem Attribut "Main-Class" k\u00F6nnen nicht zusammen angegeben\nwerden. +error.bad.dflag=F\u00FCr die Option "-d, --print-module-descriptor" muss bzw. m\u00FCssen keine Eingabedatei(en) angegeben werden: {0} +error.bad.reason=Schlechter Grund: {0}, Grund muss entweder "deprecated", "deprecated-for-removal" oder "incubating" sein error.nosuch.fileordir={0}: Datei oder Verzeichnis nicht vorhanden error.write.file=Fehler beim Schreiben in vorhandener JAR-Datei error.create.dir={0}: Verzeichnis konnte nicht erstellt werden @@ -44,15 +46,17 @@ error.unexpected.module-info=Unerwarteter Moduldeskriptor {0} error.module.descriptor.not.found=Moduldeskriptor nicht gefunden error.validator.info.without.root=module-info.class in einem versionierten Verzeichnis gefunden, in der Root ist module-info.class jedoch nicht vorhanden error.validator.info.name.notequal=module-info.class in einem versionierten Verzeichnis enth\u00E4lt falschen Namen -error.validator.info.requires.public=module-info.class in einem versionierten Verzeichnis enth\u00E4lt zus\u00E4tzlichen "requires public" +error.validator.info.requires.transitive=module-info.class in einem versionierten Verzeichnis enth\u00E4lt zus\u00E4tzlichen "requires transitive" error.validator.info.requires.added=module-info.class in einem versionierten Verzeichnis enth\u00E4lt zus\u00E4tzlichen "requires" error.validator.info.requires.dropped=module-info.class in einem versionierten Verzeichnis enth\u00E4lt fehlenden "requires" error.validator.info.exports.notequal=module-info.class in einem versionierten Verzeichnis enth\u00E4lt unterschiedliche "exports" +error.validator.info.opens.notequal=module-info.class in einem versionierten Verzeichnis enth\u00E4lt unterschiedliche "opens" error.validator.info.provides.notequal=module-info.class in einem versionierten Verzeichnis enth\u00E4lt unterschiedliche "provides" error.invalid.versioned.module.attribute=Ung\u00FCltiges Moduldeskriptorattribut {0} error.missing.provider=Serviceprovider nicht gefunden: {0} error.release.value.notnumber=Release {0} nicht g\u00FCltig error.release.value.toosmall=Release {0} nicht g\u00FCltig, muss >= 9 sein +error.release.unexpected.versioned.entry=Unerwarteter versionierte Eintrag {0} f\u00FCr Release {1} error.validator.jarfile.exception={0} kann nicht validiert werden: {1} error.validator.jarfile.invalid=ung\u00FCltige Multi-Release-JAR-Datei {0} gel\u00F6scht error.validator.bad.entry.name=Eintragsname hat das falsche Format, {0} @@ -63,9 +67,9 @@ error.validator.new.public.class=Eintrag {0} enth\u00E4lt eine neue \u00F6ffentl error.validator.incompatible.class.version=Eintrag {0} weist eine Klassenversion auf, die mit einer fr\u00FCheren Version inkompatibel ist error.validator.different.api=Eintrag {0} enth\u00E4lt eine Klasse mit einer anderen API als in der fr\u00FCheren Version error.validator.names.mismatch=Eintrag {0} enth\u00E4lt eine Klasse mit dem internen Namen {1}, Namen stimmen nicht \u00FCberein -warn.validator.identical.entry=Warnung - Eintrag {0} enth\u00E4lt eine Klasse, die mit einem Eintrag identisch ist, der bereits in der JAR-Datei enthalten ist -warn.validator.resources.with.same.name=Warnung - Eintrag {0}, mehrere Ressourcen mit demselben Namen -warn.validator.concealed.public.class=Warnung - Eintrag {0} ist eine \u00F6ffentliche Klasse in einem verdeckten Package, \nwenn diese JAR-Datei in den Classpath gesetzt wird, kommt es zu nicht kompatiblen \u00F6ffentlichen Schnittstellen +warn.validator.identical.entry=Warnung: Eintrag {0} enth\u00E4lt eine Klasse, die mit\neinem bereits in der JAR-Datei enthaltenen Eintrag identisch ist +warn.validator.resources.with.same.name=Warnung: Eintrag {0}, mehrere Ressourcen mit demselben Namen +warn.validator.concealed.public.class=Warnung: Eintrag {0} ist eine \u00F6ffentliche Klasse\nin einem verdeckten Package. Wenn Sie diese JAR-Datei in den Classpath einf\u00FCgen, kommt es\nzu nicht kompatiblen \u00F6ffentlichen Schnittstellen out.added.manifest=Manifest wurde hinzugef\u00FCgt out.added.module-info=module-info hinzugef\u00FCgt: {0} out.update.manifest=Manifest wurde aktualisiert @@ -102,9 +106,12 @@ main.help.opt.create.update.no-manifest=\ -M, --no-manifest Keine Mani main.help.opt.create.update.module-version=\ --module-version=VERSION Die Modulversion beim Erstellen eines modularen\n JAR-Archivs oder Aktualisieren eines nicht modularen JAR-Archivs main.help.opt.create.update.hash-modules=\ --hash-modules=PATTERN Berechnet und zeichnet die Hashes von Modulen auf, \n die mit einem bestimmten Muster \u00FCbereinstimmen, und direkt oder\n indirekt von einem modularen JAR-Archiv abh\u00E4ngen, das erstellt\n wird, oder einem nicht-modularen JAR-Archiv, das aktualisiert wird main.help.opt.create.update.module-path=\ -p, --module-path Speicherort von Modulabh\u00E4ngigkeit zur Generierung\n von Hash +main.help.opt.create.update.do-not-resolve-by-default=\ --do-not-resolve-by-default Wird aus der Standard-Root-Gruppe von Modulen ausgeschlossen +main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved Hinweis f\u00FCr ein Tool, eine Warnung auszugeben,\n wenn das Modul aufgel\u00F6st wird, entweder "deprecated", "deprecated-for-removal"\n oder "incubating" main.help.opt.create.update.index=\ Vorgangsmodifikatoren, die nur im Erstellungs-, Aktualisierungs- und Indexgenerierungsmodus g\u00FCltig sind:\n main.help.opt.create.update.index.no-compress=\ -0, --no-compress Nur speichern, keine ZIP-Komprimierung verwenden main.help.opt.other=\ Weitere Optionen:\n main.help.opt.other.help=\ -?, --help[:compat] Diese Meldung oder optional die Kompatibilit\u00E4t, Hilfe angeben +main.help.opt.other.help-extra=\ --help-extra Hilfe zu zus\u00E4tzlichen Optionen main.help.opt.other.version=\ --version Programmversion ausgeben main.help.postopt=\ Ein Archiv ist ein modulares JAR-Archiv, wenn der Moduldeskriptor "module-info.class"\n in der Root der angegebenen Verzeichnisse oder in der Root des JAR-Archivs selbst\n vorhanden ist. Die folgenden Vorg\u00E4nge sind nur g\u00FCltig, wenn Sie ein modulares JAR-Archiv\n erstellen oder ein vorhandenes nicht modulares JAR-Archiv aktualisieren: "--module-version",\n "--hash-modules" und "--modulepath".\n\n Obligatorische oder optionale Argumente zu langen Optionen sind auch f\u00FCr die jeweils\n zugeh\u00F6rigen kurzen Optionen obligatorisch oder optional. diff --git a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_es.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_es.properties index 30f4e7ef2cc..b7fc8490a7a 100644 --- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_es.properties +++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_es.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -33,6 +33,8 @@ error.bad.option=Se debe especificar una de las opciones -{ctxu}. error.bad.cflag=El indicador 'c' necesita la especificaci\u00F3n de archivos de manifiesto o de entrada. error.bad.uflag=El indicador 'u' necesita la especificaci\u00F3n de archivos de manifiesto, de entrada o indicador 'e'. error.bad.eflag=El indicador 'e' y el manifiesto con el atributo 'Main-Class' no pueden especificarse \na la vez. +error.bad.dflag=La opci\u00F3n ''-d, --print-module-descriptor'' no requiere especificar archivos de entrada: {0} +error.bad.reason=Motivo err\u00F3neo: {0}, debe ser anticuado, anticuado para eliminaci\u00F3n o incubando error.nosuch.fileordir={0} : no existe tal archivo o directorio error.write.file=Error al escribir un archivo jar existente error.create.dir={0} : no se ha podido crear el directorio @@ -44,15 +46,17 @@ error.unexpected.module-info=Descriptor de m\u00F3dulo inesperado {0} error.module.descriptor.not.found=No se ha encontrado el descriptor de m\u00F3dulo error.validator.info.without.root=Se ha encontrado module-info.class en un directorio con versi\u00F3n sin module-info.class en la ra\u00EDz error.validator.info.name.notequal=module-info.class en un directorio con versi\u00F3n contiene un nombre incorrecto -error.validator.info.requires.public=module-info.class en un directorio con versiones contiene "requires public" adicionales +error.validator.info.requires.transitive=module-info.class en un directorio con versiones contiene "requisitos transitivos" adicionales error.validator.info.requires.added=module-info.class en un directorio con versi\u00F3n contiene "requires" adicionales error.validator.info.requires.dropped=module-info.class en un directorio con versiones contiene "requires" que faltan error.validator.info.exports.notequal=module-info.class en un directorio con versiones contiene "exports" diferentes +error.validator.info.opens.notequal=module-info.class en un directorio con versiones contiene "aportaciones" diferentes error.validator.info.provides.notequal=module-info.class en un directorio con versiones contiene "provides" diferentes error.invalid.versioned.module.attribute=Atributo de descriptor de m\u00F3dulo no v\u00E1lido {0} error.missing.provider=No se ha encontrado el proveedor de servicios: {0} error.release.value.notnumber=versi\u00F3n {0} no v\u00E1lida error.release.value.toosmall=versi\u00F3n {0} no v\u00E1lida, debe ser >= 9 +error.release.unexpected.versioned.entry=Entrada versionada inesperada {0} para la versi\u00F3n {1} error.validator.jarfile.exception=no puede validar {0}: {1} error.validator.jarfile.invalid=se ha suprimido el archivo jar de varias versiones {0} no v\u00E1lido error.validator.bad.entry.name=nombre de entrada con formato incorrecto, {0} @@ -63,9 +67,9 @@ error.validator.new.public.class=la entrada {0} contiene una nueva clase p\u00FA error.validator.incompatible.class.version=la entrada {0} tiene una versi\u00F3n de clase no compatible con una versi\u00F3n anterior error.validator.different.api=la entrada {0} contiene una clase con una api diferente de la versi\u00F3n anterior error.validator.names.mismatch=la entrada {0} contiene una clase con un nombre interno {1}, los nombres no coinciden -warn.validator.identical.entry=advertencia: la entrada {0} contiene una clase id\u00E9ntica a una entrada que ya est\u00E1 en el archivo jar -warn.validator.resources.with.same.name=advertencia: la entrada {0} tiene varios recursos con el mismo nombre -warn.validator.concealed.public.class=advertencia: la entrada {0} es una clase p\u00FAblica en un paquete oculto. \ncolocar este jar en la ruta de clase tendr\u00E1 como resultado interfaces p\u00FAblicas no compatibles +warn.validator.identical.entry=Advertencia: la entrada {0} contiene una clase id\u00E9ntica a una entrada que ya est\u00E1 en el archivo jar +warn.validator.resources.with.same.name=Advertencia: la entrada {0} tiene varios recursos con el mismo nombre +warn.validator.concealed.public.class=Advertencia: la entrada {0} es una clase p\u00FAblica\nen un paquete oculto. Colocar este archivo jar en la ruta de clase tendr\u00E1 como resultado\ninterfaces p\u00FAblicas no compatibles out.added.manifest=manifiesto agregado out.added.module-info=module-info agregado: {0} out.update.manifest=manifiesto actualizado @@ -81,7 +85,7 @@ out.size=(entrada = {0}) (salida = {1}) usage.compat=Interfaz de compatibilidad:\nSintaxis: jar {ctxui}[vfmn0PMe] [jar-file] [manifest-file] [entry-point] [-C dir] files] ...Opciones: \n -c crear nuevo archivo\n -t mostrar la tabla de contenido del archivo\n -x extraer el archivo mencionado (o todos) del archivo\n -u actualizar archivo existente\n -v generar salida detallada de los datos de salida est\u00E1ndar\n -f especificar nombre del archivo de almacenamiento\n -m incluir informaci\u00F3n de manifiesto del archivo de manifiesto especificado n -n realizar la normalizaci\u00F3n Pack200 despu\u00E9s de crear un archivo nuevo\n -e especificar punto de entrada de la aplicaci\u00F3n para la aplicaci\u00F3n aut\u00F3noma \n que se incluye dentro de un archivo jar ejecutable\n -0 solo almacenar; no utilizar compresi\u00F3n ZIP\n -P conservar componentes iniciales '/' (ruta absoluta) y ".." (directorio principal) en los nombres de archivo\n -M no crear un archivo de manifiesto para las entradas\n -i generar informaci\u00F3n de \u00EDndice para los archivos jar especificados\n -C cambiar al directorio especificado e incluir el archivo siguiente\nSi alg\u00FAn archivo es un directorio, se procesar\u00E1 de forma recurrente. \nEl nombre del archivo de manifiesto, el nombre del archivo de almacenamiento y el nombre del punto de entrada se\n especifican en el mismo orden que los indicadores 'm', 'f' y 'e'. \n\nEjemplo 1: para archivar archivos de dos clases en un archivo llamado classes.jar: \n jar cvf classes.jar Foo.class Bar.class \nEjemplo 2: utilice un archivo de manifiesto existente 'mymanifest' y archive todos los\n archivos del directorio foo/ en 'classes.jar': \n jar cvfm classes.jar mymanifest -C foo/ .\n -main.usage.summary=Sintaxis: jar [OPTION...] [ [--release VERSION] [-C dir] files] ... +main.usage.summary=Sintaxis: jar [OPTION...] [ [--release VERSION] [-C dir] archivos] ... main.usage.summary.try=Intente `jar --help' para obtener m\u00E1s informaci\u00F3n. main.help.preopt=Sintaxis: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar crea un archivo para las clases y recursos y puede manipular o\nrestaurar clases individuales o recursos de un archivo.\n\n Ejemplos:\n # Crear un archivo denominado classes.jar con dos archivos de clase:\n jar --create --file classes.jar Foo.class Bar.class\n # Crear un archivo con un manifiesto existente, con todos los archivos en foo/:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Crear un archivo jar modular, donde el descriptor de m\u00F3dulo est\u00E1 en\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # Actualizar un jar no modular en un jar modular:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # Crear un archivo jar de varias versiones y colocar algunos archivos en el directorio META-INF/versions/9:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes @@ -102,9 +106,12 @@ main.help.opt.create.update.no-manifest=\ -M, --no-manifest No crear n main.help.opt.create.update.module-version=\ --module-version=VERSION Versi\u00F3n del m\u00F3dulo, si se va a crear un archivo jar modular\n o actualizar un archivo jar no modular main.help.opt.create.update.hash-modules=\ --hash-modules=PATTERN Calcular y registrar los hash de m\u00F3dulos\n que coinciden con el patr\u00F3n proporcionado y que dependen\n directa o indirectamente de la creaci\u00F3n de un archivo jar modular\n o de la actualizaci\u00F3n de un archivo jar no modular main.help.opt.create.update.module-path=\ -p, --module-path Ubicaci\u00F3n de la dependencia de m\u00F3dulo para generar\n el hash +main.help.opt.create.update.do-not-resolve-by-default=\ --do-not-resolve-by-default Excluir del conjunto de m\u00F3dulos ra\u00EDz por defecto +main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved Indicaci\u00F3n para que una herramienta emita una advertencia si el m\u00F3dulo\n se ha resuelto. Anticuado, anticuado para eliminaci\u00F3n\n o incubando main.help.opt.create.update.index=\ Modificadores de operaci\u00F3n v\u00E1lidos solo en el modo de creaci\u00F3n, actualizaci\u00F3n y generaci\u00F3n de \u00EDndice:\n main.help.opt.create.update.index.no-compress=\ -0, --no-compress Solo almacenar; no usar compresi\u00F3n ZIP main.help.opt.other=\ Otras opciones:\n main.help.opt.other.help=\ -?, --help[:compat] Utilice este valor, u opcionalmente la compatibilidad, ayuda +main.help.opt.other.help-extra=\ --help-extra Prestar ayuda en las opciones adicionales main.help.opt.other.version=\ --version Imprimir versi\u00F3n del programa main.help.postopt=\ Un archivo es un jar modular si el descriptor de m\u00F3dulo, 'module-info.class', est\u00E1\n en la ra\u00EDz de los directorios proporcionados o en la ra\u00EDz del archivo jar.\n Las siguientes operaciones solo son v\u00E1lidas si se va a crear un archivo jar modular\n o se va a actualizar un jar existente no modular: '--module-version',\n '--hash-modules' y '--module-path'.\n\n Los argumentos obligatorios u opcionales en las opciones largas tambi\u00E9n son obligatorios u opcionales\n en cualquiera de las opciones cortas. diff --git a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_fr.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_fr.properties index 5ef67437434..cb44d509c2e 100644 --- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_fr.properties +++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_fr.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ # questions. # -error.multiple.main.operations=Vous ne pouvez pas sp\u00E9cifier plus d'une option '-cuxtid' +error.multiple.main.operations=Vous ne pouvez pas indiquer plus d'une option '-cuxtid' error.cant.open=impossible d''ouvrir : {0} error.illegal.option=Option non admise : {0} error.unrecognized.option=option non reconnue : {0} @@ -33,6 +33,8 @@ error.bad.option=Une des options -{ctxu} doit \u00EAtre sp\u00E9cifi\u00E9e. error.bad.cflag=L'indicateur c requiert la sp\u00E9cification d'un fichier manifeste ou d'un fichier d'entr\u00E9e. error.bad.uflag=L'indicateur u requiert la sp\u00E9cification d'un fichier manifeste, d'un fichier d'entr\u00E9e ou d'un indicateur e. error.bad.eflag=L'indicateur e et le fichier manifeste portant l'attribut Main-Class ne peuvent pas \u00EAtre sp\u00E9cifi\u00E9s \nensemble. +error.bad.dflag=L''option ''-d, --print-module-descriptor'' ne requiert la sp\u00E9cification d''aucun fichier d''entr\u00E9e : {0} +error.bad.reason=raison incorrecte : {0}, la valeur doit \u00EAtre deprecated, deprecated-for-removal ou incubating error.nosuch.fileordir={0} : fichier ou r\u00E9pertoire introuvable error.write.file=Erreur lors de l'\u00E9criture d'un fichier JAR existant error.create.dir={0} : impossible de cr\u00E9er le r\u00E9pertoire @@ -44,15 +46,17 @@ error.unexpected.module-info=Descripteur de module {0} inattendu error.module.descriptor.not.found=Descripteur de module introuvable error.validator.info.without.root=module-info.class a \u00E9t\u00E9 d\u00E9tect\u00E9 dans un r\u00E9pertoire avec num\u00E9ro de version sans module-info.class dans la racine error.validator.info.name.notequal=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient un nom incorrect -error.validator.info.requires.public=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "requires public" suppl\u00E9mentaires +error.validator.info.requires.transitive=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des "exigences transitives" suppl\u00E9mentaires error.validator.info.requires.added=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "requires" suppl\u00E9mentaires error.validator.info.requires.dropped=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "requires" manquants error.validator.info.exports.notequal=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "exports" diff\u00E9rents +error.validator.info.opens.notequal=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des "ouvertures" diff\u00E9rentes error.validator.info.provides.notequal=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "provides" diff\u00E9rents error.invalid.versioned.module.attribute=Attribut de descripteur de module non valide {0} error.missing.provider=Fournisseur de services introuvable : {0} error.release.value.notnumber=version {0} non valide error.release.value.toosmall=version {0} non valide : elle doit \u00EAtre sup\u00E9rieure ou \u00E9gale \u00E0 9 +error.release.unexpected.versioned.entry=entr\u00E9e avec num\u00E9ro de version {0} inattendue pour la version {1} error.validator.jarfile.exception=Impossible de valider {0} : {1} error.validator.jarfile.invalid=fichier JAR multiversion non valide {0} supprim\u00E9 error.validator.bad.entry.name=nom d''entr\u00E9e au format incorrect, {0} @@ -63,9 +67,9 @@ error.validator.new.public.class=l''entr\u00E9e : {0} contient une nouvelle clas error.validator.incompatible.class.version=l''entr\u00E9e : {0} a une version de classe non compatible avec une version ant\u00E9rieure error.validator.different.api=l''entr\u00E9e : {0} contient une classe avec une API diff\u00E9rente de la version ant\u00E9rieure error.validator.names.mismatch=l''entr\u00E9e : {0} contient une classe avec le nom interne {1}, les noms ne concordent pas -warn.validator.identical.entry=avertissement - l''entr\u00E9e : {0} contient une classe identique \u00E0 une entr\u00E9e qui se trouve d\u00E9j\u00E0 dans le fichier JAR -warn.validator.resources.with.same.name=avertissement - entr\u00E9e : {0}, plusieurs ressources du m\u00EAme nom -warn.validator.concealed.public.class=avertissement - l''entr\u00E9e {0} est une classe publique dans un package dissimul\u00E9, \nle placement de ce fichier JAR sur le chemin de classe g\u00E9n\u00E9rera des interfaces publiques incompatibles +warn.validator.identical.entry=Avertissement : l''entr\u00E9e {0} contient une classe\nidentique \u00E0 une entr\u00E9e qui se trouve d\u00E9j\u00E0 dans le fichier JAR +warn.validator.resources.with.same.name=Avertissement : entr\u00E9e {0}, plusieurs ressources du m\u00EAme nom +warn.validator.concealed.public.class=Avertissement : l''entr\u00E9e {0} est une classe publique\ndans un package dissimul\u00E9, le placement de ce fichier JAR sur le\nchemin de classe g\u00E9n\u00E9rera des interfaces publiques incompatibles out.added.manifest=manifeste ajout\u00E9 out.added.module-info=module-info ajout\u00E9 : {0} out.update.manifest=manifeste mis \u00E0 jour @@ -102,9 +106,12 @@ main.help.opt.create.update.no-manifest=\ -M, --no-manifest Ne cr\u00E main.help.opt.create.update.module-version=\ --module-version=VERSION Version de module lors de la cr\u00E9ation d'un fichier JAR\n modulaire ou de la mise \u00E0 jour d'un fichier JAR non modulaire main.help.opt.create.update.hash-modules=\ --hash-modules=PATTERN Calcule et enregistre les hachages des modules \n mis en correspondance d'apr\u00E8s le mod\u00E8le donn\u00E9 et d\u00E9pendant\n directement ou indirectement d'un fichier JAR modulaire\n en cours de cr\u00E9ation ou d'un fichier JAR non modulaire en cours de mise \u00E0 jour main.help.opt.create.update.module-path=\ -p, --module-path Emplacement de la d\u00E9pendance de module pour la g\u00E9n\u00E9ration\n du hachage +main.help.opt.create.update.do-not-resolve-by-default=\ --do-not-resolve-by-default Exclure de l'ensemble racine de modules par d\u00E9faut +main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved Indication en fonction de laquelle un outil \u00E9met un avertissement si le module\n est r\u00E9solu. La valeur doit \u00EAtre deprecated, deprecated-for-removal,\n ou incubating main.help.opt.create.update.index=\ Modificateurs d'op\u00E9ration valides uniquement en modes create, update et generate-index :\n main.help.opt.create.update.index.no-compress=\ -0, --no-compress Stocke uniquement ; n'utilise pas de compression ZIP main.help.opt.other=\ Autres options :\n main.help.opt.other.help=\ -?, --help[:compat] Affiche l'aide ou \u00E9ventuellement la compatibilit\u00E9 +main.help.opt.other.help-extra=\ --help-extra Affiche l'aide sur les options suppl\u00E9mentaires main.help.opt.other.version=\ --version Imprime la version de programme main.help.postopt=\ Une archive est un fichier JAR modulaire si un descripteur de module, 'module-info.class', se\n trouve dans la racine des r\u00E9pertoires donn\u00E9s ou dans la racine de l'archive JAR\n elle-m\u00EAme. Les op\u00E9rations suivantes sont valides uniquement lors de la cr\u00E9ation d'un fichier JAR modulaire\n ou de la mise \u00E0 jour d'un fichier JAR non modulaire existant : '--module-version',\n '--hash-modules' et '--module-path'.\n\n Les arguments obligatoires ou facultatifs pour les options longues sont \u00E9galement obligatoires ou facultatifs\n pour toute option courte correspondante. diff --git a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_it.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_it.properties index 00925b80190..67bc8bac2e0 100644 --- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_it.properties +++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_it.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -33,6 +33,8 @@ error.bad.option=\u00C8 necessario specificare una delle opzioni -{ctxu}. error.bad.cflag=Per il flag 'c' \u00E8 necessario specificare file manifest o di input. error.bad.uflag=Per il flag 'u' \u00E8 necessario specificare il flag 'e' oppure file manifest o di input. error.bad.eflag=Il flag 'e' e il manifest con l'attributo 'Main-Class' non possono essere specificati\ninsieme. +error.bad.dflag=Per l''opzione ''-d, --print-module-descriptor'' non \u00E8 necessario specificare alcun file di input: {0} +error.bad.reason=Motivo non valido: {0}. Deve essere deprecated, deprecated-for-removal o incubating error.nosuch.fileordir={0} : file o directory inesistente error.write.file=Errore durante la scrittura del file jar esistente error.create.dir={0} : impossibile creare la directory @@ -44,15 +46,17 @@ error.unexpected.module-info=Descrittore di modulo {0} imprevisto error.module.descriptor.not.found=Descrittore di modulo non trovato error.validator.info.without.root=module-info.class trovato in una directory con controllo delle versioni senza module-info.class nella radice error.validator.info.name.notequal=module-info.class in una directory con controllo delle versioni contiene un nome errato -error.validator.info.requires.public=module-info.class in una directory con controllo delle versioni contiene valori "requires public" aggiuntivi +error.validator.info.requires.transitive=module-info.class in una directory con controllo delle versioni contiene valori "requires transitive" aggiuntivi error.validator.info.requires.added=module-info.class in una directory con controllo delle versioni contiene valori "requires" aggiuntivi error.validator.info.requires.dropped=module-info.class in una directory con controllo delle versioni contiene valori "requires" mancanti error.validator.info.exports.notequal=module-info.class in una directory con controllo delle versioni contiene "exports" differenti +error.validator.info.opens.notequal=module-info.class in una directory con controllo delle versioni contiene valori "opens" differenti error.validator.info.provides.notequal=module-info.class in una directory con controllo delle versioni contiene valori "provides" differenti error.invalid.versioned.module.attribute=Attributo descrittore del modulo {0} non valido. error.missing.provider=Provider di servizi non trovato: {0} error.release.value.notnumber=release {0} non valida error.release.value.toosmall=la release {0} non \u00E8 valida: deve essere >= 9 +error.release.unexpected.versioned.entry=voce con controllo delle versioni non prevista {0} per la release {1} error.validator.jarfile.exception=impossibile convalidare {0}: {1} error.validator.jarfile.invalid=file jar {0} con pi\u00F9 release non valido eliminato error.validator.bad.entry.name=nome di voce {0} con formato non valido @@ -63,9 +67,9 @@ error.validator.new.public.class=la voce {0} contiene una nuova classe pubblica error.validator.incompatible.class.version=la voce {0} ha una versione incompatibile con una versione precedente error.validator.different.api=la voce {0} contiene una classe con un''API diversa dalla versione precedente error.validator.names.mismatch=la voce {0} contiene una classe con nome interno {1}. I nomi non corrispondono -warn.validator.identical.entry=avvertenza: la voce {0} contiene una classe identica a una voce gi\u00E0 presente nel file jar -warn.validator.resources.with.same.name=avvertenza: voce {0}. Pi\u00F9 risorse con lo stesso nome -warn.validator.concealed.public.class=avvertenza: la voce {0} \u00E8 una classe pubblica in un package nascosto. \nIl posizionamento di questo file jar nel classpath generer\u00E0 interfacce pubbliche incompatibili +warn.validator.identical.entry=Avvertenza: la voce {0} contiene una classe\nidentica a una voce gi\u00E0 presente nel file jar +warn.validator.resources.with.same.name=Avvertenza: voce {0}. Pi\u00F9 risorse con lo stesso nome +warn.validator.concealed.public.class=Avvertenza: la voce {0} \u00E8 una classe pubblica\nin un package nascosto. Il posizionamento di questo file jar nel classpath\ngenerer\u00E0 interfacce pubbliche incompatibili out.added.manifest=aggiunto manifest out.added.module-info=aggiunto module-info: {0} out.update.manifest=aggiornato manifest @@ -102,9 +106,12 @@ main.help.opt.create.update.no-manifest=\ -M, --no-manifest Non crea u main.help.opt.create.update.module-version=\ --module-version=VERSION Versione del modulo utilizzata durante la creazione di un file\n jar modulare o l'aggiornamento di un file jar non modulare main.help.opt.create.update.hash-modules=\ --hash-modules=PATTERN Calcola e registra gli hash dei moduli \n corrispondenti in base al pattern specificato e dipendenti\n in modo diretto o indiretto dalla creazione di un file jar modulare\n o dall'aggiornamento di un file jar non modulare main.help.opt.create.update.module-path=\ -p, --module-path Posizione della dipendenza del modulo per la generazione\n dell'hash +main.help.opt.create.update.do-not-resolve-by-default=\ --do-not-resolve-by-default Esclude dal set radice predefinito dei moduli +main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved Suggerimento per uno strumento per l'emissione di un'avvertenza se il modulo\n viene risolto. Pu\u00F2 essere deprecated, deprecated-for-removal\n o incubating main.help.opt.create.update.index=\ Modificatori di funzionamento validi solo nella modalit\u00E0 di creazione, aggiornamento e di generazione dell'indice:\n main.help.opt.create.update.index.no-compress=\ -0, --no-compress Solo per la memorizzazione. Non utilizza alcuna compressione ZIP main.help.opt.other=\ Altre opzioni:\n main.help.opt.other.help=\ -?, --help[:compat] Fornisce questa Guida o facoltativamente la Guida sulla compatibilit\u00E0 +main.help.opt.other.help-extra=\ --help-extra Fornisce la Guida per le opzioni non standard main.help.opt.other.version=\ --version Stampa la versione del programma main.help.postopt=\ Un archivio \u00E8 un file jar modulare se un descrittore di modulo, 'module-info.class', si trova\n nella directory radice delle directory specificate o nella radice dell'archivio jar\n stesso. Le operazioni seguenti sono valide solo durante la creazione di un file jar modulare\n o l'aggiornamento di un file jar non modulare esistente: '--module-version',\n '--hash-modules' e '--module-path'.\n\n Gli argomenti obbligatori o facoltativi per le opzioni lunghe sono obbligatori\n o facoltativi anche per le opzioni brevi corrispondenti. diff --git a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties index c974444fc8a..cdd08b3bbea 100644 --- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties +++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ # questions. # -error.multiple.main.operations=\u8907\u6570\u306E'-cuxtid'\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093 +error.multiple.main.operations=\u8907\u6570\u306E'cuxtid'\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093 error.cant.open={0}\u3092\u958B\u304F\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093 error.illegal.option=\u4E0D\u6B63\u306A\u30AA\u30D7\u30B7\u30E7\u30F3: {0} error.unrecognized.option=\u8A8D\u8B58\u3055\u308C\u306A\u3044\u30AA\u30D7\u30B7\u30E7\u30F3: {0} @@ -33,6 +33,8 @@ error.bad.option=\u30AA\u30D7\u30B7\u30E7\u30F3-{ctxu}\u306E\u3046\u3061\u306E1\ error.bad.cflag=\u30D5\u30E9\u30B0'c'\u3067\u306F\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u307E\u305F\u306F\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u6307\u5B9A\u304C\u5FC5\u8981\u3067\u3059\u3002 error.bad.uflag=\u30D5\u30E9\u30B0'u'\u3067\u306F\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u304B'e'\u30D5\u30E9\u30B0\u3001\u307E\u305F\u306F\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u6307\u5B9A\u304C\u5FC5\u8981\u3067\u3059\u3002 error.bad.eflag='e'\u30D5\u30E9\u30B0\u3068'Main-Class'\u5C5E\u6027\u3092\u6301\u3064\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u306F\u540C\u6642\u306B\n\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002 +error.bad.dflag=''-d, --print-module-descriptor''\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u306F\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u6307\u5B9A\u306F\u4E0D\u8981\u3067\u3059: {0} +error.bad.reason=\u4E0D\u6B63\u306A\u7406\u7531: {0}\u3001\u975E\u63A8\u5968\u3001\u524A\u9664\u4E88\u5B9A\u306E\u975E\u63A8\u5968\u307E\u305F\u306F\u5B9F\u9A13\u7684\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 error.nosuch.fileordir={0}\u3068\u3044\u3046\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\u3042\u308A\u307E\u305B\u3093 error.write.file=\u65E2\u5B58jar\u30D5\u30A1\u30A4\u30EB\u306E\u66F8\u8FBC\u307F\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F error.create.dir=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA{0}\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F @@ -44,15 +46,17 @@ error.unexpected.module-info=\u4E88\u671F\u3057\u306A\u3044\u30E2\u30B8\u30E5\u3 error.module.descriptor.not.found=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 error.validator.info.without.root=module-info.class\u304C\u3001\u30EB\u30FC\u30C8\u306Bmodule-info.class\u306E\u306A\u3044\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u898B\u3064\u304B\u308A\u307E\u3057\u305F error.validator.info.name.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u6B63\u3057\u304F\u306A\u3044\u540D\u524D\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059 -error.validator.info.requires.public=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u8FFD\u52A0\u306E"requires public"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059 +error.validator.info.requires.transitive=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u30FB\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u8FFD\u52A0\u306E"requires transitive"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059 error.validator.info.requires.added=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u8FFD\u52A0\u306E"requires"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059 error.validator.info.requires.dropped=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u6B20\u843D\u3057\u3066\u3044\u308B"requires"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059 error.validator.info.exports.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u7570\u306A\u308B"exports"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059 +error.validator.info.opens.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u30FB\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u7570\u306A\u308B"opens"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059 error.validator.info.provides.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u7570\u306A\u308B"provides"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059 error.invalid.versioned.module.attribute=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u5C5E\u6027{0}\u304C\u7121\u52B9\u3067\u3059 error.missing.provider=\u30B5\u30FC\u30D3\u30B9\u30FB\u30D7\u30ED\u30D0\u30A4\u30C0\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0} error.release.value.notnumber=\u30EA\u30EA\u30FC\u30B9{0}\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093 error.release.value.toosmall=\u30EA\u30EA\u30FC\u30B9{0}\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u30029\u4EE5\u4E0A\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +error.release.unexpected.versioned.entry=\u30EA\u30EA\u30FC\u30B9{1}\u3067\u4E88\u671F\u3057\u306A\u3044\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u6E08\u30A8\u30F3\u30C8\u30EA{0} error.validator.jarfile.exception={0}\u3092\u691C\u8A3C\u3067\u304D\u307E\u305B\u3093: {1} error.validator.jarfile.invalid=\u7121\u52B9\u306A\u30DE\u30EB\u30C1\u30EA\u30EA\u30FC\u30B9jar\u30D5\u30A1\u30A4\u30EB{0}\u304C\u524A\u9664\u3055\u308C\u307E\u3057\u305F error.validator.bad.entry.name=\u30A8\u30F3\u30C8\u30EA\u540D\u304C\u4E0D\u6B63\u3067\u3059: {0} @@ -63,9 +67,9 @@ error.validator.new.public.class=\u30A8\u30F3\u30C8\u30EA: {0}\u306B\u306F\u3001 error.validator.incompatible.class.version=\u30A8\u30F3\u30C8\u30EA: {0}\u306B\u306F\u3001\u4EE5\u524D\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u3068\u4E92\u63DB\u6027\u306E\u306A\u3044\u30AF\u30E9\u30B9\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u304C\u542B\u307E\u308C\u307E\u3059 error.validator.different.api=\u30A8\u30F3\u30C8\u30EA: {0}\u306B\u306F\u3001\u4EE5\u524D\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u3068\u306F\u7570\u306A\u308BAPI\u3092\u6301\u3064\u30AF\u30E9\u30B9\u304C\u542B\u307E\u308C\u307E\u3059 error.validator.names.mismatch=\u30A8\u30F3\u30C8\u30EA: {0}\u306B\u306F\u3001\u5185\u90E8\u540D{1}\u3092\u6301\u3064\u30AF\u30E9\u30B9\u304C\u542B\u307E\u308C\u307E\u3059\u304C\u3001\u540D\u524D\u304C\u4E00\u81F4\u3057\u307E\u305B\u3093 -warn.validator.identical.entry=\u8B66\u544A - \u30A8\u30F3\u30C8\u30EA: {0}\u306B\u306F\u3001jar\u306B\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\u30A8\u30F3\u30C8\u30EA\u3068\u540C\u3058\u30AF\u30E9\u30B9\u304C\u542B\u307E\u308C\u307E\u3059 -warn.validator.resources.with.same.name=\u8B66\u544A - \u30A8\u30F3\u30C8\u30EA: {0}\u3001\u540C\u3058\u540D\u524D\u3092\u6301\u3064\u8907\u6570\u306E\u30EA\u30BD\u30FC\u30B9 -warn.validator.concealed.public.class=\u8B66\u544A - \u30A8\u30F3\u30C8\u30EA{0}\u306F\u3001\u96A0\u3057\u30D1\u30C3\u30B1\u30FC\u30B8\u5185\u306Epublic\u30AF\u30E9\u30B9\u3067\u3059\u3002 \n\u30AF\u30E9\u30B9\u30D1\u30B9\u306B\u3053\u306Ejar\u3092\u914D\u7F6E\u3059\u308B\u3068\u3001\u4E92\u63DB\u6027\u306E\u306A\u3044public\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304C\u751F\u6210\u3055\u308C\u307E\u3059 +warn.validator.identical.entry=\u8B66\u544A : \u30A8\u30F3\u30C8\u30EA{0}\u306B\u306F\u3001jar\u306B\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\n\u30A8\u30F3\u30C8\u30EA\u3068\u540C\u3058\u30AF\u30E9\u30B9\u304C\u542B\u307E\u308C\u307E\u3059 +warn.validator.resources.with.same.name=\u8B66\u544A : \u30A8\u30F3\u30C8\u30EA{0}\u3001\u540C\u3058\u540D\u524D\u3092\u6301\u3064\u8907\u6570\u306E\u30EA\u30BD\u30FC\u30B9 +warn.validator.concealed.public.class=\u8B66\u544A : \u30A8\u30F3\u30C8\u30EA{0}\u306F\u3001\u96A0\u3057\u30D1\u30C3\u30B1\u30FC\u30B8\u5185\u306Epublic\u30AF\u30E9\u30B9\u3067\u3059\u3002\n\u30AF\u30E9\u30B9\u30D1\u30B9\u306B\u3053\u306Ejar\u3092\u914D\u7F6E\u3059\u308B\u3068\u3001\u4E92\u63DB\u6027\u306E\u306A\u3044\npublic\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304C\u751F\u6210\u3055\u308C\u307E\u3059 out.added.manifest=\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F out.added.module-info=module-info\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F: {0} out.update.manifest=\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u304C\u66F4\u65B0\u3055\u308C\u307E\u3057\u305F @@ -102,9 +106,12 @@ main.help.opt.create.update.no-manifest=\ -M\u3001--no-manifest \u30A8 main.help.opt.create.update.module-version=\ --module-version=VERSION \u30E2\u30B8\u30E5\u30E9jar\u306E\u4F5C\u6210\u6642\u307E\u305F\u306F\u975E\u30E2\u30B8\u30E5\u30E9jar\u306E\u66F4\u65B0\u6642\u306E\n \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3 main.help.opt.create.update.hash-modules=\ --hash-modules=PATTERN \u30E2\u30B8\u30E5\u30E9jar\u306E\u4F5C\u6210\u6642\u307E\u305F\u306F\u975E\u30E2\u30B8\u30E5\u30E9jar\u306E\u66F4\u65B0\u6642\u306B\n \u6307\u5B9A\u306E\u30D1\u30BF\u30FC\u30F3\u306B\u4E00\u81F4\u3057\u3001\u76F4\u63A5\u307E\u305F\u306F\u9593\u63A5\u7684\u306B\n \u4F9D\u5B58\u3057\u3066\u3044\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30CF\u30C3\u30B7\u30E5\u3092\n \u8A08\u7B97\u304A\u3088\u3073\u8A18\u9332\u3057\u307E\u3059 main.help.opt.create.update.module-path=\ -p\u3001--module-path \u30CF\u30C3\u30B7\u30E5\u3092\u751F\u6210\u3059\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u4F9D\u5B58\u6027\n \u306E\u5834\u6240 +main.help.opt.create.update.do-not-resolve-by-default=\ --do-not-resolve-by-default \u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30EB\u30FC\u30C8\u8A2D\u5B9A\u304B\u3089\u9664\u5916\u3057\u307E\u3059 +main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved \u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u89E3\u6C7A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u306F\u3001\u8B66\u544A\u3092\u767A\u884C\u3059\u308B\n \u30C4\u30FC\u30EB\u306E\u30D2\u30F3\u30C8\u3002\u975E\u63A8\u5968\u3001\u524A\u9664\u4E88\u5B9A\u306E\u975E\u63A8\u5968\u307E\u305F\u306F\n \u5B9F\u9A13\u7684\u306E\u3044\u305A\u308C\u304B main.help.opt.create.update.index=\ \u4F5C\u6210\u3001\u66F4\u65B0\u304A\u3088\u3073\u7D22\u5F15\u751F\u6210\u30E2\u30FC\u30C9\u3067\u306E\u307F\u6709\u52B9\u306A\u64CD\u4F5C\u4FEE\u98FE\u5B50:\n main.help.opt.create.update.index.no-compress=\ -0, --no-compress \u683C\u7D0D\u306E\u307F\u3002ZIP\u5727\u7E2E\u3092\u4F7F\u7528\u3057\u307E\u305B\u3093 main.help.opt.other=\ \u305D\u306E\u4ED6\u306E\u30AA\u30D7\u30B7\u30E7\u30F3:\n main.help.opt.other.help=\ -?, --help[:compat] \u3053\u308C(\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u4E92\u63DB\u6027)\u3092help\u306B\u6307\u5B9A\u3057\u307E\u3059 +main.help.opt.other.help-extra=\ --help-extra \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30D8\u30EB\u30D7\u3092\u63D0\u4F9B\u3057\u307E\u3059 main.help.opt.other.version=\ --version \u30D7\u30ED\u30B0\u30E9\u30E0\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u3057\u307E\u3059 main.help.postopt=\ \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF'module-info.class'\u304C\u6307\u5B9A\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30EB\u30FC\u30C8\u307E\u305F\u306F\n jar\u30A2\u30FC\u30AB\u30A4\u30D6\u81EA\u4F53\u306E\u30EB\u30FC\u30C8\u306B\u3042\u308B\u5834\u5408\u3001\u30A2\u30FC\u30AB\u30A4\u30D6\u306F\u30E2\u30B8\u30E5\u30E9jar\u3067\u3059\u3002\n \u6B21\u306E\u64CD\u4F5C\u306F\u3001\u30E2\u30B8\u30E5\u30E9jar\u306E\u4F5C\u6210\u6642\u307E\u305F\u306F\u65E2\u5B58\u306E\u975E\u30E2\u30B8\u30E5\u30E9jar\u306E\u66F4\u65B0\u6642\u306B\n \u306E\u307F\u6709\u52B9\u3067\u3059: '--module-version'\u3001\n '--hash-modules'\u304A\u3088\u3073'--module-path'\u3002\n\n \u30ED\u30F3\u30B0\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3078\u306E\u5FC5\u9808\u307E\u305F\u306F\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u306F\u3001\u5BFE\u5FDC\u3059\u308B\u30B7\u30E7\u30FC\u30C8\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\n \u306B\u5BFE\u3057\u3066\u3082\u5FC5\u9808\u307E\u305F\u306F\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u306A\u308A\u307E\u3059\u3002 diff --git a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ko.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ko.properties index 8d1f3c019df..93b9a5fb26e 100644 --- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ko.properties +++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ko.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -33,6 +33,8 @@ error.bad.option=\uC635\uC158 -{ctxu} \uC911 \uD558\uB098\uB97C \uC9C0\uC815\uD5 error.bad.cflag='c' \uD50C\uB798\uADF8\uB97C \uC0AC\uC6A9\uD558\uB824\uBA74 Manifest \uB610\uB294 \uC785\uB825 \uD30C\uC77C\uC744 \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4! error.bad.uflag='u' \uD50C\uB798\uADF8\uB97C \uC0AC\uC6A9\uD558\uB824\uBA74 Manifest, 'e' \uD50C\uB798\uADF8 \uB610\uB294 \uC785\uB825 \uD30C\uC77C\uC744 \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4! error.bad.eflag='e' \uD50C\uB798\uADF8 \uBC0F Manifest\uB97C 'Main-Class' \uC18D\uC131\uACFC \uD568\uAED8 \uC9C0\uC815\uD560 \uC218\n\uC5C6\uC2B5\uB2C8\uB2E4! +error.bad.dflag=''-d, --print-module-descriptor'' \uC635\uC158\uC5D0\uB294 \uC785\uB825 \uD30C\uC77C\uC744 \uC9C0\uC815\uD560 \uD544\uC694\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. {0} +error.bad.reason=\uC798\uBABB\uB41C \uC6D0\uC778: {0}\uC740(\uB294) deprecated, deprecated-for-removal \uB610\uB294 incubating \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4. error.nosuch.fileordir={0}: \uD574\uB2F9 \uD30C\uC77C \uB610\uB294 \uB514\uB809\uD1A0\uB9AC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. error.write.file=\uAE30\uC874 jar \uD30C\uC77C\uC5D0 \uC4F0\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. error.create.dir={0}: \uB514\uB809\uD1A0\uB9AC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. @@ -44,15 +46,17 @@ error.unexpected.module-info=\uC608\uC0C1\uCE58 \uC54A\uC740 \uBAA8\uB4C8 \uAE30 error.module.descriptor.not.found=\uBAA8\uB4C8 \uAE30\uC220\uC790\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C error.validator.info.without.root=\uB8E8\uD2B8\uC5D0\uC11C module-info.class \uC5C6\uC774 \uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC5D0\uC11C module-info.class\uAC00 \uBC1C\uACAC\uB428 error.validator.info.name.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uC798\uBABB\uB41C \uC774\uB984\uC774 \uD3EC\uD568\uB428 -error.validator.info.requires.public=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uCD94\uAC00 "requires public" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428 +error.validator.info.requires.transitive=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uCD94\uAC00 "requires transitive" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428 error.validator.info.requires.added=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uCD94\uAC00 "requires" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428 error.validator.info.requires.dropped=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB204\uB77D\uB41C "requires" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428 error.validator.info.exports.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB2E4\uB978 "exports" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428 +error.validator.info.opens.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB2E4\uB978 "opens" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428 error.validator.info.provides.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB2E4\uB978 "provides" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428 error.invalid.versioned.module.attribute=\uBD80\uC801\uD569\uD55C \uBAA8\uB4C8 \uAE30\uC220\uC790 \uC18D\uC131 {0} error.missing.provider=\uC11C\uBE44\uC2A4 \uC81C\uACF5\uC790\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0} error.release.value.notnumber=\uB9B4\uB9AC\uC2A4 {0}\uC774(\uAC00) \uBD80\uC801\uD569\uD568 error.release.value.toosmall=\uB9B4\uB9AC\uC2A4 {0}\uC774(\uAC00) \uBD80\uC801\uD569\uD568. 9 \uC774\uC0C1\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. +error.release.unexpected.versioned.entry={1} \uB9B4\uB9AC\uC2A4\uC5D0 \uB300\uD574 \uC608\uC0C1\uCE58 \uC54A\uC740 \uBC84\uC804\uC774 \uC9C0\uC815\uB41C \uD56D\uBAA9 {0} error.validator.jarfile.exception={0}\uC744(\uB97C) \uAC80\uC99D\uD560 \uC218 \uC5C6\uC74C: {1} error.validator.jarfile.invalid=\uBD80\uC801\uD569\uD55C \uB2E4\uC911 \uB9B4\uB9AC\uC2A4 jar \uD30C\uC77C {0}\uC774(\uAC00) \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4. error.validator.bad.entry.name=\uD56D\uBAA9 \uC774\uB984 \uD615\uC2DD\uC774 \uC798\uBABB\uB428, {0} @@ -63,9 +67,9 @@ error.validator.new.public.class={0} \uD56D\uBAA9\uC5D0 \uAE30\uBCF8 \uD56D\uBAA error.validator.incompatible.class.version={0} \uD56D\uBAA9\uC5D0 \uC774\uC804 \uBC84\uC804\uACFC \uD638\uD658\uB418\uC9C0 \uC54A\uB294 \uD074\uB798\uC2A4 \uBC84\uC804\uC774 \uC788\uC2B5\uB2C8\uB2E4. error.validator.different.api={0} \uD56D\uBAA9\uC5D0 \uC774\uC804 \uBC84\uC804\uACFC \uB2E4\uB978 api\uB97C \uAC00\uC9C4 \uD074\uB798\uC2A4\uAC00 \uC788\uC2B5\uB2C8\uB2E4. error.validator.names.mismatch={0} \uD56D\uBAA9\uC5D0 \uB0B4\uBD80 \uC774\uB984 {1}\uC744(\uB97C) \uAC00\uC9C4 \uD074\uB798\uC2A4\uAC00 \uC788\uC9C0\uB9CC \uC774\uB984\uC774 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. -warn.validator.identical.entry=\uACBD\uACE0 - {0} \uD56D\uBAA9\uC5D0 \uC774\uBBF8 jar\uC5D0 \uC788\uB294 \uD56D\uBAA9\uACFC \uB3D9\uC77C\uD55C \uD074\uB798\uC2A4\uAC00 \uC788\uC2B5\uB2C8\uB2E4. -warn.validator.resources.with.same.name=\uACBD\uACE0 - {0} \uD56D\uBAA9\uC5D0 \uB3D9\uC77C\uD55C \uC774\uB984\uC758 \uC5EC\uB7EC \uB9AC\uC18C\uC2A4\uAC00 \uC788\uC2B5\uB2C8\uB2E4. -warn.validator.concealed.public.class=\uACBD\uACE0 - {0} \uD56D\uBAA9\uC740 \uC228\uACA8\uC9C4 \uD328\uD0A4\uC9C0\uC5D0 \uC788\uB294 \uACF5\uC6A9 \uD074\uB798\uC2A4\uC785\uB2C8\uB2E4. \n\uC774 jar\uB97C \uD074\uB798\uC2A4 \uACBD\uB85C\uC5D0 \uBC30\uCE58\uD558\uBA74 \uACF5\uC6A9 \uC778\uD130\uD398\uC774\uC2A4\uAC00 \uD638\uD658\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +warn.validator.identical.entry=\uACBD\uACE0: {0} \uD56D\uBAA9\uC5D0 \uC774\uBBF8 jar\uC5D0 \uC788\uB294 \uD56D\uBAA9\uACFC\n\uB3D9\uC77C\uD55C \uD074\uB798\uC2A4\uAC00 \uC788\uC2B5\uB2C8\uB2E4. +warn.validator.resources.with.same.name=\uACBD\uACE0: {0} \uD56D\uBAA9\uC5D0 \uB3D9\uC77C\uD55C \uC774\uB984\uC758 \uC5EC\uB7EC \uB9AC\uC18C\uC2A4\uAC00 \uC788\uC2B5\uB2C8\uB2E4. +warn.validator.concealed.public.class=\uACBD\uACE0: {0} \uD56D\uBAA9\uC740 \uC228\uACA8\uC9C4 \uD328\uD0A4\uC9C0\uC5D0 \uC788\uB294\n\uACF5\uC6A9 \uD074\uB798\uC2A4\uC785\uB2C8\uB2E4. \uC774 jar\uC744 \uD074\uB798\uC2A4 \uACBD\uB85C\uC5D0 \uBC30\uCE58\uD558\uBA74\n\uACF5\uC6A9 \uC778\uD130\uD398\uC774\uC2A4\uAC00 \uD638\uD658\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. out.added.manifest=Manifest\uB97C \uCD94\uAC00\uD568 out.added.module-info=\uCD94\uAC00\uB41C \uBAA8\uB4C8 \uC815\uBCF4: {0} out.update.manifest=Manifest\uB97C \uC5C5\uB370\uC774\uD2B8\uD568 @@ -102,9 +106,12 @@ main.help.opt.create.update.no-manifest=\ -M, --no-manifest \uD56D\uBA main.help.opt.create.update.module-version=\ --module-version=VERSION \uBAA8\uB4C8\uD615 jar\uB97C \uC0DD\uC131\uD558\uAC70\uB098 \uBE44\uBAA8\uB4C8 jar\uB97C\n \uC5C5\uB370\uC774\uD2B8\uD560 \uB54C \uBAA8\uB4C8 \uBC84\uC804\uC785\uB2C8\uB2E4. main.help.opt.create.update.hash-modules=\ --hash-modules=PATTERN \uC0DD\uC131 \uC911\uC778 \uBAA8\uB4C8\uD615 jar \uB610\uB294 \uC5C5\uB370\uC774\uD2B8 \uC911\uC778 \uBE44\uBAA8\uB4C8 jar\uC5D0 \n \uC9C1\uC811 \uB610\uB294 \uAC04\uC811\uC801\uC73C\uB85C \uC758\uC874\uD558\uACE0 \uC8FC\uC5B4\uC9C4 \uD328\uD134\uACFC \uC77C\uCE58\uD558\uB294\n \uBAA8\uB4C8\uC758 \uD574\uC2DC\uB97C \uCEF4\uD4E8\uD2B8\uD558\uACE0\n \uAE30\uB85D\uD569\uB2C8\uB2E4. main.help.opt.create.update.module-path=\ -p, --module-path \uD574\uC2DC\uB97C \uC0DD\uC131\uD558\uAE30 \uC704\uD55C \uBAA8\uB4C8 \uC885\uC18D\uC131\uC758\n \uC704\uCE58\uC785\uB2C8\uB2E4. +main.help.opt.create.update.do-not-resolve-by-default=\ --do-not-resolve-by-default \uBAA8\uB4C8\uC758 \uAE30\uBCF8 \uB8E8\uD2B8 \uC9D1\uD569\uC5D0\uC11C \uC81C\uC678\uD569\uB2C8\uB2E4. +main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved \uBAA8\uB4C8\uC774 \uD574\uACB0\uB41C \uACBD\uC6B0 \uACBD\uACE0\uB97C \uC2E4\uD589\uD560 \uD234\uC5D0 \uB300\uD55C\n \uD78C\uD2B8\uB85C, deprecated, deprecated-for-removal,\n \uB610\uB294 incubating \uC911 \uD558\uB098\uC785\uB2C8\uB2E4. main.help.opt.create.update.index=\ \uC0DD\uC131, \uC5C5\uB370\uC774\uD2B8 \uBC0F generate-index \uBAA8\uB4DC\uC5D0\uC11C\uB9CC \uC801\uD569\uD55C \uC791\uC5C5 \uC218\uC815\uC790:\n main.help.opt.create.update.index.no-compress=\ -0, --no-compress \uC800\uC7A5 \uC804\uC6A9\uC774\uBA70 ZIP \uC555\uCD95\uC744 \uC0AC\uC6A9\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. main.help.opt.other=\ \uAE30\uD0C0 \uC635\uC158:\n main.help.opt.other.help=\ -?, --help[:compat] \uC774 \uB3C4\uC6C0\uB9D0(\uB610\uB294 \uC120\uD0DD\uC801\uC73C\uB85C \uD638\uD658\uC131)\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4. +main.help.opt.other.help-extra=\ --help-extra \uCD94\uAC00 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4. main.help.opt.other.version=\ --version \uD504\uB85C\uADF8\uB7A8 \uBC84\uC804\uC744 \uC778\uC1C4\uD569\uB2C8\uB2E4. main.help.postopt=\ \uC544\uCE74\uC774\uBE0C\uB294 \uBAA8\uB4C8 \uAE30\uC220\uC790 'module-info.class'\uAC00 \uC8FC\uC5B4\uC9C4 \uB514\uB809\uD1A0\uB9AC\uC758\n \uB8E8\uD2B8 \uB610\uB294 jar \uC544\uCE74\uC774\uBE0C \uC790\uCCB4\uC758 \uB8E8\uD2B8\uC5D0 \uC704\uCE58\uD55C \uACBD\uC6B0 \uBAA8\uB4C8\uD615 jar\uC785\uB2C8\uB2E4.\n \uB2E4\uC74C \uC791\uC5C5\uC740 \uBAA8\uB4C8\uD615 jar\uB97C \uC0DD\uC131\uD558\uAC70\uB098 \uAE30\uC874 \uBE44\uBAA8\uB4C8 jar\uB97C\n \uC5C5\uB370\uC774\uD2B8\uD560 \uB54C\uB9CC \uC801\uD569\uD569\uB2C8\uB2E4. '--module-version',\n '--hash-modules' \uBC0F '--module-path'.\n\n long \uC635\uC158\uC758 \uD544\uC218 \uB610\uB294 \uC120\uD0DD\uC801 \uC778\uC218\uB294 \uD574\uB2F9\uD558\uB294 short \uC635\uC158\uC5D0 \uB300\uD574\uC11C\uB3C4\n \uD544\uC218 \uB610\uB294 \uC120\uD0DD\uC801\uC785\uB2C8\uB2E4. diff --git a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_pt_BR.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_pt_BR.properties index 647ad8de3ee..be961c42477 100644 --- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_pt_BR.properties +++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_pt_BR.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ # questions. # -error.multiple.main.operations=Voc\u00EA n\u00E3o pode especificar mais de uma das op\u00E7\u00F5es '-cuxtid' +error.multiple.main.operations=Voc\u00EA n\u00E3o pode especificar mais de um op\u00E7\u00E3o '-cuxtid' error.cant.open=n\u00E3o \u00E9 poss\u00EDvel abrir: {0} error.illegal.option=Op\u00E7\u00E3o inv\u00E1lida: {0} error.unrecognized.option=op\u00E7\u00E3o n\u00E3o reconhecida : {0} @@ -33,6 +33,8 @@ error.bad.option=Uma das op\u00E7\u00F5es -{ctxu} deve ser especificada. error.bad.cflag=flag 'c' requer que os arquivos de manifesto ou entrada sejam especificados! error.bad.uflag=o flag 'u' requer que arquivos de manifesto, o flag 'e' ou arquivos de entrada sejam especificados! error.bad.eflag=o flag 'e' e manifesto com o atributo 'Main-Class' n\u00E3o podem ser especificados \njuntos! +error.bad.dflag=A op\u00E7\u00E3o ''-d, --print-module-descriptor'' n\u00E3o exige a especifica\u00E7\u00E3o de arquivo de sa\u00EDda: {0} +error.bad.reason=motivo incorreto: {0}, deve ser deprecated, deprecated-for-removal ou incubating error.nosuch.fileordir={0} : n\u00E3o h\u00E1 tal arquivo ou diret\u00F3rio error.write.file=Erro ao gravar o arquivo jar existente error.create.dir={0} : n\u00E3o foi poss\u00EDvel criar o diret\u00F3rio @@ -44,15 +46,17 @@ error.unexpected.module-info=Descritor de m\u00F3dulo inesperado {0} error.module.descriptor.not.found=Descritor de m\u00F3dulo n\u00E3o encontrado error.validator.info.without.root=module-info.class encontrado em um diret\u00F3rio com controle de vers\u00E3o sem module-info.class na raiz error.validator.info.name.notequal=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m nome incorreto -error.validator.info.requires.public=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "requires public" adicional +error.validator.info.requires.transitive=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "requires transitive" adicional error.validator.info.requires.added=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "requires" adicional error.validator.info.requires.dropped=module-info.class em um diret\u00F3rio com controle de vers\u00E3o falta "requires" error.validator.info.exports.notequal=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "exports" diferente +error.validator.info.opens.notequal=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "opens" diferente error.validator.info.provides.notequal=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "provides" diferente error.invalid.versioned.module.attribute=Atributo {0} de descritor de m\u00F3dulo inv\u00E1lido error.missing.provider=Prestador de servi\u00E7os n\u00E3o encontrado: {0} error.release.value.notnumber=release {0} n\u00E3o v\u00E1lida error.release.value.toosmall=release {0} n\u00E3o v\u00E1lida; deve ser >= 9 +error.release.unexpected.versioned.entry=entrada {0} com controle de vers\u00E3o inesperada para a release {1} error.validator.jarfile.exception=n\u00E3o \u00E9 poss\u00EDvel validar {0}: {1} error.validator.jarfile.invalid=arquivo jar {0} multi-release inv\u00E1lido exclu\u00EDdo error.validator.bad.entry.name=nome de entrada incorreto, {0} @@ -63,9 +67,9 @@ error.validator.new.public.class=a entrada {0} cont\u00E9m uma nova classe p\u00 error.validator.incompatible.class.version=a entrada {0} tem uma vers\u00E3o de classe incompat\u00EDvel com uma vers\u00E3o anterior error.validator.different.api=a entrada {0} cont\u00E9m uma classe com api diferente da vers\u00E3o anterior error.validator.names.mismatch=a entrada {0} cont\u00E9m uma classe com o nome interno {1}; os nomes n\u00E3o correspondem -warn.validator.identical.entry=advert\u00EAncia - a entrada {0} cont\u00E9m uma classe id\u00EAntica a uma que j\u00E1 est\u00E1 no jar -warn.validator.resources.with.same.name=advert\u00EAncia - entrada {0}; diversos recursos com o mesmo nome -warn.validator.concealed.public.class=advert\u00EAncia - a entrada {0} \u00E9 uma classe p\u00FAblica em um pacote oculto, \ncolocar esse jar no caminho de classe resultar\u00E1 em interfaces p\u00FAblicas incompat\u00EDveis +warn.validator.identical.entry=Advert\u00EAncia: a entrada {0} cont\u00E9m uma classe\nid\u00EAntica a uma que j\u00E1 est\u00E1 no jar +warn.validator.resources.with.same.name=Advert\u00EAncia: entrada {0}; diversos recursos com o mesmo nome +warn.validator.concealed.public.class=Advert\u00EAncia: a entrada {0} \u00E9 uma classe p\u00FAblica\nem um pacote oculto; colocar esse jar no caminho de classe resultar\u00E1\nem interfaces p\u00FAblicas incompat\u00EDveis out.added.manifest=manifesto adicionado out.added.module-info=module-info: {0} adicionado out.update.manifest=manifesto atualizado @@ -81,7 +85,7 @@ out.size=(entrada = {0}) (sa\u00EDda= {1}) usage.compat=Interface de Compatibilidade:\nUso: jar {ctxui}[vfmn0PMe] [jar-file] [manifest-file] [entry-point] [-C dir] arquivos] ...\nOp\u00E7\u00F5es:\n -c cria novo arquivo compactado\n -t lista o sum\u00E1rio do arquivo compactado\n -x extrai arquivos com o nome (ou todos) do arquivo compactado\n -u atualiza o arquivo compactado existente\n -v gera sa\u00EDda detalhada na sa\u00EDda padr\u00E3o\n -f especifica o nome do arquivo compactado\n -m inclui as informa\u00E7\u00F5es do manifesto do arquivo de manifesto especificado\n -n executa a normaliza\u00E7\u00E3o Pack200 ap\u00F3s a cria\u00E7\u00E3o de um novo arquivo compactado\n -e especifica o ponto de entrada da aplicativo para aplicativo stand-alone \n empacotada em um arquivo jar execut\u00E1vel\n -0 armazena somente; n\u00E3o usa compacta\u00E7\u00E3o ZIP\n -P preserva os componentes '/' inicial (caminho absoluto) e ".." (diret\u00F3rio pai) nos nomes dos arquivos\n -M n\u00E3o cria um arquivo de manifesto para as entradas\n -i gera informa\u00E7\u00F5es de \u00EDndice para os arquivos jar especificados\n -C passa para o diret\u00F3rio especificado e inclui o arquivo a seguir\nSe um arquivo tamb\u00E9m for um diret\u00F3rio, ele ser\u00E1 processado repetidamente.\nO nome do arquivo de manifesto, o nome do arquivo compactado e o nome do ponto de entrada s\u00E3o\nespecificados na mesma ordem dos flags 'm', 'f' e 'e'.\n\nExemplo 1: para arquivar dois arquivos de classe em um arquivo compactado denominado classes.jar: \n jar cvf classes.jar Foo.class Bar.class \nExemplo 2: use um arquivo de manifesto existente 'mymanifest' e arquive todos os\n arquivos no diret\u00F3rio foo/ em 'classes.jar': \n jar cvfm classes.jar mymanifest -C foo/ .\n -main.usage.summary=Uso: jar [OPTION...] [ [--release VERSION] [-C dir] arquivos]... +main.usage.summary=Uso: jar [OPTION...] [ [--release VERSION] [-C dir] files] ... main.usage.summary.try=Tente `jar --ajuda' para obter mais informa\u00E7\u00F5es. main.help.preopt=Uso: jar [OPTION...] [ [--release VERSION] [-C dir] arquivos]...\njar cria um arquivo compactado para classes e recursos, e pode manipular ou\nrestaurar classes ou recursos individuais de um arquivo compactado.\n\n Exemplos:\n # Cria um arquivo compactado chamado classes.jar com dois arquivos de classe:\n jar --create --file classes.jar Foo.class Bar.class\n # Cria um arquivo compactado usando um manifesto existente, com todos os arquivos em foo/:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Cria um arquivo compactado jar modular, em que o descritor do m\u00F3dulo se localize em\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ classes resources\n # Atualiza um arquivo jar n\u00E3o modular existente para um jar modular:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n -C foo/ module-info.class\n # Cria um arquivo jar de v\u00E1rias releases, colocando alguns arquivos no diret\u00F3rio META-INF/versions/9:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes @@ -102,9 +106,12 @@ main.help.opt.create.update.no-manifest=\ -M, --no-manifest N\u00E3o c main.help.opt.create.update.module-version=\ --module-version=VERSION A vers\u00E3o do m\u00F3dulo, ao criar um arquivo jar\n modular, ou atualizar um arquivo jar n\u00E3o modular main.help.opt.create.update.hash-modules=\ --hash-modules=PATTERN Calcula e registra os hashes dos m\u00F3dulos\n correlacionado pelo padr\u00E3o fornecido e do qual depende\n direta ou indiretamente em um arquivo jar modular que est\u00E1 sendo\n criado ou em um arquivo jar n\u00E3o modular que est\u00E1 sendo atualizado main.help.opt.create.update.module-path=\ -p, --module-path Local de depend\u00EAncia de m\u00F3dulo para gerar\n o hash +main.help.opt.create.update.do-not-resolve-by-default=\ --do-not-resolve-by-default Excluir do conjunto de m\u00F3dulos raiz padr\u00E3o +main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved Dica para que uma ferramenta emita uma advert\u00EAncia se o m\u00F3dulo\n for resolvido. Um destes: deprecated, deprecated-for-removal,\n ou incubating main.help.opt.create.update.index=\ Modificadores de opera\u00E7\u00E3o v\u00E1lidos somente no modo de cria\u00E7\u00E3o, atualiza\u00E7\u00E3o e gera\u00E7\u00E3o de \u00EDndice:\n main.help.opt.create.update.index.no-compress=\ -0, --no-compress Somente armazenamento; n\u00E3o use compacta\u00E7\u00E3o ZIP main.help.opt.other=\ Outras op\u00E7\u00F5es:\n main.help.opt.other.help=\ -?, --help[:compat] Fornece esta ajuda ou, opcionalmente, a ajuda de compatibilidade +main.help.opt.other.help-extra=\ --help-extra Fornecer ajuda sobre op\u00E7\u00F5es extras main.help.opt.other.version=\ --version Imprime a vers\u00E3o do programa main.help.postopt=\ Arquivo compactado ser\u00E1 um arquivo jar modular se um descritor de m\u00F3dulo, 'module-info.class', estiver\n localizado na raiz dos diret\u00F3rios em quest\u00E3o ou na raiz do pr\u00F3prio arquivo compactado\n jar. As seguintes opera\u00E7\u00F5es s\u00F3 s\u00E3o v\u00E1lidas ao criar um jar modular\n ou atualizar um jar n\u00E3o modular existente: '--module-version',\n '--hash-modules' e '--module-path'.\n\n Argumentos obrigat\u00F3rios ou opcionais para op\u00E7\u00F5es longas tamb\u00E9m s\u00E3o obrigat\u00F3rios ou opcionais\n para quaisquer op\u00E7\u00F5es curtas correspondentes. diff --git a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_sv.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_sv.properties index f73650e5f86..0fbc72331ca 100644 --- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_sv.properties +++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_sv.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ # questions. # -error.multiple.main.operations=Du kan inte ange flera -cuxtid-alternativ +error.multiple.main.operations=Du kan inte ange flera alternativ av typen '-cuxtid' error.cant.open=kan inte \u00F6ppna: {0} error.illegal.option=Otill\u00E5tet alternativ: {0} error.unrecognized.option=ok\u00E4nt alternativ: {0} @@ -33,6 +33,8 @@ error.bad.option=Ett av alternativen -{ctxu} m\u00E5ste anges. error.bad.cflag=f\u00F6r c-flaggan m\u00E5ste manifest- eller indatafiler anges. error.bad.uflag=f\u00F6r u-flaggan m\u00E5ste manifest-, e-flagg- eller indatafiler anges. error.bad.eflag=e-flaggan och manifest med attributet Main-Class kan inte anges \ntillsammans. +error.bad.dflag=alternativet ''-d, --print-module-descriptor'' kr\u00E4ver att inga indatafiler har angetts: {0} +error.bad.reason=ogiltig orsak: {0} m\u00E5ste vara deprecated, deprecated-for-removal eller incubating error.nosuch.fileordir={0} : det finns ingen s\u00E5dan fil eller katalog error.write.file=Det uppstod ett fel vid skrivning till befintlig jar-fil. error.create.dir={0} : kunde inte skapa n\u00E5gon katalog @@ -44,15 +46,17 @@ error.unexpected.module-info=Ov\u00E4ntad moduldeskriptor, {0} error.module.descriptor.not.found=Moduldeskriptorn hittades inte error.validator.info.without.root=module-info.class hittades i en versionshanterad katalog utan module-info.class i roten error.validator.info.name.notequal=module-info.class i en versionshanterad katalog inneh\u00E5ller ett felaktigt namn -error.validator.info.requires.public=module-info.class i en versionshanterad katalog inneh\u00E5ller fler "requires public" +error.validator.info.requires.transitive=module-info.class i en versionshanterad katalog inneh\u00E5ller fler "requires transitive" error.validator.info.requires.added=module-info.class i en versionshanterad katalog inneh\u00E5ller fler "requires" error.validator.info.requires.dropped=module-info.class i en versionshanterad katalog inneh\u00E5ller saknade "requires" error.validator.info.exports.notequal=module-info.class i en versionshanterad katalog inneh\u00E5ller olika "exports" +error.validator.info.opens.notequal=module-info.class i en versionshanterad katalog inneh\u00E5ller olika "opens" error.validator.info.provides.notequal=module-info.class i en versionshanterad katalog inneh\u00E5ller olika "provides" error.invalid.versioned.module.attribute=Ogiltigt attribut f\u00F6r moduldeskriptor, {0} error.missing.provider=Tj\u00E4nsteleverant\u00F6ren hittades inte: {0} error.release.value.notnumber=utg\u00E5va {0} \u00E4r inte giltig error.release.value.toosmall=utg\u00E5va {0} \u00E4r inte giltig, m\u00E5ste vara >= 9 +error.release.unexpected.versioned.entry=ov\u00E4ntad versionshanterad post, {0}, f\u00F6r utg\u00E5van {1} error.validator.jarfile.exception=kan inte validera {0}: {1} error.validator.jarfile.invalid=ogiltig jar-fil f\u00F6r flera utg\u00E5vor, {0}, har tagits bort error.validator.bad.entry.name=postnamnet {0} \u00E4r felaktigt utformat @@ -63,9 +67,9 @@ error.validator.new.public.class=posten {0} inneh\u00E5ller en ny allm\u00E4n kl error.validator.incompatible.class.version=posten {0} har en klassversion som \u00E4r inkompatibel med en tidigare version error.validator.different.api=posten {0} inneh\u00E5ller en klass med ett annat api fr\u00E5n en tidigare version error.validator.names.mismatch=posten {0} inneh\u00E5ller en klass med det interna namnet {1}, namnen matchar inte -warn.validator.identical.entry=varning - posten {0} inneh\u00E5ller en klass som \u00E4r identisk med en post som redan finns i jar-filen -warn.validator.resources.with.same.name=varning - posten {0}, flera resurser med samma namn -warn.validator.concealed.public.class=varning - posten {0} \u00E4r en allm\u00E4n klass i ett dolt paket. \nOm du placerar den h\u00E4r jar-filen p\u00E5 klass\u00F6kv\u00E4gen leder det till inkompatibla allm\u00E4nna gr\u00E4nssnitt +warn.validator.identical.entry=Varning: posten {0} inneh\u00E5ller en klass som\n\u00E4r identisk med en post som redan finns i jar-filen +warn.validator.resources.with.same.name=Varning: posten {0}, flera resurser med samma namn +warn.validator.concealed.public.class=Varning: posten {0} \u00E4r en allm\u00E4n klass\ni ett dolt paket. Om du placerar den h\u00E4r jar-filen p\u00E5 klass\u00F6kv\u00E4gen leder\ndet till inkompatibla allm\u00E4nna gr\u00E4nssnitt out.added.manifest=tillagt manifestfil out.added.module-info=lade till module-info: {0} out.update.manifest=uppdaterat manifest @@ -102,9 +106,12 @@ main.help.opt.create.update.no-manifest=\ -M, --no-manifest Skapa inte main.help.opt.create.update.module-version=\ --module-version=VERSION Modulversionen vid skapande av ett modul\u00E4rt\n jar-arkiv eller vid uppdatering av ett icke-modul\u00E4rt jar-arkiv main.help.opt.create.update.hash-modules=\ --hash-modules=PATTERN Ber\u00E4kna och registrera hashningarna f\u00F6r moduler som\n matchar det angivna m\u00F6nstret och som \u00E4r direkt eller\n indirekt beroende av att ett modul\u00E4rt jar-arkiv skapas\n eller att ett icke-modul\u00E4rt jar-arkiv uppdateras main.help.opt.create.update.module-path=\ -p, --module-path Plats f\u00F6r modulberoende f\u00F6r att generera\n hashningen +main.help.opt.create.update.do-not-resolve-by-default=\ --do-not-resolve-by-default Exkludera fr\u00E5n standardrotupps\u00E4ttningen med moduler +main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved Tips f\u00F6r ett verktyg f\u00F6r att utf\u00E4rda en varning om modulen\n har l\u00F6sts. deprecated, deprecated-for-removal,\n eller incubating main.help.opt.create.update.index=\ \u00C5tg\u00E4rdsmodifierare som endast \u00E4r giltiga i l\u00E4gena create, update och generate-index:\n main.help.opt.create.update.index.no-compress=\ -0, --no-compress Endast lagring, anv\u00E4nd ingen ZIP-komprimering main.help.opt.other=\ \u00D6vriga alternativ:\n main.help.opt.other.help=\ -?, --help[:compat] Visa den h\u00E4r hj\u00E4lpen eller kompatibilitetshj\u00E4lpen (valfritt) +main.help.opt.other.help-extra=\ --help-extra Visa hj\u00E4lp f\u00F6r extra alternativ main.help.opt.other.version=\ --version Skriv ut programversion main.help.postopt=\ Ett arkiv \u00E4r ett modul\u00E4rt jar-arkiv om en moduldeskriptor, 'module-info.class',\n finns i roten av de angivna katalogerna eller det angivna jar-arkivet.\n F\u00F6ljande \u00E5tg\u00E4rder \u00E4r endast giltiga vid skapande av ett modul\u00E4rt jar-arkiv och\n vid uppdatering av ett befintligt icke-modul\u00E4rt jar-arkiv: '--module-version',\n '--hash-modules' och '--module-path'.\n\n Obligatoriska och valfria alternativ f\u00F6r l\u00E5nga alternativ \u00E4r \u00E4ven obligatoriska\n respektive valfria f\u00F6r alla motsvarande korta alternativ. diff --git a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties index 71407c54707..4e6cbc8670a 100644 --- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties +++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -33,6 +33,8 @@ error.bad.option=\u5FC5\u987B\u6307\u5B9A {ctxu} \u4E2D\u7684\u4EFB\u4E00\u9009\ error.bad.cflag='c' \u6807\u8BB0\u8981\u6C42\u6307\u5B9A\u6E05\u5355\u6216\u8F93\u5165\u6587\u4EF6! error.bad.uflag='u' \u6807\u8BB0\u8981\u6C42\u6307\u5B9A\u6E05\u5355, 'e' \u6807\u8BB0\u6216\u8F93\u5165\u6587\u4EF6! error.bad.eflag=\u4E0D\u80FD\u540C\u65F6\u6307\u5B9A 'e' \u6807\u8BB0\u548C\u5177\u6709 'Main-Class' \u5C5E\u6027\u7684\n\u6E05\u5355! +error.bad.dflag=''-d, --print-module-descriptor'' \u9009\u9879\u4E0D\u9700\u8981\u6307\u5B9A\u4EFB\u4F55\u8F93\u5165\u6587\u4EF6: {0} +error.bad.reason=\u9519\u8BEF\u7684\u539F\u56E0: {0}, \u5FC5\u987B\u4E3A deprecated, deprecated-for-removal \u6216 incubating \u4E4B\u4E00 error.nosuch.fileordir={0}: \u6CA1\u6709\u8FD9\u4E2A\u6587\u4EF6\u6216\u76EE\u5F55 error.write.file=\u5199\u5165\u73B0\u6709\u7684 jar \u6587\u4EF6\u65F6\u51FA\u9519 error.create.dir={0}: \u65E0\u6CD5\u521B\u5EFA\u76EE\u5F55 @@ -44,15 +46,17 @@ error.unexpected.module-info=\u610F\u5916\u7684\u6A21\u5757\u63CF\u8FF0\u7B26 {0 error.module.descriptor.not.found=\u627E\u4E0D\u5230\u6A21\u5757\u63CF\u8FF0\u7B26 error.validator.info.without.root=\u5728\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u627E\u5230\u4E86 module-info.class, \u4F46\u6839\u4E2D\u6CA1\u6709 module-info.class error.validator.info.name.notequal=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u6B63\u786E\u7684\u540D\u79F0 -error.validator.info.requires.public=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u989D\u5916\u7684 "requires public" +error.validator.info.requires.transitive=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u989D\u5916\u7684 "requires transitive" error.validator.info.requires.added=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u989D\u5916\u7684 "requires" error.validator.info.requires.dropped=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u7F3A\u5C11\u7684 "requires" error.validator.info.exports.notequal=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "exports" +error.validator.info.opens.notequal=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "opens" error.validator.info.provides.notequal=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "provides" error.invalid.versioned.module.attribute=\u65E0\u6548\u7684\u6A21\u5757\u63CF\u8FF0\u7B26\u5C5E\u6027 {0} error.missing.provider=\u672A\u627E\u5230\u670D\u52A1\u63D0\u4F9B\u65B9: {0} error.release.value.notnumber=\u53D1\u884C\u7248 {0} \u65E0\u6548 error.release.value.toosmall=\u53D1\u884C\u7248 {0} \u65E0\u6548, \u5FC5\u987B >= 9 +error.release.unexpected.versioned.entry=\u53D1\u884C\u7248 {1} \u5B58\u5728\u610F\u5916\u7684\u7248\u672C\u5316\u6761\u76EE {0} error.validator.jarfile.exception=\u65E0\u6CD5\u9A8C\u8BC1 {0}: {1} error.validator.jarfile.invalid=\u5220\u9664\u7684\u591A\u53D1\u884C\u7248 jar \u6587\u4EF6 {0} \u65E0\u6548 error.validator.bad.entry.name=\u6761\u76EE\u540D\u79F0\u683C\u5F0F\u9519\u8BEF, {0} @@ -63,9 +67,9 @@ error.validator.new.public.class=\u6761\u76EE {0} \u5305\u542B\u672A\u5728\u57FA error.validator.incompatible.class.version=\u6761\u76EE {0} \u5305\u542B\u4E0E\u8F83\u65E9\u7248\u672C\u4E0D\u517C\u5BB9\u7684\u7C7B\u7248\u672C error.validator.different.api=\u6761\u76EE {0} \u5305\u542B\u7684\u7C7B\u5177\u6709\u4E0E\u65E9\u671F\u7248\u672C\u4E0D\u540C\u7684 api error.validator.names.mismatch=\u6761\u76EE {0} \u5305\u542B\u5185\u90E8\u540D\u79F0\u4E3A {1} \u7684\u7C7B, \u540D\u79F0\u4E0D\u5339\u914D -warn.validator.identical.entry=\u8B66\u544A - \u6761\u76EE {0} \u5305\u542B\u4E0E jar \u4E2D\u7684\u73B0\u6709\u6761\u76EE\u76F8\u540C\u7684\u7C7B -warn.validator.resources.with.same.name=\u8B66\u544A - \u6761\u76EE {0}, \u591A\u4E2A\u8D44\u6E90\u540C\u540D -warn.validator.concealed.public.class=\u8B66\u544A - \u6761\u76EE {0} \u662F\u9690\u85CF\u7A0B\u5E8F\u5305\u4E2D\u7684\u516C\u5171\u7C7B, \n\u5C06\u6B64 jar \u653E\u7F6E\u5728\u7C7B\u8DEF\u5F84\u4E2D\u5C06\u5BFC\u81F4\u516C\u5171\u63A5\u53E3\u4E0D\u517C\u5BB9 +warn.validator.identical.entry=\u8B66\u544A: \u6761\u76EE {0} \u5305\u542B\u4E0E jar \u4E2D\u7684\n\u73B0\u6709\u6761\u76EE\u76F8\u540C\u7684\u7C7B +warn.validator.resources.with.same.name=\u8B66\u544A: \u6761\u76EE {0}, \u591A\u4E2A\u8D44\u6E90\u5177\u6709\u76F8\u540C\u540D\u79F0 +warn.validator.concealed.public.class=\u8B66\u544A: \u6761\u76EE {0} \u662F\u5DF2\u9690\u85CF\u7A0B\u5E8F\u5305\u4E2D\u7684\n\u516C\u5171\u7C7B, \u5C06\u6B64 jar \u653E\u7F6E\u5728\u7C7B\u8DEF\u5F84\u4E2D\n\u5C06\u5BFC\u81F4\u516C\u5171\u63A5\u53E3\u4E0D\u517C\u5BB9 out.added.manifest=\u5DF2\u6DFB\u52A0\u6E05\u5355 out.added.module-info=\u5DF2\u6DFB\u52A0 module-info: {0} out.update.manifest=\u5DF2\u66F4\u65B0\u6E05\u5355 @@ -102,9 +106,12 @@ main.help.opt.create.update.no-manifest=\ -M, --no-manifest \u4E0D\u4E main.help.opt.create.update.module-version=\ --module-version=VERSION \u521B\u5EFA\u6A21\u5757\u5316 jar \u6216\u66F4\u65B0\n \u975E\u6A21\u5757\u5316 jar \u65F6\u7684\u6A21\u5757\u7248\u672C main.help.opt.create.update.hash-modules=\ --hash-modules=PATTERN \u8BA1\u7B97\u548C\u8BB0\u5F55\u6A21\u5757\u7684\u6563\u5217, \n \u8FD9\u4E9B\u6A21\u5757\u6309\u6307\u5B9A\u6A21\u5F0F\u5339\u914D\u5E76\u76F4\u63A5\u6216\n \u95F4\u63A5\u4F9D\u8D56\u4E8E\u6240\u521B\u5EFA\u7684\u6A21\u5757\u5316 jar \u6216\n \u6240\u66F4\u65B0\u7684\u975E\u6A21\u5757\u5316 jar main.help.opt.create.update.module-path=\ -p, --module-path \u6A21\u5757\u88AB\u4F9D\u8D56\u5BF9\u8C61\u7684\u4F4D\u7F6E, \u7528\u4E8E\u751F\u6210\n \u6563\u5217 +main.help.opt.create.update.do-not-resolve-by-default=\ --do-not-resolve-by-default \u4ECE\u9ED8\u8BA4\u6839\u6A21\u5757\u96C6\u4E2D\u6392\u9664 +main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved \u63D0\u793A\u5DE5\u5177\u5728\u89E3\u6790\u6A21\u5757\u540E\u53D1\u51FA\u8B66\u544A\u3002\n \u53EF\u4EE5\u4E3A deprecated, deprecated-for-removal\n \u6216 incubating \u4E4B\u4E00 main.help.opt.create.update.index=\ \u53EA\u5728\u521B\u5EFA, \u66F4\u65B0\u548C\u751F\u6210\u7D22\u5F15\u6A21\u5F0F\u4E0B\u6709\u6548\u7684\u64CD\u4F5C\u4FEE\u9970\u7B26:\n main.help.opt.create.update.index.no-compress=\ -0, --no-compress \u4EC5\u5B58\u50A8; \u4E0D\u4F7F\u7528 ZIP \u538B\u7F29 main.help.opt.other=\ \u5176\u4ED6\u9009\u9879:\n main.help.opt.other.help=\ -?, --help[:compat] \u63D0\u4F9B\u6B64\u5E2E\u52A9, \u4E5F\u53EF\u4EE5\u9009\u62E9\u6027\u5730\u63D0\u4F9B\u517C\u5BB9\u6027\u5E2E\u52A9 +main.help.opt.other.help-extra=\ --help-extra \u63D0\u4F9B\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9 main.help.opt.other.version=\ --version \u8F93\u51FA\u7A0B\u5E8F\u7248\u672C main.help.postopt=\ \u5982\u679C\u6A21\u5757\u63CF\u8FF0\u7B26 'module-info.class' \u4F4D\u4E8E\u6307\u5B9A\u76EE\u5F55\u7684\n \u6839\u76EE\u5F55\u4E2D, \u6216\u8005\u4F4D\u4E8E jar \u6863\u6848\u672C\u8EAB\u7684\u6839\u76EE\u5F55\u4E2D, \u5219\n \u8BE5\u6863\u6848\u662F\u4E00\u4E2A\u6A21\u5757\u5316 jar\u3002\u4EE5\u4E0B\u64CD\u4F5C\u53EA\u5728\u521B\u5EFA\u6A21\u5757\u5316 jar,\n \u6216\u66F4\u65B0\u73B0\u6709\u7684\u975E\u6A21\u5757\u5316 jar \u65F6\u6709\u6548: '--module-version',\n '--hash-modules' \u548C '--module-path'\u3002\n\n \u5982\u679C\u4E3A\u957F\u9009\u9879\u63D0\u4F9B\u4E86\u5FC5\u9700\u53C2\u6570\u6216\u53EF\u9009\u53C2\u6570, \u5219\u5B83\u4EEC\u5BF9\u4E8E\n \u4EFB\u4F55\u5BF9\u5E94\u7684\u77ED\u9009\u9879\u4E5F\u662F\u5FC5\u9700\u6216\u53EF\u9009\u7684\u3002 diff --git a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_TW.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_TW.properties index 3c209bb6432..60b71610c15 100644 --- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_TW.properties +++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_TW.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -33,6 +33,8 @@ error.bad.option=\u5176\u4E2D\u4E00\u500B\u9078\u9805 -{ctxu} \u5FC5\u9808\u52A0 error.bad.cflag='c' \u65D7\u6A19\u8981\u6C42\u6307\u5B9A\u8CC7\u8A0A\u6E05\u55AE\u6216\u8F38\u5165\u6A94\u6848\uFF01 error.bad.uflag='u' \u65D7\u6A19\u8981\u6C42\u6307\u5B9A\u8CC7\u8A0A\u6E05\u55AE\u3001'e' \u65D7\u6A19\u6216\u8F38\u5165\u6A94\u6848\uFF01 error.bad.eflag=\u7121\u6CD5\u540C\u6642\u6307\u5B9A 'e' \u65D7\u6A19\u548C\u5177\u6709 'Main-Class' \u5C6C\u6027\u7684\n\u8CC7\u8A0A\u6E05\u55AE\uFF01 +error.bad.dflag=''-d, --print-module-descriptor'' \u9078\u9805\u4E0D\u9700\u8981\u6307\u5B9A\u8F38\u5165\u6A94: {0} +error.bad.reason=\u932F\u8AA4\u539F\u56E0: {0}\uFF0C\u5FC5\u9808\u662F deprecated\u3001deprecated-for-removal \u6216 incubating \u5176\u4E2D\u4E4B\u4E00 error.nosuch.fileordir={0} : \u6C92\u6709\u9019\u985E\u6A94\u6848\u6216\u76EE\u9304 error.write.file=\u5BEB\u5165\u73FE\u6709\u7684 jar \u6A94\u6848\u6642\u767C\u751F\u932F\u8AA4 error.create.dir={0} : \u7121\u6CD5\u5EFA\u7ACB\u76EE\u9304 @@ -44,15 +46,17 @@ error.unexpected.module-info=\u672A\u9810\u671F\u7684\u6A21\u7D44\u63CF\u8FF0\u5 error.module.descriptor.not.found=\u627E\u4E0D\u5230\u6A21\u7D44\u63CF\u8FF0\u5340 error.validator.info.without.root=\u5728\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u767C\u73FE module-info.class\uFF0C\u4F46\u662F\u6839\u4E2D\u6C92\u6709 module-info.class error.validator.info.name.notequal=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u6B63\u78BA\u7684\u540D\u7A31 -error.validator.info.requires.public=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u984D\u5916\u7684 "requires public" +error.validator.info.requires.transitive=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u984D\u5916\u7684 "requires transitive" error.validator.info.requires.added=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u984D\u5916\u7684 "requires" error.validator.info.requires.dropped=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u907A\u6F0F\u7684 "requires" error.validator.info.exports.notequal=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "exports" +error.validator.info.opens.notequal=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "opens" error.validator.info.provides.notequal=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "provides" error.invalid.versioned.module.attribute=\u6A21\u7D44\u63CF\u8FF0\u5340\u5C6C\u6027 {0} \u7121\u6548 error.missing.provider=\u627E\u4E0D\u5230\u670D\u52D9\u63D0\u4F9B\u8005: {0} error.release.value.notnumber=\u7248\u672C {0} \u7121\u6548 error.release.value.toosmall=\u7248\u672C {0} \u7121\u6548\uFF0C\u5FC5\u9808\u5927\u65BC\u7B49\u65BC 9 +error.release.unexpected.versioned.entry=\u7248\u672C {1} \u6709\u672A\u9810\u671F\u7684\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u9805\u76EE {0} error.validator.jarfile.exception=\u7121\u6CD5\u9A57\u8B49 {0}: {1} error.validator.jarfile.invalid=\u5DF2\u522A\u9664\u7121\u6548\u7684\u591A\u91CD\u7248\u672C jar \u6A94\u6848 {0} error.validator.bad.entry.name=\u9805\u76EE\u540D\u7A31 {0} \u7684\u683C\u5F0F\u932F\u8AA4 @@ -63,9 +67,9 @@ error.validator.new.public.class=\u9805\u76EE {0} \u542B\u6709\u5728\u57FA\u6E96 error.validator.incompatible.class.version=\u9805\u76EE {0} \u7684\u985E\u5225\u7248\u672C\u8207\u8F03\u820A\u7248\u672C\u4E0D\u76F8\u5BB9 error.validator.different.api=\u9805\u76EE {0} \u7684\u67D0\u500B\u985E\u5225\u542B\u6709\u8207\u8F03\u820A\u7248\u672C\u4E0D\u540C\u7684 API error.validator.names.mismatch=\u9805\u76EE {0} \u542B\u6709\u5167\u90E8\u540D\u7A31\u70BA {1} \u7684\u985E\u5225\uFF0C\u540D\u7A31\u4E0D\u76F8\u7B26 -warn.validator.identical.entry=\u8B66\u544A - \u9805\u76EE {0} \u7684\u67D0\u500B\u985E\u5225\u8207 jar \u4E2D\u7684\u73FE\u6709\u9805\u76EE\u76F8\u540C -warn.validator.resources.with.same.name=\u8B66\u544A - \u9805\u76EE {0} \u4E2D\u7684\u591A\u500B\u8CC7\u6E90\u540D\u7A31\u76F8\u540C -warn.validator.concealed.public.class=\u8B66\u544A - \u9805\u76EE {0} \u662F\u96B1\u85CF\u5957\u88DD\u7A0B\u5F0F\u4E2D\u7684\u516C\u7528\u985E\u5225, \n\u5C07\u6B64 jar \u653E\u5728\u985E\u5225\u8DEF\u5F91\u4E0A\u6703\u9020\u6210\u516C\u7528\u4ECB\u9762\u4E0D\u76F8\u5BB9 +warn.validator.identical.entry=\u8B66\u544A: \u9805\u76EE {0} \u7684\u67D0\u500B\u985E\u5225\n\u8207 jar \u4E2D\u7684\u73FE\u6709\u9805\u76EE\u76F8\u540C +warn.validator.resources.with.same.name=\u8B66\u544A: \u9805\u76EE {0} \u4E2D\u7684\u591A\u500B\u8CC7\u6E90\u540D\u7A31\u76F8\u540C +warn.validator.concealed.public.class=\u8B66\u544A: \u9805\u76EE {0} \u662F\u96B1\u85CF\u5957\u88DD\u7A0B\u5F0F\u4E2D\u7684\n\u516C\u7528\u985E\u5225\uFF0C\u82E5\u5C07\u6B64 jar \u653E\u5728\u985E\u5225\u8DEF\u5F91\u4E0A\n\u6703\u9020\u6210\u516C\u7528\u4ECB\u9762\u4E0D\u76F8\u5BB9 out.added.manifest=\u5DF2\u65B0\u589E\u8CC7\u8A0A\u6E05\u55AE out.added.module-info=\u5DF2\u65B0\u589E module-info: {0} out.update.manifest=\u5DF2\u66F4\u65B0\u8CC7\u8A0A\u6E05\u55AE @@ -102,9 +106,12 @@ main.help.opt.create.update.no-manifest=\ -M, --no-manifest \u4E0D\u70 main.help.opt.create.update.module-version=\ --module-version=VERSION \u5EFA\u7ACB\u6A21\u7D44\u5316 jar \u6216\u66F4\u65B0\u975E\u6A21\u7D44\u5316 jar \u6642\n \u4F7F\u7528\u7684\u6A21\u7D44\u7248\u672C main.help.opt.create.update.hash-modules=\ --hash-modules=PATTERN \u904B\u7B97\u53CA\u8A18\u9304\u8207\u6307\u5B9A\u6A23\u5F0F\n \u76F8\u7B26\u7684\u6A21\u7D44\u96DC\u6E4A\uFF0C\u9019\u76F4\u63A5\u6216\u9593\u63A5\u5730\n \u76F8\u4F9D\u65BC\u6B63\u5728\u5EFA\u7ACB\u7684\u6A21\u7D44\u5316 jar \u6216\u6B63\u5728\n \u66F4\u65B0\u7684\u975E\u6A21\u7D44\u5316 jar main.help.opt.create.update.module-path=\ -p, --module-path \u6A21\u7D44\u76F8\u4F9D\u6027\u7684\u4F4D\u7F6E\uFF0C\u7528\u65BC\u7522\u751F\n \u96DC\u6E4A +main.help.opt.create.update.do-not-resolve-by-default=\ --do-not-resolve-by-default \u4E0D\u5305\u62EC\u9810\u8A2D\u7684\u6A21\u7D44\u8A2D\u5B9A\u6839\u76EE\u9304 +main.help.opt.create.update.warn-if-resolved=\ --warn-if-resolved \u82E5\u6A21\u7D44\u5DF2\u89E3\u6790\uFF0C\u5247\u63D0\u793A\u5DE5\u5177\u4EE5\u767C\u51FA\u8B66\u544A\u3002\n deprecated\u3001deprecated-for-removal \u6216 incubating \n \u5176\u4E2D\u4E4B\u4E00 main.help.opt.create.update.index=\ \u53EA\u80FD\u5728\u5EFA\u7ACB\u3001\u66F4\u65B0\u53CA\u7522\u751F\u7D22\u5F15\u6A21\u5F0F\u4E0B\u4F7F\u7528\u7684\u4F5C\u696D\u4FEE\u98FE\u689D\u4EF6:\n main.help.opt.create.update.index.no-compress=\ -0, --no-compress \u50C5\u5132\u5B58; \u4E0D\u4F7F\u7528 ZIP \u58D3\u7E2E\u65B9\u5F0F main.help.opt.other=\ \u5176\u4ED6\u9078\u9805:\n main.help.opt.other.help=\ -?, --help[:compat] \u63D0\u4F9B\u6B64\u8AAA\u660E\u6216\u9078\u64C7\u6027\u986F\u793A\u76F8\u5BB9\u6027\u8AAA\u660E +main.help.opt.other.help-extra=\ --help-extra \u63D0\u4F9B\u984D\u5916\u9078\u9805\u7684\u8AAA\u660E main.help.opt.other.version=\ --version \u5217\u5370\u7A0B\u5F0F\u7248\u672C main.help.postopt=\ \u5982\u679C\u6A21\u7D44\u63CF\u8FF0\u5340 ('module-info.class') \u4F4D\u65BC\u6307\u5B9A\u76EE\u9304\u7684\u6839\n \u6216 jar \u5B58\u6A94\u672C\u8EAB\u7684\u6839\uFF0C\u5247\u5B58\u6A94\u6703\u662F\n \u6A21\u7D44\u5316\u7684 jar\u3002\u4E0B\u5217\u4F5C\u696D\u53EA\u80FD\u5728\u5EFA\u7ACB\u6A21\u7D44\u5316 jar \u6216\u66F4\u65B0\n \u73FE\u6709\u975E\u6A21\u7D44\u5316 jar \u6642\u9032\u884C: '--module-version'\u3001\n '--hash-modules' \u548C '--module-path'\u3002\n\n \u9577\u9078\u9805\u7684\u5F37\u5236\u6027\u6216\u9078\u64C7\u6027\u5F15\u6578\u4E5F\u6703\u662F\u4EFB\u4F55\u5C0D\u61C9\u77ED\u9078\u9805\u7684\n \u5F37\u5236\u6027\u6216\u9078\u64C7\u6027\u5F15\u6578\u3002 diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_ja.properties b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_ja.properties index 9553d315059..394d1571140 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_ja.properties +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,30 +23,35 @@ # questions. # -main.usage.summary=\u4F7F\u7528\u65B9\u6CD5: {0} --module-path --add-modules --output \n\u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30EA\u30B9\u30C8\u306B\u3064\u3044\u3066\u306F\u3001--help\u3092\u4F7F\u7528\u3057\u307E\u3059 +main.usage.summary=\u4F7F\u7528\u65B9\u6CD5: {0} --module-path --add-modules --output\n \u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30EA\u30B9\u30C8\u306B\u3064\u3044\u3066\u306F\u3001--help\u3092\u4F7F\u7528\u3057\u307E\u3059 -main.usage=\u4F7F\u7528\u65B9\u6CD5: {0} --module-path --add-modules --output \n\u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059: +main.usage=\u4F7F\u7528\u65B9\u6CD5: {0} --module-path --add-modules --output +\ \u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059: error.prefix=\u30A8\u30E9\u30FC: warn.prefix=\u8B66\u544A: -main.opt.help=\ -h\u3001--help \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3057\u307E\u3059 +main.opt.help=\ -h\u3001--help \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3057\u307E\u3059 -main.opt.version=\ --version \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831 +main.opt.version=\ --version \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831 -main.opt.module-path=\ -p \n --module-path \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9 +main.opt.module-path=\ -p, --module-path \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9 -main.opt.add-modules=\ --add-modules [,...] \u89E3\u6C7A\u3059\u308B\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB +main.opt.add-modules=\ --add-modules [,...] \u89E3\u6C7A\u3059\u308B\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB -main.opt.limit-modules=\ --limit-modules [,...] \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u9818\u57DF\u3092\u5236\u9650\u3057\u307E\u3059 +main.opt.limit-modules=\ --limit-modules [,...] \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u9818\u57DF\u3092\u5236\u9650\u3057\u307E\u3059 -main.opt.output=\ --output \u51FA\u529B\u30D1\u30B9\u306E\u5834\u6240 +main.opt.output=\ --output \u51FA\u529B\u30D1\u30B9\u306E\u5834\u6240 -main.command.files=\ @ \u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059 +main.opt.launcher=\ --launcher = \u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u8D77\u52D5\u30C4\u30FC\u30EB\u30FB\u30B3\u30DE\u30F3\u30C9\u540D\n --launcher =/
      \n \u30E2\u30B8\u30E5\u30FC\u30EB\u3068\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u306E\u8D77\u52D5\u30C4\u30FC\u30EB\u30FB\u30B3\u30DE\u30F3\u30C9\u540D -main.opt.endian=\ --endian \u751F\u6210\u3055\u308C\u305Fjimage (default:native)\u306E\u30D0\u30A4\u30C8\u9806 +main.command.files=\ @ \u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059 -main.opt.save-opts=\ --save-opts \u6307\u5B9A\u306E\u30D5\u30A1\u30A4\u30EB\u306Bjlink\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u4FDD\u5B58\u3057\u307E\u3059 +main.opt.endian=\ --endian \u751F\u6210\u3055\u308C\u305Fjimage\n (default:native)\u306E\u30D0\u30A4\u30C8\u9806 + +main.opt.save-opts=\ --save-opts \u6307\u5B9A\u306E\u30D5\u30A1\u30A4\u30EB\u306Bjlink\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u4FDD\u5B58\u3057\u307E\u3059 + +main.opt.ignore-signing-information=\ --ignore-signing-information \u7F72\u540D\u6E08\u30E2\u30B8\u30E5\u30E9JAR\u304C\u30A4\u30E1\u30FC\u30B8\u306B\u30EA\u30F3\u30AF\n \u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u81F4\u547D\u7684\u30A8\u30E9\u30FC\u3092\u6291\u6B62\n \u3057\u307E\u3059\u3002\u7F72\u540D\u6E08\u30E2\u30B8\u30E5\u30E9JAR\u306E\u7F72\u540D\u95A2\u9023\n \u30D5\u30A1\u30A4\u30EB\u306F\u3001\u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30A4\u30E1\u30FC\u30B8\u306B\u30B3\u30D4\u30FC\n \u3055\u308C\u307E\u305B\u3093\u3002 main.msg.bug=jlink\u3067\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3067\u91CD\u8907\u304C\u306A\u3044\u304B\u3092\u3054\u78BA\u8A8D\u306E\u3046\u3048\u3001Java Bug Database (http://bugreport.java.com/bugreport/)\u3067bug\u306E\u767B\u9332\u3092\u304A\u9858\u3044\u3044\u305F\u3057\u307E\u3059\u3002\u30EC\u30DD\u30FC\u30C8\u306B\u306F\u3001\u305D\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u3068\u6B21\u306E\u8A3A\u65AD\u5185\u5BB9\u3092\u542B\u3081\u3066\u304F\u3060\u3055\u3044\u3002\u3054\u5354\u529B\u3042\u308A\u304C\u3068\u3046\u3054\u3056\u3044\u307E\u3059\u3002 @@ -55,12 +60,15 @@ main.extended.help=\u4F7F\u7528\u53EF\u80FD\u306A\u30D7\u30E9\u30B0\u30A4\u30F3\ main.extended.help.footer=\u3092\u5FC5\u8981\u3068\u3059\u308B\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5834\u5408\u3001\u5024\u306F\u3001\u6B21\u306E\u5F62\u5F0F\u306E\u3044\u305A\u308C\u304B\u3092\u4F7F\u7528\u3059\u308B\u3001\u8981\u7D20\u306E\u30AB\u30F3\u30DE\u533A\u5207\u308A\u30EA\u30B9\u30C8\u306B\u306A\u308A\u307E\u3059:\n \n glob:\n regex:\n @ filename\u306F\u3001\u4F7F\u7528\u3059\u308B\u30D1\u30BF\u30FC\u30F3\u3092\u542B\u3080\u30D5\u30A1\u30A4\u30EB(1\u884C\u3054\u3068\u306B1\u30D1\u30BF\u30FC\u30F3)\u306E\u540D\u524D\u3067\u3059\n\n err.unknown.byte.order:\u4E0D\u660E\u306A\u30D0\u30A4\u30C8\u9806{0} +err.launcher.main.class.empty:\u8D77\u52D5\u30C4\u30FC\u30EB\u306E\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u540D\u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093: {0} +err.launcher.module.name.empty:\u8D77\u52D5\u30C4\u30FC\u30EB\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u540D\u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093: {0} +err.launcher.value.format:\u8D77\u52D5\u30C4\u30FC\u30EB\u306E\u5024\u306F=[/]\u306E\u5F62\u5F0F\u306B\u3057\u3066\u304F\u3060\u3055\u3044: {0} err.output.must.be.specified:--output\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 err.modulepath.must.be.specified:--module-path\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 err.mods.must.be.specified:{0}\u306B\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093 err.path.not.found=\u30D1\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0} err.path.not.valid=\u7121\u52B9\u306A\u30D1\u30B9: {0} -err.existing.image.must.exist=\u65E2\u5B58\u306E\u30A4\u30E1\u30FC\u30B8\u304C\u5B58\u5728\u3057\u306A\u3044\u304B\u3001\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u306F\u3042\u308A\u307E\u305B\u3093 +err.image.must.exist=\u30A4\u30E1\u30FC\u30B8{0}\u306F\u5B58\u5728\u3057\u306A\u3044\u304B\u3001\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u306F\u3042\u308A\u307E\u305B\u3093 err.existing.image.invalid=\u65E2\u5B58\u306E\u30A4\u30E1\u30FC\u30B8\u304C\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093 err.file.not.found=\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0} err.file.error=\u30D5\u30A1\u30A4\u30EB\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093: {0} @@ -76,5 +84,8 @@ err.option.unsupported={0}\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044 err.config.defaults=\u30D7\u30ED\u30D1\u30C6\u30A3{0}\u304C\u69CB\u6210\u306B\u3042\u308A\u307E\u305B\u3093 err.config.defaults.value=\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u5024\u304C\u9593\u9055\u3063\u3066\u3044\u307E\u3059: {0} err.bom.generation=bom\u30D5\u30A1\u30A4\u30EB\u306E\u751F\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0} +err.not.modular.format=\u9078\u629E\u3057\u305F\u30E2\u30B8\u30E5\u30FC\u30EB{0} ({1})\u304Cjmod\u307E\u305F\u306F\u30E2\u30B8\u30E5\u30E9JAR\u5F62\u5F0F\u3067\u306F\u3042\u308A\u307E\u305B\u3093 +err.signing=\u7F72\u540D\u6E08\u30E2\u30B8\u30E5\u30E9JAR {0}\u306F\u73FE\u5728\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u3001\u30A8\u30E9\u30FC\u3092\u6291\u6B62\u3059\u308B\u306B\u306F--ignore-signing-information\u3092\u4F7F\u7528\u3057\u307E\u3059 +warn.signing=\u8B66\u544A: \u7F72\u540D\u6E08\u30E2\u30B8\u30E5\u30E9JAR {0}\u306F\u73FE\u5728\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093 warn.invalid.arg=\u7121\u52B9\u306A\u30AF\u30E9\u30B9\u540D\u307E\u305F\u306F\u30D1\u30B9\u540D\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {0} warn.split.package=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306F{1} {2}\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059 diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_zh_CN.properties b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_zh_CN.properties index 9d6e83e8bf6..43f2dd4b154 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_zh_CN.properties +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,30 +23,35 @@ # questions. # -main.usage.summary=\u7528\u6CD5: {0} <\u9009\u9879> --module-path <\u6A21\u5757\u8DEF\u5F84> --add-modules <\u6A21\u5757> --output <\u8DEF\u5F84>\n\u4F7F\u7528 --help \u53EF\u5217\u51FA\u53EF\u80FD\u7684\u9009\u9879 +main.usage.summary=\u7528\u6CD5: {0} <\u9009\u9879> --module-path <\u6A21\u5757\u8DEF\u5F84> --add-modules <\u6A21\u5757> --output\n<\u8DEF\u5F84> \u4F7F\u7528 --help \u53EF\u5217\u51FA\u53EF\u80FD\u7684\u9009\u9879 -main.usage=\u7528\u6CD5: {0} <\u9009\u9879> --module-path <\u6A21\u5757\u8DEF\u5F84> --add-modules <\u6A21\u5757> --output <\u8DEF\u5F84>\n\u53EF\u80FD\u7684\u9009\u9879\u5305\u62EC: +main.usage=\u7528\u6CD5: {0} <\u9009\u9879> --module-path <\u6A21\u5757\u8DEF\u5F84> --add-modules <\u6A21\u5757> --output +\ \u53EF\u80FD\u7684\u9009\u9879\u5305\u62EC: error.prefix=\u9519\u8BEF: warn.prefix=\u8B66\u544A: -main.opt.help=\ -h, --help \u8F93\u51FA\u6B64\u5E2E\u52A9\u6D88\u606F +main.opt.help=\ -h, --help \u8F93\u51FA\u6B64\u5E2E\u52A9\u6D88\u606F -main.opt.version=\ --version \u7248\u672C\u4FE1\u606F +main.opt.version=\ --version \u7248\u672C\u4FE1\u606F -main.opt.module-path=\ -p <\u6A21\u5757\u8DEF\u5F84>\n --module-path <\u6A21\u5757\u8DEF\u5F84> \u6A21\u5757\u8DEF\u5F84 +main.opt.module-path=\ -p, --module-path <\u8DEF\u5F84> \u6A21\u5757\u8DEF\u5F84 -main.opt.add-modules=\ --add-modules <\u6A21\u5757>[,<\u6A21\u5757>...] \u8981\u89E3\u6790\u7684\u6839\u6A21\u5757 +main.opt.add-modules=\ --add-modules <\u6A21\u5757>[,<\u6A21\u5757>...] \u8981\u89E3\u6790\u7684\u6839\u6A21\u5757 -main.opt.limit-modules=\ --limit-modules <\u6A21\u5757>[,<\u6A21\u5757>...] \u9650\u5236\u53EF\u89C2\u5BDF\u6A21\u5757\u7684\u9886\u57DF +main.opt.limit-modules=\ --limit-modules <\u6A21\u5757>[,<\u6A21\u5757>...] \u9650\u5236\u53EF\u89C2\u5BDF\u6A21\u5757\u7684\u9886\u57DF -main.opt.output=\ --output \u8F93\u51FA\u8DEF\u5F84\u7684\u4F4D\u7F6E +main.opt.output=\ --output <\u8DEF\u5F84> \u8F93\u51FA\u8DEF\u5F84\u7684\u4F4D\u7F6E -main.command.files=\ @ \u4ECE\u6587\u4EF6\u4E2D\u8BFB\u53D6\u9009\u9879 +main.opt.launcher=\ --launcher <\u547D\u4EE4>=<\u6A21\u5757> \u6A21\u5757\u7684\u542F\u52A8\u7A0B\u5E8F\u547D\u4EE4\u540D\u79F0\n --launcher <\u547D\u4EE4>=<\u6A21\u5757>/<\u4E3B\u7C7B>\n \u6A21\u5757\u548C\u4E3B\u7C7B\u7684\u542F\u52A8\u7A0B\u5E8F\u547D\u4EE4\u540D\u79F0 -main.opt.endian=\ --endian \u6240\u751F\u6210 jimage \u7684\u5B57\u8282\u987A\u5E8F (\u9ED8\u8BA4\u503C: native) +main.command.files=\ @<\u6587\u4EF6\u540D> \u4ECE\u6587\u4EF6\u4E2D\u8BFB\u53D6\u9009\u9879 -main.opt.save-opts=\ --save-opts <\u6587\u4EF6\u540D> \u5C06 jlink \u9009\u9879\u4FDD\u5B58\u5728\u6307\u5B9A\u6587\u4EF6\u4E2D +main.opt.endian=\ --endian \u6240\u751F\u6210 jimage\n \u7684\u5B57\u8282\u987A\u5E8F (\u9ED8\u8BA4\u503C: native) + +main.opt.save-opts=\ --save-opts <\u6587\u4EF6\u540D> \u5C06 jlink \u9009\u9879\u4FDD\u5B58\u5728\u6307\u5B9A\u6587\u4EF6\u4E2D + +main.opt.ignore-signing-information=\ --ignore-signing-information \u5728\u6620\u50CF\u4E2D\u94FE\u63A5\u5DF2\u7B7E\u540D\u6A21\u5757\u5316\n JAR \u7684\u60C5\u51B5\u4E0B\u9690\u85CF\u81F4\u547D\u9519\u8BEF\u3002\n \u5DF2\u7B7E\u540D\u6A21\u5757\u5316 JAR \u7684\u7B7E\u540D\n \u76F8\u5173\u6587\u4EF6\u5C06\u4E0D\u4F1A\u590D\u5236\u5230\n \u8FD0\u884C\u65F6\u6620\u50CF\u3002 main.msg.bug=jlink \u4E2D\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF\u3002\u5982\u679C\u5728 Java Bug Database (http://bugreport.java.com/bugreport/) \u4E2D\u6CA1\u6709\u627E\u5230\u8BE5\u9519\u8BEF, \u8BF7\u5728\u8BE5\u6570\u636E\u5E93\u4E2D\u5EFA\u7ACB Bug\u3002\u8BF7\u5728\u62A5\u544A\u4E2D\u9644\u4E0A\u60A8\u7684\u7A0B\u5E8F\u548C\u4EE5\u4E0B\u8BCA\u65AD\u4FE1\u606F\u3002\u8C22\u8C22\u3002 @@ -55,12 +60,15 @@ main.extended.help=\u53EF\u7528\u63D2\u4EF6\u5217\u8868: main.extended.help.footer=\u5BF9\u4E8E\u9700\u8981 <\u6A21\u5F0F\u5217\u8868> \u7684\u9009\u9879, \u503C\u5C06\u4E3A\u9017\u53F7\u5206\u9694\u7684\u5143\u7D20\u5217\u8868, \u6BCF\u4E2A\u5143\u7D20\u4F7F\u7528\u4EE5\u4E0B\u683C\u5F0F\u4E4B\u4E00:\n \n glob:\n regex:<\u6B63\u5219\u8868\u8FBE\u5F0F\u6A21\u5F0F>\n @<\u6587\u4EF6\u540D>, \u5176\u4E2D\u201C\u6587\u4EF6\u540D\u201D\u662F\u5305\u542B\u8981\u4F7F\u7528\u7684\u6A21\u5F0F\u7684\u6587\u4EF6\u540D, \u6BCF\u884C\u4E00\u4E2A\u6A21\u5F0F\n\n err.unknown.byte.order:\u672A\u77E5\u7684\u5B57\u8282\u987A\u5E8F {0} +err.launcher.main.class.empty:\u542F\u52A8\u7A0B\u5E8F\u4E3B\u7C7B\u540D\u4E0D\u80FD\u4E3A\u7A7A: {0} +err.launcher.module.name.empty:\u542F\u52A8\u7A0B\u5E8F\u6A21\u5757\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A: {0} +err.launcher.value.format:\u542F\u52A8\u7A0B\u5E8F\u503C\u5E94\u4F7F\u7528\u201C<\u547D\u4EE4>=<\u6A21\u5757>[/<\u4E3B\u7C7B>]\u201D\u683C\u5F0F: {0} err.output.must.be.specified:\u5FC5\u987B\u6307\u5B9A --output err.modulepath.must.be.specified:\u5FC5\u987B\u6307\u5B9A --module-path err.mods.must.be.specified:\u6CA1\u6709\u5C06\u4EFB\u4F55\u6A21\u5757\u6307\u5B9A\u5230{0} err.path.not.found=\u627E\u4E0D\u5230\u8DEF\u5F84: {0} err.path.not.valid=\u65E0\u6548\u8DEF\u5F84: {0} -err.existing.image.must.exist=\u73B0\u6709\u6620\u50CF\u4E0D\u5B58\u5728\u6216\u8005\u4E0D\u662F\u76EE\u5F55 +err.image.must.exist=\u6620\u50CF {0} \u4E0D\u5B58\u5728\u6216\u8005\u4E0D\u662F\u76EE\u5F55 err.existing.image.invalid=\u73B0\u6709\u6620\u50CF\u65E0\u6548 err.file.not.found=\u627E\u4E0D\u5230\u6587\u4EF6: {0} err.file.error=\u65E0\u6CD5\u8BBF\u95EE\u6587\u4EF6: {0} @@ -76,5 +84,8 @@ err.option.unsupported=\u4E0D\u652F\u6301{0}: {1} err.config.defaults=\u914D\u7F6E\u4E2D\u7F3A\u5C11\u5C5E\u6027 {0} err.config.defaults.value=\u9ED8\u8BA4\u5C5E\u6027\u4E2D\u7684\u503C\u9519\u8BEF: {0} err.bom.generation=\u672A\u80FD\u751F\u6210 bom \u6587\u4EF6: {0} +err.not.modular.format=\u9009\u5B9A\u6A21\u5757 {0} ({1}) \u672A\u4F7F\u7528 jmod \u6216\u6A21\u5757\u5316 JAR \u683C\u5F0F +err.signing=\u5F53\u524D\u4E0D\u652F\u6301\u5DF2\u7B7E\u540D\u6A21\u5757\u5316 JAR {0}, \u4F7F\u7528 --ignore-signing-information \u53EF\u9690\u85CF\u9519\u8BEF +warn.signing=\u8B66\u544A: \u5F53\u524D\u4E0D\u652F\u6301\u5DF2\u7B7E\u540D\u6A21\u5757\u5316 JAR {0} warn.invalid.arg=\u7C7B\u540D\u65E0\u6548\u6216\u8DEF\u5F84\u540D\u4E0D\u5B58\u5728: {0} warn.split.package=\u5DF2\u5728{1} {2}\u4E2D\u5B9A\u4E49\u7A0B\u5E8F\u5305{0} diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_ja.properties b/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_ja.properties index 92dbda25557..16aa2e9c0d2 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_ja.properties +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,27 +23,31 @@ # questions. # -main.usage.summary=\u4F7F\u7528\u65B9\u6CD5: {0} (create|list|describe|hash) \n\u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30EA\u30B9\u30C8\u306B\u3064\u3044\u3066\u306F\u3001--help\u3092\u4F7F\u7528\u3057\u307E\u3059 +main.usage.summary=\u4F7F\u7528\u65B9\u6CD5: {0} (create|extract|list|describe|hash) \n\u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30EA\u30B9\u30C8\u306B\u3064\u3044\u3066\u306F\u3001--help\u3092\u4F7F\u7528\u3057\u307E\u3059 -main.usage=\u4F7F\u7528\u65B9\u6CD5: {0} (create|list|describe|hash) \n +main.usage=\u4F7F\u7528\u65B9\u6CD5: {0} (create|extract|list|describe|hash) \n error.prefix=\u30A8\u30E9\u30FC: warn.prefix=\u8B66\u544A: main.opt.mode=\u30E1\u30A4\u30F3\u64CD\u4F5C\u30E2\u30FC\u30C9: main.opt.mode.create=create - \u65B0\u898F\u306Ejmod\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u4F5C\u6210\u3057\u307E\u3059 +main.opt.mode.extract=extract - \u30A2\u30FC\u30AB\u30A4\u30D6\u304B\u3089\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u62BD\u51FA\u3057\u307E\u3059 main.opt.mode.list=list - \u3059\u3079\u3066\u306E\u30A8\u30F3\u30C8\u30EA\u306E\u540D\u524D\u3092\u51FA\u529B\u3057\u307E\u3059 main.opt.mode.describe=describe - \u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u8A73\u7D30\u3092\u51FA\u529B\u3057\u307E\u3059 main.opt.mode.hash=hash - \u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30CF\u30C3\u30B7\u30E5\u3092\u8A18\u9332\u3057\u307E\u3059\u3002 main.opt.help=\u3053\u306E\u4F7F\u7528\u65B9\u6CD5\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3057\u307E\u3059 +main.opt.help-extra=\u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30D8\u30EB\u30D7\u3092\u51FA\u529B\u3057\u307E\u3059 main.opt.version=\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831 main.opt.class-path=\u30AF\u30E9\u30B9\u3092\u542B\u3080\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3jar\u30D5\u30A1\u30A4\u30EB|\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA main.opt.libs=\u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u306E\u5834\u6240 main.opt.cmds=\u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30B3\u30DE\u30F3\u30C9\u306E\u5834\u6240 main.opt.config=\u30E6\u30FC\u30B6\u30FC\u304C\u7DE8\u96C6\u53EF\u80FD\u306A\u69CB\u6210\u30D5\u30A1\u30A4\u30EB\u306E\u5834\u6240 +main.opt.extractDir=\u62BD\u51FA\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA main.opt.dry-run=\u30CF\u30C3\u30B7\u30E5\u30FB\u30E2\u30FC\u30C9\u306E\u8A66\u9A13\u7684\u306A\u5B9F\u884C main.opt.exclude=\u5404\u8981\u7D20\u304C\u6B21\u306E\u5F62\u5F0F\u306E\u3044\u305A\u308C\u304B\u3092\u4F7F\u7528\u3059\u308B\u3001\u6307\u5B9A\u3055\u308C\u305F\u30AB\u30F3\u30DE\u533A\u5207\u308A\u30D1\u30BF\u30FC\u30F3\u30FB\u30EA\u30B9\u30C8\u306B\u4E00\u81F4\u3059\u308B\u30D5\u30A1\u30A4\u30EB\u3092\u9664\u5916\u3057\u307E\u3059: \u3001glob:\u307E\u305F\u306Fregex: main.opt.header-files=\u30D8\u30C3\u30C0\u30FC\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u5834\u6240 +main.opt.legal-notices=\u6CD5\u5F8B\u4E0A\u306E\u6CE8\u610F\u70B9\u306E\u5834\u6240 main.opt.module-version= \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3 main.opt.main-class=\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9 main.opt.main-class.arg=class-name @@ -56,13 +60,16 @@ main.opt.os-version=\u30AA\u30DA\u30EC\u30FC\u30C6\u30A3\u30F3\u30B0\u30FB\u30B7 main.opt.os-version.arg=os-version main.opt.module-path=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9 main.opt.hash-modules=\u6307\u5B9A\u306E\u306B\u4E00\u81F4\u3057\u3001\u76F4\u63A5\u307E\u305F\u306F\u9593\u63A5\u7684\u306B\u4F9D\u5B58\u3057\u3066\u3044\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u3067\u30D1\u30C3\u30B1\u30FC\u30B8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u7D50\u5408\u3059\u308B\u30CF\u30C3\u30B7\u30E5\u3092\u8A08\u7B97\u304A\u3088\u3073\u8A18\u9332\u3057\u307E\u3059\u3002\u30CF\u30C3\u30B7\u30E5\u306F\u3001\u4F5C\u6210\u3055\u308C\u3066\u3044\u308BJMOD\u30D5\u30A1\u30A4\u30EB\u3001jmod hash\u30B3\u30DE\u30F3\u30C9\u3067\u6307\u5B9A\u3057\u305F\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9\u306EJMOD\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30E2\u30B8\u30E5\u30E9JAR\u306B\u8A18\u9332\u3055\u308C\u307E\u3059\u3002 +main.opt.do-not-resolve-by-default=\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30EB\u30FC\u30C8\u8A2D\u5B9A\u304B\u3089\u9664\u5916\u3057\u307E\u3059 +main.opt.warn-if-resolved=\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u89E3\u6C7A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u306F\u3001\u8B66\u544A\u3092\u767A\u884C\u3059\u308B\u30C4\u30FC\u30EB\u306E\u30D2\u30F3\u30C8\u3002\u975E\u63A8\u5968\u3001\u524A\u9664\u4E88\u5B9A\u306E\u975E\u63A8\u5968\u307E\u305F\u306F\u5B9F\u9A13\u7684\u306E\u3044\u305A\u308C\u304B main.opt.cmdfile=\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059 module.hashes.recorded=\u30E2\u30B8\u30E5\u30FC\u30EB{0}\u306E\u30CF\u30C3\u30B7\u30E5\u304C\u8A18\u9332\u3055\u308C\u307E\u3059 -err.missing.mode=create\u3001list\u3001describe\u307E\u305F\u306Fhash\u306E\u3044\u305A\u308C\u304B\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 -err.invalid.mode=\u30E2\u30FC\u30C9\u306Fcreate\u3001list\u3001describe\u307E\u305F\u306Fhash\u306E\u3044\u305A\u308C\u304B\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: {0} +err.missing.mode=create\u3001extract\u3001list\u3001describe\u307E\u305F\u306Fhash\u306E\u3044\u305A\u308C\u304B\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +err.invalid.mode=\u30E2\u30FC\u30C9\u306Fcreate\u3001extract\u3001list\u3001describe\u307E\u305F\u306Fhash\u306E\u3044\u305A\u308C\u304B\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: {0} +err.cannot.create.dir=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA{0}\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093 err.classpath.must.be.specified=--class-path\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 err.jmod.must.be.specified=jmod-file\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 err.invalid.version=\u7121\u52B9\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3{0} @@ -77,11 +84,13 @@ err.invalid.class.path.entry=\u7121\u52B9\u306A\u30AF\u30E9\u30B9\u30FB\u30D1\u3 err.file.already.exists=\u30D5\u30A1\u30A4\u30EB\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059: {0} err.jmod.not.found=jmod\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0} err.bad.pattern=\u4E0D\u6B63\u30D1\u30BF\u30FC\u30F3{0} +err.bad.WarnIfResolvedReason=\u4E0D\u6B63\u306A\u7406\u7531: {0}\u3001\u975E\u63A8\u5968\u3001\u524A\u9664\u4E88\u5B9A\u306E\u975E\u63A8\u5968\u307E\u305F\u306F\u5B9F\u9A13\u7684\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 err.unknown.option=\u4E0D\u660E\u306A\u30AA\u30D7\u30B7\u30E7\u30F3: {0} err.missing.arg={0}\u306B\u5024\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093 err.internal.error=\u5185\u90E8\u30A8\u30E9\u30FC: {0} {1} {2} err.invalid.dryrun.option=--dry-run\u306F\u30CF\u30C3\u30B7\u30E5\u30FB\u30E2\u30FC\u30C9\u3068\u4E00\u7DD2\u306B\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059 err.module.descriptor.not.found=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 +err.missing.export.or.open.packages={0}\u306B\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3055\u308C\u305F\u304B\u305D\u3053\u3067\u30AA\u30FC\u30D7\u30F3\u3055\u308C\u3066\u3044\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {1} warn.invalid.arg=\u7121\u52B9\u306A\u30AF\u30E9\u30B9\u540D\u307E\u305F\u306F\u30D1\u30B9\u540D\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {0} warn.no.module.hashes=\u30CF\u30C3\u30B7\u30E5\u304C\u8A18\u9332\u3055\u308C\u3066\u3044\u307E\u305B\u3093: {0}\u306B\u4F9D\u5B58\u3059\u308B\u30CF\u30C3\u30B7\u30E5\u306B\u5BFE\u3057\u3066\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093 warn.module.resolution.fail=\u30CF\u30C3\u30B7\u30E5\u304C\u8A18\u9332\u3055\u308C\u3066\u3044\u307E\u305B\u3093: {0} diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_zh_CN.properties b/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_zh_CN.properties index 5ac12c88414..efa1934e09f 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_zh_CN.properties +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,27 +23,31 @@ # questions. # -main.usage.summary=\u7528\u6CD5: {0} (create|list|describe|hash) <\u9009\u9879> \n\u4F7F\u7528 --help \u5217\u51FA\u53EF\u80FD\u7684\u9009\u9879 +main.usage.summary=\u7528\u6CD5: {0} (create|extract|list|describe|hash) <\u9009\u9879> \n\u4F7F\u7528 --help \u5217\u51FA\u53EF\u80FD\u7684\u9009\u9879 -main.usage=\u7528\u6CD5: {0} (create|list|describe|hash) <\u9009\u9879> \n +main.usage=\u7528\u6CD5: {0} (create|extract|list|describe|hash) <\u9009\u9879> \n error.prefix=\u9519\u8BEF: warn.prefix=\u8B66\u544A: main.opt.mode=\u4E3B\u64CD\u4F5C\u6A21\u5F0F: main.opt.mode.create=create - \u521B\u5EFA\u65B0\u7684 jmod \u6863\u6848 +main.opt.mode.extract=extract - \u4ECE\u6863\u6848\u4E2D\u63D0\u53D6\u6240\u6709\u6587\u4EF6 main.opt.mode.list=list - \u8F93\u51FA\u6240\u6709\u6761\u76EE\u7684\u540D\u79F0 main.opt.mode.describe=describe - \u8F93\u51FA\u6A21\u5757\u8BE6\u7EC6\u4FE1\u606F main.opt.mode.hash=hash - \u8BB0\u5F55\u7ED1\u5B9A\u6A21\u5757\u7684\u6563\u5217\u3002 main.opt.help=\u8F93\u51FA\u6B64\u7528\u6CD5\u6D88\u606F +main.opt.help-extra=\u8F93\u51FA\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9 main.opt.version=\u7248\u672C\u4FE1\u606F main.opt.class-path=\u5305\u542B\u7C7B\u7684\u5E94\u7528\u7A0B\u5E8F jar \u6587\u4EF6|\u76EE\u5F55 main.opt.libs=\u672C\u673A\u5E93\u7684\u4F4D\u7F6E main.opt.cmds=\u672C\u673A\u547D\u4EE4\u7684\u4F4D\u7F6E main.opt.config=\u7528\u6237\u53EF\u7F16\u8F91\u914D\u7F6E\u6587\u4EF6\u7684\u4F4D\u7F6E +main.opt.extractDir=\u63D0\u53D6\u64CD\u4F5C\u7684\u76EE\u6807\u76EE\u5F55 main.opt.dry-run=\u6563\u5217\u6A21\u5F0F\u7684\u6A21\u62DF\u8FD0\u884C main.opt.exclude=\u6392\u9664\u4E0E\u6240\u63D0\u4F9B\u9017\u53F7\u5206\u9694\u7684\u6A21\u5F0F\u5217\u8868\u5339\u914D\u7684\u6587\u4EF6, \u6BCF\u4E2A\u5143\u7D20\u4F7F\u7528\u4EE5\u4E0B\u683C\u5F0F\u4E4B\u4E00: , glob: \u6216 regex:<\u6B63\u5219\u8868\u8FBE\u5F0F\u6A21\u5F0F> main.opt.header-files=\u6807\u5934\u6587\u4EF6\u7684\u4F4D\u7F6E +main.opt.legal-notices=\u6CD5\u5F8B\u58F0\u660E\u4F4D\u7F6E main.opt.module-version= \u6A21\u5757\u7248\u672C main.opt.main-class=\u4E3B\u7C7B main.opt.main-class.arg=class-name @@ -56,13 +60,16 @@ main.opt.os-version=\u64CD\u4F5C\u7CFB\u7EDF\u7248\u672C main.opt.os-version.arg=os-version main.opt.module-path=\u6A21\u5757\u8DEF\u5F84 main.opt.hash-modules=\u8BA1\u7B97\u548C\u8BB0\u5F55\u6563\u5217, \u4EE5\u5C06\u6253\u5305\u6A21\u5757\u7ED1\u5B9A\u5230\u4E0E\u6307\u5B9A <\u6B63\u5219\u8868\u8FBE\u5F0F\u6A21\u5F0F> \u5339\u914D\u5E76\u76F4\u63A5\u6216\u95F4\u63A5\u4F9D\u8D56\u4E8E\u7684\u6A21\u5757\u3002\u6563\u5217\u8BB0\u5F55\u5728\u6240\u521B\u5EFA\u7684 JMOD \u6587\u4EF6\u4E2D, \u6216\u8005\u8BB0\u5F55\u5728 jmod hash \u547D\u4EE4\u6307\u5B9A\u7684\u6A21\u5757\u8DEF\u5F84\u7684 JMOD \u6587\u4EF6\u6216\u6A21\u5757\u5316 JAR \u4E2D\u3002 +main.opt.do-not-resolve-by-default=\u4ECE\u9ED8\u8BA4\u6839\u6A21\u5757\u96C6\u4E2D\u6392\u9664 +main.opt.warn-if-resolved=\u63D0\u793A\u5DE5\u5177\u5728\u89E3\u6790\u6A21\u5757\u540E\u53D1\u51FA\u8B66\u544A\u3002\u53EF\u4EE5\u4E3A deprecated, deprecated-for-removal \u6216 incubating \u4E4B\u4E00 main.opt.cmdfile=\u4ECE\u6307\u5B9A\u6587\u4EF6\u8BFB\u53D6\u9009\u9879 module.hashes.recorded=\u6563\u5217\u8BB0\u5F55\u5728\u6A21\u5757 {0} \u4E2D -err.missing.mode=\u5FC5\u987B\u6307\u5B9A\u521B\u5EFA, \u5217\u51FA, \u63CF\u8FF0\u6216\u6563\u5217\u4E4B\u4E00 -err.invalid.mode=\u6A21\u5F0F\u5FC5\u987B\u4E3A\u521B\u5EFA, \u5217\u51FA, \u63CF\u8FF0\u6216\u6563\u5217\u4E4B\u4E00: {0} +err.missing.mode=\u5FC5\u987B\u6307\u5B9A\u521B\u5EFA, \u63D0\u53D6, \u5217\u51FA, \u63CF\u8FF0\u6216\u6563\u5217\u4E4B\u4E00 +err.invalid.mode=\u6A21\u5F0F\u5FC5\u987B\u4E3A\u521B\u5EFA, \u63D0\u53D6, \u5217\u51FA, \u63CF\u8FF0\u6216\u6563\u5217\u4E4B\u4E00: {0} +err.cannot.create.dir=\u65E0\u6CD5\u521B\u5EFA\u76EE\u5F55 {0} err.classpath.must.be.specified=\u5FC5\u987B\u6307\u5B9A --class-path err.jmod.must.be.specified=\u5FC5\u987B\u6307\u5B9A jmod-file err.invalid.version=\u65E0\u6548\u7684\u6A21\u5757\u7248\u672C {0} @@ -77,11 +84,13 @@ err.invalid.class.path.entry=\u65E0\u6548\u7684\u7C7B\u8DEF\u5F84\u6761\u76EE: { err.file.already.exists=\u6587\u4EF6\u5DF2\u5B58\u5728: {0} err.jmod.not.found=\u627E\u4E0D\u5230 jmod \u6587\u4EF6: {0} err.bad.pattern=\u9519\u8BEF\u7684\u6A21\u5F0F {0} +err.bad.WarnIfResolvedReason=\u9519\u8BEF\u7684\u539F\u56E0: {0}, \u5FC5\u987B\u4E3A deprecated, deprecated-for-removal \u6216 incubating \u4E4B\u4E00 err.unknown.option=\u672A\u77E5\u9009\u9879: {0} err.missing.arg=\u6CA1\u6709\u4E3A{0}\u6307\u5B9A\u503C err.internal.error=\u5185\u90E8\u9519\u8BEF: {0} {1} {2} err.invalid.dryrun.option=--dry-run \u53EA\u80FD\u7528\u4E8E\u6563\u5217\u6A21\u5F0F err.module.descriptor.not.found=\u627E\u4E0D\u5230\u6A21\u5757\u63CF\u8FF0\u7B26 +err.missing.export.or.open.packages=\u5728 {0} \u4E2D\u5BFC\u51FA\u6216\u6253\u5F00\u7684\u7A0B\u5E8F\u5305\u4E0D\u5B58\u5728: {1} warn.invalid.arg=\u7C7B\u540D\u65E0\u6548\u6216\u8DEF\u5F84\u540D\u4E0D\u5B58\u5728: {0} warn.no.module.hashes=\u672A\u8BB0\u5F55\u4EFB\u4F55\u6563\u5217: \u6CA1\u6709\u4E3A\u4F9D\u8D56\u4E8E {0} \u7684\u6563\u5217\u5904\u7406\u6307\u5B9A\u6A21\u5757 warn.module.resolution.fail=\u672A\u8BB0\u5F55\u4EFB\u4F55\u6563\u5217: {0} From 3bc6b3808b91ca80bef5e0143f795437e4c0119c Mon Sep 17 00:00:00 2001 From: Li Jiang Date: Tue, 21 Feb 2017 06:02:37 -0800 Subject: [PATCH 278/447] 8172956: JDK9 message drop 30 l10n resource file updates - open Reviewed-by: joehw, mchung, smarks, sherman, henryjen --- .../doclint/resources/doclint_ja.properties | 5 +- .../resources/doclint_zh_CN.properties | 5 +- .../javac/resources/compiler_ja.properties | 137 +++++++++++++++--- .../javac/resources/compiler_zh_CN.properties | 137 +++++++++++++++--- .../tools/javac/resources/javac_ja.properties | 15 +- .../javac/resources/javac_zh_CN.properties | 15 +- .../javadoc/resources/javadoc_ja.properties | 3 +- .../resources/javadoc_zh_CN.properties | 3 +- .../html/resources/standard_ja.properties | 6 + .../html/resources/standard_zh_CN.properties | 6 + .../toolkit/resources/doclets_ja.properties | 8 + .../resources/doclets_zh_CN.properties | 8 + .../tool/resources/javadoc_ja.properties | 4 +- .../tool/resources/javadoc_zh_CN.properties | 4 +- .../tools/javap/resources/javap_ja.properties | 2 +- .../javap/resources/javap_zh_CN.properties | 2 +- .../resources/jdeprscan_ja.properties | 29 ++++ .../resources/jdeprscan_zh_CN.properties | 29 ++++ .../tools/jdeps/resources/jdeps_ja.properties | 21 ++- .../jdeps/resources/jdeps_zh_CN.properties | 21 ++- .../jshell/tool/resources/l10n_ja.properties | 40 +++-- .../tool/resources/l10n_zh_CN.properties | 42 ++++-- 22 files changed, 439 insertions(+), 103 deletions(-) create mode 100644 langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/resources/jdeprscan_ja.properties create mode 100644 langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/resources/jdeprscan_zh_CN.properties diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/resources/doclint_ja.properties b/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/resources/doclint_ja.properties index c419bccb679..2b8d95110dc 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/resources/doclint_ja.properties +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/resources/doclint_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -41,8 +41,10 @@ dc.entity.invalid = \u7121\u52B9\u306A\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3&{0}; dc.exception.not.thrown = \u4F8B\u5916\u304C\u30B9\u30ED\u30FC\u3055\u308C\u3066\u3044\u307E\u305B\u3093: {0} dc.invalid.anchor = \u30A2\u30F3\u30AB\u30FC\u306E\u540D\u524D\u304C\u7121\u52B9\u3067\u3059: "{0}" dc.invalid.param = \u7121\u52B9\u306A@param\u306E\u4F7F\u7528 +dc.invalid.provides = \u7121\u52B9\u306A@provides\u306E\u4F7F\u7528 dc.invalid.return = \u7121\u52B9\u306A@return\u306E\u4F7F\u7528 dc.invalid.throws = \u7121\u52B9\u306A@throws\u306E\u4F7F\u7528 +dc.invalid.uses = \u7121\u52B9\u306A@uses\u306E\u4F7F\u7528 dc.invalid.uri = \u7121\u52B9\u306AURI: "{0}" dc.missing.comment = \u30B3\u30E1\u30F3\u30C8\u306A\u3057 dc.missing.param = {0}\u306E@param\u304C\u3042\u308A\u307E\u305B\u3093 @@ -52,6 +54,7 @@ dc.no.alt.attr.for.image = \u30A4\u30E1\u30FC\u30B8\u306E"alt"\u5C5E\u6027\u304C dc.no.summary.or.caption.for.table=\u8868\u306E\u8981\u7D04\u307E\u305F\u306F\u30AD\u30E3\u30D7\u30B7\u30E7\u30F3\u304C\u3042\u308A\u307E\u305B\u3093 dc.param.name.not.found = @param name\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 dc.ref.not.found = \u53C2\u7167\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 +dc.service.not.found = \u30B5\u30FC\u30D3\u30B9\u30FB\u30BF\u30A4\u30D7\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 dc.tag.code.within.code = \u5185\u306E'{@code'} dc.tag.empty = \u7A7A\u306E<{0}>\u30BF\u30B0 dc.tag.end.not.permitted = \u7121\u52B9\u306A\u7D42\u4E86\u30BF\u30B0: diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/resources/doclint_zh_CN.properties b/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/resources/doclint_zh_CN.properties index 6455601c28c..7461081b687 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/resources/doclint_zh_CN.properties +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/resources/doclint_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -41,8 +41,10 @@ dc.entity.invalid = \u5B9E\u4F53 &{0}; \u65E0\u6548 dc.exception.not.thrown = \u672A\u629B\u51FA\u5F02\u5E38\u9519\u8BEF: {0} dc.invalid.anchor = \u951A\u5B9A\u70B9\u7684\u540D\u79F0\u65E0\u6548: "{0}" dc.invalid.param = @param \u7684\u7528\u6CD5\u65E0\u6548 +dc.invalid.provides = @provides \u7684\u7528\u6CD5\u65E0\u6548 dc.invalid.return = @return \u7684\u7528\u6CD5\u65E0\u6548 dc.invalid.throws = @throws \u7684\u7528\u6CD5\u65E0\u6548 +dc.invalid.uses = @uses \u7684\u7528\u6CD5\u65E0\u6548 dc.invalid.uri = URI \u65E0\u6548: "{0}" dc.missing.comment = \u6CA1\u6709\u6CE8\u91CA dc.missing.param = {0}\u6CA1\u6709 @param @@ -52,6 +54,7 @@ dc.no.alt.attr.for.image = \u56FE\u50CF\u6CA1\u6709 "alt" \u5C5E\u6027 dc.no.summary.or.caption.for.table=\u8868\u6CA1\u6709\u6982\u8981\u6216\u6807\u9898 dc.param.name.not.found = @param name \u672A\u627E\u5230 dc.ref.not.found = \u627E\u4E0D\u5230\u5F15\u7528 +dc.service.not.found = \u627E\u4E0D\u5230\u670D\u52A1\u7C7B\u578B dc.tag.code.within.code = '{@code'} \u5728 \u4E2D dc.tag.empty = <{0}> \u6807\u8BB0\u4E3A\u7A7A dc.tag.end.not.permitted = \u65E0\u6548\u7684\u7ED3\u675F\u6807\u8BB0: diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_ja.properties b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_ja.properties index 1f5663db1d8..338cf876045 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_ja.properties +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -593,14 +593,66 @@ compiler.err.no.match.entry={0}\u306F{1}\u306E\u30A8\u30F3\u30C8\u30EA\u306B\u90 compiler.err.not.annotation.type={0}\u306F\u6CE8\u91C8\u578B\u3067\u306F\u3042\u308A\u307E\u305B\u3093 +# 0: symbol, 1: symbol, 2: message segment +compiler.err.not.def.access.package.cant.access={0} \u306F\u8868\u793A\u4E0D\u53EF\u3067\u3059\n({2}) + +# 0: symbol, 1: symbol, 2: message segment +compiler.misc.not.def.access.package.cant.access={0} \u306F\u8868\u793A\u4E0D\u53EF\u3067\u3059\n({2}) + +# 0: symbol, 1: message segment +compiler.err.package.not.visible=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306F\u8868\u793A\u4E0D\u53EF\u3067\u3059\n({1}) + +# 0: symbol, 1: message segment +compiler.misc.package.not.visible=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306F\u8868\u793A\u4E0D\u53EF\u3067\u3059\n({1}) + +# {0} - current module +# {1} - package in which the invisible class is declared +# {2} - module in which {1} is declared +# 0: symbol, 1: symbol, 2: symbol +compiler.misc.not.def.access.does.not.read=\u30D1\u30C3\u30B1\u30FC\u30B8{1}\u306F\u30E2\u30B8\u30E5\u30FC\u30EB{2}\u3067\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u30E2\u30B8\u30E5\u30FC\u30EB{0}\u306B\u8AAD\u307F\u8FBC\u307E\u308C\u3066\u3044\u307E\u305B\u3093 + +# {0} - package in which the invisible class is declared +# {1} - module in which {0} is declared # 0: symbol, 1: symbol -compiler.err.not.def.access.package.cant.access=\u30D1\u30C3\u30B1\u30FC\u30B8{1}\u304C\u53EF\u8996\u3067\u306F\u306A\u3044\u305F\u3081\u3001{0}\u306F\u53EF\u8996\u3067\u306F\u3042\u308A\u307E\u305B\u3093 +compiler.misc.not.def.access.does.not.read.from.unnamed=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306F\u30E2\u30B8\u30E5\u30FC\u30EB{1}\u3067\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30B0\u30E9\u30D5\u306B\u3042\u308A\u307E\u305B\u3093 + +# {0} - package in which the invisible class is declared +# {1} - current module +# 0: symbol, 1: symbol +compiler.misc.not.def.access.does.not.read.unnamed=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306F\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u3067\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u30E2\u30B8\u30E5\u30FC\u30EB{0}\u306B\u8AAD\u307F\u8FBC\u307E\u308C\u3066\u3044\u307E\u305B\u3093 + +# {0} - package in which the invisible class is declared +# {1} - module in which {0} is declared +# 0: symbol, 1: symbol +compiler.misc.not.def.access.not.exported=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306F\u30E2\u30B8\u30E5\u30FC\u30EB{1}\u3067\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093 + +# {0} - package in which the invisible class is declared +# {1} - module in which {0} is declared +# 0: symbol, 1: symbol +compiler.misc.not.def.access.not.exported.from.unnamed=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306F\u30E2\u30B8\u30E5\u30FC\u30EB{1}\u3067\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093 + +# {0} - package in which the invisible class is declared +# {1} - module in which {0} is declared +# {2} - current module +# 0: symbol, 1: symbol, 2: symbol +compiler.misc.not.def.access.not.exported.to.module=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306F\u30E2\u30B8\u30E5\u30FC\u30EB{1}\u3067\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u30E2\u30B8\u30E5\u30FC\u30EB{2}\u306B\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093 + +# {0} - package in which the invisible class is declared +# {1} - module in which {0} is declared +# 0: symbol, 1: symbol +compiler.misc.not.def.access.not.exported.to.module.from.unnamed=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306F\u30E2\u30B8\u30E5\u30FC\u30EB{1}\u3067\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093 # 0: symbol, 1: symbol -compiler.err.not.def.access.class.intf.cant.access={1}\u306E{0}\u304C\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u306A\u3044\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059 +compiler.err.not.def.access.class.intf.cant.access={1}.{0}\u306F\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u306A\u3044\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059 # 0: symbol, 1: symbol -compiler.misc.not.def.access.class.intf.cant.access={1}\u306E{0}\u304C\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u306A\u3044\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059 +compiler.misc.not.def.access.class.intf.cant.access={1}.{0}\u306F\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u306A\u3044\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059 + +# 0: symbol, 1: symbol, 2: symbol, 3: message segment +compiler.err.not.def.access.class.intf.cant.access.reason=\u30D1\u30C3\u30B1\u30FC\u30B8{2}\u306E{1}.{0}\u306B\u306F\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\n({3}) + +# 0: symbol, 1: symbol, 2: symbol, 3: message segment +compiler.misc.not.def.access.class.intf.cant.access.reason=\u30D1\u30C3\u30B1\u30FC\u30B8{2}\u306E{1}.{0}\u306B\u306F\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\n({3}) # 0: symbol, 1: list of type, 2: type compiler.misc.cant.access.inner.cls.constr=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF{0}({1})\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\n\u5185\u90E8\u30AF\u30E9\u30B9\u3092\u56F2\u3080\u578B{2}\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u304C\u30B9\u30B3\u30FC\u30D7\u5185\u306B\u3042\u308A\u307E\u305B\u3093 @@ -627,6 +679,8 @@ compiler.err.operator.cant.be.applied.1=\u4E8C\u9805\u6F14\u7B97\u5B50''{0}''\u3 compiler.err.pkg.annotations.sb.in.package-info.java=\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u6CE8\u91C8\u306F\u30D5\u30A1\u30A4\u30EBpackage-info.java\u5185\u306B\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +compiler.err.no.pkg.in.module-info.java=package\u53E5\u304C\u30D5\u30A1\u30A4\u30EBmodule-info.java\u306B\u3042\u3063\u3066\u306F\u306A\u308A\u307E\u305B\u3093 + # 0: symbol compiler.err.pkg.clashes.with.class.of.same.name=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306F\u540C\u540D\u306E\u30AF\u30E9\u30B9\u3068\u7AF6\u5408\u3057\u3066\u3044\u307E\u3059 @@ -1048,12 +1102,21 @@ compiler.warn.dir.path.element.not.directory=\u4E0D\u6B63\u306A\u30D1\u30B9\u898 compiler.warn.finally.cannot.complete=finally\u7BC0\u304C\u6B63\u5E38\u306B\u5B8C\u4E86\u3067\u304D\u307E\u305B\u3093 +# 0: name +compiler.warn.poor.choice.for.module.name=\u30E2\u30B8\u30E5\u30FC\u30EB\u540D{0}\u306E\u672B\u5C3E\u306F\u6570\u5B57\u306B\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044 + # 0: symbol, 1: symbol compiler.warn.has.been.deprecated={1}\u306E{0}\u306F\u63A8\u5968\u3055\u308C\u307E\u305B\u3093 # 0: symbol, 1: symbol compiler.warn.has.been.deprecated.for.removal={1}\u306E{0}\u306F\u63A8\u5968\u3055\u308C\u3066\u304A\u3089\u305A\u3001\u524A\u9664\u7528\u306B\u30DE\u30FC\u30AF\u3055\u308C\u3066\u3044\u307E\u3059 +# 0: symbol +compiler.warn.has.been.deprecated.module=\u30E2\u30B8\u30E5\u30FC\u30EB{0}\u306F\u63A8\u5968\u3055\u308C\u307E\u305B\u3093 + +# 0: symbol +compiler.warn.has.been.deprecated.for.removal.module=\u30E2\u30B8\u30E5\u30FC\u30EB{0}\u306F\u63A8\u5968\u3055\u308C\u3066\u304A\u3089\u305A\u3001\u524A\u9664\u7528\u306B\u30DE\u30FC\u30AF\u3055\u308C\u3066\u3044\u307E\u3059 + # 0: symbol compiler.warn.sun.proprietary={0}\u306F\u5185\u90E8\u6240\u6709\u306EAPI\u3067\u3042\u308A\u3001\u4ECA\u5F8C\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059 @@ -1210,6 +1273,8 @@ compiler.warn.missing.deprecated.annotation=\u63A8\u5968\u3055\u308C\u306A\u3044 # 0: symbol kind compiler.warn.deprecated.annotation.has.no.effect=@Deprecated\u6CE8\u91C8\u306F\u3001\u3053\u306E{0}\u5BA3\u8A00\u306B\u306F\u5F71\u97FF\u3057\u307E\u305B\u3093 +compiler.warn.invalid.path=\u30D5\u30A1\u30A4\u30EB\u540D\u304C\u7121\u52B9\u3067\u3059: {0} + compiler.warn.invalid.archive.file=\u30D1\u30B9\u4E0A\u306E\u4E88\u671F\u3057\u306A\u3044\u30D5\u30A1\u30A4\u30EB: {0} compiler.warn.unexpected.archive.file=\u30A2\u30FC\u30AB\u30A4\u30D6\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u4E88\u671F\u3057\u306A\u3044\u62E1\u5F35\u5B50: {0} @@ -1293,6 +1358,8 @@ compiler.err.expected3={0}\u3001{1}\u307E\u305F\u306F{2}\u304C\u3042\u308A\u307E compiler.err.premature.eof=\u69CB\u6587\u89E3\u6790\u4E2D\u306B\u30D5\u30A1\u30A4\u30EB\u306E\u7D42\u308F\u308A\u306B\u79FB\u308A\u307E\u3057\u305F ## The following are related in form, but do not easily fit the above paradigm. +compiler.err.expected.module=''\u30E2\u30B8\u30E5\u30FC\u30EB''\u304C\u5FC5\u8981\u3067\u3059 + compiler.err.dot.class.expected=''.class''\u304C\u3042\u308A\u307E\u305B\u3093 ## The argument to this string will always be either 'case' or 'default'. @@ -1358,6 +1425,12 @@ compiler.misc.module.info.invalid.super.class=\u7121\u52B9\u306A\u30B9\u30FC\u30 compiler.misc.class.file.not.found={0}\u306E\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 +# 0: string (constant value), 1: symbol (constant field), 2: type (field type) +compiler.misc.bad.constant.range={1}\u306E\u5B9A\u6570\u5024''{0}''\u306F{2}\u306E\u60F3\u5B9A\u7BC4\u56F2\u5916\u3067\u3059 + +# 0: string (constant value), 1: symbol (constant field), 2: string (expected class) +compiler.misc.bad.constant.value={1}\u306E\u5B9A\u6570\u5024''{0}''\u306F\u4E0D\u6B63\u3067\u3059\u3002{2}\u304C\u5FC5\u8981\u3067\u3059 + # 0: string (classfile major version), 1: string (classfile minor version) compiler.misc.invalid.default.interface=\u30D0\u30FC\u30B8\u30E7\u30F3{0}.{1}\u306E\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306B\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30E1\u30BD\u30C3\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F @@ -1518,6 +1591,9 @@ compiler.misc.explicit.param.do.not.conform.to.bounds=\u660E\u793A\u7684\u306A\u compiler.misc.arg.length.mismatch=\u5B9F\u5F15\u6570\u30EA\u30B9\u30C8\u3068\u4EEE\u5F15\u6570\u30EA\u30B9\u30C8\u306E\u9577\u3055\u304C\u7570\u306A\u308A\u307E\u3059 +# 0: string +compiler.misc.wrong.number.type.args=\u578B\u5F15\u6570\u306E\u6570\u304C\u4E0D\u6B63\u3067\u3059\u3002{0}\u500B\u5FC5\u8981\u3067\u3059 + # 0: message segment compiler.misc.no.conforming.assignment.exists=\u5F15\u6570\u306E\u4E0D\u4E00\u81F4: {0} @@ -1785,7 +1861,7 @@ compiler.err.method.references.not.supported.in.source=\u30E1\u30BD\u30C3\u30C9\ compiler.err.default.methods.not.supported.in.source=\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30E1\u30BD\u30C3\u30C9\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044) # 0: string -compiler.err.intersection.types.in.cast.not.supported.in.source=\u30AD\u30E3\u30B9\u30C8\u5185\u306Eintersection\u578B\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044) +compiler.err.intersection.types.in.cast.not.supported.in.source=\u30AD\u30E3\u30B9\u30C8\u5185\u306Eintersection\u578B\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u30AD\u30E3\u30B9\u30C8\u5185\u306Eintersection\u578B\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044) # 0: string compiler.err.static.intf.methods.not.supported.in.source=static\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(static\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044) @@ -1932,6 +2008,9 @@ compiler.err.expected.module=''\u30E2\u30B8\u30E5\u30FC\u30EB''\u304C\u5FC5\u898 # 0: symbol compiler.err.module.not.found=\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0} +# 0: symbol +compiler.warn.module.not.found=\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0} + compiler.err.too.many.modules=\u691C\u51FA\u3055\u308C\u305F\u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u304C\u591A\u3059\u304E\u307E\u3059 # 0: symbol @@ -1941,7 +2020,18 @@ compiler.err.duplicate.module=\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u91CD\u8907\u compiler.err.duplicate.requires=\u5FC5\u9808\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059: {0} # 0: symbol -compiler.err.duplicate.exports=\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059: {0} +compiler.err.conflicting.exports=\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u304C\u91CD\u8907\u307E\u305F\u306F\u7AF6\u5408\u3057\u3066\u3044\u307E\u3059: {0} + +# 0: symbol +compiler.err.conflicting.opens=\u30AA\u30FC\u30D7\u30F3\u304C\u91CD\u8907\u307E\u305F\u306F\u7AF6\u5408\u3057\u3066\u3044\u307E\u3059: {0} + +# 0: symbol +compiler.err.conflicting.exports.to.module=\u30E2\u30B8\u30E5\u30FC\u30EB\u3078\u306E\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u304C\u91CD\u8907\u307E\u305F\u306F\u7AF6\u5408\u3057\u3066\u3044\u307E\u3059: {0} + +# 0: symbol +compiler.err.conflicting.opens.to.module=\u30E2\u30B8\u30E5\u30FC\u30EB\u3078\u306E\u30AA\u30FC\u30D7\u30F3\u304C\u91CD\u8907\u307E\u305F\u306F\u7AF6\u5408\u3057\u3066\u3044\u307E\u3059: {0} + +compiler.err.no.opens.unless.strong=''opens''\u306F\u5F37\u56FA\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u3067\u306E\u307F\u8A31\u53EF\u3055\u308C\u307E\u3059 # 0: symbol, 1: symbol compiler.err.duplicate.provides=\u6307\u5B9A\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059: \u30B5\u30FC\u30D3\u30B9{0}\u3001\u5B9F\u88C5{1} @@ -1952,14 +2042,13 @@ compiler.err.duplicate.uses=\u4F7F\u7528\u304C\u91CD\u8907\u3057\u3066\u3044\u30 # 0: symbol compiler.err.service.implementation.is.abstract=\u30B5\u30FC\u30D3\u30B9\u5B9F\u88C5\u304C\u62BD\u8C61\u30AF\u30E9\u30B9\u3067\u3059: {0} -compiler.err.service.implementation.must.be.subtype.of.service.interface=\u30B5\u30FC\u30D3\u30B9\u5B9F\u88C5\u30BF\u30A4\u30D7\u306F\u3001\u30B5\u30FC\u30D3\u30B9\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u30FB\u30BF\u30A4\u30D7\u306E\u30B5\u30D6\u30BF\u30A4\u30D7\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +compiler.err.service.implementation.must.be.subtype.of.service.interface=\u30B5\u30FC\u30D3\u30B9\u5B9F\u88C5\u30BF\u30A4\u30D7\u306F\u3001\u30B5\u30FC\u30D3\u30B9\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u30FB\u30BF\u30A4\u30D7\u306E\u30B5\u30D6\u30BF\u30A4\u30D7\u3067\u3042\u308B\u304B\u3001\u30B5\u30FC\u30D3\u30B9\u5B9F\u88C5\u3092\u623B\u3057\u3001\u5F15\u6570\u3092\u6301\u305F\u306A\u3044\u3001"provider"\u3068\u3044\u3046\u540D\u524D\u306Epublic static\u30E1\u30BD\u30C3\u30C9\u3092\u6301\u3064\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 + +compiler.err.service.implementation.provider.return.must.be.subtype.of.service.interface="provider"\u30E1\u30BD\u30C3\u30C9\u306E\u623B\u308A\u30BF\u30A4\u30D7\u306F\u3001\u30B5\u30FC\u30D3\u30B9\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u30FB\u30BF\u30A4\u30D7\u306E\u30B5\u30D6\u30BF\u30A4\u30D7\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 # 0: symbol compiler.err.service.implementation.is.inner=\u30B5\u30FC\u30D3\u30B9\u5B9F\u88C5\u304C\u5185\u90E8\u30AF\u30E9\u30B9\u3067\u3059: {0} -# 0: symbol -compiler.err.service.definition.is.inner=\u30B5\u30FC\u30D3\u30B9\u5B9A\u7FA9\u304C\u5185\u90E8\u30AF\u30E9\u30B9\u3067\u3059: {0} - # 0: symbol compiler.err.service.definition.is.enum=\u30B5\u30FC\u30D3\u30B9\u5B9A\u7FA9\u304C\u5217\u6319\u578B\u3067\u3059: {0} @@ -1982,6 +2071,12 @@ compiler.err.module.name.mismatch=\u30E2\u30B8\u30E5\u30FC\u30EB\u540D{0}\u306F\ # 0: name, 1: name compiler.misc.module.name.mismatch=\u30E2\u30B8\u30E5\u30FC\u30EB\u540D{0}\u306F\u5FC5\u8981\u306A\u540D\u524D{1}\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093 +# 0: name +compiler.err.module.non.zero.opens=\u30AA\u30FC\u30D7\u30F3\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB{0}\u306F\u30BC\u30ED\u3067\u306A\u3044opens_count\u3092\u6301\u3061\u307E\u3059 + +# 0: name +compiler.misc.module.non.zero.opens=\u30AA\u30FC\u30D7\u30F3\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB{0}\u306F\u30BC\u30ED\u3067\u306A\u3044opens_count\u3092\u6301\u3061\u307E\u3059 + compiler.err.module.decl.sb.in.module-info.java=\u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306Fmodule-info.java\u3068\u3044\u3046\u540D\u524D\u306E\u30D5\u30A1\u30A4\u30EB\u306B\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 compiler.err.module-info.with.xmodule.sourcepath=\u30BD\u30FC\u30B9\u30D1\u30B9\u306E-Xmodule\u3068module-info\u306E\u7D44\u5408\u305B\u304C\u4E0D\u6B63\u3067\u3059 @@ -2014,20 +2109,19 @@ compiler.err.cyclic.requires={0}\u3092\u542B\u3080\u4F9D\u5B58\u6027\u304C\u30EB # 0: fragment, 1: name compiler.err.duplicate.module.on.path={0}\u3067\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059\n{1}\u306E\u30E2\u30B8\u30E5\u30FC\u30EB -# 0: string -compiler.err.xaddexports.malformed.entry=--add-exports {0}\u306E\u5024\u304C\u4E0D\u6B63\u3067\u3059 +# 0: option name, 1: string +compiler.warn.bad.name.for.option={0}\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5024\u306B\u542B\u307E\u308C\u308B\u540D\u524D\u304C\u4E0D\u6B63\u3067\u3059: ''{1}'' -# 0: string -compiler.err.xaddexports.too.many={0}\u306E--add-exports\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u8907\u6570\u3042\u308A\u307E\u3059 +# 0: option name, 1: string +compiler.err.bad.name.for.option={0}\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5024\u306B\u542B\u307E\u308C\u308B\u540D\u524D\u304C\u4E0D\u6B63\u3067\u3059: ''{1}'' -# 0: string -compiler.err.xaddreads.malformed.entry=--add-reads {0}\u306E\u5024\u304C\u4E0D\u6B63\u3067\u3059 - -# 0: string -compiler.err.xaddreads.too.many={0}\u306E--add-reads\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u8907\u6570\u3042\u308A\u307E\u3059 +# 0: option name, 1: symbol +compiler.warn.module.for.option.not.found={0}\u30AA\u30D7\u30B7\u30E7\u30F3\u5185\u306B\u30E2\u30B8\u30E5\u30FC\u30EB\u540D\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {1} compiler.err.addmods.all.module.path.invalid=--add-modules ALL-MODULE-PATH\u306F\u3001\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u6642\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059 +compiler.warn.addopens.ignored=--add-opens\u306F\u3001\u30B3\u30F3\u30D1\u30A4\u30EB\u6642\u306B\u306F\u7121\u52B9\u3067\u3059 + compiler.misc.locn.module_source_path=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30BD\u30FC\u30B9\u30FB\u30D1\u30B9 compiler.misc.locn.upgrade_module_path=\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9 @@ -2038,9 +2132,6 @@ compiler.misc.locn.module_path=\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\ compiler.misc.cant.resolve.modules=\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093 -# 0: symbol -compiler.err.cant.find.module=\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0} - # 0: string compiler.err.invalid.module.specifier=\u30E2\u30B8\u30E5\u30FC\u30EB\u6307\u5B9A\u5B50\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093: {0} @@ -2052,7 +2143,7 @@ compiler.warn.leaks.not.accessible=\u30E2\u30B8\u30E5\u30FC\u30EB{2}\u306E{0} {1 # 0: kind name, 1: symbol, 2: symbol compiler.warn.leaks.not.accessible.unexported=\u30E2\u30B8\u30E5\u30FC\u30EB{2}\u306E{0} {1}\u306F\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3055\u308C\u307E\u305B\u3093 # 0: kind name, 1: symbol, 2: symbol -compiler.warn.leaks.not.accessible.not.required.public=\u30E2\u30B8\u30E5\u30FC\u30EB{2}\u306E{0} {1}\u306F\u3001''requires public''\u3092\u4F7F\u7528\u3057\u3066\u9593\u63A5\u7684\u306B\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3055\u308C\u307E\u305B\u3093 +compiler.warn.leaks.not.accessible.not.required.transitive=\u30E2\u30B8\u30E5\u30FC\u30EB{2}\u306E{0} {1}\u306F\u3001''requires transitive''\u3092\u4F7F\u7528\u3057\u3066\u9593\u63A5\u7684\u306B\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3055\u308C\u307E\u305B\u3093 # 0: kind name, 1: symbol, 2: symbol compiler.warn.leaks.not.accessible.unexported.qualified=\u30E2\u30B8\u30E5\u30FC\u30EB{2}\u306E{0} {1}\u306F\u3001\u3053\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u5FC5\u8981\u3068\u3059\u308B\u3059\u3079\u3066\u306E\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u306B\u8868\u793A\u3055\u308C\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059 diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties index 91e85847e9b..0eabd0fc022 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -593,14 +593,66 @@ compiler.err.no.match.entry={0}\u5728{1}\u7684\u6761\u76EE\u4E2D\u6CA1\u6709\u53 compiler.err.not.annotation.type={0}\u4E0D\u662F\u6CE8\u91CA\u7C7B\u578B +# 0: symbol, 1: symbol, 2: message segment +compiler.err.not.def.access.package.cant.access={0} \u4E0D\u53EF\u89C1\n({2}) + +# 0: symbol, 1: symbol, 2: message segment +compiler.misc.not.def.access.package.cant.access={0} \u4E0D\u53EF\u89C1\n({2}) + +# 0: symbol, 1: message segment +compiler.err.package.not.visible=\u7A0B\u5E8F\u5305 {0} \u4E0D\u53EF\u89C1\n({1}) + +# 0: symbol, 1: message segment +compiler.misc.package.not.visible=\u7A0B\u5E8F\u5305 {0} \u4E0D\u53EF\u89C1\n({1}) + +# {0} - current module +# {1} - package in which the invisible class is declared +# {2} - module in which {1} is declared +# 0: symbol, 1: symbol, 2: symbol +compiler.misc.not.def.access.does.not.read=\u7A0B\u5E8F\u5305 {1} \u5DF2\u5728\u6A21\u5757 {2} \u4E2D\u58F0\u660E, \u4F46\u6A21\u5757 {0} \u672A\u8BFB\u53D6\u5B83 + +# {0} - package in which the invisible class is declared +# {1} - module in which {0} is declared # 0: symbol, 1: symbol -compiler.err.not.def.access.package.cant.access=\u7531\u4E8E\u7A0B\u5E8F\u5305 {1} \u4E0D\u53EF\u89C1, \u56E0\u6B64 {0} \u4E0D\u53EF\u89C1 +compiler.misc.not.def.access.does.not.read.from.unnamed=\u7A0B\u5E8F\u5305 {0} \u5DF2\u5728\u6A21\u5757 {1} \u4E2D\u58F0\u660E, \u4F46\u8BE5\u6A21\u5757\u4E0D\u5728\u6A21\u5757\u56FE\u4E2D + +# {0} - package in which the invisible class is declared +# {1} - current module +# 0: symbol, 1: symbol +compiler.misc.not.def.access.does.not.read.unnamed=\u7A0B\u5E8F\u5305 {0} \u5DF2\u5728\u672A\u547D\u540D\u6A21\u5757\u4E2D\u58F0\u660E, \u4F46\u6A21\u5757 {0} \u672A\u8BFB\u53D6\u5B83 + +# {0} - package in which the invisible class is declared +# {1} - module in which {0} is declared +# 0: symbol, 1: symbol +compiler.misc.not.def.access.not.exported=\u7A0B\u5E8F\u5305 {0} \u5DF2\u5728\u6A21\u5757 {1} \u4E2D\u58F0\u660E, \u4F46\u8BE5\u6A21\u5757\u672A\u5BFC\u51FA\u5B83 + +# {0} - package in which the invisible class is declared +# {1} - module in which {0} is declared +# 0: symbol, 1: symbol +compiler.misc.not.def.access.not.exported.from.unnamed=\u7A0B\u5E8F\u5305 {0} \u5DF2\u5728\u6A21\u5757 {1} \u4E2D\u58F0\u660E, \u4F46\u8BE5\u6A21\u5757\u672A\u5BFC\u51FA\u5B83 + +# {0} - package in which the invisible class is declared +# {1} - module in which {0} is declared +# {2} - current module +# 0: symbol, 1: symbol, 2: symbol +compiler.misc.not.def.access.not.exported.to.module=\u7A0B\u5E8F\u5305 {0} \u5DF2\u5728\u6A21\u5757 {1} \u4E2D\u58F0\u660E, \u4F46\u8BE5\u6A21\u5757\u672A\u5C06\u5B83\u5BFC\u51FA\u5230\u6A21\u5757 {2} + +# {0} - package in which the invisible class is declared +# {1} - module in which {0} is declared +# 0: symbol, 1: symbol +compiler.misc.not.def.access.not.exported.to.module.from.unnamed=\u7A0B\u5E8F\u5305 {0} \u5DF2\u5728\u6A21\u5757 {1} \u4E2D\u58F0\u660E, \u4F46\u8BE5\u6A21\u5757\u672A\u5C06\u5B83\u5BFC\u51FA\u5230\u672A\u547D\u540D\u6A21\u5757 # 0: symbol, 1: symbol -compiler.err.not.def.access.class.intf.cant.access={1}\u4E2D\u7684{0}\u662F\u5728\u4E0D\u53EF\u8BBF\u95EE\u7684\u7C7B\u6216\u63A5\u53E3\u4E2D\u5B9A\u4E49\u7684 +compiler.err.not.def.access.class.intf.cant.access={1}.{0} \u662F\u5728\u4E0D\u53EF\u8BBF\u95EE\u7684\u7C7B\u6216\u63A5\u53E3\u4E2D\u5B9A\u4E49\u7684 # 0: symbol, 1: symbol -compiler.misc.not.def.access.class.intf.cant.access={1}\u4E2D\u7684{0}\u662F\u5728\u4E0D\u53EF\u8BBF\u95EE\u7684\u7C7B\u6216\u63A5\u53E3\u4E2D\u5B9A\u4E49\u7684 +compiler.misc.not.def.access.class.intf.cant.access={1}.{0} \u662F\u5728\u4E0D\u53EF\u8BBF\u95EE\u7684\u7C7B\u6216\u63A5\u53E3\u4E2D\u5B9A\u4E49\u7684 + +# 0: symbol, 1: symbol, 2: symbol, 3: message segment +compiler.err.not.def.access.class.intf.cant.access.reason=\u7A0B\u5E8F\u5305 {2} \u4E2D\u7684 {1}.{0} \u4E0D\u53EF\u8BBF\u95EE\n({3}) + +# 0: symbol, 1: symbol, 2: symbol, 3: message segment +compiler.misc.not.def.access.class.intf.cant.access.reason=\u7A0B\u5E8F\u5305 {2} \u4E2D\u7684 {1}.{0} \u4E0D\u53EF\u8BBF\u95EE\n({3}) # 0: symbol, 1: list of type, 2: type compiler.misc.cant.access.inner.cls.constr=\u65E0\u6CD5\u8BBF\u95EE\u6784\u9020\u5668 {0}({1})\n\u4F5C\u7528\u57DF\u4E2D\u6CA1\u6709\u7C7B\u578B\u4E3A{2}\u7684\u5C01\u95ED\u5B9E\u4F8B @@ -627,6 +679,8 @@ compiler.err.operator.cant.be.applied.1=\u4E8C\u5143\u8FD0\u7B97\u7B26 ''{0}'' \ compiler.err.pkg.annotations.sb.in.package-info.java=\u7A0B\u5E8F\u5305\u6CE8\u91CA\u5E94\u5728\u6587\u4EF6 package-info.java \u4E2D +compiler.err.no.pkg.in.module-info.java=\u7A0B\u5E8F\u5305\u5B50\u53E5\u4E0D\u5E94\u5728\u6587\u4EF6 module-info.java \u4E2D + # 0: symbol compiler.err.pkg.clashes.with.class.of.same.name=\u7A0B\u5E8F\u5305{0}\u4E0E\u5E26\u6709\u76F8\u540C\u540D\u79F0\u7684\u7C7B\u51B2\u7A81 @@ -1048,12 +1102,21 @@ compiler.warn.dir.path.element.not.directory=\u9519\u8BEF\u7684\u8DEF\u5F84\u514 compiler.warn.finally.cannot.complete=finally \u5B50\u53E5\u65E0\u6CD5\u6B63\u5E38\u5B8C\u6210 +# 0: name +compiler.warn.poor.choice.for.module.name=\u6A21\u5757\u540D\u79F0 {0} \u5E94\u907F\u514D\u4EE5\u6570\u5B57\u7ED3\u5C3E + # 0: symbol, 1: symbol compiler.warn.has.been.deprecated={1}\u4E2D\u7684{0}\u5DF2\u8FC7\u65F6 # 0: symbol, 1: symbol compiler.warn.has.been.deprecated.for.removal={1} \u4E2D\u7684 {0} \u5DF2\u8FC7\u65F6, \u4E14\u6807\u8BB0\u4E3A\u5F85\u5220\u9664 +# 0: symbol +compiler.warn.has.been.deprecated.module=\u6A21\u5757 {0} \u5DF2\u8FC7\u65F6 + +# 0: symbol +compiler.warn.has.been.deprecated.for.removal.module=\u6A21\u5757 {0} \u5DF2\u8FC7\u65F6, \u4E14\u6807\u8BB0\u4E3A\u5F85\u5220\u9664 + # 0: symbol compiler.warn.sun.proprietary={0}\u662F\u5185\u90E8\u4E13\u7528 API, \u53EF\u80FD\u4F1A\u5728\u672A\u6765\u53D1\u884C\u7248\u4E2D\u5220\u9664 @@ -1210,6 +1273,8 @@ compiler.warn.missing.deprecated.annotation=\u672A\u4F7F\u7528 @Deprecated \u5BF # 0: symbol kind compiler.warn.deprecated.annotation.has.no.effect=@Deprecated \u6CE8\u91CA\u5BF9\u6B64 {0} \u58F0\u660E\u6CA1\u6709\u4EFB\u4F55\u6548\u679C +compiler.warn.invalid.path=\u65E0\u6548\u6587\u4EF6\u540D: {0} + compiler.warn.invalid.archive.file=\u4EE5\u4E0B\u8DEF\u5F84\u4E2D\u5B58\u5728\u610F\u5916\u7684\u6587\u4EF6: {0} compiler.warn.unexpected.archive.file=\u4EE5\u4E0B\u6863\u6848\u6587\u4EF6\u5B58\u5728\u610F\u5916\u7684\u6269\u5C55\u540D: {0} @@ -1293,6 +1358,8 @@ compiler.err.expected3=\u9700\u8981{0}, {1}\u6216{2} compiler.err.premature.eof=\u8FDB\u884C\u89E3\u6790\u65F6\u5DF2\u5230\u8FBE\u6587\u4EF6\u7ED3\u5C3E ## The following are related in form, but do not easily fit the above paradigm. +compiler.err.expected.module=\u9700\u8981 ''module'' + compiler.err.dot.class.expected=\u9700\u8981 ''.class'' ## The argument to this string will always be either 'case' or 'default'. @@ -1358,6 +1425,12 @@ compiler.misc.module.info.invalid.super.class=\u5E26\u6709\u65E0\u6548\u8D85\u7C compiler.misc.class.file.not.found=\u627E\u4E0D\u5230{0}\u7684\u7C7B\u6587\u4EF6 +# 0: string (constant value), 1: symbol (constant field), 2: type (field type) +compiler.misc.bad.constant.range={1} \u7684\u5E38\u91CF\u503C ''{0}'' \u8D85\u51FA\u4E86 {2} \u7684\u9884\u671F\u8303\u56F4 + +# 0: string (constant value), 1: symbol (constant field), 2: string (expected class) +compiler.misc.bad.constant.value={1} \u7684\u5E38\u91CF\u503C ''{0}'' \u9519\u8BEF, \u9884\u671F\u4E3A {2} + # 0: string (classfile major version), 1: string (classfile minor version) compiler.misc.invalid.default.interface=\u5728 {0}.{1} \u7248\u7C7B\u6587\u4EF6\u4E2D\u627E\u5230\u9ED8\u8BA4\u65B9\u6CD5 @@ -1518,6 +1591,9 @@ compiler.misc.explicit.param.do.not.conform.to.bounds=\u663E\u5F0F\u7C7B\u578B\u compiler.misc.arg.length.mismatch=\u5B9E\u9645\u53C2\u6570\u5217\u8868\u548C\u5F62\u5F0F\u53C2\u6570\u5217\u8868\u957F\u5EA6\u4E0D\u540C +# 0: string +compiler.misc.wrong.number.type.args=\u7C7B\u578B\u53D8\u91CF\u6570\u76EE\u9519\u8BEF; \u9700\u8981{0} + # 0: message segment compiler.misc.no.conforming.assignment.exists=\u53C2\u6570\u4E0D\u5339\u914D; {0} @@ -1785,7 +1861,7 @@ compiler.err.method.references.not.supported.in.source=-source {0} \u4E2D\u4E0D\ compiler.err.default.methods.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u9ED8\u8BA4\u65B9\u6CD5\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u9ED8\u8BA4\u65B9\u6CD5) # 0: string -compiler.err.intersection.types.in.cast.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u8F6C\u6362\u4E2D\u7684\u4EA4\u53C9\u7C7B\u578B\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u9ED8\u8BA4\u65B9\u6CD5) +compiler.err.intersection.types.in.cast.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u8F6C\u6362\u4E2D\u7684\u4EA4\u53C9\u7C7B\u578B\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u8F6C\u6362\u4E2D\u7684\u4EA4\u53C9\u7C7B\u578B) # 0: string compiler.err.static.intf.methods.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u9759\u6001\u63A5\u53E3\u65B9\u6CD5\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u9759\u6001\u63A5\u53E3\u65B9\u6CD5) @@ -1932,6 +2008,9 @@ compiler.err.expected.module=\u9884\u671F ''module'' # 0: symbol compiler.err.module.not.found=\u627E\u4E0D\u5230\u6A21\u5757: {0} +# 0: symbol +compiler.warn.module.not.found=\u627E\u4E0D\u5230\u6A21\u5757: {0} + compiler.err.too.many.modules=\u627E\u5230\u592A\u591A\u7684\u6A21\u5757\u58F0\u660E # 0: symbol @@ -1941,7 +2020,18 @@ compiler.err.duplicate.module=\u91CD\u590D\u7684\u6A21\u5757: {0} compiler.err.duplicate.requires=\u91CD\u590D\u7684 requires \u6307\u4EE4: {0} # 0: symbol -compiler.err.duplicate.exports=\u91CD\u590D\u7684 export \u6307\u4EE4: {0} +compiler.err.conflicting.exports=\u91CD\u590D\u6216\u51B2\u7A81\u7684\u5BFC\u51FA\u64CD\u4F5C: {0} + +# 0: symbol +compiler.err.conflicting.opens=\u91CD\u590D\u6216\u51B2\u7A81\u7684\u6253\u5F00\u64CD\u4F5C: {0} + +# 0: symbol +compiler.err.conflicting.exports.to.module=\u91CD\u590D\u6216\u51B2\u7A81\u7684\u5BFC\u51FA\u5230\u6A21\u5757\u64CD\u4F5C: {0} + +# 0: symbol +compiler.err.conflicting.opens.to.module=\u91CD\u590D\u6216\u51B2\u7A81\u7684\u6253\u5F00\u5230\u6A21\u5757\u64CD\u4F5C: {0} + +compiler.err.no.opens.unless.strong=\u53EA\u5141\u8BB8\u5728\u5F3A\u6A21\u5757\u4E2D\u4F7F\u7528 ''opens'' # 0: symbol, 1: symbol compiler.err.duplicate.provides=\u91CD\u590D\u7684 provides \u6307\u4EE4: \u670D\u52A1 {0}, \u5B9E\u73B0 {1} @@ -1952,14 +2042,13 @@ compiler.err.duplicate.uses=\u91CD\u590D\u7684 uses \u6307\u4EE4: {0} # 0: symbol compiler.err.service.implementation.is.abstract=\u670D\u52A1\u5B9E\u73B0\u662F\u62BD\u8C61\u7C7B: {0} -compiler.err.service.implementation.must.be.subtype.of.service.interface=\u670D\u52A1\u5B9E\u73B0\u7C7B\u578B\u5FC5\u987B\u662F\u670D\u52A1\u63A5\u53E3\u7C7B\u578B\u7684\u5B50\u7C7B\u578B +compiler.err.service.implementation.must.be.subtype.of.service.interface=\u670D\u52A1\u5B9E\u73B0\u7C7B\u578B\u5FC5\u987B\u662F\u670D\u52A1\u63A5\u53E3\u7C7B\u578B\u7684\u5B50\u7C7B\u578B, \u6216\u8005\u5177\u6709\u540D\u4E3A "provider" \u7684, \u8FD4\u56DE\u670D\u52A1\u5B9E\u73B0\u7684\u516C\u5171\u9759\u6001\u65E0\u53C2\u6570\u65B9\u6CD5 + +compiler.err.service.implementation.provider.return.must.be.subtype.of.service.interface="provider" \u65B9\u6CD5\u8FD4\u56DE\u7C7B\u578B\u5FC5\u987B\u662F\u670D\u52A1\u63A5\u53E3\u7C7B\u578B\u7684\u5B50\u7C7B\u578B # 0: symbol compiler.err.service.implementation.is.inner=\u670D\u52A1\u5B9E\u73B0\u662F\u5185\u90E8\u7C7B: {0} -# 0: symbol -compiler.err.service.definition.is.inner=\u670D\u52A1\u5B9A\u4E49\u662F\u5185\u90E8\u7C7B: {0} - # 0: symbol compiler.err.service.definition.is.enum=\u670D\u52A1\u5B9A\u4E49\u662F\u679A\u4E3E: {0} @@ -1982,6 +2071,12 @@ compiler.err.module.name.mismatch=\u6A21\u5757\u540D\u79F0 {0} \u4E0E\u9884\u671 # 0: name, 1: name compiler.misc.module.name.mismatch=\u6A21\u5757\u540D\u79F0 {0} \u4E0E\u9884\u671F\u540D\u79F0 {1} \u4E0D\u5339\u914D +# 0: name +compiler.err.module.non.zero.opens=\u6253\u5F00\u7684\u6A21\u5757 {0} \u5177\u6709\u975E\u96F6 opens_count + +# 0: name +compiler.misc.module.non.zero.opens=\u6253\u5F00\u7684\u6A21\u5757 {0} \u5177\u6709\u975E\u96F6 opens_count + compiler.err.module.decl.sb.in.module-info.java=\u6A21\u5757\u58F0\u660E\u5E94\u8BE5\u5728\u540D\u4E3A module-info.java \u7684\u6587\u4EF6\u4E2D compiler.err.module-info.with.xmodule.sourcepath=\u6E90\u8DEF\u5F84\u4E0A\u7684 -Xmodule \u4E0E module-info \u7684\u7EC4\u5408\u975E\u6CD5 @@ -2014,20 +2109,19 @@ compiler.err.cyclic.requires=\u6D89\u53CA {0} \u7684\u5FAA\u73AF\u88AB\u4F9D\u8D # 0: fragment, 1: name compiler.err.duplicate.module.on.path={1} \u4E2D\u7684 {0} \u4E0A\u5B58\u5728\n\u91CD\u590D\u7684\u6A21\u5757 -# 0: string -compiler.err.xaddexports.malformed.entry=--add-exports {0} \u7684\u503C\u9519\u8BEF +# 0: option name, 1: string +compiler.warn.bad.name.for.option={0} \u9009\u9879\u7684\u503C\u4E2D\u6709\u9519\u8BEF\u7684\u540D\u79F0: ''{1}'' -# 0: string -compiler.err.xaddexports.too.many={0} \u5B58\u5728\u591A\u4E2A --add-exports \u9009\u9879 +# 0: option name, 1: string +compiler.err.bad.name.for.option={0} \u9009\u9879\u7684\u503C\u4E2D\u6709\u9519\u8BEF\u7684\u540D\u79F0: ''{1}'' -# 0: string -compiler.err.xaddreads.malformed.entry=--add-reads {0} \u7684\u503C\u9519\u8BEF - -# 0: string -compiler.err.xaddreads.too.many={0} \u5B58\u5728\u591A\u4E2A --add-reads \u9009\u9879 +# 0: option name, 1: symbol +compiler.warn.module.for.option.not.found=\u627E\u4E0D\u5230 {0} \u9009\u9879\u4E2D\u7684\u6A21\u5757\u540D\u79F0: {1} compiler.err.addmods.all.module.path.invalid=--add-modules ALL-MODULE-PATH \u53EA\u80FD\u5728\u7F16\u8BD1\u672A\u547D\u540D\u6A21\u5757\u65F6\u4F7F\u7528 +compiler.warn.addopens.ignored=--add-opens \u5728\u7F16\u8BD1\u65F6\u6CA1\u6709\u4EFB\u4F55\u6548\u679C + compiler.misc.locn.module_source_path=\u6A21\u5757\u6E90\u8DEF\u5F84 compiler.misc.locn.upgrade_module_path=\u5347\u7EA7\u6A21\u5757\u8DEF\u5F84 @@ -2038,9 +2132,6 @@ compiler.misc.locn.module_path=\u5E94\u7528\u7A0B\u5E8F\u6A21\u5757\u8DEF\u5F84 compiler.misc.cant.resolve.modules=\u65E0\u6CD5\u89E3\u6790\u6A21\u5757 -# 0: symbol -compiler.err.cant.find.module=\u627E\u4E0D\u5230\u6A21\u5757: {0} - # 0: string compiler.err.invalid.module.specifier=\u4E0D\u5141\u8BB8\u6A21\u5757\u8BF4\u660E\u7B26: {0} @@ -2052,7 +2143,7 @@ compiler.warn.leaks.not.accessible=\u6A21\u5757 {2} \u4E2D\u7684 {0} {1} \u5BF9\ # 0: kind name, 1: symbol, 2: symbol compiler.warn.leaks.not.accessible.unexported=\u672A\u5BFC\u51FA\u6A21\u5757 {2} \u4E2D\u7684 {0} {1} # 0: kind name, 1: symbol, 2: symbol -compiler.warn.leaks.not.accessible.not.required.public=\u672A\u4F7F\u7528 ''requires public'' \u95F4\u63A5\u5BFC\u51FA\u6A21\u5757 {2} \u4E2D\u7684 {0} {1} +compiler.warn.leaks.not.accessible.not.required.transitive=\u672A\u4F7F\u7528 ''requires transitive'' \u95F4\u63A5\u5BFC\u51FA\u6A21\u5757 {2} \u4E2D\u7684 {0} {1} # 0: kind name, 1: symbol, 2: symbol compiler.warn.leaks.not.accessible.unexported.qualified=\u6A21\u5757 {2} \u4E2D\u7684 {0} {1} \u53EF\u80FD\u5BF9\u9700\u8981\u8BE5\u6A21\u5757\u7684\u6240\u6709\u5BA2\u6237\u673A\u90FD\u4E0D\u53EF\u89C1 diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties index 8fff8c928d9..eb32dea12fa 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -119,6 +119,8 @@ javac.opt.Xlint.desc.fallthrough=switch\u6587\u306E1\u3064\u306Ecase\u304B\u3089 javac.opt.Xlint.desc.finally=\u6B63\u5E38\u306B\u5B8C\u4E86\u3057\u306A\u3044finally\u7BC0\u306B\u3064\u3044\u3066\u8B66\u544A\u3057\u307E\u3059\u3002 +javac.opt.Xlint.desc.module=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30B7\u30B9\u30C6\u30E0\u95A2\u9023\u306E\u554F\u984C\u306B\u3064\u3044\u3066\u8B66\u544A\u3057\u307E\u3059\u3002 + javac.opt.Xlint.desc.options=\u30B3\u30DE\u30F3\u30C9\u884C\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u4F7F\u7528\u306B\u95A2\u3059\u308B\u554F\u984C\u306B\u3064\u3044\u3066\u8B66\u544A\u3057\u307E\u3059\u3002 javac.opt.Xlint.desc.overloads=\u30E1\u30BD\u30C3\u30C9\u306E\u30AA\u30FC\u30D0\u30FC\u30ED\u30FC\u30C9\u306B\u95A2\u3059\u308B\u554F\u984C\u306B\u3064\u3044\u3066\u8B66\u544A\u3057\u307E\u3059\u3002 @@ -156,8 +158,8 @@ javac.opt.Xdoclint.package.args = [-](,[-])* javac.opt.Xdoclint.package.desc=\u7279\u5B9A\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3057\u307E\u3059\u3002\u5404\u306F\u3001\n\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u4FEE\u98FE\u3055\u308C\u305F\u540D\u524D\u3001\u307E\u305F\u306F\u30D1\u30C3\u30B1\u30FC\u30B8\u540D\u306E\u63A5\u982D\u8F9E\u306E\u5F8C\u306B''.*''\u3092\u6307\u5B9A\n(\u6307\u5B9A\u3057\u305F\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u3059\u3079\u3066\u306E\u30B5\u30D6\u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u62E1\u5F35)\u3057\u305F\u3082\u306E\u3067\u3059\u3002\u5404\u306E\u524D\u306B\n'-'\u3092\u6307\u5B9A\u3059\u308B\u3068\u3001\u6307\u5B9A\u3057\u305F1\u3064\u4EE5\u4E0A\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u95A2\u3059\u308B\u30C1\u30A7\u30C3\u30AF\u3092\u7121\u52B9\u306B\u3067\u304D\u307E\u3059\u3002 javac.opt.Xstdout=\u6A19\u6E96\u51FA\u529B\u3092\u30EA\u30C0\u30A4\u30EC\u30AF\u30C8\u3059\u308B -javac.opt.X=\u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u6982\u8981\u3092\u51FA\u529B\u3059\u308B -javac.opt.help=\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u6982\u8981\u3092\u51FA\u529B\u3059\u308B +javac.opt.X=\u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30D8\u30EB\u30D7\u3092\u51FA\u529B\u3057\u307E\u3059 +javac.opt.help=\u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3057\u307E\u3059 javac.opt.print=\u6307\u5B9A\u3057\u305F\u578B\u306E\u30C6\u30AD\u30B9\u30C8\u8868\u793A\u3092\u51FA\u529B\u3059\u308B javac.opt.printRounds=\u6CE8\u91C8\u51E6\u7406\u306E\u5F80\u5FA9\u306B\u3064\u3044\u3066\u306E\u60C5\u5831\u3092\u5370\u5237\u3059\u308B javac.opt.printProcessorInfo=\u30D7\u30ED\u30BB\u30C3\u30B5\u304C\u51E6\u7406\u3092\u4F9D\u983C\u3055\u308C\u308B\u6CE8\u91C8\u306B\u3064\u3044\u3066\u306E\u60C5\u5831\u3092\u5370\u5237\u3059\u308B @@ -177,6 +179,8 @@ javac.opt.addmods=\u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u52A0\u3048\u javac.opt.arg.addmods=(,)* javac.opt.limitmods=\u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u9818\u57DF\u3092\u5236\u9650\u3057\u307E\u3059 javac.opt.arg.limitmods=(,)* +javac.opt.module.version=\u30B3\u30F3\u30D1\u30A4\u30EB\u3059\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u6307\u5B9A\u3057\u307E\u3059 +javac.opt.arg.module.version=<\u30D0\u30FC\u30B8\u30E7\u30F3> javac.opt.inherit_runtime_environment=\u5B9F\u884C\u6642\u74B0\u5883\u304B\u3089\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30B7\u30B9\u30C6\u30E0\u69CB\u6210\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u7D99\u627F\u3057\u307E\u3059\u3002 ## errors @@ -203,6 +207,9 @@ javac.err.file.not.found=\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\ javac.err.file.not.directory=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u306F\u3042\u308A\u307E\u305B\u3093: {0} javac.err.file.not.file=\u30D5\u30A1\u30A4\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093: {0} javac.err.cannot.access.runtime.env=\u5B9F\u884C\u6642\u74B0\u5883\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093 +javac.err.bad.value.for.option={0}\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5024\u304C\u4E0D\u6B63\u3067\u3059: ''{1}'' +javac.err.no.value.for.option={0}\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5024\u304C\u3042\u308A\u307E\u305B\u3093 +javac.err.repeated.value.for.patch.module={0}\u306B\u5BFE\u3057\u3066--patch-module\u304C\u8907\u6570\u56DE\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059 ## messages @@ -210,7 +217,7 @@ javac.msg.usage.header=\u4F7F\u7528\u65B9\u6CD5: {0} \n\ javac.msg.usage=\u4F7F\u7528\u65B9\u6CD5: {0} \n\u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30EA\u30B9\u30C8\u306B\u3064\u3044\u3066\u306F\u3001--help\u3092\u4F7F\u7528\u3057\u307E\u3059 -javac.msg.usage.nonstandard.footer=\u3053\u308C\u3089\u306F\u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u3042\u308A\u4E88\u544A\u306A\u3057\u306B\u5909\u66F4\u3055\u308C\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002 +javac.msg.usage.nonstandard.footer=\u3053\u306E\u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u4E88\u544A\u306A\u3057\u306B\u5909\u66F4\u3055\u308C\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002 javac.msg.bug=\u30B3\u30F3\u30D1\u30A4\u30E9\u3067\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F({0})\u3002Bug Database (http://bugs.java.com)\u3067\u91CD\u8907\u304C\u306A\u3044\u304B\u3092\u3054\u78BA\u8A8D\u306E\u3046\u3048\u3001Java bug\u30EC\u30DD\u30FC\u30C8\u30FB\u30DA\u30FC\u30B8(http://bugreport.java.com)\u3067Java\u30B3\u30F3\u30D1\u30A4\u30E9\u306B\u5BFE\u3059\u308Bbug\u306E\u767B\u9332\u3092\u304A\u9858\u3044\u3044\u305F\u3057\u307E\u3059\u3002\u30EC\u30DD\u30FC\u30C8\u306B\u306F\u3001\u305D\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u3068\u4E0B\u8A18\u306E\u8A3A\u65AD\u5185\u5BB9\u3092\u542B\u3081\u3066\u304F\u3060\u3055\u3044\u3002\u3054\u5354\u529B\u3042\u308A\u304C\u3068\u3046\u3054\u3056\u3044\u307E\u3059\u3002 diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties index 0417a898aaf..29e854580dd 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -119,6 +119,8 @@ javac.opt.Xlint.desc.fallthrough=\u6709\u5173\u4ECE switch \u8BED\u53E5\u7684\u4 javac.opt.Xlint.desc.finally=\u6709\u5173 finally \u5B50\u53E5\u672A\u6B63\u5E38\u7EC8\u6B62\u7684\u8B66\u544A\u3002 +javac.opt.Xlint.desc.module=\u6709\u5173\u6A21\u5757\u7CFB\u7EDF\u76F8\u5173\u95EE\u9898\u7684\u8B66\u544A\u3002 + javac.opt.Xlint.desc.options=\u6709\u5173\u4E0E\u4F7F\u7528\u547D\u4EE4\u884C\u9009\u9879\u76F8\u5173\u7684\u95EE\u9898\u7684\u8B66\u544A\u3002 javac.opt.Xlint.desc.overloads=\u6709\u5173\u4E0E\u65B9\u6CD5\u91CD\u8F7D\u76F8\u5173\u7684\u95EE\u9898\u7684\u8B66\u544A\u3002 @@ -156,8 +158,8 @@ javac.opt.Xdoclint.package.args = [-]<\u7A0B\u5E8F\u5305>(,[-]<\u7A0B\u5E8F\u530 javac.opt.Xdoclint.package.desc=\u5728\u7279\u5B9A\u7684\u7A0B\u5E8F\u5305\u4E2D\u542F\u7528\u6216\u7981\u7528\u68C0\u67E5\u3002\u6BCF\u4E2A <\u7A0B\u5E8F\u5305> \u662F\n\u7A0B\u5E8F\u5305\u7684\u9650\u5B9A\u540D\u79F0, \u6216\u7A0B\u5E8F\u5305\u540D\u79F0\u524D\u7F00\u540E\u8DDF '.*', \n\u5B83\u6269\u5C55\u5230\u7ED9\u5B9A\u7A0B\u5E8F\u5305\u7684\u6240\u6709\u5B50\u7A0B\u5E8F\u5305\u3002\u5728\u6BCF\u4E2A <\u7A0B\u5E8F\u5305>\n\u524D\u9762\u52A0\u4E0A '-' \u53EF\u4EE5\u4E3A\u6307\u5B9A\u7A0B\u5E8F\u5305\u7981\u7528\u68C0\u67E5\u3002 javac.opt.Xstdout=\u91CD\u5B9A\u5411\u6807\u51C6\u8F93\u51FA -javac.opt.X=\u8F93\u51FA\u975E\u6807\u51C6\u9009\u9879\u7684\u63D0\u8981 -javac.opt.help=\u8F93\u51FA\u6807\u51C6\u9009\u9879\u7684\u63D0\u8981 +javac.opt.X=\u8F93\u51FA\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9 +javac.opt.help=\u8F93\u51FA\u6B64\u5E2E\u52A9\u6D88\u606F javac.opt.print=\u8F93\u51FA\u6307\u5B9A\u7C7B\u578B\u7684\u6587\u672C\u8868\u793A javac.opt.printRounds=\u8F93\u51FA\u6709\u5173\u6CE8\u91CA\u5904\u7406\u5FAA\u73AF\u7684\u4FE1\u606F javac.opt.printProcessorInfo=\u8F93\u51FA\u6709\u5173\u8BF7\u6C42\u5904\u7406\u7A0B\u5E8F\u5904\u7406\u54EA\u4E9B\u6CE8\u91CA\u7684\u4FE1\u606F @@ -177,6 +179,8 @@ javac.opt.addmods=\u9664\u4E86\u521D\u59CB\u6A21\u5757\u4E4B\u5916\u8981\u89E3\u javac.opt.arg.addmods=<\u6A21\u5757>(,<\u6A21\u5757>)* javac.opt.limitmods=\u9650\u5236\u53EF\u89C2\u5BDF\u6A21\u5757\u7684\u9886\u57DF javac.opt.arg.limitmods=<\u6A21\u5757>(,<\u6A21\u5757>)* +javac.opt.module.version=\u6307\u5B9A\u6B63\u5728\u7F16\u8BD1\u7684\u6A21\u5757\u7248\u672C +javac.opt.arg.module.version=<\u7248\u672C> javac.opt.inherit_runtime_environment=\u4ECE\u8FD0\u884C\u65F6\u73AF\u5883\u7EE7\u627F\u6A21\u5757\u7CFB\u7EDF\u914D\u7F6E\u9009\u9879\u3002 ## errors @@ -203,6 +207,9 @@ javac.err.file.not.found=\u627E\u4E0D\u5230\u6587\u4EF6: {0} javac.err.file.not.directory=\u4E0D\u662F\u76EE\u5F55: {0} javac.err.file.not.file=\u4E0D\u662F\u6587\u4EF6: {0} javac.err.cannot.access.runtime.env=\u65E0\u6CD5\u8BBF\u95EE\u8FD0\u884C\u65F6\u73AF\u5883 +javac.err.bad.value.for.option={0} \u9009\u9879\u7684\u503C\u9519\u8BEF: ''{1}'' +javac.err.no.value.for.option={0} \u9009\u9879\u6CA1\u6709\u503C +javac.err.repeated.value.for.patch.module=\u4E3A {0} \u591A\u6B21\u6307\u5B9A\u4E86 --patch-module ## messages @@ -210,7 +217,7 @@ javac.msg.usage.header=\u7528\u6CD5: {0} \n\u5176\u4E2D, javac.msg.usage=\u7528\u6CD5: {0} <\u9009\u9879> <\u6E90\u6587\u4EF6>\n\u4F7F\u7528 --help \u53EF\u5217\u51FA\u53EF\u80FD\u7684\u9009\u9879 -javac.msg.usage.nonstandard.footer=\u8FD9\u4E9B\u9009\u9879\u90FD\u662F\u975E\u6807\u51C6\u9009\u9879, \u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002 +javac.msg.usage.nonstandard.footer=\u8FD9\u4E9B\u989D\u5916\u9009\u9879\u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002 javac.msg.bug=\u7F16\u8BD1\u5668 ({0}) \u4E2D\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF\u3002\u5982\u679C\u5728 Bug Database (http://bugs.java.com) \u4E2D\u6CA1\u6709\u627E\u5230\u8BE5\u9519\u8BEF, \u8BF7\u901A\u8FC7 Java Bug \u62A5\u544A\u9875 (http://bugreport.java.com) \u5EFA\u7ACB\u8BE5 Java \u7F16\u8BD1\u5668 Bug\u3002\u8BF7\u5728\u62A5\u544A\u4E2D\u9644\u4E0A\u60A8\u7684\u7A0B\u5E8F\u548C\u4EE5\u4E0B\u8BCA\u65AD\u4FE1\u606F\u3002\u8C22\u8C22\u3002 diff --git a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/resources/javadoc_ja.properties b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/resources/javadoc_ja.properties index 29a5a1c444a..3639b9c59c8 100644 --- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/resources/javadoc_ja.properties +++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/resources/javadoc_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,6 +71,7 @@ main.illegal_package_name=\u30D1\u30C3\u30B1\u30FC\u30B8\u540D"{0}"\u306F\u4E0D\ main.release.bootclasspath.conflict=\u30AA\u30D7\u30B7\u30E7\u30F3{0}\u306F-release\u3068\u4E00\u7DD2\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093 main.unsupported.release.version=\u30EA\u30EA\u30FC\u30B9\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3{0}\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093 main.release.not.standard.file.manager=-release\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u6307\u5B9A\u3055\u308C\u305FJavaFileManager\u306FStandardJavaFileManager\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002 +main.option.invalid.value={0} tag.illegal_char_in_arr_dim=\u30BF\u30B0{0}: \u914D\u5217\u306E\u5927\u304D\u3055\u3001\u30E1\u30BD\u30C3\u30C9\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF{1}\u306B\u69CB\u6587\u30A8\u30E9\u30FC\u304C\u3042\u308A\u307E\u3059 tag.illegal_see_tag=\u30BF\u30B0{0}: \u30E1\u30BD\u30C3\u30C9\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF{1}\u306B\u69CB\u6587\u30A8\u30E9\u30FC\u304C\u3042\u308A\u307E\u3059 tag.missing_comma_space=\u30BF\u30B0{0}: \u30E1\u30BD\u30C3\u30C9\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF{1}\u306B\u30AB\u30F3\u30DE\u307E\u305F\u306F\u7A7A\u767D\u6587\u5B57\u304C\u3042\u308A\u307E\u305B\u3093 diff --git a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties index 53baad45756..dddbeae7e6a 100644 --- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties +++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,6 +71,7 @@ main.illegal_package_name=\u975E\u6CD5\u7684\u7A0B\u5E8F\u5305\u540D\u79F0: "{0} main.release.bootclasspath.conflict=\u9009\u9879{0}\u65E0\u6CD5\u4E0E -release \u4E00\u8D77\u4F7F\u7528 main.unsupported.release.version=\u4E0D\u652F\u6301\u53D1\u884C\u7248\u672C {0} main.release.not.standard.file.manager=\u6307\u5B9A\u4E86 -release \u9009\u9879, \u4F46\u63D0\u4F9B\u7684 JavaFileManager \u4E0D\u662F StandardJavaFileManager\u3002 +main.option.invalid.value={0} tag.illegal_char_in_arr_dim=\u6807\u8BB0{0}: \u6570\u7EC4\u7EF4\u4E2D\u6709\u8BED\u6CD5\u9519\u8BEF, \u65B9\u6CD5\u53C2\u6570: {1} tag.illegal_see_tag=\u6807\u8BB0{0}: \u65B9\u6CD5\u53C2\u6570\u4E2D\u6709\u8BED\u6CD5\u9519\u8BEF: {1} tag.missing_comma_space=\u6807\u8BB0{0}: \u65B9\u6CD5\u53C2\u6570\u4E2D\u7F3A\u5C11\u9017\u53F7\u6216\u7A7A\u683C: {1} diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_ja.properties b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_ja.properties index 13283667af4..a9728fec9f2 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_ja.properties +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_ja.properties @@ -3,10 +3,12 @@ doclet.Contents=\u30B3\u30F3\u30C6\u30F3\u30C4 doclet.Overview=\u6982\u8981 doclet.Window_Overview=\u6982\u8981\u30EA\u30B9\u30C8 doclet.Window_Overview_Summary=\u6982\u8981 +doclet.Element=\u8981\u7D20 doclet.Package=\u30D1\u30C3\u30B1\u30FC\u30B8 doclet.Module=\u30E2\u30B8\u30E5\u30FC\u30EB doclet.All_Packages=\u3059\u3079\u3066\u306E\u30D1\u30C3\u30B1\u30FC\u30B8 doclet.All_Modules=\u3059\u3079\u3066\u306E\u30E2\u30B8\u30E5\u30FC\u30EB +doclet.None=\u306A\u3057 doclet.Tree=\u968E\u5C64\u30C4\u30EA\u30FC doclet.Class_Hierarchy=\u30AF\u30E9\u30B9\u968E\u5C64 doclet.Window_Class_Hierarchy=\u30AF\u30E9\u30B9\u968E\u5C64 @@ -71,6 +73,8 @@ doclet.see.class_or_package_not_found=\u30BF\u30B0{0}: \u53C2\u7167\u304C\u898B\ doclet.see.class_or_package_not_accessible=\u30BF\u30B0{0}: \u53C2\u7167\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093: {1} doclet.tag.invalid_usage=\u30BF\u30B0{0}\u306E\u4F7F\u7528\u65B9\u6CD5\u304C\u7121\u52B9\u3067\u3059 doclet.Deprecated_API=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044API +doclet.Deprecated_For_Removal=\u524A\u9664\u4E88\u5B9A\u306E\u975E\u63A8\u5968 +doclet.Deprecated_Modules=\u975E\u63A8\u5968\u30E2\u30B8\u30E5\u30FC\u30EB doclet.Deprecated_Packages=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30D1\u30C3\u30B1\u30FC\u30B8 doclet.Deprecated_Classes=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30AF\u30E9\u30B9 doclet.Deprecated_Enums=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u5217\u6319\u578B @@ -83,6 +87,8 @@ doclet.Deprecated_Constructors=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\ doclet.Deprecated_Methods=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30E1\u30BD\u30C3\u30C9 doclet.Deprecated_Enum_Constants=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u5217\u6319\u578B\u5B9A\u6570 doclet.Deprecated_Annotation_Type_Members=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u6CE8\u91C8\u578B\u306E\u8981\u7D20 +doclet.deprecated_for_removal=\u524A\u9664\u4E88\u5B9A\u306E\u975E\u63A8\u5968 +doclet.deprecated_modules=\u975E\u63A8\u5968\u30E2\u30B8\u30E5\u30FC\u30EB doclet.deprecated_packages=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30D1\u30C3\u30B1\u30FC\u30B8 doclet.deprecated_classes=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30AF\u30E9\u30B9 doclet.deprecated_enums=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u5217\u6319\u578B diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_zh_CN.properties b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_zh_CN.properties index 949044a3d03..f42c6a5b209 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_zh_CN.properties +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_zh_CN.properties @@ -3,10 +3,12 @@ doclet.Contents=\u76EE\u5F55 doclet.Overview=\u6982\u89C8 doclet.Window_Overview=\u6982\u89C8\u5217\u8868 doclet.Window_Overview_Summary=\u6982\u89C8 +doclet.Element=\u5143\u7D20 doclet.Package=\u7A0B\u5E8F\u5305 doclet.Module=\u6A21\u5757 doclet.All_Packages=\u6240\u6709\u7A0B\u5E8F\u5305 doclet.All_Modules=\u5168\u90E8\u6A21\u5757 +doclet.None=\u65E0 doclet.Tree=\u6811 doclet.Class_Hierarchy=\u7C7B\u5206\u5C42\u7ED3\u6784 doclet.Window_Class_Hierarchy=\u7C7B\u5206\u5C42\u7ED3\u6784 @@ -71,6 +73,8 @@ doclet.see.class_or_package_not_found=\u6807\u8BB0{0}: \u627E\u4E0D\u5230\u5F15\ doclet.see.class_or_package_not_accessible=\u6807\u8BB0{0}: \u65E0\u6CD5\u8BBF\u95EE\u5F15\u7528: {1} doclet.tag.invalid_usage=\u6807\u8BB0 {0} \u7684\u7528\u6CD5\u65E0\u6548 doclet.Deprecated_API=\u5DF2\u8FC7\u65F6\u7684 API +doclet.Deprecated_For_Removal=\u5DF2\u8FC7\u65F6, \u5F85\u5220\u9664 +doclet.Deprecated_Modules=\u5DF2\u8FC7\u65F6\u6A21\u5757 doclet.Deprecated_Packages=\u5DF2\u8FC7\u65F6\u7A0B\u5E8F\u5305 doclet.Deprecated_Classes=\u5DF2\u8FC7\u65F6\u7684\u7C7B doclet.Deprecated_Enums=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E @@ -83,6 +87,8 @@ doclet.Deprecated_Constructors=\u5DF2\u8FC7\u65F6\u7684\u6784\u9020\u5668 doclet.Deprecated_Methods=\u5DF2\u8FC7\u65F6\u7684\u65B9\u6CD5 doclet.Deprecated_Enum_Constants=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E\u5E38\u91CF doclet.Deprecated_Annotation_Type_Members=\u5DF2\u8FC7\u65F6\u7684\u6CE8\u91CA\u7C7B\u578B\u5143\u7D20 +doclet.deprecated_for_removal=\u5DF2\u8FC7\u65F6, \u5F85\u5220\u9664 +doclet.deprecated_modules=\u5DF2\u8FC7\u65F6\u6A21\u5757 doclet.deprecated_packages=\u5DF2\u8FC7\u65F6\u7A0B\u5E8F\u5305 doclet.deprecated_classes=\u5DF2\u8FC7\u65F6\u7684\u7C7B doclet.deprecated_enums=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_ja.properties b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_ja.properties index 42022d05f73..9ec50eee289 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_ja.properties +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_ja.properties @@ -74,7 +74,13 @@ doclet.tag_misuse={0}\u30BF\u30B0\u306F{1}\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u doclet.javafx_tag_misuse=\u30BF\u30B0@propertyGetter\u3001@propertySetter\u304A\u3088\u3073@propertyDescription\u306F\u3001JavaFX\u306E\u30D7\u30ED\u30D1\u30C6\u30A3getter\u3068setter\u306E\u307F\u3067\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002 doclet.Package_Summary=\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u6982\u8981 doclet.Requires_Summary=\u5FC5\u8981 +doclet.Additional_Modules_Required_Summary=\u8FFD\u52A0\u30E2\u30B8\u30E5\u30FC\u30EB\u5FC5\u9808 +doclet.Additional_Exported_Packages_Summary=\u8FFD\u52A0\u306E\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3055\u308C\u305F\u30D1\u30C3\u30B1\u30FC\u30B8 +doclet.Additional_Opened_Packages_Summary=\u8FFD\u52A0\u306E\u30AA\u30FC\u30D7\u30F3\u3055\u308C\u305F\u30D1\u30C3\u30B1\u30FC\u30B8 doclet.Exported_Packages_Summary=\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3055\u308C\u305F\u30D1\u30C3\u30B1\u30FC\u30B8 +doclet.Opened_Packages_Summary=\u30AA\u30FC\u30D7\u30F3\u3055\u308C\u305F\u30D1\u30C3\u30B1\u30FC\u30B8 +doclet.Concealed_Packages_Summary=\u96A0\u3057\u30D1\u30C3\u30B1\u30FC\u30B8 +doclet.Packages_Summary=\u30D1\u30C3\u30B1\u30FC\u30B8 doclet.Uses_Summary=\u4F7F\u7528 doclet.Provides_Summary=\u63D0\u4F9B doclet.Module_Summary=\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u6982\u8981 @@ -142,6 +148,7 @@ doclet.Property_Detail=\u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u8A73\u7D30 doclet.Method_Detail=\u30E1\u30BD\u30C3\u30C9\u306E\u8A73\u7D30 doclet.Constructor_Detail=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u8A73\u7D30 doclet.Deprecated=\u63A8\u5968\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002 +doclet.DeprecatedForRemoval=\u975E\u63A8\u5968\u3001\u524A\u9664\u4E88\u5B9A: \u3053\u306EAPI\u8981\u7D20\u306F\u5C06\u6765\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u524A\u9664\u4E88\u5B9A\u3067\u3059\u3002 doclet.Hidden=\u975E\u8868\u793A doclet.Groupname_already_used=-group\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u304A\u3044\u3066\u3001\u3059\u3067\u306B\u30B0\u30EB\u30FC\u30D7\u540D\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059: {0} doclet.value_tag_invalid_reference={0}(@value\u30BF\u30B0\u306B\u3088\u308A\u53C2\u7167\u3055\u308C\u3066\u3044\u308B)\u306F\u4E0D\u660E\u306A\u53C2\u7167\u3067\u3059\u3002 @@ -152,6 +159,7 @@ doclet.in={1}\u306E{0} doclet.Use_Table_Summary=\u8868\u3001{0}\u306E\u30EA\u30B9\u30C8\u304A\u3088\u3073\u8AAC\u660E\u306E\u4F7F\u7528 doclet.Constants_Table_Summary={0}\u8868\u3001\u5B9A\u6570\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u30EA\u30B9\u30C8\u304A\u3088\u3073\u5024 doclet.Member_Table_Summary={0}\u8868\u3001{1}\u306E\u30EA\u30B9\u30C8\u304A\u3088\u3073\u8AAC\u660E +doclet.Additional_Packages_Table_Summary={0}\u8868\u3001{1}\u306E\u30EA\u30B9\u30C8\u304A\u3088\u3073{2} doclet.fields=\u30D5\u30A3\u30FC\u30EB\u30C9 doclet.Fields=\u30D5\u30A3\u30FC\u30EB\u30C9 doclet.properties=\u30D7\u30ED\u30D1\u30C6\u30A3 diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_zh_CN.properties b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_zh_CN.properties index 7129b657dd9..665c0784276 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_zh_CN.properties +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_zh_CN.properties @@ -74,7 +74,13 @@ doclet.tag_misuse=\u4E0D\u80FD\u5728{1}\u6587\u6863\u4E2D\u4F7F\u7528\u6807\u8BB doclet.javafx_tag_misuse=\u6807\u8BB0 @propertyGetter, @propertySetter \u548C @propertyDescription \u53EA\u80FD\u5728 JavaFX \u5C5E\u6027 getter \u548C setter \u4E2D\u4F7F\u7528\u3002 doclet.Package_Summary=\u7A0B\u5E8F\u5305\u6982\u8981 doclet.Requires_Summary=\u5FC5\u9700\u9879 +doclet.Additional_Modules_Required_Summary=\u6240\u9700\u7684\u9644\u52A0\u6A21\u5757 +doclet.Additional_Exported_Packages_Summary=\u5BFC\u51FA\u7684\u9644\u52A0\u7A0B\u5E8F\u5305 +doclet.Additional_Opened_Packages_Summary=\u6253\u5F00\u7684\u9644\u52A0\u7A0B\u5E8F\u5305 doclet.Exported_Packages_Summary=\u5BFC\u51FA\u7684\u7A0B\u5E8F\u5305 +doclet.Opened_Packages_Summary=\u6253\u5F00\u7684\u7A0B\u5E8F\u5305 +doclet.Concealed_Packages_Summary=\u9690\u85CF\u7684\u7A0B\u5E8F\u5305 +doclet.Packages_Summary=\u7A0B\u5E8F\u5305 doclet.Uses_Summary=\u4F7F\u7528 doclet.Provides_Summary=\u63D0\u4F9B doclet.Module_Summary=\u6A21\u5757\u6982\u8981 @@ -142,6 +148,7 @@ doclet.Property_Detail=\u5C5E\u6027\u8BE6\u7EC6\u4FE1\u606F doclet.Method_Detail=\u65B9\u6CD5\u8BE6\u7EC6\u8D44\u6599 doclet.Constructor_Detail=\u6784\u9020\u5668\u8BE6\u7EC6\u8D44\u6599 doclet.Deprecated=\u5DF2\u8FC7\u65F6\u3002 +doclet.DeprecatedForRemoval=\u5DF2\u8FC7\u65F6, \u5F85\u5220\u9664: \u6B64 API \u5143\u7D20\u5C06\u4ECE\u4EE5\u540E\u7684\u7248\u672C\u4E2D\u5220\u9664\u3002 doclet.Hidden=\u9690\u85CF doclet.Groupname_already_used=\u5728 -group \u9009\u9879\u4E2D, groupname \u5DF2\u4F7F\u7528: {0} doclet.value_tag_invalid_reference={0} (\u7531 @value \u6807\u8BB0\u5F15\u7528) \u4E3A\u672A\u77E5\u5F15\u7528\u3002 @@ -152,6 +159,7 @@ doclet.in={1}\u4E2D\u7684{0} doclet.Use_Table_Summary=\u4F7F\u7528\u8868, \u5217\u8868{0}\u548C\u89E3\u91CA doclet.Constants_Table_Summary={0}\u8868, \u5217\u8868\u5E38\u91CF\u5B57\u6BB5\u548C\u503C doclet.Member_Table_Summary={0}\u8868, \u5217\u8868{1}\u548C\u89E3\u91CA +doclet.Additional_Packages_Table_Summary={0} \u8868, \u5176\u4E2D\u5217\u51FA {1} \u548C {2} doclet.fields=\u5B57\u6BB5 doclet.Fields=\u5B57\u6BB5 doclet.properties=\u5C5E\u6027 diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_ja.properties b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_ja.properties index e510b5bd6af..7782e0372fc 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_ja.properties +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -51,7 +51,7 @@ main.opt.show.module.contents.arg= main.opt.show.module.contents.desc=\u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5316\u306E\u7C92\u5EA6\u3092\u6307\u5B9A\u3059\u308B\u3002\n\u4F7F\u7528\u53EF\u80FD\u306A\u5024\u306F\u3001"api"\u307E\u305F\u306F"all"\u3067\u3059\u3002 main.opt.expand.requires.arg= -main.opt.expand.requires.desc=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5316\u3059\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30BB\u30C3\u30C8\u3092\u62E1\u5F35\u3059\u308B\u305F\u3081\u306E\n\u30C4\u30FC\u30EB\u3092\u6307\u5B9A\u3059\u308B\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u306F\u3001\u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u3067\u660E\u793A\u7684\u306B\n\u6307\u5B9A\u3055\u308C\u305F\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u307F\u304C\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5316\u3055\u308C\u307E\u3059\u3002"public"\u306E\u5024\u306F\u3001\n\u305D\u308C\u3089\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u3059\u3079\u3066\u306E"requires public"\u4F9D\u5B58\u6027\u3092\u8FFD\u52A0\u3067\n\u542B\u3081\u307E\u3059\u3002"all"\u306E\u5024\u306F\u3001\u305D\u308C\u3089\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u3059\u3079\u3066\u306E\u4F9D\u5B58\u6027\u3092\n\u542B\u3081\u307E\u3059\u3002 +main.opt.expand.requires.desc=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5316\u3059\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30BB\u30C3\u30C8\u3092\u62E1\u5F35\u3059\u308B\u305F\u3081\u306E\n\u30C4\u30FC\u30EB\u3092\u6307\u5B9A\u3059\u308B\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u306F\u3001\u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u3067\u660E\u793A\u7684\u306B\n\u6307\u5B9A\u3055\u308C\u305F\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u307F\u304C\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5316\u3055\u308C\u307E\u3059\u3002"transitive"\u306E\u5024\u306F\u3001\n\u305D\u308C\u3089\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u3059\u3079\u3066\u306E"requires transitive"\u4F9D\u5B58\u6027\u3092\u8FFD\u52A0\u3067\n\u542B\u3081\u307E\u3059\u3002"all"\u306E\u5024\u306F\u3001\u305D\u308C\u3089\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u3059\u3079\u3066\u306E\u4F9D\u5B58\u6027\u3092\n\u542B\u3081\u307E\u3059\u3002 main.opt.help.desc=\u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8868\u793A\u3057\u3066\u7D42\u4E86\u3059\u308B diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_zh_CN.properties b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_zh_CN.properties index 086827c7b53..8cade49e10e 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_zh_CN.properties +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -51,7 +51,7 @@ main.opt.show.module.contents.arg=<\u503C> main.opt.show.module.contents.desc=\u6307\u5B9A\u6A21\u5757\u58F0\u660E\u7684\u6587\u6863\u7C92\u5EA6\u3002\n\u53EF\u80FD\u7684\u503C\u4E3A "api" \u6216 "all"\u3002 main.opt.expand.requires.arg=<\u503C> -main.opt.expand.requires.desc=\u6307\u793A\u5DE5\u5177\u5C55\u5F00\u8981\u6587\u6863\u5316\u7684\u6A21\u5757\u96C6\u3002\n\u9ED8\u8BA4\u60C5\u51B5\u4E0B, \u5C06\u4EC5\u6587\u6863\u5316\u547D\u4EE4\u884C\u4E2D\u660E\u786E\n\u6307\u5B9A\u7684\u6A21\u5757\u3002\u503C "public" \u5C06\u989D\u5916\u5305\u542B\n\u8FD9\u4E9B\u6A21\u5757\u7684\u6240\u6709 "requires public"\n\u88AB\u4F9D\u8D56\u5BF9\u8C61\u3002\u503C "all" \u5C06\u5305\u542B\u8FD9\u4E9B\u6A21\u5757\n\u7684\u6240\u6709\u88AB\u4F9D\u8D56\u5BF9\u8C61\u3002 +main.opt.expand.requires.desc=\u6307\u793A\u5DE5\u5177\u5C55\u5F00\u8981\u6587\u6863\u5316\u7684\u6A21\u5757\u96C6\u3002\n\u9ED8\u8BA4\u60C5\u51B5\u4E0B, \u5C06\u4EC5\u6587\u6863\u5316\u547D\u4EE4\u884C\u4E2D\u660E\u786E\n\u6307\u5B9A\u7684\u6A21\u5757\u3002\u503C "transitive" \u5C06\u989D\u5916\u5305\u542B\n\u8FD9\u4E9B\u6A21\u5757\u7684\u6240\u6709 "requires transitive"\n\u88AB\u4F9D\u8D56\u5BF9\u8C61\u3002\u503C "all" \u5C06\u5305\u542B\u8FD9\u4E9B\u6A21\u5757\n\u7684\u6240\u6709\u88AB\u4F9D\u8D56\u5BF9\u8C61\u3002 main.opt.help.desc=\u663E\u793A\u547D\u4EE4\u884C\u9009\u9879\u5E76\u9000\u51FA diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_ja.properties b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_ja.properties index dbde9ce927e..5cdac48be03 100644 --- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_ja.properties +++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_ja.properties @@ -25,7 +25,7 @@ err.cant.find.module.ex=\u30E2\u30B8\u30E5\u30FC\u30EB{0}\u306E\u691C\u7D22\u4E2 main.usage.summary=\u4F7F\u7528\u65B9\u6CD5: {0} \n\u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30EA\u30B9\u30C8\u306B\u3064\u3044\u3066\u306F\u3001-help\u3092\u4F7F\u7528\u3057\u307E\u3059 warn.prefix=\u8B66\u544A: -warn.unexpected.class=\u30D0\u30A4\u30CA\u30EA\u30FB\u30D5\u30A1\u30A4\u30EB{0}\u306B{1}\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059 +warn.unexpected.class=\u30D5\u30A1\u30A4\u30EB{0}\u306B\u30AF\u30E9\u30B9{1}\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u305B\u3093 note.prefix=\u6CE8: diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_zh_CN.properties b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_zh_CN.properties index 74b5cca366e..9aaafbcad36 100644 --- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_zh_CN.properties +++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/javap_zh_CN.properties @@ -25,7 +25,7 @@ err.cant.find.module.ex=\u67E5\u627E\u6A21\u5757 {0} \u65F6\u51FA\u73B0\u95EE\u9 main.usage.summary=\u7528\u6CD5: {0} \n\u4F7F\u7528 -help \u5217\u51FA\u53EF\u80FD\u7684\u9009\u9879 warn.prefix=\u8B66\u544A: -warn.unexpected.class=\u4E8C\u8FDB\u5236\u6587\u4EF6{0}\u5305\u542B{1} +warn.unexpected.class=\u6587\u4EF6 {0} \u4E0D\u5305\u542B\u7C7B {1} note.prefix=\u6CE8: diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/resources/jdeprscan_ja.properties b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/resources/jdeprscan_ja.properties new file mode 100644 index 00000000000..b9f505a4eff --- /dev/null +++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/resources/jdeprscan_ja.properties @@ -0,0 +1,29 @@ +main.usage=\u4F7F\u7528\u65B9\u6CD5: jdeprscan [options] '{dir|jar|class}' ...\n\n\u30AA\u30D7\u30B7\u30E7\u30F3:\n --class-path PATH\n --for-removal\n --full-version\n -h --help\n -l --list\n --release 6|7|8|9\n -v --verbose\n --version + +main.help=\u975E\u63A8\u5968API\u306E\u4F7F\u7528\u306B\u3064\u3044\u3066\u5404\u5F15\u6570\u3092\u30B9\u30AD\u30E3\u30F3\u3057\u307E\u3059\u3002\u5F15\u6570\u306B\u306F\u3001\n\u30D1\u30C3\u30B1\u30FC\u30B8\u968E\u5C64\u306E\u30EB\u30FC\u30C8\u3092\u6307\u5B9A\u3059\u308B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3001JAR\u30D5\u30A1\u30A4\u30EB\u3001\n\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30AF\u30E9\u30B9\u540D\u3092\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\u30AF\u30E9\u30B9\u540D\u306F\u3001\n\u5B8C\u5168\u4FEE\u98FE\u30AF\u30E9\u30B9\u540D\u3092\u4F7F\u7528\u3057\u3066\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30CD\u30B9\u30C8\u3055\u308C\u305F\n\u30AF\u30E9\u30B9\u306F$\u3067\u533A\u5207\u308A\u307E\u3059\u3002\u4F8B:\n\n java.lang.Thread$State\n\n--class-path\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u4F9D\u5B58\u3059\u308B\u30AF\u30E9\u30B9\u306E\u89E3\u6C7A\u306E\u305F\u3081\u306E\n\u691C\u7D22\u30D1\u30B9\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002\n\n--for-removal\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u30B9\u30AD\u30E3\u30F3\u3068\u30EA\u30B9\u30C8\u5316\u3092\u524A\u9664\u4E88\u5B9A\u3067\u975E\u63A8\u5968\u306EAPI\u306B\n\u9650\u5B9A\u3057\u307E\u3059\u3002\u30EA\u30EA\u30FC\u30B9\u5024\u304C6\u30017\u307E\u305F\u306F8\u306E\u5834\u5408\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\n\n--full-version\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u30C4\u30FC\u30EB\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u6587\u5B57\u5217\u306E\u5168\u4F53\u3092\u51FA\u529B\u3057\u307E\u3059\u3002\n\n--help\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u5168\u4F53\u3092\u51FA\u529B\u3057\u307E\u3059\u3002\n\n--list (-l)\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u975E\u63A8\u5968API\u30BB\u30C3\u30C8\u3092\u51FA\u529B\u3057\u307E\u3059\u3002\u30B9\u30AD\u30E3\u30F3\u306F\u884C\u308F\u308C\u306A\u3044\n\u305F\u3081\u3001\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3001JAR\u307E\u305F\u306F\u30AF\u30E9\u30B9\u5F15\u6570\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u3002\n\n--release\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u30B9\u30AD\u30E3\u30F3\u3059\u308B\u975E\u63A8\u5968API\u306E\u30BB\u30C3\u30C8\u3092\u63D0\u4F9B\u3059\u308BJava SE\n\u30EA\u30EA\u30FC\u30B9\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002\n\n--verbose (-v)\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3059\u308B\u3068\u3001\u51E6\u7406\u4E2D\u306B\u8FFD\u52A0\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3067\u304D\u307E\u3059\u3002\n\n--version\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u7C21\u7565\u5316\u3055\u308C\u305F\u30C4\u30FC\u30EB\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u6587\u5B57\u5217\u3092\u51FA\u529B\u3057\u307E\u3059\u3002 + +main.xhelp=\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u30AA\u30D7\u30B7\u30E7\u30F3:\n\n --Xload-class CLASS\n \u6307\u5B9A\u3057\u305F\u30AF\u30E9\u30B9\u304B\u3089\u975E\u63A8\u5968\u60C5\u5831\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002\n --Xload-csv CSVFILE\n \u6307\u5B9A\u3057\u305FCSV\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u975E\u63A8\u5968\u60C5\u5831\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002\n --Xload-dir DIR\n \u6307\u5B9A\u3057\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u3042\u308B\u30AF\u30E9\u30B9\u968E\u5C64\u304B\u3089\u975E\u63A8\u5968\u60C5\u5831\u3092\n \u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002\n --Xload-jar JARFILE\n \u6307\u5B9A\u3057\u305FJAR\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u975E\u63A8\u5968\u60C5\u5831\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002\n --Xload-jdk9 JAVA_HOME\n JAVA_HOME\u306B\u3042\u308BJDK\u304B\u3089\u975E\u63A8\u5968\u60C5\u5831\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002\n \u30E2\u30B8\u30E5\u30E9JDK\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n --Xload-old-jdk JAVA_HOME\n JAVA_HOME\u306B\u3042\u308BJDK\u304B\u3089\u975E\u63A8\u5968\u60C5\u5831\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002\n \u30E2\u30B8\u30E5\u30E9JDK\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u6307\u5B9A\u3057\u305FJDK\u306F\n rt.jar\u30D5\u30A1\u30A4\u30EB\u3092\u6301\u3064"\u30AF\u30E9\u30B7\u30C3\u30AF"\u306AJDK\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n --Xload-self\n \u5B9F\u884C\u4E2DJDK\u30A4\u30E1\u30FC\u30B8\u306Ejrt:\u30D5\u30A1\u30A4\u30EB\u30B7\u30B9\u30C6\u30E0\u3092\u8D70\u67FB\u3059\u308B\u3053\u3068\u306B\u3088\u308A\n \u975E\u63A8\u5968\u60C5\u5831\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002\n --Xcompiler-arg ARG\n \u30B3\u30F3\u30D1\u30A4\u30E9\u5F15\u6570\u306E\u30EA\u30B9\u30C8\u306BARG\u3092\u8FFD\u52A0\u3057\u307E\u3059\u3002\n --Xcsv-comment COMMENT\n \u30B3\u30E1\u30F3\u30C8\u884C\u3068\u3057\u3066COMMENT\u3092\u51FA\u529BCSV\u30D5\u30A1\u30A4\u30EB\u306B\u8FFD\u52A0\u3057\u307E\u3059\u3002\n -Xprint-csv\u3082\u6307\u5B9A\u3057\u305F\u5834\u5408\u306E\u307F\u6709\u52B9\u3067\u3059\u3002\n --Xhelp\n \u3053\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3057\u307E\u3059\u3002\n --Xprint-csv\n \u3042\u3089\u3086\u308B\u30AF\u30E9\u30B9\u307E\u305F\u306FJAR\u30D5\u30A1\u30A4\u30EB\u3092\u30B9\u30AD\u30E3\u30F3\u3059\u308B\u304B\u308F\u308A\u306B\n \u30ED\u30FC\u30C9\u3057\u305F\u975E\u63A8\u5968\u60C5\u5831\u3092\u542B\u3080CSV\u30D5\u30A1\u30A4\u30EB\u3092\u51FA\u529B\u3057\u307E\u3059\u3002 + +scan.process.class=\u51E6\u7406\u30AF\u30E9\u30B9 {0}... + +scan.dep.normal= +scan.dep.removal=(forRemoval=true) + +scan.err.exception=\u30A8\u30E9\u30FC: \u4E88\u671F\u3057\u306A\u3044\u4F8B\u5916{0} +scan.err.noclass=\u30A8\u30E9\u30FC: \u30AF\u30E9\u30B9{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 +scan.err.nofile=\u30A8\u30E9\u30FC: \u30D5\u30A1\u30A4\u30EB{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 +scan.err.nomethod=\u30A8\u30E9\u30FC: Methodref {0}.{1}:{2}\u3092\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093 + +scan.head.jar=JAR\u30D5\u30A1\u30A4\u30EB {0}: +scan.head.dir=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA {0}: + +scan.out.extends={0} {1}\u304C\u975E\u63A8\u5968\u306E\u30AF\u30E9\u30B9{2}\u3092\u62E1\u5F35\u3057\u3066\u3044\u307E\u3059 {3} +scan.out.implements={0} {1}\u304C\u975E\u63A8\u5968\u306E\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9{2}\u3092\u5B9F\u88C5\u3057\u3066\u3044\u307E\u3059 {3} +scan.out.usesclass={0} {1}\u304C\u975E\u63A8\u5968\u306E\u30AF\u30E9\u30B9{2}\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059 {3} +scan.out.usesmethod={0} {1}\u304C\u975E\u63A8\u5968\u30E1\u30BD\u30C3\u30C9{2}::{3}{4}\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059 {5} +scan.out.usesintfmethod={0} {1}\u304C\u975E\u63A8\u5968\u30E1\u30BD\u30C3\u30C9{2}::{3}{4}\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059 {5} +scan.out.usesfield={0} {1}\u304C\u975E\u63A8\u5968\u30D5\u30A3\u30FC\u30EB\u30C9{2}::{3}{4}\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059 +scan.out.hasfield={0} {1}\u306B\u306F\u3001\u975E\u63A8\u5968\u306E\u30BF\u30A4\u30D7{3} {4}\u306E\u3001{2}\u3068\u3044\u3046\u540D\u524D\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u304C\u3042\u308A\u307E\u3059 +scan.out.methodparmtype={0} {1}\u306B\u306F\u3001\u975E\u63A8\u5968\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30BF\u30A4\u30D7{3} {4}\u3092\u6301\u3064{2}\u3068\u3044\u3046\u540D\u524D\u306E\u30E1\u30BD\u30C3\u30C9\u304C\u3042\u308A\u307E\u3059 +scan.out.methodrettype={0} {1}\u306B\u306F\u3001\u975E\u63A8\u5968\u306E\u623B\u308A\u30BF\u30A4\u30D7{3} {4}\u3092\u6301\u3064{2}\u3068\u3044\u3046\u540D\u524D\u306E\u30E1\u30BD\u30C3\u30C9\u304C\u3042\u308A\u307E\u3059 +scan.out.methodoverride={0} {1}\u304C\u975E\u63A8\u5968\u30E1\u30BD\u30C3\u30C9{2}::{3}{4}\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u3066\u3044\u307E\u3059 {5} diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/resources/jdeprscan_zh_CN.properties b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/resources/jdeprscan_zh_CN.properties new file mode 100644 index 00000000000..023b872cb5d --- /dev/null +++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/resources/jdeprscan_zh_CN.properties @@ -0,0 +1,29 @@ +main.usage=\u7528\u6CD5: jdeprscan [\u9009\u9879] '{dir|jar|class}' ...\n\n\u9009\u9879:\n --class-path PATH\n --for-removal\n --full-version\n -h --help\n -l --list\n --release 6|7|8|9\n -v --verbose\n --version + +main.help=\u626B\u63CF\u6BCF\u4E2A\u53C2\u6570\u4EE5\u4E86\u89E3\u662F\u5426\u4F7F\u7528\u4E86\u8FC7\u65F6\u7684 API\u3002\n\u53C2\u6570\u53EF\u4EE5\u662F\u6307\u5B9A\u7A0B\u5E8F\u5305\u5206\u5C42\u7ED3\u6784, JAR \u6587\u4EF6, \n\u7C7B\u6587\u4EF6\u6216\u7C7B\u540D\u7684\u6839\u7684\u76EE\u5F55\u3002\u7C7B\u540D\u5FC5\u987B\n\u4F7F\u7528\u5168\u9650\u5B9A\u7C7B\u540D\u6307\u5B9A, \u5E76\u4F7F\u7528 $ \u5206\u9694\u7B26\n\u6307\u5B9A\u5D4C\u5957\u7C7B, \u4F8B\u5982,\n\n java.lang.Thread$State\n\n--class-path \u9009\u9879\u63D0\u4F9B\u4E86\u7528\u4E8E\u89E3\u6790\u4ECE\u5C5E\u7C7B\u7684\n\u641C\u7D22\u8DEF\u5F84\u3002\n\n--for-removal \u9009\u9879\u9650\u5236\u626B\u63CF\u6216\u5217\u51FA\u5DF2\u8FC7\u65F6\u5E76\u5F85\u5220\u9664\n\u7684 API\u3002\u4E0D\u80FD\u4E0E\u53D1\u884C\u7248\u503C 6, 7 \u6216 8 \u4E00\u8D77\u4F7F\u7528\u3002\n\n--full-version \u9009\u9879\u8F93\u51FA\u5DE5\u5177\u7684\u5B8C\u6574\u7248\u672C\u5B57\u7B26\u4E32\u3002\n\n--help \u9009\u9879\u8F93\u51FA\u5B8C\u6574\u7684\u5E2E\u52A9\u6D88\u606F\u3002\n\n--list (-l) \u9009\u9879\u8F93\u51FA\u4E00\u7EC4\u5DF2\u8FC7\u65F6\u7684 API\u3002\u4E0D\u6267\u884C\u626B\u63CF, \n\u56E0\u6B64\u4E0D\u5E94\u63D0\u4F9B\u4EFB\u4F55\u76EE\u5F55, jar \u6216\u7C7B\u53C2\u6570\u3002\n\n--release \u9009\u9879\u6307\u5B9A\u63D0\u4F9B\u8981\u626B\u63CF\u7684\u5DF2\u8FC7\u65F6 API \u96C6\n\u7684 Java SE \u53D1\u884C\u7248\u3002\n\n--verbose (-v) \u9009\u9879\u5728\u5904\u7406\u671F\u95F4\u542F\u7528\u9644\u52A0\u6D88\u606F\u8F93\u51FA\u3002\n\n--version \u9009\u9879\u8F93\u51FA\u5DE5\u5177\u7684\u7F29\u5199\u7248\u672C\u5B57\u7B26\u4E32\u3002 + +main.xhelp=\u4E0D\u652F\u6301\u7684\u9009\u9879:\n\n --Xload-class CLASS\n \u4ECE\u5DF2\u547D\u540D\u7C7B\u52A0\u8F7D\u8FC7\u65F6\u4FE1\u606F\u3002\n --Xload-csv CSVFILE\n \u4ECE\u5DF2\u547D\u540D CSV \u6587\u4EF6\u52A0\u8F7D\u8FC7\u65F6\u4FE1\u606F\u3002\n --Xload-dir DIR\n \u4ECE\u5DF2\u547D\u540D\u76EE\u5F55\u4E2D\u7684\u7C7B\u5206\u5C42\u7ED3\u6784\u52A0\u8F7D\n \u8FC7\u65F6\u4FE1\u606F\u3002\n --Xload-jar JARFILE\n \u4ECE\u5DF2\u547D\u540D JAR \u6587\u4EF6\u52A0\u8F7D\u8FC7\u65F6\u4FE1\u606F\u3002\n --Xload-jdk9 JAVA_HOME\n \u4ECE\u4F4D\u4E8E JAVA_HOME \u7684 JDK \u4E2D\u52A0\u8F7D\u8FC7\u65F6\u4FE1\u606F, \n \u8BE5 JDK \u5FC5\u987B\u662F\u4E00\u4E2A\u6A21\u5757\u5316 JDK\u3002\n --Xload-old-jdk JAVA_HOME\n \u4ECE\u4F4D\u4E8E JAVA_HOME \u7684 JDK \u4E2D\u52A0\u8F7D\u8FC7\u65F6\u4FE1\u606F, \n \u8BE5 JDK \u4E0D\u80FD\u662F\u4E00\u4E2A\u6A21\u5757\u5316 JDK\u3002\u76F8\u53CD, \n \u5DF2\u547D\u540D JDK \u5FC5\u987B\u662F\u5E26\u6709 rt.jar \u6587\u4EF6\u7684 "\u7ECF\u5178" JDK\u3002\n --Xload-self\n \u901A\u8FC7\u904D\u5386\u6B63\u5728\u8FD0\u884C\u7684 JDK \u6620\u50CF\u7684 jrt: \u6587\u4EF6\u7CFB\u7EDF:\n \u52A0\u8F7D\u8FC7\u65F6\u4FE1\u606F\u3002\n --Xcompiler-arg ARG\n \u5C06 ARG \u6DFB\u52A0\u5230\u7F16\u8BD1\u5668\u53C2\u6570\u5217\u8868\u4E2D\u3002\n --Xcsv-comment COMMENT\n \u5C06 COMMENT \u4F5C\u4E3A\u6CE8\u91CA\u884C\u6DFB\u52A0\u5230\u8F93\u51FA CSV \u6587\u4EF6\u3002\n \u4EC5\u5F53\u540C\u65F6\u63D0\u4F9B\u4E86 -Xprint-csv \u624D\u6709\u6548\u3002\n --Xhelp\n \u8F93\u51FA\u6B64\u6D88\u606F\u3002\n --Xprint-csv\n \u8F93\u51FA\u5305\u542B\u5DF2\u52A0\u8F7D\u8FC7\u65F6\u4FE1\u606F\u7684 CSV \u6587\u4EF6\n \u800C\u4E0D\u626B\u63CF\u4EFB\u4F55\u7C7B\u6216 JAR \u6587\u4EF6\u3002 + +scan.process.class=\u6B63\u5728\u5904\u7406\u7C7B {0}... + +scan.dep.normal= +scan.dep.removal=(forRemoval=true) + +scan.err.exception=\u9519\u8BEF: \u51FA\u73B0\u610F\u5916\u7684\u5F02\u5E38\u9519\u8BEF {0} +scan.err.noclass=\u9519\u8BEF: \u627E\u4E0D\u5230\u7C7B {0} +scan.err.nofile=\u9519\u8BEF: \u627E\u4E0D\u5230\u6587\u4EF6 {0} +scan.err.nomethod=\u9519\u8BEF: \u65E0\u6CD5\u89E3\u6790 Methodref {0}.{1}:{2} + +scan.head.jar=Jar \u6587\u4EF6 {0}: +scan.head.dir=\u76EE\u5F55 {0}: + +scan.out.extends={0} {1} \u6269\u5C55\u5DF2\u8FC7\u65F6\u7684\u7C7B {2} {3} +scan.out.implements={0} {1} \u5B9E\u73B0\u5DF2\u8FC7\u65F6\u7684\u63A5\u53E3 {2} {3} +scan.out.usesclass={0} {1} \u4F7F\u7528\u5DF2\u8FC7\u65F6\u7684\u7C7B {2} {3} +scan.out.usesmethod={0} {1} \u4F7F\u7528\u5DF2\u8FC7\u65F6\u7684\u65B9\u6CD5 {2}::{3}{4} {5} +scan.out.usesintfmethod={0} {1} \u4F7F\u7528\u5DF2\u8FC7\u65F6\u7684\u65B9\u6CD5 {2}::{3}{4} {5} +scan.out.usesfield={0} {1} \u4F7F\u7528\u5DF2\u8FC7\u65F6\u7684\u5B57\u6BB5 {2}::{3} {4} +scan.out.hasfield={0} {1} \u5177\u6709\u540D\u4E3A {2} \u7684\u5B57\u6BB5, \u5176\u7C7B\u578B\u4E3A\u5DF2\u8FC7\u65F6\u7684 {3} {4} +scan.out.methodparmtype={0} {1} \u5177\u6709\u540D\u4E3A {2} \u7684\u65B9\u6CD5, \u5176\u53C2\u6570\u7C7B\u578B\u4E3A\u5DF2\u8FC7\u65F6\u7684 {3} {4} +scan.out.methodrettype={0} {1} \u5177\u6709\u540D\u4E3A {2} \u7684\u65B9\u6CD5, \u5176\u8FD4\u56DE\u7C7B\u578B\u4E3A\u5DF2\u8FC7\u65F6\u7684 {3} {4} +scan.out.methodoverride={0} {1} \u8986\u76D6\u5DF2\u8FC7\u65F6\u7684\u65B9\u6CD5 {2}::{3}{4} {5} diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps_ja.properties b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps_ja.properties index 81987eba461..b93d2067152 100644 --- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps_ja.properties +++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps_ja.properties @@ -44,7 +44,9 @@ main.opt.compile-time=\ --compile-time \u63A8\u79FB\u7684\u306A\ main.opt.apionly=\ -apionly\n --api-only \u5206\u6790\u3092API\u3001\u3064\u307E\u308A\u3001\u30D1\u30D6\u30EA\u30C3\u30AF\u30FB\u30AF\u30E9\u30B9\u306E\n \u30D1\u30D6\u30EA\u30C3\u30AF\u30FB\u30E1\u30F3\u30D0\u30FC\u304A\u3088\u3073\u4FDD\u8B77\u3055\u308C\u305F\u30E1\u30F3\u30D0\u30FC\u306E\n \u7F72\u540D\u306B\u304A\u3051\u308B\u4F9D\u5B58\u6027(\u30D5\u30A3\u30FC\u30EB\u30C9\u30FB\u30BF\u30A4\u30D7\u3001\u30E1\u30BD\u30C3\u30C9\u30FB\n \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30BF\u30A4\u30D7\u3001\u623B\u3055\u308C\u305F\u30BF\u30A4\u30D7\u3001\u30C1\u30A7\u30C3\u30AF\u3055\u308C\u305F\n \u4F8B\u5916\u30BF\u30A4\u30D7\u306A\u3069)\u306B\u5236\u9650\u3057\u307E\u3059\u3002 -main.opt.generate-module-info=\ --generate-module-info \u6307\u5B9A\u3057\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Bmodule-info.java\u3092\u751F\u6210\u3057\u307E\u3059\u3002\n \u6307\u5B9A\u3057\u305FJAR\u30D5\u30A1\u30A4\u30EB\u3092\u5206\u6790\u3057\u307E\u3059\u3002\n \u3053\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F--dot-output\u307E\u305F\u306F--class-path\n \u3068\u4E00\u7DD2\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002 +main.opt.generate-module-info=\ --generate-module-info \u6307\u5B9A\u3057\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Bmodule-info.java\u3092\u751F\u6210\u3057\u307E\u3059\u3002\n \u6307\u5B9A\u3057\u305FJAR\u30D5\u30A1\u30A4\u30EB\u3092\u5206\u6790\u3057\u307E\u3059\u3002\n \u3053\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F--dot-output\u307E\u305F\u306F--class-path\n \u3068\u4E00\u7DD2\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\u30AA\u30FC\u30D7\u30F3\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u306F\n --generate-open-module\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002 + +main.opt.generate-open-module=\ --generate-open-module \u6307\u5B9A\u3057\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u3001\u6307\u5B9A\u3057\u305F\n JAR\u30D5\u30A1\u30A4\u30EB\u306Emodule-info.java\u3092\u30AA\u30FC\u30D7\u30F3\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3068\u3057\u3066\n \u751F\u6210\u3057\u307E\u3059\u3002\u3053\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F--dot-output\n \u307E\u305F\u306F--class-path\u3068\u4E00\u7DD2\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002 main.opt.check=\ --check [,...\n \u6307\u5B9A\u3057\u305F\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u4F9D\u5B58\u6027\u3092\u5206\u6790\u3057\u307E\u3059\n \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u3001\u5206\u6790\u5F8C\u306E\u7D50\u679C\u30E2\u30B8\u30E5\u30FC\u30EB\u4F9D\u5B58\u6027\n \u304A\u3088\u3073\u9077\u79FB\u524A\u6E1B\u5F8C\u306E\u30B0\u30E9\u30D5\u3092\n \u51FA\u529B\u3057\u307E\u3059\u3002\n \u672A\u4F7F\u7528\u306E\u4FEE\u98FE\u3055\u308C\u305F\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3082\u8B58\u5225\u3057\u307E\u3059\u3002 @@ -53,14 +55,20 @@ main.opt.dotoutput=\ -dotoutput \n --dot-output DOT\u30D main.opt.jdkinternals=\ -jdkinternals\n --jdk-internals JDK\u5185\u90E8API\u306E\u30AF\u30E9\u30B9\u30EC\u30D9\u30EB\u306E\u4F9D\u5B58\u6027\u3092\u691C\u51FA\u3057\u307E\u3059\u3002\n \u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u306F\u3001-include\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u6307\u5B9A\u3057\u306A\u3044\u3068\u3001\n --class-path\u306E\u3059\u3079\u3066\u306E\u30AF\u30E9\u30B9\u3068\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u3092\u5206\u6790\u3057\u307E\u3059\u3002\n \u3053\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F-p\u3001-e\u304A\u3088\u3073-s\u30AA\u30D7\u30B7\u30E7\u30F3\u3068\u4E00\u7DD2\u306B\n \u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\n \u8B66\u544A: JDK\u5185\u90E8API\u306F\u3001\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u306A\u304F\u306A\u308A\u307E\u3059\u3002 +main.opt.list-deps=\ --list-deps \u4F9D\u5B58\u95A2\u4FC2\u3068JDK\u5185\u90E8API\u306E\u4F7F\u7528\u3092\n \u30EA\u30B9\u30C8\u3057\u307E\u3059\u3002 + +main.opt.list-reduced-deps=\ --list-reduced-deps --list-deps\u3068\u540C\u3058\u3067\u3059\u304C\u3001\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30B0\u30E9\u30D5\n \u304B\u3089\u542B\u610F\u3055\u308C\u305F\u8AAD\u53D6\u308A\u30A8\u30C3\u30B8\u3092\u30EA\u30B9\u30C8\u3057\u307E\u305B\u3093\n \u30E2\u30B8\u30E5\u30FC\u30EBM1\u304CM2\u3068M3\u306B\u4F9D\u5B58\u3057\u3066\u304A\u308A\u3001\n M2\u304CM3\u4E0A\u3067requires public\u3067\u3042\u308B\u5834\u5408\u3001M3\u3092\u8AAD\u307F\u53D6\u308BM1\u306F\n \u542B\u610F\u3055\u308C\u3066\u304A\u308A\u3001\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30B0\u30E9\u30D5\u304B\u3089\u524A\u9664\u3055\u308C\u307E\u3059\u3002 + main.opt.depth=\ -depth= \u63A8\u79FB\u7684\u306A\u4F9D\u5B58\u6027\u5206\u6790\u306E\u6DF1\u3055\u3092\n \u6307\u5B9A\u3057\u307E\u3059 main.opt.q=\ -q -quiet --generate-module-info\u51FA\u529B\u3067\n \u6B20\u843D\u3057\u3066\u3044\u308B\u4F9D\u5B58\u6027\u3092\u8868\u793A\u3057\u307E\u305B\u3093\u3002 main.opt.multi-release=\ --multi-release \u30DE\u30EB\u30C1\u30EA\u30EA\u30FC\u30B9jar\u30D5\u30A1\u30A4\u30EB\u3092\u51E6\u7406\u3059\u308B\u969B\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\n \u6307\u5B9A\u3057\u307E\u3059\u3002\u306F\u30019\u307E\u305F\u306F\u30D9\u30FC\u30B9\u4EE5\u4E0A\u306E\n \u6574\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 +err.command.set=\u30AA\u30D7\u30B7\u30E7\u30F3{0}\u3068{1}\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002 err.unknown.option=\u4E0D\u660E\u306A\u30AA\u30D7\u30B7\u30E7\u30F3: {0} err.missing.arg={0}\u306B\u5024\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +err.missing.dependences=\u4F9D\u5B58\u6027\u304C\u6B20\u843D\u3057\u3066\u3044\u307E\u3059 err.invalid.arg.for.option=\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u304C\u7121\u52B9\u3067\u3059: {0} err.option.after.class=\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u30AF\u30E9\u30B9\u306E\u524D\u306B\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: {0} err.genmoduleinfo.not.jarfile={0}\u306F\u3001--generate-module-info\u30AA\u30D7\u30B7\u30E7\u30F3\u3068\u3068\u3082\u306B\u6307\u5B9A\u3067\u304D\u306A\u3044\u30E2\u30B8\u30E5\u30E9JAR\u30D5\u30A1\u30A4\u30EB\u3067\u3059 @@ -68,11 +76,11 @@ err.genmoduleinfo.unnamed.package={0}\u306B\u306F\u3001\u30E2\u30B8\u30E5\u30FC\ err.profiles.msg=\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u60C5\u5831\u304C\u3042\u308A\u307E\u305B\u3093 err.exception.message={0} err.invalid.path=\u7121\u52B9\u306A\u30D1\u30B9: {0} -err.invalid.module.option={0}\u306F{1}\u30AA\u30D7\u30B7\u30E7\u30F3\u3068\u4E00\u7DD2\u306B\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002 -err.invalid.filters=--package (-p)\u3001--regex (-e)\u3001--require\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u3044\u305A\u308C\u304B\u3092\u8A2D\u5B9A\u3067\u304D\u307E\u3059 +err.invalid.options={0}\u306F{1}\u30AA\u30D7\u30B7\u30E7\u30F3\u3068\u4E00\u7DD2\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093 err.module.not.found=\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0} err.root.module.not.set=\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30BB\u30C3\u30C8\u304C\u7A7A\u3067\u3059 -err.invalid.inverse.option={0}\u306F--inverse\u30AA\u30D7\u30B7\u30E7\u30F3\u3068\u4E00\u7DD2\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093 +err.option.already.specified={0}\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u8907\u6570\u56DE\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002 +err.filter.not.specified=--package (-p)\u3001--regex (-e)\u3001--require\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 err.multirelease.option.exists={0}\u306F\u30DE\u30EB\u30C1\u30EA\u30EA\u30FC\u30B9jar\u30D5\u30A1\u30A4\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u304C\u3001--multi-release\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059 err.multirelease.option.notfound={0}\u306F\u30DE\u30EB\u30C1\u30EA\u30EA\u30FC\u30B9jar\u30D5\u30A1\u30A4\u30EB\u3067\u3059\u304C\u3001--multi-release\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093 err.multirelease.version.associated=\u30AF\u30E9\u30B9{0}\u306F\u3059\u3067\u306B\u30D0\u30FC\u30B8\u30E7\u30F3{1}\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u3059\u3002\u30D0\u30FC\u30B8\u30E7\u30F3{2}\u306E\u8FFD\u52A0\u3092\u8A66\u307F\u307E\u3059 @@ -82,5 +90,10 @@ warn.skipped.entry={0} warn.split.package=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306F{1} {2}\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059 warn.replace.useJDKInternals=JDK\u5185\u90E8API\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u304A\u3089\u305A\u3001JDK\u5B9F\u88C5\u5C02\u7528\u3067\u3059\u304C\u3001\u4E92\u63DB\u6027\u306A\u3057\u3067\n\u524A\u9664\u307E\u305F\u306F\u5909\u66F4\u3055\u308C\u308B\u5834\u5408\u304C\u3042\u308A\u3001\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u3092\u4E2D\u65AD\u3055\u305B\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\nJDK\u5185\u90E8API\u306E\u4F9D\u5B58\u6027\u3092\u524A\u9664\u3059\u308B\u3088\u3046\u30B3\u30FC\u30C9\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002\nJDK\u5185\u90E8API\u306E\u7F6E\u63DB\u306B\u95A2\u3059\u308B\u6700\u65B0\u306E\u66F4\u65B0\u306B\u3064\u3044\u3066\u306F\u3001\u6B21\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044:\n{0} +split.package=\u5206\u5272\u30D1\u30C3\u30B1\u30FC\u30B8: {0} {1}\n +inverse.transitive.dependencies.on={0}\u4E0A\u3067\u63A8\u79FB\u7684\u306A\u4F9D\u5B58\u6027\u3092\u9006\u8EE2\u3057\u307E\u3059 +inverse.transitive.dependencies.matching={0}\u306B\u4E00\u81F4\u3059\u308B\u63A8\u79FB\u7684\u306A\u4F9D\u5B58\u6027\u3092\u9006\u8EE2\u3057\u307E\u3059 +internal.api.column.header=JDK\u5185\u90E8API +public.api.replacement.column.header=\u4FEE\u6B63\u5019\u88DC artifact.not.found=\u898B\u3064\u304B\u308A\u307E\u305B\u3093 jdeps.wiki.url=https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+Tool diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps_zh_CN.properties b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps_zh_CN.properties index 2275bc393ed..bacd9800783 100644 --- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps_zh_CN.properties +++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps_zh_CN.properties @@ -44,7 +44,9 @@ main.opt.compile-time=\ --compile-time \u8FC7\u6E21\u88AB\u4F9D\ main.opt.apionly=\ -apionly\n --api-only \u901A\u8FC7\u516C\u5171\u7C7B (\u5305\u62EC\u5B57\u6BB5\u7C7B\u578B, \u65B9\u6CD5\n \u53C2\u6570\u7C7B\u578B, \u8FD4\u56DE\u7C7B\u578B, \u53D7\u63A7\u5F02\u5E38\u9519\u8BEF\n \u7C7B\u578B\u7B49) \u7684\u516C\u5171\u548C\u53D7\u4FDD\u62A4\u6210\u5458\u7684\u7B7E\u540D\n \u9650\u5236\u5BF9 API (\u5373\u88AB\u4F9D\u8D56\u5BF9\u8C61)\n \u8FDB\u884C\u5206\u6790\u3002 -main.opt.generate-module-info=\ --generate-module-info <\u76EE\u5F55> \u5728\u6307\u5B9A\u76EE\u5F55\u4E0B\u751F\u6210 module-info.java\u3002\n \u5C06\u5206\u6790\u6307\u5B9A\u7684 JAR \u6587\u4EF6\u3002\n \u6B64\u9009\u9879\u4E0D\u80FD\u4E0E --dot-output \n \u6216 --class-path \u4E00\u8D77\u4F7F\u7528\u3002 +main.opt.generate-module-info=\ --generate-module-info <\u76EE\u5F55> \u5728\u6307\u5B9A\u76EE\u5F55\u4E0B\u751F\u6210 module-info.java\u3002\n \u5C06\u5206\u6790\u6307\u5B9A\u7684 JAR \u6587\u4EF6\u3002\n \u6B64\u9009\u9879\u4E0D\u80FD\u4E0E --dot-output \n \u6216 --class-path \u4E00\u8D77\u4F7F\u7528\u3002\u5BF9\u6253\u5F00\u7684\n \u6A21\u5757\u4F7F\u7528 --generate-open-module \u9009\u9879\u3002 + +main.opt.generate-open-module=\ --generate-open-module \u4EE5\u6253\u5F00\u6A21\u5757\u7684\u65B9\u5F0F\u4E3A\u6307\u5B9A\u76EE\u5F55\u4E0B\u7684\n \u6307\u5B9A JAR \u6587\u4EF6\u751F\u6210 module-info.java\u3002\n \u6B64\u9009\u9879\u4E0D\u80FD\u4E0E --dot-output \u6216\n --class-path \u4E00\u8D77\u4F7F\u7528\u3002 main.opt.check=\ --check <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...\n \u5206\u6790\u6307\u5B9A\u6A21\u5757\u7684\u88AB\u4F9D\u8D56\u5BF9\u8C61\n \u5B83\u8F93\u51FA\u6A21\u5757\u63CF\u8FF0\u7B26, \u5206\u6790\u4E4B\u540E\n \u751F\u6210\u7684\u6A21\u5757\u88AB\u4F9D\u8D56\u5BF9\u8C61\u4EE5\u53CA\n \u8F6C\u6362\u51CF\u5C11\u4E4B\u540E\u7684\u56FE\u5F62\u3002\u5B83\u8FD8\n \u6307\u793A\u4EFB\u4F55\u672A\u4F7F\u7528\u7684\u5408\u683C\u5BFC\u51FA\u3002 @@ -53,14 +55,20 @@ main.opt.dotoutput=\ -dotoutput <\u76EE\u5F55>\n --dot-output <\u76EE\u5F55> main.opt.jdkinternals=\ -jdkinternals\n --jdk-internals \u5728 JDK \u5185\u90E8 API \u4E0A\u67E5\u627E\u7C7B\u7EA7\u522B\u7684\u88AB\u4F9D\u8D56\u5BF9\u8C61\u3002\n \u9664\u975E\u6307\u5B9A\u4E86 -include \u9009\u9879, \u5426\u5219\u9ED8\u8BA4\u60C5\u51B5\u4E0B,\n \u5B83\u5206\u6790 --class-path \u4E0A\u7684\u6240\u6709\u7C7B\u548C\u8F93\u5165\u6587\u4EF6\u3002\n \u6B64\u9009\u9879\u4E0D\u80FD\u4E0E -p, -e \u548C -s \u9009\u9879\n \u4E00\u8D77\u4F7F\u7528\u3002\n \u8B66\u544A: \u65E0\u6CD5\u8BBF\u95EE JDK \u5185\u90E8 API\u3002 +main.opt.list-deps=\ --list-deps \u5217\u51FA JDK \u5185\u90E8 API \u7684\n \u88AB\u4F9D\u8D56\u5BF9\u8C61\u548C\u4F7F\u7528\u60C5\u51B5\u3002 + +main.opt.list-reduced-deps=\ --list-reduced-deps \u4E0E --list-deps \u76F8\u540C, \u4E0D\u5217\u51FA\n \u6A21\u5757\u56FE\u4E2D\u7684\u9690\u5F0F\u8BFB\u53D6\u7EF4\u8FB9\u3002\n \u5982\u679C\u6A21\u5757 M1 \u4F9D\u8D56\u4E8E M2 \u548C M3,\n M2 \u8981\u6C42\u5728 M3 \u4E0A\u662F\u516C\u5171\u7684, \u5219 M1 \u8BFB\u53D6 M3 \n \u7684\u64CD\u4F5C\u662F\u9690\u5F0F\u7684, \u5E76\u4E14\u4F1A\u4ECE\u6A21\u5757\u56FE\u4E2D\u5220\u9664\u3002 + main.opt.depth=\ -depth=<\u6DF1\u5EA6> \u6307\u5B9A\u8FC7\u6E21\u88AB\u4F9D\u8D56\u5BF9\u8C61\u5206\u6790\n \u7684\u6DF1\u5EA6 main.opt.q=\ -q -quiet \u5728 --generate-module-info \u8F93\u51FA\u4E2D\n \u4E0D\u663E\u793A\u7F3A\u5C11\u7684\u88AB\u4F9D\u8D56\u5BF9\u8C61\u3002 main.opt.multi-release=\ --multi-release <\u7248\u672C> \u6307\u5B9A\u5904\u7406\u591A\u53D1\u884C\u7248 jar \u6587\u4EF6\u65F6\u7684\n \u7248\u672C\u3002<\u7248\u672C> \u5E94\u4E3A\u5927\u4E8E\u7B49\u4E8E 9 \n \u7684\u6574\u6570\u6216\u57FA\u6570\u3002 +err.command.set=\u6307\u5B9A\u4E86 {0} \u548C {1} \u9009\u9879\u3002 err.unknown.option=\u672A\u77E5\u9009\u9879: {0} err.missing.arg=\u6CA1\u6709\u4E3A{0}\u6307\u5B9A\u503C +err.missing.dependences=\u7F3A\u5C11\u88AB\u4F9D\u8D56\u5BF9\u8C61 err.invalid.arg.for.option=\u9009\u9879\u7684\u53C2\u6570\u65E0\u6548: {0} err.option.after.class=\u5FC5\u987B\u5728\u7C7B\u4E4B\u524D\u6307\u5B9A\u9009\u9879: {0} err.genmoduleinfo.not.jarfile={0} \u662F\u65E0\u6CD5\u4F7F\u7528 --generate-module-info \u9009\u9879\u6307\u5B9A\u7684\u6A21\u5757\u5316 JAR \u6587\u4EF6 @@ -68,11 +76,11 @@ err.genmoduleinfo.unnamed.package={0} \u5305\u542B\u6A21\u5757\u4E2D\u4E0D\u5141 err.profiles.msg=\u6CA1\u6709\u914D\u7F6E\u6587\u4EF6\u4FE1\u606F err.exception.message={0} err.invalid.path=\u65E0\u6548\u8DEF\u5F84: {0} -err.invalid.module.option=\u65E0\u6CD5\u4F7F\u7528 {1} \u9009\u9879\u8BBE\u7F6E {0}\u3002 -err.invalid.filters=\u53EA\u80FD\u8BBE\u7F6E --package (-p), --regex (-e), --require \u9009\u9879\u4E2D\u7684\u4E00\u4E2A +err.invalid.options={0} \u4E0D\u80FD\u4E0E {1} \u9009\u9879\u4E00\u8D77\u4F7F\u7528 err.module.not.found=\u627E\u4E0D\u5230\u6A21\u5757: {0} err.root.module.not.set=\u6839\u6A21\u5757\u96C6\u4E3A\u7A7A -err.invalid.inverse.option={0} \u4E0D\u80FD\u4E0E --inverse \u9009\u9879\u4E00\u8D77\u4F7F\u7528 +err.option.already.specified=\u591A\u6B21\u6307\u5B9A\u4E86 {0} \u9009\u9879\u3002 +err.filter.not.specified=\u5FC5\u987B\u6307\u5B9A --package (-p), --regex (-e), --require \u9009\u9879 err.multirelease.option.exists={0} \u4E0D\u662F\u591A\u53D1\u884C\u7248 jar \u6587\u4EF6, \u4F46\u8BBE\u7F6E\u4E86 --multi-release \u9009\u9879 err.multirelease.option.notfound={0} \u662F\u591A\u53D1\u884C\u7248 jar \u6587\u4EF6, \u4F46\u672A\u8BBE\u7F6E --multi-release \u9009\u9879 err.multirelease.version.associated=\u7C7B {0} \u5DF2\u4E0E\u7248\u672C {1} \u5173\u8054, \u6B63\u5728\u5C1D\u8BD5\u6DFB\u52A0\u7248\u672C {2} @@ -82,5 +90,10 @@ warn.skipped.entry={0} warn.split.package=\u5DF2\u5728{1} {2}\u4E2D\u5B9A\u4E49\u7A0B\u5E8F\u5305{0} warn.replace.useJDKInternals=\u4E0D\u652F\u6301 JDK \u5185\u90E8 API, \u5B83\u4EEC\u4E13\u7528\u4E8E\u901A\u8FC7\u4E0D\u517C\u5BB9\u65B9\u5F0F\u6765\n\u5220\u9664\u6216\u66F4\u6539\u7684 JDK \u5B9E\u73B0, \u53EF\u80FD\u4F1A\u635F\u574F\u60A8\u7684\u5E94\u7528\u7A0B\u5E8F\u3002\n\u8BF7\u4FEE\u6539\u60A8\u7684\u4EE3\u7801, \u6D88\u9664\u4E0E\u4EFB\u4F55 JDK \u5185\u90E8 API \u7684\u76F8\u5173\u6027\u3002\n\u6709\u5173 JDK \u5185\u90E8 API \u66FF\u6362\u7684\u6700\u65B0\u66F4\u65B0, \u8BF7\u67E5\u770B:\n{0} +split.package=\u62C6\u5206\u7A0B\u5E8F\u5305: {0} {1}\n +inverse.transitive.dependencies.on={0} \u7684\u9006\u5411\u8FC7\u6E21\u88AB\u4F9D\u8D56\u5BF9\u8C61 +inverse.transitive.dependencies.matching=\u4E0E {0} \u5339\u914D\u7684\u9006\u5411\u8FC7\u6E21\u88AB\u4F9D\u8D56\u5BF9\u8C61 +internal.api.column.header=JDK \u5185\u90E8 API +public.api.replacement.column.header=\u5EFA\u8BAE\u7684\u66FF\u6362 artifact.not.found=\u627E\u4E0D\u5230 jdeps.wiki.url=https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+Tool diff --git a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_ja.properties b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_ja.properties index 1ffec588afa..09c1c3c2b4a 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_ja.properties +++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,11 +23,11 @@ # questions. # -jshell.msg.welcome =JShell\u3078\u3088\u3046\u3053\u305D -- \u30D0\u30FC\u30B8\u30E7\u30F3{0}\n\u6982\u8981\u306B\u3064\u3044\u3066\u306F\u3001\u6B21\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044: /help intro\n +jshell.msg.welcome =JShell\u3078\u3088\u3046\u3053\u305D -- \u30D0\u30FC\u30B8\u30E7\u30F3{0}\n\u6982\u8981\u306B\u3064\u3044\u3066\u306F\u3001\u6B21\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044: /help intro jshell.err.opt.arg = {0}\u3078\u306E\u5F15\u6570\u304C\u3042\u308A\u307E\u305B\u3093\u3002 jshell.err.opt.invalid = \u7121\u52B9\u306A\u30AA\u30D7\u30B7\u30E7\u30F3: {0}\u3002 jshell.err.opt.one = {0}\u30AA\u30D7\u30B7\u30E7\u30F3\u306F1\u3064\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002 -jshell.err.opt.startup.one = --startup\u307E\u305F\u306F--no-startup\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u3069\u3061\u3089\u304B\u4E00\u65B9\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002 +jshell.err.opt.startup.conflict = \u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u7AF6\u5408: --startup\u3068--no-startup\u306E\u4E21\u65B9\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059\u3002 jshell.err.opt.feedback.one = \u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3(--feedback\u3001-q\u3001-s\u307E\u305F\u306F-v)\u306F1\u3064\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002 jshell.err.opt.unknown = \u4E0D\u660E\u306A\u30AA\u30D7\u30B7\u30E7\u30F3: {0} @@ -48,12 +48,15 @@ jshell.err.unexpected.exception = \u4E88\u671F\u3057\u306A\u3044\u4F8B\u5916: {0 jshell.err.no.such.command.or.snippet.id = \u6307\u5B9A\u3055\u308C\u305F\u30B3\u30DE\u30F3\u30C9\u307E\u305F\u306F\u30B9\u30CB\u30DA\u30C3\u30C8ID\u306F\u5B58\u5728\u3057\u307E\u305B\u3093: {0} jshell.err.command.ambiguous = \u30B3\u30DE\u30F3\u30C9: ''{0}''\u306F\u3042\u3044\u307E\u3044\u3067\u3059: {1} +jshell.msg.set.restore = \u65B0\u3057\u3044\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u8A2D\u5B9A\u3068\u72B6\u614B\u306E\u5FA9\u5143\u3002 jshell.msg.set.editor.set = \u30A8\u30C7\u30A3\u30BF\u306F\u6B21\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059: {0} jshell.msg.set.editor.retain = \u30A8\u30C7\u30A3\u30BF\u8A2D\u5B9A\u304C\u4FDD\u6301\u3055\u308C\u3066\u3044\u307E\u3059: {0} -jshell.err.cant.launch.editor = \u30A8\u30C7\u30A3\u30BF\u3092\u8D77\u52D5\u3067\u304D\u307E\u305B\u3093 -- \u4E88\u671F\u3057\u306A\u3044\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F: {0} -jshell.msg.try.set.editor = \u5916\u90E8\u30A8\u30C7\u30A3\u30BF\u3092\u4F7F\u7528\u3059\u308B\u306B\u306F\u3001/set editor\u3092\u5B9F\u884C\u3057\u3066\u3057\u3066\u304F\u3060\u3055\u3044\u3002 +jshell.err.no.builtin.editor = \u7D44\u8FBC\u307F\u30A8\u30C7\u30A3\u30BF\u304C\u3042\u308A\u307E\u305B\u3093\u3002 +jshell.err.cant.launch.editor = \u7D44\u8FBC\u307F\u30A8\u30C7\u30A3\u30BF\u3092\u8D77\u52D5\u3067\u304D\u307E\u305B\u3093 -- \u4E88\u671F\u3057\u306A\u3044\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F: {0} +jshell.msg.try.set.editor = \u5916\u90E8\u30A8\u30C7\u30A3\u30BF\u3092\u4F7F\u7528\u3059\u308B\u306B\u306F\u3001''/help /set editor''\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002 jshell.msg.press.return.to.leave.edit.mode = \u300C\u623B\u308B\u300D\u3092\u62BC\u3059\u3068\u7DE8\u96C6\u30E2\u30FC\u30C9\u304C\u7D42\u4E86\u3057\u307E\u3059\u3002 jshell.err.wait.applies.to.external.editor = -wait\u306F\u5916\u90E8\u30A8\u30C7\u30A3\u30BF\u306B\u9069\u7528\u3055\u308C\u307E\u3059 +jshell.label.editpad = Shell Edit Pad jshell.err.setting.to.retain.must.be.specified = \u4FDD\u6301\u3059\u308B\u8A2D\u5B9A\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 -- {0} jshell.msg.set.show.mode.settings = \n\u30E2\u30FC\u30C9\u8A2D\u5B9A\u3092\u8868\u793A\u3059\u308B\u306B\u306F\u3001''/set prompt''\u3001''/set truncation'' ...\u3092\u4F7F\u7528\u3059\u308B\u304B\u3001\n''/set mode''\u306E\u5F8C\u306B\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u540D\u3092\u7D9A\u3051\u3066\u4F7F\u7528\u3057\u307E\u3059\u3002 @@ -84,7 +87,7 @@ jshell.msg.classpath = \u30D1\u30B9''{0}''\u304C\u30AF\u30E9\u30B9\u30D1\u30B9\u jshell.err.help.arg = \u6307\u5B9A\u3057\u305F\u5F15\u6570\u3067\u59CB\u307E\u308B\u30B3\u30DE\u30F3\u30C9\u307E\u305F\u306F\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u306F\u3042\u308A\u307E\u305B\u3093: {0} jshell.msg.help.begin =Java\u8A00\u8A9E\u306E\u5F0F\u3001\u6587\u307E\u305F\u306F\u5BA3\u8A00\u3092\u5165\u529B\u3057\u307E\u3059\u3002\n\u307E\u305F\u306F\u3001\u6B21\u306E\u30B3\u30DE\u30F3\u30C9\u306E\u3044\u305A\u308C\u304B\u3092\u5165\u529B\u3057\u307E\u3059:\n -jshell.msg.help.subject =\n\u8A73\u7D30\u306F\u3001''/help''\u306E\u5F8C\u306B\u30B3\u30DE\u30F3\u30C9\u307E\u305F\u306F\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u540D\u524D\u3092\u7D9A\u3051\u3066\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n\u305F\u3068\u3048\u3070\u3001''/help /list''\u307E\u305F\u306F''/help intro''\u306A\u3069\u3067\u3059\u3002\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8:\n +jshell.msg.help.subject =\n\u8A73\u7D30\u306F\u3001''/help''\u306E\u5F8C\u306B\u30B3\u30DE\u30F3\u30C9\u307E\u305F\u306F\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u540D\u524D\u3092\u7D9A\u3051\u3066\n\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n\u305F\u3068\u3048\u3070\u3001''/help /list''\u307E\u305F\u306F''/help intro''\u306A\u3069\u3067\u3059\u3002\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8:\n jshell.err.drop.arg =/drop\u5F15\u6570\u306B\u306F\u3001\u524A\u9664\u3059\u308B\u30A4\u30F3\u30DD\u30FC\u30C8\u3001\u5909\u6570\u3001\u30E1\u30BD\u30C3\u30C9\u307E\u305F\u306F\u30AF\u30E9\u30B9\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002\nID\u307E\u305F\u306F\u540D\u524D\u3067\u6307\u5B9A\u3057\u307E\u3059\u3002ID\u3092\u53C2\u7167\u3059\u308B\u306B\u306F/list\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\u3059\u3079\u3066\u306E\u72B6\u614B\u3092\u30EA\u30BB\u30C3\u30C8\u3059\u308B\u306B\u306F/reset\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002 jshell.err.drop.ambiguous = \u5F15\u6570\u304C\u3001\u8907\u6570\u306E\u30A4\u30F3\u30DD\u30FC\u30C8\u3001\u5909\u6570\u3001\u30E1\u30BD\u30C3\u30C9\u307E\u305F\u306F\u30AF\u30E9\u30B9\u3092\u53C2\u7167\u3057\u3066\u3044\u307E\u3059\u3002 @@ -133,6 +136,11 @@ jshell.err.the.snippet.cannot.be.used.with.this.command = \u3053\u306E\u30B3\u30 jshell.err.retained.mode.failure = \u4FDD\u6301\u3055\u308C\u305F\u30E2\u30FC\u30C9\u3067\u5931\u6557\u3057\u307E\u3057\u305F(\u30E2\u30FC\u30C9\u306F\u30AF\u30EA\u30A2\u3055\u308C\u307E\u3057\u305F) -- {0} {1} jshell.console.see.more = <\u8A73\u7D30\u306F\u3001\u30BF\u30D6\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044> +jshell.console.see.javadoc = +jshell.console.see.help = <\u8A73\u7D30\u30D8\u30EB\u30D7\u3092\u53C2\u7167\u3059\u308B\u306B\u306F[Shift]-[Tab]\u3092\u3082\u3046\u4E00\u5EA6\u62BC\u3057\u307E\u3059> +jshell.console.see.next.page = <\u6B21\u306E\u30DA\u30FC\u30B8\u306B\u9032\u3080\u306B\u306F\u30B9\u30DA\u30FC\u30B9\u3092\u3001\u7D42\u4E86\u3059\u308B\u306B\u306FQ\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044> +jshell.console.see.next.javadoc = <\u6B21\u306Ejavadoc\u306B\u9032\u3080\u306B\u306F\u30B9\u30DA\u30FC\u30B9\u3092\u3001\u7D42\u4E86\u3059\u308B\u306B\u306FQ\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044> +jshell.console.no.javadoc = jshell.console.do.nothing = \u4F55\u3082\u3057\u306A\u3044 jshell.console.choice = \u9078\u629E: jshell.console.create.variable = \u5909\u6570\u306E\u4F5C\u6210 @@ -142,7 +150,7 @@ jshell.console.incomplete = \n\u7D50\u679C\u304C\u4E0D\u5B8C\u5168\u3067\u3042\u help.usage = \u4F7F\u7528\u65B9\u6CD5: jshell \n\u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059:\n --class-path \u30E6\u30FC\u30B6\u30FC\u30FB\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u3042\u308B\u5834\u6240\u3092\u6307\u5B9A\u3057\u307E\u3059\n --module-path \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u3042\u308B\u5834\u6240\u3092\u6307\u5B9A\u3057\u307E\u3059\n --add-modules (,)*\n \u89E3\u6C7A\u3059\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u3001\u307E\u305F\u306F\u304CALL-MODULE-PATH\n \u3067\u3042\u308B\u5834\u5408\u306F\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9\u306E\u3059\u3079\u3066\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u6307\u5B9A\u3057\u307E\u3059\n --startup \u8D77\u52D5\u5B9A\u7FA9\u306E\u4EE3\u66FF\u3068\u3057\u3066\u5B9F\u884C\u3055\u308C\u307E\u3059\n --no-startup \u8D77\u52D5\u5B9A\u7FA9\u3092\u5B9F\u884C\u3057\u307E\u305B\u3093\n --feedback \u521D\u671F\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002\u30E2\u30FC\u30C9\u306F\n \u4E8B\u524D\u306B\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u308B(silent\u3001concise\u3001normal\u307E\u305F\u306Fverbose)\u304B\u3001\n \u4E8B\u524D\u306B\u30E6\u30FC\u30B6\u30FC\u304C\u5B9A\u7FA9\u3067\u304D\u307E\u3059\n -q \u7C21\u6F54\u306A\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3002--feedback concise\u3068\u540C\u3058\n -s \u975E\u5E38\u306B\u7C21\u6F54\u306A\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3002--feedback silent\u3068\u540C\u3058\n -v \u8A73\u7D30\u306A\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3002--feedback verbose\u3068\u540C\u3058\n -J \u3092\u5B9F\u884C\u6642\u30B7\u30B9\u30C6\u30E0\u306B\u76F4\u63A5\u6E21\u3057\u307E\u3059\u3002\n \u5B9F\u884C\u6642\u30D5\u30E9\u30B0\u307E\u305F\u306F\u30D5\u30E9\u30B0\u5F15\u6570\u3054\u3068\u306B1\u3064\u306E-J\u3092\u4F7F\u7528\u3057\u307E\u3059\n -R \u3092\u30EA\u30E2\u30FC\u30C8\u5B9F\u884C\u6642\u30B7\u30B9\u30C6\u30E0\u306B\u6E21\u3057\u307E\u3059\u3002\n \u30EA\u30E2\u30FC\u30C8\u30FB\u30D5\u30E9\u30B0\u307E\u305F\u306F\u30D5\u30E9\u30B0\u5F15\u6570\u3054\u3068\u306B1\u3064\u306E-R\u3092\u4F7F\u7528\u3057\u307E\u3059\n -C \u3092\u30B3\u30F3\u30D1\u30A4\u30E9\u306B\u6E21\u3057\u307E\u3059\u3002\n \u30B3\u30F3\u30D1\u30A4\u30E9\u30FB\u30D5\u30E9\u30B0\u307E\u305F\u306F\u30D5\u30E9\u30B0\u5F15\u6570\u3054\u3068\u306B1\u3064\u306E-C\u3092\u4F7F\u7528\u3057\u307E\u3059\n --help \u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u6982\u8981\u3092\u51FA\u529B\u3057\u307E\u3059\n --version \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\n -X \u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u95A2\u3059\u308B\u30D8\u30EB\u30D7\u3092\u51FA\u529B\u3057\u307E\u3059\n -help.usage.x = \ --add-exports / \u6307\u5B9A\u3057\u305F\u30E2\u30B8\u30E5\u30FC\u30EB\u56FA\u6709\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u30B9\u30CB\u30DA\u30C3\u30C8\u306B\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3057\u307E\u3059\n \n\u3053\u308C\u3089\u306F\u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u3042\u308A\u4E88\u544A\u306A\u3057\u306B\u5909\u66F4\u3055\u308C\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002\n +help.usage.x = \ --add-exports / \u6307\u5B9A\u3057\u305F\u30E2\u30B8\u30E5\u30FC\u30EB\u56FA\u6709\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u30B9\u30CB\u30DA\u30C3\u30C8\u306B\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3057\u307E\u3059\n ---execution \u4EE3\u66FF\u5B9F\u884C\u30A8\u30F3\u30B8\u30F3\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002\n \u3053\u3053\u3067\u3001\u306FExecutionControl spec\u3067\u3059\u3002\n spec\u306E\u69CB\u6587\u306B\u3064\u3044\u3066\u306F\u3001\u30D1\u30C3\u30B1\u30FC\u30B8jdk.jshell.spi\u306E\n \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n \n\u3053\u308C\u3089\u306F\u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u3042\u308A\u4E88\u544A\u306A\u3057\u306B\u5909\u66F4\u3055\u308C\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002\n help.list.summary = \u5165\u529B\u3057\u305F\u30BD\u30FC\u30B9\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059 help.list.args = [|-all|-start] @@ -185,16 +193,16 @@ help.exit.args = help.exit =jshell\u30C4\u30FC\u30EB\u3092\u7D42\u4E86\u3057\u307E\u3059\u3002\u4F5C\u696D\u306F\u4FDD\u5B58\u3055\u308C\u307E\u305B\u3093\u3002\n\u3053\u306E\u30B3\u30DE\u30F3\u30C9\u3092\u4F7F\u7528\u3059\u308B\u524D\u306B\u3059\u3079\u3066\u306E\u4F5C\u696D\u3092\u4FDD\u5B58\u3057\u3066\u304F\u3060\u3055\u3044 help.reset.summary = reset jshell -help.reset.args = -help.reset =jshell\u30C4\u30FC\u30EB\u30FB\u30B3\u30FC\u30C9\u304A\u3088\u3073\u5B9F\u884C\u72B6\u614B\u3092\u30EA\u30BB\u30C3\u30C8\u3057\u307E\u3059:\n\t* \u5165\u529B\u3057\u305F\u3059\u3079\u3066\u306E\u30B3\u30FC\u30C9\u304C\u5931\u308F\u308C\u307E\u3059\u3002\n\t* \u8D77\u52D5\u30B3\u30FC\u30C9\u304C\u518D\u5B9F\u884C\u3055\u308C\u307E\u3059\u3002\n\t* \u5B9F\u884C\u72B6\u614B\u306F\u518D\u5EA6\u958B\u59CB\u3055\u308C\u307E\u3059\u3002\n\t* \u30AF\u30E9\u30B9\u30D1\u30B9\u306F\u30AF\u30EA\u30A2\u3055\u308C\u307E\u3059\u3002\n\u30C4\u30FC\u30EB\u8A2D\u5B9A\u306F\u6B21\u3067\u8A2D\u5B9A\u3055\u308C\u305F\u3088\u3046\u306B\u4FDD\u6301\u3055\u308C\u307E\u3059: /set ...\n\u3053\u306E\u30B3\u30DE\u30F3\u30C9\u3092\u4F7F\u7528\u3059\u308B\u524D\u306B\u3059\u3079\u3066\u306E\u4F5C\u696D\u3092\u4FDD\u5B58\u3057\u3066\u304F\u3060\u3055\u3044 +help.reset.args = [-class-path ] [-module-path ] [-add-modules ]... +help.reset =jshell\u30C4\u30FC\u30EB\u30FB\u30B3\u30FC\u30C9\u304A\u3088\u3073\u5B9F\u884C\u72B6\u614B\u3092\u30EA\u30BB\u30C3\u30C8\u3057\u307E\u3059:\n\t* \u5165\u529B\u3057\u305F\u3059\u3079\u3066\u306E\u30B3\u30FC\u30C9\u304C\u5931\u308F\u308C\u307E\u3059\u3002\n\t* \u8D77\u52D5\u30B3\u30FC\u30C9\u304C\u518D\u5B9F\u884C\u3055\u308C\u307E\u3059\u3002\n\t* \u5B9F\u884C\u72B6\u614B\u306F\u518D\u5EA6\u958B\u59CB\u3055\u308C\u307E\u3059\u3002\n\t\u30C4\u30FC\u30EB\u8A2D\u5B9A\u306F\u6B21\u3067\u8A2D\u5B9A\u3055\u308C\u305F\u3088\u3046\u306B\u4FDD\u6301\u3055\u308C\u307E\u3059: /set ...\n\u3053\u306E\u30B3\u30DE\u30F3\u30C9\u3092\u4F7F\u7528\u3059\u308B\u524D\u306B\u3059\u3079\u3066\u306E\u4F5C\u696D\u3092\u4FDD\u5B58\u3057\u3066\u304F\u3060\u3055\u3044\n/reset\u30B3\u30DE\u30F3\u30C9\u306F\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u53D7\u3051\u5165\u308C\u307E\u3059\u3002\u6B21\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044:\n\n\t/help context\n help.reload.summary = \u30EA\u30BB\u30C3\u30C8\u3057\u3066\u95A2\u9023\u3059\u308B\u5C65\u6B74\u3092\u30EA\u30D7\u30EC\u30A4\u3057\u307E\u3059 -- \u73FE\u5728\u307E\u305F\u306F\u4EE5\u524D(-restore) -help.reload.args = [-restore] [-quiet] -help.reload =jshell\u30C4\u30FC\u30EB\u30FB\u30B3\u30FC\u30C9\u304A\u3088\u3073\u5B9F\u884C\u72B6\u614B\u3092\u30EA\u30BB\u30C3\u30C8\u3057\u3001\u5404\u6709\u52B9\u30B9\u30CB\u30DA\u30C3\u30C8\n\u304A\u3088\u3073\u4EFB\u610F\u306E/drop\u307E\u305F\u306F/classpath\u30B3\u30DE\u30F3\u30C9\u3092\u5165\u529B\u3055\u308C\u305F\u9806\u756A\u3067\u30EA\u30D7\u30EC\u30A4\u3057\u307E\u3059\u3002\n\n/reload\n\t\u30EA\u30BB\u30C3\u30C8\u3055\u308C\u3001jshell\u304C\u5165\u529B\u3055\u308C\u305F\u3001\u3042\u308B\u3044\u306F/reset\u307E\u305F\u306F\n\t/reload\u30B3\u30DE\u30F3\u30C9\u304C\u5B9F\u884C\u3055\u308C\u305F(\u6700\u65B0\u306E\u3044\u305A\u308C\u304B)\u4EE5\u964D\u306E\u6709\u52B9\u306A\u5C65\u6B74\u304C\n\t\u30EA\u30D7\u30EC\u30A4\u3055\u308C\u307E\u3059\u3002\n\n/reload -restore\n\t\u30EA\u30BB\u30C3\u30C8\u3055\u308C\u3001jshell\u304C\u5165\u529B\u3055\u308C\u305F\u3001\u3042\u308B\u3044\u306F/reset\u307E\u305F\u306F/reload\u30B3\u30DE\u30F3\u30C9\u304C\n\t\u5B9F\u884C\u3055\u308C\u305F\u4EE5\u524D\u3068\u6700\u65B0\u306E\u6642\u9593\u306E\u9593\u306E\u6709\u52B9\u306A\u5C65\u6B74\u304C\u30EA\u30D7\u30EC\u30A4\u3055\u308C\u307E\u3059\u3002\n\t\u305D\u306E\u305F\u3081\u3001\u3053\u308C\u306F\u4EE5\u524D\u306Ejshell\u30C4\u30FC\u30EB\u30FB\u30BB\u30C3\u30B7\u30E7\u30F3\u306E\u5FA9\u5143\u306B\n\t\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\n\n/reload [-restore] -quiet\n\t'-quiet'\u5F15\u6570\u3092\u6307\u5B9A\u3059\u308B\u3068\u3001\u30EA\u30D7\u30EC\u30A4\u304C\u8868\u793A\u3055\u308C\u307E\u305B\u3093\u3002\u30A8\u30E9\u30FC\u306F\u8868\u793A\u3055\u308C\u307E\u3059\u3002 +help.reload.args = [-restore] [-quiet] [-class-path ] [-module-path ]... +help.reload =jshell\u30C4\u30FC\u30EB\u30FB\u30B3\u30FC\u30C9\u304A\u3088\u3073\u5B9F\u884C\u72B6\u614B\u3092\u30EA\u30BB\u30C3\u30C8\u3057\u3001\u5404\u6709\u52B9\u30B9\u30CB\u30DA\u30C3\u30C8\n\u304A\u3088\u3073\u4EFB\u610F\u306E/drop\u30B3\u30DE\u30F3\u30C9\u3092\u5165\u529B\u3055\u308C\u305F\u9806\u756A\u3067\u30EA\u30D7\u30EC\u30A4\u3057\u307E\u3059\u3002\n\n/reload\n\t\u30EA\u30BB\u30C3\u30C8\u3055\u308C\u3001jshell\u304C\u5165\u529B\u3055\u308C\u305F\u3001\u3042\u308B\u3044\u306F/reset\u307E\u305F\u306F\n\t/reload\u30B3\u30DE\u30F3\u30C9\u304C\u5B9F\u884C\u3055\u308C\u305F(\u6700\u65B0\u306E\u3044\u305A\u308C\u304B)\u4EE5\u964D\u306E\u6709\u52B9\u306A\u5C65\u6B74\u304C\n\t\u30EA\u30D7\u30EC\u30A4\u3055\u308C\u307E\u3059\u3002\n\n/reload -restore\n\t\u30EA\u30BB\u30C3\u30C8\u3055\u308C\u3001jshell\u304C\u5165\u529B\u3055\u308C\u305F\u3001\u3042\u308B\u3044\u306F/reset\u307E\u305F\u306F/reload\u30B3\u30DE\u30F3\u30C9\u304C\n\t\u5B9F\u884C\u3055\u308C\u305F\u4EE5\u524D\u3068\u6700\u65B0\u306E\u6642\u9593\u306E\u9593\u306E\u6709\u52B9\u306A\u5C65\u6B74\u304C\u30EA\u30D7\u30EC\u30A4\u3055\u308C\u307E\u3059\u3002\n\t\u305D\u306E\u305F\u3081\u3001\u3053\u308C\u306F\u4EE5\u524D\u306Ejshell\u30C4\u30FC\u30EB\u30FB\u30BB\u30C3\u30B7\u30E7\u30F3\u306E\u5FA9\u5143\u306B\n\t\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\n\n/reload [-restore] -quiet\n\t'-quiet'\u5F15\u6570\u3092\u6307\u5B9A\u3059\u308B\u3068\u3001\u30EA\u30D7\u30EC\u30A4\u304C\u8868\u793A\u3055\u308C\u307E\u305B\u3093\u3002\u30A8\u30E9\u30FC\u306F\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\n\u4E0A\u306E\u5404\u3005\u306F\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u53D7\u3051\u5165\u308C\u307E\u3059\u3002\u6B21\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044:\n\n\t/help context\n\n\u4F8B:\n\n\t/reload -add-modules com.greetings -restore -help.classpath.summary = \u30AF\u30E9\u30B9\u30D1\u30B9\u306B\u30D1\u30B9\u3092\u8FFD\u52A0\u3057\u307E\u3059 -help.classpath.args = -help.classpath =\u30AF\u30E9\u30B9\u30D1\u30B9\u306B\u30D1\u30B9\u3092\u8FFD\u52A0\u3057\u307E\u3059\u3002 +help.env.summary = \u8A55\u4FA1\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u8868\u793A\u307E\u305F\u306F\u5909\u66F4\u3057\u307E\u3059 +help.env.args = [-class-path ] [-module-path ] [-add-modules ] ... +help.env =\u8A55\u4FA1\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u8868\u793A\u307E\u305F\u306F\u5909\u66F4\u3057\u307E\u3059\u3002\u8A55\u4FA1\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306F\u3001\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u3001\n\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9\u306A\u3069\u3067\u3059\u3002\n/env\n\t\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3068\u3057\u3066\u8868\u793A\u3055\u308C\u3066\u3044\u308B\u8A55\u4FA1\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u793A\u3057\u307E\u3059\u3002\n\n/env [-class-path ] [-module-path ] [-add-modules ] ...\n\t1\u3064\u4EE5\u4E0A\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u306B\u8A55\u4FA1\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002\n\t\u30B9\u30CB\u30DA\u30C3\u30C8\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u5B9F\u884C\u72B6\u614B\u306F\u65B0\u3057\u3044\u8A55\u4FA1\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306B\u30EA\u30BB\u30C3\u30C8\u3055\u308C\u3001\n\t\u30B9\u30CB\u30DA\u30C3\u30C8\u304C\u30EA\u30D7\u30EC\u30A4\u3055\u308C\u307E\u3059\u3002\u305F\u3060\u3057\u30EA\u30D7\u30EC\u30A4\u306F\u8868\u793A\u3055\u308C\u305A\u3001\n\t\u30A8\u30E9\u30FC\u306F\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u3053\u308C\u306F\u6B21\u3068\u540C\u3058\u3067\u3059: /reload -quiet\n\t\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u8A73\u7D30\u306F\u3001\u6B21\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044:\n\n\t\t/help context\n\n\t\u4F8B:\n\n\t\t/env -add-modules com.greetings help.history.summary = \u5165\u529B\u3057\u305F\u5185\u5BB9\u306E\u5C65\u6B74 help.history.args = @@ -234,6 +242,8 @@ help.intro =jshell\u30C4\u30FC\u30EB\u3092\u4F7F\u7528\u3059\u308B\u3068\u3001Ja help.shortcuts.summary = \u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8\u306E\u8AAC\u660E help.shortcuts =\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\n\n\t\tJava\u8B58\u5225\u5B50\u3001jshell\u30B3\u30DE\u30F3\u30C9\u3001\u5834\u5408\u306B\u3088\u3063\u3066\u306F\n\t\tjshell\u30B3\u30DE\u30F3\u30C9\u5F15\u6570\u306E\u6700\u521D\u306E\u6570\u6587\u5B57\u3092\u5165\u529B\u3057\u305F\u5F8C\u306B\u3001\n\t\t\u30AD\u30FC\u3092\u62BC\u3059\u3068\u3001\u5165\u529B\u304C\u5B8C\u6210\u3057\u307E\u3059\u3002\n\t\t\u5B8C\u6210\u7D50\u679C\u304C\u8907\u6570\u3042\u308B\u5834\u5408\u3001\u4F7F\u7528\u53EF\u80FD\u306A\u5B8C\u6210\u7D50\u679C\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\nShift-\n\t\t\u30E1\u30BD\u30C3\u30C9\u307E\u305F\u306F\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u547C\u51FA\u3057\u306E\u540D\u524D\u3068\u5DE6\u4E38\u30AB\u30C3\u30B3\u306E\u5F8C\u306B\n\t\t\u30AD\u30FC\u3092\u62BC\u3057\u306A\u304C\u3089\u3092\u62BC\u3059\u3068\u3001\u4E00\u81F4\u3059\u308B\u3059\u3079\u3066\u306E\u30E1\u30BD\u30C3\u30C9/\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\n\t\t\u30B7\u30CE\u30D7\u30B7\u30B9\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\n v\n\t\t\u5B8C\u5168\u306A\u5F0F\u306E\u5F8C\u306B\u3001\u300C v\u300D\u3092\u62BC\u3059\u3068\u3001\u5F0F\u306E\u30BF\u30A4\u30D7\u306B\u57FA\u3065\u3044\u305F\u30BF\u30A4\u30D7\u306E\n\t\t\u65B0\u3057\u3044\u5909\u6570\u304C\u5C0E\u5165\u3055\u308C\u307E\u3059\u3002\n\t\t\u300C\u300D\u306F[Alt]+[F1]\u307E\u305F\u306F[Alt]+[Enter]\u3067\u3001\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u306B\u3088\u3063\u3066\u7570\u306A\u308A\u307E\u3059\u3002\n\n i\n\t\t\u89E3\u6C7A\u3067\u304D\u306A\u3044\u8B58\u5225\u5B50\u306E\u5F8C\u306B\u3001\u300C i\u300D\u3092\u62BC\u3059\u3068\u3001jshell\u306F\u6307\u5B9A\u3057\u305F\n\t\t\u30AF\u30E9\u30B9\u30D1\u30B9\u306E\u5185\u5BB9\u306B\u57FA\u3065\u3044\u3066\u4F7F\u7528\u53EF\u80FD\u306A\u5B8C\u5168\u4FEE\u98FE\u3055\u308C\u305F\u540D\u524D\u3092\u63D0\u793A\u3057\u307E\u3059\u3002\n\t\t\u300C\u300D\u306F[Alt]+[F1]\u307E\u305F\u306F[Alt]+[Enter]\u3067\u3001\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u306B\u3088\u3063\u3066\u7570\u306A\u308A\u307E\u3059\u3002 +help.context.summary = /env /reload\u304A\u3088\u3073/reset\u306E\u8A55\u4FA1\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3 +help.context =\u8A55\u4FA1\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u69CB\u6210\u3057\u307E\u3059\u3002\u3053\u308C\u3089\u306F\u3001jshell\u8D77\u52D5\u6642\u306B\n\u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u3067\u3001\u307E\u305F\u306F\u30B3\u30DE\u30F3\u30C9/env\u3001/reload\u307E\u305F\u306F/reset\u3067\u518D\u8D77\u52D5\u3059\u308B\n\u3053\u3068\u306B\u3088\u308A\u6307\u5B9A\u3067\u304D\u307E\u3059\u3002\n\n\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\t--class-path \n\t\t\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3001\n\t\tJAR\u30A2\u30FC\u30AB\u30A4\u30D6\u3001ZIP\u30A2\u30FC\u30AB\u30A4\u30D6\u306E\u30EA\u30B9\u30C8\u3002\n\t\t\u30EA\u30B9\u30C8\u306F\u30D1\u30B9\u533A\u5207\u308A\u6587\u5B57\u3067\u533A\u5207\u308A\u307E\u3059\n\t\t(UNIX/Linux/Mac\u3067\u306F\u300C:\u300D\u3001Windows\u3067\u306F\u300C;\u300D)\u3002\n\t--module-path ...\n\t\t\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30EA\u30B9\u30C8\u3002\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\n\t\t\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\u3002\n\t\t\u30EA\u30B9\u30C8\u306F\u30D1\u30B9\u533A\u5207\u308A\u6587\u5B57\u3067\u533A\u5207\u308A\u307E\u3059\n\t\t(UNIX/Linux/Mac\u3067\u306F\u300C:\u300D\u3001Windows\u3067\u306F\u300C;\u300D)\u3002\n\t--add-modules [,...]\n\t\t\u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u52A0\u3048\u3066\u89E3\u6C7A\u3059\u308B\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3002\n\t\t\u306B\u306F\u3001ALL-DEFAULT\u3001ALL-SYSTEM\u3001\n\t\tALL-MODULE-PATH\u3082\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\n\t--add-exports /=(,)*\n\t\t\u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\u3092\u66F4\u65B0\u3057\u3066\n\t\t\u3092\u306B\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002\n\t\t\u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\n\t\t\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002jshell\u3067\u306F\u3001\u3092\u6307\u5B9A\u3057\u306A\u3044\u5834\u5408(\u300C=\u300D\u306A\u3057)\u3001\n\t\tALL-UNNAMED\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\n\n\u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u3067\u306F\u3001\u3053\u308C\u3089\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u306F2\u3064\u306E\u30C0\u30C3\u30B7\u30E5\u304C\u5FC5\u8981\u3067\u3059\u3002\u4F8B: --module-path\njshell\u30B3\u30DE\u30F3\u30C9\u3067\u306F\u3001\u30C0\u30C3\u30B7\u30E5\u306F1\u3064\u3067\u30822\u3064\u3067\u3082\u304B\u307E\u3044\u307E\u305B\u3093\u3002\u4F8B: -module-path\n help.set._retain = '-retain'\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u3088\u308A\u3001\u5C06\u6765\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u3067\u4F7F\u7528\u3059\u308B\u305F\u3081\u306B\u8A2D\u5B9A\u3092\u4FDD\u5B58\u3057\u307E\u3059\u3002\n-retain\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001/set\u306E\u6B21\u306E\u5F62\u5F0F\u3067\u4F7F\u7528\u3067\u304D\u307E\u3059:\n\n\t/set editor -retain\n\t/set start -retain\n\t/set feedback -retain\n\t/set mode -retain\n\n\u8A73\u7D30\u306F\u3001\u3053\u308C\u3089\u306E\u30B3\u30DE\u30F3\u30C9\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044 -- \u4F8B: /help /set editor help.set.format = \u30B9\u30CB\u30DA\u30C3\u30C8\u30FB\u30A4\u30D9\u30F3\u30C8\u3092\u30EC\u30DD\u30FC\u30C8\u3059\u308B\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u3092\u8A2D\u5B9A\u3057\u307E\u3059:\n\n\t/set format "" ...\n\n\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059:\n\n\t/set format [ []]\n\n\u306F\u4E8B\u524D\u306B\u5B9A\u7FA9\u3055\u308C\u305F\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u306E\u540D\u524D\u3067\u3059 -- '/help /set mode'\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n\u306F\u5B9A\u7FA9\u3059\u308B\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u56FA\u6709\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u306E\u540D\u524D\u3067\u3059\u3002\n\u306F\u5F15\u7528\u7B26\u306B\u56F2\u307E\u308C\u305F\u6587\u5B57\u5217\u3067\u3001\u6B21\u306E\u5834\u5408\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u5024\u3067\u3059: \n\u30BB\u30EC\u30AF\u30BF\u304C\u4E00\u81F4\u3059\u308B(\u307E\u305F\u306F\u30BB\u30EC\u30AF\u30BF\u304C\u306A\u3044)\u3002\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u304C\u4F7F\u7528\u3055\u308C\u308B\u5834\u5408\u3001\n\u4E2D\u30AB\u30C3\u30B3\u3067\u56F2\u307E\u308C\u3066\u3044\u308B\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\u304C\u305D\u306E\u3068\u304D\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u5024\u3067\u7F6E\u63DB\u3055\u308C\u307E\u3059\n\u3053\u308C\u3089\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u306F\u3001\u3053\u306E\u30B3\u30DE\u30F3\u30C9\u3067\u4E8B\u524D\u306B\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3082\u3001\n\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306B\u56FA\u6709\u306E\u3053\u308C\u3089\u306E\u4E8B\u524D\u5B9A\u7FA9\u6E08\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5834\u5408\u3082\u3042\u308A\u307E\u3059:\n\t{name} == \u540D\u524D\u3001\u4F8B: \u5909\u6570\u540D\u3001 ...\n\t{type} == \u30BF\u30A4\u30D7\u540D\u3002\u5909\u6570\u307E\u305F\u306F\u5F0F\u306E\u30BF\u30A4\u30D7\u3001\n\t\t\t\u30E1\u30BD\u30C3\u30C9\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30BF\u30A4\u30D7\n\t{value} == \u5F0F\u307E\u305F\u306F\u5909\u6570\u306E\u521D\u671F\u5316\u306E\u7D50\u679C\u5024\n\t{unresolved} == \u672A\u89E3\u6C7A\u306E\u53C2\u7167\u306E\u30EA\u30B9\u30C8\n\t{errors} == \u30EA\u30AB\u30D0\u30EA\u53EF\u80FD\u306A\u30A8\u30E9\u30FC\u306E\u30EA\u30B9\u30C8(\u51E6\u7406\u6642-\n\t\t\t"display"\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u307F)\n\t{err} == \u672A\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u30FB\u30A8\u30E9\u30FC\u884C(\u51E6\u7406\u6642-\n\t\t\t"errorline"\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u307F)\n\u6B21\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u306F\u30C4\u30FC\u30EB\u306B\u3088\u3063\u3066\u30A2\u30AF\u30BB\u30B9\u3055\u308C\u3001\u8868\u793A\u3055\u308C\u308B\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3092\u6C7A\u5B9A\u3057\u307E\u3059:\n\t{display} == \u30B9\u30CB\u30DA\u30C3\u30C8\u30FB\u30A4\u30D9\u30F3\u30C8\u306B\u5BFE\u3057\u3066\u8868\u793A\u3055\u308C\u308B\u30E1\u30C3\u30BB\u30FC\u30B8\n\t{errorline} == \u300Cerrors\u300D\u30D5\u30A3\u30FC\u30EB\u30C9\u5185\u306E\u30A8\u30E9\u30FC\u884C\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\n\t{pre} == \u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u63A5\u982D\u8F9E(\u30B3\u30DE\u30F3\u30C9\u30FB\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3092\u958B\u59CB\u3059\u308B)\n\t{post} == \u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u63A5\u5C3E\u8F9E(\u30B3\u30DE\u30F3\u30C9\u30FB\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3092\u7D42\u4E86\u3059\u308B)\n\t{errorpre} == \u30A8\u30E9\u30FC\u63A5\u982D\u8F9E(\u30A8\u30E9\u30FC\u30FB\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3092\u958B\u59CB\u3059\u308B)\n\t{errorpost} == \ @@ -247,7 +257,7 @@ help.set.feedback = \u5165\u529B\u3057\u305F\u30B9\u30CB\u30DA\u30C3\u30C8\u304A help.set.mode = \u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002\u5FC5\u8981\u306B\u5FDC\u3058\u3066\u65E2\u5B58\u306E\u30E2\u30FC\u30C9\u304B\u3089\u30B3\u30D4\u30FC\u3057\u307E\u3059:\n\n\t/set mode [] [-command|-quiet|-delete]\n\u5C06\u6765\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u306E\u305F\u3081\u306B\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u3092\u4FDD\u6301\u3057\u307E\u3059:\n\n\t/set mode -retain \n\n\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u3092\u524A\u9664\u3057\u307E\u3059:\n\n\t/set mode -delete [-retain] \n\n\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059:\n\n\t/set mode []\n\n\u306F\u4F5C\u6210\u3059\u308B\u30E2\u30FC\u30C9\u306E\u540D\u524D\u3067\u3059\u3002\n\u306F\u4E8B\u524D\u306B\u5B9A\u7FA9\u3055\u308C\u305F\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u306E\u540D\u524D\u3067\u3059\u3002\n\u304C\u3042\u308B\u5834\u5408\u3001\u305D\u306E\u8A2D\u5B9A\u304C\u65B0\u898F\u30E2\u30FC\u30C9\u306B\u30B3\u30D4\u30FC\u3055\u308C\u307E\u3059\u3002\n'-command'\u307E\u305F\u306F'-quiet'\u306B\u3088\u308A\u3001\u60C5\u5831/\u691C\u8A3C\u4E2D\u306E\u30B3\u30DE\u30F3\u30C9\u30FB\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3092\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u304C\u6C7A\u5B9A\u3057\u307E\u3059\u3002\n\n\u65B0\u898F\u30E2\u30FC\u30C9\u3092\u4F5C\u6210\u3057\u305F\u3089\u3001'/set format'\u3001'/set prompt'\u304A\u3088\u3073'/set truncation'\u3092\u4F7F\u7528\u3057\u3066\n\u69CB\u6210\u3057\u307E\u3059\u3002\u65B0\u898F\u30E2\u30FC\u30C9\u3092\u4F7F\u7528\u3059\u308B\u306B\u306F\u3001'/set feedback'\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\n\n-retain\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u30E2\u30FC\u30C9(\u305D\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u30D7\u30ED\u30F3\u30D7\u30C8\u3001\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u304A\u3088\u3073\u5207\u6368\u3066\u8A2D\u5B9A\u3092\u542B\u3080)\u306F\u3001\njshell\u30C4\u30FC\u30EB\u306E\u3053\u306E\u5B9F\u884C\u3068\u5C06\u6765\u306E\u5B9F\u884C\u3067\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\n-retain\u3068-delete\u306E\u4E21\u65B9\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u30E2\u30FC\u30C9\u306F\u73FE\u5728\u304A\u3088\u3073\u5C06\u6765\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u304B\u3089\n\u524A\u9664\u3055\u308C\u307E\u3059\u3002\n\n\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u306A\u3044\u5F62\u5F0F\u306F\u3001\u30E2\u30FC\u30C9\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059\u3002\n\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u305D\u306E\u30E2\u30FC\u30C9\u306E\u30E2\u30FC\u30C9\u8A2D\u5B9A\u306E\u307F\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\u6CE8\u610F: \u30E2\u30FC\u30C9\u306E\u8A2D\u5B9A\u306B\u306F\u3001\u30D7\u30ED\u30F3\u30D7\u30C8\u3001\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u304A\u3088\u3073\u5207\u6368\u3066\u306E\u8A2D\u5B9A\u304C\u542B\u307E\u308C\u308B\u305F\u3081\u3001\n\u3053\u308C\u3089\u3082\u540C\u69D8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\u4F8B:\n\t/set mode myformat\n\u30E2\u30FC\u30C9myformat\u306E\u30E2\u30FC\u30C9\u3001\u30D7\u30ED\u30F3\u30D7\u30C8\u3001\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u304A\u3088\u3073\u5207\u6368\u3066\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059\n -help.set.prompt = \u30D7\u30ED\u30F3\u30D7\u30C8\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002\u6A19\u6E96\u30D7\u30ED\u30F3\u30D7\u30C8\u3068\u7D9A\u884C\u30D7\u30ED\u30F3\u30D7\u30C8\u306E\u4E21\u65B9\u3092\u8A2D\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059:\n\n\t/set prompt "" ""\n\n\u6A19\u6E96\u30D7\u30ED\u30F3\u30D7\u30C8\u3068\u7D9A\u884C\u30D7\u30ED\u30F3\u30D7\u30C8\u3092\u8868\u793A\u3057\u307E\u3059:\n\n\t/set prompt []\n\n\u306F\u4E8B\u524D\u306B\u5B9A\u7FA9\u3055\u308C\u305F\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u306E\u540D\u524D\u3067\u3059\u3002\n\u304A\u3088\u3073\u306F\u5165\u529B\u30D7\u30ED\u30F3\u30D7\u30C8\u3068\u3057\u3066\u51FA\u529B\u3055\u308C\u308B\u5F15\u7528\u7B26\u3067\u56F2\u307E\u308C\u305F\u6587\u5B57\u5217\u3067\u3059\u3002\n\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u3001\u4E21\u65B9\u3068\u3082\u3001\u6B21\u306E\u30B9\u30CB\u30DA\u30C3\u30C8ID\u3067\u7F6E\u304D\u63DB\u3048\u3089\u308C\u308B'%s'\u3092\u542B\u3080\u3053\u3068\u304C\u3067\u304D\u307E\u3059 --\n\u5165\u529B\u3057\u305F\u5185\u5BB9\u304C\u305D\u306EID\u306B\u5272\u308A\u5F53\u3066\u3089\u308C\u306A\u3044\u5834\u5408\u304C\u3042\u308A\u307E\u3059\u3002\u305F\u3068\u3048\u3070\u3001\u30A8\u30E9\u30FC\u307E\u305F\u306F\u30B3\u30DE\u30F3\u30C9\u3067\u3042\u308B\u5834\u5408\u306A\u3069\u3067\u3059\u3002\n\u7D9A\u884C\u30D7\u30ED\u30F3\u30D7\u30C8\u306F\u8907\u6570\u884C\u30B9\u30CB\u30DA\u30C3\u30C8\u306E2\u884C\u76EE\u4EE5\u964D\u3067\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\n\n\u306E\u306A\u3044\u5F62\u5F0F\u306F\u3001\u73FE\u5728\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u30D7\u30ED\u30F3\u30D7\u30C8\u3092\u8868\u793A\u3057\u307E\u3059\u3002\n\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u305D\u306E\u30E2\u30FC\u30C9\u306E\u30D7\u30ED\u30F3\u30D7\u30C8\u306E\u307F\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\u4F8B:\n\t/set prompt myformat\n\u30E2\u30FC\u30C9myformat\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u30D7\u30ED\u30F3\u30D7\u30C8\u3092\u8868\u793A\u3057\u307E\u3059\n +help.set.prompt = \u30D7\u30ED\u30F3\u30D7\u30C8\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002\u6A19\u6E96\u30D7\u30ED\u30F3\u30D7\u30C8\u3068\u7D9A\u884C\u30D7\u30ED\u30F3\u30D7\u30C8\u306E\u4E21\u65B9\u3092\u8A2D\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059:\n\n\t/set prompt "" ""\n\n\u6A19\u6E96\u30D7\u30ED\u30F3\u30D7\u30C8\u3068\u7D9A\u884C\u30D7\u30ED\u30F3\u30D7\u30C8\u3092\u8868\u793A\u3057\u307E\u3059:\n\n\t/set prompt []\n\n\u306F\u4E8B\u524D\u306B\u5B9A\u7FA9\u3055\u308C\u305F\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u30FB\u30E2\u30FC\u30C9\u306E\u540D\u524D\u3067\u3059\u3002\n\u304A\u3088\u3073\u306F\u5165\u529B\u30D7\u30ED\u30F3\u30D7\u30C8\u3068\u3057\u3066\u51FA\u529B\u3055\u308C\u308B\u5F15\u7528\u7B26\u3067\u56F2\u307E\u308C\u305F\u6587\u5B57\u5217\u3067\u3059\u3002\n\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u3001\u4E21\u65B9\u3068\u3082\u3001\u6B21\u306E\u30B9\u30CB\u30DA\u30C3\u30C8ID\u3067\u7F6E\u304D\u63DB\u3048\u3089\u308C\u308B'%%s'\u3092\u542B\u3080\u3053\u3068\u304C\u3067\u304D\u307E\u3059 --\n\u5165\u529B\u3057\u305F\u5185\u5BB9\u304C\u305D\u306EID\u306B\u5272\u308A\u5F53\u3066\u3089\u308C\u306A\u3044\u5834\u5408\u304C\u3042\u308A\u307E\u3059\u3002\u305F\u3068\u3048\u3070\u3001\u30A8\u30E9\u30FC\u307E\u305F\u306F\u30B3\u30DE\u30F3\u30C9\u3067\u3042\u308B\u5834\u5408\u306A\u3069\u3067\u3059\u3002\n\u7D9A\u884C\u30D7\u30ED\u30F3\u30D7\u30C8\u306F\u8907\u6570\u884C\u30B9\u30CB\u30DA\u30C3\u30C8\u306E2\u884C\u76EE\u4EE5\u964D\u3067\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\n\n\u306E\u306A\u3044\u5F62\u5F0F\u306F\u3001\u73FE\u5728\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u30D7\u30ED\u30F3\u30D7\u30C8\u3092\u8868\u793A\u3057\u307E\u3059\u3002\n\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u305D\u306E\u30E2\u30FC\u30C9\u306E\u30D7\u30ED\u30F3\u30D7\u30C8\u306E\u307F\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\u4F8B:\n\t/set prompt myformat\n\u30E2\u30FC\u30C9myformat\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u30D7\u30ED\u30F3\u30D7\u30C8\u3092\u8868\u793A\u3057\u307E\u3059\n help.set.editor =/edit\u30B3\u30DE\u30F3\u30C9\u3067\u8D77\u52D5\u3059\u308B\u30B3\u30DE\u30F3\u30C9\u3092\u6307\u5B9A\u3057\u307E\u3059:\n\n\t/set editor [-retain] [-wait] \n\n\t/set editor [-retain] -default\n\n\t/set editor [-retain] -delete\n\n\u5C06\u6765\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u306E\u305F\u3081\u306B\u73FE\u5728\u306E\u30A8\u30C7\u30A3\u30BF\u8A2D\u5B9A\u3092\u4FDD\u6301\u3057\u307E\u3059:\n\n\t/set editor -retain\n\n/edit\u30B3\u30DE\u30F3\u30C9\u3067\u8D77\u52D5\u3059\u308B\u30B3\u30DE\u30F3\u30C9\u3092\u8868\u793A\u3057\u307E\u3059:\n\n\t/set editor\n\n\u306F\u30AA\u30DA\u30EC\u30FC\u30C6\u30A3\u30F3\u30B0\u30FB\u30B7\u30B9\u30C6\u30E0\u4F9D\u5B58\u6587\u5B57\u5217\u3067\u3059\u3002\n\u306B\u306F\u30B9\u30DA\u30FC\u30B9\u3067\u533A\u5207\u3089\u308C\u305F\u5F15\u6570(\u30D5\u30E9\u30B0\u306A\u3069)\u304C\u542B\u307E\u308C\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\n\n-default\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u6307\u5B9A\u3059\u308B\u3068\u3001\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u7D44\u8FBC\u307F\u30A8\u30C7\u30A3\u30BF\u304C\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\n\n-delete\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u6307\u5B9A\u3059\u308B\u3068\u3001\u4EE5\u524D\u306E\u8A2D\u5B9A\u306F\u7121\u8996\u3055\u308C\u307E\u3059 -- \u30A8\u30C7\u30A3\u30BF\n\u8A2D\u5B9A\u306F\u3001jshell\u30C4\u30FC\u30EB\u306E\u8D77\u52D5\u6642\u306B\u521D\u671F\u5316\u3055\u308C\u307E\u3059\u3002\u5177\u4F53\u7684\u306B\u306F\u3001\u4FDD\u6301\u3055\u308C\u305F\u8A2D\u5B9A\u304C\n\u5B58\u5728\u3059\u308B\u5834\u5408\u3001(\u4FDD\u6301\u3055\u308C\u305F\u8A2D\u5B9A\u3092\u524A\u9664\u3059\u308B-retain\u3068-delete\u306E\u4E21\u65B9\u304C\u6307\u5B9A\u3055\u308C\u3066\n\u3044\u306A\u3051\u308C\u3070)\u305D\u308C\u304C\u4F7F\u7528\u3055\u308C\u3001\u6B21\u306E\u74B0\u5883\u5909\u6570\u306E\u3044\u305A\u308C\u304B\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\n\u305D\u308C\u304C(\u305D\u306E\u9806\u5E8F\u3067)\u4F7F\u7528\u3055\u308C\u307E\u3059: JSHELLEDITOR\u3001VISUAL\u307E\u305F\u306FEDITOR\u3002\n\u305D\u308C\u4EE5\u5916\u306E\u5834\u5408\u3001\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u7D44\u8FBC\u307F\u30A8\u30C7\u30A3\u30BF\u304C\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\n\n\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u305D\u308C\u304C\u5916\u90E8\u30A8\u30C7\u30A3\u30BF\u3068\u3057\u3066\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\u306F\u3001\n\u30D7\u30ED\u30B0\u30E9\u30E0\u3068\u30BC\u30ED\u500B\u4EE5\u4E0A\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u5F15\u6570\u3067\u69CB\u6210\u3055\u308C\u307E\u3059\u3002\u304C\u4F7F\u7528\u3055\u308C\u308B\u5834\u5408\u3001\n\u7DE8\u96C6\u5BFE\u8C61\u306E\u4E00\u6642\u30D5\u30A1\u30A4\u30EB\u304C\u6700\u5F8C\u306E\u5F15\u6570\u3068\u3057\u3066\u8FFD\u52A0\u3055\u308C\u307E\u3059\u3002\n\u901A\u5E38\u3001\u7DE8\u96C6\u30E2\u30FC\u30C9\u306F\u5916\u90E8\u30A8\u30C7\u30A3\u30BF\u304C\u7D42\u4E86\u3059\u308B\u307E\u3067\u7D99\u7D9A\u3057\u307E\u3059\u3002\u4E00\u90E8\u306E\u5916\u90E8\u30A8\u30C7\u30A3\u30BF\u306F\u3001\n\u305F\u3068\u3048\u3070\u7DE8\u96C6\u30A6\u30A3\u30F3\u30C9\u30A6\u304C\u7D42\u4E86\u3059\u308B\u3068\u5373\u5EA7\u306B\u7D42\u4E86\u3059\u308B\u305F\u3081\u3001\u5916\u90E8\u30A8\u30C7\u30A3\u30BF\u30FB\u30D5\u30E9\u30B0\u3092\u4F7F\u7528\u3057\u3066\n\u5373\u6642\u306E\u7D42\u4E86\u3092\u56DE\u907F\u3059\u308B\u304B\u3001-wait\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3057\u3066\u3001\u7DE8\u96C6\u30E2\u30FC\u30C9\u304C\u7D42\u4E86\u3059\u308B\u30BF\u30A4\u30DF\u30F3\u30B0\u3092\n\u6307\u5B9A\u3059\u308B\u3088\u3046\u30E6\u30FC\u30B6\u30FC\u306B\u8981\u6C42\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n\n\u6CE8\u610F: \ \u7DE8\u96C6\u30E2\u30FC\u30C9\u4E2D\u3001\u30B3\u30DE\u30F3\u30C9\u5165\u529B\u306F\u8868\u793A\u3055\u308C\u307E\u305B\u3093\u3002\u7DE8\u96C6\u30E2\u30FC\u30C9\u306E\u7D42\u4E86\u5F8C\u3001\u7DE8\u96C6\u3055\u308C\u305F\n\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u5909\u66F4\u5185\u5BB9\u306F\u8868\u793A\u3055\u308C\u307E\u305B\u3093\u3002\n\n-retain\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u8A2D\u5B9A\u306Fjshell\u30C4\u30FC\u30EB\u306E\u3053\u306E\u5B9F\u884C\u3068\u5C06\u6765\u306E\n\u5B9F\u884C\u3067\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\n\n\u307E\u305F\u306F\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u306A\u3044\u5F62\u5F0F\u306F\u3001\u30A8\u30C7\u30A3\u30BF\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u307E\u3059\u3002\n diff --git a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_zh_CN.properties b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_zh_CN.properties index f755130be62..7fb001b2253 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_zh_CN.properties +++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,11 +23,11 @@ # questions. # -jshell.msg.welcome =\u6B22\u8FCE\u4F7F\u7528 JShell -- \u7248\u672C {0}\n\u8981\u5927\u81F4\u4E86\u89E3\u8BE5\u7248\u672C, \u8BF7\u952E\u5165: /help intro\n +jshell.msg.welcome =\u6B22\u8FCE\u4F7F\u7528 JShell -- \u7248\u672C {0}\n\u8981\u5927\u81F4\u4E86\u89E3\u8BE5\u7248\u672C, \u8BF7\u952E\u5165: /help intro jshell.err.opt.arg = \u7F3A\u5C11 {0} \u7684\u53C2\u6570\u3002 jshell.err.opt.invalid = \u65E0\u6548\u7684\u9009\u9879: {0}\u3002 jshell.err.opt.one = \u53EA\u80FD\u4F7F\u7528\u4E00\u4E2A {0} \u9009\u9879\u3002 -jshell.err.opt.startup.one = \u53EA\u80FD\u4F7F\u7528\u4E00\u4E2A --startup \u6216 --no-startup \u9009\u9879\u3002 +jshell.err.opt.startup.conflict = \u51B2\u7A81\u7684\u9009\u9879: \u540C\u65F6\u4F7F\u7528\u4E86 --startup \u548C --no-startup\u3002 jshell.err.opt.feedback.one = \u53EA\u80FD\u4F7F\u7528\u4E00\u4E2A\u53CD\u9988\u9009\u9879 (--feedback, -q, -s \u6216 -v)\u3002 jshell.err.opt.unknown = \u672A\u77E5\u9009\u9879: {0} @@ -48,12 +48,15 @@ jshell.err.unexpected.exception = \u610F\u5916\u5F02\u5E38\u9519\u8BEF: {0} jshell.err.no.such.command.or.snippet.id = \u6CA1\u6709\u8FD9\u6837\u7684\u547D\u4EE4\u6216\u7247\u6BB5 id: {0} jshell.err.command.ambiguous = \u547D\u4EE4 ''{0}'' \u4E0D\u660E\u786E: {1} +jshell.msg.set.restore = \u6B63\u5728\u8BBE\u7F6E\u65B0\u9009\u9879\u5E76\u8FD8\u539F\u72B6\u6001\u3002 jshell.msg.set.editor.set = \u7F16\u8F91\u5668\u8BBE\u7F6E\u4E3A: {0} jshell.msg.set.editor.retain = \u4FDD\u7559\u7684\u7F16\u8F91\u5668\u8BBE\u7F6E: {0} -jshell.err.cant.launch.editor = \u65E0\u6CD5\u542F\u52A8\u7F16\u8F91\u5668 -- \u610F\u5916\u7684\u5F02\u5E38\u9519\u8BEF: {0} -jshell.msg.try.set.editor = \u8BF7\u5C1D\u8BD5\u901A\u8FC7 /set editor \u6765\u4F7F\u7528\u5916\u90E8\u7F16\u8F91\u5668\u3002 +jshell.err.no.builtin.editor = \u5185\u7F6E\u7F16\u8F91\u5668\u4E0D\u53EF\u7528\u3002 +jshell.err.cant.launch.editor = \u65E0\u6CD5\u542F\u52A8\u5185\u7F6E\u7F16\u8F91\u5668 -- \u610F\u5916\u7684\u5F02\u5E38\u9519\u8BEF: {0} +jshell.msg.try.set.editor = \u8BF7\u53C2\u9605 ''/help /set editor'' \u6765\u4E86\u89E3\u5982\u4F55\u4F7F\u7528\u5916\u90E8\u7F16\u8F91\u5668\u3002 jshell.msg.press.return.to.leave.edit.mode = \u6309\u201C\u8FD4\u56DE\u201D\u9000\u51FA\u7F16\u8F91\u6A21\u5F0F\u3002 jshell.err.wait.applies.to.external.editor = -wait \u9002\u7528\u4E8E\u5916\u90E8\u7F16\u8F91\u5668 +jshell.label.editpad = JShell Edit Pad jshell.err.setting.to.retain.must.be.specified = \u5FC5\u987B\u6307\u5B9A\u8981\u4FDD\u7559\u7684\u8BBE\u7F6E -- {0} jshell.msg.set.show.mode.settings = \n\u8981\u663E\u793A\u6A21\u5F0F\u8BBE\u7F6E, \u8BF7\u4F7F\u7528 ''/set prompt'', ''/set truncation'', ...\n\u6216\u8005\u4F7F\u7528 ''/set mode'' \u540E\u8DDF\u53CD\u9988\u6A21\u5F0F\u540D\u79F0\u3002 @@ -84,7 +87,7 @@ jshell.msg.classpath = \u8DEF\u5F84 ''{0}'' \u5DF2\u6DFB\u52A0\u5230\u7C7B\u8DEF jshell.err.help.arg = \u6CA1\u6709\u547D\u4EE4\u6216\u4E3B\u9898\u4EE5\u63D0\u4F9B\u7684\u53C2\u6570\u5F00\u59CB: {0} jshell.msg.help.begin =\u952E\u5165 Java \u8BED\u8A00\u8868\u8FBE\u5F0F, \u8BED\u53E5\u6216\u58F0\u660E\u3002\n\u6216\u8005\u952E\u5165\u4EE5\u4E0B\u547D\u4EE4\u4E4B\u4E00:\n -jshell.msg.help.subject =\n\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u952E\u5165 ''/help'', \u540E\u8DDF\u547D\u4EE4\u6216\u4E3B\u9898\u7684\u540D\u79F0\u3002\n\u4F8B\u5982 ''/help /list'' \u6216 ''/help intro''\u3002\u4E3B\u9898:\n +jshell.msg.help.subject =\n\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u952E\u5165 ''/help'', \u540E\u8DDF\n\u547D\u4EE4\u6216\u4E3B\u9898\u7684\u540D\u79F0\u3002\n\u4F8B\u5982 ''/help /list'' \u6216 ''/help intro''\u3002\u4E3B\u9898:\n jshell.err.drop.arg =\u5728 /drop \u53C2\u6570\u4E2D, \u8BF7\u6307\u5B9A\u8981\u5220\u9664\u7684\u5BFC\u5165, \u53D8\u91CF, \u65B9\u6CD5\u6216\u7C7B\u3002\n\u6309 id \u6216\u540D\u79F0\u6307\u5B9A\u3002\u4F7F\u7528 /list \u53EF\u67E5\u770B id\u3002\u4F7F\u7528 /reset \u53EF\u91CD\u7F6E\u6240\u6709\u72B6\u6001\u3002 jshell.err.drop.ambiguous = \u53C2\u6570\u5F15\u7528\u4E86\u591A\u4E2A\u5BFC\u5165, \u53D8\u91CF, \u65B9\u6CD5\u6216\u7C7B\u3002 @@ -133,6 +136,11 @@ jshell.err.the.snippet.cannot.be.used.with.this.command = \u6B64\u547D\u4EE4\u4E jshell.err.retained.mode.failure = \u4FDD\u7559\u6A21\u5F0F\u4E2D\u51FA\u73B0\u6545\u969C (\u5DF2\u6E05\u9664\u6A21\u5F0F) -- {0} {1} jshell.console.see.more = <\u6309 Tab \u53EF\u67E5\u770B\u66F4\u591A\u5185\u5BB9> +jshell.console.see.javadoc = <\u518D\u6B21\u6309 shift-tab \u53EF\u67E5\u770B javadoc> +jshell.console.see.help = <\u518D\u6B21\u6309 shift-tab \u53EF\u67E5\u770B\u8BE6\u7EC6\u5E2E\u52A9> +jshell.console.see.next.page = <\u6309\u7A7A\u683C\u4EE5\u67E5\u770B\u4E0B\u4E00\u9875, \u6309 Q \u4EE5\u9000\u51FA> +jshell.console.see.next.javadoc = <\u6309\u7A7A\u683C\u4EE5\u67E5\u770B\u4E0B\u4E00\u4E2A javadoc, \u6309 Q \u4EE5\u9000\u51FA> +jshell.console.no.javadoc = <\u627E\u4E0D\u5230 javadoc> jshell.console.do.nothing = \u4E0D\u6267\u884C\u4EFB\u4F55\u64CD\u4F5C jshell.console.choice = \u9009\u9879: jshell.console.create.variable = \u521B\u5EFA\u53D8\u91CF @@ -142,7 +150,7 @@ jshell.console.incomplete = \n\u7ED3\u679C\u53EF\u80FD\u4E0D\u5B8C\u6574; \u8BF7 help.usage = \u7528\u6CD5: jshell <\u9009\u9879> <\u52A0\u8F7D\u6587\u4EF6>\n\u5176\u4E2D, \u53EF\u80FD\u7684\u9009\u9879\u5305\u62EC:\n --class-path <\u8DEF\u5F84> \u6307\u5B9A\u67E5\u627E\u7528\u6237\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n --module-path <\u8DEF\u5F84> \u6307\u5B9A\u67E5\u627E\u5E94\u7528\u7A0B\u5E8F\u6A21\u5757\u7684\u4F4D\u7F6E\n --add-modules <\u6A21\u5757>(,<\u6A21\u5757>)*\n \u6307\u5B9A\u8981\u89E3\u6790\u7684\u6A21\u5757; \u5982\u679C <\u6A21\u5757> \n \u4E3A ALL-MODULE-PATH, \u5219\u4E3A\u6A21\u5757\u8DEF\u5F84\u4E2D\u7684\u6240\u6709\u6A21\u5757\n --startup <\u6587\u4EF6> \u5BF9\u542F\u52A8\u5B9A\u4E49\u6267\u884C\u5355\u6B21\u66FF\u6362\n --no-startup \u4E0D\u8FD0\u884C\u542F\u52A8\u5B9A\u4E49\n --feedback <\u6A21\u5F0F> \u6307\u5B9A\u521D\u59CB\u53CD\u9988\u6A21\u5F0F\u3002\u8BE5\u6A21\u5F0F\u53EF\u4EE5\u662F\n \u9884\u5B9A\u4E49\u7684 (silent, concise, normal \u6216 verbose), \n \u4E5F\u53EF\u662F\u4EE5\u524D\u7528\u6237\u5B9A\u4E49\u7684\n -q \u65E0\u63D0\u793A\u53CD\u9988\u3002\u7B49\u540C\u4E8E: --feedback concise\n -s \u771F\u6B63\u65E0\u63D0\u793A\u53CD\u9988\u3002\u7B49\u540C\u4E8E: --feedback silent\n -v \u8BE6\u7EC6\u53CD\u9988\u3002\u7B49\u540C\u4E8E: --feedback verbose\n -J<\u6807\u8BB0> \u76F4\u63A5\u5C06 <\u6807\u8BB0> \u4F20\u9012\u5230\u8FD0\u884C\u65F6\u7CFB\u7EDF\u3002\n \u4E3A\u6BCF\u4E2A\u8FD0\u884C\u65F6\u6807\u8BB0\u6216\u6807\u8BB0\u53C2\u6570\u4F7F\u7528\u4E00\u4E2A -J\n -R<\u6807\u8BB0> \u5C06 <\u6807\u8BB0> \u4F20\u9012\u5230\u8FDC\u7A0B\u8FD0\u884C\u65F6\u7CFB\u7EDF\u3002\n \u4E3A\u6BCF\u4E2A\u8FDC\u7A0B\u6807\u8BB0\u6216\u6807\u8BB0\u53C2\u6570\u4F7F\u7528\u4E00\u4E2A -R\n -C<\u6807\u8BB0> \u5C06 <\u6807\u8BB0> \u4F20\u9012\u5230\u7F16\u8BD1\u5668\u3002\n \u4E3A\u6BCF\u4E2A\u7F16\u8BD1\u5668\u6807\u8BB0\u6216\u6807\u8BB0\u53C2\u6570\u4F7F\u7528\u4E00\u4E2A -C\n --help \u8F93\u51FA\u6807\u51C6\u9009\u9879\u7684\u6B64\u63D0\u8981\n --version \u7248\u672C\u4FE1\u606F\n -X \u8F93\u51FA\u975E\u6807\u51C6\u9009\u9879\u7684\u5E2E\u52A9\n -help.usage.x = \ --add-exports <\u6A21\u5757>/<\u7A0B\u5E8F\u5305> \u5C06\u6307\u5B9A\u7684\u6A21\u5757\u4E13\u7528\u7A0B\u5E8F\u5305\u5BFC\u51FA\u5230\u7247\u6BB5\n \n\u8FD9\u4E9B\u9009\u9879\u662F\u975E\u6807\u51C6\u9009\u9879, \u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n +help.usage.x = \ --add-exports <\u6A21\u5757>/<\u7A0B\u5E8F\u5305> \u5C06\u6307\u5B9A\u7684\u6A21\u5757\u4E13\u7528\u7A0B\u5E8F\u5305\u5BFC\u51FA\u5230\u7247\u6BB5\n --execution <\u89C4\u8303> \u6307\u5B9A\u66FF\u4EE3\u6267\u884C\u5F15\u64CE\u3002\n \u5176\u4E2D <\u89C4\u8303> \u662F ExecutionControl \u89C4\u8303\u3002\n \u6709\u5173\u89C4\u8303\u7684\u8BED\u6CD5, \u8BF7\u53C2\u9605\u7A0B\u5E8F\u5305\n jdk.jshell.spi \u7684\u6587\u6863\n \n\u8FD9\u4E9B\u9009\u9879\u662F\u975E\u6807\u51C6\u9009\u9879, \u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n help.list.summary = \u5217\u51FA\u60A8\u952E\u5165\u7684\u6E90 help.list.args = [<\u540D\u79F0\u6216 id>|-all|-start] @@ -185,16 +193,16 @@ help.exit.args = help.exit =\u9000\u51FA jshell \u5DE5\u5177\u3002\u4E0D\u4FDD\u5B58\u5DE5\u4F5C\u3002\n\u5728\u4F7F\u7528\u6B64\u547D\u4EE4\u524D\u5E94\u8BE5\u5148\u4FDD\u5B58\u4EFB\u4F55\u5DE5\u4F5C help.reset.summary = \u91CD\u542F jshell -help.reset.args = -help.reset =\u91CD\u542F jshell \u5DE5\u5177\u4EE3\u7801\u548C\u6267\u884C\u72B6\u6001:\n\t* \u6240\u6709\u8F93\u5165\u7684\u4EE3\u7801\u90FD\u5C06\u4E22\u5931\u3002\n\t* \u91CD\u65B0\u6267\u884C\u542F\u52A8\u4EE3\u7801\u3002\n\t* \u91CD\u65B0\u542F\u52A8\u6267\u884C\u72B6\u6001\u3002\n\t* \u6E05\u9664\u7C7B\u8DEF\u5F84\u3002\n\u5C06\u5DE5\u5177\u8BBE\u7F6E\u4FDD\u6301\u4E3A\u901A\u8FC7\u4EE5\u4E0B\u547D\u4EE4\u6267\u884C\u7684\u8BBE\u7F6E: /set ...\n\u5728\u4F7F\u7528\u6B64\u547D\u4EE4\u524D\u5E94\u8BE5\u5148\u4FDD\u5B58\u4EFB\u4F55\u5DE5\u4F5C +help.reset.args = [-class-path <\u8DEF\u5F84>] [-module-path <\u8DEF\u5F84>] [-add-modules <\u6A21\u5757>]... +help.reset =\u91CD\u7F6E jshell \u5DE5\u5177\u4EE3\u7801\u548C\u6267\u884C\u72B6\u6001:\n\t* \u6240\u6709\u8F93\u5165\u7684\u4EE3\u7801\u90FD\u5C06\u4E22\u5931\u3002\n\t* \u91CD\u65B0\u6267\u884C\u542F\u52A8\u4EE3\u7801\u3002\n\t* \u91CD\u65B0\u542F\u52A8\u6267\u884C\u72B6\u6001\u3002\n\t\u5C06\u5DE5\u5177\u8BBE\u7F6E\u4FDD\u6301\u4E3A\u901A\u8FC7\u4EE5\u4E0B\u547D\u4EE4\u6267\u884C\u7684\u8BBE\u7F6E: /set ...\n\u5728\u4F7F\u7528\u6B64\u547D\u4EE4\u524D\u5E94\u8BE5\u5148\u4FDD\u5B58\u4EFB\u4F55\u5DE5\u4F5C\u3002\n/reset \u547D\u4EE4\u63A5\u53D7\u4E0A\u4E0B\u6587\u9009\u9879, \u8BF7\u53C2\u9605:\n\n\t/help context\n -help.reload.summary = \u91CD\u542F\u548C\u91CD\u653E\u76F8\u5173\u5386\u53F2\u8BB0\u5F55 -- \u5F53\u524D\u5386\u53F2\u8BB0\u5F55\u6216\u4E0A\u4E00\u4E2A\u5386\u53F2\u8BB0\u5F55 (-restore) -help.reload.args = [-restore] [-quiet] -help.reload =\u91CD\u7F6E jshell \u5DE5\u5177\u4EE3\u7801\u548C\u6267\u884C\u72B6\u6001, \u7136\u540E\u6309\u7167\u5404\u6709\u6548\u7247\u6BB5\u548C\n\u4EFB\u4F55 /drop \u6216 /classpath \u547D\u4EE4\u7684\u8F93\u5165\u987A\u5E8F\u91CD\u653E\u5B83\u4EEC\u3002\n\n/reload\n\t\u91CD\u7F6E\u548C\u91CD\u653E\u81EA\u8FDB\u5165 jshell \u4EE5\u6765\u7684\u6709\u6548\u5386\u53F2\u8BB0\u5F55, \n\t\u6216\u8005\u6267\u884C /reset \u6216 /reload \u547D\u4EE4\u4E2D\u6700\u65B0\u7684\u90A3\u4E2A\n\t\u547D\u4EE4\u3002\n\n/reload -restore\n\t\u91CD\u7F6E\u5E76\u91CD\u653E\u4E0A\u4E00\u6B21\u8FDB\u5165 jshell \u4EE5\u53CA\u6700\u8FD1\u8FDB\u5165 jshell\n\t\u4E4B\u95F4\u7684\u6709\u6548\u5386\u53F2\u8BB0\u5F55, \u6216\u8005\u6267\u884C /reset \u6216 /reload\n\t\u547D\u4EE4\u3002\u8FD9\u8FDB\u800C\u53EF\u7528\u4E8E\u8FD8\u539F\u4E0A\u4E00\u4E2A\n\tjshell \u5DE5\u5177\u4F1A\u8BDD\u3002\n\n/reload [-restore] -quiet\n\t\u4F7F\u7528 '-quiet' \u53C2\u6570\u65F6, \u4E0D\u663E\u793A\u91CD\u653E\u3002\u5C06\u663E\u793A\u9519\u8BEF\u3002 +help.reload.summary = \u91CD\u7F6E\u548C\u91CD\u653E\u76F8\u5173\u5386\u53F2\u8BB0\u5F55 -- \u5F53\u524D\u5386\u53F2\u8BB0\u5F55\u6216\u4E0A\u4E00\u4E2A\u5386\u53F2\u8BB0\u5F55 (-restore) +help.reload.args = [-restore] [-quiet] [-class-path <\u8DEF\u5F84>] [-module-path <\u8DEF\u5F84>]... +help.reload =\u91CD\u7F6E jshell \u5DE5\u5177\u4EE3\u7801\u548C\u6267\u884C\u72B6\u6001, \u7136\u540E\u6309\u7167\u5404\u6709\u6548\u7247\u6BB5\u548C\n\u4EFB\u4F55 /drop \u6216 /classpath \u547D\u4EE4\u7684\u8F93\u5165\u987A\u5E8F\u91CD\u653E\u5B83\u4EEC\u3002\n\n/reload\n\t\u91CD\u7F6E\u548C\u91CD\u653E\u81EA\u8FDB\u5165 jshell \u4EE5\u6765\u7684\u6709\u6548\u5386\u53F2\u8BB0\u5F55, \n\t\u6216\u8005\u6267\u884C /reset \u6216 /reload \u547D\u4EE4\u4E2D\u6700\u65B0\u7684\u90A3\u4E2A\n\t\u547D\u4EE4\u3002\n\n/reload -restore\n\t\u91CD\u7F6E\u5E76\u91CD\u653E\u4E0A\u4E00\u6B21\u8FDB\u5165 jshell \u4E0E\u6700\u8FD1\u8FDB\u5165 jshell\n\t\u4E4B\u95F4\u7684\u6709\u6548\u5386\u53F2\u8BB0\u5F55, \u6216\u8005\u6267\u884C /reset \u6216 /reload\n\t\u547D\u4EE4\u3002\u8FD9\u8FDB\u800C\u53EF\u7528\u4E8E\u8FD8\u539F\u4E0A\u4E00\u4E2A\n\tjshell \u5DE5\u5177\u4F1A\u8BDD\u3002\n\n/reload [-restore] -quiet\n\t\u4F7F\u7528 '-quiet' \u53C2\u6570\u65F6, \u4E0D\u663E\u793A\u91CD\u653E\u3002\u5C06\u663E\u793A\u9519\u8BEF\u3002\n\n\u4E0A\u9762\u6BCF\u4E2A\u547D\u4EE4\u90FD\u63A5\u53D7\u4E0A\u4E0B\u6587\u9009\u9879, \u8BF7\u53C2\u9605:\n\n\t/help context\n\n\u4F8B\u5982:\n\n\t/reload -add-modules com.greetings -restore -help.classpath.summary = \u5C06\u8DEF\u5F84\u6DFB\u52A0\u5230\u7C7B\u8DEF\u5F84 -help.classpath.args = -help.classpath =\u5411\u7C7B\u8DEF\u5F84\u9644\u52A0\u5176\u4ED6\u8DEF\u5F84\u3002 +help.env.summary = \u67E5\u770B\u6216\u66F4\u6539\u8BC4\u4F30\u4E0A\u4E0B\u6587 +help.env.args = [-class-path <\u8DEF\u5F84>] [-module-path <\u8DEF\u5F84>] [-add-modules <\u6A21\u5757>] ... +help.env =\u67E5\u770B\u6216\u66F4\u6539\u8BC4\u4F30\u4E0A\u4E0B\u6587\u3002\u8BC4\u4F30\u4E0A\u4E0B\u6587\u662F\u7C7B\u8DEF\u5F84, \n\u6A21\u5757\u8DEF\u5F84\u7B49\u7B49\u3002\n/env\n\t\u663E\u793A\u4F5C\u4E3A\u4E0A\u4E0B\u6587\u9009\u9879\u663E\u793A\u7684\u8BC4\u4F30\u4E0A\u4E0B\u6587\u3002\n\n/env [-class-path <\u8DEF\u5F84>] [-module-path <\u8DEF\u5F84>] [-add-modules <\u6A21\u5757>] ...\n\t\u5728\u81F3\u5C11\u8BBE\u7F6E\u4E00\u4E2A\u9009\u9879\u7684\u60C5\u51B5\u4E0B, \u8BBE\u7F6E\u8BC4\u4F30\u4E0A\u4E0B\u6587\u3002\u5982\u679C\n\t\u5DF2\u5B9A\u4E49\u7247\u6BB5, \u5219\u5C06\u4F7F\u7528\u65B0\u8BC4\u4F30\u4E0A\u4E0B\u6587\u91CD\u7F6E\n\t\u6267\u884C\u72B6\u6001, \u5E76\u4E14\u5C06\u91CD\u653E\u7247\u6BB5 -- \u4E0D\u663E\u793A\n\t\u91CD\u653E, \u4F46\u662F\u5C06\u663E\u793A\u9519\u8BEF\u3002\u8FD9\u7B49\u540C\u4E8E: /reload -quiet\n\t\u6709\u5173\u4E0A\u4E0B\u6587\u9009\u9879\u7684\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605:\n\n\t\t/help context\n\n\t\u4F8B\u5982:\n\n\t\t/env -add-modules com.greetings help.history.summary = \u60A8\u952E\u5165\u7684\u5185\u5BB9\u7684\u5386\u53F2\u8BB0\u5F55 help.history.args = @@ -234,6 +242,8 @@ help.intro =\u4F7F\u7528 jshell \u5DE5\u5177\u53EF\u4EE5\u6267\u884C Java \u4EE3 help.shortcuts.summary = \u5FEB\u6377\u65B9\u5F0F\u7684\u8BF4\u660E help.shortcuts =\u652F\u6301\u7684\u5FEB\u6377\u65B9\u5F0F\u5305\u62EC:\n\n\n\t\t\u5728\u8F93\u5165 Java \u6807\u8BC6\u7B26, jshell \u547D\u4EE4\u6216 jshell\n\t\t\u547D\u4EE4\u53C2\u6570 (\u5728\u67D0\u4E9B\u60C5\u51B5\u4E0B) \u7684\u524D\u51E0\u4E2A\u5B57\u6BCD\u540E,\n\t\t\u6309 \u952E\u53EF\u4EE5\u5B8C\u6210\u8F93\u5165\u3002\n\t\t\u5982\u679C\u6709\u591A\u4E2A\u8F93\u5165\u63D0\u793A, \u5219\u663E\u793A\u53EF\u80FD\u7684\u8F93\u5165\u63D0\u793A\u3002\n\nShift-\n\t\t\u5728\u65B9\u6CD5\u6216\u6784\u9020\u5668\u8C03\u7528\u7684\u540D\u79F0\u548C\u5DE6\u62EC\u53F7\u540E\u9762,\n\t\t\u6309\u4F4F \u952E\u5E76\u6309 \u53EF\u67E5\u770B\u6240\u6709\n\t\t\u5339\u914D\u7684\u65B9\u6CD5/\u6784\u9020\u5668\u7684\u63D0\u8981\u3002\n\n v\n\t\t\u5728\u5B8C\u6574\u7684\u8868\u8FBE\u5F0F\u540E\u9762, \u6309 " v" \u53EF\u4EE5\u5F15\u5165\u65B0\u7684\u53D8\u91CF,\n\t\t\u5176\u7C7B\u578B\u57FA\u4E8E\u8868\u8FBE\u5F0F\u7684\u7C7B\u578B\u3002\n\t\t"" \u53EF\u4EE5\u662F Alt-F1 \u6216 Alt-Enter, \u5177\u4F53\u53D6\u51B3\u4E8E\u5E73\u53F0\u3002\n\n i\n\t\t\u5728\u4E0D\u53EF\u89E3\u6790\u7684\u6807\u8BC6\u7B26\u540E\u9762, \u6309 " i", \u6B64\u65F6 jshell \u5C06\u4F1A\n\t\t\u6839\u636E\u6307\u5B9A\u7C7B\u8DEF\u5F84\u7684\u5185\u5BB9\u63D0\u8BAE\u53EF\u80FD\u7684\u5168\u9650\u5B9A\u540D\u79F0\u3002\n\t\t"" \u53EF\u4EE5\u662F Alt-F1 \u6216 Alt-Enter, \u5177\u4F53\u53D6\u51B3\u4E8E\u5E73\u53F0\u3002 +help.context.summary = /env /reload \u548C /reset \u7684\u8BC4\u4F30\u4E0A\u4E0B\u6587\u9009\u9879 +help.context =\u8FD9\u4E9B\u9009\u9879\u7528\u4E8E\u914D\u7F6E\u8BC4\u4F30\u4E0A\u4E0B\u6587, \u5B83\u4EEC\u53EF\u4EE5\u5728\u542F\u52A8\njshell \u65F6\u6307\u5B9A: \u5728\u547D\u4EE4\u884C\u4E0A, \u6216\u8005\u4F7F\u7528\u547D\u4EE4 /env,\n/reload \u6216 /reset \u91CD\u65B0\u542F\u52A8\u65F6\u3002\n\n\u5B83\u4EEC\u662F:\n\t--class-path <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n\t\t\u7528\u4E8E\u641C\u7D22\u7C7B\u6587\u4EF6\u7684\u76EE\u5F55, JAR \n\t\t\u6863\u6848\u548C ZIP \u6863\u6848\u7684\u5217\u8868\u3002\n\t\t\u8BE5\u5217\u8868\u4F7F\u7528\u8DEF\u5F84\u5206\u9694\u7B26\u5206\u9694\n\t\t(\u5728 unix/linux/mac \u4E0A\u4F7F\u7528 :, \u5728 Windows \u4E0A\u4F7F\u7528 ;)\u3002\n\t--module-path <\u6A21\u5757\u8DEF\u5F84>...\n\t\t\u76EE\u5F55\u5217\u8868, \u5176\u4E2D\u6BCF\u4E2A\u76EE\u5F55\n\t\t\u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55\u3002\n\t\t\u8BE5\u5217\u8868\u4F7F\u7528\u8DEF\u5F84\u5206\u9694\u7B26\u5206\u9694\n\t\t(\u5728 unix/linux/mac \u4E0A\u4F7F\u7528 :, \u5728 Windows \u4E0A\u4F7F\u7528 ;)\u3002\n\t--add-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n\t\t\u9664\u4E86\u521D\u59CB\u6A21\u5757\u4E4B\u5916\u8981\u89E3\u6790\u7684\u6839\u6A21\u5757\u3002\n\t\t<\u6A21\u5757\u540D\u79F0> \u8FD8\u53EF\u4EE5\u662F ALL-DEFAULT, ALL-SYSTEM,\n\t\tALL-MODULE-PATH\u3002\n\t--add-exports <\u6A21\u5757>/<\u7A0B\u5E8F\u5305>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n\t\t\u66F4\u65B0 <\u6A21\u5757> \u4EE5\u5C06 <\u7A0B\u5E8F\u5305> \u5BFC\u51FA\u5230 <\u76EE\u6807\u6A21\u5757>,\n\t\t\u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n\t\t<\u76EE\u6807\u6A21\u5757> \u53EF\u4EE5\u662F ALL-UNNAMED \u4EE5\u5BFC\u51FA\u5230\u5168\u90E8\n\t\t\u672A\u547D\u540D\u6A21\u5757\u3002\u5728 jshell \u4E2D, \u5982\u679C\u672A\u6307\u5B9A \n\t\t<\u76EE\u6807\u6A21\u5757> (no =), \u5219\u4F7F\u7528 ALL-UNNAMED\u3002\n\n\u5728\u547D\u4EE4\u884C\u4E0A, \u8FD9\u4E9B\u9009\u9879\u5FC5\u987B\u6709\u4E24\u4E2A\u77ED\u5212\u7EBF, \u4F8B\u5982: --module-path\n\u5728 jshell \u547D\u4EE4\u4E0A, \u5B83\u4EEC\u53EF\u4EE5\u6709\u4E00\u4E2A\u6216\u4E24\u4E2A\u77ED\u5212\u7EBF, \u4F8B\u5982: -module-path\n help.set._retain = '-retain' \u9009\u9879\u4FDD\u5B58\u8BBE\u7F6E\u4EE5\u4FBF\u5728\u5C06\u6765\u4F1A\u8BDD\u4E2D\u4F7F\u7528\u3002\n\u53EF\u4EE5\u5728 /set \u7684\u4EE5\u4E0B\u683C\u5F0F\u4E2D\u4F7F\u7528 -retain \u9009\u9879:\n\n\t/set editor -retain\n\t/set start -retain\n\t/set feedback -retain\n\t/set mode -retain\n\n\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605\u8FD9\u4E9B\u547D\u4EE4 -- \u4F8B\u5982, /help /set editor help.set.format = \u8BBE\u7F6E\u7528\u4E8E\u62A5\u544A\u7247\u6BB5\u4E8B\u4EF6\u7684\u683C\u5F0F\uFF1A\n\n\t/set format <\u6A21\u5F0F> <\u5B57\u6BB5> "<\u683C\u5F0F>" <\u9009\u62E9\u5668>...\n\n\u663E\u793A\u683C\u5F0F\u8BBE\u7F6E:\n\n\t/set format [<\u6A21\u5F0F> [<\u5B57\u6BB5>]]\n\n\u5176\u4E2D <\u6A21\u5F0F> \u662F\u4EE5\u524D\u5B9A\u4E49\u7684\u53CD\u9988\u6A21\u5F0F\u7684\u540D\u79F0 -- \u8BF7\u53C2\u9605 '/help /set mode'\u3002\n\u5176\u4E2D <\u5B57\u6BB5> \u662F\u8981\u5B9A\u4E49\u7684\u4E0A\u4E0B\u6587\u7279\u5B9A\u683C\u5F0F\u7684\u540D\u79F0\u3002\n\u5176\u4E2D <\u683C\u5F0F> \u662F\u4E00\u4E2A\u5E26\u5F15\u53F7\u7684\u5B57\u7B26\u4E32, \u8BE5\u5B57\u7B26\u4E32\u5C06\u4E3A\n\u5B57\u6BB5\u7684\u503C (\u5982\u679C\u9009\u62E9\u5668\u5339\u914D, \u6216\u8005\u6CA1\u6709\u4EFB\u4F55\u9009\u62E9\u5668)\u3002\n\u5728\u4F7F\u7528\u683C\u5F0F\u65F6, \u7528\u5927\u62EC\u53F7\u62EC\u8D77\u7684\u5B57\u6BB5\u540D\u5C06\u4F1A\u5728\u76F8\u5E94\u65F6\u95F4\n\u4F7F\u7528\u5B57\u6BB5\u503C\u66FF\u6362\u3002\u8FD9\u4E9B\u5B57\u6BB5\u53EF\u80FD\u5DF2\u4F7F\u7528\u6B64\u547D\u4EE4\u5B9A\u4E49, \n\u4E5F\u53EF\u80FD\u662F\u7279\u5B9A\u4E8E\u4E0A\u4E0B\u6587\u7684\u4EE5\u4E0B\u9884\u5B9A\u4E49\u5B57\u6BB5\u4E4B\u4E00:\n\t{name} == \u540D\u79F0, \u4F8B\u5982: \u53D8\u91CF\u7684\u540D\u79F0, ...\n\t{type} == \u7C7B\u578B\u540D\u79F0\u3002\u53D8\u91CF\u6216\u8868\u8FBE\u5F0F\u7684\u7C7B\u578B,\n\t\t\t\u65B9\u6CD5\u7684\u53C2\u6570\u7C7B\u578B\n\t{value} == \u8868\u8FBE\u5F0F\u6216\u53D8\u91CF\u521D\u59CB\u5316\u7684\u7ED3\u679C\u503C\n\t{unresolved} == \u672A\u89E3\u6790\u5F15\u7528\u7684\u5217\u8868\n\t{errors} == \u53EF\u6062\u590D\u9519\u8BEF\u7684\u5217\u8868 (\u53EA\u5728\u5904\u7406\n\t\t\t"display" \u5B57\u6BB5\u671F\u95F4)\n\t{err} == \u65E0\u683C\u5F0F\u7684\u9519\u8BEF\u884C (\u53EA\u5728\u5904\u7406\n\t\t\t"errorline" \u5B57\u6BB5\u671F\u95F4)\n\u8BE5\u5DE5\u5177\u8BBF\u95EE\u4EE5\u4E0B\u5B57\u6BB5\u6765\u786E\u5B9A\u6240\u663E\u793A\u7684\u53CD\u9988:\n\t{display} == \u4E3A\u7247\u6BB5\u4E8B\u4EF6\u663E\u793A\u7684\u6D88\u606F\n\t{errorline} == "errors" \u5B57\u6BB5\u4E2D\u7684\u4E00\u4E2A\u9519\u8BEF\u884C\u7684\u683C\u5F0F\n\t{pre} == \u53CD\u9988\u524D\u7F00 (\u4F5C\u4E3A\u547D\u4EE4\u53CD\u9988\u7684\u5F00\u5934)\n\t{post} == \u53CD\u9988\u540E\u7F00 (\u4F5C\u4E3A\u547D\u4EE4\u53CD\u9988\u7684\u7ED3\u5C3E)\n\t{errorpre} == \u9519\u8BEF\u524D\u7F00 (\u4F5C\u4E3A\u9519\u8BEF\u53CD\u9988\u7684\u5F00\u5934)\n\t{errorpost} == \u9519\u8BEF\u540E\u7F00 (\u4F5C\u4E3A\u9519\u8BEF\u53CD\u9988\u7684\u7ED3\u5C3E)\n\u8FD9\u4E9B\u5B57\u6BB5\u5177\u6709\u9ED8\u8BA4\u8BBE\u7F6E (\u53EF\u8986\u76D6)\u3002\n\u5176\u4E2D \u662F\u5E94\u7528\u683C\u5F0F\u7684\u4E0A\u4E0B\u6587\u3002\n\u9009\u62E9\u5668\u7ED3\u6784\u662F\u4E00\u4E2A\u7531\u9009\u62E9\u5668\u7C7B\u578B\u5217\u8868\u6784\u6210\u7684\u5217\u8868, \u4F7F\u7528\u8FDE\u5B57\u7B26\u5206\u9694\u3002\n\u9009\u62E9\u5668\u7C7B\u578B\u5217\u8868\u662F\u5355\u4E2A\u9009\u62E9\u5668\u7C7B\u578B\u7684\u503C\u7684\u5217\u8868, \u4F7F\u7528\u9017\u53F7\u5206\u9694\u3002\n\u5982\u679C\u6BCF\u4E2A\u9009\u62E9\u5668\u7C7B\u578B\u5217\u8868\u5339\u914D, \u5219\u9009\u62E9\u5668\u5339\u914D; \u5982\u679C\u5176\u4E2D\u67D0\u4E2A\u503C\n\u5339\u914D, \u5219\u9009\u62E9\u5668\u7C7B\u578B\u5217\u8868\u5339\u914D\u3002\n\ncase \u9009\u62E9\u5668\u7C7B\u578B\u63CF\u8FF0\u4E86\u7247\u6BB5\u7684\u7C7B\u578B\u3002\u503C\u5305\u62EC:\n\timport -- \u5BFC\u5165\u58F0\u660E\n\tclass -- \u7C7B\u58F0\u660E\n\tinterface -- \u63A5\u53E3\u58F0\u660E\n\tenum -- \u679A\u4E3E\u58F0\u660E\n\tannotation -- \u6CE8\u91CA\u63A5\u53E3\u58F0\u660E\n\tmethod -- \u65B9\u6CD5\u58F0\u660E -- \u6CE8: {type}==parameter-types\n\tvardecl -- \u4E0D\u5E26\u521D\u59CB\u5316\u7684\u53D8\u91CF\u58F0\u660E\n\tvardecl -- \u5E26\u521D\u59CB\u5316\u7684\u53D8\u91CF\u58F0\u660E\n\texpression -- \u8868\u8FBE\u5F0F -- \u6CE8: \ @@ -245,7 +255,7 @@ help.set.feedback = \u8BBE\u7F6E\u53CD\u9988\u6A21\u5F0F, \u8BE5\u6A21\u5F0F\u63 help.set.mode = \u521B\u5EFA\u7528\u6237\u5B9A\u4E49\u7684\u53CD\u9988\u6A21\u5F0F, \u4E5F\u53EF\u4EE5\u9009\u62E9\u4ECE\u73B0\u6709\u6A21\u5F0F\u590D\u5236:\n\n\t/set mode <\u6A21\u5F0F> [<\u65E7\u6A21\u5F0F>] [-command|-quiet|-delete]\n\u4FDD\u7559\u7528\u6237\u5B9A\u4E49\u7684\u53CD\u9988\u6A21\u5F0F\u4EE5\u4FBF\u5728\u5C06\u6765\u4F1A\u8BDD\u4E2D\u4F7F\u7528:\n\n\t/set mode -retain <\u6A21\u5F0F>\n\n\u5220\u9664\u7528\u6237\u5B9A\u4E49\u7684\u53CD\u9988\u6A21\u5F0F:\n\n\t/set mode -delete [-retain] <\u6A21\u5F0F>\n\n\u663E\u793A\u53CD\u9988\u6A21\u5F0F\u8BBE\u7F6E:\n\n\t/set mode [<\u6A21\u5F0F>]\n\n\u5176\u4E2D <\u65B0\u6A21\u5F0F> \u662F\u60A8\u5E0C\u671B\u521B\u5EFA\u7684\u6A21\u5F0F\u7684\u540D\u79F0\u3002\n\u800C <\u65E7\u6A21\u5F0F> \u662F\u4EE5\u524D\u5B9A\u4E49\u7684\u53CD\u9988\u6A21\u5F0F\u540D\u79F0\u3002\n\u5982\u679C\u5B58\u5728 <\u65E7\u6A21\u5F0F>, \u5176\u8BBE\u7F6E\u5C06\u4F1A\u590D\u5236\u5230\u65B0\u6A21\u5F0F\u3002\n'-command' \u4E0E '-quiet' \u51B3\u5B9A\u4E86\u662F\u5426\u663E\u793A\u4FE1\u606F\u6027/\u9A8C\u8BC1\u547D\u4EE4\u53CD\u9988\u3002\n\n\u4E00\u65E6\u521B\u5EFA\u65B0\u6A21\u5F0F, \u5373\u53EF\u4F7F\u7528 '/set format', '/set prompt' \u548C '/set truncation'\n\u8FDB\u884C\u914D\u7F6E\u3002\u4F7F\u7528 '/set feedback' \u53EF\u4F7F\u7528\u65B0\u6A21\u5F0F\u3002\n\n\u4F7F\u7528 -retain \u9009\u9879\u65F6, \u5C06\u5728\u672C\u6B21\u8FD0\u884C\u548C\u5C06\u6765\u8FD0\u884C jshell \u5DE5\u5177\u65F6\n\u4F7F\u7528\u8BE5\u6A21\u5F0F (\u5305\u62EC\u5176\u7EC4\u4EF6\u63D0\u793A, \u683C\u5F0F\u548C\u622A\u65AD\u8BBE\u7F6E)\u3002\n\u540C\u65F6\u4F7F\u7528 -retain \u548C -delete \u65F6, \u5C06\u4ECE\u5F53\u524D\u548C\u5C06\u6765\u4F1A\u8BDD\u4E2D\n\u5220\u9664\u8BE5\u6A21\u5F0F\u3002\n\n\u4E0D\u5E26\u9009\u9879\u7684\u683C\u5F0F\u663E\u793A\u6A21\u5F0F\u8BBE\u7F6E\u3002\n\u6307\u5B9A <\u6A21\u5F0F> \u65F6, \u5C06\u4EC5\u663E\u793A\u8BE5\u6A21\u5F0F\u7684\u6A21\u5F0F\u8BBE\u7F6E\u3002\n\u6CE8: \u6A21\u5F0F\u8BBE\u7F6E\u5305\u62EC\u63D0\u793A, \u683C\u5F0F\u548C\u622A\u65AD\u7684\n\u8BBE\u7F6E -- \u56E0\u6B64\u8FD8\u4F1A\u663E\u793A\u8FD9\u4E9B\u8BBE\u7F6E\u3002\n\u793A\u4F8B:\n\t/set mode myformat\n\u663E\u793A\u6A21\u5F0F myformat \u7684\u6A21\u5F0F, \u63D0\u793A, \u683C\u5F0F\u548C\u622A\u65AD\u8BBE\u7F6E\n -help.set.prompt = \u8BBE\u7F6E\u63D0\u793A\u7B26\u3002\u5FC5\u987B\u540C\u65F6\u8BBE\u7F6E\u6B63\u5E38\u63D0\u793A\u548C\u66F4\u591A\u63D0\u793A:\n\n\t/set prompt <\u6A21\u5F0F> "<\u63D0\u793A>" "<\u66F4\u591A\u63D0\u793A>"\n\n\u663E\u793A\u6B63\u5E38\u63D0\u793A\u548C\u66F4\u591A\u63D0\u793A:\n\n\t/set prompt [<\u6A21\u5F0F>]\n\n\u5176\u4E2D <\u6A21\u5F0F> \u662F\u4EE5\u524D\u5B9A\u4E49\u7684\u53CD\u9988\u6A21\u5F0F\u540D\u79F0\u3002\n\u800C <\u63D0\u793A> \u548C <\u66F4\u591A\u63D0\u793A> \u662F\u4F5C\u4E3A\u8F93\u5165\u63D0\u793A\u7B26\u8F93\u51FA\u7684\u5E26\u5F15\u53F7\u7684\u5B57\u7B26\u4E32;\n\u5B83\u4EEC\u5747\u53EF\u9009\u62E9\u6027\u5730\u5305\u542B '%s', \u8BE5\u53D8\u91CF\u5C06\u88AB\u66FF\u6362\u4E3A\u4E0B\u4E00\u4E2A\u7247\u6BB5 ID --\n\u8BF7\u6CE8\u610F, \u53EF\u80FD\u65E0\u6CD5\u5411\u6240\u8F93\u5165\u5185\u5BB9\u5206\u914D\u8BE5 ID, \u4F8B\u5982\u8FD9\u53EF\u80FD\u662F\u4E00\u4E2A\u9519\u8BEF\u6216\u547D\u4EE4\u3002\n\u66F4\u591A\u63D0\u793A\u5728\u591A\u884C\u7247\u6BB5\u7684\u7B2C\u4E8C\u884C\u4EE5\u53CA\u540E\u7EED\u884C\u4E0A\u4F7F\u7528\u3002\n\n\u4E0D\u5E26 <\u63D0\u793A> \u7684\u683C\u5F0F\u663E\u793A\u5F53\u524D\u8BBE\u7F6E\u63D0\u793A\u3002\n\u6307\u5B9A <\u6A21\u5F0F> \u65F6, \u5C06\u4EC5\u663E\u793A\u8BE5\u6A21\u5F0F\u7684\u63D0\u793A\u3002\n\u793A\u4F8B:\n\t/set prompt myformat\n\u663E\u793A\u4E3A\u6A21\u5F0F myformat \u8BBE\u7F6E\u7684\u63D0\u793A\n +help.set.prompt = \u8BBE\u7F6E\u63D0\u793A\u3002\u5FC5\u987B\u540C\u65F6\u8BBE\u7F6E\u6B63\u5E38\u63D0\u793A\u548C\u66F4\u591A\u63D0\u793A:\n\n\t/set prompt <\u6A21\u5F0F> "<\u63D0\u793A>" "<\u66F4\u591A\u63D0\u793A>"\n\n\u663E\u793A\u6B63\u5E38\u63D0\u793A\u548C\u66F4\u591A\u63D0\u793A:\n\n\t/set prompt [<\u6A21\u5F0F>]\n\n\u5176\u4E2D <\u6A21\u5F0F> \u662F\u4EE5\u524D\u5B9A\u4E49\u7684\u53CD\u9988\u6A21\u5F0F\u540D\u79F0\u3002\n\u800C <\u63D0\u793A> \u548C <\u66F4\u591A\u63D0\u793A> \u662F\u4F5C\u4E3A\u8F93\u5165\u63D0\u793A\u8F93\u51FA\u7684\u5E26\u5F15\u53F7\u7684\u5B57\u7B26\u4E32;\n\u5B83\u4EEC\u5747\u53EF\u9009\u62E9\u6027\u5730\u5305\u542B '%%s', \u8BE5\u53D8\u91CF\u5C06\u88AB\u66FF\u6362\u4E3A\u4E0B\u4E00\u4E2A\u7247\u6BB5 ID --\n\u8BF7\u6CE8\u610F, \u53EF\u80FD\u65E0\u6CD5\u5411\u6240\u8F93\u5165\u5185\u5BB9\u5206\u914D\u8BE5 ID, \u4F8B\u5982\u8FD9\u53EF\u80FD\u662F\u4E00\u4E2A\u9519\u8BEF\u6216\u547D\u4EE4\u3002\n\u66F4\u591A\u63D0\u793A\u5728\u591A\u884C\u7247\u6BB5\u7684\u7B2C\u4E8C\u884C\u4EE5\u53CA\u540E\u7EED\u884C\u4E0A\u4F7F\u7528\u3002\n\n\u4E0D\u5E26 <\u63D0\u793A> \u7684\u683C\u5F0F\u663E\u793A\u5F53\u524D\u8BBE\u7F6E\u7684\u63D0\u793A\u3002\n\u6307\u5B9A <\u6A21\u5F0F> \u65F6, \u5C06\u4EC5\u663E\u793A\u8BE5\u6A21\u5F0F\u7684\u63D0\u793A\u3002\n\u793A\u4F8B:\n\t/set prompt myformat\n\u663E\u793A\u4E3A\u6A21\u5F0F myformat \u8BBE\u7F6E\u7684\u63D0\u793A\n help.set.editor =\u6307\u5B9A\u8981\u4E3A /edit \u547D\u4EE4\u542F\u52A8\u7684\u547D\u4EE4:\n\n\t/set editor [-retain] [-wait] <\u547D\u4EE4>\n\n\t/set editor [-retain] -default\n\n\t/set editor [-retain] -delete\n\n\u4FDD\u7559\u5F53\u524D\u7F16\u8F91\u5668\u8BBE\u7F6E\u4EE5\u4FBF\u5728\u5C06\u6765\u4F1A\u8BDD\u4E2D\u4F7F\u7528:\n\n\t/set editor -retain\n\n\u663E\u793A\u8981\u4E3A /edit \u547D\u4EE4\u542F\u52A8\u7684\u547D\u4EE4:\n\n\t/set editor\n\n<\u547D\u4EE4> \u662F\u4E0E\u64CD\u4F5C\u7CFB\u7EDF\u76F8\u5173\u7684\u5B57\u7B26\u4E32\u3002\n<\u547D\u4EE4> \u53EF\u4EE5\u5305\u542B\u7528\u7A7A\u683C\u5206\u9694\u7684\u53C2\u6570 (\u4F8B\u5982\u6807\u8BB0)\n\n\u5982\u679C\u6307\u5B9A\u4E86 -default \u9009\u9879, \u5C06\u4F7F\u7528\u5185\u7F6E\u9ED8\u8BA4\u7F16\u8F91\u5668\u3002\n\n\u5982\u679C\u6307\u5B9A\u4E86 -delete \u9009\u9879, \u5C06\u5FFD\u7565\u4EE5\u524D\u7684\u8BBE\u7F6E -- \u542F\u52A8\njshell \u5DE5\u5177\u65F6\u5C06\u521D\u59CB\u5316\u7F16\u8F91\u5668\u8BBE\u7F6E\u3002\u5177\u4F53\u6765\u8BF4, \u5982\u679C\u5B58\u5728\n\u4FDD\u7559\u7684\u8BBE\u7F6E, \u5C06\u4F7F\u7528\u4FDD\u7559\u7684\u8BBE\u7F6E (\u9664\u975E\u540C\u65F6\u6307\u5B9A -retain \u548C -delete --\n\u8FD9\u5C06\u5220\u9664\u4FDD\u7559\u7684\u8BBE\u7F6E), \u5982\u679C\u8BBE\u7F6E\u4E86\u4EE5\u4E0B\u67D0\u4E2A\u73AF\u5883\u53D8\u91CF, \n\u5C06\u4F7F\u7528\u5B83: JSHELLEDITOR, VISUAL \u6216 EDITOR (\u6309\u6B64\u987A\u5E8F)\u3002\u5426\u5219\u5C06\u4F7F\u7528\n\u5185\u7F6E\u9ED8\u8BA4\u7F16\u8F91\u5668\u3002\n\n\u5982\u679C\u6307\u5B9A\u4E86 <\u547D\u4EE4>, \u5B83\u5C06\u7528\u4F5C\u5916\u90E8\u7F16\u8F91\u5668\u3002<\u547D\u4EE4>\n\u7531\u7A0B\u5E8F\u53CA\u96F6\u4E2A\u6216\u591A\u4E2A\u7A0B\u5E8F\u53C2\u6570\u7EC4\u6210\u3002\u4F7F\u7528 <\u547D\u4EE4>\n\u65F6, \u8981\u7F16\u8F91\u7684\u4E34\u65F6\u6587\u4EF6\u5C06\u4F5C\u4E3A\u6700\u540E\u4E00\u4E2A\u53C2\u6570\u9644\u52A0\u3002\n\u901A\u5E38, \u7F16\u8F91\u6A21\u5F0F\u5C06\u6301\u7EED\u5230\u9000\u51FA\u5916\u90E8\u7F16\u8F91\u5668\u4E3A\u6B62\u3002\u67D0\u4E9B\u5916\u90E8\u7F16\u8F91\u5668\n\u5C06\u7ACB\u5373\u9000\u51FA (\u4F8B\u5982, \u5982\u679C\u9000\u51FA\u7F16\u8F91\u7A97\u53E3), \u5E94\u4F7F\u7528\u5916\u90E8\u7F16\u8F91\u5668\n\u6807\u8BB0\u963B\u6B62\u7ACB\u5373\u9000\u51FA, \u6216\u8005\u4F7F\u7528 -wait \u9009\u9879\n\u63D0\u793A\u7528\u6237\u6307\u793A\u4F55\u65F6\u5E94\u7ED3\u675F\u7F16\u8F91\u6A21\u5F0F\u3002\n\n\u6CE8: \u5728\u7F16\u8F91\u6A21\u5F0F\u4E0B, \u4E0D\u4F1A\u663E\u793A\u4EFB\u4F55\u547D\u4EE4\u8F93\u5165\u3002\u9000\u51FA\u7F16\u8F91\u6A21\u5F0F\u540E, \n\u5C06\u4E0D\u4F1A\u663E\u793A\u5BF9\u7F16\u8F91\u7684\u7247\u6BB5\u6240\u505A\u7684\u4EFB\u4F55\u66F4\u6539\u3002\n\n\u4F7F\u7528 -retain \u9009\u9879\u65F6, \u5C06\u5728\u672C\u6B21\u8FD0\u884C\u548C\u5C06\u6765\u8FD0\u884C jshell \u5DE5\u5177\u65F6\n\u4F7F\u7528\u8BE5\u8BBE\u7F6E\u3002\n\n\u4E0D\u5E26 <\u547D\u4EE4> \u6216\u9009\u9879\u7684\u683C\u5F0F\u663E\u793A\u7F16\u8F91\u5668\u8BBE\u7F6E\u3002\n From b3000acc28fbc02d0d41a86c821aca724c4dac51 Mon Sep 17 00:00:00 2001 From: Li Jiang Date: Tue, 21 Feb 2017 06:03:29 -0800 Subject: [PATCH 279/447] 8172956: JDK9 message drop 30 l10n resource file updates - open Reviewed-by: joehw, mchung, smarks, sherman, henryjen --- .../apache/xalan/internal/res/XSLTErrorResources_it.java | 2 +- .../xalan/internal/res/XSLTErrorResources_zh_TW.java | 8 ++++---- .../xerces/internal/impl/msg/DOMMessages_de.properties | 4 +--- .../xerces/internal/impl/msg/DOMMessages_es.properties | 4 +--- .../xerces/internal/impl/msg/DOMMessages_fr.properties | 4 +--- .../xerces/internal/impl/msg/DOMMessages_it.properties | 4 +--- .../xerces/internal/impl/msg/DOMMessages_ja.properties | 4 +--- .../xerces/internal/impl/msg/DOMMessages_ko.properties | 4 +--- .../xerces/internal/impl/msg/DOMMessages_pt_BR.properties | 4 +--- .../xerces/internal/impl/msg/DOMMessages_sv.properties | 4 +--- .../xerces/internal/impl/msg/DOMMessages_zh_CN.properties | 4 +--- .../xerces/internal/impl/msg/DOMMessages_zh_TW.properties | 4 +--- .../internal/impl/msg/DatatypeMessages_de.properties | 4 +--- .../internal/impl/msg/DatatypeMessages_es.properties | 4 +--- .../internal/impl/msg/DatatypeMessages_fr.properties | 4 +--- .../internal/impl/msg/DatatypeMessages_it.properties | 4 +--- .../internal/impl/msg/DatatypeMessages_ja.properties | 4 +--- .../internal/impl/msg/DatatypeMessages_ko.properties | 4 +--- .../internal/impl/msg/DatatypeMessages_pt_BR.properties | 4 +--- .../internal/impl/msg/DatatypeMessages_sv.properties | 4 +--- .../internal/impl/msg/DatatypeMessages_zh_CN.properties | 4 +--- .../internal/impl/msg/DatatypeMessages_zh_TW.properties | 4 +--- .../impl/msg/JAXPValidationMessages_de.properties | 4 +--- .../impl/msg/JAXPValidationMessages_es.properties | 4 +--- .../impl/msg/JAXPValidationMessages_fr.properties | 4 +--- .../impl/msg/JAXPValidationMessages_it.properties | 4 +--- .../impl/msg/JAXPValidationMessages_ja.properties | 4 +--- .../impl/msg/JAXPValidationMessages_ko.properties | 4 +--- .../impl/msg/JAXPValidationMessages_pt_BR.properties | 4 +--- .../impl/msg/JAXPValidationMessages_sv.properties | 4 +--- .../impl/msg/JAXPValidationMessages_zh_CN.properties | 4 +--- .../impl/msg/JAXPValidationMessages_zh_TW.properties | 4 +--- .../xerces/internal/impl/msg/SAXMessages_de.properties | 4 +--- .../xerces/internal/impl/msg/SAXMessages_es.properties | 4 +--- .../xerces/internal/impl/msg/SAXMessages_fr.properties | 4 +--- .../xerces/internal/impl/msg/SAXMessages_it.properties | 4 +--- .../xerces/internal/impl/msg/SAXMessages_ja.properties | 4 +--- .../xerces/internal/impl/msg/SAXMessages_ko.properties | 4 +--- .../xerces/internal/impl/msg/SAXMessages_pt_BR.properties | 4 +--- .../xerces/internal/impl/msg/SAXMessages_sv.properties | 4 +--- .../xerces/internal/impl/msg/SAXMessages_zh_CN.properties | 4 +--- .../xerces/internal/impl/msg/SAXMessages_zh_TW.properties | 4 +--- .../internal/impl/msg/XMLSchemaMessages_de.properties | 4 +--- .../internal/impl/msg/XMLSchemaMessages_es.properties | 4 +--- .../internal/impl/msg/XMLSchemaMessages_fr.properties | 4 +--- .../internal/impl/msg/XMLSchemaMessages_it.properties | 6 ++---- .../internal/impl/msg/XMLSchemaMessages_ja.properties | 4 +--- .../internal/impl/msg/XMLSchemaMessages_ko.properties | 6 ++---- .../internal/impl/msg/XMLSchemaMessages_pt_BR.properties | 4 +--- .../internal/impl/msg/XMLSchemaMessages_sv.properties | 4 +--- .../internal/impl/msg/XMLSchemaMessages_zh_CN.properties | 4 +--- .../internal/impl/msg/XMLSchemaMessages_zh_TW.properties | 4 +--- .../internal/impl/msg/XMLSerializerMessages_de.properties | 4 +--- .../internal/impl/msg/XMLSerializerMessages_es.properties | 4 +--- .../internal/impl/msg/XMLSerializerMessages_fr.properties | 4 +--- .../internal/impl/msg/XMLSerializerMessages_it.properties | 4 +--- .../internal/impl/msg/XMLSerializerMessages_ja.properties | 4 +--- .../internal/impl/msg/XMLSerializerMessages_ko.properties | 4 +--- .../impl/msg/XMLSerializerMessages_pt_BR.properties | 4 +--- .../internal/impl/msg/XMLSerializerMessages_sv.properties | 4 +--- .../impl/msg/XMLSerializerMessages_zh_CN.properties | 4 +--- .../impl/msg/XMLSerializerMessages_zh_TW.properties | 4 +--- .../internal/impl/msg/XPointerMessages_de.properties | 4 +--- .../internal/impl/msg/XPointerMessages_es.properties | 4 +--- .../internal/impl/msg/XPointerMessages_fr.properties | 4 +--- .../internal/impl/msg/XPointerMessages_it.properties | 8 +++----- .../internal/impl/msg/XPointerMessages_ja.properties | 4 +--- .../internal/impl/msg/XPointerMessages_ko.properties | 4 +--- .../internal/impl/msg/XPointerMessages_pt_BR.properties | 4 +--- .../internal/impl/msg/XPointerMessages_sv.properties | 4 +--- .../internal/impl/msg/XPointerMessages_zh_CN.properties | 4 +--- .../internal/impl/msg/XPointerMessages_zh_TW.properties | 4 +--- .../javax/xml/catalog/CatalogMessages_de.properties | 4 +++- .../javax/xml/catalog/CatalogMessages_es.properties | 4 +++- .../javax/xml/catalog/CatalogMessages_fr.properties | 4 +++- .../javax/xml/catalog/CatalogMessages_it.properties | 4 +++- .../javax/xml/catalog/CatalogMessages_ja.properties | 4 +++- .../javax/xml/catalog/CatalogMessages_ko.properties | 4 +++- .../javax/xml/catalog/CatalogMessages_pt_BR.properties | 4 +++- .../javax/xml/catalog/CatalogMessages_sv.properties | 4 +++- .../javax/xml/catalog/CatalogMessages_zh_CN.properties | 4 +++- .../javax/xml/catalog/CatalogMessages_zh_TW.properties | 4 +++- 82 files changed, 109 insertions(+), 229 deletions(-) diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java index aae3c36dfc8..e68fa6bafca 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java @@ -1013,7 +1013,7 @@ public class XSLTErrorResources_it extends ListResourceBundle "Propriet\u00E0 di sistema org.xml.sax.parser non specificata"}, { ER_PARSER_ARG_CANNOT_BE_NULL, - "L''argomento del parser non deve essere nullo"}, + "L'argomento del parser non deve essere nullo"}, { ER_FEATURE, "Funzione: {0}"}, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java index ee8a11b35f6..362cd585fc6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java @@ -1022,7 +1022,7 @@ public class XSLTErrorResources_zh_TW extends ListResourceBundle "\u5C6C\u6027: {0}"}, { ER_NULL_ENTITY_RESOLVER, - "\u7A7A\u503C\u500B\u9AD4\u89E3\u6790\u5668"}, + "\u7A7A\u503C\u5BE6\u9AD4\u89E3\u6790\u5668"}, { ER_NULL_DTD_HANDLER, "\u7A7A\u503C DTD \u8655\u7406\u7A0B\u5F0F"}, @@ -1356,8 +1356,8 @@ public class XSLTErrorResources_zh_TW extends ListResourceBundle { "optionLXCIN", " [-LXCIN compiledStylesheetFileNameIn]"}, { "optionLXCOUT", " [-LXCOUT compiledStylesheetFileNameOutOut]"}, { "optionPARSER", " [-PARSER \u5256\u6790\u5668\u806F\u7D61\u7684\u5B8C\u6574\u985E\u5225\u540D\u7A31]"}, - { "optionE", " [-E (\u52FF\u5C55\u958B\u500B\u9AD4\u53C3\u7167)]"}, - { "optionV", " [-E (\u52FF\u5C55\u958B\u500B\u9AD4\u53C3\u7167)]"}, + { "optionE", " [-E (\u52FF\u5C55\u958B\u5BE6\u9AD4\u53C3\u7167)]"}, + { "optionV", " [-E (\u52FF\u5C55\u958B\u5BE6\u9AD4\u53C3\u7167)]"}, { "optionQC", " [-QC (\u975C\u97F3\u6A23\u5F0F\u885D\u7A81\u8B66\u544A)]"}, { "optionQ", " [-Q (\u975C\u97F3\u6A21\u5F0F)]"}, { "optionLF", " [-LF (\u8F38\u51FA\u4E0A\u50C5\u4F7F\u7528\u63DB\u884C\u5B57\u5143 {\u9810\u8A2D\u70BA CR/LF})]"}, @@ -1381,7 +1381,7 @@ public class XSLTErrorResources_zh_TW extends ListResourceBundle { "noParsermsg4", "\u82E5\u7121 IBM \u7684 XML Parser for Java\uFF0C\u53EF\u4E0B\u8F09\u81EA"}, { "noParsermsg5", "IBM \u7684 AlphaWorks: http://www.alphaworks.ibm.com/formula/xml"}, { "optionURIRESOLVER", " [-URIRESOLVER \u5B8C\u6574\u985E\u5225\u540D\u7A31 (\u7528\u4F86\u89E3\u6790 URI \u7684 URIResolver)]"}, - { "optionENTITYRESOLVER", " [-ENTITYRESOLVER \u5B8C\u6574\u985E\u5225\u540D\u7A31 (\u7528\u4F86\u89E3\u6790\u500B\u9AD4\u7684 EntityResolver )]"}, + { "optionENTITYRESOLVER", " [-ENTITYRESOLVER \u5B8C\u6574\u985E\u5225\u540D\u7A31 (\u7528\u4F86\u89E3\u6790\u5BE6\u9AD4\u7684 EntityResolver )]"}, { "optionCONTENTHANDLER", " [-CONTENTHANDLER \u5B8C\u6574\u985E\u5225\u540D\u7A31 (\u7528\u4F86\u5E8F\u5217\u5316\u8F38\u51FA\u7684 ContentHandler)]"}, { "optionLINENUMBERS", " [-L \u4F7F\u7528\u884C\u865F\u65BC\u4F86\u6E90\u6587\u4EF6]"}, { "optionSECUREPROCESSING", " [-SECURE (\u5C07\u5B89\u5168\u8655\u7406\u529F\u80FD\u8A2D\u70BA\u771F\u3002)]"}, diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_de.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_de.properties index d3221c5fa92..0b8ee27b51e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_de.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ # DOM implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DOMMessages_de.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/13 06:43:54 gmolloy Exp $ BadMessageKey = Die zum Meldungsschl\u00FCssel geh\u00F6rige Fehlermeldung kann nicht gefunden werden. FormatFailed = Beim Formatieren der folgenden Meldung ist ein interner Fehler aufgetreten:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_es.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_es.properties index 26f25eb9db9..cfbb9cb547d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_es.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_es.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ # DOM implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DOMMessages_es.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 05:10:53 gmolloy Exp $ BadMessageKey = No se ha encontrado el mensaje de error correspondiente a la clave de mensaje. FormatFailed = Se ha producido un error interno al formatear el siguiente mensaje:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_fr.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_fr.properties index cd1aed4acdc..ef9b325fd5a 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_fr.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_fr.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ # DOM implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DOMMessages_fr.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 02:16:52 gmolloy Exp $ BadMessageKey = Le message d'erreur correspondant \u00E0 la cl\u00E9 de message est introuvable. FormatFailed = Une erreur interne est survenue lors du formatage du message suivant :\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_it.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_it.properties index 35b5be5ea63..c000e23df50 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_it.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_it.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ # DOM implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DOMMessages_it.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 08:14:02 gmolloy Exp $ BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. FormatFailed = Si \u00E8 verificato un errore interno durante la formattazione del seguente messaggio:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ja.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ja.properties index 4b0b83dfa96..e2f923e6181 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ja.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ # DOM implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DOMMessages_ja.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 01:05:12 gmolloy Exp $ BadMessageKey = \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AD\u30FC\u306B\u5BFE\u5FDC\u3059\u308B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 FormatFailed = \u6B21\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u66F8\u5F0F\u8A2D\u5B9A\u4E2D\u306B\u5185\u90E8\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ko.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ko.properties index d5b3b15eeba..bf3c87915fc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ko.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_ko.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ # DOM implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DOMMessages_ko.properties /st_wptg_1.9.dev.jdk/3 2016/07/14 00:25:31 gmolloy Exp $ BadMessageKey = \uBA54\uC2DC\uC9C0 \uD0A4\uC5D0 \uD574\uB2F9\uD558\uB294 \uC624\uB958 \uBA54\uC2DC\uC9C0\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. FormatFailed = \uB2E4\uC74C \uBA54\uC2DC\uC9C0\uC758 \uD615\uC2DD\uC744 \uC9C0\uC815\uD558\uB294 \uC911 \uB0B4\uBD80 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_pt_BR.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_pt_BR.properties index 5054b344d37..ed9e73aa53f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_pt_BR.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_pt_BR.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ # DOM implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DOMMessages_pt_BR.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 07:33:06 gmolloy Exp $ BadMessageKey = N\u00E3o foi poss\u00EDvel encontrar a mensagem de erro correspondente \u00E0 chave da mensagem. FormatFailed = Ocorreu um erro interno ao formatar a mensagem a seguir:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_sv.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_sv.properties index 2558ec3a5ed..e97789688fe 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_sv.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_sv.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ # DOM implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DOMMessages_sv.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 00:46:23 gmolloy Exp $ BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. FormatFailed = Ett internt fel intr\u00E4ffade vid formatering av f\u00F6ljande meddelande:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_CN.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_CN.properties index ccc991a6e16..c59decb1b3d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_CN.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ # DOM implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DOMMessages_zh_CN.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 01:19:32 gmolloy Exp $ BadMessageKey = \u627E\u4E0D\u5230\u4E0E\u6D88\u606F\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u9519\u8BEF\u6D88\u606F\u3002 FormatFailed = \u8BBE\u7F6E\u4EE5\u4E0B\u6D88\u606F\u7684\u683C\u5F0F\u65F6\u51FA\u73B0\u5185\u90E8\u9519\u8BEF:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_TW.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_TW.properties index 4ae403e235f..05a943d80a2 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_TW.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DOMMessages_zh_TW.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ # DOM implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DOMMessages_zh_TW.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 00:30:48 gmolloy Exp $ BadMessageKey = \u627E\u4E0D\u5230\u5C0D\u61C9\u8A0A\u606F\u7D22\u5F15\u9375\u7684\u932F\u8AA4\u8A0A\u606F\u3002 FormatFailed = \u683C\u5F0F\u5316\u4E0B\u5217\u8A0A\u606F\u6642\u767C\u751F\u5167\u90E8\u932F\u8AA4:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_de.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_de.properties index 14baff4c0cf..1d9f1a082fa 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_de.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DatatypeMessages_de.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 01:16:51 gmolloy Exp $ BadMessageKey = Die zum Meldungsschl\u00FCssel geh\u00F6rige Fehlermeldung kann nicht gefunden werden. FormatFailed = Beim Formatieren der folgenden Meldung ist ein interner Fehler aufgetreten:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_es.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_es.properties index 73bfbc7af94..e9dcc900a04 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_es.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_es.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DatatypeMessages_es.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 05:10:53 gmolloy Exp $ BadMessageKey = No se ha encontrado el mensaje de error correspondiente a la clave de mensaje. FormatFailed = Se ha producido un error interno al formatear el siguiente mensaje:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_fr.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_fr.properties index e45255b69b2..231b13d8952 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_fr.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_fr.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DatatypeMessages_fr.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 02:16:52 gmolloy Exp $ BadMessageKey = Le message d'erreur correspondant \u00E0 la cl\u00E9 de message est introuvable. FormatFailed = Une erreur interne est survenue lors du formatage du message suivant :\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_it.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_it.properties index e08b8e0870c..4793921f9d4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_it.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_it.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DatatypeMessages_it.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 08:14:02 gmolloy Exp $ BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. FormatFailed = Si \u00E8 verificato un errore interno durante la formattazione del seguente messaggio:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ja.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ja.properties index 1cfe77062cc..84d90d0fd41 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ja.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DatatypeMessages_ja.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 01:05:12 gmolloy Exp $ BadMessageKey = \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AD\u30FC\u306B\u5BFE\u5FDC\u3059\u308B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 FormatFailed = \u6B21\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u66F8\u5F0F\u8A2D\u5B9A\u4E2D\u306B\u5185\u90E8\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ko.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ko.properties index bbc91843e32..837faae29cb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ko.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_ko.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DatatypeMessages_ko.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 02:40:33 gmolloy Exp $ BadMessageKey = \uBA54\uC2DC\uC9C0 \uD0A4\uC5D0 \uD574\uB2F9\uD558\uB294 \uC624\uB958 \uBA54\uC2DC\uC9C0\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. FormatFailed = \uB2E4\uC74C \uBA54\uC2DC\uC9C0\uC758 \uD615\uC2DD\uC744 \uC9C0\uC815\uD558\uB294 \uC911 \uB0B4\uBD80 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_pt_BR.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_pt_BR.properties index 8f836ee7b0e..e617790c015 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_pt_BR.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_pt_BR.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DatatypeMessages_pt_BR.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 07:33:06 gmolloy Exp $ BadMessageKey = N\u00E3o foi poss\u00EDvel encontrar a mensagem de erro correspondente \u00E0 chave da mensagem. FormatFailed = Ocorreu um erro interno ao formatar a mensagem a seguir:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_sv.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_sv.properties index 4778bdabbc6..122e0add0b7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_sv.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_sv.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DatatypeMessages_sv.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 00:46:23 gmolloy Exp $ BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. FormatFailed = Ett internt fel intr\u00E4ffade vid formatering av f\u00F6ljande meddelande:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_CN.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_CN.properties index 19950952522..21a3e3c9919 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_CN.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DatatypeMessages_zh_CN.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 01:19:32 gmolloy Exp $ BadMessageKey = \u627E\u4E0D\u5230\u4E0E\u6D88\u606F\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u9519\u8BEF\u6D88\u606F\u3002 FormatFailed = \u8BBE\u7F6E\u4EE5\u4E0B\u6D88\u606F\u7684\u683C\u5F0F\u65F6\u51FA\u73B0\u5185\u90E8\u9519\u8BEF:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_TW.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_TW.properties index 43873ec65ec..cb23f872a1b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_TW.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/DatatypeMessages_zh_TW.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Datatype API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: DatatypeMessages_zh_TW.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/11 20:46:43 gmolloy Exp $ BadMessageKey = \u627E\u4E0D\u5230\u5C0D\u61C9\u8A0A\u606F\u7D22\u5F15\u9375\u7684\u932F\u8AA4\u8A0A\u606F\u3002 FormatFailed = \u683C\u5F0F\u5316\u4E0B\u5217\u8A0A\u606F\u6642\u767C\u751F\u5167\u90E8\u932F\u8AA4:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_de.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_de.properties index 51417ac6a21..d9a740adbd8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_de.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: JAXPValidationMessages_de.properties /st_wptg_1.8.0.0.0jdk/4 2013/11/10 07:44:26 gmolloy Exp $ # Messages for message reporting BadMessageKey = Die zum Meldungsschl\u00FCssel geh\u00F6rige Fehlermeldung kann nicht gefunden werden. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_es.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_es.properties index 9c02b32abf9..0bac87ccbf3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_es.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_es.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: JAXPValidationMessages_es.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 05:10:53 gmolloy Exp $ # Messages for message reporting BadMessageKey = No se ha encontrado el mensaje de error correspondiente a la clave de mensaje. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_fr.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_fr.properties index 9e12758e6bb..a48dd9437df 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_fr.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_fr.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: JAXPValidationMessages_fr.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 02:16:52 gmolloy Exp $ # Messages for message reporting BadMessageKey = Le message d'erreur correspondant \u00E0 la cl\u00E9 de message est introuvable. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_it.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_it.properties index 53c2ae00f51..8829cf1e019 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_it.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_it.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: JAXPValidationMessages_it.properties /st_wptg_1.8.0.0.0jdk/3 2013/09/16 07:02:00 gmolloy Exp $ # Messages for message reporting BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ja.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ja.properties index 122feead430..86120a72476 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ja.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: JAXPValidationMessages_ja.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 01:05:12 gmolloy Exp $ # Messages for message reporting BadMessageKey = \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AD\u30FC\u306B\u5BFE\u5FDC\u3059\u308B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ko.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ko.properties index 8f01010d5d1..bfdcfcb8e60 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ko.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_ko.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: JAXPValidationMessages_ko.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 02:40:33 gmolloy Exp $ # Messages for message reporting BadMessageKey = \uBA54\uC2DC\uC9C0 \uD0A4\uC5D0 \uD574\uB2F9\uD558\uB294 \uC624\uB958 \uBA54\uC2DC\uC9C0\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_pt_BR.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_pt_BR.properties index 0ec9da84643..47ba42f6d4d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_pt_BR.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_pt_BR.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: JAXPValidationMessages_pt_BR.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 07:33:06 gmolloy Exp $ # Messages for message reporting BadMessageKey = N\u00E3o foi poss\u00EDvel encontrar a mensagem de erro correspondente \u00E0 chave da mensagem. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_sv.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_sv.properties index 83884aeb7c8..22556779bfc 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_sv.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_sv.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: JAXPValidationMessages_sv.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 00:46:23 gmolloy Exp $ # Messages for message reporting BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_CN.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_CN.properties index 757845f41ba..9cc5ccb25f2 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_CN.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: JAXPValidationMessages_zh_CN.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 01:19:32 gmolloy Exp $ # Messages for message reporting BadMessageKey = \u627E\u4E0D\u5230\u4E0E\u6D88\u606F\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u9519\u8BEF\u6D88\u606F\u3002 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_TW.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_TW.properties index 4d78213a044..f0ee4f06be3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_TW.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/JAXPValidationMessages_zh_TW.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces JAXP Validation API implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: JAXPValidationMessages_zh_TW.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 00:30:48 gmolloy Exp $ # Messages for message reporting BadMessageKey = \u627E\u4E0D\u5230\u5C0D\u61C9\u8A0A\u606F\u7D22\u5F15\u9375\u7684\u932F\u8AA4\u8A0A\u606F\u3002 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_de.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_de.properties index 78add948a60..2b99e3461e1 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_de.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ # SAX implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: SAXMessages_de.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 01:16:51 gmolloy Exp $ BadMessageKey = Die zum Meldungsschl\u00FCssel geh\u00F6rige Fehlermeldung kann nicht gefunden werden. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_es.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_es.properties index 60d5cfe3f74..5493f01cfc0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_es.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_es.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ # SAX implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: SAXMessages_es.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 05:10:53 gmolloy Exp $ BadMessageKey = No se ha encontrado el mensaje de error correspondiente a la clave de mensaje. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_fr.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_fr.properties index 97e7f3d98c1..17cecded65e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_fr.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_fr.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ # SAX implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: SAXMessages_fr.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 02:16:52 gmolloy Exp $ BadMessageKey = Le message d'erreur correspondant \u00E0 la cl\u00E9 de message est introuvable. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_it.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_it.properties index 773b9a2d8d9..c779be68515 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_it.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_it.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ # SAX implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: SAXMessages_it.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 08:14:02 gmolloy Exp $ BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ja.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ja.properties index 5301c2f2ca7..21978c587cb 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ja.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ # SAX implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: SAXMessages_ja.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 01:05:12 gmolloy Exp $ BadMessageKey = \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AD\u30FC\u306B\u5BFE\u5FDC\u3059\u308B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ko.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ko.properties index 032a96d1e5a..98bf822dda2 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ko.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ko.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ # SAX implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: SAXMessages_ko.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 02:40:33 gmolloy Exp $ BadMessageKey = \uBA54\uC2DC\uC9C0 \uD0A4\uC5D0 \uD574\uB2F9\uD558\uB294 \uC624\uB958 \uBA54\uC2DC\uC9C0\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_pt_BR.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_pt_BR.properties index 3641fecd907..6e708459485 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_pt_BR.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_pt_BR.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ # SAX implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: SAXMessages_pt_BR.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/12 18:01:34 gmolloy Exp $ BadMessageKey = N\u00E3o foi poss\u00EDvel encontrar a mensagem de erro correspondente \u00E0 chave da mensagem. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_sv.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_sv.properties index b4f1f001afe..5088946e609 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_sv.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_sv.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ # SAX implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: SAXMessages_sv.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/14 01:57:20 gmolloy Exp $ BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_CN.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_CN.properties index 4c425d1705d..cc07506f888 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_CN.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ # SAX implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: SAXMessages_zh_CN.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 01:19:32 gmolloy Exp $ BadMessageKey = \u627E\u4E0D\u5230\u4E0E\u6D88\u606F\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u9519\u8BEF\u6D88\u606F\u3002 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_TW.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_TW.properties index 7ee58dcddbf..91902b973b7 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_TW.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_zh_TW.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ # SAX implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: SAXMessages_zh_TW.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 00:30:48 gmolloy Exp $ BadMessageKey = \u627E\u4E0D\u5230\u5C0D\u61C9\u8A0A\u606F\u7D22\u5F15\u9375\u7684\u932F\u8AA4\u8A0A\u606F\u3002 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_de.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_de.properties index dd6e309b21a..7c864068a94 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_de.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,6 @@ # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XMLSchemaMessages_de.properties /st_wptg_1.9.dev.jdk/2 2016/06/08 01:51:09 gmolloy Exp $ BadMessageKey = Die zum Meldungsschl\u00FCssel geh\u00F6rige Fehlermeldung kann nicht gefunden werden. FormatFailed = Beim Formatieren der folgenden Meldung ist ein interner Fehler aufgetreten:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_es.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_es.properties index edbc9c3460c..3d2f34114f4 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_es.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_es.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,6 @@ # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XMLSchemaMessages_es.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/14 05:09:25 gmolloy Exp $ BadMessageKey = No se ha encontrado el mensaje de error correspondiente a la clave de mensaje. FormatFailed = Se ha producido un error interno al formatear el siguiente mensaje:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_fr.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_fr.properties index 5a539598eec..8c56325eaac 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_fr.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_fr.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,6 @@ # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XMLSchemaMessages_fr.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/12 05:13:35 gmolloy Exp $ BadMessageKey = Le message d'erreur correspondant \u00E0 la cl\u00E9 de message est introuvable. FormatFailed = Une erreur interne est survenue lors du formatage du message suivant :\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_it.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_it.properties index 06c792ea58d..00ae985aef6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_it.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_it.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,6 @@ # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XMLSchemaMessages_it.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/12 03:53:19 gmolloy Exp $ BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. FormatFailed = Si \u00E8 verificato un errore interno durante la formattazione del seguente messaggio:\n @@ -137,7 +135,7 @@ src-element.2.2 = src-element.2.2: poich\u00E9 ''{0}'' contiene l''attributo ''ref'', il suo contenuto deve corrispondere a (annotation?), ma \u00E8 stato trovato ''{1}''. src-element.3 = src-element.3: l''elemento "{0}" ha sia un attributo ''type'' che un elemento figlio "anonymous type". \u00C8 consentito uno solo di questi valori per un elemento. src-import.1.1 = src-import.1.1: l''attributo "{0}" dello spazio di nomi di una voce di informazioni di elemento non deve essere uguale al targetNamespace dello schema in cui esiste. - src-import.1.2 = src-import.1.2: se l''attributo dello spazio di nomi non \u00E8 presente in una voce di informazioni di elemento , lo schema che lo contiene deve avere un targetNamespace. + src-import.1.2 = src-import.1.2: se l'attributo dello spazio di nomi non \u00E8 presente in una voce di informazioni di elemento , lo schema che lo contiene deve avere un targetNamespace. src-import.2 = src-import.2: l''elemento radice del documento "{0}" deve avere lo spazio di nomi denominato ''http://www.w3.org/2001/XMLSchema'' e il nome locale ''schema''. src-import.3.1 = src-import.3.1: l''attributo "{0}" dello spazio di nomi di una voce di informazioni di elemento deve essere uguale all''attributo targetNamespace ''{1}'' del documento importato. src-import.3.2 = src-import.3.2: non esiste alcun attributo dello spazio di nomi nella voce di informazioni di elemento , pertanto il documento importato non pu\u00F2 avere alcun attributo targetNamespace. tuttavia, \u00E8 stato trovato targetNamespace ''{1}'' nel documento importato. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ja.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ja.properties index 63997f8fe22..cd27296e8ef 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ja.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,6 @@ # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XMLSchemaMessages_ja.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/12 00:37:07 gmolloy Exp $ BadMessageKey = \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AD\u30FC\u306B\u5BFE\u5FDC\u3059\u308B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 FormatFailed = \u6B21\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u66F8\u5F0F\u8A2D\u5B9A\u4E2D\u306B\u5185\u90E8\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ko.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ko.properties index 52ab2b4df2c..d44c67439a6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ko.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ko.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,6 @@ # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XMLSchemaMessages_ko.properties /st_wptg_1.9.dev.jdk/3 2016/07/14 00:25:31 gmolloy Exp $ BadMessageKey = \uBA54\uC2DC\uC9C0 \uD0A4\uC5D0 \uD574\uB2F9\uD558\uB294 \uC624\uB958 \uBA54\uC2DC\uC9C0\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. FormatFailed = \uB2E4\uC74C \uBA54\uC2DC\uC9C0\uC758 \uD615\uC2DD\uC744 \uC9C0\uC815\uD558\uB294 \uC911 \uB0B4\uBD80 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.\n @@ -218,7 +216,7 @@ e-props-correct.2 = e-props-correct.2: ''{0}'' \uC694\uC18C\uC758 \uAC12 \uC81C\uC57D \uC870\uAC74 \uAC12 ''{1}''\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. e-props-correct.4 = e-props-correct.4: ''{0}'' \uC694\uC18C\uC758 '{'type definition'}'\uC774 substitutionHead ''{1}''\uC758 '{'type definition'}'\uC5D0\uC11C \uC801\uD569\uD558\uAC8C \uD30C\uC0DD\uB41C \uAC83\uC774 \uC544\uB2C8\uAC70\uB098 ''{1}''\uC758 '{'substitution group exclusions'}' \uC18D\uC131\uC774 \uC774 \uD30C\uC0DD\uC744 \uD5C8\uC6A9\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. e-props-correct.5 = e-props-correct.5: \uC694\uC18C\uC758 '{'type definition'}' \uB610\uB294 '{'type definition'}'\uC758 '{'content type'}'\uC774 ID\uC774\uAC70\uB098 ID\uC5D0\uC11C \uD30C\uC0DD\uB41C \uAC83\uC774\uBBC0\uB85C '{'value constraint'}'\uB294 ''{0}'' \uC694\uC18C\uC5D0 \uC5C6\uC5B4\uC57C \uD569\uB2C8\uB2E4. - e-props-correct.6 = e-props-correct.6: ''{0}'' \uC694\uC18C\uC5D0 \uB300\uD55C \uC21C\uD658 \uB300\uCCB4 \uADF8\uB8F9\uC774 \uAC10\uC9C0\uB418\uC5C8\uC2B5\uB2C8\uB2E4.. + e-props-correct.6 = e-props-correct.6: ''{0}'' \uC694\uC18C\uC5D0 \uB300\uD55C \uC21C\uD658 \uB300\uCCB4 \uADF8\uB8F9\uC774 \uAC10\uC9C0\uB418\uC5C8\uC2B5\uB2C8\uB2E4. fractionDigits-valid-restriction = fractionDigits-valid-restriction: {2}\uC758 \uC815\uC758\uC5D0\uC11C ''fractionDigits'' \uBA74\uC5D0 \uB300\uD55C ''{0}'' \uAC12\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. \uC774 \uAC12\uC740 \uC870\uC0C1 \uC720\uD615 \uC911 \uD558\uB098\uC5D0\uC11C ''{1}''(\uC73C)\uB85C \uC124\uC815\uB41C ''fractionDigits''\uC5D0 \uB300\uD55C \uAC12\uBCF4\uB2E4 \uC791\uAC70\uB098 \uAC19\uC544\uC57C \uD569\uB2C8\uB2E4. fractionDigits-totalDigits = fractionDigits-totalDigits: {2}\uC758 \uC815\uC758\uC5D0\uC11C ''fractionDigits'' \uBA74\uC5D0 \uB300\uD55C ''{0}'' \uAC12\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. \uC774 \uAC12\uC740 ''totalDigits''\uC5D0 \uB300\uD55C \uAC12\uC778 ''{1}''\uBCF4\uB2E4 \uC791\uAC70\uB098 \uAC19\uC544\uC57C \uD569\uB2C8\uB2E4. length-minLength-maxLength.1.1 = length-minLength-maxLength.1.1: {0} \uC720\uD615\uC758 \uACBD\uC6B0 length ''{1}''\uC758 \uAC12\uC740 minLength ''{2}''\uC758 \uAC12\uBCF4\uB2E4 \uC791\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_pt_BR.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_pt_BR.properties index 0abad5e3812..ac226e02e25 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_pt_BR.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_pt_BR.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,6 @@ # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XMLSchemaMessages_pt_BR.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/12 18:01:34 gmolloy Exp $ BadMessageKey = N\u00E3o foi poss\u00EDvel encontrar a mensagem de erro correspondente \u00E0 chave da mensagem. FormatFailed = Ocorreu um erro interno ao formatar a mensagem a seguir:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_sv.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_sv.properties index eeaf7782718..185b9ffaf88 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_sv.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_sv.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,6 @@ # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XMLSchemaMessages_sv.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/14 01:57:20 gmolloy Exp $ BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. FormatFailed = Ett internt fel intr\u00E4ffade vid formatering av f\u00F6ljande meddelande:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_CN.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_CN.properties index bf51b628471..d3e03337546 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_CN.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,6 @@ # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XMLSchemaMessages_zh_CN.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/13 05:10:27 gmolloy Exp $ BadMessageKey = \u627E\u4E0D\u5230\u4E0E\u6D88\u606F\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u9519\u8BEF\u6D88\u606F\u3002 FormatFailed = \u8BBE\u7F6E\u4EE5\u4E0B\u6D88\u606F\u7684\u683C\u5F0F\u65F6\u51FA\u73B0\u5185\u90E8\u9519\u8BEF:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_TW.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_TW.properties index 747036b9576..925a97306e0 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_TW.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_zh_TW.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,6 @@ # This file contains error and warning messages related to XML Schema # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XMLSchemaMessages_zh_TW.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/11 20:46:43 gmolloy Exp $ BadMessageKey = \u627E\u4E0D\u5230\u5C0D\u61C9\u8A0A\u606F\u7D22\u5F15\u9375\u7684\u932F\u8AA4\u8A0A\u606F\u3002 FormatFailed = \u683C\u5F0F\u5316\u4E0B\u5217\u8A0A\u606F\u6642\u767C\u751F\u5167\u90E8\u932F\u8AA4:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_de.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_de.properties index a279e879bd4..3c1d9d8282c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_de.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -29,8 +29,6 @@ # # As usual with properties files, the messages are arranged in # key/value tuples. -# -# @version $Id: XMLSerializerMessages_de.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 01:16:51 gmolloy Exp $ BadMessageKey = Die zum Meldungsschl\u00FCssel geh\u00F6rige Fehlermeldung kann nicht gefunden werden. FormatFailed = Beim Formatieren der folgenden Meldung ist ein interner Fehler aufgetreten:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_es.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_es.properties index a06a1613092..4e6c0c62ed3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_es.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_es.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -29,8 +29,6 @@ # # As usual with properties files, the messages are arranged in # key/value tuples. -# -# @version $Id: XMLSerializerMessages_es.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 05:10:53 gmolloy Exp $ BadMessageKey = No se ha encontrado el mensaje de error que corresponde a la clave de mensaje. FormatFailed = Se ha producido un error interno al formatear el siguiente mensaje:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_fr.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_fr.properties index a274f4be731..535f97ecc5b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_fr.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_fr.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -29,8 +29,6 @@ # # As usual with properties files, the messages are arranged in # key/value tuples. -# -# @version $Id: XMLSerializerMessages_fr.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 02:16:52 gmolloy Exp $ BadMessageKey = Le message d'erreur correspondant \u00E0 la cl\u00E9 de message est introuvable. FormatFailed = Une erreur interne est survenue lors de la mise en forme du message suivant :\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_it.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_it.properties index 114f1f47125..2798c1a2c17 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_it.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_it.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -29,8 +29,6 @@ # # As usual with properties files, the messages are arranged in # key/value tuples. -# -# @version $Id: XMLSerializerMessages_it.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 08:14:02 gmolloy Exp $ BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. FormatFailed = Si \u00E8 verificato un errore interno durante la formattazione del seguente messaggio:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ja.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ja.properties index c604e087580..341497c9a6f 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ja.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -29,8 +29,6 @@ # # As usual with properties files, the messages are arranged in # key/value tuples. -# -# @version $Id: XMLSerializerMessages_ja.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 01:05:12 gmolloy Exp $ BadMessageKey = \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AD\u30FC\u306B\u5BFE\u5FDC\u3059\u308B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 FormatFailed = \u6B21\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u66F8\u5F0F\u8A2D\u5B9A\u4E2D\u306B\u5185\u90E8\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ko.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ko.properties index 0ff73562f3d..c09651c4e99 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ko.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_ko.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -29,8 +29,6 @@ # # As usual with properties files, the messages are arranged in # key/value tuples. -# -# @version $Id: XMLSerializerMessages_ko.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 02:40:33 gmolloy Exp $ BadMessageKey = \uBA54\uC2DC\uC9C0 \uD0A4\uC5D0 \uD574\uB2F9\uD558\uB294 \uC624\uB958 \uBA54\uC2DC\uC9C0\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. FormatFailed = \uB2E4\uC74C \uBA54\uC2DC\uC9C0\uC758 \uD615\uC2DD\uC744 \uC9C0\uC815\uD558\uB294 \uC911 \uB0B4\uBD80 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_pt_BR.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_pt_BR.properties index e842306d2bb..29991ad2fc3 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_pt_BR.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_pt_BR.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -29,8 +29,6 @@ # # As usual with properties files, the messages are arranged in # key/value tuples. -# -# @version $Id: XMLSerializerMessages_pt_BR.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 07:33:06 gmolloy Exp $ BadMessageKey = N\u00E3o foi poss\u00EDvel encontrar a mensagem de erro correspondente \u00E0 chave da mensagem. FormatFailed = Ocorreu um erro interno ao formatar a mensagem a seguir:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_sv.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_sv.properties index 68ad3bf3b8e..4f39063a0e6 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_sv.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_sv.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -29,8 +29,6 @@ # # As usual with properties files, the messages are arranged in # key/value tuples. -# -# @version $Id: XMLSerializerMessages_sv.properties /st_wptg_1.9.0.0.0jdk/2 2016/04/14 01:57:20 gmolloy Exp $ BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. FormatFailed = Ett internt fel intr\u00E4ffade vid formatering av f\u00F6ljande meddelande:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_CN.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_CN.properties index c9888263168..d8b2eb0bba5 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_CN.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -29,8 +29,6 @@ # # As usual with properties files, the messages are arranged in # key/value tuples. -# -# @version $Id: XMLSerializerMessages_zh_CN.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 01:19:32 gmolloy Exp $ BadMessageKey = \u627E\u4E0D\u5230\u4E0E\u6D88\u606F\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u9519\u8BEF\u6D88\u606F\u3002 FormatFailed = \u8BBE\u7F6E\u4EE5\u4E0B\u6D88\u606F\u7684\u683C\u5F0F\u65F6\u51FA\u73B0\u5185\u90E8\u9519\u8BEF:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_TW.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_TW.properties index c6dfc1606d2..28af1b88d66 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_TW.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSerializerMessages_zh_TW.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -29,8 +29,6 @@ # # As usual with properties files, the messages are arranged in # key/value tuples. -# -# @version $Id: XMLSerializerMessages_zh_TW.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 00:30:48 gmolloy Exp $ BadMessageKey = \u627E\u4E0D\u5230\u5C0D\u61C9\u8A0A\u606F\u7D22\u5F15\u9375\u7684\u932F\u8AA4\u8A0A\u606F\u3002 FormatFailed = \u683C\u5F0F\u5316\u4E0B\u5217\u8A0A\u606F\u6642\u767C\u751F\u5167\u90E8\u932F\u8AA4:\n diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_de.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_de.properties index 72d3bba7381..dc787a6cd3d 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_de.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_de.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XPointerMessages_de.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 01:16:51 gmolloy Exp $ # Messages for message reporting BadMessageKey = Die zum Meldungsschl\u00FCssel geh\u00F6rige Fehlermeldung kann nicht gefunden werden. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_es.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_es.properties index baa0b0d6fd4..3495022fe75 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_es.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_es.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XPointerMessages_es.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 05:10:53 gmolloy Exp $ # Messages for message reporting BadMessageKey = No se ha encontrado el mensaje de error que corresponde a la clave de mensaje. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_fr.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_fr.properties index 9eb7cf0d3fc..a9fe2c41407 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_fr.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_fr.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XPointerMessages_fr.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 02:16:52 gmolloy Exp $ # Messages for message reporting BadMessageKey = Le message d'erreur correspondant \u00E0 la cl\u00E9 de message est introuvable. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_it.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_it.properties index d59616ea2d6..549797ba81e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_it.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_it.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,15 +26,13 @@ # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XPointerMessages_it.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 08:14:02 gmolloy Exp $ # Messages for message reporting BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio. FormatFailed = Si \u00E8 verificato un errore interno durante la formattazione del seguente messaggio:\n # XPointer Framework Error Messages -XPointerProcessingError = XPointerProcessingError: si \u00E8 verificato un errore durante l'elaborazione dell''espressione XPointer. +XPointerProcessingError = XPointerProcessingError: si \u00E8 verificato un errore durante l'elaborazione dell'espressione XPointer. InvalidXPointerToken = InvalidXPointerToken: l''espressione XPointer contiene il token non valido ''{0}''. InvalidXPointerExpression = InvalidXPointerExpression: l''espressione XPointer ''{0}'' non \u00E8 valida. MultipleShortHandPointers = MultipleShortHandPointers: l''espressione XPointer ''{0}'' non \u00E8 valida. Contiene pi\u00F9 puntatori ShortHand. @@ -47,6 +45,6 @@ InvalidSchemeDataInXPointer = InvalidSchemeDataInXPointer: l''espressione XPoint # XPointer Element Scheme Error Messages InvalidElementSchemeToken = InvalidElementSchemeToken: l''espressione XPointer dello schema element() contiene il token non valido ''{0}''. InvalidElementSchemeXPointer = InvalidElementSchemeXPointer: l''espressione XPointer ''{0}'' dello schema di elemento non \u00E8 valida. -XPointerElementSchemeProcessingError = XPointerElementSchemeProcessingError: si \u00E8 verificato un errore durante l'elaborazione dell''espressione di schema element() XPointer. +XPointerElementSchemeProcessingError = XPointerElementSchemeProcessingError: si \u00E8 verificato un errore durante l'elaborazione dell'espressione di schema element() XPointer. InvalidNCNameInElementSchemeData = InvalidNCNameInElementSchemeData: lo schema element() contiene un puntatore ShortHand ''{0}'' con NCName non valido. InvalidChildSequenceCharacter = InvalidChildSequenceCharacter: lo schema element() contiene un carattere di sequenza secondaria ''{0}'' non valido. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ja.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ja.properties index 26a2a3eec83..e12a67655f8 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ja.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ja.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XPointerMessages_ja.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 01:05:12 gmolloy Exp $ # Messages for message reporting BadMessageKey = \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AD\u30FC\u306B\u5BFE\u5FDC\u3059\u308B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ko.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ko.properties index 3f43bbd67bd..c86ecf6264c 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ko.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_ko.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XPointerMessages_ko.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 02:40:33 gmolloy Exp $ # Messages for message reporting BadMessageKey = \uBA54\uC2DC\uC9C0 \uD0A4\uC5D0 \uD574\uB2F9\uD558\uB294 \uC624\uB958 \uBA54\uC2DC\uC9C0\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_pt_BR.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_pt_BR.properties index a4076986da3..34584b802ca 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_pt_BR.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_pt_BR.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XPointerMessages_pt_BR.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/28 07:33:06 gmolloy Exp $ # Messages for message reporting BadMessageKey = N\u00E3o foi poss\u00EDvel encontrar a mensagem de erro correspondente \u00E0 chave da mensagem. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_sv.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_sv.properties index 8444e131b9b..0e822f523f2 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_sv.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_sv.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XPointerMessages_sv.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 00:46:23 gmolloy Exp $ # Messages for message reporting BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln. diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_CN.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_CN.properties index d2c2dc3220f..cbbaad08e7b 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_CN.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_CN.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XPointerMessages_zh_CN.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/29 01:19:32 gmolloy Exp $ # Messages for message reporting BadMessageKey = \u627E\u4E0D\u5230\u4E0E\u6D88\u606F\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u9519\u8BEF\u6D88\u606F\u3002 diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_TW.properties b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_TW.properties index 6c9bf142532..5b30e236a2e 100644 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_TW.properties +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_zh_TW.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ # This file stores localized messages for the Xerces XPointer implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. -# -# @version $Id: XPointerMessages_zh_TW.properties /st_wptg_1.8.0.0.0jdk/2 2013/05/27 00:30:48 gmolloy Exp $ # Messages for message reporting BadMessageKey = \u627E\u4E0D\u5230\u5C0D\u61C9\u8A0A\u606F\u7D22\u5F15\u9375\u7684\u932F\u8AA4\u8A0A\u606F\u3002 diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_de.properties b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_de.properties index dc5e23ea133..a5f8ada6c45 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_de.properties +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_de.properties @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,8 @@ InvalidEntryType = Der Eintragstyp "{0}" ist ung\u00FCltig. CircularReference = Zirkelbezug ist nicht zul\u00E4ssig: "{0}". #errors +UriNotAbsolute = Die angegebene URI "{0}" ist nicht absolut. +UriNotValidUrl = Die angegebene URI "{0}" ist keine g\u00FCltige URL. InvalidArgument = Das angegebene Argument "{0}" (unter Beachtung der Gro\u00DF-/Kleinschreibung) f\u00FCr "{1}" ist nicht g\u00FCltig. NullArgument = Das Argument "{0}" darf nicht null sein. InvalidPath = Der Pfad "{0}" ist ung\u00FCltig. diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_es.properties b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_es.properties index fa364803cf0..614a5524dab 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_es.properties +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_es.properties @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,8 @@ InvalidEntryType = El tipo de entrada ''{0}'' no es v\u00E1lido. CircularReference = No est\u00E1 permitida la referencia circular: ''{0}''. #errors +UriNotAbsolute = El URI especificado ''{0}'' no es absoluto. +UriNotValidUrl = El URI especificado ''{0}'' no es una URL v\u00E1lida. InvalidArgument = El argumento especificado ''{0}'' (sensible a may\u00FAsculas y min\u00FAsculas) para ''{1}'' no es v\u00E1lido. NullArgument = El argumento ''{0}'' no puede ser nulo. InvalidPath = La ruta ''{0}'' no es v\u00E1lida. diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_fr.properties b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_fr.properties index 3cddf0ddc67..a552cd71c31 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_fr.properties +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_fr.properties @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,8 @@ InvalidEntryType = Le type d''entr\u00E9e ''{0}'' n''est pas valide. CircularReference = La r\u00E9f\u00E9rence circulaire n''est pas autoris\u00E9e : ''{0}''. #errors +UriNotAbsolute = L''URI indiqu\u00E9 ''{0}'' n''est pas absolu. +UriNotValidUrl = L''URI indiqu\u00E9 ''{0}'' n''est pas une URL valide. InvalidArgument = L''argument indiqu\u00E9 ''{0}'' (respect maj./min.) pour ''{1}'' n''est pas valide. NullArgument = L''argument ''{0}'' ne peut pas \u00EAtre NULL. InvalidPath = Le chemin ''{0}'' n''est pas valide. diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_it.properties b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_it.properties index 05bb803d2bc..f0f206e4f12 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_it.properties +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_it.properties @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,8 @@ InvalidEntryType = Il tipo di voce ''{0}'' non \u00E8 valido. CircularReference = La dipendenza circolare non \u00E8 consentita: ''{0}''. #errors +UriNotAbsolute = L''URI specificato ''{0}'' non \u00E8 assoluto. +UriNotValidUrl = L''URI specificato ''{0}'' non \u00E8 valido. InvalidArgument = L''argomento specificato ''{0}'' (con distinzione tra maiuscole e minuscole) per ''{1}'' non \u00E8 valido. NullArgument = L''argomento ''{0}'' non pu\u00F2 essere nullo. InvalidPath = Il percorso ''{0}'' non \u00E8 valido. diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ja.properties b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ja.properties index d58bc2283c9..e3560944291 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ja.properties +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ja.properties @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,8 @@ InvalidEntryType = \u30A8\u30F3\u30C8\u30EA\u30FB\u30BF\u30A4\u30D7''{0}''\u306F CircularReference = \u5FAA\u74B0\u53C2\u7167\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093: ''{0}''\u3002 #errors +UriNotAbsolute = \u6307\u5B9A\u3055\u308C\u305FURI ''{0}''\u304C\u7D76\u5BFEURI\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002 +UriNotValidUrl = \u6307\u5B9A\u3057\u305FURI ''{0}''\u306F\u6709\u52B9\u306AURL\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002 InvalidArgument = ''{1}''\u306B\u6307\u5B9A\u3055\u308C\u305F\u5F15\u6570''{0}'' (\u5927/\u5C0F\u6587\u5B57\u3092\u533A\u5225)\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002 NullArgument = \u5F15\u6570''{0}''\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093\u3002 InvalidPath = \u30D1\u30B9''{0}''\u306F\u7121\u52B9\u3067\u3059\u3002 diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ko.properties b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ko.properties index 03334135cc4..aac1e6cfc84 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ko.properties +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ko.properties @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,8 @@ InvalidEntryType = \uD56D\uBAA9 \uC720\uD615 ''{0}''\uC774(\uAC00) \uBD80\uC801\ CircularReference = \uC21C\uD658 \uCC38\uC870\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC74C: ''{0}''. #errors +UriNotAbsolute = \uC9C0\uC815\uB41C URI ''{0}''\uC774(\uAC00) \uC808\uB300 \uACBD\uB85C\uAC00 \uC544\uB2D9\uB2C8\uB2E4. +UriNotValidUrl = \uC9C0\uC815\uB41C URI ''{0}''\uC774(\uAC00) \uBD80\uC801\uD569\uD55C URL\uC785\uB2C8\uB2E4. InvalidArgument = ''{1}''\uC5D0 \uB300\uD574 \uC9C0\uC815\uB41C \uC778\uC218 ''{0}''(\uB300\uC18C\uBB38\uC790 \uAD6C\uBD84)\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. NullArgument = ''{0}'' \uC778\uC218\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. InvalidPath = ''{0}'' \uACBD\uB85C\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_pt_BR.properties b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_pt_BR.properties index 18434b91fea..989ca790654 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_pt_BR.properties +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_pt_BR.properties @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,8 @@ InvalidEntryType = O tipo de entrada "{0}" n\u00E3o \u00E9 v\u00E1lido. CircularReference = A refer\u00EAncia circular n\u00E3o \u00E9 permitida: ''{0}''. #errors +UriNotAbsolute = O URI especificado ''{0}'' n\u00E3o \u00E9 absoluto. +UriNotValidUrl = O URI especificado ''{0}'' n\u00E3o \u00E9 um URL v\u00E1lido. InvalidArgument = O argumento especificado ''{0}'' (distingue mai\u00FAsculas de min\u00FAsculas) para ''{1}'' n\u00E3o \u00E9 v\u00E1lido. NullArgument = O argumento ''{0}'' n\u00E3o pode ser nulo. InvalidPath = O caminho ''{0}'' \u00E9 inv\u00E1lido. diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_sv.properties b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_sv.properties index 6f52f5e5125..02709bf1259 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_sv.properties +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_sv.properties @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,8 @@ InvalidEntryType = Posttypen ''{0}'' \u00E4r inte giltig. CircularReference = Cirkul\u00E4r referens \u00E4r inte till\u00E5ten: ''{0}''. #errors +UriNotAbsolute = Den angivna URI:n, ''{0}'', \u00E4r inte absolut. +UriNotValidUrl = Den angivna URI:n, ''{0}'', \u00E4r inte en giltig URL. InvalidArgument = Det angivna argumentet, ''{0}'' (skiftl\u00E4gesk\u00E4nsligt), f\u00F6r ''{1}'' \u00E4r inte giltigt. NullArgument = Argumentet ''{0}'' kan inte vara null. InvalidPath = S\u00F6kv\u00E4gen ''{0}'' \u00E4r ogiltig. diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_CN.properties b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_CN.properties index c91492239d0..e371995cfc9 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_CN.properties +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_CN.properties @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,8 @@ InvalidEntryType = \u6761\u76EE\u7C7B\u578B ''{0}'' \u65E0\u6548\u3002 CircularReference = \u4E0D\u5141\u8BB8\u5FAA\u73AF\u5F15\u7528: ''{0}''\u3002 #errors +UriNotAbsolute = \u6307\u5B9A\u7684 URI ''{0}'' \u4E0D\u662F\u7EDD\u5BF9 URI\u3002 +UriNotValidUrl = \u6307\u5B9A\u7684 URI ''{0}'' \u4E0D\u662F\u6709\u6548\u7684 URL\u3002 InvalidArgument = \u4E3A ''{1}'' \u6307\u5B9A\u7684\u53C2\u6570 ''{0}'' (\u533A\u5206\u5927\u5C0F\u5199) \u65E0\u6548\u3002 NullArgument = \u53C2\u6570 ''{0}'' \u4E0D\u80FD\u4E3A\u7A7A\u503C\u3002 InvalidPath = \u8DEF\u5F84 ''{0}'' \u65E0\u6548\u3002 diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_TW.properties b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_TW.properties index 49ea45d1c70..ee5fddd7a02 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_TW.properties +++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_TW.properties @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,8 @@ InvalidEntryType = \u9805\u76EE\u985E\u578B ''{0}'' \u7121\u6548\u3002 CircularReference = \u4E0D\u5141\u8A31\u5FAA\u74B0\u53C3\u7167: ''{0}''\u3002 #errors +UriNotAbsolute = \u6307\u5B9A\u7684 URI ''{0}'' \u4E0D\u662F\u7D55\u5C0D\u8DEF\u5F91\u3002 +UriNotValidUrl = \u6307\u5B9A\u7684 URI ''{0}'' \u4E0D\u662F\u6709\u6548\u7684 URL\u3002 InvalidArgument = ''{1}'' \u7684\u6307\u5B9A\u5F15\u6578 ''{0}'' (\u6709\u5927\u5C0F\u5BEB\u4E4B\u5206) \u7121\u6548\u3002 NullArgument = \u5F15\u6578''{0}'' \u4E0D\u53EF\u70BA\u7A7A\u503C\u3002 InvalidPath = \u8DEF\u5F91 ''{0}'' \u7121\u6548\u3002 From 90bde9549ed43df7259a6f9b9389feef38a7170c Mon Sep 17 00:00:00 2001 From: Harold Seigel Date: Tue, 21 Feb 2017 09:53:49 -0500 Subject: [PATCH 280/447] 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags Check if ACC_MODULE is set, and if so, throw NoClassDefFoundError exception Reviewed-by: dholmes, alanb, acorn, coleenp, lfoltan, gtriantafill --- .../share/vm/classfile/classFileParser.cpp | 37 ++++- .../classFileParserBug/AccModuleTest.java | 54 +++++++ .../classFileParserBug/BadAccModInrClss.jcod | 113 ++++++++++++++ .../classFileParserBug/BadAccModule.jcod | 140 ++++++++++++++++++ hotspot/test/runtime/modules/acc_module.jcod | 3 +- 5 files changed, 339 insertions(+), 8 deletions(-) create mode 100644 hotspot/test/runtime/classFileParserBug/AccModuleTest.java create mode 100644 hotspot/test/runtime/classFileParserBug/BadAccModInrClss.jcod create mode 100644 hotspot/test/runtime/classFileParserBug/BadAccModule.jcod diff --git a/hotspot/src/share/vm/classfile/classFileParser.cpp b/hotspot/src/share/vm/classfile/classFileParser.cpp index 96ffac10af0..be04aded810 100644 --- a/hotspot/src/share/vm/classfile/classFileParser.cpp +++ b/hotspot/src/share/vm/classfile/classFileParser.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -3052,7 +3052,13 @@ u2 ClassFileParser::parse_classfile_inner_classes_attribute(const ClassFileStrea "Class is both outer and inner class in class file %s", CHECK_0); } // Access flags - jint flags = cfs->get_u2_fast() & RECOGNIZED_INNER_CLASS_MODIFIERS; + jint flags; + // JVM_ACC_MODULE is defined in JDK-9 and later. + if (_major_version >= JAVA_9_VERSION) { + flags = cfs->get_u2_fast() & (RECOGNIZED_INNER_CLASS_MODIFIERS | JVM_ACC_MODULE); + } else { + flags = cfs->get_u2_fast() & RECOGNIZED_INNER_CLASS_MODIFIERS; + } if ((flags & JVM_ACC_INTERFACE) && _major_version < JAVA_6_VERSION) { // Set abstract bit for old class files for backward compatibility flags |= JVM_ACC_ABSTRACT; @@ -4524,6 +4530,18 @@ static void check_illegal_static_method(const InstanceKlass* this_klass, TRAPS) // utility methods for format checking void ClassFileParser::verify_legal_class_modifiers(jint flags, TRAPS) const { + const bool is_module = (flags & JVM_ACC_MODULE) != 0; + assert(_major_version >= JAVA_9_VERSION || !is_module, "JVM_ACC_MODULE should not be set"); + if (is_module) { + ResourceMark rm(THREAD); + Exceptions::fthrow( + THREAD_AND_LOCATION, + vmSymbols::java_lang_NoClassDefFoundError(), + "%s is not a class because access_flag ACC_MODULE is set", + _class_name->as_C_string()); + return; + } + if (!_need_verify) { return; } const bool is_interface = (flags & JVM_ACC_INTERFACE) != 0; @@ -4532,14 +4550,12 @@ void ClassFileParser::verify_legal_class_modifiers(jint flags, TRAPS) const { const bool is_super = (flags & JVM_ACC_SUPER) != 0; const bool is_enum = (flags & JVM_ACC_ENUM) != 0; const bool is_annotation = (flags & JVM_ACC_ANNOTATION) != 0; - const bool is_module_info= (flags & JVM_ACC_MODULE) != 0; const bool major_gte_15 = _major_version >= JAVA_1_5_VERSION; if ((is_abstract && is_final) || (is_interface && !is_abstract) || (is_interface && major_gte_15 && (is_super || is_enum)) || - (!is_interface && major_gte_15 && is_annotation) || - is_module_info) { + (!is_interface && major_gte_15 && is_annotation)) { ResourceMark rm(THREAD); Exceptions::fthrow( THREAD_AND_LOCATION, @@ -5734,16 +5750,23 @@ void ClassFileParser::parse_stream(const ClassFileStream* const stream, stream->guarantee_more(8, CHECK); // flags, this_class, super_class, infs_len // Access flags - jint flags = stream->get_u2_fast() & JVM_RECOGNIZED_CLASS_MODIFIERS; + jint flags; + // JVM_ACC_MODULE is defined in JDK-9 and later. + if (_major_version >= JAVA_9_VERSION) { + flags = stream->get_u2_fast() & (JVM_RECOGNIZED_CLASS_MODIFIERS | JVM_ACC_MODULE); + } else { + flags = stream->get_u2_fast() & JVM_RECOGNIZED_CLASS_MODIFIERS; + } if ((flags & JVM_ACC_INTERFACE) && _major_version < JAVA_6_VERSION) { // Set abstract bit for old class files for backward compatibility flags |= JVM_ACC_ABSTRACT; } + verify_legal_class_modifiers(flags, CHECK); + _access_flags.set_flags(flags); - verify_legal_class_modifiers((jint)_access_flags.as_int(), CHECK); // This class and superclass _this_class_index = stream->get_u2_fast(); diff --git a/hotspot/test/runtime/classFileParserBug/AccModuleTest.java b/hotspot/test/runtime/classFileParserBug/AccModuleTest.java new file mode 100644 index 00000000000..2adc1e3db43 --- /dev/null +++ b/hotspot/test/runtime/classFileParserBug/AccModuleTest.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8174725 + * @summary Throw NoClassDefFoundError if class access_flags have ACC_MODULE set + * @compile BadAccModule.jcod BadAccModInrClss.jcod + * @run main AccModuleTest + */ + +// Test that classes with access_flags containing ACC_MODULE cause ClassDefNotFoundErrors. +public class AccModuleTest { + public static void main(String args[]) throws Throwable { + + System.out.println("Regression test for bug 8174725"); + try { + Class newClass = Class.forName("BadAccModule"); + throw new RuntimeException("Expected NoClassDefFoundError exception not thrown"); + } catch (java.lang.NoClassDefFoundError e) { + if (!e.getMessage().contains("BadAccModule is not a class because access_flag ACC_MODULE is set")) { + throw new RuntimeException("Wrong NoClassDefFoundError exception for AccModuleTest: " + e.getMessage()); + } + } + try { + Class newClass = Class.forName("BadAccModInrClss"); + throw new RuntimeException("Expected NoClassDefFoundError exception not thrown"); + } catch (java.lang.NoClassDefFoundError e) { + if (!e.getMessage().contains("BadAccModInrClss is not a class because access_flag ACC_MODULE is set")) { + throw new RuntimeException("Wrong NoClassDefFoundError exception for BadAccModInrClss: " + e.getMessage()); + } + } + } +} diff --git a/hotspot/test/runtime/classFileParserBug/BadAccModInrClss.jcod b/hotspot/test/runtime/classFileParserBug/BadAccModInrClss.jcod new file mode 100644 index 00000000000..bba5d08794b --- /dev/null +++ b/hotspot/test/runtime/classFileParserBug/BadAccModInrClss.jcod @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This tests that a class in an InnerClasses attribute with ACC_MODULE set + * causes a NoClassDefFoundError exception to get thrown. + */ + +class BadAccModInrClss { + 0xCAFEBABE; + 0; // minor version + 53; // version + [22] { // Constant Pool + ; // first element is empty + Field #3 #14; // #1 at 0x0A + Method #4 #15; // #2 at 0x0F + class #16; // #3 at 0x14 + class #19; // #4 at 0x17 + Utf8 "this$0"; // #5 at 0x1A + Utf8 "La;"; // #6 at 0x23 + Utf8 "Synthetic"; // #7 at 0x29 + Utf8 ""; // #8 at 0x35 + Utf8 "(Ljava/lang/Object;)V"; // #9 at 0x3E + Utf8 "Code"; // #10 at 0x56 + Utf8 "LineNumberTable"; // #11 at 0x5D + Utf8 "SourceFile"; // #12 at 0x6F + Utf8 "a.java"; // #13 at 0x7C + NameAndType #5 #6; // #14 at 0x85 + NameAndType #8 #20; // #15 at 0x8A + Utf8 "BadAccModInrClss"; // #16 at 0x8F + Utf8 "Loc"; // #17 at 0x9E + Utf8 "InnerClasses"; // #18 at 0xA4 + Utf8 "java/lang/Object"; // #19 at 0xB3 + Utf8 "()V"; // #20 at 0xC6 + Utf8 "EnclosingMethod"; // #21 at 0xCC + } // Constant Pool + + 0x0000; // access + #3;// this_cpx + #4;// super_cpx + + [0] { // Interfaces + } // Interfaces + + [1] { // fields + { // Member at 0xE8 + 0x0000; // access + #5; // name_cpx + #6; // sig_cpx + [1] { // Attributes + Attr(#7, 0) { // Synthetic at 0xF0 + } // end Synthetic + } // Attributes + } // Member + } // fields + + [1] { // methods + { // Member at 0xF8 + 0x0001; // access + #8; // name_cpx + #20; // sig_cpx + [1] { // Attributes + Attr(#10, 17) { // Code at 0x0100 + 2; // max_stack + 2; // max_locals + Bytes[5]{ + 0x2AB70002B1; + }; + [0] { // Traps + } // end Traps + [0] { // Attributes + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [3] { // Attributes + Attr(#12, 2) { // SourceFile at 0x0119 + #13; + } // end SourceFile + ; + Attr(#18, 10) { // InnerClasses at 0x0121 + [1] { // InnerClasses + #3 #0 #17 0x8000; // at 0x0131 + } + } // end InnerClasses + ; + Attr(#21, 4) { // EnclosingMethod at 0x0131 + 0x0004000F; + } // end EnclosingMethod + } // Attributes +} // end class BadAccModInrClss diff --git a/hotspot/test/runtime/classFileParserBug/BadAccModule.jcod b/hotspot/test/runtime/classFileParserBug/BadAccModule.jcod new file mode 100644 index 00000000000..6d7d1ec1211 --- /dev/null +++ b/hotspot/test/runtime/classFileParserBug/BadAccModule.jcod @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +// This is a .jcod file for a simple "Hello World" program with ACC_MODULE added +// to its access_flags. (See line 67.) This should cause a NoClassDefFoundError +// when loading the class. +class BadAccModule { + 0xCAFEBABE; + 0; // minor version + 53; // version + [32] { // Constant Pool + ; // first element is empty + Method #6 #17; // #1 at 0x0A + Field #18 #19; // #2 at 0x0F + String #20; // #3 at 0x14 + Method #21 #22; // #4 at 0x17 + class #23; // #5 at 0x1C + class #24; // #6 at 0x1F + Utf8 ""; // #7 at 0x22 + Utf8 "()V"; // #8 at 0x2B + Utf8 "Code"; // #9 at 0x31 + Utf8 "LineNumberTable"; // #10 at 0x38 + Utf8 "main"; // #11 at 0x4A + Utf8 "([Ljava/lang/String;)V"; // #12 at 0x51 + Utf8 "Exceptions"; // #13 at 0x6A + class #25; // #14 at 0x77 + Utf8 "SourceFile"; // #15 at 0x7A + Utf8 "BadAccModule.java"; // #16 at 0x87 + NameAndType #7 #8; // #17 at 0x9B + class #26; // #18 at 0xA0 + NameAndType #27 #28; // #19 at 0xA3 + Utf8 "Hello World"; // #20 at 0xA8 + class #29; // #21 at 0xB6 + NameAndType #30 #31; // #22 at 0xB9 + Utf8 "BadAccModule"; // #23 at 0xBE + Utf8 "java/lang/Object"; // #24 at 0xCD + Utf8 "java/lang/Throwable"; // #25 at 0xE0 + Utf8 "java/lang/System"; // #26 at 0xF6 + Utf8 "out"; // #27 at 0x0109 + Utf8 "Ljava/io/PrintStream;"; // #28 at 0x010F + Utf8 "java/io/PrintStream"; // #29 at 0x0127 + Utf8 "println"; // #30 at 0x013D + Utf8 "(Ljava/lang/String;)V"; // #31 at 0x0147 + } // Constant Pool + + 0x8021; // access Added ACC_MODULE (0x8000) !!! + #5;// this_cpx + #6;// super_cpx + + [0] { // Interfaces + } // Interfaces + + [0] { // fields + } // fields + + [2] { // methods + { // Member at 0x016B + 0x0001; // access + #7; // name_cpx + #8; // sig_cpx + [1] { // Attributes + Attr(#9, 29) { // Code at 0x0173 + 1; // max_stack + 1; // max_locals + Bytes[5]{ + 0x2AB70001B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#10, 6) { // LineNumberTable at 0x018A + [1] { // LineNumberTable + 0 1; // at 0x0196 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0196 + 0x0009; // access + #11; // name_cpx + #12; // sig_cpx + [2] { // Attributes + Attr(#9, 37) { // Code at 0x019E + 2; // max_stack + 1; // max_locals + Bytes[9]{ + 0xB200021203B60004; + 0xB1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#10, 10) { // LineNumberTable at 0x01B9 + [2] { // LineNumberTable + 0 4; // at 0x01C5 + 8 5; // at 0x01C9 + } + } // end LineNumberTable + } // Attributes + } // end Code + ; + Attr(#13, 4) { // Exceptions at 0x01C9 + [1] { // Exceptions + #14; // at 0x01D3 + } + } // end Exceptions + } // Attributes + } // Member + } // methods + + [1] { // Attributes + Attr(#15, 2) { // SourceFile at 0x01D5 + #16; + } // end SourceFile + } // Attributes +} // end class BadAccModule diff --git a/hotspot/test/runtime/modules/acc_module.jcod b/hotspot/test/runtime/modules/acc_module.jcod index 573c7dde2a6..09b21bc0484 100644 --- a/hotspot/test/runtime/modules/acc_module.jcod +++ b/hotspot/test/runtime/modules/acc_module.jcod @@ -23,7 +23,8 @@ /* * This class consists of the following java code, but has an illegal class - * access_flags value of 0x8000, that should be ignored by the JVM. + * access_flags value of 0x8000, that should be ignored by the JVM because + * the class file version is < 53. * * public class acc_module { * public static void main(String[] args) { From 0defcd014189a209e9b4d077b957494b6d238fb4 Mon Sep 17 00:00:00 2001 From: Alexandre Iline Date: Tue, 21 Feb 2017 15:38:07 -0800 Subject: [PATCH 281/447] 8151220: Extend sample API to use modules Reviewed-by: ksrini --- .../sampleapi/lib/sampleapi/SampleApi.java | 135 ++- .../lib/sampleapi/SampleApiDefaultRunner.java | 14 +- .../sampleapi/generator/ModuleGenerator.java | 270 +++++ .../sampleapi/generator/PackageGenerator.java | 81 +- .../lib/sampleapi/util/SimpleMultiplier.java | 2 +- .../jdk/javadoc/tool/sampleapi/res/fx.xml | 44 +- .../jdk/javadoc/tool/sampleapi/res/simple.xml | 925 ++++++++--------- .../jdk/javadoc/tool/sampleapi/res/sub.xml | 117 +-- .../jdk/javadoc/tool/sampleapi/res/tiny.xml | 88 +- .../javadoc/tool/sampleapi/res/tinysub.xml | 118 +-- .../javadoc/tool/sampleapi/res/transitive.xml | 98 ++ .../javadoc/sampleapi/SampleApiTest.java | 2 + .../test/tools/javadoc/sampleapi/res/fx.xml | 46 +- .../tools/javadoc/sampleapi/res/simple.xml | 929 +++++++++--------- .../test/tools/javadoc/sampleapi/res/sub.xml | 119 +-- .../test/tools/javadoc/sampleapi/res/tiny.xml | 90 +- 16 files changed, 1779 insertions(+), 1299 deletions(-) create mode 100644 langtools/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/ModuleGenerator.java create mode 100644 langtools/test/jdk/javadoc/tool/sampleapi/res/transitive.xml diff --git a/langtools/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/SampleApi.java b/langtools/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/SampleApi.java index e8b4eedf8d4..84b0e2e93be 100644 --- a/langtools/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/SampleApi.java +++ b/langtools/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/SampleApi.java @@ -20,42 +20,135 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ - package sampleapi; -import java.io.File; -import java.io.FilenameFilter; +import com.sun.source.util.JavacTask; +import com.sun.tools.javac.api.JavacTaskImpl; +import com.sun.tools.javac.api.JavacTool; +import com.sun.tools.javac.util.Context; +import java.io.IOException; +import java.io.InputStream; +import java.io.UncheckedIOException; +import java.nio.file.Files; import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; +import static java.util.stream.Collectors.toList; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NodeList; +import org.xml.sax.SAXException; +import sampleapi.generator.ModuleGenerator; import sampleapi.generator.PackageGenerator; public class SampleApi { - PackageGenerator pkgGen = new PackageGenerator(); + private final Context ctx; + private final List modules = new ArrayList<>(); - public void generate(File resDir, File outDir) throws Fault { - FilenameFilter filter = (dir, name) -> { return name.endsWith(".xml"); }; - File[] resFiles = resDir.listFiles(filter); - for (File resFile : resFiles) { - pkgGen.processDataSet(resFile); - pkgGen.generate(outDir); - } + public SampleApi() { + JavacTool jt = JavacTool.create(); + JavacTask task = jt.getTask(null, null, null, null, null, null); + ctx = ((JavacTaskImpl) task).getContext(); } - public void generate(Path res, Path dir) throws Fault { - generate(res.toFile(), dir.toFile()); + public static SampleApi load(Path resDir) + throws ParserConfigurationException, IOException, SAXException { + SampleApi result = new SampleApi(); + System.out.println("Loading resources from " + resDir); + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + DocumentBuilder builder = factory.newDocumentBuilder(); + Files.list(resDir) + .peek(f -> System.out.println(f.getFileName())) + .filter(f -> f.getFileName().toString().endsWith(".xml")) + .peek(f -> System.out.println(f.getFileName())) + .forEach(resFile -> { + try (InputStream is = Files.newInputStream(resFile)) { + Document document = builder.parse(is); + NodeList moduleElements = document.getElementsByTagName("module"); + for (int i = 0; i < moduleElements.getLength(); i++) { + result.modules.add(ModuleGenerator + .load((Element) moduleElements.item(i))); + } + } catch (IOException ex) { + throw new UncheckedIOException(ex); + } catch (SAXException ex) { + throw new RuntimeException(ex); + } + }); + return result; } - public void generate(String res, String dir) throws Fault { - generate(new File(res), new File(dir)); + public Context getContext() { + return ctx; } - public static class Fault extends Exception { - public Fault(String msg) { - super(msg); - } - public Fault(String msg, Throwable th) { - super(msg, th); + public List getModules() { + return modules; + } + + + public void generate(Path outDir) { + //resolveIDs(modules); + modules.forEach(m -> { + try { + m.generate(outDir, this); + } catch (IOException ex) { + throw new UncheckedIOException(ex); + } + }); + } + + public void generate(String dir) + throws ParserConfigurationException, IOException, SAXException { + generate(Paths.get(dir)); + } + + public ModuleGenerator moduleById(String id) { + String real_id = getId(id); + return modules.stream() + .filter(m -> m.id.equals(real_id)) + .findAny().orElseThrow(() -> new IllegalStateException("No module with id: " + real_id)); + } + + public PackageGenerator packageById(String id) { + String real_id = getId(id); + return modules.stream() + .flatMap(m -> m.packages.stream()) + .filter(p -> p.id.equals(real_id)).findAny() + .orElseThrow(() -> new IllegalStateException("No package with id: " + real_id)); + } + + public String classById(String id) { + String real_id = getId(id); + return modules.stream() + .flatMap(m -> m.packages.stream()) + .peek(p -> System.out.println(p.packageName + " " + p.idBases.size())) + .flatMap(p -> p.idBases.entrySet().stream() + .filter(e -> e.getKey().equals(real_id)) + .map(e -> p.packageName + "." + e.getValue().name.toString()) + .peek(System.out::println)) + .findAny().orElseThrow(() -> new IllegalStateException("No class with id: " + id)); + } + + public boolean isId(String name) { + return name.startsWith("$"); + } + + public boolean isIdEqual(String name, String id) { + return isId(name) && getId(name).equals(id); + } + + public String getId(String name) { + if(!isId(name)) { + throw new IllegalStateException("Not an id: " + name); } + return name.substring(1); } } diff --git a/langtools/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/SampleApiDefaultRunner.java b/langtools/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/SampleApiDefaultRunner.java index 23459d5fec4..c77664c2103 100644 --- a/langtools/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/SampleApiDefaultRunner.java +++ b/langtools/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/SampleApiDefaultRunner.java @@ -23,9 +23,9 @@ package sampleapi; -import java.io.File; - -import sampleapi.SampleApi.Fault; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; public class SampleApiDefaultRunner { @@ -132,12 +132,12 @@ public class SampleApiDefaultRunner { return 1; } - File resDir = new File(resDirName); - File outDir = new File(outDirName); - outDir.mkdirs(); + Path resDir = Paths.get(resDirName); + Path outDir = Paths.get(outDirName); + Files.createDirectories(outDir); SampleApi apiGen = new SampleApi(); - apiGen.generate(resDir, outDir); + apiGen.load(resDir).generate(outDir); return 0; } diff --git a/langtools/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/ModuleGenerator.java b/langtools/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/ModuleGenerator.java new file mode 100644 index 00000000000..76345638fa1 --- /dev/null +++ b/langtools/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/ModuleGenerator.java @@ -0,0 +1,270 @@ +/* + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package sampleapi.generator; + +import com.sun.source.tree.ModuleTree.ModuleKind; +import com.sun.tools.javac.code.Symbol; +import com.sun.tools.javac.parser.Scanner; +import com.sun.tools.javac.parser.ScannerFactory; +import com.sun.tools.javac.parser.Tokens; +import com.sun.tools.javac.tree.JCTree; +import com.sun.tools.javac.tree.JCTree.JCDirective; +import com.sun.tools.javac.tree.JCTree.JCExpression; +import com.sun.tools.javac.tree.TreeMaker; +import com.sun.tools.javac.util.Context; +import com.sun.tools.javac.util.Names; +import com.sun.tools.javac.util.ListBuffer; +import java.io.IOException; +import java.io.OutputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.List; +import java.util.ArrayList; +import org.w3c.dom.Element; +import org.w3c.dom.NodeList; + +import sampleapi.SampleApi; +import sampleapi.util.PoorDocCommentTable; + +import static com.sun.tools.javac.parser.Tokens.Comment.CommentStyle.JAVADOC; + +/** + * + * This class is responsible for loading module description from an XML and then generating the + * module-info.java. It is using {@link PackageGenerator} class for parsing content of the module. + */ +public class ModuleGenerator { + + private static final String UNNAMED = "UNNAMED"; + private static final String MODULE_INFO = "module-info.java"; + + public String name; + public String id; + public ModuleKind kind; + public final List exportss = new ArrayList<>(); + public final List openss = new ArrayList<>(); + public final List requiress = new ArrayList<>(); + public final List usess = new ArrayList<>(); + public final List providess = new ArrayList<>(); + public final List packages = new ArrayList<>(); + + private ModuleGenerator() { + } + + public static ModuleGenerator load(Element rootElement) { + ModuleGenerator result = new ModuleGenerator(); + result.name = rootElement.getAttribute("name"); + result.id = rootElement.getAttribute("id"); + String kind = rootElement.getAttribute("kind"); + result.kind = kind.isEmpty() ? ModuleKind.STRONG : + ModuleKind.valueOf(kind.toUpperCase()); + //exports + NodeList exportsList = rootElement.getElementsByTagName("exports"); + for (int i = 0; i < exportsList.getLength(); i++) { + Element exportsEl = (Element) exportsList.item(i); + Exports exports = new Exports(exportsEl.getAttribute("package")); + NodeList toList = exportsEl.getElementsByTagName("to"); + for (int j = 0; j < toList.getLength(); j++) { + Element toElement = (Element) toList.item(j); + exports.modules.add(toElement.getAttribute("module")); + } + result.exportss.add(exports); + } + //opens + NodeList opensList = rootElement.getElementsByTagName("opens"); + for (int i = 0; i < opensList.getLength(); i++) { + Element opensEl = (Element) opensList.item(i); + Opens opens = new Opens(opensEl.getAttribute("package")); + NodeList toList = opensEl.getElementsByTagName("to"); + for (int j = 0; j < toList.getLength(); j++) { + Element toElement = (Element) toList.item(j); + opens.modules.add(toElement.getAttribute("module")); + } + result.openss.add(opens); + } + //requires + NodeList requiresList = rootElement.getElementsByTagName("requires"); + for (int i = 0; i < requiresList.getLength(); i++) { + Element requiresEl = (Element) requiresList.item(i); + result.requiress.add(new Requires(requiresEl.getAttribute("module"), + Boolean.parseBoolean(requiresEl.getAttribute("transitive")), + Boolean.parseBoolean(requiresEl.getAttribute("static")))); + } + //uses + NodeList usesList = rootElement.getElementsByTagName("uses"); + for (int i = 0; i < usesList.getLength(); i++) { + Element usesEl = (Element) usesList.item(i); + result.usess.add(new Uses(usesEl.getAttribute("service"))); + } + //provides + NodeList providesList = rootElement.getElementsByTagName("provides"); + for (int i = 0; i < providesList.getLength(); i++) { + Element providesEl = (Element) providesList.item(i); + Provides provides = new Provides(providesEl.getAttribute("service")); + NodeList implList = providesEl.getElementsByTagName("implementation"); + for (int j = 0; j < implList.getLength(); j++) { + Element implElement = (Element) implList.item(j); + provides.implementations.add(implElement.getAttribute("class")); + } + result.providess.add(provides); + } + //packages + NodeList packagesList = rootElement.getElementsByTagName("package"); + for (int i = 0; i < packagesList.getLength(); i++) { + result.packages.add(PackageGenerator + .processDataSet((Element) packagesList.item(i))); + } + return result; + } + + public void generate(Path outDir, SampleApi api) throws IOException { + Files.createDirectories(outDir); + Path moduleSourceDir; + if (!name.equals(UNNAMED)) { + moduleSourceDir = outDir.resolve(name); + Files.createDirectory(moduleSourceDir); + generateModuleInfo(moduleSourceDir, api); + } else { + moduleSourceDir = outDir; + } + packages.forEach(pkg -> pkg.generate(moduleSourceDir)); + } + + private void generateModuleInfo(Path moduleSourceDir, SampleApi api) throws IOException { + TreeMaker make = TreeMaker.instance(api.getContext()); + Names names = Names.instance(api.getContext()); + JCTree.JCExpression modQual = make.QualIdent( + new Symbol.ModuleSymbol(names.fromString(name), null)); + ListBuffer exportsBuffer = new ListBuffer<>(); + exportss.forEach(e -> { + ListBuffer modulesBuffer = new ListBuffer<>(); + e.modules.stream() + .map(m -> api.isId(m) ? api.moduleById(m).name : m) + .forEach(m -> { + modulesBuffer.add(make.Ident( + names.fromString(m))); + }); + exportsBuffer.add(make.Exports( + make.Ident(names.fromString(api.isId(e.pkg) ? + api.packageById(e.pkg).packageName : e.pkg)), + (modulesBuffer.size() > 0) ? modulesBuffer.toList() : null)); + }); + openss.forEach(o -> { + ListBuffer modulesBuffer = new ListBuffer<>(); + o.modules.stream() + .map(m -> api.isId(m) ? api.moduleById(m).name : m) + .forEach(m -> { + modulesBuffer.add(make.Ident( + names.fromString(m))); + }); + exportsBuffer.add(make.Opens( + make.Ident(names.fromString(api.isId(o.pkg) ? + api.packageById(o.pkg).packageName : o.pkg)), + (modulesBuffer.size() > 0) ? modulesBuffer.toList() : null)); + }); + ListBuffer requiresBuffer = new ListBuffer<>(); + requiress.forEach(r -> requiresBuffer.add(make.Requires( + r.transitive, r.statc, + make.Ident(names.fromString(api.isId(r.module) + ? api.moduleById(r.module).name : r.module))))); + ListBuffer usesBuffer = new ListBuffer<>(); + usess.forEach(u -> usesBuffer + .add(make.Uses(make.Ident(names.fromString(api.isId(u.service) + ? api.classById(u.service) : u.service))))); + ListBuffer providesBuffer = new ListBuffer<>(); + providess.forEach(p -> { + ListBuffer implementationsBuffer = new ListBuffer<>(); + p.implementations.stream() + .map(c -> api.isId(c) ? api.classById(c) : c) + .forEach(i -> { + implementationsBuffer.add(make.Ident(names.fromString(i))); + }); + providesBuffer.add(make.Provides( + make.Ident(names.fromString(api.isId(p.service) ? + api.classById(p.service) : p.service)), + implementationsBuffer.toList())); + }); + ListBuffer fullList = new ListBuffer<>(); + fullList.addAll(exportsBuffer.toList()); + fullList.addAll(requiresBuffer.toList()); + fullList.addAll(usesBuffer.toList()); + fullList.addAll(providesBuffer.toList()); + JCTree.JCModuleDecl mod = make.ModuleDef( + make.Modifiers(0), //TODO how to support this? + kind, modQual, fullList.toList()); + ListBuffer top = new ListBuffer<>(); + top.add(mod); + JCTree.JCCompilationUnit compilationUnit = make.TopLevel(top.toList()); + try (OutputStream module_info = Files.newOutputStream(moduleSourceDir.resolve(MODULE_INFO))) { + module_info.write(compilationUnit.toString().getBytes()); + } + } + + + public static class Requires { + public String module; + public boolean transitive; + public boolean statc; + + private Requires(String module, boolean transitive, boolean statc) { + this.module = module; + this.transitive = transitive; + this.statc = this.statc; + } + } + + public static class Exports { + public final String pkg; + public final List modules = new ArrayList<>(); + + private Exports(String pkg) { + this.pkg = pkg; + } + } + + public static class Opens { + public final String pkg; + public final List modules = new ArrayList<>(); + + private Opens(String pkg) { + this.pkg = pkg; + } + } + + public static class Uses { + public final String service; + + private Uses(String service) { + this.service = service; + } + } + + public static class Provides { + public final String service; + public final List implementations = new ArrayList<>(); + + private Provides(String service) { + this.service = service; + } + } +} diff --git a/langtools/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/PackageGenerator.java b/langtools/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/PackageGenerator.java index cab0adea709..a0fcd71804f 100644 --- a/langtools/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/PackageGenerator.java +++ b/langtools/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/PackageGenerator.java @@ -25,17 +25,11 @@ package sampleapi.generator; import java.io.File; import java.io.FileWriter; -import java.io.InputStream; -import java.io.FileInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.ParserConfigurationException; -import org.xml.sax.SAXException; -import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; @@ -56,18 +50,19 @@ import com.sun.tools.javac.code.Type; import com.sun.tools.javac.code.TypeTag; import com.sun.tools.javac.code.Symbol; import com.sun.tools.javac.code.Symtab; +import java.nio.file.Path; import sampleapi.util.*; -import sampleapi.SampleApi.Fault; public class PackageGenerator { - String packageName; + public String packageName; String packageDirName; + public String id; ArrayList topLevels; Map nameIndex; - Map idBases; + public Map idBases; Map idAnnos; TreeMaker make; @@ -92,48 +87,43 @@ public class PackageGenerator { boolean isDataSetProcessed = false; - public void processDataSet(File dsFile) throws Fault { - isDataSetProcessed = true; - topLevels = new ArrayList<>(); - nameIndex = new HashMap<>(); - idBases = new HashMap<>(); - idAnnos = new HashMap<>(); - fx = false; + public static PackageGenerator processDataSet(Element rootElement) { + PackageGenerator result = new PackageGenerator(); + result.isDataSetProcessed = true; + result.topLevels = new ArrayList<>(); + result.nameIndex = new HashMap<>(); + result.idBases = new HashMap<>(); + result.idAnnos = new HashMap<>(); + result.fx = false; - try { - InputStream is = new FileInputStream(dsFile); - - DocumentBuilder builder = factory.newDocumentBuilder(); - Document document = builder.parse(is); - - Element rootElement = document.getDocumentElement(); - if (!rootElement.getTagName().equals("package")) - throw new IllegalStateException("Unexpected tag name: " - + rootElement.getTagName()); - packageName = rootElement.getAttribute("name"); - fx = "fx".equals(rootElement.getAttribute("style")); - packageDirName = packageName.replace('.', '/'); - - // process nodes (toplevels) - NodeList nodeList = rootElement.getChildNodes(); - for (int i = 0; i < nodeList.getLength(); i++) { - Node node = nodeList.item(i); - - if (!(node instanceof Element)) - continue; - processTopLevel((Element) node); - } - } catch (ParserConfigurationException | SAXException | IOException e) { - throw new Fault("Error parsing dataset " + dsFile, e); + if (!rootElement.getTagName().equals("package")) { + throw new IllegalStateException("Unexpected tag name: " + + rootElement.getTagName()); } + result.packageName = rootElement.getAttribute("name"); + result.id = rootElement.getAttribute("id"); + result.fx = "fx".equals(rootElement.getAttribute("style")); + result.packageDirName = result.packageName.replace('.', '/'); + + // process nodes (toplevels) + NodeList nodeList = rootElement.getChildNodes(); + for (int i = 0; i < nodeList.getLength(); i++) { + Node node = nodeList.item(i); + + if (!(node instanceof Element)) { + continue; + } + result.processTopLevel((Element) node); + } + return result; } - public void generate(File outDir) throws Fault { + public void generate(Path outDir) { if (!isDataSetProcessed) - throw new Fault("No Data Set processed"); + throw new RuntimeException("No Data Set processed"); try { - File pkgDir = new File(outDir, packageDirName); + File pkgDir = new File(outDir.toFile(), packageDirName); pkgDir.mkdirs(); for (JCCompilationUnit decl : topLevels) { @@ -168,7 +158,7 @@ public class PackageGenerator { writer.flush(); writer.close(); } catch (IOException e) { - throw new Fault("Error writing output"); + throw new RuntimeException("Error writing output"); } } @@ -211,6 +201,7 @@ public class PackageGenerator { String baseName = baseTag.getAttribute("basename"); String typeParam = baseTag.getAttribute("tparam"); String baseId = baseTag.getAttribute("id"); + System.out.println("Found class id: " + baseId); long kindFlag = 0; switch (kind) { diff --git a/langtools/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/util/SimpleMultiplier.java b/langtools/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/util/SimpleMultiplier.java index 0e9760ee606..545e671c640 100644 --- a/langtools/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/util/SimpleMultiplier.java +++ b/langtools/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/util/SimpleMultiplier.java @@ -72,8 +72,8 @@ public class SimpleMultiplier { } public void initIterator() { + size = 1; if (!valueSpace.isEmpty()) { - size = 1; for (int i = 0; i < valueSpace.size(); i++) size *= valueSpace.get(i).size(); } diff --git a/langtools/test/jdk/javadoc/tool/sampleapi/res/fx.xml b/langtools/test/jdk/javadoc/tool/sampleapi/res/fx.xml index d26177227bf..225df813896 100644 --- a/langtools/test/jdk/javadoc/tool/sampleapi/res/fx.xml +++ b/langtools/test/jdk/javadoc/tool/sampleapi/res/fx.xml @@ -21,25 +21,27 @@ or visit www.oracle.com if you need additional information or have any questions. --> - - - - public - - + + + + public - int|boolean - - - public|protected|private - int|String - void - - - public|protected|private - int|int|String - - - - - + + + public + int|boolean + + + public|protected|private + int|String + void + + + public|protected|private + int|int|String + + + + + + diff --git a/langtools/test/jdk/javadoc/tool/sampleapi/res/simple.xml b/langtools/test/jdk/javadoc/tool/sampleapi/res/simple.xml index b5a49159b9d..3d805fdd16d 100644 --- a/langtools/test/jdk/javadoc/tool/sampleapi/res/simple.xml +++ b/langtools/test/jdk/javadoc/tool/sampleapi/res/simple.xml @@ -21,509 +21,512 @@ or visit www.oracle.com if you need additional information or have any questions. --> - - - - public - none|abstract - - - none|public - none|static - none|final - boolean|int|String - - - protected|private - String - - - public - none|int|int,boolean|int,String - - - public - String - NullPointerException - SampleException0 - - - public - void - int - - - public - int|boolean|String - - - public - void|int - none|int|Object,int - NullPointerException - ArithmeticException - - - - - - public - - - - public - int|boolean - - - public - none|int|int,boolean|int,String - - - public - int|boolean - - - - - - java.io.Serializable - public - - - - private|none|public - boolean|int|String - - - - - - java.io.Serializable - java.io.ObjectStreamField - public - - - String,Long,Boolean - - public - String|long|boolean - - - - - - java.io.Serializable - java.io.ObjectOutputStream - java.io.ObjectOutput - java.io.IOException - java.io.ObjectStreamException - public - - - - private - ObjectOutputStream - void - IOException - - - public - ObjectOutput - void - IOException - - - protected - none - Object - ObjectStreamException - - - public - Object - void - IOException - - - - - - java.io.Serializable - java.io.ObjectInputStream - java.io.ObjectInput - java.io.IOException - java.io.ObjectStreamException - public - - - - private - ObjectInputStream - void - IOException - ClassNotFoundException - - - public - ObjectInput - void - IOException - - - protected - none - Object - ObjectStreamException - - - public - Object - void - IOException - - - - - - public - - + + + + public + none|abstract - + + none|public + none|static + none|final + boolean|int|String + + + protected|private + String + + public - int + none|int|int,boolean|int,String + + + public + String + NullPointerException + SampleException0 + + + public + void + int + + + public + int|boolean|String + + + public + void|int + none|int|Object,int + NullPointerException + ArithmeticException + + + + + + public + + + + public + int|boolean + + + public + none|int|int,boolean|int,String + + + public + int|boolean + + + + + + java.io.Serializable + public + + + + private|none|public + boolean|int|String - + + + java.io.Serializable + java.io.ObjectStreamField public - static - - - public - static + - - public - void + String,Long,Boolean + + public + String|long|boolean + + + + + + java.io.Serializable + java.io.ObjectOutputStream + java.io.ObjectOutput + java.io.IOException + java.io.ObjectStreamException + public + + + + private + ObjectOutputStream + void + IOException + + + public + ObjectOutput + void + IOException + + + protected + none + Object + ObjectStreamException + + + public + Object + void + IOException + + + + + + java.io.Serializable + java.io.ObjectInputStream + java.io.ObjectInput + java.io.IOException + java.io.ObjectStreamException + public + + + + private + ObjectInputStream + void + IOException + ClassNotFoundException + + + public + ObjectInput + void + IOException + + + protected + none + Object + ObjectStreamException + + + public + Object + void + IOException + + + + + + public + + + public + + + public + int + + + + + public + static + + + public + static + + + public + void + + + + + + + + + public + + + + private + boolean|int|String + + + public + String + + + public + int|String + + + + + + public + + + + private + boolean|int|String + + + public + String + + + public + int|String + + + + + + public|none + + + public + void|int|Object - - - - - public - - - - private - boolean|int|String - - + public - String - - - public - int|String - - - + + + + public + int|boolean + + + public + int|boolean + + + - - public - - - - private - boolean|int|String - - + + java.util.List public - String - - - public - int|String - - - + + + public + void + T + + + public + T + int + + + public + List<T> + + + - - public|none - - + + java.util.Set + java.util.List + java.util.Map public - void|int|Object - - - + + + public + void + K,V + + + public + void + Map<K,V> + + + public + V + K + + + public + Set<V>|List<V> + + + public + Set<K>|List<K> + + + - - public - - - + + java.util.Set + java.util.List + java.util.Map public - int|boolean - - - public - int|boolean - - - + + + public + Set<M>|List<M> + Map<N,O> + + + public + Set<N>|List<N> + Map<M,O> + + + public + Set<O>|List<O> + Map<M,N> + + + - - java.util.List - public - - + + java.util.Set + java.util.List + java.util.Map + java.util.function.Supplier public - void - T - - - public - T - int - - - public - List<T> - - - + + + public + static + Set<? extends E>|List<? extends E> + + + public|private + static + Map<V,K> + + + public + static + void + E + + + public|private + static + X + Supplier<? extends X> + X + + + - - java.util.Set - java.util.List - java.util.Map - public - - + public - void - K,V - - - public - void - Map<K,V> - - - public - V - K - - - public - Set<V>|List<V> - - - public - Set<K>|List<K> - - - - - - java.util.Set - java.util.List - java.util.Map - public - - - public - Set<M>|List<M> - Map<N,O> - - - public - Set<N>|List<N> - Map<M,O> - - - public - Set<O>|List<O> - Map<M,N> - - - - - - java.util.Set - java.util.List - java.util.Map - java.util.function.Supplier - public - - - public - static - Set<? extends E>|List<? extends E> - - - public|private - static - Map<V,K> - - - public - static - void - E - - - public|private - static - X - Supplier<? extends X> - X - - - - - - public - - - - + + + + - - public - - - - - private - int|String - - + public - void|String - - - + + + + + private + int|String + + + public + void|String + + + - - Documented - + + Documented + - - Retention - - + + Retention + + - - Retention - - + + Retention + + - - Retention - - + + Retention + + - - Target - - + + Target + + - - Target - - + + Target + + - - Target - - + + Target + + - - java.lang.annotation.Documented - @documented - public - - - public - boolean|String - - - - - - java.lang.annotation.Retention - java.lang.annotation.RetentionPolicy - @reten-source|@reten-class|@reten-runtime - public - - - public - int - - - - - - java.lang.annotation.Retention - java.lang.annotation.RetentionPolicy - java.lang.annotation.Target - java.lang.annotation.ElementType - public - - @reten-source|@reten-class|@reten-runtime - @target-method|@target-field|@target-type + java.lang.annotation.Documented + @documented public - static public - String + boolean|String - - - - Deprecated - - - - SafeVarargs - - - - SuppressWarnings - - - - - public - - - @deprecated + + java.lang.annotation.Retention + java.lang.annotation.RetentionPolicy + @reten-source|@reten-class|@reten-runtime public - void - - - @safevarargs + + + public + int + + + + + + java.lang.annotation.Retention + java.lang.annotation.RetentionPolicy + java.lang.annotation.Target + java.lang.annotation.ElementType public - void|int - String... - - - @suppresswarnings + + + @reten-source|@reten-class|@reten-runtime + @target-method|@target-field|@target-type + public + static + + + public + String + + + + + + + + Deprecated + + + + SafeVarargs + + + + SuppressWarnings + + + + public - void - int|Object - - - - + + + @deprecated + public + void + + + @safevarargs + public + void|int + String... + + + @suppresswarnings + public + void + int|Object + + + + + + diff --git a/langtools/test/jdk/javadoc/tool/sampleapi/res/sub.xml b/langtools/test/jdk/javadoc/tool/sampleapi/res/sub.xml index ff007c781ac..875b1aef683 100644 --- a/langtools/test/jdk/javadoc/tool/sampleapi/res/sub.xml +++ b/langtools/test/jdk/javadoc/tool/sampleapi/res/sub.xml @@ -21,69 +21,72 @@ or visit www.oracle.com if you need additional information or have any questions. --> - + + + + + public + none|abstract + SInterface0 + + + public + int + + + public + int + SException0 + + + public + int + void + SException0 + + + - - public - none|abstract - SInterface0 - - + public - int - - - public - int - SException0 - - - public - int - void - SException0 - - - + + + + public + String + + + - - public - - - + public - String - - - + + + public + void + int + + + - - public - - + public - void - int - - - + + + + + - - public - - - - - - - - public - - + public - boolean - - - + + + public + boolean + + + - + + + diff --git a/langtools/test/jdk/javadoc/tool/sampleapi/res/tiny.xml b/langtools/test/jdk/javadoc/tool/sampleapi/res/tiny.xml index 1bf631faa8c..1e33f8358f3 100644 --- a/langtools/test/jdk/javadoc/tool/sampleapi/res/tiny.xml +++ b/langtools/test/jdk/javadoc/tool/sampleapi/res/tiny.xml @@ -21,51 +21,53 @@ or visit www.oracle.com if you need additional information or have any questions. --> - - - - public - none|abstract - - + + + + public - int - - - public - int - - - + none|abstract + + + public + int + + + public + int + + + - - public - - + public - void - int - - - + + + public + void + int + + + - - public - - - - - - - - - public - - + public - boolean - - - - - + + + + + + + + + public + + + public + boolean + + + + + + diff --git a/langtools/test/jdk/javadoc/tool/sampleapi/res/tinysub.xml b/langtools/test/jdk/javadoc/tool/sampleapi/res/tinysub.xml index 99b181f4899..e4826e2998f 100644 --- a/langtools/test/jdk/javadoc/tool/sampleapi/res/tinysub.xml +++ b/langtools/test/jdk/javadoc/tool/sampleapi/res/tinysub.xml @@ -21,69 +21,71 @@ or visit www.oracle.com if you need additional information or have any questions. --> - + + + + + public + none|abstract + TSInterface0 + + + public + int + + + public + int + TSException0 + + + public + int + void + TSException0 + + + - - public - none|abstract - TSInterface0 - - + public - int - - - public - int - TSException0 - - - public - int - void - TSException0 - - - + + + + public + String + + + - - public - - - + public - String - - - + + + public + void + int + + + - - public - - + public - void - int - - - + + + + + - - public - - - - - - - - public - - + public - boolean - - - - - + + + public + boolean + + + + + + diff --git a/langtools/test/jdk/javadoc/tool/sampleapi/res/transitive.xml b/langtools/test/jdk/javadoc/tool/sampleapi/res/transitive.xml new file mode 100644 index 00000000000..22a79ea33dd --- /dev/null +++ b/langtools/test/jdk/javadoc/tool/sampleapi/res/transitive.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + public + + + public + Object + + + + + + + public + + + Object + void + + + + + + + + + + + + + + + + + + + + + + + + public + none|abstract + SInterface0 + + + public + int + + + public + int + SException0 + + + public + int + void + SException0 + + + + + + diff --git a/langtools/test/tools/javadoc/sampleapi/SampleApiTest.java b/langtools/test/tools/javadoc/sampleapi/SampleApiTest.java index 149d347cd55..c344895a612 100644 --- a/langtools/test/tools/javadoc/sampleapi/SampleApiTest.java +++ b/langtools/test/tools/javadoc/sampleapi/SampleApiTest.java @@ -30,6 +30,8 @@ * jdk.compiler/com.sun.tools.javac.parser * jdk.compiler/com.sun.tools.javac.tree * jdk.compiler/com.sun.tools.javac.util + * jdk.javadoc/jdk.javadoc.internal.tool + * @build sampleapi.SampleApiDefaultRunner * @run main SampleApiTest */ diff --git a/langtools/test/tools/javadoc/sampleapi/res/fx.xml b/langtools/test/tools/javadoc/sampleapi/res/fx.xml index 3416730b492..abdbe70211b 100644 --- a/langtools/test/tools/javadoc/sampleapi/res/fx.xml +++ b/langtools/test/tools/javadoc/sampleapi/res/fx.xml @@ -1,6 +1,6 @@ - - - - public - - + + + + public - int|boolean - - - public|protected|private - int|String - void - - - public|protected|private - int|int|String - - - + + + public + int|boolean + + + public|protected|private + int|String + void + + + public|protected|private + int|int|String + + + + + + + - diff --git a/langtools/test/tools/javadoc/sampleapi/res/simple.xml b/langtools/test/tools/javadoc/sampleapi/res/simple.xml index b5a49159b9d..1717c1c931d 100644 --- a/langtools/test/tools/javadoc/sampleapi/res/simple.xml +++ b/langtools/test/tools/javadoc/sampleapi/res/simple.xml @@ -1,6 +1,6 @@ - + + + - - public - none|abstract - - - none|public - none|static - none|final - boolean|int|String - - - protected|private - String - - - public - none|int|int,boolean|int,String - - - public - String - NullPointerException - SampleException0 - - - public - void - int - - - public - int|boolean|String - - - public - void|int - none|int|Object,int - NullPointerException - ArithmeticException - - - - - - public - - - - public - int|boolean - - - public - none|int|int,boolean|int,String - - - public - int|boolean - - - - - - java.io.Serializable - public - - - - private|none|public - boolean|int|String - - - - - - java.io.Serializable - java.io.ObjectStreamField - public - - - String,Long,Boolean - - public - String|long|boolean - - - - - - java.io.Serializable - java.io.ObjectOutputStream - java.io.ObjectOutput - java.io.IOException - java.io.ObjectStreamException - public - - - - private - ObjectOutputStream - void - IOException - - - public - ObjectOutput - void - IOException - - - protected - none - Object - ObjectStreamException - - - public - Object - void - IOException - - - - - - java.io.Serializable - java.io.ObjectInputStream - java.io.ObjectInput - java.io.IOException - java.io.ObjectStreamException - public - - - - private - ObjectInputStream - void - IOException - ClassNotFoundException - - - public - ObjectInput - void - IOException - - - protected - none - Object - ObjectStreamException - - - public - Object - void - IOException - - - - - - public - - + public + none|abstract - + + none|public + none|static + none|final + boolean|int|String + + + protected|private + String + + public - int + none|int|int,boolean|int,String + + + public + String + NullPointerException + SampleException0 + + + public + void + int + + + public + int|boolean|String + + + public + void|int + none|int|Object,int + NullPointerException + ArithmeticException + + + + + + public + + + + public + int|boolean + + + public + none|int|int,boolean|int,String + + + public + int|boolean + + + + + + java.io.Serializable + public + + + + private|none|public + boolean|int|String - + + + java.io.Serializable + java.io.ObjectStreamField public - static - - - public - static + - - public - void + String,Long,Boolean + + public + String|long|boolean + + + + + + java.io.Serializable + java.io.ObjectOutputStream + java.io.ObjectOutput + java.io.IOException + java.io.ObjectStreamException + public + + + + private + ObjectOutputStream + void + IOException + + + public + ObjectOutput + void + IOException + + + protected + none + Object + ObjectStreamException + + + public + Object + void + IOException + + + + + + java.io.Serializable + java.io.ObjectInputStream + java.io.ObjectInput + java.io.IOException + java.io.ObjectStreamException + public + + + + private + ObjectInputStream + void + IOException + ClassNotFoundException + + + public + ObjectInput + void + IOException + + + protected + none + Object + ObjectStreamException + + + public + Object + void + IOException + + + + + + public + + + public + + + public + int + + + + + public + static + + + public + static + + + public + void + + + + + + + + + public + + + + private + boolean|int|String + + + public + String + + + public + int|String + + + + + + public + + + + private + boolean|int|String + + + public + String + + + public + int|String + + + + + + public|none + + + public + void|int|Object - - - - - public - - - - private - boolean|int|String - - + public - String - - - public - int|String - - - + + + + public + int|boolean + + + public + int|boolean + + + - - public - - - - private - boolean|int|String - - + + java.util.List public - String - - - public - int|String - - - + + + public + void + T + + + public + T + int + + + public + List<T> + + + - - public|none - - + + java.util.Set + java.util.List + java.util.Map public - void|int|Object - - - + + + public + void + K,V + + + public + void + Map<K,V> + + + public + V + K + + + public + Set<V>|List<V> + + + public + Set<K>|List<K> + + + - - public - - - + + java.util.Set + java.util.List + java.util.Map public - int|boolean - - - public - int|boolean - - - + + + public + Set<M>|List<M> + Map<N,O> + + + public + Set<N>|List<N> + Map<M,O> + + + public + Set<O>|List<O> + Map<M,N> + + + - - java.util.List - public - - + + java.util.Set + java.util.List + java.util.Map + java.util.function.Supplier public - void - T - - - public - T - int - - - public - List<T> - - - + + + public + static + Set<? extends E>|List<? extends E> + + + public|private + static + Map<V,K> + + + public + static + void + E + + + public|private + static + X + Supplier<? extends X> + X + + + - - java.util.Set - java.util.List - java.util.Map - public - - + public - void - K,V - - + + + + + + public - void - Map<K,V> - - - public - V - K - - - public - Set<V>|List<V> - - - public - Set<K>|List<K> - - - + + + + + private + int|String + + + public + void|String + + + - - java.util.Set - java.util.List - java.util.Map - public - - - public - Set<M>|List<M> - Map<N,O> - - - public - Set<N>|List<N> - Map<M,O> - - - public - Set<O>|List<O> - Map<M,N> - - - + + Documented + - - java.util.Set - java.util.List - java.util.Map - java.util.function.Supplier - public - - - public - static - Set<? extends E>|List<? extends E> - - - public|private - static - Map<V,K> - - - public - static - void - E - - - public|private - static - X - Supplier<? extends X> - X - - - + + Retention + + - - public - - - - - - - public - - - - - private - int|String - - - public - void|String - - - + + Retention + + - - Documented - + + Retention + + - - Retention - - + + Target + + - - Retention - - + + Target + + - - Retention - - + + Target + + - - Target - - - - - Target - - - - - Target - - - - - java.lang.annotation.Documented - @documented - public - - - public - boolean|String - - - - - - java.lang.annotation.Retention - java.lang.annotation.RetentionPolicy - @reten-source|@reten-class|@reten-runtime - public - - - public - int - - - - - - java.lang.annotation.Retention - java.lang.annotation.RetentionPolicy - java.lang.annotation.Target - java.lang.annotation.ElementType - public - - @reten-source|@reten-class|@reten-runtime - @target-method|@target-field|@target-type + java.lang.annotation.Documented + @documented public - static public - String + boolean|String - - - - Deprecated - - - - SafeVarargs - - - - SuppressWarnings - - - - - public - - - @deprecated + + java.lang.annotation.Retention + java.lang.annotation.RetentionPolicy + @reten-source|@reten-class|@reten-runtime public - void - - - @safevarargs + + + public + int + + + + + + java.lang.annotation.Retention + java.lang.annotation.RetentionPolicy + java.lang.annotation.Target + java.lang.annotation.ElementType public - void|int - String... - - - @suppresswarnings + + + @reten-source|@reten-class|@reten-runtime + @target-method|@target-field|@target-type + public + static + + + public + String + + + + + + + + Deprecated + + + + SafeVarargs + + + + SuppressWarnings + + + + public - void - int|Object - - - - + + + @deprecated + public + void + + + @safevarargs + public + void|int + String... + + + @suppresswarnings + public + void + int|Object + + + + + + + diff --git a/langtools/test/tools/javadoc/sampleapi/res/sub.xml b/langtools/test/tools/javadoc/sampleapi/res/sub.xml index ff007c781ac..242ea7a9503 100644 --- a/langtools/test/tools/javadoc/sampleapi/res/sub.xml +++ b/langtools/test/tools/javadoc/sampleapi/res/sub.xml @@ -21,69 +21,72 @@ or visit www.oracle.com if you need additional information or have any questions. --> - + + + + + public + none|abstract + SInterface0 + + + public + int + + + public + int + SException0 + + + public + int + void + SException0 + + + - - public - none|abstract - SInterface0 - - + public - int - - - public - int - SException0 - - - public - int - void - SException0 - - - + + + + public + String + + + - - public - - - + public - String - - - + + + public + void + int + + + - - public - - + public - void - int - - - + + + + + - - public - - - - - - - - public - - + public - boolean - - - - - + + + public + boolean + + + + + + + diff --git a/langtools/test/tools/javadoc/sampleapi/res/tiny.xml b/langtools/test/tools/javadoc/sampleapi/res/tiny.xml index 9a0f49371a5..66d6a779d50 100644 --- a/langtools/test/tools/javadoc/sampleapi/res/tiny.xml +++ b/langtools/test/tools/javadoc/sampleapi/res/tiny.xml @@ -1,6 +1,6 @@ - - - - public - none|abstract - - + + + + public - int - - - public - int - - - + none|abstract + + + public + int + + + public + int + + + - - public - - + public - void - int - - - + + + public + void + int + + + - - public - - - - - - - - - public - - + public - boolean - - - - - + + + + + + + + + public + + + public + boolean + + + + + + From 8d5f5b9a6b349310d935036d85820866b88e81e5 Mon Sep 17 00:00:00 2001 From: Claes Redestad Date: Wed, 22 Feb 2017 11:03:33 +0100 Subject: [PATCH 282/447] 8175233: Remove LambdaForm.debugName Reviewed-by: vlivanov, psandoz, jrose --- .../lang/invoke/DelegatingMethodHandle.java | 8 +- .../java/lang/invoke/DirectMethodHandle.java | 38 +++-- .../lang/invoke/InvokerBytecodeGenerator.java | 2 +- .../classes/java/lang/invoke/Invokers.java | 41 +++-- .../classes/java/lang/invoke/LambdaForm.java | 161 ++++++++++-------- .../java/lang/invoke/LambdaFormBuffer.java | 7 +- .../java/lang/invoke/LambdaFormEditor.java | 2 +- .../java/lang/invoke/MethodHandleImpl.java | 16 +- .../java/lang/invoke/MethodHandleNatives.java | 2 +- .../LFCaching/LFGarbageCollectedTest.java | 6 +- .../invoke/LFCaching/LambdaFormTestCase.java | 6 +- 11 files changed, 158 insertions(+), 131 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/DelegatingMethodHandle.java b/jdk/src/java.base/share/classes/java/lang/invoke/DelegatingMethodHandle.java index d11012e6487..cecfe5efc34 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/DelegatingMethodHandle.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/DelegatingMethodHandle.java @@ -98,21 +98,17 @@ abstract class DelegatingMethodHandle extends MethodHandle { Object constraint, NamedFunction getTargetFn) { // No pre-action needed. - return makeReinvokerForm(target, whichCache, constraint, null, true, getTargetFn, null); + return makeReinvokerForm(target, whichCache, constraint, true, getTargetFn, null); } /** Create a LF which simply reinvokes a target of the given basic type. */ static LambdaForm makeReinvokerForm(MethodHandle target, int whichCache, Object constraint, - String debugString, boolean forceInline, NamedFunction getTargetFn, NamedFunction preActionFn) { MethodType mtype = target.type().basicType(); Kind kind = whichKind(whichCache); - if (debugString == null) { - debugString = kind.defaultLambdaName; - } boolean customized = (whichCache < 0 || mtype.parameterSlotCount() > MethodType.MAX_MH_INVOKER_ARITY); boolean hasPreAction = (preActionFn != null); @@ -144,7 +140,7 @@ abstract class DelegatingMethodHandle extends MethodHandle { targetArgs[0] = names[NEXT_MH]; // overwrite this MH with next MH names[REINVOKE] = new LambdaForm.Name(mtype, targetArgs); } - form = new LambdaForm(debugString, ARG_LIMIT, names, forceInline, kind); + form = new LambdaForm(ARG_LIMIT, names, forceInline, kind); if (!customized) { form = mtype.form().setCachedLambdaForm(whichCache, form); } diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/DirectMethodHandle.java b/jdk/src/java.base/share/classes/java/lang/invoke/DirectMethodHandle.java index ce1f938583f..0b4bd58b624 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/DirectMethodHandle.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/DirectMethodHandle.java @@ -242,8 +242,7 @@ class DirectMethodHandle extends MethodHandle { result = NEW_OBJ; } names[LINKER_CALL] = new Name(linker, outArgs); - String lambdaName = kind.defaultLambdaName + "_" + shortenSignature(basicTypeSignature(mtype)); - LambdaForm lform = new LambdaForm(lambdaName, ARG_LIMIT, names, result, kind); + LambdaForm lform = new LambdaForm(ARG_LIMIT, names, result, kind); // This is a tricky bit of code. Don't send it through the LF interpreter. lform.compileToBytecode(); @@ -696,22 +695,33 @@ class DirectMethodHandle extends MethodHandle { if (needsCast && isGetter) names[POST_CAST] = new Name(NF_checkCast, names[DMH_THIS], names[LINKER_CALL]); for (Name n : names) assert(n != null); - // add some detail to the lambdaForm debugname, - // significant only for debugging - StringBuilder nameBuilder = new StringBuilder(kind.methodName); - if (isStatic) { - nameBuilder.append("Static"); - } else { - nameBuilder.append("Field"); - } - if (needsCast) nameBuilder.append("Cast"); - if (needsInit) nameBuilder.append("Init"); + + LambdaForm form; if (needsCast || needsInit) { // can't use the pre-generated form when casting and/or initializing - return new LambdaForm(nameBuilder.toString(), ARG_LIMIT, names, RESULT); + form = new LambdaForm(ARG_LIMIT, names, RESULT); } else { - return new LambdaForm(nameBuilder.toString(), ARG_LIMIT, names, RESULT, kind); + form = new LambdaForm(ARG_LIMIT, names, RESULT, kind); } + + if (LambdaForm.debugNames()) { + // add some detail to the lambdaForm debugname, + // significant only for debugging + StringBuilder nameBuilder = new StringBuilder(kind.methodName); + if (isStatic) { + nameBuilder.append("Static"); + } else { + nameBuilder.append("Field"); + } + if (needsCast) { + nameBuilder.append("Cast"); + } + if (needsInit) { + nameBuilder.append("Init"); + } + LambdaForm.associateWithDebugName(form, nameBuilder.toString()); + } + return form; } /** diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java b/jdk/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java index d903d488211..ec81f5093b6 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java @@ -130,7 +130,7 @@ class InvokerBytecodeGenerator { /** For generating customized code for a single LambdaForm. */ private InvokerBytecodeGenerator(String className, LambdaForm form, MethodType invokerType) { - this(className, form.debugName, form, invokerType); + this(className, form.lambdaName(), form, invokerType); } /** For generating customized code for a single LambdaForm. */ diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/Invokers.java b/jdk/src/java.base/share/classes/java/lang/invoke/Invokers.java index 0a97622fe84..a221af7e086 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/Invokers.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/Invokers.java @@ -132,7 +132,7 @@ class Invokers { MethodType mtype = targetType; MethodType invokerType = mtype.insertParameterTypes(0, VarHandle.class); - LambdaForm lform = varHandleMethodInvokerHandleForm(ak.methodName(), mtype, isExact); + LambdaForm lform = varHandleMethodInvokerHandleForm(ak, mtype, isExact); VarHandle.AccessDescriptor ad = new VarHandle.AccessDescriptor(mtype, ak.at.ordinal(), ak.ordinal()); MethodHandle invoker = BoundMethodHandle.bindSingle(invokerType, lform, ad); @@ -325,9 +325,9 @@ class Invokers { } names[LINKER_CALL] = new Name(outCallType, outArgs); if (customized) { - lform = new LambdaForm(kind.defaultLambdaName, INARG_LIMIT, names); + lform = new LambdaForm(INARG_LIMIT, names); } else { - lform = new LambdaForm(kind.defaultLambdaName, INARG_LIMIT, names, kind); + lform = new LambdaForm(INARG_LIMIT, names, kind); } if (isLinker) lform.compileToBytecode(); // JVM needs a real methodOop @@ -337,11 +337,10 @@ class Invokers { } - static MemberName varHandleInvokeLinkerMethod(String name, - MethodType mtype) { + static MemberName varHandleInvokeLinkerMethod(VarHandle.AccessMode ak, MethodType mtype) { LambdaForm lform; if (mtype.parameterSlotCount() <= MethodType.MAX_MH_ARITY - MH_LINKER_ARG_APPENDED) { - lform = varHandleMethodGenericLinkerHandleForm(name, mtype); + lform = varHandleMethodGenericLinkerHandleForm(ak, mtype); } else { // TODO throw newInternalError("Unsupported parameter slot count " + mtype.parameterSlotCount()); @@ -349,7 +348,8 @@ class Invokers { return lform.vmentry; } - private static LambdaForm varHandleMethodGenericLinkerHandleForm(String name, MethodType mtype) { + private static LambdaForm varHandleMethodGenericLinkerHandleForm(VarHandle.AccessMode ak, + MethodType mtype) { // TODO Cache form? final int THIS_VH = 0; @@ -383,14 +383,18 @@ class Invokers { MethodType outCallType = mtype.insertParameterTypes(0, VarHandle.class) .basicType(); names[LINKER_CALL] = new Name(outCallType, outArgs); - LambdaForm lform = new LambdaForm(name + ":VarHandle_invoke_MT_" + shortenSignature(basicTypeSignature(mtype)), - ARG_LIMIT + 1, names); - + LambdaForm lform = new LambdaForm(ARG_LIMIT + 1, names, VARHANDLE_LINKER); + if (LambdaForm.debugNames()) { + String name = ak.methodName() + ":VarHandle_invoke_MT_" + + shortenSignature(basicTypeSignature(mtype)); + LambdaForm.associateWithDebugName(lform, name); + } lform.compileToBytecode(); return lform; } - private static LambdaForm varHandleMethodInvokerHandleForm(String name, MethodType mtype, boolean isExact) { + private static LambdaForm varHandleMethodInvokerHandleForm(VarHandle.AccessMode ak, + MethodType mtype, boolean isExact) { // TODO Cache form? final int THIS_MH = 0; @@ -429,10 +433,14 @@ class Invokers { MethodType outCallType = mtype.insertParameterTypes(0, VarHandle.class) .basicType(); names[LINKER_CALL] = new Name(outCallType, outArgs); - String debugName = isExact ? ":VarHandle_exactInvoker" : ":VarHandle_invoker"; - LambdaForm lform = new LambdaForm(name + debugName + shortenSignature(basicTypeSignature(mtype)), - ARG_LIMIT, names); - + Kind kind = isExact ? VARHANDLE_EXACT_INVOKER : VARHANDLE_INVOKER; + LambdaForm lform = new LambdaForm(ARG_LIMIT, names, kind); + if (LambdaForm.debugNames()) { + String name = ak.methodName() + + (isExact ? ":VarHandle_exactInvoker_" : ":VarHandle_invoker_") + + shortenSignature(basicTypeSignature(mtype)); + LambdaForm.associateWithDebugName(lform, name); + } lform.prepare(); return lform; } @@ -543,7 +551,8 @@ class Invokers { System.arraycopy(outArgs, 0, outArgs, PREPEND_COUNT, outArgs.length - PREPEND_COUNT); outArgs[PREPEND_MH] = names[CALL_MH]; names[LINKER_CALL] = new Name(mtype, outArgs); - lform = new LambdaForm((skipCallSite ? "linkToTargetMethod" : "linkToCallSite"), INARG_LIMIT, names); + lform = new LambdaForm(INARG_LIMIT, names, + (skipCallSite ? LINK_TO_TARGET_METHOD : LINK_TO_CALL_SITE)); lform.compileToBytecode(); // JVM needs a real methodOop lform = mtype.form().setCachedLambdaForm(which, lform); return lform; diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaForm.java b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaForm.java index 96b0a944800..0048afbfd9e 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaForm.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaForm.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -126,7 +126,6 @@ class LambdaForm { final boolean forceInline; final MethodHandle customized; @Stable final Name[] names; - final String debugName; final Kind kind; MemberName vmentry; // low-level behavior, or null if not yet prepared private boolean isCompiled; @@ -268,7 +267,7 @@ class LambdaForm { } enum Kind { - GENERIC(""), + GENERIC("invoke"), ZERO("zero"), IDENTITY("identity"), BOUND_REINVOKER("BMH.reinvoke"), @@ -278,6 +277,8 @@ class LambdaForm { EXACT_INVOKER("MH.exactInvoker"), GENERIC_LINKER("MH.invoke_MT"), GENERIC_INVOKER("MH.invoker"), + LINK_TO_TARGET_METHOD("linkToTargetMethod"), + LINK_TO_CALL_SITE("linkToCallSite"), DIRECT_INVOKE_VIRTUAL("DMH.invokeVirtual"), DIRECT_INVOKE_SPECIAL("DMH.invokeSpecial"), DIRECT_INVOKE_STATIC("DMH.invokeStatic"), @@ -319,7 +320,18 @@ class LambdaForm { GET_DOUBLE("getDouble"), PUT_DOUBLE("putDouble"), GET_DOUBLE_VOLATILE("getDoubleVolatile"), - PUT_DOUBLE_VOLATILE("putDoubleVolatile"); + PUT_DOUBLE_VOLATILE("putDoubleVolatile"), + TRY_FINALLY("tryFinally"), + COLLECT("collect"), + CONVERT("convert"), + SPREAD("spread"), + LOOP("loop"), + FIELD("field"), + GUARD("guard"), + GUARD_WITH_CATCH("guardWithCatch"), + VARHANDLE_EXACT_INVOKER("VH.exactInvoker"), + VARHANDLE_INVOKER("VH.invoker"), + VARHANDLE_LINKER("VH.invoke_MT"); final String defaultLambdaName; final String methodName; @@ -335,25 +347,20 @@ class LambdaForm { } } - LambdaForm(String debugName, - int arity, Name[] names, int result) { - this(debugName, arity, names, result, /*forceInline=*/true, /*customized=*/null, Kind.GENERIC); + LambdaForm(int arity, Name[] names, int result) { + this(arity, names, result, /*forceInline=*/true, /*customized=*/null, Kind.GENERIC); } - LambdaForm(String debugName, - int arity, Name[] names, int result, Kind kind) { - this(debugName, arity, names, result, /*forceInline=*/true, /*customized=*/null, kind); + LambdaForm(int arity, Name[] names, int result, Kind kind) { + this(arity, names, result, /*forceInline=*/true, /*customized=*/null, kind); } - LambdaForm(String debugName, - int arity, Name[] names, int result, boolean forceInline, MethodHandle customized) { - this(debugName, arity, names, result, forceInline, customized, Kind.GENERIC); + LambdaForm(int arity, Name[] names, int result, boolean forceInline, MethodHandle customized) { + this(arity, names, result, forceInline, customized, Kind.GENERIC); } - LambdaForm(String debugName, - int arity, Name[] names, int result, boolean forceInline, MethodHandle customized, Kind kind) { + LambdaForm(int arity, Name[] names, int result, boolean forceInline, MethodHandle customized, Kind kind) { assert(namesOK(arity, names)); this.arity = arity; this.result = fixResult(result, names); this.names = names.clone(); - this.debugName = fixDebugName(debugName); this.forceInline = forceInline; this.customized = customized; this.kind = kind; @@ -364,31 +371,23 @@ class LambdaForm { compileToBytecode(); } } - LambdaForm(String debugName, - int arity, Name[] names) { - this(debugName, arity, names, LAST_RESULT, /*forceInline=*/true, /*customized=*/null, Kind.GENERIC); + LambdaForm(int arity, Name[] names) { + this(arity, names, LAST_RESULT, /*forceInline=*/true, /*customized=*/null, Kind.GENERIC); } - LambdaForm(String debugName, - int arity, Name[] names, Kind kind) { - this(debugName, arity, names, LAST_RESULT, /*forceInline=*/true, /*customized=*/null, kind); + LambdaForm(int arity, Name[] names, Kind kind) { + this(arity, names, LAST_RESULT, /*forceInline=*/true, /*customized=*/null, kind); } - LambdaForm(String debugName, - int arity, Name[] names, boolean forceInline) { - this(debugName, arity, names, LAST_RESULT, forceInline, /*customized=*/null, Kind.GENERIC); + LambdaForm(int arity, Name[] names, boolean forceInline) { + this(arity, names, LAST_RESULT, forceInline, /*customized=*/null, Kind.GENERIC); } - LambdaForm(String debugName, - int arity, Name[] names, boolean forceInline, Kind kind) { - this(debugName, arity, names, LAST_RESULT, forceInline, /*customized=*/null, kind); + LambdaForm(int arity, Name[] names, boolean forceInline, Kind kind) { + this(arity, names, LAST_RESULT, forceInline, /*customized=*/null, kind); } - LambdaForm(String debugName, - Name[] formals, Name[] temps, Name result) { - this(debugName, - formals.length, buildNames(formals, temps, result), LAST_RESULT, /*forceInline=*/true, /*customized=*/null); + LambdaForm(Name[] formals, Name[] temps, Name result) { + this(formals.length, buildNames(formals, temps, result), LAST_RESULT, /*forceInline=*/true, /*customized=*/null); } - LambdaForm(String debugName, - Name[] formals, Name[] temps, Name result, boolean forceInline) { - this(debugName, - formals.length, buildNames(formals, temps, result), LAST_RESULT, forceInline, /*customized=*/null); + LambdaForm(Name[] formals, Name[] temps, Name result, boolean forceInline) { + this(formals.length, buildNames(formals, temps, result), LAST_RESULT, forceInline, /*customized=*/null); } private static Name[] buildNames(Name[] formals, Name[] temps, Name result) { @@ -408,10 +407,9 @@ class LambdaForm { this.arity = mt.parameterCount(); this.result = (mt.returnType() == void.class || mt.returnType() == Void.class) ? -1 : arity; this.names = buildEmptyNames(arity, mt, result == -1); - this.debugName = "LF.zero"; this.forceInline = true; this.customized = null; - this.kind = Kind.GENERIC; + this.kind = Kind.ZERO; assert(nameRefsAreLegal()); assert(isEmpty()); String sig = null; @@ -436,36 +434,46 @@ class LambdaForm { return result; } - private static String fixDebugName(String debugName) { - if (DEBUG_NAME_COUNTERS != null) { - int under = debugName.indexOf('_'); - int length = debugName.length(); - if (under < 0) under = length; - String debugNameStem = debugName.substring(0, under); - Integer ctr; - synchronized (DEBUG_NAME_COUNTERS) { - ctr = DEBUG_NAME_COUNTERS.get(debugNameStem); - if (ctr == null) ctr = 0; - DEBUG_NAME_COUNTERS.put(debugNameStem, ctr+1); - } - StringBuilder buf = new StringBuilder(debugNameStem); - buf.append('_'); - int leadingZero = buf.length(); - buf.append((int) ctr); - for (int i = buf.length() - leadingZero; i < 3; i++) - buf.insert(leadingZero, '0'); - if (under < length) { - ++under; // skip "_" - while (under < length && Character.isDigit(debugName.charAt(under))) { - ++under; - } - if (under < length && debugName.charAt(under) == '_') ++under; - if (under < length) - buf.append('_').append(debugName, under, length); - } - return buf.toString(); + static boolean debugNames() { + return DEBUG_NAME_COUNTERS != null; + } + + static void associateWithDebugName(LambdaForm form, String name) { + assert (debugNames()); + synchronized (DEBUG_NAMES) { + DEBUG_NAMES.put(form, name); } - return debugName; + } + + String lambdaName() { + if (DEBUG_NAMES != null) { + synchronized (DEBUG_NAMES) { + String name = DEBUG_NAMES.get(this); + if (name == null) { + name = generateDebugName(); + } + return name; + } + } + return kind.defaultLambdaName; + } + + private String generateDebugName() { + assert (debugNames()); + String debugNameStem = kind.defaultLambdaName; + Integer ctr = DEBUG_NAME_COUNTERS.getOrDefault(debugNameStem, 0); + DEBUG_NAME_COUNTERS.put(debugNameStem, ctr + 1); + StringBuilder buf = new StringBuilder(debugNameStem); + int leadingZero = buf.length(); + buf.append((int) ctr); + for (int i = buf.length() - leadingZero; i < 3; i++) { + buf.insert(leadingZero, '0'); + } + buf.append('_'); + buf.append(basicTypeSignature()); + String name = buf.toString(); + associateWithDebugName(this, name); + return name; } private static boolean namesOK(int arity, Name[] names) { @@ -482,7 +490,7 @@ class LambdaForm { /** Customize LambdaForm for a particular MethodHandle */ LambdaForm customize(MethodHandle mh) { - LambdaForm customForm = new LambdaForm(debugName, arity, names, result, forceInline, mh, kind); + LambdaForm customForm = new LambdaForm(arity, names, result, forceInline, mh, kind); if (COMPILE_THRESHOLD >= 0 && isCompiled) { // If shared LambdaForm has been compiled, compile customized version as well. customForm.compileToBytecode(); @@ -1030,7 +1038,8 @@ class LambdaForm { } public String toString() { - StringBuilder buf = new StringBuilder(debugName+"=Lambda("); + String lambdaName = lambdaName(); + StringBuilder buf = new StringBuilder(lambdaName + "=Lambda("); for (int i = 0; i < names.length; i++) { if (i == arity) buf.append(")=>{"); Name n = names[i]; @@ -1742,7 +1751,7 @@ class LambdaForm { // bootstrap dependency on this method in case we're interpreting LFs if (isVoid) { Name[] idNames = new Name[] { argument(0, L_TYPE) }; - idForm = new LambdaForm(idMem.getName(), 1, idNames, VOID_RESULT, Kind.IDENTITY); + idForm = new LambdaForm(1, idNames, VOID_RESULT, Kind.IDENTITY); idForm.compileToBytecode(); idFun = new NamedFunction(idMem, SimpleMethodHandle.make(idMem.getInvocationType(), idForm)); @@ -1750,14 +1759,14 @@ class LambdaForm { zeFun = idFun; } else { Name[] idNames = new Name[] { argument(0, L_TYPE), argument(1, type) }; - idForm = new LambdaForm(idMem.getName(), 2, idNames, 1, Kind.IDENTITY); + idForm = new LambdaForm(2, idNames, 1, Kind.IDENTITY); idForm.compileToBytecode(); idFun = new NamedFunction(idMem, MethodHandleImpl.makeIntrinsic( idMem.getInvocationType(), idForm, MethodHandleImpl.Intrinsic.IDENTITY)); Object zeValue = Wrapper.forBasicType(btChar).zero(); Name[] zeNames = new Name[] { argument(0, L_TYPE), new Name(idFun, zeValue) }; - zeForm = new LambdaForm(zeMem.getName(), 1, zeNames, 1, Kind.ZERO); + zeForm = new LambdaForm(1, zeNames, 1, Kind.ZERO); zeForm.compileToBytecode(); zeFun = new NamedFunction(zeMem, MethodHandleImpl.makeIntrinsic( zeMem.getInvocationType(), zeForm, MethodHandleImpl.Intrinsic.ZERO)); @@ -1805,11 +1814,15 @@ class LambdaForm { } private static final HashMap DEBUG_NAME_COUNTERS; + private static final HashMap DEBUG_NAMES; static { - if (debugEnabled()) + if (debugEnabled()) { DEBUG_NAME_COUNTERS = new HashMap<>(); - else + DEBUG_NAMES = new HashMap<>(); + } else { DEBUG_NAME_COUNTERS = null; + DEBUG_NAMES = null; + } } static { diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaFormBuffer.java b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaFormBuffer.java index cc4b97b5479..bcf1733461b 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaFormBuffer.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaFormBuffer.java @@ -40,7 +40,6 @@ final class LambdaFormBuffer { private byte flags; private int firstChange; private Name resultName; - private String debugName; private ArrayList dups; private static final int F_TRANS = 0x10, F_OWNED = 0x03; @@ -50,15 +49,15 @@ final class LambdaFormBuffer { setNames(lf.names); int result = lf.result; if (result == LAST_RESULT) result = length - 1; - if (result >= 0 && lf.names[result].type != V_TYPE) + if (result >= 0 && lf.names[result].type != V_TYPE) { resultName = lf.names[result]; - debugName = lf.debugName; + } assert(lf.nameRefsAreLegal()); } private LambdaForm lambdaForm() { assert(!inTrans()); // need endEdit call to tidy things up - return new LambdaForm(debugName, arity, nameArray(), resultIndex()); + return new LambdaForm(arity, nameArray(), resultIndex()); } Name name(int i) { diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaFormEditor.java b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaFormEditor.java index ddd60ca082f..2d9c87ad0d4 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaFormEditor.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaFormEditor.java @@ -915,7 +915,7 @@ class LambdaFormEditor { } } - form = new LambdaForm(lambdaForm.debugName, arity2, names2, result2); + form = new LambdaForm(arity2, names2, result2); return putInCache(key, form); } diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java index 010b61809ee..8ea5553fccc 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java @@ -399,7 +399,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; assert(RETURN_CONV == names.length-1); } - LambdaForm form = new LambdaForm("convert", lambdaType.parameterCount(), names, RESULT); + LambdaForm form = new LambdaForm(lambdaType.parameterCount(), names, RESULT, Kind.CONVERT); return SimpleMethodHandle.make(srcType, form); } @@ -608,7 +608,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; } names[names.length - 1] = new Name(target, (Object[]) targetArgs); - LambdaForm form = new LambdaForm("spread", lambdaType.parameterCount(), names); + LambdaForm form = new LambdaForm(lambdaType.parameterCount(), names, Kind.SPREAD); return SimpleMethodHandle.make(srcType, form); } @@ -676,7 +676,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; assert(inputArgPos + chunk == collectNamePos); // use of rest of input args also names[targetNamePos] = new Name(target, (Object[]) targetArgs); - LambdaForm form = new LambdaForm("collect", lambdaType.parameterCount(), names); + LambdaForm form = new LambdaForm(lambdaType.parameterCount(), names, Kind.COLLECT); return SimpleMethodHandle.make(srcType, form); } @@ -774,7 +774,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; @Override public LambdaForm apply(MethodHandle target) { return DelegatingMethodHandle.makeReinvokerForm(target, - MethodTypeForm.LF_DELEGATE_BLOCK_INLINING, CountingWrapper.class, "reinvoker.dontInline", false, + MethodTypeForm.LF_DELEGATE_BLOCK_INLINING, CountingWrapper.class, false, DelegatingMethodHandle.NF_getTarget, CountingWrapper.NF_maybeStopCounting); } }; @@ -943,7 +943,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; invokeArgs[0] = names[SELECT_ALT]; names[CALL_TARGET] = new Name(basicType, invokeArgs); - lform = new LambdaForm("guard", lambdaType.parameterCount(), names, /*forceInline=*/true); + lform = new LambdaForm(lambdaType.parameterCount(), names, /*forceInline=*/true, Kind.GUARD); return basicType.form().setCachedLambdaForm(MethodTypeForm.LF_GWT, lform); } @@ -1019,7 +1019,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; Object[] unboxArgs = new Object[] {names[GET_UNBOX_RESULT], names[TRY_CATCH]}; names[UNBOX_RESULT] = new Name(invokeBasicUnbox, unboxArgs); - lform = new LambdaForm("guardWithCatch", lambdaType.parameterCount(), names); + lform = new LambdaForm(lambdaType.parameterCount(), names, Kind.GUARD_WITH_CATCH); return basicType.form().setCachedLambdaForm(MethodTypeForm.LF_GWC, lform); } @@ -1886,7 +1886,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; names[UNBOX_RESULT] = new Name(invokeBasicUnbox, unboxArgs); lform = basicType.form().setCachedLambdaForm(MethodTypeForm.LF_LOOP, - new LambdaForm("loop", lambdaType.parameterCount(), names)); + new LambdaForm(lambdaType.parameterCount(), names, Kind.LOOP)); } // BOXED_ARGS is the index into the names array where the loop idiom starts @@ -2120,7 +2120,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; Object[] unboxArgs = new Object[] {names[GET_UNBOX_RESULT], names[TRY_FINALLY]}; names[UNBOX_RESULT] = new Name(invokeBasicUnbox, unboxArgs); - lform = new LambdaForm("tryFinally", lambdaType.parameterCount(), names); + lform = new LambdaForm(lambdaType.parameterCount(), names, Kind.TRY_FINALLY); return basicType.form().setCachedLambdaForm(MethodTypeForm.LF_TF, lform); } diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java index c655a071a0f..110369fb13e 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java @@ -471,7 +471,7 @@ class MethodHandleNatives { // Fall back to lambda form linkage if guard method is not available // TODO Optionally log fallback ? } - return Invokers.varHandleInvokeLinkerMethod(name, mtype); + return Invokers.varHandleInvokeLinkerMethod(ak, mtype); } static String getVarHandleGuardMethodName(MethodType guardType) { String prefix = "guard_"; diff --git a/jdk/test/java/lang/invoke/LFCaching/LFGarbageCollectedTest.java b/jdk/test/java/lang/invoke/LFCaching/LFGarbageCollectedTest.java index b6964c392a7..92036f09e52 100644 --- a/jdk/test/java/lang/invoke/LFCaching/LFGarbageCollectedTest.java +++ b/jdk/test/java/lang/invoke/LFCaching/LFGarbageCollectedTest.java @@ -82,9 +82,9 @@ public final class LFGarbageCollectedTest extends LambdaFormTestCase { throw new Error("Unexpected error: Lambda form of the method handle is null"); } - String debugName = (String)DEBUG_NAME.get(lambdaForm); - if (debugName != null && debugName.startsWith("identity_")) { - // Ignore identity_* LambdaForms. + String kind = KIND_FIELD.get(lambdaForm).toString(); + if (kind.equals("IDENTITY")) { + // Ignore identity LambdaForms. return; } diff --git a/jdk/test/java/lang/invoke/LFCaching/LambdaFormTestCase.java b/jdk/test/java/lang/invoke/LFCaching/LambdaFormTestCase.java index 42f6aefbfe7..0bb9c494126 100644 --- a/jdk/test/java/lang/invoke/LFCaching/LambdaFormTestCase.java +++ b/jdk/test/java/lang/invoke/LFCaching/LambdaFormTestCase.java @@ -51,7 +51,7 @@ public abstract class LambdaFormTestCase { * used to get a lambda form from a method handle. */ protected static final Method INTERNAL_FORM; - protected static final Field DEBUG_NAME; + protected static final Field KIND_FIELD; protected static final Field REF_FIELD; private static final List gcInfo; @@ -64,8 +64,8 @@ public abstract class LambdaFormTestCase { INTERNAL_FORM = MethodHandle.class.getDeclaredMethod("internalForm"); INTERNAL_FORM.setAccessible(true); - DEBUG_NAME = Class.forName("java.lang.invoke.LambdaForm").getDeclaredField("debugName"); - DEBUG_NAME.setAccessible(true); + KIND_FIELD = Class.forName("java.lang.invoke.LambdaForm").getDeclaredField("kind"); + KIND_FIELD.setAccessible(true); REF_FIELD = Reference.class.getDeclaredField("referent"); REF_FIELD.setAccessible(true); From b1e28ffd5a59c7db58c6bbfcceb1139e165a817f Mon Sep 17 00:00:00 2001 From: Claes Redestad Date: Wed, 22 Feb 2017 11:04:03 +0100 Subject: [PATCH 283/447] 8175233: Remove LambdaForm.debugName Reviewed-by: vlivanov, psandoz, jrose --- .../patches/java.base/java/lang/invoke/MethodHandleHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotspot/test/compiler/jsr292/patches/java.base/java/lang/invoke/MethodHandleHelper.java b/hotspot/test/compiler/jsr292/patches/java.base/java/lang/invoke/MethodHandleHelper.java index a4732624a3a..ad0d29278c2 100644 --- a/hotspot/test/compiler/jsr292/patches/java.base/java/lang/invoke/MethodHandleHelper.java +++ b/hotspot/test/compiler/jsr292/patches/java.base/java/lang/invoke/MethodHandleHelper.java @@ -84,7 +84,7 @@ public class MethodHandleHelper { public static MethodHandle make(MethodHandle target) { LambdaForm lform = DelegatingMethodHandle.makeReinvokerForm( - target, -1, DelegatingMethodHandle.class, "reinvoker.dontInline", + target, -1, DelegatingMethodHandle.class, /*forceInline=*/false, DelegatingMethodHandle.NF_getTarget, null); return new NonInlinedReinvoker(target, lform); } From a019fa1484b777187a0d9c46c2541eaa04ac8ae8 Mon Sep 17 00:00:00 2001 From: David Dehaven Date: Wed, 22 Feb 2017 08:37:36 -0800 Subject: [PATCH 284/447] 8175307: rpath macro needs to use an argument on macosx Reviewed-by: erikj --- common/autoconf/flags.m4 | 4 ++-- common/autoconf/generated-configure.sh | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/autoconf/flags.m4 b/common/autoconf/flags.m4 index ca7f625664c..e2d82c67283 100644 --- a/common/autoconf/flags.m4 +++ b/common/autoconf/flags.m4 @@ -355,7 +355,7 @@ AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS], SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG" JVM_CFLAGS="$JVM_CFLAGS $PICFLAG" fi - SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.' + SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path[$]1' SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN" SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1' SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,[$]1' @@ -375,7 +375,7 @@ AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS], # Linking is different on MacOSX PICFLAG='' SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG" - SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.' + SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path[$]1' SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN" SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1' SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,[$]1' diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index acba47d7148..26eee129532 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -5170,7 +5170,7 @@ VS_SDK_PLATFORM_NAME_2013= #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1486679715 +DATE_WHEN_GENERATED=1487781359 ############################################################################### # @@ -49074,7 +49074,7 @@ $as_echo "$ac_cv_c_bigendian" >&6; } SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG" JVM_CFLAGS="$JVM_CFLAGS $PICFLAG" fi - SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.' + SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$1' SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN" SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1' SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1' @@ -49094,7 +49094,7 @@ $as_echo "$ac_cv_c_bigendian" >&6; } # Linking is different on MacOSX PICFLAG='' SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG" - SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.' + SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$1' SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN" SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1' SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1' From ad7a2057c20c6c58ab49c82edca6ccfca350b283 Mon Sep 17 00:00:00 2001 From: Gerard Ziemski Date: Wed, 22 Feb 2017 11:20:12 -0600 Subject: [PATCH 285/447] 8175135: Header template correction for year Added comma. Reviewed-by: dcubed, gthornbr --- hotspot/src/share/vm/runtime/os_ext.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/runtime/os_ext.hpp b/hotspot/src/share/vm/runtime/os_ext.hpp index 3aa733a322a..5fcaae13728 100644 --- a/hotspot/src/share/vm/runtime/os_ext.hpp +++ b/hotspot/src/share/vm/runtime/os_ext.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it From 52c656a350bc90c987190ddcf0927820615c58f9 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Wed, 22 Feb 2017 12:01:15 -0800 Subject: [PATCH 286/447] 8175335: Improve handling of module types in javax.lang.model.util.Types Reviewed-by: jjg, abuckley --- .../javax/lang/model/type/TypeMirror.java | 8 +- .../classes/javax/lang/model/util/Types.java | 25 +++--- .../com/sun/tools/javac/model/JavacTypes.java | 24 +++--- .../util/types/TestPseudoTypeHandling.java | 85 +++++++++++++++++++ 4 files changed, 117 insertions(+), 25 deletions(-) create mode 100644 langtools/test/tools/javac/processing/model/util/types/TestPseudoTypeHandling.java diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/type/TypeMirror.java b/langtools/src/java.compiler/share/classes/javax/lang/model/type/TypeMirror.java index 5e5358b9ed0..3f5d6910379 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/type/TypeMirror.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/type/TypeMirror.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,9 +34,9 @@ import javax.lang.model.util.Types; * Represents a type in the Java programming language. * Types include primitive types, declared types (class and interface types), * array types, type variables, and the null type. - * Also represented are wildcard type arguments, - * the signature and return types of executables, - * and pseudo-types corresponding to packages and to the keyword {@code void}. + * Also represented are wildcard type arguments, the signature and + * return types of executables, and pseudo-types corresponding to + * packages, modules, and the keyword {@code void}. * *

      Types should be compared using the utility methods in {@link * Types}. There is no guarantee that any particular type will always diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/util/Types.java b/langtools/src/java.compiler/share/classes/javax/lang/model/util/Types.java index e4bc4e8b66f..1c736c727ba 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/util/Types.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/util/Types.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -91,7 +91,7 @@ public interface Types { * @param t2 the second type * @return {@code true} if and only if the first type is a subtype * of the second - * @throws IllegalArgumentException if given an executable or package type + * @throws IllegalArgumentException if given a type for an executable, package, or module * @jls 4.10 Subtyping */ boolean isSubtype(TypeMirror t1, TypeMirror t2); @@ -103,7 +103,7 @@ public interface Types { * @param t2 the second type * @return {@code true} if and only if the first type is assignable * to the second - * @throws IllegalArgumentException if given an executable or package type + * @throws IllegalArgumentException if given a type for an executable, package, or module * @jls 5.2 Assignment Conversion */ boolean isAssignable(TypeMirror t1, TypeMirror t2); @@ -114,7 +114,7 @@ public interface Types { * @param t1 the first type * @param t2 the second type * @return {@code true} if and only if the first type contains the second - * @throws IllegalArgumentException if given an executable or package type + * @throws IllegalArgumentException if given a type for an executable, package, or module * @jls 4.5.1.1 Type Argument Containment and Equivalence */ boolean contains(TypeMirror t1, TypeMirror t2); @@ -139,7 +139,7 @@ public interface Types { * * @param t the type being examined * @return the direct supertypes, or an empty list if none - * @throws IllegalArgumentException if given an executable or package type + * @throws IllegalArgumentException if given a type for an executable, package, or module * @jls 4.10 Subtyping */ List directSupertypes(TypeMirror t); @@ -149,7 +149,7 @@ public interface Types { * * @param t the type to be erased * @return the erasure of the given type - * @throws IllegalArgumentException if given a package type + * @throws IllegalArgumentException if given a type for a package or module * @jls 4.6 Type Erasure */ TypeMirror erasure(TypeMirror t); @@ -181,7 +181,7 @@ public interface Types { * * @param t the type to be converted * @return the result of applying capture conversion - * @throws IllegalArgumentException if given an executable or package type + * @throws IllegalArgumentException if given a type for an executable, package, or module * @jls 5.1.10 Capture Conversion */ TypeMirror capture(TypeMirror t); @@ -206,9 +206,14 @@ public interface Types { * Returns a pseudo-type used where no actual type is appropriate. * The kind of type to return may be either * {@link TypeKind#VOID VOID} or {@link TypeKind#NONE NONE}. - * For packages, use - * {@link Elements#getPackageElement(CharSequence)}{@code .asType()} - * instead. + * + *

      To get the pseudo-type corresponding to a package or module, + * call {@code asType()} on the element modeling the {@linkplain + * PackageElement package} or {@linkplain ModuleElement + * module}. Names can be converted to elements for packages or + * modules using {@link Elements#getPackageElement(CharSequence)} + * or {@link Elements#getModuleElement(CharSequence)}, + * respectively. * * @param kind the kind of type to return * @return a pseudo-type of kind {@code VOID} or {@code NONE} diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacTypes.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacTypes.java index 89f7f786157..e3e158a0725 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacTypes.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacTypes.java @@ -93,22 +93,22 @@ public class JavacTypes implements javax.lang.model.util.Types { @DefinedBy(Api.LANGUAGE_MODEL) public boolean isSubtype(TypeMirror t1, TypeMirror t2) { - validateTypeNotIn(t1, EXEC_OR_PKG); - validateTypeNotIn(t2, EXEC_OR_PKG); + validateTypeNotIn(t1, EXEC_OR_PKG_OR_MOD); + validateTypeNotIn(t2, EXEC_OR_PKG_OR_MOD); return types.isSubtype((Type) t1, (Type) t2); } @DefinedBy(Api.LANGUAGE_MODEL) public boolean isAssignable(TypeMirror t1, TypeMirror t2) { - validateTypeNotIn(t1, EXEC_OR_PKG); - validateTypeNotIn(t2, EXEC_OR_PKG); + validateTypeNotIn(t1, EXEC_OR_PKG_OR_MOD); + validateTypeNotIn(t2, EXEC_OR_PKG_OR_MOD); return types.isAssignable((Type) t1, (Type) t2); } @DefinedBy(Api.LANGUAGE_MODEL) public boolean contains(TypeMirror t1, TypeMirror t2) { - validateTypeNotIn(t1, EXEC_OR_PKG); - validateTypeNotIn(t2, EXEC_OR_PKG); + validateTypeNotIn(t1, EXEC_OR_PKG_OR_MOD); + validateTypeNotIn(t2, EXEC_OR_PKG_OR_MOD); return types.containsType((Type) t1, (Type) t2); } @@ -119,7 +119,7 @@ public class JavacTypes implements javax.lang.model.util.Types { @DefinedBy(Api.LANGUAGE_MODEL) public List directSupertypes(TypeMirror t) { - validateTypeNotIn(t, EXEC_OR_PKG); + validateTypeNotIn(t, EXEC_OR_PKG_OR_MOD); Type ty = (Type)t; return types.directSupertypes(ty).stream() .map(Type::stripMetadataIfNeeded) @@ -128,7 +128,8 @@ public class JavacTypes implements javax.lang.model.util.Types { @DefinedBy(Api.LANGUAGE_MODEL) public TypeMirror erasure(TypeMirror t) { - if (t.getKind() == TypeKind.PACKAGE) + TypeKind kind = t.getKind(); + if (kind == TypeKind.PACKAGE || kind == TypeKind.MODULE) throw new IllegalArgumentException(t.toString()); return types.erasure((Type)t).stripMetadataIfNeeded(); } @@ -150,7 +151,7 @@ public class JavacTypes implements javax.lang.model.util.Types { @DefinedBy(Api.LANGUAGE_MODEL) public TypeMirror capture(TypeMirror t) { - validateTypeNotIn(t, EXEC_OR_PKG); + validateTypeNotIn(t, EXEC_OR_PKG_OR_MOD); return types.capture((Type)t).stripMetadataIfNeeded(); } @@ -192,6 +193,7 @@ public class JavacTypes implements javax.lang.model.util.Types { case EXECUTABLE: case WILDCARD: // heh! case PACKAGE: + case MODULE: throw new IllegalArgumentException(componentType.toString()); } return new Type.ArrayType((Type) componentType, syms.arrayClass); @@ -299,8 +301,8 @@ public class JavacTypes implements javax.lang.model.util.Types { } - private static final Set EXEC_OR_PKG = - EnumSet.of(TypeKind.EXECUTABLE, TypeKind.PACKAGE); + private static final Set EXEC_OR_PKG_OR_MOD = + EnumSet.of(TypeKind.EXECUTABLE, TypeKind.PACKAGE, TypeKind.MODULE); /** * Throws an IllegalArgumentException if a type's kind is one of a set. diff --git a/langtools/test/tools/javac/processing/model/util/types/TestPseudoTypeHandling.java b/langtools/test/tools/javac/processing/model/util/types/TestPseudoTypeHandling.java new file mode 100644 index 00000000000..8e4565fe55a --- /dev/null +++ b/langtools/test/tools/javac/processing/model/util/types/TestPseudoTypeHandling.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8175335 + * @summary Test Elements.getPackageOf + * @author Joseph D. Darcy + * @library /tools/javac/lib + * @modules jdk.compiler + * @build JavacTestingAbstractProcessor TestPseudoTypeHandling + * @compile -processor TestPseudoTypeHandling -proc:only TestPseudoTypeHandling.java + */ + +import java.util.*; +import java.util.function.*; +import static java.util.Objects.*; +import javax.annotation.processing.*; +import javax.lang.model.element.*; +import javax.lang.model.type.*; +import javax.lang.model.util.*; + +/** + * Test basic handling of module type. + */ +public class TestPseudoTypeHandling extends JavacTestingAbstractProcessor { + public boolean process(Set annotations, + RoundEnvironment roundEnv) { + if (!roundEnv.processingOver()) { + TypeMirror objectType = requireNonNull(eltUtils.getTypeElement("java.lang.Object")).asType(); + + List typeMirrorsToTest = + List.of(requireNonNull(eltUtils.getModuleElement("java.base")).asType(), + requireNonNull(eltUtils.getPackageElement("java.lang")).asType()); + + for (TypeMirror type : typeMirrorsToTest) { + expectException(t -> typeUtils.isSubtype(t, objectType), type); + expectException(t -> typeUtils.isSubtype(objectType, t), type); + + expectException(t -> typeUtils.isAssignable(t, objectType), type); + expectException(t -> typeUtils.isAssignable(objectType, t), type); + + expectException(t -> typeUtils.contains(t, objectType), type); + expectException(t -> typeUtils.contains(objectType, t), type); + + expectException(t -> typeUtils.capture(t), type); + expectException(t -> typeUtils.erasure(t), type); + + expectException(t -> typeUtils.getArrayType(t), type); + + expectException(t -> typeUtils.directSupertypes(t), type); + } + } + return true; + } + + void expectException(Consumer argument, TypeMirror type) { + try { + argument.accept(type); + throw new RuntimeException("Should not reach " + type.toString()); + } catch (IllegalArgumentException e) { + ; // Expected + } + } +} From 3fe241c003c42739824d22ddce1f70d85584a82e Mon Sep 17 00:00:00 2001 From: Anthony Scarpino Date: Wed, 22 Feb 2017 14:12:01 -0800 Subject: [PATCH 287/447] 8175250: Manifest checking throws exception with no entry Reviewed-by: mullan --- .../security/util/SignatureFileVerifier.java | 39 ++++++++++++------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/jdk/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java b/jdk/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java index 2fe1c7ee91e..0663f0573ae 100644 --- a/jdk/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java +++ b/jdk/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java @@ -433,7 +433,10 @@ public class SignatureFileVerifier { { Attributes mattr = sf.getMainAttributes(); boolean manifestSigned = false; + // If only weak algorithms are used. boolean weakAlgs = true; + // If a "*-DIGEST-MANIFEST" entry is found. + boolean validEntry = false; // go through all the attributes and process *-Digest-Manifest entries for (Map.Entry se : mattr.entrySet()) { @@ -443,6 +446,7 @@ public class SignatureFileVerifier { if (key.toUpperCase(Locale.ENGLISH).endsWith("-DIGEST-MANIFEST")) { // 16 is length of "-Digest-Manifest" String algorithm = key.substring(0, key.length()-16); + validEntry = true; // Check if this algorithm is permitted, skip if false. if (!permittedCheck(key, algorithm)) { @@ -486,12 +490,11 @@ public class SignatureFileVerifier { } } - // If there were only weak algorithms used, throw an exception. - if (weakAlgs) { - String weakAlgorithms = getWeakAlgorithms("-DIGEST-MANIFEST"); + // If there were only weak algorithms entries used, throw an exception. + if (validEntry && weakAlgs) { throw new SignatureException("Manifest hash check failed " + "(DIGEST-MANIFEST). Disabled algorithm(s) used: " + - weakAlgorithms); + getWeakAlgorithms("-DIGEST-MANIFEST")); } return manifestSigned; } @@ -501,7 +504,10 @@ public class SignatureFileVerifier { { Attributes mattr = sf.getMainAttributes(); boolean attrsVerified = true; + // If only weak algorithms are used. boolean weakAlgs = true; + // If a ATTR_DIGEST entry is found. + boolean validEntry = false; // go through all the attributes and process // digest entries for the manifest main attributes @@ -511,6 +517,7 @@ public class SignatureFileVerifier { if (key.toUpperCase(Locale.ENGLISH).endsWith(ATTR_DIGEST)) { String algorithm = key.substring(0, key.length() - ATTR_DIGEST.length()); + validEntry = true; // Check if this algorithm is permitted, skip if false. if (!permittedCheck(key, algorithm)) { @@ -562,13 +569,12 @@ public class SignatureFileVerifier { } } - // If there were only weak algorithms used, throw an exception. - if (weakAlgs) { - String weakAlgorithms = getWeakAlgorithms("-DIGEST-" + - ManifestDigester.MF_MAIN_ATTRS); + // If there were only weak algorithms entries used, throw an exception. + if (validEntry && weakAlgs) { throw new SignatureException("Manifest Main Attribute check " + - "failed (DIGEST-" + ManifestDigester.MF_MAIN_ATTRS + - "). " + "Disabled algorithm(s) used: " + weakAlgorithms); + "failed (" + ATTR_DIGEST + "). " + + "Disabled algorithm(s) used: " + + getWeakAlgorithms(ATTR_DIGEST)); } // this method returns 'true' if either: @@ -593,7 +599,10 @@ public class SignatureFileVerifier { { boolean oneDigestVerified = false; ManifestDigester.Entry mde = md.get(name,block.isOldStyle()); + // If only weak algorithms are used. boolean weakAlgs = true; + // If a "*-DIGEST" entry is found. + boolean validEntry = false; if (mde == null) { throw new SecurityException( @@ -611,6 +620,7 @@ public class SignatureFileVerifier { if (key.toUpperCase(Locale.ENGLISH).endsWith("-DIGEST")) { // 7 is length of "-Digest" String algorithm = key.substring(0, key.length()-7); + validEntry = true; // Check if this algorithm is permitted, skip if false. if (!permittedCheck(key, algorithm)) { @@ -679,12 +689,11 @@ public class SignatureFileVerifier { } } - // If there were only weak algorithms used, throw an exception. - if (weakAlgs) { - String weakAlgorithms = getWeakAlgorithms("DIGEST"); + // If there were only weak algorithms entries used, throw an exception. + if (validEntry && weakAlgs) { throw new SignatureException("Manifest Main Attribute check " + - "failed (DIGEST). " + "Disabled algorithm(s) used: " + - weakAlgorithms); + "failed (DIGEST). Disabled algorithm(s) used: " + + getWeakAlgorithms("DIGEST")); } return oneDigestVerified; From 742dee356f6309b5e94e7db816df929539338ae2 Mon Sep 17 00:00:00 2001 From: Jini George Date: Thu, 23 Feb 2017 12:19:03 +0530 Subject: [PATCH 288/447] 8162504: TestInstanceKlassSize.java and TestInstanceKlassSizeForInterface.java fail on Mac OS Modify TestInstanceKlassSizeForInterface.java to avoid the error prone mechanism of spawning a process and attaching back to the current process. Use LingeredApp instead. Reviewed-by: dsamersoff, sspitsyn --- .../sa/LingeredAppWithInterface.java | 58 ++++++++++++++ .../sa/TestInstanceKlassSizeForInterface.java | 77 ++++++++----------- 2 files changed, 92 insertions(+), 43 deletions(-) create mode 100644 hotspot/test/serviceability/sa/LingeredAppWithInterface.java diff --git a/hotspot/test/serviceability/sa/LingeredAppWithInterface.java b/hotspot/test/serviceability/sa/LingeredAppWithInterface.java new file mode 100644 index 00000000000..4b65bf1f637 --- /dev/null +++ b/hotspot/test/serviceability/sa/LingeredAppWithInterface.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import jdk.test.lib.apps.LingeredApp; + +interface Language { + static final long nbrOfWords = 99999; + public abstract long getNbrOfWords(); +} + +class ParselTongue implements Language { + public long getNbrOfWords() { + return nbrOfWords * 4; + } +} + +public class LingeredAppWithInterface extends LingeredApp { + + public static void main(String args[]) { + ParselTongue lang = new ParselTongue(); + Language muggleSpeak = new Language() { + public long getNbrOfWords() { + return nbrOfWords * 8; + } + }; + + // Not tested at this point. The test needs to be enhanced + // later to test for the sizes of the Lambda MetaFactory + // generated anonymous classes too. (After JDK-8160228 gets + // fixed.) + Runnable r2 = () -> System.out.println("Hello world!"); + r2.run(); + + System.out.println(lang.getNbrOfWords() + muggleSpeak.getNbrOfWords()); + + LingeredApp.main(args); + } +} diff --git a/hotspot/test/serviceability/sa/TestInstanceKlassSizeForInterface.java b/hotspot/test/serviceability/sa/TestInstanceKlassSizeForInterface.java index 5369c761073..d660249ecd2 100644 --- a/hotspot/test/serviceability/sa/TestInstanceKlassSizeForInterface.java +++ b/hotspot/test/serviceability/sa/TestInstanceKlassSizeForInterface.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,11 +21,15 @@ * questions. */ +import java.util.ArrayList; +import java.util.List; + import sun.jvm.hotspot.HotSpotAgent; import sun.jvm.hotspot.utilities.SystemDictionaryHelper; import sun.jvm.hotspot.oops.InstanceKlass; import sun.jvm.hotspot.debugger.*; +import jdk.test.lib.apps.LingeredApp; import jdk.test.lib.JDKToolLauncher; import jdk.test.lib.JDKToolFinder; import jdk.test.lib.Platform; @@ -45,29 +49,20 @@ import jdk.test.lib.Asserts; * @run main/othervm TestInstanceKlassSizeForInterface */ -interface Language { - static final long nbrOfWords = 99999; - public abstract long getNbrOfWords(); -} - -class ParselTongue implements Language { - public long getNbrOfWords() { - return nbrOfWords * 4; - } -} - public class TestInstanceKlassSizeForInterface { - private static void SAInstanceKlassSize(int pid, + private static LingeredAppWithInterface theApp = null; + + private static void SAInstanceKlassSize(int lingeredAppPid, String[] instanceKlassNames) { HotSpotAgent agent = new HotSpotAgent(); try { - agent.attach((int)pid); + agent.attach(lingeredAppPid); } catch (DebuggerException e) { System.out.println(e.getMessage()); - System.err.println("Unable to connect to process ID: " + pid); + System.err.println("Unable to connect to process ID: " + lingeredAppPid); agent.detach(); e.printStackTrace(); @@ -98,11 +93,9 @@ public class TestInstanceKlassSizeForInterface { } private static void createAnotherToAttach( - String[] instanceKlassNames) throws Exception { + String[] instanceKlassNames, + int lingeredAppPid) throws Exception { - ProcessBuilder pb = new ProcessBuilder(); - - // Grab the pid from the current java process and pass it String[] toolArgs = { "--add-modules=jdk.hotspot.agent", "--add-exports=jdk.hotspot.agent/sun.jvm.hotspot=ALL-UNNAMED", @@ -110,23 +103,26 @@ public class TestInstanceKlassSizeForInterface { "--add-exports=jdk.hotspot.agent/sun.jvm.hotspot.oops=ALL-UNNAMED", "--add-exports=jdk.hotspot.agent/sun.jvm.hotspot.debugger=ALL-UNNAMED", "TestInstanceKlassSizeForInterface", - Long.toString(ProcessTools.getProcessId()) + Integer.toString(lingeredAppPid) }; + // Start a new process to attach to the LingeredApp process + ProcessBuilder processBuilder = ProcessTools + .createJavaProcessBuilder(toolArgs); + OutputAnalyzer SAOutput = ProcessTools.executeProcess(processBuilder); + SAOutput.shouldHaveExitValue(0); + System.out.println(SAOutput.getOutput()); + + // Run jcmd on the LingeredApp process + ProcessBuilder pb = new ProcessBuilder(); pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), - Long.toString(ProcessTools.getProcessId()), + Long.toString(lingeredAppPid), "GC.class_stats", "VTab,ITab,OopMap,KlassBytes" } ); - // Start a new process to attach to the current process - ProcessBuilder processBuilder = ProcessTools - .createJavaProcessBuilder(toolArgs); - OutputAnalyzer SAOutput = ProcessTools.executeProcess(processBuilder); - System.out.println(SAOutput.getOutput()); - OutputAnalyzer jcmdOutput = new OutputAnalyzer(pb.start()); System.out.println(jcmdOutput.getOutput()); @@ -153,7 +149,7 @@ public class TestInstanceKlassSizeForInterface { String[] instanceKlassNames = new String[] { "Language", "ParselTongue", - "TestInstanceKlassSizeForInterface$1" + "LingeredAppWithInterface$1" }; if (!Platform.shouldSAAttach()) { @@ -163,22 +159,17 @@ public class TestInstanceKlassSizeForInterface { } if (args == null || args.length == 0) { - ParselTongue lang = new ParselTongue(); + try { + List vmArgs = new ArrayList(); + vmArgs.addAll(Utils.getVmOptions()); - Language ventro = new Language() { - public long getNbrOfWords() { - return nbrOfWords * 8; - } - }; - - // Not tested at this point. The test needs to be enhanced - // later to test for the sizes of the Lambda MetaFactory - // generated anonymous classes too. (After JDK-8160228 gets - // fixed.) - Runnable r2 = () -> System.out.println("Hello world!"); - r2.run(); - - createAnotherToAttach(instanceKlassNames); + theApp = new LingeredAppWithInterface(); + LingeredApp.startApp(vmArgs, theApp); + createAnotherToAttach(instanceKlassNames, + (int)theApp.getPid()); + } finally { + LingeredApp.stopApp(theApp); + } } else { SAInstanceKlassSize(Integer.parseInt(args[0]), instanceKlassNames); } From 5b097b494dac819dc34bc08c8f4a06bc59adca4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rickard=20B=C3=A4ckman?= Date: Thu, 23 Feb 2017 10:08:51 +0100 Subject: [PATCH 289/447] 8175336: [TESTBUG] aot junit tests added by 8169588 are not executed Reviewed-by: kvn --- .../jaotc/test/collect/ClassSearchTest.java | 103 +++++++++++++++--- .../jaotc/test/collect/ClassSourceTest.java | 8 ++ .../jaotc/test/collect/FakeFileSupport.java | 2 + .../jaotc/test/collect/FakeSearchPath.java | 2 + .../jaotc/test/collect/SearchPathTest.java | 13 +++ .../DirectorySourceProviderTest.java | 13 ++- .../collect/jar/JarSourceProviderTest.java | 14 +++ .../module/ModuleSourceProviderTest.java | 62 ++++++++--- 8 files changed, 182 insertions(+), 35 deletions(-) diff --git a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/ClassSearchTest.java b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/ClassSearchTest.java index b212fc3139c..18983b351c6 100644 --- a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/ClassSearchTest.java +++ b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/ClassSearchTest.java @@ -20,10 +20,19 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + +/** + * @test + * @modules jdk.aot/jdk.tools.jaotc + * jdk.aot/jdk.tools.jaotc.collect + * @run junit/othervm jdk.tools.jaotc.test.collect.ClassSearchTest + */ + package jdk.tools.jaotc.test.collect; import jdk.tools.jaotc.LoadedClass; +import jdk.tools.jaotc.collect.*; import org.junit.Assert; import org.junit.Test; @@ -32,45 +41,90 @@ import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.function.BiConsumer; +import java.util.function.BiFunction; public class ClassSearchTest { @Test(expected = InternalError.class) public void itShouldThrowExceptionIfNoProvidersAvailable() { ClassSearch target = new ClassSearch(); SearchPath searchPath = new SearchPath(); - target.search(list("foo"), searchPath); + target.search(list(new SearchFor("foo")), searchPath); } @Test public void itShouldFindAProviderForEachEntry() { Set searched = new HashSet<>(); ClassSearch target = new ClassSearch(); - target.addProvider(new SourceProvider() { - @Override - public ClassSource findSource(String name, SearchPath searchPath) { + target.addProvider(provider("", (name, searchPath) -> { searched.add(name); return new NoopSource(); - } - }); - target.search(list("foo", "bar", "foobar"), null); + })); + target.search(searchForList("foo", "bar", "foobar"), null); Assert.assertEquals(hashset("foo", "bar", "foobar"), searched); } + private SourceProvider provider(String supports, BiFunction fn) { + return new SourceProvider() { + @Override + public ClassSource findSource(String name, SearchPath searchPath) { + return fn.apply(name, searchPath); + } + + @Override + public boolean supports(String type) { + return supports.equals(type); + } + }; + } + @Test - public void itShouldSearchAllProviders() { + public void itShouldOnlySearchSupportedProvidersForKnownType() { Set visited = new HashSet<>(); ClassSearch target = new ClassSearch(); - target.addProvider((name, searchPath) -> { - visited.add("1"); + + target.addProvider(provider("jar", (name, searchPath) -> { + visited.add("jar"); return null; - }); - target.addProvider((name, searchPath) -> { - visited.add("2"); + })); + + target.addProvider(provider("dir", (name, searchPath) -> { + visited.add("dir"); return null; - }); + })); try { - target.search(list("foo"), null); + target.search(list(new SearchFor("some", "dir")), null); + } catch (InternalError e) { + // throws because no provider gives a source + } + + Assert.assertEquals(hashset("dir"), visited); + } + + @Test(expected = InternalError.class) + public void itShouldThrowErrorIfMultipleSourcesAreAvailable() { + ClassSearch target = new ClassSearch(); + target.addProvider(provider("", (name, searchPath) -> consumer -> Assert.fail())); + target.addProvider(provider("", (name, searchPath) -> consumer -> Assert.fail())); + + target.search(searchForList("somethign"), null); + } + + @Test + public void itShouldSearchAllProvidersForUnknownType() { + Set visited = new HashSet<>(); + ClassSearch target = new ClassSearch(); + target.addProvider(provider("", (name, searchPath) -> { + visited.add("1"); + return null; + })); + target.addProvider(provider("", (name, searchPath) -> { + visited.add("2"); + return null; + })); + + try { + target.search(searchForList("foo"), null); } catch (InternalError e) { // throws because no provider gives a source } @@ -84,6 +138,11 @@ public class ClassSearchTest { ClassSearch target = new ClassSearch(); target.addProvider(new SourceProvider() { + @Override + public boolean supports(String type) { + return true; + } + @Override public ClassSource findSource(String name, SearchPath searchPath) { return new ClassSource() { @@ -101,7 +160,7 @@ public class ClassSearchTest { } }); - java.util.List search = target.search(list("/tmp/something"), null); + java.util.List search = target.search(searchForList("/tmp/something"), null); Assert.assertEquals(list(new LoadedClass("foo.Bar", null)), search); } @@ -115,8 +174,16 @@ public class ClassSearchTest { }; ClassSearch target = new ClassSearch(); - target.addProvider((name, searchPath) -> consumer -> consumer.accept("foo.Bar", classLoader)); - target.search(list("foobar"), null); + target.addProvider(provider("", (name, searchPath) -> consumer -> consumer.accept("foo.Bar", classLoader))); + target.search(searchForList("foobar"), null); + } + + private List searchForList(String... entries) { + List list = new ArrayList<>(); + for (String entry : entries) { + list.add(new SearchFor(entry)); + } + return list; } private List list(T... entries) { diff --git a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/ClassSourceTest.java b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/ClassSourceTest.java index 5fad5f57d76..ac9b8c9d12a 100644 --- a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/ClassSourceTest.java +++ b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/ClassSourceTest.java @@ -20,6 +20,14 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + +/** + * @test + * @modules jdk.aot/jdk.tools.jaotc + * jdk.aot/jdk.tools.jaotc.collect + * @run junit/othervm jdk.tools.jaotc.test.collect.ClassSourceTest + */ + package jdk.tools.jaotc.test.collect; import org.junit.Assert; diff --git a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/FakeFileSupport.java b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/FakeFileSupport.java index 178c3d47353..0e9011ac4f3 100644 --- a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/FakeFileSupport.java +++ b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/FakeFileSupport.java @@ -27,6 +27,8 @@ import java.nio.file.Path; import java.util.HashSet; import java.util.Set; +import jdk.tools.jaotc.collect.FileSupport; + public class FakeFileSupport extends FileSupport { private final Set exists = new HashSet<>(); private final Set directories = new HashSet<>(); diff --git a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/FakeSearchPath.java b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/FakeSearchPath.java index 9a7873ccf96..899d89f6228 100644 --- a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/FakeSearchPath.java +++ b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/FakeSearchPath.java @@ -22,6 +22,8 @@ */ package jdk.tools.jaotc.test.collect; +import jdk.tools.jaotc.collect.SearchPath; + import java.nio.file.FileSystem; import java.nio.file.Path; import java.nio.file.Paths; diff --git a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/SearchPathTest.java b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/SearchPathTest.java index 8ceca8dc5cf..f3d3f56051d 100644 --- a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/SearchPathTest.java +++ b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/SearchPathTest.java @@ -20,6 +20,17 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + +/** + * @test + * @modules jdk.aot/jdk.tools.jaotc + * jdk.aot/jdk.tools.jaotc.collect + * + * @build jdk.tools.jaotc.test.collect.Utils + * @build jdk.tools.jaotc.test.collect.FakeFileSupport + * @run junit/othervm jdk.tools.jaotc.test.collect.SearchPathTest + */ + package jdk.tools.jaotc.test.collect; import org.junit.Before; @@ -30,6 +41,8 @@ import java.nio.file.FileSystems; import java.nio.file.Path; import java.nio.file.Paths; +import jdk.tools.jaotc.collect.*; + import static jdk.tools.jaotc.test.collect.Utils.set; import static org.junit.Assert.*; diff --git a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/directory/DirectorySourceProviderTest.java b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/directory/DirectorySourceProviderTest.java index 6608c01ab50..66ed4e234e2 100644 --- a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/directory/DirectorySourceProviderTest.java +++ b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/directory/DirectorySourceProviderTest.java @@ -21,11 +21,22 @@ * questions. */ +/** + * @test + * @modules jdk.aot/jdk.tools.jaotc + * jdk.aot/jdk.tools.jaotc.collect + * jdk.aot/jdk.tools.jaotc.collect.directory + * @compile ../Utils.java + * @compile ../FakeFileSupport.java + * @run junit/othervm jdk.tools.jaotc.test.collect.directory.DirectorySourceProviderTest + */ + package jdk.tools.jaotc.test.collect.directory; import jdk.tools.jaotc.collect.ClassSource; +import jdk.tools.jaotc.collect.directory.DirectorySourceProvider; import jdk.tools.jaotc.test.collect.FakeFileSupport; -import jdk.tools.jaotc.test.collect.FileSupport; +import jdk.tools.jaotc.collect.FileSupport; import org.junit.Assert; import org.junit.Test; diff --git a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/jar/JarSourceProviderTest.java b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/jar/JarSourceProviderTest.java index 14059883538..a6b687fdad4 100644 --- a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/jar/JarSourceProviderTest.java +++ b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/jar/JarSourceProviderTest.java @@ -20,9 +20,23 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + +/** + * @test + * @modules jdk.aot/jdk.tools.jaotc + * jdk.aot/jdk.tools.jaotc.collect + * jdk.aot/jdk.tools.jaotc.collect.jar + * @compile ../Utils.java + * @compile ../FakeFileSupport.java + * @compile ../FakeSearchPath.java + * + * @run junit/othervm jdk.tools.jaotc.test.collect.jar.JarSourceProviderTest + */ + package jdk.tools.jaotc.test.collect.jar; import jdk.tools.jaotc.collect.ClassSource; +import jdk.tools.jaotc.collect.jar.JarSourceProvider; import jdk.tools.jaotc.test.collect.FakeFileSupport; import jdk.tools.jaotc.test.collect.FakeSearchPath; import org.junit.Assert; diff --git a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/module/ModuleSourceProviderTest.java b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/module/ModuleSourceProviderTest.java index 80f06913269..b8a44041b19 100644 --- a/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/module/ModuleSourceProviderTest.java +++ b/hotspot/test/compiler/aot/jdk.tools.jaotc.test/src/jdk/tools/jaotc/test/collect/module/ModuleSourceProviderTest.java @@ -20,15 +20,31 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + +/** + * @test + * @modules jdk.aot/jdk.tools.jaotc + * jdk.aot/jdk.tools.jaotc.collect + * jdk.aot/jdk.tools.jaotc.collect.module + * @compile ../Utils.java + * @run junit/othervm jdk.tools.jaotc.test.collect.module.ModuleSourceProviderTest + */ + package jdk.tools.jaotc.test.collect.module; -import jdk.tools.jaotc.*; -import jdk.tools.jaotc.test.collect.FakeSearchPath; +import jdk.tools.jaotc.collect.FileSupport; +import jdk.tools.jaotc.collect.module.ModuleSource; +import jdk.tools.jaotc.collect.module.ModuleSourceProvider; import jdk.tools.jaotc.test.collect.Utils; import org.junit.Before; import org.junit.Test; +import java.io.IOException; +import java.nio.file.FileSystem; import java.nio.file.FileSystems; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.function.BiFunction; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; @@ -36,28 +52,42 @@ import static org.junit.Assert.assertNull; public class ModuleSourceProviderTest { private ClassLoader classLoader; private ModuleSourceProvider target; + private FileSupport fileSupport; + private BiFunction getSubDirectory = null; @Before public void setUp() { classLoader = new FakeClassLoader(); - target = new ModuleSourceProvider(FileSystems.getDefault(), classLoader); + fileSupport = new FileSupport() { + + @Override + public boolean isDirectory(Path path) { + return true; + } + + @Override + public Path getSubDirectory(FileSystem fileSystem, Path root, Path path) throws IOException { + if (getSubDirectory == null) { + throw new IOException("Nope"); + } + return getSubDirectory.apply(root, path); + } + }; + target = new ModuleSourceProvider(FileSystems.getDefault(), classLoader, fileSupport); } @Test - public void itShouldUseSearchPath() { - FakeSearchPath searchPath = new FakeSearchPath("blah/java.base"); - ModuleSource source = (ModuleSource) target.findSource("java.base", searchPath); - assertEquals(Utils.set("java.base"), searchPath.entries); - assertEquals("blah/java.base", source.getModulePath().toString()); - assertEquals("module:blah/java.base", source.toString()); - } + public void itShouldUseFileSupport() { + getSubDirectory = (root, path) -> { + if (root.toString().equals("modules") && path.toString().equals("test.module")) { + return Paths.get("modules/test.module"); + } + return null; + }; - @Test - public void itShouldReturnNullIfSearchPathReturnsNull() { - FakeSearchPath searchPath = new FakeSearchPath(null); - ModuleSource source = (ModuleSource) target.findSource("jdk.base", searchPath); - assertEquals(Utils.set("jdk.base"), searchPath.entries); - assertNull(source); + ModuleSource source = (ModuleSource) target.findSource("test.module", null); + assertEquals("modules/test.module", source.getModulePath().toString()); + assertEquals("module:modules/test.module", source.toString()); } private static class FakeClassLoader extends ClassLoader { From 918b612417795e7d9e0092a72a2caad3c78f5e62 Mon Sep 17 00:00:00 2001 From: Harsha Wardhana B Date: Thu, 23 Feb 2017 20:35:25 +0530 Subject: [PATCH 290/447] 8173130: SubjectDelegation2Test.java and SubjectDelegation3Test.java failing on solaris Reviewed-by: dfuchs --- .../SubjectDelegation2Test.java | 23 ++++--------------- .../SubjectDelegation3Test.java | 18 +++------------ .../mandatory/subjectDelegation/policy21 | 1 + .../mandatory/subjectDelegation/policy22 | 1 + .../mandatory/subjectDelegation/policy23 | 1 + .../mandatory/subjectDelegation/policy24 | 1 + .../mandatory/subjectDelegation/policy25 | 1 + .../mandatory/subjectDelegation/policy31 | 1 + .../mandatory/subjectDelegation/policy32 | 1 + .../mandatory/subjectDelegation/policy33 | 1 + .../mandatory/subjectDelegation/policy34 | 1 + .../mandatory/subjectDelegation/policy35 | 1 + 12 files changed, 17 insertions(+), 34 deletions(-) diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation2Test.java b/jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation2Test.java index c5553029d6f..4e03de3c107 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation2Test.java +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation2Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -44,7 +44,6 @@ import java.lang.management.ManagementFactory; import java.rmi.RemoteException; import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; -import java.util.Collections; import java.util.HashMap; import java.util.Properties; import javax.management.Attribute; @@ -57,24 +56,11 @@ import javax.management.remote.JMXConnector; import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXConnectorServer; import javax.management.remote.JMXConnectorServerFactory; -import javax.management.remote.JMXPrincipal; import javax.management.remote.JMXServiceURL; -import javax.security.auth.Subject; public class SubjectDelegation2Test { public static void main(String[] args) throws Exception { - // Check for supported operating systems: Solaris - // - // This test runs only on Solaris due to CR 6285916 - // - String osName = System.getProperty("os.name"); - System.out.println("os.name = " + osName); - if (!osName.equals("SunOS")) { - System.out.println("This test runs on Solaris only."); - System.out.println("Bye! Bye!"); - return; - } String policyFile = args[0]; String testResult = args[1]; System.out.println("Policy file = " + policyFile); @@ -137,9 +123,8 @@ public class SubjectDelegation2Test { // Create an RMI connector server // System.out.println("Create an RMI connector server"); - JMXServiceURL url = - new JMXServiceURL("rmi", null, 0, - "/jndi/rmi://:" + port + "/server" + port); + JMXServiceURL url = new JMXServiceURL("rmi", null, 0); + jmxcs = JMXConnectorServerFactory.newJMXConnectorServer(url, env, mbs); jmxcs.start(); @@ -151,7 +136,7 @@ public class SubjectDelegation2Test { // String[] credentials = new String[] { "monitorRole" , "QED" }; cli_env.put("jmx.remote.credentials", credentials); - jmxc = JMXConnectorFactory.connect(url, cli_env); + jmxc = JMXConnectorFactory.connect(jmxcs.getAddress(), cli_env); MBeanServerConnection mbsc = jmxc.getMBeanServerConnection(); // Get domains from MBeanServer // diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation3Test.java b/jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation3Test.java index 27479d1c6db..b999c9ebdf5 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation3Test.java +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation3Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -65,17 +65,6 @@ import javax.security.auth.Subject; public class SubjectDelegation3Test { public static void main(String[] args) throws Exception { - // Check for supported operating systems: Solaris - // - // This test runs only on Solaris due to CR 6285916 - // - String osName = System.getProperty("os.name"); - System.out.println("os.name = " + osName); - if (!osName.equals("SunOS")) { - System.out.println("This test runs on Solaris only."); - System.out.println("Bye! Bye!"); - return; - } String policyFile = args[0]; String testResult = args[1]; System.out.println("Policy file = " + policyFile); @@ -139,8 +128,7 @@ public class SubjectDelegation3Test { // System.out.println("Create an RMI connector server"); JMXServiceURL url = - new JMXServiceURL("rmi", null, 0, - "/jndi/rmi://:" + port + "/server" + port); + new JMXServiceURL("rmi", null, 0); jmxcs = JMXConnectorServerFactory.newJMXConnectorServer(url, env, mbs); jmxcs.start(); @@ -152,7 +140,7 @@ public class SubjectDelegation3Test { // String[] credentials = new String[] { "monitorRole" , "QED" }; cli_env.put("jmx.remote.credentials", credentials); - jmxc = JMXConnectorFactory.connect(url, cli_env); + jmxc = JMXConnectorFactory.connect(jmxcs.getAddress(), cli_env); Subject delegationSubject = new Subject(true, Collections.singleton(new JMXPrincipal("delegate")), diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy21 b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy21 index 4b83e5fb496..5419fa20aec 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy21 +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy21 @@ -2,6 +2,7 @@ grant codebase "file:/-" { permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator"; permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve"; permission java.security.SecurityPermission "createAccessControlContext"; + permission java.lang.RuntimePermission "*"; permission javax.management.MBeanPermission "*", "getDomains"; permission javax.management.MBeanPermission "SimpleStandard#State[MBeans:type=SimpleStandard]", "getAttribute"; permission javax.security.auth.AuthPermission "getSubject"; diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy22 b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy22 index 7db427794b8..87d39c80db9 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy22 +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy22 @@ -1,6 +1,7 @@ grant codebase "file:/-" { permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator"; permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve"; + permission java.lang.RuntimePermission "*"; permission java.security.SecurityPermission "createAccessControlContext"; // permission javax.management.MBeanPermission "*", "getDomains"; permission javax.management.MBeanPermission "SimpleStandard#State[MBeans:type=SimpleStandard]", "getAttribute"; diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy23 b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy23 index 4a92cb56b6c..584cb479d4f 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy23 +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy23 @@ -1,6 +1,7 @@ grant codebase "file:/-" { permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator"; permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve"; + permission java.lang.RuntimePermission "*"; permission java.security.SecurityPermission "createAccessControlContext"; permission javax.management.MBeanPermission "*", "getDomains"; permission javax.management.MBeanPermission "SimpleStandard#State[MBeans:type=SimpleStandard]", "getAttribute"; diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy24 b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy24 index cbb92dff982..ed7f2c9da73 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy24 +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy24 @@ -1,5 +1,6 @@ grant codebase "file:/-" { permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator"; + permission java.lang.RuntimePermission "*"; permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve"; permission java.security.SecurityPermission "createAccessControlContext"; permission javax.management.remote.SubjectDelegationPermission "javax.management.remote.JMXPrincipal.monitorRole"; diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy25 b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy25 index 98b83de4453..9acbd1a2ef6 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy25 +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy25 @@ -1,5 +1,6 @@ grant codebase "file:/-" { permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator"; + permission java.lang.RuntimePermission "*"; permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve"; permission java.security.SecurityPermission "createAccessControlContext"; permission javax.management.remote.SubjectDelegationPermission "javax.management.remote.JMXPrincipal.monitorRole"; diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy31 b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy31 index 70939f579f4..43d28c395bc 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy31 +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy31 @@ -1,6 +1,7 @@ grant codebase "file:/-" { permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator"; permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve"; + permission java.lang.RuntimePermission "*"; permission java.security.SecurityPermission "createAccessControlContext"; permission javax.management.MBeanPermission "*", "getDomains"; permission javax.management.MBeanPermission "SimpleStandard#State[MBeans:type=SimpleStandard]", "getAttribute"; diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy32 b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy32 index 3f5354ec2ff..bc4c7d44c28 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy32 +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy32 @@ -1,6 +1,7 @@ grant codebase "file:/-" { permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator"; permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve"; + permission java.lang.RuntimePermission "*"; permission java.security.SecurityPermission "createAccessControlContext"; // permission javax.management.MBeanPermission "*", "getDomains"; permission javax.management.MBeanPermission "SimpleStandard#State[MBeans:type=SimpleStandard]", "getAttribute"; diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy33 b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy33 index b11df459d5a..9a41f4c58ea 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy33 +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy33 @@ -1,6 +1,7 @@ grant codebase "file:/-" { permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator"; permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve"; + permission java.lang.RuntimePermission "*"; permission java.security.SecurityPermission "createAccessControlContext"; permission javax.management.MBeanPermission "*", "getDomains"; permission javax.management.MBeanPermission "SimpleStandard#State[MBeans:type=SimpleStandard]", "getAttribute"; diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy34 b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy34 index 761444e7a6c..dd935b0f150 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy34 +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy34 @@ -1,5 +1,6 @@ grant codebase "file:/-" { permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator"; + permission java.lang.RuntimePermission "*"; permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve"; permission java.security.SecurityPermission "createAccessControlContext"; permission javax.management.remote.SubjectDelegationPermission "javax.management.remote.JMXPrincipal.monitorRole"; diff --git a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy35 b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy35 index 5aebb6bc888..29b10230e7d 100644 --- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy35 +++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy35 @@ -1,5 +1,6 @@ grant codebase "file:/-" { permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator"; + permission java.lang.RuntimePermission "*"; permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve"; permission java.security.SecurityPermission "createAccessControlContext"; permission javax.management.remote.SubjectDelegationPermission "javax.management.remote.JMXPrincipal.monitorRole"; From 39267bd657b81850a9b18739d1c5c892f5872c96 Mon Sep 17 00:00:00 2001 From: Erik Joelsson Date: Thu, 23 Feb 2017 16:38:37 +0100 Subject: [PATCH 291/447] 8077113: Configure script do not properly detect cross-compilation gcc Reviewed-by: tbell, ihse, gadams --- common/autoconf/generated-configure.sh | 260 ++++++++++++++++++++++--- common/autoconf/toolchain.m4 | 8 +- 2 files changed, 240 insertions(+), 28 deletions(-) diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index acba47d7148..9bca7e8cd28 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -5043,7 +5043,7 @@ TOOLCHAIN_MINIMUM_VERSION_xlc="" # # $1 = compiler to test (CC or CXX) # $2 = human readable name of compiler (C or C++) -# $3 = list of compiler names to search for +# $3 = compiler name to search for # Detect the core components of the toolchain, i.e. the compilers (CC and CXX), @@ -5170,7 +5170,7 @@ VS_SDK_PLATFORM_NAME_2013= #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1486679715 +DATE_WHEN_GENERATED=1487864263 ############################################################################### # @@ -33138,10 +33138,9 @@ done if test -n "$TOOLCHAIN_PATH"; then PATH_save="$PATH" PATH="$TOOLCHAIN_PATH" - for ac_prog in $SEARCH_LIST -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args. +set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then : @@ -33180,20 +33179,73 @@ $as_echo "no" >&6; } fi - test -n "$TOOLCHAIN_PATH_CC" && break +fi +if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then + ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC + # Extract the first word of "$SEARCH_LIST", so it can be a program name with args. +set dummy $SEARCH_LIST; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_TOOLCHAIN_PATH_CC in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC +if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5 +$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then + TOOLCHAIN_PATH_CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC + fi +else + TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC" +fi CC=$TOOLCHAIN_PATH_CC PATH="$PATH_save" fi - # AC_PATH_PROGS can't be run multiple times with the same variable, + # AC_PATH_TOOL can't be run multiple times with the same variable, # so create a new name for this run. if test "x$CC" = x; then - for ac_prog in $SEARCH_LIST -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args. +set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_POTENTIAL_CC+:} false; then : @@ -33232,8 +33284,62 @@ $as_echo "no" >&6; } fi - test -n "$POTENTIAL_CC" && break +fi +if test -z "$ac_cv_path_POTENTIAL_CC"; then + ac_pt_POTENTIAL_CC=$POTENTIAL_CC + # Extract the first word of "$SEARCH_LIST", so it can be a program name with args. +set dummy $SEARCH_LIST; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_POTENTIAL_CC in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC +if test -n "$ac_pt_POTENTIAL_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5 +$as_echo "$ac_pt_POTENTIAL_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_POTENTIAL_CC" = x; then + POTENTIAL_CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + POTENTIAL_CC=$ac_pt_POTENTIAL_CC + fi +else + POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC" +fi CC=$POTENTIAL_CC fi @@ -34439,10 +34545,9 @@ done if test -n "$TOOLCHAIN_PATH"; then PATH_save="$PATH" PATH="$TOOLCHAIN_PATH" - for ac_prog in $SEARCH_LIST -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args. +set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then : @@ -34481,20 +34586,73 @@ $as_echo "no" >&6; } fi - test -n "$TOOLCHAIN_PATH_CXX" && break +fi +if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then + ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX + # Extract the first word of "$SEARCH_LIST", so it can be a program name with args. +set dummy $SEARCH_LIST; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_TOOLCHAIN_PATH_CXX in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX +if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5 +$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then + TOOLCHAIN_PATH_CXX="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX + fi +else + TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX" +fi CXX=$TOOLCHAIN_PATH_CXX PATH="$PATH_save" fi - # AC_PATH_PROGS can't be run multiple times with the same variable, + # AC_PATH_TOOL can't be run multiple times with the same variable, # so create a new name for this run. if test "x$CXX" = x; then - for ac_prog in $SEARCH_LIST -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args. +set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_POTENTIAL_CXX+:} false; then : @@ -34533,8 +34691,62 @@ $as_echo "no" >&6; } fi - test -n "$POTENTIAL_CXX" && break +fi +if test -z "$ac_cv_path_POTENTIAL_CXX"; then + ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX + # Extract the first word of "$SEARCH_LIST", so it can be a program name with args. +set dummy $SEARCH_LIST; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_POTENTIAL_CXX in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX +if test -n "$ac_pt_POTENTIAL_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5 +$as_echo "$ac_pt_POTENTIAL_CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_POTENTIAL_CXX" = x; then + POTENTIAL_CXX="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX + fi +else + POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX" +fi CXX=$POTENTIAL_CXX fi diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4 index 16b0df04b4f..29ebea9ccac 100644 --- a/common/autoconf/toolchain.m4 +++ b/common/autoconf/toolchain.m4 @@ -440,7 +440,7 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION], # # $1 = compiler to test (CC or CXX) # $2 = human readable name of compiler (C or C++) -# $3 = list of compiler names to search for +# $3 = compiler name to search for AC_DEFUN([TOOLCHAIN_FIND_COMPILER], [ COMPILER_NAME=$2 @@ -482,15 +482,15 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER], if test -n "$TOOLCHAIN_PATH"; then PATH_save="$PATH" PATH="$TOOLCHAIN_PATH" - AC_PATH_PROGS(TOOLCHAIN_PATH_$1, $SEARCH_LIST) + AC_PATH_TOOL(TOOLCHAIN_PATH_$1, $SEARCH_LIST) $1=$TOOLCHAIN_PATH_$1 PATH="$PATH_save" fi - # AC_PATH_PROGS can't be run multiple times with the same variable, + # AC_PATH_TOOL can't be run multiple times with the same variable, # so create a new name for this run. if test "x[$]$1" = x; then - AC_PATH_PROGS(POTENTIAL_$1, $SEARCH_LIST) + AC_PATH_TOOL(POTENTIAL_$1, $SEARCH_LIST) $1=$POTENTIAL_$1 fi From 0b406d80a4a3ac81c370cad0862626d3fde202f5 Mon Sep 17 00:00:00 2001 From: Erik Joelsson Date: Thu, 23 Feb 2017 16:39:32 +0100 Subject: [PATCH 292/447] 8175311: Jib sets bad JT_JAVA on linux aarch64 Reviewed-by: tbell --- common/conf/jib-profiles.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/common/conf/jib-profiles.js b/common/conf/jib-profiles.js index ff86de23a31..4354feb3708 100644 --- a/common/conf/jib-profiles.js +++ b/common/conf/jib-profiles.js @@ -401,6 +401,8 @@ var getJibProfilesCommon = function (input, data) { common.boot_jdk_home = input.get("boot_jdk", "home_path") + "/jdk" + common.boot_jdk_subdirpart + (input.build_os == "macosx" ? ".jdk/Contents/Home" : ""); + common.boot_jdk_platform = input.build_os + "-" + + (input.build_cpu == "x86" ? "i586" : input.build_cpu); return common; }; @@ -832,9 +834,6 @@ var getJibProfilesProfiles = function (input, common, data) { */ var getJibProfilesDependencies = function (input, common) { - var boot_jdk_platform = input.build_os + "-" - + (input.build_cpu == "x86" ? "i586" : input.build_cpu); - var devkit_platform_revisions = { linux_x64: "gcc4.9.2-OEL6.4+1.1", macosx_x64: "Xcode6.3-MacOSX10.9+1.0", @@ -853,9 +852,9 @@ var getJibProfilesDependencies = function (input, common) { server: "javare", module: "jdk", revision: common.boot_jdk_revision, - checksum_file: boot_jdk_platform + "/MD5_VALUES", - file: boot_jdk_platform + "/jdk-" + common.boot_jdk_revision - + "-" + boot_jdk_platform + ".tar.gz", + checksum_file: common.boot_jdk_platform + "/MD5_VALUES", + file: common.boot_jdk_platform + "/jdk-" + common.boot_jdk_revision + + "-" + common.boot_jdk_platform + ".tar.gz", configure_args: "--with-boot-jdk=" + common.boot_jdk_home, environment_path: common.boot_jdk_home + "/bin" }, From f889b5119c4b75e928a8aff9f063b27d0ccd1bf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Gr=C3=B6nlund?= Date: Thu, 23 Feb 2017 16:55:59 +0100 Subject: [PATCH 293/447] 8175178: Stack traversal during OSR migration asserts with invalid bci or invalid scope desc on x86 Reviewed-by: dcubed, coleenp --- hotspot/src/cpu/x86/vm/templateTable_x86.cpp | 20 ++++++++------------ hotspot/src/share/vm/runtime/vframe.cpp | 9 +++++---- hotspot/src/share/vm/runtime/vframe.hpp | 10 +++++----- 3 files changed, 18 insertions(+), 21 deletions(-) diff --git a/hotspot/src/cpu/x86/vm/templateTable_x86.cpp b/hotspot/src/cpu/x86/vm/templateTable_x86.cpp index 5f1c935f944..3d2f57f37bc 100644 --- a/hotspot/src/cpu/x86/vm/templateTable_x86.cpp +++ b/hotspot/src/cpu/x86/vm/templateTable_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2210,7 +2210,6 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) { // Out-of-line code to allocate method data oop. __ bind(profile_method); __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::profile_method)); - __ load_unsigned_byte(rbx, Address(rbcp, 0)); // restore target bytecode __ set_method_data_pointer_for_bcp(); __ jmp(dispatch); } @@ -2225,10 +2224,8 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) { CAST_FROM_FN_PTR(address, InterpreterRuntime::frequency_counter_overflow), rdx); - __ load_unsigned_byte(rbx, Address(rbcp, 0)); // restore target bytecode // rax: osr nmethod (osr ok) or NULL (osr not possible) - // rbx: target bytecode // rdx: scratch // r14: locals pointer // r13: bcp @@ -2238,12 +2235,13 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) { __ cmpb(Address(rax, nmethod::state_offset()), nmethod::in_use); __ jcc(Assembler::notEqual, dispatch); - // We have the address of an on stack replacement routine in rax - // We need to prepare to execute the OSR method. First we must - // migrate the locals and monitors off of the stack. + // We have the address of an on stack replacement routine in rax. + // In preparation of invoking it, first we must migrate the locals + // and monitors from off the interpreter frame on the stack. + // Ensure to save the osr nmethod over the migration call, + // it will be preserved in rbx. + __ mov(rbx, rax); - LP64_ONLY(__ mov(r13, rax)); // save the nmethod - NOT_LP64(__ mov(rbx, rax)); // save the nmethod NOT_LP64(__ get_thread(rcx)); call_VM(noreg, CAST_FROM_FN_PTR(address, SharedRuntime::OSR_migration_begin)); @@ -2258,7 +2256,6 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) { const Register retaddr = LP64_ONLY(j_rarg2) NOT_LP64(rdi); const Register sender_sp = LP64_ONLY(j_rarg1) NOT_LP64(rdx); - // pop the interpreter frame __ movptr(sender_sp, Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize)); // get sender sp __ leave(); // remove frame anchor @@ -2274,8 +2271,7 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) { __ push(retaddr); // and begin the OSR nmethod - LP64_ONLY(__ jmp(Address(r13, nmethod::osr_entry_point_offset()))); - NOT_LP64(__ jmp(Address(rbx, nmethod::osr_entry_point_offset()))); + __ jmp(Address(rbx, nmethod::osr_entry_point_offset())); } } } diff --git a/hotspot/src/share/vm/runtime/vframe.cpp b/hotspot/src/share/vm/runtime/vframe.cpp index 7d9a7b39e6e..1759e31dd64 100644 --- a/hotspot/src/share/vm/runtime/vframe.cpp +++ b/hotspot/src/share/vm/runtime/vframe.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -463,14 +463,15 @@ void interpretedVFrame::set_locals(StackValueCollection* values) const { entryVFrame::entryVFrame(const frame* fr, const RegisterMap* reg_map, JavaThread* thread) : externalVFrame(fr, reg_map, thread) {} - -void vframeStreamCommon::found_bad_method_frame() { +#ifdef ASSERT +void vframeStreamCommon::found_bad_method_frame() const { // 6379830 Cut point for an assertion that occasionally fires when // we are using the performance analyzer. // Disable this assert when testing the analyzer with fastdebug. // -XX:SuppressErrorAt=vframe.cpp:XXX (XXX=following line number) - assert(false, "invalid bci or invalid scope desc"); + fatal("invalid bci or invalid scope desc"); } +#endif // top-frame will be skipped vframeStream::vframeStream(JavaThread* thread, frame top_frame, diff --git a/hotspot/src/share/vm/runtime/vframe.hpp b/hotspot/src/share/vm/runtime/vframe.hpp index de7d510fc2d..40c43ad1824 100644 --- a/hotspot/src/share/vm/runtime/vframe.hpp +++ b/hotspot/src/share/vm/runtime/vframe.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -297,14 +297,14 @@ class vframeStreamCommon : StackObj { void fill_from_compiled_frame(int decode_offset); void fill_from_compiled_native_frame(); - void found_bad_method_frame(); - void fill_from_interpreter_frame(); bool fill_from_frame(); // Helper routine for security_get_caller_frame void skip_prefixed_method_and_wrappers(); + DEBUG_ONLY(void found_bad_method_frame() const;) + public: // Constructor vframeStreamCommon(JavaThread* thread) : _reg_map(thread, false) { @@ -407,9 +407,9 @@ inline void vframeStreamCommon::fill_from_compiled_frame(int decode_offset) { nm()->print_code(); nm()->print_pcs(); } + found_bad_method_frame(); #endif // Provide a cheap fallback in product mode. (See comment above.) - found_bad_method_frame(); fill_from_compiled_native_frame(); return; } @@ -523,7 +523,7 @@ inline void vframeStreamCommon::fill_from_interpreter_frame() { // In this scenario, pretend that the interpreter is at the point // of entering the method. if (bci < 0) { - found_bad_method_frame(); + DEBUG_ONLY(found_bad_method_frame();) bci = 0; } _mode = interpreted_mode; From 90b0bff1d67560fc7b6d915652b04f5568710c69 Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 23 Feb 2017 16:21:26 +0000 Subject: [PATCH 294/447] Added tag jdk-9+158 for changeset 35fe9d6f5075 --- .hgtags-top-repo | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags-top-repo b/.hgtags-top-repo index fa1549ee400..8d066154a24 100644 --- a/.hgtags-top-repo +++ b/.hgtags-top-repo @@ -400,3 +400,4 @@ ef056360ddf3977d7d2ddbeb456a4d612d19ea05 jdk-9+152 688a3863c00ebc089ab17ee1fc46272cbbd96815 jdk-9+155 783ec7542cf7154e5d2b87f55bb97d28f81e9ada jdk-9+156 4eb77fb98952dc477a4229575c81d2263a9ce711 jdk-9+157 +a4087bc10a88a43ea3ad0919b5b4af1c86977221 jdk-9+158 From 3714541749d843508eea63fe31bdb2851f81c0db Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 23 Feb 2017 16:21:27 +0000 Subject: [PATCH 295/447] Added tag jdk-9+158 for changeset 1ea025bbd11d --- hotspot/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/hotspot/.hgtags b/hotspot/.hgtags index a7d55906af4..2f6779dec10 100644 --- a/hotspot/.hgtags +++ b/hotspot/.hgtags @@ -560,3 +560,4 @@ a9fdfd55835ef9dccb7f317b07249bd66653b874 jdk-9+154 f3b3d77a1751897413aae43ac340a130b6fa2ae1 jdk-9+155 43139c588ea48b6504e52b6c3dec530b17b1fdb4 jdk-9+156 b2d0a906afd73dcf27f572217eb1be0f196ec16c jdk-9+157 +4e78f30935229f13ce7c43089621cf7169f5abac jdk-9+158 From 943cd78e34b784aa23b25fbdd8221f8cb5da9fa1 Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 23 Feb 2017 16:21:28 +0000 Subject: [PATCH 296/447] Added tag jdk-9+158 for changeset a6f26574de4e --- jaxp/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jaxp/.hgtags b/jaxp/.hgtags index cd6573d791c..d0d9dff4a8e 100644 --- a/jaxp/.hgtags +++ b/jaxp/.hgtags @@ -400,3 +400,4 @@ f85154af719f99a3b4d81b67a8b4c18a650d10f9 jdk-9+150 48fa77af153288b08ba794e1616a7b0685f3b67e jdk-9+155 e930c373aaa4e0e712c9a25ba4b03d473b48c294 jdk-9+156 412df235a8a229469a2cb9e7bb274d43277077d2 jdk-9+157 +60e670a65e07cc309951bd838b484401e6dd7847 jdk-9+158 From 34b5d39926bd96a9a1d2df4020cff967e3e54f27 Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 23 Feb 2017 16:21:29 +0000 Subject: [PATCH 297/447] Added tag jdk-9+158 for changeset 51a9f82cff03 --- jdk/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jdk/.hgtags b/jdk/.hgtags index 1fb4412a479..e1f15b2608a 100644 --- a/jdk/.hgtags +++ b/jdk/.hgtags @@ -400,3 +400,4 @@ c97e7a8b8da062b9070df442f9cf308e10845fb7 jdk-9+154 e170c858888e83d5c0994504599b6ed7a1fb0cfc jdk-9+155 7d64e541a6c04c714bcad4c8b553db912f827cd5 jdk-9+156 fdfa7b2fe9a7db06792eae20f97748f3e85bb83a jdk-9+157 +c476ca73750698fa5654e101af699ee45db38e2a jdk-9+158 From b6f6fce75cdae0ed0969cd3d612e8c92d152993d Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 23 Feb 2017 16:21:29 +0000 Subject: [PATCH 298/447] Added tag jdk-9+158 for changeset 54c25a823b8e --- jaxws/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jaxws/.hgtags b/jaxws/.hgtags index 779500bc653..4eec480bad6 100644 --- a/jaxws/.hgtags +++ b/jaxws/.hgtags @@ -403,3 +403,4 @@ c48b4d4768b1c2b8fe5d1a844ca13732e5dfbe2a jdk-9+151 9b9918656c97724fd89c04a8547043bbd37f5935 jdk-9+155 7c829eba781409b4fe15392639289af1553dcf63 jdk-9+156 b7e70e1e0154e1d2c69f814e03a8800ef8634fe0 jdk-9+157 +e53b322357382209fb553b9a1541ccfd12cbcb6c jdk-9+158 From 20cc823ac0a27aafe8305a1bdf6bffd49d18f2ed Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 23 Feb 2017 16:21:30 +0000 Subject: [PATCH 299/447] Added tag jdk-9+158 for changeset a6dc784b18a8 --- langtools/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/langtools/.hgtags b/langtools/.hgtags index b2a35038943..a7dd6d9c881 100644 --- a/langtools/.hgtags +++ b/langtools/.hgtags @@ -400,3 +400,4 @@ e5a42ddaf633fde14b983f740ae0e7e490741fd1 jdk-9+150 dfcfdb2db85f1bb434209f56ca557ea6f9830aa8 jdk-9+155 6f91e41163bc09e9b3ec72e8d1185f39296ee5d4 jdk-9+156 162b521af7bb097019a8afaa44e1f8069ce274eb jdk-9+157 +4eb737a8d439f49a197e8000de26c6580cb4d57b jdk-9+158 From 6488781b9c63d41e4faa999d97ff278473cfa4ce Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 23 Feb 2017 16:21:31 +0000 Subject: [PATCH 300/447] Added tag jdk-9+158 for changeset 9c62b3b6ed86 --- nashorn/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/nashorn/.hgtags b/nashorn/.hgtags index 4cde035fae8..c8e922d022b 100644 --- a/nashorn/.hgtags +++ b/nashorn/.hgtags @@ -391,3 +391,4 @@ a84b49cfee63716975535abae2865ffef4dd6474 jdk-9+154 f9bb37a817b3cd3b758a60f3c68258a6554eb382 jdk-9+155 d577398d31111be4bdaa08008247cf4242eaea94 jdk-9+156 f6070efba6af0dc003e24ca736426c93e99ee96a jdk-9+157 +13ae2480a4c395026b3aa1739e0f9895dc8b25d9 jdk-9+158 From e341e35276315a5140ddec11a7e659d57328e9a0 Mon Sep 17 00:00:00 2001 From: Claes Redestad Date: Thu, 23 Feb 2017 18:37:51 +0100 Subject: [PATCH 301/447] 8169713: jimage fails with StringIndexOutOfBoundsException when path to the inspected image is an empty string Reviewed-by: jlaskey --- .../share/classes/jdk/tools/jlink/internal/TaskHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java index 2f45403a27c..c8688ec118d 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java @@ -524,7 +524,7 @@ public final class TaskHelper { List rest = collectUnhandled? new ArrayList<>() : null; // process options for (int i = 0; i < args.length; i++) { - if (args[i].charAt(0) == '-') { + if (args[i].startsWith("-")) { String name = args[i]; PluginOption pluginOption = null; Option option = getOption(name); From c7de967bcb7457e1caa94aefd6f26eea538ea223 Mon Sep 17 00:00:00 2001 From: Tobias Hartmann Date: Fri, 24 Feb 2017 11:52:04 +0100 Subject: [PATCH 302/447] 8139906: assert(src->section_index_of(target) == CodeBuffer::SECT_NONE) failed: sanity The card table address used in the g1_post_barrier_slow stub should not be marked as relocatable. Reviewed-by: kvn --- hotspot/src/cpu/arm/vm/c1_Runtime1_arm.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hotspot/src/cpu/arm/vm/c1_Runtime1_arm.cpp b/hotspot/src/cpu/arm/vm/c1_Runtime1_arm.cpp index 9f17c8fc810..5e793e16bd7 100644 --- a/hotspot/src/cpu/arm/vm/c1_Runtime1_arm.cpp +++ b/hotspot/src/cpu/arm/vm/c1_Runtime1_arm.cpp @@ -618,7 +618,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) { Address buffer(Rthread, in_bytes(JavaThread::dirty_card_queue_offset() + DirtyCardQueue::byte_offset_of_buf())); - AddressLiteral cardtable((address)ct->byte_map_base); + AddressLiteral cardtable((address)ct->byte_map_base, relocInfo::none); assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code"); // save at least the registers that need saving if the runtime is called @@ -645,7 +645,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) { // Note: there is a comment in x86 code about not using // ExternalAddress / lea, due to relocation not working // properly for that address. Should be OK for arm, where we - // explicitly specify that 'cartable' has a relocInfo::none + // explicitly specify that 'cardtable' has a relocInfo::none // type. __ lea(r_card_base_1, cardtable); __ add(r_card_addr_0, r_card_base_1, AsmOperand(r_obj_0, lsr, CardTableModRefBS::card_shift)); From 86a9ef8d83ed9b90d365e10a59abaa9f9de2573c Mon Sep 17 00:00:00 2001 From: Doug Simon Date: Fri, 24 Feb 2017 04:32:11 -0800 Subject: [PATCH 303/447] 8175811: [JVMCI] StubRoutines::_multiplyToLen symbol needs to exported Reviewed-by: thartmann --- hotspot/src/share/vm/jvmci/vmStructs_jvmci.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/hotspot/src/share/vm/jvmci/vmStructs_jvmci.cpp b/hotspot/src/share/vm/jvmci/vmStructs_jvmci.cpp index 1cfc1021b39..0ce9816890a 100644 --- a/hotspot/src/share/vm/jvmci/vmStructs_jvmci.cpp +++ b/hotspot/src/share/vm/jvmci/vmStructs_jvmci.cpp @@ -305,6 +305,7 @@ static_field(StubRoutines, _crc32c_table_addr, address) \ static_field(StubRoutines, _updateBytesCRC32C, address) \ static_field(StubRoutines, _updateBytesAdler32, address) \ + static_field(StubRoutines, _multiplyToLen, address) \ static_field(StubRoutines, _squareToLen, address) \ static_field(StubRoutines, _mulAdd, address) \ static_field(StubRoutines, _montgomeryMultiply, address) \ From 4145e90718bf59004fd8cc6904e0dfd2c5254034 Mon Sep 17 00:00:00 2001 From: Erik Helin Date: Thu, 23 Feb 2017 18:57:10 +0100 Subject: [PATCH 304/447] 8168914: Crash in ClassLoaderData/JNIHandleBlock::oops_do during concurrent marking Reviewed-by: dholmes, tschatzl, coleenp, kbarrett, eosterlund, stefank --- .../share/vm/classfile/classLoaderData.cpp | 100 ++++++++++++++---- .../share/vm/classfile/classLoaderData.hpp | 40 +++++-- .../src/share/vm/classfile/moduleEntry.cpp | 8 +- 3 files changed, 115 insertions(+), 33 deletions(-) diff --git a/hotspot/src/share/vm/classfile/classLoaderData.cpp b/hotspot/src/share/vm/classfile/classLoaderData.cpp index d1e37d82761..c7b26613d07 100644 --- a/hotspot/src/share/vm/classfile/classLoaderData.cpp +++ b/hotspot/src/share/vm/classfile/classLoaderData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -93,7 +93,7 @@ ClassLoaderData::ClassLoaderData(Handle h_class_loader, bool is_anonymous, Depen _keep_alive((is_anonymous || h_class_loader.is_null()) ? 1 : 0), _metaspace(NULL), _unloading(false), _klasses(NULL), _modules(NULL), _packages(NULL), - _claimed(0), _jmethod_ids(NULL), _handles(NULL), _deallocate_list(NULL), + _claimed(0), _jmethod_ids(NULL), _handles(), _deallocate_list(NULL), _next(NULL), _dependencies(dependencies), _metaspace_lock(new Mutex(Monitor::leaf+1, "Metaspace allocation lock", true, Monitor::_safepoint_check_never)) { @@ -112,6 +112,76 @@ void ClassLoaderData::Dependencies::init(TRAPS) { _list_head = oopFactory::new_objectArray(2, CHECK); } +ClassLoaderData::ChunkedHandleList::~ChunkedHandleList() { + Chunk* c = _head; + while (c != NULL) { + Chunk* next = c->_next; + delete c; + c = next; + } +} + +oop* ClassLoaderData::ChunkedHandleList::add(oop o) { + if (_head == NULL || _head->_size == Chunk::CAPACITY) { + Chunk* next = new Chunk(_head); + OrderAccess::release_store_ptr(&_head, next); + } + oop* handle = &_head->_data[_head->_size]; + *handle = o; + OrderAccess::release_store(&_head->_size, _head->_size + 1); + return handle; +} + +inline void ClassLoaderData::ChunkedHandleList::oops_do_chunk(OopClosure* f, Chunk* c, const juint size) { + for (juint i = 0; i < size; i++) { + if (c->_data[i] != NULL) { + f->do_oop(&c->_data[i]); + } + } +} + +void ClassLoaderData::ChunkedHandleList::oops_do(OopClosure* f) { + Chunk* head = (Chunk*) OrderAccess::load_ptr_acquire(&_head); + if (head != NULL) { + // Must be careful when reading size of head + oops_do_chunk(f, head, OrderAccess::load_acquire(&head->_size)); + for (Chunk* c = head->_next; c != NULL; c = c->_next) { + oops_do_chunk(f, c, c->_size); + } + } +} + +#ifdef ASSERT +class VerifyContainsOopClosure : public OopClosure { + oop* _target; + bool _found; + + public: + VerifyContainsOopClosure(oop* target) : _target(target), _found(false) {} + + void do_oop(oop* p) { + if (p == _target) { + _found = true; + } + } + + void do_oop(narrowOop* p) { + // The ChunkedHandleList should not contain any narrowOop + ShouldNotReachHere(); + } + + bool found() const { + return _found; + } +}; + +bool ClassLoaderData::ChunkedHandleList::contains(oop* p) { + VerifyContainsOopClosure cl(p); + oops_do(&cl); + return cl.found(); +} +#endif + bool ClassLoaderData::claim() { if (_claimed == 1) { return false; @@ -146,9 +216,9 @@ void ClassLoaderData::oops_do(OopClosure* f, KlassClosure* klass_closure, bool m f->do_oop(&_class_loader); _dependencies.oops_do(f); - if (_handles != NULL) { - _handles->oops_do(f); - } + + _handles.oops_do(f); + if (klass_closure != NULL) { classes_do(klass_closure); } @@ -484,12 +554,6 @@ ClassLoaderData::~ClassLoaderData() { _metaspace = NULL; delete m; } - // release the handles - if (_handles != NULL) { - JNIHandleBlock::release_block(_handles); - _handles = NULL; - } - // Clear all the JNI handles for methods // These aren't deallocated and are going to look like a leak, but that's // needed because we can't really get rid of jmethodIDs because we don't @@ -563,19 +627,14 @@ Metaspace* ClassLoaderData::metaspace_non_null() { return metaspace; } -JNIHandleBlock* ClassLoaderData::handles() const { return _handles; } -void ClassLoaderData::set_handles(JNIHandleBlock* handles) { _handles = handles; } - jobject ClassLoaderData::add_handle(Handle h) { MutexLockerEx ml(metaspace_lock(), Mutex::_no_safepoint_check_flag); - if (handles() == NULL) { - set_handles(JNIHandleBlock::allocate_block()); - } - return handles()->allocate_handle(h()); + return (jobject) _handles.add(h()); } -void ClassLoaderData::remove_handle(jobject h) { - _handles->release_handle(h); +void ClassLoaderData::remove_handle_unsafe(jobject h) { + assert(_handles.contains((oop*) h), "Got unexpected handle " PTR_FORMAT, p2i((oop*) h)); + *((oop*) h) = NULL; } // Add this metadata pointer to be freed when it's safe. This is only during @@ -645,7 +704,6 @@ void ClassLoaderData::dump(outputStream * const out) { p2i(class_loader() != NULL ? class_loader()->klass() : NULL), loader_name()); if (claimed()) out->print(" claimed "); if (is_unloading()) out->print(" unloading "); - out->print(" handles " INTPTR_FORMAT, p2i(handles())); out->cr(); if (metaspace_or_null() != NULL) { out->print_cr("metaspace: " INTPTR_FORMAT, p2i(metaspace_or_null())); diff --git a/hotspot/src/share/vm/classfile/classLoaderData.hpp b/hotspot/src/share/vm/classfile/classLoaderData.hpp index 8c8df5187a7..3c0aba64992 100644 --- a/hotspot/src/share/vm/classfile/classLoaderData.hpp +++ b/hotspot/src/share/vm/classfile/classLoaderData.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -52,7 +52,6 @@ class ClassLoaderData; class JNIMethodBlock; -class JNIHandleBlock; class Metadebug; class ModuleEntry; class PackageEntry; @@ -160,6 +159,34 @@ class ClassLoaderData : public CHeapObj { void oops_do(OopClosure* f); }; + class ChunkedHandleList VALUE_OBJ_CLASS_SPEC { + struct Chunk : public CHeapObj { + static const size_t CAPACITY = 32; + + oop _data[CAPACITY]; + volatile juint _size; + Chunk* _next; + + Chunk(Chunk* c) : _next(c), _size(0) { } + }; + + Chunk* _head; + + void oops_do_chunk(OopClosure* f, Chunk* c, const juint size); + + public: + ChunkedHandleList() : _head(NULL) {} + ~ChunkedHandleList(); + + // Only one thread at a time can add, guarded by ClassLoaderData::metaspace_lock(). + // However, multiple threads can execute oops_do concurrently with add. + oop* add(oop o); +#ifdef ASSERT + bool contains(oop* p); +#endif + void oops_do(OopClosure* f); + }; + friend class ClassLoaderDataGraph; friend class ClassLoaderDataGraphKlassIteratorAtomic; friend class ClassLoaderDataGraphMetaspaceIterator; @@ -185,8 +212,8 @@ class ClassLoaderData : public CHeapObj { volatile int _claimed; // true if claimed, for example during GC traces. // To avoid applying oop closure more than once. // Has to be an int because we cas it. - JNIHandleBlock* _handles; // Handles to constant pool arrays, Modules, etc, which - // have the same life cycle of the corresponding ClassLoader. + ChunkedHandleList _handles; // Handles to constant pool arrays, Modules, etc, which + // have the same life cycle of the corresponding ClassLoader. Klass* volatile _klasses; // The classes defined by the class loader. PackageEntryTable* volatile _packages; // The packages defined by the class loader. @@ -217,9 +244,6 @@ class ClassLoaderData : public CHeapObj { ClassLoaderData(Handle h_class_loader, bool is_anonymous, Dependencies dependencies); ~ClassLoaderData(); - JNIHandleBlock* handles() const; - void set_handles(JNIHandleBlock* handles); - // GC interface. void clear_claimed() { _claimed = 0; } bool claimed() const { return _claimed == 1; } @@ -312,7 +336,7 @@ class ClassLoaderData : public CHeapObj { const char* loader_name(); jobject add_handle(Handle h); - void remove_handle(jobject h); + void remove_handle_unsafe(jobject h); void add_class(Klass* k, bool publicize = true); void remove_class(Klass* k); bool contains_klass(Klass* k); diff --git a/hotspot/src/share/vm/classfile/moduleEntry.cpp b/hotspot/src/share/vm/classfile/moduleEntry.cpp index 9402f5d91e1..42384cbacd2 100644 --- a/hotspot/src/share/vm/classfile/moduleEntry.cpp +++ b/hotspot/src/share/vm/classfile/moduleEntry.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -87,11 +87,11 @@ Handle ModuleEntry::shared_protection_domain() { // Set the shared ProtectionDomain atomically void ModuleEntry::set_shared_protection_domain(ClassLoaderData *loader_data, Handle pd_h) { - // Create a JNI handle for the shared ProtectionDomain and save it atomically. - // If someone beats us setting the _pd cache, the created JNI handle is destroyed. + // Create a handle for the shared ProtectionDomain and save it atomically. + // If someone beats us setting the _pd cache, the created handle is destroyed. jobject obj = loader_data->add_handle(pd_h); if (Atomic::cmpxchg_ptr(obj, &_pd, NULL) != NULL) { - loader_data->remove_handle(obj); + loader_data->remove_handle_unsafe(obj); } } From ee9cc8cd7ea8dc48162f5c9bc79be748bd24ab31 Mon Sep 17 00:00:00 2001 From: Paul Sandoz Date: Thu, 23 Feb 2017 13:09:54 -0800 Subject: [PATCH 305/447] 8175360: Error in Collectors.averagingXXX Java Doc Reviewed-by: shade --- .../classes/java/util/stream/Collectors.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/util/stream/Collectors.java b/jdk/src/java.base/share/classes/java/util/stream/Collectors.java index 17c743a9064..02f9ada39c0 100644 --- a/jdk/src/java.base/share/classes/java/util/stream/Collectors.java +++ b/jdk/src/java.base/share/classes/java/util/stream/Collectors.java @@ -720,8 +720,9 @@ public final class Collectors { * the result is 0. * * @param the type of the input elements - * @param mapper a function extracting the property to be summed - * @return a {@code Collector} that produces the sum of a derived property + * @param mapper a function extracting the property to be averaged + * @return a {@code Collector} that produces the arithmetic mean of a + * derived property */ public static Collector averagingInt(ToIntFunction mapper) { @@ -738,8 +739,9 @@ public final class Collectors { * the result is 0. * * @param the type of the input elements - * @param mapper a function extracting the property to be summed - * @return a {@code Collector} that produces the sum of a derived property + * @param mapper a function extracting the property to be averaged + * @return a {@code Collector} that produces the arithmetic mean of a + * derived property */ public static Collector averagingLong(ToLongFunction mapper) { @@ -769,8 +771,9 @@ public final class Collectors { * 253, leading to additional numerical errors. * * @param the type of the input elements - * @param mapper a function extracting the property to be summed - * @return a {@code Collector} that produces the sum of a derived property + * @param mapper a function extracting the property to be averaged + * @return a {@code Collector} that produces the arithmetic mean of a + * derived property */ public static Collector averagingDouble(ToDoubleFunction mapper) { From f6a360f3d5c6f3521fee2726cc309fa2f9f361d3 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Thu, 23 Feb 2017 13:28:55 -0800 Subject: [PATCH 306/447] 8175786: Fix small doc issues Reviewed-by: jjg, jlahoda --- .../share/classes/javax/lang/model/element/TypeElement.java | 5 +++-- .../lang/model/util/AbstractAnnotationValueVisitor6.java | 4 ++-- .../javax/lang/model/util/AbstractElementVisitor6.java | 2 +- .../processing/model/util/types/TestPseudoTypeHandling.java | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/element/TypeElement.java b/langtools/src/java.compiler/share/classes/javax/lang/model/element/TypeElement.java index 73bcf1d8419..de9ca371238 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/element/TypeElement.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/element/TypeElement.java @@ -75,8 +75,9 @@ public interface TypeElement extends Element, Parameterizable, QualifiedNameable * originating source of information about the type. For example, * if the information about the type is originating from a source * file, the elements will be returned in source code order. - * (However, in that case the the ordering of elements, such as a - * default constructor, is not specified.) + * (However, in that case the the ordering of {@linkplain + * Elements.Origin#MANDATED implicitly declared} elements, such as + * default constructors, is not specified.) * * @return the enclosed elements in proper order, or an empty list if none * diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java b/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java index 46cc2707f3e..c8e5350e289 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java @@ -79,9 +79,9 @@ public abstract class AbstractAnnotationValueVisitor6 protected AbstractAnnotationValueVisitor6() {} /** - * Visits an annotation value as if by passing itself to that + * Visits any annotation value as if by passing itself to that * value's {@link AnnotationValue#accept accept}. The invocation - * {@code v.visit(av)} is equivalent to {@code av.accept(v, p)}. + * {@code v.visit(av, p)} is equivalent to {@code av.accept(v, p)}. * @param av {@inheritDoc} * @param p {@inheritDoc} */ diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java b/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java index e2f076975c2..adf937384b5 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java @@ -81,7 +81,7 @@ public abstract class AbstractElementVisitor6 implements ElementVisitor Date: Fri, 24 Feb 2017 14:59:39 +0530 Subject: [PATCH 307/447] 7132577: javax/management/monitor/MultiMonitorTest.java fails in JDK8-B22 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changed test’s own timeout mechanism to jtreg’s default timeout Reviewed-by: dholmes, egahlin --- .../management/monitor/MultiMonitorTest.java | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/jdk/test/javax/management/monitor/MultiMonitorTest.java b/jdk/test/javax/management/monitor/MultiMonitorTest.java index 9ec7e51734d..c8164d283b3 100644 --- a/jdk/test/javax/management/monitor/MultiMonitorTest.java +++ b/jdk/test/javax/management/monitor/MultiMonitorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -116,6 +116,7 @@ public class MultiMonitorTest { // A couple of granularity periods to detect bad behaviour Thread.sleep(2); + System.out.println("Checking for all listeners to be 0"); if (!listenersAreAll(0, listeners)) { System.out.println("TEST FAILED: listeners not all 0"); System.exit(1); @@ -124,20 +125,18 @@ public class MultiMonitorTest { for (int i = 0; i < 3; i++) proxies[i].start(); - long startTime = System.currentTimeMillis(); - while (!listenersAreAll(N, listeners) - && System.currentTimeMillis() < startTime + 5000) - Thread.sleep(1); + System.out.println("Waiting for listeners to all : " + N); + int iterations = 0; + while (!listenersAreAll(N, listeners)) { + Thread.sleep(500); - // More time for bad behaviour - Thread.sleep(1000); - - if (!listenersAreAll(N, listeners)) { - System.out.print("TEST FAILED: listener counts wrong:"); - for (int i = 0; i < listeners.length; i++) - System.out.print(" " + listeners[i].getCount()); - System.out.println(); - System.exit(1); + if (++iterations == 10) { + for (int i = 0; i < listeners.length; i++) { + System.out.print(" " + listeners[i].getCount()); + } + System.out.println(); + iterations = 0; + } } for (int i = 0; i < 3; i++) { From 54b4e49ec2c7dfa758d1d349ec7b15480de5653e Mon Sep 17 00:00:00 2001 From: Rahul Singh Date: Fri, 24 Feb 2017 15:30:14 +0530 Subject: [PATCH 308/447] 6753165: java/awt/TextField/DisabledUndoTest/DisabledUndoTest.html context menu can't be invoked on textfield Reviewed-by: serb, arapte --- .../DisabledUndoTest/DisabledUndoTest.java | 266 ++++++++++++++++++ 1 file changed, 266 insertions(+) create mode 100644 jdk/test/java/awt/TextField/DisabledUndoTest/DisabledUndoTest.java diff --git a/jdk/test/java/awt/TextField/DisabledUndoTest/DisabledUndoTest.java b/jdk/test/java/awt/TextField/DisabledUndoTest/DisabledUndoTest.java new file mode 100644 index 00000000000..db1a1f2cff4 --- /dev/null +++ b/jdk/test/java/awt/TextField/DisabledUndoTest/DisabledUndoTest.java @@ -0,0 +1,266 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + + /* + * @test + * @key headful + * @bug 4302718 6753165 + * @summary verifies that undo does not work in a disabled TextField on windows + * @requires (os.family == "windows") + * @run main/manual DisabledUndoTest + */ +import java.awt.Button; +import java.awt.Dialog; +import java.awt.Frame; +import java.awt.Panel; +import java.awt.TextArea; +import java.awt.TextField; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +public class DisabledUndoTest { + + private static void init() throws Exception { + String[] instructions + = { + "1.Type a few symbols in the textfield.", + "2.Then click the button Disable textfield to disable the textfield.", + "3.Right-click on the textfield to invoke context menu and select \"Undo\".", + "4.Verify that the symbols you typed are NOT undone.", + "5.If they are not, press Pass, else press Fail." + }; + + Sysout.createDialog(); + Sysout.printInstructions(instructions); + } + + static Frame mainFrame; + static Button bt; + static TextField tf; + static Panel p1; + + public static void initTestWindow() { + mainFrame = new Frame(); + p1 = new Panel(); + mainFrame.setTitle("TestWindow"); + mainFrame.setBounds(700, 10, 400, 100); + + tf = new TextField(20); + tf.select(0, 10); + bt = new Button("Disable textfield"); + p1.add(tf); + p1.add(bt); + mainFrame.add(p1); + bt.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent ae) { + tf.setEditable(false); + } + }); + mainFrame.setVisible(true); + } + + public static void dispose() { + Sysout.dispose(); + mainFrame.dispose(); + } + + /** + * *************************************************** + * Standard Test Machinery Section DO NOT modify anything in this section -- + * it's a standard chunk of code which has all of the synchronisation + * necessary for the test harness. By keeping it the same in all tests, it + * is easier to read and understand someone else's test, as well as insuring + * that all tests behave correctly with the test harness. There is a section + * following this for test-defined classes + * **************************************************** + */ + private static boolean theTestPassed = false; + private static boolean testGeneratedInterrupt = false; + private static String failureMessage = ""; + private static Thread mainThread = null; + final private static int sleepTime = 300000; + + public static void main(String args[]) throws Exception { + mainThread = Thread.currentThread(); + try { + init(); + initTestWindow(); + } catch (Exception e) { + e.printStackTrace(); + } + try { + mainThread.sleep(sleepTime); + } catch (InterruptedException e) { + dispose(); + if (testGeneratedInterrupt && !theTestPassed) { + throw new Exception(failureMessage); + } + } + if (!testGeneratedInterrupt) { + dispose(); + throw new RuntimeException("Timed out after " + sleepTime / 1000 + + " seconds"); + } + } + + public static synchronized void pass() { + theTestPassed = true; + testGeneratedInterrupt = true; + mainThread.interrupt(); + } + + public static synchronized void fail(String whyFailed) { + theTestPassed = false; + testGeneratedInterrupt = true; + failureMessage = whyFailed; + mainThread.interrupt(); + } +} + +// *********** End Standard Test Machinery Section ********** +/** + * ************************************************** + * Standard Test Machinery DO NOT modify anything below -- it's a standard chunk + * of code whose purpose is to make user interaction uniform, and thereby make + * it simpler to read and understand someone else's test. + * ************************************************** + */ +/** + * This is part of the standard test machinery. It creates a dialog (with the + * instructions), and is the interface for sending text messages to the user. To + * print the instructions, send an array of strings to Sysout.createDialog + * WithInstructions method. Put one line of instructions per array entry. To + * display a message for the tester to see, simply call Sysout.println with the + * string to be displayed. This mimics System.out.println but works within the + * test harness as well as standalone. + */ +class Sysout { + + private static TestDialog dialog; + private static Frame frame; + + public static void createDialog() { + frame = new Frame(); + dialog = new TestDialog(frame, "Instructions"); + String[] defInstr = {"Instructions will appear here. ", ""}; + dialog.printInstructions(defInstr); + dialog.show(); + println("Any messages for the tester will display here."); + } + + public static void printInstructions(String[] instructions) { + dialog.printInstructions(instructions); + } + + public static void println(String messageIn) { + dialog.displayMessage(messageIn); + } + + public static void dispose() { + dialog.dispose(); + frame.dispose(); + } +} + +/** + * This is part of the standard test machinery. It provides a place for the test + * instructions to be displayed, and a place for interactive messages to the + * user to be displayed. To have the test instructions displayed, see Sysout. To + * have a message to the user be displayed, see Sysout. Do not call anything in + * this dialog directly. + */ +class TestDialog extends Dialog implements ActionListener { + + TextArea instructionsText; + TextArea messageText; + int maxStringLength = 80; + Panel buttonP; + Button failB; + Button passB; + + // DO NOT call this directly, go through Sysout + public TestDialog(Frame frame, String name) { + super(frame, name); + int scrollBoth = TextArea.SCROLLBARS_BOTH; + instructionsText = new TextArea("", 15, maxStringLength, scrollBoth); + add("North", instructionsText); + + messageText = new TextArea("", 5, maxStringLength, scrollBoth); + add("Center", messageText); + + buttonP = new Panel(); + failB = new Button("Fail"); + failB.setActionCommand("fail"); + failB.addActionListener(this); + passB = new Button("Pass"); + buttonP.add(passB); + buttonP.add(failB); + passB.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent ae) { + DisabledUndoTest.pass(); + } + }); + + add("South", buttonP); + pack(); + setVisible(true); + } + + // DO NOT call this directly, go through Sysout + public void printInstructions(String[] instructions) { + instructionsText.setText(""); + String printStr, remainingStr; + for (int i = 0; i < instructions.length; i++) { + remainingStr = instructions[i]; + while (remainingStr.length() > 0) { + if (remainingStr.length() >= maxStringLength) { + int posOfSpace = remainingStr. + lastIndexOf(' ', maxStringLength - 1); + + if (posOfSpace <= 0) { + posOfSpace = maxStringLength - 1; + } + + printStr = remainingStr.substring(0, posOfSpace + 1); + remainingStr = remainingStr.substring(posOfSpace + 1); + } else { + printStr = remainingStr; + remainingStr = ""; + } + instructionsText.append(printStr + "\n"); + } + } + } + + public void displayMessage(String messageIn) { + messageText.append(messageIn + "\n"); + } + + public void actionPerformed(ActionEvent e) { + if (e.getActionCommand() == "fail") { + DisabledUndoTest.fail("User Clicked Fail"); + } + } +} From 5ae76b50849c5895ea0450148d0c3b2c4246152b Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Fri, 24 Feb 2017 10:37:30 +0000 Subject: [PATCH 309/447] 8175261: Per-protocol cache setting not working for JAR URLConnection Reviewed-by: dfuchs, michaelm --- .../www/protocol/jar/JarURLConnection.java | 3 + .../URLConnection/SetDefaultUseCaches.java | 101 +++++++++++++----- 2 files changed, 78 insertions(+), 26 deletions(-) diff --git a/jdk/src/java.base/share/classes/sun/net/www/protocol/jar/JarURLConnection.java b/jdk/src/java.base/share/classes/sun/net/www/protocol/jar/JarURLConnection.java index fb12cf77626..5cb3e999a71 100644 --- a/jdk/src/java.base/share/classes/sun/net/www/protocol/jar/JarURLConnection.java +++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/jar/JarURLConnection.java @@ -82,6 +82,9 @@ public class JarURLConnection extends java.net.JarURLConnection { jarFileURL = getJarFileURL(); jarFileURLConnection = jarFileURL.openConnection(); + // whether, or not, the embedded URL should use the cache will depend + // on this instance's cache value + jarFileURLConnection.setUseCaches(useCaches); entryName = getEntryName(); } diff --git a/jdk/test/java/net/URLConnection/SetDefaultUseCaches.java b/jdk/test/java/net/URLConnection/SetDefaultUseCaches.java index 2c12889d23d..73c822ac2c9 100644 --- a/jdk/test/java/net/URLConnection/SetDefaultUseCaches.java +++ b/jdk/test/java/net/URLConnection/SetDefaultUseCaches.java @@ -22,46 +22,95 @@ */ /* @test - * @bug 8163449 + * @bug 8163449 8175261 * @summary Allow per protocol setting for URLConnection defaultUseCaches - * @run main/othervm SetDefaultUseCaches + * @run testng/othervm SetDefaultUseCaches */ -import java.net.*; -import java.io.*; +import java.io.IOException; +import java.io.UncheckedIOException; +import java.net.URL; +import java.net.URLConnection; +import org.testng.annotations.Test; +import static org.testng.Assert.*; public class SetDefaultUseCaches { - static void testAssert(boolean value, boolean comparator) { - if (value != comparator) { - System.err.println("Expected " + comparator + " Got " + value); - throw new RuntimeException("Test failed:"); - } else - System.err.println("OK"); + + final URL fileURL = uncheckURL("file:///a/b.txt"); + final URL httpURL = uncheckURL("http://www.foo.com/"); + final URL jarFileURL = uncheckURL("jar:file:///a/b.jar!/anEntry"); + final URL jarHttpURL = uncheckURL("jar:http://www.foo.com/a/b.jar!/anEntry"); + + @Test + public void test() throws Exception { + // check JAR both before and after other protocol tests as JAR URLs + // effectively wrap/embed other URLs. The syntax is jar:!/{entry} + checkJAR(true); + checkJAR(false); + checkJAR(true); + + checkHTTP(); + checkFile(); + + // ensure that JAR URLs still respect their per-protocol value + checkJAR(false); + checkJAR(true); + checkJAR(false); } - public static void main(String s[]) throws Exception { - URL url = new URL("http://www.foo.com/"); - URL url1 = new URL("file:///a/b.txt"); - + void checkHTTP() throws IOException { // check default default is true - URLConnection urlc = url.openConnection(); - testAssert(urlc.getDefaultUseCaches(), true); + URLConnection httpURLConn = httpURL.openConnection(); + assertTrue(httpURLConn.getDefaultUseCaches()); // set default for http to false and check URLConnection.setDefaultUseCaches("HTTP", false); - urlc = url.openConnection(); - testAssert(urlc.getDefaultUseCaches(), true); - testAssert(urlc.getUseCaches(), false); - testAssert(URLConnection.getDefaultUseCaches("http"), false); + httpURLConn = httpURL.openConnection(); + assertTrue(httpURLConn.getDefaultUseCaches()); + assertFalse(httpURLConn.getUseCaches()); + assertFalse(URLConnection.getDefaultUseCaches("http")); + } - URLConnection urlc1 = url1.openConnection(); - testAssert(urlc1.getDefaultUseCaches(), true); + void checkFile() throws IOException { + URLConnection fileURLConn = fileURL.openConnection(); + assertTrue(fileURLConn.getDefaultUseCaches()); // set default default to false and check other values the same - urlc.setDefaultUseCaches(false); - urlc1.setDefaultUseCaches("fiLe", true); - testAssert(urlc1.getDefaultUseCaches(), false); - testAssert(URLConnection.getDefaultUseCaches("fiLE"), true); + fileURLConn.setDefaultUseCaches(false); + fileURLConn.setDefaultUseCaches("fiLe", true); + assertFalse(fileURLConn.getDefaultUseCaches()); + assertTrue(URLConnection.getDefaultUseCaches("fiLE")); + } + + void checkJAR(boolean defaultValue) throws IOException { + URLConnection.setDefaultUseCaches("JAR", defaultValue); + assertEquals(URLConnection.getDefaultUseCaches("JAr"), defaultValue); + + URLConnection jarFileURLConn = jarFileURL.openConnection(); + URLConnection jarHttpURLConn = jarHttpURL.openConnection(); + assertEquals(jarFileURLConn.getUseCaches(), defaultValue); + assertEquals(jarHttpURLConn.getUseCaches(), defaultValue); + jarFileURLConn.setUseCaches(!defaultValue); + jarHttpURLConn.setUseCaches(!defaultValue); + assertEquals(jarFileURLConn.getUseCaches(), !defaultValue); + assertEquals(jarHttpURLConn.getUseCaches(), !defaultValue); + + URLConnection.setDefaultUseCaches("JaR", !defaultValue); // case-insensitive + assertEquals(URLConnection.getDefaultUseCaches("jAR"), !defaultValue); + + jarFileURLConn = jarFileURL.openConnection(); + jarHttpURLConn = jarHttpURL.openConnection(); + assertEquals(jarFileURLConn.getUseCaches(), !defaultValue); + assertEquals(jarHttpURLConn.getUseCaches(), !defaultValue); + jarFileURLConn.setUseCaches(defaultValue); + jarHttpURLConn.setUseCaches(defaultValue); + assertEquals(jarFileURLConn.getUseCaches(), defaultValue); + assertEquals(jarHttpURLConn.getUseCaches(), defaultValue); + } + + static URL uncheckURL(String url) { + try { return new URL(url); } + catch (IOException e) { throw new UncheckedIOException(e); } } } From 8ebfe2c58b25e8bdb0636da359aa5fe2a226a65b Mon Sep 17 00:00:00 2001 From: Pavel Rappo Date: Fri, 24 Feb 2017 11:33:33 +0000 Subject: [PATCH 310/447] 8175305: Typos in net.properties Reviewed-by: bpb --- jdk/src/java.base/share/conf/net.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/src/java.base/share/conf/net.properties b/jdk/src/java.base/share/conf/net.properties index b490e174a3f..ac94b30f119 100644 --- a/jdk/src/java.base/share/conf/net.properties +++ b/jdk/src/java.base/share/conf/net.properties @@ -3,7 +3,7 @@ # # This file may contain default values for the networking system properties. # These values are only used when the system properties are not specified -# on the command line or set programatically. +# on the command line or set programmatically. # For now, only the various proxy settings can be configured here. ############################################################ @@ -11,7 +11,7 @@ # settings when they do exist. # Set it to 'true' to enable this feature and check for platform # specific proxy settings -# Note that the system properties that do explicitely set proxies +# Note that the system properties that do explicitly set proxies # (like http.proxyHost) do take precedence over the system settings # even if java.net.useSystemProxies is set to true. From 191aad0e6204aeefa35166501a2247e483b6b666 Mon Sep 17 00:00:00 2001 From: Pavel Rappo Date: Fri, 24 Feb 2017 17:05:00 +0000 Subject: [PATCH 311/447] 8164625: Pooled HttpConnection should be removed during close Reviewed-by: dfuchs, michaelm --- .../classes/jdk/incubator/http/Exchange.java | 6 +- .../jdk/incubator/http/ExchangeImpl.java | 6 +- .../jdk/incubator/http/Http1Exchange.java | 8 +- .../jdk/incubator/http/Http1Response.java | 1 + .../jdk/incubator/http/HttpConnection.java | 2 +- .../jdk/incubator/http/HttpRequestImpl.java | 5 + .../http/PlainTunnelingConnection.java | 2 +- .../classes/jdk/incubator/http/Stream.java | 10 +- .../java/net/httpclient/HandshakePhase.java | 265 ----------------- .../websocket/ConnectionHandover.java | 68 +++++ .../websocket/DummyWebSocketServer.java | 278 ++++++++++++++++++ .../httpclient/websocket/LoggingHelper.java | 38 +++ .../httpclient/websocket/logging.properties | 5 + 13 files changed, 413 insertions(+), 281 deletions(-) delete mode 100644 jdk/test/java/net/httpclient/HandshakePhase.java create mode 100644 jdk/test/java/net/httpclient/websocket/ConnectionHandover.java create mode 100644 jdk/test/java/net/httpclient/websocket/DummyWebSocketServer.java create mode 100644 jdk/test/java/net/httpclient/websocket/LoggingHelper.java create mode 100644 jdk/test/java/net/httpclient/websocket/logging.properties diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Exchange.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Exchange.java index d5019c956af..59e107b67df 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Exchange.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Exchange.java @@ -133,11 +133,13 @@ final class Exchange { } public T readBody(HttpResponse.BodyHandler responseHandler) throws IOException { - return exchImpl.readBody(responseHandler, true); + // The connection will not be returned to the pool in the case of WebSocket + return exchImpl.readBody(responseHandler, !request.isWebSocket()); } public CompletableFuture readBodyAsync(HttpResponse.BodyHandler handler) { - return exchImpl.readBodyAsync(handler, true, parentExecutor); + // The connection will not be returned to the pool in the case of WebSocket + return exchImpl.readBodyAsync(handler, !request.isWebSocket(), parentExecutor); } public void cancel() { diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ExchangeImpl.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ExchangeImpl.java index f938a8f7e79..04e29b27bb7 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ExchangeImpl.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ExchangeImpl.java @@ -117,11 +117,11 @@ abstract class ExchangeImpl { */ abstract Response getResponse() throws IOException; - abstract T readBody(HttpResponse.BodyHandler handler, boolean returnToCache) - throws IOException; + abstract T readBody(HttpResponse.BodyHandler handler, + boolean returnConnectionToPool) throws IOException; abstract CompletableFuture readBodyAsync(HttpResponse.BodyHandler handler, - boolean returnToCache, + boolean returnConnectionToPool, Executor executor); // Builtin processors need access to HttpClientImpl diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http1Exchange.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http1Exchange.java index 5003dd6b861..2d992ab4adb 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http1Exchange.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http1Exchange.java @@ -88,14 +88,14 @@ class Http1Exchange extends ExchangeImpl { @Override - T readBody(BodyHandler handler, boolean returnToCache) + T readBody(BodyHandler handler, boolean returnConnectionToPool) throws IOException { BodyProcessor processor = handler.apply(response.responseCode(), response.responseHeaders()); setClientForResponse(processor); CompletableFuture bodyCF = response.readBody(processor, - returnToCache, + returnConnectionToPool, this::executeInline); try { return bodyCF.join(); @@ -114,14 +114,14 @@ class Http1Exchange extends ExchangeImpl { @Override CompletableFuture readBodyAsync(BodyHandler handler, - boolean returnToCache, + boolean returnConnectionToPool, Executor executor) { BodyProcessor processor = handler.apply(response.responseCode(), response.responseHeaders()); setClientForResponse(processor); CompletableFuture bodyCF = response.readBody(processor, - returnToCache, + returnConnectionToPool, executor); return bodyCF; } diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http1Response.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http1Response.java index a5958fdfa5f..ea36bb7a723 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http1Response.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http1Response.java @@ -164,6 +164,7 @@ class Http1Response { private void onFinished() { if (return2Cache) { + Log.logTrace("Returning connection to the pool: {0}", connection); connection.returnToCache(headers); } } diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpConnection.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpConnection.java index ed1307f2700..db260ff0bac 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpConnection.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpConnection.java @@ -115,7 +115,7 @@ abstract class HttpConnection implements Closeable { } /* Returns either a plain HTTP connection or a plain tunnelling connection - * for proxied websockets */ + * for proxied WebSocket */ private static HttpConnection getPlainConnection(InetSocketAddress addr, InetSocketAddress proxy, HttpRequestImpl request, diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequestImpl.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequestImpl.java index 4285c25116b..c1d93da1f44 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequestImpl.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequestImpl.java @@ -81,6 +81,7 @@ class HttpRequestImpl extends HttpRequest implements WebSocketRequest { this.userHeaders = request.headers(); if (request instanceof HttpRequestImpl) { this.systemHeaders = ((HttpRequestImpl) request).systemHeaders; + this.isWebSocket = ((HttpRequestImpl) request).isWebSocket; } else { this.systemHeaders = new HttpHeadersImpl(); } @@ -102,6 +103,7 @@ class HttpRequestImpl extends HttpRequest implements WebSocketRequest { HttpRequestImpl other) { this.method = method == null? "GET" : method; this.userHeaders = other.userHeaders; + this.isWebSocket = other.isWebSocket; this.systemHeaders = other.systemHeaders; this.uri = uri; this.expectContinue = other.expectContinue; @@ -115,6 +117,9 @@ class HttpRequestImpl extends HttpRequest implements WebSocketRequest { /* used for creating CONNECT requests */ HttpRequestImpl(String method, HttpClientImpl client, InetSocketAddress authority) { + // TODO: isWebSocket flag is not specified, but the assumption is that + // such a request will never be made on a connection that will be returned + // to the connection pool (we might need to revisit this constructor later) this.method = method; this.systemHeaders = new HttpHeadersImpl(); this.userHeaders = ImmutableHeaders.empty(); diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainTunnelingConnection.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainTunnelingConnection.java index f85c68e6b71..6432804bd9f 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainTunnelingConnection.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainTunnelingConnection.java @@ -36,7 +36,7 @@ import java.util.concurrent.CompletableFuture; /** * A plain text socket tunnel through a proxy. Uses "CONNECT" but does not - * encrypt. Used by WebSockets. Subclassed in SSLTunnelConnection for encryption. + * encrypt. Used by WebSocket. Subclassed in SSLTunnelConnection for encryption. */ class PlainTunnelingConnection extends HttpConnection { diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Stream.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Stream.java index bf288685cf1..a27c12a5367 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Stream.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Stream.java @@ -148,7 +148,7 @@ class Stream extends ExchangeImpl { @Override CompletableFuture readBodyAsync(HttpResponse.BodyHandler handler, - boolean returnToCache, + boolean returnConnectionToPool, Executor executor) { Log.logTrace("Reading body on stream {0}", streamid); @@ -166,11 +166,11 @@ class Stream extends ExchangeImpl { } @Override - T readBody(HttpResponse.BodyHandler handler, boolean returnToCache) + T readBody(HttpResponse.BodyHandler handler, boolean returnConnectionToPool) throws IOException { CompletableFuture cf = readBodyAsync(handler, - returnToCache, + returnConnectionToPool, null); try { return cf.join(); @@ -871,10 +871,10 @@ class Stream extends ExchangeImpl { @Override CompletableFuture readBodyAsync( HttpResponse.BodyHandler handler, - boolean returnToCache, + boolean returnConnectionToPool, Executor executor) { - return super.readBodyAsync(handler, returnToCache, executor) + return super.readBodyAsync(handler, returnConnectionToPool, executor) .whenComplete((v, t) -> pushGroup.pushError(t)); } diff --git a/jdk/test/java/net/httpclient/HandshakePhase.java b/jdk/test/java/net/httpclient/HandshakePhase.java deleted file mode 100644 index 2585ce78f70..00000000000 --- a/jdk/test/java/net/httpclient/HandshakePhase.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -import java.io.IOException; -import java.io.UncheckedIOException; -import java.net.InetSocketAddress; -import java.net.URI; -import java.nio.ByteBuffer; -import java.nio.CharBuffer; -import java.nio.channels.ServerSocketChannel; -import java.nio.channels.SocketChannel; -import java.nio.charset.CharacterCodingException; -import java.nio.charset.StandardCharsets; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.util.Arrays; -import java.util.Base64; -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; -import java.util.regex.Pattern; -import java.util.stream.Collectors; - -import static java.lang.String.format; -import static java.util.Objects.requireNonNull; - -// -// Performs a simple opening handshake and yields the channel. -// -// Client Request: -// -// GET /chat HTTP/1.1 -// Host: server.example.com -// Upgrade: websocket -// Connection: Upgrade -// Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== -// Origin: http://example.com -// Sec-WebSocket-Protocol: chat, superchat -// Sec-WebSocket-Version: 13 -// -// -// Server Response: -// -// HTTP/1.1 101 Switching Protocols -// Upgrade: websocket -// Connection: Upgrade -// Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= -// Sec-WebSocket-Protocol: chat -// -final class HandshakePhase { - - private final ServerSocketChannel ssc; - - HandshakePhase(InetSocketAddress address) { - requireNonNull(address); - try { - ssc = ServerSocketChannel.open(); - ssc.bind(address); - } catch (IOException e) { - throw new UncheckedIOException(e); - } - } - - // - // Returned CF completes normally after the handshake has been performed - // - CompletableFuture afterHandshake( - Function, List> mapping) { - return CompletableFuture.supplyAsync( - () -> { - SocketChannel socketChannel = accept(); - try { - StringBuilder request = new StringBuilder(); - if (!readRequest(socketChannel, request)) { - throw new IllegalStateException(); - } - List strings = Arrays.asList( - request.toString().split("\r\n") - ); - List response = mapping.apply(strings); - writeResponse(socketChannel, response); - return socketChannel; - } catch (Throwable t) { - try { - socketChannel.close(); - } catch (IOException ignored) { } - throw t; - } - }); - } - - CompletableFuture afterHandshake() { - return afterHandshake((request) -> { - List response = new LinkedList<>(); - Iterator iterator = request.iterator(); - if (!iterator.hasNext()) { - throw new IllegalStateException("The request is empty"); - } - if (!"GET / HTTP/1.1".equals(iterator.next())) { - throw new IllegalStateException - ("Unexpected status line: " + request.get(0)); - } - response.add("HTTP/1.1 101 Switching Protocols"); - Map requestHeaders = new HashMap<>(); - while (iterator.hasNext()) { - String header = iterator.next(); - String[] split = header.split(": "); - if (split.length != 2) { - throw new IllegalStateException - ("Unexpected header: " + header - + ", split=" + Arrays.toString(split)); - } - if (requestHeaders.put(split[0], split[1]) != null) { - throw new IllegalStateException - ("Duplicating headers: " + Arrays.toString(split)); - } - } - if (requestHeaders.containsKey("Sec-WebSocket-Protocol")) { - throw new IllegalStateException("Subprotocols are not expected"); - } - if (requestHeaders.containsKey("Sec-WebSocket-Extensions")) { - throw new IllegalStateException("Extensions are not expected"); - } - expectHeader(requestHeaders, "Connection", "Upgrade"); - response.add("Connection: Upgrade"); - expectHeader(requestHeaders, "Upgrade", "websocket"); - response.add("Upgrade: websocket"); - expectHeader(requestHeaders, "Sec-WebSocket-Version", "13"); - String key = requestHeaders.get("Sec-WebSocket-Key"); - if (key == null) { - throw new IllegalStateException("Sec-WebSocket-Key is missing"); - } - MessageDigest sha1 = null; - try { - sha1 = MessageDigest.getInstance("SHA-1"); - } catch (NoSuchAlgorithmException e) { - throw new InternalError(e); - } - String x = key + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; - sha1.update(x.getBytes(StandardCharsets.ISO_8859_1)); - String v = Base64.getEncoder().encodeToString(sha1.digest()); - response.add("Sec-WebSocket-Accept: " + v); - return response; - }); - } - - private String expectHeader(Map headers, - String name, - String value) { - String v = headers.get(name); - if (!value.equals(v)) { - throw new IllegalStateException( - format("Expected '%s: %s', actual: '%s: %s'", - name, value, name, v) - ); - } - return v; - } - - URI getURI() { - InetSocketAddress a; - try { - a = (InetSocketAddress) ssc.getLocalAddress(); - } catch (IOException e) { - throw new UncheckedIOException(e); - } - return URI.create("ws://" + a.getHostName() + ":" + a.getPort()); - } - - private int read(SocketChannel socketChannel, ByteBuffer buffer) { - try { - int num = socketChannel.read(buffer); - if (num == -1) { - throw new IllegalStateException("Unexpected EOF"); - } - assert socketChannel.isBlocking() && num > 0; - return num; - } catch (IOException e) { - throw new UncheckedIOException(e); - } - } - - private SocketChannel accept() { - SocketChannel socketChannel = null; - try { - socketChannel = ssc.accept(); - socketChannel.configureBlocking(true); - } catch (IOException e) { - if (socketChannel != null) { - try { - socketChannel.close(); - } catch (IOException ignored) { } - } - throw new UncheckedIOException(e); - } - return socketChannel; - } - - private boolean readRequest(SocketChannel socketChannel, - StringBuilder request) { - ByteBuffer buffer = ByteBuffer.allocateDirect(512); - read(socketChannel, buffer); - CharBuffer decoded; - buffer.flip(); - try { - decoded = - StandardCharsets.ISO_8859_1.newDecoder().decode(buffer); - } catch (CharacterCodingException e) { - throw new UncheckedIOException(e); - } - request.append(decoded); - return Pattern.compile("\r\n\r\n").matcher(request).find(); - } - - private void writeResponse(SocketChannel socketChannel, - List response) { - String s = response.stream().collect(Collectors.joining("\r\n")) - + "\r\n\r\n"; - ByteBuffer encoded; - try { - encoded = - StandardCharsets.ISO_8859_1.newEncoder().encode(CharBuffer.wrap(s)); - } catch (CharacterCodingException e) { - throw new UncheckedIOException(e); - } - write(socketChannel, encoded); - } - - private void write(SocketChannel socketChannel, ByteBuffer buffer) { - try { - while (buffer.hasRemaining()) { - socketChannel.write(buffer); - } - } catch (IOException e) { - try { - socketChannel.close(); - } catch (IOException ignored) { } - throw new UncheckedIOException(e); - } - } -} diff --git a/jdk/test/java/net/httpclient/websocket/ConnectionHandover.java b/jdk/test/java/net/httpclient/websocket/ConnectionHandover.java new file mode 100644 index 00000000000..e89ce790404 --- /dev/null +++ b/jdk/test/java/net/httpclient/websocket/ConnectionHandover.java @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import jdk.incubator.http.HttpClient; +import jdk.incubator.http.WebSocket; + +import java.io.IOException; +import java.net.URI; + +/* + * @test + * @bug 8164625 + * @summary Verifies HttpClient yields the connection to the WebSocket + * @run main/othervm -Djdk.httpclient.HttpClient.log=trace ConnectionHandover + */ +public class ConnectionHandover { + + static { + LoggingHelper.setupLogging(); + } + + /* + * An I/O channel associated with the connection is closed by WebSocket.abort(). + * If this connection is returned to the connection pool, then the second + * attempt to use it would fail with a ClosedChannelException. + * + * The assumption is that since the WebSocket client is connecting to the + * same URI, the pooled connection is to be used. + */ + public static void main(String[] args) throws IOException { + try (DummyWebSocketServer server = new DummyWebSocketServer()) { + server.open(); + URI uri = server.getURI(); + WebSocket.Builder webSocketBuilder = + HttpClient.newHttpClient().newWebSocketBuilder(uri, new WebSocket.Listener() { }); + + WebSocket ws1 = webSocketBuilder.buildAsync().join(); + try { + ws1.abort(); + } catch (IOException ignored) { } + + WebSocket ws2 = webSocketBuilder.buildAsync().join(); // Exception here if the connection was pooled + try { + ws2.abort(); + } catch (IOException ignored) { } + } + } +} diff --git a/jdk/test/java/net/httpclient/websocket/DummyWebSocketServer.java b/jdk/test/java/net/httpclient/websocket/DummyWebSocketServer.java new file mode 100644 index 00000000000..a76fc21a609 --- /dev/null +++ b/jdk/test/java/net/httpclient/websocket/DummyWebSocketServer.java @@ -0,0 +1,278 @@ +/* + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.Closeable; +import java.io.IOException; +import java.io.UncheckedIOException; +import java.net.InetSocketAddress; +import java.net.URI; +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.channels.ClosedByInterruptException; +import java.nio.channels.ServerSocketChannel; +import java.nio.channels.SocketChannel; +import java.nio.charset.CharacterCodingException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.Arrays; +import java.util.Base64; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.function.Function; +import java.util.regex.Pattern; +import java.util.stream.Collectors; + +import static java.lang.String.format; +import static java.lang.System.Logger.Level.ERROR; +import static java.lang.System.Logger.Level.INFO; +import static java.lang.System.Logger.Level.TRACE; +import static java.nio.charset.StandardCharsets.ISO_8859_1; +import static java.util.Arrays.asList; +import static java.util.Objects.requireNonNull; + +/** + * Dummy WebSocket Server. + * + * Performs simpler version of the WebSocket Opening Handshake over HTTP (i.e. + * no proxying, cookies, etc.) Supports sequential connections, one at a time, + * i.e. in order for a client to connect to the server the previous client must + * disconnect first. + * + * Expected client request: + * + * GET /chat HTTP/1.1 + * Host: server.example.com + * Upgrade: websocket + * Connection: Upgrade + * Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== + * Origin: http://example.com + * Sec-WebSocket-Protocol: chat, superchat + * Sec-WebSocket-Version: 13 + * + * This server response: + * + * HTTP/1.1 101 Switching Protocols + * Upgrade: websocket + * Connection: Upgrade + * Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= + * Sec-WebSocket-Protocol: chat + */ +public final class DummyWebSocketServer implements Closeable { + + private final static System.Logger log = System.getLogger(DummyWebSocketServer.class.getName()); + private final AtomicBoolean started = new AtomicBoolean(); + private final Thread thread; + private volatile ServerSocketChannel ssc; + private volatile InetSocketAddress address; + + public DummyWebSocketServer() { + this(defaultMapping()); + } + + public DummyWebSocketServer(Function, List> mapping) { + requireNonNull(mapping); + thread = new Thread(() -> { + try { + while (!Thread.currentThread().isInterrupted()) { + log.log(INFO, "Accepting next connection at: " + ssc); + SocketChannel channel = ssc.accept(); + log.log(INFO, "Accepted: " + channel); + try { + channel.configureBlocking(true); + StringBuilder request = new StringBuilder(); + if (!readRequest(channel, request)) { + throw new IOException("Bad request"); + } + List strings = asList(request.toString().split("\r\n")); + List response = mapping.apply(strings); + writeResponse(channel, response); + // Read until the thread is interrupted or an error occurred + // or the input is shutdown + ByteBuffer b = ByteBuffer.allocate(1024); + while (channel.read(b) != -1) { + b.clear(); + } + } catch (IOException e) { + log.log(TRACE, () -> "Error in connection: " + channel, e); + } finally { + log.log(INFO, "Closed: " + channel); + close(channel); + } + } + } catch (ClosedByInterruptException ignored) { + } catch (IOException e) { + log.log(ERROR, e); + } finally { + close(ssc); + log.log(INFO, "Stopped at: " + getURI()); + } + }); + thread.setName("DummyWebSocketServer"); + thread.setDaemon(false); + } + + public void open() throws IOException { + log.log(INFO, "Starting"); + if (!started.compareAndSet(false, true)) { + throw new IllegalStateException("Already started"); + } + ssc = ServerSocketChannel.open(); + try { + ssc.configureBlocking(true); + ssc.bind(new InetSocketAddress("localhost", 0)); + address = (InetSocketAddress) ssc.getLocalAddress(); + thread.start(); + } catch (IOException e) { + close(ssc); + } + log.log(INFO, "Started at: " + getURI()); + } + + @Override + public void close() { + log.log(INFO, "Stopping: " + getURI()); + thread.interrupt(); + } + + URI getURI() { + if (!started.get()) { + throw new IllegalStateException("Not yet started"); + } + return URI.create("ws://" + address.getHostName() + ":" + address.getPort()); + } + + private boolean readRequest(SocketChannel channel, StringBuilder request) + throws IOException + { + ByteBuffer buffer = ByteBuffer.allocate(512); + int num = channel.read(buffer); + if (num == -1) { + return false; + } + CharBuffer decoded; + buffer.flip(); + try { + decoded = ISO_8859_1.newDecoder().decode(buffer); + } catch (CharacterCodingException e) { + throw new UncheckedIOException(e); + } + request.append(decoded); + return Pattern.compile("\r\n\r\n").matcher(request).find(); + } + + private void writeResponse(SocketChannel channel, List response) + throws IOException + { + String s = response.stream().collect(Collectors.joining("\r\n")) + + "\r\n\r\n"; + ByteBuffer encoded; + try { + encoded = ISO_8859_1.newEncoder().encode(CharBuffer.wrap(s)); + } catch (CharacterCodingException e) { + throw new UncheckedIOException(e); + } + while (encoded.hasRemaining()) { + channel.write(encoded); + } + } + + private static Function, List> defaultMapping() { + return request -> { + List response = new LinkedList<>(); + Iterator iterator = request.iterator(); + if (!iterator.hasNext()) { + throw new IllegalStateException("The request is empty"); + } + if (!"GET / HTTP/1.1".equals(iterator.next())) { + throw new IllegalStateException + ("Unexpected status line: " + request.get(0)); + } + response.add("HTTP/1.1 101 Switching Protocols"); + Map requestHeaders = new HashMap<>(); + while (iterator.hasNext()) { + String header = iterator.next(); + String[] split = header.split(": "); + if (split.length != 2) { + throw new IllegalStateException + ("Unexpected header: " + header + + ", split=" + Arrays.toString(split)); + } + if (requestHeaders.put(split[0], split[1]) != null) { + throw new IllegalStateException + ("Duplicating headers: " + Arrays.toString(split)); + } + } + if (requestHeaders.containsKey("Sec-WebSocket-Protocol")) { + throw new IllegalStateException("Subprotocols are not expected"); + } + if (requestHeaders.containsKey("Sec-WebSocket-Extensions")) { + throw new IllegalStateException("Extensions are not expected"); + } + expectHeader(requestHeaders, "Connection", "Upgrade"); + response.add("Connection: Upgrade"); + expectHeader(requestHeaders, "Upgrade", "websocket"); + response.add("Upgrade: websocket"); + expectHeader(requestHeaders, "Sec-WebSocket-Version", "13"); + String key = requestHeaders.get("Sec-WebSocket-Key"); + if (key == null) { + throw new IllegalStateException("Sec-WebSocket-Key is missing"); + } + MessageDigest sha1 = null; + try { + sha1 = MessageDigest.getInstance("SHA-1"); + } catch (NoSuchAlgorithmException e) { + throw new InternalError(e); + } + String x = key + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; + sha1.update(x.getBytes(ISO_8859_1)); + String v = Base64.getEncoder().encodeToString(sha1.digest()); + response.add("Sec-WebSocket-Accept: " + v); + return response; + }; + } + + protected static String expectHeader(Map headers, + String name, + String value) { + String v = headers.get(name); + if (!value.equals(v)) { + throw new IllegalStateException( + format("Expected '%s: %s', actual: '%s: %s'", + name, value, name, v) + ); + } + return v; + } + + private static void close(AutoCloseable... acs) { + for (AutoCloseable ac : acs) { + try { + ac.close(); + } catch (Exception ignored) { } + } + } +} diff --git a/jdk/test/java/net/httpclient/websocket/LoggingHelper.java b/jdk/test/java/net/httpclient/websocket/LoggingHelper.java new file mode 100644 index 00000000000..026d8ad4132 --- /dev/null +++ b/jdk/test/java/net/httpclient/websocket/LoggingHelper.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.File; + +public final class LoggingHelper { + + /* + * I wish we had a support for java.util.logging in jtreg similar to what we + * have for security policy files: + * + * @run main/othervm/jul=logging.properties ClassUnderTest + */ + public static void setupLogging() { + String path = System.getProperty("test.src") + File.separator + "logging.properties"; + System.setProperty("java.util.logging.config.file", path); + } +} diff --git a/jdk/test/java/net/httpclient/websocket/logging.properties b/jdk/test/java/net/httpclient/websocket/logging.properties new file mode 100644 index 00000000000..fb8a8dbdfc5 --- /dev/null +++ b/jdk/test/java/net/httpclient/websocket/logging.properties @@ -0,0 +1,5 @@ +handlers=java.util.logging.ConsoleHandler +.level=ALL +java.util.logging.ConsoleHandler.level=ALL +java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter +java.util.logging.SimpleFormatter.format=%4$s: %5$s [%1$tc]%n From 32e70396f43716669917c622d63ed95d96ac9b55 Mon Sep 17 00:00:00 2001 From: Mandy Chung Date: Fri, 24 Feb 2017 09:26:59 -0800 Subject: [PATCH 312/447] 8175193: jlink and `requires static` Reviewed-by: alanb, forax --- .../tools/jlink/internal/ModuleSorter.java | 17 +++-- .../UserModuleTest.java | 46 ++++++++++++- .../src/m3/module-info.java | 1 + .../src/m3/p3/Foo.java | 36 +++++++++++ .../src/m3/p3/Lib.java | 30 +++++++++ .../src/m5/module-info.java | 27 ++++++++ .../src/m5/p5/Main.java | 64 +++++++++++++++++++ 7 files changed, 213 insertions(+), 8 deletions(-) create mode 100644 jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/p3/Foo.java create mode 100644 jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/p3/Lib.java create mode 100644 jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m5/module-info.java create mode 100644 jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m5/p5/Main.java diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ModuleSorter.java b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ModuleSorter.java index 2b9981e9582..42cbe9f0255 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ModuleSorter.java +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ModuleSorter.java @@ -30,6 +30,8 @@ import jdk.tools.jlink.plugin.ResourcePoolModule; import jdk.tools.jlink.plugin.ResourcePoolModuleView; import java.lang.module.ModuleDescriptor; +import java.lang.module.ModuleDescriptor.Requires.Modifier; + import java.nio.ByteBuffer; import java.util.Deque; import java.util.HashMap; @@ -67,14 +69,15 @@ public final class ModuleSorter { private ModuleSorter addModule(ResourcePoolModule module) { addNode(module); - readModuleDescriptor(module).requires().stream() - .forEach(req -> { - String dm = req.name(); - ResourcePoolModule dep = moduleView.findModule(dm) - .orElseThrow(() -> new PluginException(dm + " not found")); + readModuleDescriptor(module).requires().forEach(req -> { + ResourcePoolModule dep = moduleView.findModule(req.name()).orElse(null); + if (dep != null) { addNode(dep); edges.get(module.name()).add(dep); - }); + } else if (!req.modifiers().contains(Modifier.STATIC)) { + throw new PluginException(req.name() + " not found"); + } + }); return this; } @@ -113,7 +116,7 @@ public final class ModuleSorter { return; } visited.add(node); - edges.get(node.name()).stream() + edges.get(node.name()) .forEach(x -> visit(x, visited, done)); done.add(node); result.addLast(node); diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java index 81f0320b32c..c63309c2a5e 100644 --- a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java @@ -64,7 +64,7 @@ public class UserModuleTest { private static final String MAIN_MID = "m1/p1.Main"; // the names of the modules in this test - private static String[] modules = new String[] {"m1", "m2", "m3", "m4"}; + private static String[] modules = new String[] {"m1", "m2", "m3", "m4", "m5"}; private static boolean hasJmods() { @@ -160,6 +160,50 @@ public class UserModuleTest { .getExitValue() == 0); } + @Test + public void testRequiresStatic() throws Throwable { + if (!hasJmods()) return; + + Path dir = Paths.get("requiresStatic"); + createImage(dir, "m5"); + Path java = dir.resolve("bin").resolve("java"); + assertTrue(executeProcess(java.toString(), "-m", "m5/p5.Main") + .outputTo(System.out) + .errorTo(System.out) + .getExitValue() == 0); + + // run with m3 present + assertTrue(executeProcess(java.toString(), + "--module-path", MODS_DIR.toString(), + "--add-modules", "m3", + "-m", "m5/p5.Main") + .outputTo(System.out) + .errorTo(System.out) + .getExitValue() == 0); + } + + @Test + public void testRequiresStatic2() throws Throwable { + if (!hasJmods()) return; + + Path dir = Paths.get("requiresStatic2"); + createImage(dir, "m3", "m5"); + + Path java = dir.resolve("bin").resolve("java"); + assertTrue(executeProcess(java.toString(), "-m", "m5/p5.Main") + .outputTo(System.out) + .errorTo(System.out) + .getExitValue() == 0); + + // boot layer with m3 and m5 + assertTrue(executeProcess(java.toString(), + "--add-modules", "m3", + "-m", "m5/p5.Main") + .outputTo(System.out) + .errorTo(System.out) + .getExitValue() == 0); + } + private void createJmods(String... modules) throws IOException { // use the same target platform as in java.base ModuleDescriptor md = Layer.boot().findModule("java.base").get() diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/module-info.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/module-info.java index c2e7fb62e4c..69e08bef75c 100644 --- a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/module-info.java +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/module-info.java @@ -23,4 +23,5 @@ module m3 { requires m4; + exports p3; } diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/p3/Foo.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/p3/Foo.java new file mode 100644 index 00000000000..07a7f51a86e --- /dev/null +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/p3/Foo.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p3; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Documented +@Target(ElementType.FIELD) +@Retention(RetentionPolicy.SOURCE) +public @interface Foo { +} diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/p3/Lib.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/p3/Lib.java new file mode 100644 index 00000000000..7a8ad28d21a --- /dev/null +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m3/p3/Lib.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p3; + +public class Lib { + public static String concat(String x, String y) { + return x + y; + } +} diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m5/module-info.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m5/module-info.java new file mode 100644 index 00000000000..ce1d36933d0 --- /dev/null +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m5/module-info.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +module m5 { + requires static m3; + exports p5; +} diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m5/p5/Main.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m5/p5/Main.java new file mode 100644 index 00000000000..f22dfc5c10d --- /dev/null +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m5/p5/Main.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package p5; + +import java.lang.reflect.Layer; +import p3.Foo; +import p3.Lib; + +/** + * This test verifies jlink support of requires static. + */ +public class Main { + public static void main(String... args) { + boolean libPresent = Layer.boot().findModule("m3").isPresent(); + if (LibHelper.libClassFound != libPresent) { + throw new RuntimeException("Expected module m3 not in the boot layer"); + } + + if (libPresent) { + // p3.Lib must be present + LibHelper.concat("x", "y"); + } + } + + static class LibHelper { + @Foo + static final boolean libClassFound; + + static { + boolean found = false; + try { + Class c = Class.forName("p3.Lib"); + found = true; + } catch (ClassNotFoundException e) { + } + libClassFound = found; + } + + public static String concat(String x, String y) { + return Lib.concat(x, y); + } + } +} From c3b3895160a0bb6eb793b4af3136976f5d2f7e2d Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Fri, 24 Feb 2017 11:28:00 -0800 Subject: [PATCH 313/447] 8175115: Improve instrumentation of java/nio/file/WatchService/LotsOfEvents.java Attempt an additional long poll to check for missed events and print more information Reviewed-by: rriggs --- .../nio/file/WatchService/LotsOfEvents.java | 49 +++++++++++++------ 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/jdk/test/java/nio/file/WatchService/LotsOfEvents.java b/jdk/test/java/nio/file/WatchService/LotsOfEvents.java index 042dfd94146..6990c1e8d89 100644 --- a/jdk/test/java/nio/file/WatchService/LotsOfEvents.java +++ b/jdk/test/java/nio/file/WatchService/LotsOfEvents.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,22 +23,25 @@ /* @test * @bug 6907760 6929532 - * @summary Tests WatchService behavior when lots of events are pending + * @summary Tests WatchService behavior when lots of events are pending (use -Dseed=X to set PRNG seed) * @library .. + * @library /lib/testlibrary/ + * @build jdk.testlibrary.* * @run main/timeout=180 LotsOfEvents * @key randomness */ -import java.nio.file.*; -import static java.nio.file.StandardWatchEventKinds.*; import java.io.IOException; import java.io.OutputStream; +import java.nio.file.*; +import static java.nio.file.StandardWatchEventKinds.*; import java.util.*; import java.util.concurrent.TimeUnit; +import jdk.testlibrary.RandomFactory; public class LotsOfEvents { - static final Random rand = new Random(); + private static final Random RAND = RandomFactory.getRandom(); public static void main(String[] args) throws Exception { Path dir = TestUtil.createTemporaryDirectory(); @@ -70,7 +73,7 @@ public class LotsOfEvents { Thread.sleep(1000); // check that we see the create events (or overflow) - drainAndCheckOverflowEvents(watcher, ENTRY_CREATE, n); + drainAndCheckOverflowEvents(dir, watcher, ENTRY_CREATE, n); // delete the files for (int i=0; i expectedKind, int count) throws IOException, InterruptedException @@ -123,8 +127,25 @@ public class LotsOfEvents { } // check that all expected events were received or there was an overflow - if (nread < count && !gotOverflow) - throw new RuntimeException("Insufficient events"); + if (nread < count && !gotOverflow) { + System.err.printf("Test directory %s contains %d files%n", + dir, Files.list(dir).count()); + + long timeBeforePoll = System.nanoTime(); + key = watcher.poll(15, TimeUnit.SECONDS); + long timeAfterPoll = System.nanoTime(); + if (key == null) { + System.err.println("key still null after extra polling"); + } else { + List> events = key.pollEvents(); + System.err.printf("Retrieved key with %d events after %d ns%n", + events.size(), timeAfterPoll - timeBeforePoll); + } + + throw new RuntimeException("Insufficient " + + expectedKind.name() + " events: expected " + + count + ", received " + nread); + } } /** @@ -134,14 +155,14 @@ public class LotsOfEvents { throws IOException, InterruptedException { // this test uses a random number of files - final int nfiles = 5 + rand.nextInt(10); + final int nfiles = 5 + RAND.nextInt(10); DirectoryEntry[] entries = new DirectoryEntry[nfiles]; for (int i=0; i Date: Fri, 24 Feb 2017 15:23:14 -0800 Subject: [PATCH 314/447] 8173914: StandardJavaFileManager.setLocationForModule Reviewed-by: jlahoda --- .../javax/tools/StandardJavaFileManager.java | 68 ++- .../tools/javac/file/JavacFileManager.java | 10 +- .../com/sun/tools/javac/file/Locations.java | 437 ++++++++++++------ .../javac/file/SetLocationForModule.java | 328 +++++++++++++ 4 files changed, 695 insertions(+), 148 deletions(-) create mode 100644 langtools/test/tools/javac/file/SetLocationForModule.java diff --git a/langtools/src/java.compiler/share/classes/javax/tools/StandardJavaFileManager.java b/langtools/src/java.compiler/share/classes/javax/tools/StandardJavaFileManager.java index 2c33367f7d6..af131935187 100644 --- a/langtools/src/java.compiler/share/classes/javax/tools/StandardJavaFileManager.java +++ b/langtools/src/java.compiler/share/classes/javax/tools/StandardJavaFileManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -142,6 +142,17 @@ import static javax.tools.FileManagerUtils.*; * files in the {@linkplain java.nio.file.FileSystems#getDefault() default file system.} * It is recommended that implementations should support Path objects from any filesystem.

      * + * + * @apiNote + * Some methods on this interface take a {@code Collection} + * instead of {@code Iterable}. + * This is to prevent the possibility of accidentally calling the method + * with a single {@code Path} as such an argument, because although + * {@code Path} implements {@code Iterable}, it would almost never be + * correct to call these methods with a single {@code Path} and have it be treated as + * an {@code Iterable} of its components. + * + * * @author Peter von der Ahé * @since 1.6 */ @@ -266,6 +277,10 @@ public interface StandardJavaFileManager extends JavaFileManager { * Associates the given search path with the given location. Any * previous value will be discarded. * + * If the location is a module-oriented or output location, any module-specific + * associations set up by {@linkplain #setLocationForModule setLocationForModule} + * will be cancelled. + * * @param location a location * @param files a list of files, if {@code null} use the default * search path for this location @@ -279,24 +294,18 @@ public interface StandardJavaFileManager extends JavaFileManager { throws IOException; /** - * Associates the given search path with the given location. Any - * previous value will be discarded. - * - * @apiNote - * The type of the {@code paths} parameter is a {@code Collection} - * and not {@code Iterable}. This is to prevent the possibility of - * accidentally calling the method with a single {@code Path} as - * the second argument, because although {@code Path} implements - * {@code Iterable}, it would almost never be correct to call - * this method with a single {@code Path} and have it be treated as - * an {@code Iterable} of its components. + * Associates the given search path with the given location. + * Any previous value will be discarded. * + * If the location is a module-oriented or output location, any module-specific + * associations set up by {@linkplain #setLocationForModule setLocationForModule} + * will be cancelled. * * @implSpec * The default implementation converts each path to a file and calls * {@link #getJavaFileObjectsFromFiles getJavaObjectsFromFiles}. - * IllegalArgumentException will be thrown if any of the paths - * cannot be converted to a file. + * {@linkplain IllegalArgumentException IllegalArgumentException} + * will be thrown if any of the paths cannot be converted to a file. * * @param location a location * @param paths a list of paths, if {@code null} use the default @@ -315,6 +324,37 @@ public interface StandardJavaFileManager extends JavaFileManager { setLocation(location, asFiles(paths)); } + /** + * Associates the given search path with the given module and location, + * which must be a module-oriented or output location. + * Any previous value will be discarded. + * This overrides any default association derived from the search path + * associated with the location itself. + * + * All such module-specific associations will be cancelled if a + * new search path is associated with the location by calling + * {@linkplain #setLocation setLocation } or + * {@linkplain #setLocationFromPaths setLocationFromPaths}. + * + * @throws IllegalStateException if the location is not a module-oriented + * or output location. + * @throws UnsupportedOperationException if this operation is not supported by + * this file manager. + * @throws IOException if {@code location} is an output location and + * {@code paths} does not represent an existing directory + * + * @param location the location + * @param moduleName the name of the module + * @param paths the search path to associate with the location and module. + * + * @see setLocation + * @see setLocationFromPaths + */ + default void setLocationForModule(Location location, String moduleName, + Collection paths) throws IOException { + throw new UnsupportedOperationException(); + } + /** * Returns the search path associated with the given location. * diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java index a66b9aa298b..e9b6058c3a9 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1004,6 +1004,14 @@ public class JavacFileManager extends BaseFileManager implements StandardJavaFil } } + @Override @DefinedBy(Api.COMPILER) + public void setLocationForModule(Location location, String moduleName, Collection paths) + throws IOException { + nullCheck(location); + checkModuleOrientedOrOutputLocation(location); + locations.setLocationForModule(location, nullCheck(moduleName), nullCheck(paths)); + } + @Override @DefinedBy(Api.COMPILER) public String inferModuleName(Location location) { checkNotModuleOrientedLocation(location); diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java index fbeb3dc0f09..2191f22c22f 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java @@ -398,7 +398,7 @@ public class Locations { * @see #initHandlers * @see #getHandler */ - protected abstract class LocationHandler { + protected static abstract class LocationHandler { /** * @see JavaFileManager#handleOption @@ -420,7 +420,13 @@ public class Locations { /** * @see StandardJavaFileManager#setLocation */ - abstract void setPaths(Iterable files) throws IOException; + abstract void setPaths(Iterable paths) throws IOException; + + /** + * @see StandardJavaFileManager#setLocationForModule + */ + abstract void setPathsForModule(String moduleName, Iterable paths) + throws IOException; /** * @see JavaFileManager#getLocationForModule(Location, String) @@ -454,7 +460,7 @@ public class Locations { /** * A LocationHandler for a given Location, and associated set of options. */ - private abstract class BasicLocationHandler extends LocationHandler { + private static abstract class BasicLocationHandler extends LocationHandler { final Location location; final Set
    31. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
       ReadingWritingNotesMetadata
      + * BMPyesyesnoneBMP + * metadata format
      GIF + * yesyesGIF plug-in notes + * GIF + * metadata format
      JPEGyesyesnone + * JPEG metadata format
      PNGyesyesnonePNG + * metadata format
      + * TIFFyesyes + * TIFF plug-in notes + * TIFF metadata format
      + * WBMPyesyesnone + * WBMP metadata format
      + *
      + *
      + *
      + *
      + * + *

      Standard Plug-in Notes

      + * + *

      Standard plug-in for GIF image format

      + * ImageIO provides {@code ImageReader} and {@code ImageWriter}plug-ins for the + * Graphics + * Interchange Format (GIF) image format. These are the "standard" GIF + * plug-ins, meaning those that are included in the JRE, as distinct from those + * included in standard extensions, or 3rd party plug-ins. The following notes + * and metadata specification apply to the standard plug-ins. + * + *

      Writing GIF images

      + * The GIF image writer plug-in guarantees lossless writing for images which + * meet the following requirements: + *
        + *
      • the number of bands is 1;
      • + *
      • the number of bits per sample is not greater than 8;
      • + *
      • the size of a color component is not greater than 8;
      • + *
      + *

      + * By default the GIF writer plug-in creates version "89a" images. This can be + * changed to "87a" by explicitly setting the version in the stream metadata + * (see + * + * GIF Stream Metadata Format Specification). + * + * + *

      + * The GIF writer plug-in supports the creation of animated GIF images through + * the standard sequence writing methods defined in the {@code ImageWriter} + * class. + * + * + * + * + *

      + * A global color table is written to the output stream if one of the following + * conditions is met: + *

        + *
      • stream metadata containing a GlobalColorTable element is supplied; + *
      • + *
      • a sequence is being written and image metadata containing a + * LocalColorTable element is supplied for the first image in the sequence; + *
      • + *
      • image metadata is not supplied or does not contain a LocalColorTable + * element.
      • + *
      + *

      + * In the first case the global color table in the stream metadata is used, in + * the second the local color table in the image metadata is used, and in the + * third a global color table is created from the ColorModel or SampleModel of + * the (first) image. + *

      + * A local color table is written to the output stream only if image metadata + * containing a LocalColorTable element is supplied to the writer, or no image + * metadata is supplied to the writer and the local color table which would be + * generated from the image itself is not equal to the global color table. + *

      + * A Graphic Control Extension block is written to the output stream only if + * image metadata containing a GraphicControlExtension element is supplied to + * the writer, or no image metadata is supplied and the local color table + * generated from the image requires a transparent index. Application, Plain + * Text, and Comment Extension blocks are written only if they are supplied to + * the writer via image metadata. + * + * + *

      + * The writing of interlaced images can be controlled by the progressive mode of + * the provided {@code ImageWriteParam} instance. If progressive mode is + * {@code MODE_DISABLED} then a non-interlaced image will be written. If + * progressive mode is {@code MODE_DEFAULT} then an interlaced image will be + * written. If progressive mode is {@code MODE_COPY_FROM_METADATA}, then the + * metadata setting is used (if it is provided, otherwise an interlaced image + * will be written). + *

      + * The GIF image writer plug-in supports setting output stream metadata from + * metadata supplied to the writer in either the native GIF stream metadata + * format + * + * javax_imageio_gif_stream_1.0 or the standard metadata format + * javax_imageio_1.0, + * and setting output image metadata from metadata supplied to the writer in + * either the native GIF image metadata format + * + * javax_imageio_gif_image_1.0 or the standard metadata format + * javax_imageio_1.0. + * The mapping of standard metadata format to the GIF native stream and image + * metadata formats is given in the tables + * here. + * + * @since 1.4 + */ +package javax.imageio; diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/package.html b/jdk/src/java.desktop/share/classes/javax/imageio/package.html deleted file mode 100644 index 63d6dcfeb26..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/imageio/package.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - - - - -The main package of the Java Image I/O API. - -

      - -Many common image I/O operations may be performed using the static -methods of the ImageIO class. - -

      - -This package contains the basic classes and interfaces for describing -the contents of image files, including metadata and thumbnails -(IIOImage); for controlling the image reading process -(ImageReader, ImageReadParam, and -ImageTypeSpecifier) and image writing process -(ImageWriter and ImageWriteParam); for -performing transcoding between formats (ImageTranscoder), -and for reporting errors (IIOException). - -

      -All implementations of javax.imageio provide the following standard -image format plug-ins: -

      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        Reading WritingNotes Metadata
      BMPyesyesnone - BMP metadata format
      GIFyesyes - GIF plug-in notes - GIF metadata format
      JPEGyesyesnone - JPEG metadata format
      PNGyesyesnone - PNG metadata format
      TIFFyesyes - TIFF plug-in notes - TIFF metadata format
      WBMPyesyesnone - WBMP metadata format
      -
      -
      -
      -
      - -

      Standard Plug-in Notes

      -

      Standard plug-in for GIF image format

      - - -

      -ImageIO provides ImageReader and ImageWriter -plug-ins for the -Graphics Interchange Format (GIF) image format. - -These are the "standard" GIF plug-ins, meaning those that are included in the -JRE, as distinct from those included in standard extensions, or 3rd party -plug-ins. The following notes and metadata specification apply to the -standard plug-ins. - -

      Writing GIF images

      - The GIF image writer plug-in guarantees lossless writing for images which meet - the following requirements: -
        -
      • the number of bands is 1; -
      • the number of bits per sample is not greater than 8; -
      • the size of a color component is not greater than 8; -
      - -

      - By default the GIF writer plug-in creates version "89a" images. This can be - changed to "87a" by explicitly setting the version in the - stream metadata (see - GIF Stream Metadata Format Specification). -

      - - - -

      - The GIF writer plug-in supports the creation of animated GIF images through - the standard sequence writing methods defined in the - ImageWriter class. - - -

      - - -

      - A global color table is written to the output stream if one of the - following conditions is met: -

        -
      • stream metadata containing a GlobalColorTable element is - supplied;
      • -
      • a sequence is being written and image metadata containing a - LocalColorTable element is supplied for the first image in the - sequence;
      • -
      • image metadata is not supplied or does not contain a LocalColorTable - element.
      • -
      - -

      - In the first case the global color table in the stream metadata is - used, in the second the local color table in the image metadata is - used, and in the third a global color table is created from the - ColorModel or SampleModel of the (first) image. -

      - -

      - A local color table is written to the output stream only if image - metadata containing a LocalColorTable element is supplied to the - writer, or no image metadata is supplied to the writer and the local - color table which would be generated from the image itself is not - equal to the global color table. -

      - -

      - A Graphic Control Extension block is written to the output stream only - if image metadata containing a GraphicControlExtension element is - supplied to the writer, or no image metadata is supplied and the - local color table generated from the image requires a transparent - index. Application, Plain Text, and Comment Extension blocks are - written only if they are supplied to the writer via image metadata. - -

      - - -

      - - The writing of interlaced images can be controlled by the progressive - mode of the provided ImageWriteParam instance. - If progressive mode is - MODE_DISABLED then a non-interlaced image will be written. If - progressive mode is MODE_DEFAULT then an interlaced image will - be written. If progressive mode is MODE_COPY_FROM_METADATA, then - the metadata setting is used (if it is provided, otherwise an interlaced - image will be written). -

      - -

      - The GIF image writer plug-in supports setting output stream metadata from - metadata supplied to the writer in either the native GIF stream - metadata format - javax_imageio_gif_stream_1.0 or the standard metadata format - - javax_imageio_1.0, and setting - output image metadata from metadata supplied to the writer in either - the native GIF image metadata format - javax_imageio_gif_image_1.0 or the standard metadata format - javax_imageio_1.0. - - The mapping of standard metadata format to the GIF native stream and - image metadata formats is given in the tables here . -

      - - - - -@since 1.4 - - diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/bmp/package-info.java b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/bmp/package-info.java new file mode 100644 index 00000000000..d423a14321d --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/bmp/package-info.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Package containing the public classes used by the built-in BMP plug-in. + * + * @since 1.5 + */ +package javax.imageio.plugins.bmp; diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/bmp/package.html b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/bmp/package.html deleted file mode 100644 index 36467da7f5f..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/bmp/package.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - -Package containing the public classes used by the built-in BMP plug-in. - -@since 1.5 - - diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/package-info.java b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/package-info.java new file mode 100644 index 00000000000..cd437729871 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/package-info.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Classes supporting the built-in JPEG plug-in. + *

      + * This package contains some support classes for the built-in JPEG reader and + * writer plug-ins. Classes are provided for representing quantization and + * Huffman tables, and extensions of {@code ImageReadParam} and + * {@code ImageWriteParam} are provided to supply tables during the reading and + * writing process. For more information about the operation of the built-in + * JPEG plug-ins, see the + * JPEG metadata format + * specification and usage notes. + * + * @since 1.4 + */ +package javax.imageio.plugins.jpeg; diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/package.html b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/package.html deleted file mode 100644 index 60d4e8eeaf4..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/package.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - -Classes supporting the built-in JPEG plug-in. - -

      - -This package contains some support classes for the built-in JPEG -reader and writer plug-ins. Classes are provided for representing -quantization and Huffman tables, and extensions of -ImageReadParam and ImageWriteParam are -provided to supply tables during the reading and writing process. For -more information about the operation of the built-in JPEG plug-ins, -see the JPEG -metadata format specification and usage notes. - -
      -
      -
      - - - -@since 1.4 - - diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/package-info.java b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/package-info.java new file mode 100644 index 00000000000..80defcc7a12 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/package-info.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Public classes used by the built-in TIFF plug-ins. + *

      + * This package contains classes supporting the built-in TIFF reader and writer + * plug-ins. Classes are provided for simplifying interaction with metadata, + * including Exif metadata common in digital photography, and an extension of + * {@link javax.imageio.ImageReadParam} which permits specifying which metadata + * tags are allowed to be read. For more information about the operation of the + * built-in TIFF plug-ins, see the + * TIFF metadata format + * specification and usage notes. + * + * @since 9 + */ +package javax.imageio.plugins.tiff; diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/package.html b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/package.html deleted file mode 100644 index 7c70425fd08..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/package.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - -Public classes used by the built-in TIFF plug-ins. - -

      -This package contains classes supporting the built-in TIFF reader and writer -plug-ins. Classes are provided for simplifying interaction with metadata, -including Exif metadata common in digital photography, and an extension of -{@link javax.imageio.ImageReadParam} which permits specifying which metadata -tags are allowed to be read. For more information about the operation of the -built-in TIFF plug-ins, see the -TIFF metadata format -specification and usage notes. - -
      -
      -
      - -@since 9 - - diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/spi/package-info.java b/jdk/src/java.desktop/share/classes/javax/imageio/spi/package-info.java new file mode 100644 index 00000000000..bdaf57c698f --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/imageio/spi/package-info.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * A package of the Java Image I/O API containing the plug-in interfaces for + * readers, writers, transcoders, and streams, and a runtime registry. + *

      + * The {@code javax.imageio.spi} package contains service provider interfaces + * for reading, writing, and transcoding images, and obtaining image input and + * output streams, as well as a run-time registry that discovers installed + * instances of Image I/O service providers and allows new instances to be + * registered dynamically. + * + * @since 1.4 + */ +package javax.imageio.spi; diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/spi/package.html b/jdk/src/java.desktop/share/classes/javax/imageio/spi/package.html deleted file mode 100644 index 404e0a66289..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/imageio/spi/package.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - -A package of the Java Image I/O API containing the plug-in interfaces -for readers, writers, transcoders, and streams, and a runtime -registry. - -

      - - -The javax.imageio.spi package contains service -provider interfaces for reading, writing, and transcoding images, and -obtaining image input and output streams, as well as a run-time registry -that discovers installed instances of Image I/O service providers and allows new -instances to be registered dynamically. - -@since 1.4 - - diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/stream/package-info.java b/jdk/src/java.desktop/share/classes/javax/imageio/stream/package-info.java new file mode 100644 index 00000000000..b28caf0ef0d --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/imageio/stream/package-info.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * A package of the Java Image I/O API dealing with low-level I/O from files and + * streams. + *

      + * The {@code ImageInputStream} interface unifies streaming and file-based + * operations. An abstract base class, {@code ImageInputStreamImpl} is provided + * to simplify writing a new {@code ImageInputStream} class. Concrete + * implementation classes ({@code FileImageInputStream}, + * {@code FileCacheImageInputStream}, and {@code MemoryCacheImageInputStream}) + * are provided that allow input to come from a {@code File} or + * {@code InputStream} with or without the use of a temporary cache file. + *

      + * The {@code ImageOutputStream} interface performs an analogous function for + * output. An abstract base class, {@code ImageOutputStreamImpl} is provided, + * along with concrete implementation classes ({@code FileImageOutputStream}, + * {@code FileCacheImageOutputStream}, and {@code MemoryCacheImageOutputStream}) + * are provided that allow output to go to a {@code File} or + * {@code OutputStream} with or without the use of a temporary cache file. + *

      + * The {@code IIOByteBuffer} class provides an alternative way to perform reads + * of sequences of bytes that reduces the amount of internal data copying. + * + * @since 1.4 + */ +package javax.imageio.stream; diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/stream/package.html b/jdk/src/java.desktop/share/classes/javax/imageio/stream/package.html deleted file mode 100644 index 41f84b8fb61..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/imageio/stream/package.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - -A package of the Java Image I/O API dealing with low-level I/O from -files and streams. - -

      - -The ImageInputStream interface unifies streaming and -file-based operations. An abstract base class, -ImageInputStreamImpl is provided to simplify writing -a new ImageInputStream class. Concrete implementation -classes (FileImageInputStream, -FileCacheImageInputStream, and -MemoryCacheImageInputStream) are provided that allow -input to come from a File or InputStream -with or without the use of a temporary cache file. - -

      - -The ImageOutputStream interface performs an analogous -function for output. An abstract base class, -ImageOutputStreamImpl is provided, along with -concrete implementation classes (FileImageOutputStream, -FileCacheImageOutputStream, and -MemoryCacheImageOutputStream) are provided that allow -output to go to a File or OutputStream with -or without the use of a temporary cache file. - -

      - -The IIOByteBuffer class provides an alternative way to -perform reads of sequences of bytes that reduces the amount of -internal data copying. - -@since 1.4 - - diff --git a/jdk/src/java.desktop/share/classes/javax/print/attribute/package-info.java b/jdk/src/java.desktop/share/classes/javax/print/attribute/package-info.java new file mode 100644 index 00000000000..f9c571f56c0 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/print/attribute/package-info.java @@ -0,0 +1,376 @@ +/* + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides classes and interfaces that describe the types of Java™ Print + * Service attributes and how they can be collected into attribute sets. + * + *

      What is an Attribute?

      + * When setting up a print job, a client specifies two things: print data + * and processing instructions. The print data is the actual content to + * be printed. The processing instructions tell the printer how to print the + * print data, such as: what media to use, how many copies to print, and whether + * to print on one or both sides of a sheet. The client specifies these + * processing instructions with the attribute definitions of the Java Print + * Service API. + *

      + * The print data and the processing instructions are separate entities. This + * means that: + *

        + *
      • You can print the same print data at different times using different + * processing instructions.
        For example, you can print a slide + * presentation on US letter-sized white paper, double-sided, stapled, 20 + * copies to make handouts for a talk; and you could print the same slide + * presentation on US letter-sized transparencies, single-sided, one copy to + * make the actual slides for the talk.
      • + *
      • You can use the same processing instructions at different times to + * print different data. For example, you could set your default processing + * instructions to: US letter-sized paper, double sided, stapled. Whenever + * you print a job, it prints with these settings, unless you explicitly + * override them.
      • + *
      + *

      + * The processing instruction does not specify how the print job processes the + * request; each processing instruction is only a description of the results of + * a print job. The print job determines the manner in which it achieves the + * results specified by the processing instructions. Representing processing + * instructions as descriptive items provides more flexibility for implementing + * print jobs. + * + *

      Attribute Categories and Values

      + * Each printer has a set of capabilities, such as the ability to print on + * different paper sizes or the ability to print more than one copy. Each of the + * capabilities has a range of values. For example, a printer's orientation + * capability might have this range of values: [landscape, portrait]. For each + * print request, the capability is set to one of these values. The Java Print + * Service API uses the term attribute category to refer to a printer + * capability and the term attribute value to refer to the value of the + * capability. + *

      + * In the Java Print Service API, an attribute category is represented by a Java + * class implementing the Attribute interface. + * Attribute values are instances of such a class or one of its subclasses. For + * example, to specify the number of copies, an application constructs an + * instance of the Copies class with the + * number of desired copies and uses the {@code Copies} instance as part of the + * print request. In this case, the {@code Copies} class represents the + * attribute category, and the {@code Copies} instance represents the attribute + * value. + * + *

      Attribute Roles

      + * When submitting a print job to a printer, the client provides the attributes + * describing the characteristics of the print data, such as the document name, + * and how the print data should be printed, such as double-sided, five copies. + * If a print job consists of multiple pieces of print data, different pieces + * might have different processing instructions, such as 8 x 11 inch media for + * the first document, and 11 x 17 inch media for another document. + *

      + * Once the printer starts processing the print job, additional information + * about the job becomes available, which might include: the job state (such as + * completed or queued) and the number of pages printed so far. + * These pieces of information are also attributes. Attributes can also describe + * the printer itself, such as: the printer name, the printer location, and the + * number of jobs queued. + *

      + * The Java Print Service API defines these different kinds of attributes with + * five subinterfaces of {@code Attribute}: + *

        + *
      • DocAttribute specifies a + * characteristic of an individual document and the print job settings to be + * applied to an individual document.
      • + *
      • PrintRequestAttribute + * specifies a setting applied to a whole print job and to all the documents + * in the print job.
      • + *
      • PrintJobAttribute reports the + * status of a print job.
      • + *
      • PrintServiceAttribute + * reports the status of a print service.
      • + *
      • SupportedValuesAttribute + * gives the supported values for another attribute.
      • + *
      + * Each attribute class implements one or more of these tagging subinterfaces to + * indicate where the attribute can be used in the API. If an attribute class + * implements multiple tagging subinterfaces, the attribute can be used in + * multiple contexts. For example, the media attribute can apply to one document + * in a print job as a {@code DocAttribute} or to an entire print job as a + * {@code PrintRequestAttribute}. Certain low-level attributes are never used on + * their own but are always aggregated into higher-level attributes. These + * low-level attribute classes only implement interface + * Attribute, not any of the tagging subinterfaces. + *

      + * The Java Print Service API defines a group of standard attribute classes + * modeled upon the attributes in the Internet Printing Protocol (IPP) version + * 1.1. The standard attribute classes are in the subpackage + * javax.print.attribute.standard to keep the actual attribute classes + * conceptually separate from the generic apparatus defined in package + * javax.print.attribute. + * + *

      Attribute Sets

      + * A client usually needs to provide more than one processing instruction when + * submitting a print job. For example, the client might need to specify a + * media size of A4 and a landscape orientation. To send more than one + * processing instruction, the client collects the attributes into an attribute + * set, which the Java Print Service API represents with the + * AttributeSet interface. + *

      + * The {@code AttributeSet} interface is similar to the + * Map interface: it provides a map of + * key to values, in which each key is unique and can contain no more than one + * value. However, the {@code AttributeSet} interface is designed to + * specifically support the needs of the Java Print Service API. An {@code + * AttributeSet} requires that: + *

        + *
      1. Each key in an {@code AttributeSet} corresponds to a category, and + * the value of the key can only be one of the attribute values that belong + * to the category represented by the key. Thus, unlike a {@code Map}, an + * {@code AttributeSet} restricts the possible values of a key: an attribute + * category cannot be set to an attribute value that does not belong to that + * category.
      2. + *
      3. No two attributes from the same category can exist in the same set. + * For example, an attribute collection must not contain both a "one-sided" + * attribute and a "two-sided" attribute because these two attributes give + * the printer conflicting instructions.
      4. + *
      5. Only attributes implementing the {@code Attribute} interface can be + * added to the set.
      6. + *
      + *

      + * The javax.print.attribute package includes + * HashAttributeSet as a concrete + * implementation of the attribute set interface. {@code HashAttributeSet} + * provides an attribute set based on a hash map. You can use this + * implementation or provide your own implementation of interface + * {@code AttributeSet}. + *

      + * The Java Print Service API provides four specializations of an attribute set + * that are restricted to contain just one of the four kinds of attributes, as + * discussed in the Attribute Roles section: + *

      + * Notice that only four kinds of attribute sets are listed here, but there are + * five kinds of attributes. Interface + * SupportedValuesAttribute + * denotes an attribute that gives the supported values for another attribute. + * Supported-values attributes are never aggregated into attribute sets, so + * there is no attribute set subinterface defined for them. + *

      + * In some contexts, an attribute set is read-only, which means that the client + * is only allowed to examine an attribute set's contents but not change them. + * In other contexts, the attribute set is read-write, which means that the + * client is allowed both to examine and to change an attribute set's contents. + * For a read-only attribute set, calling a mutating operation throws an + * {@code UnmodifiableSetException}. + *

      + * Package javax.print.attribute includes one concrete implementation of each of + * the attribute set subinterfaces: + *

      + * All of these classes extend + * HashAttributeSet and enforce the + * restriction that the attribute set is only allowed to contain the + * corresponding kind of attribute. + * + *

      Attribute Class Design

      + * An attribute value is a small, atomic data item, such as an integer or an + * enumerated value. The Java Print Service API does not use primitive data + * types, such as int, to represent attribute values for these reasons: + *
        + *
      • Primitive data types are not type-safe. For example, a compiler + * should not allow a "copies" attribute value to be used for a "sides" + * attribute.
      • + *
      • Some attributes must be represented as a record of several values. + * One example is printer resolution, which requires two numbers, such as + * 600 and 300 representing 600 x 300 dpi.
      • + *
      + * For type-safety and to represent all attributes uniformly, the Java Print + * Service API defines each attribute category as a class, such as class + * {@code Copies}, class Sides, and class + * PrinterResolution. Each + * attribute class wraps one or more primitive data items containing the + * attribute's value. Attribute set operations perform frequent comparisons + * between attribute category objects when adding attributes, finding existing + * attributes in the same category, and looking up an attribute given its + * category. Because an attribute category is represented by a class, fast + * attribute-value comparisons can be performed with the {@code Class.equals} + * method. + *

      + * Even though the Java Print Service API includes a large number of different + * attribute categories, there are only a few different types of attribute + * values. Most attributes can be represented by a small number of data types, + * such as: integer values, integer ranges, text, or an enumeration of integer + * values. The type of the attribute value that a category accepts is called the + * attribute's abstract syntax. To provide consistency and reduce code + * duplication, the Java Print Service API defines abstract syntax classes to + * represent each abstract syntax, and these classes are used as the parent of + * standard attributes whenever possible. The abstract syntax classes are: + *

        + *
      • EnumSyntax provides a type-safe + * enumeration in which enumerated values are represented as singleton + * objects. Each enumeration singleton is an instance of the enumeration + * class that wraps a hidden int value.
      • + *
      • IntegerSyntax is the abstract syntax + * for integer-valued attributes.
      • + *
      • TextSyntax is the abstract syntax for + * text-valued attributes, and includes a locale giving the text string's + * natural language.
      • + *
      • SetOfIntegerSyntax is the + * abstract syntax for attributes representing a range or set of integers + *
      • ResolutionSyntax is the abstract + * syntax for attributes representing resolution values, such as 600x300 + * dpi.
      • + *
      • Size2DSyntax is the abstract syntax + * for attributes representing a two-dimensional size, such as a paper size + * of 8.5 x 11 inches.
      • + *
      • DateTimeSyntax is the abstract + * syntax for attributes whose value is a date and time.
      • + *
      • URISyntax is the abstract syntax for + * attributes whose value is a Uniform Resource Indicator.
      • + *
      + * The abstract syntax classes are independent of the attributes that use them. + * In fact, applications that have nothing to do with printing can use the + * abstract syntax classes. Although most of the standard attribute classes + * extend one of the abstract syntax classes, no attribute class is required to + * extend one of these classes. The abstract syntax classes merely provide a + * convenient implementation that can be shared by many attribute classes. + *

      + * Each attribute class implements the {@code Attribute} interface, either + * directly or indirectly, to mark it as a printing attribute. An attribute + * class that can appear in restricted attribute sets in certain contexts also + * implements one or more subinterfaces of {@code Attribute}. Most attribute + * classes also extend the appropriate abstract syntax class to get the + * implementation. Consider the {@code Sides} attribute class: + *

      + *
      {@code
      + * public class Sides
      + *     extends EnumSyntax
      + *     implements DocAttribute, PrintRequestAttribute, PrintJobAttribute
      + * {
      + *     public final Object getCategory()
      + *     {
      + *         return Sides.class;
      + *     }
      + * ...
      + * }}
      + * 
      + *
      + *

      + * Since every attribute class implements {@code Attribute}, every attribute + * class must provide an implementation for the + * {@link javax.print.attribute.Attribute#getCategory() getCategory} method, + * which returns the attribute category. In the case of {@code Sides}, the + * {@code getCategory} method returns {@code Sides.class}. The + * {@code getCategory} method is final to ensure that any vendor-defined + * subclasses of a standard attribute class appear in the same category. Every + * attribute object is immutable once constructed so that attribute object + * references can be passed around freely. To get a different attribute value, + * construct a different attribute object. + * + *

      Attribute Vendors

      + * The Java Print Service API is designed so that vendors can: + *
        + *
      • define new vendor-specific values for any standard attribute defined + * in javax.print.attribute.standard + * .
      • + *
      • define new attribute categories representing the vendor printer's + * proprietary capabilities not already supported by the standard + * attributes.
      • + *
      + * To define a new value for an attribute, a client can construct instances of + * such attributes with arbitrary values at runtime. However, an enumerated + * attribute using an abstract syntax class of {@code EnumSyntax} specifies all + * the possible attribute values at compile time as singleton instances of the + * attribute class. This means that new enumerated values cannot be constructed + * at run time. To define new vendor-specific values for a standard enumerated + * attribute, the vendor must define a new attribute class specifying the new + * singleton instances. To ensure that the new attribute values fall in the same + * category as the standard attribute values, the new attribute class must be a + * subclass of the standard attribute class. + *

      + * To define a new attribute category, a vendor defines a new attribute class. + * This attribute class, like the standard attribute classes, implements + * {@code Attribute} or one of its subinterfaces and extends an abstract syntax + * class. The vendor can either use an existing abstract syntax class or define + * a new one. The new vendor-defined attribute can be used wherever an + * {@code Attribute} is used, such as in an {@code AttributeSet}. + * + *

      Using Attributes

      + * A typical printing application uses the {@code PrintRequestAttributeSet} + * because print-request attributes are the types of attributes that client + * usually specifies. This example demonstrates creating an attribute set of + * print-request attributes and locating a printer that can print the document + * according to the specified attributes: + *
      + *
      {@code
      + * FileInputStream psStream;
      + * try {
      + *     psstream = new FileInputStream("file.ps");
      + * } catch (FileNotFoundException ffne) {
      + * }
      + * if (psstream == null) {
      + *     return;
      + * }
      + * //Set the document type. See the DocFlavor documentation for
      + * //more information.
      + * DocFlavor psInFormat = DocFlavor.INPUT_STREAM.POSTSCRIPT;
      + * Doc myDoc = new SimpleDoc(pstream, psInFormat, null);
      + * PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
      + * aset.add(new Copies(5));
      + * aset.add(MediaSize.A4);
      + * aset.add(Sides.DUPLEX);
      + * PrintService[] services =
      + *     PrintServiceLookup.lookupPrintServices(psInFormat, aset);
      + * if (services.length > 0) {
      + *     DocPrintJob job = services[0].createPrintJob();
      + *     try {
      + *         job.print(myDoc, aset);
      + *     } catch (PrintException pe) {}
      + * }
      + * }
      + *
      + *

      + * Please note: In the javax.print APIs, a null reference parameter to methods + * is incorrect unless explicitly documented on the method as having a + * meaningful interpretation. Usage to the contrary is incorrect coding and may + * result in a run time exception either immediately or at some later time. + * IllegalArgumentException and NullPointerException are examples of typical and + * acceptable run time exceptions for such cases. + * + * @since 1.4 + */ +package javax.print.attribute; diff --git a/jdk/src/java.desktop/share/classes/javax/print/attribute/package.html b/jdk/src/java.desktop/share/classes/javax/print/attribute/package.html deleted file mode 100644 index aeedb0df2c2..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/print/attribute/package.html +++ /dev/null @@ -1,404 +0,0 @@ - - - -javax.print.attribute package - - - -Provides classes and interfaces -that describe the types of JavaTM Print -Service attributes and how they can be collected into attribute sets. -

      What is an Attribute?

      -When setting up a print job, -a client specifies two things: -print data and processing instructions. -The print data is the actual content to be printed. -The processing instructions tell the printer how to print the print data, -such as: what media to use, how many copies to print, and -whether to print on one or both sides of a sheet. The client specifies -these processing instructions with the attribute definitions of the Java -Print Service API. -

      -The print data and the processing instructions -are separate entities. This means that: -

        -
      • You can print the same print data -at different times using different processing instructions. -
        -For example, you can print a slide presentation -on US letter-sized white paper, -double-sided, stapled, 20 copies -to make handouts for a talk; -and you could print the same slide presentation -on US letter-sized transparencies, -single-sided, one copy -to make the actual slides for the talk. -
      • You can use the same processing instructions -at different times to print different data. -For example, you could set your default processing -instructions to: US letter-sized paper, double sided, stapled. -Whenever you print a job, it prints with these settings, -unless you explicitly override them. -
      -

      - -The processing instruction does not specify how the print job -processes the request; each processing instruction is only a description -of the results of a print job. The print job determines the manner in -which it achieves the results specified by the processing instructions. -Representing processing instructions as descriptive items -provides more flexibility for implementing print jobs. -

      Attribute Categories and Values

      -Each printer has a set of capabilities, such as the ability to print on -different paper sizes or the ability to print more than one copy. Each of -the capabilities has a range of values. For example, a printer's orientation -capability might have this range of values: [landscape, portrait]. -For each print request, the capability is set to one of these values. The -Java Print Service API uses the term attribute category to refer to -a printer capability and the term attribute value to refer to the value -of the capability. -

      -In the Java Print Service API, an attribute category is represented by a Java -class implementing the Attribute interface. -Attribute values are instances of such a class or -one of its subclasses. For example, to specify the number of copies, an -application constructs an instance of the -Copies class with the -number of desired copies and uses the Copies instance as part of -the print request. In this case, the Copies class represents the -attribute category, and the Copies instance represents the -attribute value. - -

      Attribute Roles

      - -When submitting a print job to a printer, the client provides the -attributes describing the characteristics of the print data, such as -the document name, and how the print data should be printed, such as -double-sided, five copies. If a print job consists of multiple -pieces of print data, different pieces might have different processing -instructions, such as 8 x 11 inch media for the first document, and -11 x 17 inch media for another document. -

      -Once the printer starts processing the print job, -additional information about the job becomes available, which might include: -the job state (such as completed or queued) and -the number of pages printed so far. These pieces of information are also -attributes. Attributes can also describe the printer itself, such as: -the printer name, the printer location, and the number of jobs queued. -

      - -The Java Print Service API defines these different kinds of attributes -with five subinterfaces of Attribute: -

      -Each attribute class -implements one or more of these tagging subinterfaces -to indicate where the attribute can be used in the API. -If an attribute class implements multiple tagging subinterfaces, -the attribute can be used in multiple contexts. For example, the media -attribute can apply to one document in a print job as a DocAttribute -or to an entire print job as a PrintRequestAttribute. -Certain low-level attributes -are never used on their own -but are always aggregated into higher-level attributes. -These low-level attribute classes only -implement interface Attribute, -not any of the tagging subinterfaces. -

      -The Java Print Service API defines a group of -standard attribute classes modeled upon the attributes in -the Internet Printing Protocol (IPP) version 1.1. The -standard attribute classes are in the subpackage -javax.print.attribute.standard to keep the actual -attribute classes conceptually separate from the generic -apparatus defined in package javax.print.attribute. - -

      Attribute Sets

      -A client usually needs to provide more than one processing -instruction when submitting a print job. For example, the client might need to -specify a media size of A4 and a landscape orientation. To send more than one -processing instruction, the client collects the attributes into an -attribute set, which the Java Print Service API represents with the -AttributeSet - interface. -

      -The AttributeSet interface is similar to the -Map interface: it provides a map of -key to values, in which each key is unique and can contain no more than one -value. However, the AttributeSet interface is designed to -specifically support the needs of the Java Print Service API. An -AttributeSet requires that: -

        -
      1. Each key in an AttributeSet corresponds to a category, and -the value of the key can only be one of the attribute values that belong -to the category represented by the key. Thus, unlike a Map, an -AttributeSet restricts the possible values of a key: an -attribute category cannot be set to an attribute value that does not belong to -that category. -
      2. No two attributes from the same category can exist in the same set. -For example, an attribute collection -must not contain both a "one-sided" attribute and a "two-sided" attribute -because these two attributes give the printer conflicting instructions. -
      3. Only attributes implementing the Attribute interface can -be added to the set. -
      - -

      -The javax.print.attribute package includes -HashAttributeSet -as a concrete implementation of the attribute set interface. -HashAttributeSet provides an attribute set based on a hash map. -You can use this implementation or provide your own implementation -of interface AttributeSet. -

      -The Java Print Service API provides four specializations of an attribute set -that are restricted to contain just one of the four kinds of attributes, -as discussed in the Attribute Roles section: -

      -Notice that only four kinds of attribute sets are listed here, but there are -five kinds of attributes. Interface -SupportedValuesAttribute -denotes an attribute that gives the supported values for another attribute. -Supported-values attributes are never aggregated into attribute sets, -so there is no attribute set subinterface defined for them. - -

      -In some contexts, an attribute set is read-only, which means that the -client is only allowed to examine an attribute set's -contents but not change them. In other contexts, the attribute set is read-write, -which means that the client is allowed both to examine and to change an -attribute set's contents. For a read-only attribute set, calling a mutating -operation throws an UnmodifiableSetException. -

      -Package javax.print.attribute includes -one concrete implementation of each of the attribute set subinterfaces: -

      -All of these classes extend HashAttributeSet -and enforce the restriction that the attribute set is only allowed to contain -the corresponding kind of attribute. -

      Attribute Class Design

      -An attribute value is a small, atomic data item, -such as an integer or an enumerated value. The Java Print Service API -does not use primitive data types, such as int, to represent attribute -values for these reasons: -
        -
      • Primitive data types are not type-safe. For example, a compiler -should not allow a "copies" attribute value to -be used for a "sides" attribute. -
      • Some attributes must be represented as a record of several -values. One example is printer resolution, which requires two -numbers, such as 600 and 300 representing 600 x 300 dpi. -
      -For type-safety and to represent all attributes uniformly, the Java -Print Service API defines each attribute category as a class, such as -class Copies, class Sides, and class -PrinterResolution. Each -attribute class wraps one or more primitive data items containing the -attribute's value. Attribute set operations perform frequent -comparisons between attribute category objects when adding attributes, -finding existing attributes in the same category, and looking -up an attribute given its category. Because an attribute category is -represented by a class, fast attribute-value comparisons can be performed -with the Class.equals method. -

      -Even though the Java Print Service API includes a large number of -different attribute categories, there are only a few different types -of attribute values. Most attributes can be represented by a small -number of data types, such as: integer values, integer ranges, text, -or an enumeration of integer values. The type of the attribute value that -a category accepts is called the attribute's abstract syntax. To -provide consistency and reduce code duplication, the Java Print Service -API defines abstract syntax classes to represent each -abstract syntax, and these classes are used as the parent of standard -attributes whenever possible. The abstract syntax classes are: -

        -
      • EnumSyntax -provides a type-safe enumeration in which enumerated -values are represented as singleton objects. Each enumeration -singleton is an instance of the enumeration class that wraps a hidden -int value. -
      • IntegerSyntax - is the abstract syntax for integer-valued attributes. -
      • TextSyntax is -the abstract syntax for text-valued attributes, and -includes a locale giving the text string's natural language. -
      • SetOfIntegerSyntax - is the abstract syntax for attributes -representing a range or set of integers -
      • ResolutionSyntax - is the abstract syntax for attributes representing - resolution values, such as 600x300 dpi. -
      • Size2DSyntax - is the abstract syntax for attributes representing a -two-dimensional size, such as a paper size of 8.5 x 11 inches. -
      • DateTimeSyntax - is the abstract syntax for attributes whose value is a date and time. -
      • URISyntax is the -abstract syntax for attributes whose value is a Uniform Resource -Indicator. -
      -The abstract syntax classes are independent of the attributes that -use them. In fact, applications that have nothing to do with -printing can use the abstract syntax classes. Although most of the -standard attribute classes extend one of the abstract syntax classes, -no attribute class is required to extend one of these classes. The -abstract syntax classes merely provide a convenient implementation that -can be shared by many attribute classes. -

      -Each attribute class implements the Attribute interface, either -directly or indirectly, to mark it as a printing attribute. An -attribute class that can appear in restricted attribute sets in -certain contexts also implements one or more subinterfaces of -Attribute. Most attribute classes also extend the appropriate -abstract syntax class to get the implementation. Consider the -Sides attribute class: -

      -
      -public class Sides
      -  extends EnumSyntax
      -  implements DocAttribute, PrintRequestAttribute, PrintJobAttribute
      -  {
      -  public final Object getCategory()
      -    {
      -    return Sides.class;
      -    }
      -  ...
      -  }
      -
      -
      -

      -Since every attribute class implements Attribute, every attribute -class must provide an implementation for the -{@link javax.print.attribute.Attribute#getCategory() getCategory} method, -which returns the attribute category. In the case of Sides, the -getCategory method returns Sides.class. The -getCategory method is final to ensure that any vendor-defined -subclasses of a standard attribute class appear in the same category. -Every attribute object is immutable once constructed so that attribute object -references can be passed around freely. To get a different attribute -value, construct a different attribute object. - -

      Attribute Vendors

      - -The Java Print Service API is designed so that vendors can: -
        -
      • define new vendor-specific values for any standard attribute -defined in -javax.print.attribute.standard. -
      • define new attribute categories representing the vendor printer's -proprietary capabilities not already supported by the standard -attributes. -
      -To define a new value for an attribute, a client can construct -instances of such attributes with arbitrary values at runtime. -However, an enumerated attribute using an abstract syntax class -of EnumSyntax specifies all the possible attribute values -at compile time as singleton instances of the attribute class. This -means that new enumerated values cannot be constructed at run time. -To define new vendor-specific values for a standard enumerated -attribute, the vendor must define a new attribute class specifying -the new singleton instances. To ensure that the new attribute values -fall in the same category as the standard attribute values, the new -attribute class must be a subclass of the standard attribute class. -

      -To define a new attribute category, a vendor defines a new attribute -class. This attribute class, like the standard attribute classes, -implements Attribute or one of its subinterfaces and extends an -abstract syntax class. The vendor can either use an existing -abstract syntax class or define a new one. The new vendor-defined -attribute can be used wherever an Attribute is used, such as in an -AttributeSet. - -

      Using Attributes

      - -A typical printing application uses the PrintRequestAttributeSet -because print-request attributes are the types of attributes that -client usually specifies. This example demonstrates creating an attribute -set of print-request attributes and locating a printer that can -print the document according to the specified attributes: -
      -
      -
      -FileInputStream psStream;
      -try {
      -   psstream = new FileInputStream("file.ps");
      -} catch (FileNotFoundException ffne) {
      -}
      -if (psstream == null) {
      -    return;
      -}
      -//Set the document type.  See the DocFlavor documentation for
      -//more information.
      -DocFlavor psInFormat = DocFlavor.INPUT_STREAM.POSTSCRIPT;
      -Doc myDoc = new SimpleDoc(pstream, psInFormat, null);  
      -PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
      -aset.add(new Copies(5));
      -aset.add(MediaSize.A4);
      -aset.add(Sides.DUPLEX);
      -
      -PrintService[] services = 
      -		PrintServiceLookup.lookupPrintServices(psInFormat, aset);
      -if (services.length > 0) {
      -   DocPrintJob job = services[0].createPrintJob();
      -   try {
      -	job.print(myDoc, aset);
      -   } catch (PrintException pe) {}
      -}
      -
      -
      -

      -Please note: In the javax.print APIs, a null reference parameter to methods -is incorrect unless explicitly documented on the method as having a meaningful -interpretation. Usage to the contrary is incorrect coding and may result -in a run time exception either immediately or at some later time. -IllegalArgumentException and NullPointerException are examples of -typical and acceptable run time exceptions for such cases. - -@since 1.4 - - diff --git a/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/package-info.java b/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/package-info.java new file mode 100644 index 00000000000..1e44ec9af61 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/package-info.java @@ -0,0 +1,637 @@ +/* + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Package javax.print.attribute.standard contains classes for specific printing + * attributes. The parent package, + * javax.print.attribute, provides classes and interfaces that describe the + * types of Java Print Service attributes and how they can be collected into + * attribute sets. + *

      + * An attribute represents a printing feature that a print service can provide. + * For each attribute, a print service either does or does not support the + * attribute. For each possible value of a supported attribute, a print service + * either does or does not support the value. + *

      + * The API requires every print service to support certain attributes; other + * attributes are optional and the service can choose whether or not to support + * them. Each attribute has a set of values that it accepts. The API requires + * every print service to support certain values for certain attributes; other + * attribute values are optional and the service can choose whether or not to + * support them. These support requirements are recorded in the documentation + * for each attribute class. + *

      + * Package javax.print.attribute.standard contains standard printing attributes + * and standard printing attribute values that are widely used in the printing + * domain. A print service vendor can provide new vendor-specific printing + * attributes in addition to the standard ones. A vendor can also provide + * vendor-specific extensions (subclasses) of the standard printing attributes + * -- for example, to provide additional vendor-specific values for an existing + * standard attribute. Of course, if a vendor wants clients to be able to use + * any added or extended attributes, the vendor must publish the new attribute + * classes. + *

      + * Many of the standard attribute classes extend one of the abstract syntax + * classes of the javax.print.attribute package. These abstract syntax classes + * each represent a different type. The + * EnumSyntax class, for example, represents a type-safe enumeration. The + * abstract syntax class provides a wrapper for the attribute value. + *

      + * If an attribute class extends {@code EnumSyntax}, and the value of the + * attribute is an IPP-compatible value, the attribute's {@code toString} method + * returns the IPP string representation of the attribute value, such as + * "processing-stopped" for the JobState attribute. + * However, because the {@code EnumSyntax} class is extensible, vendors can + * define their own attribute values. If an attribute uses the + * {@code EnumSyntax} class and is set to one of these vendor-defined values + * then the {@code toString} method will not return the IPP string + * representation of the value. + *

      + * A printing client application will typically not need to use all the printing + * attribute classes in package javax.print.attribute.standard, just the ones + * that pertain to the application. + *

      + * The attribute classes in package javax.print.attribute.standard are based on + * the Internet Printing Protocol (IPP) attributes as defined in the Internet + * RFC document, RFC 2911 Internet Printing Protocol/1.1: Model and + * Semantics dated September 2000. See + * RFC 2911 for more + * information. The descriptive text for each attribute class was taken largely + * from the above documents. The above authors' contribution to the API is + * gratefully acknowledged. + * + *

      Attribute Organization

      + * There are five kinds of printing attributes: doc attributes, print request + * attributes, print job attributes, print service attributes, and + * supported-values attributes. + * + *

      Doc Attributes

      + * Doc attributes specify the characteristics of an individual doc and the print + * job settings to be applied to an individual doc. A doc attribute class + * implements interface DocAttribute. A doc + * attribute can appear in a + * DocAttributeSet. + * + *

      Print Request Attributes

      + * Print request attributes specify the settings to be applied to a whole print + * job and to all the docs in the print job. A print request attribute class + * implements interface + * PrintRequestAttribute. A print request attribute can appear in a + * PrintRequestAttributeSet. + *

      + * Some attributes are doc attributes but not print request attributes and may + * only be specified at the doc level. Some attributes are print request + * attributes but not doc attributes and may only be specified at the Print + * Request level. Some attributes are both doc attributes and print request + * attributes and may be specified either at the doc level or at the Print + * Request level. + *

      + * When specified at the doc level, an attribute applies just to that one doc. + * When specified at the Print Request level, an attribute applies to the whole + * job, including all the docs in the job. However, an attribute specified at + * the doc level overrides an attribute in the same category specified at the + * Print Request level. + * + *

      Print Job Attributes

      + * Print job attributes report the status of a Print Job. A print job attribute + * class implements interface + * PrintJobAttribute. A print job attribute can appear in a + * PrintJobAttributeSet. + *

      + * Some attributes are both print request attributes and print job attributes; a + * client may include such attributes in a Print Request to specify + * characteristics for the ensuing Print Job, and those attributes then also + * appear in the Print Job's attribute set. Some attributes are print job + * attributes but not print request attributes; the print service itself adds + * these attributes to the Print Job's attribute set. + * + *

      Print Service Attributes

      + * Print service attributes report the status of a print service. A print + * service attribute class implements interface + * PrintServiceAttribute. A print + * service attribute can appear in a + * PrintServiceAttributeSet. + * + *

      Supported-Values Attributes

      + * A supported-value attribute indicates the legal values for another attribute + * that a print service supports. A supported-values attribute class implements + * interface + * SupportedValuesAttribute. However, supported-values attributes never + * appear in attribute sets, so there is no restricted + * AttributeSet subinterface for them. + * + *

      Attribute Table

      + * The table below lists all the printing attributes. The table shows the + * tagging interfaces each attribute class implements in addition to interface + * Attribute, thus indicating how each + * attribute is used in the API. For each doc attribute and print request + * attribute, the column marked "SupportedValuesAttribute" lists the + * supported-values attribute class, if any, with which a print service + * indicates the supported values for that attribute category. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
      Attribute ClassDoc
      Attribute
      Print
      Request
      Attribute
      Print
      Job
      Attribute
      Print
      Service
      Attribute
      SupportedValuesAttribute
      CompressionX    
      DocumentNameX    
      ChromaticityXXX  
      Copies XX CopiesSupported
      FinishingsXXX  
      JobHoldUntil XX  
      JobImpressions XX  + * JobImpressionsSupported
      JobKOctets XX JobKOctetsSupported
      JobMediaSheets XX  + * JobMediaSheetsSupported
      JobName XX  
      JobPriority XX JobPrioritySupported
      JobSheets XX  
      MediaXXX  
      MediaSize     
      + * MultipleDocumentHandling XX  
      NumberUpXXX NumberUpSupported
      OrientationRequestedXXX  
      PageRangesXXX  
      + * PresentationDirectionXXX  
      PrinterResolutionXXX  
      PrintQualityXXX  
      RequestingUserName XX  
      SheetCollateXXX  
      SidesXXX  
      DateTimeAtCompleted  X  
      DateTimeAtCreation  X  
      DateTimeAtProcessing  X  
      + * JobImpressionsCompleted  X  
      JobKOctetsProcessed  X  
      + * JobMediaSheetsCompleted  X  
      + * JobMessageFromOperator  X  
      + * JobOriginatingUserName  X  
      JobState  X  
      JobStateReasons
      + * Contains zero or more --
        X  
      -- JobStateReason     
      NumberOfDocuments  X  
      + * NumberOfInterveningJobs  X  
      OutputDeviceAssigned  X  
      ColorSupported   X 
      PagesPerMinute   X 
      PagesPerMinuteColor   X 
      PDLOverrideSupported   X 
      + * PrinterIsAcceptingJobs   X 
      PrinterInfo   X 
      PrinterLocation   X 
      + * PrinterMessageFromOperator   X 
      PrinterMakeAndModel   X 
      PrinterMoreInfo   X 
      + * PrinterMoreInfoManufacturer   X 
      PrinterName   X 
      PrinterState   X 
      PrinterStateReasons
      + * Contains zero or more --
         X 
      -- PrinterStateReason     
      -- Severity     
      QueuedJobCount   X 
      + * ReferenceUriSchemesSupported     
      + *

      + * Please note: In the javax.print APIs, a null reference parameter to methods + * is incorrect unless explicitly documented on the method as having a + * meaningful interpretation. Usage to the contrary is incorrect coding and may + * result in a run time exception either immediately or at some later time. + * IllegalArgumentException and NullPointerException are examples of typical and + * acceptable run time exceptions for such cases. + * + * @since 1.4 + */ +package javax.print.attribute.standard; diff --git a/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/package.html b/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/package.html deleted file mode 100644 index 78d29368527..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/package.html +++ /dev/null @@ -1,292 +0,0 @@ - - - -javax.print.attribute.standard package - - - -Package javax.print.attribute.standard -contains classes for specific printing attributes. -The parent package, - -javax.print.attribute, -provides classes and interfaces that describe the types of Java -Print Service attributes and how they can be collected into attribute -sets. -

      -An attribute represents a printing feature -that a print service can provide. -For each attribute, -a print service either does or does not support the attribute. -For each possible value of a supported attribute, -a print service either does or does not support the value. -

      -The API requires every print service -to support certain attributes; -other attributes are optional -and the service can choose whether or not to support them. -Each attribute has a set of values that it accepts. The API -requires every print service to support certain values for -certain attributes; -other attribute values are optional -and the service can choose whether or not to support them. -These support requirements are recorded in the documentation -for each attribute class. -

      -Package javax.print.attribute.standard -contains standard printing attributes -and standard printing attribute values -that are widely used in the printing domain. -A print service vendor -can provide new vendor-specific printing attributes -in addition to the standard ones. -A vendor can also provide -vendor-specific extensions (subclasses) -of the standard printing attributes -- -for example, -to provide additional vendor-specific values -for an existing standard attribute. -Of course, -if a vendor wants clients -to be able to use any added or extended attributes, -the vendor must publish the new attribute classes. -

      -Many of the standard attribute classes extend one of -the abstract syntax classes of the javax.print.attribute package. -These abstract syntax classes each represent a -different type. The -EnumSyntax class, for example, represents a type-safe -enumeration. The abstract syntax class provides a wrapper for the attribute -value. -

      -If an attribute class extends EnumSyntax, and the value of the -attribute is an IPP-compatible value, the attribute's toString -method returns the IPP string representation of the attribute value, such as -"processing-stopped" for the -JobState attribute. However, because the -EnumSyntax class is extensible, vendors can define their own -attribute values. If an attribute uses the EnumSyntax class -and is set to one of these vendor-defined values then the toString - method will not return the IPP string representation of the value. -

      -A printing client application -will typically not need to use -all the printing attribute classes -in package javax.print.attribute.standard, -just the ones that pertain to the application. -

      -The attribute classes in package javax.print.attribute.standard -are based on the Internet Printing Protocol (IPP) attributes -as defined in the Internet RFC document, -RFC 2911 Internet Printing Protocol/1.1: Model and Semantics -dated September 2000. -See RFC 2911 -for more information. -The descriptive text for each attribute class -was taken largely from the above documents. -The above authors' contribution to the API -is gratefully acknowledged. - -

      Attribute Organization

      -There are five kinds of printing attributes: -doc attributes, -print request attributes, -print job attributes, -print service attributes, -and supported-values attributes. - -

      Doc Attributes

      -Doc attributes specify the characteristics of an individual doc -and the print job settings to be applied to an individual doc. -A doc attribute class implements interface -DocAttribute. -A doc attribute can appear in a - -DocAttributeSet. - -

      Print Request Attributes

      -Print request attributes -specify the settings to be applied to a whole print job -and to all the docs in the print job. -A print request attribute class implements interface - -PrintRequestAttribute. -A print request attribute can appear in a - -PrintRequestAttributeSet. - -

      -Some attributes are doc attributes -but not print request attributes -and may only be specified at the doc level. -Some attributes are print request attributes -but not doc attributes -and may only be specified at the Print Request level. -Some attributes are both doc attributes -and print request attributes -and may be specified either at the doc level -or at the Print Request level. -

      -When specified at the doc level, -an attribute applies just to that one doc. -When specified at the Print Request level, -an attribute applies to the whole job, -including all the docs in the job. -However, an attribute specified at the doc level -overrides an attribute in the same category -specified at the Print Request level. - -

      Print Job Attributes

      -Print job attributes report the status of a Print Job. -A print job attribute class implements interface -PrintJobAttribute. -A print job attribute -can appear in a -PrintJobAttributeSet. -

      -Some attributes are both print request attributes -and print job attributes; -a client may include such attributes in a Print Request -to specify characteristics for the ensuing Print Job, -and those attributes then also appear -in the Print Job's attribute set. -Some attributes are print job attributes -but not print request attributes; -the print service itself -adds these attributes to the Print Job's attribute set. - -

      Print Service Attributes

      -Print service attributes report the status -of a print service. -A print service attribute class implements interface - -PrintServiceAttribute. -A print service attribute -can appear in a -PrintServiceAttributeSet. - -

      Supported-Values Attributes

      -A supported-value attribute -indicates the legal values for another attribute -that a print service supports. -A supported-values attribute class implements interface - -SupportedValuesAttribute. -However, supported-values attributes -never appear in attribute sets, -so there is no restricted -AttributeSet -subinterface for them. - -

      Attribute Table

      -The table below lists all the printing attributes. -The table shows the tagging interfaces -each attribute class implements -in addition to interface -Attribute, -thus indicating how each attribute is used in the API. -For each doc attribute and print request attribute, -the column marked "SupportedValuesAttribute" -lists the supported-values attribute class, if any, -with which a print service -indicates the supported values for that attribute category. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Attribute ClassDoc
      Attribute
      Print
      Request
      Attribute
      Print
      Job
      Attribute
      Print
      Service
      Attribute
      SupportedValuesAttribute
      CompressionX    
      DocumentNameX    
      ChromaticityXXX  
      Copies XX CopiesSupported
      FinishingsXXX  
      JobHoldUntil XX  
      JobImpressions XX JobImpressionsSupported
      JobKOctets XX JobKOctetsSupported
      JobMediaSheets XX JobMediaSheetsSupported
      JobName XX  
      JobPriority XX JobPrioritySupported
      JobSheets XX  
      MediaXXX  
      MediaSize     
      MultipleDocumentHandling XX  
      NumberUpXXX NumberUpSupported
      OrientationRequestedXXX  
      PageRangesXXX  
      PresentationDirectionXXX  
      PrinterResolutionXXX  
      PrintQualityXXX  
      RequestingUserName XX  
      SheetCollateXXX  
      SidesXXX  
      DateTimeAtCompleted  X  
      DateTimeAtCreation  X  
      DateTimeAtProcessing  X  
      JobImpressionsCompleted  X  
      JobKOctetsProcessed  X  
      JobMediaSheetsCompleted  X  
      JobMessageFromOperator  X  
      JobOriginatingUserName  X  
      JobState  X  
      JobStateReasons
      Contains zero or more --
        X  
      -- JobStateReason     
      NumberOfDocuments  X  
      NumberOfInterveningJobs  X  
      OutputDeviceAssigned  X  
      ColorSupported   X 
      PagesPerMinute   X 
      PagesPerMinuteColor   X 
      PDLOverrideSupported   X 
      PrinterIsAcceptingJobs   X 
      PrinterInfo   X 
      PrinterLocation   X 
      PrinterMessageFromOperator   X 
      PrinterMakeAndModel   X 
      PrinterMoreInfo   X 
      PrinterMoreInfoManufacturer   X 
      PrinterName   X 
      PrinterState   X 
      PrinterStateReasons
      Contains zero or more --
         X 
      -- PrinterStateReason     
      -- Severity     
      QueuedJobCount   X 
      ReferenceUriSchemesSupported     
      -

      -Please note: In the javax.print APIs, a null reference parameter to methods -is incorrect unless explicitly documented on the method as having a meaningful -interpretation. Usage to the contrary is incorrect coding and may result -in a run time exception either immediately or at some later time. -IllegalArgumentException and NullPointerException are examples of -typical and acceptable run time exceptions for such cases. - -@since 1.4 - - diff --git a/jdk/src/java.desktop/share/classes/javax/print/event/package-info.java b/jdk/src/java.desktop/share/classes/javax/print/event/package-info.java new file mode 100644 index 00000000000..ca65f565da9 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/print/event/package-info.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Package javax.print.event contains event classes and listener interfaces. + *

      + * They may be used to monitor both print services (such as printers going + * on-line & off-line), and the progress of a specific print job. + *

      + * Please note: In the javax.print APIs, a null reference parameter to methods + * is incorrect unless explicitly documented on the method as having a + * meaningful interpretation. Usage to the contrary is incorrect coding and may + * result in a run time exception either immediately or at some later time. + * IllegalArgumentException and NullPointerException are examples of typical and + * acceptable run time exceptions for such cases. + * + * @since 1.4 + */ +package javax.print.event; diff --git a/jdk/src/java.desktop/share/classes/javax/print/event/package.html b/jdk/src/java.desktop/share/classes/javax/print/event/package.html deleted file mode 100644 index 6e49d8b4fda..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/print/event/package.html +++ /dev/null @@ -1,45 +0,0 @@ - - - -javax.print.event package - - - -Package javax.print.event contains event classes and listener interfaces. -

      -They may be used to monitor both print services (such as printers going -on-line & off-line), and the progress of a specific print job. -

      -Please note: In the javax.print APIs, a null reference parameter to methods -is incorrect unless explicitly documented on the method as having a meaningful -interpretation. Usage to the contrary is incorrect coding and may result -in a run time exception either immediately or at some later time. -IllegalArgumentException and NullPointerException are examples of -typical and acceptable run time exceptions for such cases. - -@since 1.4 - - diff --git a/jdk/src/java.desktop/share/classes/javax/print/package-info.java b/jdk/src/java.desktop/share/classes/javax/print/package-info.java new file mode 100644 index 00000000000..0cdc7643ec6 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/print/package-info.java @@ -0,0 +1,133 @@ +/* + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides the principal classes and interfaces for the Java™ Print + * Service API. The Java Print Service API enables client and server + * applications to: + *

        + *
      • Discover and select print services based on their capabilities
      • + *
      • Specify the format of print data
      • + *
      • Submit print jobs to services that support the document type to be + * printed.
      • + *
      + * + *

      Print Service Discovery

      + * An application invokes the static methods of the abstract class + * {@link javax.print.PrintServiceLookup PrintServiceLookup} to locate print + * services that have the capabilities to satisfy the application's print + * request. For example, to print a double-sided document, the application first + * needs to find printers that have the double-sided printing capability. + *

      + * The JDK includes {@code PrintServiceLookup} implementations that can locate + * the standard platform printers. To locate other types of printers, such as + * IPP printers or JINI printers, a print-service provider can write + * implementations of {@code PrintServiceLookup}. The print-service provider can + * dynamically install these {@code PrintServiceLookup} implementations using + * the + * SPI JAR file specification. + * + *

      Attribute Definitions

      + * The {@link javax.print.attribute} and {@link javax.print.attribute.standard} + * packages define print attributes, which describe the capabilities of a print + * service, specify the requirements of a print job, and track the progress of + * a print job. + *

      + * The {@code javax.print.attribute} package describes the types of attributes + * and how they can be collected into sets. The + * {@code javax.print.attribute.standard} package enumerates all of the standard + * attributes supported by the API, most of which are implementations of + * attributes specified in the IETF Specification, + * RFC 2911 Internet Printing + * Protocol, 1.1: Model and Semantics, dated September 2000. The attributes + * specified in {@code javax.print.attribute.standard} include common + * capabilities, such as: resolution, copies, media sizes, job priority, and + * page ranges. + * + *

      Document Type Specification

      + * The {@link javax.print.DocFlavor DocFlavor} class represents the print data + * format, such as JPEG or PostScript. A {@code DocFlavor} object consists of a + * MIME type, which describes the format, and a document representation class + * name that indicates how the document is delivered to the printer or output + * stream. An application uses the {@code DocFlavor} and an attribute set to + * find printers that can print the document type specified by the + * {@code DocFlavor} and have the capabilities specified by the attribute set. + * + *

      Using the API

      + * A typical application using the Java Print Service API performs these steps + * to process a print request: + *
        + *
      1. Chooses a {@code DocFlavor}.
      2. + *
      3. Creates a set of attributes.
      4. + *
      5. Locates a print service that can handle the print request as + * specified by the {@code DocFlavor} and the attribute set.
      6. + *
      7. Creates a {@link javax.print.Doc Doc} object encapsulating the + * {@code DocFlavor} and the actual print data, which can take many forms + * including: a Postscript file, a JPEG image, a URL, or plain text.
      8. + *
      9. Gets a print job, represented by + * {@link javax.print.DocPrintJob DocPrintJob}, from the print service.
      10. + *
      11. Calls the print method of the print job.
      12. + *
      + * The following code sample demonstrates a typical use of the Java Print + * Service API: locating printers that can print five double-sided copies of a + * Postscript document on size A4 paper, creating a print job from one of the + * returned print services, and calling print. + *
      + *
      {@code
      + * FileInputStream psStream;
      + * try {
      + *     psStream = new FileInputStream("file.ps");
      + * } catch (FileNotFoundException ffne) {
      + * }
      + * if (psStream == null) {
      + *     return;
      + * }
      + * DocFlavor psInFormat = DocFlavor.INPUT_STREAM.POSTSCRIPT;
      + * Doc myDoc = new SimpleDoc(psStream, psInFormat, null);
      + * PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
      + * aset.add(new Copies(5));
      + * aset.add(MediaSizeName.ISO_A4);
      + * aset.add(Sides.DUPLEX);
      + * PrintService[] services =
      + * PrintServiceLookup.lookupPrintServices(psInFormat, aset);
      + * if (services.length > 0) {
      + *     DocPrintJob job = services[0].createPrintJob();
      + *     try {
      + *         job.print(myDoc, aset);
      + *     } catch (PrintException pe) {}
      + * }
      + * }
      + *
      + *

      + * Please note: In the javax.print APIs, a null reference parameter to methods + * is incorrect unless explicitly documented on the method as having a + * meaningful interpretation. Usage to the contrary is incorrect coding and may + * result in a run time exception either immediately or at some later time. + * IllegalArgumentException and NullPointerException are examples of typical and + * acceptable run time exceptions for such cases. + * + * @since 1.4 + */ +package javax.print; diff --git a/jdk/src/java.desktop/share/classes/javax/print/package.html b/jdk/src/java.desktop/share/classes/javax/print/package.html deleted file mode 100644 index e306ac6d77c..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/print/package.html +++ /dev/null @@ -1,147 +0,0 @@ - - - -javax.print package - - - -Provides the principal classes and interfaces for the -JavaTM Print Service API. -The Java Print Service API enables client and server applications to: -

        -
      • Discover and select print services based on their capabilities -
      • Specify the format of print data -
      • Submit print jobs to services that support the document type to -be printed. -
      - - -

      Print Service Discovery

      -

      -An application invokes the static methods of the abstract class -{@link javax.print.PrintServiceLookup PrintServiceLookup} to locate print -services that have the capabilities to satisfy the application's print -request. For example, to print a double-sided document, the application -first needs to find printers that have the double-sided printing capability. -

      -The JDK includes PrintServiceLookup implementations that -can locate the standard platform printers. To locate other types of printers, -such as IPP printers or JINI printers, a print-service provider can write -implementations of PrintServiceLookup. The print-service provider -can dynamically install these PrintServiceLookup implementations -using the - -SPI JAR file specification. - -

      Attribute Definitions

      - -The {@link javax.print.attribute} and {@link javax.print.attribute.standard} -packages define print attributes, which describe the capabilities of a print -service, specify the requirements of a print job, and track the progress of -a print job. -

      -The javax.print.attribute package describes the types of attributes and -how they can be collected into sets. The javax.print.attribute.standard -package enumerates all of the standard attributes supported by the API, most -of which are implementations of attributes specified in the IETF Specification, - -RFC 2911 Internet Printing Protocol, 1.1: Model and Semantics, dated -September 2000. The attributes specified in javax.print.attribute.standard -include common capabilities, such as: resolution, copies, media sizes, -job priority, and page ranges. - -

      Document Type Specification

      - -The {@link javax.print.DocFlavor DocFlavor} class represents the print data -format, such as JPEG or PostScript. A DocFlavor object -consists of a MIME type, which describes the format, and a document -representation class name that indicates how the document is delivered -to the printer or output stream. An application uses the -DocFlavor and an attribute set to find printers that can -print the document type specified by the DocFlavor and have -the capabilities specified by the attribute set. - -

      Using the API

      - -A typical application using the Java Print Service API performs these steps -to process a print request: -
        -
      1. Chooses a DocFlavor.
      2. -
      3. Creates a set of attributes.
      4. -
      5. Locates a print service that can handle the print request as specified -by the DocFlavor and the attribute set.
      6. -
      7. Creates a {@link javax.print.Doc Doc} object encapsulating the -DocFlavor -and the actual print data, which can take many forms including: a Postscript -file, a JPEG image, a URL, or plain text.
      8. -
      9. Gets a print job, represented by {@link javax.print.DocPrintJob DocPrintJob}, - from the print service.
      10. -
      11. Calls the print method of the print job.
      12. -
      -The following code sample demonstrates a typical use of the Java Print -Service API: locating printers that can print five double-sided copies -of a Postscript document on size A4 paper, creating a print job from -one of the returned print services, and calling print. - -
      -
      -FileInputStream psStream;
      -try {
      -   psStream = new FileInputStream("file.ps");
      -} catch (FileNotFoundException ffne) {
      -}
      -if (psStream == null) {
      -    return;
      -}
      -
      -DocFlavor psInFormat = DocFlavor.INPUT_STREAM.POSTSCRIPT;
      -Doc myDoc = new SimpleDoc(psStream, psInFormat, null);  
      -PrintRequestAttributeSet aset = 
      -	new HashPrintRequestAttributeSet();
      -aset.add(new Copies(5));
      -aset.add(MediaSizeName.ISO_A4);
      -aset.add(Sides.DUPLEX);
      -PrintService[] services = 
      -  PrintServiceLookup.lookupPrintServices(psInFormat, aset);
      -if (services.length > 0) {
      -   DocPrintJob job = services[0].createPrintJob();
      -   try {
      -	job.print(myDoc, aset);
      -   } catch (PrintException pe) {}
      -}
      -
      -
      -

      -Please note: In the javax.print APIs, a null reference parameter to methods -is incorrect unless explicitly documented on the method as having a meaningful -interpretation. Usage to the contrary is incorrect coding and may result -in a run time exception either immediately or at some later time. -IllegalArgumentException and NullPointerException are examples of -typical and acceptable run time exceptions for such cases. - -@since 1.4 - - diff --git a/jdk/src/java.desktop/share/classes/javax/sound/midi/package-info.java b/jdk/src/java.desktop/share/classes/javax/sound/midi/package-info.java new file mode 100644 index 00000000000..6b9d0f18733 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/sound/midi/package-info.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI + * (Musical Instrument Digital Interface) data. + * + *

      Related Documentation

      + * For overviews, tutorials, examples, and guides, please see: + * + * + * @since 1.3 + */ +package javax.sound.midi; diff --git a/jdk/src/java.desktop/share/classes/javax/sound/midi/package.html b/jdk/src/java.desktop/share/classes/javax/sound/midi/package.html deleted file mode 100644 index 247e6f5fd78..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/sound/midi/package.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - -Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI -(Musical Instrument Digital Interface) data. - -

      Related Documentation

      - -For overviews, tutorials, examples, and guides, -please see: - - - -@since 1.3 - - diff --git a/jdk/src/java.desktop/share/classes/javax/sound/midi/spi/package-info.java b/jdk/src/java.desktop/share/classes/javax/sound/midi/spi/package-info.java new file mode 100644 index 00000000000..3291c84a4be --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/sound/midi/spi/package-info.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Supplies interfaces for service providers to implement when offering new MIDI + * devices, MIDI file readers and writers, or sound bank readers. + * + *

      Related Documentation

      + * For overviews, tutorials, examples, and guides, please see: + * + * + * @since 1.3 + */ +package javax.sound.midi.spi; diff --git a/jdk/src/java.desktop/share/classes/javax/sound/midi/spi/package.html b/jdk/src/java.desktop/share/classes/javax/sound/midi/spi/package.html deleted file mode 100644 index 6101ded4c1e..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/sound/midi/spi/package.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - -Supplies interfaces for service providers to implement when -offering new MIDI devices, MIDI file readers and writers, or sound bank readers. - - -

      Related Documentation

      - -For overviews, tutorials, examples, and guides, -please see: - - - -@since 1.3 - - diff --git a/jdk/src/java.desktop/share/classes/javax/sound/sampled/package-info.java b/jdk/src/java.desktop/share/classes/javax/sound/sampled/package-info.java new file mode 100644 index 00000000000..c4ae9e0ac75 --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/sound/sampled/package-info.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Provides interfaces and classes for capture, processing, and playback of + * sampled audio data. + * + *

      Related Documentation

      + * For overviews, tutorials, examples, and guides, please see: + * + * + * @since 1.3 + */ +package javax.sound.sampled; diff --git a/jdk/src/java.desktop/share/classes/javax/sound/sampled/package.html b/jdk/src/java.desktop/share/classes/javax/sound/sampled/package.html deleted file mode 100644 index f5c00c27767..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/sound/sampled/package.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - -Provides interfaces and classes for capture, processing, and playback of sampled audio data. - - - -

      Related Documentation

      - -For overviews, tutorials, examples, and guides, -please see: - - - -@since 1.3 - - diff --git a/jdk/src/java.desktop/share/classes/javax/sound/sampled/spi/package-info.java b/jdk/src/java.desktop/share/classes/javax/sound/sampled/spi/package-info.java new file mode 100644 index 00000000000..ad81b935dbe --- /dev/null +++ b/jdk/src/java.desktop/share/classes/javax/sound/sampled/spi/package-info.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Supplies abstract classes for service providers to subclass when offering new + * audio devices, sound file readers and writers, or audio format converters. + * + *

      Related Documentation

      + * For overviews, tutorials, examples, and guides, please see: + * + * + * @since 1.3 + */ +package javax.sound.sampled.spi; diff --git a/jdk/src/java.desktop/share/classes/javax/sound/sampled/spi/package.html b/jdk/src/java.desktop/share/classes/javax/sound/sampled/spi/package.html deleted file mode 100644 index 93db4a2a9e0..00000000000 --- a/jdk/src/java.desktop/share/classes/javax/sound/sampled/spi/package.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - -Supplies abstract classes for service providers to subclass when -offering new audio devices, sound file readers and writers, or audio format converters. - - -

      Related Documentation

      - -For overviews, tutorials, examples, and guides, -please see: - - - -@since 1.3 - - From ce4a8c41dbe0c42b6cf3d3d8b77391c4d4270875 Mon Sep 17 00:00:00 2001 From: Alexander Scherbatiy Date: Mon, 6 Mar 2017 08:06:54 +0300 Subject: [PATCH 356/447] 8176097: Window set location to a display with different DPI does not properly work 8173972: createScreenCapture not working as expected on multimonitor setup with different DPI scales Reviewed-by: serb, azvegint --- .../share/classes/java/awt/Robot.java | 13 +- .../classes/sun/swing/SwingUtilities2.java | 29 ++ .../classes/sun/awt/windows/WWindowPeer.java | 34 +++ .../RobotMultiDPIScreenTest.java | 269 ++++++++++++++++++ .../WindowResizingOnSetLocationTest.java | 152 +++++++--- 5 files changed, 461 insertions(+), 36 deletions(-) create mode 100644 jdk/test/java/awt/Robot/HiDPIScreenCapture/RobotMultiDPIScreenTest.java diff --git a/jdk/src/java.desktop/share/classes/java/awt/Robot.java b/jdk/src/java.desktop/share/classes/java/awt/Robot.java index d55a0e07fda..1f24684d093 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/Robot.java +++ b/jdk/src/java.desktop/share/classes/java/awt/Robot.java @@ -41,6 +41,7 @@ import sun.awt.AWTPermissions; import sun.awt.ComponentFactory; import sun.awt.SunToolkit; import sun.awt.image.SunWritableRaster; +import sun.swing.SwingUtilities2; /** * This class is used to generate native system input events @@ -499,9 +500,15 @@ public class Robot { // need to sync the toolkit prior to grabbing the pixels since in some // cases rendering to the screen may be delayed Toolkit.getDefaultToolkit().sync(); - AffineTransform tx = GraphicsEnvironment. - getLocalGraphicsEnvironment().getDefaultScreenDevice(). - getDefaultConfiguration().getDefaultTransform(); + + GraphicsConfiguration gc = GraphicsEnvironment + .getLocalGraphicsEnvironment() + .getDefaultScreenDevice(). + getDefaultConfiguration(); + gc = SwingUtilities2.getGraphicsConfigurationAtPoint( + gc, screenRect.getCenterX(), screenRect.getCenterY()); + + AffineTransform tx = gc.getDefaultTransform(); double uiScaleX = tx.getScaleX(); double uiScaleY = tx.getScaleY(); int pixels[]; diff --git a/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java b/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java index 015fb7e05b9..e3e4e79eed3 100644 --- a/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java +++ b/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java @@ -2196,6 +2196,35 @@ public class SwingUtilities2 { return UIManager.getBoolean(key); } + /** + * + * Returns the graphics configuration which bounds contain the given + * point + * + * @param current the default configuration which is checked in the first place + * @param x the x coordinate of the given point + * @param y the y coordinate of the given point + * @return the graphics configuration + */ + public static GraphicsConfiguration getGraphicsConfigurationAtPoint(GraphicsConfiguration current, double x, double y) { + + if (current.getBounds().contains(x, y)) { + return current; + } + + GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); + GraphicsDevice[] devices = env.getScreenDevices(); + + for (GraphicsDevice device : devices) { + GraphicsConfiguration config = device.getDefaultConfiguration(); + if (config.getBounds().contains(x, y)) { + return config; + } + } + + return current; + } + /** * Used to listen to "blit" repaints in RepaintManager. */ diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java index a65018d4a17..d1a296495f5 100644 --- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java +++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java @@ -38,6 +38,7 @@ import java.awt.geom.AffineTransform; import sun.awt.*; import sun.java2d.pipe.Region; +import sun.swing.SwingUtilities2; public class WWindowPeer extends WPanelPeer implements WindowPeer, DisplayChangedListener @@ -630,9 +631,42 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer, sysW = width; sysH = height; + int cx = x + width / 2; + int cy = y + height / 2; + GraphicsConfiguration current = getGraphicsConfiguration(); + GraphicsConfiguration other = SwingUtilities2.getGraphicsConfigurationAtPoint(current, cx, cy); + if (!current.equals(other)) { + AffineTransform tx = other.getDefaultTransform(); + double otherScaleX = tx.getScaleX(); + double otherScaleY = tx.getScaleY(); + initScales(); + if (scaleX != otherScaleX || scaleY != otherScaleY) { + x = (int) Math.floor(x * otherScaleX / scaleX); + y = (int) Math.floor(y * otherScaleY / scaleY); + } + } + super.setBounds(x, y, width, height, op); } + private final void initScales() { + + if (scaleX >= 1 && scaleY >= 1) { + return; + } + + GraphicsConfiguration gc = getGraphicsConfiguration(); + if (gc instanceof Win32GraphicsConfig) { + Win32GraphicsDevice gd = ((Win32GraphicsConfig) gc).getDevice(); + scaleX = gd.getDefaultScaleX(); + scaleY = gd.getDefaultScaleY(); + } else { + AffineTransform tx = gc.getDefaultTransform(); + scaleX = (float) tx.getScaleX(); + scaleY = (float) tx.getScaleY(); + } + } + @Override public void print(Graphics g) { // We assume we print the whole frame, diff --git a/jdk/test/java/awt/Robot/HiDPIScreenCapture/RobotMultiDPIScreenTest.java b/jdk/test/java/awt/Robot/HiDPIScreenCapture/RobotMultiDPIScreenTest.java new file mode 100644 index 00000000000..53ece717632 --- /dev/null +++ b/jdk/test/java/awt/Robot/HiDPIScreenCapture/RobotMultiDPIScreenTest.java @@ -0,0 +1,269 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.awt.BasicStroke; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.GraphicsConfiguration; +import java.awt.GraphicsDevice; +import java.awt.GraphicsEnvironment; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Image; +import java.awt.Rectangle; +import java.awt.Robot; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.awt.geom.AffineTransform; +import java.awt.image.BufferedImage; +import java.awt.image.MultiResolutionImage; +import java.util.List; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.JTextArea; +import javax.swing.SwingUtilities; + +/* @test + * @bug 8173972 + * @summary createScreenCapture not working as expected on multimonitor setup + * with different DPI scales. + * @run main/manual/othervm RobotMultiDPIScreenTest + */ +public class RobotMultiDPIScreenTest { + + private static volatile boolean testResult = false; + private static volatile CountDownLatch countDownLatch; + private static JFrame mainFrame; + private static Rectangle maxBounds; + private static Rectangle[] screenBounds; + private static double[][] scales; + + private static final String INSTRUCTIONS = "INSTRUCTIONS:\n" + + "Verify that screenshots are properly taken from monitors" + + " with different DPI.\n" + + "\n" + + "The test is applicable for a multi-monitor system where displays" + + " are configured to have different DPI\n" + + "\n" + + "1. Press Take Screenshots button\n" + + "Check that screenshots shown on the panel are properly taken.\n"; + + public static void main(String args[]) throws Exception { + + countDownLatch = new CountDownLatch(1); + SwingUtilities.invokeLater(RobotMultiDPIScreenTest::createUI); + countDownLatch.await(15, TimeUnit.MINUTES); + if (!testResult) { + throw new RuntimeException("Test fails!"); + } + } + + private static void createUI() { + + initScreenBounds(); + + mainFrame = new JFrame("DPI change test"); + GridBagLayout layout = new GridBagLayout(); + JPanel mainControlPanel = new JPanel(layout); + JPanel resultButtonPanel = new JPanel(layout); + + GridBagConstraints gbc = new GridBagConstraints(); + + JPanel testPanel = new JPanel(new BorderLayout()); + + final BufferedImage screensImage = getScreenImages(); + final JPanel screensPanel = new JPanel() { + + @Override + public void paint(Graphics g) { + super.paint(g); + g.drawImage(screensImage, 0, 0, getWidth(), getHeight(), this); + } + }; + + screensPanel.setPreferredSize(new Dimension(400, 200)); + + JButton frameButton = new JButton("Take Screenshots"); + frameButton.addActionListener((e) -> { + + try { + Robot robot = new Robot(); + Graphics2D g = screensImage.createGraphics(); + g.translate(-maxBounds.x, -maxBounds.y); + + for (Rectangle rect : screenBounds) { + MultiResolutionImage mrImage = robot.createMultiResolutionScreenCapture(rect); + + List resolutionVariants = mrImage.getResolutionVariants(); + Image rvImage = resolutionVariants.get(resolutionVariants.size() - 1); + g.drawImage(rvImage, rect.x, rect.y, rect.width, rect.height, null); + } + + g.dispose(); + screensPanel.repaint(); + } catch (Exception ex) { + throw new RuntimeException(ex); + } + }); + + testPanel.add(screensPanel, BorderLayout.CENTER); + testPanel.add(frameButton, BorderLayout.SOUTH); + + gbc.gridx = 0; + gbc.gridy = 0; + gbc.fill = GridBagConstraints.HORIZONTAL; + mainControlPanel.add(testPanel, gbc); + + JTextArea instructionTextArea = new JTextArea(); + instructionTextArea.setText(INSTRUCTIONS); + instructionTextArea.setEditable(false); + instructionTextArea.setBackground(Color.white); + + gbc.gridx = 0; + gbc.gridy = 1; + gbc.fill = GridBagConstraints.HORIZONTAL; + mainControlPanel.add(instructionTextArea, gbc); + + JButton passButton = new JButton("Pass"); + passButton.setActionCommand("Pass"); + passButton.addActionListener((ActionEvent e) -> { + testResult = true; + disposeFrames(); + countDownLatch.countDown(); + + }); + + JButton failButton = new JButton("Fail"); + failButton.setActionCommand("Fail"); + failButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + disposeFrames(); + countDownLatch.countDown(); + } + }); + + gbc.gridx = 0; + gbc.gridy = 0; + resultButtonPanel.add(passButton, gbc); + + gbc.gridx = 1; + gbc.gridy = 0; + resultButtonPanel.add(failButton, gbc); + + gbc.gridx = 0; + gbc.gridy = 2; + mainControlPanel.add(resultButtonPanel, gbc); + + mainFrame.add(mainControlPanel); + mainFrame.pack(); + + mainFrame.addWindowListener(new WindowAdapter() { + + @Override + public void windowClosing(WindowEvent e) { + disposeFrames(); + countDownLatch.countDown(); + } + }); + mainFrame.setVisible(true); + } + + private static void disposeFrames() { + if (mainFrame != null && mainFrame.isVisible()) { + mainFrame.dispose(); + } + } + + static void initScreenBounds() { + + GraphicsDevice[] devices = GraphicsEnvironment + .getLocalGraphicsEnvironment() + .getScreenDevices(); + + screenBounds = new Rectangle[devices.length]; + scales = new double[devices.length][2]; + for (int i = 0; i < devices.length; i++) { + GraphicsConfiguration gc = devices[i].getDefaultConfiguration(); + screenBounds[i] = gc.getBounds(); + AffineTransform tx = gc.getDefaultTransform(); + scales[i][0] = tx.getScaleX(); + scales[i][1] = tx.getScaleY(); + } + + maxBounds = screenBounds[0]; + for (int i = 0; i < screenBounds.length; i++) { + maxBounds = maxBounds.union(screenBounds[i]); + } + } + + private static Rectangle getCenterRect(Rectangle rect) { + int w = rect.width / 2; + int h = rect.height / 2; + int x = rect.x + w / 2; + int y = rect.y + h / 2; + + return new Rectangle(x, y, w, h); + } + + static BufferedImage getScreenImages() { + + final BufferedImage img = new BufferedImage(maxBounds.width, maxBounds.height, BufferedImage.TYPE_INT_RGB); + Graphics2D g = img.createGraphics(); + g.setColor(Color.WHITE); + g.fillRect(0, 0, maxBounds.width, maxBounds.height); + g.translate(-maxBounds.x, -maxBounds.y); + + g.setStroke(new BasicStroke(8f)); + for (int i = 0; i < screenBounds.length; i++) { + Rectangle r = screenBounds[i]; + g.setColor(Color.BLACK); + g.drawRect(r.x, r.y, r.width, r.height); + + g.setColor(Color.ORANGE); + Rectangle cr = getCenterRect(r); + g.fillRect(cr.x, cr.y, cr.width, cr.height); + + double scaleX = scales[i][0]; + double scaleY = scales[i][1]; + float fontSize = maxBounds.height / 7; + g.setFont(g.getFont().deriveFont(fontSize)); + g.setColor(Color.BLUE); + g.drawString(String.format("Scale: [%2.1f, %2.1f]", scaleX, scaleY), + r.x + r.width / 8, r.y + r.height / 2); + + } + + g.dispose(); + + return img; + } +} diff --git a/jdk/test/java/awt/Window/WindowResizingOnDPIChanging/WindowResizingOnSetLocationTest.java b/jdk/test/java/awt/Window/WindowResizingOnDPIChanging/WindowResizingOnSetLocationTest.java index 4f79da82bca..cd6fa58b2a8 100644 --- a/jdk/test/java/awt/Window/WindowResizingOnDPIChanging/WindowResizingOnSetLocationTest.java +++ b/jdk/test/java/awt/Window/WindowResizingOnDPIChanging/WindowResizingOnSetLocationTest.java @@ -21,7 +21,10 @@ * questions. */ +import java.awt.BasicStroke; +import java.awt.BorderLayout; import java.awt.Color; +import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; import java.awt.Graphics; @@ -49,15 +52,15 @@ import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import javax.swing.JButton; +import javax.swing.JComponent; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JTextArea; import javax.swing.SwingUtilities; /* @test - * @bug 8175293 - * @summary HiDPI (Windows): Swing components have incorrect sizes after - * changing display resolution + * @bug 8175293 8176097 + * @summary Window set location to a display with different DPI does not properly work * @run main/manual/othervm WindowResizingOnSetLocationTest */ public class WindowResizingOnSetLocationTest { @@ -66,6 +69,10 @@ public class WindowResizingOnSetLocationTest { private static volatile CountDownLatch countDownLatch; private static TestFrame frame; private static JFrame mainFrame; + private static Rectangle[] screenBounds; + private static double[][] scales; + private static int screen1 = -1; + private static int screen2 = -1; private static final String INSTRUCTIONS = "INSTRUCTIONS:\n" + "Verify that a window is properly resized after setting the location" @@ -75,7 +82,10 @@ public class WindowResizingOnSetLocationTest { + " are configured to have different DPI\n" + "\n" + "1. Press Show Frame button\n" - + "The frame appear.\n" + + " (note that the button is disabled in case there are no two monitors" + + " with different DPI)\n" + + "The frame should appear in the center of the display (either" + + " on the first or on the second).\n" + "2. Check that the string \"scales [ScaleX, ScaleY]\" is painted on the window" + " where ScaleX and ScaleY are the scales for current display.\n" + "The scales are calculated as DPI / 96 and are 1 for the DPI value 96" @@ -86,7 +96,6 @@ public class WindowResizingOnSetLocationTest { + " to show the right display scales.\n" + "6. Check that the window is properly resized.\n" + "7. Check that the window is properly repainted and does not contain drawing artifacts\n" - + "Try different display positions (left, right, top, bottom).\n" + "If all tests are passed, press PASS, else press FAIL.\n"; public static void main(String args[]) throws Exception { @@ -101,6 +110,8 @@ public class WindowResizingOnSetLocationTest { private static void createUI() { + initScreenBounds(); + mainFrame = new JFrame("DPI change test"); GridBagLayout layout = new GridBagLayout(); JPanel mainControlPanel = new JPanel(layout); @@ -108,20 +119,22 @@ public class WindowResizingOnSetLocationTest { GridBagConstraints gbc = new GridBagConstraints(); - JPanel testPanel = new JPanel(new FlowLayout()); + JPanel testPanel = new JPanel(new BorderLayout()); JButton frameButton = new JButton("Show Frame"); frameButton.addActionListener((e) -> { - int x = 20; - int y = 10; - int w = 400; - int h = 300; + GraphicsConfiguration gc = GraphicsEnvironment + .getLocalGraphicsEnvironment() + .getScreenDevices()[screen1] + .getDefaultConfiguration(); - frame = new TestFrame(w, h); - frame.setLocation(x, y); + Rectangle rect = getCenterRect(screenBounds[screen2]); + frame = new TestFrame(gc, rect); frame.setVisible(true); }); - testPanel.add(frameButton); + frameButton.setEnabled(screen1 != -1 && screen2 != -1); + testPanel.add(getDisplaysComponent(), BorderLayout.CENTER); + testPanel.add(frameButton, BorderLayout.SOUTH); gbc.gridx = 0; gbc.gridy = 0; @@ -193,14 +206,99 @@ public class WindowResizingOnSetLocationTest { } } + static void initScreenBounds() { + + GraphicsDevice[] devices = GraphicsEnvironment + .getLocalGraphicsEnvironment() + .getScreenDevices(); + + screenBounds = new Rectangle[devices.length]; + scales = new double[devices.length][2]; + for (int i = 0; i < devices.length; i++) { + GraphicsConfiguration gc = devices[i].getDefaultConfiguration(); + screenBounds[i] = gc.getBounds(); + AffineTransform tx = gc.getDefaultTransform(); + scales[i][0] = tx.getScaleX(); + scales[i][1] = tx.getScaleY(); + } + + for (int i = 0; i < devices.length; i++) { + for (int j = i + 1; j < devices.length; j++) { + if (scales[i][0] != scales[j][0] || scales[i][1] != scales[j][1]) { + screen1 = i; + screen2 = j; + } + } + } + } + + private static Rectangle getCenterRect(Rectangle rect) { + int w = rect.width / 2; + int h = rect.height / 2; + int x = rect.x + w / 2; + int y = rect.y + h / 2; + + return new Rectangle(x, y, w, h); + } + + static JComponent getDisplaysComponent() { + + Rectangle rect = screenBounds[0]; + for (int i = 0; i < screenBounds.length; i++) { + rect = rect.union(screenBounds[i]); + } + + final BufferedImage img = new BufferedImage(rect.width, rect.height, BufferedImage.TYPE_INT_RGB); + Graphics2D g = img.createGraphics(); + g.setColor(Color.WHITE); + g.fillRect(0, 0, rect.width, rect.height); + g.translate(-rect.x, -rect.y); + + g.setStroke(new BasicStroke(8f)); + for (int i = 0; i < screenBounds.length; i++) { + Rectangle r = screenBounds[i]; + g.setColor(Color.BLACK); + g.drawRect(r.x, r.y, r.width, r.height); + + g.setColor(Color.ORANGE); + Rectangle cr = getCenterRect(r); + g.fillRect(cr.x, cr.y, cr.width, cr.height); + + double scaleX = scales[i][0]; + double scaleY = scales[i][1]; + float fontSize = rect.height / 7; + g.setFont(g.getFont().deriveFont(fontSize)); + g.setColor(Color.BLUE); + g.drawString(String.format("Scale: [%2.1f, %2.1f]", scaleX, scaleY), + r.x + r.width / 8, r.y + r.height / 2); + + } + + g.dispose(); + + JPanel panel = new JPanel() { + + @Override + public void paint(Graphics g) { + super.paint(g); + g.drawImage(img, 0, 0, getWidth(), getHeight(), this); + + } + }; + + panel.setPreferredSize(new Dimension(400, 200)); + + return panel; + } + static class TestFrame extends JFrame { private final TestMultiResolutionImage mrImage; - public TestFrame(int width, int height) throws HeadlessException { - super("Test Frame"); - setSize(width, height); - mrImage = new TestMultiResolutionImage(width, height); + public TestFrame(GraphicsConfiguration gc, Rectangle rect) throws HeadlessException { + super(gc); + setBounds(rect); + mrImage = new TestMultiResolutionImage(rect.width, rect.height); JPanel panel = new JPanel(new FlowLayout()) { @Override @@ -217,29 +315,17 @@ public class WindowResizingOnSetLocationTest { JButton button = new JButton("Move to another display"); button.addActionListener((e) -> { GraphicsConfiguration config = getGraphicsConfiguration(); - GraphicsDevice device = config.getDevice(); GraphicsDevice[] devices = GraphicsEnvironment .getLocalGraphicsEnvironment() .getScreenDevices(); - boolean found = false; - for (GraphicsDevice dev : devices) { - if (!dev.equals(device)) { - found = true; - Rectangle bounds = dev.getDefaultConfiguration().getBounds(); - AffineTransform tx = config.getDefaultTransform(); - int x = (int) Math.round(bounds.x / tx.getScaleX()) + 15; - int y = (int) Math.round(bounds.y / tx.getScaleY()) + 15; - frame.setLocation(x, y); - break; - } - } + int index = devices[screen1].getDefaultConfiguration().equals(config) + ? screen2 : screen1; - if (!found) { - System.out.println("Another display not found!"); - } + Rectangle r = getCenterRect(screenBounds[index]); + frame.setBounds(r); }); panel.add(button); From 153f51d64f0a942341954cf866bd2376ce64f3ee Mon Sep 17 00:00:00 2001 From: Amy Lu Date: Mon, 6 Mar 2017 13:43:19 +0800 Subject: [PATCH 357/447] 8176182: 4 security tests are not run Reviewed-by: weijun --- jdk/test/ProblemList.txt | 2 ++ jdk/test/sun/security/ec/SignedObjectChain.java | 5 +++-- jdk/test/sun/security/mscapi/SignedObjectChain.java | 5 +++-- jdk/test/sun/security/rsa/SignedObjectChain.java | 5 +++-- jdk/test/sun/security/ssl/rsa/SignedObjectChain.java | 5 +++-- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt index 09466ea6af0..820caaa3cc0 100644 --- a/jdk/test/ProblemList.txt +++ b/jdk/test/ProblemList.txt @@ -215,6 +215,8 @@ sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java 8026393 generic- javax/net/ssl/DTLS/PacketLossRetransmission.java 8169086 macosx-x64 javax/net/ssl/DTLS/RespondToRetransmit.java 8169086 macosx-x64 +sun/security/mscapi/SignedObjectChain.java 8176183 windows-all + ############################################################################ # jdk_sound diff --git a/jdk/test/sun/security/ec/SignedObjectChain.java b/jdk/test/sun/security/ec/SignedObjectChain.java index 6e93053a776..7c320c0ba27 100644 --- a/jdk/test/sun/security/ec/SignedObjectChain.java +++ b/jdk/test/sun/security/ec/SignedObjectChain.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,8 +24,9 @@ /* * @test * @bug 8050374 - * @compile ../../../java/security/SignedObject/Chain.java * @summary Verify a chain of signed objects + * @compile ../../../java/security/SignedObject/Chain.java + * @run main SignedObjectChain */ public class SignedObjectChain { diff --git a/jdk/test/sun/security/mscapi/SignedObjectChain.java b/jdk/test/sun/security/mscapi/SignedObjectChain.java index d436612798f..0c5a4098510 100644 --- a/jdk/test/sun/security/mscapi/SignedObjectChain.java +++ b/jdk/test/sun/security/mscapi/SignedObjectChain.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,9 +24,10 @@ /* * @test * @bug 8050374 + * @summary Verify a chain of signed objects * @compile ../../../java/security/SignedObject/Chain.java * @requires os.family == "windows" - * @summary Verify a chain of signed objects + * @run main SignedObjectChain */ public class SignedObjectChain { diff --git a/jdk/test/sun/security/rsa/SignedObjectChain.java b/jdk/test/sun/security/rsa/SignedObjectChain.java index 7bda7cd4df6..cc41d179b1f 100644 --- a/jdk/test/sun/security/rsa/SignedObjectChain.java +++ b/jdk/test/sun/security/rsa/SignedObjectChain.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,8 +24,9 @@ /* * @test * @bug 8050374 - * @compile ../../../java/security/SignedObject/Chain.java * @summary Verify a chain of signed objects + * @compile ../../../java/security/SignedObject/Chain.java + * @run main SignedObjectChain */ public class SignedObjectChain { diff --git a/jdk/test/sun/security/ssl/rsa/SignedObjectChain.java b/jdk/test/sun/security/ssl/rsa/SignedObjectChain.java index ba4b00c56d8..212384ac5bd 100644 --- a/jdk/test/sun/security/ssl/rsa/SignedObjectChain.java +++ b/jdk/test/sun/security/ssl/rsa/SignedObjectChain.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,8 +24,9 @@ /* * @test * @bug 8050374 - * @compile ../../../../java/security/SignedObject/Chain.java * @summary Verify a chain of signed objects + * @compile ../../../../java/security/SignedObject/Chain.java + * @run main SignedObjectChain */ public class SignedObjectChain { From b7c3f6ef9492acfc76500a3c869ab8fbd3e5261f Mon Sep 17 00:00:00 2001 From: Amy Lu Date: Mon, 6 Mar 2017 15:58:17 +0800 Subject: [PATCH 358/447] 8176187: jdk/internal/misc/JavaLangAccess/NewUnsafeString.java is not run Reviewed-by: alanb --- jdk/test/ProblemList.txt | 2 ++ jdk/test/jdk/internal/misc/JavaLangAccess/NewUnsafeString.java | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt index 820caaa3cc0..0b5aa8f4372 100644 --- a/jdk/test/ProblemList.txt +++ b/jdk/test/ProblemList.txt @@ -125,6 +125,8 @@ java/beans/Introspector/8132566/OverrideUserDefPropertyInfoTest.java 8132565 gen java/lang/StringCoding/CheckEncodings.sh 7008363 generic-all +jdk/internal/misc/JavaLangAccess/NewUnsafeString.java 8176188 generic-all + ############################################################################ # jdk_instrument diff --git a/jdk/test/jdk/internal/misc/JavaLangAccess/NewUnsafeString.java b/jdk/test/jdk/internal/misc/JavaLangAccess/NewUnsafeString.java index 50235107153..302fb185809 100644 --- a/jdk/test/jdk/internal/misc/JavaLangAccess/NewUnsafeString.java +++ b/jdk/test/jdk/internal/misc/JavaLangAccess/NewUnsafeString.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,6 +32,7 @@ import jdk.internal.misc.SharedSecrets; * @summary Test JavaLangAccess.newUnsafeString * @modules java.base/jdk.internal.misc * @compile -XDignore.symbol.file NewUnsafeString.java + * @run main NewUnsafeString */ public class NewUnsafeString { From 7fa43a44b4c96bacd1f6051fb258e07dc81d9559 Mon Sep 17 00:00:00 2001 From: Amy Lu Date: Mon, 6 Mar 2017 16:07:50 +0800 Subject: [PATCH 359/447] 8176185: java/util/TimeZone/UTCAliasTest.java is not run Reviewed-by: alanb --- jdk/test/java/util/TimeZone/UTCAliasTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jdk/test/java/util/TimeZone/UTCAliasTest.java b/jdk/test/java/util/TimeZone/UTCAliasTest.java index aa7079326c0..ffe7b63fd71 100644 --- a/jdk/test/java/util/TimeZone/UTCAliasTest.java +++ b/jdk/test/java/util/TimeZone/UTCAliasTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ * @summary Make sure that "UTC" is an alias of "Etc/UTC" as defined in the tzdata backward. * @modules java.base/sun.util.calendar * @compile -XDignore.symbol.file UTCAliasTest.java + * @run main UTCAliasTest */ import java.util.*; From 2d911bad19245d29d6b89afd6c1e07a95bbf682c Mon Sep 17 00:00:00 2001 From: Jan Lahoda Date: Mon, 6 Mar 2017 13:17:33 +0100 Subject: [PATCH 360/447] 8175560: Drop String pkgName from javax.tools.JavaFileManager.getLocationForModule(Location location, JavaFileObject fo, String pkgName) Reviewed-by: jjg --- .../tools/ForwardingJavaFileManager.java | 6 +-- .../classes/javax/tools/JavaFileManager.java | 12 ++--- .../tools/javac/api/ClientCodeWrapper.java | 6 +-- .../com/sun/tools/javac/comp/Modules.java | 28 ++++------ .../tools/javac/file/JavacFileManager.java | 24 ++------- .../com/sun/tools/javac/file/Locations.java | 51 +++++++++++++------ .../tools/sjavac/comp/SmartFileManager.java | 6 +-- .../shellsupport/doc/JavadocHelper.java | 7 ++- .../classes/jdk/jshell/MemoryFileManager.java | 6 +-- .../javac/api/TestClientCodeWrapper.java | 6 +-- .../javac/file/ModuleAndPackageLocations.java | 16 +++--- .../ModulesAndModuleSourcePathTest.java | 23 ++++++++- 12 files changed, 101 insertions(+), 90 deletions(-) diff --git a/langtools/src/java.compiler/share/classes/javax/tools/ForwardingJavaFileManager.java b/langtools/src/java.compiler/share/classes/javax/tools/ForwardingJavaFileManager.java index 54bcc224d9f..50d7c2be2aa 100644 --- a/langtools/src/java.compiler/share/classes/javax/tools/ForwardingJavaFileManager.java +++ b/langtools/src/java.compiler/share/classes/javax/tools/ForwardingJavaFileManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -177,8 +177,8 @@ public class ForwardingJavaFileManager implements Jav * @since 9 * @spec JPMS */ - public Location getLocationForModule(Location location, JavaFileObject fo, String pkgName) throws IOException { - return fileManager.getLocationForModule(location, fo, pkgName); + public Location getLocationForModule(Location location, JavaFileObject fo) throws IOException { + return fileManager.getLocationForModule(location, fo); } /** diff --git a/langtools/src/java.compiler/share/classes/javax/tools/JavaFileManager.java b/langtools/src/java.compiler/share/classes/javax/tools/JavaFileManager.java index 4c3eb7a6cb0..ec2e6c3aac9 100644 --- a/langtools/src/java.compiler/share/classes/javax/tools/JavaFileManager.java +++ b/langtools/src/java.compiler/share/classes/javax/tools/JavaFileManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -480,20 +480,16 @@ public interface JavaFileManager extends Closeable, Flushable, OptionChecker { } /** - * Gets a location for the module containing a specific file representing a Java - * source or class, to be found within a location, which may be either + * Gets a location for the module containing a specific file + * to be found within a location, which may be either * a module-oriented location or an output location. * The result will be an output location if the given location is * an output location, or it will be a package-oriented location. * - * @apiNote the package name is used to identify the position of the file object - * within the module/package/class hierarchy identified by by the location. - * * @implSpec This implementation throws {@code UnsupportedOperationException}. * * @param location the module-oriented location * @param fo the file - * @param pkgName the package name for the class(es) defined in this file * @return the module containing the file * * @throws IOException if an I/O error occurred @@ -503,7 +499,7 @@ public interface JavaFileManager extends Closeable, Flushable, OptionChecker { * @since 9 * @spec JPMS */ - default Location getLocationForModule(Location location, JavaFileObject fo, String pkgName) throws IOException { + default Location getLocationForModule(Location location, JavaFileObject fo) throws IOException { throw new UnsupportedOperationException(); } diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/ClientCodeWrapper.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/ClientCodeWrapper.java index df2771fd03e..fc699f018bb 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/ClientCodeWrapper.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/ClientCodeWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -359,9 +359,9 @@ public class ClientCodeWrapper { } @Override @DefinedBy(Api.COMPILER) - public Location getLocationForModule(Location location, JavaFileObject fo, String pkgName) throws IOException { + public Location getLocationForModule(Location location, JavaFileObject fo) throws IOException { try { - return clientJavaFileManager.getLocationForModule(location, unwrap(fo), pkgName); + return clientJavaFileManager.getLocationForModule(location, unwrap(fo)); } catch (ClientCodeException e) { throw e; } catch (RuntimeException | Error e) { diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java index 192b85b2b70..ef335c48cad 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java @@ -369,7 +369,7 @@ public class Modules extends JCTree.Visitor { Location msplocn = getModuleLocation(tree); Location plocn = fileManager.hasLocation(StandardLocation.PATCH_MODULE_PATH) ? fileManager.getLocationForModule(StandardLocation.PATCH_MODULE_PATH, - tree.sourcefile, getPackageName(tree)) : + tree.sourcefile) : null; if (plocn != null) { @@ -385,6 +385,13 @@ public class Modules extends JCTree.Visitor { } } } else if (msplocn != null) { + if (tree.getModuleDecl() != null) { + JavaFileObject canonical = + fileManager.getJavaFileForInput(msplocn, "module-info", Kind.SOURCE); + if (canonical == null || !fileManager.isSameFile(canonical, tree.sourcefile)) { + log.error(tree.pos(), Errors.ModuleNotFoundOnModuleSourcePath); + } + } Name name = names.fromString(fileManager.inferModuleName(msplocn)); ModuleSymbol msym; JCModuleDecl decl = tree.getModuleDecl(); @@ -512,8 +519,7 @@ public class Modules extends JCTree.Visitor { try { Location loc = - fileManager.getLocationForModule(StandardLocation.PATCH_MODULE_PATH, - fo, getPackageName(tree)); + fileManager.getLocationForModule(StandardLocation.PATCH_MODULE_PATH, fo); if (loc != null) { override.add(fileManager.inferModuleName(loc)); @@ -532,15 +538,6 @@ public class Modules extends JCTree.Visitor { } } - private String getPackageName(JCCompilationUnit tree) { - if (tree.getModuleDecl() != null) { - return null; - } else { - JCPackageDecl pkg = tree.getPackage(); - return (pkg == null) ? "" : TreeInfo.fullName(pkg.pid).toString(); - } - } - /** * Determine the location for the module on the module source path * or source output directory which contains a given CompilationUnit. @@ -552,18 +549,15 @@ public class Modules extends JCTree.Visitor { * @throws IOException if there is a problem while searching for the module. */ private Location getModuleLocation(JCCompilationUnit tree) throws IOException { - String pkgName = getPackageName(tree); JavaFileObject fo = tree.sourcefile; Location loc = - fileManager.getLocationForModule(StandardLocation.MODULE_SOURCE_PATH, - fo, (pkgName == null) ? null : pkgName); + fileManager.getLocationForModule(StandardLocation.MODULE_SOURCE_PATH, fo); if (loc == null) { Location sourceOutput = fileManager.hasLocation(StandardLocation.SOURCE_OUTPUT) ? StandardLocation.SOURCE_OUTPUT : StandardLocation.CLASS_OUTPUT; loc = - fileManager.getLocationForModule(sourceOutput, - fo, (pkgName == null) ? null : pkgName); + fileManager.getLocationForModule(sourceOutput, fo); } return loc; } diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java index e9b6058c3a9..5689334fdcd 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java @@ -977,31 +977,13 @@ public class JavacFileManager extends BaseFileManager implements StandardJavaFil } @Override @DefinedBy(Api.COMPILER) - public Location getLocationForModule(Location location, JavaFileObject fo, String pkgName) throws IOException { + public Location getLocationForModule(Location location, JavaFileObject fo) throws IOException { checkModuleOrientedOrOutputLocation(location); if (!(fo instanceof PathFileObject)) return null; - int depth = 1; // allow 1 for filename - if (pkgName != null && !pkgName.isEmpty()) { - depth += 1; - for (int i = 0; i < pkgName.length(); i++) { - switch (pkgName.charAt(i)) { - case '/': case '.': - depth++; - } - } - } Path p = Locations.normalize(((PathFileObject) fo).path); - int fc = p.getNameCount(); - if (depth < fc) { - Path root = p.getRoot(); - Path subpath = p.subpath(0, fc - depth); - Path dir = (root == null) ? subpath : root.resolve(subpath); - // need to find dir in location - return locations.getLocationForModule(location, dir); - } else { - return null; - } + // need to find p in location + return locations.getLocationForModule(location, p); } @Override @DefinedBy(Api.COMPILER) diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java index 5490a738236..e6a779cde47 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java @@ -60,6 +60,7 @@ import java.util.Map; import java.util.Objects; import java.util.NoSuchElementException; import java.util.Set; +import java.util.function.Predicate; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; @@ -438,7 +439,7 @@ public class Locations { /** * @see JavaFileManager#getLocationForModule(Location, JavaFileObject, String) */ - Location getLocationForModule(Path dir) throws IOException { + Location getLocationForModule(Path file) throws IOException { return null; } @@ -588,8 +589,8 @@ public class Locations { } @Override - Location getLocationForModule(Path dir) { - return (moduleTable == null) ? null : moduleTable.get(dir); + Location getLocationForModule(Path file) { + return (moduleTable == null) ? null : moduleTable.get(file); } private boolean listed; @@ -986,7 +987,16 @@ public class Locations { } ModuleLocationHandler get(Path path) { - return pathMap.get(path); + while (path != null) { + ModuleLocationHandler l = pathMap.get(path); + + if (l != null) + return l; + + path = path.getParent(); + } + + return null; } void clear() { @@ -1385,12 +1395,19 @@ public class Locations { moduleTable = new ModuleTable(); map.forEach((modName, modPath) -> { - String locnName = location.getName() + "[" + modName + "]"; - ModuleLocationHandler l = new ModuleLocationHandler(this, locnName, modName, - modPath, false); - moduleTable.add(l); + boolean hasModuleInfo = modPath.stream().anyMatch(checkModuleInfo); + if (hasModuleInfo) { + String locnName = location.getName() + "[" + modName + "]"; + ModuleLocationHandler l = new ModuleLocationHandler(this, locnName, modName, + modPath, false); + moduleTable.add(l); + } }); } + //where: + private final Predicate checkModuleInfo = + p -> Files.exists(p.resolve("module-info.java")); + private boolean isSeparator(char ch) { // allow both separators on Windows @@ -1537,8 +1554,8 @@ public class Locations { } @Override - Location getLocationForModule(Path dir) { - return (moduleTable == null) ? null : moduleTable.get(dir); + Location getLocationForModule(Path file) { + return (moduleTable == null) ? null : moduleTable.get(file); } @Override @@ -1644,9 +1661,9 @@ public class Locations { } @Override - Location getLocationForModule(Path dir) throws IOException { + Location getLocationForModule(Path file) throws IOException { initSystemModules(); - return moduleTable.get(dir); + return moduleTable.get(file); } @Override @@ -1724,6 +1741,8 @@ public class Locations { return false; } + moduleTable.clear(); + // Allow an extended syntax for --patch-module consisting of a series // of values separated by NULL characters. This is to facilitate // supporting deferred file manager options on the command line. @@ -1775,8 +1794,8 @@ public class Locations { } @Override - Location getLocationForModule(Path dir) throws IOException { - return moduleTable.get(dir); + Location getLocationForModule(Path file) throws IOException { + return moduleTable.get(file); } @Override @@ -1857,9 +1876,9 @@ public class Locations { return (h == null ? null : h.getLocationForModule(name)); } - Location getLocationForModule(Location location, Path dir) throws IOException { + Location getLocationForModule(Location location, Path file) throws IOException { LocationHandler h = getHandler(location); - return (h == null ? null : h.getLocationForModule(dir)); + return (h == null ? null : h.getLocationForModule(file)); } void setLocationForModule(Location location, String moduleName, diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/SmartFileManager.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/SmartFileManager.java index 5a0df7bef4d..cb271bb7abd 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/SmartFileManager.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/SmartFileManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -204,8 +204,8 @@ public class SmartFileManager extends ForwardingJavaFileManager } @Override @DefinedBy(Api.COMPILER) - public Location getLocationForModule(Location location, JavaFileObject fo, String pkgName) throws IOException { - return super.getLocationForModule(location, locUnwrap(fo), pkgName); + public Location getLocationForModule(Location location, JavaFileObject fo) throws IOException { + return super.getLocationForModule(location, locUnwrap(fo)); } private static String packageNameFromFileName(String fn) { diff --git a/langtools/src/jdk.compiler/share/classes/jdk/internal/shellsupport/doc/JavadocHelper.java b/langtools/src/jdk.compiler/share/classes/jdk/internal/shellsupport/doc/JavadocHelper.java index b240d0117a9..42fa30080bd 100644 --- a/langtools/src/jdk.compiler/share/classes/jdk/internal/shellsupport/doc/JavadocHelper.java +++ b/langtools/src/jdk.compiler/share/classes/jdk/internal/shellsupport/doc/JavadocHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -686,11 +686,10 @@ public abstract class JavadocHelper implements AutoCloseable { @Override @DefinedBy(Api.COMPILER) public Location getLocationForModule(Location location, - JavaFileObject fo, - String pkgName) throws IOException { + JavaFileObject fo) throws IOException { return fo == file ? PATCH_LOCATION - : super.getLocationForModule(location, fo, pkgName); + : super.getLocationForModule(location, fo); } @Override @DefinedBy(Api.COMPILER) diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/MemoryFileManager.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/MemoryFileManager.java index c275b0f34d8..a0aa2c6579e 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/MemoryFileManager.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/MemoryFileManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -545,8 +545,8 @@ class MemoryFileManager implements JavaFileManager { } @Override - public Location getLocationForModule(Location location, JavaFileObject fo, String pkgName) throws IOException { - return stdFileManager.getLocationForModule(location, fo, pkgName); + public Location getLocationForModule(Location location, JavaFileObject fo) throws IOException { + return stdFileManager.getLocationForModule(location, fo); } @Override diff --git a/langtools/test/tools/javac/api/TestClientCodeWrapper.java b/langtools/test/tools/javac/api/TestClientCodeWrapper.java index 177e621f96a..044225a4dbe 100644 --- a/langtools/test/tools/javac/api/TestClientCodeWrapper.java +++ b/langtools/test/tools/javac/api/TestClientCodeWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -407,9 +407,9 @@ public class TestClientCodeWrapper extends JavacTestingAbstractProcessor { } @Override - public Location getLocationForModule(Location location, JavaFileObject fo, String pkgName) throws IOException { + public Location getLocationForModule(Location location, JavaFileObject fo) throws IOException { throwUserExceptionIfNeeded(fileManagerMethod, "getLocationForModule"); - return super.getLocationForModule(location, fo, pkgName); + return super.getLocationForModule(location, fo); } @Override diff --git a/langtools/test/tools/javac/file/ModuleAndPackageLocations.java b/langtools/test/tools/javac/file/ModuleAndPackageLocations.java index 5bd26779e8d..0b06fc2f8c0 100644 --- a/langtools/test/tools/javac/file/ModuleAndPackageLocations.java +++ b/langtools/test/tools/javac/file/ModuleAndPackageLocations.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ /** * @test - * @bug 8171005 + * @bug 8171005 8175560 * @summary Verify behavior of JavaFileManager methods w.r.t. module/package oriented locations * @library /tools/lib * @modules java.compiler @@ -99,7 +99,7 @@ public class ModuleAndPackageLocations extends TestRunner { Location cOutput = fm.getLocationForModule(StandardLocation.SOURCE_OUTPUT, "c"); JavaFileObject testFO = fm.getJavaFileForOutput(cOutput, "test.Test", Kind.CLASS, null); testFO.openOutputStream().close(); - Location cOutput2 = fm.getLocationForModule(StandardLocation.SOURCE_OUTPUT, testFO, "test"); + Location cOutput2 = fm.getLocationForModule(StandardLocation.SOURCE_OUTPUT, testFO); if (cOutput != cOutput2) { throw new AssertionError("Unexpected location: " + cOutput2 + ", expected: " +cOutput); @@ -117,7 +117,7 @@ public class ModuleAndPackageLocations extends TestRunner { assertRefused(() -> fm.getJavaFileForOutput(StandardLocation.MODULE_SOURCE_PATH, "", Kind.SOURCE, null)); assertRefused(() -> fm.getLocationForModule(StandardLocation.SOURCE_PATH, "test")); JavaFileObject out = fm.getJavaFileForInput(StandardLocation.CLASS_OUTPUT, "test.Test", Kind.CLASS); - assertRefused(() -> fm.getLocationForModule(StandardLocation.SOURCE_PATH, out, "test")); + assertRefused(() -> fm.getLocationForModule(StandardLocation.SOURCE_PATH, out)); assertRefused(() -> fm.inferBinaryName(StandardLocation.MODULE_PATH, out)); assertRefused(() -> fm.inferModuleName(StandardLocation.MODULE_SOURCE_PATH)); assertRefused(() -> fm.list(StandardLocation.MODULE_SOURCE_PATH, "test", EnumSet.allOf(Kind.class), false)); @@ -131,10 +131,10 @@ public class ModuleAndPackageLocations extends TestRunner { Path msp1 = msp.resolve("1"); Path msp2 = msp.resolve("2"); - Files.createDirectories(msp1.resolve("a")); + touch(msp1.resolve("a/module-info.java")); Files.createDirectories(msp1.resolve("b")); - Files.createDirectories(msp2.resolve("b")); - Files.createDirectories(msp2.resolve("c")); + touch(msp2.resolve("b/module-info.java")); + touch(msp2.resolve("c/module-info.java")); Path mp = base.resolve("mp"); Path mp1 = mp.resolve("1"); @@ -210,4 +210,4 @@ public class ModuleAndPackageLocations extends TestRunner { } JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); -} \ No newline at end of file +} diff --git a/langtools/test/tools/javac/modules/ModulesAndModuleSourcePathTest.java b/langtools/test/tools/javac/modules/ModulesAndModuleSourcePathTest.java index 1edc21de22a..b4c50d7e4c5 100644 --- a/langtools/test/tools/javac/modules/ModulesAndModuleSourcePathTest.java +++ b/langtools/test/tools/javac/modules/ModulesAndModuleSourcePathTest.java @@ -23,7 +23,7 @@ /** * @test - * @bug 8165102 + * @bug 8165102 8175560 * @summary incorrect message from javac * @library /tools/lib * @modules @@ -48,6 +48,27 @@ public class ModulesAndModuleSourcePathTest extends ModuleTestBase { @Test public void testModuleNotInModuleSrcPath(Path base) throws Exception { + Path src = base.resolve("src"); + Path m = src.resolve("m"); + Files.createDirectories(m); + Path extra = base.resolve("m"); + tb.writeJavaFiles(extra, "module m {}"); + Path classes = base.resolve("classes"); + Files.createDirectories(classes); + + String log = new JavacTask(tb) + .options("-XDrawDiagnostics", "--module-source-path", src.toString()) + .outdir(classes) + .files(findJavaFiles(extra)) + .run(Task.Expect.FAIL) + .writeAll() + .getOutput(Task.OutputKind.DIRECT); + if (!log.contains("module-info.java:1:1: compiler.err.module.not.found.on.module.source.path")) + throw new Exception("expected output not found"); + } + + @Test + public void testModuleNotInPackageHierarchy(Path base) throws Exception { Path src = base.resolve("src"); Path m = src.resolve("m"); Path extra = m.resolve("extra"); From 7f65fc26a97fd7b18cb72bcd40ec843852e855d5 Mon Sep 17 00:00:00 2001 From: Magnus Ihse Bursie Date: Mon, 6 Mar 2017 13:39:34 +0100 Subject: [PATCH 361/447] 8176196: sed from FindTests.gmk prints warnings Reviewed-by: erikj --- make/common/FindTests.gmk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/make/common/FindTests.gmk b/make/common/FindTests.gmk index a40d5db91aa..8394e546ac3 100644 --- a/make/common/FindTests.gmk +++ b/make/common/FindTests.gmk @@ -52,7 +52,8 @@ define FindJtregGroupsBody $1_JTREG_GROUP_FILES := $$(addprefix $$($1_JTREG_TESTROOT)/, \ $$($1_JTREG_GROUP_FILENAMES)) $1_JTREG_TEST_GROUPS := $$(strip $$(shell $$(SED) -n \ - -e 's/\([^ ]*\)\w*=.*/\1/gp' $$($1_JTREG_GROUP_FILES) | $$(SORT) -u)) + -e 's/\([^ ]*\)\w*=.*/\1/gp' $$(wildcard $$($1_JTREG_GROUP_FILES)) \ + | $$(SORT) -u)) endif endef From bc2bb1fae183715fc927ece8473f6325c33025c1 Mon Sep 17 00:00:00 2001 From: Martin Mraz Date: Mon, 6 Mar 2017 17:03:26 +0300 Subject: [PATCH 362/447] 6490753: JComboBox doesn't look as native combobox in different states of component Reviewed-by: serb, alexsch --- .../plaf/windows/AnimationController.java | 22 +++-- .../sun/java/swing/plaf/windows/TMSchema.java | 12 +++ .../swing/plaf/windows/WindowsComboBoxUI.java | 99 +++++++++++++++++-- .../plaf/windows/WindowsLookAndFeel.java | 2 +- .../sun/java/swing/plaf/windows/XPStyle.java | 11 ++- 5 files changed, 129 insertions(+), 17 deletions(-) diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/AnimationController.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/AnimationController.java index eb47262b29c..10a9e358cd5 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/AnimationController.java +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/AnimationController.java @@ -36,7 +36,6 @@ import java.awt.event.*; import javax.swing.*; - import com.sun.java.swing.plaf.windows.TMSchema.State; import static com.sun.java.swing.plaf.windows.TMSchema.State.*; import com.sun.java.swing.plaf.windows.TMSchema.Part; @@ -383,18 +382,25 @@ class AnimationController implements ActionListener, PropertyChangeListener { updateProgress(); if (! isDone()) { Graphics2D g = (Graphics2D) _g.create(); - skin.paintSkinRaw(g, dx, dy, dw, dh, startState); - float alpha; - if (isForward) { - alpha = progress; + if (skin.haveToSwitchStates()) { + skin.paintSkinRaw(g, dx, dy, dw, dh, state); + g.setComposite(AlphaComposite.SrcOver.derive(1 - progress)); + skin.paintSkinRaw(g, dx, dy, dw, dh, startState); } else { - alpha = 1 - progress; + skin.paintSkinRaw(g, dx, dy, dw, dh, startState); + float alpha; + if (isForward) { + alpha = progress; + } else { + alpha = 1 - progress; + } + g.setComposite(AlphaComposite.SrcOver.derive(alpha)); + skin.paintSkinRaw(g, dx, dy, dw, dh, state); } - g.setComposite(AlphaComposite.SrcOver.derive(alpha)); - skin.paintSkinRaw(g, dx, dy, dw, dh, state); g.dispose(); } else { skin.paintSkinRaw(_g, dx, dy, dw, dh, state); + skin.switchStates(false); } } boolean isDone() { diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/TMSchema.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/TMSchema.java index 0bca0dd2172..f45a077e91d 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/TMSchema.java +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/TMSchema.java @@ -121,6 +121,12 @@ class TMSchema { LBP_LISTBOX(Control.LISTBOX, 0), + LBCP_BORDER_HSCROLL (Control.LISTBOX, 1), + LBCP_BORDER_HVSCROLL (Control.LISTBOX, 2), + LBCP_BORDER_NOSCROLL (Control.LISTBOX, 3), + LBCP_BORDER_VSCROLL (Control.LISTBOX, 4), + LBCP_ITEM (Control.LISTBOX, 5), + LVP_LISTVIEW(Control.LISTVIEW, 0), PP_PROGRESS (Control.PROGRESS, 0), @@ -343,6 +349,12 @@ class TMSchema { stateMap.put(Part.HP_HEADERSORTARROW, new State[] {SORTEDDOWN, SORTEDUP}); + State[] listBoxStates = new State[] { NORMAL, PRESSED, HOT, DISABLED}; + stateMap.put(Part.LBCP_BORDER_HSCROLL, listBoxStates); + stateMap.put(Part.LBCP_BORDER_HVSCROLL, listBoxStates); + stateMap.put(Part.LBCP_BORDER_NOSCROLL, listBoxStates); + stateMap.put(Part.LBCP_BORDER_VSCROLL, listBoxStates); + State[] scrollBarStates = new State[] { NORMAL, HOT, PRESSED, DISABLED, HOVER }; stateMap.put(Part.SBP_SCROLLBAR, scrollBarStates); stateMap.put(Part.SBP_THUMBBTNVERT, scrollBarStates); diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.java index 80217555bcb..677ee8b0e13 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.java +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.java @@ -41,6 +41,7 @@ import static com.sun.java.swing.plaf.windows.XPStyle.Skin; import sun.swing.DefaultLookup; import sun.swing.StringUIClientPropertyKey; +import com.sun.java.swing.plaf.windows.WindowsBorders.DashedBorder; /** * Windows combo box. @@ -97,6 +98,9 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { } else if (source instanceof XPComboBoxButton) { rv = ((XPComboBoxButton) source) .getWindowsComboBoxUI().comboBox; + } else if (source instanceof JTextField && + ((JTextField) source).getParent() instanceof JComboBox) { + rv = (JComboBox) ((JTextField) source).getParent(); } return rv; } @@ -149,6 +153,8 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { //is initialized after installListeners is invoked comboBox.addMouseListener(rolloverListener); arrowButton.addMouseListener(rolloverListener); + // set empty border as default to see vista animated border + comboBox.setBorder(new EmptyBorder(0,0,0,0)); } } @@ -224,6 +230,9 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { state = State.DISABLED; } else if (isPopupVisible(comboBox)) { state = State.PRESSED; + } else if (comboBox.isEditable() + && comboBox.getEditor().getEditorComponent().isFocusOwner()) { + state = State.PRESSED; } else if (isRollover) { state = State.HOT; } @@ -242,7 +251,7 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { skin = xp.getSkin(c, Part.CP_READONLY); } if (skin == null) { - skin = xp.getSkin(c, Part.CP_COMBOBOX); + skin = xp.getSkin(c, Part.CP_BORDER); } skin.paintSkin(g, 0, 0, c.getWidth(), c.getHeight(), state); } @@ -368,7 +377,7 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { } protected ComboPopup createPopup() { - return super.createPopup(); + return new WinComboPopUp(comboBox); } /** @@ -414,8 +423,10 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { @SuppressWarnings("serial") // Superclass is not serializable across versions private class XPComboBoxButton extends XPStyle.GlyphButton { + private State prevState = null; + public XPComboBoxButton(XPStyle xp) { - super(null, + super(comboBox, (! xp.isSkinDefined(comboBox, Part.CP_DROPDOWNBUTTONRIGHT)) ? Part.CP_DROPDOWNBUTTON : (comboBox.getComponentOrientation() == ComponentOrientation.RIGHT_TO_LEFT) @@ -428,18 +439,33 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { @Override protected State getState() { State rv; + + getModel().setPressed(comboBox.isPopupVisible()); + rv = super.getState(); XPStyle xp = XPStyle.getXP(); if (rv != State.DISABLED - && comboBox != null && ! comboBox.isEditable() - && xp != null && xp.isSkinDefined(comboBox, - Part.CP_DROPDOWNBUTTONRIGHT)) { + && comboBox != null && ! comboBox.isEditable() + && xp != null && xp.isSkinDefined(comboBox, + Part.CP_DROPDOWNBUTTONRIGHT)) { /* * for non editable ComboBoxes Vista seems to have the * same glyph for all non DISABLED states */ rv = State.NORMAL; } + if (rv == State.NORMAL && (prevState == State.HOT || prevState == State.PRESSED)) { + /* + * State NORMAL of combobox button cannot overpaint states HOT or PRESSED + * Therefore HOT state must be painted from alpha 1 to 0 and not as usual that + * NORMAL state is painted from alpha 0 to alpha 1. + */ + skin.switchStates(true); + } + if (rv != prevState) { + prevState = rv; + } + return rv; } @@ -484,6 +510,39 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { } } + @SuppressWarnings("serial") // Same-version serialization only + protected class WinComboPopUp extends BasicComboPopup { + private Skin listBoxBorder = null; + private XPStyle xp; + + public WinComboPopUp(JComboBox combo) { + super(combo); + xp = XPStyle.getXP(); + if (xp != null && xp.isSkinDefined(combo, Part.LBCP_BORDER_NOSCROLL)) { + this.listBoxBorder = new Skin(combo, Part.LBCP_BORDER_NOSCROLL); + this.setBorder(new EmptyBorder(1,1,1,1)); + } + } + + protected KeyListener createKeyListener() { + return new InvocationKeyHandler(); + } + + protected class InvocationKeyHandler extends BasicComboPopup.InvocationKeyHandler { + protected InvocationKeyHandler() { + WinComboPopUp.this.super(); + } + } + + protected void paintComponent(Graphics g) { + super.paintComponent(g); + if (this.listBoxBorder != null) { + this.listBoxBorder.paintSkinRaw(g, this.getX(), this.getY(), + this.getWidth(), this.getHeight(), State.HOT); + } + } + } + /** * Subclassed to highlight selected item in an editable combo box. @@ -498,6 +557,7 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { protected JTextField createEditorComponent() { JTextField editor = super.createEditorComponent(); Border border = (Border)UIManager.get("ComboBox.editorBorder"); + if (border != null) { editor.setBorder(border); } @@ -524,6 +584,31 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { private static final Object BORDER_KEY = new StringUIClientPropertyKey("BORDER_KEY"); private static final Border NULL_BORDER = new EmptyBorder(0, 0, 0, 0); + + // Create own version of DashedBorder with more space on left side + private class WindowsComboBoxDashedBorder extends DashedBorder { + + public WindowsComboBoxDashedBorder(Color color, int thickness) { + super(color, thickness); + } + + public WindowsComboBoxDashedBorder(Color color) { + super(color); + } + + @Override + public Insets getBorderInsets(Component c, Insets i) { + return new Insets(0,2,0,0); + } + } + + public WindowsComboBoxRenderer() { + super(); + + // correct space on the left side of text items in the combo popup list + Insets i = getBorder().getBorderInsets(this); + setBorder(new EmptyBorder(0, 2, 0, i.right)); + } /** * {@inheritDoc} */ @@ -542,7 +627,7 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { if (index == -1 && isSelected) { Border border = component.getBorder(); Border dashedBorder = - new WindowsBorders.DashedBorder(list.getForeground()); + new WindowsComboBoxDashedBorder(list.getForeground()); component.setBorder(dashedBorder); //store current border in client property if needed if (component.getClientProperty(BORDER_KEY) == null) { diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java index 598b0815ad0..fa50e94ec92 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java @@ -672,7 +672,7 @@ public class WindowsLookAndFeel extends BasicLookAndFeel "ComboBox.buttonHighlight", ControlHighlightColor, "ComboBox.selectionBackground", SelectionBackgroundColor, "ComboBox.selectionForeground", SelectionTextColor, - "ComboBox.editorBorder", new XPValue(new EmptyBorder(1,2,1,1), + "ComboBox.editorBorder", new XPValue(new EmptyBorder(1,4,1,1), new EmptyBorder(1,4,1,4)), "ComboBox.disabledBackground", new XPColorValue(Part.CP_COMBOBOX, State.DISABLED, diff --git a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/XPStyle.java b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/XPStyle.java index 0dbe039f54c..5e30ee00194 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/XPStyle.java +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/XPStyle.java @@ -479,6 +479,7 @@ class XPStyle { private final String string; private Dimension size = null; + private boolean switchStates = false; Skin(Component component, Part part) { this(component, part, null); @@ -513,6 +514,14 @@ class XPStyle { return (insets != null) ? insets : new Insets(0, 0, 0, 0); } + boolean haveToSwitchStates() { + return switchStates; + } + + void switchStates(boolean b) { + switchStates = b; + } + private int getWidth(State state) { if (size == null) { size = getPartSize(part, state); @@ -689,7 +698,7 @@ class XPStyle { @SuppressWarnings("serial") // Superclass is not serializable across versions static class GlyphButton extends JButton { - private Skin skin; + protected Skin skin; public GlyphButton(Component parent, Part part) { XPStyle xp = getXP(); From a4cbfe0dacdd73fa76bba52b6887e1755780baab Mon Sep 17 00:00:00 2001 From: Robert Field Date: Mon, 6 Mar 2017 08:36:05 -0800 Subject: [PATCH 363/447] 8176184: JShell tests: jdk/jshell/CompletionSuggestionTest.testImportStart(): failure Reviewed-by: jlahoda --- langtools/test/jdk/jshell/CompletionSuggestionTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/langtools/test/jdk/jshell/CompletionSuggestionTest.java b/langtools/test/jdk/jshell/CompletionSuggestionTest.java index 22a8c4842be..bb4b45a785a 100644 --- a/langtools/test/jdk/jshell/CompletionSuggestionTest.java +++ b/langtools/test/jdk/jshell/CompletionSuggestionTest.java @@ -23,7 +23,7 @@ /* * @test - * @bug 8131025 8141092 8153761 8145263 8131019 8175886 + * @bug 8131025 8141092 8153761 8145263 8131019 8175886 8176184 * @summary Test Completion and Documentation * @library /tools/lib * @modules jdk.compiler/com.sun.tools.javac.api @@ -296,7 +296,7 @@ public class CompletionSuggestionTest extends KullaTesting { } public void testImportStart() { - assertCompletion("import ja|", "java", "javax"); + assertCompletion("import c|", "com"); assertCompletion("import o|", "org"); } From 826a40c57a2b7a3af504c8c25d38cd4044ece820 Mon Sep 17 00:00:00 2001 From: Robert Field Date: Mon, 6 Mar 2017 08:57:41 -0800 Subject: [PATCH 364/447] 8175304: JShell tool: The /reset command hangs after setting a startup script Reviewed-by: jlahoda --- .../jdk/internal/jshell/tool/JShellTool.java | 15 +++++++++- langtools/test/jdk/jshell/ToolBasicTest.java | 28 ++++++++++++++++++- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java index db8970c6350..c61a9262f19 100644 --- a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java +++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java @@ -195,6 +195,7 @@ public class JShellTool implements MessageHandler { private boolean debug = false; public boolean testPrompt = false; private Startup startup = null; + private boolean isCurrentlyRunningStartup = false; private String executionControlSpec = null; private EditorSetting editor = BUILT_IN_EDITOR; @@ -1019,7 +1020,19 @@ public class JShellTool implements MessageHandler { analysis = state.sourceCodeAnalysis(); live = true; - startUpRun(startup.toString()); + // Run the start-up script. + // Avoid an infinite loop running start-up while running start-up. + // This could, otherwise, occur when /env /reset or /reload commands are + // in the start-up script. + if (!isCurrentlyRunningStartup) { + try { + isCurrentlyRunningStartup = true; + startUpRun(startup.toString()); + } finally { + isCurrentlyRunningStartup = false; + } + } + // Record subsequent snippets in the main namespace. currentNameSpace = mainNamespace; } diff --git a/langtools/test/jdk/jshell/ToolBasicTest.java b/langtools/test/jdk/jshell/ToolBasicTest.java index d62382cbfc8..93321fb58e8 100644 --- a/langtools/test/jdk/jshell/ToolBasicTest.java +++ b/langtools/test/jdk/jshell/ToolBasicTest.java @@ -23,7 +23,7 @@ /* * @test - * @bug 8143037 8142447 8144095 8140265 8144906 8146138 8147887 8147886 8148316 8148317 8143955 8157953 8080347 8154714 8166649 8167643 8170162 8172102 8165405 8174796 8174797 + * @bug 8143037 8142447 8144095 8140265 8144906 8146138 8147887 8147886 8148316 8148317 8143955 8157953 8080347 8154714 8166649 8167643 8170162 8172102 8165405 8174796 8174797 8175304 * @summary Tests for Basic tests for REPL tool * @modules jdk.compiler/com.sun.tools.javac.api * jdk.compiler/com.sun.tools.javac.main @@ -273,6 +273,32 @@ public class ToolBasicTest extends ReplToolTesting { ); } + public void testEnvInStartUp() { + Compiler compiler = new Compiler(); + Path outDir = Paths.get("testClasspathDirectory"); + compiler.compile(outDir, "package pkg; public class A { public String toString() { return \"A\"; } }"); + Path classpath = compiler.getPath(outDir); + Path sup = compiler.getPath("startup.jsh"); + compiler.writeToFile(sup, + "int xxx;\n" + + "/env -class-path " + classpath + "\n" + + "int aaa = 735;\n" + ); + test( + (a) -> assertCommand(a, "/set start -retain " + sup, ""), + (a) -> assertCommand(a, "/reset", + "| Resetting state."), + (a) -> evaluateExpression(a, "pkg.A", "new pkg.A();", "A"), + (a) -> assertCommand(a, "aaa", "aaa ==> 735") + ); + test( + (a) -> assertCommandOutputContains(a, "/env", "--class-path"), + (a) -> assertCommandOutputContains(a, "xxx", "cannot find symbol", "variable xxx"), + (a) -> evaluateExpression(a, "pkg.A", "new pkg.A();", "A"), + (a) -> assertCommand(a, "aaa", "aaa ==> 735") + ); + } + private String makeSimpleJar() { Compiler compiler = new Compiler(); Path outDir = Paths.get("testClasspathJar"); From 9bc73d722267bf52191159de68fc44057cff4f82 Mon Sep 17 00:00:00 2001 From: Abossolo Foh Guy Date: Mon, 6 Mar 2017 22:52:45 +0300 Subject: [PATCH 365/447] 8158209: Editing in TableView breaks the layout, when the document is I18n Reviewed-by: serb, alexsch --- .../classes/javax/swing/text/TableView.java | 65 ++++- ...youtTest.java => TableViewLayoutTest.java} | 222 ++++++++++++++---- 2 files changed, 234 insertions(+), 53 deletions(-) rename jdk/test/javax/swing/text/TableView/{I18nLayoutTest.java => TableViewLayoutTest.java} (58%) diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/TableView.java b/jdk/src/java.desktop/share/classes/javax/swing/text/TableView.java index cc286d8697a..a9a7f67ffe7 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/TableView.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/TableView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -78,6 +78,7 @@ public abstract class TableView extends BoxView { super(elem, View.Y_AXIS); rows = new Vector(); gridValid = false; + totalColumnRequirements = new SizeRequirements(); } /** @@ -377,6 +378,11 @@ public abstract class TableView extends BoxView { r.preferred = (int) pref; r.maximum = (int) max; r.alignment = 0; + + totalColumnRequirements.minimum = r.minimum; + totalColumnRequirements.preferred = r.preferred; + totalColumnRequirements.maximum = r.maximum; + return r; } @@ -406,6 +412,13 @@ public abstract class TableView extends BoxView { * into consideration any constraining maximums. */ void calculateColumnRequirements(int axis) { + + for (SizeRequirements req : columnRequirements) { + req.minimum = 0; + req.preferred = 0; + req.maximum = Integer.MAX_VALUE; + } + // pass 1 - single column cells boolean hasMultiColumn = false; int nrows = getRowCount(); @@ -576,6 +589,9 @@ public abstract class TableView extends BoxView { int[] columnSpans; int[] columnOffsets; + + SizeRequirements totalColumnRequirements; + SizeRequirements[] columnRequirements; Vector rows; boolean gridValid; @@ -646,6 +662,53 @@ public abstract class TableView extends BoxView { invalidateGrid(); } + @Override + protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements r) { + SizeRequirements req = new SizeRequirements(); + req.minimum = totalColumnRequirements.minimum; + req.maximum = totalColumnRequirements.maximum; + req.preferred = totalColumnRequirements.preferred; + req.alignment = 0f; + return req; + } + + @Override + public float getMinimumSpan(int axis) { + float value; + + if (axis == View.X_AXIS) { + value = totalColumnRequirements.minimum + getLeftInset() + getRightInset(); + } else { + value = super.getMinimumSpan(axis); + } + return value; + } + + @Override + public float getMaximumSpan(int axis) { + float value; + + if (axis == View.X_AXIS) { + // We're flexible. + value = (float) Integer.MAX_VALUE; + } else { + value = super.getMaximumSpan(axis); + } + return value; + } + + @Override + public float getPreferredSpan(int axis) { + float value; + + if (axis == View.X_AXIS) { + value = totalColumnRequirements.preferred + getLeftInset() + getRightInset(); + } else { + value = super.getPreferredSpan(axis); + } + return value; + } + /** * Perform layout for the major axis of the box (i.e. the * axis that it represents). The results of the layout should diff --git a/jdk/test/javax/swing/text/TableView/I18nLayoutTest.java b/jdk/test/javax/swing/text/TableView/TableViewLayoutTest.java similarity index 58% rename from jdk/test/javax/swing/text/TableView/I18nLayoutTest.java rename to jdk/test/javax/swing/text/TableView/TableViewLayoutTest.java index 61bf8a03d84..eb7b3f23005 100644 --- a/jdk/test/javax/swing/text/TableView/I18nLayoutTest.java +++ b/jdk/test/javax/swing/text/TableView/TableViewLayoutTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,24 +24,51 @@ /* * @test * @key headful - * @bug 8133864 + * @bug 8133864 8158209 * @summary Wrong display, when the document I18n properties is true. - * @author Semyon Sadetsky - * @run main I18nLayoutTest */ - import javax.swing.*; import javax.swing.text.*; import java.awt.*; +import java.awt.event.KeyEvent; import java.util.ArrayList; +import javax.swing.event.CaretEvent; +import javax.swing.event.CaretListener; -public class I18nLayoutTest extends JFrame { +public class TableViewLayoutTest extends JFrame { - private static int height; - JEditorPane edit = new JEditorPane(); - private static I18nLayoutTest frame; + private static double yCaret; + private static double xCaret; + + // Number of iteration to verify the stability of the test with different robot delays : + // Work well with robot.delay(50) in hitKey method. + // But if the robot delay is too low, the test is not stable. + // Put this to 100, and reduce robot delay sometimes answers may be different. + private static int tn = 2; + + // The four caret positions to test. + private static double yCarFLTab; + private static double yCarLLTab; + private static double xCarBTab; + private static double xCarETab; + + // The caret coordonate differences along axis after the insertion and the removing cycle. + // 0 if the table layout is right. + private static double dyCarFLTab; + private static double dyCarLLTab; + private static double dxCarBTab; + private static double dxCarETab; + + private static JEditorPane edit = new JEditorPane(); + private static TableViewLayoutTest frame; + + private static String Prop = "\n"; + private static boolean isTabWrong = Boolean.FALSE; + + private static Boolean isI18n = false; + + public TableViewLayoutTest() { - public I18nLayoutTest() { super("Code example for a TableView bug"); setUndecorated(true); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); @@ -51,12 +78,24 @@ public class I18nLayoutTest extends JFrame { this.pack(); this.setLocationRelativeTo(null); + edit.addCaretListener(new CaretListener() { + public void caretUpdate(CaretEvent e) { + JTextComponent textComp = (JTextComponent) e.getSource(); + try { + Rectangle rect = textComp.getUI().modelToView(textComp, e.getDot()); + yCaret = rect.getY(); + xCaret = rect.getX(); + } catch (BadLocationException ex) { + throw new RuntimeException("Failed to get pixel position of caret", ex); + } + } + }); } private void initCodeBug() { CodeBugDocument doc = (CodeBugDocument) edit.getDocument(); try { - doc.insertString(0, "TextB TextE", null); + doc.insertString(0, "TextB TextE", null); } catch (BadLocationException ex) { } doc.insertTable(6, 4, 3); @@ -78,34 +117,114 @@ public class I18nLayoutTest extends JFrame { } public static void main(String[] args) throws Exception { - SwingUtilities.invokeAndWait(new Runnable() { - @Override - public void run() { - frame = new I18nLayoutTest(); - frame.setVisible(true); + + for (int i = 0; i < tn; i++) { + Robot rob = new Robot(); + + SwingUtilities.invokeAndWait(new Runnable() { + @Override + public void run() { + frame = new TableViewLayoutTest(); + frame.setVisible(true); + } + }); + + SwingUtilities.invokeAndWait(new Runnable() { + @Override + public void run() { + //Enable or disable i18n. + isI18n = !isI18n; + edit.getDocument().putProperty("i18n", isI18n); + + //Made a change to update table layout. + //Without any change the table i18n property change is not take in account. + edit.select(11, 12); + edit.replaceSelection("1"); + + //Catch the four caret positions to test before insertions. + edit.setCaretPosition(6); + xCarBTab = xCaret; + edit.setCaretPosition(91); + xCarETab = xCaret; + + edit.setCaretPosition(74); + yCarLLTab = yCaret; + edit.setCaretPosition(11); + yCarFLTab = yCaret; + } + }); + + hitKey(rob, KeyEvent.VK_T); + hitKey(rob, KeyEvent.VK_E); + hitKey(rob, KeyEvent.VK_S); + hitKey(rob, KeyEvent.VK_T); + hitKey(rob, KeyEvent.VK_BACK_SPACE); + hitKey(rob, KeyEvent.VK_BACK_SPACE); + hitKey(rob, KeyEvent.VK_BACK_SPACE); + hitKey(rob, KeyEvent.VK_BACK_SPACE); + + rob.waitForIdle(); + + SwingUtilities.invokeAndWait(new Runnable() { + @Override + public void run() { + //Calculate caret coordinate differences and catch caret positions after insertions. + edit.setCaretPosition(6); + dxCarBTab = Math.abs(xCarBTab - xCaret); + edit.setCaretPosition(91); + dxCarETab = Math.abs(xCarETab - xCaret); + + edit.setCaretPosition(74); + dyCarLLTab = Math.abs(yCarLLTab - yCaret); + edit.setCaretPosition(11); + dyCarFLTab = Math.abs(yCarFLTab - yCaret); + + edit.setCaretPosition(74); + yCarLLTab = yCaret; + edit.setCaretPosition(11); + yCarFLTab = yCaret; + } + }); + + Object dp = edit.getDocument().getProperty("i18n"); + Boolean isI18n = dp instanceof Boolean ? (Boolean) dp : Boolean.FALSE; + String i18n = isI18n ? "\nWhen i18n enable, " : "\nWhen i18n disable, "; + + if (Math.abs(yCarFLTab - yCarLLTab) < 10) { + isTabWrong = Boolean.TRUE; + Prop = Prop + i18n + "test can't be completed : TableView layout wrong, lines overlap, see JDK-8133864."; + } else { + if (dyCarFLTab != 0 || dyCarLLTab != 0) { + isTabWrong = Boolean.TRUE; + Prop = Prop + i18n + "TableView layout wrong : Table high change when inserts and removes caracters, bug never reported yet. First Line dy=" + dyCarFLTab + " Last Line dy=" + dyCarLLTab; + } + if (dxCarBTab != 0 || dxCarETab != 0) { + isTabWrong = Boolean.TRUE; + Prop = Prop + i18n + "TableView layout wrong : Table width change when inserts and removes caracters, see JDK-8158209 and JDK-7169915. Before Table dx=" + dxCarBTab + " After Table dx=" + dxCarETab; + } } - }); - Robot robot = new Robot(); - robot.delay(200); - robot.waitForIdle(); - SwingUtilities.invokeAndWait(new Runnable() { - @Override - public void run() { - height = frame.getHeight(); - } - }); - SwingUtilities.invokeAndWait(new Runnable() { - @Override - public void run() { - frame.dispose(); - } - }); - if (height < 32) { - throw new RuntimeException( - "TableView layout height is wrong " + height); + rob.waitForIdle(); + + SwingUtilities.invokeAndWait(new Runnable() { + @Override + public void run() { + frame.dispose(); + } + }); } + if (isTabWrong) { + throw new RuntimeException(Prop); + } + System.out.println("ok"); } + + private static void hitKey(Robot robot, int k) throws Exception { + robot.delay(50); + robot.keyPress(k); + robot.keyRelease(k); + robot.delay(50); + } } //------------------------------------------------------------------------------ @@ -191,7 +310,9 @@ class tableView extends TableView implements ViewFactory { @Override public float getPreferredSpan(int axis) { - if (axis == 0) return super.getPreferredSpan(0); + if (axis == 0) { + return super.getPreferredSpan(0); + } float preferredSpan = super.getPreferredSpan(axis); return preferredSpan; } @@ -236,6 +357,7 @@ class tableView extends TableView implements ViewFactory { } public class trView extends TableRow { + @Override public void setParent(View parent) { super.setParent(parent); @@ -265,9 +387,7 @@ class tableView extends TableView implements ViewFactory { int lastX = alloc.x + alloc.width; g.drawLine(lastX, alloc.y, lastX, lastY); } - } - - ; + }; } //------------------------------------------------------------------------------ @@ -278,10 +398,9 @@ class CodeBugDocument extends DefaultStyledDocument { public static final String ELEMENT_TD = "table data cell"; public CodeBugDocument() { - putProperty("i18n", Boolean.TRUE); + //putProperty("i18n", Boolean.TRUE); } - protected void insertTable(int offset, int rowCount, int colCount) { try { ArrayList Specs = new ArrayList(); @@ -291,11 +410,10 @@ class CodeBugDocument extends DefaultStyledDocument { SimpleAttributeSet tableAttrs = new SimpleAttributeSet(); tableAttrs.addAttribute(ElementNameAttribute, ELEMENT_TABLE); - ElementSpec tableStart = - new ElementSpec(tableAttrs, ElementSpec.StartTagType); + ElementSpec tableStart + = new ElementSpec(tableAttrs, ElementSpec.StartTagType); Specs.add(tableStart); //start table tag - fillRowSpecs(Specs, rowCount, colCount); ElementSpec[] spec = new ElementSpec[Specs.size()]; @@ -310,14 +428,14 @@ class CodeBugDocument extends DefaultStyledDocument { SimpleAttributeSet rowAttrs = new SimpleAttributeSet(); rowAttrs.addAttribute(ElementNameAttribute, ELEMENT_TR); for (int i = 0; i < rowCount; i++) { - ElementSpec rowStart = - new ElementSpec(rowAttrs, ElementSpec.StartTagType); + ElementSpec rowStart + = new ElementSpec(rowAttrs, ElementSpec.StartTagType); Specs.add(rowStart); fillCellSpecs(Specs, colCount); - ElementSpec rowEnd = - new ElementSpec(rowAttrs, ElementSpec.EndTagType); + ElementSpec rowEnd + = new ElementSpec(rowAttrs, ElementSpec.EndTagType); Specs.add(rowEnd); } @@ -328,8 +446,8 @@ class CodeBugDocument extends DefaultStyledDocument { SimpleAttributeSet cellAttrs = new SimpleAttributeSet(); cellAttrs.addAttribute(ElementNameAttribute, ELEMENT_TD); - ElementSpec cellStart = - new ElementSpec(cellAttrs, ElementSpec.StartTagType); + ElementSpec cellStart + = new ElementSpec(cellAttrs, ElementSpec.StartTagType); Specs.add(cellStart); ElementSpec parStart = new ElementSpec(new SimpleAttributeSet(), @@ -341,8 +459,8 @@ class CodeBugDocument extends DefaultStyledDocument { ElementSpec parEnd = new ElementSpec(new SimpleAttributeSet(), ElementSpec.EndTagType); Specs.add(parEnd); - ElementSpec cellEnd = - new ElementSpec(cellAttrs, ElementSpec.EndTagType); + ElementSpec cellEnd + = new ElementSpec(cellAttrs, ElementSpec.EndTagType); Specs.add(cellEnd); } } From 4eb4827f6a5903885f2c2e2afa3c17cef6cb5a99 Mon Sep 17 00:00:00 2001 From: Robert Field Date: Mon, 6 Mar 2017 15:44:37 -0800 Subject: [PATCH 366/447] 8176241: JShell tests: on full builds CompletionSuggestionTest.testImportStart() fails Reviewed-by: darcy --- langtools/test/jdk/jshell/CompletionSuggestionTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/langtools/test/jdk/jshell/CompletionSuggestionTest.java b/langtools/test/jdk/jshell/CompletionSuggestionTest.java index bb4b45a785a..5285d52437c 100644 --- a/langtools/test/jdk/jshell/CompletionSuggestionTest.java +++ b/langtools/test/jdk/jshell/CompletionSuggestionTest.java @@ -23,7 +23,7 @@ /* * @test - * @bug 8131025 8141092 8153761 8145263 8131019 8175886 8176184 + * @bug 8131025 8141092 8153761 8145263 8131019 8175886 8176184 8176241 * @summary Test Completion and Documentation * @library /tools/lib * @modules jdk.compiler/com.sun.tools.javac.api @@ -297,7 +297,6 @@ public class CompletionSuggestionTest extends KullaTesting { public void testImportStart() { assertCompletion("import c|", "com"); - assertCompletion("import o|", "org"); } public void testBrokenClassFile() throws Exception { From 097a0b8a955412998388e10584f456e2eee4e134 Mon Sep 17 00:00:00 2001 From: Naoto Sato Date: Mon, 6 Mar 2017 18:54:53 -0800 Subject: [PATCH 367/447] 8174736: [JCP] [Mac]Cannot launch JCP on Mac os with language set to "Chinese, Simplified" while region is not China Reviewed-by: bchristi --- .../macosx/native/libjava/java_props_macosx.c | 84 ++++++++++--------- 1 file changed, 45 insertions(+), 39 deletions(-) diff --git a/jdk/src/java.base/macosx/native/libjava/java_props_macosx.c b/jdk/src/java.base/macosx/native/libjava/java_props_macosx.c index 8246b8130a5..b11a4d00143 100644 --- a/jdk/src/java.base/macosx/native/libjava/java_props_macosx.c +++ b/jdk/src/java.base/macosx/native/libjava/java_props_macosx.c @@ -46,6 +46,8 @@ char *getPosixLocale(int cat) { #define LOCALEIDLENGTH 128 char *getMacOSXLocale(int cat) { + const char* retVal = NULL; + switch (cat) { case LC_MESSAGES: { @@ -72,41 +74,7 @@ char *getMacOSXLocale(int cat) { } CFRelease(languages); - // Language IDs use the language designators and (optional) region - // and script designators of BCP 47. So possible formats are: - // - // "en" (language designator only) - // "haw" (3-letter lanuage designator) - // "en-GB" (language with alpha-2 region designator) - // "es-419" (language with 3-digit UN M.49 area code) - // "zh-Hans" (language with ISO 15924 script designator) - // "zh-Hans-US" (language with ISO 15924 script designator and region) - // "zh-Hans-419" (language with ISO 15924 script designator and UN M.49) - // - // In the case of region designators (alpha-2 and/or UN M.49), we convert - // to our locale string format by changing '-' to '_'. That is, if - // the '-' is followed by fewer than 4 chars. - char* scriptOrRegion = strchr(languageString, '-'); - if (scriptOrRegion != NULL) { - int length = strlen(scriptOrRegion); - if (length > 5) { - // Region and script both exist. Honor the script for now - scriptOrRegion[5] = '\0'; - } else if (length < 5) { - *scriptOrRegion = '_'; - - assert((length == 3 && - // '-' followed by a 2 character region designator - isalpha(scriptOrRegion[1]) && - isalpha(scriptOrRegion[2])) || - (length == 4 && - // '-' followed by a 3-digit UN M.49 area code - isdigit(scriptOrRegion[1]) && - isdigit(scriptOrRegion[2]) && - isdigit(scriptOrRegion[3]))); - } - } - const char* retVal = languageString; + retVal = languageString; // Special case for Portuguese in Brazil: // The language code needs the "_BR" region code (to distinguish it @@ -120,20 +88,58 @@ char *getMacOSXLocale(int cat) { strcmp(localeString, "pt_BR") == 0) { retVal = localeString; } - return strdup(retVal); } break; default: { char localeString[LOCALEIDLENGTH]; - if (CFStringGetCString(CFLocaleGetIdentifier(CFLocaleCopyCurrent()), - localeString, LOCALEIDLENGTH, CFStringGetSystemEncoding())) { - return strdup(localeString); + if (!CFStringGetCString(CFLocaleGetIdentifier(CFLocaleCopyCurrent()), + localeString, LOCALEIDLENGTH, CFStringGetSystemEncoding())) { + return NULL; } + retVal = localeString; } break; } + if (retVal != NULL) { + // Language IDs use the language designators and (optional) region + // and script designators of BCP 47. So possible formats are: + // + // "en" (language designator only) + // "haw" (3-letter lanuage designator) + // "en-GB" (language with alpha-2 region designator) + // "es-419" (language with 3-digit UN M.49 area code) + // "zh-Hans" (language with ISO 15924 script designator) + // "zh-Hans-US" (language with ISO 15924 script designator and region) + // "zh-Hans-419" (language with ISO 15924 script designator and UN M.49) + // + // In the case of region designators (alpha-2 and/or UN M.49), we convert + // to our locale string format by changing '-' to '_'. That is, if + // the '-' is followed by fewer than 4 chars. + char* scriptOrRegion = strchr(retVal, '-'); + if (scriptOrRegion != NULL) { + int length = strlen(scriptOrRegion); + if (length > 5) { + // Region and script both exist. Honor the script for now + scriptOrRegion[5] = '\0'; + } else if (length < 5) { + *scriptOrRegion = '_'; + + assert((length == 3 && + // '-' followed by a 2 character region designator + isalpha(scriptOrRegion[1]) && + isalpha(scriptOrRegion[2])) || + (length == 4 && + // '-' followed by a 3-digit UN M.49 area code + isdigit(scriptOrRegion[1]) && + isdigit(scriptOrRegion[2]) && + isdigit(scriptOrRegion[3]))); + } + } + + return strdup(retVal); + } return NULL; } From 7d610c48e5250abe129a5695ab0b2becc1922816 Mon Sep 17 00:00:00 2001 From: Karl von Randow Date: Tue, 7 Mar 2017 13:00:23 +0300 Subject: [PATCH 368/447] 8152683: Deadlock when resuming from sleep with different monitor setup Reviewed-by: serb, vadim --- .../classes/sun/awt/CGraphicsEnvironment.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/jdk/src/java.desktop/macosx/classes/sun/awt/CGraphicsEnvironment.java b/jdk/src/java.desktop/macosx/classes/sun/awt/CGraphicsEnvironment.java index f84397a76fe..f0db13f9567 100644 --- a/jdk/src/java.desktop/macosx/classes/sun/awt/CGraphicsEnvironment.java +++ b/jdk/src/java.desktop/macosx/classes/sun/awt/CGraphicsEnvironment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -79,6 +79,10 @@ public final class CGraphicsEnvironment extends SunGraphicsEnvironment { /** Available CoreGraphics displays. */ private final Map devices = new HashMap<>(5); + /** + * The key in the {@link #devices} for the main display. + */ + private int mainDisplayID; /** Reference to the display reconfiguration callback context. */ private final long displayReconfigContext; @@ -136,15 +140,15 @@ public final class CGraphicsEnvironment extends SunGraphicsEnvironment { final Map old = new HashMap<>(devices); devices.clear(); - int mainID = getMainDisplayID(); + mainDisplayID = getMainDisplayID(); // initialization of the graphics device may change // list of displays on hybrid systems via an activation // of discrete video. // So, we initialize the main display first, and then // retrieve actual list of displays. - if (!old.containsKey(mainID)) { - old.put(mainID, new CGraphicsDevice(mainID)); + if (!old.containsKey(mainDisplayID)) { + old.put(mainDisplayID, new CGraphicsDevice(mainDisplayID)); } for (final int id : getDisplayIDs()) { @@ -157,7 +161,6 @@ public final class CGraphicsEnvironment extends SunGraphicsEnvironment { @Override public synchronized GraphicsDevice getDefaultScreenDevice() throws HeadlessException { - final int mainDisplayID = getMainDisplayID(); CGraphicsDevice d = devices.get(mainDisplayID); if (d == null) { // we do not expect that this may happen, the only response From 080a88360a8528be241da9eeaef3e2f368b59337 Mon Sep 17 00:00:00 2001 From: Sergei Kovalev Date: Tue, 7 Mar 2017 16:02:20 +0300 Subject: [PATCH 369/447] 8176213: 78 sun/security/krb5/auto tests failing due to undeclared dependecies Reviewed-by: weijun --- jdk/test/ProblemList.txt | 2 ++ .../sun/security/krb5/auto/HttpNegotiateServer.java | 11 ++++++++++- jdk/test/sun/security/krb5/auto/Renew.java | 8 +------- jdk/test/sun/security/krb5/auto/TEST.properties | 4 +++- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt index 0b5aa8f4372..9ade1eca7b8 100644 --- a/jdk/test/ProblemList.txt +++ b/jdk/test/ProblemList.txt @@ -219,6 +219,8 @@ javax/net/ssl/DTLS/RespondToRetransmit.java 8169086 macosx-x sun/security/mscapi/SignedObjectChain.java 8176183 windows-all +sun/security/krb5/auto/Basic.java 8176296 generic-all + ############################################################################ # jdk_sound diff --git a/jdk/test/sun/security/krb5/auto/HttpNegotiateServer.java b/jdk/test/sun/security/krb5/auto/HttpNegotiateServer.java index 55f2d1a4d15..38d9910893b 100644 --- a/jdk/test/sun/security/krb5/auto/HttpNegotiateServer.java +++ b/jdk/test/sun/security/krb5/auto/HttpNegotiateServer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,6 +24,15 @@ /* * @test * @bug 6578647 6829283 8171340 + * @modules java.base/sun.security.util + * java.security.jgss/sun.security.krb5.internal:+open + * java.security.jgss/sun.security.jgss + * java.security.jgss/sun.security.krb5:+open + * java.security.jgss/sun.security.krb5.internal.crypto + * java.security.jgss/sun.security.krb5.internal.ktab + * jdk.security.auth + * jdk.security.jgss + * jdk.httpserver * @run main/othervm HttpNegotiateServer * @summary Undefined requesting URL in java.net.Authenticator * .getPasswordAuthentication() diff --git a/jdk/test/sun/security/krb5/auto/Renew.java b/jdk/test/sun/security/krb5/auto/Renew.java index 41e3fcde6b5..0c441496d93 100644 --- a/jdk/test/sun/security/krb5/auto/Renew.java +++ b/jdk/test/sun/security/krb5/auto/Renew.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,12 +26,6 @@ * @bug 8058290 * @summary JAAS Krb5LoginModule has suspect ticket-renewal logic, * relies on clockskew grace - * @modules java.base/sun.security.util - * java.security.jgss/sun.security.krb5:+open - * java.security.jgss/sun.security.krb5.internal:+open - * java.security.jgss/sun.security.krb5.internal.ccache - * java.security.jgss/sun.security.krb5.internal.crypto - * java.security.jgss/sun.security.krb5.internal.ktab * @compile -XDignore.symbol.file Renew.java * @run main/othervm Renew 1 * @run main/othervm Renew 2 diff --git a/jdk/test/sun/security/krb5/auto/TEST.properties b/jdk/test/sun/security/krb5/auto/TEST.properties index 777c20d8233..fa23fd6fb0d 100644 --- a/jdk/test/sun/security/krb5/auto/TEST.properties +++ b/jdk/test/sun/security/krb5/auto/TEST.properties @@ -6,4 +6,6 @@ modules java.base/jdk.internal.misc \ java.security.jgss/sun.security.krb5.internal.ccache \ java.security.jgss/sun.security.krb5.internal.rcache \ java.security.jgss/sun.security.krb5.internal.crypto \ - java.security.jgss/sun.security.krb5.internal.ktab + java.security.jgss/sun.security.krb5.internal.ktab \ + jdk.security.auth \ + jdk.security.jgss From 6b3143e8313508a4f54f3a2e952429a9b59a6170 Mon Sep 17 00:00:00 2001 From: Weijun Wang Date: Tue, 7 Mar 2017 22:42:11 +0800 Subject: [PATCH 370/447] 8171319: keytool should print out warnings when reading or generating cert/cert req using weak algorithms Reviewed-by: coffeys --- .../classes/sun/security/pkcs10/PKCS10.java | 10 +- .../provider/certpath/BasicChecker.java | 12 +- .../sun/security/tools/keytool/Main.java | 337 ++++++++--- .../sun/security/tools/keytool/Resources.java | 35 +- .../sun/security/x509/X509CRLImpl.java | 7 +- .../tools/jarsigner/TimestampCheck.java | 14 + .../sun/security/tools/keytool/WeakAlg.java | 557 ++++++++++++++++++ 7 files changed, 891 insertions(+), 81 deletions(-) create mode 100644 jdk/test/sun/security/tools/keytool/WeakAlg.java diff --git a/jdk/src/java.base/share/classes/sun/security/pkcs10/PKCS10.java b/jdk/src/java.base/share/classes/sun/security/pkcs10/PKCS10.java index 02ed730b9af..9302580db1c 100644 --- a/jdk/src/java.base/share/classes/sun/security/pkcs10/PKCS10.java +++ b/jdk/src/java.base/share/classes/sun/security/pkcs10/PKCS10.java @@ -167,7 +167,8 @@ public class PKCS10 { // key and signature algorithm we found. // try { - sig = Signature.getInstance(id.getName()); + sigAlg = id.getName(); + sig = Signature.getInstance(sigAlg); sig.initVerify(subjectPublicKeyInfo); sig.update(data); if (!sig.verify(sigData)) @@ -218,6 +219,7 @@ public class PKCS10 { signature.update(certificateRequestInfo, 0, certificateRequestInfo.length); sig = signature.sign(); + sigAlg = signature.getAlgorithm(); /* * Build guts of SIGNED macro @@ -250,6 +252,11 @@ public class PKCS10 { public PublicKey getSubjectPublicKeyInfo() { return subjectPublicKeyInfo; } + /** + * Returns the signature algorithm. + */ + public String getSigAlg() { return sigAlg; } + /** * Returns the additional attributes requested. */ @@ -348,6 +355,7 @@ public class PKCS10 { private X500Name subject; private PublicKey subjectPublicKeyInfo; + private String sigAlg; private PKCS10Attributes attributeSet; private byte[] encoded; // signed } diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/BasicChecker.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/BasicChecker.java index 49a0368753e..43ff7b7cd9d 100644 --- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/BasicChecker.java +++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/BasicChecker.java @@ -51,7 +51,7 @@ import sun.security.util.Debug; /** * BasicChecker is a PKIXCertPathChecker that checks the basic information - * on a PKIX certificate, namely the signature, timestamp, and subject/issuer + * on a PKIX certificate, namely the signature, validity, and subject/issuer * name chaining. * * @since 1.4 @@ -125,7 +125,7 @@ class BasicChecker extends PKIXCertPathChecker { } /** - * Performs the signature, timestamp, and subject/issuer name chaining + * Performs the signature, validity, and subject/issuer name chaining * checks on the certificate using its internal state. This method does * not remove any critical extensions from the Collection. * @@ -141,7 +141,7 @@ class BasicChecker extends PKIXCertPathChecker { X509Certificate currCert = (X509Certificate)cert; if (!sigOnly) { - verifyTimestamp(currCert); + verifyValidity(currCert); verifyNameChaining(currCert); } verifySignature(currCert); @@ -177,12 +177,12 @@ class BasicChecker extends PKIXCertPathChecker { } /** - * Internal method to verify the timestamp on a certificate + * Internal method to verify the validity on a certificate */ - private void verifyTimestamp(X509Certificate cert) + private void verifyValidity(X509Certificate cert) throws CertPathValidatorException { - String msg = "timestamp"; + String msg = "validity"; if (debug != null) debug.println("---checking " + msg + ":" + date.toString() + "..."); diff --git a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java index b73773f5711..c71df1a2cbe 100644 --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java @@ -27,6 +27,7 @@ package sun.security.tools.keytool; import java.io.*; import java.security.CodeSigner; +import java.security.CryptoPrimitive; import java.security.KeyStore; import java.security.KeyStoreException; import java.security.MessageDigest; @@ -156,6 +157,7 @@ public final class Main { private boolean protectedPath = false; private boolean srcprotectedPath = false; private boolean cacerts = false; + private boolean nowarn = false; private CertificateFactory cf = null; private KeyStore caks = null; // "cacerts" keystore private char[] srcstorePass = null; @@ -166,6 +168,16 @@ public final class Main { private List ids = new ArrayList<>(); // used in GENCRL private List v3ext = new ArrayList<>(); + // Warnings on weak algorithms + private List weakWarnings = new ArrayList<>(); + + private static final DisabledAlgorithmConstraints DISABLED_CHECK = + new DisabledAlgorithmConstraints( + DisabledAlgorithmConstraints.PROPERTY_CERTPATH_DISABLED_ALGS); + + private static final Set SIG_PRIMITIVE_SET = Collections + .unmodifiableSet(EnumSet.of(CryptoPrimitive.SIGNATURE)); + enum Command { CERTREQ("Generates.a.certificate.request", ALIAS, SIGALG, FILEOUT, KEYPASS, KEYSTORE, DNAME, @@ -351,7 +363,7 @@ public final class Main { private static final String NONE = "NONE"; private static final String P11KEYSTORE = "PKCS11"; private static final String P12KEYSTORE = "PKCS12"; - private final String keyAlias = "mykey"; + private static final String keyAlias = "mykey"; // for i18n private static final java.util.ResourceBundle rb = @@ -387,6 +399,7 @@ public final class Main { throw e; } } finally { + printWeakWarnings(false); for (char[] pass : passwords) { if (pass != null) { Arrays.fill(pass, ' '); @@ -476,6 +489,8 @@ public final class Main { help = true; } else if (collator.compare(flags, "-conf") == 0) { i++; + } else if (collator.compare(flags, "-nowarn") == 0) { + nowarn = true; } else if (collator.compare(flags, "-keystore") == 0) { ksfname = args[++i]; if (new File(ksfname).getCanonicalPath().equals( @@ -1152,11 +1167,11 @@ public final class Main { } else if (command == LIST) { if (storePass == null && !KeyStoreUtil.isWindowsKeyStore(storetype)) { - printWarning(); + printNoIntegrityWarning(); } if (alias != null) { - doPrintEntry(alias, out); + doPrintEntry(rb.getString("the.certificate"), alias, out); } else { doPrintEntries(out); } @@ -1253,6 +1268,12 @@ public final class Main { throws Exception { + if (keyStore.containsAlias(alias) == false) { + MessageFormat form = new MessageFormat + (rb.getString("Alias.alias.does.not.exist")); + Object[] source = {alias}; + throw new Exception(form.format(source)); + } Certificate signerCert = keyStore.getCertificate(alias); byte[] encoded = signerCert.getEncoded(); X509CertImpl signerCertImpl = new X509CertImpl(encoded); @@ -1306,6 +1327,8 @@ public final class Main { byte[] rawReq = Pem.decode(new String(sb)); PKCS10 req = new PKCS10(rawReq); + checkWeak(rb.getString("the.certificate.request"), req); + info.set(X509CertInfo.KEY, new CertificateX509Key(req.getSubjectPublicKeyInfo())); info.set(X509CertInfo.SUBJECT, dname==null?req.getSubjectName():new X500Name(dname)); @@ -1335,6 +1358,9 @@ public final class Main { } } } + + checkWeak(rb.getString("the.issuer"), keyStore.getCertificateChain(alias)); + checkWeak(rb.getString("the.generated.certificate"), cert); } private void doGenCRL(PrintStream out) @@ -1385,6 +1411,7 @@ public final class Main { } else { out.write(crl.getEncodedInternal()); } + checkWeak(rb.getString("the.generated.crl"), crl, privateKey); } /** @@ -1431,6 +1458,8 @@ public final class Main { // Sign the request and base-64 encode it request.encodeAndSign(subject, signature); request.print(out); + + checkWeak(rb.getString("the.generated.certificate.request"), request); } /** @@ -1454,7 +1483,7 @@ public final class Main { { if (storePass == null && !KeyStoreUtil.isWindowsKeyStore(storetype)) { - printWarning(); + printNoIntegrityWarning(); } if (alias == null) { alias = keyAlias; @@ -1474,6 +1503,7 @@ public final class Main { throw new Exception(form.format(source)); } dumpCert(cert, out); + checkWeak(rb.getString("the.certificate"), cert); } /** @@ -1729,6 +1759,8 @@ public final class Main { keyPass = promptForKeyPass(alias, null, storePass); } keyStore.setKeyEntry(alias, privKey, keyPass, chain); + + checkWeak(rb.getString("the.generated.certificate"), chain[0]); } /** @@ -1810,7 +1842,7 @@ public final class Main { /** * Prints a single keystore entry. */ - private void doPrintEntry(String alias, PrintStream out) + private void doPrintEntry(String label, String alias, PrintStream out) throws Exception { if (keyStore.containsAlias(alias) == false) { @@ -1881,12 +1913,14 @@ public final class Main { } else { dumpCert(chain[i], out); } + checkWeak(label, chain[i]); } } else { // Print the digest of the user cert only out.println (rb.getString("Certificate.fingerprint.SHA.256.") + getCertFingerPrint("SHA-256", chain[0])); + checkWeak(label, chain); } } } else if (keyStore.entryInstanceOf(alias, @@ -1909,6 +1943,7 @@ public final class Main { out.println(rb.getString("Certificate.fingerprint.SHA.256.") + getCertFingerPrint("SHA-256", cert)); } + checkWeak(label, cert); } else { out.println(rb.getString("Unknown.Entry.Type")); } @@ -1992,7 +2027,7 @@ public final class Main { if (srcstorePass == null && !KeyStoreUtil.isWindowsKeyStore(srcstoretype)) { - // anti refactoring, copied from printWarning(), + // anti refactoring, copied from printNoIntegrityWarning(), // but change 2 lines System.err.println(); System.err.println(rb.getString @@ -2092,6 +2127,10 @@ public final class Main { "The.destination.pkcs12.keystore.has.different.storepass.and.keypass.Please.retry.with.destkeypass.specified.")); } } + Certificate c = srckeystore.getCertificate(alias); + if (c != null) { + checkWeak("<" + newAlias + ">", c); + } return 1; } catch (KeyStoreException kse) { Object[] source2 = {alias, kse.toString()}; @@ -2154,7 +2193,7 @@ public final class Main { for (Enumeration e = keyStore.aliases(); e.hasMoreElements(); ) { String alias = e.nextElement(); - doPrintEntry(alias, out); + doPrintEntry("<" + alias + ">", alias, out); if (verbose || rfc) { out.println(rb.getString("NEWLINE")); out.println(rb.getString @@ -2300,19 +2339,28 @@ public final class Main { for (CRL crl: loadCRLs(src)) { printCRL(crl, out); String issuer = null; + Certificate signer = null; if (caks != null) { issuer = verifyCRL(caks, crl); if (issuer != null) { + signer = caks.getCertificate(issuer); out.printf(rb.getString( - "verified.by.s.in.s"), issuer, "cacerts"); + "verified.by.s.in.s.weak"), + issuer, + "cacerts", + withWeak(signer.getPublicKey())); out.println(); } } if (issuer == null && keyStore != null) { issuer = verifyCRL(keyStore, crl); if (issuer != null) { + signer = keyStore.getCertificate(issuer); out.printf(rb.getString( - "verified.by.s.in.s"), issuer, "keystore"); + "verified.by.s.in.s.weak"), + issuer, + "keystore", + withWeak(signer.getPublicKey())); out.println(); } } @@ -2324,18 +2372,26 @@ public final class Main { out.println(rb.getString ("STARNN")); } + checkWeak(rb.getString("the.crl"), crl, signer == null ? null : signer.getPublicKey()); } } private void printCRL(CRL crl, PrintStream out) throws Exception { + X509CRL xcrl = (X509CRL)crl; if (rfc) { - X509CRL xcrl = (X509CRL)crl; out.println("-----BEGIN X509 CRL-----"); out.println(Base64.getMimeEncoder(64, CRLF).encodeToString(xcrl.getEncoded())); out.println("-----END X509 CRL-----"); } else { - out.println(crl.toString()); + String s; + if (crl instanceof X509CRLImpl) { + X509CRLImpl x509crl = (X509CRLImpl) crl; + s = x509crl.toStringWithAlgName(withWeak("" + x509crl.getSigAlgId())); + } else { + s = crl.toString(); + } + out.println(s); } } @@ -2362,8 +2418,11 @@ public final class Main { PKCS10 req = new PKCS10(Pem.decode(new String(sb))); PublicKey pkey = req.getSubjectPublicKeyInfo(); - out.printf(rb.getString("PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key."), - req.getSubjectName(), pkey.getFormat(), pkey.getAlgorithm()); + out.printf(rb.getString("PKCS.10.with.weak"), + req.getSubjectName(), + pkey.getFormat(), + withWeak(pkey), + withWeak(req.getSigAlg())); for (PKCS10Attribute attr: req.getAttributes().getAttributes()) { ObjectIdentifier oid = attr.getAttributeId(); if (oid.equals(PKCS9Attribute.EXTENSION_REQUEST_OID)) { @@ -2386,6 +2445,7 @@ public final class Main { if (debug) { out.println(req); // Just to see more, say, public key length... } + checkWeak(rb.getString("the.certificate.request"), req); } /** @@ -2425,6 +2485,15 @@ public final class Main { if (i < (certs.length-1)) { out.println(); } + checkWeak(oneInMany(rb.getString("the.certificate"), i, certs.length), x509Cert); + } + } + + private static String oneInMany(String label, int i, int num) { + if (num == 1) { + return label; + } else { + return String.format(rb.getString("one.in.many"), label, i+1, num); } } @@ -2458,7 +2527,11 @@ public final class Main { out.println(); out.println(rb.getString("Signature.")); out.println(); - for (Certificate cert: signer.getSignerCertPath().getCertificates()) { + + List certs + = signer.getSignerCertPath().getCertificates(); + int cc = 0; + for (Certificate cert: certs) { X509Certificate x = (X509Certificate)cert; if (rfc) { out.println(rb.getString("Certificate.owner.") + x.getSubjectDN() + "\n"); @@ -2467,12 +2540,15 @@ public final class Main { printX509Cert(x, out); } out.println(); + checkWeak(oneInMany(rb.getString("the.certificate"), cc++, certs.size()), x); } Timestamp ts = signer.getTimestamp(); if (ts != null) { out.println(rb.getString("Timestamp.")); out.println(); - for (Certificate cert: ts.getSignerCertPath().getCertificates()) { + certs = ts.getSignerCertPath().getCertificates(); + cc = 0; + for (Certificate cert: certs) { X509Certificate x = (X509Certificate)cert; if (rfc) { out.println(rb.getString("Certificate.owner.") + x.getSubjectDN() + "\n"); @@ -2481,6 +2557,7 @@ public final class Main { printX509Cert(x, out); } out.println(); + checkWeak(oneInMany(rb.getString("the.tsa.certificate"), cc++, certs.size()), x); } } } @@ -2523,6 +2600,7 @@ public final class Main { printX509Cert((X509Certificate)cert, out); out.println(); } + checkWeak(oneInMany(rb.getString("the.certificate"), i, chain.size()), cert); } catch (Exception e) { if (debug) { e.printStackTrace(); @@ -2698,7 +2776,7 @@ public final class Main { } // Now store the newly established chain in the keystore. The new - // chain replaces the old one. + // chain replaces the old one. The chain can be null if user chooses no. if (newChain != null) { keyStore.setKeyEntry(alias, privKey, (keyPass != null) ? keyPass : storePass, @@ -2735,6 +2813,12 @@ public final class Main { throw new Exception(rb.getString("Input.not.an.X.509.certificate")); } + if (noprompt) { + keyStore.setCertificateEntry(alias, cert); + checkWeak(rb.getString("the.input"), cert); + return true; + } + // if certificate is self-signed, make sure it verifies boolean selfSigned = false; if (KeyStoreUtil.isSelfSigned(cert)) { @@ -2742,11 +2826,6 @@ public final class Main { selfSigned = true; } - if (noprompt) { - keyStore.setCertificateEntry(alias, cert); - return true; - } - // check if cert already exists in keystore String reply = null; String trustalias = keyStore.getCertificateAlias(cert); @@ -2755,6 +2834,8 @@ public final class Main { ("Certificate.already.exists.in.keystore.under.alias.trustalias.")); Object[] source = {trustalias}; System.err.println(form.format(source)); + checkWeak(rb.getString("the.input"), cert); + printWeakWarnings(true); reply = getYesNoReply (rb.getString("Do.you.still.want.to.add.it.no.")); } else if (selfSigned) { @@ -2764,6 +2845,8 @@ public final class Main { ("Certificate.already.exists.in.system.wide.CA.keystore.under.alias.trustalias.")); Object[] source = {trustalias}; System.err.println(form.format(source)); + checkWeak(rb.getString("the.input"), cert); + printWeakWarnings(true); reply = getYesNoReply (rb.getString("Do.you.still.want.to.add.it.to.your.own.keystore.no.")); } @@ -2771,6 +2854,8 @@ public final class Main { // Print the cert and ask user if they really want to add // it to their keystore printX509Cert(cert, System.out); + checkWeak(rb.getString("the.input"), cert); + printWeakWarnings(true); reply = getYesNoReply (rb.getString("Trust.this.certificate.no.")); } @@ -2784,6 +2869,7 @@ public final class Main { } } + // Not found in this keystore and not self-signed // Try to establish trust chain try { Certificate[] chain = establishCertChain(null, cert); @@ -2795,6 +2881,8 @@ public final class Main { // Print the cert and ask user if they really want to add it to // their keystore printX509Cert(cert, System.out); + checkWeak(rb.getString("the.input"), cert); + printWeakWarnings(true); reply = getYesNoReply (rb.getString("Trust.this.certificate.no.")); if ("YES".equals(reply)) { @@ -2933,6 +3021,24 @@ public final class Main { return keyPass; } + private String withWeak(String alg) { + if (DISABLED_CHECK.permits(SIG_PRIMITIVE_SET, alg, null)) { + return alg; + } else { + return String.format(rb.getString("with.weak"), alg); + } + } + + private String withWeak(PublicKey key) { + if (DISABLED_CHECK.permits(SIG_PRIMITIVE_SET, key)) { + return String.format(rb.getString("key.bit"), + KeyUtil.getKeySize(key), key.getAlgorithm()); + } else { + return String.format(rb.getString("key.bit.weak"), + KeyUtil.getKeySize(key), key.getAlgorithm()); + } + } + /** * Prints a certificate in a human readable format. */ @@ -2941,7 +3047,7 @@ public final class Main { { MessageFormat form = new MessageFormat - (rb.getString(".PATTERN.printX509Cert")); + (rb.getString(".PATTERN.printX509Cert.with.weak")); PublicKey pkey = cert.getPublicKey(); Object[] source = {cert.getSubjectDN().toString(), cert.getIssuerDN().toString(), @@ -2950,10 +3056,9 @@ public final class Main { cert.getNotAfter().toString(), getCertFingerPrint("SHA-1", cert), getCertFingerPrint("SHA-256", cert), - cert.getSigAlgName(), - pkey.getAlgorithm(), - KeyUtil.getKeySize(pkey), - cert.getVersion(), + withWeak(cert.getSigAlgName()), + withWeak(pkey), + cert.getVersion() }; out.println(form.format(source)); @@ -3003,12 +3108,12 @@ public final class Main { * @param ks the keystore to search with, not null * @return cert itself if it's already inside ks, * or a certificate inside ks who signs cert, - * or null otherwise. + * or null otherwise. A label is added. */ - private static Certificate getTrustedSigner(Certificate cert, KeyStore ks) - throws Exception { + private static Pair + getTrustedSigner(Certificate cert, KeyStore ks) throws Exception { if (ks.getCertificateAlias(cert) != null) { - return cert; + return new Pair<>("", cert); } for (Enumeration aliases = ks.aliases(); aliases.hasMoreElements(); ) { @@ -3017,7 +3122,7 @@ public final class Main { if (trustedCert != null) { try { cert.verify(trustedCert.getPublicKey()); - return trustedCert; + return new Pair<>(name, trustedCert); } catch (Exception e) { // Not verified, skip to the next one } @@ -3281,7 +3386,7 @@ public final class Main { /** * Prints warning about missing integrity check. */ - private void printWarning() { + private void printNoIntegrityWarning() { System.err.println(); System.err.println(rb.getString (".WARNING.WARNING.WARNING.")); @@ -3306,6 +3411,9 @@ public final class Main { Certificate[] replyCerts) throws Exception { + + checkWeak(rb.getString("reply"), replyCerts); + // order the certs in the reply (bottom-up). // we know that all certs in the reply are of type X.509, because // we parsed them using an X.509 certificate factory @@ -3358,9 +3466,11 @@ public final class Main { // do we trust the cert at the top? Certificate topCert = replyCerts[replyCerts.length-1]; - Certificate root = getTrustedSigner(topCert, keyStore); + boolean fromKeyStore = true; + Pair root = getTrustedSigner(topCert, keyStore); if (root == null && trustcacerts && caks != null) { root = getTrustedSigner(topCert, caks); + fromKeyStore = false; } if (root == null) { System.err.println(); @@ -3369,33 +3479,42 @@ public final class Main { printX509Cert((X509Certificate)topCert, System.out); System.err.println(); System.err.print(rb.getString(".is.not.trusted.")); + printWeakWarnings(true); String reply = getYesNoReply (rb.getString("Install.reply.anyway.no.")); if ("NO".equals(reply)) { return null; } } else { - if (root != topCert) { + if (root.snd != topCert) { // append the root CA cert to the chain Certificate[] tmpCerts = new Certificate[replyCerts.length+1]; System.arraycopy(replyCerts, 0, tmpCerts, 0, replyCerts.length); - tmpCerts[tmpCerts.length-1] = root; + tmpCerts[tmpCerts.length-1] = root.snd; replyCerts = tmpCerts; + checkWeak(String.format(rb.getString(fromKeyStore ? + "alias.in.keystore" : + "alias.in.cacerts"), + root.fst), + root.snd); } } - return replyCerts; } /** * Establishes a certificate chain (using trusted certificates in the - * keystore), starting with the user certificate + * keystore and cacerts), starting with the reply (certToVerify) * and ending at a self-signed certificate found in the keystore. * - * @param userCert the user certificate of the alias - * @param certToVerify the single certificate provided in the reply + * @param userCert optional existing certificate, mostly likely be the + * original self-signed cert created by -genkeypair. + * It must have the same public key as certToVerify + * but cannot be the same cert. + * @param certToVerify the starting certificate to build the chain + * @returns the established chain, might be null if user decides not */ private Certificate[] establishCertChain(Certificate userCert, Certificate certToVerify) @@ -3423,30 +3542,37 @@ public final class Main { // Use the subject distinguished name as the key into the hash table. // All certificates associated with the same subject distinguished // name are stored in the same hash table entry as a vector. - Hashtable> certs = null; + Hashtable>> certs = null; if (keyStore.size() > 0) { - certs = new Hashtable>(11); + certs = new Hashtable<>(11); keystorecerts2Hashtable(keyStore, certs); } if (trustcacerts) { if (caks!=null && caks.size()>0) { if (certs == null) { - certs = new Hashtable>(11); + certs = new Hashtable<>(11); } keystorecerts2Hashtable(caks, certs); } } // start building chain - Vector chain = new Vector<>(2); - if (buildChain((X509Certificate)certToVerify, chain, certs)) { - Certificate[] newChain = new Certificate[chain.size()]; + Vector> chain = new Vector<>(2); + if (buildChain( + new Pair<>(rb.getString("the.input"), + (X509Certificate) certToVerify), + chain, certs)) { + for (Pair p : chain) { + checkWeak(p.fst, p.snd); + } + Certificate[] newChain = + new Certificate[chain.size()]; // buildChain() returns chain with self-signed root-cert first and // user-cert last, so we need to invert the chain before we store // it int j=0; for (int i=chain.size()-1; i>=0; i--) { - newChain[j] = chain.elementAt(i); + newChain[j] = chain.elementAt(i).snd; j++; } return newChain; @@ -3457,7 +3583,17 @@ public final class Main { } /** - * Recursively tries to establish chain from pool of trusted certs. + * Recursively tries to establish chain from pool of certs starting from + * certToVerify until a self-signed cert is found, and fill the certs found + * into chain. Each cert in the chain signs the next one. + * + * This method is able to recover from an error, say, if certToVerify + * is signed by certA but certA has no issuer in certs and itself is not + * self-signed, the method can try another certB that also signs + * certToVerify and look for signer of certB, etc, etc. + * + * Each cert in chain comes with a label showing its origin. The label is + * used in the warning message when the cert is considered a risk. * * @param certToVerify the cert that needs to be verified. * @param chain the chain that's being built. @@ -3465,19 +3601,20 @@ public final class Main { * * @return true if successful, false otherwise. */ - private boolean buildChain(X509Certificate certToVerify, - Vector chain, - Hashtable> certs) { - Principal issuer = certToVerify.getIssuerDN(); - if (KeyStoreUtil.isSelfSigned(certToVerify)) { + private boolean buildChain(Pair certToVerify, + Vector> chain, + Hashtable>> certs) { + if (KeyStoreUtil.isSelfSigned(certToVerify.snd)) { // reached self-signed root cert; // no verification needed because it's trusted. chain.addElement(certToVerify); return true; } + Principal issuer = certToVerify.snd.getIssuerDN(); + // Get the issuer's certificate(s) - Vector vec = certs.get(issuer); + Vector> vec = certs.get(issuer); if (vec == null) { return false; } @@ -3485,13 +3622,12 @@ public final class Main { // Try out each certificate in the vector, until we find one // whose public key verifies the signature of the certificate // in question. - for (Enumeration issuerCerts = vec.elements(); - issuerCerts.hasMoreElements(); ) { - X509Certificate issuerCert - = (X509Certificate)issuerCerts.nextElement(); - PublicKey issuerPubKey = issuerCert.getPublicKey(); + for (Enumeration> issuerCerts = vec.elements(); + issuerCerts.hasMoreElements(); ) { + Pair issuerCert = issuerCerts.nextElement(); + PublicKey issuerPubKey = issuerCert.snd.getPublicKey(); try { - certToVerify.verify(issuerPubKey); + certToVerify.snd.verify(issuerPubKey); } catch (Exception e) { continue; } @@ -3541,10 +3677,11 @@ public final class Main { /** * Stores the (leaf) certificates of a keystore in a hashtable. * All certs belonging to the same CA are stored in a vector that - * in turn is stored in the hashtable, keyed by the CA's subject DN + * in turn is stored in the hashtable, keyed by the CA's subject DN. + * Each cert comes with a string label that shows its origin and alias. */ private void keystorecerts2Hashtable(KeyStore ks, - Hashtable> hash) + Hashtable>> hash) throws Exception { for (Enumeration aliases = ks.aliases(); @@ -3553,13 +3690,20 @@ public final class Main { Certificate cert = ks.getCertificate(alias); if (cert != null) { Principal subjectDN = ((X509Certificate)cert).getSubjectDN(); - Vector vec = hash.get(subjectDN); + Pair pair = new Pair<>( + String.format( + rb.getString(ks == caks ? + "alias.in.cacerts" : + "alias.in.keystore"), + alias), + (X509Certificate)cert); + Vector> vec = hash.get(subjectDN); if (vec == null) { - vec = new Vector(); - vec.addElement(cert); + vec = new Vector<>(); + vec.addElement(pair); } else { - if (!vec.contains(cert)) { - vec.addElement(cert); + if (!vec.contains(pair)) { + vec.addElement(pair); } } hash.put(subjectDN, vec); @@ -4157,6 +4301,67 @@ public final class Main { return result; } + private void checkWeak(String label, String sigAlg, Key key) { + + if (!DISABLED_CHECK.permits(SIG_PRIMITIVE_SET, sigAlg, null)) { + weakWarnings.add(String.format( + rb.getString("whose.sigalg.risk"), label, sigAlg)); + } + if (key != null && !DISABLED_CHECK.permits(SIG_PRIMITIVE_SET, key)) { + weakWarnings.add(String.format( + rb.getString("whose.key.risk"), + label, + String.format(rb.getString("key.bit"), + KeyUtil.getKeySize(key), key.getAlgorithm()))); + } + } + + private void checkWeak(String label, Certificate[] certs) { + for (int i = 0; i < certs.length; i++) { + Certificate cert = certs[i]; + if (cert instanceof X509Certificate) { + X509Certificate xc = (X509Certificate)cert; + String fullLabel = label; + if (certs.length > 1) { + fullLabel = oneInMany(label, i, certs.length); + } + checkWeak(fullLabel, xc.getSigAlgName(), xc.getPublicKey()); + } + } + } + + private void checkWeak(String label, Certificate cert) { + if (cert instanceof X509Certificate) { + X509Certificate xc = (X509Certificate)cert; + checkWeak(label, xc.getSigAlgName(), xc.getPublicKey()); + } + } + + private void checkWeak(String label, PKCS10 p10) { + checkWeak(label, p10.getSigAlg(), p10.getSubjectPublicKeyInfo()); + } + + private void checkWeak(String label, CRL crl, Key key) { + if (crl instanceof X509CRLImpl) { + X509CRLImpl impl = (X509CRLImpl)crl; + checkWeak(label, impl.getSigAlgName(), key); + } + } + + private void printWeakWarnings(boolean newLine) { + if (!weakWarnings.isEmpty() && !nowarn) { + System.err.println("\nWarning:"); + for (String warning : weakWarnings) { + System.err.println(warning); + } + if (newLine) { + // When calling before a yes/no prompt, add a new line + System.err.println(); + } + } + weakWarnings.clear(); + } + /** * Prints the usage of this tool. */ diff --git a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources.java b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources.java index 8ede53992d8..522449c366b 100644 --- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources.java +++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources.java @@ -360,8 +360,6 @@ public class Resources extends java.util.ListResourceBundle { {"Enter.alias.name.", "Enter alias name: "}, {".RETURN.if.same.as.for.otherAlias.", "\t(RETURN if same as for <{0}>)"}, - {".PATTERN.printX509Cert", - "Owner: {0}\nIssuer: {1}\nSerial number: {2}\nValid from: {3} until: {4}\nCertificate fingerprints:\n\t SHA1: {5}\n\t SHA256: {6}\nSignature algorithm name: {7}\nSubject Public Key Algorithm: {8} ({9,number,#})\nVersion: {10}"}, {"What.is.your.first.and.last.name.", "What is your first and last name?"}, {"What.is.the.name.of.your.organizational.unit.", @@ -428,16 +426,12 @@ public class Resources extends java.util.ListResourceBundle { {"Please.provide.keysize.for.secret.key.generation", "Please provide -keysize for secret key generation"}, - {"verified.by.s.in.s", "Verified by %s in %s"}, {"warning.not.verified.make.sure.keystore.is.correct", "WARNING: not verified. Make sure -keystore is correct."}, {"Extensions.", "Extensions: "}, {".Empty.value.", "(Empty value)"}, {"Extension.Request.", "Extension Request:"}, - {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.", - "PKCS #10 Certificate Request (Version 1.0)\n" + - "Subject: %s\nPublic Key: %s format %s key\n"}, {"Unknown.keyUsage.type.", "Unknown keyUsage type: "}, {"Unknown.extendedkeyUsage.type.", "Unknown extendedkeyUsage type: "}, {"Unknown.AccessDescription.type.", "Unknown AccessDescription type: "}, @@ -446,7 +440,34 @@ public class Resources extends java.util.ListResourceBundle { "This extension cannot be marked as critical. "}, {"Odd.number.of.hex.digits.found.", "Odd number of hex digits found: "}, {"Unknown.extension.type.", "Unknown extension type: "}, - {"command.{0}.is.ambiguous.", "command {0} is ambiguous:"} + {"command.{0}.is.ambiguous.", "command {0} is ambiguous:"}, + + // 8171319: keytool should print out warnings when reading or + // generating cert/cert req using weak algorithms + {"the.certificate.request", "The certificate request"}, + {"the.issuer", "The issuer"}, + {"the.generated.certificate", "The generated certificate"}, + {"the.generated.crl", "The generated CRL"}, + {"the.generated.certificate.request", "The generated certificate request"}, + {"the.certificate", "The certificate"}, + {"the.crl", "The CRL"}, + {"the.tsa.certificate", "The TSA certificate"}, + {"the.input", "The input"}, + {"reply", "Reply"}, + {"one.in.many", "%s #%d of %d"}, + {"alias.in.cacerts", "Issuer <%s> in cacerts"}, + {"alias.in.keystore", "Issuer <%s>"}, + {"with.weak", "%s (weak)"}, + {"key.bit", "%d-bit %s key"}, + {"key.bit.weak", "%d-bit %s key (weak)"}, + {".PATTERN.printX509Cert.with.weak", + "Owner: {0}\nIssuer: {1}\nSerial number: {2}\nValid from: {3} until: {4}\nCertificate fingerprints:\n\t SHA1: {5}\n\t SHA256: {6}\nSignature algorithm name: {7}\nSubject Public Key Algorithm: {8}\nVersion: {9}"}, + {"PKCS.10.with.weak", + "PKCS #10 Certificate Request (Version 1.0)\n" + + "Subject: %s\nFormat: %s\nPublic Key: %s\nSignature algorithm: %s\n"}, + {"verified.by.s.in.s.weak", "Verified by %s in %s with a %s"}, + {"whose.sigalg.risk", "%s uses the %s signature algorithm which is considered a security risk."}, + {"whose.key.risk", "%s uses a %s which is considered a security risk."}, }; diff --git a/jdk/src/java.base/share/classes/sun/security/x509/X509CRLImpl.java b/jdk/src/java.base/share/classes/sun/security/x509/X509CRLImpl.java index 1fc5bed4c83..364d47b5f4d 100644 --- a/jdk/src/java.base/share/classes/sun/security/x509/X509CRLImpl.java +++ b/jdk/src/java.base/share/classes/sun/security/x509/X509CRLImpl.java @@ -536,13 +536,18 @@ public class X509CRLImpl extends X509CRL implements DerEncoder { * @return value of this CRL in a printable form. */ public String toString() { + return toStringWithAlgName("" + sigAlgId); + } + + // Specifically created for keytool to append a (weak) label to sigAlg + public String toStringWithAlgName(String name) { StringBuilder sb = new StringBuilder(); sb.append("X.509 CRL v") .append(version+1) .append('\n'); if (sigAlgId != null) sb.append("Signature Algorithm: ") - .append(sigAlgId) + .append(name) .append(", OID=") .append(sigAlgId.getOID()) .append('\n'); diff --git a/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java b/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java index 8cb2541f151..928bc5aa199 100644 --- a/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java +++ b/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java @@ -43,6 +43,7 @@ import java.util.List; import java.util.jar.JarEntry; import java.util.jar.JarFile; +import jdk.test.lib.SecurityTools; import jdk.testlibrary.*; import jdk.testlibrary.JarUtils; import sun.security.pkcs.ContentInfo; @@ -66,6 +67,7 @@ import sun.security.x509.X500Name; * java.base/sun.security.util * java.base/sun.security.tools.keytool * @library /lib/testlibrary + * @library /test/lib * @run main/timeout=600 TimestampCheck */ public class TimestampCheck { @@ -457,6 +459,18 @@ public class TimestampCheck { verify(file, "-J-Djava.security.debug=jar") .shouldHaveExitValue(0) .shouldMatch("SignatureException:.*disabled"); + + // For 8171319: keytool should print out warnings when reading or + // generating cert/cert req using weak algorithms. + // Must call keytool the command, otherwise doPrintCert() might not + // be able to reset "jdk.certpath.disabledAlgorithms". + String sout = SecurityTools.keytool("-printcert -jarfile weak.jar") + .stderrShouldContain("The TSA certificate uses a 512-bit RSA key" + + " which is considered a security risk.") + .getStdout(); + if (sout.indexOf("weak", sout.indexOf("Timestamp:")) < 0) { + throw new RuntimeException("timestamp not weak: " + sout); + } } static void checkHalfWeak(String file) throws Throwable { diff --git a/jdk/test/sun/security/tools/keytool/WeakAlg.java b/jdk/test/sun/security/tools/keytool/WeakAlg.java new file mode 100644 index 00000000000..95603ba45ea --- /dev/null +++ b/jdk/test/sun/security/tools/keytool/WeakAlg.java @@ -0,0 +1,557 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8171319 + * @summary keytool should print out warnings when reading or generating + * cert/cert req using weak algorithms + * @library /test/lib + * @modules java.base/sun.security.tools.keytool + * java.base/sun.security.tools + * java.base/sun.security.util + * @run main/othervm/timeout=600 -Duser.language=en -Duser.country=US WeakAlg + */ + +import jdk.test.lib.SecurityTools; +import jdk.test.lib.process.OutputAnalyzer; +import sun.security.tools.KeyStoreUtil; +import sun.security.util.DisabledAlgorithmConstraints; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintStream; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; +import java.security.CryptoPrimitive; +import java.security.KeyStore; +import java.security.cert.X509Certificate; +import java.util.Collections; +import java.util.EnumSet; +import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +public class WeakAlg { + + public static void main(String[] args) throws Throwable { + + rm("ks"); + + // -genkeypair, and -printcert, -list -alias, -exportcert + // (w/ different formats) + checkGenKeyPair("a", "-keyalg RSA -sigalg MD5withRSA", "MD5withRSA"); + checkGenKeyPair("b", "-keyalg RSA -keysize 512", "512-bit RSA key"); + checkGenKeyPair("c", "-keyalg RSA", null); + + kt("-list") + .shouldContain("Warning:") + .shouldMatch(".*MD5withRSA.*risk") + .shouldMatch(".*512-bit RSA key.*risk"); + kt("-list -v") + .shouldContain("Warning:") + .shouldMatch(".*MD5withRSA.*risk") + .shouldContain("MD5withRSA (weak)") + .shouldMatch(".*512-bit RSA key.*risk") + .shouldContain("512-bit RSA key (weak)"); + + // Multiple warnings for multiple cert in -printcert or -list or -exportcert + + // -certreq, -printcertreq, -gencert + checkCertReq("a", "", null); + gencert("c-a", "") + .shouldNotContain("Warning"); // new sigalg is not weak + gencert("c-a", "-sigalg MD2withRSA") + .shouldContain("Warning:") + .shouldMatch("The generated certificate.*MD2withRSA.*risk"); + + checkCertReq("a", "-sigalg MD5withRSA", "MD5withRSA"); + gencert("c-a", "") + .shouldContain("Warning:") + .shouldMatch("The certificate request.*MD5withRSA.*risk"); + gencert("c-a", "-sigalg MD2withRSA") + .shouldContain("Warning:") + .shouldMatch("The certificate request.*MD5withRSA.*risk") + .shouldMatch("The generated certificate.*MD2withRSA.*risk"); + + checkCertReq("b", "", "512-bit RSA key"); + gencert("c-b", "") + .shouldContain("Warning:") + .shouldMatch("The certificate request.*512-bit RSA key.*risk") + .shouldMatch("The generated certificate.*512-bit RSA key.*risk"); + + checkCertReq("c", "", null); + gencert("a-c", "") + .shouldContain("Warning:") + .shouldMatch("The issuer.*MD5withRSA.*risk"); + + // but the new cert is not weak + kt("-printcert -file a-c.cert") + .shouldNotContain("Warning") + .shouldNotContain("weak"); + + gencert("b-c", "") + .shouldContain("Warning:") + .shouldMatch("The issuer.*512-bit RSA key.*risk"); + + // -importcert + checkImport(); + + // -importkeystore + checkImportKeyStore(); + + // -gencrl, -printcrl + + checkGenCRL("a", "", null); + checkGenCRL("a", "-sigalg MD5withRSA", "MD5withRSA"); + checkGenCRL("b", "", "512-bit RSA key"); + checkGenCRL("c", "", null); + + kt("-delete -alias b"); + kt("-printcrl -file b.crl") + .shouldContain("WARNING: not verified"); + } + + static void checkImportKeyStore() throws Exception { + + saveStore(); + + rm("ks"); + kt("-importkeystore -srckeystore ks2 -srcstorepass changeit") + .shouldContain("3 entries successfully imported") + .shouldContain("Warning") + .shouldMatch(".*512-bit RSA key.*risk") + .shouldMatch(".*MD5withRSA.*risk"); + + rm("ks"); + kt("-importkeystore -srckeystore ks2 -srcstorepass changeit -srcalias a") + .shouldContain("Warning") + .shouldMatch(".*MD5withRSA.*risk"); + + reStore(); + } + + static void checkImport() throws Exception { + + saveStore(); + + // add trusted cert + + // cert already in + kt("-importcert -alias d -file a.cert", "no") + .shouldContain("Certificate already exists in keystore") + .shouldContain("Warning") + .shouldMatch("The input.*MD5withRSA.*risk") + .shouldContain("Do you still want to add it?"); + kt("-importcert -alias d -file a.cert -noprompt") + .shouldContain("Warning") + .shouldMatch("The input.*MD5withRSA.*risk") + .shouldNotContain("[no]"); + + // cert is self-signed + kt("-delete -alias a"); + kt("-delete -alias d"); + kt("-importcert -alias d -file a.cert", "no") + .shouldContain("Warning") + .shouldContain("MD5withRSA (weak)") + .shouldMatch("The input.*MD5withRSA.*risk") + .shouldContain("Trust this certificate?"); + kt("-importcert -alias d -file a.cert -noprompt") + .shouldContain("Warning") + .shouldMatch("The input.*MD5withRSA.*risk") + .shouldNotContain("[no]"); + + // cert is self-signed cacerts + String weakSigAlgCA = null; + KeyStore ks = KeyStoreUtil.getCacertsKeyStore(); + if (ks != null) { + DisabledAlgorithmConstraints disabledCheck = + new DisabledAlgorithmConstraints( + DisabledAlgorithmConstraints.PROPERTY_CERTPATH_DISABLED_ALGS); + Set sigPrimitiveSet = Collections + .unmodifiableSet(EnumSet.of(CryptoPrimitive.SIGNATURE)); + + for (String s : Collections.list(ks.aliases())) { + if (ks.isCertificateEntry(s)) { + X509Certificate c = (X509Certificate)ks.getCertificate(s); + String sigAlg = c.getSigAlgName(); + if (!disabledCheck.permits(sigPrimitiveSet, sigAlg, null)) { + weakSigAlgCA = sigAlg; + Files.write(Paths.get("ca.cert"), + ks.getCertificate(s).getEncoded()); + break; + } + } + } + } + if (weakSigAlgCA != null) { + kt("-delete -alias d"); + kt("-importcert -alias d -trustcacerts -file ca.cert", "no") + .shouldContain("Certificate already exists in system-wide CA") + .shouldContain("Warning") + .shouldMatch("The input.*" + weakSigAlgCA + ".*risk") + .shouldContain("Do you still want to add it to your own keystore?"); + kt("-importcert -alias d -file ca.cert -noprompt") + .shouldContain("Warning") + .shouldMatch("The input.*" + weakSigAlgCA + ".*risk") + .shouldNotContain("[no]"); + } + + // a non self-signed weak cert + reStore(); + certreq("b", ""); + gencert("c-b", ""); + kt("-importcert -alias d -file c-b.cert") // weak only, no prompt + .shouldContain("Warning") + .shouldNotContain("512-bit RSA key (weak)") + .shouldMatch("The input.*512-bit RSA key.*risk") + .shouldNotContain("[no]"); + + kt("-delete -alias b"); + kt("-delete -alias c"); + kt("-delete -alias d"); + + kt("-importcert -alias d -file c-b.cert", "no") // weak and not trusted + .shouldContain("Warning") + .shouldContain("512-bit RSA key (weak)") + .shouldMatch("The input.*512-bit RSA key.*risk") + .shouldContain("Trust this certificate?"); + kt("-importcert -alias d -file c-b.cert -noprompt") + .shouldContain("Warning") + .shouldMatch("The input.*512-bit RSA key.*risk") + .shouldNotContain("[no]"); + + // a non self-signed strong cert + reStore(); + certreq("a", ""); + gencert("c-a", ""); + kt("-importcert -alias d -file c-a.cert") // trusted + .shouldNotContain("Warning") + .shouldNotContain("[no]"); + + kt("-delete -alias a"); + kt("-delete -alias c"); + kt("-delete -alias d"); + + kt("-importcert -alias d -file c-a.cert", "no") // not trusted + .shouldNotContain("Warning") + .shouldContain("Trust this certificate?"); + kt("-importcert -alias d -file c-a.cert -noprompt") + .shouldNotContain("Warning") + .shouldNotContain("[no]"); + + // install reply + + reStore(); + + gencert("a-b", ""); + gencert("b-c", ""); + + // Full chain with root + cat("a-a-b-c.cert", "b-c.cert", "a-b.cert", "a.cert"); + kt("-importcert -alias c -file a-a-b-c.cert") // only weak + .shouldContain("Warning") + .shouldMatch("Reply #2 of 3.*512-bit RSA key.*risk") + .shouldMatch("Reply #3 of 3.*MD5withRSA.*risk") + .shouldNotContain("[no]"); + + // Without root + cat("a-b-c.cert", "b-c.cert", "a-b.cert"); + kt("-importcert -alias c -file a-b-c.cert") // only weak + .shouldContain("Warning") + .shouldMatch("Reply #2 of 2.*512-bit RSA key.*risk") + .shouldMatch("Issuer .*MD5withRSA.*risk") + .shouldNotContain("[no]"); + + reStore(); + gencert("b-a", ""); + + kt("-importcert -alias a -file b-a.cert") + .shouldContain("Warning") + .shouldMatch("Issuer .*512-bit RSA key.*risk") + .shouldNotContain("[no]"); + + kt("-importcert -alias a -file c-a.cert") + .shouldNotContain("Warning"); + + kt("-importcert -alias b -file c-b.cert") + .shouldContain("Warning") + .shouldMatch("The input.*512-bit RSA key.*risk") + .shouldNotContain("[no]"); + + reStore(); + gencert("b-a", ""); + + cat("c-b-a.cert", "b-a.cert", "c-b.cert"); + + kt("-printcert -file c-b-a.cert") + .shouldContain("Warning") + .shouldMatch("The certificate #2 of 2.*512-bit RSA key.*risk"); + + kt("-delete -alias b"); + + kt("-importcert -alias a -file c-b-a.cert") + .shouldContain("Warning") + .shouldMatch("Reply #2 of 2.*512-bit RSA key.*risk") + .shouldNotContain("[no]"); + + kt("-delete -alias c"); + kt("-importcert -alias a -file c-b-a.cert", "no") + .shouldContain("Top-level certificate in reply:") + .shouldContain("512-bit RSA key (weak)") + .shouldContain("Warning") + .shouldMatch("Reply #2 of 2.*512-bit RSA key.*risk") + .shouldContain("Install reply anyway?"); + kt("-importcert -alias a -file c-b-a.cert -noprompt") + .shouldContain("Warning") + .shouldMatch("Reply #2 of 2.*512-bit RSA key.*risk") + .shouldNotContain("[no]"); + + reStore(); + } + + private static void cat(String dest, String... src) throws IOException { + System.out.println("---------------------------------------------"); + System.out.printf("$ cat "); + + ByteArrayOutputStream bout = new ByteArrayOutputStream(); + for (String s : src) { + System.out.printf(s + " "); + bout.write(Files.readAllBytes(Paths.get(s))); + } + Files.write(Paths.get(dest), bout.toByteArray()); + System.out.println("> " + dest); + } + + static void checkGenCRL(String alias, String options, String bad) { + + OutputAnalyzer oa = kt("-gencrl -alias " + alias + + " -id 1 -file " + alias + ".crl " + options); + if (bad == null) { + oa.shouldNotContain("Warning"); + } else { + oa.shouldContain("Warning") + .shouldMatch("The generated CRL.*" + bad + ".*risk"); + } + + oa = kt("-printcrl -file " + alias + ".crl"); + if (bad == null) { + oa.shouldNotContain("Warning") + .shouldContain("Verified by " + alias + " in keystore") + .shouldNotContain("(weak"); + } else { + oa.shouldContain("Warning:") + .shouldMatch("The CRL.*" + bad + ".*risk") + .shouldContain("Verified by " + alias + " in keystore") + .shouldContain(bad + " (weak)"); + } + } + + static void checkCertReq( + String alias, String options, String bad) { + + OutputAnalyzer oa = certreq(alias, options); + if (bad == null) { + oa.shouldNotContain("Warning"); + } else { + oa.shouldContain("Warning") + .shouldMatch("The generated certificate request.*" + bad + ".*risk"); + } + + oa = kt("-printcertreq -file " + alias + ".req"); + if (bad == null) { + oa.shouldNotContain("Warning") + .shouldNotContain("(weak)"); + } else { + oa.shouldContain("Warning") + .shouldMatch("The certificate request.*" + bad + ".*risk") + .shouldContain(bad + " (weak)"); + } + } + + static void checkGenKeyPair( + String alias, String options, String bad) { + + OutputAnalyzer oa = genkeypair(alias, options); + if (bad == null) { + oa.shouldNotContain("Warning"); + } else { + oa.shouldContain("Warning") + .shouldMatch("The generated certificate.*" + bad + ".*risk"); + } + + oa = kt("-exportcert -alias " + alias + " -file " + alias + ".cert"); + if (bad == null) { + oa.shouldNotContain("Warning"); + } else { + oa.shouldContain("Warning") + .shouldMatch("The certificate.*" + bad + ".*risk"); + } + + oa = kt("-exportcert -rfc -alias " + alias + " -file " + alias + ".cert"); + if (bad == null) { + oa.shouldNotContain("Warning"); + } else { + oa.shouldContain("Warning") + .shouldMatch("The certificate.*" + bad + ".*risk"); + } + + oa = kt("-printcert -rfc -file " + alias + ".cert"); + if (bad == null) { + oa.shouldNotContain("Warning"); + } else { + oa.shouldContain("Warning") + .shouldMatch("The certificate.*" + bad + ".*risk"); + } + + oa = kt("-list -alias " + alias); + if (bad == null) { + oa.shouldNotContain("Warning"); + } else { + oa.shouldContain("Warning") + .shouldMatch("The certificate.*" + bad + ".*risk"); + } + + // With cert content + + oa = kt("-printcert -file " + alias + ".cert"); + if (bad == null) { + oa.shouldNotContain("Warning"); + } else { + oa.shouldContain("Warning") + .shouldContain(bad + " (weak)") + .shouldMatch("The certificate.*" + bad + ".*risk"); + } + + oa = kt("-list -v -alias " + alias); + if (bad == null) { + oa.shouldNotContain("Warning"); + } else { + oa.shouldContain("Warning") + .shouldContain(bad + " (weak)") + .shouldMatch("The certificate.*" + bad + ".*risk"); + } + } + + // This is slow, but real keytool process is launched. + static OutputAnalyzer kt1(String cmd, String... input) { + cmd = "-keystore ks -storepass changeit " + + "-keypass changeit " + cmd; + System.out.println("---------------------------------------------"); + try { + SecurityTools.setResponse(input); + return SecurityTools.keytool(cmd); + } catch (Throwable e) { + throw new RuntimeException(e); + } + } + + // Fast keytool execution by directly calling its main() method + static OutputAnalyzer kt(String cmd, String... input) { + PrintStream out = System.out; + PrintStream err = System.err; + InputStream ins = System.in; + ByteArrayOutputStream bout = new ByteArrayOutputStream(); + ByteArrayOutputStream berr = new ByteArrayOutputStream(); + boolean succeed = true; + try { + cmd = "-keystore ks -storepass changeit " + + "-keypass changeit " + cmd; + System.out.println("---------------------------------------------"); + System.out.println("$ keytool " + cmd); + System.out.println(); + String feed = ""; + if (input.length > 0) { + feed = Stream.of(input).collect(Collectors.joining("\n")) + "\n"; + } + System.setIn(new ByteArrayInputStream(feed.getBytes())); + System.setOut(new PrintStream(bout)); + System.setErr(new PrintStream(berr)); + sun.security.tools.keytool.Main.main( + cmd.trim().split("\\s+")); + } catch (Exception e) { + // Might be a normal exception when -debug is on or + // SecurityException (thrown by jtreg) when System.exit() is called + if (!(e instanceof SecurityException)) { + e.printStackTrace(); + } + succeed = false; + } finally { + System.setOut(out); + System.setErr(err); + System.setIn(ins); + } + String sout = new String(bout.toByteArray()); + String serr = new String(berr.toByteArray()); + System.out.println("STDOUT:\n" + sout + "\nSTDERR:\n" + serr); + if (!succeed) { + throw new RuntimeException(); + } + return new OutputAnalyzer(sout, serr); + } + + static OutputAnalyzer genkeypair(String alias, String options) { + return kt("-genkeypair -alias " + alias + " -dname CN=" + alias + + " -keyalg RSA -storetype JKS " + options); + } + + static OutputAnalyzer certreq(String alias, String options) { + return kt("-certreq -alias " + alias + + " -file " + alias + ".req " + options); + } + + static OutputAnalyzer exportcert(String alias) { + return kt("-exportcert -alias " + alias + " -file " + alias + ".cert"); + } + + static OutputAnalyzer gencert(String relation, String options) { + int pos = relation.indexOf("-"); + String issuer = relation.substring(0, pos); + String subject = relation.substring(pos + 1); + return kt(" -gencert -alias " + issuer + " -infile " + subject + + ".req -outfile " + relation + ".cert " + options); + } + + static void saveStore() throws IOException { + System.out.println("---------------------------------------------"); + System.out.println("$ cp ks ks2"); + Files.copy(Paths.get("ks"), Paths.get("ks2"), + StandardCopyOption.REPLACE_EXISTING); + } + + static void reStore() throws IOException { + System.out.println("---------------------------------------------"); + System.out.println("$ cp ks2 ks"); + Files.copy(Paths.get("ks2"), Paths.get("ks"), + StandardCopyOption.REPLACE_EXISTING); + } + + static void rm(String s) throws IOException { + System.out.println("---------------------------------------------"); + System.out.println("$ rm " + s); + Files.deleteIfExists(Paths.get(s)); + } +} From d64c22ae617b48dce438cb282861efd626e81abd Mon Sep 17 00:00:00 2001 From: Weijun Wang Date: Tue, 7 Mar 2017 22:55:36 +0800 Subject: [PATCH 371/447] 8175846: Provide javadoc descriptions for jdk.policytool and jdk.crypto.* modules Reviewed-by: vinnie --- .../jdk.crypto.cryptoki/share/classes/module-info.java | 5 +++++ jdk/src/jdk.crypto.ec/share/classes/module-info.java | 7 ++++++- .../jdk.crypto.mscapi/windows/classes/module-info.java | 7 ++++++- .../solaris/classes/module-info.java | 7 ++++++- jdk/src/jdk.policytool/share/classes/module-info.java | 10 +++++++++- 5 files changed, 32 insertions(+), 4 deletions(-) diff --git a/jdk/src/jdk.crypto.cryptoki/share/classes/module-info.java b/jdk/src/jdk.crypto.cryptoki/share/classes/module-info.java index 845ae002c77..487df00c299 100644 --- a/jdk/src/jdk.crypto.cryptoki/share/classes/module-info.java +++ b/jdk/src/jdk.crypto.cryptoki/share/classes/module-info.java @@ -23,6 +23,11 @@ * questions. */ +/** + * The SunPKCS11 security provider. + * + * @since 9 + */ module jdk.crypto.cryptoki { // Depends on SunEC provider for EC related functionality requires jdk.crypto.ec; diff --git a/jdk/src/jdk.crypto.ec/share/classes/module-info.java b/jdk/src/jdk.crypto.ec/share/classes/module-info.java index 227882d5dbc..74601fa8faf 100644 --- a/jdk/src/jdk.crypto.ec/share/classes/module-info.java +++ b/jdk/src/jdk.crypto.ec/share/classes/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,11 @@ * questions. */ +/** + * The SunEC security provider. + * + * @since 9 + */ module jdk.crypto.ec { provides java.security.Provider with sun.security.ec.SunEC; } diff --git a/jdk/src/jdk.crypto.mscapi/windows/classes/module-info.java b/jdk/src/jdk.crypto.mscapi/windows/classes/module-info.java index 9a2801e8096..20222f45122 100644 --- a/jdk/src/jdk.crypto.mscapi/windows/classes/module-info.java +++ b/jdk/src/jdk.crypto.mscapi/windows/classes/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,11 @@ * questions. */ +/** + * The SunMSCAPI security provider. + * + * @since 9 + */ module jdk.crypto.mscapi { provides java.security.Provider with sun.security.mscapi.SunMSCAPI; } diff --git a/jdk/src/jdk.crypto.ucrypto/solaris/classes/module-info.java b/jdk/src/jdk.crypto.ucrypto/solaris/classes/module-info.java index 161c6fe56ed..21d8a6686a2 100644 --- a/jdk/src/jdk.crypto.ucrypto/solaris/classes/module-info.java +++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,11 @@ * questions. */ +/** + * The OracleUCrypto security provider. + * + * @since 9 + */ module jdk.crypto.ucrypto { provides java.security.Provider with com.oracle.security.ucrypto.UcryptoProvider; } diff --git a/jdk/src/jdk.policytool/share/classes/module-info.java b/jdk/src/jdk.policytool/share/classes/module-info.java index f972e1cd15a..8ae0f88aa3a 100644 --- a/jdk/src/jdk.policytool/share/classes/module-info.java +++ b/jdk/src/jdk.policytool/share/classes/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,14 @@ * questions. */ +/** + * GUI tool for managing policy files. + * + * @since 9 + * @deprecated The policytool tool has been deprecated and + * is planned to be removed in a future release. + */ +@Deprecated module jdk.policytool { requires java.desktop; requires java.logging; From 683950a9ebb9746c52a46bf456e3a9561c522853 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Tue, 7 Mar 2017 08:43:29 -0800 Subject: [PATCH 372/447] 8176266: Make visitUnknown specification more explicit Reviewed-by: jlahoda --- .../share/classes/javax/lang/model/element/ModuleElement.java | 2 +- .../javax/lang/model/util/AbstractAnnotationValueVisitor6.java | 2 +- .../classes/javax/lang/model/util/AbstractElementVisitor6.java | 2 +- .../classes/javax/lang/model/util/AbstractTypeVisitor6.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java b/langtools/src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java index 9b2a0c51813..fbbc5224f4e 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java @@ -251,7 +251,7 @@ public interface ModuleElement extends Element, QualifiedNameable { * @param p a visitor-specified parameter * @return a visitor-specified result * @throws UnknownDirectiveException a visitor implementation may optionally throw this exception - * @implSpec This implementation throws {@code UnknownDirectiveException}. + * @implSpec This implementation throws {@code new UnknownDirectiveException(d, p)}. */ default R visitUnknown(Directive d, P p) { throw new UnknownDirectiveException(d, p); diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java b/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java index c8e5350e289..6edba8ea15f 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java @@ -106,7 +106,7 @@ public abstract class AbstractAnnotationValueVisitor6 * * @implSpec The default implementation of this method in {@code * AbstractAnnotationValueVisitor6} will always throw {@code - * UnknownAnnotationValueException}. This behavior is not + * new UnknownAnnotationValueException(av, p)}. This behavior is not * required of a subclass. * * @param av {@inheritDoc} diff --git a/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java b/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java index adf937384b5..7901f85d409 100644 --- a/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java +++ b/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java @@ -111,7 +111,7 @@ public abstract class AbstractElementVisitor6 implements ElementVisitor implements TypeVisitor { * * @implSpec The default implementation of this method in {@code * AbstractTypeVisitor6} will always throw {@code - * UnknownTypeException}. This behavior is not required of a + * new UnknownTypeException(t, p)}. This behavior is not required of a * subclass. * * @param t {@inheritDoc} From 7849c1343644776d1e9a028d4ddfc7c81c0c923b Mon Sep 17 00:00:00 2001 From: Doug Lea Date: Tue, 7 Mar 2017 10:06:39 -0800 Subject: [PATCH 373/447] 8176155: SubmissionPublisher closeExceptionally() may override close() Reviewed-by: martin, psandoz --- .../java/util/concurrent/SubmissionPublisher.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java b/jdk/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java index 28e98a361ef..9353e1f232f 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java @@ -588,6 +588,7 @@ public class SubmissionPublisher implements Flow.Publisher, if (!closed) { BufferedSubscription b; synchronized (this) { + // no need to re-check closed here b = clients; clients = null; closed = true; @@ -619,9 +620,11 @@ public class SubmissionPublisher implements Flow.Publisher, BufferedSubscription b; synchronized (this) { b = clients; - clients = null; - closed = true; - closedException = error; + if (!closed) { // don't clobber racing close + clients = null; + closedException = error; + closed = true; + } } while (b != null) { BufferedSubscription next = b.next; From b7c19d5b5520c23134f4844112cefd9ba2dbc571 Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Tue, 7 Mar 2017 11:09:56 -0800 Subject: [PATCH 374/447] 8175830: Provide javadoc description for jdk.xml.dom module Reviewed-by: lancea --- jaxp/src/jdk.xml.dom/share/classes/module-info.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jaxp/src/jdk.xml.dom/share/classes/module-info.java b/jaxp/src/jdk.xml.dom/share/classes/module-info.java index 6828629b489..78fe0dce9c2 100644 --- a/jaxp/src/jdk.xml.dom/share/classes/module-info.java +++ b/jaxp/src/jdk.xml.dom/share/classes/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,12 @@ * questions. */ +/** + * Defines the subset of the W3C Document Object Model (DOM) API that is not part + * of the Java SE API. + * + * @since 9 + */ module jdk.xml.dom { requires transitive java.xml; exports org.w3c.dom.css; From 30790d83529eeb2778fbd5ad62a4eae0c04c9ce4 Mon Sep 17 00:00:00 2001 From: Mark Sheppard Date: Tue, 7 Mar 2017 22:35:45 +0000 Subject: [PATCH 375/447] 8175325: NetworkInterface.getInterfaceAddresses throws NPE when no addresses Reviewed-by: chegar, martin --- .../classes/java/net/NetworkInterface.java | 20 ++--- ...orkInterfaceEmptyGetInetAddressesTest.java | 78 +++++++++++++++++++ 2 files changed, 89 insertions(+), 9 deletions(-) create mode 100644 jdk/test/java/net/MulticastSocket/NetworkInterfaceEmptyGetInetAddressesTest.java diff --git a/jdk/src/java.base/share/classes/java/net/NetworkInterface.java b/jdk/src/java.base/share/classes/java/net/NetworkInterface.java index 960024f939d..66141af44fa 100644 --- a/jdk/src/java.base/share/classes/java/net/NetworkInterface.java +++ b/jdk/src/java.base/share/classes/java/net/NetworkInterface.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -175,14 +175,16 @@ public final class NetworkInterface { */ public java.util.List getInterfaceAddresses() { java.util.List lst = new java.util.ArrayList<>(1); - SecurityManager sec = System.getSecurityManager(); - for (int j=0; j 0) { + throw new RuntimeException("Unexpected Exceptions in test"); + } + } + + private static void testNetworkInterface_getInterfaceAddresses( + NetworkInterface netIf) { + try { + netIf.getInterfaceAddresses(); + } catch (Exception ex) { + ex.printStackTrace(); + incrementExceptionCount(); + } + } + + private static void incrementExceptionCount() { + exceptionCount++; + } + + public static void main(String[] args) throws Exception { + MulticastSocket mcastSock = null; + try { + mcastSock = new MulticastSocket(); + System.out.println("macst socket address == " + + mcastSock.getLocalAddress()); + NetworkInterface netIf = mcastSock.getNetworkInterface(); + testMethods(netIf); + } finally { + if (mcastSock != null) { + mcastSock.close(); + } + } + } +} From 558b587367734351503fff788559ae9c506e3142 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Tue, 7 Mar 2017 15:20:43 -0800 Subject: [PATCH 376/447] 8176131: Simplify new Taglet API Reviewed-by: ksrini --- .../jdk/javadoc/doclet/taglet/Taglet.java | 51 +++++++++---------- .../doclets/toolkit/taglets/UserTaglet.java | 5 +- .../testLegacyTaglet/TestLegacyTaglet.java | 4 +- .../doclet/testLegacyTaglet/ToDoTaglet.java | 17 +------ .../testLegacyTaglet/UnderlineTaglet.java | 16 ++---- .../jdk/javadoc/tool/EnsureNewOldDoclet.java | 9 +--- .../api/basic/taglets/UnderlineTaglet.java | 18 ++----- 7 files changed, 40 insertions(+), 80 deletions(-) diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/taglet/Taglet.java b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/taglet/Taglet.java index 3880680c249..b6b18f96699 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/taglet/Taglet.java +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/taglet/Taglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,11 +31,15 @@ import java.util.Set; import com.sun.source.doctree.DocTree; /** - * The interface for a custom tag used by Doclets. A custom - * tag must implement this interface, and must have a public - * default constructor (i.e. a public constructor with no + * The interface for a custom taglet supported by doclets such as + * the {@link jdk.javadoc.doclets.StandardDoclet standard doclet}. + * Custom taglets are used to handle custom tags in documentation + * comments. + * + *

      A custom taglet must implement this interface, and must have + * a public default constructor (i.e. a public constructor with no * parameters), by which, the doclet will instantiate and - * register the custom tag. + * register the custom taglet. * * @since 9 */ @@ -43,16 +47,14 @@ import com.sun.source.doctree.DocTree; public interface Taglet { /** - * Returns the set of locations in which a taglet may be used. - * @return the set of locations in which a taglet may be used - * allowed in or an empty set. + * Returns the set of locations in which a tag may be used. + * @return the set of locations in which a tag may be used */ Set getAllowedLocations(); /** - * Indicates the tag is an inline or a body tag. - * @return true if this Taglet - * is an inline tag, false otherwise. + * Indicates whether this taglet is for inline tags or not. + * @return true if this taglet is for an inline tag, and false otherwise */ boolean isInlineTag(); @@ -63,26 +65,21 @@ public interface Taglet { String getName(); /** - * Given the {@link DocTree DocTree} representation of this custom - * tag, return its string representation, which is output - * to the generated page. - * @param tag the Tag representation of this custom tag. - * @return the string representation of this Tag. - */ - String toString(DocTree tag); - - /** - * Given a List of {@link DocTree DocTrees} representing this custom - * tag, return its string representation, which is output - * to the generated page. This method should - * return null if this taglet represents an inline or body tag. - * @param tags the list of DocTrees representing this custom tag. - * @return the string representation of this Tag. + * Returns the string representation of a series of instances of + * this tag to be included in the generated output. + * If this taglet is for an {@link #isInlineTag inline} tag} it will + * be called once per instance of the tag, each time with a singleton list. + * Otherwise, if this tag is a block tag, it will be called once per + * comment, with a list of all the instances of the tag in the comment. + * @param tags the list of {@code DocTree} containing one or more + * instances of this tag + * @return the string representation of the tags to be included in + * the generated output */ String toString(List tags); /** - * The kind of location. + * The kind of location in which a tag may be used. */ public static enum Location { /** In an Overview document. */ diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/UserTaglet.java b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/UserTaglet.java index 2f4bc957c8a..d7820f19cc9 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/UserTaglet.java +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/UserTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,6 +24,7 @@ */ package jdk.javadoc.internal.doclets.toolkit.taglets; +import java.util.Collections; import java.util.List; import javax.lang.model.element.Element; @@ -131,7 +132,7 @@ public class UserTaglet implements Taglet { */ public Content getTagletOutput(Element element, DocTree tag, TagletWriter writer){ Content output = writer.getOutputInstance(); - output.addContent(new RawHtml(userTaglet.toString(tag))); + output.addContent(new RawHtml(userTaglet.toString(Collections.singletonList(tag)))); return output; } diff --git a/langtools/test/jdk/javadoc/doclet/testLegacyTaglet/TestLegacyTaglet.java b/langtools/test/jdk/javadoc/doclet/testLegacyTaglet/TestLegacyTaglet.java index 685724cf149..bb5e251ae51 100644 --- a/langtools/test/jdk/javadoc/doclet/testLegacyTaglet/TestLegacyTaglet.java +++ b/langtools/test/jdk/javadoc/doclet/testLegacyTaglet/TestLegacyTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ /* * @test - * @bug 4638723 8015882 + * @bug 4638723 8015882 8176131 * @summary Test to ensure that the refactored version of the standard * doclet still works with Taglets that implement the 1.4.0 interface. * @author jamieh diff --git a/langtools/test/jdk/javadoc/doclet/testLegacyTaglet/ToDoTaglet.java b/langtools/test/jdk/javadoc/doclet/testLegacyTaglet/ToDoTaglet.java index 1a75f0510a7..128de1b9889 100644 --- a/langtools/test/jdk/javadoc/doclet/testLegacyTaglet/ToDoTaglet.java +++ b/langtools/test/jdk/javadoc/doclet/testLegacyTaglet/ToDoTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -83,19 +83,6 @@ public class ToDoTaglet implements Taglet { return false; } - /** - * Given the DocTree representation of this custom - * tag, return its string representation. - * @param tag the DocTree representing this custom tag. - */ - public String toString(DocTree tag) { - - return "

      " + HEADER + "
      " - + "
      " - + getText(tag) - + "
      \n"; - } - /** * Given an array of Tags representing this custom * tag, return its string representation. @@ -104,7 +91,7 @@ public class ToDoTaglet implements Taglet { @Override public String toString(List tags) { if (tags.isEmpty()) { - return null; + return ""; } String result = "\n
      " + HEADER + "
      "; result += "
      "; diff --git a/langtools/test/jdk/javadoc/doclet/testLegacyTaglet/UnderlineTaglet.java b/langtools/test/jdk/javadoc/doclet/testLegacyTaglet/UnderlineTaglet.java index 56312516138..5639ccbe62b 100644 --- a/langtools/test/jdk/javadoc/doclet/testLegacyTaglet/UnderlineTaglet.java +++ b/langtools/test/jdk/javadoc/doclet/testLegacyTaglet/UnderlineTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -69,20 +69,10 @@ public class UnderlineTaglet implements Taglet { /** * Given the DocTree representation of this custom * tag, return its string representation. - * @param tag he DocTree representation of this custom tag. - */ - @Override - public String toString(DocTree tag) { - return "" + ToDoTaglet.getText(tag) + ""; - } - - /** - * This method should not be called since arrays of inline tags do not - * exist. Method {@link #tostring(DocTree)} should be used to convert this - * inline tag to a string. + * @param tags the DocTree representation of this custom tag. */ @Override public String toString(List tags) { - return null; + return "" + ToDoTaglet.getText(tags.get(0)) + ""; } } diff --git a/langtools/test/jdk/javadoc/tool/EnsureNewOldDoclet.java b/langtools/test/jdk/javadoc/tool/EnsureNewOldDoclet.java index fe3b2f938ca..60e5944050e 100644 --- a/langtools/test/jdk/javadoc/tool/EnsureNewOldDoclet.java +++ b/langtools/test/jdk/javadoc/tool/EnsureNewOldDoclet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ /* * @test - * @bug 8035473 8154482 8154399 8159096 + * @bug 8035473 8154482 8154399 8159096 8176131 * @summary make sure the javadoc tool responds correctly to Xold, * old doclets and taglets. * @library /tools/lib @@ -357,11 +357,6 @@ public class EnsureNewOldDoclet extends TestRunner { return "NewTaglet"; } - @Override - public String toString(DocTree tag) { - return tag.toString(); - } - @Override public String toString(List tags) { return tags.toString(); diff --git a/langtools/test/jdk/javadoc/tool/api/basic/taglets/UnderlineTaglet.java b/langtools/test/jdk/javadoc/tool/api/basic/taglets/UnderlineTaglet.java index b6414721148..d3e0cabf2fe 100644 --- a/langtools/test/jdk/javadoc/tool/api/basic/taglets/UnderlineTaglet.java +++ b/langtools/test/jdk/javadoc/tool/api/basic/taglets/UnderlineTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following @@ -85,22 +85,12 @@ public class UnderlineTaglet implements Taglet { } /** - * Given the Tag representation of this custom + * Given the DocTree representation of this custom * tag, return its string representation. - * @param tag he Tag representation of this custom tag. - */ - public String toString(DocTree tag) { - return "" + getText(tag) + ""; - } - - /** - * This method should not be called since arrays of inline tags do not - * exist. Method {@link #tostring(Tag)} should be used to convert this - * inline tag to a string. - * @param tags the array of Tags representing of this custom tag. + * @param tags the list of trees representing of this custom tag. */ public String toString(List tags) { - return null; + return "" + getText(tags.get(0)) + ""; } static String getText(DocTree dt) { From 50348cb89a0cdd92cc312387515aff7d1e2635ff Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Tue, 7 Mar 2017 15:38:10 -0800 Subject: [PATCH 377/447] 8176131: Simplify new Taglet API Reviewed-by: ksrini --- jdk/make/src/classes/build/tools/taglet/Incubating.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/jdk/make/src/classes/build/tools/taglet/Incubating.java b/jdk/make/src/classes/build/tools/taglet/Incubating.java index 826fadd4ddf..47663d6d76e 100644 --- a/jdk/make/src/classes/build/tools/taglet/Incubating.java +++ b/jdk/make/src/classes/build/tools/taglet/Incubating.java @@ -58,11 +58,6 @@ public class Incubating implements Taglet { "
      Incubating Feature." + " Will be removed in a future release."; - @Override - public String toString(DocTree tag) { - return MESSAGE; - } - @Override public String toString(List tags) { return MESSAGE; From 9617bfb0f66b9d34128e66f5e5f992190e74d5d3 Mon Sep 17 00:00:00 2001 From: Kumar Srinivasan Date: Tue, 7 Mar 2017 18:37:17 -0800 Subject: [PATCH 378/447] 8175860: javadoc crashes with incorrect module sourcepath Reviewed-by: jjg --- .../javadoc/internal/tool/JavadocTool.java | 5 ++++ .../javadoc/tool/modules/ModuleTestBase.java | 14 +++++++++- .../jdk/javadoc/tool/modules/Modules.java | 28 +++++++++++++++++-- 3 files changed, 44 insertions(+), 3 deletions(-) diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocTool.java b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocTool.java index 89693ae7b27..25dcc30e5e6 100644 --- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocTool.java +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocTool.java @@ -188,6 +188,11 @@ public class JavadocTool extends com.sun.tools.javac.main.JavaCompiler { .classTrees(classTrees.toList()) .scanSpecifiedItems(); + // abort, if errors were encountered during modules initialization + if (messager.hasErrors()) { + return null; + } + // Parse the files in the packages and subpackages to be documented ListBuffer packageTrees = new ListBuffer<>(); parse(etable.getFilesToParse(), packageTrees, false); diff --git a/langtools/test/jdk/javadoc/tool/modules/ModuleTestBase.java b/langtools/test/jdk/javadoc/tool/modules/ModuleTestBase.java index b2fc0ceba9c..d77dcf1d47e 100644 --- a/langtools/test/jdk/javadoc/tool/modules/ModuleTestBase.java +++ b/langtools/test/jdk/javadoc/tool/modules/ModuleTestBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -184,6 +184,10 @@ public class ModuleTestBase extends TestRunner { assertPresent(regex, Task.OutputKind.DIRECT); } + void assertErrorNotPresent(String regex) throws Exception { + assertNotPresent(regex, Task.OutputKind.DIRECT); + } + void assertPresent(String regex, Task.OutputKind kind) throws Exception { List foundList = tb.grep(regex, currentTask.getOutputLines(kind)); if (foundList.isEmpty()) { @@ -192,6 +196,14 @@ public class ModuleTestBase extends TestRunner { } } + void assertNotPresent(String regex, Task.OutputKind kind) throws Exception { + List foundList = tb.grep(regex, currentTask.getOutputLines(kind)); + if (!foundList.isEmpty()) { + dumpDocletDiagnostics(); + throw new Exception(regex + " found in: " + kind); + } + } + void dumpDocletDiagnostics() { for (Task.OutputKind kind : Task.OutputKind.values()) { String output = currentTask.getOutput(kind); diff --git a/langtools/test/jdk/javadoc/tool/modules/Modules.java b/langtools/test/jdk/javadoc/tool/modules/Modules.java index 2af3ba81d9d..2250ebbb77e 100644 --- a/langtools/test/jdk/javadoc/tool/modules/Modules.java +++ b/langtools/test/jdk/javadoc/tool/modules/Modules.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ /* * @test - * @bug 8159305 8166127 + * @bug 8159305 8166127 8175860 * @summary Tests primarily the module graph computations. * @modules * jdk.javadoc/jdk.javadoc.internal.api @@ -38,6 +38,7 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; +import java.nio.file.Paths; import toolbox.*; import toolbox.Task.Expect; @@ -92,6 +93,29 @@ public class Modules extends ModuleTestBase { } + @Test + public void testMissingModuleWithSourcePath(Path base) throws Exception { + Path src = base.resolve("src"); + Path mod = src.resolve("m1"); + + ModuleBuilder mb1 = new ModuleBuilder(tb, "m1"); + mb1.comment("The first module.") + .exports("m1pub") + .requires("m2") + .classes("package m1pub; /** Class A */ public class A {}") + .classes("package m1pro; /** Class B */ public class B {}") + .write(src); + + Path javafile = Paths.get(mod.toString(), "m1pub/A.java"); + + execNegativeTask("--source-path", mod.toString(), + javafile.toString()); + + assertErrorPresent("error: cannot access module-info"); + assertErrorNotPresent("error - fatal error encountered"); + + } + @Test public void testMultipleModulesAggregatedModuleOption(Path base) throws Exception { Path src = base.resolve("src"); From b93beff9b76570b7615061094c04cdd6787c0ecc Mon Sep 17 00:00:00 2001 From: Mandy Chung Date: Tue, 7 Mar 2017 18:57:19 -0800 Subject: [PATCH 379/447] 8176333: jdeps error message should include a proper MR jar file name Reviewed-by: lancea --- .../share/classes/com/sun/tools/jdeps/JdepsTask.java | 2 +- .../com/sun/tools/jdeps/MultiReleaseException.java | 12 ++++++------ .../com/sun/tools/jdeps/resources/jdeps.properties | 6 +++--- langtools/test/tools/jdeps/MultiReleaseJar.java | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsTask.java b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsTask.java index 4ee8a3ede1b..0f030f8bf3b 100644 --- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsTask.java +++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsTask.java @@ -524,7 +524,7 @@ class JdepsTask { e.printStackTrace(); return EXIT_CMDERR; } catch (MultiReleaseException e) { - reportError(e.getKey(), (Object)e.getMsg()); + reportError(e.getKey(), e.getParams()); return EXIT_CMDERR; // could be EXIT_ABNORMAL sometimes } finally { log.flush(); diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/MultiReleaseException.java b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/MultiReleaseException.java index feb35989334..65fce011a58 100644 --- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/MultiReleaseException.java +++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/MultiReleaseException.java @@ -34,7 +34,7 @@ package com.sun.tools.jdeps; class MultiReleaseException extends RuntimeException { private static final long serialVersionUID = 4474870142461654108L; private final String key; - private final String[] msg; + private final Object[] params; /** * Constructs an {@code MultiReleaseException} with the specified detail @@ -42,13 +42,13 @@ class MultiReleaseException extends RuntimeException { * * @param key * The key that identifies the message in the jdeps.properties file - * @param msg + * @param params * The detail message array */ - public MultiReleaseException(String key, String... msg) { + public MultiReleaseException(String key, Object... params) { super(); this.key = key; - this.msg = msg; + this.params = params; } /** @@ -63,7 +63,7 @@ class MultiReleaseException extends RuntimeException { * * @return the detailed error message array */ - public String[] getMsg() { - return msg; + public Object[] getParams() { + return params; } } diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps.properties b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps.properties index acdc6ffdf48..3fcf238cba0 100644 --- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps.properties +++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps.properties @@ -93,7 +93,7 @@ main.opt.m=\ main.opt.R=\ \ -R -recursive Recursively traverse all run-time dependences.\n\ \ The -R option implies -filter:none. If -p,\n\ -\ -e, -foption is specified, only the matching\n\ +\ -e, -f option is specified, only the matching\n\ \ dependences are analyzed. main.opt.I=\ @@ -196,8 +196,8 @@ err.module.not.found=module not found: {0} err.root.module.not.set=root module set empty err.option.already.specified={0} option specified more than once. err.filter.not.specified=--package (-p), --regex (-e), --require option must be specified -err.multirelease.option.exists={0} is not a multi-release jar file, but the --multi-release option is set -err.multirelease.option.notfound={0} is a multi-release jar file, but the --multi-release option is not set +err.multirelease.option.exists={0} is not a multi-release jar file but --multi-release option is set +err.multirelease.option.notfound={0} is a multi-release jar file but --multi-release option is not set err.multirelease.version.associated=class {0} already associated with version {1}, trying to add version {2} err.multirelease.jar.malformed=malformed multi-release jar, {0}, bad entry: {1} warn.invalid.arg=Path does not exist: {0} diff --git a/langtools/test/tools/jdeps/MultiReleaseJar.java b/langtools/test/tools/jdeps/MultiReleaseJar.java index 0f4fd7cc405..c1ecb83d532 100644 --- a/langtools/test/tools/jdeps/MultiReleaseJar.java +++ b/langtools/test/tools/jdeps/MultiReleaseJar.java @@ -23,7 +23,7 @@ /* * @test - * @bug 8153654 + * @bug 8153654 8176333 * @summary Tests for jdeps tool with multi-release jar files * @modules jdk.jdeps/com.sun.tools.jdeps * @library mrjar mrjar/base mrjar/9 mrjar/10 mrjar/v9 mrjar/v10 @@ -67,7 +67,7 @@ public class MultiReleaseJar { checkResult(r, false, "Warning: Path does not exist: missing.jar"); r = run("jdeps -v Version.jar"); - checkResult(r, false, "the --multi-release option is not set"); + checkResult(r, false, "--multi-release option is not set"); r = run("jdeps --multi-release base -v Version.jar"); checkResult(r, true, @@ -105,7 +105,7 @@ public class MultiReleaseJar { checkResult(r, false, "Error: invalid argument for option: 9.1"); r = run("jdeps -v -R -cp Version.jar test/Main.class"); - checkResult(r, false, "the --multi-release option is not set"); + checkResult(r, false, "--multi-release option is not set"); r = run("jdeps -v -R -cp Version.jar -multi-release 9 test/Main.class"); checkResult(r, false, From af9013c96e46cc838de8ffebdedb8ca19d673418 Mon Sep 17 00:00:00 2001 From: Hamlin Li Date: Tue, 7 Mar 2017 23:01:51 -0800 Subject: [PATCH 380/447] 8176337: Mark several tests as intermittently failing Reviewed-by: darcy --- jdk/test/java/io/FileInputStream/LargeFileAvailable.java | 1 + jdk/test/java/lang/ProcessBuilder/Basic.java | 1 + jdk/test/java/nio/channels/FileChannel/LoopingTruncate.java | 1 + jdk/test/java/nio/channels/FileChannel/Transfer.java | 1 + jdk/test/java/nio/channels/FileChannel/Transfers.java | 1 + jdk/test/javax/net/ssl/DTLS/CipherSuite.java | 1 + .../sun/security/tools/keytool/DefaultSignatureAlgorithm.java | 1 + 7 files changed, 7 insertions(+) diff --git a/jdk/test/java/io/FileInputStream/LargeFileAvailable.java b/jdk/test/java/io/FileInputStream/LargeFileAvailable.java index 9d0d014786a..d6402f7b566 100644 --- a/jdk/test/java/io/FileInputStream/LargeFileAvailable.java +++ b/jdk/test/java/io/FileInputStream/LargeFileAvailable.java @@ -24,6 +24,7 @@ /* * @test * @bug 6402006 7030573 8011136 + * @key intermittent * @summary Test if available returns correct value when reading * a large file. */ diff --git a/jdk/test/java/lang/ProcessBuilder/Basic.java b/jdk/test/java/lang/ProcessBuilder/Basic.java index 729b24995ad..a13db9fa4d5 100644 --- a/jdk/test/java/lang/ProcessBuilder/Basic.java +++ b/jdk/test/java/lang/ProcessBuilder/Basic.java @@ -28,6 +28,7 @@ * 6464154 6523983 6206031 4960438 6631352 6631966 6850957 6850958 * 4947220 7018606 7034570 4244896 5049299 8003488 8054494 8058464 * 8067796 + * @key intermittent * @summary Basic tests for Process and Environment Variable code * @modules java.base/java.lang:open * @run main/othervm/timeout=300 Basic diff --git a/jdk/test/java/nio/channels/FileChannel/LoopingTruncate.java b/jdk/test/java/nio/channels/FileChannel/LoopingTruncate.java index 4623c9cc3ec..7f6615934d7 100644 --- a/jdk/test/java/nio/channels/FileChannel/LoopingTruncate.java +++ b/jdk/test/java/nio/channels/FileChannel/LoopingTruncate.java @@ -24,6 +24,7 @@ /** * @test * @bug 8137121 8137230 + * @key intermittent * @summary (fc) Infinite loop FileChannel.truncate * @library /lib/testlibrary * @build jdk.testlibrary.Utils diff --git a/jdk/test/java/nio/channels/FileChannel/Transfer.java b/jdk/test/java/nio/channels/FileChannel/Transfer.java index b05fffdb869..135e13fef34 100644 --- a/jdk/test/java/nio/channels/FileChannel/Transfer.java +++ b/jdk/test/java/nio/channels/FileChannel/Transfer.java @@ -24,6 +24,7 @@ /* @test * @bug 4434723 4482726 4559072 4638365 4795550 5081340 5103988 6253145 * 6984545 + * @key intermittent * @summary Test FileChannel.transferFrom and transferTo (use -Dseed=X to set PRNG seed) * @library .. * @library /lib/testlibrary/ diff --git a/jdk/test/java/nio/channels/FileChannel/Transfers.java b/jdk/test/java/nio/channels/FileChannel/Transfers.java index a414b591cc5..33d95918c91 100644 --- a/jdk/test/java/nio/channels/FileChannel/Transfers.java +++ b/jdk/test/java/nio/channels/FileChannel/Transfers.java @@ -22,6 +22,7 @@ */ /* @test + * @key intermittent * @summary Comprehensive test for FileChannel.transfer{From,To} * @bug 4708120 * @author Mark Reinhold diff --git a/jdk/test/javax/net/ssl/DTLS/CipherSuite.java b/jdk/test/javax/net/ssl/DTLS/CipherSuite.java index 3509878636c..cfca351e1cb 100644 --- a/jdk/test/javax/net/ssl/DTLS/CipherSuite.java +++ b/jdk/test/javax/net/ssl/DTLS/CipherSuite.java @@ -27,6 +27,7 @@ /* * @test * @bug 8043758 + * @key intermittent * @summary Datagram Transport Layer Security (DTLS) * @modules java.base/sun.security.util * jdk.crypto.ec diff --git a/jdk/test/sun/security/tools/keytool/DefaultSignatureAlgorithm.java b/jdk/test/sun/security/tools/keytool/DefaultSignatureAlgorithm.java index 0c718db925e..89d86e9989c 100644 --- a/jdk/test/sun/security/tools/keytool/DefaultSignatureAlgorithm.java +++ b/jdk/test/sun/security/tools/keytool/DefaultSignatureAlgorithm.java @@ -24,6 +24,7 @@ /* * @test * @bug 8138766 + * @key intermittent * @summary New default -sigalg for keytool * @modules java.base/sun.security.tools.keytool * @modules jdk.crypto.ec From a2b08aeec957ceb06619b82ae58894fca9d196a7 Mon Sep 17 00:00:00 2001 From: Amy Lu Date: Wed, 8 Mar 2017 15:29:57 +0800 Subject: [PATCH 381/447] 8167525: update jdk tests to remove @compile --add-modules workaround Reviewed-by: mchung --- jdk/test/ProblemList.txt | 2 -- jdk/test/com/sun/jndi/dns/Parser.java | 3 --- jdk/test/com/sun/jndi/dns/Test6991580.java | 3 +-- .../registry/RegistryContext/ContextWithNullProperties.java | 3 +-- .../java/beans/XMLDecoder/8028054/TestConstructorFinder.java | 4 ++-- jdk/test/java/beans/XMLDecoder/8028054/TestMethodFinder.java | 4 ++-- .../ClassLoader/platformClassLoader/DefinePlatformClass.java | 3 +-- jdk/test/javax/smartcardio/CommandAPDUTest.java | 5 ++--- jdk/test/javax/smartcardio/HistoricalBytes.java | 4 +--- jdk/test/javax/smartcardio/ResponseAPDUTest.java | 5 ++--- jdk/test/javax/smartcardio/Serialize.java | 4 +--- jdk/test/javax/smartcardio/TEST.properties | 1 + jdk/test/javax/smartcardio/TerminalFactorySpiTest.java | 5 ++--- jdk/test/javax/smartcardio/TestCardPermission.java | 4 +--- jdk/test/javax/smartcardio/TestCommandAPDU.java | 4 +--- jdk/test/sun/security/ec/TestEC.java | 1 - jdk/test/sun/security/mscapi/IsSunMSCAPIAvailable.java | 3 +-- jdk/test/sun/security/pkcs11/ec/TestCurves.java | 1 - jdk/test/sun/security/provider/PolicyFile/Modules.java | 3 +-- 19 files changed, 20 insertions(+), 42 deletions(-) create mode 100644 jdk/test/javax/smartcardio/TEST.properties diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt index 9ade1eca7b8..f98f83e42ef 100644 --- a/jdk/test/ProblemList.txt +++ b/jdk/test/ProblemList.txt @@ -186,8 +186,6 @@ java/nio/file/WatchService/Basic.java 7158947 solaris- java/nio/file/WatchService/MayFlies.java 7158947 solaris-all Solaris 11 java/nio/file/WatchService/LotsOfEvents.java 7158947 solaris-all Solaris 11 -sun/nio/cs/OLD/TestIBMDB.java 8167525 generic-all - ############################################################################ # jdk_rmi diff --git a/jdk/test/com/sun/jndi/dns/Parser.java b/jdk/test/com/sun/jndi/dns/Parser.java index 7ec2a661fda..2cc4fb584c4 100644 --- a/jdk/test/com/sun/jndi/dns/Parser.java +++ b/jdk/test/com/sun/jndi/dns/Parser.java @@ -26,9 +26,6 @@ * @bug 8035105 * @summary DNS resource record parsing * @modules jdk.naming.dns/com.sun.jndi.dns:+open - * - * @compile --add-modules jdk.naming.dns Parser.java - * @run main Parser */ import com.sun.jndi.dns.ResourceRecord; diff --git a/jdk/test/com/sun/jndi/dns/Test6991580.java b/jdk/test/com/sun/jndi/dns/Test6991580.java index b8763bbbd0b..191cfd12c29 100644 --- a/jdk/test/com/sun/jndi/dns/Test6991580.java +++ b/jdk/test/com/sun/jndi/dns/Test6991580.java @@ -1,6 +1,6 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,7 +37,6 @@ import java.awt.event.ActionListener; * @summary IPv6 Nameservers in resolv.conf throws NumberFormatException * @modules java.desktop * jdk.naming.dns/com.sun.jndi.dns - * @compile --add-modules jdk.naming.dns IPv6NameserverPlatformParsingTest.java * @run main/manual Test6991580 */ diff --git a/jdk/test/com/sun/jndi/rmi/registry/RegistryContext/ContextWithNullProperties.java b/jdk/test/com/sun/jndi/rmi/registry/RegistryContext/ContextWithNullProperties.java index f75eb88d1b0..e18442dba50 100644 --- a/jdk/test/com/sun/jndi/rmi/registry/RegistryContext/ContextWithNullProperties.java +++ b/jdk/test/com/sun/jndi/rmi/registry/RegistryContext/ContextWithNullProperties.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,7 +29,6 @@ * java.rmi/sun.rmi.server java.rmi/sun.rmi.transport java.rmi/sun.rmi.transport.tcp * @library ../../../../../../java/rmi/testlibrary * @build TestLibrary - * @compile --add-modules jdk.naming.rmi ContextWithNullProperties.java * @run main/othervm ContextWithNullProperties */ diff --git a/jdk/test/java/beans/XMLDecoder/8028054/TestConstructorFinder.java b/jdk/test/java/beans/XMLDecoder/8028054/TestConstructorFinder.java index 5a97ade252a..082f00596b2 100644 --- a/jdk/test/java/beans/XMLDecoder/8028054/TestConstructorFinder.java +++ b/jdk/test/java/beans/XMLDecoder/8028054/TestConstructorFinder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,7 +39,7 @@ import java.util.List; * java.corba * java.xml.bind * @compile -XDignore.symbol.file TestConstructorFinder.java - * @run main/othervm --add-modules=java.activation,java.transaction,java.corba,java.xml.bind TestConstructorFinder + * @run main TestConstructorFinder */ public class TestConstructorFinder { diff --git a/jdk/test/java/beans/XMLDecoder/8028054/TestMethodFinder.java b/jdk/test/java/beans/XMLDecoder/8028054/TestMethodFinder.java index 8dfbd202c69..85d8c94d269 100644 --- a/jdk/test/java/beans/XMLDecoder/8028054/TestMethodFinder.java +++ b/jdk/test/java/beans/XMLDecoder/8028054/TestMethodFinder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,7 +39,7 @@ import java.util.List; * java.corba * java.xml.bind * @compile -XDignore.symbol.file TestMethodFinder.java - * @run main/othervm --add-modules=java.activation,java.transaction,java.corba,java.xml.bind TestMethodFinder + * @run main TestMethodFinder */ public class TestMethodFinder { diff --git a/jdk/test/java/lang/ClassLoader/platformClassLoader/DefinePlatformClass.java b/jdk/test/java/lang/ClassLoader/platformClassLoader/DefinePlatformClass.java index 826b381f138..46fbab32fb1 100644 --- a/jdk/test/java/lang/ClassLoader/platformClassLoader/DefinePlatformClass.java +++ b/jdk/test/java/lang/ClassLoader/platformClassLoader/DefinePlatformClass.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,7 +26,6 @@ * @summary Test java.* class defined by the platform class loader * @modules jdk.zipfs/java.fake * @build jdk.zipfs/java.fake.Fake - * @compile --add-modules jdk.zipfs DefinePlatformClass.java * @run main DefinePlatformClass */ diff --git a/jdk/test/javax/smartcardio/CommandAPDUTest.java b/jdk/test/javax/smartcardio/CommandAPDUTest.java index f34a2ea381a..edfb1e12161 100644 --- a/jdk/test/javax/smartcardio/CommandAPDUTest.java +++ b/jdk/test/javax/smartcardio/CommandAPDUTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,7 @@ * @bug 8049021 * @summary Test different constructors for CommandAPDU and check CLA,INS,NC,NE, * P1,and P2 - * @compile --add-modules=java.smartcardio CommandAPDUTest.java - * @run testng/othervm --add-modules=java.smartcardio CommandAPDUTest + * @run testng CommandAPDUTest */ import java.nio.ByteBuffer; import javax.smartcardio.CommandAPDU; diff --git a/jdk/test/javax/smartcardio/HistoricalBytes.java b/jdk/test/javax/smartcardio/HistoricalBytes.java index c44bbe0c681..b7324d4e64b 100644 --- a/jdk/test/javax/smartcardio/HistoricalBytes.java +++ b/jdk/test/javax/smartcardio/HistoricalBytes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ * @bug 6445367 * @summary Verify that ATR.getHistoricalBytes() works * @author Andreas Sterbenz - * @compile --add-modules=java.smartcardio HistoricalBytes.java - * @run main/othervm --add-modules=java.smartcardio HistoricalBytes */ import java.util.Arrays; diff --git a/jdk/test/javax/smartcardio/ResponseAPDUTest.java b/jdk/test/javax/smartcardio/ResponseAPDUTest.java index 470002d23f0..bec322ea436 100644 --- a/jdk/test/javax/smartcardio/ResponseAPDUTest.java +++ b/jdk/test/javax/smartcardio/ResponseAPDUTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,7 @@ * @test * @bug 8049021 * @summary Construct ResponseAPDU from byte array and check NR< SW, SW1 and SW2 - * @compile --add-modules=java.smartcardio ResponseAPDUTest.java - * @run testng/othervm --add-modules=java.smartcardio ResponseAPDUTest + * @run testng ResponseAPDUTest */ import javax.smartcardio.ResponseAPDU; import static org.testng.Assert.*; diff --git a/jdk/test/javax/smartcardio/Serialize.java b/jdk/test/javax/smartcardio/Serialize.java index 7becee4dd9d..611c24ec5dc 100644 --- a/jdk/test/javax/smartcardio/Serialize.java +++ b/jdk/test/javax/smartcardio/Serialize.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ * @bug 6445367 * @summary make sure serialization works * @author Andreas Sterbenz - * @compile --add-modules=java.smartcardio Serialize.java - * @run main/othervm --add-modules=java.smartcardio Serialize */ import java.io.*; diff --git a/jdk/test/javax/smartcardio/TEST.properties b/jdk/test/javax/smartcardio/TEST.properties new file mode 100644 index 00000000000..89d00765d51 --- /dev/null +++ b/jdk/test/javax/smartcardio/TEST.properties @@ -0,0 +1 @@ +modules = java.smartcardio diff --git a/jdk/test/javax/smartcardio/TerminalFactorySpiTest.java b/jdk/test/javax/smartcardio/TerminalFactorySpiTest.java index 853ce2dd1ce..a7414401644 100644 --- a/jdk/test/javax/smartcardio/TerminalFactorySpiTest.java +++ b/jdk/test/javax/smartcardio/TerminalFactorySpiTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,7 @@ * @test * @bug 8049021 * @summary Test if we can write new provider for smart card - * @compile --add-modules=java.smartcardio TerminalFactorySpiTest.java - * @run main/othervm/java.security.policy=policy --add-modules=java.smartcardio TerminalFactorySpiTest + * @run main/othervm/java.security.policy=policy TerminalFactorySpiTest */ import java.security.Provider; import java.security.Security; diff --git a/jdk/test/javax/smartcardio/TestCardPermission.java b/jdk/test/javax/smartcardio/TestCardPermission.java index b148d2c70b9..cbeb15dcffb 100644 --- a/jdk/test/javax/smartcardio/TestCardPermission.java +++ b/jdk/test/javax/smartcardio/TestCardPermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,6 @@ * @bug 6293767 6469513 * @summary Test for the CardPermission class * @author Andreas Sterbenz - * @compile --add-modules=java.smartcardio TestCardPermission.java - * @run main/othervm --add-modules=java.smartcardio TestCardPermission */ import javax.smartcardio.*; diff --git a/jdk/test/javax/smartcardio/TestCommandAPDU.java b/jdk/test/javax/smartcardio/TestCommandAPDU.java index d8374e17671..a9e841a0bee 100644 --- a/jdk/test/javax/smartcardio/TestCommandAPDU.java +++ b/jdk/test/javax/smartcardio/TestCommandAPDU.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ * @summary Test for the CommandAPDU class * @author Andreas Sterbenz * @key randomness - * @compile --add-modules=java.smartcardio TestCommandAPDU.java - * @run main/othervm --add-modules=java.smartcardio TestCommandAPDU */ import java.util.*; diff --git a/jdk/test/sun/security/ec/TestEC.java b/jdk/test/sun/security/ec/TestEC.java index eb4202ad510..c8345d4ce38 100644 --- a/jdk/test/sun/security/ec/TestEC.java +++ b/jdk/test/sun/security/ec/TestEC.java @@ -35,7 +35,6 @@ * @library ../pkcs11/sslecc * @library ../../../java/security/testlibrary * @modules jdk.crypto.cryptoki/sun.security.pkcs11.wrapper - * @compile --add-modules jdk.crypto.cryptoki TestEC.java * @run main/othervm -Djdk.tls.namedGroups="secp256r1,sect193r1" TestEC * @run main/othervm/java.security.policy=TestEC.policy -Djdk.tls.namedGroups="secp256r1,sect193r1" TestEC */ diff --git a/jdk/test/sun/security/mscapi/IsSunMSCAPIAvailable.java b/jdk/test/sun/security/mscapi/IsSunMSCAPIAvailable.java index ba1cff444ec..28a2242d72b 100644 --- a/jdk/test/sun/security/mscapi/IsSunMSCAPIAvailable.java +++ b/jdk/test/sun/security/mscapi/IsSunMSCAPIAvailable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,7 +26,6 @@ * @bug 6318171 6931562 * @requires os.family == "windows" * @modules jdk.crypto.mscapi/sun.security.mscapi - * @compile --add-modules jdk.crypto.mscapi IsSunMSCAPIAvailable.java * @run main/othervm IsSunMSCAPIAvailable */ diff --git a/jdk/test/sun/security/pkcs11/ec/TestCurves.java b/jdk/test/sun/security/pkcs11/ec/TestCurves.java index 6cf32c4c9d9..a610d6b27c0 100644 --- a/jdk/test/sun/security/pkcs11/ec/TestCurves.java +++ b/jdk/test/sun/security/pkcs11/ec/TestCurves.java @@ -28,7 +28,6 @@ * @author Andreas Sterbenz * @library .. * @modules jdk.crypto.cryptoki/sun.security.pkcs11.wrapper - * @compile --add-modules jdk.crypto.cryptoki TestCurves.java * @run main/othervm TestCurves * @run main/othervm TestCurves sm * @key randomness diff --git a/jdk/test/sun/security/provider/PolicyFile/Modules.java b/jdk/test/sun/security/provider/PolicyFile/Modules.java index fa7d33a8fd9..a3f1e8216de 100644 --- a/jdk/test/sun/security/provider/PolicyFile/Modules.java +++ b/jdk/test/sun/security/provider/PolicyFile/Modules.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,7 +39,6 @@ * jdk.net * jdk.security.auth * jdk.security.jgss - * @compile --add-modules=java.xml.ws,java.smartcardio Modules.java * @run main/othervm/java.security.policy==modules.policy Modules */ From ad4f6272dbf5623669b591f9fa98e0b8d205a922 Mon Sep 17 00:00:00 2001 From: Weijun Wang Date: Wed, 8 Mar 2017 15:35:56 +0800 Subject: [PATCH 382/447] 8176320: sun/security/tools/jarsigner/TsacertOptionTest.java compilation error, all mach 5 tier 2 platforms broken Reviewed-by: xuelei --- jdk/test/sun/security/tools/jarsigner/TsacertOptionTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jdk/test/sun/security/tools/jarsigner/TsacertOptionTest.java b/jdk/test/sun/security/tools/jarsigner/TsacertOptionTest.java index de225b2bcb3..cfe23932f3f 100644 --- a/jdk/test/sun/security/tools/jarsigner/TsacertOptionTest.java +++ b/jdk/test/sun/security/tools/jarsigner/TsacertOptionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,9 +26,10 @@ import jdk.testlibrary.JarUtils; /** * @test - * @bug 8024302 8026037 + * @bug 8024302 8026037 8176320 * @summary The test signs and verifies a jar file with -tsacert option * @library /lib/testlibrary warnings + * @library /test/lib * @modules java.base/sun.security.pkcs * java.base/sun.security.timestamp * java.base/sun.security.tools.keytool From 3998cf36b8f8e2e125000cdf9866c5ccdf6e2439 Mon Sep 17 00:00:00 2001 From: Srikanth Adayapalam Date: Wed, 8 Mar 2017 13:17:07 +0530 Subject: [PATCH 383/447] 8175184: Annotation processor observes interface private methods as default methods Reviewed-by: mcimadamore --- .../com/sun/tools/javac/jvm/ClassReader.java | 2 +- .../PrivateInterfaceMethodProcessorTest.java | 58 +++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 langtools/test/tools/javac/defaultMethods/private/PrivateInterfaceMethodProcessorTest.java diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java index 433c3a2e39e..d4aeb99ac2b 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java @@ -2354,7 +2354,7 @@ public class ClassReader { (flags & ABSTRACT) == 0 && !name.equals(names.clinit)) { if (majorVersion > Version.V52.major || (majorVersion == Version.V52.major && minorVersion >= Version.V52.minor)) { - if ((flags & STATIC) == 0) { + if ((flags & (STATIC | PRIVATE)) == 0) { currentOwner.flags_field |= DEFAULT; flags |= DEFAULT | ABSTRACT; } diff --git a/langtools/test/tools/javac/defaultMethods/private/PrivateInterfaceMethodProcessorTest.java b/langtools/test/tools/javac/defaultMethods/private/PrivateInterfaceMethodProcessorTest.java new file mode 100644 index 00000000000..f842213fe86 --- /dev/null +++ b/langtools/test/tools/javac/defaultMethods/private/PrivateInterfaceMethodProcessorTest.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8175184 + * @summary Annotation processor observes interface private methods as default methods + * @library /tools/javac/lib + * @modules java.compiler + * jdk.compiler + * @build JavacTestingAbstractProcessor PrivateInterfaceMethodProcessorTest + * @compile/process -processor PrivateInterfaceMethodProcessorTest -proc:only PrivateInterfaceMethodProcessorTest_I + */ + +import java.util.Set; +import javax.annotation.processing.*; +import javax.lang.model.element.*; +import static javax.lang.model.util.ElementFilter.*; + +interface PrivateInterfaceMethodProcessorTest_I { + private void foo() {} +} + +public class PrivateInterfaceMethodProcessorTest extends JavacTestingAbstractProcessor { + public boolean process(Set annotations, + RoundEnvironment roundEnv) { + if (!roundEnv.processingOver()) { + for (Element element : roundEnv.getRootElements()) { + for (ExecutableElement method : methodsIn(element.getEnclosedElements())) { + if (method.isDefault()) { + throw new AssertionError("Unexpected default method seen"); + } + } + } + } + return true; + } +} \ No newline at end of file From 5d4a22554a75b508dfe7c9fed40ac62340a7e436 Mon Sep 17 00:00:00 2001 From: Maurizio Cimadamore Date: Wed, 8 Mar 2017 14:21:13 +0000 Subject: [PATCH 384/447] 8175317: javac does not issue unchecked warnings when checking method reference return types Missing Warner object on method reference return type check Reviewed-by: vromero --- .../com/sun/tools/javac/comp/Attr.java | 3 +- .../test/tools/javac/lambda/T8175317.java | 31 +++++++++++++++++++ .../test/tools/javac/lambda/T8175317.out | 7 +++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 langtools/test/tools/javac/lambda/T8175317.java create mode 100644 langtools/test/tools/javac/lambda/T8175317.out diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java index 1ae01e4de1b..84e4e3a94ac 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java @@ -3058,7 +3058,8 @@ public class Attr extends JCTree.Visitor { if (!returnType.hasTag(VOID) && !resType.hasTag(VOID)) { if (resType.isErroneous() || - new FunctionalReturnContext(checkContext).compatible(resType, returnType, types.noWarnings)) { + new FunctionalReturnContext(checkContext).compatible(resType, returnType, + checkContext.checkWarner(tree, resType, returnType))) { incompatibleReturnType = null; } } diff --git a/langtools/test/tools/javac/lambda/T8175317.java b/langtools/test/tools/javac/lambda/T8175317.java new file mode 100644 index 00000000000..08d3ebeaf32 --- /dev/null +++ b/langtools/test/tools/javac/lambda/T8175317.java @@ -0,0 +1,31 @@ +/* + * @test /nodynamiccopyright/ + * @bug 8175317 + * @summary javac does not issue unchecked warnings when checking method reference return types + * @compile/fail/ref=T8175317.out -Werror -Xlint:unchecked -XDrawDiagnostics T8175317.java + */ + +import java.util.function.*; +import java.util.*; + +class T8175317 { + void m(Supplier> s) { } + + void testMethodLambda(List l) { + m(() -> l); + } + + void testAssignLambda(List l) { + Supplier> s = () -> l; + } + + void testMethodMref() { + m(this::g); + } + + void testAssignMref() { + Supplier> s = this::g; + } + + List g() { return null; } +} diff --git a/langtools/test/tools/javac/lambda/T8175317.out b/langtools/test/tools/javac/lambda/T8175317.out new file mode 100644 index 00000000000..74cdca632f7 --- /dev/null +++ b/langtools/test/tools/javac/lambda/T8175317.out @@ -0,0 +1,7 @@ +T8175317.java:15:10: compiler.warn.unchecked.meth.invocation.applied: kindname.method, m, java.util.function.Supplier>, java.util.function.Supplier>, kindname.class, T8175317 +T8175317.java:19:42: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.util.List, java.util.List +T8175317.java:23:10: compiler.warn.unchecked.meth.invocation.applied: kindname.method, m, java.util.function.Supplier>, java.util.function.Supplier>, kindname.class, T8175317 +T8175317.java:27:36: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.util.List, java.util.List +- compiler.err.warnings.and.werror +1 error +4 warnings From 13f5b93e8cf12ea1ebae177fbb39a572ef57ca0e Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Wed, 8 Mar 2017 09:49:46 -0800 Subject: [PATCH 385/447] 8175209: Account for race condition in java/nio/channels/AsynchronousSocketChannel/Basic.java Pause until the channel reaches a pended state instead of for a fixed time. Reviewed-by: prappo, mli, alanb --- .../AsynchronousSocketChannel/Basic.java | 64 ++++++++++++------- 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java b/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java index f98fca05391..3202551c6d2 100644 --- a/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java +++ b/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,24 +23,27 @@ /* @test * @bug 4607272 6842687 6878369 6944810 7023403 - * @summary Unit test for AsynchronousSocketChannel + * @summary Unit test for AsynchronousSocketChannel(use -Dseed=X to set PRNG seed) + * @library /lib/testlibrary/ + * @build jdk.testlibrary.* * @run main Basic -skipSlowConnectTest * @key randomness intermittent */ -import java.nio.ByteBuffer; -import java.nio.channels.*; -import static java.net.StandardSocketOptions.*; -import java.net.*; -import java.util.Random; -import java.util.concurrent.*; -import java.util.concurrent.atomic.*; import java.io.Closeable; import java.io.IOException; +import java.net.*; +import static java.net.StandardSocketOptions.*; +import java.nio.ByteBuffer; +import java.nio.channels.*; +import java.util.Random; import java.util.Set; +import java.util.concurrent.*; +import java.util.concurrent.atomic.*; +import jdk.testlibrary.RandomFactory; public class Basic { - static final Random rand = new Random(); + private static final Random RAND = RandomFactory.getRandom(); static boolean skipSlowConnectTest = false; @@ -327,8 +330,10 @@ public class Basic { new AtomicReference(); // write bytes to fill socket buffer + final AtomicInteger numCompleted = new AtomicInteger(); ch.write(genBuffer(), ch, new CompletionHandler() { public void completed(Integer result, AsynchronousSocketChannel ch) { + numCompleted.incrementAndGet(); ch.write(genBuffer(), ch, this); } public void failed(Throwable x, AsynchronousSocketChannel ch) { @@ -336,10 +341,21 @@ public class Basic { } }); - // give time for socket buffer to fill up. - Thread.sleep(5*1000); + // give time for socket buffer to fill up - + // take pauses until the handler is no longer being invoked + // because all writes are being pended which guarantees that + // the internal channel state indicates it is writing + int prevNumCompleted = numCompleted.get(); + do { + Thread.sleep(1000); + if (numCompleted.get() == prevNumCompleted) { + break; + } + prevNumCompleted = numCompleted.get(); + } while (true); - // attempt a concurrent write - should fail with WritePendingException + // attempt a concurrent write - + // should fail with WritePendingException try { ch.write(genBuffer()); throw new RuntimeException("WritePendingException expected"); @@ -497,12 +513,12 @@ public class Basic { // trickle the writing do { int rem = src.remaining(); - int size = (rem <= 100) ? rem : 50 + rand.nextInt(rem - 100); + int size = (rem <= 100) ? rem : 50 + RAND.nextInt(rem - 100); ByteBuffer buf = ByteBuffer.allocate(size); for (int i=0; i 1) - len += rand.nextInt(max); + len += RAND.nextInt(max); ByteBuffer[] bufs = new ByteBuffer[len]; for (int i=0; i Date: Wed, 8 Mar 2017 09:53:19 -0800 Subject: [PATCH 386/447] 8176317: (ch) Add print of timeout value to java/nio/channels/AsynchronousSocketChannel/Basic.java Add print of timeout value. Reviewed-by: alanb --- jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java | 1 + 1 file changed, 1 insertion(+) diff --git a/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java b/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java index 3202551c6d2..64861b4c865 100644 --- a/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java +++ b/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java @@ -775,6 +775,7 @@ public class Basic { } static void testTimeout(final long timeout, final TimeUnit unit) throws Exception { + System.out.printf("---- timeout: %d ms%n", unit.toMillis(timeout)); try (Server server = new Server()) { AsynchronousSocketChannel ch = AsynchronousSocketChannel.open(); ch.connect(server.address()).get(); From 31c0a8cdfa543c5992fead85d96773ff30ee41d3 Mon Sep 17 00:00:00 2001 From: Lance Andersen Date: Wed, 8 Mar 2017 13:54:30 -0500 Subject: [PATCH 387/447] 8176235: Minor updates to package.html Reviewed-by: joehw --- .../share/classes/java/sql/package.html | 108 ++++++++++-------- .../share/classes/javax/sql/package.html | 9 +- 2 files changed, 66 insertions(+), 51 deletions(-) diff --git a/jdk/src/java.sql/share/classes/java/sql/package.html b/jdk/src/java.sql/share/classes/java/sql/package.html index 0d1dc67132f..163522d9f63 100644 --- a/jdk/src/java.sql/share/classes/java/sql/package.html +++ b/jdk/src/java.sql/share/classes/java/sql/package.html @@ -2,7 +2,7 @@