This is an automated email from the ASF dual-hosted git repository.
andy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jena.git
The following commit(s) were added to refs/heads/master by this push:
new 5491252 Revert "Exception on promote-READ: Implement according to the
documentation."
5491252 is described below
commit 5491252bf81d030642f002cd7247733f2b7c1e37
Author: Andy Seaborne <[email protected]>
AuthorDate: Tue Feb 26 22:26:00 2019 +0000
Revert "Exception on promote-READ: Implement according to the
documentation."
This reverts commit 5d0c85a5733596f8d17b1ce98861f2df032c9b9b.
There is disagreement in the code about what are the right semantics.
---
jena-arq/src/main/java/org/apache/jena/sparql/core/Transactional.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/jena-arq/src/main/java/org/apache/jena/sparql/core/Transactional.java
b/jena-arq/src/main/java/org/apache/jena/sparql/core/Transactional.java
index f280aa7..d87460a 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/Transactional.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/Transactional.java
@@ -127,7 +127,7 @@ public interface Transactional
* transaction is still valid and in "read" mode. Any further calls to
* {@code promote()} will also return false.
* <p>
- * This method throws a {@link JenaTransactionException} exception if
there is an attempt to promote a "READ"
+ * This method throws an exception if there is an attempt to promote a
"READ"
* transaction.
*/
public default boolean promote() {
@@ -138,7 +138,7 @@ public interface Transactional
throw new JenaTransactionException("txnType");
switch(txnType) {
case WRITE : return true;
- case READ : throw new
JenaTransactionException("Attempt to promote a READ transaction");
+ case READ : return false;
case READ_PROMOTE : return promote(Promote.ISOLATED);
case READ_COMMITTED_PROMOTE : return
promote(Promote.READ_COMMITTED);
}