Author: coheigea
Date: Fri Nov 16 16:49:13 2012
New Revision: 1410458
URL: http://svn.apache.org/viewvc?rev=1410458&view=rev
Log:
Cleanup of casts
Modified:
cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/WebFaultInInterceptor.java
cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaConduit.java
cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaServerConduit.java
cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/runtime/CorbaObjectReader.java
cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/runtime/CorbaObjectWriter.java
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/policy/HTTPClientAssertionBuilder.java
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/policy/HTTPServerAssertionBuilder.java
cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/policy/RMAssertionBuilder.java
cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMUtilsTest.java
cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToIDLAction.java
cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLTypes.java
Modified:
cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/WebFaultInInterceptor.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/WebFaultInInterceptor.java?rev=1410458&r1=1410457&r2=1410458&view=diff
==============================================================================
---
cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/WebFaultInInterceptor.java
(original)
+++
cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/WebFaultInInterceptor.java
Fri Nov 16 16:49:13 2012
@@ -76,7 +76,7 @@ public class WebFaultInInterceptor exten
}
private MessagePartInfo getFaultMessagePart(QName qname, OperationInfo op)
{
- if (op.isUnwrapped()) {
+ if (op.isUnwrapped() && (op instanceof UnwrappedOperationInfo)) {
op = ((UnwrappedOperationInfo)op).getWrappedOperation();
}
Modified:
cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaConduit.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaConduit.java?rev=1410458&r1=1410457&r2=1410458&view=diff
==============================================================================
---
cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaConduit.java
(original)
+++
cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaConduit.java
Fri Nov 16 16:49:13 2012
@@ -124,8 +124,9 @@ public class CorbaConduit implements Con
message.setContent(OutputStream.class,
new CorbaOutputStream(message));
- CorbaMessage corbaMessage = (CorbaMessage) message;
- corbaMessage.setCorbaTypeMap(typeMap);
+ if (message instanceof CorbaMessage) {
+ ((CorbaMessage)message).setCorbaTypeMap(typeMap);
+ }
} catch (java.lang.Exception ex) {
LOG.log(Level.SEVERE, "Could not resolve target object");
@@ -138,7 +139,9 @@ public class CorbaConduit implements Con
BindingOperationInfo boi =
message.getExchange().get(BindingOperationInfo.class);
OperationType opType = boi.getExtensor(OperationType.class);
try {
- buildRequest((CorbaMessage)message, opType);
+ if (message instanceof CorbaMessage) {
+ buildRequest((CorbaMessage)message, opType);
+ }
message.getContent(OutputStream.class).close();
} catch (Exception ex) {
LOG.log(Level.SEVERE, "Could not build the corba request");
Modified:
cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaServerConduit.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaServerConduit.java?rev=1410458&r1=1410457&r2=1410458&view=diff
==============================================================================
---
cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaServerConduit.java
(original)
+++
cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaServerConduit.java
Fri Nov 16 16:49:13 2012
@@ -68,11 +68,15 @@ public class CorbaServerConduit implemen
message.put(CorbaConstants.ORB, orb);
message.put(CorbaConstants.CORBA_ENDPOINT_OBJECT, targetObject);
message.setContent(OutputStream.class, new CorbaOutputStream(message));
- ((CorbaMessage) message).setCorbaTypeMap(typeMap);
+ if (message instanceof CorbaMessage) {
+ ((CorbaMessage) message).setCorbaTypeMap(typeMap);
+ }
}
public void close(Message message) throws IOException {
- buildRequestResult((CorbaMessage)message);
+ if (message instanceof CorbaMessage) {
+ buildRequestResult((CorbaMessage)message);
+ }
message.getContent(OutputStream.class).close();
}
Modified:
cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/runtime/CorbaObjectReader.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/runtime/CorbaObjectReader.java?rev=1410458&r1=1410457&r2=1410458&view=diff
==============================================================================
---
cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/runtime/CorbaObjectReader.java
(original)
+++
cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/runtime/CorbaObjectReader.java
Fri Nov 16 16:49:13 2012
@@ -119,28 +119,28 @@ public class CorbaObjectReader {
// Now for the complex types
case TCKind._tk_array:
- this.readArray(obj);
+ this.readArray((CorbaArrayHandler)obj);
break;
case TCKind._tk_sequence:
this.readSequence(obj);
break;
case TCKind._tk_struct:
- this.readStruct(obj);
+ this.readStruct((CorbaStructHandler)obj);
break;
case TCKind._tk_enum:
this.readEnum(obj);
break;
case TCKind._tk_except:
- this.readException(obj);
+ this.readException((CorbaExceptionHandler)obj);
break;
case TCKind._tk_fixed:
- this.readFixed(obj);
+ this.readFixed((CorbaFixedHandler)obj);
break;
case TCKind._tk_union:
- this.readUnion(obj);
+ this.readUnion((CorbaUnionHandler)obj);
break;
case TCKind._tk_objref:
- this.readObjectReference(obj);
+ this.readObjectReference((CorbaObjectReferenceHandler)obj);
break;
default:
// TODO: Provide Implementation. Do we throw an exception.
@@ -311,16 +311,14 @@ public class CorbaObjectReader {
enumObj.setValue(enumerators.get(enumIndex).getValue());
}
- public void readStruct(CorbaObjectHandler obj) throws
CorbaBindingException {
- CorbaStructHandler structObj = (CorbaStructHandler)obj;
+ public void readStruct(CorbaStructHandler structObj) throws
CorbaBindingException {
List<CorbaObjectHandler> structMembers = structObj.getMembers();
for (int i = 0; i < structMembers.size(); ++i) {
this.read(structMembers.get(i));
}
}
- public void readException(CorbaObjectHandler obj) throws
CorbaBindingException {
- CorbaExceptionHandler exceptObj = (CorbaExceptionHandler)obj;
+ public void readException(CorbaExceptionHandler exceptObj) throws
CorbaBindingException {
List<CorbaObjectHandler> exceptElements = exceptObj.getMembers();
String exceptId = stream.read_string();
@@ -331,8 +329,7 @@ public class CorbaObjectReader {
}
}
- public void readFixed(CorbaObjectHandler obj) throws CorbaBindingException
{
- CorbaFixedHandler fixedHandler = (CorbaFixedHandler)obj;
+ public void readFixed(CorbaFixedHandler fixedHandler) throws
CorbaBindingException {
long scale = fixedHandler.getScale();
try {
java.math.BigDecimal fixedValue =
stream.read_fixed().movePointLeft((int)scale);
@@ -343,7 +340,8 @@ public class CorbaObjectReader {
Method m = null;
try {
m = stream.getClass().getMethod("read_fixed", new Class[]
{TypeCode.class});
- BigDecimal fixedValue = (BigDecimal)m.invoke(stream, new
Object[] {obj.getTypeCode()});
+ BigDecimal fixedValue =
+ (BigDecimal)m.invoke(stream, new Object[]
{fixedHandler.getTypeCode()});
fixedHandler.setValue(fixedValue);
} catch (Throwable e1) {
throw ex;
@@ -362,8 +360,7 @@ public class CorbaObjectReader {
disc.setValue(enumerators.get(enumIndex).getValue());
}
- public void readUnion(CorbaObjectHandler obj) throws CorbaBindingException
{
- CorbaUnionHandler unionHandler = (CorbaUnionHandler)obj;
+ public void readUnion(CorbaUnionHandler unionHandler) throws
CorbaBindingException {
Union unionType = (Union)unionHandler.getType();
List<Unionbranch> branches = unionType.getUnionbranch();
CorbaObjectHandler discriminator = unionHandler.getDiscriminator();
@@ -412,8 +409,7 @@ public class CorbaObjectReader {
}
//CHECKSTYLE:OFF - processing the typecodes in a switch makes this
method fairly long/complex
- public void readArray(CorbaObjectHandler obj) throws CorbaBindingException
{
- CorbaArrayHandler arrayObj = (CorbaArrayHandler)obj;
+ public void readArray(CorbaArrayHandler arrayObj) throws
CorbaBindingException {
List<CorbaObjectHandler> arrayElements = arrayObj.getElements();
Object val = null;
@@ -556,8 +552,7 @@ public class CorbaObjectReader {
}
}
- public void readObjectReference(CorbaObjectHandler obj) throws
CorbaBindingException {
- CorbaObjectReferenceHandler objRefObj =
(CorbaObjectReferenceHandler)obj;
+ public void readObjectReference(CorbaObjectReferenceHandler objRefObj)
throws CorbaBindingException {
org.omg.CORBA.Object objRef = stream.read_Object();
objRefObj.setReference(objRef);
}
Modified:
cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/runtime/CorbaObjectWriter.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/runtime/CorbaObjectWriter.java?rev=1410458&r1=1410457&r2=1410458&view=diff
==============================================================================
---
cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/runtime/CorbaObjectWriter.java
(original)
+++
cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/runtime/CorbaObjectWriter.java
Fri Nov 16 16:49:13 2012
@@ -99,33 +99,33 @@ public class CorbaObjectWriter {
this.writeWString((String)((CorbaPrimitiveHandler)obj).getValue());
break;
case TCKind._tk_any:
- this.writeAny(obj);
+ this.writeAny((CorbaAnyHandler)obj);
break;
// Now for the complex types
case TCKind._tk_array:
- this.writeArray(obj);
+ this.writeArray((CorbaArrayHandler)obj);
break;
case TCKind._tk_sequence:
this.writeSequence(obj);
break;
case TCKind._tk_struct:
- this.writeStruct(obj);
+ this.writeStruct((CorbaStructHandler)obj);
break;
case TCKind._tk_enum:
- this.writeEnum(obj);
+ this.writeEnum((CorbaEnumHandler)obj);
break;
case TCKind._tk_except:
- this.writeException(obj);
+ this.writeException((CorbaExceptionHandler)obj);
break;
case TCKind._tk_fixed:
- this.writeFixed(obj);
+ this.writeFixed((CorbaFixedHandler)obj);
break;
case TCKind._tk_union:
this.writeUnion(obj);
break;
case TCKind._tk_objref:
- this.writeObjectReference(obj);
+ this.writeObjectReference((CorbaObjectReferenceHandler)obj);
break;
default:
// TODO: Provide Implementation. Do we throw an exception.
@@ -245,8 +245,7 @@ public class CorbaObjectWriter {
}
}
- public void writeAny(CorbaObjectHandler obj) throws CorbaBindingException {
- CorbaAnyHandler anyHandler = (CorbaAnyHandler)obj;
+ public void writeAny(CorbaAnyHandler anyHandler) throws
CorbaBindingException {
CorbaObjectHandler containedType = anyHandler.getAnyContainedType();
Any a = anyHandler.getValue();
@@ -262,8 +261,7 @@ public class CorbaObjectWriter {
}
// -- complex types --
- public void writeEnum(CorbaObjectHandler obj) throws CorbaBindingException
{
- CorbaEnumHandler enumHandler = (CorbaEnumHandler)obj;
+ public void writeEnum(CorbaEnumHandler enumHandler) throws
CorbaBindingException {
Enum enumType = (Enum)enumHandler.getType();
String enumLabel = enumHandler.getValue();
List<Enumerator> enumerators = enumType.getEnumerator();
@@ -278,8 +276,7 @@ public class CorbaObjectWriter {
throw new CorbaBindingException("CorbaObjectWriter: unable to find
enumeration label");
}
- public void writeStruct(CorbaObjectHandler obj) throws
CorbaBindingException {
- CorbaStructHandler structHandler = (CorbaStructHandler)obj;
+ public void writeStruct(CorbaStructHandler structHandler) throws
CorbaBindingException {
List<CorbaObjectHandler> structElements = structHandler.getMembers();
for (int i = 0; i < structElements.size(); ++i) {
@@ -287,8 +284,7 @@ public class CorbaObjectWriter {
}
}
- public void writeException(CorbaObjectHandler obj) throws
CorbaBindingException {
- CorbaExceptionHandler exHandler = (CorbaExceptionHandler)obj;
+ public void writeException(CorbaExceptionHandler exHandler) throws
CorbaBindingException {
Exception exType = (Exception)exHandler.getType();
List<CorbaObjectHandler> exMembers = exHandler.getMembers();
stream.write_string(exType.getRepositoryID());
@@ -297,8 +293,7 @@ public class CorbaObjectWriter {
}
}
- public void writeFixed(CorbaObjectHandler obj) throws
CorbaBindingException {
- CorbaFixedHandler fixedHandler = (CorbaFixedHandler)obj;
+ public void writeFixed(CorbaFixedHandler fixedHandler) throws
CorbaBindingException {
short scale = (short)fixedHandler.getScale();
short fixed = (short)fixedHandler.getDigits();
//the write_fixed method is a "late addition" and not all orbs
implement it.
@@ -326,8 +321,7 @@ public class CorbaObjectWriter {
}
}
- public void writeArray(CorbaObjectHandler obj) throws
CorbaBindingException {
- CorbaArrayHandler arrayHandler = (CorbaArrayHandler)obj;
+ public void writeArray(CorbaArrayHandler arrayHandler) throws
CorbaBindingException {
List<CorbaObjectHandler> arrayElements = arrayHandler.getElements();
for (int i = 0; i < arrayElements.size(); ++i) {
@@ -351,8 +345,7 @@ public class CorbaObjectWriter {
}
}
- public void writeObjectReference(CorbaObjectHandler obj) throws
CorbaBindingException {
- CorbaObjectReferenceHandler objHandler =
(CorbaObjectReferenceHandler)obj;
+ public void writeObjectReference(CorbaObjectReferenceHandler objHandler)
throws CorbaBindingException {
stream.write_Object(objHandler.getReference());
}
}
Modified:
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/policy/HTTPClientAssertionBuilder.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/policy/HTTPClientAssertionBuilder.java?rev=1410458&r1=1410457&r2=1410458&view=diff
==============================================================================
---
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/policy/HTTPClientAssertionBuilder.java
(original)
+++
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/policy/HTTPClientAssertionBuilder.java
Fri Nov 16 16:49:13 2012
@@ -62,6 +62,7 @@ public class HTTPClientAssertionBuilder
return true;
}
if (policyComponent.getType() != Constants.TYPE_ASSERTION
+ || !(policyComponent instanceof Assertion)
|| !getName().equals(((Assertion)policyComponent).getName())) {
return false;
}
@@ -78,6 +79,5 @@ public class HTTPClientAssertionBuilder
}
-
-
}
+
Modified:
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/policy/HTTPServerAssertionBuilder.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/policy/HTTPServerAssertionBuilder.java?rev=1410458&r1=1410457&r2=1410458&view=diff
==============================================================================
---
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/policy/HTTPServerAssertionBuilder.java
(original)
+++
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/policy/HTTPServerAssertionBuilder.java
Fri Nov 16 16:49:13 2012
@@ -62,6 +62,7 @@ public class HTTPServerAssertionBuilder
return true;
}
if (policyComponent.getType() != Constants.TYPE_ASSERTION
+ || !(policyComponent instanceof Assertion)
|| !getName().equals(((Assertion)policyComponent).getName())) {
return false;
}
@@ -76,4 +77,5 @@ public class HTTPServerAssertionBuilder
return a;
}
}
-}
\ No newline at end of file
+}
+
Modified:
cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/policy/RMAssertionBuilder.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/policy/RMAssertionBuilder.java?rev=1410458&r1=1410457&r2=1410458&view=diff
==============================================================================
---
cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/policy/RMAssertionBuilder.java
(original)
+++
cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/policy/RMAssertionBuilder.java
Fri Nov 16 16:49:13 2012
@@ -63,6 +63,7 @@ public class RMAssertionBuilder extends
@Override
public boolean equal(PolicyComponent policyComponent) {
if (policyComponent.getType() != Constants.TYPE_ASSERTION
+ || !(policyComponent instanceof Assertion)
|| !getName().equals(((Assertion)policyComponent).getName())) {
return false;
}
@@ -78,4 +79,4 @@ public class RMAssertionBuilder extends
return a;
}
}
-}
\ No newline at end of file
+}
Modified: cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMUtilsTest.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMUtilsTest.java?rev=1410458&r1=1410457&r2=1410458&view=diff
==============================================================================
--- cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMUtilsTest.java
(original)
+++ cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMUtilsTest.java Fri
Nov 16 16:49:13 2012
@@ -80,7 +80,7 @@ public class RMUtilsTest extends Assert
// this test makes sure that an automatically generated id will be
// mapped to the static default bus name "cxf".
- System.out.println("bus: " + BusFactory.getThreadDefaultBus(false));
+ // System.out.println("bus: " + BusFactory.getThreadDefaultBus(false));
control.reset();
EasyMock.expect(e.getEndpointInfo()).andReturn(ei).times(2);
EasyMock.expect(ei.getName()).andReturn(eqn);
Modified:
cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToIDLAction.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToIDLAction.java?rev=1410458&r1=1410457&r2=1410458&view=diff
==============================================================================
---
cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToIDLAction.java
(original)
+++
cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToIDLAction.java
Fri Nov 16 16:49:13 2012
@@ -499,36 +499,36 @@ public class WSDLToIDLAction {
String local = name[name.length - 1];
if (corbaTypeImpl instanceof Enum) {
- result = createEnum(corbaTypeImpl, scope, local);
+ result = createEnum((Enum)corbaTypeImpl, scope, local);
} else if (corbaTypeImpl instanceof Sequence) {
- result = createSequence(corbaTypeImpl, scope, local);
+ result = createSequence((Sequence)corbaTypeImpl, scope, local);
} else if (corbaTypeImpl instanceof Anonsequence) {
- result = createAnonSequence(corbaTypeImpl, scope, local);
+ result = createAnonSequence((Anonsequence)corbaTypeImpl, scope,
local);
} else if (corbaTypeImpl
instanceof org.apache.cxf.binding.corba.wsdl.Exception) {
- result = createIdlException(corbaTypeImpl, scope, local);
+ result =
createIdlException((org.apache.cxf.binding.corba.wsdl.Exception)corbaTypeImpl,
scope, local);
} else if (corbaTypeImpl instanceof Struct) {
- result = createStruct(corbaTypeImpl, scope, local);
+ result = createStruct((Struct)corbaTypeImpl, scope, local);
} else if (corbaTypeImpl instanceof Union) {
- result = createUnion(corbaTypeImpl, scope, local);
+ result = createUnion((Union)corbaTypeImpl, scope, local);
} else if (corbaTypeImpl instanceof Alias) {
- result = createTypedef(corbaTypeImpl, scope, local);
+ result = createTypedef((Alias)corbaTypeImpl, scope, local);
} else if (corbaTypeImpl instanceof Array) {
- result = createArray(corbaTypeImpl, scope, local);
+ result = createArray((Array)corbaTypeImpl, scope, local);
} else if (corbaTypeImpl instanceof Anonarray) {
- result = createAnonArray(corbaTypeImpl, scope, local);
+ result = createAnonArray((Anonarray)corbaTypeImpl, scope, local);
} else if (corbaTypeImpl instanceof Fixed) {
- result = createFixed(corbaTypeImpl, scope, local);
+ result = createFixed((Fixed)corbaTypeImpl, scope, local);
} else if (corbaTypeImpl instanceof Anonfixed) {
- result = createAnonFixed(corbaTypeImpl, scope, local);
+ result = createAnonFixed((Anonfixed)corbaTypeImpl, scope, local);
} else if (corbaTypeImpl instanceof Const) {
- result = createConst(corbaTypeImpl, scope, local);
+ result = createConst((Const)corbaTypeImpl, scope, local);
} else {
result = checkAnon(corbaTypeImpl, scope, local);
}
- if (result == null && corbaTypeImpl != null) {
- result = createInterface(corbaTypeImpl, scope, local);
+ if (result == null && corbaTypeImpl instanceof
org.apache.cxf.binding.corba.wsdl.Object) {
+ result =
createInterface((org.apache.cxf.binding.corba.wsdl.Object)corbaTypeImpl, scope,
local);
}
return result;
@@ -547,13 +547,11 @@ public class WSDLToIDLAction {
return result;
}
- private IdlType createInterface(CorbaTypeImpl ctype, IdlScopeBase scope,
String local)
+ private IdlType createInterface(org.apache.cxf.binding.corba.wsdl.Object
obj, IdlScopeBase scope, String local)
throws Exception {
IdlType result = null;
- org.apache.cxf.binding.corba.wsdl.Object obj =
- (org.apache.cxf.binding.corba.wsdl.Object)ctype;
QName bqname = obj.getBinding();
Binding binding = def.getBinding(bqname);
@@ -582,11 +580,9 @@ public class WSDLToIDLAction {
return result;
}
- private IdlType createIdlException(CorbaTypeImpl ctype, IdlScopeBase
scope,
+ private IdlType
createIdlException(org.apache.cxf.binding.corba.wsdl.Exception e, IdlScopeBase
scope,
String local) throws Exception {
IdlType result = null;
- org.apache.cxf.binding.corba.wsdl.Exception e =
- (org.apache.cxf.binding.corba.wsdl.Exception)ctype;
Object obj = scope.lookup(local);
@@ -607,9 +603,8 @@ public class WSDLToIDLAction {
return result;
}
- private IdlType createUnion(CorbaTypeImpl ctype, IdlScopeBase scope,
+ private IdlType createUnion(Union u, IdlScopeBase scope,
String local) throws Exception {
- Union u = (Union)ctype;
boolean undefinedCircular = false;
IdlType disc = findType(u.getDiscriminator());
IdlUnion union = IdlUnion.create(scope, local, disc);
@@ -652,9 +647,8 @@ public class WSDLToIDLAction {
return union;
}
- private IdlType createStruct(CorbaTypeImpl ctype, IdlScopeBase scope,
+ private IdlType createStruct(Struct s, IdlScopeBase scope,
String local) throws Exception {
- Struct s = (Struct)ctype;
boolean undefinedCircular = false;
IdlStruct struct = IdlStruct.create(scope, local);
scope.holdForScope(struct);
@@ -689,20 +683,18 @@ public class WSDLToIDLAction {
return struct;
}
- private IdlType createTypedef(CorbaTypeImpl ctype, IdlScopeBase scope,
+ private IdlType createTypedef(Alias a, IdlScopeBase scope,
String local) throws Exception {
IdlType idlType = null;
- Alias a = (Alias)ctype;
IdlType base = findType(a.getBasetype());
idlType = IdlTypedef.create(scope, local, base);
scope.addToScope(idlType);
return idlType;
}
- private IdlType createConst(CorbaTypeImpl ctype, IdlScopeBase scope,
+ private IdlType createConst(Const c, IdlScopeBase scope,
String local) throws Exception {
IdlType idlType = null;
- Const c = (Const)ctype;
IdlType base = findType(c.getIdltype());
String value = c.getValue();
idlType = IdlConst.create(scope, local, base, value);
@@ -710,10 +702,9 @@ public class WSDLToIDLAction {
return idlType;
}
- private IdlType createSequence(CorbaTypeImpl ctype, IdlScopeBase scope,
+ private IdlType createSequence(Sequence s, IdlScopeBase scope,
String local) throws Exception {
IdlType idlType = null;
- Sequence s = (Sequence)ctype;
IdlType base = findType(s.getElemtype());
int bound = (int)s.getBound();
idlType = IdlSequence.create(scope, local, base, bound);
@@ -721,10 +712,9 @@ public class WSDLToIDLAction {
return idlType;
}
- private IdlType createAnonSequence(CorbaTypeImpl ctype, IdlScopeBase
scope,
+ private IdlType createAnonSequence(Anonsequence s, IdlScopeBase scope,
String local) throws Exception {
IdlType idlType = null;
- Anonsequence s = (Anonsequence)ctype;
IdlType base = findType(s.getElemtype());
int bound = (int)s.getBound();
idlType = IdlAnonSequence.create(scope, base, bound);
@@ -732,10 +722,9 @@ public class WSDLToIDLAction {
return idlType;
}
- private IdlType createArray(CorbaTypeImpl ctype, IdlScopeBase scope,
String local)
+ private IdlType createArray(Array s, IdlScopeBase scope, String local)
throws Exception {
IdlType idlType = null;
- Array s = (Array)ctype;
IdlType base = findType(s.getElemtype());
int bound = (int)s.getBound();
idlType = IdlArray.create(scope, local, base, bound);
@@ -743,10 +732,9 @@ public class WSDLToIDLAction {
return idlType;
}
- private IdlType createAnonArray(CorbaTypeImpl ctype, IdlScopeBase scope,
String local)
+ private IdlType createAnonArray(Anonarray s, IdlScopeBase scope, String
local)
throws Exception {
IdlType idlType = null;
- Anonarray s = (Anonarray)ctype;
IdlType base = findType(s.getElemtype());
int bound = (int)s.getBound();
idlType = IdlAnonArray.create(scope, base, bound);
@@ -754,9 +742,8 @@ public class WSDLToIDLAction {
return idlType;
}
- private IdlType createFixed(CorbaTypeImpl ctype, IdlScopeBase scope,
String local) {
+ private IdlType createFixed(Fixed f, IdlScopeBase scope, String local) {
IdlType idlType = null;
- Fixed f = (Fixed)ctype;
Long digits = f.getDigits();
Long scale = f.getScale();
idlType = IdlFixed.create(scope, local, digits.intValue(),
@@ -765,9 +752,8 @@ public class WSDLToIDLAction {
return idlType;
}
- private IdlType createAnonFixed(CorbaTypeImpl ctype, IdlScopeBase scope,
String local) {
+ private IdlType createAnonFixed(Anonfixed f, IdlScopeBase scope, String
local) {
IdlType idlType = null;
- Anonfixed f = (Anonfixed)ctype;
Long digits = f.getDigits();
Long scale = f.getScale();
idlType = IdlAnonFixed.create(scope, digits.intValue(),
scale.intValue());
@@ -775,8 +761,7 @@ public class WSDLToIDLAction {
return idlType;
}
- private IdlType createEnum(CorbaTypeImpl ctype, IdlScopeBase scope, String
local) {
- Enum e = (Enum)ctype;
+ private IdlType createEnum(Enum e, IdlScopeBase scope, String local) {
IdlEnum enum1 = IdlEnum.create(scope, local);
Iterator<Enumerator> it = e.getEnumerator().iterator();
Modified:
cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLTypes.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLTypes.java?rev=1410458&r1=1410457&r2=1410458&view=diff
==============================================================================
---
cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLTypes.java
(original)
+++
cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLTypes.java
Fri Nov 16 16:49:13 2012
@@ -363,10 +363,10 @@ public final class WSDLTypes {
}
if (!boundedDecimal) {
- if (anonymous) {
+ if (anonymous && corbaTypeImpl instanceof Anonfixed) {
Anonfixed fixed = (Anonfixed)corbaTypeImpl;
digits = Integer.parseInt(String.valueOf(fixed.getDigits()));
- } else {
+ } else if (corbaTypeImpl instanceof Fixed) {
Fixed fixed = (Fixed)corbaTypeImpl;
digits = Integer.parseInt(String.valueOf(fixed.getDigits()));
}