diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2013-07-05 10:50:30 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2013-07-05 10:50:30 +0200 |
commit | 9a8bde1be6bc65a0006beaf1a7c88ab4d144ddc1 (patch) | |
tree | c4ceb7ffa1ada0719eb7ea35a11116121200daed | |
parent | 9843eee26eb1e5aa782e0b27b6b8e456bed569bc (diff) | |
download | sonarqube-9a8bde1be6bc65a0006beaf1a7c88ab4d144ddc1.tar.gz sonarqube-9a8bde1be6bc65a0006beaf1a7c88ab4d144ddc1.zip |
Fix quality flaws
4 files changed, 3 insertions, 11 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectBuilder.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectBuilder.java index 8ec2fd55ce7..976273e05a2 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectBuilder.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectBuilder.java @@ -41,7 +41,7 @@ public abstract class ProjectBuilder implements BatchExtension { * Plugins can use the implementation {@link org.sonar.api.batch.bootstrap.internal.ProjectBuilderContext} * for their unit tests. */ - public static interface Context { + public interface Context { ProjectReactor projectReactor(); } /** diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/JavaFile.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/JavaFile.java index 6ec533c5c49..4c8c87e609b 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/JavaFile.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/JavaFile.java @@ -180,7 +180,7 @@ public class JavaFile extends Resource<JavaPackage> { fileKey += ".java"; } // Add wildcard extension if not provided - if ((antPattern.contains("/") && StringUtils.substringAfterLast(antPattern, "/").indexOf(".") < 0) || antPattern.indexOf(".") < 0) { + if ((antPattern.contains("/") && StringUtils.substringAfterLast(antPattern, "/").indexOf('.') < 0) || antPattern.indexOf('.') < 0) { antPattern += ".*"; } String noPackagePrefix = JavaPackage.DEFAULT_PACKAGE_NAME + "."; diff --git a/sonar-server/src/main/java/org/sonar/server/platform/ServerIdGenerator.java b/sonar-server/src/main/java/org/sonar/server/platform/ServerIdGenerator.java index 9f223cf29de..349e021dac5 100644 --- a/sonar-server/src/main/java/org/sonar/server/platform/ServerIdGenerator.java +++ b/sonar-server/src/main/java/org/sonar/server/platform/ServerIdGenerator.java @@ -84,7 +84,7 @@ public class ServerIdGenerator { String toId(String organisation, InetAddress address) { String id = new StringBuilder().append(organisation).append("-").append(address.getHostAddress()).toString(); try { - return VERSION + DigestUtils.shaHex(id.getBytes("UTF-8")).substring(0, CHECKSUM_SIZE); + return VERSION + DigestUtils.sha1Hex(id.getBytes("UTF-8")).substring(0, CHECKSUM_SIZE); } catch (UnsupportedEncodingException e) { throw new IllegalArgumentException("Organisation is not UTF-8 encoded: " + organisation, e); diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/user/DefaultUserClient.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/user/DefaultUserClient.java index 9c1d7cbcb85..676676d0985 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/user/DefaultUserClient.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/user/DefaultUserClient.java @@ -77,14 +77,6 @@ public class DefaultUserClient implements UserClient { return new User(jsonUser); } - /** - * TODO to be removed - */ - @Override - public void delete(UserParameters userParameters) { - requestFactory.post(DEACTIVATE_URL, userParameters.urlParams()); - } - @Override public void deactivate(String login) { Map<String, Object> params = new HashMap<String, Object>(); |