[ooo-build-commit] ooeclipse: Branch 'master'

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Fri Jun 11 07:02:50 PDT 2010


 core/source/org/openoffice/ide/eclipse/core/editors/description/MirrorsSection.java |    2 
 core/source/org/openoffice/ide/eclipse/core/model/description/DescriptionModel.java |   24 +++++-----
 core/source/org/openoffice/ide/eclipse/core/model/pack/ManifestModel.java           |    2 
 core/source/org/openoffice/ide/eclipse/core/wizards/pages/UnoPackageExportPage.java |    4 -
 4 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 2017e913426c084c5d35a9e0e0e9e41a0d73209a
Author: cdan <cdan at savatech.ro>
Date:   Fri Jun 11 16:20:26 2010 +0300

    Replaced calls to String.isEmpty() with length tests.

diff --git a/core/source/org/openoffice/ide/eclipse/core/editors/description/MirrorsSection.java b/core/source/org/openoffice/ide/eclipse/core/editors/description/MirrorsSection.java
index a64c296..3301b3b 100644
--- a/core/source/org/openoffice/ide/eclipse/core/editors/description/MirrorsSection.java
+++ b/core/source/org/openoffice/ide/eclipse/core/editors/description/MirrorsSection.java
@@ -140,7 +140,7 @@ public class MirrorsSection extends AbstractSection< DescriptionModel > {
         mUrlTxt.addModifyListener( new ModifyListener () {
 
             public void modifyText(ModifyEvent pE) {
-                mAddBtn.setEnabled( !mUrlTxt.getText().trim().isEmpty() );
+                mAddBtn.setEnabled( !(0 == mUrlTxt.getText().trim().length()) );
             }            
         });
         
diff --git a/core/source/org/openoffice/ide/eclipse/core/model/description/DescriptionModel.java b/core/source/org/openoffice/ide/eclipse/core/model/description/DescriptionModel.java
index e02cce3..aa38b77 100644
--- a/core/source/org/openoffice/ide/eclipse/core/model/description/DescriptionModel.java
+++ b/core/source/org/openoffice/ide/eclipse/core/model/description/DescriptionModel.java
@@ -571,8 +571,8 @@ public class DescriptionModel implements IModel {
      */
     private void writeDependencies(XMLWriter pWriter) {
         
-        boolean hasMin = !mMinOOo.trim().isEmpty();
-        boolean hasMax = !mMaxOOo.trim().isEmpty();
+        boolean hasMin = !(0 == mMinOOo.trim().length());
+        boolean hasMax = !(0 == mMaxOOo.trim().length());
         if ( hasMin || hasMax ) {
             pWriter.startTag( XMLTokens.ELEMENT_DEPENDENCIES, null );
 
@@ -629,7 +629,7 @@ public class DescriptionModel implements IModel {
         Iterator<String> i = mLicenses.values().iterator();
         while ( !hasLicenses && i.hasNext( ) ) {
             String value = i.next();
-            hasLicenses |= !value.trim().isEmpty();
+            hasLicenses |= !(0 == value.trim().length());
         }
         
         //Write the block
@@ -674,8 +674,8 @@ public class DescriptionModel implements IModel {
         Iterator<PublisherInfos> i = mPublisherInfos.values().iterator();
         while ( !hasInfos && i.hasNext() ) {
             PublisherInfos info = i.next();
-            boolean hasName = !info.getName().isEmpty();
-            boolean hasUrl = !info.getUrl().isEmpty();
+            boolean hasName = !(0 == info.getName().length());
+            boolean hasUrl = !(0 == info.getUrl().length());
             
             hasInfos |= hasName && hasUrl;
         }
@@ -692,8 +692,8 @@ public class DescriptionModel implements IModel {
                 attrs.clear();
                 
                 PublisherInfos info = entry.getValue();
-                boolean hasName = !info.getName().isEmpty();
-                boolean hasUrl = !info.getUrl().isEmpty();
+                boolean hasName = !(0 == info.getName().length());
+                boolean hasUrl = !(0 == info.getUrl().length());
                 
                 attrs.put( XMLTokens.createQName( XMLTokens.PREFIX_XLINK, XMLTokens.ATTR_HREF), 
                         info.getUrl() );
@@ -722,7 +722,7 @@ public class DescriptionModel implements IModel {
         Iterator<String> i = mReleaseNotes.values().iterator();
         while ( !hasReleaseNote && i.hasNext( ) ) {
             String value = i.next();
-            hasReleaseNote |= !value.trim().isEmpty();
+            hasReleaseNote |= !(0 == value.trim().length());
         }
         
         //Write the block
@@ -757,7 +757,7 @@ public class DescriptionModel implements IModel {
         Iterator<String> i = mDisplayNames.values().iterator();
         while ( !hasReleaseNote && i.hasNext( ) ) {
             String value = i.next();
-            hasReleaseNote |= !value.trim().isEmpty();
+            hasReleaseNote |= !(0 == value.trim().length());
         }
         
         //Write the block
@@ -786,8 +786,8 @@ public class DescriptionModel implements IModel {
      * @param pWriter the XML writer
      */
     private void writeIcons(XMLWriter pWriter) {
-        boolean hasDefault = !mDefaultIcon.trim().isEmpty();
-        boolean hasHC = !mHCIcon.trim().isEmpty();
+        boolean hasDefault = !(0 == mDefaultIcon.trim().length());
+        boolean hasHC = !(0 == mHCIcon.trim().length());
         
         if ( hasDefault || hasHC ) {
             pWriter.startTag( XMLTokens.ELEMENT_ICON, null );
@@ -822,7 +822,7 @@ public class DescriptionModel implements IModel {
         Iterator<String> i = mDescriptions.values().iterator();
         while ( !hasDescription && i.hasNext( ) ) {
             String value = i.next();
-            hasDescription |= !value.trim().isEmpty();
+            hasDescription |= !(0 == value.trim().length());
         }
         
         //Write the block
diff --git a/core/source/org/openoffice/ide/eclipse/core/model/pack/ManifestModel.java b/core/source/org/openoffice/ide/eclipse/core/model/pack/ManifestModel.java
index 6160fe9..17428f5 100644
--- a/core/source/org/openoffice/ide/eclipse/core/model/pack/ManifestModel.java
+++ b/core/source/org/openoffice/ide/eclipse/core/model/pack/ManifestModel.java
@@ -217,7 +217,7 @@ public class ManifestModel {
 
         // Add the file entry to the manifest
         FileType type = new FileType( FileType.MIME_DESCRIPTION );
-        if ( !localeString.isEmpty() ) {
+        if ( !(0 == localeString.length()) ) {
             type.addParam( FileType.PARAM_LOCALE, localeString );
         }
         String relPath = pDescriptionFile.getProjectRelativePath().toString();
diff --git a/core/source/org/openoffice/ide/eclipse/core/wizards/pages/UnoPackageExportPage.java b/core/source/org/openoffice/ide/eclipse/core/wizards/pages/UnoPackageExportPage.java
index 8999133..a5071c7 100644
--- a/core/source/org/openoffice/ide/eclipse/core/wizards/pages/UnoPackageExportPage.java
+++ b/core/source/org/openoffice/ide/eclipse/core/wizards/pages/UnoPackageExportPage.java
@@ -323,7 +323,7 @@ public class UnoPackageExportPage extends WizardPage {
      * @return <code>true</code> if the page is complete, <code>false</code> otherwise.
      */
     private boolean checkPageCompletion() {
-        return !mDestinationCombo.getText().isEmpty() && mProjectsList.getSelectionIndex() != -1;
+        return !(0 == mDestinationCombo.getText().length()) && mProjectsList.getSelectionIndex() != -1;
     }
     
     /*
@@ -435,7 +435,7 @@ public class UnoPackageExportPage extends WizardPage {
             mAutodeployBox.setSelection( settings.getBoolean( AUTODEPLOY ) );
             String[] items = settings.getArray( DESTINATION_HISTORY );
             for (String item : items) {
-                if ( item != null && !item.isEmpty() ) {
+                if ( item != null && !(0 == item.length()) ) {
                     mDestinationCombo.add( item );
                 }
             }


More information about the ooo-build-commit mailing list