Skip to content

Commit 7cecd29

Browse files
fix: Java Version 8
1 parent 9fbdaae commit 7cecd29

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,18 @@ java {
112112
withSourcesJar()
113113
withJavadocJar()
114114

115+
sourceCompatibility = '1.8'
116+
targetCompatibility = '1.8'
115117
// needed for XML-Doclet to work (since Doclet changed again with Java 13)
116118
toolchain {
117119
languageVersion.set(JavaLanguageVersion.of(11))
118120
}
119121
}
120122

123+
compileJava {
124+
options.release = 8
125+
}
126+
121127
javadoc {
122128
if(JavaVersion.current().isJava9Compatible()) {
123129
options.addBooleanOption('html5', true)

src/test/java/net/sf/jsqlparser/util/APISanitationTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ interface Visitor<T> {
3939

4040

4141
public class APISanitationTest {
42-
private final static TreeSet<Class<?>> CLASSES = new TreeSet<>(new Comparator<>() {
42+
private final static TreeSet<Class<?>> CLASSES = new TreeSet<>(new Comparator<Class<?>>() {
4343
@Override
4444
public int compare(Class o1, Class o2) {
4545
return o1.getName().compareTo(o2.getName());
@@ -94,7 +94,7 @@ private static String createClassName(File root, File file) {
9494

9595
@BeforeAll
9696
static void findRelevantClasses() {
97-
findClasses(new Visitor<>() {
97+
findClasses(new Visitor<String>() {
9898
@Override
9999
public boolean visit(String clazz) {
100100
if (clazz.startsWith("net.sf.jsqlparser.statement")
@@ -129,7 +129,7 @@ public boolean visit(String clazz) {
129129
*/
130130

131131
private static Stream<Field> fields() {
132-
TreeSet<Field> fields = new TreeSet<>(new Comparator<>() {
132+
TreeSet<Field> fields = new TreeSet<>(new Comparator<Field>() {
133133
@Override
134134
public int compare(Field o1, Field o2) {
135135
return o1.toString().compareTo(o2.toString());

0 commit comments

Comments
 (0)