Aklakan commented on code in PR #2581:
URL: https://github.com/apache/jena/pull/2581#discussion_r1680036104
##########
jena-arq/src/main/java/org/apache/jena/http/sys/ExecUpdateHTTPBuilder.java:
##########
@@ -200,28 +296,35 @@ private void ensureContext() {
context = Context.create();
}
- private void ensureUpdateRequest() {
- if ( updateOperations == null )
- updateOperations = new UpdateRequest();
- }
-
public X build() {
Objects.requireNonNull(serviceURL, "No service URL");
- if ( updateOperations == null && updateString == null )
- throw new QueryException("No update for UpdateExecutionHTTP");
- if ( updateOperations != null && updateString != null )
- throw new InternalErrorException("UpdateRequest and update
string");
+ if ( updateEltAcc.isEmpty() )
+ throw new UpdateException("No update for UpdateExecutionHTTP");
Review Comment:
The original code used QueryException and I thought that it might have been
a copy/paste issue. Then again, QueryParseException is also re-used for parse
errors with update requests, so I am unsure what is the right choice here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]