From: Eugene Zhuravlev Date: Thu, 11 Mar 2010 10:51:27 +0000 (+0300) Subject: handel unboxing of null values X-Git-Tag: 94.536~11 X-Git-Url: https://git.jetbrains.org/?p=idea%2Fcommunity.git;a=commitdiff_plain;h=aa00732d8f9905c8bc3ee4d1b64aec24146e1c0f handel unboxing of null values --- diff --git a/java/debugger/impl/src/com/intellij/debugger/engine/evaluation/expression/UnBoxingEvaluator.java b/java/debugger/impl/src/com/intellij/debugger/engine/evaluation/expression/UnBoxingEvaluator.java index faa963756f8d..efbc8d3def9c 100644 --- a/java/debugger/impl/src/com/intellij/debugger/engine/evaluation/expression/UnBoxingEvaluator.java +++ b/java/debugger/impl/src/com/intellij/debugger/engine/evaluation/expression/UnBoxingEvaluator.java @@ -58,6 +58,9 @@ public class UnBoxingEvaluator implements Evaluator{ public Object evaluate(EvaluationContextImpl context) throws EvaluateException { final Value result = (Value)myOperand.evaluate(context); + if (result == null) { + throw new EvaluateException("java.lang.NullPointerException: cannot unbox null value"); + } if (result instanceof ObjectReference) { final String valueTypeName = result.type().name(); final Pair pair = TYPES_TO_CONVERSION_METHOD_MAP.get(valueTypeName);