Skip to content

Commit 812a89d

Browse files
committed
Clean up code
Applyed code style cleanup via Eclipse.
1 parent 36bbf0f commit 812a89d

File tree

5 files changed

+23
-25
lines changed

5 files changed

+23
-25
lines changed

src/main/java/org/scijava/plugins/scripting/matlab/MATLABBindings.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
* %%
99
* Redistribution and use in source and binary forms, with or without
1010
* modification, are permitted provided that the following conditions are met:
11-
*
11+
*
1212
* 1. Redistributions of source code must retain the above copyright notice,
1313
* this list of conditions and the following disclaimer.
1414
* 2. Redistributions in binary form must reproduce the above copyright notice,
1515
* this list of conditions and the following disclaimer in the documentation
1616
* and/or other materials provided with the distribution.
17-
*
17+
*
1818
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1919
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2020
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -116,7 +116,7 @@ public Object put(final String name, final Object value) {
116116
try {
117117
converter.setNumericArray(name, (MatlabNumericArray) value);
118118
}
119-
catch (MatlabInvocationException e1) {
119+
catch (final MatlabInvocationException e1) {
120120
throw new IllegalArgumentException(e);
121121
}
122122
}
@@ -167,11 +167,11 @@ private Object retrieveValue(final Object key, final boolean remove) {
167167
}
168168
catch (final MatlabInvocationException e) {
169169

170-
// Attempt to retrieve special MATLAB types
170+
// Attempt to retrieve special MATLAB types
171171
try {
172172
// try recovering key as a MatlabNumericArray
173173
final MatlabTypeConverter converter =
174-
new MatlabTypeConverter(MATLABControlUtils.proxy());
174+
new MatlabTypeConverter(MATLABControlUtils.proxy());
175175
v = converter.getNumericArray(k);
176176
}
177177
catch (final MatlabInvocationException e1) {

src/main/java/org/scijava/plugins/scripting/matlab/MATLABControlUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
* %%
99
* Redistribution and use in source and binary forms, with or without
1010
* modification, are permitted provided that the following conditions are met:
11-
*
11+
*
1212
* 1. Redistributions of source code must retain the above copyright notice,
1313
* this list of conditions and the following disclaimer.
1414
* 2. Redistributions in binary form must reproduce the above copyright notice,
1515
* this list of conditions and the following disclaimer in the documentation
1616
* and/or other materials provided with the distribution.
17-
*
17+
*
1818
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1919
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2020
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

src/main/java/org/scijava/plugins/scripting/matlab/MATLABScriptEngine.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
* %%
99
* Redistribution and use in source and binary forms, with or without
1010
* modification, are permitted provided that the following conditions are met:
11-
*
11+
*
1212
* 1. Redistributions of source code must retain the above copyright notice,
1313
* this list of conditions and the following disclaimer.
1414
* 2. Redistributions in binary form must reproduce the above copyright notice,
1515
* this list of conditions and the following disclaimer in the documentation
1616
* and/or other materials provided with the distribution.
17-
*
17+
*
1818
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1919
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2020
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

src/main/java/org/scijava/plugins/scripting/matlab/MATLABScriptLanguage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
* %%
99
* Redistribution and use in source and binary forms, with or without
1010
* modification, are permitted provided that the following conditions are met:
11-
*
11+
*
1212
* 1. Redistributions of source code must retain the above copyright notice,
1313
* this list of conditions and the following disclaimer.
1414
* 2. Redistributions in binary form must reproduce the above copyright notice,
1515
* this list of conditions and the following disclaimer in the documentation
1616
* and/or other materials provided with the distribution.
17-
*
17+
*
1818
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1919
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2020
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

src/test/java/org/scijava/plugins/scripting/matlab/MATLABTest.java

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
* %%
99
* Redistribution and use in source and binary forms, with or without
1010
* modification, are permitted provided that the following conditions are met:
11-
*
11+
*
1212
* 1. Redistributions of source code must retain the above copyright notice,
1313
* this list of conditions and the following disclaimer.
1414
* 2. Redistributions in binary form must reproduce the above copyright notice,
1515
* this list of conditions and the following disclaimer in the documentation
1616
* and/or other materials provided with the distribution.
17-
*
17+
*
1818
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1919
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2020
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -56,8 +56,8 @@
5656
public class MATLABTest {
5757

5858
/**
59-
* Simple script test for executing a basic MATLAB command and checking
60-
* the return value.
59+
* Simple script test for executing a basic MATLAB command and checking the
60+
* return value.
6161
*/
6262
@Test
6363
public void testBasic() throws InterruptedException, ExecutionException,
@@ -72,8 +72,8 @@ public void testBasic() throws InterruptedException, ExecutionException,
7272
}
7373

7474
/**
75-
* MATLAB supports multi-line notation via {@code ...} at the end of each line.
76-
* Test that this functionality works in scripting as well.
75+
* MATLAB supports multi-line notation via {@code ...} at the end of each
76+
* line. Test that this functionality works in scripting as well.
7777
*/
7878
@Test
7979
public void testBasicMultiline() throws InterruptedException,
@@ -110,20 +110,18 @@ public void testLocals() throws ScriptException {
110110
}
111111

112112
/**
113-
* Test an {@code if-else} block to ensure multiline expressions work
114-
* as intended.
113+
* Test an {@code if-else} block to ensure multiline expressions work as
114+
* intended.
115115
*/
116116
@Test
117117
public void testIfElse() throws InterruptedException, ExecutionException,
118118
IOException, ScriptException
119119
{
120120
final Context context = new Context(ScriptService.class);
121121
final ScriptService scriptService = context.getService(ScriptService.class);
122-
final String script = "if (1 == 2)\n" +
123-
" testVar = 75\n" +
124-
"else\n" +
125-
" testVar = 42\n" +
126-
"end\n";
122+
final String script =
123+
"if (1 == 2)\n" + " testVar = 75\n" + "else\n" + " testVar = 42\n"
124+
+ "end\n";
127125
scriptService.run("ifelse.m", script, true).get();
128126
// There is no return value from this script, but it should create a new
129127
// "testVar" local variable and initialze its value, so we can attempt
@@ -133,7 +131,7 @@ public void testIfElse() throws InterruptedException, ExecutionException,
133131
.get("testVar");
134132
assertTrue(result != null);
135133
assertTrue(result instanceof double[]);
136-
assertTrue(equalDoubleArrays(new double[]{42.0}, (double[])result));
134+
assertTrue(equalDoubleArrays(new double[] { 42.0 }, (double[]) result));
137135
}
138136

139137
/**

0 commit comments

Comments
 (0)