Diff of /cocoon/blocks/unsupported/template/trunk/java/org/apache/cocoon/template/jxtg/expression/JXTExpression.java
Parent Directory
| Revision Log
| Patch
--- cocoon/blocks/unsupported/template/trunk/java/org/apache/cocoon/template/jxtg/expression/JXTExpression.java 2005/05/06 21:48:39 168666
+++ cocoon/blocks/unsupported/template/trunk/java/org/apache/cocoon/template/jxtg/expression/JXTExpression.java 2005/05/06 21:52:29 168667
@@ -58,7 +58,7 @@ public class JXTExpression extends Subst
public static JXTExpression compileBoolean(String val, String msg,
Locator location) throws SAXException {
JXTExpression res = compileExpr(val, msg, location);
- if (res.getCompiledExpression() == null && res.getRaw() != null) {
+ if (res != null && res.getCompiledExpression() == null && res.getRaw() != null) {
res.setCompiledExpression(Boolean.valueOf(res.getRaw()));
}
return res;
@@ -71,7 +71,7 @@ public class JXTExpression extends Subst
public static JXTExpression compileInt(String val, String msg,
Locator location) throws SAXException {
JXTExpression res = compileExpr(val, msg, location);
- if (res.getCompiledExpression() == null && res.getRaw() != null) {
+ if (res != null && res.getCompiledExpression() == null && res.getRaw() != null) {
res.setCompiledExpression(Integer.valueOf(res.getRaw()));
}
return res;
@@ -80,7 +80,7 @@ public class JXTExpression extends Subst
public static JXTExpression compileExpr(String inStr) throws Exception {
try {
if (inStr == null) {
- return new JXTExpression(null, null);
+ return null;
}
StringReader in = new StringReader(inStr.trim());
int ch;
@@ -257,7 +257,7 @@ public class JXTExpression extends Subst
((Expression)this.compiledExpression).setProperty(JXPathExpression.LENIENT, lenient);
}
- private static final Iterator EMPTY_ITER = new Iterator() {
+ public static final Iterator EMPTY_ITER = new Iterator() {
public boolean hasNext() {
return false;
}
@@ -271,7 +271,7 @@ public class JXTExpression extends Subst
}
};
- private static final Iterator NULL_ITER = new Iterator() {
+ static public final Iterator NULL_ITER = new Iterator() {
public boolean hasNext() {
return true;
}