--- a/jdk/src/share/classes/java/util/stream/AbstractPipeline.java Wed Jul 16 08:07:38 2014 -0400
+++ b/jdk/src/share/classes/java/util/stream/AbstractPipeline.java Wed Jul 16 14:35:48 2014 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -322,6 +322,7 @@
@Override
@SuppressWarnings("unchecked")
public S onClose(Runnable closeHandler) {
+ Objects.requireNonNull(closeHandler);
Runnable existingHandler = sourceStage.sourceCloseAction;
sourceStage.sourceCloseAction =
(existingHandler == null)
@@ -406,7 +407,7 @@
// Clear the short circuit flag for next pipeline stage
// This stage encapsulates short-circuiting, the next
// stage may not have any short-circuit operations, and
- // if so spliterator.forEachRemaining should be be used
+ // if so spliterator.forEachRemaining should be used
// for traversal
thisOpFlags = thisOpFlags & ~StreamOpFlag.IS_SHORT_CIRCUIT;
}