@@ -415,10 +415,12 @@ public Object execute(ExecutionEvent event) throws ExecutionException {
415415 resultsPrinter .print (nToUseForStreams );
416416
417417 // #streams.
418- resultsPrinter .print (processor .getStreamSet ().size ());
418+ Set <Stream > streamSet = processor .getStreamSet ();
419+ resultsPrinter .print (streamSet == null ? 0 : streamSet .size ());
419420
420421 // #optimization available streams. These are the "filtered" streams.
421- Set <Stream > candidates = processor .getStreamSet ().parallelStream ().filter (s -> {
422+ Set <Stream > candidates = streamSet == null ? Collections .emptySet ()
423+ : streamSet .parallelStream ().filter (s -> {
422424 String pluginId = FrameworkUtil .getBundle (Stream .class ).getSymbolicName ();
423425
424426 // error related to reachability.
@@ -444,7 +446,8 @@ public Object execute(ExecutionEvent event) throws ExecutionException {
444446 : stream .getEnclosingType ().getFullyQualifiedName ());
445447
446448 // stream attributes.
447- for (Stream stream : processor .getStreamSet ()) {
449+ if (streamSet != null )
450+ for (Stream stream : streamSet ) {
448451 streamAttributesPrinter .printRecord (javaProject .getElementName (), stream .getCreation (),
449452 stream .getCreation ().getStartPosition (), stream .getCreation ().getLength (),
450453 Util .getMethodIdentifier (stream .getEnclosingEclipseMethod ()),
@@ -463,8 +466,8 @@ public Object execute(ExecutionEvent event) throws ExecutionException {
463466 printStreamAttributesWithMultipleValues (stream .getPossibleExecutionModes (),
464467 streamExecutionModePrinter , stream , method , javaProject );
465468
466- printStreamAttributesWithMultipleValues (stream .getPossibleOrderings (), streamOrderingPrinter ,
467- stream , method , javaProject );
469+ printStreamAttributesWithMultipleValues (stream .getPossibleOrderings (),
470+ streamOrderingPrinter , stream , method , javaProject );
468471
469472 }
470473
@@ -523,20 +526,22 @@ public Object execute(ExecutionEvent event) throws ExecutionException {
523526
524527 // Refactoring type counts.
525528 for (Refactoring refactoring : Refactoring .values ())
526- resultsPrinter .print (processor .getStreamSet ().parallelStream ().map (Stream ::getRefactoring )
529+ resultsPrinter .print (streamSet == null ? 0
530+ : streamSet .parallelStream ().map (Stream ::getRefactoring )
527531 .filter (r -> Objects .equals (r , refactoring )).count ());
528532
529533 // Precondition success counts.
530534 for (PreconditionSuccess preconditionSuccess : PreconditionSuccess .values ())
531- resultsPrinter
532- . print ( processor . getStreamSet () .parallelStream ().map (Stream ::getPassingPrecondition )
535+ resultsPrinter . print ( streamSet == null ? 0
536+ : streamSet .parallelStream ().map (Stream ::getPassingPrecondition )
533537 .filter (pp -> Objects .equals (pp , preconditionSuccess )).count ());
534538
535539 // Transformation counts.
536540 for (TransformationAction action : TransformationAction .values ())
537- resultsPrinter .print (processor .getStreamSet ().parallelStream ().map (Stream ::getActions )
538- .filter (Objects ::nonNull ).flatMap (as -> as .parallelStream ())
539- .filter (a -> Objects .equals (a , action )).count ());
541+ resultsPrinter .print (streamSet == null ? 0
542+ : streamSet .parallelStream ().map (Stream ::getActions ).filter (Objects ::nonNull )
543+ .flatMap (as -> as .parallelStream ()).filter (a -> Objects .equals (a , action ))
544+ .count ());
540545
541546 // actually perform the refactoring if there are no fatal
542547 // errors.
0 commit comments