]> source.dussan.org Git - sonarqube.git/commitdiff
(code smell fix): removing variables and exception that are not being thrown
authorBruno Andrade <bruno@artsman.dev>
Thu, 22 Jun 2023 21:53:56 +0000 (22:53 +0100)
committersonartech <sonartech@sonarsource.com>
Wed, 28 Jun 2023 20:03:01 +0000 (20:03 +0000)
server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/ValidateProjectStep.java
sonar-application/src/main/java/org/sonar/application/App.java

index 112bbbc8c1c0e460267114349939be2bb38b7c1d..84d2967e48775a0fbc6405d2e86feb2f7be2caa2 100644 (file)
@@ -61,8 +61,6 @@ public class ValidateProjectStep implements ComputationStep {
   public void execute(ComputationStep.Context context) {
     try (DbSession dbSession = dbClient.openSession(false)) {
       Component root = treeRootHolder.getRoot();
-      String branchKey = analysisMetadataHolder.isBranch() ? analysisMetadataHolder.getBranch().getName() : null;
-      String prKey = analysisMetadataHolder.isPullRequest() ? analysisMetadataHolder.getBranch().getPullRequestKey() : null;
       ValidateProjectsVisitor visitor = new ValidateProjectsVisitor(dbSession, dbClient.componentDao());
       new DepthTraversalTypeAwareCrawler(visitor).visit(root);
 
index df601ab1b916ba2092ff5ea1af2cd88d8e3adec7..aca7ea4f37772ff99ab8b8e6613351d47e9bd098 100644 (file)
@@ -77,7 +77,7 @@ public class App {
     systemExit.exit(0);
   }
 
-  public static void main(String[] args) throws Exception {
+  public static void main(String[] args) {
     new App().start(args);
   }