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

添加两个规则 #592

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

添加两个规则 #592

wants to merge 2 commits into from

Conversation

leonard99559
Copy link

  1. 只要重写equals,就必须重写hashCode
  2. 相同参数类型,相同业务含义,才可以使用Java的可变参数,避免使用Object

2. 相同参数类型,相同业务含义,才可以使用Java的可变参数,避免使用Object
@CLAassistant
Copy link

CLAassistant commented Oct 16, 2019

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


libaoxu seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@fw8899
Copy link
Contributor

fw8899 commented Jan 19, 2020

Thanks for the contribution. We evaluated them and consider them acceptable, but following action are required:

  1. Please add unit test case for the new rules, both positive and negative cases should be covered, below is an example.
    image

  2. Could you please improve the violation message tip? or we do it after the PR is merged.

2. 完善提示tips
@leonard99559
Copy link
Author

@fw8899 Today's update:

  1. Added the unit test case.
  2. Improved the message tips.

@Yuyang105
Copy link
Contributor

@SeanCai 看一下哈

@XenoAmess
Copy link

XenoAmess commented Feb 9, 2021

我在我的TPM上已经使用这两条规则了。
反馈一下使用体验吧。
第一条:
这条很有意义,但是实现的并不是特别理想。如果在抽象父类中实现了equals,子类中重载了hashCode,这个规则会判定不合法,但是实际上是合法的
第二条:
这条规则实际使用时候发现是纯废物。正常情况下没人会写一个Object varargs入参来恶心自己,而如果写了 必然是逼不得已。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants