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 177236

Summary: Final class: exporting non-public type through public API
Product: java Reporter: pindatjuh <pindatjuh>
Component: HintsAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal Keywords: USABILITY
Priority: P4    
Version: -S1S-   
Hardware: PC   
OS: Windows Vista   
Issue Type: ENHANCEMENT Exception Reporter:

Description pindatjuh 2009-11-19 12:25:14 UTC
I have a ("protected" and final) class X in some package and a (public and final) class Y in the same package. The problem is a faulty hint in class Y when defining a protected field using class X.

Though, it seems logical to me, a final class can't be extended: the protected field never gets accessed by any class outside the current package. Hence, I am >not exporting< a non-public type.

The problem is not severe, it just bothers me when programming.
Product Version: NetBeans IDE 6.7 (Build 200906241340)
Java: 1.6.0_13; Java HotSpot(TM) Client VM 11.3-b02
System: Windows Vista version 6.0 running on x86; Cp1252; nl_NL (nb)
Userdir: C:\Users\[my username]\.netbeans\6.7

// file X.java
...
final class X {
...

// file Y.java
...
public final class Y {
...
protected final X someVar;
// An error hint: "Exporting non-public type through public API." is displayed.
...



Thank you.