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

Moving to Java 17 #208

Closed
leonardehrenfried opened this issue Dec 13, 2022 · 3 comments · Fixed by #248
Closed

Moving to Java 17 #208

leonardehrenfried opened this issue Dec 13, 2022 · 3 comments · Fixed by #248

Comments

@leonardehrenfried
Copy link
Collaborator

The currently used version of this project is Java 8 which has been EOL for a while.

I just tried it and moving to Java 17 is actually very painless and just two lines of code.

Would you appreciate a PR for that?

The consequences of this is that you will have to use a more recent version of Java to run the code. Is this a problem?

@EmmaSimon
Copy link
Contributor

I'm also trying to run this in Java 17 and it seems to work fine, except for a single test failure. Not sure if a fix for that was the code change you mentioned.

[INFO] Running org.onebusaway.gtfs_transformer.deferred.DeferredValueSupportTest                                                                                                            
[ERROR] Tests run: 4, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.019 s <<< FAILURE! - in org.onebusaway.gtfs_transformer.deferred.DeferredValueSupportTest                            
[ERROR] testResolveConverter_FieldMappingConverter(org.onebusaway.gtfs_transformer.deferred.DeferredValueSupportTest)  Time elapsed: 0.019 s  <<< ERROR!                                    
java.lang.ExceptionInInitializerError                                                                                                                                                       
        at org.onebusaway.gtfs_transformer.deferred.DeferredValueSupportTest.testResolveConverter_FieldMappingConverter(DeferredValueSupportTest.java:79)                                   
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @7d70d1b1                                                           
        at org.onebusaway.gtfs_transformer.deferred.DeferredValueSupportTest.testResolveConverter_FieldMappingConverter(DeferredValueSupportTest.java:79)

@leonardehrenfried
Copy link
Collaborator Author

I had a video meeting with @sheldonabrown a few months ago where he said that he is quite conservative about upgrading Java versions so for now he has decided to migrate to Java 11. At the time of writing this it had been Java 8.

@sheldonabrown
Copy link
Member

sheldonabrown commented Apr 27, 2023 via email

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

Successfully merging a pull request may close this issue.

3 participants