Skip to content
This repository has been archived by the owner on Apr 1, 2019. It is now read-only.

Code quality fix - Silly equality checks should not be made. #53

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/us/monoid/json/JSONObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -1903,7 +1903,7 @@ String toString(int indentFactor, int indent) throws JSONException {
* If the value is or contains an invalid number.
*/
static String valueToString(Object value) throws JSONException {
if (value == null || value.equals(null)) {
if (value == null || value.equals("null")) {
return "null";
}
if (value instanceof JSONString) {
Expand Down Expand Up @@ -1955,7 +1955,7 @@ static String valueToString(Object value) throws JSONException {
* If the object contains an invalid number.
*/
static String valueToString(Object value, int indentFactor, int indent) throws JSONException {
if (value == null || value.equals(null)) {
if (value == null || value.equals("null")) {
return "null";
}
try {
Expand Down