Kingdom: Code Quality
Poor code quality leads to unpredictable behavior. From a user's perspective that often manifests itself as poor usability. For an attacker it provides an opportunity to stress the system in unexpected ways.
Code Correctness: Misleading Method Signature
Abstract
This looks like an effort to override a common .NET method, but it probably does not have the intended effect.
Explanation
This method's name is similar to a common .NET method name, but it is either spelled incorrectly or the argument list causes it to not override the intended method.
Example 1: The following method is meant to override
But since
Example 1: The following method is meant to override
System.Object.Equals()
:
public boolean Equals(string obj) {
...
}
But since
System.Object.Equals()
takes an argument of type object
, the method is never called.References
[1] Standards Mapping - Common Weakness Enumeration CWE ID 398
desc.structural.dotnet.code_correctness_misleading_method_signature
Abstract
This looks like an effort to override a common Java method, but it probably does not have the intended effect.
Explanation
This method's name is similar to a common Java method name, but it is either spelled incorrectly or the argument list causes it to not override the intended method.
Example 1: The following method is meant to override
But since
Example 1: The following method is meant to override
Object.equals()
:
public boolean equals(Object obj1, Object obj2) {
...
}
But since
Object.equals()
only takes a single argument, the method in Example 1
is never called.References
[1] Standards Mapping - Common Weakness Enumeration CWE ID 398
desc.structural.java.code_correctness_misleading_method_signature