Re: maven-wagon git commit: [WAGON-488] Upgrade WebDAV Wagon to a more recent HttpClient version Fix checkstyle reported errors

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: maven-wagon git commit: [WAGON-488] Upgrade WebDAV Wagon to a more recent HttpClient version Fix checkstyle reported errors

olamy
On 5 July 2017 at 04:31, <[hidden email]> wrote:

> Repository: maven-wagon
> Updated Branches:
>   refs/heads/master 3464da867 -> dfadb0b78
>
>
> [WAGON-488] Upgrade WebDAV Wagon to a more recent HttpClient version
> Fix checkstyle reported errors
>
>
> Project: http://git-wip-us.apache.org/repos/asf/maven-wagon/repo
> Commit: http://git-wip-us.apache.org/repos/asf/maven-wagon/commit/dfadb0b7
> Tree: http://git-wip-us.apache.org/repos/asf/maven-wagon/tree/dfadb0b7
> Diff: http://git-wip-us.apache.org/repos/asf/maven-wagon/diff/dfadb0b7
>
> Branch: refs/heads/master
> Commit: dfadb0b786858a68d80ef80635e5f1f467bb4e75
> Parents: 3464da8
> Author: rfscholte <[hidden email]>
> Authored: Tue Jul 4 20:31:44 2017 +0200
> Committer: rfscholte <[hidden email]>
> Committed: Tue Jul 4 20:31:44 2017 +0200
>
> ----------------------------------------------------------------------
>  pom.xml                                         |  8 ------
>  .../maven/wagon/http/HttpWagonTestCase.java     | 28 +++++++++-----------
>  2 files changed, 12 insertions(+), 24 deletions(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/maven-wagon/blob/dfadb0b7/pom.xml
> ----------------------------------------------------------------------
> diff --git a/pom.xml b/pom.xml
> index 2be6a49..1ce64ee 100644
> --- a/pom.xml
> +++ b/pom.xml
> @@ -387,14 +387,6 @@ under the License.
>              </lifecycleMappingMetadata>
>            </configuration>
>          </plugin>
> -        <plugin>
> -          <groupId>org.apache.maven.plugins</groupId>
> -          <artifactId>maven-checkstyle-plugin</artifactId>
> -          <configuration>
> -            <failsOnError>false</failsOnError>
> -            <failOnViolation>false</failOnViolation>
> -          </configuration>
> -        </plugin>
>        </plugins>
>

LOL
I was really happy to disable failure on checkstyle error.
I reckon sometimes I was a bit upset while working on complicated change to
see a build failure because of a missing space...



>      </pluginManagement>
>      <plugins>
>
> http://git-wip-us.apache.org/repos/asf/maven-wagon/blob/dfad
> b0b7/wagon-provider-test/src/main/java/org/apache/maven/
> wagon/http/HttpWagonTestCase.java
> ----------------------------------------------------------------------
> diff --git a/wagon-provider-test/src/main/java/org/apache/maven/wagon/http/HttpWagonTestCase.java
> b/wagon-provider-test/src/main/java/org/apache/maven/wagon/
> http/HttpWagonTestCase.java
> index 3acf1ee..d24f78f 100644
> --- a/wagon-provider-test/src/main/java/org/apache/maven/wagon/
> http/HttpWagonTestCase.java
> +++ b/wagon-provider-test/src/main/java/org/apache/maven/wagon/
> http/HttpWagonTestCase.java
> @@ -87,10 +87,10 @@ public abstract class HttpWagonTestCase
>      private Server server;
>      private ServerConnector connector;
>
> -    protected int getLocalPort( Server server)
> +    protected int getLocalPort( Server server )
>      {
>          Connector connector = server.getConnectors()[0];
> -        return ((ServerConnector)connector).getLocalPort();
> +        return ( ( ServerConnector ) connector ).getLocalPort();
>      }
>
>      protected void setupWagonTestingFixtures()
> @@ -207,10 +207,6 @@ public abstract class HttpWagonTestCase
>          setHttpHeaders.invoke( wagon, properties );
>
>          Server server = new Server( );
> -        /*
> -        ServerConnector serverConnector = new ServerConnector( server,
> new HttpConnectionFactory( new HttpConfiguration() ) );
> -        server.addConnector( serverConnector );
> -        */
>          ServerConnector serverConnector = addConnector( server );
>          TestHeaderHandler handler = new TestHeaderHandler();
>          server.setHandler( handler );
> @@ -238,8 +234,7 @@ public abstract class HttpWagonTestCase
>          server.setHandler( handler );
>          addConnector( server );
>          server.start();
> -        wagon.connect( new Repository( "id", getProtocol() +
> "://localhost:"
> -          + getLocalPort( server )));
> +        wagon.connect( new Repository( "id", getProtocol() +
> "://localhost:" + getLocalPort( server ) ) );
>          wagon.getToStream( "resource", new ByteArrayOutputStream() );
>          wagon.disconnect();
>          server.stop();
> @@ -269,8 +264,7 @@ public abstract class HttpWagonTestCase
>          server.setHandler( handler );
>          addConnector( server );
>          server.start();
> -        wagon.connect( new Repository( "id", getProtocol() +
> "://localhost:"
> -          + getLocalPort( server ) ));
> +        wagon.connect( new Repository( "id", getProtocol() +
> "://localhost:" + getLocalPort( server ) ) );
>          wagon.getToStream( "resource", new ByteArrayOutputStream() );
>          wagon.disconnect();
>          server.stop();
> @@ -283,7 +277,8 @@ public abstract class HttpWagonTestCase
>
>      protected ServerConnector addConnector( Server server )
>      {
> -        ServerConnector serverConnector = new ServerConnector( server,
> new HttpConnectionFactory( new HttpConfiguration() ) );
> +        ServerConnector serverConnector =
> +            new ServerConnector( server, new HttpConnectionFactory( new
> HttpConfiguration() ) );
>          server.addConnector( serverConnector );
>          return serverConnector;
>      }
> @@ -931,7 +926,7 @@ public abstract class HttpWagonTestCase
>              String content = "put top secret";
>              FileUtils.fileWrite( tempFile.getAbsolutePath(), content );
>
> -            try (FileInputStream fileInputStream = new FileInputStream(
> tempFile ))
> +            try ( FileInputStream fileInputStream = new FileInputStream(
> tempFile ) )
>              {
>                  wagon.putFromStream( fileInputStream,
> "test-secured-put-resource", content.length(), -1 );
>                  assertEquals( content, FileUtils.fileRead(
> sourceFile.getAbsolutePath() ) );
> @@ -1183,7 +1178,8 @@ public abstract class HttpWagonTestCase
>          // CHECKSTYLE_ON: MagicNumber
>
>          Server proxyServer = new Server( );
> -        ServerConnector serverConnector = new ServerConnector(
> proxyServer, new HttpConnectionFactory( new HttpConfiguration() ) );
> +        ServerConnector serverConnector =
> +            new ServerConnector( proxyServer, new HttpConnectionFactory(
> new HttpConfiguration() ) );
>          proxyServer.addConnector( serverConnector );
>          proxyServer.setHandler( handler );
>
> @@ -1242,7 +1238,8 @@ public abstract class HttpWagonTestCase
>          // CHECKSTYLE_ON: MagicNumber
>
>          Server proxyServer = new Server( );
> -        ServerConnector serverConnector = new ServerConnector(
> proxyServer, new HttpConnectionFactory( new HttpConfiguration() ) );
> +        ServerConnector serverConnector =
> +            new ServerConnector( proxyServer, new HttpConnectionFactory(
> new HttpConfiguration() ) );
>          proxyServer.addConnector( serverConnector );
>
>          proxyServer.setHandler( handler );
> @@ -1882,14 +1879,13 @@ public abstract class HttpWagonTestCase
>                  String content = "put top secret";
>                  FileUtils.fileWrite( tempFile.getAbsolutePath(), content
> );
>
> -                try(FileInputStream fileInputStream = new
> FileInputStream( tempFile ))
> +                try ( FileInputStream fileInputStream = new
> FileInputStream( tempFile ) )
>                  {
>                      wagon.putFromStream( fileInputStream,
> "test-secured-put-resource", content.length(), -1 );
>                  }
>                  finally
>                  {
>                      tempFile.delete();
> -
>                  }
>
>                  assertEquals( content, FileUtils.fileRead(
> sourceFile.getAbsolutePath() ) );
>
>


--
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy
Loading...