diff --git a/applications/graph-store-catalog/build.gradle b/applications/graph-store-catalog/build.gradle index 9f19788d2a5..23b8759b493 100644 --- a/applications/graph-store-catalog/build.gradle +++ b/applications/graph-store-catalog/build.gradle @@ -12,6 +12,7 @@ dependencies { annotationProcessor group: 'org.immutables', name: 'value', version: ver.'immutables' compileOnly group: 'org.immutables', name: 'value-annotations', version: ver.'immutables' compileOnly group: 'org.jetbrains', name: 'annotations', version: ver.'jetbrains-annotations' + compileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: ver.'spotbugsToolVersion' // DependencyResolver, which we should get rid of compileOnly(group: 'org.neo4j', name: 'neo4j-common', version: ver.'neo4j') { transitive = false } @@ -48,6 +49,8 @@ dependencies { implementation project(':termination') implementation project(':transaction') + testCompileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: ver.'spotbugsToolVersion' + testImplementation group: 'org.assertj', name: 'assertj-core', version: ver.'assertj' testImplementation platform(dep.junit5bom) testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: ver.'junit5bom' diff --git a/compatibility/5.10/storage-engine-adapter/build.gradle b/compatibility/5.10/storage-engine-adapter/build.gradle index 2420a8e8c7e..759ee17b945 100644 --- a/compatibility/5.10/storage-engine-adapter/build.gradle +++ b/compatibility/5.10/storage-engine-adapter/build.gradle @@ -58,6 +58,7 @@ if (ver.'neo4j'.startsWith('5.')) { java17CompileOnly group: 'org.immutables', name: 'value-annotations', version: ver.'immutables' java17CompileOnly group: 'org.neo4j', name: 'neo4j', version: neos.'5.10' java17CompileOnly group: 'org.neo4j', name: 'neo4j-record-storage-engine', version: neos.'5.10' + java17CompileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: ver.'spotbugsToolVersion' java17Implementation project(':core') java17Implementation project(':storage-engine-adapter-api') diff --git a/compatibility/5.11/storage-engine-adapter/build.gradle b/compatibility/5.11/storage-engine-adapter/build.gradle index 6348a0d44ab..a91e580cafb 100644 --- a/compatibility/5.11/storage-engine-adapter/build.gradle +++ b/compatibility/5.11/storage-engine-adapter/build.gradle @@ -58,6 +58,7 @@ if (ver.'neo4j'.startsWith('5.')) { java17CompileOnly group: 'org.immutables', name: 'value-annotations', version: ver.'immutables' java17CompileOnly group: 'org.neo4j', name: 'neo4j', version: neos.'5.11' java17CompileOnly group: 'org.neo4j', name: 'neo4j-record-storage-engine', version: neos.'5.11' + java17CompileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: ver.'spotbugsToolVersion' java17Implementation project(':core') java17Implementation project(':storage-engine-adapter-api') diff --git a/compatibility/5.12/storage-engine-adapter/build.gradle b/compatibility/5.12/storage-engine-adapter/build.gradle index ffcf9035652..3c3c447c648 100644 --- a/compatibility/5.12/storage-engine-adapter/build.gradle +++ b/compatibility/5.12/storage-engine-adapter/build.gradle @@ -58,6 +58,7 @@ if (ver.'neo4j'.startsWith('5.')) { java17CompileOnly group: 'org.immutables', name: 'value-annotations', version: ver.'immutables' java17CompileOnly group: 'org.neo4j', name: 'neo4j', version: neos.'5.12' java17CompileOnly group: 'org.neo4j', name: 'neo4j-record-storage-engine', version: neos.'5.12' + java17CompileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: ver.'spotbugsToolVersion' java17Implementation project(':core') java17Implementation project(':storage-engine-adapter-api') diff --git a/compatibility/5.13/storage-engine-adapter/build.gradle b/compatibility/5.13/storage-engine-adapter/build.gradle index 78ca9c2c7d8..cd9f38da75c 100644 --- a/compatibility/5.13/storage-engine-adapter/build.gradle +++ b/compatibility/5.13/storage-engine-adapter/build.gradle @@ -58,6 +58,7 @@ if (ver.'neo4j'.startsWith('5.')) { java17CompileOnly group: 'org.immutables', name: 'value-annotations', version: ver.'immutables' java17CompileOnly group: 'org.neo4j', name: 'neo4j', version: neos.'5.13' java17CompileOnly group: 'org.neo4j', name: 'neo4j-record-storage-engine', version: neos.'5.13' + java17CompileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: ver.'spotbugsToolVersion' java17Implementation project(':core') java17Implementation project(':storage-engine-adapter-api') diff --git a/compatibility/5.14/storage-engine-adapter/build.gradle b/compatibility/5.14/storage-engine-adapter/build.gradle index 9c69e1d2b5a..b99a1e04d50 100644 --- a/compatibility/5.14/storage-engine-adapter/build.gradle +++ b/compatibility/5.14/storage-engine-adapter/build.gradle @@ -58,6 +58,7 @@ if (ver.'neo4j'.startsWith('5.')) { java17CompileOnly group: 'org.immutables', name: 'value-annotations', version: ver.'immutables' java17CompileOnly group: 'org.neo4j', name: 'neo4j', version: neos.'5.14' java17CompileOnly group: 'org.neo4j', name: 'neo4j-record-storage-engine', version: neos.'5.14' + java17CompileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: ver.'spotbugsToolVersion' java17Implementation project(':core') java17Implementation project(':storage-engine-adapter-api') diff --git a/compatibility/5.15/storage-engine-adapter/build.gradle b/compatibility/5.15/storage-engine-adapter/build.gradle index 8f1c8fa2c3c..24b364abd79 100644 --- a/compatibility/5.15/storage-engine-adapter/build.gradle +++ b/compatibility/5.15/storage-engine-adapter/build.gradle @@ -58,6 +58,7 @@ if (ver.'neo4j'.startsWith('5.')) { java17CompileOnly group: 'org.immutables', name: 'value-annotations', version: ver.'immutables' java17CompileOnly group: 'org.neo4j', name: 'neo4j', version: neos.'5.15' java17CompileOnly group: 'org.neo4j', name: 'neo4j-record-storage-engine', version: neos.'5.15' + java17CompileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: ver.'spotbugsToolVersion' java17Implementation project(':core') java17Implementation project(':storage-engine-adapter-api') diff --git a/compatibility/5.6/storage-engine-adapter/build.gradle b/compatibility/5.6/storage-engine-adapter/build.gradle index 65388f3b43d..83f67e50a9e 100644 --- a/compatibility/5.6/storage-engine-adapter/build.gradle +++ b/compatibility/5.6/storage-engine-adapter/build.gradle @@ -59,6 +59,7 @@ if (ver.'neo4j'.startsWith('5.')) { java17CompileOnly group: 'org.immutables', name: 'value-annotations', version: ver.'immutables' java17CompileOnly group: 'org.neo4j', name: 'neo4j', version: neos.'5.6' java17CompileOnly group: 'org.neo4j', name: 'neo4j-record-storage-engine', version: neos.'5.6' + java17CompileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: ver.'spotbugsToolVersion' java17Implementation project(':core') java17Implementation project(':storage-engine-adapter-api') diff --git a/compatibility/5.7/storage-engine-adapter/build.gradle b/compatibility/5.7/storage-engine-adapter/build.gradle index a2ccf1ca566..83b4ef5ffbc 100644 --- a/compatibility/5.7/storage-engine-adapter/build.gradle +++ b/compatibility/5.7/storage-engine-adapter/build.gradle @@ -59,6 +59,7 @@ if (ver.'neo4j'.startsWith('5.')) { java17CompileOnly group: 'org.immutables', name: 'value-annotations', version: ver.'immutables' java17CompileOnly group: 'org.neo4j', name: 'neo4j', version: neos.'5.7' java17CompileOnly group: 'org.neo4j', name: 'neo4j-record-storage-engine', version: neos.'5.7' + java17CompileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: ver.'spotbugsToolVersion' java17Implementation project(':core') java17Implementation project(':storage-engine-adapter-api') diff --git a/compatibility/5.8/storage-engine-adapter/build.gradle b/compatibility/5.8/storage-engine-adapter/build.gradle index 0d027ae4e01..c9c83bc45cb 100644 --- a/compatibility/5.8/storage-engine-adapter/build.gradle +++ b/compatibility/5.8/storage-engine-adapter/build.gradle @@ -59,6 +59,7 @@ if (ver.'neo4j'.startsWith('5.')) { java17CompileOnly group: 'org.immutables', name: 'value-annotations', version: ver.'immutables' java17CompileOnly group: 'org.neo4j', name: 'neo4j', version: neos.'5.8' java17CompileOnly group: 'org.neo4j', name: 'neo4j-record-storage-engine', version: neos.'5.8' + java17CompileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: ver.'spotbugsToolVersion' java17Implementation project(':core') java17Implementation project(':storage-engine-adapter-api') diff --git a/compatibility/5.9/storage-engine-adapter/build.gradle b/compatibility/5.9/storage-engine-adapter/build.gradle index 8cdbc309ed3..d69ecebba90 100644 --- a/compatibility/5.9/storage-engine-adapter/build.gradle +++ b/compatibility/5.9/storage-engine-adapter/build.gradle @@ -58,6 +58,7 @@ if (ver.'neo4j'.startsWith('5.')) { java17CompileOnly group: 'org.immutables', name: 'value-annotations', version: ver.'immutables' java17CompileOnly group: 'org.neo4j', name: 'neo4j', version: neos.'5.9' java17CompileOnly group: 'org.neo4j', name: 'neo4j-record-storage-engine', version: neos.'5.9' + java17CompileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: ver.'spotbugsToolVersion' java17Implementation project(':core') java17Implementation project(':storage-engine-adapter-api') diff --git a/config-generator/build.gradle b/config-generator/build.gradle index c86f22675ca..45ff18da6cd 100644 --- a/config-generator/build.gradle +++ b/config-generator/build.gradle @@ -18,6 +18,8 @@ dependencies { implementation group: 'com.squareup', name: 'javapoet', version: ver.'javapoet' implementation group: 'org.jetbrains', name: 'annotations', version: ver.'jetbrains-annotations' + testCompileOnly group: 'com.google.auto.service', name: 'auto-service', version: ver.'auto-service' + testImplementation platform(dep.junit5bom) testImplementation project(':core-test-utils') testImplementation dep.junit5jupiter diff --git a/defaults-and-limits-configuration/src/main/java/org/neo4j/gds/configuration/BooleanLimit.java b/defaults-and-limits-configuration/src/main/java/org/neo4j/gds/configuration/BooleanLimit.java index f71056422d5..b7bff0118c5 100644 --- a/defaults-and-limits-configuration/src/main/java/org/neo4j/gds/configuration/BooleanLimit.java +++ b/defaults-and-limits-configuration/src/main/java/org/neo4j/gds/configuration/BooleanLimit.java @@ -65,11 +65,6 @@ protected boolean isViolatedInternal(Object inputValue) { return b != value; } - @Override - String getValueAsString() { - throw new UnsupportedOperationException("TODO"); - } - @Override String asErrorMessage(String key, Object value) { return formatWithLocale( diff --git a/defaults-and-limits-configuration/src/main/java/org/neo4j/gds/configuration/DoubleLimit.java b/defaults-and-limits-configuration/src/main/java/org/neo4j/gds/configuration/DoubleLimit.java index 6a6f9a3db1d..8cb2e37201f 100644 --- a/defaults-and-limits-configuration/src/main/java/org/neo4j/gds/configuration/DoubleLimit.java +++ b/defaults-and-limits-configuration/src/main/java/org/neo4j/gds/configuration/DoubleLimit.java @@ -37,9 +37,4 @@ protected boolean isViolatedInternal(Object inputValue) { return d > value; } - - @Override - String getValueAsString() { - throw new UnsupportedOperationException("TODO"); - } } diff --git a/defaults-and-limits-configuration/src/main/java/org/neo4j/gds/configuration/Limit.java b/defaults-and-limits-configuration/src/main/java/org/neo4j/gds/configuration/Limit.java index 1a3d4c9ec3f..64816a119d8 100644 --- a/defaults-and-limits-configuration/src/main/java/org/neo4j/gds/configuration/Limit.java +++ b/defaults-and-limits-configuration/src/main/java/org/neo4j/gds/configuration/Limit.java @@ -63,12 +63,6 @@ private void assertTypeCompatible(Object inputValue) { */ protected abstract boolean isViolatedInternal(Object inputValue); - /** - * This is handy for creating error messages - */ - @Deprecated - abstract String getValueAsString(); - String asErrorMessage(String key, Object value) { return formatWithLocale( "Configuration parameter '%s' with value '%s' exceeds it's limit of '%s'", diff --git a/defaults-and-limits-configuration/src/main/java/org/neo4j/gds/configuration/LongLimit.java b/defaults-and-limits-configuration/src/main/java/org/neo4j/gds/configuration/LongLimit.java index 320275edc43..f7dd2aff326 100644 --- a/defaults-and-limits-configuration/src/main/java/org/neo4j/gds/configuration/LongLimit.java +++ b/defaults-and-limits-configuration/src/main/java/org/neo4j/gds/configuration/LongLimit.java @@ -37,9 +37,4 @@ public boolean isViolatedInternal(Object inputValue) { return l > value; } - - @Override - public String getValueAsString() { - return String.valueOf(value); - } } diff --git a/defaults-and-limits-configuration/src/test/java/org/neo4j/gds/configuration/LimitTest.java b/defaults-and-limits-configuration/src/test/java/org/neo4j/gds/configuration/LimitTest.java index 95112850451..b4c42b467a6 100644 --- a/defaults-and-limits-configuration/src/test/java/org/neo4j/gds/configuration/LimitTest.java +++ b/defaults-and-limits-configuration/src/test/java/org/neo4j/gds/configuration/LimitTest.java @@ -37,11 +37,6 @@ Object getValue() { protected boolean isViolatedInternal(Object inputValue) { throw new UnsupportedOperationException("TODO"); } - - @Override - String getValueAsString() { - throw new UnsupportedOperationException("TODO"); - } }; try { diff --git a/doc-test-tools/src/main/java/org/neo4j/gds/doc/PartialsIncludeProcessor.java b/doc-test-tools/src/main/java/org/neo4j/gds/doc/PartialsIncludeProcessor.java index abf31d86b71..adea778b16a 100644 --- a/doc-test-tools/src/main/java/org/neo4j/gds/doc/PartialsIncludeProcessor.java +++ b/doc-test-tools/src/main/java/org/neo4j/gds/doc/PartialsIncludeProcessor.java @@ -41,7 +41,7 @@ public void process(Document document, PreprocessorReader reader, String target, Path partial = resolvePartial(target); String partialText = readPartial(partial); - reader.push_include(partialText, target, null, Integer.MIN_VALUE, Collections.emptyMap()); + reader.pushInclude(partialText, target, null, Integer.MIN_VALUE, Collections.emptyMap()); } @NotNull diff --git a/native-projection/build.gradle b/native-projection/build.gradle index 7e6c3e83d06..0dc9bc8a14e 100644 --- a/native-projection/build.gradle +++ b/native-projection/build.gradle @@ -13,6 +13,7 @@ dependencies { compileOnly group: 'org.immutables', name: 'builder', version: ver.'immutables' compileOnly group: 'org.immutables', name: 'value-annotations', version: ver.'immutables' compileOnly group: 'org.jetbrains', name: 'annotations', version: ver.'jetbrains-annotations' + compileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: ver.'spotbugsToolVersion' neodeps().each { compileOnly(group: 'org.neo4j', name: it, version: ver.'neo4j') { diff --git a/proc/common/src/main/java/org/neo4j/gds/ProcedureAndFunctionScanner.java b/proc/common/src/main/java/org/neo4j/gds/ProcedureAndFunctionScanner.java index f4b7e8b802b..c6beae1e9e7 100644 --- a/proc/common/src/main/java/org/neo4j/gds/ProcedureAndFunctionScanner.java +++ b/proc/common/src/main/java/org/neo4j/gds/ProcedureAndFunctionScanner.java @@ -20,7 +20,7 @@ package org.neo4j.gds; import org.reflections.Reflections; -import org.reflections.scanners.MethodAnnotationsScanner; +import org.reflections.scanners.Scanners; import java.lang.annotation.Annotation; import java.lang.reflect.Method; @@ -36,7 +36,7 @@ public final class ProcedureAndFunctionScanner { private static final List reflections = PACKAGES_TO_SCAN .stream() - .map(pkg -> new Reflections(pkg, new MethodAnnotationsScanner())) + .map(pkg -> new Reflections(pkg, Scanners.MethodsAnnotated)) .collect(Collectors.toList()); private ProcedureAndFunctionScanner() {} diff --git a/proc/embeddings/build.gradle b/proc/embeddings/build.gradle index 4452901ffb5..8dfa2c7af56 100644 --- a/proc/embeddings/build.gradle +++ b/proc/embeddings/build.gradle @@ -41,6 +41,7 @@ dependencies { testAnnotationProcessor project(':annotations') testCompileOnly group: 'org.immutables', name: 'builder', version: ver.'immutables' + testCompileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: ver.'spotbugsToolVersion' testImplementation project(':native-projection') testImplementation project(':open-model-catalog') diff --git a/procedures/facade/build.gradle b/procedures/facade/build.gradle index e00301dc06a..7d0da7e7c08 100644 --- a/procedures/facade/build.gradle +++ b/procedures/facade/build.gradle @@ -43,9 +43,12 @@ dependencies { compileOnly project(':pregel') + compileOnly group: 'org.immutables', name: 'value', version: ver.'immutables' compileOnly group: 'org.jetbrains', name: 'annotations', version: ver.'jetbrains-annotations' // test infrastructure + testCompileOnly group: 'org.immutables', name: 'value', version: ver.'immutables' + testCompileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: ver.'spotbugsToolVersion' testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: ver.'junit5bom' testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: ver.'junit5bom' testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: ver.'junit5bom' diff --git a/procedures/integration/build.gradle b/procedures/integration/build.gradle index bad20621aa1..93d2429e943 100644 --- a/procedures/integration/build.gradle +++ b/procedures/integration/build.gradle @@ -12,6 +12,8 @@ dependencies { testImplementation(group: 'org.neo4j', name: it, version: ver.'neo4j') } + compileOnly project(':annotations') + compileOnly group: 'org.immutables', name: 'value', version: ver.'immutables' implementation project(':config-api') implementation project(':core') diff --git a/test-utils/build.gradle b/test-utils/build.gradle index 43a7940d569..f4228437332 100644 --- a/test-utils/build.gradle +++ b/test-utils/build.gradle @@ -53,5 +53,6 @@ dependencies { testImplementation project(':edition-api') testImplementation project(':graph-schema-api') + testCompileOnly group: 'org.immutables', name: 'builder', version: ver.'immutables' testCompileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: ver.'spotbugsToolVersion' }