-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8365060: Historical data for JDK 8 should include the jdk.net package #26817
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
|
👋 Welcome back jlahoda! A progress list of the required criteria for merging this PR into |
|
@lahodaj This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 660 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
| +com/sun/management/ | ||
| +com/sun/nio/sctp/ | ||
| +jdk/ | ||
| +jdk/net/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is one of the main changes - whitelisting jdk.net for JDK 8.
| field name TAKRI descriptor Ljava/lang/Character$UnicodeBlock; flags 19 | ||
| field name MIAO descriptor Ljava/lang/Character$UnicodeBlock; flags 19 | ||
| field name ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS descriptor Ljava/lang/Character$UnicodeBlock; flags 19 | ||
| field name CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E descriptor Ljava/lang/Character$UnicodeBlock; flags 19 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field has been added as part of Java SE 8, MR 5.
| method name clear descriptor ()V flags 1 | ||
| method name isEnqueued descriptor ()Z flags 1 | ||
| method name enqueue descriptor ()Z flags 1 | ||
| method name clone descriptor ()Ljava/lang/Object; thrownTypes java/lang/CloneNotSupportedException flags 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method has been added as part of Java SE 8, MR 4 (although I don't think it should have a real effect on compilation, as it is an override of the j.l.Object method).
| field name NaN descriptor F constantValue NaN flags 19 | ||
| field name MAX_VALUE descriptor F constantValue 3.4028235E38 flags 19 | ||
| field name MIN_NORMAL descriptor F constantValue 1.17549435E-38 flags 19 | ||
| field name MIN_NORMAL descriptor F constantValue 1.1754944E-38 flags 19 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is only a representational difference, without any real change to the value. Using:
public class Rep {
public static void main(String... args) {
System.out.println(Float.floatToIntBits(Float.parseFloat("1.17549435E-38")));
System.out.println(Float.floatToIntBits(Float.parseFloat("1.1754944E-38")));
if (Float.floatToIntBits(Float.parseFloat("1.17549435E-38")) ==
Float.floatToIntBits(Float.parseFloat("1.1754944E-38"))) {
System.out.println("The same.");
} else {
System.out.println("Not the same.");
}
}
}
I get the same on both JDK 8 and JDK 25:
8388608
8388608
The same.
Probably related to JDK-4511638.
| field name ANATOLIAN_HIEROGLYPHS descriptor Ljava/lang/Character$UnicodeBlock; flags 19 | ||
| field name SUTTON_SIGNWRITING descriptor Ljava/lang/Character$UnicodeBlock; flags 19 | ||
| field name SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS descriptor Ljava/lang/Character$UnicodeBlock; flags 19 | ||
| field name CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E descriptor Ljava/lang/Character$UnicodeBlock; flags 19 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The field is now part of JDK 8's data, but was not part of JDK 9, so it is removed.
| method name <init> descriptor (Ljavax/swing/JSpinner;Ljava/lang/String;)V flags 1 | ||
| method name getFormat descriptor ()Ljava/text/DecimalFormat; flags 1 | ||
| method name getModel descriptor ()Ljavax/swing/SpinnerNumberModel; flags 1 | ||
| method name setComponentOrientation descriptor (Ljava/awt/ComponentOrientation;)V flags 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is only a new override of an existing method in the parent class.
| method name isThreadAllocatedMemorySupported descriptor ()Z flags 401 | ||
| method name isThreadAllocatedMemoryEnabled descriptor ()Z flags 401 | ||
| method name setThreadAllocatedMemoryEnabled descriptor (Z)V flags 401 | ||
| method name getCurrentThreadAllocatedBytes descriptor ()J flags 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a handful of methods added in u282 (getThreadInfo, dumpAllThreads and getCurrentThreadAllocatedBytes) and in u412 (getTotalThreadAllocatedBytes). Given the other updates, it seems OK to keep those here.
|
|
||
| class name com/sun/management/ThreadMXBean | ||
| header extends java/lang/Object implements java/lang/management/ThreadMXBean flags 601 | ||
| -method name getCurrentThreadAllocatedBytes descriptor ()J |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The methods were not part of JDK 9, so are removed here.
| class name jdk/net/ExtendedSocketOptions | ||
| header extends java/lang/Object flags 31 classAnnotations @Ljdk/Profile+Annotation;(value=I1) runtimeAnnotations @Ljdk/Exported; | ||
| field name SO_FLOW_SLA descriptor Ljava/net/SocketOption; flags 19 signature Ljava/net/SocketOption<Ljdk/net/SocketFlow;>; | ||
| field name TCP_KEEPIDLE descriptor Ljava/net/SocketOption; flags 19 signature Ljava/net/SocketOption<Ljava/lang/Integer;>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The TCP_* have been added in u272.
| @@ -0,0 +1,76 @@ | |||
| # | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main change here - adding jdk.net package for JDK 8 data.
Webrevs
|
| JavaFileObject file = new ByteArrayJavaFileObject(data.toByteArray()); | ||
| try (InputStream in = new ByteArrayInputStream(data.toByteArray())) { | ||
| String name = ClassFile.of().parse(in.readAllBytes()).thisClass().name().stringValue(); | ||
| String name = ClassFile.of().parse(in.readAllBytes()).thisClass().name().stringValue().replace("/", "."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good fix for lastIndexOf('.') below 👍
shipilev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(not an expert in this area at all, drive-by review)
Feels a bit awkward that lines jump within the single file, looks like the order is not stable? Can it be stabilized, or would it incur even more change in the symbol files?
| out.write(Float.toHexString((Float) value)); | ||
| } else { | ||
| out.write(String.valueOf(value)); | ||
| if (value instanceof Character ch && Character.isSurrogate(ch)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like one would want to match the style, and of else if, joining the if-chain above?
The problem is that these files are generated by a version of the tool that (lets say) more lenient in ordering. More specifically, it was willing to mix removals and additions, as long as the order of removals and additions for the same signature was correct (i.e. first removal and then addition). At some point, I think, it was causing unwelcome diffs, so we changed the tool to first do all removals, and then all additions. But, we didn't update existing files, as that would be unnecessary churn. I.e., I'm afraid there are not too many sensible options. |
Yeah. Just checking if anything easy was on the table, because this patch is going to be backported to at least some LTSes. I tried to
So "superfluous" changes in |
|
/csr needed |
|
@jddarcy has indicated that a compatibility and specification (CSR) request is needed for this pull request. @lahodaj please create a CSR request for issue JDK-8365060 with the correct fix version. This pull request cannot be integrated until the CSR request is approved. |
|
@lahodaj This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a |
|
/integrate |
|
Going to push as commit 8606d3f.
Your commit was automatically rebased without conflicts. |
In JDK 8, the package
jdk.netwas exported and part ofrt.jar, and hence should have been part of the historical data for--release, but it is not. The primary goal of this PR is to add historical data forjdk.netfor JDK 8.The changes herein are based on JDK 8u462. I used the Probe running on JDK 8 to dump the classfiles, along these lines:
and then the up-to-date
CreateSymbolsto generate thesym.txtfiles, along these lines:There are a few APIs that have been added for this release, and a few representational changes.
Most notably - the ordering of "removal" entries (i.e. those that start with
-) and "add" entries is much more strict in the currentCreateSymbols, and so there are some changes where the removal entries are moved to the front. I went through those, and they seem OK to me.I'll add specific comments to the other updates to the files.
Progress
Issues
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26817/head:pull/26817$ git checkout pull/26817Update a local copy of the PR:
$ git checkout pull/26817$ git pull https://git.openjdk.org/jdk.git pull/26817/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 26817View PR using the GUI difftool:
$ git pr show -t 26817Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26817.diff
Using Webrev
Link to Webrev Comment