You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Chris Lee <cs...@home.com> on 2000/12/05 02:24:17 UTC

SerializerFactory bug - 1.2.2

Fixed a bug in SerializerFactory.java that prevents overriding the default
factories via -D

Patch, for SerializerFactory.java:86 - changes contains( ... ) to
containsKey( ... )

  static
    {
        SerializerFactory factory;
        String            list;
        StringTokenizer   token;
        String            className;

        // The default factories are always registered first,
        // any factory specified in the properties file and supporting
        // the same method will override the default factory.
        factory =  new SerializerFactoryImpl( Method.XML );
        registerSerializerFactory( factory );
        factory =  new SerializerFactoryImpl( Method.HTML );
        registerSerializerFactory( factory );
        factory =  new SerializerFactoryImpl( Method.XHTML );
        registerSerializerFactory( factory );
        factory =  new SerializerFactoryImpl( Method.TEXT );
        registerSerializerFactory( factory );

        list = System.getProperty( FactoriesProperty );
        if ( list != null ) {
            token = new StringTokenizer( list, " ;,:" );
            while ( token.hasMoreTokens() ) {
                className = token.nextToken();
                try
				{
                    factory = (SerializerFactory) Class.forName(
className ).newInstance();

                    //
                    // CSL 11.9.2000 - fixed to use containsKey instead of
contains
                    //
                    if ( _factories.containsKey(
factory.getSupportedMethod() ) )
					{
                        _factories.put( factory.getSupportedMethod(),
factory );
					}
                }
				catch ( Exception except )
				{
					System.out.println( "Error loading factory " + className + " : " +
except.toString() );
				}
            }
        }
    }


Re: COMMITTERS PLEASE ! [Was: SerializerFactory bug - 1.2.2]

Posted by arkin <ar...@intalio.com>.
There were several patches provided in the past few weeks. Some address
the same problems, while others alter the behavior of the serializers.

While individually applying each patch is trivial, applying them all and
considering behavior change, while assuring the code is not broken, is
slightly less trivial. Sadly, I do not have a test suite handy for
assuring that patches I apply do not break the existing code base.

In the past I've realied on code I was developing to make extensive use
of serialization. I would run a patched version for a week before
committing, assuring I fix more than I break. Presently, all the code
I'm working on parses but does not serialize, so I have no way of
validating fixes.

I guess if you have the resources, you would want to lend a helping
hand, apply the patches and make sure it all ticks.


There's a big drawback to relying on individuals. If it wasn't for the
effort of majort corporations, I would not be using Linux on a daily
basis or trusting my Web site in the hands of Apache.

Or maybe I got it wrong, and if it wasn't for individuals, I would still
be using trusty Windows and IIS.

arkin


Arnaud Le Hors wrote:
> 
> Klaus Kiehne wrote:
> >
> > ANY COMMITTER OUT THERE, who could take a minute to review and apply the patch ???
> 
> Done.
> 
> > (sorry for shouting ;-)
> 
> You did well. The pb with the serializer is that it was contributed by
> Assaf Arkin who doesn't appear to be committed to maintaining the code.
> So effectively nobody really feels like s/he owns it and nobody picks up
> the bug related to this piece of code. I guess that's one of the
> drawbacks on relying on individuals...
> --
> Arnaud  Le Hors - IBM Cupertino, XML Technology Group
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org

-- 
----------------------------------------------------------------------
Assaf Arkin                                          arkin@intalio.com
CTO,  Intalio Inc.                                     www.intalio.com
The Business Process Management Company                 (650) 345 2777



Re: COMMITTERS PLEASE ! [Was: SerializerFactory bug - 1.2.2]

Posted by Arnaud Le Hors <le...@us.ibm.com>.
[All the mail I've sent out since yesterday sometime seem to have been
lost somewhere, this is a resent, I apology if you already received it]

If you could send it to me as an _attachement_ I'd be happy to apply it.
In general pasting a patch into a message makes it unusuable. Especially
long ones.
-- 
Arnaud  Le Hors - IBM Cupertino, XML Technology Group

Re: COMMITTERS PLEASE ! [Was: SerializerFactory bug - 1.2.2]

Posted by Arnaud Le Hors <le...@us.ibm.com>.
I don't have any easy way to check on this patch but I trust Kent here.
He knows more about encodings and I18N issues than most of us. So I
applied his patch.
Let me know if there is any further problem.
-- 
Arnaud  Le Hors - IBM Cupertino, XML Technology Group

Re: COMMITTERS PLEASE ! [Was: SerializerFactory bug - 1.2.2]

Posted by TAMURA Kent <ke...@hauN.org>.
In message "Re: COMMITTERS PLEASE ! [Was: SerializerFactory bug - 1.2.2]"
    on 00/12/05, Arnaud Le Hors <le...@us.ibm.com> writes:

> > ANY COMMITTER OUT THERE, who could take a minute to review and apply the patch ???
> Done.

My patch for the serializer package was also ignored ;-)
	Date: Mon, 27 Nov 2000 13:57:10 +0900 (JST)
	Message-Id: <20...@hauN.org>
	From: TAMURA Kent <ke...@hauN.org>
	To: xerces-j-dev@xml.apache.org
	Subject: [PATCH] Some fixes about encodings (Re: DefaultLastPrintable)

Would someone of committers take a look, please?

-- 
TAMURA, Kent

Re: COMMITTERS PLEASE ! [Was: SerializerFactory bug - 1.2.2]

Posted by Arnaud Le Hors <le...@us.ibm.com>.
Klaus Kiehne wrote:
> 
> ANY COMMITTER OUT THERE, who could take a minute to review and apply the patch ???

Done.

> (sorry for shouting ;-)

You did well. The pb with the serializer is that it was contributed by
Assaf Arkin who doesn't appear to be committed to maintaining the code.
So effectively nobody really feels like s/he owns it and nobody picks up
the bug related to this piece of code. I guess that's one of the
drawbacks on relying on individuals...
-- 
Arnaud  Le Hors - IBM Cupertino, XML Technology Group

COMMITTERS PLEASE ! [Was: SerializerFactory bug - 1.2.2]

Posted by Klaus Kiehne <ki...@struktur.de>.
Hi,

I've mentioned this bug in a mail from Wed, 08 Nov 2000 12:27:04 +0100 (but I 
was not familiar with patches as diff files at this time )

I've submitted a patch for this bug in a mail from Mon, 27 Nov 2000 11:55:26 +0100

I just checked the latest sources from CVS (Main branch and Xerces_j_2) but the
patch is not applied until now.

ANY COMMITTER OUT THERE, who could take a minute to review and apply the patch ???

(sorry for shouting ;-)

Thanks
Klaus

Chris Lee wrote:
> 
> Fixed a bug in SerializerFactory.java that prevents overriding the default
> factories via -D
> 
> Patch, for SerializerFactory.java:86 - changes contains( ... ) to
> containsKey( ... )
> ...
-- 
___    __________________________________             ______  ______   _____            
                                                     /     /|/     /| /    /|
       Klaus Kiehne [Software Architect]            /_____/ /_____/ /_____/ |
                                                   _|____ |_|____ |_|____ | |
       Dipl.-Informatiker                         /     /|/     /| /    /|| /
___                                              /_____/ /_____/ /_____/ ||/|
___    __________________________________       _|____ |_|____ |_|____ | |/ |
___                                            /     /|/     /|/     /|| /| |
         struktur AG                          /_____/ /_____/ /_____/ ||/|| /
                                              |     | |     | |     | |/ ||/|
         Junghansstrasse 5                    |     | |     | |     | /| |/ |
___    D-70469 Stuttgart                      |_____|/|_____|/|_____|/|| /| |
                                              /_____/ /_____/ /_____/ ||/|| /
       __________________________________     |     | |     | |     | |/ ||/
___                                           |     | |     | |     | /| | 
       Tel:   +49. 711. 89 66 56-61           |_____|/|_____|/|_____|/|| /
       Fax:   +49. 711. 89 66 56-10           /_____/ /_____/ /_____/ ||/
                                              |     | |     | |     | |
       website: www.struktur.de               |     | |     | |     | /
___    __________________________________     |_____|/|_____|/|_____|/