Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f555048

Browse files
Update neo4j-java-driver to 5.28.8
This update adjusts method calls accordingly.
1 parent dc5f975 commit f555048

File tree

2 files changed

+31
-17
lines changed

2 files changed

+31
-17
lines changed

‎pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
<maven-install-plugin.version>3.1.4</maven-install-plugin.version>
9898
<maven-site-plugin.version>3.7.1</maven-site-plugin.version>
9999
<maven.compiler.release>${java.version}</maven.compiler.release>
100-
<neo4j-java-driver.version>5.28.7</neo4j-java-driver.version>
100+
<neo4j-java-driver.version>5.28.8</neo4j-java-driver.version>
101101
<neo4j-migrations.version>2.17.3</neo4j-migrations.version>
102102
<neo4j.version>4.4.41</neo4j.version>
103103
<objenesis.version>3.0.1</objenesis.version>

‎src/main/java/org/springframework/data/neo4j/core/ResultSummaries.java

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
import org.apache.commons.logging.LogFactory;
2525
import org.jspecify.annotations.Nullable;
26-
import org.neo4j.driver.NotificationClassification;
26+
import org.neo4j.driver.NotificationCategory;
2727
import org.neo4j.driver.NotificationSeverity;
2828
import org.neo4j.driver.summary.InputPosition;
2929
import org.neo4j.driver.summary.Notification;
@@ -94,8 +94,8 @@ private static void logNotifications(ResultSummary resultSummary) {
9494
Predicate<Notification> isDeprecationWarningForId;
9595
try {
9696
isDeprecationWarningForId = notification -> supressIdDeprecations
97-
&& notification.classification()
98-
.orElse(NotificationClassification.UNRECOGNIZED) == NotificationClassification.DEPRECATION
97+
&& notification.category()
98+
.orElse(NotificationCategory.UNRECOGNIZED) == NotificationCategory.DEPRECATION
9999
&& DEPRECATED_ID_PATTERN.matcher(notification.description()).matches();
100100
}
101101
finally {
@@ -107,7 +107,7 @@ private static void logNotifications(ResultSummary resultSummary) {
107107
.stream()
108108
.filter(Predicate.not(isDeprecationWarningForId))
109109
.forEach(notification -> notification.severityLevel().ifPresent(severityLevel -> {
110-
var category = notification.classification().orElse(null);
110+
var category = notification.category().orElse(null);
111111

112112
var logger = getLogAccessor(category);
113113
Consumer<String> logFunction;
@@ -129,21 +129,35 @@ else if (severityLevel == NotificationSeverity.OFF) {
129129
}));
130130
}
131131

132-
private static LogAccessor getLogAccessor(@Nullable NotificationClassification category) {
132+
private static LogAccessor getLogAccessor(@Nullable NotificationCategory category) {
133133
if (category == null) {
134134
return Neo4jClient.cypherLog;
135135
}
136-
return switch (category) {
137-
case HINT -> cypherHintNotificationLog;
138-
case DEPRECATION -> cypherDeprecationNotificationLog;
139-
case PERFORMANCE -> cypherPerformanceNotificationLog;
140-
case GENERIC -> cypherGenericNotificationLog;
141-
case UNSUPPORTED -> cypherUnsupportedNotificationLog;
142-
case UNRECOGNIZED -> cypherUnrecognizedNotificationLog;
143-
case SECURITY -> cypherSecurityNotificationLog;
144-
case TOPOLOGY -> cypherTopologyNotificationLog;
145-
default -> Neo4jClient.cypherLog;
146-
};
136+
if (category.equals(NotificationCategory.HINT)) {
137+
return cypherHintNotificationLog;
138+
}
139+
else if (category.equals(NotificationCategory.DEPRECATION)) {
140+
return cypherDeprecationNotificationLog;
141+
}
142+
else if (category.equals(NotificationCategory.PERFORMANCE)) {
143+
return cypherPerformanceNotificationLog;
144+
}
145+
else if (category.equals(NotificationCategory.GENERIC)) {
146+
return cypherGenericNotificationLog;
147+
}
148+
else if (category.equals(NotificationCategory.UNSUPPORTED)) {
149+
return cypherUnsupportedNotificationLog;
150+
}
151+
else if (category.equals(NotificationCategory.UNRECOGNIZED)) {
152+
return cypherUnrecognizedNotificationLog;
153+
}
154+
else if (category.equals(NotificationCategory.SECURITY)) {
155+
return cypherSecurityNotificationLog;
156+
}
157+
else if (category.equals(NotificationCategory.TOPOLOGY)) {
158+
return cypherTopologyNotificationLog;
159+
}
160+
return Neo4jClient.cypherLog;
147161
}
148162

149163
/**

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /