Skip to content

Commit c90af45

Browse files
committed
GH-4819 code cleanup and documentation
1 parent c24319e commit c90af45

File tree

206 files changed

+321
-289
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

206 files changed

+321
-289
lines changed

assembly-descriptors/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.eclipse.rdf4j</groupId>
66
<artifactId>rdf4j</artifactId>
7-
<version>5.1.0-SNAPSHOT</version>
7+
<version>5.0.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>rdf4j-assembly-descriptors</artifactId>
1010
<name>RDF4J: Assembly Descriptors</name>

assembly/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.eclipse.rdf4j</groupId>
66
<artifactId>rdf4j</artifactId>
7-
<version>5.1.0-SNAPSHOT</version>
7+
<version>5.0.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>rdf4j-assembly</artifactId>
1010
<packaging>pom</packaging>

bom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.eclipse.rdf4j</groupId>
66
<artifactId>rdf4j</artifactId>
7-
<version>5.1.0-SNAPSHOT</version>
7+
<version>5.0.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>rdf4j-bom</artifactId>
1010
<packaging>pom</packaging>

compliance/elasticsearch/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.eclipse.rdf4j</groupId>
66
<artifactId>rdf4j-compliance</artifactId>
7-
<version>5.1.0-SNAPSHOT</version>
7+
<version>5.0.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>rdf4j-elasticsearch-compliance</artifactId>
1010
<name>RDF4J: Elasticsearch Sail Tests</name>

compliance/geosparql/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.eclipse.rdf4j</groupId>
66
<artifactId>rdf4j-compliance</artifactId>
7-
<version>5.1.0-SNAPSHOT</version>
7+
<version>5.0.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>rdf4j-geosparql-compliance</artifactId>
1010
<name>RDF4J: GeoSPARQL compliance tests</name>

compliance/lucene/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.eclipse.rdf4j</groupId>
66
<artifactId>rdf4j-compliance</artifactId>
7-
<version>5.1.0-SNAPSHOT</version>
7+
<version>5.0.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>rdf4j-lucene-compliance</artifactId>
1010
<name>RDF4J: Lucene Sail Tests</name>

compliance/model/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<artifactId>rdf4j-compliance</artifactId>
55
<groupId>org.eclipse.rdf4j</groupId>
6-
<version>5.1.0-SNAPSHOT</version>
6+
<version>5.0.0-SNAPSHOT</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99
<artifactId>rdf4j-model-compliance</artifactId>

compliance/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.eclipse.rdf4j</groupId>
66
<artifactId>rdf4j</artifactId>
7-
<version>5.1.0-SNAPSHOT</version>
7+
<version>5.0.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>rdf4j-compliance</artifactId>
1010
<packaging>pom</packaging>

compliance/repository/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.eclipse.rdf4j</groupId>
66
<artifactId>rdf4j-compliance</artifactId>
7-
<version>5.1.0-SNAPSHOT</version>
7+
<version>5.0.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>rdf4j-repository-compliance</artifactId>
1010
<packaging>war</packaging>

compliance/rio/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.eclipse.rdf4j</groupId>
66
<artifactId>rdf4j-compliance</artifactId>
7-
<version>5.1.0-SNAPSHOT</version>
7+
<version>5.0.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>rdf4j-rio-compliance</artifactId>
1010
<name>RDF4J: Rio compliance tests</name>

compliance/solr/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.eclipse.rdf4j</groupId>
66
<artifactId>rdf4j-compliance</artifactId>
7-
<version>5.1.0-SNAPSHOT</version>
7+
<version>5.0.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>rdf4j-solr-compliance</artifactId>
1010
<name>RDF4J: Solr Sail Tests</name>

compliance/sparql/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.eclipse.rdf4j</groupId>
66
<artifactId>rdf4j-compliance</artifactId>
7-
<version>5.1.0-SNAPSHOT</version>
7+
<version>5.0.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>rdf4j-sparql-compliance</artifactId>
1010
<packaging>war</packaging>

compliance/sparql/src/test/java/org/eclipse/rdf4j/query/parser/sparql/SPARQLServiceEvaluationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ public void testVariableNameHandling() throws Exception {
268268
assertTrue(tqr.hasNext());
269269

270270
List<BindingSet> result = QueryResults.asList(tqr);
271-
assertTrue(result.size() > 0);
271+
assertTrue(!result.isEmpty());
272272
for (BindingSet bs : result) {
273273
assertTrue(bs.hasBinding("val"));
274274
assertTrue(bs.hasBinding("s"));

compliance/sparql/src/test/java/org/eclipse/rdf4j/sail/extensiblestore/ExtensibleStoreSPARQL11QueryComplianceTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
/*******************************************************************************
2-
* Copyright (c) 2020 Eclipse RDF4J contributors.
2+
* Copyright (c) 2023 Eclipse RDF4J contributors.
33
*
44
* All rights reserved. This program and the accompanying materials
55
* are made available under the terms of the Eclipse Distribution License v1.0
66
* which accompanies this distribution, and is available at
77
* http://www.eclipse.org/org/documents/edl-v10.php.
88
*
99
* SPDX-License-Identifier: BSD-3-Clause
10-
*******************************************************************************/
10+
******************************************************************************/
11+
1112
package org.eclipse.rdf4j.sail.extensiblestore;
1213

13-
import org.eclipse.rdf4j.query.Dataset;
1414
import org.eclipse.rdf4j.repository.Repository;
1515
import org.eclipse.rdf4j.repository.dataset.DatasetRepository;
1616
import org.eclipse.rdf4j.repository.sail.SailRepository;

compliance/sparql/src/test/java/org/eclipse/rdf4j/sail/extensiblestore/ExtensibleStoreSPARQL11UpdateComplianceTest.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
/*******************************************************************************
2-
* Copyright (c) 2015 Eclipse RDF4J contributors, Aduna, and others.
2+
* Copyright (c) 2023 Eclipse RDF4J contributors.
33
*
44
* All rights reserved. This program and the accompanying materials
55
* are made available under the terms of the Eclipse Distribution License v1.0
66
* which accompanies this distribution, and is available at
77
* http://www.eclipse.org/org/documents/edl-v10.php.
88
*
99
* SPDX-License-Identifier: BSD-3-Clause
10-
*******************************************************************************/
11-
package org.eclipse.rdf4j.sail.extensiblestore;
10+
******************************************************************************/
1211

13-
import java.util.Map;
12+
package org.eclipse.rdf4j.sail.extensiblestore;
1413

15-
import org.eclipse.rdf4j.model.IRI;
1614
import org.eclipse.rdf4j.repository.Repository;
1715
import org.eclipse.rdf4j.repository.sail.SailRepository;
1816
import org.eclipse.rdf4j.sail.extensiblestore.impl.ExtensibleStoreOrderedImplForTests;

compliance/sparql/src/test/java/org/eclipse/rdf4j/sail/extensiblestore/impl/ExtensibleStoreConnectionOrderedImplForTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
/*******************************************************************************
2-
* Copyright (c) 2019 Eclipse RDF4J contributors.
2+
* Copyright (c) 2023 Eclipse RDF4J contributors.
33
*
44
* All rights reserved. This program and the accompanying materials
55
* are made available under the terms of the Eclipse Distribution License v1.0
66
* which accompanies this distribution, and is available at
77
* http://www.eclipse.org/org/documents/edl-v10.php.
88
*
99
* SPDX-License-Identifier: BSD-3-Clause
10-
*******************************************************************************/
10+
******************************************************************************/
11+
1112
package org.eclipse.rdf4j.sail.extensiblestore.impl;
1213

1314
import org.eclipse.rdf4j.sail.extensiblestore.ExtensibleStoreConnection;

compliance/sparql/src/test/java/org/eclipse/rdf4j/sail/extensiblestore/impl/ExtensibleStoreOrderedImplForTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
/*******************************************************************************
2-
* Copyright (c) 2019 Eclipse RDF4J contributors.
2+
* Copyright (c) 2023 Eclipse RDF4J contributors.
33
*
44
* All rights reserved. This program and the accompanying materials
55
* are made available under the terms of the Eclipse Distribution License v1.0
66
* which accompanies this distribution, and is available at
77
* http://www.eclipse.org/org/documents/edl-v10.php.
88
*
99
* SPDX-License-Identifier: BSD-3-Clause
10-
*******************************************************************************/
10+
******************************************************************************/
11+
1112
package org.eclipse.rdf4j.sail.extensiblestore.impl;
1213

1314
import org.eclipse.rdf4j.common.annotation.InternalUseOnly;

compliance/sparql/src/test/java/org/eclipse/rdf4j/sail/extensiblestore/impl/OrderedDataStructure.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
/*******************************************************************************
2-
* Copyright (c) 2019 Eclipse RDF4J contributors.
2+
* Copyright (c) 2023 Eclipse RDF4J contributors.
33
*
44
* All rights reserved. This program and the accompanying materials
55
* are made available under the terms of the Eclipse Distribution License v1.0
66
* which accompanies this distribution, and is available at
77
* http://www.eclipse.org/org/documents/edl-v10.php.
88
*
99
* SPDX-License-Identifier: BSD-3-Clause
10-
*******************************************************************************/
10+
******************************************************************************/
11+
1112
package org.eclipse.rdf4j.sail.extensiblestore.impl;
1213

1314
import java.util.Collections;

core/client/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.eclipse.rdf4j</groupId>
66
<artifactId>rdf4j-core</artifactId>
7-
<version>5.1.0-SNAPSHOT</version>
7+
<version>5.0.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>rdf4j-client</artifactId>
1010
<name>RDF4J: Client Libraries</name>

core/collection-factory/api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.eclipse.rdf4j</groupId>
66
<artifactId>rdf4j-collection-factory</artifactId>
7-
<version>5.1.0-SNAPSHOT</version>
7+
<version>5.0.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>rdf4j-collection-factory-api</artifactId>
1010
<name>RDF4J: Collection Factory - API</name>

core/collection-factory/mapdb/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.eclipse.rdf4j</groupId>
66
<artifactId>rdf4j-collection-factory</artifactId>
7-
<version>5.1.0-SNAPSHOT</version>
7+
<version>5.0.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>rdf4j-collection-factory-mapdb</artifactId>
1010
<name>RDF4J: Collection Factory - Map DB backed</name>

core/collection-factory/mapdb3/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.eclipse.rdf4j</groupId>
66
<artifactId>rdf4j-collection-factory</artifactId>
7-
<version>5.1.0-SNAPSHOT</version>
7+
<version>5.0.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>rdf4j-collection-factory-mapdb3</artifactId>
1010
<name>RDF4J: Collection Factory - Map DB v3 backed</name>

core/collection-factory/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.eclipse.rdf4j</groupId>
66
<artifactId>rdf4j-core</artifactId>
7-
<version>5.1.0-SNAPSHOT</version>
7+
<version>5.0.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>rdf4j-collection-factory</artifactId>
1010
<packaging>pom</packaging>

core/common/annotation/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.eclipse.rdf4j</groupId>
66
<artifactId>rdf4j-common</artifactId>
7-
<version>5.1.0-SNAPSHOT</version>
7+
<version>5.0.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>rdf4j-common-annotation</artifactId>
1010
<name>RDF4J: common annotation</name>

core/common/exception/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.eclipse.rdf4j</groupId>
66
<artifactId>rdf4j-common</artifactId>
7-
<version>5.1.0-SNAPSHOT</version>
7+
<version>5.0.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>rdf4j-common-exception</artifactId>
1010
<name>RDF4J: common exception</name>

core/common/io/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.eclipse.rdf4j</groupId>
66
<artifactId>rdf4j-common</artifactId>
7-
<version>5.1.0-SNAPSHOT</version>
7+
<version>5.0.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>rdf4j-common-io</artifactId>
1010
<name>RDF4J: common IO</name>

core/common/io/src/main/java/org/eclipse/rdf4j/common/net/ParsedIRI.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ public String toASCIIString() {
355355
appendAscii(sb, userInfo);
356356
sb.append('@');
357357
}
358-
if (host.length() > 0) {
358+
if (!host.isEmpty()) {
359359
sb.append(IDN.toASCII(host, IDN.ALLOW_UNASSIGNED));
360360
}
361361
if (port >= 0) {
@@ -516,7 +516,7 @@ public ParsedIRI normalize() {
516516
boolean localhost = isScheme("file") && userInfo == null && -1 == port
517517
&& ("".equals(host) || "localhost".equals(host));
518518
String _host = localhost ? null
519-
: host == null || host.length() == 0 ? host
519+
: host == null || host.isEmpty() ? host
520520
: IDN.toUnicode(pctEncodingNormalization(toLowerCase(host)),
521521
IDN.USE_STD3_ASCII_RULES | IDN.ALLOW_UNASSIGNED);
522522
String _path = _scheme != null && path == null ? "" : normalizePath(path);
@@ -581,14 +581,14 @@ public ParsedIRI resolve(ParsedIRI relative) {
581581
// relURI._scheme == null
582582

583583
// RFC, step 2:
584-
if (relative.getHost() == null && relative.getQuery() == null && relative.getPath().length() == 0) {
584+
if (relative.getHost() == null && relative.getQuery() == null && relative.getPath().isEmpty()) {
585585

586586
// Inherit any fragment identifier from relURI
587587
String fragment = relative.getFragment();
588588

589589
return new ParsedIRI(this.getScheme(), this.getUserInfo(), this.getHost(), this.getPort(), this.getPath(),
590590
this.getQuery(), fragment);
591-
} else if (relative.getHost() == null && relative.getPath().length() == 0) {
591+
} else if (relative.getHost() == null && relative.getPath().isEmpty()) {
592592

593593
// Inherit any query or fragment from relURI
594594
String query = relative.getQuery();
@@ -636,7 +636,7 @@ public ParsedIRI resolve(ParsedIRI relative) {
636636
path = path.substring(0, lastSlashIdx + 1);
637637
}
638638

639-
if (path.length() == 0) {
639+
if (path.isEmpty()) {
640640
// No path means: start at root.
641641
path = "/";
642642
}
@@ -782,7 +782,7 @@ private void parse() throws URISyntaxException {
782782
if (':' == peek()) {
783783
advance(1);
784784
String p = parseMember(DIGIT, '/');
785-
if (p.length() > 0) {
785+
if (!p.isEmpty()) {
786786
port = Integer.parseInt(p);
787787
} else {
788788
port = -1;
@@ -1101,7 +1101,7 @@ && isMember(ALPHA, path.codePointAt(1))) {
11011101
}
11021102

11031103
private String pctEncodingNormalization(String path) {
1104-
if (path == null || path.length() == 0 || path.indexOf('%') < 0) {
1104+
if (path == null || path.isEmpty() || path.indexOf('%') < 0) {
11051105
return path; // no pct encodings
11061106
}
11071107
String[] encodings = listPctEncodings(path);

core/common/iterator/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.eclipse.rdf4j</groupId>
66
<artifactId>rdf4j-common</artifactId>
7-
<version>5.1.0-SNAPSHOT</version>
7+
<version>5.0.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>rdf4j-common-iterator</artifactId>
1010
<name>RDF4J: common iterators</name>

core/common/iterator/src/main/java/org/eclipse/rdf4j/common/iteration/DualUnionIteration.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ public static <E> CloseableIteration<? extends E> getWildcardInstance(
6363
public static <E> CloseableIteration<? extends E> getWildcardInstance(Comparator<E> cmp,
6464
CloseableIteration<? extends E> leftIteration, CloseableIteration<? extends E> rightIteration) {
6565

66-
// if (rightIteration instanceof EmptyIteration) {
67-
// return leftIteration;
68-
// } else if (leftIteration instanceof EmptyIteration) {
69-
// return rightIteration;
70-
// } else {
71-
return new DualUnionIteration<>(cmp, leftIteration, rightIteration);
72-
// }
66+
if (rightIteration instanceof EmptyIteration) {
67+
return leftIteration;
68+
} else if (leftIteration instanceof EmptyIteration) {
69+
return rightIteration;
70+
} else {
71+
return new DualUnionIteration<>(cmp, leftIteration, rightIteration);
72+
}
7373
}
7474

7575
public static <E> CloseableIteration<E> getInstance(CloseableIteration<E> leftIteration,

core/common/iterator/src/main/java/org/eclipse/rdf4j/common/iteration/IndexReportingIterator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import org.eclipse.rdf4j.common.annotation.Experimental;
1515

1616
/**
17-
* The index name of the underlying data structure, e.g. SPOC, POSC, etc.
17+
* A way to signal which index is in use for a specific iterator (e.g. SPOC, POSC, etc.). Used in the query explanation.
1818
*/
1919
@Experimental
2020
public interface IndexReportingIterator {

core/common/order/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.eclipse.rdf4j</groupId>
66
<artifactId>rdf4j-common</artifactId>
7-
<version>5.1.0-SNAPSHOT</version>
7+
<version>5.0.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>rdf4j-common-order</artifactId>
1010
<name>RDF4J: common order</name>

0 commit comments

Comments
 (0)