| Summary: | Can't evaluate new Object[] { 5 }: InvalidTypeException: Generated value.. | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Chris West (Faux) <eclipse> |
| Component: | Debug | Assignee: | JDT-Debug-Inbox <jdt-debug-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | darin.eclipse, pwebster |
| Version: | 3.6 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows Vista | ||
| Whiteboard: | stalebug | ||
Looks literals used to initialize arrays are not autoboxed properly. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
Build Identifier: Attempting to evaluate (ctrl+shift+i inspect/ctrl+shift+d display) code containing "new Object[] { 5 }" will give an InvalidTypeException: Generated value (int) is not compatible with declared type (java.lang.Object). Thread [Worker-7] (Suspended (exception InvalidTypeException)) ValueImpl.checkValue(Value, Type, VirtualMachineImpl) line: 192 ArrayReferenceImpl.checkValues(List, Type) line: 295 ArrayReferenceImpl.setValues(int, List, int, int) line: 251 ArrayReferenceImpl.setValue(int, Value) line: 209 JDIArrayValue.setValue(int, IJavaValue) line: 86 ArrayInitializerInstruction.execute() line: 45 Interpreter.execute() line: 66 ... Reproducible: Always Steps to Reproduce: 1. Debug code looking like: import java.util.Arrays; class Pony { public static void main(String[] args) { System.out.println(Arrays.toString(new Object[] { 5 })); } } 2. Breakpoint the line. 3. Highlight "new Object[] { 5 }" 4. ctrl+shift+i inspect or ctrl+shift+d display the highlighted expression. 5. Error will be reported (without stack trace aaaa).