Author: dkulp
Date: Mon Jun 8 19:16:35 2009
New Revision: 782728
URL: http://svn.apache.org/viewvc?rev=782728&view=rev
Log:
[CXF-1880] Patch from Chris McClelland applied to make CXF xjc plugins
work better with jdk6
Added:
cxf/trunk/common/xjc/dv/src/main/java/com/
cxf/trunk/common/xjc/dv/src/main/java/com/sun/
cxf/trunk/common/xjc/dv/src/main/java/com/sun/tools/
cxf/trunk/common/xjc/dv/src/main/java/com/sun/tools/xjc/
cxf/trunk/common/xjc/dv/src/main/java/com/sun/tools/xjc/addon/
cxf/trunk/common/xjc/dv/src/main/java/com/sun/tools/xjc/addon/apache_cxf/
cxf/trunk/common/xjc/dv/src/main/java/com/sun/tools/xjc/addon/apache_cxf/dv/
cxf/trunk/common/xjc/dv/src/main/java/com/sun/tools/xjc/addon/apache_cxf/dv/DefaultValuePlugin.java
(with props)
cxf/trunk/common/xjc/ts/src/main/java/com/
cxf/trunk/common/xjc/ts/src/main/java/com/sun/
cxf/trunk/common/xjc/ts/src/main/java/com/sun/tools/
cxf/trunk/common/xjc/ts/src/main/java/com/sun/tools/xjc/
cxf/trunk/common/xjc/ts/src/main/java/com/sun/tools/xjc/addon/
cxf/trunk/common/xjc/ts/src/main/java/com/sun/tools/xjc/addon/apache_cxf/
cxf/trunk/common/xjc/ts/src/main/java/com/sun/tools/xjc/addon/apache_cxf/ts/
cxf/trunk/common/xjc/ts/src/main/java/com/sun/tools/xjc/addon/apache_cxf/ts/ToStringPlugin.java
(with props)
Modified:
cxf/trunk/common/xjc/dv/src/main/java/org/apache/cxf/xjc/dv/DefaultValuePlugin.java
cxf/trunk/common/xjc/dv/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin
cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/xjc/ts/ToStringPlugin.java
cxf/trunk/common/xjc/ts/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin
Added:
cxf/trunk/common/xjc/dv/src/main/java/com/sun/tools/xjc/addon/apache_cxf/dv/DefaultValuePlugin.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/common/xjc/dv/src/main/java/com/sun/tools/xjc/addon/apache_cxf/dv/DefaultValuePlugin.java?rev=782728&view=auto
==============================================================================
---
cxf/trunk/common/xjc/dv/src/main/java/com/sun/tools/xjc/addon/apache_cxf/dv/DefaultValuePlugin.java
(added)
+++
cxf/trunk/common/xjc/dv/src/main/java/com/sun/tools/xjc/addon/apache_cxf/dv/DefaultValuePlugin.java
Mon Jun 8 19:16:35 2009
@@ -0,0 +1,61 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.sun.tools.xjc.addon.apache_cxf.dv;
+
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.SAXException;
+
+import com.sun.tools.xjc.Options;
+import com.sun.tools.xjc.Plugin;
+import com.sun.tools.xjc.outline.Outline;
+
+/**
+ * Thin wrapper around the DefaultValuePlugin. This must be in the
com.sun.tools.xjc.addon package
+ * for it to work with Java 6. See
https://issues.apache.org/jira/browse/CXF-1880.
+ */
+public class DefaultValuePlugin extends Plugin {
+
+ org.apache.cxf.xjc.dv.DefaultValuePlugin impl = new
org.apache.cxf.xjc.dv.DefaultValuePlugin();
+
+ /* (non-Javadoc)
+ * @see com.sun.tools.xjc.Plugin#getOptionName()
+ */
+ @Override
+ public String getOptionName() {
+ return impl.getOptionName();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.tools.xjc.Plugin#getUsage()
+ */
+ @Override
+ public String getUsage() {
+ return impl.getUsage();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.tools.xjc.Plugin#run(com.sun.tools.xjc.outline.Outline,
+ * com.sun.tools.xjc.Options, org.xml.sax.ErrorHandler)
+ */
+ @Override
+ public boolean run(Outline outline, Options opt, ErrorHandler
errorHandler) throws SAXException {
+ return impl.run(outline, opt, errorHandler);
+ }
+}
Propchange:
cxf/trunk/common/xjc/dv/src/main/java/com/sun/tools/xjc/addon/apache_cxf/dv/DefaultValuePlugin.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
cxf/trunk/common/xjc/dv/src/main/java/com/sun/tools/xjc/addon/apache_cxf/dv/DefaultValuePlugin.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified:
cxf/trunk/common/xjc/dv/src/main/java/org/apache/cxf/xjc/dv/DefaultValuePlugin.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/common/xjc/dv/src/main/java/org/apache/cxf/xjc/dv/DefaultValuePlugin.java?rev=782728&r1=782727&r2=782728&view=diff
==============================================================================
---
cxf/trunk/common/xjc/dv/src/main/java/org/apache/cxf/xjc/dv/DefaultValuePlugin.java
(original)
+++
cxf/trunk/common/xjc/dv/src/main/java/org/apache/cxf/xjc/dv/DefaultValuePlugin.java
Mon Jun 8 19:16:35 2009
@@ -41,7 +41,6 @@
import com.sun.codemodel.JOp;
import com.sun.codemodel.JType;
import com.sun.tools.xjc.Options;
-import com.sun.tools.xjc.Plugin;
import com.sun.tools.xjc.outline.ClassOutline;
import com.sun.tools.xjc.outline.FieldOutline;
import com.sun.tools.xjc.outline.Outline;
@@ -60,7 +59,7 @@
* Modifies the JAXB code model to initialise fields mapped from schema
elements
* with their default value.
*/
-public class DefaultValuePlugin extends Plugin {
+public class DefaultValuePlugin {
private static final Logger LOG =
LogUtils.getL7dLogger(DefaultValuePlugin.class);
Modified:
cxf/trunk/common/xjc/dv/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin
URL:
http://svn.apache.org/viewvc/cxf/trunk/common/xjc/dv/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin?rev=782728&r1=782727&r2=782728&view=diff
==============================================================================
---
cxf/trunk/common/xjc/dv/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin
(original)
+++
cxf/trunk/common/xjc/dv/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin
Mon Jun 8 19:16:35 2009
@@ -1 +1 @@
-org.apache.cxf.xjc.dv.DefaultValuePlugin
\ No newline at end of file
+com.sun.tools.xjc.addon.apache_cxf.dv.DefaultValuePlugin
Added:
cxf/trunk/common/xjc/ts/src/main/java/com/sun/tools/xjc/addon/apache_cxf/ts/ToStringPlugin.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/common/xjc/ts/src/main/java/com/sun/tools/xjc/addon/apache_cxf/ts/ToStringPlugin.java?rev=782728&view=auto
==============================================================================
---
cxf/trunk/common/xjc/ts/src/main/java/com/sun/tools/xjc/addon/apache_cxf/ts/ToStringPlugin.java
(added)
+++
cxf/trunk/common/xjc/ts/src/main/java/com/sun/tools/xjc/addon/apache_cxf/ts/ToStringPlugin.java
Mon Jun 8 19:16:35 2009
@@ -0,0 +1,74 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.sun.tools.xjc.addon.apache_cxf.ts;
+
+import java.io.IOException;
+
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.SAXException;
+
+import com.sun.tools.xjc.BadCommandLineException;
+import com.sun.tools.xjc.Options;
+import com.sun.tools.xjc.Plugin;
+import com.sun.tools.xjc.outline.Outline;
+
+/**
+ * Thin wrapper around the ToStringPlugin. This must be in the
com.sun.tools.xjc.addon package
+ * for it to work with Java 6. See
https://issues.apache.org/jira/browse/CXF-1880.
+ */
+public class ToStringPlugin extends Plugin {
+
+ org.apache.cxf.xjc.ts.ToStringPlugin impl = new
org.apache.cxf.xjc.ts.ToStringPlugin();
+
+ /* (non-Javadoc)
+ * @see com.sun.tools.xjc.Plugin#getOptionName()
+ */
+ @Override
+ public String getOptionName() {
+ return impl.getOptionName();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.tools.xjc.Plugin#getUsage()
+ */
+ @Override
+ public String getUsage() {
+ return impl.getUsage();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.tools.xjc.Plugin#run(com.sun.tools.xjc.outline.Outline,
+ * com.sun.tools.xjc.Options, org.xml.sax.ErrorHandler)
+ */
+ @Override
+ public boolean run(Outline outline, Options opt, ErrorHandler
errorHandler) throws SAXException {
+ return impl.run(outline, opt, errorHandler);
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.tools.xjc.Plugin#parseArgument(com.sun.tools.xjc.Options,
java.lang.String[], int)
+ */
+ @Override
+ public int parseArgument(Options opt, String[] args, int index)
+ throws BadCommandLineException, IOException {
+
+ return impl.parseArgument(opt, args, index);
+ }
+}
Propchange:
cxf/trunk/common/xjc/ts/src/main/java/com/sun/tools/xjc/addon/apache_cxf/ts/ToStringPlugin.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
cxf/trunk/common/xjc/ts/src/main/java/com/sun/tools/xjc/addon/apache_cxf/ts/ToStringPlugin.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified:
cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/xjc/ts/ToStringPlugin.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/xjc/ts/ToStringPlugin.java?rev=782728&r1=782727&r2=782728&view=diff
==============================================================================
---
cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/xjc/ts/ToStringPlugin.java
(original)
+++
cxf/trunk/common/xjc/ts/src/main/java/org/apache/cxf/xjc/ts/ToStringPlugin.java
Mon Jun 8 19:16:35 2009
@@ -34,7 +34,6 @@
import com.sun.codemodel.JMod;
import com.sun.tools.xjc.BadCommandLineException;
import com.sun.tools.xjc.Options;
-import com.sun.tools.xjc.Plugin;
import com.sun.tools.xjc.outline.ClassOutline;
import com.sun.tools.xjc.outline.Outline;
@@ -47,7 +46,7 @@
* Modifies the JAXB code model to override the Object.toString() method with
an
* implementation that provides a String representation of the xml content.
*/
-public class ToStringPlugin extends Plugin {
+public class ToStringPlugin {
private static final Logger LOG =
LogUtils.getL7dLogger(ToStringPlugin.class);
Modified:
cxf/trunk/common/xjc/ts/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin
URL:
http://svn.apache.org/viewvc/cxf/trunk/common/xjc/ts/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin?rev=782728&r1=782727&r2=782728&view=diff
==============================================================================
---
cxf/trunk/common/xjc/ts/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin
(original)
+++
cxf/trunk/common/xjc/ts/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin
Mon Jun 8 19:16:35 2009
@@ -1 +1 @@
-org.apache.cxf.xjc.ts.ToStringPlugin
\ No newline at end of file
+com.sun.tools.xjc.addon.apache_cxf.ts.ToStringPlugin