diff --git a/compatibility/api/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/Neo4jProxyApi.java b/compatibility/api/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/Neo4jProxyApi.java index 07aeb34342..b6d005a63b 100644 --- a/compatibility/api/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/Neo4jProxyApi.java +++ b/compatibility/api/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/Neo4jProxyApi.java @@ -102,6 +102,12 @@ Estimates knownEstimates( long numberOfNodeLabels ); + /** + * The implementations of this method should look identical and are source-compatible. + * However, Since 5.24, Neo4j exceptions implement `HasGqlStatusInfo`, which requires + * a new module dependency that doesn't exist in versions before 5.24. + * In order to access any methods on exceptions, we need to do so behind the compat layer. + */ @CompatSince(minor = 24) void rethrowUnlessDuplicateRegistration(ProcedureException e) throws KernelException; @@ -111,18 +117,48 @@ Estimates knownEstimates( @CompatSince(minor = 24) int sequenceSizeAsInt(SequenceValue sequenceValue); + /** + * The implementations of this method should look identical and are source-compatible. + * However, Since 5.24, Neo4j exceptions implement `HasGqlStatusInfo`, which requires + * a new module dependency that doesn't exist in versions before 5.24. + * In order to access any methods on exceptions, we need to do so behind the compat layer. + */ @CompatSince(minor = 24) RuntimeException queryExceptionAsRuntimeException(Throwable e); + /** + * The implementations of this method should look identical and are source-compatible. + * However, Since 5.24, Neo4j exceptions implement `HasGqlStatusInfo`, which requires + * a new module dependency that doesn't exist in versions before 5.24. + * In order to access any methods on exceptions, we need to do so behind the compat layer. + */ @CompatSince(minor = 24) ProcedureException procedureCallFailed(@PrintFormat String message, Object... args); + /** + * The implementations of this method should look identical and are source-compatible. + * However, Since 5.24, Neo4j exceptions implement `HasGqlStatusInfo`, which requires + * a new module dependency that doesn't exist in versions before 5.24. + * In order to access any methods on exceptions, we need to do so behind the compat layer. + */ @CompatSince(minor = 24) ProcedureException procedureCallFailed(Throwable reason, @PrintFormat String message, Object... args); + /** + * The implementations of this method should look identical and are source-compatible. + * However, Since 5.24, Neo4j exceptions implement `HasGqlStatusInfo`, which requires + * a new module dependency that doesn't exist in versions before 5.24. + * In order to access any methods on exceptions, we need to do so behind the compat layer. + */ @CompatSince(minor = 24) String exceptionMessage(Throwable e); + /** + * The implementations of this method should look identical and are source-compatible. + * However, Since 5.24, Neo4j exceptions implement `HasGqlStatusInfo`, which requires + * a new module dependency that doesn't exist in versions before 5.24. + * In order to access any methods on exceptions, we need to do so behind the compat layer. + */ @CompatSince(minor = 24) DatabaseNotFoundException databaseNotFoundException(String message); } diff --git a/compatibility/common/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/Neo4jProxy.java b/compatibility/common/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/Neo4jProxy.java index 898ee45a67..e454fd96f2 100644 --- a/compatibility/common/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/Neo4jProxy.java +++ b/compatibility/common/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/Neo4jProxy.java @@ -543,14 +543,32 @@ public static int sequenceSizeAsInt(SequenceValue listValue) { return IMPL.sequenceSizeAsInt(listValue); } + /** + * The implementations of this method should look identical and are source-compatible. + * However, Since 5.24, Neo4j exceptions implement `HasGqlStatusInfo`, which requires + * a new module dependency that doesn't exist in versions before 5.24. + * In order to access any methods on exceptions, we need to do so behind the compat layer. + */ public static RuntimeException queryExceptionAsRuntimeException(Throwable e) { return IMPL.queryExceptionAsRuntimeException(e); } + /** + * The implementations of this method should look identical and are source-compatible. + * However, Since 5.24, Neo4j exceptions implement `HasGqlStatusInfo`, which requires + * a new module dependency that doesn't exist in versions before 5.24. + * In order to access any methods on exceptions, we need to do so behind the compat layer. + */ public static ProcedureException procedureCallFailed(@PrintFormat String message, Object... args) { return IMPL.procedureCallFailed(message, args); } + /** + * The implementations of this method should look identical and are source-compatible. + * However, Since 5.24, Neo4j exceptions implement `HasGqlStatusInfo`, which requires + * a new module dependency that doesn't exist in versions before 5.24. + * In order to access any methods on exceptions, we need to do so behind the compat layer. + */ public static ProcedureException procedureCallFailed( Throwable reason, @PrintFormat String message, @@ -559,10 +577,22 @@ public static ProcedureException procedureCallFailed( return IMPL.procedureCallFailed(reason, message, args); } + /** + * The implementations of this method should look identical and are source-compatible. + * However, Since 5.24, Neo4j exceptions implement `HasGqlStatusInfo`, which requires + * a new module dependency that doesn't exist in versions before 5.24. + * In order to access any methods on exceptions, we need to do so behind the compat layer. + */ public static DatabaseNotFoundException databaseNotFoundException(String message) { return IMPL.databaseNotFoundException(message); } + /** + * The implementations of this method should look identical and are source-compatible. + * However, Since 5.24, Neo4j exceptions implement `HasGqlStatusInfo`, which requires + * a new module dependency that doesn't exist in versions before 5.24. + * In order to access any methods on exceptions, we need to do so behind the compat layer. + */ public static String exceptionMessage(Throwable e) { return IMPL.exceptionMessage(e); } @@ -604,6 +634,12 @@ public static void registerCloseableResource( transaction.resourceMonitor().registerCloseableResource(autoCloseable); } + /** + * The implementations of this method should look identical and are source-compatible. + * However, Since 5.24, Neo4j exceptions implement `HasGqlStatusInfo`, which requires + * a new module dependency that doesn't exist in versions before 5.24. + * In order to access any methods on exceptions, we need to do so behind the compat layer. + */ static void rethrowUnlessDuplicateRegistration(ProcedureException e) throws KernelException { IMPL.rethrowUnlessDuplicateRegistration(e); }