forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r687696 - /forrest/branches/update_cocoon_2.1.12-dev/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java
Date Thu, 21 Aug 2008 10:28:45 GMT
Author: thorsten
Date: Thu Aug 21 03:28:43 2008
New Revision: 687696

URL: http://svn.apache.org/viewvc?rev=687696&view=rev
Log:
Using logical and

Modified:
    forrest/branches/update_cocoon_2.1.12-dev/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java

Modified: forrest/branches/update_cocoon_2.1.12-dev/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java
URL: http://svn.apache.org/viewvc/forrest/branches/update_cocoon_2.1.12-dev/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java?rev=687696&r1=687695&r2=687696&view=diff
==============================================================================
--- forrest/branches/update_cocoon_2.1.12-dev/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java
(original)
+++ forrest/branches/update_cocoon_2.1.12-dev/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/transformation/DispatcherTransformer.java
Thu Aug 21 03:28:43 2008
@@ -246,7 +246,7 @@
     // You can either request URL?dispatcher.caching=off
     // or add this property to forrest.properties.xml
     // to force a SourceValidity.INVALID
-    if (null != validityFile & !(validityOverride.equals(CACHING_OFF))) {
+    if (null != validityFile && !(validityOverride.equals(CACHING_OFF))) {
       this.validity = new AggregatedValidity();
       Source resolveSource=null;
       try {
@@ -298,7 +298,7 @@
   public void recycle() {
     localRecycle();
     this.validity = null;
-    //super.recycle();
+    super.recycle();
 
   }
 
@@ -368,7 +368,7 @@
       throws SAXException {
     // Process start element event
     // Are we inside of properties? If so we need to record the elements.
-    if (this.insideProperties & this.includeNodes) {
+    if (this.insideProperties && this.includeNodes) {
       try {
         this.builder.startElement(uri, name, raw, attr);
       } catch (SAXException e) {
@@ -389,19 +389,19 @@
       }
       if (STRUCTURER_ELEMENT.equals(name))
         structurerProcessingStart(attr);
-      else if (DISPATCHER_HOOK_ELEMENT.equals(name) & this.includeNodes)
+      else if (DISPATCHER_HOOK_ELEMENT.equals(name) && this.includeNodes)
         hookProcessingStart(name, raw, attr);
-      else if (ContractBean.CONTRACT_ELEMENT.equals(name) & this.includeNodes)
+      else if (ContractBean.CONTRACT_ELEMENT.equals(name) && this.includeNodes)
         contractProcessingStart(attr);
-      else if (ContractBean.PROPERTY_ELEMENT.equals(name) & this.includeNodes) {
+      else if (ContractBean.PROPERTY_ELEMENT.equals(name) && this.includeNodes) {
         this.insideProperties = true;
         propertyProcessingStart(uri, name, raw, attr);
       }
     } else {
-      if (!this.insideProperties & this.includeNodes & this.insideStructurer
-          & this.allowMarkup)
+      if (!this.insideProperties && this.includeNodes && this.insideStructurer
+          && this.allowMarkup)
         super.startElement(uri, name, raw, attr);
-      if (!this.insideProperties & this.includeNodes & !this.insideStructurer)
+      if (!this.insideProperties && this.includeNodes && !this.insideStructurer)
         super.startElement(uri, name, raw, attr);
     }
   }
@@ -490,18 +490,18 @@
     } else if (DispatcherHelper.DISPATCHER_NAMESPACE_URI.equals(uri)) {
       if (STRUCTURER_ELEMENT.equals(name))
         structurerProcessingEnd(raw);
-      else if (ContractBean.CONTRACT_ELEMENT.equals(name) & this.includeNodes)
+      else if (ContractBean.CONTRACT_ELEMENT.equals(name) && this.includeNodes)
         contractProcessingEnd();
-      else if (DISPATCHER_HOOK_ELEMENT.equals(name) & this.includeNodes)
+      else if (DISPATCHER_HOOK_ELEMENT.equals(name) && this.includeNodes)
         if (path.lastIndexOf("/") > -1)
           path = path.substring(0, path.lastIndexOf("/"));
         else
           path = null;
     } else {
-      if (!this.insideProperties & this.includeNodes & this.insideStructurer
-          & this.allowMarkup)
+      if (!this.insideProperties && this.includeNodes && this.insideStructurer
+          && this.allowMarkup)
         super.endElement(uri, name, raw);
-      if (!this.insideProperties & this.includeNodes & !this.insideStructurer)
+      if (!this.insideProperties && this.includeNodes && !this.insideStructurer)
         super.endElement(uri, name, raw);
     }
   }
@@ -522,10 +522,10 @@
         currentFormat = value;
       }
       if (localName.equals(STRUCTURER_HOOK_XPATH_ATTRIBUTE)) {
-        if ("/".equals(String.valueOf(value.charAt(0))) & value.length() != 1) {
+        if ("/".equals(String.valueOf(value.charAt(0))) && value.length() != 1) {
           path = "result" + value;
         } else if ("/".equals(String.valueOf(value.charAt(0)))
-            & value.length() == 1) {
+            && value.length() == 1) {
           path = "result";
         } else {
           path = "result/" + value;
@@ -679,7 +679,7 @@
           // Adding the contract to the validity object.
           // As soon the contract changes we want a rebuild of
           // the page and not the cached object.
-          if (!validityOverride.equals(CACHING_OFF) & null != this.validity) {
+          if (!validityOverride.equals(CACHING_OFF) && null != this.validity) {
             contractSource = m_resolver.resolveURI(contractUri);
             SourceValidity contractValidityId = contractSource
                 .getValidity();
@@ -717,7 +717,7 @@
           // Adding the raw data to the validity object.
           // As soon the raw data changes we want a rebuild of
           // the page and not the cached object.
-          if (!validityOverride.equals(CACHING_OFF) & null != this.validity) {
+          if (!validityOverride.equals(CACHING_OFF) && null != this.validity) {
             contractRawSource = m_resolver.resolveURI(value);
             SourceValidity contractValidityRaw = contractRawSource
                 .getValidity();
@@ -931,23 +931,23 @@
   }
 
   public void characters(char c[], int start, int len) throws SAXException {
-    if (this.insideProperties & this.includeNodes)
+    if (this.insideProperties && this.includeNodes)
       this.builder.characters(c, start, len);
-    else if (!this.insideProperties & this.includeNodes & !this.insideStructurer)
+    else if (!this.insideProperties && this.includeNodes && !this.insideStructurer)
       super.contentHandler.characters(c, start, len);
   }
 
   public void startCDATA() throws SAXException {
-    if (this.insideProperties & this.includeNodes)
+    if (this.insideProperties && this.includeNodes)
       this.builder.startCDATA();
-    else if (!this.insideProperties & this.includeNodes & !this.insideStructurer)
+    else if (!this.insideProperties && this.includeNodes && !this.insideStructurer)
       super.lexicalHandler.startCDATA();
   }
 
   public void endCDATA() throws SAXException {
-    if (this.insideProperties & this.includeNodes)
+    if (this.insideProperties && this.includeNodes)
       this.builder.endCDATA();
-    else if (!this.insideProperties & this.includeNodes & !this.insideStructurer)
+    else if (!this.insideProperties && this.includeNodes && !this.insideStructurer)
       super.lexicalHandler.endCDATA();
   }
 
@@ -955,7 +955,7 @@
 
   public void startPrefixMapping(String prefix, String uri) throws SAXException {
     super.startPrefixMapping(prefix, uri);
-    if (this.insideProperties & this.includeNodes) {
+    if (this.insideProperties && this.includeNodes) {
       this.builder.startPrefixMapping(prefix, uri);
     } else {
       storePrefixMapping(prefix, uri);



Mime
View raw message