JDK-8259576 : Misplaced curly brace in Matcher::find_shared_post_visit
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 16,17
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-01-11
  • Updated: 2021-02-02
  • Resolved: 2021-01-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 16 JDK 17
16.0.1Fixed 17 b05Fixed
Related Reports
Relates :  
Description
SonarCloud demo instance reports the issue here:

    case Op_VectorMaskCmp: {
      n->set_req(1, new BinaryNode(n->in(1), n->in(2)));
      n->set_req(2, n->in(3));
      n->del_req(3);
      break;
    default: // <----- ERROR
      break;
    }

"The direct parent of this switch-label is not the body of a switch statement."

This is added by JDK-8223347, and it is an obviously misplaced curly-brace. It is innocious in current code, but may become problematic as more cases are added to the switch.
Comments
Fix Request (JDK 16u): This fixes a misplaced curly brace (not a problem in current code but might become a problem with future changes). The fix is trivial and low risk. The patch applies cleanly to JDK 16u.
28-01-2021

Changeset: 4697cfa4 Author: Aleksey Shipilev <shade@openjdk.org> Date: 2021-01-12 10:52:36 +0000 URL: https://git.openjdk.java.net/jdk/commit/4697cfa4
12-01-2021

ILW = Misplaced curly brace (not a problem in current code), vector api code, no workaround = LMH = P5
12-01-2021