From: Henri Yandell Date: Fri, 1 Dec 2006 23:44:12 +0000 (+0000) Subject: Moved from Plexus-Util StringUtils to Lang StringUtils. replace, split and join shoul... X-Git-Tag: archiva-0.9-alpha-1~256 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8f58ff76643174be2c7db8c87a0c55e576bc5a23;p=archiva.git Moved from Plexus-Util StringUtils to Lang StringUtils. replace, split and join should just have had performance improvements (probably won't be noticed). isEmpty no longer trims, but usually people don't expect that so that's a semi bugfix. I've also switched a couple of \!isEmpty's to isNotEmpty. git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@481446 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-cli/pom.xml b/archiva-cli/pom.xml index c54d07d44..7d7a408d2 100644 --- a/archiva-cli/pom.xml +++ b/archiva-cli/pom.xml @@ -20,6 +20,10 @@ plexus-cli 1.0-SNAPSHOT + + commons-lang + commons-lang + diff --git a/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java b/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java index 009e1878c..270658ed0 100644 --- a/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java +++ b/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java @@ -8,7 +8,7 @@ import org.apache.maven.archiva.converter.RepositoryConversionException; import org.apache.maven.archiva.discoverer.DiscovererException; import org.codehaus.plexus.PlexusContainer; import org.codehaus.plexus.tools.cli.AbstractCli; -import org.codehaus.plexus.util.StringUtils; +import org.apache.commons.lang.StringUtils; import java.io.File; import java.io.FileInputStream; diff --git a/archiva-configuration/pom.xml b/archiva-configuration/pom.xml index 7725fa2ec..efa11bdff 100644 --- a/archiva-configuration/pom.xml +++ b/archiva-configuration/pom.xml @@ -40,6 +40,10 @@ 1.2_Java1.3 test + + commons-lang + commons-lang + diff --git a/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultConfigurationStore.java b/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultConfigurationStore.java index 759e635e8..c185a4626 100644 --- a/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultConfigurationStore.java +++ b/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultConfigurationStore.java @@ -20,7 +20,7 @@ import org.apache.maven.archiva.configuration.io.xpp3.ConfigurationXpp3Reader; import org.apache.maven.archiva.configuration.io.xpp3.ConfigurationXpp3Writer; import org.codehaus.plexus.logging.AbstractLogEnabled; import org.codehaus.plexus.util.IOUtil; -import org.codehaus.plexus.util.StringUtils; +import org.apache.commons.lang.StringUtils; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; import java.io.File; diff --git a/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/MavenProxyPropertyLoader.java b/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/MavenProxyPropertyLoader.java index c8dfd2993..98f9ce7a0 100644 --- a/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/MavenProxyPropertyLoader.java +++ b/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/MavenProxyPropertyLoader.java @@ -16,7 +16,7 @@ package org.apache.maven.archiva.configuration; * limitations under the License. */ -import org.codehaus.plexus.util.StringUtils; +import org.apache.commons.lang.StringUtils; import java.io.IOException; import java.io.InputStream; diff --git a/archiva-core/pom.xml b/archiva-core/pom.xml index ef36c6fd0..59c3ee0f4 100644 --- a/archiva-core/pom.xml +++ b/archiva-core/pom.xml @@ -56,6 +56,10 @@ plexus-taskqueue 1.0-alpha-4-SNAPSHOT + + commons-lang + commons-lang + diff --git a/archiva-core/src/main/java/org/apache/maven/archiva/configuration/DefaultConfiguredRepositoryFactory.java b/archiva-core/src/main/java/org/apache/maven/archiva/configuration/DefaultConfiguredRepositoryFactory.java index df1946ccb..51ba2d703 100644 --- a/archiva-core/src/main/java/org/apache/maven/archiva/configuration/DefaultConfiguredRepositoryFactory.java +++ b/archiva-core/src/main/java/org/apache/maven/archiva/configuration/DefaultConfiguredRepositoryFactory.java @@ -21,7 +21,7 @@ import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepositoryFactory; import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy; import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout; -import org.codehaus.plexus.util.StringUtils; +import org.apache.commons.lang.StringUtils; import java.io.File; import java.util.ArrayList; diff --git a/archiva-core/src/main/java/org/apache/maven/archiva/proxy/DefaultProxyManager.java b/archiva-core/src/main/java/org/apache/maven/archiva/proxy/DefaultProxyManager.java index cf3c04c6a..cee8a56f5 100644 --- a/archiva-core/src/main/java/org/apache/maven/archiva/proxy/DefaultProxyManager.java +++ b/archiva-core/src/main/java/org/apache/maven/archiva/proxy/DefaultProxyManager.java @@ -30,7 +30,7 @@ import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.wagon.ResourceDoesNotExistException; import org.apache.maven.wagon.proxy.ProxyInfo; import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.util.StringUtils; +import org.apache.commons.lang.StringUtils; import java.io.File; import java.util.ArrayList; @@ -230,7 +230,7 @@ public class DefaultProxyManager private static ProxyInfo createWagonProxy( Proxy proxy ) { ProxyInfo proxyInfo = null; - if ( proxy != null && !StringUtils.isEmpty( proxy.getHost() ) ) + if ( proxy != null && StringUtils.isNotEmpty( proxy.getHost() ) ) { proxyInfo = new ProxyInfo(); proxyInfo.setHost( proxy.getHost() ); diff --git a/archiva-discoverer/pom.xml b/archiva-discoverer/pom.xml index 15eca39ce..15e6837f1 100755 --- a/archiva-discoverer/pom.xml +++ b/archiva-discoverer/pom.xml @@ -50,5 +50,9 @@ org.apache.maven maven-model + + commons-lang + commons-lang + diff --git a/archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/DefaultArtifactDiscoverer.java b/archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/DefaultArtifactDiscoverer.java index 86dbc9f62..204d900fe 100644 --- a/archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/DefaultArtifactDiscoverer.java +++ b/archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/DefaultArtifactDiscoverer.java @@ -17,7 +17,7 @@ package org.apache.maven.archiva.discoverer; */ import org.apache.maven.artifact.Artifact; -import org.codehaus.plexus.util.StringUtils; +import org.apache.commons.lang.StringUtils; import java.util.ArrayList; import java.util.Collections; diff --git a/archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/DefaultMetadataDiscoverer.java b/archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/DefaultMetadataDiscoverer.java index 87a0bea27..5b6db703a 100644 --- a/archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/DefaultMetadataDiscoverer.java +++ b/archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/DefaultMetadataDiscoverer.java @@ -26,7 +26,7 @@ import org.apache.maven.artifact.repository.metadata.Metadata; import org.apache.maven.artifact.repository.metadata.RepositoryMetadata; import org.apache.maven.artifact.repository.metadata.SnapshotArtifactRepositoryMetadata; import org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Reader; -import org.codehaus.plexus.util.StringUtils; +import org.apache.commons.lang.StringUtils; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; import java.io.File; @@ -162,7 +162,7 @@ public class DefaultMetadataDiscoverer String tmpDir = (String) it.next(); Artifact artifact = null; - if ( !StringUtils.isEmpty( metaVersion ) ) + if ( StringUtils.isNotEmpty( metaVersion ) ) { artifact = artifactFactory.createProjectArtifact( metaGroupId, metaArtifactId, metaVersion ); } diff --git a/archiva-indexer/pom.xml b/archiva-indexer/pom.xml index 718397e99..7221fc7f7 100644 --- a/archiva-indexer/pom.xml +++ b/archiva-indexer/pom.xml @@ -63,6 +63,10 @@ org.apache.maven maven-repository-metadata + + commons-lang + commons-lang + diff --git a/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/lucene/LuceneMinimalIndexRecordConverter.java b/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/lucene/LuceneMinimalIndexRecordConverter.java index 0e29e2ca3..ffcc69b90 100644 --- a/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/lucene/LuceneMinimalIndexRecordConverter.java +++ b/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/lucene/LuceneMinimalIndexRecordConverter.java @@ -23,7 +23,7 @@ import org.apache.lucene.document.NumberTools; import org.apache.maven.archiva.indexer.record.MinimalArtifactIndexRecord; import org.apache.maven.archiva.indexer.record.MinimalIndexRecordFields; import org.apache.maven.archiva.indexer.record.RepositoryIndexRecord; -import org.codehaus.plexus.util.StringUtils; +import org.apache.commons.lang.StringUtils; import java.text.ParseException; import java.util.Arrays; diff --git a/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/lucene/LuceneStandardIndexRecordConverter.java b/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/lucene/LuceneStandardIndexRecordConverter.java index f97275c98..6189ee56f 100644 --- a/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/lucene/LuceneStandardIndexRecordConverter.java +++ b/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/lucene/LuceneStandardIndexRecordConverter.java @@ -23,7 +23,7 @@ import org.apache.lucene.document.NumberTools; import org.apache.maven.archiva.indexer.record.RepositoryIndexRecord; import org.apache.maven.archiva.indexer.record.StandardArtifactIndexRecord; import org.apache.maven.archiva.indexer.record.StandardIndexRecordFields; -import org.codehaus.plexus.util.StringUtils; +import org.apache.commons.lang.StringUtils; import java.text.ParseException; import java.util.Arrays; diff --git a/archiva-reports-standard/pom.xml b/archiva-reports-standard/pom.xml index 74c1c1c73..ba86342df 100755 --- a/archiva-reports-standard/pom.xml +++ b/archiva-reports-standard/pom.xml @@ -66,6 +66,10 @@ org.apache.maven.archiva archiva-discoverer + + commons-lang + commons-lang + diff --git a/archiva-reports-standard/src/main/java/org/apache/maven/archiva/reporting/BadMetadataReportProcessor.java b/archiva-reports-standard/src/main/java/org/apache/maven/archiva/reporting/BadMetadataReportProcessor.java index d493158b8..dfc5190cf 100644 --- a/archiva-reports-standard/src/main/java/org/apache/maven/archiva/reporting/BadMetadataReportProcessor.java +++ b/archiva-reports-standard/src/main/java/org/apache/maven/archiva/reporting/BadMetadataReportProcessor.java @@ -26,7 +26,7 @@ import org.apache.maven.artifact.repository.metadata.RepositoryMetadata; import org.apache.maven.artifact.repository.metadata.Snapshot; import org.apache.maven.artifact.repository.metadata.Versioning; import org.codehaus.plexus.util.FileUtils; -import org.codehaus.plexus.util.StringUtils; +import org.apache.commons.lang.StringUtils; import java.io.File; import java.io.IOException; diff --git a/archiva-webapp/pom.xml b/archiva-webapp/pom.xml index 087373fad..5f5c56695 100644 --- a/archiva-webapp/pom.xml +++ b/archiva-webapp/pom.xml @@ -219,6 +219,10 @@ webdav 0.4 + + commons-lang + commons-lang + diff --git a/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/BrowseAction.java b/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/BrowseAction.java index 189407c6d..2d982b790 100644 --- a/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/BrowseAction.java +++ b/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/BrowseAction.java @@ -24,7 +24,7 @@ import org.apache.maven.archiva.indexer.RepositoryArtifactIndex; import org.apache.maven.archiva.indexer.RepositoryArtifactIndexFactory; import org.apache.maven.archiva.indexer.RepositoryIndexException; import org.apache.maven.archiva.indexer.RepositoryIndexSearchException; -import org.codehaus.plexus.util.StringUtils; +import org.apache.commons.lang.StringUtils; import org.codehaus.plexus.xwork.action.PlexusActionSupport; import java.io.File; diff --git a/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java b/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java index 2913056ec..42adbb776 100644 --- a/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java +++ b/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java @@ -46,7 +46,7 @@ import org.apache.maven.shared.dependency.tree.DependencyNode; import org.apache.maven.shared.dependency.tree.DependencyTree; import org.apache.maven.shared.dependency.tree.DependencyTreeBuilder; import org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException; -import org.codehaus.plexus.util.StringUtils; +import org.apache.commons.lang.StringUtils; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; import org.codehaus.plexus.xwork.action.PlexusActionSupport; diff --git a/archiva-webapp/src/main/java/org/apache/maven/archiva/web/servlet/repository/RepositoryAccess.java b/archiva-webapp/src/main/java/org/apache/maven/archiva/web/servlet/repository/RepositoryAccess.java index b2f564b5f..9bf770c76 100644 --- a/archiva-webapp/src/main/java/org/apache/maven/archiva/web/servlet/repository/RepositoryAccess.java +++ b/archiva-webapp/src/main/java/org/apache/maven/archiva/web/servlet/repository/RepositoryAccess.java @@ -34,7 +34,7 @@ import org.codehaus.plexus.security.system.SecuritySession; import org.codehaus.plexus.security.system.SecuritySystem; import org.codehaus.plexus.security.ui.web.filter.authentication.HttpAuthenticator; import org.codehaus.plexus.util.FileUtils; -import org.codehaus.plexus.util.StringUtils; +import org.apache.commons.lang.StringUtils; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; diff --git a/pom.xml b/pom.xml index c2e0f22c2..6025dcb26 100644 --- a/pom.xml +++ b/pom.xml @@ -341,6 +341,11 @@ plexus-security-keys-jdo ${plexus-security.version} + + commons-lang + commons-lang + 2.2 +