drop jsr305 annotations because of javax namespace, fix JDK17 internal reflection access in validation

main 1.0.0
Jörg Prante 2 years ago
parent 085debd1fe
commit 754f1d5873

@ -1,4 +1,3 @@
dependencies {
api libs.jsr305
testImplementation libs.junit4
}

@ -5,8 +5,6 @@ import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import javax.annotation.Nonnull;
import javax.annotation.meta.TypeQualifierNickname;
/**
* A common DslJson annotation to declare that annotated elements cannot be {@code null}.
@ -25,7 +23,5 @@ import javax.annotation.meta.TypeQualifierNickname;
@Target({ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Nonnull
@TypeQualifierNickname
public @interface NonNull {
}

@ -5,8 +5,6 @@ import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import javax.annotation.Nonnull;
import javax.annotation.meta.TypeQualifierDefault;
/**
* A common DslJson annotation to declare that parameters and return values
@ -24,7 +22,5 @@ import javax.annotation.meta.TypeQualifierDefault;
@Target(ElementType.PACKAGE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Nonnull
@TypeQualifierDefault({ElementType.METHOD, ElementType.PARAMETER})
public @interface NonNullApi {
}

@ -5,9 +5,6 @@ import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import javax.annotation.Nonnull;
import javax.annotation.meta.TypeQualifierNickname;
import javax.annotation.meta.When;
/**
* A common DslJson annotation to declare that annotated elements can be {@code null} under
@ -26,7 +23,5 @@ import javax.annotation.meta.When;
@Target({ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Nonnull(when = When.MAYBE)
@TypeQualifierNickname
public @interface Nullable {
}

@ -1,5 +1,4 @@
dependencies {
testCompileOnly libs.jsr305
testImplementation libs.junit4
testImplementation libs.google.truth
testImplementation libs.burst.junit4

@ -1,5 +1,4 @@
dependencies {
api libs.jsr305
testImplementation libs.assertj
testImplementation libs.compile.testing
}

@ -1,4 +1,3 @@
module org.xbib.datastructures.validation {
requires org.xbib.annotation;
requires java.compiler;
}

@ -6,9 +6,6 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.xbib.annotation.Nonnull;
import org.xbib.annotation.meta.TypeQualifierNickname;
/**
* A common annotation (similar to Spring ones) to declare that annotated elements
* cannot be {@code null}. Leverages JSR 305 meta-annotations to indicate nullability in
@ -29,7 +26,5 @@ import org.xbib.annotation.meta.TypeQualifierNickname;
@Target({ ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Nonnull
@TypeQualifierNickname
public @interface NonNull {
}

@ -6,9 +6,6 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.xbib.annotation.Nonnull;
import org.xbib.annotation.meta.TypeQualifierDefault;
/**
* A common annotation (similar to Spring one) to declare that parameters and return
* values are to be considered as non-nullable by default for a given package. Leverages
@ -25,7 +22,5 @@ import org.xbib.annotation.meta.TypeQualifierDefault;
@Target(ElementType.PACKAGE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Nonnull
@TypeQualifierDefault({ ElementType.METHOD, ElementType.PARAMETER })
public @interface NonNullApi {
}

@ -6,10 +6,6 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.xbib.annotation.Nonnull;
import org.xbib.annotation.meta.TypeQualifierNickname;
import org.xbib.annotation.meta.When;
/**
* A common annotation (similar to Spring ones) to declare that annotated elements
* can be {@code null} under some circumstance. Leverages JSR 305 meta-annotations to
@ -29,7 +25,5 @@ import org.xbib.annotation.meta.When;
@Target({ ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Nonnull(when = When.MAYBE)
@TypeQualifierNickname
public @interface Nullable {
}

@ -17,6 +17,8 @@ test {
'--add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED',
'--add-opens=java.base/java.lang=ALL-UNNAMED',
'--add-opens=java.base/java.lang.reflect=ALL-UNNAMED',
'--add-opens=java.base/java.io=ALL-UNNAMED',

@ -12,7 +12,6 @@ dependencyResolutionManagement {
library('junit4', 'junit', 'junit').version('4.13.2')
library('chronicle-core', 'net.openhft', 'chronicle-core').version('2.21ea14')
library('affinity', 'net.openhft', 'affinity').version('3.21ea0')
library('jsr305', 'org.xbib', 'jsr-305').version('2.0.0')
library('javassist', 'org.javassist', 'javassist').version('3.28.0-GA')
library('jackson', 'com.fasterxml.jackson.core', 'jackson-databind').versionRef('jackson')
library('gson', 'com.google.code.gson', 'gson').version('2.8.9')

Loading…
Cancel
Save