Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 998D6200CF0 for ; Thu, 7 Sep 2017 11:37:56 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 985181609D1; Thu, 7 Sep 2017 09:37:56 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DBFC51609B8 for ; Thu, 7 Sep 2017 11:37:55 +0200 (CEST) Received: (qmail 86227 invoked by uid 500); 7 Sep 2017 09:37:54 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 86218 invoked by uid 99); 7 Sep 2017 09:37:54 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Sep 2017 09:37:54 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A70E0E7DFA; Thu, 7 Sep 2017 09:37:54 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: deki@apache.org To: commits@cxf.apache.org Date: Thu, 07 Sep 2017 09:37:54 -0000 Message-Id: <78f28ecac51b4428980de8df9d986f6b@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] cxf git commit: [CXF-7473] simplified code archived-at: Thu, 07 Sep 2017 09:37:56 -0000 Repository: cxf Updated Branches: refs/heads/master 1eedb232f -> e47f445ba [CXF-7473] simplified code Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/49a1c646 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/49a1c646 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/49a1c646 Branch: refs/heads/master Commit: 49a1c64647c042b3bde735160734a443f4806315 Parents: 1eedb23 Author: Dennis Kieselhorst Authored: Thu Sep 7 11:37:05 2017 +0200 Committer: Dennis Kieselhorst Committed: Thu Sep 7 11:37:05 2017 +0200 ---------------------------------------------------------------------- .../org/apache/cxf/jaxrs/provider/ProviderFactory.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/49a1c646/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java ---------------------------------------------------------------------- diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java index e21b5c1..9450f8e 100644 --- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java +++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java @@ -292,7 +292,7 @@ public abstract class ProviderFactory { boolean injectContext) { Class mapperClass = ClassHelper.getRealClass(bus, em.getProvider()); - Type[] types = null; + Type[] types; if (m != null && MessageUtils.getContextualBoolean(m, IGNORE_TYPE_VARIABLES)) { types = new Type[]{mapperClass}; } else { @@ -302,14 +302,13 @@ public abstract class ProviderFactory { if (t instanceof ParameterizedType) { ParameterizedType pt = (ParameterizedType)t; Type[] args = pt.getActualTypeArguments(); - for (int i = 0; i < args.length; i++) { - Type arg = args[i]; + for (Type arg : args) { if (arg instanceof TypeVariable) { - TypeVariable var = (TypeVariable)arg; + TypeVariable var = (TypeVariable) arg; Type[] bounds = var.getBounds(); boolean isResolved = false; - for (int j = 0; j < bounds.length; j++) { - Class cls = InjectionUtils.getRawType(bounds[j]); + for (Type bound : bounds) { + Class cls = InjectionUtils.getRawType(bound); if (cls != null && (cls == Object.class || cls.isAssignableFrom(expectedType))) { isResolved = true; break;