Skip to content

Commit 5aa75d6

Browse files
committed
metafacture-scripting/ (main): Fix Checkstyle violations.
1 parent 7e0ed18 commit 5aa75d6

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

metafacture-scripting/src/main/java/org/metafacture/scripting/JScriptObjectPipe.java

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,8 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.metafacture.scripting;
17-
18-
import java.io.FileNotFoundException;
1916

20-
import javax.script.Invocable;
21-
import javax.script.ScriptEngine;
22-
import javax.script.ScriptEngineManager;
23-
import javax.script.ScriptException;
17+
package org.metafacture.scripting;
2418

2519
import org.metafacture.commons.ResourceUtil;
2620
import org.metafacture.framework.FluxCommand;
@@ -31,6 +25,12 @@
3125
import org.metafacture.framework.annotations.Out;
3226
import org.metafacture.framework.helpers.DefaultObjectPipe;
3327

28+
import java.io.FileNotFoundException;
29+
import javax.script.Invocable;
30+
import javax.script.ScriptEngine;
31+
import javax.script.ScriptEngineManager;
32+
import javax.script.ScriptException;
33+
3434
/**
3535
* Executes the function process(obj) in a given jscript.
3636
*
@@ -62,16 +62,16 @@ private void setScript(final String file) {
6262
try {
6363
// LOG.info("loading code from '" + file + "'");
6464
engine.eval(ResourceUtil.getReader(file));
65-
} catch (ScriptException e) {
65+
}
66+
catch (final ScriptException e) {
6667
throw new MetafactureException("Error in script", e);
67-
} catch (FileNotFoundException e) {
68+
}
69+
catch (final FileNotFoundException e) {
6870
throw new MetafactureException("Error loading script '" + file + "'", e);
6971
}
7072
invocable = (Invocable) engine;
7173
}
7274

73-
74-
7575
@Override
7676
public void process(final Object obj) {
7777
assert !isClosed();
@@ -83,9 +83,11 @@ public void process(final Object obj) {
8383

8484
getReceiver().process(retObj);
8585

86-
} catch (ScriptException e) {
86+
}
87+
catch (final ScriptException e) {
8788
throw new MetafactureException("Error in script while evaluating 'process' method", e);
88-
} catch (NoSuchMethodException e) {
89+
}
90+
catch (final NoSuchMethodException e) {
8991
throw new MetafactureException("'process' method is missing in script", e);
9092
}
9193
}

0 commit comments

Comments
 (0)