Mercurial > hg > graal-jvmci-8
diff jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotReferenceMap.java @ 23700:9e1235406b59
[Findbugs] various warnings reported for JVMCI sources (JDK-8159613)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Sat, 18 Jun 2016 13:19:01 +0200 |
parents | 1d4ce2d19e52 |
children |
line wrap: on
line diff
--- a/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotReferenceMap.java Fri Jun 17 19:13:02 2016 +0200 +++ b/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotReferenceMap.java Sat Jun 18 13:19:01 2016 +0200 @@ -27,13 +27,25 @@ import jdk.vm.ci.code.Location; import jdk.vm.ci.code.ReferenceMap; +/** + * Describes where the object references are in machine state, compliant with what HotSpot expects. + */ public final class HotSpotReferenceMap extends ReferenceMap { - final Location[] objects; - final Location[] derivedBase; - final int[] sizeInBytes; - final int maxRegisterSize; + private final Location[] objects; + private final Location[] derivedBase; + private final int[] sizeInBytes; + private final int maxRegisterSize; + /** + * + * @param objects This array is now owned by this object and must not be mutated by the caller. + * @param derivedBase This array is now owned by this object and must not be mutated by the + * caller. + * @param sizeInBytes This array is now owned by this object and must not be mutated by the + * caller. + */ + @SuppressFBWarnings(value = "EI_EXPOSE_REP2", justification = "caller transfers ownership of `objects`, `derivedBase` and `sizeInBytes`") public HotSpotReferenceMap(Location[] objects, Location[] derivedBase, int[] sizeInBytes, int maxRegisterSize) { this.objects = objects; this.derivedBase = derivedBase;