google / google/error-prone

Make PrivateConstructorForUtilityClass pass for non-exported class with main method

Open
#5,726 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
7.2k
Forks
820
Avg merge
5h 9m
Merged PRs (30d)
50

Description

Given a class with a main method and without instance methods:

when:

* either the class is within a module and is either non-public or not in an exported package
* or the class is not within a module and is non-public

and all static methods other than the main method, if any, are private,

then the check should pass.

The check is useful, so I want to enable it, but to me the above case qualifies as a false positive.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.