@@ -421,19 +421,19 @@ public Object execute(ExecutionEvent event) throws ExecutionException {
421
421
// #optimization available streams. These are the "filtered" streams.
422
422
Set <Stream > candidates = streamSet == null ? Collections .emptySet ()
423
423
: streamSet .parallelStream ().filter (s -> {
424
- String pluginId = FrameworkUtil .getBundle (Stream .class ).getSymbolicName ();
424
+ String pluginId = FrameworkUtil .getBundle (Stream .class ).getSymbolicName ();
425
425
426
- // error related to reachability.
427
- RefactoringStatusEntry reachabilityError = s .getStatus ().getEntryMatchingCode (pluginId ,
428
- PreconditionFailure .STREAM_CODE_NOT_REACHABLE .getCode ());
426
+ // error related to reachability.
427
+ RefactoringStatusEntry reachabilityError = s .getStatus ().getEntryMatchingCode (pluginId ,
428
+ PreconditionFailure .STREAM_CODE_NOT_REACHABLE .getCode ());
429
429
430
- // error related to missing entry points.
431
- RefactoringStatusEntry entryPointError = s .getStatus ().getEntryMatchingCode (pluginId ,
432
- PreconditionFailure .NO_ENTRY_POINT .getCode ());
430
+ // error related to missing entry points.
431
+ RefactoringStatusEntry entryPointError = s .getStatus ().getEntryMatchingCode (pluginId ,
432
+ PreconditionFailure .NO_ENTRY_POINT .getCode ());
433
433
434
- // filter streams without such errors.
435
- return reachabilityError == null && entryPointError == null ;
436
- }).collect (Collectors .toSet ());
434
+ // filter streams without such errors.
435
+ return reachabilityError == null && entryPointError == null ;
436
+ }).collect (Collectors .toSet ());
437
437
438
438
resultsPrinter .print (candidates .size ()); // number.
439
439
@@ -448,28 +448,28 @@ public Object execute(ExecutionEvent event) throws ExecutionException {
448
448
// stream attributes.
449
449
if (streamSet != null )
450
450
for (Stream stream : streamSet ) {
451
- streamAttributesPrinter .printRecord (javaProject .getElementName (), stream .getCreation (),
452
- stream .getCreation ().getStartPosition (), stream .getCreation ().getLength (),
453
- Util .getMethodIdentifier (stream .getEnclosingEclipseMethod ()),
454
- stream .getEnclosingType () == null ? null
455
- : stream .getEnclosingType ().getFullyQualifiedName (),
456
- stream .hasPossibleSideEffects (), stream .hasPossibleStatefulIntermediateOperations (),
457
- stream .reduceOrderingPossiblyMatters (), stream .getRefactoring (),
458
- stream .getPassingPrecondition (), stream .getStatus ().isOK () ? 0
459
- : stream .getStatus ().getEntryWithHighestSeverity ().getSeverity ());
451
+ streamAttributesPrinter .printRecord (javaProject .getElementName (), stream .getCreation (),
452
+ stream .getCreation ().getStartPosition (), stream .getCreation ().getLength (),
453
+ Util .getMethodIdentifier (stream .getEnclosingEclipseMethod ()),
454
+ stream .getEnclosingType () == null ? null
455
+ : stream .getEnclosingType ().getFullyQualifiedName (),
456
+ stream .hasPossibleSideEffects (), stream .hasPossibleStatefulIntermediateOperations (),
457
+ stream .reduceOrderingPossiblyMatters (), stream .getRefactoring (),
458
+ stream .getPassingPrecondition (), stream .getStatus ().isOK () ? 0
459
+ : stream .getStatus ().getEntryWithHighestSeverity ().getSeverity ());
460
460
461
- String method = Util .getMethodIdentifier (stream .getEnclosingEclipseMethod ());
461
+ String method = Util .getMethodIdentifier (stream .getEnclosingEclipseMethod ());
462
462
463
- printStreamAttributesWithMultipleValues (stream .getActions (), streamActionsPrinter , stream ,
464
- method , javaProject );
463
+ printStreamAttributesWithMultipleValues (stream .getActions (), streamActionsPrinter , stream ,
464
+ method , javaProject );
465
465
466
- printStreamAttributesWithMultipleValues (stream .getPossibleExecutionModes (),
467
- streamExecutionModePrinter , stream , method , javaProject );
466
+ printStreamAttributesWithMultipleValues (stream .getPossibleExecutionModes (),
467
+ streamExecutionModePrinter , stream , method , javaProject );
468
468
469
469
printStreamAttributesWithMultipleValues (stream .getPossibleOrderings (),
470
470
streamOrderingPrinter , stream , method , javaProject );
471
471
472
- }
472
+ }
473
473
474
474
// #optimizable streams.
475
475
Set <Stream > optimizableStreams = processor .getOptimizableStreams ();
@@ -528,7 +528,7 @@ public Object execute(ExecutionEvent event) throws ExecutionException {
528
528
for (Refactoring refactoring : Refactoring .values ())
529
529
resultsPrinter .print (streamSet == null ? 0
530
530
: streamSet .parallelStream ().map (Stream ::getRefactoring )
531
- .filter (r -> Objects .equals (r , refactoring )).count ());
531
+ .filter (r -> Objects .equals (r , refactoring )).count ());
532
532
533
533
// Precondition success counts.
534
534
for (PreconditionSuccess preconditionSuccess : PreconditionSuccess .values ())
@@ -545,7 +545,7 @@ public Object execute(ExecutionEvent event) throws ExecutionException {
545
545
546
546
// actually perform the refactoring if there are no fatal
547
547
// errors.
548
- if (EvaluateConvertToParallelStreamRefactoringHandler . shouldPerformChange ())
548
+ if (shouldPerformChange ())
549
549
if (!status .hasFatalError ()) {
550
550
resultsTimeCollector .start ();
551
551
Change change = new ProcessorBasedRefactoring (processor )
0 commit comments