Skip to content

Commit 2c514de

Browse files
committed
cleanup
1 parent b230e4a commit 2c514de

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

src/test/java/com/gargoylesoftware/htmlunit/WebTestCase.java

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,8 @@
1818
import static org.junit.Assert.fail;
1919

2020
import java.awt.image.BufferedImage;
21-
import java.io.BufferedInputStream;
2221
import java.io.ByteArrayInputStream;
2322
import java.io.File;
24-
import java.io.FileInputStream;
25-
import java.io.FileNotFoundException;
2623
import java.io.IOException;
2724
import java.io.InputStream;
2825
import java.io.Serializable;
@@ -381,46 +378,6 @@ protected void assertFalse(final String message, final boolean condition) {
381378
Assert.assertFalse(message, condition);
382379
}
383380

384-
/**
385-
* Returns an input stream for the specified file name. Refer to {@link #getFileObject(String)}
386-
* for details on how the file is located.
387-
* @param fileName the base file name
388-
* @return the input stream
389-
* @throws FileNotFoundException if the file cannot be found
390-
*/
391-
public static InputStream getFileAsStream(final String fileName) throws FileNotFoundException {
392-
return new BufferedInputStream(new FileInputStream(getFileObject(fileName)));
393-
}
394-
395-
/**
396-
* Returns a File object for the specified file name. This is different from just
397-
* <code>new File(fileName)</code> because it will adjust the location of the file
398-
* depending on how the code is being executed.
399-
*
400-
* @param fileName the base filename
401-
* @return the new File object
402-
* @throws FileNotFoundException if the file doesn't exist
403-
*/
404-
public static File getFileObject(final String fileName) throws FileNotFoundException {
405-
final String localizedName = fileName.replace('/', File.separatorChar);
406-
407-
File file = new File(localizedName);
408-
if (!file.exists()) {
409-
file = new File("../../" + localizedName);
410-
}
411-
412-
if (!file.exists()) {
413-
try {
414-
System.out.println("currentDir=" + new File(".").getCanonicalPath());
415-
}
416-
catch (final IOException e) {
417-
e.printStackTrace();
418-
}
419-
throw new FileNotFoundException(localizedName);
420-
}
421-
return file;
422-
}
423-
424381
/**
425382
* Sets the browser version.
426383
* @param browserVersion the browser version

0 commit comments

Comments
 (0)