Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352373 - EGLContext.putAttribute does not allow multiple uses of the same Annotation key.
Summary: EGLContext.putAttribute does not allow multiple uses of the same Annotation key.
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Joseph Vincens CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-18 12:46 EDT by Joseph Vincens CLA
Modified: 2017-02-23 14:14 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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