Skip to content

Commit d53136f

Browse files
asalgajbuck
authored andcommitted
Added fix for testing string with null, added test.
1 parent 308591d commit d53136f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

processing.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9373,8 +9373,7 @@
93739373
return subject.equals.apply(subject, removeFirstArgument(arguments));
93749374
}
93759375

9376-
// TODO use virtEquals for HashMap here
9377-
return subject.valueOf() === other.valueOf();
9376+
return virtEquals(subject, other);
93789377
};
93799378
/**
93809379
* The __equalsIgnoreCase() function compares two strings to see if they are the same.

test/unit/string_equals_null.pde

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
String test = "test";
2+
String nullTest = null;
3+
_checkEqual(test.equals(nullTest), false);

0 commit comments

Comments
 (0)