This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 232006 - The getter method for persistent entities could not be public or protected when field access is used
Summary: The getter method for persistent entities could not be public or protected wh...
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 7.4
Hardware: PC All
: P3 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords:
: 224732 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-06-28 17:42 UTC by Michel Graciano
Modified: 2013-12-27 02:44 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Graciano 2013-06-28 17:42:18 UTC
[ BUILD # : 95354a32ee7e ]
[ JDK VERSION : 1.7.0_21 ]

Currently there is a default editor error/hint that is shown in the editor if a
persistent class has getter methods with default or private modifiers, stating
that these methods should be either public or protected.
AFAIK the specification just forces it to be public or protected if the access
types is PROPERTY. I am looking at JPA 2.0 specification where section 2.2
states: "When property access is used, the property accessor methods must be
public or protected." I was unable to find any reference about the validation
NB editor is doing. So, IMHO this error/hint should be placed just if the
access type is PROPERTY.
Comment 1 Sergey Petrov 2013-06-28 17:56:25 UTC
*** Bug 224732 has been marked as a duplicate of this bug. ***
Comment 2 Sergey Petrov 2013-06-28 19:31:27 UTC
*** Bug 224732 has been marked as a duplicate of this bug. ***
Comment 3 Sergey Petrov 2013-07-01 11:56:23 UTC
it's better to fix after changes in hints api and also after implementation of better handling for access type, including access annotation recognition and mixed access type recognition.
Comment 4 Sergey Petrov 2013-12-26 14:13:04 UTC
http://hg.netbeans.org/web-main/rev/81206d80d4dd
Comment 5 Quality Engineering 2013-12-27 02:44:49 UTC
Integrated into 'main-silver', will be available in build *201312270002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/81206d80d4dd
User: Sergey B. Petrov <sj-nb@netbeans.org>
Log: #232006 do not show in case of property access