Exception when anonymous

Issue #13 resolved
Shawn Edwards created an issue

See the following stack trace for when someone is not logged in:

java.lang.NullPointerException
        at info.renjithv.jira.addons.threadedcomments.rest.HandleComments.getIssueCommentsVotes(HandleComments.java:142)
        at sun.reflect.GeneratedMethodAccessor729.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper
.java:234)
        at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$1.intercept(DispatchProviderHelper.java:100)
        at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:61)
        at com.atlassian.plugins.rest.common.expand.interceptor.ExpandInterceptor.intercept(ExpandInterceptor.java:38)
        at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:61)
...

Line 142 is:

 final String userName = loggedInUser.getName().toLowerCase();

either loggedInUser is null or getName() returns null.

Either way, it is trying to access a null object. Crashes every issue page when someone isn't logged in.

Comments (2)

  1. Renjith Pillai repo owner

    All these problems should be resolved now with the latest release 1.12. Please check it and if you find any issue, please raise a new request per problem.

  2. Log in to comment