Skip to content

Commit c905591

Browse files
michael-simonsmeistermeier
authored andcommitted
Seal interfaces that are actually not meant to be implemented by a user.
1 parent 4c2328a commit c905591

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

src/main/java/org/springframework/data/neo4j/core/DefaultNeo4jClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
* @author Michael J. Simons
5959
* @since 6.0
6060
*/
61-
class DefaultNeo4jClient implements Neo4jClient {
61+
final class DefaultNeo4jClient implements Neo4jClient {
6262

6363
private final Driver driver;
6464
private final TypeSystem typeSystem;

src/main/java/org/springframework/data/neo4j/core/DefaultReactiveNeo4jClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
* @soundtrack Die Toten Hosen - Im Auftrag des Herrn
6161
* @since 6.0
6262
*/
63-
class DefaultReactiveNeo4jClient implements ReactiveNeo4jClient {
63+
final class DefaultReactiveNeo4jClient implements ReactiveNeo4jClient {
6464

6565
private final Driver driver;
6666
private final TypeSystem typeSystem;

src/main/java/org/springframework/data/neo4j/core/Neo4jClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
* @since 6.0
4141
*/
4242
@API(status = API.Status.STABLE, since = "6.0")
43-
public interface Neo4jClient {
43+
public sealed interface Neo4jClient permits DefaultNeo4jClient {
4444

4545
LogAccessor cypherLog = new LogAccessor(LogFactory.getLog("org.springframework.data.neo4j.cypher"));
4646

src/main/java/org/springframework/data/neo4j/core/ReactiveNeo4jClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* @since 6.0
4444
*/
4545
@API(status = API.Status.STABLE, since = "6.0")
46-
public interface ReactiveNeo4jClient {
46+
public sealed interface ReactiveNeo4jClient permits DefaultReactiveNeo4jClient {
4747

4848
LogAccessor cypherLog = new LogAccessor(LogFactory.getLog("org.springframework.data.neo4j.cypher"));
4949

src/main/java/org/springframework/data/neo4j/types/AbstractPoint.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*
2323
* @author Michael J. Simons
2424
*/
25-
abstract class AbstractPoint implements Neo4jPoint {
25+
abstract non-sealed class AbstractPoint implements Neo4jPoint {
2626

2727
protected final Coordinate coordinate;
2828

src/main/java/org/springframework/data/neo4j/types/Neo4jPoint.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* @since 6.0
2828
*/
2929
@API(status = API.Status.STABLE, since = "6.0")
30-
public interface Neo4jPoint {
30+
public sealed interface Neo4jPoint permits AbstractPoint {
3131

3232
/**
3333
* @return The Srid identifying the Coordinate Reference Systems (CRS) used by this point.

0 commit comments

Comments
 (0)