cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r724333 - /cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
Date Mon, 08 Dec 2008 13:06:52 GMT
Author: bimargulies
Date: Mon Dec  8 05:06:51 2008
New Revision: 724333

URL: http://svn.apache.org/viewvc?rev=724333&view=rev
Log:
Remove some obsolete reflection code.

Modified:
    cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java

Modified: cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java?rev=724333&r1=724332&r2=724333&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
(original)
+++ cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
Mon Dec  8 05:06:51 2008
@@ -266,18 +266,10 @@
         return buf.toString();
     }
 
-    // TODO  this can be repaced with schemaCompiler.getOptions() once we
-    // move to a version => 2.0.3 for jaxb-xjc
+    // JAXB 'deprecates' getOptions, by which they mean that they reserve the right to change
it.
+    @SuppressWarnings("deprecation")
     private Options getOptions(SchemaCompiler schemaCompiler) throws ToolException {
-        try {
-            Field delegateField = schemaCompiler.getClass().getDeclaredField("opts");
-            delegateField.setAccessible(true);
-            return (Options)delegateField.get(schemaCompiler);
-        } catch (Exception e) {
-            String msg = "Failed to access 'opts' field of XJC SchemaCompilerImpl, reason:"
+ e;
-            LOG.log(Level.SEVERE, msg, e);
-            throw new ToolException(msg, e);
-        }
+        return schemaCompiler.getOptions();
     }
 
     // JAXB bug. JAXB ClassNameCollector may not be invoked when generated



Mime
View raw message