You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/07/25 15:24:20 UTC

[jira] [Commented] (ARTEMIS-653) Possible Null Pointer Exception during message properties read using XmlDataImporter

    [ https://issues.apache.org/jira/browse/ARTEMIS-653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15392084#comment-15392084 ] 

ASF GitHub Bot commented on ARTEMIS-653:
----------------------------------------

GitHub user MartinStyk opened a pull request:

    https://github.com/apache/activemq-artemis/pull/659

    ARTEMIS-653 Possible Null Pointer Exception during message properties…

    … read using XmlDataImporter
    
    Create SimpleString object only if value of attribute is not null

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/MartinStyk/activemq-artemis ARTEMIS-653

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/659.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #659
    
----
commit f9b55ee5355a83f65d9637acab50ac644b535c5a
Author: Martin Styk <ms...@redhat.com>
Date:   2016-07-25T15:21:50Z

    ARTEMIS-653 Possible Null Pointer Exception during message properties read using XmlDataImporter
    
    Create SimpleString object only if value of attribute is not null

----


> Possible Null Pointer Exception during message properties read using XmlDataImporter
> ------------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-653
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-653
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>            Reporter: Martin Styk
>            Priority: Minor
>
> There is possible NPE in XMLDataImporter#processMessageProperties
> {code}
> realValue = null;
> {code}
> {code}
>  case XmlDataConstants.PROPERTY_TYPE_SIMPLE_STRING:
>             if (!value.equals(XmlDataConstants.NULL)) {
>                realValue = value;
>             }
>             message.putStringProperty(new SimpleString(key), new SimpleString(realValue));
>             break;
> {code}
> If realValue is null, new SimpleString(realValue) throws NPE



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)