From de2d37b38ce2448a53f97b98492d020f1e0e900c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 20:20:58 +0800 Subject: [PATCH 1/8] Bump org.graalvm.buildtools:native-maven-plugin from 0.9.28 to 0.10.0 (#13740) Bumps [org.graalvm.buildtools:native-maven-plugin](https://github.com/graalvm/native-build-tools) from 0.9.28 to 0.10.0. - [Release notes](https://github.com/graalvm/native-build-tools/releases) - [Commits](https://github.com/graalvm/native-build-tools/compare/0.9.28...0.10.0) --- updated-dependencies: - dependency-name: org.graalvm.buildtools:native-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml | 2 +- dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml index 96c0cdce98b..63619aac098 100644 --- a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml +++ b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml @@ -232,7 +232,7 @@ org.graalvm.buildtools native-maven-plugin - 0.9.28 + 0.10.0 ${project.build.outputDirectory} diff --git a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml index 8ad1864a2ab..ac803d7fe25 100644 --- a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml +++ b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml @@ -229,7 +229,7 @@ org.graalvm.buildtools native-maven-plugin - 0.9.28 + 0.10.0 ${project.build.outputDirectory} From 22f9dd4cbd299897a7990b2e804485f2a9f18893 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Feb 2024 09:53:52 +0800 Subject: [PATCH 2/8] Bump com.alibaba.fastjson2:fastjson2 from 2.0.45 to 2.0.46 (#13739) Bumps [com.alibaba.fastjson2:fastjson2](https://github.com/alibaba/fastjson2) from 2.0.45 to 2.0.46. - [Release notes](https://github.com/alibaba/fastjson2/releases) - [Commits](https://github.com/alibaba/fastjson2/compare/2.0.45...2.0.46) --- updated-dependencies: - dependency-name: com.alibaba.fastjson2:fastjson2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index c09acad9ed1..d37b4a954c4 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -99,7 +99,7 @@ 4.5.14 4.4.16 1.2.83 - 2.0.45 + 2.0.46 3.7.0 5.1.0 2.12.0 From f6eddf70497fd7b80ab34520ddb8382be6daba65 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Feb 2024 09:53:59 +0800 Subject: [PATCH 3/8] Bump grpc.version from 1.61.0 to 1.61.1 (#13738) Bumps `grpc.version` from 1.61.0 to 1.61.1. Updates `io.grpc:grpc-core` from 1.61.0 to 1.61.1 - [Release notes](https://github.com/grpc/grpc-java/releases) - [Commits](https://github.com/grpc/grpc-java/compare/v1.61.0...v1.61.1) Updates `io.grpc:grpc-stub` from 1.61.0 to 1.61.1 - [Release notes](https://github.com/grpc/grpc-java/releases) - [Commits](https://github.com/grpc/grpc-java/compare/v1.61.0...v1.61.1) Updates `io.grpc:grpc-protobuf` from 1.61.0 to 1.61.1 - [Release notes](https://github.com/grpc/grpc-java/releases) - [Commits](https://github.com/grpc/grpc-java/compare/v1.61.0...v1.61.1) Updates `io.grpc:grpc-context` from 1.61.0 to 1.61.1 - [Release notes](https://github.com/grpc/grpc-java/releases) - [Commits](https://github.com/grpc/grpc-java/compare/v1.61.0...v1.61.1) Updates `io.grpc:grpc-netty-shaded` from 1.61.0 to 1.61.1 - [Release notes](https://github.com/grpc/grpc-java/releases) - [Commits](https://github.com/grpc/grpc-java/compare/v1.61.0...v1.61.1) Updates `io.grpc:grpc-netty` from 1.61.0 to 1.61.1 - [Release notes](https://github.com/grpc/grpc-java/releases) - [Commits](https://github.com/grpc/grpc-java/compare/v1.61.0...v1.61.1) Updates `io.grpc:grpc-grpclb` from 1.61.0 to 1.61.1 - [Release notes](https://github.com/grpc/grpc-java/releases) - [Commits](https://github.com/grpc/grpc-java/compare/v1.61.0...v1.61.1) --- updated-dependencies: - dependency-name: io.grpc:grpc-core dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.grpc:grpc-stub dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.grpc:grpc-protobuf dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.grpc:grpc-context dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.grpc:grpc-netty-shaded dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.grpc:grpc-netty dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.grpc:grpc-grpclb dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index d37b4a954c4..96432bbceff 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -134,7 +134,7 @@ 1.9.13 8.5.98 2.2.4 - 1.61.0 + 1.61.1 0.8.1 1.2.2 From 432518ec5023144e995862e4f7d2f7c7854a0212 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 18 Feb 2024 16:13:24 +0800 Subject: [PATCH 4/8] Bump org.testcontainers:testcontainers from 1.19.4 to 1.19.5 (#13755) Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.19.4 to 1.19.5. - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.4...1.19.5) --- updated-dependencies: - dependency-name: org.testcontainers:testcontainers dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-config/dubbo-config-api/pom.xml | 2 +- dubbo-dependencies-bom/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dubbo-config/dubbo-config-api/pom.xml b/dubbo-config/dubbo-config-api/pom.xml index 6bfb7c2f140..b9e740597c2 100644 --- a/dubbo-config/dubbo-config-api/pom.xml +++ b/dubbo-config/dubbo-config-api/pom.xml @@ -236,7 +236,7 @@ org.testcontainers testcontainers - 1.19.4 + 1.19.5 test diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index 96432bbceff..66694e28aaf 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -153,7 +153,7 @@ 2.2.7 1.2.0 - 1.19.4 + 1.19.5 3.2.13 1.6.13 From caed64b2a6e3e4113350dca27f931c129d211dff Mon Sep 17 00:00:00 2001 From: Albumen Kevin Date: Mon, 19 Feb 2024 10:00:19 +0800 Subject: [PATCH 5/8] Fix #13750, ConsistentHashLoadBalance not base on arguments (#13753) --- .../ConsistentHashLoadBalance.java | 8 ++--- .../ConsistentHashLoadBalanceTest.java | 33 +++++++++++++++++++ 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalance.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalance.java index 7fdfd8f79b0..fb777ef03a8 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalance.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalance.java @@ -97,12 +97,10 @@ private static final class ConsistentHashSelector { } public Invoker select(Invocation invocation) { - byte[] digest = Bytes.getMD5(RpcUtils.getMethodName(invocation)); - return selectForKey(hash(digest, 0)); - } + String key = toKey(RpcUtils.getArguments(invocation)); - private String toKey(Object[] args, boolean isGeneric) { - return isGeneric ? toKey((Object[]) args[1]) : toKey(args); + byte[] digest = Bytes.getMD5(key); + return selectForKey(hash(digest, 0)); } private String toKey(Object[] args) { diff --git a/dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalanceTest.java b/dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalanceTest.java index 64641a57984..9e7c3cd2c26 100644 --- a/dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalanceTest.java +++ b/dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalanceTest.java @@ -17,6 +17,7 @@ package org.apache.dubbo.rpc.cluster.loadbalance; import org.apache.dubbo.common.URL; +import org.apache.dubbo.rpc.Invocation; import org.apache.dubbo.rpc.Invoker; import org.apache.dubbo.rpc.cluster.LoadBalance; import org.apache.dubbo.rpc.cluster.RouterChain; @@ -25,11 +26,15 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicLong; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import static org.mockito.BDDMockito.given; +import static org.mockito.Mockito.mock; + @SuppressWarnings("rawtypes") class ConsistentHashLoadBalanceTest extends LoadBalanceBaseTest { @@ -45,6 +50,34 @@ void testConsistentHashLoadBalanceInGenericCall() { Assertions.assertEquals(hitted, genericHitted, "hitted should equals to genericHitted"); } + @Test + void testArgumentMatchAll() { + Map counter = new ConcurrentHashMap(); + LoadBalance lb = getLoadBalance(ConsistentHashLoadBalance.NAME); + for (Invoker invoker : invokers) { + counter.put(invoker, new AtomicLong(0)); + } + URL url = invokers.get(0).getUrl(); + + for (int i = 0; i < 1000; i++) { + Invocation invocation = mock(Invocation.class); + String methodName = "method1"; + given(invocation.getMethodName()).willReturn("$invoke"); + String[] paraTypes = new String[] {String.class.getName(), String.class.getName(), String.class.getName()}; + Object[] argsObject = new Object[] {"arg" + i, "arg2", "arg3"}; + Object[] args = new Object[] {methodName, paraTypes, argsObject}; + given(invocation.getArguments()).willReturn(args); + + for (int j = 0; j < 5; j++) { + Invoker sinvoker = lb.select(invokers, url, invocation); + counter.get(sinvoker).incrementAndGet(); + } + } + for (Invoker invoker : invokers) { + Assertions.assertTrue(counter.get(invoker).get() > 0); + } + } + private Invoker findHitted(Map invokerCounter) { Invoker invoker = null; From 97d5563990c5adea97c01fd6719bb481202d3a49 Mon Sep 17 00:00:00 2001 From: Albumen Kevin Date: Fri, 23 Feb 2024 15:17:10 +0800 Subject: [PATCH 6/8] Fix ut failure --- .../dubbo/remoting/transport/netty4/api/EmptyWireProtocol.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dubbo-remoting/dubbo-remoting-netty4/src/test/java/org/apache/dubbo/remoting/transport/netty4/api/EmptyWireProtocol.java b/dubbo-remoting/dubbo-remoting-netty4/src/test/java/org/apache/dubbo/remoting/transport/netty4/api/EmptyWireProtocol.java index 2943b64a9f6..09c9395b80b 100644 --- a/dubbo-remoting/dubbo-remoting-netty4/src/test/java/org/apache/dubbo/remoting/transport/netty4/api/EmptyWireProtocol.java +++ b/dubbo-remoting/dubbo-remoting-netty4/src/test/java/org/apache/dubbo/remoting/transport/netty4/api/EmptyWireProtocol.java @@ -17,11 +17,13 @@ package org.apache.dubbo.remoting.transport.netty4.api; import org.apache.dubbo.common.URL; +import org.apache.dubbo.common.extension.Activate; import org.apache.dubbo.remoting.api.ProtocolDetector; import org.apache.dubbo.remoting.api.WireProtocol; import org.apache.dubbo.remoting.api.pu.ChannelOperator; import org.apache.dubbo.remoting.api.ssl.ContextOperator; +@Activate public class EmptyWireProtocol implements WireProtocol { @Override public ProtocolDetector detector() { From 044a775373f91b7a24dc8f62d9d5fea825ce0fab Mon Sep 17 00:00:00 2001 From: Sean Yang Date: Mon, 26 Feb 2024 10:05:51 +0800 Subject: [PATCH 7/8] fix(rest): Fix rest convert error (#13783) --- .../rest/support/jaxrs/JaxrsRestToolKit.java | 14 +++++++++ .../MultivaluedMapCreationConverter.java | 31 ------------------- .../org.apache.dubbo.common.convert.Converter | 1 - .../rest/argument/GeneralTypeConverter.java | 14 ++------- 4 files changed, 17 insertions(+), 43 deletions(-) delete mode 100644 dubbo-plugin/dubbo-rest-jaxrs/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/jaxrs/MultivaluedMapCreationConverter.java delete mode 100644 dubbo-plugin/dubbo-rest-jaxrs/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.common.convert.Converter diff --git a/dubbo-plugin/dubbo-rest-jaxrs/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/jaxrs/JaxrsRestToolKit.java b/dubbo-plugin/dubbo-rest-jaxrs/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/jaxrs/JaxrsRestToolKit.java index 85e66b21e42..95ef839b87d 100644 --- a/dubbo-plugin/dubbo-rest-jaxrs/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/jaxrs/JaxrsRestToolKit.java +++ b/dubbo-plugin/dubbo-rest-jaxrs/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/jaxrs/JaxrsRestToolKit.java @@ -23,6 +23,9 @@ import org.apache.dubbo.rpc.protocol.tri.rest.mapping.meta.ParameterMeta; import org.apache.dubbo.rpc.protocol.tri.rest.util.DefaultRestToolKit; +import javax.ws.rs.core.MultivaluedHashMap; +import javax.ws.rs.core.MultivaluedMap; + final class JaxrsRestToolKit extends DefaultRestToolKit { private final BeanArgumentBinder binder; @@ -32,6 +35,17 @@ public JaxrsRestToolKit(FrameworkModel frameworkModel) { binder = new BeanArgumentBinder(frameworkModel); } + @Override + public Object convert(Object value, ParameterMeta parameter) { + if (MultivaluedMap.class.isAssignableFrom(parameter.getType())) { + if (value instanceof MultivaluedMap) { + return value; + } + return typeConverter.convert(value, MultivaluedHashMap.class); + } + return super.convert(value, parameter); + } + @Override public int getDialect() { return RestConstants.DIALECT_JAXRS; diff --git a/dubbo-plugin/dubbo-rest-jaxrs/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/jaxrs/MultivaluedMapCreationConverter.java b/dubbo-plugin/dubbo-rest-jaxrs/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/jaxrs/MultivaluedMapCreationConverter.java deleted file mode 100644 index eb9e9df3c8b..00000000000 --- a/dubbo-plugin/dubbo-rest-jaxrs/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/jaxrs/MultivaluedMapCreationConverter.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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 org.apache.dubbo.rpc.protocol.tri.rest.support.jaxrs; - -import org.apache.dubbo.common.convert.Converter; - -import javax.ws.rs.core.MultivaluedHashMap; -import javax.ws.rs.core.MultivaluedMap; - -@SuppressWarnings("rawtypes") -public class MultivaluedMapCreationConverter implements Converter { - - @Override - public MultivaluedMap convert(Integer source) { - return new MultivaluedHashMap<>(source); - } -} diff --git a/dubbo-plugin/dubbo-rest-jaxrs/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.common.convert.Converter b/dubbo-plugin/dubbo-rest-jaxrs/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.common.convert.Converter deleted file mode 100644 index 1af72a984d2..00000000000 --- a/dubbo-plugin/dubbo-rest-jaxrs/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.common.convert.Converter +++ /dev/null @@ -1 +0,0 @@ -integer-to-multi-valued-map=org.apache.dubbo.rpc.protocol.tri.rest.support.jaxrs.MultivaluedMapCreationConverter diff --git a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/argument/GeneralTypeConverter.java b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/argument/GeneralTypeConverter.java index 995334da7f4..ee9fb152218 100644 --- a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/argument/GeneralTypeConverter.java +++ b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/argument/GeneralTypeConverter.java @@ -730,11 +730,11 @@ protected Object customConvert(Object source, Type targetType) { } protected Collection customCreateCollection(Class targetClass, int size) { - return null; + return converterUtil == null ? null : (Collection) converterUtil.convertIfPossible(size, targetClass); } - private Map customCreateMap(Class targetClass, int size) { - return null; + protected Map customCreateMap(Class targetClass, int size) { + return converterUtil == null ? null : (Map) converterUtil.convertIfPossible(size, targetClass); } private Collection createCollection(Class targetClass, int size) { @@ -792,10 +792,6 @@ private Collection createCollection(Class targetClass, int size) { if (collection != null) { return collection; } - collection = (Collection) converterUtil.convertIfPossible(size, targetClass); - if (collection != null) { - return collection; - } if (targetClass.isAssignableFrom(ArrayList.class)) { return new ArrayList<>(size); } @@ -934,10 +930,6 @@ private Map createMap(Class targetClass, int size) { if (map != null) { return map; } - map = (Map) converterUtil.convertIfPossible(size, targetClass); - if (map != null) { - return map; - } if (targetClass.isAssignableFrom(LinkedHashMap.class)) { return CollectionUtils.newLinkedHashMap(size); } From 0fa88a118076f51d9b693cd5ad740898a8081bea Mon Sep 17 00:00:00 2001 From: Sean Yang Date: Mon, 26 Feb 2024 16:39:14 +0800 Subject: [PATCH 8/8] Fix compilation error of YamlCodec in jdk1.8 (#13791) --- .../dubbo/remoting/http12/message/codec/YamlCodec.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dubbo-remoting/dubbo-remoting-http12/src/main/java/org/apache/dubbo/remoting/http12/message/codec/YamlCodec.java b/dubbo-remoting/dubbo-remoting-http12/src/main/java/org/apache/dubbo/remoting/http12/message/codec/YamlCodec.java index 2b3aacfb5cb..30380eb1599 100644 --- a/dubbo-remoting/dubbo-remoting-http12/src/main/java/org/apache/dubbo/remoting/http12/message/codec/YamlCodec.java +++ b/dubbo-remoting/dubbo-remoting-http12/src/main/java/org/apache/dubbo/remoting/http12/message/codec/YamlCodec.java @@ -36,12 +36,13 @@ import org.yaml.snakeyaml.constructor.Constructor; import org.yaml.snakeyaml.representer.Representer; +@SuppressWarnings({"unchecked", "rawtypes"}) public class YamlCodec implements HttpMessageCodec { @Override public Object decode(InputStream is, Class targetType, Charset charset) throws DecodeException { try (InputStreamReader reader = new InputStreamReader(is, charset)) { - return createYaml().loadAs(reader, targetType); + return createYaml().loadAs(reader, (Class) targetType); } catch (Throwable t) { throw new DecodeException("Error decoding yaml", t); } @@ -57,7 +58,7 @@ public Object[] decode(InputStream is, Class[] targetTypes, Charset charset) for (int i = 0; i < len; i++) { if (iterator.hasNext()) { Object result = iterator.next(); - Class targetType = targetTypes[i]; + Class targetType = targetTypes[i]; if (targetType.isInstance(result)) { results[i] = result; } else {