You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by dm...@apache.org on 2003/09/08 22:50:45 UTC

cvs commit: jakarta-commons/jxpath/src/java/org/apache/commons/jxpath JXPathContext.java

dmitri      2003/09/08 13:50:45

  Modified:    jxpath/src/java/org/apache/commons/jxpath/ri
                        JXPathContextReferenceImpl.java
               jxpath/src/java/org/apache/commons/jxpath JXPathContext.java
  Log:
  Fixed bug 22988
  
  Revision  Changes    Path
  1.34      +7 -7      jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java
  
  Index: JXPathContextReferenceImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- JXPathContextReferenceImpl.java	24 Aug 2003 01:52:09 -0000	1.33
  +++ JXPathContextReferenceImpl.java	8 Sep 2003 20:50:44 -0000	1.34
  @@ -294,13 +294,13 @@
           if (result instanceof EvalContext) {
               EvalContext ctx = (EvalContext) result;
               result = ctx.getSingleNodePointer();
  -            if (!lenient && result == null) {
  +            if (!isLenient() && result == null) {
                   throw new JXPathException("No value for xpath: " + xpath);
               }
           }
           if (result instanceof NodePointer) {
               result = ((NodePointer) result).getValuePointer();
  -            if (!lenient && !((NodePointer) result).isActual()) {
  +            if (!isLenient() && !((NodePointer) result).isActual()) {
                   // We need to differentiate between pointers representing
                   // a non-existing property and ones representing a property
                   // whose value is null.  In the latter case, the pointer
  @@ -368,7 +368,7 @@
               result = ((EvalContext) result).getSingleNodePointer();
           }
           if (result instanceof Pointer) {
  -            if (!lenient && !((NodePointer) result).isActual()) {
  +            if (!isLenient() && !((NodePointer) result).isActual()) {
                   throw new JXPathException("No pointer for xpath: " + xpath);
               }
               return (Pointer) result;
  
  
  
  1.18      +7 -7      jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/JXPathContext.java
  
  Index: JXPathContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/JXPathContext.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- JXPathContext.java	4 May 2003 23:51:59 -0000	1.17
  +++ JXPathContext.java	8 Sep 2003 20:50:44 -0000	1.18
  @@ -426,9 +426,9 @@
       protected Variables vars;
       protected Functions functions;
       protected AbstractFactory factory;
  -    protected Locale locale;
  -    protected boolean lenientSet = false;
  -    protected boolean lenient = false;
  +    private Locale locale;
  +    private boolean lenientSet = false;
  +    private boolean lenient = false;
       protected IdentityManager idManager;
       protected KeyManager keyManager;
       protected HashMap decimalFormats;