Skip to content

Commit dd7a028

Browse files
committed
Fix ctor problem in other places.
1 parent c6ce476 commit dd7a028

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,10 @@ private String findStreamCreationMethod(TypeAbstraction typeAbstraction) {
9696
private String findStreamCreationMethod(IClass type) {
9797
Collection<com.ibm.wala.classLoader.IMethod> allMethods = type.getAllMethods();
9898
for (com.ibm.wala.classLoader.IMethod method : allMethods) {
99-
TypeReference returnType = method.getReturnType();
99+
TypeReference typeToCheck = Util.getEvaluationType(method);
100+
100101
// find the first one that returns a stream.
101-
if (Util.implementsBaseStream(returnType, this.getClassHierarchy()))
102+
if (Util.implementsBaseStream(typeToCheck, this.getClassHierarchy()))
102103
return method.getName().toString();
103104
}
104105

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,10 @@ private static Collection<? extends InstanceKey> getAdditionalNecessaryReceivers
272272
// who's the caller?
273273
LOGGER.fine(() -> "Called method is: " + calledMethod);
274274

275-
TypeReference returnType = calledMethod.getReturnType();
276-
LOGGER.fine(() -> "Return type is: " + returnType);
275+
TypeReference evaluationType = Util.getEvaluationType(calledMethod);
276+
LOGGER.fine(() -> "Evaluation type is: " + evaluationType);
277277

278-
boolean implementsBaseStream = Util.implementsBaseStream(returnType, hierarchy);
278+
boolean implementsBaseStream = Util.implementsBaseStream(evaluationType, hierarchy);
279279
LOGGER.fine(() -> "Is it a stream? " + implementsBaseStream);
280280

281281
if (implementsBaseStream) {

0 commit comments

Comments
 (0)