Skip to content

Commit 87d3e91

Browse files
committed
[update] typo
1 parent 3fea629 commit 87d3e91

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

java-io/src/main/java/com/brianway/learning/java/io/DirList.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ public boolean accept(File dir, String name) {
2424
}
2525
});
2626
}
27+
28+
if (list == null) return;
2729
Arrays.sort(list, String.CASE_INSENSITIVE_ORDER);
2830
for (String dirItem : list) {
2931
System.out.println(dirItem);

java-io/src/main/java/com/brianway/learning/java/io/TextFile.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public static void main(String[] args) {
9494
TextFile text = new TextFile(parent + "/text.txt");
9595
text.write(parent + "test2.txt");
9696
// Break into unique sorted list of words:
97-
TreeSet<String> words = new TreeSet<String>(
97+
TreeSet<String> words = new TreeSet<>(
9898
new TextFile(inFileName, "\\W+"));
9999
// Display the capitalized words:
100100
System.out.println(words.headSet("a"));

0 commit comments

Comments
 (0)