You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2020/10/20 07:03:19 UTC
[cxf] branch master updated: A few trivial fixes for code scanning
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/master by this push:
new b6ad5a7 A few trivial fixes for code scanning
b6ad5a7 is described below
commit b6ad5a736057acdb1e9d6e11a0b462f47c7e1f75
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Tue Oct 20 08:01:09 2020 +0100
A few trivial fixes for code scanning
---
.../org/apache/cxf/binding/corba/types/CorbaHandlerUtils.java | 4 ++--
.../main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java | 9 ++++++---
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaHandlerUtils.java b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaHandlerUtils.java
index adaacce..1cbe394 100644
--- a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaHandlerUtils.java
+++ b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaHandlerUtils.java
@@ -189,7 +189,7 @@ public final class CorbaHandlerUtils {
arrayBound = anonArrayType.getBound();
elementName = anonArrayType.getElemname();
}
- for (int i = 0; i < arrayBound; ++i) {
+ for (long i = 0; i < arrayBound; ++i) {
CorbaObjectHandler elementObj =
initializeObjectHandler(orb, elementName, arrayElementType, typeMap, serviceInfo,
seenTypes);
@@ -261,7 +261,7 @@ public final class CorbaHandlerUtils {
}
((CorbaSequenceHandler)obj).setTemplateElement(elementObj);
}
- for (int i = 0; i < seqBound; ++i) {
+ for (long i = 0; i < seqBound; ++i) {
CorbaObjectHandler elementObj = null;
// Check for a recursive type
diff --git a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
index 209d7c1..8f83be2 100644
--- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
+++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
@@ -1089,9 +1089,12 @@ public class ClientProxyImpl extends AbstractClient implements
Class<?> paramClass = method.getParameterTypes()[bodyIndex];
Class<?> bodyClass =
paramClass.isAssignableFrom(body.getClass()) ? paramClass : body.getClass();
- Type genericType = method.getGenericParameterTypes()[bodyIndex];
- if (bodyType != null) {
- genericType = bodyType;
+ Type genericType = bodyType;
+ if (genericType == null) {
+ Type[] genericParameterTypes = method.getGenericParameterTypes();
+ if (bodyIndex < genericParameterTypes.length) {
+ genericType = genericParameterTypes[bodyIndex];
+ }
}
genericType = InjectionUtils.processGenericTypeIfNeeded(
ori.getClassResourceInfo().getServiceClass(), bodyClass, genericType);