Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove JAXB dependency for better java 9+ compatibility. #1204

Closed
jrobinso opened this issue Oct 25, 2018 · 8 comments
Closed

Remove JAXB dependency for better java 9+ compatibility. #1204

jrobinso opened this issue Oct 25, 2018 · 8 comments

Comments

@jrobinso
Copy link
Contributor

As you know JAXB is not included with Java 9 and above. It can be used with command line switches, for now, but introduces another dependency. I have removed all uses of JAXB from IGV, and am looking at the htsjdk now. It looks like the only place it is used is the class SAMSequenceDictionary, however I'm not sure what its purpose is there. Are objects of that class serialized from somewhere? It would be strange to serialize this class only but it is the only class I can find with JAXB annotations.

@jrobinso
Copy link
Contributor Author

BTW we are using the htsjdk with Java 11 with no issues, but would like to drop the JAXB switches.

@lindenb
Copy link
Contributor

lindenb commented Oct 25, 2018

I wrote the jaxb bindings because I had the idea to use htshdk for webservices. But in the end, I did not use it . Unless someone else use it, I don't see any reason to keep the jaxb stuff in htsjdk.

I only see my code in github (or some forks..) : https://github.com/search?q=Unmarshaller+htsjdk&type=Code

@lbergelson
Copy link
Member

Interesting, I'm surprised it works in 11, that's good to hear though.

It looks like we have xml binding annotations in:
SAMSequenceRecord
AbstractSAMHeaderRecord
SAMSequenceDictionary

And we have a single use of DatatypeConverter.printHexArrays() in EncodingParams

We could definitely remove the use of DatatypeConverter without any problems.

@lindenb I believe you added the xml binding annotations. Would you be opposed to removing them if it meant we could make htsjdk be more compatible with java 9+?

@lbergelson
Copy link
Member

Oh, sorry, you wrote back before I finished my comment and I didn't see it. Please ignore...

@lindenb
Copy link
Contributor

lindenb commented Oct 25, 2018

@lindenb I believe you added the xml binding annotations. Would you be opposed to removing them if it meant we could make htsjdk be more compatible with java 9+?

no, one can remove them

@lbergelson lbergelson changed the title Dependency of JAXB Remove JAXB dependency for better java 9+ compatibility. Oct 25, 2018
@lbergelson
Copy link
Member

@jrobinso Sounds like we should remove it.

@jrobinso
Copy link
Contributor Author

@lindenb Pierre is that you? You're everywhere.

I can remove these and send a PR if you want, I just removed several hundred of them from IGV.

@lbergelson
Copy link
Member

@jrobinso You should be able to replace the Dataconverter.printHexBinary with StringUtil.bytesToHexString()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants