--- old/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java Thu Mar 17 13:47:52 2016 +++ new/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java Thu Mar 17 13:47:51 2016 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -1203,6 +1203,16 @@ // flesh out the local constant pool ConstantPool.completeReferencesIn(cpRefs, true, bsms); + // remove the attr previously set, otherwise add the bsm and + // references as required + if (bsms.isEmpty()) { + cls.attributes.remove(Package.attrBootstrapMethodsEmpty.canonicalInstance()); + } else { + cpRefs.add(Package.getRefString("BootstrapMethods")); + Collections.sort(bsms); + cls.setBootstrapMethods(bsms); + } + // Now that we know all our local class references, // compute the InnerClasses attribute. int changed = cls.expandLocalICs(); @@ -1221,16 +1231,6 @@ ConstantPool.completeReferencesIn(cpRefs, true, bsms); } - // remove the attr previously set, otherwise add the bsm and - // references as required - if (bsms.isEmpty()) { - cls.attributes.remove(Package.attrBootstrapMethodsEmpty.canonicalInstance()); - } else { - cpRefs.add(Package.getRefString("BootstrapMethods")); - Collections.sort(bsms); - cls.setBootstrapMethods(bsms); - } - // construct a local constant pool int numDoubles = 0; for (Entry e : cpRefs) { @@ -1262,7 +1262,7 @@ Arrays.sort(cpMap, narrowLimit, fillp, entryOutputOrder); if (verbose > 3) { - Utils.log.fine("CP of "+this+" {"); + Utils.log.fine("CP of "+cls+" {"); for (int i = 0; i < fillp; i++) { Entry e = cpMap[i]; Utils.log.fine(" "+((e==null)?-1:getOutputIndex(e))