stefanseifert commented on a change in pull request #1: Revert "SLING-7692
implement refresh(false)"
URL:
https://github.com/apache/sling-org-apache-sling-testing-jcr-mock/pull/1#discussion_r192657072
##########
File path: src/main/java/org/apache/sling/testing/mock/jcr/MockSession.java
##########
@@ -291,14 +288,14 @@ public void save() throws RepositoryException {
itemData.setIsNew(false);
itemData.setIsChanged(false);
}
- this.lastState = new HashMap<>(items);
+
hasKnownChanges = false;
}
@Override
public void refresh(final boolean keepChanges) throws RepositoryException {
if (!keepChanges){
- this.items = new HashMap<>(lastState);
+ throw new UnsupportedOperationException();
}
// do nothing
checkLive();
Review comment:
this checkLive() check should go before all other logic.
----------------------------------------------------------------
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]
With regards,
Apache Git Services