PM76714: VBA class OfCollection Add method allow adding of wrong type, creates a faulty definition and leaves object locked

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • VBA class OfCollection Add method allow adding of wrong type,
    creates a faulty definition and leaves object locked.
    
    How to reproduce:
    -----------------
    1. Open the Samples encyclopedia
    2. Run the following VBA-script
    
    Public Sub ExampleUpdateOfCollection()
    ' Test the update of an OfCollection
    Const lngThread As Long = 337 'Example definition: Process
    Thread
    Const lngApplication As Long = 309 'Example incorrect
    definition: Application
    Dim appSA As SA2001.Application
    Dim clnDefs As SA2001.SAObjects
    Dim defApplication As SA2001.Definition
    Dim defThread As SA2001.Definition
    Dim clnEvents As SA2001.OfCollection
    Set appSA = New SA2001.Application
    Set clnDefs = appSA.Encyclopedia.GetFilteredDefinitions('',
    lngApplication)
    clnDefs.ReadAll
    Set defApplication = clnDefs(1) ' This is assumes that at least
    one Application Exists
    Set clnDefs = appSA.Encyclopedia.GetFilteredDefinitions('',
    lngThread)
    clnDefs.ReadAll ' It is assumed that at least one Process Thread
    Exists
    Set defThread = clnDefs(1)
    Set clnEvents = defThread.GetPropertyAsCollection('Primary
    Result')
    clnEvents.Add defApplication ' Here a Result is Expected, but we
    add an Application
    ' A new Result named as the Application is created
    clnEvents.SetProperty
    defThread.Save
    Set clnEvents = Nothing
    Set defThread = Nothing
    Set clnDefs = Nothing
    Set appSA = Nothing
    ' The Application is still in Use
    End Sub
    
    ==? You will now have one locked 'Application' (1st in the list)
    ==? You will have a new 'Result' with the same name as the
    Application
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Expected result:
    ----------------
    An error saying the object is of wrong type
    
    Actual result:
    --------------
    A faulty definition is created and another is left locked
    
    Impact:
    -------
    One need to introduce a check of the object being added so
    that it is of correct type
    
    How to reproduce:
    -----------------
    Use the OfCollection.Add method with an Object of different
    type from the one the Collection is made up of.
    

Problem conclusion

  • The check for what types are valid for a hetero listof
    property were not correct.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM76714

  • Reported component name

    TLOGIC SYS ARCH

  • Reported component ID

    5724V68SA

  • Reported release

    B40

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-11-08

  • Closed date

    2013-06-14

  • Last modified date

    2013-06-14

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

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

Fix information

  • Fixed component name

    TLOGIC SYS ARCH

  • Fixed component ID

    5724V68SA

Applicable component levels

  • RB40 PSN

       UP



Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Rational System Architect

Software version:

11.4

Reference #:

PM76714

Modified date:

2013-06-14

Translate my page

Machine Translation

Content navigation