Skip to content

Commit

Permalink
Merge pull request #1587 from danieldietrich/fix-list-remove
Browse files Browse the repository at this point in the history
NullPointer Exception could occur on equals call.
  • Loading branch information
danieldietrich authored Sep 25, 2016
2 parents 1227413 + 100cce9 commit 8d1398c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion javaslang/src/main/java/javaslang/collection/List.java
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ default List<T> remove(T element) {
boolean found = false;
while (!found && !result.isEmpty()) {
final T head = result.head();
if (head.equals(element)) {
if (Objects.equals(head, element)) {
found = true;
} else {
preceding.addFirst(head);
Expand Down

0 comments on commit 8d1398c

Please sign in to comment.