All issues
Anti-pattern
Bug risk
Coverage
Documentation
Performance
Secrets
Security
Style
Type check
While it is acceptable for setters to throw exceptions, getters are simply expected to return a value. Throwing any exception is considered an antipattern and is not a recommended practice. It is recommended that you refactor your code accordingly.