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

Bug 360746

Summary: DynamicAccessException on dictionary removeElement when element isn't in dictionary
Product: z_Archived Reporter: broy2
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P1 CC: jeffdouglas, svihovec
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description broy2 CLA 2011-10-12 19:52:10 EDT
Debug program:

program removeProblem 
  myDictionary Dictionary = new dictionary ( true, OrderingKind.byInsertion )
    {
      ID        = 5,
      lastName  = "Twain",
      firstName = "Mark"
    };
	myInt int;	   
	function main()
	    myDictionary.removeElement("matt");
	end	  
end

Get exception on removeElement when element isn't in dictionary.

A field named matt cannot be found in dictionary.
eglx.lang.DynamicAccessException A field named matt cannot be found in dictionary.
	at eglx.lang.AnyException.fillInStackTrace(AnyException.java:187)
	at java.lang.Throwable.<init>(Throwable.java:181)
	at java.lang.Exception.<init>(Unknown Source)
	at java.lang.RuntimeException.<init>(Unknown Source)
	at eglx.lang.AnyException.<init>(AnyException.java:32)
	at eglx.lang.DynamicAccessException.<init>(DynamicAccessException.java:22)
	at org.eclipse.edt.runtime.java.eglx.lang.EDictionary.removeElement(EDictionary.java:309)
	at pkg.removeProblem.main(removeProblem.java:42)
	at org.eclipse.edt.javart.resources.RunUnitBase.start(RunUnitBase.java:244)
	at pkg.removeProblem.main(removeProblem.java:21)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.edt.javart.ide.MainProgramLauncher.main(MainProgramLauncher.java:68)
Comment 1 Jeff Douglas CLA 2011-10-19 12:00:30 EDT
According to the EDT definition for removeElement, it is supposed to throw that exception
Comment 2 broy2 CLA 2011-10-19 12:09:11 EDT
Man, I hate it when I'm wrong.