@@ -179,8 +179,9 @@ public class IssueWorkflow implements Startable { | |||
} | |||
public List<Transition> outTransitions(Issue issue) { | |||
State state = machine.state(issue.status()); | |||
checkArgument(state != null, "Unknown status: %s", issue.status()); | |||
String status = issue.status(); | |||
State state = machine.state(status); | |||
checkArgument(state != null, "Unknown status: %s", status); | |||
return state.outManualTransitions(issue); | |||
} | |||
@@ -197,8 +198,10 @@ public class IssueWorkflow implements Startable { | |||
} | |||
private State stateOf(DefaultIssue issue) { | |||
State state = machine.state(issue.status()); | |||
checkState(state != null, "Unknown status: %s [issue=%s]", issue.status(), issue.key()); | |||
String status = issue.status(); | |||
State state = machine.state(status); | |||
String issueKey = issue.key(); | |||
checkState(state != null, "Unknown status: %s [issue=%s]", status, issueKey); | |||
return state; | |||
} | |||
@@ -63,6 +63,7 @@ import org.sonarqube.ws.Issues; | |||
import static com.google.common.base.Preconditions.checkArgument; | |||
import static com.google.common.collect.ImmutableMap.of; | |||
import static java.lang.String.format; | |||
import static java.util.function.Function.identity; | |||
import static org.sonar.api.issue.DefaultTransitions.REOPEN; | |||
import static org.sonar.api.rule.Severity.BLOCKER; | |||
@@ -219,7 +220,8 @@ public class BulkChangeAction implements IssuesWsAction { | |||
} | |||
} catch (Exception e) { | |||
result.increaseFailure(); | |||
LOG.error("An error occur when trying to apply the action : {} on issue : {}. This issue has been ignored. Error is '{}'", action.key(), issue.key(), e.getMessage()); | |||
LOG.error(format("An error occur when trying to apply the action : %s on issue : %s. This issue has been ignored. Error is '%s'", | |||
action.key(), issue.key(), e.getMessage()), e); | |||
} | |||
}; | |||
} |
@@ -55,7 +55,7 @@ public class TimeProfiler { | |||
this.name = name; | |||
this.start = System.currentTimeMillis(); | |||
if (debug) { | |||
logger.debug(name + "..."); | |||
logger.debug("%s ...", name); | |||
} else { | |||
logger.info(name + "..."); | |||
} |