Handle NoSuchFileExceptions from newer versions of javac.
[jglob.git] / src / dolda / jglob / Collector.java
index 25b7ab7..894e075 100644 (file)
@@ -2,6 +2,7 @@ package dolda.jglob;
 
 import java.util.*;
 import java.io.*;
+import java.nio.file.*;
 import javax.annotation.processing.*;
 import javax.tools.*;
 import javax.lang.model.*;
@@ -9,7 +10,6 @@ import javax.lang.model.element.*;
 import javax.lang.model.util.*;
 
 @SupportedAnnotationTypes({"*"})
-@SupportedSourceVersion(SourceVersion.RELEASE_5)
 public class Collector extends AbstractProcessor {
     private ProcessingEnvironment cfg;
     private Elements eu;
@@ -31,7 +31,7 @@ public class Collector extends AbstractProcessor {
            InputStream in;
            try {
                in = lf.openInputStream();
-           } catch(FileNotFoundException e) {
+           } catch(FileNotFoundException | NoSuchFileException e) {
                return(prev);
            }
            try {
@@ -105,4 +105,8 @@ public class Collector extends AbstractProcessor {
        }
        return(false);
     }
+
+    public SourceVersion getSupportedSourceVersion() {
+       return(SourceVersion.latest());
+    }
 }