ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject [1/6] ant git commit: Sonar meets backwards compatibility requirements
Date Wed, 21 Dec 2016 19:11:58 GMT
Repository: ant
Updated Branches:
  refs/heads/1.9.x 44cd14d10 -> 121043fe5


Sonar meets backwards compatibility requirements


Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/45152b52
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/45152b52
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/45152b52

Branch: refs/heads/1.9.x
Commit: 45152b52080a71b8ef2c6d904375085fa3763e8e
Parents: 44cd14d
Author: Stefan Bodewig <bodewig@apache.org>
Authored: Wed Dec 21 18:50:29 2016 +0100
Committer: Stefan Bodewig <bodewig@apache.org>
Committed: Wed Dec 21 18:50:29 2016 +0100

----------------------------------------------------------------------
 src/main/org/apache/tools/ant/DirectoryScanner.java     |  2 +-
 src/main/org/apache/tools/ant/taskdefs/Javadoc.java     |  2 +-
 src/main/org/apache/tools/ant/taskdefs/Length.java      |  2 +-
 .../tools/ant/taskdefs/optional/javacc/JavaCC.java      |  4 ++--
 .../tools/ant/taskdefs/optional/jsp/JspNameMangler.java |  2 +-
 .../org/apache/tools/ant/taskdefs/optional/net/FTP.java |  6 +++---
 .../apache/tools/ant/taskdefs/optional/net/FTPTask.java |  6 +++---
 src/main/org/apache/tools/ant/util/Base64Converter.java |  2 +-
 src/main/org/apache/tools/ant/util/CollectionUtils.java |  5 +----
 src/main/org/apache/tools/bzip2/BZip2Constants.java     |  2 +-
 src/main/org/apache/tools/bzip2/CRC.java                |  2 +-
 src/main/org/apache/tools/zip/ZipOutputStream.java      | 12 ++++++------
 12 files changed, 22 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/45152b52/src/main/org/apache/tools/ant/DirectoryScanner.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/DirectoryScanner.java b/src/main/org/apache/tools/ant/DirectoryScanner.java
index 709779a..6b52897 100644
--- a/src/main/org/apache/tools/ant/DirectoryScanner.java
+++ b/src/main/org/apache/tools/ant/DirectoryScanner.java
@@ -146,7 +146,7 @@ public class DirectoryScanner
      *             method instead.
      */
     @Deprecated
-    protected static final String[] DEFAULTEXCLUDES = {
+    protected static final String[] DEFAULTEXCLUDES = { //NOSONAR
         // Miscellaneous typical temporary files
         SelectorUtils.DEEP_TREE_MATCH + "/*~",
         SelectorUtils.DEEP_TREE_MATCH + "/#*#",

http://git-wip-us.apache.org/repos/asf/ant/blob/45152b52/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
index 9fd3c8a..ebdce49 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
@@ -1313,7 +1313,7 @@ public class Javadoc extends Task {
      * cannot be static in inner classes.) The first letter
      * from each element is used to build up the scope string.
      */
-    static final String[] SCOPE_ELEMENTS = {
+    static final String[] SCOPE_ELEMENTS = { //NOSONAR
         "overview", "packages", "types", "constructors",
         "methods", "fields"
     };

http://git-wip-us.apache.org/repos/asf/ant/blob/45152b52/src/main/org/apache/tools/ant/taskdefs/Length.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/taskdefs/Length.java b/src/main/org/apache/tools/ant/taskdefs/Length.java
index bd4da44..68fb20a 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Length.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Length.java
@@ -247,7 +247,7 @@ public class Length extends Task implements Condition {
 
     /** EnumeratedAttribute operation mode */
     public static class FileMode extends EnumeratedAttribute {
-        static final String[] MODES = new String[] {EACH, ALL};
+        static final String[] MODES = new String[] {EACH, ALL}; //NOSONAR
 
         /**
          * Return the possible values for FileMode.

http://git-wip-us.apache.org/repos/asf/ant/blob/45152b52/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java b/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
index 219cc9c..999110f 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
@@ -77,7 +77,7 @@ public class JavaCC extends Task {
     protected static final int TASKDEF_TYPE_JJTREE = 2;
     protected static final int TASKDEF_TYPE_JJDOC = 3;
 
-    protected static final String[] ARCHIVE_LOCATIONS =
+    protected static final String[] ARCHIVE_LOCATIONS = //NOSONAR
         new String[] {
         "JavaCC.zip",
         "bin/lib/JavaCC.zip",
@@ -85,7 +85,7 @@ public class JavaCC extends Task {
         "javacc.jar", // used by jpackage for JavaCC 3.x
     };
 
-    protected static final int[] ARCHIVE_LOCATIONS_VS_MAJOR_VERSION =
+    protected static final int[] ARCHIVE_LOCATIONS_VS_MAJOR_VERSION = //NOSONAR
         new int[] {
         1,
         2,

http://git-wip-us.apache.org/repos/asf/ant/blob/45152b52/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspNameMangler.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspNameMangler.java b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspNameMangler.java
index 6e08e7d..850c6bc 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspNameMangler.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspNameMangler.java
@@ -33,7 +33,7 @@ public class JspNameMangler implements JspMangler {
     /**
      * this is the list of keywords which can not be used as classnames
      */
-    public static final String[] keywords = {
+    public static final String[] keywords = { //NOSONAR
             "assert",
             "abstract", "boolean", "break", "byte",
             "case", "catch", "char", "class",

http://git-wip-us.apache.org/repos/asf/ant/blob/45152b52/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java b/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
index b6360ca..b783706 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
@@ -144,7 +144,7 @@ public class FTP extends Task implements FTPTaskConfig {
     private String initialSiteCommand = null;
     private boolean enableRemoteVerification = true;
 
-    protected static final String[] ACTION_STRS = {
+    protected static final String[] ACTION_STRS = { //NOSONAR
         "sending",
         "getting",
         "deleting",
@@ -155,7 +155,7 @@ public class FTP extends Task implements FTPTaskConfig {
         "site"
     };
 
-    protected static final String[] COMPLETED_ACTION_STRS = {
+    protected static final String[] COMPLETED_ACTION_STRS = { //NOSONAR
         "sent",
         "retrieved",
         "deleted",
@@ -166,7 +166,7 @@ public class FTP extends Task implements FTPTaskConfig {
         "site command executed"
     };
 
-    protected static final String[] ACTION_TARGET_STRS = {
+    protected static final String[] ACTION_TARGET_STRS = { //NOSONAR
         "files",
         "files",
         "files",

http://git-wip-us.apache.org/repos/asf/ant/blob/45152b52/src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTask.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTask.java
index 79780c7..aa060ae 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTask.java
@@ -108,7 +108,7 @@ public class FTPTask extends Task implements FTPTaskConfig {
     private ClassLoader mirrorLoader;
     private FTPTaskMirror delegate = null;
 
-    public static final String[] ACTION_STRS = {
+    public static final String[] ACTION_STRS = { //NOSONAR
         "sending",
         "getting",
         "deleting",
@@ -119,7 +119,7 @@ public class FTPTask extends Task implements FTPTaskConfig {
         "site"
     };
 
-    public static final String[] COMPLETED_ACTION_STRS = {
+    public static final String[] COMPLETED_ACTION_STRS = { //NOSONAR
         "sent",
         "retrieved",
         "deleted",
@@ -130,7 +130,7 @@ public class FTPTask extends Task implements FTPTaskConfig {
         "site command executed"
     };
 
-    public static final String[] ACTION_TARGET_STRS = {
+    public static final String[] ACTION_TARGET_STRS = { //NOSONAR
         "files",
         "files",
         "files",

http://git-wip-us.apache.org/repos/asf/ant/blob/45152b52/src/main/org/apache/tools/ant/util/Base64Converter.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/Base64Converter.java b/src/main/org/apache/tools/ant/util/Base64Converter.java
index 5d60a14..4f62b03 100644
--- a/src/main/org/apache/tools/ant/util/Base64Converter.java
+++ b/src/main/org/apache/tools/ant/util/Base64Converter.java
@@ -49,7 +49,7 @@ public class Base64Converter {
 
     // CheckStyle:ConstantNameCheck OFF - bc
     /** Provided for BC purposes */
-    public static final char[] alphabet = ALPHABET;
+    public static final char[] alphabet = ALPHABET; //NOSONAR
     // CheckStyle:ConstantNameCheck ON
 
 

http://git-wip-us.apache.org/repos/asf/ant/blob/45152b52/src/main/org/apache/tools/ant/util/CollectionUtils.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/CollectionUtils.java b/src/main/org/apache/tools/ant/util/CollectionUtils.java
index 03c48d9..23f67a4 100644
--- a/src/main/org/apache/tools/ant/util/CollectionUtils.java
+++ b/src/main/org/apache/tools/ant/util/CollectionUtils.java
@@ -36,12 +36,9 @@ import java.util.Vector;
  */
 public class CollectionUtils {
 
-    /**
-     * Collections.emptyList() is Java5+.
-     */
     @SuppressWarnings("rawtypes")
     @Deprecated
-    public static final List EMPTY_LIST = Collections.EMPTY_LIST;
+    public static final List EMPTY_LIST = Collections.EMPTY_LIST; //NOSONAR
 
     /**
      * Please use Vector.equals() or List.equals().

http://git-wip-us.apache.org/repos/asf/ant/blob/45152b52/src/main/org/apache/tools/bzip2/BZip2Constants.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/bzip2/BZip2Constants.java b/src/main/org/apache/tools/bzip2/BZip2Constants.java
index 3a511a7..df32d95 100644
--- a/src/main/org/apache/tools/bzip2/BZip2Constants.java
+++ b/src/main/org/apache/tools/bzip2/BZip2Constants.java
@@ -52,7 +52,7 @@ public interface BZip2Constants {
      * <p>FIXME: This array should be in a private or package private
      * location, since it could be modified by malicious code.</p>
      */
-    int[] rNums = {
+    int[] rNums = { //NOSONAR
         619, 720, 127, 481, 931, 816, 813, 233, 566, 247,
         985, 724, 205, 454, 863, 491, 741, 242, 949, 214,
         733, 859, 335, 708, 621, 574, 73, 654, 730, 472,

http://git-wip-us.apache.org/repos/asf/ant/blob/45152b52/src/main/org/apache/tools/bzip2/CRC.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/bzip2/CRC.java b/src/main/org/apache/tools/bzip2/CRC.java
index 0102c8e..0d4ada9 100644
--- a/src/main/org/apache/tools/bzip2/CRC.java
+++ b/src/main/org/apache/tools/bzip2/CRC.java
@@ -30,7 +30,7 @@ package org.apache.tools.bzip2;
  *
  */
 final class CRC {
-    static final int crc32Table[] = {
+    static final int crc32Table[] = { //NOSONAR
         0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9,
         0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005,
         0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,

http://git-wip-us.apache.org/repos/asf/ant/blob/45152b52/src/main/org/apache/tools/zip/ZipOutputStream.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/zip/ZipOutputStream.java b/src/main/org/apache/tools/zip/ZipOutputStream.java
index 0b4f5f9..228ce61 100644
--- a/src/main/org/apache/tools/zip/ZipOutputStream.java
+++ b/src/main/org/apache/tools/zip/ZipOutputStream.java
@@ -963,33 +963,33 @@ public class ZipOutputStream extends FilterOutputStream {
      *
      * @since 1.1
      */
-    protected static final byte[] LFH_SIG = ZipLong.LFH_SIG.getBytes();
+    protected static final byte[] LFH_SIG = ZipLong.LFH_SIG.getBytes(); //NOSONAR
     /**
      * data descriptor signature
      *
      * @since 1.1
      */
-    protected static final byte[] DD_SIG = ZipLong.DD_SIG.getBytes();
+    protected static final byte[] DD_SIG = ZipLong.DD_SIG.getBytes(); //NOSONAR
     /**
      * central file header signature
      *
      * @since 1.1
      */
-    protected static final byte[] CFH_SIG = ZipLong.CFH_SIG.getBytes();
+    protected static final byte[] CFH_SIG = ZipLong.CFH_SIG.getBytes(); //NOSONAR
     /**
      * end of central dir signature
      *
      * @since 1.1
      */
-    protected static final byte[] EOCD_SIG = ZipLong.getBytes(0X06054B50L);
+    protected static final byte[] EOCD_SIG = ZipLong.getBytes(0X06054B50L); //NOSONAR
     /**
      * ZIP64 end of central dir signature
      */
-    static final byte[] ZIP64_EOCD_SIG = ZipLong.getBytes(0X06064B50L);
+    static final byte[] ZIP64_EOCD_SIG = ZipLong.getBytes(0X06064B50L); //NOSONAR
     /**
      * ZIP64 end of central dir locator signature
      */
-    static final byte[] ZIP64_EOCD_LOC_SIG = ZipLong.getBytes(0X07064B50L);
+    static final byte[] ZIP64_EOCD_LOC_SIG = ZipLong.getBytes(0X07064B50L); //NOSONAR
 
     /**
      * Writes next block of compressed data to the output stream.


Mime
View raw message