On 8/22/06, Ersin Er <[EMAIL PROTECTED]> wrote:
On 8/22/06, Ersin Er <[EMAIL PROTECTED]> wrote:
> On 8/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Author: akarasulu
> > Date: Mon Aug 21 20:18:05 2006
> > New Revision: 433483
> >
> > URL: http://svn.apache.org/viewvc?rev=433483&view=rev
> > Log:
> > fix for DIRSERVER-630
> >
> > Added:
> >
directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/IllegalModificationITest.java
> > - copied, changed from r433475,
directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/IllegalModification.java
> > Removed:
> >
directory/branches/apacheds/1.0/server-unit/src/test/java/org/apache/directory/server/IllegalModification.java
> > Modified:
> >
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
> >
> > Modified:
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
> > URL:
http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java?rev=433483&r1=433482&r2=433483&view=diff
> >
==============================================================================
> > ---
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
(original)
> > +++
directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
Mon Aug 21 20:18:05 2006
> > @@ -786,6 +786,17 @@
> > {
> > objectClassMod = mods[ii];
> > }
> > +
> > + // Freak out under some weird cases
> > + if ( mods[0].getAttribute().size() == 0 )
> > + {
> > + // not ok for add but ok for replace and delete
> > + if ( mods[0].getModificationOp() ==
DirContext.ADD_ATTRIBUTE )
> > + {
> > + throw new LdapInvalidAttributeValueException( "No value is
not a valid value for an attribute.",
> > + ResultCodeEnum.INVALIDATTRIBUTESYNTAX );
> > + }
> > + }
> >
> > StringBuffer keybuf = new StringBuffer();
> > keybuf.append( mods[ii].getModificationOp() );
> >
>
> Alex,
Well,
> 1. I think the index used for mods[0].get... portions should be ii instead of
0.
Here is the test case to show that there is still an issue as
mentioned in this item:
http://svn.apache.org/viewvc?view=rev&revision=433577
> 2. What about the other modify method in the schema service?
And here is another about this item:
http://svn.apache.org/viewvc?view=rev&revision=433578
--
Ersin
OK, I have fixed both here:
http://svn.apache.org/viewvc?view=rev&revision=433580
Patch for 1.1 branch will follow (after I learn to use this svn merge
stuff from cl).
--
Ersin