I had problem with dev-java/adaptx-0.9.13_p20041105-r1 compilation because of source version and TransformerFactoryImpl.java doesn't implement setFeature() method. I have created new ebuild and patches that changes source version to 1.4 and added blank implementation of setFeature() that throws exception. Now it compiles on sun-jdk-1.5.0.06. Java documentation says "All implementations are required to support the XMLConstants.FEATURE_SECURE_PROCESSING feature.". I didn't add the support because I don't know adaptx. What I did is I just solved the compilation problem. I would appreciate if anyone who knows more about adaptx could review this patch and eventually correct it.
Created attachment 76524 [details] Ebuild using the patches
Created attachment 76525 [details, diff] Source version patch
Created attachment 76526 [details, diff] Adds empty implementation of setFeature()
(In reply to comment #0) > I had problem with dev-java/adaptx-0.9.13_p20041105-r1 compilation because of > source version and TransformerFactoryImpl.java doesn't implement setFeature() > method. I have created new ebuild and patches that changes source version to > 1.4 and added blank implementation of setFeature() that throws exception. > > Now it compiles on sun-jdk-1.5.0.06. > > Java documentation says "All implementations are required to support the > XMLConstants.FEATURE_SECURE_PROCESSING feature.". I didn't add the support > because I don't know adaptx. What I did is I just solved the compilation > problem. > > I would appreciate if anyone who knows more about adaptx could review this > patch and eventually correct it. > I think that taking this approach would be a bad idea adding empty implementations of functions needed for an inerface. A better one would be to take this up with upstream. The snapshot is pretty old, so it could well be that they've released a version which supports 1.5.
I thought so but I couldn't find homepage of the project. The one that is mentioned in the ebuild didn't work and Google didn't find anything useful either.
The sources are here: http://cvs.castor.codehaus.org/viewrep/~br=MAIN/castor/adaptx/adaptx/src
Removing [SOLVED] from summary, because the current solution is less than ideal.
I gave the latest code in CVS a whirl using 1.5, and it also suffers from the same problem.
Right now, I'm thinking that it would be better to throw UnsupportedOperationException in setFeature would be the best bet, until (and if...) upstream can fix it.
Created attachment 90876 [details, diff] adaptx-0.9.13_p20041105-jdk15.patch No need for source. A complete patch.
I think we should (and in all similar cases) be throwing an AbstractMethodError. Because that's what you get if you compile it with 1.4 and then try to invoke the method added by 1.5 interface. I've tried it.
Package removed from tree.