< prev index next >

make/jdk/src/classes/build/tools/generatelsrequivmaps/EquivMapsGenerator.java

Print this page
rev 58349 : [mq]: 8241082

*** 1,7 **** /* ! * 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. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved. * 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
*** 213,226 **** + "final class LocaleEquivalentMaps {\n\n" + " static final Map<String, String> singleEquivMap;\n" + " static final Map<String, String[]> multiEquivsMap;\n" + " static final Map<String, String> regionVariantEquivMap;\n\n" + " static {\n" ! + " singleEquivMap = new HashMap<>();\n" ! + " multiEquivsMap = new HashMap<>();\n" ! + " regionVariantEquivMap = new HashMap<>();\n\n" ! + " // This is an auto-generated file and should not be manually edited.\n"; private static final String footerText = " }\n\n" + "}"; --- 213,223 ---- + "final class LocaleEquivalentMaps {\n\n" + " static final Map<String, String> singleEquivMap;\n" + " static final Map<String, String[]> multiEquivsMap;\n" + " static final Map<String, String> regionVariantEquivMap;\n\n" + " static {\n" ! + " singleEquivMap = new HashMap<>("; private static final String footerText = " }\n\n" + "}";
*** 240,249 **** --- 237,252 ---- try (BufferedWriter writer = Files.newBufferedWriter( Paths.get(fileName))) { writer.write(getOpenJDKCopyright()); writer.write(headerText + + (int)(sortedLanguageMap1.size() / 0.75f + 1) + ");\n" + + " multiEquivsMap = new HashMap<>(" + + (int)(sortedLanguageMap2.size() / 0.75f + 1) + ");\n" + + " regionVariantEquivMap = new HashMap<>(" + + (int)(sortedRegionVariantMap.size() / 0.75f + 1) + ");\n\n" + + " // This is an auto-generated file and should not be manually edited.\n" + " // LSR Revision: " + LSRrevisionDate); writer.newLine(); for (String key : sortedLanguageMap1.keySet()) { String value = sortedLanguageMap1.get(key);
< prev index next >