cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r124698 - in cocoon/branches/BRANCH_2_1_X/src: blocks/databases/java/org/apache/cocoon/acting/modular blocks/lucene/java/org/apache/cocoon/components/search java/org/apache/cocoon/components/modules/input java/org/apache/cocoon/components/modules/output java/org/apache/cocoon/components/treeprocessor java/org/apache/cocoon/util
Date Sun, 09 Jan 2005 01:57:14 GMT
Author: antonio
Date: Sat Jan  8 17:57:13 2005
New Revision: 124698

URL: http://svn.apache.org/viewcvs?view=rev&rev=124698
Log:
Use String.equals()
Modified:
   cocoon/branches/BRANCH_2_1_X/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseQueryAction.java
   cocoon/branches/BRANCH_2_1_X/src/blocks/lucene/java/org/apache/cocoon/components/search/SimpleLuceneCocoonIndexerImpl.java
   cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/LocateResource.java
   cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/output/RequestAttributeOutputModule.java
   cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/output/SessionAttributeOutputModule.java
   cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/ConcreteTreeProcessor.java
   cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/TraxErrorHandler.java

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseQueryAction.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseQueryAction.java?view=diff&rev=124698&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseQueryAction.java&r1=124697&p2=cocoon/branches/BRANCH_2_1_X/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseQueryAction.java&r2=124698
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseQueryAction.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/databases/java/org/apache/cocoon/acting/modular/DatabaseQueryAction.java
Sat Jan  8 17:57:13 2005
@@ -49,7 +49,7 @@
  *</pre>
  *
  * @author <a href="mailto:haul@apache.org">Christian Haul</a>
- * @version CVS $Id: DatabaseQueryAction.java,v 1.4 2004/03/05 13:01:52 bdelacretaz Exp $
+ * @version CVS $Id$
  */
 public class DatabaseQueryAction extends DatabaseAction {
 
@@ -175,10 +175,13 @@
                 for (int i = 1; i <= metadata.getColumnCount(); i++) {
                     Object value = resultset.getObject(i);
                     tableName = metadata.getTableName(i);
-                    columnName = metadata.getColumnLabel(i) + "["+rowIndex+"]";
-                    if (tableName != "") columnName = tableName + "." + columnName;
-                    if (this.getLogger().isDebugEnabled())
-                        this.getLogger().debug("retrieving "+columnName+" as "+value);
+                    columnName = metadata.getColumnLabel(i) + "[" + rowIndex + "]";
+                    if (!tableName.equals("")) {
+                        columnName = tableName + "." + columnName;
+                    }
+                    if (this.getLogger().isDebugEnabled()) {
+                        this.getLogger().debug("retrieving " + columnName + " as " + value);
+                    }
                     results.put(metadata.getTableName(i)+"."+metadata.getColumnLabel(i),value);
                 }
             }

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/lucene/java/org/apache/cocoon/components/search/SimpleLuceneCocoonIndexerImpl.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/lucene/java/org/apache/cocoon/components/search/SimpleLuceneCocoonIndexerImpl.java?view=diff&rev=124698&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/lucene/java/org/apache/cocoon/components/search/SimpleLuceneCocoonIndexerImpl.java&r1=124697&p2=cocoon/branches/BRANCH_2_1_X/src/blocks/lucene/java/org/apache/cocoon/components/search/SimpleLuceneCocoonIndexerImpl.java&r2=124698
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/lucene/java/org/apache/cocoon/components/search/SimpleLuceneCocoonIndexerImpl.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/lucene/java/org/apache/cocoon/components/search/SimpleLuceneCocoonIndexerImpl.java
Sat Jan  8 17:57:13 2005
@@ -48,7 +48,7 @@
  * </p>
  *
  * @author <a href="mailto:berni_huber@a1.net">Bernhard Huber</a>
- * @version CVS $Id: SimpleLuceneCocoonIndexerImpl.java,v 1.10 2004/03/05 13:01:59 bdelacretaz
Exp $
+ * @version CVS $Id$
  */
 public class SimpleLuceneCocoonIndexerImpl extends AbstractLogEnabled
          implements LuceneCocoonIndexer, Configurable, Serviceable, Disposable
@@ -264,7 +264,7 @@
          * @exception  IOException  Description of Exception
          */
         public void deleteAllStaleDocuments() throws IOException {
-            while (uidIter.term() != null && uidIter.term().field() == "uid") {
+            while (uidIter.term() != null && uidIter.term().field().equals("uid"))
{
                 reader.delete(uidIter.term());
                 uidIter.next();
             }

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/LocateResource.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/LocateResource.java?view=diff&rev=124698&p1=cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/LocateResource.java&r1=124697&p2=cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/LocateResource.java&r2=124698
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/LocateResource.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/LocateResource.java
Sat Jan  8 17:57:13 2005
@@ -171,7 +171,7 @@
         String urlstring = name;
         String filename = extractFilename(urlstring);
         int minLen = calculateMinLen(name);
-        if (filename != "") {
+        if (!filename.equals("")) {
             urlstring = shortenURI(urlstring, minLen);
         }
 
@@ -202,7 +202,7 @@
         String urlstring = name;
         String filename = extractFilename(urlstring);
         int minLen = calculateMinLen(name);
-        if (filename != "") {
+        if (!filename.equals("")) {
             urlstring = shortenURI(urlstring, minLen);
         }
 

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/output/RequestAttributeOutputModule.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/output/RequestAttributeOutputModule.java?view=diff&rev=124698&p1=cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/output/RequestAttributeOutputModule.java&r1=124697&p2=cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/output/RequestAttributeOutputModule.java&r2=124698
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/output/RequestAttributeOutputModule.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/output/RequestAttributeOutputModule.java
Sat Jan  8 17:57:13 2005
@@ -180,7 +180,7 @@
 
     protected String getName( String name ) {
         String prefix = (String) this.settings.get("key-prefix", PREFIX );
-        return (prefix == "" ? name : prefix+":"+name);
+        return (prefix.equals("") ? name : prefix + ":" + name);
     }
     
 }

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/output/SessionAttributeOutputModule.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/output/SessionAttributeOutputModule.java?view=diff&rev=124698&p1=cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/output/SessionAttributeOutputModule.java&r1=124697&p2=cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/output/SessionAttributeOutputModule.java&r2=124698
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/output/SessionAttributeOutputModule.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/output/SessionAttributeOutputModule.java
Sat Jan  8 17:57:13 2005
@@ -178,7 +178,7 @@
     
     protected String getName( String name ) {
         String prefix = (String) this.settings.get("key-prefix", PREFIX );
-        return (prefix == "" ? name : prefix+":"+name);
+        return (prefix.equals("") ? name : prefix+":"+name);
     }
 
 }

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/ConcreteTreeProcessor.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/ConcreteTreeProcessor.java?view=diff&rev=124698&p1=cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/ConcreteTreeProcessor.java&r1=124697&p2=cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/ConcreteTreeProcessor.java&r2=124698
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/ConcreteTreeProcessor.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/ConcreteTreeProcessor.java
Sat Jan  8 17:57:13 2005
@@ -291,7 +291,7 @@
         
         // Get the processor that should process this request
         ConcreteTreeProcessor processor;
-        if (newEnv.getRootContext() == newEnv.getContext()) {
+        if (newEnv.getRootContext().equals(newEnv.getContext())) {
             processor = ((TreeProcessor)getRootProcessor()).concreteProcessor;
         } else {
             processor = this;

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/TraxErrorHandler.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/TraxErrorHandler.java?view=diff&rev=124698&p1=cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/TraxErrorHandler.java&r1=124697&p2=cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/TraxErrorHandler.java&r2=124698
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/TraxErrorHandler.java	(original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/TraxErrorHandler.java	Sat
Jan  8 17:57:13 2005
@@ -27,7 +27,7 @@
  * Warnings and errors are ignored.
  *
  * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
- * @version CVS $Id: TraxErrorHandler.java,v 1.2 2004/03/05 13:03:00 bdelacretaz Exp $
+ * @version CVS $Id$
  */
 public class TraxErrorHandler implements ErrorListener {
 
@@ -89,7 +89,7 @@
 
         SourceLocator locator = exception.getLocator();
         if ( null != locator ) {
-            String id = ( locator.getPublicId() != locator.getPublicId() )
+            String id = ( !locator.getPublicId().equals(locator.getPublicId()))
                     ? locator.getPublicId()
                     : ( null != locator.getSystemId() )
                     ? locator.getSystemId() : "SystemId Unknown";

Mime
View raw message