[jira] Resolved: (DIREVE-306) SchemaService modifies attibute while checking for remov
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Directory Project > [jira] Resolved: (DIREVE-306) SchemaService modifies attibute while checking for remov




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    [jira] Resolved: (DIREVE-306) SchemaService modifies attibute while checking for remov  
Alex Karasulu (JIRA)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-12-05 10:45 PM

[ http://issues.apache.org/jira/brows...VE-306?page=all ]

Alex Karasulu resolved DIREVE-306:
----------------------------------

Fix Version: 0.9.4
Resolution: Fixed

Committed small recommended change in revision 332797

> SchemaService modifies attibute while checking for removal of last attribu
te value
> --------------------------------------------------------------------------
--------
>
>          Key: DIREVE-306
>          URL: http://issues.apache.org/jira/browse/DIREVE-306
>      Project: Directory Server
>         Type: Bug
>   Components: interceptors
>     Versions: 0.9.3
>     Reporter: Claus Turkalj
>     Assignee: Alex Karasulu
>      Fix For: 0.9.4

>
> The SchemaService is modifying an attribute although it is not the last in
terceptor in the interceptor chain. If one of the interceptors invoked after
 the SchemaService throws an exception, the modification has already been co
mmited.
> The modification happens while the SchemaService checks if a DirContext.RE
MOVE_ATTRIBUTE operation removes the last value of an attribute:
>     private boolean isCompleteRemoval( Attribute change, Attributes entry 
) throws NamingException
>     {
>         // if change size is 0 then all values are deleted then we're scre
wed
>         if ( change.size() == 0 )
>         {
>             return true;
>         }
>         // can't do math to figure our if all values are removed since som
e
>         // values in the modify request may not be in the entry.  we need 
to
>         // remove the values from a cloned version of the attribute and se
e
>         // if nothing is left.
>         Attribute changedEntryAttr = entry.get( change.getID() );
>         for ( int jj = 0; jj < change.size(); jj++ )
>         {
>             changedEntryAttr.remove( change.get( jj ) );
>         }
>         return changedEntryAttr.size() == 0;
>     }
> Changing the line
>         Attribute changedEntryAttr = entry.get( change.getID() );
> to
>         Attribute changedEntryAttr = entry.get( change.getID() ).clone();
> seems to fix the problem.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secur...nistrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:59 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register