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

MetricEntity copyOf代码有一行重复 #1439

Closed
zlzl245437 opened this issue Apr 27, 2020 · 3 comments · Fixed by #1441
Closed

MetricEntity copyOf代码有一行重复 #1439

zlzl245437 opened this issue Apr 27, 2020 · 3 comments · Fixed by #1441
Labels
area/dashboard Issues or PRs about Sentinel Dashboard good first issue Good for newcomers

Comments

@zlzl245437
Copy link

zlzl245437 commented Apr 27, 2020

Issue Description

Type: bug report or feature request
bug report

Describe what happened (or what feature you want)

com.alibaba.csp.sentinel.dashboard.datasource.entity.MetricEntity
copyOf方法 两次调用 entity.setResource(oldEntity.getResource()); 代码重复,如下

    public static MetricEntity copyOf(MetricEntity oldEntity) {
        MetricEntity entity = new MetricEntity();
        entity.setId(oldEntity.getId());
        entity.setGmtCreate(oldEntity.getGmtCreate());
        entity.setGmtModified(oldEntity.getGmtModified());
        entity.setApp(oldEntity.getApp());
        entity.setTimestamp(oldEntity.getTimestamp());
        entity.setResource(oldEntity.getResource());
        entity.setPassQps(oldEntity.getPassQps());
        entity.setBlockQps(oldEntity.getBlockQps());
        entity.setSuccessQps(oldEntity.getSuccessQps());
        entity.setExceptionQps(oldEntity.getExceptionQps());
        entity.setRt(oldEntity.getRt());
        entity.setCount(oldEntity.getCount());
        entity.setResource(oldEntity.getResource());
        return entity;
    }

Describe what you expected to happen

How to reproduce it (as minimally and precisely as possible)

Tell us your environment

Anything else we need to know?

@sczyh30 sczyh30 added the area/dashboard Issues or PRs about Sentinel Dashboard label Apr 27, 2020
@sczyh30
Copy link
Member

sczyh30 commented Apr 27, 2020

Would you like to contribute a pull request to fix it?

@sczyh30 sczyh30 added the good first issue Good for newcomers label Apr 27, 2020
@ladixiu
Copy link

ladixiu commented Apr 27, 2020

entity.setResource(oldEntity.getResource());

@liuweiGit
Copy link

已提交到分支

liuweiGit pushed a commit to liuweiGit/Sentinel that referenced this issue Apr 29, 2020
CST11021 pushed a commit to CST11021/Sentinel that referenced this issue Nov 3, 2021
CST11021 pushed a commit to CST11021/Sentinel that referenced this issue Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dashboard Issues or PRs about Sentinel Dashboard good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants