You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/11/05 14:07:26 UTC
[GitHub] [dubbo-hessian-lite] tianshuang opened a new pull request, #63: Support deserialization of nested generics (Byte/Short)
tianshuang opened a new pull request, #63:
URL: https://github.com/apache/dubbo-hessian-lite/pull/63
Support deserialization of nested generics (Byte/Short), such as `List<Byte>` and `List<Short>`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-hessian-lite] codecov-commenter commented on pull request #63: Support deserialization of nested generics (Byte/Short)
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #63:
URL: https://github.com/apache/dubbo-hessian-lite/pull/63#issuecomment-1304555689
# [Codecov](https://codecov.io/gh/apache/dubbo-hessian-lite/pull/63?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#63](https://codecov.io/gh/apache/dubbo-hessian-lite/pull/63?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (34944d3) into [master](https://codecov.io/gh/apache/dubbo-hessian-lite/commit/b8d2a8ecdf2ee589c7250dced19eafc7c6bed674?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b8d2a8e) will **decrease** coverage by `0.27%`.
> The diff coverage is `61.85%`.
```diff
@@ Coverage Diff @@
## master #63 +/- ##
============================================
- Coverage 27.77% 27.49% -0.28%
+ Complexity 561 553 -8
============================================
Files 93 94 +1
Lines 6485 6411 -74
Branches 1077 1027 -50
============================================
- Hits 1801 1763 -38
+ Misses 4449 4430 -19
+ Partials 235 218 -17
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-hessian-lite/pull/63?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ba/com/caucho/hessian/io/AbstractDeserializer.java](https://codecov.io/gh/apache/dubbo-hessian-lite/pull/63/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9jb20vY2F1Y2hvL2hlc3NpYW4vaW8vQWJzdHJhY3REZXNlcmlhbGl6ZXIuamF2YQ==) | `20.58% <0.00%> (ø)` | |
| [...ba/com/caucho/hessian/io/AbstractHessianInput.java](https://codecov.io/gh/apache/dubbo-hessian-lite/pull/63/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9jb20vY2F1Y2hvL2hlc3NpYW4vaW8vQWJzdHJhY3RIZXNzaWFuSW5wdXQuamF2YQ==) | `7.69% <ø> (ø)` | |
| [...m/alibaba/com/caucho/hessian/io/Hessian2Input.java](https://codecov.io/gh/apache/dubbo-hessian-lite/pull/63/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9jb20vY2F1Y2hvL2hlc3NpYW4vaW8vSGVzc2lhbjJJbnB1dC5qYXZh) | `22.50% <42.85%> (+0.41%)` | :arrow_up: |
| [...om/alibaba/com/caucho/hessian/io/HessianInput.java](https://codecov.io/gh/apache/dubbo-hessian-lite/pull/63/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9jb20vY2F1Y2hvL2hlc3NpYW4vaW8vSGVzc2lhbklucHV0LmphdmE=) | `21.71% <68.18%> (+0.12%)` | :arrow_up: |
| [.../com/alibaba/com/caucho/hessian/util/TypeUtil.java](https://codecov.io/gh/apache/dubbo-hessian-lite/pull/63/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9jb20vY2F1Y2hvL2hlc3NpYW4vdXRpbC9UeXBlVXRpbC5qYXZh) | `69.23% <69.23%> (ø)` | |
| [...ibaba/com/caucho/hessian/io/SerializerFactory.java](https://codecov.io/gh/apache/dubbo-hessian-lite/pull/63/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9jb20vY2F1Y2hvL2hlc3NpYW4vaW8vU2VyaWFsaXplckZhY3RvcnkuamF2YQ==) | `69.23% <70.00%> (+0.88%)` | :arrow_up: |
| [.../com/caucho/hessian/io/CollectionDeserializer.java](https://codecov.io/gh/apache/dubbo-hessian-lite/pull/63/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9jb20vY2F1Y2hvL2hlc3NpYW4vaW8vQ29sbGVjdGlvbkRlc2VyaWFsaXplci5qYXZh) | `70.21% <100.00%> (ø)` | |
| [...libaba/com/caucho/hessian/io/JavaDeserializer.java](https://codecov.io/gh/apache/dubbo-hessian-lite/pull/63/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9jb20vY2F1Y2hvL2hlc3NpYW4vaW8vSmF2YURlc2VyaWFsaXplci5qYXZh) | `55.11% <100.00%> (-3.04%)` | :arrow_down: |
| [...alibaba/com/caucho/hessian/io/MapDeserializer.java](https://codecov.io/gh/apache/dubbo-hessian-lite/pull/63/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9jb20vY2F1Y2hvL2hlc3NpYW4vaW8vTWFwRGVzZXJpYWxpemVyLmphdmE=) | `49.12% <100.00%> (ø)` | |
| [...ibaba/com/caucho/hessian/io/BasicDeserializer.java](https://codecov.io/gh/apache/dubbo-hessian-lite/pull/63/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9jb20vY2F1Y2hvL2hlc3NpYW4vaW8vQmFzaWNEZXNlcmlhbGl6ZXIuamF2YQ==) | `10.24% <0.00%> (-1.64%)` | :arrow_down: |
| ... and [3 more](https://codecov.io/gh/apache/dubbo-hessian-lite/pull/63/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-hessian-lite] tianshuang commented on pull request #63: Support deserialization of nested generics (Byte/Short)
Posted by GitBox <gi...@apache.org>.
tianshuang commented on PR #63:
URL: https://github.com/apache/dubbo-hessian-lite/pull/63#issuecomment-1363811212
Actually this is a bug fix, I discovered this bug two years ago, and this bug still exists until today, use [dubbo- samples-generic-invocation](https://github.com/tianshuang/dubbo-samples/tree/generic_invocation/1-basic/dubbo-samples-generic-invocation) can reproduce this bug. When the parameter type of the call is `List<Byte>` or `List<Short>`, because Hessian serializes the elements in the collection as integers, resulting in the deserialization of the elements in the collection to `Integer` type(in the case of not using the generic actual type), triggering a related type conversion exception:
```
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Byte
at org.apache.dubbo.samples.generic_invocation.impl.DemoServiceImpl.testByteList(DemoServiceImpl.java:33)
at org.apache.dubbo.samples.generic_invocation.impl.DemoServiceImplDubboWrap0.invokeMethod(DemoServiceImplDubboWrap0.java)
at org.apache.dubbo.rpc.proxy.javassist.JavassistProxyFactory$1.doInvoke(JavassistProxyFactory.java:71)
at org.apache.dubbo.rpc.proxy.AbstractProxyInvoker.invoke(AbstractProxyInvoker.java:99)
at org.apache.dubbo.config.invoker.DelegateProviderMetaDataInvoker.invoke(DelegateProviderMetaDataInvoker.java:55)
at org.apache.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:56)
at org.apache.dubbo.rpc.filter.ClassLoaderCallbackFilter.invoke(ClassLoaderCallbackFilter.java:38)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.rpc.protocol.dubbo.filter.TraceFilter.invoke(TraceFilter.java:78)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.rpc.filter.TokenFilter.invoke(TokenFilter.java:56)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.rpc.filter.TimeoutFilter.invoke(TimeoutFilter.java:46)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:99)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.rpc.filter.ExceptionFilter.invoke(ExceptionFilter.java:52)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.auth.filter.ProviderAuthFilter.invoke(ProviderAuthFilter.java:53)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.rpc.filter.ContextFilter.invoke(ContextFilter.java:131)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.rpc.filter.GenericFilter.invoke(GenericFilter.java:198)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.rpc.filter.ClassLoaderFilter.invoke(ClassLoaderFilter.java:54)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.rpc.filter.EchoFilter.invoke(EchoFilter.java:41)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.rpc.filter.ProfilerServerFilter.invoke(ProfilerServerFilter.java:58)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CallbackRegistrationInvoker.invoke(FilterChainBuilder.java:193)
at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:153)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:100)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:175)
at org.apache.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:51)
at org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:57)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.dubbo.common.threadlocal.InternalRunnable.run(InternalRunnable.java:41)
at java.lang.Thread.run(Thread.java:748)
```
```
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Short
at org.apache.dubbo.samples.generic_invocation.impl.DemoServiceImpl.testShortList(DemoServiceImpl.java:44)
at org.apache.dubbo.samples.generic_invocation.impl.DemoServiceImplDubboWrap0.invokeMethod(DemoServiceImplDubboWrap0.java)
at org.apache.dubbo.rpc.proxy.javassist.JavassistProxyFactory$1.doInvoke(JavassistProxyFactory.java:71)
at org.apache.dubbo.rpc.proxy.AbstractProxyInvoker.invoke(AbstractProxyInvoker.java:99)
at org.apache.dubbo.config.invoker.DelegateProviderMetaDataInvoker.invoke(DelegateProviderMetaDataInvoker.java:55)
at org.apache.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:56)
at org.apache.dubbo.rpc.filter.ClassLoaderCallbackFilter.invoke(ClassLoaderCallbackFilter.java:38)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.rpc.protocol.dubbo.filter.TraceFilter.invoke(TraceFilter.java:78)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.rpc.filter.TokenFilter.invoke(TokenFilter.java:56)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.rpc.filter.TimeoutFilter.invoke(TimeoutFilter.java:46)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:99)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.rpc.filter.ExceptionFilter.invoke(ExceptionFilter.java:52)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.auth.filter.ProviderAuthFilter.invoke(ProviderAuthFilter.java:53)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.rpc.filter.ContextFilter.invoke(ContextFilter.java:131)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.rpc.filter.GenericFilter.invoke(GenericFilter.java:198)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.rpc.filter.ClassLoaderFilter.invoke(ClassLoaderFilter.java:54)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.rpc.filter.EchoFilter.invoke(EchoFilter.java:41)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.rpc.filter.ProfilerServerFilter.invoke(ProfilerServerFilter.java:58)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:321)
at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CallbackRegistrationInvoker.invoke(FilterChainBuilder.java:193)
at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:153)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:100)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:175)
at org.apache.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:51)
at org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:57)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.dubbo.common.threadlocal.InternalRunnable.run(InternalRunnable.java:41)
at java.lang.Thread.run(Thread.java:748)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-hessian-lite] AlbumenJ commented on pull request #63: Support deserialization of nested generics (Byte/Short)
Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on PR #63:
URL: https://github.com/apache/dubbo-hessian-lite/pull/63#issuecomment-1305242242
Dubbo Hessian Lite is not ready to continue incorporating new features. Dubbo is migrating the serialization protocol to fastjson2, if there are new functions, please verify on fastjson2. Since there are so many changes to this PR, I'm afraid we won't be able to merge.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-hessian-lite] tianshuang commented on pull request #63: Support deserialization of nested generics (Byte/Short)
Posted by GitBox <gi...@apache.org>.
tianshuang commented on PR #63:
URL: https://github.com/apache/dubbo-hessian-lite/pull/63#issuecomment-1364009959
After installing hessian-lite SNAPSHOT locally, use [DecodeableRpcInvocationTest.java](https://github.com/apache/dubbo/commit/286f8e2acd6e3bb92217ea5caed78a81998a3ca8#diff-23d84e73b84974228b9b9eda15dcc2d90a8d4aa73dac6673ef0fa9fe547e1c24) for testing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-hessian-lite] tianshuang commented on pull request #63: Support deserialization of nested generics (Byte/Short)
Posted by GitBox <gi...@apache.org>.
tianshuang commented on PR #63:
URL: https://github.com/apache/dubbo-hessian-lite/pull/63#issuecomment-1364461172
Adaptation on Dubbo side: [Comparing apache:3.1...tianshuang:generic_invocation · apache/dubbo · GitHub](https://github.com/apache/dubbo/compare/3.1...tianshuang:dubbo:generic_invocation), all Dubbo tests have passed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org