Skip to content

Commit 29c7035

Browse files
committed
Workaround #136.
1 parent c6f436c commit 29c7035

File tree

1 file changed

+5
-3
lines changed
  • edu.cuny.hunter.streamrefactoring.core/src/edu/cuny/hunter/streamrefactoring/core/analysis

1 file changed

+5
-3
lines changed

edu.cuny.hunter.streamrefactoring.core/src/edu/cuny/hunter/streamrefactoring/core/analysis/Stream.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -584,8 +584,11 @@ private void inferInitialOrdering() throws IOException, CoreException, ClassHier
584584
this.setInitialOrdering(Ordering.ORDERED);
585585
break;
586586
default:
587-
throw new IllegalStateException(
588-
"Unhandled expression type qualified name: " + expressionTypeQualifiedName);
587+
// Fall back for now #136.
588+
Ordering defaultOrdering = Ordering.ORDERED;
589+
LOGGER.warning(() -> "Unhandled expression type qualified name: " + expressionTypeQualifiedName
590+
+ ". Falling back to: " + defaultOrdering + ".");
591+
this.setInitialOrdering(defaultOrdering);
589592
}
590593
} else { // instance method.
591594
int valueNumber = getUseValueNumberForCreation();
@@ -611,7 +614,6 @@ private void inferInitialOrdering() throws IOException, CoreException, ClassHier
611614

612615
// Possible types: check each one.
613616
calledMethod = (IMethod) calledMethodBinding.getJavaElement();
614-
615617
ordering = this.getOrderingInference().inferOrdering(possibleTypes, calledMethod);
616618
} catch (NoniterableException e) {
617619
LOGGER.log(Level.WARNING, "Stream: " + this.getCreation()

0 commit comments

Comments
 (0)