jena-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Reynolds <dave.e.reyno...@gmail.com>
Subject Re: XMLInputFactory#newFactory not available in OpenJDK 1.6
Date Tue, 01 Nov 2011 15:42:14 GMT
On Tue, 2011-11-01 at 15:26 +0000, Damian Steer wrote: 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 01/11/11 15:07, Simon Helsen wrote:
> > I created https://issues.apache.org/jira/browse/JENA-152
> > 
> > thanks
> > 
> > Simon
> 
> Thanks Simon,
> 
> Actually, it does seem to exist:
> 
> <http://download.oracle.com/javase/6/docs/api/javax/xml/stream/XMLInputFactory.html#newFactory()>
> 
> And works for me in openjdk-1.6:
> 
> java version "1.6.0_23"
> OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre10-0ubuntu5)
> OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
> 
> However no obvious harm changing it. Not at all clear what the
> difference is to me (anyone?).

Going entirely by the JavaDoc page you pointed at then the newInstance/2
method has been deprecated in favour of newFactory/2 with the comment:

"Deprecated. This method has been deprecated to maintain API
consistency. All newInstance methods have been replaced with
corresponding newFactory methods. The replacement
newFactory(java.lang.String, java.lang.ClassLoader) method defines no
changes in behavior."

That bit about *all* newInstance methods have been been replaced
suggests to me that newFactory/0 is the intended replacement for
newInstance/0, has the same semantics, but for some reason newInstance/0
hasn't been deprecated yet, maybe an oversight. 

If so that would suggest the current code is correct.

Dave



Mime
View raw message