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

Access scope of BeanQueryBuilder is too strict #33

Merged
merged 3 commits into from
Sep 29, 2021

Conversation

garyparrot
Copy link
Collaborator

@garyparrot garyparrot commented Sep 28, 2021

  static class BeanQueryBuilder {
    public static BeanQueryBuilder builder(String domainName) { }
    public BeanQueryBuilder property(String key, String value) { }
    public BeanQueryBuilder usePropertyListPattern() { }
  }

之前寫程式的時候把 BeanQuery.BeanQueryBuilder 的 access scope 設定的太過嚴格,導致除了 org.astraea.metrics.jmx 這個 package 之外的程式碼都沒辦法呼叫

  • BeanQueryBuilder#property
  • BeanQueryBuilder#usePropertyListPattern
  • BeanQueryBuilder#build

這三個函數。

這個 PR 會包含三個 Commit

  1. 內含一個 test, 反映這個錯誤真的存在, Github Action 應該會回報一個 build error
  2. 修正問題, 修改 BeanQueryBuilder 的 access scope 為 public
  3. revert 第一個 commit, 移除那個測試

之前的單元測試和我自己寫的測試 Code 都沒有發現這個問題,因為所有東西都寫在同一個 package

Expect Github CI to report this commit as a failure.

The class access scope of BeanQuery.BeanQueryBuild is too strict. Only
those code in the same package can use it.
This reverts commit 466cfab.
@chia7712 chia7712 merged commit 114b682 into opensource4you:main Sep 29, 2021
@garyparrot garyparrot deleted the fix-access-scope branch November 1, 2021 06:25
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.

2 participants