diff --git a/examples/maven/hello/src/main/java/org/lastnpe/examples/hello/GenericsExample.java b/examples/maven/hello/src/main/java/org/lastnpe/examples/hello/GenericsExample.java index a844ee512..35cfc4440 100644 --- a/examples/maven/hello/src/main/java/org/lastnpe/examples/hello/GenericsExample.java +++ b/examples/maven/hello/src/main/java/org/lastnpe/examples/hello/GenericsExample.java @@ -1,17 +1,11 @@ package org.lastnpe.examples.hello; -import org.eclipse.jdt.annotation.NonNull; - @SuppressWarnings("unused") public class GenericsExample { private static class Parent { } - // Null constraint mismatch: The type 'T' is not a valid substitute for the type parameter '@NonNull T' - // This seems wrong, because the mouse over hover clearly shows Parent<@NonNull T> (from @NonNullByDefault) and Child<@NonNull T> - // Workaround "Child<@NonNull T>" makes it disappear, but why is this needed? - // TODO Is this https://bugs.eclipse.org/bugs/show_bug.cgi?id=522142 ? - private static class Child<@NonNull T> extends Parent { + private static class Child extends Parent { } } diff --git a/examples/maven/jdt-ecj-settings/org.eclipse.jdt.core.prefs b/examples/maven/jdt-ecj-settings/org.eclipse.jdt.core.prefs index dabcefcb3..8173d1ae9 100644 --- a/examples/maven/jdt-ecj-settings/org.eclipse.jdt.core.prefs +++ b/examples/maven/jdt-ecj-settings/org.eclipse.jdt.core.prefs @@ -8,8 +8,8 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable org.eclipse.jdt.core.compiler.annotation.nullable.secondary=javax.annotation.Nullable org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.comparingIdentical=error @@ -57,7 +57,7 @@ org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warnin org.eclipse.jdt.core.compiler.problem.potentialNullReference=error org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning -org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=error +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore @@ -95,4 +95,4 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.source=17 diff --git a/examples/maven/jdt-ecj-settings/pom.xml b/examples/maven/jdt-ecj-settings/pom.xml index e76a4e0c1..d7837d8ca 100644 --- a/examples/maven/jdt-ecj-settings/pom.xml +++ b/examples/maven/jdt-ecj-settings/pom.xml @@ -32,7 +32,7 @@ org.apache.maven.plugins maven-resources-plugin - 3.0.1 + 3.3.1 @@ -47,7 +47,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.19.1 + 3.5.0 @@ -59,6 +59,7 @@ org.apache.maven.plugins maven-deploy-plugin + 3.1.3 true diff --git a/examples/maven/pom.xml b/examples/maven/pom.xml index c329b1d19..fc8cf51da 100644 --- a/examples/maven/pom.xml +++ b/examples/maven/pom.xml @@ -1,5 +1,8 @@ - + + 4.0.0 @@ -22,19 +25,17 @@ - 11 + 17 UTF-8 - + org.eclipse.jdt org.eclipse.jdt.annotation - 2.1.0 + 2.3.0 provided @@ -57,59 +58,31 @@ org.slf4j slf4j-api - 1.7.21 + 2.0.16 org.lastnpe.eea - jdk-eea + java-${eea.java.version}-eea ${project.version} provided org.lastnpe.eea - slf4j-api-eea + slf4j-api-2-eea ${project.version} provided - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-dependency-plugin - [2.10,) - - unpack - - - - - - - - - - - - org.apache.maven.plugins maven-dependency-plugin - 3.0.2 + + unpack-jdt-ecj-settings unpack @@ -132,45 +105,55 @@ + + + maven-toolchains-plugin + + + toolchain@validate + none + + + maven-compiler-plugin - 3.8.1 ${eea.java.version} true - - true + false jdt - - - CLASSPATH - ${project.build.directory}/org.eclipse.jdt.core.prefs + -annotationpath + CLASSPATH + + -properties + ${project.build.directory}/org.eclipse.jdt.core.prefs - - - false + -err:nullAnnot,null,-missingNullDefault + --> + org.eclipse.tycho tycho-compiler-jdt - 2.0.0 + 3.0.5 - + org.lastnpe.examples jdt-ecj-settings ${project.version} diff --git a/pom.xml b/pom.xml index 9d8a15398..f6d8b3d60 100644 --- a/pom.xml +++ b/pom.xml @@ -144,7 +144,7 @@ generator libraries eea-all - + examples/maven