You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by mu...@apache.org on 2006/06/02 21:52:02 UTC
svn commit: r411276 -
/xml/security/trunk/src/org/apache/xml/security/utils/CachedXPathAPIHolder.java
Author: mullan
Date: Fri Jun 2 12:52:02 2006
New Revision: 411276
URL: http://svn.apache.org/viewvc?rev=411276&view=rev
Log:
Fix findbugs bug:
Unread field: CachedXPathAPIHolder.log
Modified:
xml/security/trunk/src/org/apache/xml/security/utils/CachedXPathAPIHolder.java
Modified: xml/security/trunk/src/org/apache/xml/security/utils/CachedXPathAPIHolder.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/utils/CachedXPathAPIHolder.java?rev=411276&r1=411275&r2=411276&view=diff
==============================================================================
--- xml/security/trunk/src/org/apache/xml/security/utils/CachedXPathAPIHolder.java (original)
+++ xml/security/trunk/src/org/apache/xml/security/utils/CachedXPathAPIHolder.java Fri Jun 2 12:52:02 2006
@@ -19,35 +19,33 @@
import org.apache.xpath.CachedXPathAPI;
import org.w3c.dom.Document;
-
/**
* @author Raul Benito
*/
public class CachedXPathAPIHolder {
- static org.apache.commons.logging.Log log =
- org.apache.commons.logging.LogFactory.getLog(CachedXPathAPIHolder.class.getName());
static ThreadLocal local=new ThreadLocal();
static ThreadLocal localDoc=new ThreadLocal();
- /**
- * Sets the doc for the xpath transformation. Resets the cache if needed
- * @param doc
- */
- public static void setDoc(Document doc) {
- if (localDoc.get()!=doc) {
+ /**
+ * Sets the doc for the xpath transformation. Resets the cache if needed
+ * @param doc
+ */
+ public static void setDoc(Document doc) {
+ if (localDoc.get()!=doc) {
CachedXPathAPI cx=(CachedXPathAPI)local.get();
if (cx==null) {
- cx=new CachedXPathAPI();
- local.set(cx);
- localDoc.set(doc);
- return;
+ cx=new CachedXPathAPI();
+ local.set(cx);
+ localDoc.set(doc);
+ return;
}
//Different docs reset.
cx.getXPathContext().reset();
localDoc.set(doc);
}
- }
+ }
+
/**
* @return the cachexpathapi for this thread
*/