Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Unchecked call to a original type member #4459

Closed
2 of 3 tasks
Pil0tXia opened this issue Sep 24, 2023 · 0 comments · Fixed by #4506
Closed
2 of 3 tasks

[Bug] Unchecked call to a original type member #4459

Pil0tXia opened this issue Sep 24, 2023 · 0 comments · Fixed by #4506
Labels
bug Something isn't working

Comments

@Pil0tXia
Copy link
Member

Search before asking

  • I had searched in the issues and found no similar issues.

Environment

Windows

EventMesh version

master

What happened

image

How to reproduce

run org.apache.eventmesh.starter.StartUp

Debug logs

D:\Dev\eventmesh\eventmesh-runtime\src\main\java\org\apache\eventmesh\runtime\core\protocol\http\processor\inf\HttpRequestProcessor.java:58: 警告: [unchecked] 未经检查的转换
            HttpCommand response = req.createHttpCommandResponse(respHeader, (E) o);
                                                                                 ^
  需要: E
  找到:    Object
  其中, E,T是类型变量:
    E扩展已在方法 <T,E>completeResponse(HttpCommand,AsyncContext,T,EventMeshRetCode,String,Class<E>)中声明的Body
    T扩展已在方法 <T,E>completeResponse(HttpCommand,AsyncContext,T,EventMeshRetCode,String,Class<E>)中声明的Header
D:\Dev\eventmesh\eventmesh-runtime\src\main\java\org\apache\eventmesh\runtime\core\protocol\http\processor\inf\HttpRequestProcessor.java:59: 警告: [unchecked] 对作为原始类型AsyncContext的成员的onComplete(T)的调用未经过检查
            asyncContext.onComplete(response);
                                   ^
  其中, T是类型变量:
    T扩展已在类 AsyncContext中声明的Object
D:\Dev\eventmesh\eventmesh-metrics-plugin\eventmesh-metrics-prometheus\src\main\java\org\apache\eventmesh\metrics\prometheus\utils\PrometheusExporterUtils.java:54: 警告: [unchecked] 对作为原始类型Function的成员的apply(T)的调用未经过检查
                .setUpdater(result -> result.observe((long) getMetric.apply(summaryMetrics), Labels.empty()))
                                                                           ^
  其中, T,R是类型变量:
    T扩展已在接口 Function中声明的Object
    R扩展已在接口 Function中声明的Object

D:\Dev\eventmesh\eventmesh-metrics-plugin\eventmesh-metrics-prometheus\src\main\java\org\apache\eventmesh\metrics\prometheus\utils\PrometheusExporterUtils.java:60: 警告: [unchecked] 对作为原始类型Function的成员的apply(T)的调用未经过检查
                .setUpdater(result -> result.observe((double) getMetric.apply(summaryMetrics), Labels.empty()))
                                                                             ^
  其中, T,R是类型变量:
    T扩展已在接口 Function中声明的Object
    R扩展已在接口 Function中声明的Object
D:\Dev\eventmesh\eventmesh-security-plugin\eventmesh-security-auth-token\src\main\java\org\apache\eventmesh\auth\token\impl\auth\AuthTokenUtils.java:144: 警告: [unchecked] 未经检查的转换
        Set<String> groupTopics = (Set<String>) aclProperties.getExtendedField("topics");
                                                                              ^
  需要: java.util.Set<java.lang.String>
  找到:    java.lang.Object
D:\Dev\eventmesh\eventmesh-storage-plugin\eventmesh-storage-rocketmq\src\main\java\org\apache\eventmesh\storage\rocketmq\consumer\PushConsumerImpl.java:154: 警告: [deprecation] DefaultMQPushConsumer中的getDefaultMQPushConsumerImpl()已过时
            .getDefaultMQPushConsumerImpl().getConsumeMessageService();
            ^

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
1 participant