During incremental compilation the type name may be fully resolved - take just the simple part
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Sun, 25 Aug 2013 15:43:30 +0200
changeset 26158b5ca16bf59
parent 260 23e2ad7e6d23
child 262 30b03f2c82af
During incremental compilation the type name may be fully resolved - take just the simple part
json/src/main/java/org/apidesign/html/json/impl/ModelProcessor.java
     1.1 --- a/json/src/main/java/org/apidesign/html/json/impl/ModelProcessor.java	Sun Aug 25 14:40:16 2013 +0200
     1.2 +++ b/json/src/main/java/org/apidesign/html/json/impl/ModelProcessor.java	Sun Aug 25 15:43:30 2013 +0200
     1.3 @@ -1684,7 +1684,12 @@
     1.4              if (params.size() != 2) {
     1.5                  error = true;
     1.6              } else {
     1.7 -                if (!params.get(0).asType().toString().equals(className)) {
     1.8 +                String firstType = params.get(0).asType().toString();
     1.9 +                int lastDot = firstType.lastIndexOf('.');
    1.10 +                if (lastDot != -1) {
    1.11 +                    firstType = firstType.substring(lastDot + 1);
    1.12 +                }
    1.13 +                if (!firstType.equals(className)) {
    1.14                      error = true;
    1.15                  }
    1.16                  if (!processingEnv.getTypeUtils().isAssignable(excType, params.get(1).asType())) {