Skip to content

Commit 7fdda15

Browse files
authored
Merge pull request #1469 from petercla/master
Remove possible NPE
2 parents c17d487 + 519e7c8 commit 7fdda15

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

hystrix-core/src/main/java/com/netflix/hystrix/Hystrix.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,11 @@ public int size() {
189189
}
190190

191191
public E peek() {
192-
if (top.get() == null) {
192+
Node<E> eNode = top.get();
193+
if (eNode == null) {
193194
return null;
194195
} else {
195-
return top.get().item;
196+
return eNode.item;
196197
}
197198
}
198199

0 commit comments

Comments
 (0)