ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <umag...@apache.org>
Subject Re: Bootstrap error on FreeBSD
Date Thu, 04 Apr 2002 14:33:18 GMT
From: "Stefan Bodewig" <bodewig@apache.org>


> On Wed, 3 Apr 2002, Magesh Umasankar <umagesh@apache.org> wrote:
>
> > Exception javax.xml.parsers.FactoryConfigurationError can't be
> > thrown in initializer.
>
> javac 1.1.8 doesn't seem to understand that FactoryConfigurationError
> is an Error and not an Exception.

Yes, it seemed like a JDK issue to me too.

>
> I cannot see any backwards compatible way to work around this.  We'd
> have to remove access to dbfactory which affects potential subclasses.
>
> We could assume that there are no subclasses of AggregateTransformer
> and hide dbfactory behind a protected method or exclude
> AggregateTransformer from compilation in 1.1.
>
> Any preferences?  Stephane?

What I did to move forward was moved the initialization
of the static variable to the constructor - I don't
think it is going to hav noticeable side effects in this
case.  This is what I did:


    /** XML Parser factory */
    protected static DocumentBuilderFactory dbfactory = null;

    public AggregateTransformer(Task task){
        if (dbfactory == null) {
            dbfactory = DocumentBuilderFactory.newInstance();
        }
        this.task = task;
    }

Is this workable enough?

>
> Stefan
>

Cheers,
Magesh

*********************************************
*  Early to bed, early to rise sounds great *
*  until the alarm goes off.                *
*********************************************



--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message