creadur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1625269 - /creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/document/impl/guesser/BinaryGuesserTest.java
Date Tue, 16 Sep 2014 13:09:09 GMT
Author: sebb
Date: Tue Sep 16 13:09:08 2014
New Revision: 1625269

URL: http://svn.apache.org/r1625269
Log:
Detect initial missing file

Modified:
    creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/document/impl/guesser/BinaryGuesserTest.java

Modified: creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/document/impl/guesser/BinaryGuesserTest.java
URL: http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/document/impl/guesser/BinaryGuesserTest.java?rev=1625269&r1=1625268&r2=1625269&view=diff
==============================================================================
--- creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/document/impl/guesser/BinaryGuesserTest.java
(original)
+++ creadur/rat/trunk/apache-rat-core/src/test/java/org/apache/rat/document/impl/guesser/BinaryGuesserTest.java
Tue Sep 16 13:09:08 2014
@@ -66,16 +66,16 @@ public class BinaryGuesserTest {
      * Used to swallow a MalformedInputException and return false
      * because the encoding of the stream was different from the
      * platform's default encoding.
+     * @throws Exception 
      *
      * @see "RAT-81"
      */
     @Test
-    public void binaryWithMalformedInputRAT81() throws Throwable {
+    public void binaryWithMalformedInputRAT81() throws Exception {
         FileDocument doc = new FileDocument(new File("src/test/resources/binaries/UTF16_with_signature.xml"));
-        Reader r = null;
+        Reader r = doc.reader(); // this will fail test if file is not readable
         try {
             char[] dummy = new char[100];
-            r = doc.reader();
             r.read(dummy);
             // if we get here, the UTF-16 encoded file didn't throw
             // any exception, try the UTF-8 encoded one



Mime
View raw message