cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r360378 - in /cocoon/branches/BRANCH_2_1_X/src: blocks/databases/java/org/apache/cocoon/acting/ blocks/jms/java/org/apache/cocoon/samples/jms/ blocks/lucene/java/org/apache/cocoon/generation/ blocks/mail/java/org/apache/cocoon/mail/ blocks/...
Date Sat, 31 Dec 2005 18:11:10 GMT
Author: antonio
Date: Sat Dec 31 10:10:07 2005
New Revision: 360378

URL: http://svn.apache.org/viewcvs?rev=360378&view=rev
Log:
Use String.length() == 0 instead of String.equals("")

Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/databases/java/org/apache/cocoon/acting/DatabaseCookieAuthenticatorAction.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/jms/java/org/apache/cocoon/samples/jms/JMSTrigger.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/lucene/java/org/apache/cocoon/generation/SearchGenerator.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/mail/java/org/apache/cocoon/mail/MailMessageSender.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/mail/java/org/apache/cocoon/mail/MimeMessageUtil.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/AbstractElementProcessorFactory.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPCols.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPRows.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components/PortalManagerImpl.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/context/SessionContextImpl.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/generation/ConfigurationGenerator.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portlet/multipart/RequestFactory.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/datatype/convertor/FormattingDateConvertorBuilder.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/datatype/convertor/FormattingDecimalConvertorBuilder.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/datatype/convertor/FormattingFloatConvertorBuilder.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/datatype/typeimpl/AbstractDatatypeBuilder.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/AbstractContainerWidget.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/transformation/EffectWidgetReplacingPipe.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/transformation/WidgetReplacingPipe.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/util/DomHelper.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/SOAPHelper.java
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/Main.java
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/ProjectPathModule.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/i18n/XMLResourceBundleFactory.java
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/servlet/multipart/RequestFactory.java
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/sitemap/ContentAggregator.java
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/FilterTransformer.java
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/SimpleFormTransformer.java
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/SourceWritingTransformer.java
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/XIncludeTransformer.java
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/MIMEUtils.java
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/dom/DOMStreamer.java
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/xlink/ExtendedXLinkPipe.java

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/databases/java/org/apache/cocoon/acting/DatabaseCookieAuthenticatorAction.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/databases/java/org/apache/cocoon/acting/DatabaseCookieAuthenticatorAction.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/databases/java/org/apache/cocoon/acting/DatabaseCookieAuthenticatorAction.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/databases/java/org/apache/cocoon/acting/DatabaseCookieAuthenticatorAction.java Sat Dec 31 10:10:07 2005
@@ -267,7 +267,7 @@
                  */
                 cookie_value = getCookie(objectModel, cookie_name).getValue();
 
-                if (cookie_value == null || cookie_value.trim().equals("")) {
+                if (cookie_value == null || cookie_value.trim().length() == 0) {
                     // value is null
                     if (!nullable) {
                         if (getLogger().isDebugEnabled()) {

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/jms/java/org/apache/cocoon/samples/jms/JMSTrigger.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/jms/java/org/apache/cocoon/samples/jms/JMSTrigger.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/jms/java/org/apache/cocoon/samples/jms/JMSTrigger.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/jms/java/org/apache/cocoon/samples/jms/JMSTrigger.java Sat Dec 31 10:10:07 2005
@@ -80,7 +80,7 @@
 
         properties.put(Context.INITIAL_CONTEXT_FACTORY, this.contextFactoryName);
 
-        if (this.port.equals("")) {
+        if (this.port.length() == 0) {
             if (scheme.equals("tcp") || scheme.equals("tcps")) {
                 port = "3035";
             } else if (scheme.equals("http")) {

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/lucene/java/org/apache/cocoon/generation/SearchGenerator.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/lucene/java/org/apache/cocoon/generation/SearchGenerator.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/lucene/java/org/apache/cocoon/generation/SearchGenerator.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/lucene/java/org/apache/cocoon/generation/SearchGenerator.java Sat Dec 31 10:10:07 2005
@@ -451,7 +451,7 @@
         queryString = par.getParameter(QUERY_PARAM, "");
 
         // try getting the queryString from the request params
-        if (queryString.equals("")) {
+        if (queryString.length() == 0) {
             param_name = par.getParameter(QUERY_STRING_PARAM, QUERY_STRING_PARAM_DEFAULT);
             if (request.getParameter(param_name) != null) {
                 queryString = request.getParameter(param_name);

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/mail/java/org/apache/cocoon/mail/MailMessageSender.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/mail/java/org/apache/cocoon/mail/MailMessageSender.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/mail/java/org/apache/cocoon/mail/MailMessageSender.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/mail/java/org/apache/cocoon/mail/MailMessageSender.java Sat Dec 31 10:10:07 2005
@@ -226,13 +226,13 @@
 
     private void initSession() {
         Properties properties = new Properties();
-        if (smtpHost == null || smtpHost.equals("") || smtpHost.equals("null")) {
+        if (smtpHost == null || smtpHost.length() == 0 || smtpHost.equals("null")) {
             properties.put("mail.smtp.host", "127.0.0.1");
         } else {
             properties.put("mail.smtp.host", smtpHost);
         }
 
-        if (smtpUser == null || smtpUser.equals("") || smtpUser.equals("null")) {
+        if (smtpUser == null || smtpUser.length() == 0 || smtpUser.equals("null")) {
             this.session = Session.getInstance(properties);
         } else {
             properties.put("mail.smtp.auth", "true");

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/mail/java/org/apache/cocoon/mail/MimeMessageUtil.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/mail/java/org/apache/cocoon/mail/MimeMessageUtil.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/mail/java/org/apache/cocoon/mail/MimeMessageUtil.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/mail/java/org/apache/cocoon/mail/MimeMessageUtil.java Sat Dec 31 10:10:07 2005
@@ -32,7 +32,7 @@
  *
  * @author Bernhard Huber
  * @since 26. Oktober 2002
- * @version CVS $Id: MimeMessageUtil.java,v 1.5 2004/03/05 13:02:00 bdelacretaz Exp $
+ * @version CVS $Id$
  */
 public class MimeMessageUtil {
     /**
@@ -69,7 +69,7 @@
         } catch (MessagingException e) {
             sender = SENDER_NOT_AVAILABLE;
         }
-        if (sender == null || sender.trim().equals("")) {
+        if (sender == null || sender.trim().length() == 0) {
             sender = SENDER_NOT_AVAILABLE;
         }
         return sender;
@@ -94,7 +94,7 @@
         } catch (MessagingException e) {
             senderEmail = SENDER_NOT_AVAILABLE;
         }
-        if (senderEmail == null || senderEmail.trim().equals("")) {
+        if (senderEmail == null || senderEmail.trim().length() == 0) {
             senderEmail = SENDER_NOT_AVAILABLE;
         }
         return senderEmail;
@@ -114,7 +114,7 @@
         } catch (MessagingException e) {
             subject = NO_SUBJECT;
         }
-        if (subject == null || subject.trim().equals("")) {
+        if (subject == null || subject.trim().length() == 0) {
             subject = NO_SUBJECT;
         }
         return subject;

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/AbstractElementProcessorFactory.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/AbstractElementProcessorFactory.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/AbstractElementProcessorFactory.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/AbstractElementProcessorFactory.java Sat Dec 31 10:10:07 2005
@@ -32,7 +32,7 @@
  * handle specific XML elements and their content.
  *
  * @author Marc Johnson (marc_johnson27591@hotmail.com)
- * @version CVS $Id: AbstractElementProcessorFactory.java,v 1.4 2004/03/05 13:02:03 bdelacretaz Exp $
+ * @version CVS $Id$
  */
 public abstract class AbstractElementProcessorFactory
      extends AbstractLogEnabled implements ElementProcessorFactory, Component
@@ -105,7 +105,7 @@
     protected void addElementProcessorProgenitor(final String name,
             final Object progenitor)
     {
-        if ((name == null) || (name.equals(""))) {
+        if (name == null || name.length() == 0) {
             throw new IllegalArgumentException(
                 "Cannot use null or empty name as a key");
         }

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPCols.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPCols.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPCols.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPCols.java Sat Dec 31 10:10:07 2005
@@ -29,7 +29,7 @@
  * element
  *
  * @author Marc Johnson (marc_johnson27591@hotmail.com)
- * @version CVS $Id: EPCols.java,v 1.6 2004/03/05 13:02:03 bdelacretaz Exp $
+ * @version CVS $Id$
  */
 public class EPCols extends BaseElementProcessor {
     private NumericResult _default_size_pts;
@@ -59,7 +59,7 @@
         if (!_default_size_pts_fetched) {
             String value = getValue(_default_size_pts_attribute);
 
-            if (value == null || value.trim().equals("")) {
+            if (value == null || value.trim().length() == 0) {
                 value = DEFAULT_SIZE_PTS;
             }
             _default_size_pts = NumericConverter.extractDouble(value);

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPRows.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPRows.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPRows.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/poi/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/EPRows.java Sat Dec 31 10:10:07 2005
@@ -29,7 +29,7 @@
  * element
  *
  * @author Marc Johnson (marc_johnson27591@hotmail.com)
- * @version CVS $Id: EPRows.java,v 1.5 2004/03/05 13:02:04 bdelacretaz Exp $
+ * @version CVS $Id$
  */
 public class EPRows extends BaseElementProcessor {
     private NumericResult _default_size_pts;
@@ -55,7 +55,7 @@
         if (_default_size_pts == null) {
             String value = getValue(_default_size_pts_attribute);
 
-            if (value == null || value.trim().equals("")) {
+            if (value == null || value.trim().length() == 0) {
                 value = DEFAULT_SIZE_PTS;
             }
             _default_size_pts = NumericConverter.extractDouble(value);

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components/PortalManagerImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components/PortalManagerImpl.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components/PortalManagerImpl.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components/PortalManagerImpl.java Sat Dec 31 10:10:07 2005
@@ -2101,7 +2101,7 @@
                     currentCoplet = list[index];
 
                     String numberValue = currentCoplet.getAttributeNS(null, "number");
-                    if (numberValue == null || numberValue.equals("")) {
+                    if (numberValue == null || numberValue.length() == 0) {
                         // create unique number attribute
                         currentCoplet.setAttributeNS(null, "number", ""+number);
                         miscNodes[PortalConstants.PROFILE_MISC_LAST_COPLET_NODE] = currentCoplet;

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/context/SessionContextImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/context/SessionContextImpl.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/context/SessionContextImpl.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/context/SessionContextImpl.java Sat Dec 31 10:10:07 2005
@@ -60,7 +60,7 @@
  * </configuration>
  *
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
- * @version CVS $Id: SessionContextImpl.java,v 1.9 2004/03/19 14:16:55 cziegeler Exp $
+ * @version CVS $Id$
 */
 public final class SessionContextImpl
 implements SessionContext {
@@ -224,7 +224,7 @@
         if (path.startsWith("/")) path = path.substring(1);
         NodeList list = null;
 
-        if (path == null || path.equals("")) {
+        if (path == null || path.length() == 0) {
             Document doc = DOMUtil.createDocument();
             result = doc.createDocumentFragment();
             this.getLayoutDOM();

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/generation/ConfigurationGenerator.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/generation/ConfigurationGenerator.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/generation/ConfigurationGenerator.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/generation/ConfigurationGenerator.java Sat Dec 31 10:10:07 2005
@@ -30,7 +30,7 @@
  * for the current user.
  *
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
- * @version CVS $Id: ConfigurationGenerator.java,v 1.4 2004/03/05 13:02:18 bdelacretaz Exp $
+ * @version CVS $Id$
 */
 public final class ConfigurationGenerator
 extends ServiceableGenerator {
@@ -46,7 +46,7 @@
             Request request = ObjectModelHelper.getRequest(this.objectModel);
             if (request.getSession(false) != null) {
                 if (this.source == null
-                    || this.source.equals("")
+                    || this.source.length() == 0
                     || this.source.equals("user")) {
                     portal.showPortal(this.xmlConsumer, true, false);
                 } else {

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portlet/multipart/RequestFactory.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portlet/multipart/RequestFactory.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portlet/multipart/RequestFactory.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portlet/multipart/RequestFactory.java Sat Dec 31 10:10:07 2005
@@ -28,7 +28,7 @@
  * This is the interface of Request Wrapper in Cocoon for JSR-168 Portlet environment.
  *
  * @author <a href="mailto:vgritsenko@apache.org">Vadim Gritsenko</a>
- * @version CVS $Id: RequestFactory.java,v 1.2 2004/03/05 13:02:17 bdelacretaz Exp $
+ * @version CVS $Id$
  */
 public class RequestFactory {
 
@@ -69,7 +69,7 @@
             }
 
             String charEncoding = request.getCharacterEncoding();
-            if (charEncoding == null || charEncoding.equals("")) {
+            if (charEncoding == null || charEncoding.length() == 0) {
                 charEncoding = this.defaultCharEncoding;
             }
 

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/datatype/convertor/FormattingDateConvertorBuilder.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/datatype/convertor/FormattingDateConvertorBuilder.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/datatype/convertor/FormattingDateConvertorBuilder.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/datatype/convertor/FormattingDateConvertorBuilder.java Sat Dec 31 10:10:07 2005
@@ -26,7 +26,7 @@
 /**
  * Builds {@link FormattingDateConvertor}s.
  *
- * @version CVS $Id: FormattingDateConvertorBuilder.java,v 1.5 2004/03/09 13:54:15 reinhard Exp $
+ * @version CVS $Id$
  */
 public class FormattingDateConvertorBuilder implements ConvertorBuilder {
     public Convertor build(Element configElement) throws Exception {
@@ -67,9 +67,9 @@
             for (int i = 0; i < patternEl.length; i++) {
                 String locale = patternEl[i].getAttribute("locale");
                 String pattern = DomHelper.getElementText(patternEl[i]);
-                if (pattern.equals(""))
+                if (pattern.length() == 0)
                     throw new Exception("pattern element does not contain any content at " + DomHelper.getLocation(patternEl[i]));
-                if (locale.equals(""))
+                if (locale.length() == 0)
                     convertor.setNonLocalizedPattern(pattern);
                 else {
                     Locale loc = I18nUtils.parseLocale(locale);

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/datatype/convertor/FormattingDecimalConvertorBuilder.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/datatype/convertor/FormattingDecimalConvertorBuilder.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/datatype/convertor/FormattingDecimalConvertorBuilder.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/datatype/convertor/FormattingDecimalConvertorBuilder.java Sat Dec 31 10:10:07 2005
@@ -25,7 +25,7 @@
 /**
  * Builds {@link FormattingDecimalConvertor}s.
  *
- * @version CVS $Id: FormattingDecimalConvertorBuilder.java,v 1.5 2004/03/09 13:54:15 reinhard Exp $
+ * @version CVS $Id$
  */
 public class FormattingDecimalConvertorBuilder implements ConvertorBuilder {
     public Convertor build(Element configElement) throws Exception {
@@ -54,9 +54,9 @@
             for (int i = 0; i < patternEl.length; i++) {
                 String locale = patternEl[i].getAttribute("locale");
                 String pattern = DomHelper.getElementText(patternEl[i]);
-                if (pattern.equals(""))
+                if (pattern.length() == 0)
                     throw new Exception("pattern element does not contain any content at " + DomHelper.getLocation(patternEl[i]));
-                if (locale.equals(""))
+                if (locale.length() == 0)
                     convertor.setNonLocalizedPattern(pattern);
                 else {
                     Locale loc = I18nUtils.parseLocale(locale);

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/datatype/convertor/FormattingFloatConvertorBuilder.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/datatype/convertor/FormattingFloatConvertorBuilder.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/datatype/convertor/FormattingFloatConvertorBuilder.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/datatype/convertor/FormattingFloatConvertorBuilder.java Sat Dec 31 10:10:07 2005
@@ -25,7 +25,7 @@
 /**
  * Builds {@link FormattingDecimalConvertor}s.
  *
- * @version CVS $Id: FormattingFloatConvertorBuilder.java,v 1.4 2004/03/09 13:54:15 reinhard Exp $
+ * @version CVS $Id$
  */
 public class FormattingFloatConvertorBuilder implements ConvertorBuilder {
     public Convertor build(Element configElement) throws Exception {
@@ -54,9 +54,9 @@
             for (int i = 0; i < patternEl.length; i++) {
                 String locale = patternEl[i].getAttribute("locale");
                 String pattern = DomHelper.getElementText(patternEl[i]);
-                if (pattern.equals(""))
+                if (pattern.length() == 0)
                     throw new Exception("pattern element does not contain any content at " + DomHelper.getLocation(patternEl[i]));
-                if (locale.equals(""))
+                if (locale.length() == 0)
                     convertor.setNonLocalizedPattern(pattern);
                 else {
                     Locale loc = I18nUtils.parseLocale(locale);

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/datatype/typeimpl/AbstractDatatypeBuilder.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/datatype/typeimpl/AbstractDatatypeBuilder.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/datatype/typeimpl/AbstractDatatypeBuilder.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/datatype/typeimpl/AbstractDatatypeBuilder.java Sat Dec 31 10:10:07 2005
@@ -34,7 +34,7 @@
 /**
  * Abstract base class for datatype builders, most concrete datatype builders
  * will derive from this class.
- * @version $Id: AbstractDatatypeBuilder.java,v 1.13 2004/03/09 13:53:53 reinhard Exp $
+ * @version $Id$
  */
 public abstract class AbstractDatatypeBuilder implements DatatypeBuilder, Serviceable, Configurable {
     protected ServiceManager serviceManager;
@@ -78,7 +78,7 @@
         // convertor configuration is allowed to be null, so check that it is not null
         if (convertorEl != null)
             type = convertorEl.getAttribute("type");
-        if (type == null || type.equals(""))
+        if (type == null || type.length() == 0)
             type = defaultConvertorHint;
         ConvertorBuilder convertorBuilder = (ConvertorBuilder)convertorBuilders.select(type);
         return convertorBuilder.build(convertorEl);

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/AbstractContainerWidget.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/AbstractContainerWidget.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/AbstractContainerWidget.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/AbstractContainerWidget.java Sat Dec 31 10:10:07 2005
@@ -27,7 +27,7 @@
  * A general-purpose abstract Widget which can hold zero or more widgets.
  *
  * @author Timothy Larson
- * @version $Id: AbstractContainerWidget.java,v 1.8 2004/03/09 13:53:56 reinhard Exp $
+ * @version $Id$
  */
 public abstract class AbstractContainerWidget extends AbstractWidget implements ContainerWidget {
     protected ContainerDelegate widgets;
@@ -69,7 +69,7 @@
     }
 
     public void generateSaxFragment(ContentHandler contentHandler, Locale locale, String element) throws SAXException {
-        if (getId() == null || getId().equals("")) {
+        if (getId() == null || getId().length() == 0) {
             contentHandler.startElement(Constants.WI_NS, element, Constants.WI_PREFIX_COLON + element, Constants.EMPTY_ATTRS);
         } else {
             AttributesImpl attrs = new AttributesImpl();

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/transformation/EffectWidgetReplacingPipe.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/transformation/EffectWidgetReplacingPipe.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/transformation/EffectWidgetReplacingPipe.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/transformation/EffectWidgetReplacingPipe.java Sat Dec 31 10:10:07 2005
@@ -160,7 +160,7 @@
 
     protected String getWidgetId(Attributes attributes) throws SAXException {
         String widgetId = attributes.getValue("id");
-        if (widgetId == null || widgetId.equals("")) {
+        if (widgetId == null || widgetId.length() == 0) {
             throwSAXException("Missing required widget \"id\" attribute.");
         }
         return widgetId;
@@ -414,7 +414,7 @@
             case EVENT_START_ELEMENT:
                 getRepeaterWidget("RepeaterWidgetLabelHandler");
                 String widgetId = input.attrs.getValue("widget-id");
-                if (widgetId == null || widgetId.equals(""))
+                if (widgetId == null || widgetId.length() == 0)
                     throwSAXException("Element repeater-widget-label missing required widget-id attribute.");
                 ((Repeater)widget).generateWidgetLabel(widgetId, getContentHandler());
                 widget = null;

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/transformation/WidgetReplacingPipe.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/transformation/WidgetReplacingPipe.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/transformation/WidgetReplacingPipe.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/transformation/WidgetReplacingPipe.java Sat Dec 31 10:10:07 2005
@@ -41,7 +41,7 @@
  * <p>For more information about the supported tags and their function, see the user documentation
  * for the woody template transformer.</p>
  * 
- * @version CVS $Id: WidgetReplacingPipe.java,v 1.25 2004/03/09 13:54:12 reinhard Exp $
+ * @version CVS $Id$
  */
 public class WidgetReplacingPipe extends AbstractXMLPipe {
 
@@ -144,7 +144,7 @@
                     throw new SAXException("WoodyTemplateTransformer: the element \"repeater-widget-label\" can only be used for repeater widgets.");
                 }
                 String widgetId = attributes.getValue("widget-id");
-                if (widgetId == null || widgetId.equals("")) {
+                if (widgetId == null || widgetId.length() == 0) {
                     throw new SAXException("WoodyTemplateTransformer: the element \"repeater-widget-label\" requires a \"widget-id\" attribute.");
                 }
                 ((Repeater)widget).generateWidgetLabel(widgetId, contentHandler);
@@ -244,7 +244,7 @@
 
     protected Widget getWidget(Attributes attributes) throws SAXException {
         String widgetId = attributes.getValue("id");
-        if (widgetId == null || widgetId.equals("")) {
+        if (widgetId == null || widgetId.length() == 0) {
             throw new SAXException("WoodyTemplateTransformer: missing id attribute on a woody element.");
         }
         Widget widget = contextWidget.getWidget(widgetId);

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/util/DomHelper.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/util/DomHelper.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/util/DomHelper.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/util/DomHelper.java Sat Dec 31 10:10:07 2005
@@ -195,7 +195,7 @@
     public static String getAttribute(Element element, String attributeName)
             throws Exception {
         String attrValue = element.getAttribute(attributeName);
-        if (attrValue.equals("")) {
+        if (attrValue.length() == 0) {
             throw new Exception("Missing attribute \"" + attributeName + 
                     "\" on element \"" + element.getTagName() + 
                     "\" at " + getLocation(element));
@@ -210,7 +210,7 @@
     public static String getAttribute(Element element, String attributeName, 
             String defaultValue) throws Exception {
         String attrValue = element.getAttribute(attributeName);
-        if (attrValue.equals("")) {
+        if (attrValue.length() == 0) {
             return defaultValue;
         }
         return attrValue;
@@ -232,7 +232,7 @@
     public static int getAttributeAsInteger(Element element, 
             String attributeName, int defaultValue) throws Exception {
         String attrValue = element.getAttribute(attributeName);
-        if (attrValue.equals("")) {
+        if (attrValue.length() == 0) {
             return defaultValue;
         } else {
             try {

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/SOAPHelper.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/SOAPHelper.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/SOAPHelper.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/SOAPHelper.java Sat Dec 31 10:10:07 2005
@@ -38,7 +38,7 @@
  *
  * @author <a href="mailto:ovidiu@cup.hp.com">Ovidiu Predescu</a>
  * @author <a href="mailto:vgritsenko@apache.org">Vadim Gritsenko</a>
- * @version CVS $Id: SOAPHelper.java,v 1.1 2004/03/10 12:58:05 stephan Exp $
+ * @version CVS $Id$
  * @since July 16, 2001
  */
 public class SOAPHelper {
@@ -65,7 +65,7 @@
         HttpConnection conn = null;
 
         try {
-            if (action == null || action.equals("")) {
+            if (action == null || action.length() == 0) {
                 action = "\"\"";
             }
 

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/Main.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/Main.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/Main.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/Main.java Sat Dec 31 10:10:07 2005
@@ -42,7 +42,7 @@
  * @author <a href="mailto:nicolaken@apache.org">Nicola Ken Barozzi</a>
  * @author <a href="mailto:vgritsenko@apache.org">Vadim Gritsenko</a>
  * @author <a href="mailto:uv@upaya.co.uk">Upayavira</a>
- * @version CVS $Id: Main.java,v 1.26 2004/04/30 12:55:55 upayavira Exp $
+ * @version CVS $Id$
  */
 public class Main {
 
@@ -253,7 +253,7 @@
 
         if (line.hasOption(WORK_DIR_OPT)) {
             String workDir = line.getOptionValue(WORK_DIR_OPT);
-            if (workDir.equals("")) {
+            if (workDir.length() == 0) {
                 listener.messageGenerated(
                     "Careful, you must specify a work dir when using the -w/--workDir argument");
                 System.exit(1);
@@ -263,7 +263,7 @@
         }
         if (line.hasOption(CONTEXT_DIR_OPT)) {
             String contextDir = line.getOptionValue(CONTEXT_DIR_OPT);
-            if (contextDir.equals("")) {
+            if (contextDir.length() == 0) {
                 listener.messageGenerated(
                     "Careful, you must specify a configuration file when using the -c/--contextDir argument");
                 System.exit(1);

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/ProjectPathModule.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/ProjectPathModule.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/ProjectPathModule.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/ProjectPathModule.java Sat Dec 31 10:10:07 2005
@@ -95,7 +95,7 @@
                 getLogger().warn("No configuration supplied, using default: " + PROJECT_PARAM_DEFAULT);
             }
         }
-        if (this.projectBase.equals("")) {
+        if (this.projectBase.length() == 0) {
             this.projectBase = PROJECT_PARAM_DEFAULT;
             if (getLogger().isWarnEnabled()) {
                 getLogger().warn("Empty configuration supplied, using default: " + PROJECT_PARAM_DEFAULT);

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?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- 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 Dec 31 10:10:07 2005
@@ -118,7 +118,7 @@
         }
 
         String prefix = (String) this.settings.get("key-prefix", PREFIX);
-        if (prefix.equals("")) {
+        if (prefix.length() == 0) {
             request.setAttribute("errorMessage", e.getMessage());
         } else {
             request.setAttribute(prefix + ':' + "errorMessage", e.getMessage());
@@ -162,6 +162,6 @@
 
     protected String getName(String name) {
         String prefix = (String) this.settings.get("key-prefix", PREFIX);
-        return prefix.equals("") ? name : prefix + ':' + name;
+        return prefix.length() == 0 ? 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?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- 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 Dec 31 10:10:07 2005
@@ -178,7 +178,7 @@
     
     protected String getName( String name ) {
         String prefix = (String) this.settings.get("key-prefix", PREFIX );
-        return (prefix.equals("") ? name : prefix+":"+name);
+        return (prefix.length() == 0 ? name : prefix+":"+name);
     }
 
 }

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/i18n/XMLResourceBundleFactory.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/i18n/XMLResourceBundleFactory.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/i18n/XMLResourceBundleFactory.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/i18n/XMLResourceBundleFactory.java Sat Dec 31 10:10:07 2005
@@ -300,8 +300,8 @@
      */
     protected Locale getParentLocale(Locale locale) {
         Locale newloc;
-        if (locale.getVariant().equals("")) {
-            if (locale.getCountry().equals("")) {
+        if (locale.getVariant().length() == 0) {
+            if (locale.getCountry().length() == 0) {
                 newloc = new Locale("", "", "");
             } else {
                 newloc = new Locale(locale.getLanguage(), "", "");

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java Sat Dec 31 10:10:07 2005
@@ -441,7 +441,7 @@
                     // Build infos for this namespace
                     String uri = (String) this.uriList.get(mapping);
                     String prefix = (String) this.prefixList.get(mapping);
-                    String qName = prefix.equals("") ? "xmlns" : ("xmlns:" + prefix);
+                    String qName = prefix.length() == 0 ? "xmlns" : ("xmlns:" + prefix);
 
                     // Search for the corresponding xmlns* attribute
                     boolean found = false;
@@ -470,7 +470,7 @@
                             }
                         }
 
-                        if (prefix.equals("")) {
+                        if (prefix.length() == 0) {
                             newAttrs.addAttribute(Constants.XML_NAMESPACE_URI, "xmlns", "xmlns", "CDATA", uri);
                         } else {
                             newAttrs.addAttribute(Constants.XML_NAMESPACE_URI, prefix, qName, "CDATA", uri);

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/servlet/multipart/RequestFactory.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/servlet/multipart/RequestFactory.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/servlet/multipart/RequestFactory.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/servlet/multipart/RequestFactory.java Sat Dec 31 10:10:07 2005
@@ -76,7 +76,7 @@
         if ((contentType != null) && (contentType.toLowerCase().indexOf("multipart/form-data") > -1)) {
  
             String charEncoding = request.getCharacterEncoding();
-            if (charEncoding == null || charEncoding.equals("")) {
+            if (charEncoding == null || charEncoding.length() == 0) {
                 charEncoding = this.defaultCharEncoding;
             }
             

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/sitemap/ContentAggregator.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/sitemap/ContentAggregator.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/sitemap/ContentAggregator.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/sitemap/ContentAggregator.java Sat Dec 31 10:10:07 2005
@@ -226,7 +226,7 @@
                         String prefix) {
         Element elem = null;
         if (!element.equals("")) {
-            if (namespace.equals("")) {
+            if (namespace.length() == 0) {
                 elem = new Element(element,
                                    this.rootElement.namespace,
                                    this.rootElement.prefix);
@@ -303,7 +303,7 @@
      */
     private void startElem(Element element)
     throws SAXException {
-        final String qname = (element.prefix.equals("")) ? element.name : element.prefix + ':' + element.name;
+        final String qname = (element.prefix.length() == 0) ? element.name : element.prefix + ':' + element.name;
         if (!element.namespace.equals("")) {
             this.contentHandler.startPrefixMapping(element.prefix, element.namespace);
         }
@@ -315,7 +315,7 @@
      * and the root element
      */
     private void endElem(Element element) throws SAXException {
-        final String qname = (element.prefix.equals("")) ? element.name : element.prefix + ':' + element.name;
+        final String qname = (element.prefix.length() == 0) ? element.name : element.prefix + ':' + element.name;
         this.contentHandler.endElement(element.namespace, element.name, qname);
         if (!element.namespace.equals("")) {
             this.contentHandler.endPrefixMapping(element.prefix);
@@ -344,8 +344,8 @@
             getLogger().debug("Skipping root element start event.");
             return;
         }
-        if (namespaceURI == null || namespaceURI.equals("")) {
-            final String qname = this.currentElement.prefix.equals("") ? localName : this.currentElement.prefix + ':' + localName;
+        if (namespaceURI == null || namespaceURI.length() == 0) {
+            final String qname = this.currentElement.prefix.length() == 0 ? localName : this.currentElement.prefix + ':' + localName;
             this.contentHandler.startElement(this.currentElement.namespace, localName, qname, atts);
         } else {
             this.contentHandler.startElement(namespaceURI, localName, raw, atts);
@@ -361,8 +361,8 @@
             getLogger().debug("Skipping root element end event.");
             return;
         }
-        if (namespaceURI == null || namespaceURI.equals("")) {
-            final String qname = this.currentElement.prefix.equals("") ? localName : this.currentElement.prefix + ':' + localName;
+        if (namespaceURI == null || namespaceURI.length() == 0) {
+            final String qname = this.currentElement.prefix.length() == 0 ? localName : this.currentElement.prefix + ':' + localName;
             this.contentHandler.endElement(this.currentElement.namespace, localName, qname);
         } else {
             this.contentHandler.endElement(namespaceURI, localName, raw);

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/FilterTransformer.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/FilterTransformer.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/FilterTransformer.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/FilterTransformer.java Sat Dec 31 10:10:07 2005
@@ -92,7 +92,7 @@
         this.elementName = parameters.getParameter(ELEMENT, "");
         this.count = parameters.getParameterAsInteger(COUNT, DEFAULT_COUNT);
         this.blocknr = parameters.getParameterAsInteger(BLOCKNR, DEFAULT_BLOCK);
-        if (this.elementName == null || this.elementName.equals("") || this.count == 0)  {
+        if (this.elementName == null || this.elementName.length() == 0 || this.count == 0)  {
             throw new ProcessingException("FilterTransformer: both "+ ELEMENT + " and " +
             COUNT + " parameters need to be specified");
         }

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/SimpleFormTransformer.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/SimpleFormTransformer.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/SimpleFormTransformer.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/SimpleFormTransformer.java Sat Dec 31 10:10:07 2005
@@ -359,7 +359,7 @@
         this.useFormName = this.useFormName || this.useFormNameTwice;
         if (this.useFormName) {
             this.separator =
-                (this.separator == null || this.separator.equals("") ? "/" : this.separator);
+                (this.separator == null || this.separator.length() == 0 ? "/" : this.separator);
             this.defaultPrefix = this.separator;
         }
         this.ignoreValidation =

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/SourceWritingTransformer.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/SourceWritingTransformer.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/SourceWritingTransformer.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/SourceWritingTransformer.java Sat Dec 31 10:10:07 2005
@@ -678,7 +678,7 @@
                 // Import the fragment
                 Node importNode = resource.importNode(fragment, true);
 
-                if (path.equals("")) {
+                if (path.length() == 0) {
                     // Parent node is document itself
                     NodeList nodes = importNode.getChildNodes();
                     for (int i = 0; i < nodes.getLength();) {

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/XIncludeTransformer.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/XIncludeTransformer.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/XIncludeTransformer.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/XIncludeTransformer.java Sat Dec 31 10:10:07 2005
@@ -382,7 +382,7 @@
                 }
 
                 // an empty href is a reference to the current document -- this can be different than the current base
-                if (href.equals("")) {
+                if (href.length() == 0) {
                     if (this.href == null)
                         throw new SAXException("XIncludeTransformer: encountered empty href (= href pointing to the current document) but the location of the current document is unknown.");
                     int fragmentIdentifierPos2 = this.href.indexOf('#');

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/MIMEUtils.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/MIMEUtils.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/MIMEUtils.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/MIMEUtils.java Sat Dec 31 10:10:07 2005
@@ -35,7 +35,7 @@
  * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  * @author <a href="mailto:tk-cocoon@datas-world.de">Torsten Knodt</a>
  * @author <a href="mailto:jefft@apache.org">Jeff Turner</a>
- * @version CVS $Id: MIMEUtils.java,v 1.7 2004/03/05 13:03:00 bdelacretaz Exp $
+ * @version CVS $Id$
  */
 public class MIMEUtils {
 
@@ -150,7 +150,7 @@
             if (line.startsWith("#")) {
                 continue;
             }
-            if (line.trim().equals("")) {
+            if (line.trim().length() == 0) {
                 continue;
             }
             StringTokenizer tok = new StringTokenizer(line, " \t");

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/dom/DOMStreamer.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/dom/DOMStreamer.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/dom/DOMStreamer.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/dom/DOMStreamer.java Sat Dec 31 10:10:07 2005
@@ -513,7 +513,7 @@
                 namespace = "http://www.w3.org/2000/xmlns/";
             } else {
                 // Attribute name for this prefix's declaration
-                String declname = (prefix.equals("")) ? "xmlns" : "xmlns:" + prefix;
+                String declname = (prefix.length() == 0) ? "xmlns" : "xmlns:" + prefix;
 
                 // Scan until we run out of Elements or have resolved the namespace
                 while ((null != parent) && (null == namespace)

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/xlink/ExtendedXLinkPipe.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/xlink/ExtendedXLinkPipe.java?rev=360378&r1=360377&r2=360378&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/xlink/ExtendedXLinkPipe.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/xlink/ExtendedXLinkPipe.java Sat Dec 31 10:10:07 2005
@@ -39,7 +39,7 @@
  *
  * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  * @author <a href="mailto:tk-cocoon@datas-world.de">Torsten Knodt</a>
- * @version CVS $Id: ExtendedXLinkPipe.java,v 1.6 2004/03/05 13:03:02 bdelacretaz Exp $
+ * @version CVS $Id$
  */
 public abstract class ExtendedXLinkPipe extends XLinkPipe {
 
@@ -111,7 +111,7 @@
 
         if (attrList != null) {
             for (int i = attrIndex + 1; i < attr.getLength(); i++)
-                if (attr.getURI(i).equals("")
+                if (attr.getURI(i).length() == 0
                     && attrList.contains(attr.getLocalName(i))) {
 
                     final String att = attr.getValue(i);



Mime
View raw message