felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mccu...@apache.org
Subject svn commit: r1189340 - /felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/DependencyEmbedder.java
Date Wed, 26 Oct 2011 17:49:36 GMT
Author: mcculls
Date: Wed Oct 26 17:49:36 2011
New Revision: 1189340

URL: http://svn.apache.org/viewvc?rev=1189340&view=rev
Log:
Handle empty (but non-null) classifiers

Modified:
    felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/DependencyEmbedder.java

Modified: felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/DependencyEmbedder.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/DependencyEmbedder.java?rev=1189340&r1=1189339&r2=1189340&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/DependencyEmbedder.java
(original)
+++ felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/DependencyEmbedder.java
Wed Oct 26 17:49:36 2011
@@ -92,7 +92,7 @@ public final class DependencyEmbedder ex
         m_embeddedArtifacts.clear();
 
         String embedDependencyHeader = analyzer.getProperty( EMBED_DEPENDENCY );
-        if ( null != embedDependencyHeader && embedDependencyHeader.length() >
0 )
+        if ( StringUtils.isNotEmpty( embedDependencyHeader ) )
         {
             m_embedDirectory = analyzer.getProperty( EMBED_DIRECTORY );
             m_embedStripGroup = analyzer.getProperty( EMBED_STRIP_GROUP, "true" );
@@ -194,13 +194,13 @@ public final class DependencyEmbedder ex
             if ( false == Boolean.valueOf( m_embedStripVersion ).booleanValue() )
             {
                 targetFileName.append( '-' ).append( dependency.getVersion() );
-                if ( dependency.getClassifier() != null )
+                if ( StringUtils.isNotEmpty( dependency.getClassifier() ) )
                 {
                     targetFileName.append( '-' ).append( dependency.getClassifier() );
                 }
             }
             String extension = dependency.getArtifactHandler().getExtension();
-            if ( extension != null )
+            if ( StringUtils.isNotEmpty( extension ) )
             {
                 targetFileName.append( '.' ).append( extension );
             }
@@ -240,7 +240,7 @@ public final class DependencyEmbedder ex
             embeddedArtifacts.append( "g=\"" ).append( dependency.getGroupId() ).append(
'"' );
             embeddedArtifacts.append( ";a=\"" ).append( dependency.getArtifactId() ).append(
'"' );
             embeddedArtifacts.append( ";v=\"" ).append( dependency.getBaseVersion() ).append(
'"' );
-            if ( dependency.getClassifier() != null )
+            if ( StringUtils.isNotEmpty( dependency.getClassifier() ) )
             {
                 embeddedArtifacts.append( ";c=\"" ).append( dependency.getClassifier() ).append(
'"' );
             }
@@ -278,7 +278,7 @@ public final class DependencyEmbedder ex
          * similar algorithm to {maven-resources} but default behaviour here is to append
rather than override
          */
         final String instruction = analyzer.getProperty( directiveName );
-        if ( instruction != null && instruction.length() > 0 )
+        if ( StringUtils.isNotEmpty( instruction ) )
         {
             if ( instruction.indexOf( MAVEN_DEPENDENCIES ) >= 0 )
             {



Mime
View raw message