#1429 Can hold a child block whose parent block is held

All
closed-fixed
5
2015-11-17
2011-11-11
No

We state in the STAX User's Guide in the description of the STAX HOLD request that "A child block cannot be held if it is being held by a parent block." and we don't allow you to do this via the STAX Monitor.

However, via the command line, I can submit a STAX HOLD request for a child block whose parent block is held. This should not be allowed.

I verified that not only does this problem exist in the current STAX version , V3.5.1, but it occurred in STAX V3.0.0.

Discussion

  • Sharon Lucas

    Sharon Lucas - 2015-11-17
    • assigned_to: Sharon Lucas
     
  • Sharon Lucas

    Sharon Lucas - 2015-11-17

    Here's a cvs diff of the changes:

    Index: service/STAX.java
    ===================================================================
    RCS file: /cvsroot/staf/src/staf/services/stax/service/STAX.java,v
    retrieving revision 1.206
    diff -r1.206 STAX.java
    151a152
    >     static final int ParentBlockAlreadyHeld = 4006;
    1789a1791,1796
    >             registerHelpData(
    >                 ParentBlockAlreadyHeld,
    >                 "Parent block already held",
     >                 "Requested to hold a block that is already held by a parent " +
    >                 "block.");
    >
    2287a2295
    >         unregisterHelpData(ParentBlockAlreadyHeld);
    Index: service/STAXBlockActionFactory.java
    ===================================================================
    RCS file: /cvsroot/staf/src/staf/services/stax/service/STAXBlockActionFactory.java,v
    retrieving revision 1.17
    diff -r1.17 STAXBlockActionFactory.java
    478a479,502
    >             else
    >             {
    >                 // Check if the block has a parent block that is already held
    >                 // because then not allowed to hold the block
    >
    >                 String parentBlockName = blockName;
    >                 int index = -1;
    >
    >                 while ((index = parentBlockName.lastIndexOf('.')) != -1)
    >                 {
    >                     parentBlockName = parentBlockName.substring(0, index);
    >                     STAXBlockAction parentBlock = (STAXBlockAction)blockMap.get(
    >                         parentBlockName);
    >
    >                     if ((parentBlock != null) &&
    >                         (parentBlock.getBlockState() == STAXBlockAction.BLOCK_HELD))
    >                     {
    >                       return new STAFResult(
    >                           STAX.ParentBlockAlreadyHeld,
    >                           "Parent block \"" + parentBlockName +
    >                           "\" already held");
    >                     }
    >                 }
    >             }
    Index: docs/userguide/staxug.html
    ===================================================================
    RCS file: /cvsroot/staf/src/staf/services/stax/docs/userguide/staxug.html,v
    retrieving revision 1.302
    diff -r1.302 staxug.html
    23,24c23,24
    < <b>Version 3.5.15</b>
    < <p><b>September 29, 2015</b>
    ---
    > <b>Version 3.5.16</b>
    > <p><b>November 17, 2015</b>
    21696a21697,21704
    >
    > <tr>
    > <td>4006</td>
    >
    > <td>Parent block already held</td>
    >
    > <td>Requested to hold a block that is already held by a parent block.</td>
    > </tr>
    
     
  • Sharon Lucas

    Sharon Lucas - 2015-11-17

    This bug fix will be in STAX V3.5.16 planned to be released in December 2015.

     
  • Sharon Lucas

    Sharon Lucas - 2015-11-17
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks