...
The webDigester is also marked final. This prevents any subclasses from assigning a new object reference to webDigester. (See OBJ10-J. Do not use public static non-final variables for more information.) It also prevents a race condition where another thread could access webDigester before it is fully initialized. (See OBJ11-J. Prevent access to partially initialized objectsBe wary of letting constructors throw exceptions for more information.)
| Code Block | ||
|---|---|---|
| ||
protected static final Digester webDigester = init();
protected Digester init() {
Digester digester = createWebDigester();
digester.getParser(); // Does not use the context Classloader at initialization, so safe
return digester;
}
|
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="e8bb2e4998baf8ee-87ec33ee-4ba24a58-8782b2e6-3b184e25be90e87d9aef9450"><ac:plain-text-body><![CDATA[ | [[CVE 2008 | AA. Bibliography#CVE 08]] | [CVE-2009-0783 | http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0783] | ]]></ac:plain-text-body></ac:structured-macro> | |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="fb065d38269e3493-dbdc4c40-45b9470d-b84badc8-4a4aecae61ee41a90babbf1d"><ac:plain-text-body><![CDATA[ | [[Gong 2003 | AA. Bibliography#Gong 03]] | Section 4.3.2, Class Loader Delegation Hierarchy | ]]></ac:plain-text-body></ac:structured-macro> | ||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="1badbc8d46df14dd-18c03a63-4801493e-a42689dc-48929aa55c4f3c3fc8bcfabd"><ac:plain-text-body><![CDATA[ | [[JLS 2005 | AA. Bibliography#JLS 05]] | §4.3.2, "The Class | ]]></ac:plain-text-body></ac:structured-macro> | ||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="0875adf190651da1-0822564b-4a0e472a-a091b910-5cf49b6422c51e4c698a4d26"><ac:plain-text-body><![CDATA[ | [[Tomcat 2009 | AA. Bibliography#Tomcat 09]] | [Bug ID 29936 | https://issues.apache.org/bugzilla/show_bug.cgi?id=29936], API Class | http://tomcat.apache.org/security-6.html] | ]]></ac:plain-text-body></ac:structured-macro> |
...