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

Bug 352373

Summary: EGLContext.putAttribute does not allow multiple uses of the same Annotation key.
Product: z_Archived Reporter: Joseph Vincens <jvincens>
Component: EDTAssignee: Joseph Vincens <jvincens>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Joseph Vincens CLA 2011-07-18 12:46:37 EDT
consider the following template code:
	for (int idx = 0; idx < enums.size(); idx++) {
		ctx.putAttribute(part, genConstructorOptions, enums.get(idx).getValue() == 0 ? Integer.valueOf(idx + 1) : Integer.valueOf(enums.get(idx).getValue())  );
		ctx.invoke(genInstantiation, (Type)part, ctx, out);
		out.println(";");
	}

Each putAttribute creates a new annotation and there is no way to retrieve the new annotation.

putAttribute should first try to get the annotation and update it. If the annotation doesn't exist a new should be created.
Comment 1 Joseph Vincens CLA 2011-07-18 12:48:59 EDT
if the annotation exists it will be updated.
Comment 2 Joseph Vincens CLA 2011-09-12 14:27:49 EDT
verified