Fix some eclipse warnings
diff --git a/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java b/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java
index 8d4a087..207a63d 100644
--- a/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java
+++ b/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java
@@ -131,9 +131,8 @@
file = new File(s).getAbsoluteFile();
if (file.getParentFile().exists()) {
return file.toURI();
- } else {
- throw use;
}
+ throw use;
}
}
}
diff --git a/javadoc/src/main/java/org/apache/cxf/xjc/javadoc/PropertyJavadoc.java b/javadoc/src/main/java/org/apache/cxf/xjc/javadoc/PropertyJavadoc.java
index 297d9a0..4ecc890 100644
--- a/javadoc/src/main/java/org/apache/cxf/xjc/javadoc/PropertyJavadoc.java
+++ b/javadoc/src/main/java/org/apache/cxf/xjc/javadoc/PropertyJavadoc.java
@@ -118,10 +118,9 @@
if (options.enableIntrospection) {
return ((type.isPrimitive() && type.boxify().getPrimitiveType() == codeModel.BOOLEAN)
? "is" : "get") + fieldOutline.getPropertyInfo().getName(true);
- } else {
- return (type.boxify().getPrimitiveType() == codeModel.BOOLEAN ? "is" : "get")
- + fieldOutline.getPropertyInfo().getName(true);
}
+ return (type.boxify().getPrimitiveType() == codeModel.BOOLEAN ? "is" : "get")
+ + fieldOutline.getPropertyInfo().getName(true);
}
}
diff --git a/runtime/src/main/java/org/apache/cxf/xjc/runtime/JAXBToStringStyle.java b/runtime/src/main/java/org/apache/cxf/xjc/runtime/JAXBToStringStyle.java
index f0cf677..94bf373 100644
--- a/runtime/src/main/java/org/apache/cxf/xjc/runtime/JAXBToStringStyle.java
+++ b/runtime/src/main/java/org/apache/cxf/xjc/runtime/JAXBToStringStyle.java
@@ -21,7 +21,6 @@
import javax.xml.bind.JAXBElement;
-import org.apache.commons.lang3.SystemUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
@@ -55,9 +54,9 @@
super();
if (multiLine) {
this.setContentStart("[");
- this.setFieldSeparator(SystemUtils.LINE_SEPARATOR + " ");
+ this.setFieldSeparator(System.lineSeparator() + " ");
this.setFieldSeparatorAtStart(true);
- this.setContentEnd(SystemUtils.LINE_SEPARATOR + "]");
+ this.setContentEnd(System.lineSeparator() + "]");
} else {
// simple
this.setUseClassName(false);
diff --git a/wsdlextension/src/main/java/org/apache/cxf/xjc/wsdlextension/WSDLExtension.java b/wsdlextension/src/main/java/org/apache/cxf/xjc/wsdlextension/WSDLExtension.java
index 61a5656..e5fd374 100644
--- a/wsdlextension/src/main/java/org/apache/cxf/xjc/wsdlextension/WSDLExtension.java
+++ b/wsdlextension/src/main/java/org/apache/cxf/xjc/wsdlextension/WSDLExtension.java
@@ -35,7 +35,7 @@
import com.sun.codemodel.JFieldVar;
import com.sun.codemodel.JMethod;
import com.sun.codemodel.JMod;
-import com.sun.codemodel.JPrimitiveType;
+import com.sun.codemodel.JType;
import com.sun.tools.xjc.BadCommandLineException;
import com.sun.tools.xjc.Options;
import com.sun.tools.xjc.outline.ClassOutline;
@@ -87,7 +87,7 @@
"getElementType");
getElementTypeMethod.body()._return(JExpr.direct("elementType"));
- JMethod setElementTypeMethod = implementation.method(JMod.PUBLIC, JPrimitiveType.parse(co
+ JMethod setElementTypeMethod = implementation.method(JMod.PUBLIC, JType.parse(co
.parent().getCodeModel(), "void"), "setElementType");
setElementTypeMethod.param(QName.class, "type");
setElementTypeMethod.body().directStatement("this.elementType = type;");
@@ -96,7 +96,7 @@
"getRequired");
getRequiredMethod.body()._return(JExpr.direct("required == null ? false : required"));
- JMethod setRequiredMethod = implementation.method(JMod.PUBLIC, JPrimitiveType.parse(co
+ JMethod setRequiredMethod = implementation.method(JMod.PUBLIC, JType.parse(co
.parent().getCodeModel(), "void"), "setRequired");
setRequiredMethod.param(Boolean.class, "required");
setRequiredMethod.body().directStatement("this.required = required;");