Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@Pil0tXia

Description

@Pil0tXia

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions