Closed GoogleCodeExporter closed 9 years ago
Note that changing nick back and forth and then parting doesn't trigger this
error. User have to part between.
Original comment by Tnade...@gmail.com
on 10 Nov 2014 at 4:21
[deleted comment]
Hmm you're right. This little addition to InputParserTest.java fails with a NPE
@Test
public void nickRenameWithQuitTest() throws IOException, IrcException {
UserHostmask testUser1 = TestUtils.generateTestUserOtherHostmask(bot);
UserHostmask testUser2 = new UserHostmask(bot, testUser1.getNick() + "2", testUser1.getLogin(), testUser1.getHostname());
dao.createChannel("#testchannel");
inputParser.handleLine(":" + testUser1.getHostmask() + " JOIN :#testChannel");
inputParser.handleLine(":" + testUser1.getHostmask() + " NICK :" + testUser2.getNick());
inputParser.handleLine(":" + testUser2.getHostmask() + " QUIT :");
assertFalse(dao.containsUser(testUser1), "Renamed failed, user 1 still exists");
assertFalse(dao.containsUser(testUser2), "quit failed, user 2 still exists");
inputParser.handleLine(":" + testUser2.getHostmask() + " JOIN :#testChannel");
inputParser.handleLine(":" + testUser2.getHostmask() + " NICK :" + testUser1.getNick());
inputParser.handleLine(":" + testUser1.getHostmask() + " QUIT :");
assertFalse(dao.containsUser(testUser1), "quit failed, user 1 still exists");
assertFalse(dao.containsUser(testUser2), "Renamed failed, user 2 still exists");
}
Original comment by hoerup1...@gmail.com
on 10 Nov 2014 at 12:48
I'm an idiot. Fixed in latest build. Should also fix other random DAO behavior
as well
Java 101: If an object is being used as a map key, make sure the hashCode NEVER
changes or else you'll be staring at a log file for a looong time scratching
your head
Original comment by Lord.Qua...@gmail.com
on 10 Nov 2014 at 2:12
I seem to encounter a new issue (found by me failing to realise I already had a
version running...)
If your nick is taken when you connect you get a nullpointer trying to parse
the nickserv response.
[main] ERROR org.pircbotx.PircBotX - Exception encountered when parsing line
:User1 MODE User1:+i
org.pircbotx.exception.DaoException: UnknownUser: User1
at org.pircbotx.UserChannelDao.getUser(UserChannelDao.java:91)
at org.pircbotx.InputParser.processMode(InputParser.java:866)
at org.pircbotx.InputParser.processCommand(InputParser.java:577)
at org.pircbotx.InputParser.handleLine(InputParser.java:356)
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:55)
at com.tnud.main.BotMain.main(BotMain.java:27)
Original comment by Tnade...@gmail.com
on 10 Nov 2014 at 3:43
I cannot reproduce that exception. Next time it happens can you create a new
issue with a full log?
Original comment by Lord.Qua...@gmail.com
on 15 Nov 2014 at 10:14
Original issue reported on code.google.com by
Tnade...@gmail.com
on 10 Nov 2014 at 4:19