Skip to content
Permalink
Browse files
8221503: vmTestbase/nsk/jdb/eval/eval001/eval001.java fails with: com…
….sun.jdi.InvalidTypeException: Can't assign double[][][] to double[][][]

Reviewed-by: cjplummer, sspitsyn
  • Loading branch information
Fairoz Matte authored and Serguei Spitsyn committed May 5, 2021
1 parent b71f85a commit 82768d9a31edcfe5b27e75d681d3592c8f4a2ece
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2021, 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
@@ -249,7 +249,7 @@ void validateAssignment(ValueContainer destination)
String srcComponentSignature =
srcParser.componentSignature(destDims);
Type srcComponentType =
arrayType().findComponentType(srcComponentSignature);
arrayType().findType(srcComponentSignature);
valid = ArrayTypeImpl.isComponentAssignable(destComponentType,
srcComponentType);
}
@@ -281,7 +281,7 @@ public String signature() {
return arrayType().componentSignature();
}
public Type findType(String signature) throws ClassNotLoadedException {
return arrayType().findComponentType(signature);
return arrayType().findType(signature);
}
}
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2021, 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
@@ -81,42 +81,8 @@ void addVisibleMethods(Map<String, Method> map, Set<InterfaceType> seenInterface
return new ArrayList<>(0); // arrays don't have methods
}

/*
* Find the type object, if any, of a component type of this array.
* The component type does not have to be immediate; e.g. this method
* can be used to find the component Foo of Foo[][]. This method takes
* advantage of the property that an array and its component must have
* the same class loader. Since array set operations don't have an
* implicit enclosing type like field and variable set operations,
* this method is sometimes needed for proper type checking.
*/
Type findComponentType(String signature) throws ClassNotLoadedException {

JNITypeParser sig = new JNITypeParser(signature);
if (sig.isReference()) {
// It's a reference type
JNITypeParser parser = new JNITypeParser(componentSignature());
List<ReferenceType> list = vm.classesByName(parser.typeName());
Iterator<ReferenceType> iter = list.iterator();
while (iter.hasNext()) {
ReferenceType type = iter.next();
ClassLoaderReference cl = type.classLoader();
if ((cl == null)?
(classLoader() == null) :
(cl.equals(classLoader()))) {
return type;
}
}
// Component class has not yet been loaded
throw new ClassNotLoadedException(componentTypeName());
} else {
// It's a primitive type
return vm.primitiveTypeMirror(sig.jdwpTag());
}
}

public Type componentType() throws ClassNotLoadedException {
return findComponentType(componentSignature());
return findType(componentSignature());
}

static boolean isComponentAssignable(Type destination, Type source) {
@@ -129,8 +129,6 @@ vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Deadlock/JavaDeadlock001/TestD

vmTestbase/nsk/jdi/ThreadReference/stop/stop001/TestDescription.java 7034630 generic-all

vmTestbase/nsk/jdb/eval/eval001/eval001.java 8221503 generic-all

vmTestbase/metaspace/gc/firstGC_10m/TestDescription.java 8208250 generic-all
vmTestbase/metaspace/gc/firstGC_50m/TestDescription.java 8208250 generic-all
vmTestbase/metaspace/gc/firstGC_99m/TestDescription.java 8208250 generic-all

0 comments on commit 82768d9

Please sign in to comment.