Browse Source

Sonar meets backwards compatibility requirements

master
Stefan Bodewig 8 years ago
parent
commit
45152b5208
12 changed files with 22 additions and 25 deletions
  1. +1
    -1
      src/main/org/apache/tools/ant/DirectoryScanner.java
  2. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/Javadoc.java
  3. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/Length.java
  4. +2
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
  5. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspNameMangler.java
  6. +3
    -3
      src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
  7. +3
    -3
      src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTask.java
  8. +1
    -1
      src/main/org/apache/tools/ant/util/Base64Converter.java
  9. +1
    -4
      src/main/org/apache/tools/ant/util/CollectionUtils.java
  10. +1
    -1
      src/main/org/apache/tools/bzip2/BZip2Constants.java
  11. +1
    -1
      src/main/org/apache/tools/bzip2/CRC.java
  12. +6
    -6
      src/main/org/apache/tools/zip/ZipOutputStream.java

+ 1
- 1
src/main/org/apache/tools/ant/DirectoryScanner.java View File

@@ -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 + "/#*#",


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/Javadoc.java View File

@@ -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"
};


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/Length.java View File

@@ -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.


+ 2
- 2
src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java View File

@@ -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,


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspNameMangler.java View File

@@ -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",


+ 3
- 3
src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java View File

@@ -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",


+ 3
- 3
src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTask.java View File

@@ -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",


+ 1
- 1
src/main/org/apache/tools/ant/util/Base64Converter.java View File

@@ -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




+ 1
- 4
src/main/org/apache/tools/ant/util/CollectionUtils.java View File

@@ -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().


+ 1
- 1
src/main/org/apache/tools/bzip2/BZip2Constants.java View File

@@ -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,


+ 1
- 1
src/main/org/apache/tools/bzip2/CRC.java View File

@@ -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,


+ 6
- 6
src/main/org/apache/tools/zip/ZipOutputStream.java View File

@@ -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.


Loading…
Cancel
Save