提交 735ddd08 编写于 作者: D dtitov

8191948: db error: InvalidTypeException: Can't assign double[][][] to double[][][]

Reviewed-by: sspitsyn, amenkov
上级 7fc5166e
/*
* 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.
*
* 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;
}
private static boolean isPrimitiveArray(String signature) {
private static boolean isOneDimensionalPrimitiveArray(String signature) {
int i = signature.lastIndexOf('[');
/*
* 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
*/
boolean isPA;
if (i < 0) {
if (i < 0 || signature.startsWith("[[")) {
isPA = false;
} else {
char c = signature.charAt(i + 1);
......@@ -1186,7 +1186,7 @@ public abstract class ReferenceTypeImpl extends TypeImpl implements ReferenceTyp
ClassLoaderReferenceImpl loader =
(ClassLoaderReferenceImpl)classLoader();
if ((loader == null) ||
(isPrimitiveArray(signature)) //Work around 4450091
(isOneDimensionalPrimitiveArray(signature)) //Work around 4450091
) {
// Caller wants type of boot class field
type = vm.findBootType(signature);
......
......@@ -98,7 +98,8 @@ public class eval001 extends JdbTest {
{ DEBUGGEE_CLASS + "._eval001a.myMethod()", "2147483647" },
{ "myClass.toString().equals(\"abcde\")", "true"},
{ "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() {
......
......@@ -48,6 +48,7 @@ public class eval001a {
int i = 111;
int j = 222;
int k = 444;
double[][][] test = new double[2][2][2];
synchronized (this) {
lastBreak();
......@@ -81,4 +82,8 @@ public class eval001a {
return line;
}
}
public double testPrimitiveArray(double[][][] d){
return 1.0;
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册