diff -r e320d8156140 -r 0c0fe97fe0c7 javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/PageProcessor.java --- a/javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/PageProcessor.java Tue Feb 19 16:16:22 2013 +0100 +++ b/javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/PageProcessor.java Wed Feb 20 18:14:59 2013 +0100 @@ -501,30 +501,46 @@ ret = tm.toString(); } if (p.array()) { - if (ret.equals("byte")) { - return Byte.class.getName(); - } - if (ret.equals("short")) { - return Short.class.getName(); - } - if (ret.equals("char")) { - return Character.class.getName(); - } - if (ret.equals("int")) { - return Integer.class.getName(); - } - if (ret.equals("long")) { - return Long.class.getName(); - } - if (ret.equals("float")) { - return Float.class.getName(); - } - if (ret.equals("double")) { - return Double.class.getName(); + String bt = findBoxedType(ret); + if (bt != null) { + return bt; } } + if ("java.lang.String".equals(ret)) { + return ret; + } + String bt = findBoxedType(ret); + if (bt != null) { + return ret; + } + processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, "Only primitive types supported in the mapping. Not " + ret); return ret; } + + private static String findBoxedType(String ret) { + if (ret.equals("byte")) { + return Byte.class.getName(); + } + if (ret.equals("short")) { + return Short.class.getName(); + } + if (ret.equals("char")) { + return Character.class.getName(); + } + if (ret.equals("int")) { + return Integer.class.getName(); + } + if (ret.equals("long")) { + return Long.class.getName(); + } + if (ret.equals("float")) { + return Float.class.getName(); + } + if (ret.equals("double")) { + return Double.class.getName(); + } + return null; + } private boolean verifyPropName(Element e, String propName, Property[] existingProps) { StringBuilder sb = new StringBuilder();