raisedragon / pircbotx

Automatically exported from code.google.com/p/pircbotx
0 stars 0 forks source link

Multiple entries with same key in UserChannelDao on nickchange with same IP. #209

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Have two users with the same hostmask in a channel
(User1, User2)
2. One of them quits or parts. The other nick changes to the others name. 
(User 1: quit, User2: -> User1)
3. Second user quits or parts.
(User 1: quit)

What is the expected output? 
A PART / QUIT and nothing more.

What do you see instead?
[main] ERROR org.pircbotx.PircBotX - Exception encountered when parsing line
java.lang.IllegalArgumentException: Multiple entries with same key: 
User(userId=6cd93b9f-b693-44fd-859e-e5cd4b2ec203, 
dao=org.pircbotx.UserChannelDao@5f9b2141, realName=, awayMessage=null, 
ircop=false, server=, 
hops=0)=UserSnapshot(super=User(userId=6232966a-29dc-4b10-8970-a94a56c0592b, 
dao=null, realName=, awayMessage=null, ircop=false, server=, hops=0)) and 
User(userId=6cd93b9f-b693-44fd-859e-e5cd4b2ec203, 
dao=org.pircbotx.UserChannelDao@5f9b2141, realName=, awayMessage=null, 
ircop=false, server=, 
hops=0)=UserSnapshot(super=User(userId=3ed175ef-ecf4-43c9-a8be-0b03fa2144b6, 
dao=null, realName=, awayMessage=null, ircop=false, server=, hops=0))
    at com.google.common.collect.ImmutableMap.checkNoConflict(ImmutableMap.java:150)
    at com.google.common.collect.RegularImmutableMap.checkNoConflictInBucket(RegularImmutableMap.java:104)
    at com.google.common.collect.RegularImmutableMap.<init>(RegularImmutableMap.java:70)
    at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:254)
    at org.pircbotx.UserChannelDao.createSnapshot(UserChannelDao.java:324)
    at org.pircbotx.InputParser.processCommand(InputParser.java:520)
    at org.pircbotx.InputParser.handleLine(InputParser.java:353)
    at org.pircbotx.PircBotX.startLineProcessing(PircBotX.java:292)
    at org.pircbotx.PircBotX.connect(PircBotX.java:253)
    at org.pircbotx.PircBotX.startBot(PircBotX.java:154)
    at com.tnud.main.BOTmain.runBOT(BOTmain.java:53)
    at com.tnud.main.BOTmain.main(BOTmain.java:26)

What version of the product are you using? On what operating system?
Latest dev: pircbotx-2.1-20141104.023805-64.jar

Please provide any additional information below.
Is repeatable by other users on different servers.
Nick change not being handled properly?

Original issue reported on code.google.com by Tnade...@gmail.com on 4 Nov 2014 at 4:30

GoogleCodeExporter commented 9 years ago
Fixed and tested in Revision 2b9ed67bd7f7

Original comment by Lord.Qua...@gmail.com on 4 Nov 2014 at 10:21