1 Reply Latest reply on Dec 12, 2003 6:08 PM by Viet

    error when creating a new post in forums

    j0lea Newbie

      I just made the build using the lastest version from CVS, then I tried to create a post in some forum I created using the default user. I got an error

      15:47:37,218 ERROR [bb] Cannot invoke operation
      java.lang.NullPointerException
      at java.util.Calendar.setTime(Calendar.java:902)
      at java.text.SimpleDateFormat.format(SimpleDateFormat.java:780)
      at java.text.SimpleDateFormat.format(SimpleDateFormat.java:773)
      at java.text.DateFormat.format(DateFormat.java:314)
      at org.jboss.nukes.addons.modules.bb.theme.BBTheme.formatDate(BBTheme.java:321)
      at org.jboss.nukes.addons.modules.bb.BBModule.viewtopic(BBModule.java:2672)

      did a little debugging, seems like some formatting on a null date is being done, the code returning the null date is:

      String posterJoined = poster != null ? ("Joined: " + theme.formatDate(poster.getRegistrationDate())) : "";
      in method public void viewtopic(Page page).
      


      The default user has no registration date in the DB. Then I tried registering a user, but now I'm getting the error every time, even with this new user. I could got and ignore null dates in the formatDate() method but that doesn't seem like the right thing to do...