vgritsenko 2003/12/21 17:35:10
Modified: java/src/org/apache/xindice/core/query
XPathQueryResolver.java
Log:
Rename static finals to UPPERCASE. Remove unused variable.
Revision Changes Path
1.25 +13 -14
xml-xindice/java/src/org/apache/xindice/core/query/XPathQueryResolver.java
Index: XPathQueryResolver.java
===================================================================
RCS file:
/home/cvs/xml-xindice/java/src/org/apache/xindice/core/query/XPathQueryResolver.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- XPathQueryResolver.java 6 Dec 2003 22:44:36 -0000 1.24
+++ XPathQueryResolver.java 22 Dec 2003 01:35:10 -0000 1.25
@@ -126,11 +126,10 @@
*/
public final class XPathQueryResolver extends SimpleConfigurable implements
QueryResolver
{
-
private static final Log log =
LogFactory.getLog(XPathQueryResolver.class);
- private static final Key[] EmptyKeys = new Key[0];
- private static final Key[][] EmptyKeySet = new Key[0][0];
+ private static final Key[] EMPTY_KEYS = new Key[0];
+ private static final Key[][] EMPTY_KEYSET = new Key[0][0];
private static final String WILDCARD = "*";
// private static final String THISNODE = ".";
// private static final String PARENTNODE = "..";
@@ -140,14 +139,14 @@
public static final String STYLE_XPATH = "XPath";
// Maps Xalan Comparisons To IndexQuery
- private static final int[] OpMap =
- { IndexQuery.NEQ, IndexQuery.EQ, IndexQuery.LEQ, IndexQuery.LT,
IndexQuery.GEQ, IndexQuery.GT };
+ private static final int[] OpMap = {
+ IndexQuery.NEQ, IndexQuery.EQ, IndexQuery.LEQ, IndexQuery.LT,
IndexQuery.GEQ, IndexQuery.GT
+ };
- // TODO this variable is never accessed
- private QueryEngine engine;
private DefaultErrorHandler errorListener = new DefaultErrorHandler();
private boolean autoIndex = false;
+
public void setConfig(Configuration config) throws XindiceException
{
super.setConfig(config);
@@ -161,7 +160,7 @@
public void setQueryEngine(QueryEngine engine)
{
- this.engine = engine;
+ // Not used: this.engine = engine;
}
public Query compileQuery(Collection context, String query,
NamespaceMap nsMap, Key[] keys) throws QueryException
@@ -288,7 +287,7 @@
{
set.add(rs.getNextKey());
}
- keySet = (Key[]) set.toArray(EmptyKeys);
+ keySet = (Key[])
set.toArray(EMPTY_KEYS);
}
return new ResultSet(context, pr, keySet,
query);
@@ -309,7 +308,7 @@
{
if (list.size() > 1)
{
- Key[][] keys = (Key[][])
list.toArray(EmptyKeySet);
+ Key[][] keys = (Key[][])
list.toArray(EMPTY_KEYSET);
return QueryEngine.andKeySets(keys);
}
else
@@ -496,7 +495,7 @@
{
set.add(rs.getNextKey());
}
- ks.add((Key[])
set.toArray(EmptyKeys));
+
ks.add(set.toArray(EMPTY_KEYS));
}
else
{
@@ -1538,7 +1537,7 @@
}
}
- /* this only implements what we need internally */
+ /* This only implements what we need internally */
private static class EmptyNodeIterator implements NodeIterator
{