You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2020/06/14 17:51:22 UTC

[maven-integration-testing] branch MNG-6656 updated: Fix checkstyle reported errors

This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch MNG-6656
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git


The following commit(s) were added to refs/heads/MNG-6656 by this push:
     new f772c92  Fix checkstyle reported errors
f772c92 is described below

commit f772c920e9f1a667275797e706c54a0aa9d14aa3
Author: rfscholte <rf...@apache.org>
AuthorDate: Sun Jun 14 19:51:13 2020 +0200

    Fix checkstyle reported errors
---
 .../maven/it/MavenITmng5669ReadPomsOnce.java       | 37 +++++++++++-----------
 1 file changed, 19 insertions(+), 18 deletions(-)

diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5669ReadPomsOnce.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5669ReadPomsOnce.java
index 7bfccb9..666b647 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5669ReadPomsOnce.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5669ReadPomsOnce.java
@@ -64,9 +64,9 @@ public class MavenITmng5669ReadPomsOnce
         verifier.addCliOption( "-Dmaven.experimental.buildconsumer=false" );
         verifier.executeGoals( Arrays.asList( "verify" ) );
         verifier.resetStreams();
-        
+
         List<String> logTxt = verifier.loadLines( "log.txt", "utf-8" );
-        for ( String line : logTxt ) 
+        for ( String line : logTxt )
         {
             if ( line.startsWith( "Picked up JAVA_TOOL_OPTIONS:" ) )
             {
@@ -75,21 +75,21 @@ public class MavenITmng5669ReadPomsOnce
             }
         }
         assertEquals( logTxt.toString(), 168, logTxt.size() );
-        
+
         // analyze lines. It is a Hashmap, so we can't rely on the order
         Set<String> uniqueBuildingSources = new HashSet<>( 168 );
         final String buildSourceKey = "org.apache.maven.model.building.source=";
         final int keyLength = buildSourceKey.length();
-        for( String line : logTxt )
+        for ( String line : logTxt )
         {
             int start = line.indexOf( buildSourceKey );
             if ( start < 0 )
             {
                 continue;
             }
-            
-            int end = line.indexOf(", ", start);
-            if ( end < 0) 
+
+            int end = line.indexOf( ", ", start );
+            if ( end < 0 )
             {
                 end = line.length() - 1; // is the }
             }
@@ -97,9 +97,9 @@ public class MavenITmng5669ReadPomsOnce
         }
         assertEquals( uniqueBuildingSources.size(), 167 /* is 168 minus superpom */ );
     }
-    
+
     public void testWithBuildConsumer()
-                    throws Exception
+        throws Exception
     {
         // prepare JavaAgent
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5669-read-poms-once" );
@@ -117,9 +117,9 @@ public class MavenITmng5669ReadPomsOnce
         verifier.addCliOption( "-Dmaven.experimental.buildconsumer=true" );
         verifier.executeGoals( Arrays.asList( "verify" ) );
         verifier.resetStreams();
-        
+
         List<String> logTxt = verifier.loadLines( "log.txt", "utf-8" );
-        for ( String line : logTxt ) 
+        for ( String line : logTxt )
         {
             if ( line.startsWith( "Picked up JAVA_TOOL_OPTIONS:" ) )
             {
@@ -127,22 +127,23 @@ public class MavenITmng5669ReadPomsOnce
                 break;
             }
         }
-        assertEquals( logTxt.toString(), 168 + 4 /* reactor poms are read twice: file + raw (=XMLFilters) */, logTxt.size() );
-        
+        assertEquals( logTxt.toString(), 168 + 4 /* reactor poms are read twice: file + raw (=XMLFilters) */,
+                      logTxt.size() );
+
         // analyze lines. It is a Hashmap, so we can't rely on the order
         Set<String> uniqueBuildingSources = new HashSet<>( 168 );
         final String buildSourceKey = "org.apache.maven.model.building.source=";
         final int keyLength = buildSourceKey.length();
-        for( String line : logTxt )
+        for ( String line : logTxt )
         {
             int start = line.indexOf( buildSourceKey );
             if ( start < 0 )
             {
                 continue;
             }
-            
-            int end = line.indexOf(", ", start);
-            if ( end < 0) 
+
+            int end = line.indexOf( ", ", start );
+            if ( end < 0 )
             {
                 end = line.length() - 1; // is the }
             }
@@ -150,5 +151,5 @@ public class MavenITmng5669ReadPomsOnce
         }
         assertEquals( uniqueBuildingSources.size(), 167 /* is 168 minus superpom */ );
     }
-    
+
 }