You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every public class should be exposed for a deliberate reason. Public is an exception to the rule, not the norm.
Every non-final public class should be non-final for a deliberate reasons. Non-final public classes are an exception to the rule, not the norm.
Every public constructor on a class should be exposed for a deliberate reason. Static factory methods are always preferred. Public constructors should be an exception to the rule, not the norm.
These rules are a subset of the well-defined, proven ways to minimize the overhead in evolving the API of a library as well as preventing people from trying to do too many dumb things.
There are a lot of other things to look at as part of the public API (public methods, fields, package names, whether things are serializable, etc.) but the above three are the most critical in my opinion.
The text was updated successfully, but these errors were encountered:
These rules are a subset of the well-defined, proven ways to minimize the overhead in evolving the API of a library as well as preventing people from trying to do too many dumb things.
There are a lot of other things to look at as part of the public API (public methods, fields, package names, whether things are serializable, etc.) but the above three are the most critical in my opinion.
The text was updated successfully, but these errors were encountered: