diff options
author | Carsten Hammer | 2019-05-21 18:10:01 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2019-06-11 10:40:22 +0000 |
commit | 047aa8457b51a60d533bb2c865c9982ade8bf67c (patch) | |
tree | 3a8a8b2d9d6f6ec60a500ae07cc3ec51e77718b5 /bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java | |
parent | 9f8a0b0af461c252a526b84ccf586361daa50297 (diff) | |
download | rt.equinox.p2-047aa8457b51a60d533bb2c865c9982ade8bf67c.tar.gz rt.equinox.p2-047aa8457b51a60d533bb2c865c9982ade8bf67c.tar.xz rt.equinox.p2-047aa8457b51a60d533bb2c865c9982ade8bf67c.zip |
Use switch over strings where possibleI20190620-1800I20190620-0130I20190619-1820I20190619-1800I20190618-1805I20190618-0225I20190617-1800I20190616-1800I20190615-1800I20190614-1800I20190614-0330I20190613-1800I20190613-0210I20190612-1800I20190612-0115
Change cascades of ifs which can be converted to switch over Strings.
Change-Id: Id86536ada5cc4a916fbd5aa31123d1b45d7b5225
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java')
-rw-r--r-- | bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java index 3fd40734f..8ede389c3 100644 --- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java +++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java @@ -103,20 +103,31 @@ public class BrandingIron { } descriptor.setLocation(root); - if ("win32".equals(os)) //$NON-NLS-1$ - brandWindows(descriptor); - else if ("linux".equals(os)) //$NON-NLS-1$ - brandLinux(descriptor); - else if ("solaris".equals(os)) //$NON-NLS-1$ - brandSolaris(descriptor); - else if ("macosx".equals(os)) //$NON-NLS-1$ - brandMac(descriptor); - else if ("aix".equals(os)) //$NON-NLS-1$ - brandAIX(descriptor); - else if ("hpux".equals(os)) //$NON-NLS-1$ - brandHPUX(descriptor); - else + if (os==null) renameLauncher(descriptor); + else switch (os) { + case "win32": //$NON-NLS-1$ + brandWindows(descriptor); + break; + case "linux": //$NON-NLS-1$ + brandLinux(descriptor); + break; + case "solaris": //$NON-NLS-1$ + brandSolaris(descriptor); + break; + case "macosx": //$NON-NLS-1$ + brandMac(descriptor); + break; + case "aix": //$NON-NLS-1$ + brandAIX(descriptor); + break; + case "hpux": //$NON-NLS-1$ + brandHPUX(descriptor); + break; + default: + renameLauncher(descriptor); + break; + } descriptor.setExecutableName(name, true); } |