File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -138,9 +138,8 @@ protected void loadKeywords(File keywordFile) throws IOException {
138138 @ SuppressWarnings ("SameParameterValue" )
139139 protected void loadKeywords (File keywordFile ,
140140 String commentPrefix ) throws IOException {
141- BufferedReader reader = PApplet .createReader (keywordFile );
142- String line ;
143- while ((line = reader .readLine ()) != null ) {
141+ String [] lines = PApplet .loadStrings (keywordFile );
142+ for (String line : lines ) {
144143 if (!line .trim ().startsWith (commentPrefix )) {
145144 // Was difficult to make sure that mode authors were properly doing
146145 // tab-separated values. By definition, there can't be additional
@@ -173,7 +172,6 @@ protected void loadKeywords(File keywordFile,
173172 }
174173 }
175174 }
176- reader .close ();
177175 }
178176
179177
You can’t perform that action at this time.
0 commit comments