--- old/src/java.base/share/classes/java/util/Currency.java 2017-06-12 14:16:40.989971359 +0530 +++ new/src/java.base/share/classes/java/util/Currency.java 2017-06-12 14:16:40.609781359 +0530 @@ -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 @@ -33,6 +33,8 @@ import java.io.InputStream; import java.io.IOException; import java.io.Serializable; +import java.nio.file.Files; +import java.nio.file.Paths; import java.security.AccessController; import java.security.PrivilegedAction; import java.text.ParseException; @@ -200,12 +202,10 @@ AccessController.doPrivileged(new PrivilegedAction<>() { @Override public Void run() { - try { - try (InputStream in = getClass().getResourceAsStream("/java/util/currency.data")) { - if (in == null) { - throw new InternalError("Currency data not found"); - } - DataInputStream dis = new DataInputStream(new BufferedInputStream(in)); + try (DataInputStream dis = new DataInputStream( + new BufferedInputStream(Files.newInputStream(Paths + .get(System.getProperty("java.home"), + "lib", "currency.data"))))) { if (dis.readInt() != MAGIC_NUMBER) { throw new InternalError("Currency data is possibly corrupted"); } @@ -219,7 +219,6 @@ specialCasesList = readSpecialCases(dis, scCount); int ocCount = dis.readInt(); otherCurrenciesList = readOtherCurrencies(dis, ocCount); - } } catch (IOException e) { throw new InternalError(e); }