Menu

#1588 NullPointerException in Event.startFire() while calling HtmlInput.click()

Latest SVN
closed
RBRi
None
1
2014-06-01
2014-03-26
No

Hello,

I received a NullPointerException in Event.startFire() while calling HtmlInput.click().
So I had a look to the SVN trunk (see code paste below) and found out it was because of a cast to LinkedList on a null object. Would you please proceed to null check before casting ?

/*
* Called when the event starts being fired
/
@SuppressWarnings("unchecked")
void startFire() {
LinkedList<event> events = (LinkedList<event>) Context.getCurrentContext().getThreadLocal(KEY_CURRENT_EVENT);
if (events == null) {
events = new LinkedList<event>();
Context.getCurrentContext().putThreadLocal(KEY_CURRENT_EVENT, events);
}
events.add(this);
} </event></event></event>

Kind regards,
Nicolas Baumann.

Discussion

  • Nicolas Baumann

    Nicolas Baumann - 2014-03-27

    Sorry my previous analysis was wrong, Context.getCurrentContext() returns null in fact.

     
  • Nicolas Baumann

    Nicolas Baumann - 2014-03-30

    Both Context.getCurrentContext().getThreadLocal(KEY_CURRENT_EVENT) and Context.getCurrentContext() can be null in fact

     
  • Adam Afeltowicz

    Adam Afeltowicz - 2014-05-24

    Nicolas I think this issue may be similar to #1589. What do you think about that? Does my patch (from #1589) works in your case?

     

    Last edit: Adam Afeltowicz 2014-05-30
    • Adam Afeltowicz

      Adam Afeltowicz - 2014-05-31

      On latest snapshot version issue seems to be fixed so my patch is unnecessary.

       
  • RBRi

    RBRi - 2014-06-01

    Hi Nicolas,

    have just fixed #1589. Your problem looks like a duplicate but without the stacktrace i have no chance to proove that.
    Can you please check if the problem is gone for you also and report back.

    If the problem still perstist, i need at least the stacktrace.

    RBRi
    
     
  • RBRi

    RBRi - 2014-06-01
    • status: open --> pending
    • assigned_to: RBRi
     
  • Nicolas Baumann

    Nicolas Baumann - 2014-06-01

    Hello,

    Sorry I won't be able to test properly as the website just changed.
    You may close the issue.

    Kind regards,
    Nicolas.

     
  • RBRi

    RBRi - 2014-06-01

    Ok, will close this. Thanks for reporting back.

     
  • RBRi

    RBRi - 2014-06-01
    • status: pending --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB