Skip to content

Commit c896d89

Browse files
committed
apacheGH-2800: Remove unused checking cache
1 parent b5007bd commit c896d89

File tree

2 files changed

+4
-22
lines changed

2 files changed

+4
-22
lines changed

jena-arq/src/main/java/org/apache/jena/riot/system/Checker.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,6 @@ public static void iriViolationMessage(String iriStr, boolean isError, String ms
130130
} catch (org.apache.jena.iri.IRIException0 | org.apache.jena.irix.IRIException ex) {}
131131
}
132132

133-
// /**
134-
// * Process violations on an IRI Calls the {@link ErrorHandler} on all errors and
135-
// * warnings (as warnings).
136-
// */
137-
// @Deprecated(forRemoval = true)
138-
// public static void iriViolations(IRI iri) {
139-
// iriViolations(iri, nullErrorHandler, false, true, -1L, -1L);
140-
// }
141-
//
142133
final static private Pattern langPattern = Pattern.compile("[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*");
143134

144135
public static boolean checkLiteral(Node node) {

jena-arq/src/main/java/org/apache/jena/riot/system/ParserProfileStd.java

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020

2121
import java.util.Objects;
2222

23-
import org.apache.jena.atlas.lib.Cache;
24-
import org.apache.jena.atlas.lib.CacheFactory;
2523
import org.apache.jena.datatypes.RDFDatatype;
2624
import org.apache.jena.datatypes.xsd.XSDDatatype;
2725
import org.apache.jena.graph.*;
28-
import org.apache.jena.iri.IRI;
29-
import org.apache.jena.irix.*;
26+
import org.apache.jena.irix.IRIException;
27+
import org.apache.jena.irix.IRIx;
28+
import org.apache.jena.irix.IRIxResolver;
29+
import org.apache.jena.irix.RelativeIRIException;
3030
import org.apache.jena.query.ARQ;
3131
import org.apache.jena.riot.RiotException;
3232
import org.apache.jena.riot.tokens.Token;
@@ -48,7 +48,6 @@ public class ParserProfileStd implements ParserProfile {
4848
private final boolean strictMode;
4949
private final boolean checking;
5050
private static int DftCacheSize = 500;
51-
private final Cache<String, IRI> iriCache;
5251

5352
private boolean allowNodeExtentions;
5453

@@ -61,7 +60,6 @@ public ParserProfileStd(FactoryRDF factory, ErrorHandler errorHandler,
6160
this.prefixMap = prefixMap;
6261
this.context = context;
6362
this.checking = checking;
64-
this.iriCache = checking ? CacheFactory.createCache(DftCacheSize) : null;
6563
this.strictMode = strictMode;
6664
this.allowNodeExtentions = true; // (context.isTrue(RIOT.ALLOW_NODE_EXT)) ;
6765
}
@@ -132,13 +130,6 @@ private void doChecking(IRIx irix, String uriStr, long line, long col) {
132130
Checker.iriViolationMessage(uriStr, isError, message, line, col, errorHandler);
133131
});
134132

135-
// Jena up to 5.2.0 behaviour: Always jena-iri messages
136-
// IRI iri;
137-
// if ( irix instanceof IRIProviderJenaIRI.IRIxJena )
138-
// iri = (IRI)irix.getImpl();
139-
// else
140-
// iri = iriCache.get(uriStr, x -> SetupJenaIRI.iriCheckerFactory().create(x));
141-
// Checker.iriViolations(iri, errorHandler, false, true, line, col);
142133
}
143134

144135
/**

0 commit comments

Comments
 (0)