IBM Support

PI23523: USING THE COM.IBM.RAM.COMMON.DATA.ARTIFACT.GETSIZE() METHOD FROM THE RAM API RETURNS "-1" FOR ASSET ARTIFACTS IN SUBDIRECTORIES.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as fixed if next.

Error description

  • Abstract:
    Using the com.ibm.ram.common.data.Artifact.getSize() method from
    the RAM API returns "-1" for asset artifacts in subdirectories.
    
    Error Description:
    Reproduction steps:
    - Write similar code using the RAM API that would implement the
    following concept
    
    ### SNIPPET ###
    
    // IMPORTS USED FOR THE SNIPPET
    // import com.ibm.ram.common.data.FolderArtifact;
    // import com.ibm.ram.client.RAMAsset;
    // import com.ibm.ram.common.data.Artifact;
    
    // previous code
    
    RAMAsset ramAsset;
    
    FolderArtifact root = ramAsset.getArtifactsRoot();
    Artifact[] children = root.getChildren();
    int assetLength = children.length;
    
    for (int count = 0; count < assetLength; count++) {
        if (children[count] instanceof Artifact &&
    Artifact.TYPE_FILE.equals(((Artifact)
    children[count]).getType()))) {
            Artifact child = (Artifact) children[count];
            child.getSize(); // will return -1
        }
    }
    
    // more code
    
    ### END SNIPPET ###
    
    ***Note: This snippet is not intended to function properly and
    is merely used as an example of a concept that would need to be
    implemented
    
    - Run the code
    - After running the code, the "child.getSize()" would return a
    value of "-1".
    
    Local Fix:
    None
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * none                                                         *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * The current path would be wrong when construct the           *
    * RAMArtifact instance.                                        *
    * See RAMArtifact.java, the findArtifact would always return   *
    * null and make the fArtifactDetails always null.              *
    * As this , when user use RAMArtifact's getSize() function     *
    * would get -1.                                                *
    *                                                              *
    * Artifact artifactFromSO = findArtifact(fArtifact.getName(),  *
    * path, "", assetSO.getArtifacts());                           *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    PI23523

  • Reported component name

    RATL ASSET MGR

  • Reported component ID

    5724R4200

  • Reported release

    751

  • Status

    CLOSED FIN

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-08-08

  • Closed date

    2015-03-10

  • Last modified date

    2015-06-01

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

Applicable component levels

  • R752 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSUS84","label":"Rational Asset Manager"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.5.1","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
28 April 2022