checkstyle WhiteAround

WhiteAroundCheck script
This commit is contained in:
Gary Russell
2016-04-05 13:29:21 -04:00
parent 842aded9a4
commit 05cc7be644
508 changed files with 2027 additions and 1916 deletions

View File

@@ -37,6 +37,6 @@ public interface ScriptExecutor {
* @param variables The variables.
* @return The result of the execution.
*/
Object executeScript(ScriptSource scriptSource, Map<String,Object> variables);
Object executeScript(ScriptSource scriptSource, Map<String, Object> variables);
}

View File

@@ -41,7 +41,7 @@ import org.springframework.integration.scripting.ScriptExecutor;
@Override
protected Object postProcess(Object result, ScriptEngine scriptEngine, String script, Bindings bindings) {
Object newResult= result;
Object newResult = result;
if (newResult == null) {
String returnVariableName = PythonVariableParser.parseReturnVariable(script);
if (bindings != null) {
@@ -55,9 +55,9 @@ import org.springframework.integration.scripting.ScriptExecutor;
}
public static class PythonVariableParser {
public static String parseReturnVariable(String script){
public static String parseReturnVariable(String script) {
String[] lines = script.trim().split("\n");
String lastLine = lines[lines.length -1];
String lastLine = lines[lines.length - 1];
String[] tokens = lastLine.split("=");
return tokens[0].trim();
}

View File

@@ -89,7 +89,7 @@ public class ScriptExecutingMessageProcessor extends AbstractScriptExecutingMess
@Override
protected Object executeScript(ScriptSource scriptSource, Map<String, Object> variables) throws Exception {
Assert.notNull(scriptSource, "scriptSource must not be null");
return this.scriptExecutor.executeScript(scriptSource,variables);
return this.scriptExecutor.executeScript(scriptSource, variables);
}
}

View File

@@ -25,7 +25,7 @@ import org.springframework.integration.scripting.ScriptExecutor;
public abstract class ScriptExecutorFactory {
public static ScriptExecutor getScriptExecutor(String language) {
if (language.equalsIgnoreCase("python") || language.equalsIgnoreCase("jython")){
if (language.equalsIgnoreCase("python") || language.equalsIgnoreCase("jython")) {
return new PythonScriptExecutor();
}
else if (language.equalsIgnoreCase("ruby") || language.equalsIgnoreCase("jruby")) {