[overlord-issues] [JBoss JIRA] (RTGOV-522) RTGovSituationsUtil.getSituationBean throws NPE

Gary Brown (JIRA) issues at jboss.org
Thu Jul 10 04:33:25 EDT 2014


    [ https://issues.jboss.org/browse/RTGOV-522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12983769#comment-12983769 ] 

Gary Brown commented on RTGOV-522:
----------------------------------

Hi Ivan

Thanks for finding the original problem. In RTGov 1.0 the context type had a default value of 'Conversation' - so in these cases the json serialized representing didn't include the type field for any Context object with type=Conversation.

Although this reduced the size of the serialized representation (as it didn't include unnecessary default values), the json representation wasn't as clear. Therefore it was changed to remove the default value - so the sample data needs to be updated to explicitly include the conversation type.

The initial npe also needs a guard, as if RTGov 2 is reading json serialized data produced by RTGov 1, then it may still find a null type.


> RTGovSituationsUtil.getSituationBean throws NPE 
> ------------------------------------------------
>
>                 Key: RTGOV-522
>                 URL: https://issues.jboss.org/browse/RTGOV-522
>             Project: RTGov (Run Time Governance)
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Activity Server
>    Affects Versions: 2.0.0.Final
>            Reporter: ivan mckinley
>            Assignee: ivan mckinley
>
> in RTGovSituationsUtil Line 61. A null pointer is thrown when calling 
> context.getType().name(), 
> - No check performed against the context.getType 
> - The first item of the contextlist been iterated over has a context type of null, see [1]
> Reproduced by 
>  - Deploy SLA example 
>  - Execute the actvity client until situations are generated 
>  - Open the situation UI. The null pointer is invoked from here 
> Additionaly place a break point on line 61 RTGovSituationsUtil
> [1]List of Contexts
> [Context[null:1:0], Context[Message:1-1-6:0], Context[Message:1-1-1:0]]



--
This message was sent by Atlassian JIRA
(v6.2.6#6264)


More information about the overlord-issues mailing list