NetBeans Javac throws different exception than AnnotationTypeMismatchException - catch that one as well
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Wed, 17 Apr 2013 13:42:07 +0200
changeset 1001748dc75f709a
parent 965 5c7cdd2b3f8f
child 1002 f26837592744
child 1003 bf8b1d7d76e0
NetBeans Javac throws different exception than AnnotationTypeMismatchException - catch that one as well
javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/PageProcessor.java
     1.1 --- a/javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/PageProcessor.java	Wed Apr 10 12:23:17 2013 +0200
     1.2 +++ b/javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/PageProcessor.java	Wed Apr 17 13:42:07 2013 +0200
     1.3 @@ -23,6 +23,7 @@
     1.4  import java.io.StringWriter;
     1.5  import java.io.Writer;
     1.6  import java.lang.annotation.AnnotationTypeMismatchException;
     1.7 +import java.lang.annotation.IncompleteAnnotationException;
     1.8  import java.lang.reflect.Method;
     1.9  import java.util.ArrayList;
    1.10  import java.util.Collection;
    1.11 @@ -1334,7 +1335,7 @@
    1.12          String typeName(ProcessingEnvironment env) {
    1.13              try {
    1.14                  return p.type().getName();
    1.15 -            } catch (AnnotationTypeMismatchException ex) {
    1.16 +            } catch (IncompleteAnnotationException | AnnotationTypeMismatchException ex) {
    1.17                  for (Object v : getAnnoValues(env)) {
    1.18                      String s = v.toString().replace(" ", "");
    1.19                      if (s.startsWith("type=") && s.endsWith(".class")) {