Skip to content

Commit

Permalink
Issue #14877: drop java 14 build
Browse files Browse the repository at this point in the history
  • Loading branch information
strkkk authored and nrmancuso committed May 26, 2024
1 parent 8a4b406 commit 15e0c7e
Show file tree
Hide file tree
Showing 212 changed files with 257 additions and 274 deletions.
15 changes: 0 additions & 15 deletions .ci/validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -536,21 +536,6 @@ javac11)
done
;;

javac14)
files=($(grep -Rl --include='*.java' ': Compilable with Java14' \
src/test/resources-noncompilable \
src/xdocs-examples/resources-noncompilable || true))
if [[ ${#files[@]} -eq 0 ]]; then
echo "No Java14 files to process"
else
mkdir -p target
for file in "${files[@]}"
do
javac --release 14 --enable-preview -d target "${file}"
done
fi
;;

javac17)
files=($(grep -Rl --include='*.java' ': Compilable with Java17' \
src/test/resources-noncompilable \
Expand Down
4 changes: 0 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,6 @@ workflows:
- validate-with-script:
name: "javac11"
command: "./.ci/validation.sh javac11"
- validate-with-script:
name: "javac14"
image-name: "cimg/openjdk:14.0.2"
command: "./.ci/validation.sh javac14"
- validate-with-script:
name: "javac17"
image-name: "cimg/openjdk:17.0.5"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.naming.recordcomponentname;

/* Config:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.google.checkstyle.test.chapter5naming.rule527localvariablenames;

import java.util.ArrayList;
import java.util.*;
import java.util.Locale;

public class InputPatternVariableNameEnhancedInstanceofTestDefault {
Expand Down Expand Up @@ -42,7 +42,7 @@ public void t(Object o1, Object o2) {
}
b = ((VoidPredicate) () -> o1 instanceof String s).get();

ArrayList<Integer> arrayList = new ArrayList<Integer>();
List<Integer> arrayList = new ArrayList<Integer>();
if (arrayList instanceof ArrayList<Integer> ai) {
System.out.println("Blah");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.naming.recordtypeparametername;

import java.io.Serializable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17

package org.checkstyle.suppressionxpathfilter.covariantequals;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package org.checkstyle.suppressionxpathfilter.illegalidentifiername;

/* Config:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package org.checkstyle.suppressionxpathfilter.illegalidentifiername;

/* Config:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.naming;

public class InputXpathPatternVariableNameFour {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.naming;

public class InputXpathPatternVariableNameOne {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.naming;

public class InputXpathPatternVariableNameThree {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.naming;

public class InputXpathPatternVariableNameTwo {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.sizes.recordcomponentname;

/* Config: default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.sizes.recordcomponentname;

/* Config:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.sizes.recordcomponentnumber;

/* Config:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.sizes.recordcomponentnumber;

/* Config:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.naming.classtypeparametername;

import java.io.Serializable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.naming.classtypeparametername;

public record InputXpathRecordTypeParameterNameTypeDefault<t>(Integer x, String str) { // warn
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package org.checkstyle.suppressionxpathfilter.staticvariablename;

public class InputXpathStaticVariableNameInnerClassField {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package org.checkstyle.suppressionxpathfilter.staticvariablename;

public class InputXpathStaticVariableNameNoAccessModifier {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,11 @@ public void testClearDataBetweenFiles() throws Exception {
@Test
public void testIllegalTypeEnhancedInstanceof() throws Exception {
final String[] expected = {
"28:9: " + getCheckMessage(MSG_KEY, "LinkedHashMap"),
"31:28: " + getCheckMessage(MSG_KEY, "LinkedHashMap"),
"35:35: " + getCheckMessage(MSG_KEY, "HashMap"),
"40:52: " + getCheckMessage(MSG_KEY, "TreeSet"),
"41:32: " + getCheckMessage(MSG_KEY, "TreeSet"),
"29:9: " + getCheckMessage(MSG_KEY, "LinkedHashMap"),
"32:28: " + getCheckMessage(MSG_KEY, "LinkedHashMap"),
"36:35: " + getCheckMessage(MSG_KEY, "HashMap"),
"41:52: " + getCheckMessage(MSG_KEY, "TreeSet"),
"43:28: " + getCheckMessage(MSG_KEY, "TreeSet"),
};

verifyWithInlineConfigParser(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17

public class InputAstTreeStringPrinterTextBlocksEscapesAreOneChar {
String emptyTextBlock = """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.annotation.annotationlocation;

public class InputAnnotationLocationRecordsAndCompactCtors {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.annotation.annotationonsameline;

public class InputAnnotationOnSameLineRecordsAndCompactCtors {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.annotation.suppresswarnings;

import java.lang.annotation.Documented;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.avoidescapedunicodecharacters;

public class InputAvoidEscapedUnicodeCharactersEscapedS {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.avoidescapedunicodecharacters;

public class InputAvoidEscapedUnicodeCharactersTextBlocks {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.avoidescapedunicodecharacters;

public class InputAvoidEscapedUnicodeCharactersTextBlocksAllowByComment {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.blocks.emptyblock;

public class InputEmptyBlockSwitchExpressions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.blocks.leftcurly;

import org.w3c.dom.Node;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.blocks.leftcurly;

public class InputLeftCurlyTestSwitchExpressions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.blocks.leftcurly;
// violation below ''{' at column 57 should be on a new line'
public class InputLeftCurlyTestSwitchExpressionsNewLine {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.blocks.needbraces;

public class InputNeedBracesTestSwitchExpression {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.blocks.needbraces;

public class InputNeedBracesTestSwitchExpressionNoSingleLine {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly;

public class InputRightCurlyCaseBlocksWithSwitchExpressionAlone {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly;

public class InputRightCurlyCaseBlocksWithSwitchExpressionAloneOrSingleline {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly;

public class InputRightCurlyCaseBlocksWithSwitchRuleAlone {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly;

public class InputRightCurlyCaseBlocksWithSwitchRuleAloneOrSingleline {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly;

import org.w3c.dom.Node;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly;

public class InputRightCurlyTestSwitchExpression {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly;

public class InputRightCurlyTestSwitchExpression2 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly;

public class InputRightCurlyTestSwitchExpression3 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly;

public class InputRightCurlyTestSwitchExpression4 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly;

public class InputRightCurlyTestSwitchExpression6 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

//non-compiled with javac: Compilable with Java14
//non-compiled with javac: Compilable with Java17
package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly;

public class InputRightCurlyTestSwitchExpression7 {
Expand Down
Loading

0 comments on commit 15e0c7e

Please sign in to comment.