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 97224 - Selective turning on/off warnings
Summary: Selective turning on/off warnings
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker with 3 votes (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-05 18:47 UTC by _ viendu
Modified: 2013-09-02 14:20 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ viendu 2007-03-05 18:47:55 UTC
When I compile codes with:
com.sun.rowset.CachedRowSetImpl

I got a warning.  I understand that it is not recommended to use this.  However,
I have to work with such code.  So I want to turn off the warnings (there are
too many of them).  Using one of the following directive, or combination or all
of them didn't turn off the warning messages:

-nowarn -Xlint:none -Xmaxwarns 1

Thanks Ankit Singla on the nbusers mailing list, the following is also a very
good improvement suggestion:

"You can control not only whether or not to show warnings/errors, but also which
types of warnings and errors to show, which is really nice. I definitely think
that that should be integrated into Netbeans."

Developers must be able to turn off warnings that are not of important to them
because it is very hard to see other errors and relevant warnings to them at
some particular point of development.
Comment 1 _ viendu 2007-03-05 18:49:09 UTC
The Java version I use is:

Java HotSpot(TM) Client VM (build 1.6.0-rc-b104, mixed mode, sharing)
Comment 2 anksingla 2007-03-05 22:37:47 UTC
"You can control not only whether or not to show warnings/errors, but also which
types of warnings and errors to show, which is really nice. I definitely think
that that should be integrated into Netbeans."

That option is changeable in eclipse.
Comment 3 Jan Lahoda 2007-03-22 16:12:43 UTC
Hi,
    I would like to differentiate between two cases:
-errors/warnings provided by the build of the project: as the build is performed
by ant+javac, NetBeans cannot do much about these error/warnings (NetBeans only
sets javac command line parameters). AFAIK the "proprietary" javac warning
cannot be disabled through a command line option, but the NetBeans IDE cannot do
anything about this, sorry.
-warnings shown in the editor - yes, plan to do something about this. Exact
details are still unknown, though. See also issue #76702.
Comment 4 _ viendu 2007-03-23 17:46:00 UTC
Thanks for the clarification jlahoda.  I still think it's possible to get this
to work.  One simple way is by passing the output from the ant/javac to a filter
input stream.  A more elaborate way is to store the text and do some filter on
it.  It can be configured to store the last 10000 lines or something like that.
 The hard part is parsing the text and filter out the right stuff.  A perfect
solution may not be achievable until the Javac tool is improved, or whatever
related is improved for the IDE and the compilers to talk to each other more
effectively (obviously Eclipse has done this).  I think perfection aside, an
acceptable solution can be done in this.
Comment 5 ahe 2007-03-23 18:07:52 UTC
I don't know if you have run in to this bug:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6476749

If not, then this is a class you should not use and if you
feel otherwise, you should report a bug against the JDK,
not NetBeans.  The proprietary warnings are very deliberately
annoying.  We could not hide the packages from you for
reasons of compatibility but we may do so in a future release.

You can turn all other warnings on or off but the only way to
turn this one off is by not using the code.  However, there is
one other alternative: the JDK is open sourced very soon now and
you can make a copy of the classes and convert then into your own
library.

Please close this as wontfix and refer all future request about
proprietary warnings to the JDK.
Comment 6 unr303 2008-03-07 07:30:41 UTC
isnt this done already?