You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Jukka Zitting <ju...@gmail.com> on 2006/03/07 13:54:22 UTC

Re: svn commit: r383856 - in /incubator/jackrabbit/trunk/jackrabbit/src: main/java/org/apache/jackrabbit/core/nodetype/compact/ test/java/org/apache/jackrabbit/core/nodetype/compact/

Hi,

On 3/7/06, tripod@apache.org <tr...@apache.org> wrote:
> Modified:
>     incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.java
> [...]
> @@ -269,7 +270,7 @@
>       * @throws ParseException
>       */
>      private void doSuperTypes(NodeTypeDef ntd) throws ParseException {
> -        ArrayList supertypes = new ArrayList();
> +        HashSet supertypes = new HashSet();
>          if (!currentTokenEquals(Lexer.EXTENDS)) {
>              return;
>          }

This reverts my commit (r383708) that temporarily works around a
problem with supertype ordering (JCR-333). Because of this the
CompactNodeTypeDefTest fails due to supertype ordering at least on
Linux JDK 1.4.2_10.

I suggest we keep my change (use a List instead of a Set) until
JCR-333 is resolved to avoid random problems caused by the undefined
ordering of HashSets.

BR,

Jukka Zitting

--
Yukatan - http://yukatan.fi/ - info@yukatan.fi
Software craftsmanship, JCR consulting, and Java development

Re: svn commit: r383856 - in /incubator/jackrabbit/trunk/jackrabbit/src: main/java/org/apache/jackrabbit/core/nodetype/compact/ test/java/org/apache/jackrabbit/core/nodetype/compact/

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 3/7/06, Tobias Bocanegra <to...@day.com> wrote:
> you are curret, but when the definition contains a supertype twice, it
> will be dropped during registration, and the equals will fail
> aswell...but i guess this happens anyways.

True. The List is just a temporary workaround. The real fix for the
problem would be to fix NodeTypeDef so that it doesn't depend on the
ordering of supertypes or item definitions.

BR,

Jukka Zitting

--
Yukatan - http://yukatan.fi/ - info@yukatan.fi
Software craftsmanship, JCR consulting, and Java development

Re: svn commit: r383856 - in /incubator/jackrabbit/trunk/jackrabbit/src: main/java/org/apache/jackrabbit/core/nodetype/compact/ test/java/org/apache/jackrabbit/core/nodetype/compact/

Posted by Tobias Bocanegra <to...@day.com>.
you are curret, but when the definition contains a supertype twice, it
will be dropped during registration, and the equals will fail
aswell...but i guess this happens anyways.

ok. i will revert the change.
regards, toby

On 3/7/06, Jukka Zitting <ju...@gmail.com> wrote:
> Hi,
>
> On 3/7/06, tripod@apache.org <tr...@apache.org> wrote:
> > Modified:
> >     incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.java
> > [...]
> > @@ -269,7 +270,7 @@
> >       * @throws ParseException
> >       */
> >      private void doSuperTypes(NodeTypeDef ntd) throws ParseException {
> > -        ArrayList supertypes = new ArrayList();
> > +        HashSet supertypes = new HashSet();
> >          if (!currentTokenEquals(Lexer.EXTENDS)) {
> >              return;
> >          }
>
> This reverts my commit (r383708) that temporarily works around a
> problem with supertype ordering (JCR-333). Because of this the
> CompactNodeTypeDefTest fails due to supertype ordering at least on
> Linux JDK 1.4.2_10.
>
> I suggest we keep my change (use a List instead of a Set) until
> JCR-333 is resolved to avoid random problems caused by the undefined
> ordering of HashSets.
>
> BR,
>
> Jukka Zitting
>
> --
> Yukatan - http://yukatan.fi/ - info@yukatan.fi
> Software craftsmanship, JCR consulting, and Java development
>


--
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---