Skip to content

Commit 5423ec5

Browse files
committed
[update] update the class that resource path gets from in main methods
1 parent a76f7a4 commit 5423ec5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static void shortcut(String infile, String outfile)throws IOException{
4848
}
4949

5050
public static void main(String[] args) throws IOException {
51-
String parent = BufferedInputFile.class.getResource("/").getPath();
51+
String parent = FileOutput.class.getResource("/").getPath();
5252
String infile = parent + "/infile.txt";
5353

5454
String outfile = parent + "/BasicOut";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static void readFormattedInput(String filename) {
4747

4848
public static void main(String[] args)
4949
throws IOException {
50-
String filename = BufferedInputFile.class.getResource("/").getPath()
50+
String filename = MemoryInput.class.getResource("/").getPath()
5151
+ "/infile.txt";
5252
useStringReader(filename);
5353
readFormattedInput(filename);

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
@@ -86,7 +86,7 @@ public void write(String fileName) {
8686

8787
// Simple test:
8888
public static void main(String[] args) {
89-
String parent = BufferedInputFile.class.getResource("/").getPath();
89+
String parent = TextFile.class.getResource("/").getPath();
9090
String inFileName = parent + "/infile.txt";
9191

9292
String file = read(inFileName);

0 commit comments

Comments
 (0)