Skip to content

Commit 0e3f954

Browse files
committed
Fix ctor problem in other places.
1 parent 6522584 commit 0e3f954

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
@@ -273,10 +273,10 @@ private static Collection<? extends InstanceKey> getAdditionalNecessaryReceivers
273273
// who's the caller?
274274
LOGGER.fine(() -> "Called method is: " + calledMethod);
275275

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

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

282282
if (implementsBaseStream) {

0 commit comments

Comments
 (0)