Skip to content

Conversation

@turbanoff
Copy link
Member

@turbanoff turbanoff commented Sep 26, 2021

In couple of classes, result part of arrays of Pattern.split is compared with null. Pattern.split (and hence String.split) never returns null in array elements. Such comparisons are redundant.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8274333: Redundant null comparison after Pattern.split

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5708/head:pull/5708
$ git checkout pull/5708

Update a local copy of the PR:
$ git checkout pull/5708
$ git pull https://git.openjdk.java.net/jdk pull/5708/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5708

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5708.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 26, 2021

👋 Welcome back turbanoff! 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.

@turbanoff turbanoff changed the title [PATCH] Remove redundant 'null' comparison after Pattern.split 8274333: Redundant null comparison after Pattern.split Sep 26, 2021
@openjdk
Copy link

openjdk bot commented Sep 27, 2021

@turbanoff The following labels will be automatically applied to this pull request:

  • core-libs
  • security

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

@openjdk openjdk bot added security security-dev@openjdk.org core-libs core-libs-dev@openjdk.org rfr Pull request is ready for review labels Sep 27, 2021
@mlbridge
Copy link

mlbridge bot commented Sep 27, 2021

Webrevs

Copy link
Member

@seanjmullan seanjmullan left a comment

Choose a reason for hiding this comment

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

The AlgorithmDecomposer change looks fine to me.

@openjdk
Copy link

openjdk bot commented Sep 27, 2021

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

8274333: Redundant null comparison after Pattern.split

Reviewed-by: mullan, weijun, rriggs, iris

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

  • 36bd4a3: 8277404: Test VMDeprecatedOptions.java failing with Unable to create shared archive file
  • 57eb864: 8276927: [PPC64] Port shenandoahgc to linux on ppc64le
  • 8db0c36: 8277414: ProblemList runtime/CommandLine/VMDeprecatedOptions.java on windows-x64
  • 03473b4: 8270874: JFrame paint artifacts when dragged from standard monitor to HiDPI monitor
  • ce0f00f: 8276093: Improve naming in closures to iterate over card sets
  • 5d249c4: 8275071: [macos] A11y cursor gets stuck when combobox is closed
  • 354a34e: 8277336: Improve CollectedHeap::safepoint_workers comments
  • 276bfcd: 8277407: javax/swing/plaf/synth/SynthButtonUI/6276188/bug6276188.java fails to compile after JDK-8276058
  • d93b238: 8277180: Intrinsify recursive ObjectMonitor locking for C2 x64 and A64
  • 00c388b: 8259643: ZGC can return metaspace OOM prematurely
  • ... and 680 more: https://git.openjdk.java.net/jdk/compare/7700b25460b9898060602396fed7bc590ba242b8...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@seanjmullan, @wangweij, @RogerRiggs, @irisclark) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 27, 2021
@turbanoff
Copy link
Member Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Oct 4, 2021
@openjdk
Copy link

openjdk bot commented Oct 4, 2021

@turbanoff
Your change (at version f71380f) is now ready to be sponsored by a Committer.

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 1, 2021

@turbanoff 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 add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@RogerRiggs
Copy link
Contributor

/sponsor
Passes Tier1-3

@openjdk
Copy link

openjdk bot commented Nov 19, 2021

Going to push as commit 36b59f3.
Since your change was applied there have been 708 commits pushed to the master branch:

  • 6677554: 8274949: Use String.contains() instead of String.indexOf() in java.base
  • 09e8c8c: 8277342: vmTestbase/nsk/stress/strace/strace004.java fails with SIGSEGV in InstanceKlass::jni_id_for
  • 976c2bb: 8277212: GC accidentally cleans valid megamorphic vtable inline caches
  • 03f8c0f: 8275887: jarsigner prints invalid digest/signature algorithm warnings if keysize is weak/disabled
  • 936f7ff: 8276150: Quarantined jpackage apps are labeled as "damaged"
  • a022796: 8275745: Reproducible copyright headers
  • b1a1bf4: 8277427: Update jib-profiles.js to use JMH 1.33 devkit
  • 03debf2: 8276774: Cookie stored in CookieHandler not sent if user headers contain cookie
  • b15e6f0: 8277449: compiler/vectorapi/TestLongVectorNeg.java fails with release VMs
  • 11d819d: 8277439: G1: Correct include guard name in G1EvacFailureObjectsSet.hpp
  • ... and 698 more: https://git.openjdk.java.net/jdk/compare/7700b25460b9898060602396fed7bc590ba242b8...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Nov 19, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Nov 19, 2021
@openjdk
Copy link

openjdk bot commented Nov 19, 2021

@RogerRiggs @turbanoff Pushed as commit 36b59f3.

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

@turbanoff turbanoff deleted the redundant_null_comparison_with_result_String.split branch February 21, 2022 12:44
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 security security-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

5 participants