8191948: db error: InvalidTypeException: Can't assign double[][][] to double[][][]
Reviewed-by: sspitsyn, amenkov
This commit is contained in:
parent
b2f4d61fb9
commit
8afac1c9da
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -1153,7 +1153,7 @@ public abstract class ReferenceTypeImpl extends TypeImpl implements ReferenceTyp
|
|||||||
this.genericSignatureGotten = true;
|
this.genericSignatureGotten = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isPrimitiveArray(String signature) {
|
private static boolean isOneDimensionalPrimitiveArray(String signature) {
|
||||||
int i = signature.lastIndexOf('[');
|
int i = signature.lastIndexOf('[');
|
||||||
/*
|
/*
|
||||||
* TO DO: Centralize JNI signature knowledge.
|
* TO DO: Centralize JNI signature knowledge.
|
||||||
@ -1162,7 +1162,7 @@ public abstract class ReferenceTypeImpl extends TypeImpl implements ReferenceTyp
|
|||||||
* jdk1.4/doc/guide/jpda/jdi/com/sun/jdi/doc-files/signature.html
|
* jdk1.4/doc/guide/jpda/jdi/com/sun/jdi/doc-files/signature.html
|
||||||
*/
|
*/
|
||||||
boolean isPA;
|
boolean isPA;
|
||||||
if (i < 0) {
|
if (i < 0 || signature.startsWith("[[")) {
|
||||||
isPA = false;
|
isPA = false;
|
||||||
} else {
|
} else {
|
||||||
char c = signature.charAt(i + 1);
|
char c = signature.charAt(i + 1);
|
||||||
@ -1186,7 +1186,7 @@ public abstract class ReferenceTypeImpl extends TypeImpl implements ReferenceTyp
|
|||||||
ClassLoaderReferenceImpl loader =
|
ClassLoaderReferenceImpl loader =
|
||||||
(ClassLoaderReferenceImpl)classLoader();
|
(ClassLoaderReferenceImpl)classLoader();
|
||||||
if ((loader == null) ||
|
if ((loader == null) ||
|
||||||
(isPrimitiveArray(signature)) //Work around 4450091
|
(isOneDimensionalPrimitiveArray(signature)) //Work around 4450091
|
||||||
) {
|
) {
|
||||||
// Caller wants type of boot class field
|
// Caller wants type of boot class field
|
||||||
type = vm.findBootType(signature);
|
type = vm.findBootType(signature);
|
||||||
|
@ -98,7 +98,8 @@ public class eval001 extends JdbTest {
|
|||||||
{ DEBUGGEE_CLASS + "._eval001a.myMethod()", "2147483647" },
|
{ DEBUGGEE_CLASS + "._eval001a.myMethod()", "2147483647" },
|
||||||
{ "myClass.toString().equals(\"abcde\")", "true"},
|
{ "myClass.toString().equals(\"abcde\")", "true"},
|
||||||
{ "i + j + k", "777"},
|
{ "i + j + k", "777"},
|
||||||
{ "new java.lang.String(\"Hello, World\").length()", "12"}
|
{ "new java.lang.String(\"Hello, World\").length()", "12"},
|
||||||
|
{ DEBUGGEE_CLASS + "._eval001a.testPrimitiveArray(test)", "1.0" }
|
||||||
};
|
};
|
||||||
|
|
||||||
protected void runCases() {
|
protected void runCases() {
|
||||||
|
@ -48,6 +48,7 @@ public class eval001a {
|
|||||||
int i = 111;
|
int i = 111;
|
||||||
int j = 222;
|
int j = 222;
|
||||||
int k = 444;
|
int k = 444;
|
||||||
|
double[][][] test = new double[2][2][2];
|
||||||
|
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
lastBreak();
|
lastBreak();
|
||||||
@ -81,4 +82,8 @@ public class eval001a {
|
|||||||
return line;
|
return line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public double testPrimitiveArray(double[][][] d){
|
||||||
|
return 1.0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user