Skip to content

Commit 3f93314

Browse files
SNOW-569611 Fix boxed Long comparison
1 parent cf82fff commit 3f93314

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/net/snowflake/ingest/streaming/internal/ChannelCache.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void removeChannelIfSequencersMatch(SnowflakeStreamingIngestChannelInternal chan
6767
// We need to compare the channel sequencer in case the old channel was already been
6868
// removed
6969
return channelInCache != null
70-
&& channelInCache.getChannelSequencer() == channel.getChannelSequencer() // TODO: 4/11/22 this is wrong because the long is boxed so == checks refs and not the value
70+
&& channelInCache.getChannelSequencer().equals(channel.getChannelSequencer())
7171
&& v.remove(channel.getName()) != null
7272
&& v.isEmpty()
7373
? null

0 commit comments

Comments
 (0)