RFR: 8263659: Reflow GTestResultParser for better readability

Alex Blewitt github.com+76791+alblue at openjdk.java.net
Wed Mar 17 12:10:59 UTC 2021


As noted by https://sonarcloud.io/code?id=shipilev_jdk&selected=shipilev_jdk%3Atest%2Fhotspot%2Fjtreg%2Fgtest%2FGTestResultParser.java there are a few fixes that can be applied for the GTestResultParser:

* Avoiding nested 'try' statements
* Avoiding nested 'switch' statements
* Adding a break for each switch case to prevent accidental/unwanted fall-through
* Disabling ability to load from remote files when parsing XML files

-------------

Commit messages:
 - 8263659: Reflow GTestResultParser for better readability

Changes: https://git.openjdk.java.net/jdk/pull/2991/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2991&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8263659
  Stats: 25 lines in 1 file changed: 3 ins; 4 del; 18 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2991.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2991/head:pull/2991

PR: https://git.openjdk.java.net/jdk/pull/2991


More information about the hotspot-dev mailing list