OpenJDK / valhalla / valhalla
changeset 57421:551414bf7586 lworld
8211026: jdb should not allow to assign null to value type
Reviewed-by: mchung
author | fparain |
---|---|
date | Wed, 16 Oct 2019 10:57:31 -0400 |
parents | 0bf862781b36 |
children | fd2a44606c3c |
files | src/jdk.jdi/share/classes/com/sun/tools/jdi/ValueImpl.java |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/jdk.jdi/share/classes/com/sun/tools/jdi/ValueImpl.java Tue Oct 15 17:20:50 2019 -0400 +++ b/src/jdk.jdi/share/classes/com/sun/tools/jdi/ValueImpl.java Wed Oct 16 10:57:31 2019 -0400 @@ -46,6 +46,9 @@ if (destination.signature().length() == 1) { throw new InvalidTypeException("Can't set a primitive type to null"); } + if (destination.signature().charAt(0) == 'Q') { + throw new InvalidTypeException("Can't set an inline type to null"); + } return null; // no further checking or conversion necessary } else { return ((ValueImpl)value).prepareForAssignmentTo(destination);