Skip to content

Commit

Permalink
apacheGH-2800: Remove unused checking cache
Browse files Browse the repository at this point in the history
  • Loading branch information
afs committed Jan 15, 2025
1 parent b5007bd commit c896d89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,6 @@ public static void iriViolationMessage(String iriStr, boolean isError, String ms
} catch (org.apache.jena.iri.IRIException0 | org.apache.jena.irix.IRIException ex) {}
}

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

public static boolean checkLiteral(Node node) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@

import java.util.Objects;

import org.apache.jena.atlas.lib.Cache;
import org.apache.jena.atlas.lib.CacheFactory;
import org.apache.jena.datatypes.RDFDatatype;
import org.apache.jena.datatypes.xsd.XSDDatatype;
import org.apache.jena.graph.*;
import org.apache.jena.iri.IRI;
import org.apache.jena.irix.*;
import org.apache.jena.irix.IRIException;
import org.apache.jena.irix.IRIx;
import org.apache.jena.irix.IRIxResolver;
import org.apache.jena.irix.RelativeIRIException;
import org.apache.jena.query.ARQ;
import org.apache.jena.riot.RiotException;
import org.apache.jena.riot.tokens.Token;
Expand All @@ -48,7 +48,6 @@ public class ParserProfileStd implements ParserProfile {
private final boolean strictMode;
private final boolean checking;
private static int DftCacheSize = 500;
private final Cache<String, IRI> iriCache;

private boolean allowNodeExtentions;

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

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

/**
Expand Down

0 comments on commit c896d89

Please sign in to comment.