Skip to content

Commit

Permalink
GH-4304 formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
hmottestad committed Dec 8, 2022
1 parent 400e82d commit 79faae5
Show file tree
Hide file tree
Showing 19 changed files with 45 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ protected List<NameValuePair> getUpdateMethodParameters(QueryLanguage ql, String
/**
* Parse the response in a background thread. HTTP connections are dealt with in the {@link BackgroundTupleResult}
* or (in the error-case) in this method.
*
*
* @deprecated WeakReference<?> callerRef argument will be removed
*/
@Deprecated(since = "4.1.2")
Expand Down Expand Up @@ -790,7 +790,7 @@ private HttpResponse sendTupleQueryViaHttp(HttpUriRequest method, Set<QueryResul
/**
* Parse the response in a background thread. HTTP connections are dealt with in the {@link BackgroundGraphResult}
* or (in the error-case) in this method.
*
*
* @deprecated WeakReference<?> callerRef argument will be removed
*/
@Deprecated(since = "4.1.2")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* expressions to the required statement patterns. In this case, each projection element will have an additional
* {@link #getProjectionAlias() target name} that maps each projection variable name to one of {@code subject},
* {@code predicate}, {@code object} or {@code context}.
*
*
* @author Jeen Broekstra
*/
public class ProjectionElem extends AbstractQueryModelNode {
Expand All @@ -49,7 +49,7 @@ public ProjectionElem() {

/**
* Create a new {@link ProjectionElem} with a variable name.
*
*
* @param name The name of the projection element (typically the name of the variable in the select expressions).
* May not be <code>null</code>.
*/
Expand All @@ -60,7 +60,7 @@ public ProjectionElem(String name) {
/**
* Create a new {@link ProjectionElem} with a variable name and an additional mapped {@link #getProjectionAlias()
* target name}
*
*
* @param name The name of the projection element (typically the name of the variable in the select
* expressions). May not be <code>null</code>.
* @param targetName The name of the variable the projection element value should be mapped to, to produce the
Expand All @@ -74,7 +74,7 @@ public ProjectionElem(String name, String targetName) {

/**
* Get the name of the projection element (typically the name of the variable in the select expressions)
*
*
*/
public String getName() {
return name;
Expand All @@ -98,7 +98,7 @@ public void setSourceName(String sourceName) {

/**
* Set the name of the projection element (typically the name of the variable in the select expressions)
*
*
* @param name the projection variable name. May not be {@code null}.
*/
public void setName(String name) {
Expand All @@ -108,7 +108,7 @@ public void setName(String name) {
/**
* Get the alias the projection element value should be mapped to. Used in CONSTRUCT queries for mapping select
* expressions to statement patterns.
*
*
* @return an optionally empty projection alias.
*/
public Optional<String> getProjectionAlias() {
Expand All @@ -118,7 +118,7 @@ public Optional<String> getProjectionAlias() {
/**
* Set the alias the projection element value should be mapped to. Used in CONSTRUCT queries for mapping select
* expressions to statement patterns.
*
*
* @param alias the projection alias.
*/
public void setProjectionAlias(String alias) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Distribution License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/edl-v10.php
* http://www.eclipse.org/org/documents/edl-v10.php
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Distribution License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/edl-v10.php
* http://www.eclipse.org/org/documents/edl-v10.php
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ public void testUseInDeleteFromStatementPattern() throws Exception {
* GroupElem
* Count (Distinct)
* Var (name=p)
*
*
* @throws Exception
*/
@Test
Expand Down Expand Up @@ -904,7 +904,7 @@ public void testUpdateWithTripleRefEmptyHead() throws Exception {
Var (name=_anon_24e6f014_3e16_49f9_ad0f_ef6d8045bbe9, anonymous)
Var (name=_const_6a634a7_uri, value=urn:p, anonymous)
Var (name=_const_31_lit_5fc8fb17_0, value="1"^^<http://www.w3.org/2001/XMLSchema#integer>, anonymous)
Extension
ExtensionElem (_anon_24e6f014_3e16_49f9_ad0f_ef6d8045bbe9)
ValueExprTripleRef
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ public void parse(InputStream in) throws QueryResultParseException, TupleQueryRe

List<BindingSet> bindingSets = new CsvToBeanBuilder<BindingSet>(
new InputStreamReader(in, StandardCharsets.UTF_8)).withType(BindingSet.class)
.withMappingStrategy(strategy)
.build()
.parse();
.withMappingStrategy(strategy)
.build()
.parse();
List<String> bindingNames = strategy.getBindingNames();
handler.startQueryResult(bindingNames);
for (BindingSet bs : bindingSets) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
* // Ex 3: this method retrieves all statements that have no associated context in
* // the repository.
* // Observe that this is not equivalent to the previous method call.
* RepositoryConnection.getStatements(null, null, null, true, (Resource)null);
* RepositoryConnection.getStatements(null, null, null, true, (Resource) null);
*
* // Ex 4: this method adds a statement to the store. If the statement object
* // itself has a context (i.e. statement.getContext() != null) the statement is added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public void testParseBasicLiteralDatatype() throws RDFHandlerException, IOExcept
final ByteArrayInputStream bais = new ByteArrayInputStream(
("<http://www.v/dat/4b2-21> " + "<http://www.w3.org/20/ica#dtend> "
+ "\"2010\"^^<http://www.w3.org/2001/XMLSchema#integer> " + "<http://sin.siteserv.org/def/>.")
.getBytes());
.getBytes());
final TestRDFHandler rdfHandler = new TestRDFHandler();
parser.setRDFHandler(rdfHandler);
parser.parse(bais, "http://test.base.uri");
Expand Down Expand Up @@ -491,7 +491,7 @@ public void testStatementWithInvalidLiteralContentAndIgnoreValidation()
+ "<http://dbpedia.org/property/mandatofine> "
+ "\"1380.0\"^^<http://www.w3.org/2001/XMLSchema#int> "
+ "<http://it.wikipedia.org/wiki/Camillo_Benso,_conte_di_Cavour#absolute-line=20> .")
.getBytes());
.getBytes());
parser.getParserConfig().set(BasicParserSettings.VERIFY_DATATYPE_VALUES, false);
parser.getParserConfig().set(BasicParserSettings.FAIL_ON_UNKNOWN_DATATYPES, false);
parser.parse(bais, "http://base-uri");
Expand All @@ -506,7 +506,7 @@ public void testStatementWithInvalidLiteralContentAndStrictValidation()
+ "<http://dbpedia.org/property/mandatofine> "
+ "\"1380.0\"^^<http://www.w3.org/2001/XMLSchema#int> "
+ "<http://it.wikipedia.org/wiki/Camillo_Benso,_conte_di_Cavour#absolute-line=20> .")
.getBytes());
.getBytes());
parser.getParserConfig().set(BasicParserSettings.VERIFY_DATATYPE_VALUES, true);
parser.getParserConfig().set(BasicParserSettings.FAIL_ON_UNKNOWN_DATATYPES, true);
try {
Expand Down Expand Up @@ -601,7 +601,7 @@ private void verifyStatementWithInvalidDatatype(boolean useDatatypeVerification)
+ "<http://dbpedia.org/property/mandatofine> "
+ "\"1380.0\"^^<http://dbpedia.org/invalid/datatype/second> "
+ "<http://it.wikipedia.org/wiki/Camillo_Benso,_conte_di_Cavour#absolute-line=20> .")
.getBytes());
.getBytes());
parser.parse(bais, "http://base-uri");
rdfHandler.assertHandler(1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ synchronized public void clear(boolean inferred, Resource[] contexts) {

BulkByScrollResponse response = new DeleteByQueryRequestBuilder(clientProvider.getClient(),
DeleteByQueryAction.INSTANCE)
.filter(getQueryBuilder(null, null, null, inferred, contexts))
.abortOnVersionConflict(false)
.source(index)
.get();
.filter(getQueryBuilder(null, null, null, inferred, contexts))
.abortOnVersionConflict(false)
.source(index)
.get();

long deleted = response.getDeleted();
}
Expand Down Expand Up @@ -604,10 +604,10 @@ public synchronized boolean removeStatementsByQuery(Resource subj, IRI pred, Val

BulkByScrollResponse response = new DeleteByQueryRequestBuilder(clientProvider.getClient(),
DeleteByQueryAction.INSTANCE)
.filter(getQueryBuilder(subj, pred, obj, inferred, contexts))
.source(index)
.abortOnVersionConflict(false)
.get();
.filter(getQueryBuilder(subj, pred, obj, inferred, contexts))
.source(index)
.abortOnVersionConflict(false)
.get();

long deleted = response.getDeleted();
return deleted > 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class OverflowBenchmarkReal {
public void setup() {
((Logger) (LoggerFactory
.getLogger("org.eclipse.rdf4j.sail.lmdb.MemoryOverflowModel")))
.setLevel(ch.qos.logback.classic.Level.DEBUG);
.setLevel(ch.qos.logback.classic.Level.DEBUG);
}

public static void main(String[] args) throws RunnerException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class OverflowBenchmarkSynthetic {
public void setup() {
((Logger) (LoggerFactory
.getLogger("org.eclipse.rdf4j.sail.lmdbrdf.MemoryOverflowModel")))
.setLevel(ch.qos.logback.classic.Level.DEBUG);
.setLevel(ch.qos.logback.classic.Level.DEBUG);
}

public static void main(String[] args) throws RunnerException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class OverflowBenchmarkReal {
public void setup() {
((Logger) (LoggerFactory
.getLogger("org.eclipse.rdf4j.sail.nativerdf.MemoryOverflowModel")))
.setLevel(ch.qos.logback.classic.Level.DEBUG);
.setLevel(ch.qos.logback.classic.Level.DEBUG);
}

public static void main(String[] args) throws RunnerException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class OverflowBenchmarkSynthetic {
public void setup() {
((Logger) (LoggerFactory
.getLogger("org.eclipse.rdf4j.sail.nativerdf.MemoryOverflowModel")))
.setLevel(ch.qos.logback.classic.Level.DEBUG);
.setLevel(ch.qos.logback.classic.Level.DEBUG);
}

public static void main(String[] args) throws RunnerException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,8 @@ public void prepare() throws SailException {
nonExclusiveSerializableValidationLock = sail.serializableValidationLock.getReadLock();
}
} else {
assert !useSerializableValidation : "ShaclSail does not have serializable validation enabled but ShaclSailConnection still attempted to use serializable validation!";
assert !useSerializableValidation
: "ShaclSail does not have serializable validation enabled but ShaclSailConnection still attempted to use serializable validation!";
}

if (!isValidationEnabled()) {
Expand All @@ -823,7 +824,8 @@ public void prepare() throws SailException {
}

assert !shapeRefreshNeeded
|| !shapesModifiedInCurrentTransaction : "isShapeRefreshNeeded should trigger shapesModifiedInCurrentTransaction once we have loaded the modified shapes, but shapesModifiedInCurrentTransaction should be null until then";
|| !shapesModifiedInCurrentTransaction
: "isShapeRefreshNeeded should trigger shapesModifiedInCurrentTransaction once we have loaded the modified shapes, but shapesModifiedInCurrentTransaction should be null until then";

if (!shapeRefreshNeeded && !isBulkValidation() && addedStatementsSet.isEmpty()
&& removedStatementsSet.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,8 @@ public ValidationTuple setValue(Value value) {
return this;
}

assert scope == ConstraintComponent.Scope.propertyShape : "Can't set value on NodeShape scoped ValidationTuple because it will also change the target!";
assert scope == ConstraintComponent.Scope.propertyShape
: "Can't set value on NodeShape scoped ValidationTuple because it will also change the target!";

Value[] chain;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public PlanNode getTargetFilter(ConnectionsGroup connectionsGroup, Resource[] da
// TODO: this is a slow way to solve this problem! We should use bulk operations.
return new ExternalFilterByQuery(connectionsGroup.getBaseConnection(), dataGraph, parent, query, last.var,
ValidationTuple::getActiveTarget)
.getTrueNode(UnBufferedPlanNode.class);
.getTrueNode(UnBufferedPlanNode.class);
}

public String getQuery(boolean includeOptional) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ public void example_10() {
.delete(book.has(p, v))
.where(and(book.has(dc.iri("date"), date).andHas(dc.iri("type"), dcmitype.iri("PhysicalObject")),
book.has(p, v))
.filter(Expressions.lt(date,
Rdf.literalOfType("2000-01-01T00:00:00-02:00", xsd.iri("dateTime")))));
.filter(Expressions.lt(date,
Rdf.literalOfType("2000-01-01T00:00:00-02:00", xsd.iri("dateTime")))));

Assert.assertThat(deleteFromBookStoreQuery.getQueryString(), stringEqualsIgnoreCaseAndWhitespace(
"WITH <http://example/bookStore>\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public StatementSourceAssurance getAssurance(SubQuery subQuery, Endpoint endpoin
if (subQuery.object() != null) {
if (getAssurance(new SubQuery(subQuery.subject(), subQuery.predicate(), null, subQuery.contexts()),
endpoint)
.equals(StatementSourceAssurance.NONE)) {
.equals(StatementSourceAssurance.NONE)) {
return StatementSourceAssurance.NONE;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ public CloseableIteration<T, QueryEvaluationException> performTask() throws Exce
}
} else if (closed) {
assert Thread.currentThread()
.isInterrupted() : "Exception was thrown and task was closed, but the current thread is not interrupted which means that the exception was either something bad or some code forgot to re-interrupt the current thread: "
.isInterrupted()
: "Exception was thrown and task was closed, but the current thread is not interrupted which means that the exception was either something bad or some code forgot to re-interrupt the current thread: "
+ e;
logger.trace(
"Exception was thrown while performing task, but it was ignored because the task was closed.",
Expand Down

0 comments on commit 79faae5

Please sign in to comment.