Skip to content

Commit a25a0fb

Browse files
committed
skip unnecessary error handling in reading 'console.head_padding'
1 parent f1e4085 commit a25a0fb

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

app/src/processing/app/ui/Editor.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,19 +2293,9 @@ public void prepareRun() {
22932293
internalCloseRunner();
22942294
statusEmpty();
22952295

2296-
int headPadding;
2297-
2298-
try {
2299-
headPadding = Preferences.getInteger("console.head_padding");
2300-
} catch (NullPointerException e) {
2301-
// We need to handle this exception to take care of old versions of
2302-
// preference files, i.e., "defaults.txt" and "preferences.txt" which
2303-
// may not have the attribute 'console.head_padding'.
2304-
headPadding = 10;
2305-
}
2306-
23072296
// Do this to advance/clear the terminal window / dos prompt / etc.
23082297
// This may be useful especially when 'console.auto_clear' is false.
2298+
int headPadding = Preferences.getInteger("console.head_padding");
23092299
for (int i = 0; i < headPadding; i++) console.message("\n", false);
23102300

23112301
// clear the console on each run, unless the user doesn't want to

0 commit comments

Comments
 (0)