Comments (4)
不太能理解,实际参数类型和声明类型理论基类是一致的,换成声明类型就没问题了吗?(我理解如果按你的分析实际参数类型是Runnable声明类型是Callable,那么报错会发生在TtlCallable.get((Callable)parameterArray[0])
针对这个错误异常,TtlRunnable.get((Runnable)parameterArray[0])
既然已经生效,说明此处的parameterArray[0]
确实是一个Runnable
,那么即使没有启用ttl,这个也会有强转异常。
from jvm-sandbox-repeater.
不太能理解,实际参数类型和声明类型理论基类是一致的,换成声明类型就没问题了吗?(我理解如果按你的分析实际参数类型是Runnable声明类型是Callable,那么报错会发生在
TtlCallable.get((Callable)parameterArray[0])
针对这个错误异常,
TtlRunnable.get((Runnable)parameterArray[0])
既然已经生效,说明此处的parameterArray[0]
确实是一个Runnable
,那么即使没有启用ttl,这个也会有强转异常。
parameterArray[0] instanceOf Runnable
parameterArray[0] instanceOf Callable
都是True的情况会报错
SomeTask someTask = ...
// someTask 既是Callable, 也是Runnable
assert someTask instanceOf Callable
assert someTask instanceOf Runnable
// 用强转, 显式声明调用 ExecutorService.submit(Callable task)
executorService.submit((Callable) someTask); // repeater会报错
from jvm-sandbox-repeater.
OK,了解了,目前这种写法确实有问题,未考虑到同时实现两个的情况,有空的话帮忙提个PR。谢谢。
from jvm-sandbox-repeater.
Merged
from jvm-sandbox-repeater.
Related Issues (20)
- 一些不能mock的场景,请问是暂不支持还是我使用错误
- 开启单机模式,可以录制但无法回放 HOT 2
- 序列化异常
- repeater动态attach增强后,skywalking juc ttl传递失败
- 配置管理-推送404
- 演示项目启动后自动安装应用名、环境均为unknown的模块 HOT 1
- 获取插件路径时,存在不兼容windows平台问题;以及serverIp疑问。
- 泛化调用dubbo,ExtensionLoader无法获取Protocol类 HOT 1
- apache-http-client-plugin在抓取返回结果为二进制数据的http请求时,会造成上层业务代码拿到的responseBody数据错乱
- consider solving big body problem? HOT 1
- 有计划支持jdk17吗 HOT 5
- dubbo 录制的时候日志报错:no valid classloader found in routing 要怎么处理? HOT 1
- com.alibaba.jvm.sandbox.repeater.plugin.core.trace.Tracer#start(java.lang.String)为什么是非线程安全的?
- jvm-sandbox-repeater最新版本的依赖版本是多少?
- 流量录制与回放过程中若干优化建议
- install-local.sh的脚本中获取sandbox的地址有误 HOT 1
- 请问为什么请求和返回用hessian 序列化后再做一次 base64? HOT 1
- 多次调用reload,导致SubscribeSupporter被重复注册,客户端重复回放同一个请求
- 关于不同协议的流量重放支持 HOT 2
- 插件开发:hibernate的update方法及mybatis-plus部分版本的部分方法没有返回值,怎么设置拦截点呢 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jvm-sandbox-repeater.