File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
main/java/org/neo4j/driver/v1/internal/summary
test/java/org/neo4j/driver/v1/integration Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public class ResultBuilder implements StreamCollector
5252 public ResultBuilder ( String statement , Map <String , Value > parameters )
5353 {
5454 Map <String , Value > unmodifiableParameters =
55- parameters .isEmpty () ? NO_PARAMETERS : unmodifiableMap ( parameters );
55+ ( parameters == null ) || ( parameters .isEmpty () ) ? NO_PARAMETERS : unmodifiableMap ( parameters );
5656 this .summaryBuilder = new SummaryBuilder ( new Statement ( statement , unmodifiableParameters ) );
5757 }
5858
Original file line number Diff line number Diff line change @@ -133,4 +133,15 @@ public void shouldBeOpenBeforeCommit() throws Throwable
133133 assertTrue ( tx .isOpen () );
134134 }
135135
136+ @ Test
137+ public void shouldHandleNullParametersGracefully ()
138+ {
139+ // When
140+ session .run ("match (n) return count(n)" , null );
141+
142+ // Then
143+ // pass - no exception thrown
144+
145+ }
146+
136147}
You can’t perform that action at this time.
0 commit comments