From 29c70350480b559aeb77cd974aef608e7870894b Mon Sep 17 00:00:00 2001 From: Raffi Khatchadourian Date: Thu, 21 Dec 2017 16:31:00 -0500 Subject: [PATCH] Workaround #136. --- .../hunter/streamrefactoring/core/analysis/Stream.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/edu.cuny.hunter.streamrefactoring.core/src/edu/cuny/hunter/streamrefactoring/core/analysis/Stream.java b/edu.cuny.hunter.streamrefactoring.core/src/edu/cuny/hunter/streamrefactoring/core/analysis/Stream.java index 3cad251c..cf14a3a7 100644 --- a/edu.cuny.hunter.streamrefactoring.core/src/edu/cuny/hunter/streamrefactoring/core/analysis/Stream.java +++ b/edu.cuny.hunter.streamrefactoring.core/src/edu/cuny/hunter/streamrefactoring/core/analysis/Stream.java @@ -584,8 +584,11 @@ private void inferInitialOrdering() throws IOException, CoreException, ClassHier this.setInitialOrdering(Ordering.ORDERED); break; default: - throw new IllegalStateException( - "Unhandled expression type qualified name: " + expressionTypeQualifiedName); + // Fall back for now #136. + Ordering defaultOrdering = Ordering.ORDERED; + LOGGER.warning(() -> "Unhandled expression type qualified name: " + expressionTypeQualifiedName + + ". Falling back to: " + defaultOrdering + "."); + this.setInitialOrdering(defaultOrdering); } } else { // instance method. int valueNumber = getUseValueNumberForCreation(); @@ -611,7 +614,6 @@ private void inferInitialOrdering() throws IOException, CoreException, ClassHier // Possible types: check each one. calledMethod = (IMethod) calledMethodBinding.getJavaElement(); - ordering = this.getOrderingInference().inferOrdering(possibleTypes, calledMethod); } catch (NoniterableException e) { LOGGER.log(Level.WARNING, "Stream: " + this.getCreation()