Skip to content

Commit 1272a77

Browse files
author
Roger Lee Whitcomb
committed
PIVOT-1032: Fix the remaining cases of [WhitespaceAround] errors
in the check-style report. git-svn-id: https://svn.apache.org/repos/asf/pivot/trunk@1828362 13f79535-47bb-0310-9956-ffa450edef68
1 parent 7c1701e commit 1272a77

File tree

11 files changed

+13
-12
lines changed

11 files changed

+13
-12
lines changed

core/src/org/apache/pivot/beans/BXMLSerializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1531,7 +1531,7 @@ private void logException(Throwable exception) {
15311531
}
15321532

15331533
private void reportException(ScriptException exception, String script) {
1534-
reportException(new SerializationException("Failed to execute script:\n"+script, exception));
1534+
reportException(new SerializationException("Failed to execute script:\n" + script, exception));
15351535
}
15361536

15371537
/**

core/src/org/apache/pivot/collections/ArrayStack.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public void push(T item) {
9292
public T pop() {
9393
int length = arrayList.getLength();
9494
if (length == 0) {
95-
throw new IllegalStateException((getComparator()==null?"stack":"queue")+" is empty");
95+
throw new IllegalStateException((getComparator() == null ? "stack" : "queue") + " is empty");
9696
}
9797

9898
T item = arrayList.remove(length - 1, 1).get(0);

core/src/org/apache/pivot/collections/LinkedStack.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public void push(T item) {
8787
public T pop() {
8888
int length = linkedList.getLength();
8989
if (length == 0) {
90-
throw new IllegalStateException((getComparator()==null?"stack":"queue")+" is empty");
90+
throw new IllegalStateException((getComparator() == null ? "stack" : "queue") + " is empty");
9191
}
9292

9393
T item = linkedList.remove(length - 1, 1).get(0);

core/src/org/apache/pivot/util/Utils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ public static void checkIndexBounds(int index, int start, int end) {
258258
*/
259259
public static void checkZeroBasedIndex(int index, int size) {
260260
if (index < 0 || index >= size) {
261-
throw new IndexOutOfBoundsException("Index " + index + " out of bounds [0," + (size-1) + "].");
261+
throw new IndexOutOfBoundsException("Index " + index + " out of bounds [0," + (size - 1) + "].");
262262
}
263263
}
264264

core/test/org/apache/pivot/functional/monad/test/OptionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public void companionTest() {
3737
assertNotNull(o);
3838
}
3939

40-
@Test(expected=NoSuchElementException.class)
40+
@Test(expected = NoSuchElementException.class)
4141
public void companionNoneTest() {
4242
OptionCompanion<Object> o = OptionCompanion.getInstance();
4343
assertNotNull(o);

tests/src/org/apache/pivot/tests/issues/pivot964/Pivot964Swing.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
103103
panel_display.add(button2, java.awt.BorderLayout.WEST);
104104

105105
pack();
106-
}// </editor-fold>
106+
} // </editor-fold>
107107

108108
public static void main(String args[]) {
109109
java.awt.EventQueue.invokeLater(new Runnable() {

wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraAlertSkin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public void setBorderBackgroundColor(Color borderBackgroundColor) {
210210

211211
this.borderBackgroundColor = borderBackgroundColor;
212212

213-
if (messageBorder != null){
213+
if (messageBorder != null) {
214214
messageBorder.getStyles().put(Style.backgroundColor, borderBackgroundColor);
215215
}
216216
}
@@ -234,7 +234,7 @@ public void setBorderColor(Color borderColor) {
234234

235235
this.borderColor = borderColor;
236236

237-
if (messageBorder != null){
237+
if (messageBorder != null) {
238238
messageBorder.getStyles().put(Style.color, borderColor);
239239
}
240240
}

wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ public void tooltipTriggered(Component comp, int x, int y) {
965965

966966
String text = null;
967967

968-
if (file != null){
968+
if (file != null) {
969969
text = file.getName();
970970
}
971971

wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraVFSBrowserSkin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,7 @@ public void tooltipTriggered(Component comp, int x, int y) {
11181118

11191119
String text = null;
11201120

1121-
if (file != null){
1121+
if (file != null) {
11221122
text = file.getName().getBaseName();
11231123
}
11241124

wtk/src/org/apache/pivot/wtk/ScrollBar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public void setScope(int start, int end, int extent) {
219219

220220
if (end < value + extent) {
221221
throw new IllegalArgumentException(
222-
"end (" + end + ") is less than value ("+ value + ") + extent (" + extent + ")");
222+
"end (" + end + ") is less than value (" + value + ") + extent (" + extent + ")");
223223
}
224224

225225
this.start = start;

wtk/src/org/apache/pivot/wtk/TextPane.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1200,7 +1200,8 @@ public static void dumpNode(String msg, Node node, int indent) {
12001200
if (msg != null && !msg.isEmpty()) {
12011201
System.out.println(msg + ":");
12021202
}
1203-
System.out.format(FORMAT, StringUtils.fromNChars(' ', indent*2), node.getClass().getSimpleName(), node.getDocumentOffset(), node.getCharacterCount());
1203+
String indenting = StringUtils.fromNChars(' ', indent * 2);
1204+
System.out.format(FORMAT, indenting, node.getClass().getSimpleName(), node.getDocumentOffset(), node.getCharacterCount());
12041205
if (node instanceof Element) {
12051206
for (Node n : (Element)node) {
12061207
dumpNode("", n, indent + 1);

0 commit comments

Comments
 (0)