From: Jeff M. <cus...@us...> - 2004-05-18 12:44:23
|
Update of /cvsroot/mockobjects/mockobjects-java/src/jdk/common/com/mockobjects/io In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17502/src/jdk/common/com/mockobjects/io Modified Files: MockFileInputStream.java Log Message: Patch from Mr Thomas Klaeger <tomy at users.sourceforge.net> Removed need to have c:\autoexec.bat present on your box (who the hell put that in!) Index: MockFileInputStream.java =================================================================== RCS file: /cvsroot/mockobjects/mockobjects-java/src/jdk/common/com/mockobjects/io/MockFileInputStream.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- MockFileInputStream.java 6 Apr 2003 23:08:34 -0000 1.1 +++ MockFileInputStream.java 18 May 2004 12:44:12 -0000 1.2 @@ -7,7 +7,6 @@ import com.mockobjects.*; public class MockFileInputStream extends FileInputStream { - public static final String KNOWN_FILE = "c:\\autoexec.bat"; private String myContents = ""; private int myIndex = 0; @@ -15,14 +14,14 @@ private MockFileInputStream() throws FileNotFoundException { // Unfortunately as there is no interface we have to call the supertype, // which requires a file. - super(KNOWN_FILE); + super(FileDescriptor.in); } public static MockFileInputStream newMockFileInputStream(){ try { return new MockFileInputStream(); } catch (FileNotFoundException e) { - throw new AssertionFailedError("couldn't create MockFileInputStream (requires known file: " + KNOWN_FILE +") "+e); + throw new AssertionFailedError("couldn't create MockFileInputStream "+e); } } |