Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359825 - java save actions of use final on private fields ignores jpa annotations
Summary: java save actions of use final on private fields ignores jpa annotations
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-04 07:47 EDT by elhanan Maayan CLA
Modified: 2011-11-08 08:06 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description elhanan Maayan CLA 2011-10-04 07:47:34 EDT
i'm not exactatly sure where to place this bug, as this is a bug between to plugins.

save actions allows you to append final keyword on fields which it recognizes   re only initilized once. while this is true in most case, trying to do so on an entity would yield an error from dali complianing that you cannot set final on attributes.
since jpa is a standard in se, i believe it's jdt's resposibility to identify it's inside an entity and not apply these rules on it. (or at least allow prefrences swich to it), i also think that it should open up extension point to allow other providers define if should be modifed as well.
Comment 1 Dani Megert CLA 2011-10-04 08:10:16 EDT
> since jpa is a standard in se,
JPA is part of EE not SE. There's not much we can do here. I suggest you disable that save action.

Markus, I suggest to close as WONTFIX.
Comment 2 elhanan Maayan CLA 2011-10-06 04:46:00 EDT
while it may part of jee, it can be used as part of desktop applications.
Comment 3 Deepak Azad CLA 2011-11-08 08:06:20 EST
(In reply to comment #1)
> Markus, I suggest to close as WONTFIX.
+1. We will not add JPA specific features to JDT. 

elhanan, don't the attributes (which are private fields) have getters and setters ? If a private field has a setter the save action or cleanup should anyway skip that field.