openrewrite / openrewrite/rewrite-testing-frameworks

`TestsShouldNotBePublic` should reduce visibility if used elsewhere in Javadoc links

Open
#458 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
100
Forks
105
Avg merge
2h 25m
Merged PRs (30d)
9

Description

I applied TestsShouldNotBePublic to JabRef's code.

I get compile errors afterwards:

/home/runner/work/jabref/jabref/src/test/java/org/jabref/logic/bst/BstFunctionsTest.java:7: error: BstCaseChangersTest is not public in org.jabref.logic.bst.util; cannot be accessed from outside package
import org.jabref.logic.bst.util.BstCaseChangersTest;

I know, this is bad software design. However, I think, rewriting should not introduce compile errors.

Refs https://github.com/JabRef/jabref/pull/10797

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the TestsShouldNotBePublic recipe and the reported failure in src/test/java/org/jabref/logic/bst/BstFunctionsTest.java, including its import of BstCaseChangersTest. Check how visibility changes interact with references elsewhere and Javadoc links. Done means applying the recipe no longer introduces the reported compilation error while the intended visibility reduction still occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
43/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.