File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
wrapper/src/main/java/software/amazon/jdbc/plugin/failover Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -293,14 +293,12 @@ public WriterFailoverResult call() {
293293 }
294294
295295 private boolean isCurrentHostWriter (final List <HostSpec > latestTopology ) {
296- final Set <String > currentAliases = this .originalWriterHost .getAliases ();
297296 final HostSpec latestWriter = getWriter (latestTopology );
298- if (currentAliases == null ) {
299- return false ;
300- }
301- final Set <String > latestWriterAliases = latestWriter .getAliases ();
297+ final Set <String > latestWriterAllAliases = latestWriter .asAliases ();
298+ final Set <String > currentAliases = this .originalWriterHost .getAliases ();
302299
303- return latestWriterAliases .stream ().anyMatch (currentAliases ::contains );
300+ return (currentAliases != null )
301+ && (latestWriterAllAliases .stream ().anyMatch (currentAliases ::contains ));
304302 }
305303 }
306304
Original file line number Diff line number Diff line change @@ -797,5 +797,4 @@ public Connection connect(
797797
798798 return conn ;
799799 }
800-
801800}
You can’t perform that action at this time.
0 commit comments