You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by gn...@apache.org on 2007/03/23 16:14:36 UTC
svn commit: r521758 - in
/incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler:
SourceLoacatorWrapper.java SourceLocatorWrapper.java
XslCompilationErrorListener.java
Author: gnodet
Date: Fri Mar 23 08:14:36 2007
New Revision: 521758
URL: http://svn.apache.org/viewvc?view=rev&rev=521758
Log:
- Fix possible NPE when compiling stylesheets
- Fix typo: rename SourceLoacatorWrapper to SourceLocatorWrapper
Added:
incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/SourceLocatorWrapper.java
- copied, changed from r521755, incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/SourceLoacatorWrapper.java
Removed:
incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/SourceLoacatorWrapper.java
Modified:
incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XslCompilationErrorListener.java
Copied: incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/SourceLocatorWrapper.java (from r521755, incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/SourceLoacatorWrapper.java)
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/SourceLocatorWrapper.java?view=diff&rev=521758&p1=incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/SourceLoacatorWrapper.java&r1=521755&p2=incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/SourceLocatorWrapper.java&r2=521758
==============================================================================
--- incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/SourceLoacatorWrapper.java (original)
+++ incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/SourceLocatorWrapper.java Fri Mar 23 08:14:36 2007
@@ -7,11 +7,11 @@
import org.apache.ode.bpel.compiler.api.SourceLocation;
-public class SourceLoacatorWrapper implements SourceLocation {
+public class SourceLocatorWrapper implements SourceLocation {
private SourceLocator _sloc;
- public SourceLoacatorWrapper(SourceLocator sloc) {
+ public SourceLocatorWrapper(SourceLocator sloc) {
_sloc = sloc;
}
Modified: incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XslCompilationErrorListener.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XslCompilationErrorListener.java?view=diff&rev=521758&r1=521757&r2=521758
==============================================================================
--- incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XslCompilationErrorListener.java (original)
+++ incubator/ode/trunk/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xpath10/compiler/XslCompilationErrorListener.java Fri Mar 23 08:14:36 2007
@@ -24,6 +24,7 @@
import org.apache.ode.bpel.compiler.api.CompilationException;
import org.apache.ode.bpel.compiler.api.CompilationMessage;
import org.apache.ode.bpel.compiler.api.CompilerContext;
+import org.apache.ode.bpel.compiler.api.SourceLocation;
import org.apache.ode.utils.xsl.XslTransformHandler;
import javax.xml.transform.ErrorListener;
@@ -76,6 +77,7 @@
cmsg.phase = 0;
cmsg.messageText = exception.getMessageAndLocation();
CompilationException ce = new CompilationException(cmsg, exception);
- _cc.recoveredFromError(new SourceLoacatorWrapper(exception.getLocator()),ce);
+ SourceLocation loc = exception.getLocator() != null ? new SourceLocatorWrapper(exception.getLocator()) : null;
+ _cc.recoveredFromError(loc,ce);
}
}