SourceForge has been redesigned. Learn more.
Close

#4598 Number format exception with /ban name 0.5 bla

closed-fixed
None
5
2010-05-30
2010-05-30
No

I tried to ban just for a short time so I used a decimal amount as the number is in hours, can we catch this exception
e.g.

java.lang.NumberFormatException: For input string: "0.05"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:458)
at java.lang.Integer.parseInt(Integer.java:499)
at games.stendhal.server.actions.admin.BanAction.perform(BanAction.java:33)
at games.stendhal.server.actions.admin.AdministrationAction.onAction(AdministrationAction.java:116)
at games.stendhal.server.actions.CommandCenter.execute(CommandCenter.java:103)
at games.stendhal.server.core.engine.StendhalRPRuleProcessor.execute(StendhalRPRuleProcessor.java:231)
at marauroa.server.game.rp.RPScheduler.visit(RPScheduler.java:113)
at marauroa.server.game.rp.RPServerManager.run(RPServerManager.java:509)

Discussion

  • Katie Russell

    Katie Russell - 2010-05-30
    • summary: [Stendhal] Number format exception with /ban name 0.5 bla --> Number format exception with /ban name 0.5 bla
     
  • Katie Russell

    Katie Russell - 2010-05-30

    Fixed in CVS with a hint also for if you did not know about the new syntax and omitted the -1 for a permanent ban

     
  • Katie Russell

    Katie Russell - 2010-05-30
    • assigned_to: nobody --> kymara
    • status: open --> closed-fixed
     

Anonymous
Anonymous

Cancel  Add attachments