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 79496 - Logger.global is to be deprecated
Summary: Logger.global is to be deprecated
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-30 14:37 UTC by Jesse Glick
Modified: 2006-10-23 16:39 UTC (History)
1 user (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 Jesse Glick 2006-06-30 14:37:28 UTC
annotate-to-initcause.rules makes new code use Logger.global heavily. But this
field is deprecated in JDK 6 so we should not be introducing it into our code.
Should come up with some safer alternative. IMHO
Logger.getLogger(ThisClass.class.getName()) is generally a better choice as it
makes it easier to adjust logging per component. Unfortunately Jackpot's rule
language is I think too weak to make such a change (possible in a native rule).

Marking P2 since we should resolve this before recommending to other teams to
undergo automated conversion.

Also logging.html is affected.
Comment 1 Jaroslav Tulach 2006-07-03 08:36:01 UTC
I reported this problem as a JDK bug 
http://bt2ws.central.sun.com/CrPrint?id=6442043
they told me to use Logger.getLogger("global"). I told them to improve 
javadoc.

So updating the rule file to produce Logger.getLogger("global"):

IDE: [3.7.06 9:27] Committing started
Checking in 
test/unit/src/org/netbeans/modules/apisupport/jackpotrules/ErrorManagerTest.java;
/shared/data/ccvs/repository/apisupport/jackpotrules/test/unit/src/org/netbeans/modules/apisupport/jackpotrules/ErrorManagerTest.java,v  
<--  ErrorManagerTest.java
new revision: 1.6; previous revision: 1.5
done
Checking in manifest.mf;
/shared/data/ccvs/repository/apisupport/jackpotrules/manifest.mf,v  <--  
manifest.mf
new revision: 1.4; previous revision: 1.3
done
Checking in 
src/org/netbeans/modules/apisupport/jackpotrules/annotate-to-initcause.rules;
/shared/data/ccvs/repository/apisupport/jackpotrules/src/org/netbeans/modules/apisupport/jackpotrules/annotate-to-initcause.rules,v  
<--  annotate-to-initcause.rules
new revision: 1.5; previous revision: 1.4