RFR: 8261298: LinuxPackage.c, getJvmLauncherLibPath RPM->DEB typo

Aleksey Shipilev shade at openjdk.java.net
Mon Feb 8 08:53:55 UTC 2021


SonarCloud instance reports as new warning after JDK-8254702:

This branch can not be reached because the condition duplicates a previous condition in the same sequence of "if/else if" statements.

char* getJvmLauncherLibPath(void) {
   ...
        if (PACKAGE_TYPE_RPM == pkg->type) {
            pkgQueryCmd = "rpm -ql '%s' 2>/dev/null";
        } else if (PACKAGE_TYPE_RPM == pkg->type) { <--- here
            pkgQueryCmd = "dpkg -L '%s' 2>/dev/null";

Seems like an obvious typo.

Additional tests:
 - [x] Linux x86_64 (Ubuntu) `tools/jpackage`

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

Commit messages:
 - Typo fix

Changes: https://git.openjdk.java.net/jdk/pull/2452/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2452&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8261298
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2452.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2452/head:pull/2452

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


More information about the core-libs-dev mailing list