Author: klape
Date: 2013-08-01 20:34:53 -0400 (Thu, 01 Aug 2013)
New Revision: 17850
Modified:
thirdparty/cxf/branches/cxf-2.2.12/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
thirdparty/cxf/branches/cxf-2.2.12/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java
Log:
Fixing checkstyle errors
Modified:
thirdparty/cxf/branches/cxf-2.2.12/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
===================================================================
---
thirdparty/cxf/branches/cxf-2.2.12/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java 2013-07-31
05:49:05 UTC (rev 17849)
+++
thirdparty/cxf/branches/cxf-2.2.12/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java 2013-08-02
00:34:53 UTC (rev 17850)
@@ -575,8 +575,8 @@
//we want to return the right type for collections so if we get null
//from the return type we check if it's ParameterizedType and get the
//generic return type.
- if((type==null) && (f.getGenericType() instanceof ParameterizedType))
{
- type = f.getGenericType();
+ if ((type == null) && (f.getGenericType() instanceof
ParameterizedType)) {
+ type = f.getGenericType();
}
JAXBBeanInfo beanInfo = getBeanInfo(type);
if (beanInfo != null) {
@@ -589,8 +589,8 @@
//we want to return the right type for collections so if we get null
//from the return type we check if it's ParameterizedType and get the
//generic return type.
- if((type==null) && (m.getGenericReturnType() instanceof
ParameterizedType)) {
- type = m.getGenericReturnType();
+ if ((type == null) && (m.getGenericReturnType() instanceof
ParameterizedType)) {
+ type = m.getGenericReturnType();
}
JAXBBeanInfo beanInfo = getBeanInfo(type);
if (beanInfo != null) {
Modified:
thirdparty/cxf/branches/cxf-2.2.12/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java
===================================================================
---
thirdparty/cxf/branches/cxf-2.2.12/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java 2013-07-31
05:49:05 UTC (rev 17849)
+++
thirdparty/cxf/branches/cxf-2.2.12/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java 2013-08-02
00:34:53 UTC (rev 17850)
@@ -204,27 +204,23 @@
static Class<?> getFieldType(Field f) {
XmlJavaTypeAdapter adapter = getFieldXJTA(f);
- if(adapter==null) {
- if(f.getGenericType() instanceof ParameterizedType) {
- return null;
- }
+ if (adapter == null && f.getGenericType() instanceof ParameterizedType)
{
+ return null;
}
Class<?> adapterType = getTypeFromXmlAdapter(adapter);
return adapterType != null ? adapterType : f.getType();
}
static Class<?> getMethodReturnType(Method m) {
- XmlJavaTypeAdapter adapter = getMethodXJTA(m);
- //if there is no adapter, yet we have a collection make sure
- //we return the Generic type; if there is an annotation let the
- //adapter handle what gets populated
- if(adapter==null) {
- if(m.getGenericReturnType() instanceof ParameterizedType) {
- return null;
- }
- }
- Class<?> adapterType = getTypeFromXmlAdapter(adapter);
- return adapterType != null ? adapterType : m.getReturnType();
+ XmlJavaTypeAdapter adapter = getMethodXJTA(m);
+ //if there is no adapter, yet we have a collection make sure
+ //we return the Generic type; if there is an annotation let the
+ //adapter handle what gets populated
+ if (adapter == null && m.getGenericReturnType() instanceof
ParameterizedType) {
+ return null;
+ }
+ Class<?> adapterType = getTypeFromXmlAdapter(adapter);
+ return adapterType != null ? adapterType : m.getReturnType();
}
@SuppressWarnings({ "rawtypes", "unchecked" })
Show replies by date