--- old/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/SimpleTypeBuilder.java 2015-10-21 14:11:19.000000000 +0200 +++ new/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/SimpleTypeBuilder.java 2015-10-21 14:11:19.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -140,7 +140,7 @@ private XSSimpleType initiatingType; /** {@link TypeUse}s for the built-in types. Read-only. */ - public static final Map builtinConversions = new HashMap(); + public static final Map builtinConversions; /** @@ -418,7 +418,7 @@ /** * Returns true if a type-safe enum should be created from - * the given simple type by default without an explicit <jaxb:enum> customization. + * the given simple type by default without an explicit {@code } customization. */ private boolean shouldBeMappedToTypeSafeEnumByDefault( XSRestrictionSimpleType type ) { @@ -876,7 +876,7 @@ // note that although xs:token and xs:normalizedString are not // specified in the spec, they need to be here because they // have different whitespace normalization semantics. - Map m = builtinConversions; + Map m = new HashMap(); // TODO: this is so dumb m.put("string", CBuiltinLeafInfo.STRING); @@ -911,6 +911,8 @@ m.put("normalizedString",CBuiltinLeafInfo.NORMALIZED_STRING); m.put("ID", CBuiltinLeafInfo.ID); m.put("IDREF", CBuiltinLeafInfo.IDREF); + + builtinConversions = Collections.unmodifiableMap(m); // TODO: handling dateTime, time, and date type // String[] names = { // "date", "dateTime", "time", "hexBinary" };