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

8327261: Parsing test for Double/Float succeeds w/o testing all bad cases #18113

Closed

Conversation

naotoj
Copy link
Member

@naotoj naotoj commented Mar 5, 2024

Fixing test cases. For bad test cases, only the first case was run, and the rest were ignored.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8327261: Parsing test for Double/Float succeeds w/o testing all bad cases (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/18113/head:pull/18113
$ git checkout pull/18113

Update a local copy of the PR:
$ git checkout pull/18113
$ git pull https://git.openjdk.org/jdk.git pull/18113/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 18113

View PR using the GUI difftool:
$ git pr show -t 18113

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/18113.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 5, 2024

👋 Welcome back naoto! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 5, 2024
@openjdk
Copy link

openjdk bot commented Mar 5, 2024

@naotoj The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Mar 5, 2024
@mlbridge
Copy link

mlbridge bot commented Mar 5, 2024

Webrevs

Copy link
Member

@jddarcy jddarcy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine; thanks for sending out the fix.

@openjdk
Copy link

openjdk bot commented Mar 5, 2024

@naotoj 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:

8327261: Parsing test for Double/Float succeeds w/o testing all bad cases

Reviewed-by: darcy, gli, joehw, jlu, bpb, lancea

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 15 new commits pushed to the master branch:

  • c6641c7: 8326831: Clarify test harness control variables in make help
  • 3d106cb: 8325139: JFR SwapSpace event - add free swap space information on Linux when running in a container environment
  • c00c939: 8327364: Parallel: Remove unused ParallelCompactData::add_obj
  • 98f0b86: 8319690: [AArch64] C2 compilation hits offset_ok_for_immed: assert "c2 compiler bug"
  • 2372aba: 8326172: Dubious claim on long[]/double[] alignment in MemorySegment javadoc
  • c653e67: 8327225: Revert DataInputStream.readUTF to static final
  • a089ed2: 8326936: RISC-V: Shenandoah GC crashes due to incorrect atomic memory operations
  • 560cf59: 8327287: Remove unused FLSVerifyDictionary debug option
  • fec51d4: 8327130: Serial: Remove Generation::record_spaces_top
  • e9adceb: 8327208: Remove unused method java.util.jar.Manifest.make72Safe
  • ... and 5 more: https://git.openjdk.org/jdk/compare/045eea11307f5df89071c7c7e366effdc23a22db...master

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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 5, 2024
@@ -557,10 +557,8 @@ private static void rudimentaryTest() {
private static void testParsing(String [] input,
boolean exceptionalInput) {
for(int i = 0; i < input.length; i++) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you're updating the file, I think changing the loop to an enhanced for loop would be an improvement.

Copy link
Member

@lgxbslgx lgxbslgx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Only a trivial suggestion.

Comment on lines 560 to 564
try {
d = Double.parseDouble(input[i]);
Double.parseDouble(input[i]);
check(input[i]);
}
catch (NumberFormatException e) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The catch clause doesn't need to stay in a new line.

Comment on lines 280 to 284
try {
d = Float.parseFloat(input[i]);
Float.parseFloat(input[i]);
check(input[i]);
}
catch (NumberFormatException e) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The catch clause doesn't need to stay in a new line.

@naotoj
Copy link
Member Author

naotoj commented Mar 5, 2024

Thanks for the reviews. Updated as suggested

Copy link
Member

@bplb bplb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@naotoj
Copy link
Member Author

naotoj commented Mar 6, 2024

Thanks for the reviews!
/integrate

@openjdk
Copy link

openjdk bot commented Mar 6, 2024

Going to push as commit 9f70940.
Since your change was applied there have been 30 commits pushed to the master branch:

  • 08b03a3: 8327376: Parallel: Remove unimplemented methods in psParallelCompact.hpp
  • ae5e3fd: 8327365: Inline and remove GCStats
  • 326c91e: 8327288: Obsolete unused ProcessDistributionStride product option
  • a7461de: 8325255: jdk.internal.util.ReferencedKeySet::add using wrong test
  • 2bdd387: 8327286: Obsolete unused NUMAPageScanRate product option
  • 992104d: 8327239: Obsolete unused GCLockerEdenExpansionPercent product option
  • fbb422e: 8327201: C2: Uninitialized VLoop::_pre_loop_end after JDK-8324890
  • 7d53559: 8319932: [JVMCI] class unloading related tests can fail on libgraal
  • bee50cd: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes
  • 96bfe61: 8326458: Menu mnemonics don't toggle in Windows LAF when F10 is pressed
  • ... and 20 more: https://git.openjdk.org/jdk/compare/045eea11307f5df89071c7c7e366effdc23a22db...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 6, 2024
@openjdk openjdk bot closed this Mar 6, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Mar 6, 2024
@openjdk
Copy link

openjdk bot commented Mar 6, 2024

@naotoj Pushed as commit 9f70940.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

7 participants