Skip to content

Commit

Permalink
fix location of spotbugs filter
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
  • Loading branch information
lukasj committed Oct 20, 2023
1 parent 9ed3ea4 commit 6c73c4a
Show file tree
Hide file tree
Showing 34 changed files with 433 additions and 256 deletions.
124 changes: 62 additions & 62 deletions FIME/src/com/sun/xml/fime/DecoderStateTables.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -14,34 +14,34 @@ public class DecoderStateTables {
private static int RANGE_INDEX_END = 0;
private static int RANGE_INDEX_VALUE = 1;

public final static int STATE_ILLEGAL = 255;
public final static int STATE_UNSUPPORTED = 254;
public static final int STATE_ILLEGAL = 255;
public static final int STATE_UNSUPPORTED = 254;

// EII child states
public final static int EII_NO_AIIS_INDEX_SMALL = 0;
public final static int EII_AIIS_INDEX_SMALL = 1;
public final static int EII_INDEX_MEDIUM = 2;
public final static int EII_INDEX_LARGE = 3;
public final static int EII_NAMESPACES = 4;
public final static int EII_LITERAL = 5;
public final static int CII_UTF8_SMALL_LENGTH = 6;
public final static int CII_UTF8_MEDIUM_LENGTH = 7;
public final static int CII_UTF8_LARGE_LENGTH = 8;
public final static int CII_UTF16_SMALL_LENGTH = 9;
public final static int CII_UTF16_MEDIUM_LENGTH = 10;
public final static int CII_UTF16_LARGE_LENGTH = 11;
public final static int CII_RA = 12;
public final static int CII_EA = 13;
public final static int CII_INDEX_SMALL = 14;
public final static int CII_INDEX_MEDIUM = 15;
public final static int CII_INDEX_LARGE = 16;
public final static int CII_INDEX_LARGE_LARGE = 17;
public final static int COMMENT_II = 18;
public final static int PROCESSING_INSTRUCTION_II = 19;
public final static int DOCUMENT_TYPE_DECLARATION_II = 20;
public final static int UNEXPANDED_ENTITY_REFERENCE_II = 21;
public final static int TERMINATOR_SINGLE = 22;
public final static int TERMINATOR_DOUBLE = 23;
public static final int EII_NO_AIIS_INDEX_SMALL = 0;
public static final int EII_AIIS_INDEX_SMALL = 1;
public static final int EII_INDEX_MEDIUM = 2;
public static final int EII_INDEX_LARGE = 3;
public static final int EII_NAMESPACES = 4;
public static final int EII_LITERAL = 5;
public static final int CII_UTF8_SMALL_LENGTH = 6;
public static final int CII_UTF8_MEDIUM_LENGTH = 7;
public static final int CII_UTF8_LARGE_LENGTH = 8;
public static final int CII_UTF16_SMALL_LENGTH = 9;
public static final int CII_UTF16_MEDIUM_LENGTH = 10;
public static final int CII_UTF16_LARGE_LENGTH = 11;
public static final int CII_RA = 12;
public static final int CII_EA = 13;
public static final int CII_INDEX_SMALL = 14;
public static final int CII_INDEX_MEDIUM = 15;
public static final int CII_INDEX_LARGE = 16;
public static final int CII_INDEX_LARGE_LARGE = 17;
public static final int COMMENT_II = 18;
public static final int PROCESSING_INSTRUCTION_II = 19;
public static final int DOCUMENT_TYPE_DECLARATION_II = 20;
public static final int UNEXPANDED_ENTITY_REFERENCE_II = 21;
public static final int TERMINATOR_SINGLE = 22;
public static final int TERMINATOR_DOUBLE = 23;

public static final int[] DII = new int[256];

Expand Down Expand Up @@ -323,12 +323,12 @@ public class DecoderStateTables {


// AII states
public final static int AII_INDEX_SMALL = 0;
public final static int AII_INDEX_MEDIUM = 1;
public final static int AII_INDEX_LARGE = 2;
public final static int AII_LITERAL = 3;
public final static int AII_TERMINATOR_SINGLE = 4;
public final static int AII_TERMINATOR_DOUBLE = 5;
public static final int AII_INDEX_SMALL = 0;
public static final int AII_INDEX_MEDIUM = 1;
public static final int AII_INDEX_LARGE = 2;
public static final int AII_LITERAL = 3;
public static final int AII_TERMINATOR_SINGLE = 4;
public static final int AII_TERMINATOR_DOUBLE = 5;

public static final int[] AII = new int[256];

Expand Down Expand Up @@ -372,18 +372,18 @@ public class DecoderStateTables {


// AII value states
public final static int NISTRING_UTF8_SMALL_LENGTH = 0;
public final static int NISTRING_UTF8_MEDIUM_LENGTH = 1;
public final static int NISTRING_UTF8_LARGE_LENGTH = 2;
public final static int NISTRING_UTF16_SMALL_LENGTH = 3;
public final static int NISTRING_UTF16_MEDIUM_LENGTH = 4;
public final static int NISTRING_UTF16_LARGE_LENGTH = 5;
public final static int NISTRING_RA = 6;
public final static int NISTRING_EA = 7;
public final static int NISTRING_INDEX_SMALL = 8;
public final static int NISTRING_INDEX_MEDIUM = 9;
public final static int NISTRING_INDEX_LARGE = 10;
public final static int NISTRING_EMPTY = 11;
public static final int NISTRING_UTF8_SMALL_LENGTH = 0;
public static final int NISTRING_UTF8_MEDIUM_LENGTH = 1;
public static final int NISTRING_UTF8_LARGE_LENGTH = 2;
public static final int NISTRING_UTF16_SMALL_LENGTH = 3;
public static final int NISTRING_UTF16_MEDIUM_LENGTH = 4;
public static final int NISTRING_UTF16_LARGE_LENGTH = 5;
public static final int NISTRING_RA = 6;
public static final int NISTRING_EA = 7;
public static final int NISTRING_INDEX_SMALL = 8;
public static final int NISTRING_INDEX_MEDIUM = 9;
public static final int NISTRING_INDEX_LARGE = 10;
public static final int NISTRING_EMPTY = 11;

public static final int[] NISTRING = new int[256];

Expand Down Expand Up @@ -495,12 +495,12 @@ public class DecoderStateTables {
};


public final static int ISTRING_SMALL_LENGTH = 0;
public final static int ISTRING_MEDIUM_LENGTH = 1;
public final static int ISTRING_LARGE_LENGTH = 2;
public final static int ISTRING_INDEX_SMALL = 3;
public final static int ISTRING_INDEX_MEDIUM = 4;
public final static int ISTRING_INDEX_LARGE = 5;
public static final int ISTRING_SMALL_LENGTH = 0;
public static final int ISTRING_MEDIUM_LENGTH = 1;
public static final int ISTRING_LARGE_LENGTH = 2;
public static final int ISTRING_INDEX_SMALL = 3;
public static final int ISTRING_INDEX_MEDIUM = 4;
public static final int ISTRING_INDEX_LARGE = 5;

public static final int[] ISTRING = new int[256];

Expand Down Expand Up @@ -534,11 +534,11 @@ public class DecoderStateTables {
};


public final static int ISTRING_PREFIX_NAMESPACE_LENGTH_3 = 6;
public final static int ISTRING_PREFIX_NAMESPACE_LENGTH_5 = 7;
public final static int ISTRING_PREFIX_NAMESPACE_LENGTH_29 = 8;
public final static int ISTRING_PREFIX_NAMESPACE_LENGTH_36 = 9;
public final static int ISTRING_PREFIX_NAMESPACE_INDEX_ZERO = 10;
public static final int ISTRING_PREFIX_NAMESPACE_LENGTH_3 = 6;
public static final int ISTRING_PREFIX_NAMESPACE_LENGTH_5 = 7;
public static final int ISTRING_PREFIX_NAMESPACE_LENGTH_29 = 8;
public static final int ISTRING_PREFIX_NAMESPACE_LENGTH_36 = 9;
public static final int ISTRING_PREFIX_NAMESPACE_INDEX_ZERO = 10;

public static final int[] ISTRING_PREFIX_NAMESPACE = new int[256];

Expand Down Expand Up @@ -602,12 +602,12 @@ public class DecoderStateTables {
};

// UTF-8 states
public final static int UTF8_NCNAME_NCNAME = 0;
public final static int UTF8_NCNAME_NCNAME_CHAR = 1;
public final static int UTF8_TWO_BYTES = 2;
public final static int UTF8_THREE_BYTES = 3;
public static final int UTF8_NCNAME_NCNAME = 0;
public static final int UTF8_NCNAME_NCNAME_CHAR = 1;
public static final int UTF8_TWO_BYTES = 2;
public static final int UTF8_THREE_BYTES = 3;
// Supplementary UTF-8
// public final static int UTF8_FOUR_BYTES = 4;
// public static final int UTF8_FOUR_BYTES = 4;

public static final int[] UTF8_NCNAME = new int[256];

Expand Down Expand Up @@ -680,7 +680,7 @@ public class DecoderStateTables {
{ 0xFF, STATE_ILLEGAL }
};

public final static int UTF8_ONE_BYTE = 1;
public static final int UTF8_ONE_BYTE = 1;

public static final int[] UTF8 = new int[256];

Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -16,26 +16,26 @@

public final class BuiltInEncodingAlgorithmFactory {

public final static BuiltInEncodingAlgorithm[] table =
public static final BuiltInEncodingAlgorithm[] table =
new BuiltInEncodingAlgorithm[EncodingConstants.ENCODING_ALGORITHM_BUILTIN_END + 1];

public final static HexadecimalEncodingAlgorithm hexadecimalEncodingAlgorithm = new HexadecimalEncodingAlgorithm();
public static final HexadecimalEncodingAlgorithm hexadecimalEncodingAlgorithm = new HexadecimalEncodingAlgorithm();

public final static BASE64EncodingAlgorithm base64EncodingAlgorithm = new BASE64EncodingAlgorithm();
public static final BASE64EncodingAlgorithm base64EncodingAlgorithm = new BASE64EncodingAlgorithm();

public final static BooleanEncodingAlgorithm booleanEncodingAlgorithm = new BooleanEncodingAlgorithm();
public static final BooleanEncodingAlgorithm booleanEncodingAlgorithm = new BooleanEncodingAlgorithm();

public final static ShortEncodingAlgorithm shortEncodingAlgorithm = new ShortEncodingAlgorithm();
public static final ShortEncodingAlgorithm shortEncodingAlgorithm = new ShortEncodingAlgorithm();

public final static IntEncodingAlgorithm intEncodingAlgorithm = new IntEncodingAlgorithm();
public static final IntEncodingAlgorithm intEncodingAlgorithm = new IntEncodingAlgorithm();

public final static LongEncodingAlgorithm longEncodingAlgorithm = new LongEncodingAlgorithm();
public static final LongEncodingAlgorithm longEncodingAlgorithm = new LongEncodingAlgorithm();

public final static FloatEncodingAlgorithm floatEncodingAlgorithm = new FloatEncodingAlgorithm();
public static final FloatEncodingAlgorithm floatEncodingAlgorithm = new FloatEncodingAlgorithm();

public final static DoubleEncodingAlgorithm doubleEncodingAlgorithm = new DoubleEncodingAlgorithm();
public static final DoubleEncodingAlgorithm doubleEncodingAlgorithm = new DoubleEncodingAlgorithm();

public final static UUIDEncodingAlgorithm uuidEncodingAlgorithm = new UUIDEncodingAlgorithm();
public static final UUIDEncodingAlgorithm uuidEncodingAlgorithm = new UUIDEncodingAlgorithm();

static {
table[EncodingAlgorithmIndexes.HEXADECIMAL] = hexadecimalEncodingAlgorithm;
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -11,10 +11,10 @@
package com.sun.xml.fime.algorithm;

public abstract class IEEE754FloatingPointEncodingAlgorithm extends BuiltInEncodingAlgorithm {
public final static int FLOAT_SIZE = 4;
public final static int DOUBLE_SIZE = 8;
public static final int FLOAT_SIZE = 4;
public static final int DOUBLE_SIZE = 8;

public final static int FLOAT_MAX_CHARACTER_SIZE = 14;
public final static int DOUBLE_MAX_CHARACTER_SIZE = 24;
public static final int FLOAT_MAX_CHARACTER_SIZE = 14;
public static final int DOUBLE_MAX_CHARACTER_SIZE = 24;

}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -11,12 +11,12 @@
package com.sun.xml.fime.algorithm;

public abstract class IntegerEncodingAlgorithm extends BuiltInEncodingAlgorithm {
public final static int SHORT_SIZE = 2;
public final static int INT_SIZE = 4;
public final static int LONG_SIZE = 8;
public static final int SHORT_SIZE = 2;
public static final int INT_SIZE = 4;
public static final int LONG_SIZE = 8;

public final static int SHORT_MAX_CHARACTER_SIZE = 6;
public final static int INT_MAX_CHARACTER_SIZE = 11;
public final static int LONG_MAX_CHARACTER_SIZE = 20;
public static final int SHORT_MAX_CHARACTER_SIZE = 6;
public static final int INT_MAX_CHARACTER_SIZE = 11;
public static final int LONG_MAX_CHARACTER_SIZE = 20;

}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -15,7 +15,7 @@


public final class BuiltInRestrictedAlphabets {
public final static char[][] table =
public static final char[][] table =
new char[EncodingConstants.RESTRICTED_ALPHABET_BUILTIN_END + 1][];

static {
Expand Down
4 changes: 2 additions & 2 deletions FIME/src/com/sun/xml/fime/vocab/SerializerVocabulary.java
Expand Up @@ -19,8 +19,8 @@


public class SerializerVocabulary extends Vocabulary {
public final static int ATTRIBUTE_VALUE_SIZE_CONSTRAINT = 7;
public final static int CHARACTER_CONTENT_CHUNK_SIZE_CONSTRAINT = 7;
public static final int ATTRIBUTE_VALUE_SIZE_CONSTRAINT = 7;
public static final int CHARACTER_CONTENT_CHUNK_SIZE_CONSTRAINT = 7;

public final StringIntMap restrictedAlphabet;
public final StringIntMap encodingAlgorithm;
Expand Down
4 changes: 2 additions & 2 deletions FIME/src/org/xml/sax/helpers/NamespaceSupport.java
Expand Up @@ -86,7 +86,7 @@ public class NamespaceSupport
* <p>This is the Namespace URI that is automatically mapped
* to the "xml" prefix.</p>
*/
public final static String XMLNS =
public static final String XMLNS =
"http://www.w3.org/XML/1998/namespace";


Expand All @@ -106,7 +106,7 @@ public class NamespaceSupport
* @see #setNamespaceDeclUris
* @see #isNamespaceDeclUris
*/
public final static String NSDECL =
public static final String NSDECL =
"http://www.w3.org/xmlns/2000/";


Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -85,7 +85,7 @@
<copyright.scmonly>true</copyright.scmonly>
<copyright.template>${project.build.commonResourcesDirectory}/config/copyright.txt</copyright.template>
<copyright.update>false</copyright.update>
<spotbugs.common>${project.build.commonResourcesDirectory}/config/spotbugs-exclude.xml</spotbugs.common>
<spotbugs.exclude>${project.build.commonResourcesDirectory}/config/spotbugs-exclude.xml</spotbugs.exclude>
<spotbugs.skip>false</spotbugs.skip>
<spotbugs.threshold>Low</spotbugs.threshold>
<spotbugs.version>4.7.3.6</spotbugs.version>
Expand Down
Expand Up @@ -35,7 +35,10 @@
* @author Alexey Stashok
*/
public class AllRoundTripTest {


public AllRoundTripTest() {
}

private RoundTripRtt[] roundTripTests = new RoundTripRtt[] {
new SAXRoundTripRtt(), new StAXRoundTripRtt(), new DOMRoundTripRtt(),
new DOMSAXRoundTripRtt(), new SAXStAXDiffRtt()};
Expand Down Expand Up @@ -67,17 +70,15 @@ private void cleanupDiffs(File testSrcFile) {
testSrcFile = testSrcFile.getParentFile();
}

FileUtils.removeFileRecursivelly(testSrcFile, new FileFilter() {
public boolean accept(File file) {
if (file.isDirectory()) {
return !file.getName().equals(".") && !file.getName().equals("..");
} else if (file.isFile()) {
String filename = file.getName();
return filename.endsWith(".finf") || filename.endsWith(".sax-event") ||
filename.contains(".diff");
}
return false;
FileUtils.removeFileRecursivelly(testSrcFile, file -> {
if (file.isDirectory()) {
return !file.getName().equals(".") && !file.getName().equals("..");
} else if (file.isFile()) {
String filename = file.getName();
return filename.endsWith(".finf") || filename.endsWith(".sax-event") ||
filename.contains(".diff");
}
return false;
});
}

Expand Down

0 comments on commit 6c73c4a

Please sign in to comment.