Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 513993

Summary: Exception during evaluation of array of type java.awt.Color
Product: [Eclipse Project] JDT Reporter: Daniela Stefanova <daniela_stefanova>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: P3 CC: sarika.sinha
Version: 4.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Screenshot of the exception none

Description Daniela Stefanova CLA 2017-03-21 10:05:19 EDT
Created attachment 267380 [details]
Screenshot of the exception

Use simple program with defined array of type Color:
import java.awt.Color;

public class TestColorArray {
	
	private static Color[] arrayColor;

	public static void main(String[] args) {
		arrayColor = new Color[5];
		arrayColor[1] = Color.black;
	}
}

Put a breakpoint on line: arrayColor[1] = Color.black;
Start debugging. When debugging stops at the breakpoint, try to evaluate arrayColor variable. In the "Expressions" view add arrayColor, click on it and exception appear in the expression textbox:

org.eclipse.debug.core.DebugException: com.sun.jdi.ClassNotLoadedException: Type has not been loaded occurred while retrieving component type of array.

If you step over the next line, exception disappears and the value of the array is displayed correctly:

[null, java.awt.Color[r=0,g=0,b=0], null, null, null]
Comment 1 Eclipse Genie CLA 2020-05-01 04:35:32 EDT
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.
Comment 2 Sarika Sinha CLA 2020-05-01 07:52:58 EDT
Yes, For Java 8, we have this issue till we have any value added to the array, Formatter fails. 
Works fine for Java 14.