Comments (4)
equals(null) seems to be a bad style on its own - for me it is better to write "== null"
from checkstyle.
Moreover - there is only two possible outcomes of this code - "equals(null)" - false and NPE.
from checkstyle.
yes it is not a very good but it it not different from example in Doc:
should be refactored to:
String nullString = null;
"My_Sweet_String".equals(nullString);
read it as ""My_Sweet_String".equals(null);"
so should not be a problem, just to be consistent in validation. @isopov , does it make sense ?
from checkstyle.
After discussion, we decided to not implement this, as null is kind of Literal, and developer have to do variable == null.
from checkstyle.
Related Issues (20)
- Reconsider tokens in IllegalTokenText module for google_checks.xml
- LeftCurly brace indentation mismatch HOT 11
- RequireEmptyLineBeforeBlockTagGroup bug HOT 2
- Irrelevant Check inputs HOT 5
- upadat example in javadoc for EMBEDDED_EXPRESSION* tokens HOT 7
- Dependency conflict with guava In gradle when compiling with checkstyle gradle plugin 10.12.7 HOT 3
- GenericWhitespace Check ignores exception to the ">" rule for succeeding whitespaces HOT 3
- Expanding maxmem to resolve OOM Exception (Checker checks) HOT 4
- Fix the violations in Release notes HOT 3
- broken maven-enforcer configuration HOT 12
- Unnecessary Input File found HOT 4
- Mutation
- checker-framework.yml should be able to fail execution if report generation is failed HOT 7
- new check: ConstructorsDeclarationGrouping to check the order of overloaded constructors HOT 39
- HideUtilityClassConstructor - Add option to skip validation based on list of annotations HOT 3
- AbstractXpathTestSupport does not support generating multiple xpath suppressions HOT 23
- Rename Java Input files and test methods to specify Test functionality HOT 25
- Issue with CircleCI xwiki HOT 3
- OpenJDK 21 Syntax Related Check Updates HOT 8
- Parse error when Javadoc contains @snippet with code example that uses Java annotation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from checkstyle.