From 2f0801d36f49e27ba51bce6c45667c259ae3870e Mon Sep 17 00:00:00 2001 From: Greg Burd Date: Thu, 9 Nov 2017 13:32:16 -0500 Subject: [PATCH] Fix test to see if select is of Fun type. --- .../helenus/core/operation/AbstractOptionalOperation.java | 3 ++- .../net/helenus/core/operation/AbstractStreamOperation.java | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/helenus/core/operation/AbstractOptionalOperation.java b/src/main/java/net/helenus/core/operation/AbstractOptionalOperation.java index 8afed96..6ca1595 100644 --- a/src/main/java/net/helenus/core/operation/AbstractOptionalOperation.java +++ b/src/main/java/net/helenus/core/operation/AbstractOptionalOperation.java @@ -100,7 +100,8 @@ public abstract class AbstractOptionalOperation resultClass = r.getClass(); + if (!(resultClass.getEnclosingClass() != null && resultClass.getEnclosingClass() == Fun.class)) { List facets = getFacets(); if (facets != null && facets.size() > 1) { sessionOps.updateCache(r, facets); diff --git a/src/main/java/net/helenus/core/operation/AbstractStreamOperation.java b/src/main/java/net/helenus/core/operation/AbstractStreamOperation.java index fb59dd4..be489d8 100644 --- a/src/main/java/net/helenus/core/operation/AbstractStreamOperation.java +++ b/src/main/java/net/helenus/core/operation/AbstractStreamOperation.java @@ -192,7 +192,10 @@ public abstract class AbstractStreamOperation facets = getFacets(); resultStream.forEach( result -> { - if (result != deleted && !(result instanceof Fun)) { + Class resultClass = result.getClass(); + if (result != deleted + && !(resultClass.getEnclosingClass() != null + && resultClass.getEnclosingClass() == Fun.class)) { cacheUpdate(uow, result, facets); } again.add(result);