Permalink
Browse files

CheckStyle: Fix whitespace and EmptyStatement violations

  • Loading branch information...
Pieter12345 committed Jun 9, 2018
1 parent 3c71b69 commit bb96a7ea4a60f659dd1fa3be7da3c1cfdaacd5ee
Showing with 155 additions and 161 deletions.
  1. +1 −2 src/main/java/com/laytonsmith/PureUtilities/Common/GNUErrorMessageFormat.java
  2. +1 −1 src/main/java/com/laytonsmith/PureUtilities/UI/TextDialog.java
  3. +0 −6 src/main/java/com/laytonsmith/abstraction/bukkit/events/BukkitPlayerEvents.java
  4. +2 −2 src/main/java/com/laytonsmith/core/Globals.java
  5. +1 −1 src/main/java/com/laytonsmith/core/MethodScriptCompiler.java
  6. +1 −1 src/main/java/com/laytonsmith/core/Procedure.java
  7. +19 −19 src/main/java/com/laytonsmith/core/functions/ArrayHandling.java
  8. +26 −26 src/main/java/com/laytonsmith/core/functions/BasicLogic.java
  9. +3 −3 src/main/java/com/laytonsmith/core/functions/Cmdline.java
  10. +1 −1 src/main/java/com/laytonsmith/core/functions/Compiler.java
  11. +10 −10 src/main/java/com/laytonsmith/core/functions/Crypto.java
  12. +26 −26 src/main/java/com/laytonsmith/core/functions/DataHandling.java
  13. +1 −1 src/main/java/com/laytonsmith/core/functions/Exceptions.java
  14. +13 −13 src/main/java/com/laytonsmith/core/functions/Math.java
  15. +1 −1 src/main/java/com/laytonsmith/core/functions/Persistence.java
  16. +2 −1 src/main/java/com/laytonsmith/core/functions/SQL.java
  17. +1 −1 src/main/java/com/laytonsmith/core/functions/Scheduling.java
  18. +14 −14 src/main/java/com/laytonsmith/core/functions/StringHandling.java
  19. +2 −3 src/main/java/com/laytonsmith/core/functions/Web.java
  20. +1 −1 src/main/java/com/laytonsmith/core/functions/World.java
  21. +1 −1 src/main/java/com/laytonsmith/core/profiler/Profiler.java
  22. +4 −4 src/main/java/com/laytonsmith/tools/UILauncher.java
  23. +5 −5 src/main/java/com/laytonsmith/tools/docgen/DocGenUI.java
  24. +3 −3 src/main/java/com/laytonsmith/tools/docgen/SingleFunctionDialog.java
  25. +4 −4 src/main/java/com/laytonsmith/tools/pnviewer/ConfigurationLoaderDialog.java
  26. +4 −4 src/main/java/com/laytonsmith/tools/pnviewer/ManageBookmarksDialog.java
  27. +3 −3 src/main/java/com/laytonsmith/tools/pnviewer/PNViewer.java
  28. +1 −1 src/test/java/com/laytonsmith/PureUtilities/NonInheritImplementsTest.java
  29. +1 −1 src/test/java/com/laytonsmith/core/NewExceptionHandlingTest.java
  30. +2 −1 src/test/java/com/laytonsmith/core/TestStatic.java
  31. +1 −1 src/test/java/com/laytonsmith/core/functions/PlayerManangementTest.java
@@ -109,8 +109,7 @@ public GNUErrorMessageFormat parse() throws IllegalArgumentException {
String[] s = middle.split("-");
fromLine = Integer.parseInt(s[0]);
toLine = Integer.parseInt(s[1]);
} // ??
else {
} else {
throw new IllegalArgumentException("Could not parse message");
}
break;
@@ -181,7 +181,7 @@ private void initComponents() {
);
pack();
}// </editor-fold>//GEN-END:initComponents
} // </editor-fold>//GEN-END:initComponents
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
@@ -1026,22 +1026,16 @@ public int getThreshold() {
return threshold;
}
;
@Override
public MCLocation getFrom() {
return new BukkitMCLocation(from);
}
;
@Override
public MCLocation getTo() {
return new BukkitMCLocation(pme.getTo());
}
;
@Override
public boolean isCancelled() {
return pme.isCancelled();
@@ -22,7 +22,7 @@ private Globals() {
* @param value The value itself
*/
public static synchronized void SetGlobal(String name, Construct value) {
Map<String, Construct> vars = global_construct;//(HashMap<String, Construct>)env.get("global_construct");
Map<String, Construct> vars = global_construct; // (HashMap<String, Construct>)env.get("global_construct");
if(value instanceof CNull) {
vars.remove(name);
} else {
@@ -38,7 +38,7 @@ public static synchronized void SetGlobal(String name, Construct value) {
* @return the construct stored at this name, or CNull if none exists
*/
public static synchronized Construct GetGlobalConstruct(String name) {
Map<String, Construct> vars = global_construct;//(HashMap<String, Construct>)env.get("global_construct");
Map<String, Construct> vars = global_construct; // (HashMap<String, Construct>)env.get("global_construct");
return vars.getOrDefault(name, CNull.NULL);
}
@@ -1948,7 +1948,7 @@ private static void optimize(ParseTree tree, Stack<List<Procedure>> procs, Set<C
tree.setData(c);
tree.removeChildren();
return;
}//else Nope, couldn't optimize.
} //else Nope, couldn't optimize.
} catch (ConfigRuntimeException ex) {
//Cool. Caught a runtime error at compile time :D
compilerErrors.add(new ConfigCompileException(ex));
@@ -184,7 +184,7 @@ public Construct execute(List<Construct> args, Environment env, Target t) {
env.getEnv(GlobalEnv.class).GetVarList().set(new IVariable(Auto.TYPE, key, c, Target.UNKNOWN));
arguments.push(c, t);
}
Script fakeScript = Script.GenerateScript(tree, env.getEnv(GlobalEnv.class).GetLabel());//new Script(null, null);
Script fakeScript = Script.GenerateScript(tree, env.getEnv(GlobalEnv.class).GetLabel()); // new Script(null, null);
for(int i = 0; i < args.size(); i++) {
Construct c = args.get(i);
arguments.set(i, c, t);
@@ -110,7 +110,7 @@ public Boolean runAsync() {
@Override
public ExampleScript[] examples() throws ConfigCompileException {
return new ExampleScript[]{
new ExampleScript("Demonstrates usage", "array_size(array(1, 2, 3, 4, 5));"),};
new ExampleScript("Demonstrates usage", "array_size(array(1, 2, 3, 4, 5));")};
}
@Override
@@ -307,7 +307,7 @@ public Construct optimize(Target t, Construct... args) throws ConfigCompileExcep
new ExampleScript("Demonstrates exception", "msg(array()[1]);"),
new ExampleScript("Demonstrates basic functional usage", "msg(array_get(array(1, 2, 3), 2));"),
new ExampleScript("Demonstrates default (note that you cannot use the bracket syntax with this)",
"msg(array_get(array(), 1, 'default'));"),};
"msg(array_get(array(), 1, 'default'));")};
}
@Override
@@ -407,7 +407,7 @@ public Boolean runAsync() {
"array @array = array(null);\n"
+ "msg(@array);\n"
+ "array_set(@array, 0, 'value0');\n"
+ "msg(@array);"),};
+ "msg(@array);")};
}
}
@@ -492,7 +492,7 @@ public Boolean runAsync() {
"array @array = array();\n"
+ "msg(@array);\n"
+ "array_push(@array, 0, 1, 2);\n"
+ "msg(@array);"),};
+ "msg(@array);")};
}
}
@@ -711,7 +711,7 @@ public Construct exec(Target t, Environment environment, Construct... args) thro
return new ExampleScript[]{
new ExampleScript("Demonstrates usage", "array_contains_ic(array('A', 'B', 'C'), 'A')"),
new ExampleScript("Demonstrates usage", "array_contains_ic(array('A', 'B', 'C'), 'a')"),
new ExampleScript("Demonstrates usage", "array_contains_ic(array('A', 'B', 'C'), 'd')"),};
new ExampleScript("Demonstrates usage", "array_contains_ic(array('A', 'B', 'C'), 'd')")};
}
@Override
@@ -956,7 +956,7 @@ public CArray exec(Target t, Environment env, Construct... args) throws ConfigRu
"array @array = array();\n"
+ "msg(@array);\n"
+ "array_resize(@array, 2, 'a');\n"
+ "msg(@array);"),};
+ "msg(@array);")};
}
}
@@ -1033,7 +1033,7 @@ public CArray exec(Target t, Environment env, Construct... args) throws ConfigRu
new ExampleScript("Complex usage", "range(0, 10)"),
new ExampleScript("With skips", "range(0, 10, 2)"),
new ExampleScript("Invalid input", "range(0, 10, -1)"),
new ExampleScript("In reverse", "range(10, 0, -1)"),};
new ExampleScript("In reverse", "range(10, 0, -1)")};
}
@Override
@@ -1101,7 +1101,7 @@ public Construct exec(Target t, Environment env, Construct... args) throws Confi
public ExampleScript[] examples() throws ConfigCompileException {
return new ExampleScript[]{
new ExampleScript("Basic usage", "array_keys(array('a', 'b', 'c'))"),
new ExampleScript("With associative array", "array_keys(array(one: 'a', two: 'b', three: 'c'))"),};
new ExampleScript("With associative array", "array_keys(array(one: 'a', two: 'b', three: 'c'))")};
}
@Override
@@ -1167,7 +1167,7 @@ public Construct exec(Target t, Environment env, Construct... args) throws Confi
public ExampleScript[] examples() throws ConfigCompileException {
return new ExampleScript[]{
new ExampleScript("Basic usage", "array_normalize(array(one: 'a', two: 'b', three: 'c'))"),
new ExampleScript("Usage with normal array", "array_normalize(array(1, 2, 3))"),};
new ExampleScript("Usage with normal array", "array_normalize(array(1, 2, 3))")};
}
@Override
@@ -1250,7 +1250,7 @@ public Construct exec(Target t, Environment environment, Construct... args) thro
return new ExampleScript[]{
new ExampleScript("Basic usage", "array_merge(array(1), array(2), array(3))"),
new ExampleScript("With associative arrays", "array_merge(array(one: 1), array(two: 2), array(three: 3))"),
new ExampleScript("With overwrites", "array_merge(array(one: 1), array(one: 2), array(one: 3))"),};
new ExampleScript("With overwrites", "array_merge(array(one: 1), array(one: 2), array(one: 3))")};
}
@Override
@@ -1324,7 +1324,7 @@ public Construct exec(Target t, Environment environment, Construct... args) thro
new ExampleScript("Basic usage",
"assign(@array, array(1, 2, 3))\nmsg(array_remove(@array, 2))\nmsg(@array)"),
new ExampleScript("With associative array",
"assign(@array, array(one: 'a', two: 'b', three: 'c'))\nmsg(array_remove(@array, 'two'))\nmsg(@array)"),};
"assign(@array, array(one: 'a', two: 'b', three: 'c'))\nmsg(array_remove(@array, 'two'))\nmsg(@array)")};
}
}
@@ -1397,7 +1397,7 @@ public CHVersion since() {
public ExampleScript[] examples() throws ConfigCompileException {
return new ExampleScript[]{
new ExampleScript("Basic usage", "array_implode(array(1, 2, 3), '-')"),
new ExampleScript("With associative array", "array_implode(array(one: 'a', two: 'b', three: 'c'), '-')"),};
new ExampleScript("With associative array", "array_implode(array(one: 'a', two: 'b', three: 'c'), '-')")};
}
}
@@ -1450,7 +1450,7 @@ public CHVersion since() {
@Override
public ExampleScript[] examples() throws ConfigCompileException {
return new ExampleScript[]{
new ExampleScript("Basic usage", "array(1, 2, 3)[cslice(0, 1)]"),};
new ExampleScript("Basic usage", "array(1, 2, 3)[cslice(0, 1)]")};
}
@Override
@@ -1820,7 +1820,7 @@ public CHVersion since() {
public ExampleScript[] examples() throws ConfigCompileException {
return new ExampleScript[]{
new ExampleScript("Basic usage",
"assign(@array, array(1, 2, 2, 3))\nmsg(@array)\narray_remove_values(@array, 2)\nmsg(@array)"),};
"assign(@array, array(1, 2, 2, 3))\nmsg(@array)\narray_remove_values(@array, 2)\nmsg(@array)")};
}
}
@@ -1878,7 +1878,7 @@ public CHVersion since() {
public ExampleScript[] examples() throws ConfigCompileException {
return new ExampleScript[]{
new ExampleScript("Basic usage", "assign(@array, array(1, 2, 2, 3))\nmsg(array_indexes(@array, 2))"),
new ExampleScript("Not found", "assign(@array, array(1, 2, 2, 3))\nmsg(array_indexes(@array, 5))"),};
new ExampleScript("Not found", "assign(@array, array(1, 2, 2, 3))\nmsg(array_indexes(@array, 5))")};
}
@Override
@@ -1942,7 +1942,7 @@ public CHVersion since() {
public ExampleScript[] examples() throws ConfigCompileException {
return new ExampleScript[]{
new ExampleScript("Basic usage", "assign(@array, array(1, 2, 2, 3))\nmsg(array_index(@array, 2))"),
new ExampleScript("Not found", "assign(@array, array(1, 2, 2, 3))\nmsg(array_index(@array, 5))"),};
new ExampleScript("Not found", "assign(@array, array(1, 2, 2, 3))\nmsg(array_index(@array, 5))")};
}
}
@@ -2001,7 +2001,7 @@ public CHVersion since() {
public ExampleScript[] examples() throws ConfigCompileException {
return new ExampleScript[]{
new ExampleScript("Basic usage", "assign(@array, array(1, 2, 2, 3))\nmsg(array_last_index(@array, 2))"),
new ExampleScript("Not found", "assign(@array, array(1, 2, 2, 3))\nmsg(array_last_index(@array, 5))"),};
new ExampleScript("Not found", "assign(@array, array(1, 2, 2, 3))\nmsg(array_last_index(@array, 5))")};
}
}
@@ -2153,7 +2153,7 @@ public CHVersion since() {
new ExampleScript("Usage with a normal array, using getKeys false, and returning 2 results",
"assign(@array, array('a', 'b', 'c', 'd', 'e'))\nmsg(array_rand(@array, 2, false))", "{b, c}"),
new ExampleScript("Usage with an associative array",
"assign(@array, array(one: 'a', two: 'b', three: 'c', four: 'd', five: 'e'))\nmsg(array_rand(@array))", "two"),};
"assign(@array, array(one: 'a', two: 'b', three: 'c', four: 'd', five: 'e'))\nmsg(array_rand(@array))", "two")};
}
@Override
@@ -2242,7 +2242,7 @@ public CHVersion since() {
new ExampleScript("Basic usage", "array_unique(array(1, 2, 2, 3, 4))"),
new ExampleScript("No removal of different datatypes", "array_unique(array(1, '1'))"),
new ExampleScript("Removal of different datatypes, by setting compareTypes to false",
"array_unique(array(1, '1'), false)"),};
"array_unique(array(1, '1'), false)")};
}
@Override
Oops, something went wrong.

0 comments on commit bb96a7e

Please sign in to comment.