While upgrading to the latest Jena version, I noticed that the handling
of the language parameter has changed compared to earlier versions. The
language argument of Model.read is no longer treated with priority, but
instead it will try to "guess" the content type first:
RDFDataMgr.determineCT
if ( ct == null || isTextPlain )
ct = RDFLanguages.guessContentType(target) ;
if ( ct == null && hintLang != null )
ct = hintLang.getContentType() ;
This seems to violate the contract of the Model.read function, which states
@param lang the langauge of the serialization
I believe if a language has been explicitly passed into the method, then
it should be used - users have the freedom to rely on the guessing
algorithm by selecting null as the language. Alternatively, the comment
of the Model.read function should be changed to clarify the new semantics.
Thanks
Holger