Get Started
- CodeAnt AI
- Control Center
- Pull Request Review
- IDE
- Compliance
- Anti-Patterns
- Code Governance
- Infrastructure Security Database
- Application Security Database
- Apex
- Bash
- C
- Clojure
- Cpp
- Csharp
- Dockerfile
- Elixir
- Fingerprints
- Generic
- Go
- Html
- Java
- Android
- Aws-lambda
- Castor
- Java-jwt
- Jax-rs
- Jboss
- Jdo
- Jedis
- Jjwt
- Jsch
- Kryo
- Lang
- Audit
- Correctness
- Security
- Security
- Micronaut
- Mongo
- Mongodb
- Mysql
- Okhttp
- Rmi
- Servlets
- Spring
- Thymeleaf
- Xstream
- Javascript
- Json
- Kotlin
- Ocaml
- Php
- Problem-based-packs
- Python
- Ruby
- Rust
- Scala
- Solidity
- Swift
- Terraform
- Typescript
- Yaml
Lang
Correctness
$X == $X
or $X != $X
is always true. (Unless the value compared is a float or double). To test if $X
is not-a-number, use Double.isNaN($X)
.
This if statement will always have the same behavior and is therefore unnecessary.
Strings should not be compared with ’==’. This is a reference comparison operator. Use ‘.equals()’ instead.
The value of $X
is being ignored and will be used in the conditional test