aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2017-07-26 08:57:52 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2017-07-26 08:57:52 +0200
commit3a988bb88a5c66f651682083496159a7495e1acb (patch)
tree1da6987a371c2278cdea0802d7812fbc2f734297 /sonar-plugin-api
parente5cb819995b40afd98fc49976e35b73ec702d649 (diff)
downloadsonarqube-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.java4
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/utils/Version.java2
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);
}
}
}