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 232208 - Entity and Embeddable classes could be defined as non public top-level
Summary: Entity and Embeddable classes could be defined as non public top-level
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 7.3.1
Hardware: All All
: P3 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-03 14:11 UTC by Michel Graciano
Modified: 2013-07-04 02:23 UTC (History)
3 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-07-03 14:11:41 UTC
If I have a non public top-level class defined in a class file and I annotate this class with @Embeddable or @Entity the IDE tells me that it is incorrect. I can't find any reference in the JPA 2.0 specification about that it must be public and I tested it with Eclipselink and worked fine so far.
Comment 1 Sergey Petrov 2013-07-03 14:44:42 UTC
I can't find this requirement too.
Comment 2 Sergey Petrov 2013-07-03 15:20:51 UTC
fix 9f1311910b91.
will remove this error hint.

on other side I see no code samples with not public classes neither in specification nor with quick internet search.
Comment 3 Michel Graciano 2013-07-03 16:30:33 UTC
Yes, I can't see yet a useful scenario but since it is not mandatory by the spec it is worth to fix it. For the record, I was just doing some experimentation with some domain models and I haven't removed some annotations from classes I have pasted and it was when I saw the issue for the first time.
Comment 4 Quality Engineering 2013-07-04 02:23:35 UTC
Integrated into 'main-silver', will be available in build *201307032300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/9f1311910b91
User: Sergey B. Petrov <sj-nb@netbeans.org>
Log: #232208 remove error hint from entity/embeddable/mappedsuprclass