diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-07-26 08:57:52 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-07-26 08:57:52 +0200 |
commit | 3a988bb88a5c66f651682083496159a7495e1acb (patch) | |
tree | 1da6987a371c2278cdea0802d7812fbc2f734297 /sonar-plugin-api | |
parent | e5cb819995b40afd98fc49976e35b73ec702d649 (diff) | |
download | sonarqube-3a988bb88a5c66f651682083496159a7495e1acb.tar.gz sonarqube-3a988bb88a5c66f651682083496159a7495e1acb.zip |
Fix Quality flaws
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/config/AesCipher.java | 4 | ||||
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/utils/Version.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/AesCipher.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/AesCipher.java index 049c138dd00..879375b8abc 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/config/AesCipher.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/AesCipher.java @@ -59,7 +59,7 @@ final class AesCipher implements Cipher { } catch (RuntimeException e) { throw e; } catch (Exception e) { - throw new RuntimeException(e); + throw new IllegalStateException(e); } } @@ -73,7 +73,7 @@ final class AesCipher implements Cipher { } catch (RuntimeException e) { throw e; } catch (Exception e) { - throw new RuntimeException(e); + throw new IllegalStateException(e); } } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/Version.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/Version.java index 33a445da069..10029f7483d 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/Version.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/Version.java @@ -218,7 +218,7 @@ public class Version implements Comparable<Version> { c = patch - other.patch; if (c == 0) { long diff = buildNumber - other.buildNumber; - c = diff > 0 ? 1 : (diff < 0 ? -1 : 0); + c = (diff > 0) ? 1 : ((diff < 0) ? -1 : 0); } } } |