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

Java 9 support #105

Closed
8 tasks done
iloveeclipse opened this issue Jun 5, 2016 · 22 comments
Closed
8 tasks done

Java 9 support #105

iloveeclipse opened this issue Jun 5, 2016 · 22 comments
Assignees
Milestone

Comments

@iloveeclipse
Copy link
Member

iloveeclipse commented Jun 5, 2016

  • Need updated ASM (6.0 snapshot works fine)
    • We should temporarily host and build against a snapshot build, I can upload one
  • Need updated BCEL ?(current snapshot seem to work but probably lacks some new constructs). See Evaluate BCEL 6 update strategies #106 for BCEL update evaluation.
  • Need JRT FS support (I have a patch, missing: multi-module packages)
    • Need update of runtime requirements and build to Java 8 (I have a patch)
  • Need Eclipse plugin support (I have a patch)
  • Need proper update of JavaVersion parser (see Update JavaVersion for JEP 223 compatibility #75 , must be adopted)
  • Requires minor version number increase (3.0 -> 3.1) at least.
@iloveeclipse iloveeclipse self-assigned this Jun 5, 2016
@iloveeclipse iloveeclipse added this to the 3.1.0 milestone Jun 5, 2016
@amaembo
Copy link
Contributor

amaembo commented Jun 5, 2016

The following points may become issues:

  • Loading of JDK classes may fail as they are not in jars now, but in jimages.
  • String-concatenation based detectors will surely fail due to JEP 280 implementation

@iloveeclipse
Copy link
Member Author

I have patch for reading classes from jimages, this is not a problem.

@richardfearn
Copy link
Contributor

(Also posted to the findbugs-discuss list)

No objections to a private snapshot being used, but speaking as the maintainer of the Fedora FindBugs packages, I would very much appreciate it if you could:

  1. Specify exactly which upstream commit the FindBugs snapshot is based on.
  2. If a patch is needed on top of the upstream commit, include that patch in the FindBugs repository somewhere.

These two mean that Fedora can (continue to) rebuild BCEL for FindBugs from source.

iloveeclipse added a commit that referenced this issue Jun 5, 2016
The asm 6.0 snapshot was built from SVN 1818 version, from ASM_6_FEATURE
branch.
iloveeclipse added a commit that referenced this issue Jun 5, 2016


The support is not complete, currently packages which exist in multiple
modules aren't properly supported (java.awt is an example).
iloveeclipse added a commit that referenced this issue Jun 5, 2016
The right approach would be something like #75.
@iloveeclipse
Copy link
Member Author

iloveeclipse commented Jun 5, 2016

The first draft with Java 9 support is committed to java9 branch.
Currently known open issues (I'm working on it):

@iloveeclipse
Copy link
Member Author

OK, just found out that in BCEL HEAD all classes moved to new package structure (because it makes fun and of course because _maven_ needs it, see https://issues.apache.org/jira/browse/BCEL-222).

If I ever needed any argument why maven is evil...

Anyway.
Updating to HEAD of BCEL 6.0 with Java 9 support will break all existing FB detectors.

I'm playing with the idea to create a git repository fork from they SVN repo (https://commons.apache.org/proper/commons-bcel/source-repository.html) and move all classes back in git. With this git repo it should be easy to track the changes in BCEL HEAD.

iloveeclipse added a commit that referenced this issue Jun 6, 2016
FB follows now the new JDK version scheme described in
http://openjdk.java.net/jeps/223.

Java versions before Java 9 will have 1 as major segment, and some
meaningful number as major segment starting with Java 9. This should
work for most cases.
@iloveeclipse
Copy link
Member Author

FindBugs on Java 9 must work now, major work is done. Closing as fixed, new issues with Java 9 should be tracked by new tickets.

@don-vip
Copy link
Contributor

don-vip commented Jun 9, 2016

Thanks! I see there are 3 branches for Java 9 development, from which one should we build a snapshot to test it in our application?

@iloveeclipse
Copy link
Member Author

iloveeclipse commented Jun 9, 2016

@don-vip
Copy link
Contributor

don-vip commented Jun 9, 2016

ok thanks! Congratulations for this release :)

@don-vip
Copy link
Contributor

don-vip commented Jun 9, 2016

I have tested the new release on our project with JDK7, JDK8 and JDK9b121. It works perfectly with JDK8 and JDK9. However, the binaries have been compiled with JDK8, so we can't use it anymore with JDK7, is it intentional?

@iloveeclipse
Copy link
Member Author

Yes. That's the prise for Java 9. We theoretically can run on Java 7 if we would use extra jrt-fs library recompiled on 7 (there was one on github) but we practically have no one who would have time to contribute it. I do not have time to support dead systems too.

@iloveeclipse
Copy link
Member Author

@bmuschko
Copy link

@iloveeclipse Do you have an ETA on when version 3.1.0 might be available on Maven Central as final version? I saw that there's a SNAPSHOT version available right now.

@iloveeclipse
Copy link
Member Author

  1. I hope to merge 3.1.0 preview code to master this month, because I'm waiting on user feedback & "official" ASM 6 and BCEL 6 preview builds, which should be available end of this week. I do not have concrete plans to publish "final" version, because Java 9 is not yet there and therefore many things may change.

  2. I'm not using maven (and don't plan to do this in the future), so for maven support please ask on the project mailing list. I think there were few people previously doing this.

@bmuschko
Copy link

@iloveeclipse Is FindBugs still going to provide a Java 9-compatible version? I see that this issue has been closed.

@iloveeclipse
Copy link
Member Author

The development is moved to https://github.com/spotbugs/spotbugs.
If you want help, please build & test against new JDK 9 build and report if there is a problem.

@bmuschko
Copy link

@iloveeclipse Thanks for the pointer. Is it correct to assume that FindBugs will never support Java 9 then? Instead users are supposed to use Spotbugs. Is that correct?

@iloveeclipse
Copy link
Member Author

Never say never :-)
So far we did not hear anything from Bill Pugh since we asked for his help before forking the project, so you can assume that FindBugs project here is dead.

And yes, we are trying all we can do to minimize the pain for existing FindBugs users while transition to SpotBugs. I can say for myself that I'm running latest snapshot without any problems both as command line and Eclipse plugin, both on Java 8.

Java 9 changed so much in so many ways during the betas that I'm pretty sure it will not work out of the box with SpotBugs anymore. At some time I've given up to download and test them because it is really time consuming, but if you would take time for testing and report the issues, we will try to fix them.

@bmuschko
Copy link

@iloveeclipse Thanks, this information helps a lot.

@iloveeclipse
Copy link
Member Author

iloveeclipse commented Jul 18, 2017

Actually just tried the latest beta, SpotBugs works running on Java 9 with --add-modules=ALL-SYSTEM JVM argument just fine.

@don-vip
Copy link
Contributor

don-vip commented Jul 18, 2017

Actually we're still using findbugs 3.1.0_preview2 with jdk9 on a weekly basis (for each new EA build) and it works fine! I'm pretty confident about Spotbugs' Java 9 support 👍
I'm waiting for RC4 before making the big switch :) Many thanks to all the Spotbugs team for all the hard work you're doing. It's really great to see you care about Findbugs users, while Bill seems more interested to tweet about American politics rather than maintain his software, or simply talk to the Java community...
By the way ASM 6.0 beta has just been released: https://mail.ow2.org/wws/arc/asm/2017-07/msg00002.html

@iloveeclipse
Copy link
Member Author

Yep, we know it, see spotbugs/spotbugs#268

asfgit pushed a commit to apache/kafka that referenced this issue Aug 19, 2017
Compilation error fixes:
- Avoid ambiguity error when appending to Properties in Scala
code (scala/bug#10418)
- Use position() and limit() to fix ambiguity issue (
scala/bug#10418 (comment))
- Disable findBugs if Java 9 is used (
findbugsproject/findbugs#105)

Compilation warning fixes:
- Avoid deprecated Class.newInstance in Utils.newInstance
- Silence a few Java 9 deprecation warnings
- var -> val and unused fixes

Runtime error fixes:
- Introduce Base64 class that works in Java 7 and Java 9

Also:
- Set --release option if building with Java 9

Note that tests involving EasyMock (easymock/easymock#193)
or PowerMock (powermock/powermock#783)
will fail as neither supports Java 9 currently.

Author: Ismael Juma <[email protected]>

Reviewers: Jason Gustafson <[email protected]>

Closes #3647 from ijuma/kafka-4501-support-java-9
bmuschko pushed a commit to gradle/gradle that referenced this issue Feb 19, 2018
For more information see findbugsproject/findbugs#105. It's recommended to use SpotBugs now.
sebasjm pushed a commit to sebasjm/findbugs that referenced this issue Mar 11, 2018
The asm 6.0 snapshot was built from SVN 1818 version, from ASM_6_FEATURE
branch.
sebasjm pushed a commit to sebasjm/findbugs that referenced this issue Mar 11, 2018
…indbugsproject#105

The support is not complete, currently packages which exist in multiple
modules aren't properly supported (java.awt is an example).
sebasjm pushed a commit to sebasjm/findbugs that referenced this issue Mar 11, 2018
sebasjm pushed a commit to sebasjm/findbugs that referenced this issue Mar 11, 2018
sebasjm pushed a commit to sebasjm/findbugs that referenced this issue Mar 11, 2018
…oject#75

FB follows now the new JDK version scheme described in
http://openjdk.java.net/jeps/223.

Java versions before Java 9 will have 1 as major segment, and some
meaningful number as major segment starting with Java 9. This should
work for most cases.
sebasjm pushed a commit to sebasjm/findbugs that referenced this issue Mar 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants