Skip to content

Commit f4889ab

Browse files
committed
Removed checkstyle empty block check.
- Removed EmptyBlock checkstyle check since it triggered for cases where it is not necessarily bad. - Removed several empty blocks where they were not necessary.
1 parent 726aac8 commit f4889ab

5 files changed

Lines changed: 14 additions & 14 deletions

File tree

checkstyle.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
</module>
2525

2626
<module name="AvoidStarImport"/>
27-
<module name="EmptyBlock"/>
2827

2928
</module>
3029

src/main/java/com/laytonsmith/PureUtilities/MemoryMapFileUtil.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,13 @@ private void run() {
104104
// }
105105
} catch(IOException ex) {
106106
Logger.getLogger(MemoryMapFileUtil.class.getName()).log(Level.SEVERE, null, ex);
107-
} finally {
107+
}
108+
// finally {
108109
// if(temp != null){
109110
// temp.delete();
110111
// temp.deleteOnExit();
111112
// }
112-
}
113+
// }
113114
}
114115
} finally {
115116
synchronized(this) {

src/main/java/com/laytonsmith/core/compiler/LexerObject.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,12 @@ public TokenStream lex() throws ConfigCompileException {
259259
if(c == '*' && c2 == '/') {
260260
state_in_block_comment = false;
261261
i++;
262-
if(state_in_smart_block_comment) {
263-
//We need to process the block comment here
264-
//TODO:
265-
//We need to process the block comment here
266-
//TODO:
267-
}
262+
// if(state_in_smart_block_comment) {
263+
// //We need to process the block comment here
264+
// //TODO:
265+
// //We need to process the block comment here
266+
// //TODO:
267+
// }
268268
clearBuffer();
269269
continue;
270270
}

src/main/java/com/laytonsmith/core/events/drivers/PlayerEvents.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,9 +1075,9 @@ public boolean matches(Map<String, Construct> prefilter, BindableEvent e) throws
10751075
if(e instanceof MCPlayerInteractEvent) {
10761076
MCPlayerInteractEvent pie = (MCPlayerInteractEvent) e;
10771077
Prefilters.match(prefilter, "location", pie.getClickedBlock().getLocation(), PrefilterType.LOCATION_MATCH);
1078-
if(prefilter.containsKey("activated")) {
1079-
//TODO: Once activation is supported, check for that here
1080-
}
1078+
// if(prefilter.containsKey("activated")) {
1079+
// //TODO: Once activation is supported, check for that here
1080+
// }
10811081
return true;
10821082
}
10831083
return false;

src/main/java/com/laytonsmith/core/functions/Compiler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,11 +770,11 @@ public ParseTree optimizeDynamic(Target t, List<ParseTree> children, FileOptions
770770
if(complex.matches("[a-zA-Z0-9_]+")) {
771771
//This is a simple variable name.
772772
root.addChild(new ParseTree(new IVariable("@" + complex, t), fileOptions));
773+
continue;
773774
} else {
774775
//Complex variable name, with arrays (or perhaps an error case)
775-
776+
continue;
776777
}
777-
continue;
778778
}
779779
b.append(c);
780780
}

0 commit comments

Comments
 (0)