< prev index next >
src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2001, 2013, 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) 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 1201,1210 ****
--- 1201,1220 ----
cls.addAttribute(Package.attrBootstrapMethodsEmpty.canonicalInstance());
// 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();
if (changed != 0) {
*** 1219,1238 ****
// flesh out the local constant pool, again
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) {
if (e.isDoubleWord()) numDoubles++;
}
--- 1229,1238 ----
*** 1260,1270 ****
assert(fillp == narrowLimit+wideRefs.size());
Arrays.sort(cpMap, 1, narrowLimit, entryOutputOrder);
Arrays.sort(cpMap, narrowLimit, fillp, entryOutputOrder);
if (verbose > 3) {
! Utils.log.fine("CP of "+this+" {");
for (int i = 0; i < fillp; i++) {
Entry e = cpMap[i];
Utils.log.fine(" "+((e==null)?-1:getOutputIndex(e))
+" : "+e);
}
--- 1260,1270 ----
assert(fillp == narrowLimit+wideRefs.size());
Arrays.sort(cpMap, 1, narrowLimit, entryOutputOrder);
Arrays.sort(cpMap, narrowLimit, fillp, entryOutputOrder);
if (verbose > 3) {
! 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))
+" : "+e);
}
< prev index next >