apache/spark — pull request #365 by zsxwing (2014-04-09 03:05:25+00:00)
Title: SPARK-1382: Fix NPE in DStream.slice

> If we call the DStream.slice() before StreamingContext.start() has been called, then zeroTime is still null, and it will throw a null pointer exception. Ideally, it should throw something like a "ContextNotInitlalized" exception.

https://issues.apache.org/jira/browse/SPARK-1382

This PR added a check in the `slice` and its unit test.