You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2015/09/07 23:51:00 UTC
svn commit: r1701706 - in
/directory/apacheds/trunk/installers-maven-plugin/src: checkstyle/
main/java/org/apache/directory/server/installers/
main/java/org/apache/directory/server/installers/archive/
Author: seelmann
Date: Mon Sep 7 21:50:59 2015
New Revision: 1701706
URL: http://svn.apache.org/r1701706
Log:
Fix checkstyle issues
Added:
directory/apacheds/trunk/installers-maven-plugin/src/checkstyle/
directory/apacheds/trunk/installers-maven-plugin/src/checkstyle/suppressions.xml (with props)
Modified:
directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/AbstractMojoCommand.java
directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/MojoHelperUtils.java
directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/archive/ArchiveInstallerCommand.java
Added: directory/apacheds/trunk/installers-maven-plugin/src/checkstyle/suppressions.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/installers-maven-plugin/src/checkstyle/suppressions.xml?rev=1701706&view=auto
==============================================================================
--- directory/apacheds/trunk/installers-maven-plugin/src/checkstyle/suppressions.xml (added)
+++ directory/apacheds/trunk/installers-maven-plugin/src/checkstyle/suppressions.xml Mon Sep 7 21:50:59 2015
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<!DOCTYPE suppressions PUBLIC
+ "-//Puppy Crawl//DTD Suppressions 1.1//EN"
+ "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
+
+<suppressions>
+ <suppress files="org.apache.directory.server.installers.Target" checks="MethodName"/>
+</suppressions>
Propchange: directory/apacheds/trunk/installers-maven-plugin/src/checkstyle/suppressions.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/apacheds/trunk/installers-maven-plugin/src/checkstyle/suppressions.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/AbstractMojoCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/AbstractMojoCommand.java?rev=1701706&r1=1701705&r2=1701706&view=diff
==============================================================================
--- directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/AbstractMojoCommand.java (original)
+++ directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/AbstractMojoCommand.java Mon Sep 7 21:50:59 2015
@@ -80,9 +80,6 @@ public abstract class AbstractMojoComman
/** The rights for a command */
protected static final String RWX_RX_RX = "755";
- /** The rights for a user command */
- protected static final String RWX_R__R_ = "744";
-
/** The os.name property key */
protected static final String OS_NAME = "os.name";
@@ -302,7 +299,7 @@ public abstract class AbstractMojoComman
}
- abstract public void copyWrapperFiles( GenerateMojo mojo ) throws MojoFailureException;
+ public abstract void copyWrapperFiles( GenerateMojo mojo ) throws MojoFailureException;
/**
Modified: directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/MojoHelperUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/MojoHelperUtils.java?rev=1701706&r1=1701705&r2=1701706&view=diff
==============================================================================
--- directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/MojoHelperUtils.java (original)
+++ directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/MojoHelperUtils.java Mon Sep 7 21:50:59 2015
@@ -50,14 +50,20 @@ import org.codehaus.plexus.util.Interpol
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class MojoHelperUtils
+public final class MojoHelperUtils
{
+
+ private MojoHelperUtils()
+ {
+ }
+
+
public static void copyBinaryFile( GenerateMojo mojo, String fileName, InputStream from, File to )
throws IOException
{
mojo.getLog().info( "Copying " + fileName + " to " + to );
- try (FileOutputStream out = new FileOutputStream( to ))
+ try ( FileOutputStream out = new FileOutputStream( to ) )
{
IOUtil.copy( from, out );
}
@@ -72,7 +78,7 @@ public class MojoHelperUtils
InputStream from, File to, boolean filtering ) throws IOException
{
// buffer so it isn't reading a byte at a time!
- try (Reader fileReader = new BufferedReader( new InputStreamReader( from ) );
+ try ( Reader fileReader = new BufferedReader( new InputStreamReader( from ) );
Writer fileWriter = new OutputStreamWriter( new FileOutputStream( to ) ) )
{
Reader reader = null;
Modified: directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/archive/ArchiveInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/archive/ArchiveInstallerCommand.java?rev=1701706&r1=1701705&r2=1701706&view=diff
==============================================================================
--- directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/archive/ArchiveInstallerCommand.java (original)
+++ directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/archive/ArchiveInstallerCommand.java Mon Sep 7 21:50:59 2015
@@ -345,8 +345,8 @@ public class ArchiveInstallerCommand ext
// Checking for a known archive type
ArchiveType type = ArchiveType.getType( archiveType );
- if ( ( type != ArchiveType.ZIP ) && ( type != ArchiveType.TAR ) &&
- ( type != ArchiveType.TAR_GZ ) && ( type != ArchiveType.TAR_BZ2 ) )
+ if ( ( type != ArchiveType.ZIP ) && ( type != ArchiveType.TAR )
+ && ( type != ArchiveType.TAR_GZ ) && ( type != ArchiveType.TAR_BZ2 ) )
{
log.warn( "Archive type is unknwown (" + archiveType + ")!" );
log.warn( "The build will continue, but please check the archive type of this installer target" );