Re: setEntityResolver(null)

"Karl Waclawek" <[email protected]> Wed, 2 Apr 2003 09:32:39 -0500
Newsgroups gmane.text.xml.sax.devel
Message-ID <003b01c2f924$b7678970$9e539696@citkwaclaww2k>

> Karl Waclawek wrote,
> > That would only make sense if it should never be null, but the
> > default value is Null, so I have to agree with Elliott on that. All
> > he wants is the ability to reset to the initial value and behaviour,
> > if I understand him correctly.
> 
> I don't think the default value _is_ null. The default is what you get 
> when setEntityResolver isn't invoked at all. It's possible that 
> internally an implementation might have a field which is null in this 
> case, but that's an implementation detail.

getEntityResolver returns Null, if setEntityRresolver was never invoked.

> > I think your comments are sensible, but would require more changes
> > to the spec - i.e. disallowing Null for the initial value and
> > pre-defining a NonResolvingEntityResolver and DefaultEntityResolver,
> > at least for consistency reasons.
> 
> Actually, my proposal doesn't require any changes to the spec beyond the 
> reinstatement of the throws clause. It'd be desirable, but absolutely 
> _not_ necessary to provide implementations of the two resolvers as part 
> of the SAX distribution, because they can both be defined by end users.

Well, assuming you want to return to the default behaviour you set
the defaultEntityResolver. Now, calling getEntityResolver returns
the defaultEntityResolver, while in the initial case it returned Null,
for the same entity resolver. That looks inconsistent.

Karl


-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
List: sax-devel, [email protected]
See:  http://www.saxproject.org/
https://lists.sourceforge.net/lists/listinfo/sax-devel