felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mccu...@apache.org
Subject svn commit: r682125 - in /felix/trunk/bundleplugin/src/main/java/org/apache/felix: bundleplugin/ obrplugin/
Date Sun, 03 Aug 2008 09:47:04 GMT
Author: mcculls
Date: Sun Aug  3 02:47:04 2008
New Revision: 682125

URL: http://svn.apache.org/viewvc?rev=682125&view=rev
Log:
Format code using Apache coding style

Modified:
    felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
    felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/DependencyEmbedder.java
    felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
    felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeploy.java
    felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeployFile.java
    felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrInstall.java
    felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrInstallFile.java
    felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrRemoteClean.java

Modified: felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java?rev=682125&r1=682124&r2=682125&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
(original)
+++ felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
Sun Aug  3 02:47:04 2008
@@ -210,8 +210,8 @@
         // ignore unsupported project types, useful when bundleplugin is configured in parent
pom
         if ( !supportedProjectTypes.contains( projectType ) )
         {
-            getLog().warn( "Ignoring project type " + projectType +
-                           " - supportedProjectTypes = " + supportedProjectTypes );
+            getLog().warn(
+                "Ignoring project type " + projectType + " - supportedProjectTypes = " +
supportedProjectTypes );
             return;
         }
 
@@ -362,8 +362,7 @@
         // update BND instructions to add included Maven resources
         includeMavenResources( currentProject, properties, getLog() );
 
-        if ( !properties.containsKey( Analyzer.EXPORT_PACKAGE ) &&
-             !properties.containsKey( Analyzer.PRIVATE_PACKAGE ) )
+        if ( !properties.containsKey( Analyzer.EXPORT_PACKAGE ) && !properties.containsKey(
Analyzer.PRIVATE_PACKAGE ) )
         {
             if ( properties.containsKey( Analyzer.EXPORT_CONTENTS ) )
             {
@@ -423,7 +422,8 @@
                 }
                 else
                 {
-                    String combinedResource = StringUtils.replace( includeResource, MAVEN_RESOURCES,
mavenResourcePaths );
+                    String combinedResource = StringUtils
+                        .replace( includeResource, MAVEN_RESOURCES, mavenResourcePaths );
                     properties.put( Analyzer.INCLUDE_RESOURCE, combinedResource );
                 }
             }

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=682125&r1=682124&r2=682125&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
Sun Aug  3 02:47:04 2008
@@ -301,7 +301,7 @@
             {
                 for ( Iterator i = filteredDependencies.iterator(); i.hasNext(); )
                 {
-                    addInlinedPaths( (Artifact) i.next(), inline, m_inlinedPaths );
+                    addInlinedPaths( ( Artifact ) i.next(), inline, m_inlinedPaths );
                 }
             }
         }
@@ -319,7 +319,7 @@
             }
             else
             {
-                String[] filters = inline.split("\\|");
+                String[] filters = inline.split( "\\|" );
                 for ( int i = 0; i < filters.length; i++ )
                 {
                     if ( filters[i].length() > 0 )
@@ -447,7 +447,8 @@
                     // dependencies should be prepended so they can be overwritten by local
resources
                     properties.setProperty( directiveName, mavenDependencies + ',' + instruction
);
                 }
-                else  // Analyzer.BUNDLE_CLASSPATH
+                else
+                // Analyzer.BUNDLE_CLASSPATH
                 {
                     // for the classpath we want dependencies to be appended after local
entries
                     properties.setProperty( directiveName, instruction + ',' + mavenDependencies
);

Modified: felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java?rev=682125&r1=682124&r2=682125&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
(original)
+++ felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
Sun Aug  3 02:47:04 2008
@@ -96,8 +96,8 @@
     }
 
 
-    public Manifest getManifest( MavenProject project, Jar[] classpath )
-        throws IOException, MojoFailureException, MojoExecutionException
+    public Manifest getManifest( MavenProject project, Jar[] classpath ) throws IOException,
MojoFailureException,
+        MojoExecutionException
     {
         return getManifest( project, new Properties(), new Properties(), classpath );
     }
@@ -135,8 +135,7 @@
     }
 
 
-    protected Analyzer getAnalyzer( MavenProject project, Jar[] classpath )
-        throws IOException, MojoExecutionException
+    protected Analyzer getAnalyzer( MavenProject project, Jar[] classpath ) throws IOException,
MojoExecutionException
     {
         return getAnalyzer( project, new HashMap(), new Properties(), classpath );
     }
@@ -170,9 +169,8 @@
 
         analyzer.setJar( file );
 
-        if ( !properties.containsKey( Analyzer.EXPORT_PACKAGE ) &&
-             !properties.containsKey( Analyzer.EXPORT_CONTENTS ) &&
-             !properties.containsKey( Analyzer.PRIVATE_PACKAGE ) )
+        if ( !properties.containsKey( Analyzer.EXPORT_PACKAGE ) && !properties.containsKey(
Analyzer.EXPORT_CONTENTS )
+            && !properties.containsKey( Analyzer.PRIVATE_PACKAGE ) )
         {
             String export = analyzer.calculateExportsFromContents( analyzer.getJar() );
             analyzer.setProperty( Analyzer.EXPORT_PACKAGE, export );

Modified: felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeploy.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeploy.java?rev=682125&r1=682124&r2=682125&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeploy.java (original)
+++ felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeploy.java Sun Aug
 3 02:47:04 2008
@@ -170,8 +170,8 @@
         // ignore unsupported project types, useful when bundleplugin is configured in parent
pom
         if ( !supportedProjectTypes.contains( projectType ) )
         {
-            getLog().warn( "Ignoring project type " + projectType +
-                           " - supportedProjectTypes = " + supportedProjectTypes );
+            getLog().warn(
+                "Ignoring project type " + projectType + " - supportedProjectTypes = " +
supportedProjectTypes );
             return;
         }
         else if ( "NONE".equalsIgnoreCase( remoteOBR ) || "false".equalsIgnoreCase( remoteOBR
) )
@@ -227,7 +227,7 @@
 
             Config userConfig = new Config();
             userConfig.setRemoteFile( true );
-            
+
             if ( bundleUrl != null )
             {
                 // public URL differs from the bundle file location
@@ -237,7 +237,8 @@
             {
                 // support absolute bundle URLs based on given prefix
                 URI bundleJar = ObrUtils.getArtifactURI( localRepository, project.getArtifact()
);
-                String relative = ObrUtils.getRelativeURI( ObrUtils.toFileURI( mavenRepository
),  bundleJar).toASCIIString();
+                String relative = ObrUtils.getRelativeURI( ObrUtils.toFileURI( mavenRepository
), bundleJar )
+                    .toASCIIString();
                 URL resourceURL = new URL( new URL( prefixUrl + '/' ), relative );
                 userConfig.setRemoteBundle( URI.create( resourceURL.toString() ) );
             }

Modified: felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeployFile.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeployFile.java?rev=682125&r1=682124&r2=682125&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeployFile.java (original)
+++ felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeployFile.java Sun
Aug  3 02:47:04 2008
@@ -129,8 +129,8 @@
         // ignore unsupported project types, useful when bundleplugin is configured in parent
pom
         if ( !supportedProjectTypes.contains( projectType ) )
         {
-            getLog().warn( "Ignoring project type " + projectType +
-                           " - supportedProjectTypes = " + supportedProjectTypes );
+            getLog().warn(
+                "Ignoring project type " + projectType + " - supportedProjectTypes = " +
supportedProjectTypes );
             return;
         }
         else if ( "NONE".equalsIgnoreCase( remoteOBR ) || "false".equalsIgnoreCase( remoteOBR
) )

Modified: felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrInstall.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrInstall.java?rev=682125&r1=682124&r2=682125&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrInstall.java (original)
+++ felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrInstall.java Sun
Aug  3 02:47:04 2008
@@ -100,8 +100,8 @@
         // ignore unsupported project types, useful when bundleplugin is configured in parent
pom
         if ( !supportedProjectTypes.contains( projectType ) )
         {
-            getLog().warn( "Ignoring project type " + projectType +
-                           " - supportedProjectTypes = " + supportedProjectTypes );
+            getLog().warn(
+                "Ignoring project type " + projectType + " - supportedProjectTypes = " +
supportedProjectTypes );
             return;
         }
         else if ( "NONE".equalsIgnoreCase( obrRepository ) || "false".equalsIgnoreCase( obrRepository
) )

Modified: felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrInstallFile.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrInstallFile.java?rev=682125&r1=682124&r2=682125&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrInstallFile.java
(original)
+++ felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrInstallFile.java
Sun Aug  3 02:47:04 2008
@@ -73,8 +73,8 @@
         // ignore unsupported project types, useful when bundleplugin is configured in parent
pom
         if ( !supportedProjectTypes.contains( projectType ) )
         {
-            getLog().warn( "Ignoring project type " + projectType +
-                           " - supportedProjectTypes = " + supportedProjectTypes );
+            getLog().warn(
+                "Ignoring project type " + projectType + " - supportedProjectTypes = " +
supportedProjectTypes );
             return;
         }
         else if ( "NONE".equalsIgnoreCase( obrRepository ) || "false".equalsIgnoreCase( obrRepository
) )

Modified: felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrRemoteClean.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrRemoteClean.java?rev=682125&r1=682124&r2=682125&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrRemoteClean.java
(original)
+++ felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrRemoteClean.java
Sun Aug  3 02:47:04 2008
@@ -80,7 +80,7 @@
      * @parameter expression="${ignoreLock}"
      */
     private boolean ignoreLock;
-    
+
     /**
      * Optional public URL prefix for the remote repository.
      *
@@ -163,8 +163,8 @@
         // ignore unsupported project types, useful when bundleplugin is configured in parent
pom
         if ( !supportedProjectTypes.contains( projectType ) )
         {
-            getLog().warn( "Ignoring project type " + projectType +
-                           " - supportedProjectTypes = " + supportedProjectTypes );
+            getLog().warn(
+                "Ignoring project type " + projectType + " - supportedProjectTypes = " +
supportedProjectTypes );
             return;
         }
         else if ( "NONE".equalsIgnoreCase( remoteOBR ) || "false".equalsIgnoreCase( remoteOBR
) )
@@ -203,17 +203,17 @@
             downloadedRepositoryXml = remoteFile.get( repositoryName, ".xml" );
 
             URI repositoryXml = downloadedRepositoryXml.toURI();
-            
+
             Config userConfig = new Config();
             userConfig.setRemoteFile( true );
 
             // Clean the downloaded file.
-            Document doc = parseFile(new File(repositoryXml), initConstructor());
-            Node finalDocument = cleanDocument(doc.getDocumentElement());
-            
+            Document doc = parseFile( new File( repositoryXml ), initConstructor() );
+            Node finalDocument = cleanDocument( doc.getDocumentElement() );
+
             if ( finalDocument == null )
             {
-                getLog().info( "Nothing to clean in " + repositoryName);
+                getLog().info( "Nothing to clean in " + repositoryName );
             }
             else
             {
@@ -279,7 +279,8 @@
             remoteFile.connect( deploymentRepository.getId(), deploymentRepository.getUrl()
);
         }
     }
-  
+
+
     /**
      * Analyze the given XML tree (DOM of the repository file) and remove missing resources.
      * This method ask the user before deleting the resources from the repository.
@@ -298,38 +299,48 @@
             String value = n.getAttribute( "uri" );
 
             URL url;
-            try {
-                url = new URL( new URL( prefixUrl + '/' ), value);
-            } catch (MalformedURLException e) {
-                getLog().error("Malformed URL when creating the resource absolute URI : "
+ e.getMessage());
+            try
+            {
+                url = new URL( new URL( prefixUrl + '/' ), value );
+            }
+            catch ( MalformedURLException e )
+            {
+                getLog().error( "Malformed URL when creating the resource absolute URI :
" + e.getMessage() );
                 return null;
             }
-            
-            try {
+
+            try
+            {
                 url.openConnection().getContent();
-            } catch (IOException e) {
+            }
+            catch ( IOException e )
+            {
                 getLog().info(
-                              "The bundle " + n.getAttribute( "presentationname" ) + " -
" + n.getAttribute( "version" )
-                                  + " will be removed : " + e.getMessage() );
-                          toRemove.add( n );
+                    "The bundle " + n.getAttribute( "presentationname" ) + " - " + n.getAttribute(
"version" )
+                        + " will be removed : " + e.getMessage() );
+                toRemove.add( n );
             }
         }
 
         Date d = new Date();
         if ( toRemove.size() > 0 )
         {
-            System.out.println("Do you want to remove these bundles from the repository file
[y/N]:");
-            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
+            System.out.println( "Do you want to remove these bundles from the repository
file [y/N]:" );
+            BufferedReader br = new BufferedReader( new InputStreamReader( System.in ) );
             String answer = null;
 
-            try {
-               answer = br.readLine();
-            } catch (IOException ioe) {
-               getLog().error("IO error trying to read the user confirmation");
-               return null;
+            try
+            {
+                answer = br.readLine();
+            }
+            catch ( IOException ioe )
+            {
+                getLog().error( "IO error trying to read the user confirmation" );
+                return null;
             }
-            
-            if (answer != null && answer.trim().equalsIgnoreCase("y")) {
+
+            if ( answer != null && answer.trim().equalsIgnoreCase( "y" ) )
+            {
                 // Then remove missing resources.
                 for ( int i = 0; i < toRemove.size(); i++ )
                 {
@@ -341,7 +352,9 @@
                 d.setTime( System.currentTimeMillis() );
                 elem.setAttribute( "lastmodified", format.format( d ) );
                 return elem;
-            } else {
+            }
+            else
+            {
                 return null;
             }
         }



Mime
View raw message