The integrated platform for monitoring & security
Observability
End-to-end, simplified visibility into your stack’s health & performance
製品
Applications
ログ管理
Security
Detect, prioritize, and respond to threats in real-time
Cloud Security
Application Security
Cloud SIEM
Digital Experience
Optimize front-end performance and enhance user experiences
Related Products
Software Delivery
Build, test, secure and ship quality code faster
Service Management
Integrated, streamlined workflows for faster time-to-resolution
AIOps
AI
Monitor and improve model performance. Pinpoint root causes and detect anomalies.
AI Observability
Platform Capabilities
Built-in features & integrations that power the Datadog platform
Built-in Features
Workflows & Collaboration
Extensibility
Industry
Technology
Use-case
Looking for Datadog logos?
You can find the logo assets on our press page.
ID: java-code-style/confusing-ternary
java-code-style/confusing-ternary
Language: Java
Severity: Notice
Category: Code Style
Using a negative comparison in if expressions with an else clause can be confusing. Consider modifying your comparison by switching your if and else` block statements.
if
else
public class Foo { String bar(int x, int y) { return (x != y) ? "diff" : "same"; } }
public class Foo { String bar(int x, int y) { return (x == y) ? "same" : "diff"; } }
Seamless integrations. Try Datadog Code Analysis
1 2
rulesets: - java-code-style # Rules to enforce Java code style.
For more information, please read the Code Analysis documentation
Identify code vulnerabilities directly in yourVS Code editor
Identify code vulnerabilities directly inJetBrains products