-
Notifications
You must be signed in to change notification settings - Fork 4
Use ct.sym to isolate sigtest from underlaying JDK #3
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
Conversation
…e.isEmpty() method
Bits with this change have just been staged at maven.java.net repository. They can be released with a single click. |
Updated: I'm trying this out locally with OpenJDK11
I'm debugging in com.sun.tdk.signaturetest.SignatureTest#checkAnnotations and see that It looks like the https://gist.github.com/scottmarlow/ca37ce901129556877215e5c528cb8a1 shows the call stack into com.sun.tdk.signaturetest.SignatureTest#checkAnnotations when the first |
Hmm, I didn't try running with |
|
The warning that I mentioned is followed by a failure about the @deprecated, sorry for leaving that out. I get the same warnings and error with
I only had included the first one before. I also see other ones that #2 did deal with. like:
|
https://github.com/jtulach/netbeans-apitest/pull/2/files#diff-2e7f4c9b2c847f4809b73ae0053643bd23b20990b876f902133ebc08185d2586R1449 shows how #2 dealt with the @deprecated failure. I wonder if any parts of #2 could help with the failures I see with #3 More specifically, if the annotation class can be loaded by Release#findClass(name) then the annotation class is likely a JDK class and if we can detect that condition, then we could ignore the signature for doing comparisons in case the jdk signature is updated in a later JDK. Or maybe the |
2869360
to
26a4152
Compare
New bits staged at 1099 repository. |
👍 |
Part of 1.4 release. |
Many projects observed problems executing SigTest when switching the version of JDK the test is performed on. As soon as the JDK changes, the API of base Java classes changes as well. SigTest may then detect transitive changes even the actual API hasn't changed at all. As #2 PR indicates we need a solution to this problem.
Let's use the
ct.sym
approach (as pioneered byjavac
in JDK9). E.g. specify the release of JDK API to compare against. Then it wouldn't matter which JDK is used for running the check. - the JDK API used in the check would always be fixed to the specified release version.This PR enhances the
-BootCP
command line argument to understand an optional parameter. Use-BootCp 8
to select JDK8's API as the base. Use-BootCP 15
to select JDK 15's API. Use-BootCp
without parameter to select the API of the underlaying JDK SigTest runs on (the original behavior). The PR reuses existing-BootCp
functionality and enhances it rather than inventing new option - at the end only one occurence of-BootCp <with or without number>
makes sense.Both Ant and Maven integrations were enhanced to provide new
release
attribute (trying to mimic the name of attribute of AntJavacTask
and Maven compiler plugin) - if specified, it uses the-BootCp number
parameter when calling into the SigTest.Documentation has been updated and a test verifying addition of
CharSequence.isEmpty()
in JDK15 is properly detected has been added.