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 109297 - Why forbidden package
Summary: Why forbidden package
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker with 1 vote (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-10 22:56 UTC by ulfzibis
Modified: 2013-09-02 14:24 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Warning: Forbidden Package (29.18 KB, image/jpeg)
2007-07-10 22:58 UTC, ulfzibis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ulfzibis 2007-07-10 22:56:57 UTC
If I remove import an compile error occurs.

See attachment.
Comment 1 ulfzibis 2007-07-10 22:58:21 UTC
Created attachment 44909 [details]
Warning: Forbidden Package
Comment 2 Jiri Prox 2007-07-11 09:01:32 UTC
I cannot see anything wrong. The forbidden package warning (it's only warning, the code is compilable) is shown since in
most cases it's not good to import form sun.* package because of compatibility with other vendors JDKs. If it's intended
you can customize this hint in options dialog: either disable hint at all or set different pattern for forbidden packages.

Comment 3 ulfzibis 2007-07-11 12:12:34 UTC
I change this to 'ENHANCEMENT'.

Please change the message to something like: "Sun proprietary API and may be removed in a future release".
The message should correspond to the compiler's message. "Forbidden" is too rigorous.

> If it's intended you can customize this hint in options dialog: ...
IMHO this customization is more useful on project's scope.
In my case it's annoying because I'm fixing bugs in sun.jdbc.odbc.** (See: https://jdbc-odbc-enhanced.dev.java.net/),
but in other project's I would respect this hint. Above all it's determined to all sun.** packages.

Which patterns are allowed? Can I define something like: "sun.**; -sun.jdbc.odbc.**;"