systemml-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SYSTEMML-1739) Ineffective null check in MLContextConversionUtil#binaryBlocksToFrameObject()
Date Wed, 05 Jul 2017 21:44:00 GMT

     [ https://issues.apache.org/jira/browse/SYSTEMML-1739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ted Yu updated SYSTEMML-1739:
-----------------------------
    Description: 
{code}
    MatrixCharacteristics mc = (frameMetadata != null) ? frameMetadata.asMatrixCharacteristics()
        : new MatrixCharacteristics();

    FrameObject frameObject = new FrameObject(OptimizerUtils.getUniqueTempFileName(),
        new MatrixFormatMetaData(mc, OutputInfo.BinaryBlockOutputInfo, InputInfo.BinaryBlockInputInfo),
        frameMetadata.getFrameSchema().getSchema().toArray(new ValueType[0]));
{code}

null check is performed on frameMetadata.
However, frameMetadata is dereferenced later without check for getFrameSchema().

  was:
{code}
    MatrixCharacteristics mc = (frameMetadata != null) ? frameMetadata.asMatrixCharacteristics()
        : new MatrixCharacteristics();

    FrameObject frameObject = new FrameObject(OptimizerUtils.getUniqueTempFileName(),
        new MatrixFormatMetaData(mc, OutputInfo.BinaryBlockOutputInfo, InputInfo.BinaryBlockInputInfo),
        frameMetadata.getFrameSchema().getSchema().toArray(new ValueType[0]));
{code}
null check is performed on frameMetadata.
However, frameMetadata is dereferenced later without check for getFrameSchema().


> Ineffective null check in MLContextConversionUtil#binaryBlocksToFrameObject()
> -----------------------------------------------------------------------------
>
>                 Key: SYSTEMML-1739
>                 URL: https://issues.apache.org/jira/browse/SYSTEMML-1739
>             Project: SystemML
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>
> {code}
>     MatrixCharacteristics mc = (frameMetadata != null) ? frameMetadata.asMatrixCharacteristics()
>         : new MatrixCharacteristics();
>     FrameObject frameObject = new FrameObject(OptimizerUtils.getUniqueTempFileName(),
>         new MatrixFormatMetaData(mc, OutputInfo.BinaryBlockOutputInfo, InputInfo.BinaryBlockInputInfo),
>         frameMetadata.getFrameSchema().getSchema().toArray(new ValueType[0]));
> {code}
> null check is performed on frameMetadata.
> However, frameMetadata is dereferenced later without check for getFrameSchema().



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message