--- old/make/GenerateData.gmk 2014-06-26 09:19:30.807085452 -0700 +++ new/make/GenerateData.gmk 2014-06-26 09:19:30.350078671 -0700 @@ -62,7 +62,7 @@ ########################################################################################## -GENDATA_CURDATA := $(JDK_OUTPUTDIR)/lib/currency.data +GENDATA_CURDATA := $(JDK_OUTPUTDIR)/classes/java/util/currency.data $(GENDATA_CURDATA): $(JDK_TOPDIR)/make/data/currency/CurrencyData.properties $(BUILD_TOOLS) $(MKDIR) -p $(@D) --- old/make/profile-includes.txt 2014-06-26 09:19:32.290107456 -0700 +++ new/make/profile-includes.txt 2014-06-26 09:19:31.971102723 -0700 @@ -56,7 +56,6 @@ $(OPENJDK_TARGET_CPU_LEGACY_LIB)/server/Xusage.txt \ calendars.properties \ classlist \ - currency.data \ ext/localedata.jar \ ext/meta-index \ ext/sunec.jar \ --- old/src/share/classes/java/util/Currency.java 2014-06-26 09:19:33.358123303 -0700 +++ new/src/share/classes/java/util/Currency.java 2014-06-26 09:19:33.074119089 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -212,13 +212,9 @@ AccessController.doPrivileged(new PrivilegedAction() { @Override public Void run() { - String homeDir = System.getProperty("java.home"); try { - String dataFile = homeDir + File.separator + - "lib" + File.separator + "currency.data"; try (DataInputStream dis = new DataInputStream( - new BufferedInputStream( - new FileInputStream(dataFile)))) { + new BufferedInputStream(getClass().getResourceAsStream("/java/util/currency.data")))) { if (dis.readInt() != MAGIC_NUMBER) { throw new InternalError("Currency data is possibly corrupted"); } @@ -248,7 +244,7 @@ // look for the properties file for overrides String propsFile = System.getProperty("java.util.currency.data"); if (propsFile == null) { - propsFile = homeDir + File.separator + "lib" + + propsFile = System.getProperty("java.home") + File.separator + "lib" + File.separator + "currency.properties"; } try { --- old/test/java/util/Currency/CheckDataVersion.java 2014-06-26 09:19:34.682142948 -0700 +++ new/test/java/util/Currency/CheckDataVersion.java 2014-06-26 09:19:34.404138822 -0700 @@ -64,7 +64,8 @@ public Object run() { try { String sep = File.separator; - DataInputStream dis = new DataInputStream(new FileInputStream(System.getProperty("java.home")+sep+"lib"+sep+"currency.data")); + DataInputStream dis = new DataInputStream( + new BufferedInputStream(getClass().getResourceAsStream("/java/util/currency.data"))); int magic = dis.readInt(); if (magic != 0x43757244) { throw new RuntimeException("The magic number in the JRE's currency data is incorrect. Expected: 0x43757244, Got: 0x"+magic); --- old/test/java/util/Currency/CurrencyTest.java 2014-06-26 09:19:35.900161021 -0700 +++ new/test/java/util/Currency/CurrencyTest.java 2014-06-26 09:19:35.627156971 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 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 @@ -23,7 +23,7 @@ /* * @test * @bug 4290801 4692419 4693631 5101540 5104960 6296410 6336600 6371531 - * 6488442 7036905 + * 6488442 7036905 8039317 * @summary Basic tests for Currency class. */ --- old/test/java/util/Currency/ValidateISO4217.java 2014-06-26 09:19:37.865190180 -0700 +++ new/test/java/util/Currency/ValidateISO4217.java 2014-06-26 09:19:36.804174436 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 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 @@ -23,6 +23,7 @@ /* * @test * @bug 4691089 4819436 4942982 5104960 6544471 6627549 7066203 7195759 + * 8039317 * @summary Validate ISO 4217 data for Currency class. */