Skip to content

Commit 232db3a

Browse files
committed
Formatting: Disallow whitespaces.
- Replaced leading 4-wide whitespaces with tabs. - Removed/replaced remaining leading whitespaces to maintain consistency. - Added *'s to multiline docs where they were missing.
1 parent d74d315 commit 232db3a

61 files changed

Lines changed: 4048 additions & 4052 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 1133 additions & 1133 deletions
Large diffs are not rendered by default.

src/main/java/com/laytonsmith/PureUtilities/ClassLoading/ClassMirror/ClassMirror.java

Lines changed: 602 additions & 602 deletions
Large diffs are not rendered by default.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public class Color implements java.io.Serializable {
118118
private float falpha = 0.0f;
119119

120120
/*
121-
* JDK 1.1 serialVersionUID
121+
* JDK 1.1 serialVersionUID
122122
*/
123123
private static final long serialVersionUID = 118526816881161077L;
124124

@@ -403,9 +403,9 @@ public Color brighter() {
403403
int alpha = getAlpha();
404404

405405
/* From 2D group:
406-
* 1. black.brighter() should return grey
407-
* 2. applying brighter to blue will always return blue, brighter
408-
* 3. non pure color (non zero rgb) will eventually return white
406+
* 1. black.brighter() should return grey
407+
* 2. applying brighter to blue will always return blue, brighter
408+
* 3. non pure color (non zero rgb) will eventually return white
409409
*/
410410
int i = (int) (1.0 / (1.0 - FACTOR));
411411
if(r == 0 && g == 0 && b == 0) {

src/main/java/com/laytonsmith/PureUtilities/Common/FileUtil.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,14 @@ public static InputStream readAsStream(File file) throws IOException {
118118
// } finally {
119119
// freeLock(file);
120120
// }
121-
// FileInputStream fis = new FileInputStream(f);
122-
// try{
121+
// FileInputStream fis = new FileInputStream(f);
122+
// try{
123123
// return StreamUtils.GetString(fis, charset);
124-
// } finally {
125-
// fis.close();
126-
// fis = null;
127-
// System.gc();
128-
// }
124+
// } finally {
125+
// fis.close();
126+
// fis = null;
127+
// System.gc();
128+
// }
129129
}
130130

131131
/**
@@ -221,9 +221,9 @@ public static void write(byte[] data, File file, int mode, boolean create) throw
221221
// } finally {
222222
// freeLock(file);
223223
// }
224-
// FileWriter fw = new FileWriter(f, append);
225-
// fw.write(s);
226-
// fw.close();
224+
// FileWriter fw = new FileWriter(f, append);
225+
// fw.write(s);
226+
// fw.close();
227227
}
228228

229229
/**

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

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,34 +21,34 @@
2121
public class ConcurrentSingletonHashMap<T, V> implements Map<T, V> {
2222

2323
/*
24-
* You might notice that no fields in this class are volatile. Normally, when you double lock, you must do
25-
* something like this to be totally correct:
26-
*
27-
* <pre>
28-
* volatile Object value = null; // Note the volatility
29-
* construct() {
30-
* Object result = value;
31-
* if(result == null) {
32-
* synchronized(result) {
33-
* if(result == null) {
34-
* result = new Object();
35-
* value = result;
36-
* }
37-
* }
38-
* }
39-
* return result;
40-
* }
41-
* </pre>
42-
*
43-
* Note that we are doing the double locking per usual, but the value is volatile. The local result value seems
44-
* unnecessary at first, but the effect of this is that in cases where value is already initialized
45-
* (i.e., most of the time), the volatile field is only accessed once (due to "return result;" instead of
46-
* "return value;"), which can improve the method's overall performance by as much as 25 percent.
47-
*
48-
* However, in the case that we have before us, the ConcurrentHashMap handles this for us, by guaranteeing that
49-
* we never get a value that is partially constructed in the get() method.
50-
*
51-
*
24+
* You might notice that no fields in this class are volatile. Normally, when you double lock, you must do
25+
* something like this to be totally correct:
26+
*
27+
* <pre>
28+
* volatile Object value = null; // Note the volatility
29+
* construct() {
30+
* Object result = value;
31+
* if(result == null) {
32+
* synchronized(result) {
33+
* if(result == null) {
34+
* result = new Object();
35+
* value = result;
36+
* }
37+
* }
38+
* }
39+
* return result;
40+
* }
41+
* </pre>
42+
*
43+
* Note that we are doing the double locking per usual, but the value is volatile. The local result value seems
44+
* unnecessary at first, but the effect of this is that in cases where value is already initialized
45+
* (i.e., most of the time), the volatile field is only accessed once (due to "return result;" instead of
46+
* "return value;"), which can improve the method's overall performance by as much as 25 percent.
47+
*
48+
* However, in the case that we have before us, the ConcurrentHashMap handles this for us, by guaranteeing that
49+
* we never get a value that is partially constructed in the get() method.
50+
*
51+
*
5252
*/
5353
private final Map<T, V> map = new ConcurrentHashMap<>();
5454
private final ValueGenerator<T, V> generator;

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,20 @@
5656
* public static class PhoneNumber implements UserID {
5757
* {@code @Override}
5858
* public void accept(UserIDVisitor visitor) {
59-
* visitor.handle(this);
59+
* visitor.handle(this);
6060
* }
6161
* }
6262
* public static abstract class GeneratedID implements UserID {}
6363
* public static class GeneratedIDV1 extends GeneratedID {
6464
* {@code @Override}
6565
* public void accept(UserIDVisitor visitor) {
66-
* visitor.handle(this);
66+
* visitor.handle(this);
6767
* }
6868
* }
6969
* public static class GeneratedIDV2 extends GeneratedID {
7070
* {@code @Override}
7171
* public void accept(UserIDVisitor visitor) {
72-
* visitor.handle(this);
72+
* visitor.handle(this);
7373
* }
7474
* }
7575
*
@@ -78,17 +78,17 @@
7878
*
7979
* {@code @Override}
8080
* public void handle(PhoneNumber m) {
81-
* System.out.println("Canadian PhoneNumber");
81+
* System.out.println("Canadian PhoneNumber");
8282
* }
8383
*
8484
* {@code @Override}
8585
* public void handle(GeneratedIDV1 c) {
86-
* System.out.println("Canadian GeneratedIDV1");
86+
* System.out.println("Canadian GeneratedIDV1");
8787
* }
8888
*
8989
* {@code @Override}
9090
* public void handle(GeneratedIDV2 c) {
91-
* System.out.println("Canadian GeneratedIDV2");
91+
* System.out.println("Canadian GeneratedIDV2");
9292
* }
9393
*
9494
* }
@@ -97,17 +97,17 @@
9797
*
9898
* {@code @Override}
9999
* public void handle(PhoneNumber m) {
100-
* System.out.println("American PhoneNumber");
100+
* System.out.println("American PhoneNumber");
101101
* }
102102
*
103103
* {@code @Override}
104104
* public void handle(GeneratedIDV1 c) {
105-
* System.out.println("American GeneratedIDV1");
105+
* System.out.println("American GeneratedIDV1");
106106
* }
107107
*
108108
* {@code @Override}
109109
* public void handle(GeneratedIDV2 c) {
110-
* System.out.println("American GeneratedIDV2");
110+
* System.out.println("American GeneratedIDV2");
111111
* }
112112
*
113113
* }
@@ -141,30 +141,30 @@
141141
* {@code @ExhaustiveVisitor.VisitorInfo(baseClass = UserID.class, directSubclassOnly = false)}
142142
* public static class CanadianVisitor extends ExhaustiveVisitor<UserID> {
143143
* public void visit(PhoneNumber n) {
144-
* System.out.println("Canadian PhoneNumber");
144+
* System.out.println("Canadian PhoneNumber");
145145
* }
146146
*
147147
* public void visit(GeneratedIDV1 id) {
148-
* System.out.println("Canadian GeneratedIDV1");
148+
* System.out.println("Canadian GeneratedIDV1");
149149
* }
150150
*
151151
* public void visit(GeneratedIDV2 id) {
152-
* System.out.println("Canadian GeneratedIDV1");
152+
* System.out.println("Canadian GeneratedIDV1");
153153
* }
154154
* }
155155
*
156156
* {@code @ExhaustiveVisitor.VisitorInfo(baseClass = UserID.class, directSubclassOnly = false)}
157157
* public static class AmericanVisitor extends ExhaustiveVisitor<UserID> {
158158
* public void visit(PhoneNumber n) {
159-
* System.out.println("American PhoneNumber");
159+
* System.out.println("American PhoneNumber");
160160
* }
161161
*
162162
* public void visit(GeneratedIDV1 id) {
163-
* System.out.println("American GeneratedIDV1");
163+
* System.out.println("American GeneratedIDV1");
164164
* }
165165
*
166166
* public void visit(GeneratedIDV2 id) {
167-
* System.out.println("American GeneratedIDV1");
167+
* System.out.println("American GeneratedIDV1");
168168
* }
169169
* }
170170
*

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ private void load(LineReader lr) throws IOException {
185185
}
186186

187187
/* Read in a "logical line" from an InputStream/Reader, skip all comment
188-
* and blank lines and filter out those leading whitespace characters
189-
* (\u0020, \u0009 and \u000c) from the beginning of a "natural line".
190-
* Method returns the char length of the "logical line" and stores
191-
* the line in "lineBuf".
188+
* and blank lines and filter out those leading whitespace characters
189+
* (\u0020, \u0009 and \u000c) from the beginning of a "natural line".
190+
* Method returns the char length of the "logical line" and stores
191+
* the line in "lineBuf".
192192
*/
193193
class LineReader {
194194

@@ -317,8 +317,8 @@ int readLine() throws IOException {
317317
}
318318

319319
/*
320-
* Converts encoded &#92;uxxxx to unicode chars
321-
* and changes special saved chars to their original forms
320+
* Converts encoded &#92;uxxxx to unicode chars
321+
* and changes special saved chars to their original forms
322322
*/
323323
private String loadConvert(char[] in, int off, int len, char[] convtBuf) {
324324
if(convtBuf.length < len) {

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static void cls() {
5757
}
5858

5959
/*
60-
* Standard foreground colors
60+
* Standard foreground colors
6161
*/
6262
@color
6363
public static String RED = color(Color.RED);
@@ -77,7 +77,7 @@ public static void cls() {
7777
public static String WHITE = color(Color.WHITE);
7878

7979
/*
80-
* Bright foreground colors
80+
* Bright foreground colors
8181
*/
8282
@color
8383
public static String BRIGHT_RED = color(Color.RED, true, true, true);
@@ -97,7 +97,7 @@ public static void cls() {
9797
public static String BRIGHT_WHITE = color(Color.WHITE, true, true, true);
9898

9999
/*
100-
* Standard background colors
100+
* Standard background colors
101101
*/
102102
@color
103103
public static String BG_RED = color(Color.RED, false, false, false);
@@ -117,7 +117,7 @@ public static void cls() {
117117
public static String BG_WHITE = color(Color.WHITE, false, false, false);
118118

119119
/*
120-
* Bright background colors
120+
* Bright background colors
121121
*/
122122
@color
123123
public static String BG_BRIGHT_RED = color(Color.RED, true, false, false);

0 commit comments

Comments
 (0)