This Pull Request deprecates RDFFormat.forFileName and RDFFormat.forMIMEType for Sesame-2.8.0.
It also makes them work slightly better by calling them from the registries, as an interim measure while users recognise the deprecation and move to using the dynamic methods in Rio.
The changes to RDFParserRegistry and RDFWriterRegistry do not fully fix the issue that users have consistently found with third-party instances of RDFFormat, as the registries are not likely to be initialised before the user calls the RDFFormat methods for the first time. This results in them wondering why it works the second time, but not the first time.
Adding the Marmotta developers as reviewers as that is where the issue came up last time, and I noticed a commit that used RDFFormat.forFileName again today:
Required changes in Apache Marmotta should be quite straight forward, we'll track that in MARMOTTA-437
The mechanism to register custom Reader/Writers (ServiceLoader) will not change?
The ServiceLoader is not changing, other than it (RDFParserRegistry/RDFWriterRegistry) will attempt to register RDFFormat objects that it finds if they are not already registered. However, that may still break for users on the first time through, as they are likely to call RDFFormat.forMIMEType/forFileName before calling Rio.createParser. Best solution is to deprecate the RDFFormat methods and remove them in in a future version.