src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyGetterBase.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -23,10 +23,12 @@
  * questions.
  */
 
 package com.sun.xml.internal.ws.spi.db;
 
+import javax.xml.ws.WebServiceException;
+
 /**
  * This is the Gtter of a bean property.
  *
  * @author shih-chang.chen@oracle.com
  * @exclude

@@ -44,15 +46,22 @@
              method.getParameterTypes().length == 0)) {
             if (method.getName().startsWith("get") &&
                 method.getName().length() > 3) {
                 return true;
             } else {
-                if (method.getReturnType().equals(boolean.class) &&
+                if ((method.getReturnType().equals(boolean.class) || method.getReturnType().equals(Boolean.class)) &&
                     method.getName().startsWith("is") &&
                     method.getName().length() > 2) {
                     return true;
                 }
             }
         }
         return false;
     }
+
+    static void verifyWrapperType(Class wrapperType) {
+        String className = wrapperType.getName();
+        if (className.startsWith("java.") || className.startsWith("javax.")) {
+            throw new WebServiceException("Invalid wrapper type " + className);
+        }
+    }
 }