RFR: 8244852 GraalVM native-image fails after JDK-8238048 change

Bob Vandette bob.vandette at oracle.com
Wed May 13 13:13:06 UTC 2020


Thanks.  I did confirm that the value returned prior to the regression was indeed a null.

Bob.


> On May 13, 2020, at 12:37 AM, David Holmes <david.holmes at oracle.com> wrote:
> 
> Hi Bob,
> 
> On 13/05/2020 4:37 am, Bob Vandette wrote:
>> Please review this fix for a regression in JDK 15 causing native-image to fail.
>> https://bugs.openjdk.java.net/browse/JDK-8244852
>> diff --git a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java
>> --- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java
>> +++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java
>> @@ -818,7 +818,7 @@
>>      @Override
>>      public String getSourceFileName() {
>>          if (isArray()) {
>> -            throw new JVMCIError("Cannot call getSourceFileName() on an array klass type: %s", this);
>> +            return (String)null;
> 
> Fix seems reasonable. While JavaType.getSourceFileName() seems a little underspecified, JavaType includes array types so the call should be valid.
> 
> Nit: No cast needed on the null.
> 
> Thanks,
> David
> 
>>          }
>>          return getConstantPool().getSourceFileName();
>>      }
>> Bob.



More information about the hotspot-dev mailing list