[
https://issues.apache.org/jira/browse/GEODE-3592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16246325#comment-16246325
]
ASF GitHub Bot commented on GEODE-3592:
---------------------------------------
dschneider-pivotal closed pull request #1026: GEODE-3592: remove getAnyInstance
call
URL: https://github.com/apache/geode/pull/1026
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/geode-core/src/test/java/org/apache/geode/internal/cache/CommitFunction.java
b/geode-core/src/test/java/org/apache/geode/internal/cache/CommitFunction.java
index 59ffe4447b..86cd9de60d 100644
---
a/geode-core/src/test/java/org/apache/geode/internal/cache/CommitFunction.java
+++
b/geode-core/src/test/java/org/apache/geode/internal/cache/CommitFunction.java
@@ -73,7 +73,8 @@ public boolean hasResult() {
}
public void execute(FunctionContext context) {
- Cache cache = CacheFactory.getAnyInstance();
+ Cache cache = context.getCache();
+ cache.getCancelCriterion().checkCancelInProgress(null);
TXId txId = null;
try {
txId = (TXId) context.getArguments();
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> CommitFunction.execute should not call CacheFactory.getAnyInstance
> ------------------------------------------------------------------
>
> Key: GEODE-3592
> URL: https://issues.apache.org/jira/browse/GEODE-3592
> Project: Geode
> Issue Type: Sub-task
> Components: transactions
> Reporter: Darrel Schneider
> Assignee: Darrel Schneider
>
> The execute method is passed an instance of FunctionContext which has a
> getCache method. So it should be easy to call getCache instead of
> getAnyInstance.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)