Repository: marmotta Updated Branches: refs/heads/develop 7160bd1c1 -> f45e3ddd6
http://git-wip-us.apache.org/repos/asf/marmotta/blob/f45e3ddd/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/base/RdfStringMatcher.java ---------------------------------------------------------------------- diff --git a/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/base/RdfStringMatcher.java b/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/base/RdfStringMatcher.java index 7f5adc3..297bdd7 100644 --- a/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/base/RdfStringMatcher.java +++ b/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/base/RdfStringMatcher.java @@ -102,7 +102,7 @@ public class RdfStringMatcher<T extends String> extends SesameMatcher<T> impleme * @see org.apache.marmotta.commons.sesame.test.base.AbstractRepositoryConnectionMatcher */ public static <T extends String> Matcher<T> wrap(RDFFormat format, String baseUri, Matcher<? extends RepositoryConnection> delegate) { - return new RdfStringMatcher<T>(format, baseUri, delegate); + return new RdfStringMatcher<>(format, baseUri, delegate); } /** @@ -115,7 +115,7 @@ public class RdfStringMatcher<T extends String> extends SesameMatcher<T> impleme */ @SafeVarargs public static <T extends String> Matcher<T> wrap(RDFFormat format, String baseUri, Matcher<? extends RepositoryConnection>... delegates) { - return new RdfStringMatcher<T>(format, baseUri, delegates); + return new RdfStringMatcher<>(format, baseUri, delegates); } http://git-wip-us.apache.org/repos/asf/marmotta/blob/f45e3ddd/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/base/RepositoryMatcher.java ---------------------------------------------------------------------- diff --git a/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/base/RepositoryMatcher.java b/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/base/RepositoryMatcher.java index 187b3f9..09e9a3e 100644 --- a/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/base/RepositoryMatcher.java +++ b/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/base/RepositoryMatcher.java @@ -32,6 +32,7 @@ public class RepositoryMatcher<T extends Repository> extends SesameMatcher<T> im /** * @param delegates the Matcher to wrap. */ + @SafeVarargs public RepositoryMatcher(Matcher<? extends RepositoryConnection>... delegates) { this.delegates = delegates; } @@ -92,7 +93,7 @@ public class RepositoryMatcher<T extends Repository> extends SesameMatcher<T> im * @param connectionMatcher the {@link AbstractRepositoryConnectionMatcher} to wrap */ public static <T extends Repository> Matcher<T> wrap(Matcher<? extends RepositoryConnection> connectionMatcher) { - return new RepositoryMatcher<T>(connectionMatcher); + return new RepositoryMatcher<>(connectionMatcher); } /** @@ -100,7 +101,8 @@ public class RepositoryMatcher<T extends Repository> extends SesameMatcher<T> im * * @param connectionMatchers the {@link AbstractRepositoryConnectionMatcher}s to wrap */ + @SafeVarargs public static <T extends Repository> Matcher<T> wrap(Matcher<? extends RepositoryConnection>... connectionMatchers) { - return new RepositoryMatcher<T>(connectionMatchers); + return new RepositoryMatcher<>(connectionMatchers); } } http://git-wip-us.apache.org/repos/asf/marmotta/blob/f45e3ddd/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/connection/HasStatementMatcher.java ---------------------------------------------------------------------- diff --git a/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/connection/HasStatementMatcher.java b/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/connection/HasStatementMatcher.java index d4803a0..f1a782b 100644 --- a/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/connection/HasStatementMatcher.java +++ b/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/connection/HasStatementMatcher.java @@ -95,6 +95,6 @@ public class HasStatementMatcher<T extends RepositoryConnection> extends Abstrac * @see org.openrdf.repository.RepositoryConnection#hasStatement(org.openrdf.model.Resource, org.openrdf.model.URI, org.openrdf.model.Value, boolean, org.openrdf.model.Resource...) */ public static <T extends RepositoryConnection> Matcher<T> hasStatement(Resource subject, URI predicate, Value object, Resource... contexts) { - return new HasStatementMatcher<T>(subject, predicate, object, contexts); + return new HasStatementMatcher<>(subject, predicate, object, contexts); } } http://git-wip-us.apache.org/repos/asf/marmotta/blob/f45e3ddd/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/sparql/SparqlAskMatcher.java ---------------------------------------------------------------------- diff --git a/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/sparql/SparqlAskMatcher.java b/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/sparql/SparqlAskMatcher.java index f9bd2d0..63bafb3 100644 --- a/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/sparql/SparqlAskMatcher.java +++ b/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/sparql/SparqlAskMatcher.java @@ -55,7 +55,7 @@ public class SparqlAskMatcher<T extends RepositoryConnection> extends SparqlMatc * @see org.openrdf.query.BooleanQuery#evaluate() */ public static <T extends RepositoryConnection> Matcher<T> sparqlAsk(String baseUri, String askQuery) { - return new SparqlAskMatcher<T>(baseUri, askQuery); + return new SparqlAskMatcher<>(baseUri, askQuery); } /** http://git-wip-us.apache.org/repos/asf/marmotta/blob/f45e3ddd/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/sparql/SparqlGraphQueryMatcher.java ---------------------------------------------------------------------- diff --git a/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/sparql/SparqlGraphQueryMatcher.java b/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/sparql/SparqlGraphQueryMatcher.java index fca9ed9..f7d2e6d 100644 --- a/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/sparql/SparqlGraphQueryMatcher.java +++ b/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/sparql/SparqlGraphQueryMatcher.java @@ -94,7 +94,7 @@ public class SparqlGraphQueryMatcher<T extends RepositoryConnection> extends Spa * @param matcher the AbstractRepositoryConnectionMatcher to match */ public static <T extends RepositoryConnection> Matcher<T> sparqlGraphQuery(String baseUri, String query, Matcher<? extends RepositoryConnection> matcher) { - return new SparqlGraphQueryMatcher<T>(baseUri, query, matcher); + return new SparqlGraphQueryMatcher<>(baseUri, query, matcher); } /** @@ -108,6 +108,6 @@ public class SparqlGraphQueryMatcher<T extends RepositoryConnection> extends Spa */ @SafeVarargs public static <T extends RepositoryConnection> Matcher<T> sparqlGraphQuery(String baseUri, String query, Matcher<? extends RepositoryConnection>... matchers) { - return new SparqlGraphQueryMatcher<T>(baseUri, query, matchers); + return new SparqlGraphQueryMatcher<>(baseUri, query, matchers); } } http://git-wip-us.apache.org/repos/asf/marmotta/blob/f45e3ddd/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/sparql/SparqlTupleQueryMatcher.java ---------------------------------------------------------------------- diff --git a/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/sparql/SparqlTupleQueryMatcher.java b/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/sparql/SparqlTupleQueryMatcher.java index 8df97eb..9c88cee 100644 --- a/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/sparql/SparqlTupleQueryMatcher.java +++ b/commons/marmotta-sesame-tools/marmotta-sesame-matchers/src/main/java/org/apache/marmotta/commons/sesame/test/sparql/SparqlTupleQueryMatcher.java @@ -53,12 +53,12 @@ public class SparqlTupleQueryMatcher<T extends RepositoryConnection> extends Spa } public static <T extends RepositoryConnection> Matcher<T> sparqlQuery(String baseUri, String query, Matcher<Iterable<BindingSet>> matcher) { - return new SparqlTupleQueryMatcher<T>(baseUri, query, matcher); + return new SparqlTupleQueryMatcher<>(baseUri, query, matcher); } @SafeVarargs public static <T extends RepositoryConnection> Matcher<T> sparqlQuery(String baseUri, String query, Matcher<Iterable<BindingSet>>... matchers) { - return new SparqlTupleQueryMatcher<T>(baseUri, query, CoreMatchers.allOf(matchers)); + return new SparqlTupleQueryMatcher<>(baseUri, query, CoreMatchers.allOf(matchers)); } } http://git-wip-us.apache.org/repos/asf/marmotta/blob/f45e3ddd/commons/marmotta-sesame-tools/marmotta-util-facading/src/main/java/org/apache/marmotta/commons/sesame/facading/impl/FacadingImpl.java ---------------------------------------------------------------------- diff --git a/commons/marmotta-sesame-tools/marmotta-util-facading/src/main/java/org/apache/marmotta/commons/sesame/facading/impl/FacadingImpl.java b/commons/marmotta-sesame-tools/marmotta-util-facading/src/main/java/org/apache/marmotta/commons/sesame/facading/impl/FacadingImpl.java index 8cfba98..24039ab 100644 --- a/commons/marmotta-sesame-tools/marmotta-util-facading/src/main/java/org/apache/marmotta/commons/sesame/facading/impl/FacadingImpl.java +++ b/commons/marmotta-sesame-tools/marmotta-util-facading/src/main/java/org/apache/marmotta/commons/sesame/facading/impl/FacadingImpl.java @@ -16,10 +16,6 @@ */ package org.apache.marmotta.commons.sesame.facading.impl; -import java.lang.reflect.Proxy; -import java.util.Collection; -import java.util.LinkedList; - import org.apache.marmotta.commons.sesame.facading.annotations.RDF; import org.apache.marmotta.commons.sesame.facading.annotations.RDFContext; import org.apache.marmotta.commons.sesame.facading.annotations.RDFFilter; @@ -34,6 +30,10 @@ import org.openrdf.repository.RepositoryException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.lang.reflect.Proxy; +import java.util.Collection; +import java.util.LinkedList; + /** * Offers methods for loading and proxying Facades. A {@link Facade} is an interface that defines a @@ -171,14 +171,14 @@ public class FacadingImpl implements Facading { @Override public <C extends Facade> Collection<C> createFacade(Collection<? extends Resource> list, Class<C> type, URI context) { log.trace("createFacadeList: creating {} facade over {} content items",type.getName(),list.size()); - LinkedList<C> result = new LinkedList<C>(); + LinkedList<C> result = new LinkedList<>(); if(type.isAnnotationPresent(RDFFilter.class)) { try { if (!connection.isOpen()) { throw new IllegalStateException("the connection is already closed, cannot access triple-store."); } if (!connection.isActive()) { throw new IllegalStateException("no active transaction, cannot access triple-store."); } // if the RDFType annotation is present, filter out content items that are of the wrong type - LinkedList<URI> acceptable_types = new LinkedList<URI>(); + LinkedList<URI> acceptable_types = new LinkedList<>(); if(FacadeUtils.isFacadeAnnotationPresent(type,RDFFilter.class)) { String[] a_type = FacadeUtils.getFacadeAnnotation(type,RDFFilter.class).value(); for(String s_type : a_type) { http://git-wip-us.apache.org/repos/asf/marmotta/blob/f45e3ddd/commons/marmotta-sesame-tools/marmotta-util-facading/src/main/java/org/apache/marmotta/commons/sesame/facading/impl/FacadingInvocationHandler.java ---------------------------------------------------------------------- diff --git a/commons/marmotta-sesame-tools/marmotta-util-facading/src/main/java/org/apache/marmotta/commons/sesame/facading/impl/FacadingInvocationHandler.java b/commons/marmotta-sesame-tools/marmotta-util-facading/src/main/java/org/apache/marmotta/commons/sesame/facading/impl/FacadingInvocationHandler.java index d6d29a5..987b957 100644 --- a/commons/marmotta-sesame-tools/marmotta-util-facading/src/main/java/org/apache/marmotta/commons/sesame/facading/impl/FacadingInvocationHandler.java +++ b/commons/marmotta-sesame-tools/marmotta-util-facading/src/main/java/org/apache/marmotta/commons/sesame/facading/impl/FacadingInvocationHandler.java @@ -57,7 +57,7 @@ class FacadingInvocationHandler implements InvocationHandler { private static final String[] PX, SPX; static { - LinkedList<String> ops = new LinkedList<String>(); + LinkedList<String> ops = new LinkedList<>(); for (OPERATOR op : OPERATOR.values()) { Collections.addAll(ops, op.prefixes); } @@ -171,7 +171,7 @@ class FacadingInvocationHandler implements InvocationHandler { this.context = null; } - fieldCache = new HashMap<String, Object>(); + fieldCache = new HashMap<>(); // disable cache, it does not work well with deleted triples ... useCache = false; @@ -534,9 +534,8 @@ class FacadingInvocationHandler implements InvocationHandler { try { // transformation to appropriate primitive type - final C result = FacadeUtils.transformToBaseType(value, returnType); - return result; + return FacadeUtils.transformToBaseType(value, returnType); } catch (final IllegalArgumentException ex) { return null; } @@ -702,7 +701,7 @@ class FacadingInvocationHandler implements InvocationHandler { private <C> Set<C> queryOutgoingAll(Resource entity, String rdf_property, Class<C> returnType) throws RepositoryException { final URI property = connection.getValueFactory().createURI(rdf_property); - final Set<C> dupSet = new LinkedHashSet<C>(); + final Set<C> dupSet = new LinkedHashSet<>(); final RepositoryResult<Statement> triples = connection.getStatements(entity, property, null, false); try { while (triples.hasNext()) { @@ -728,7 +727,7 @@ class FacadingInvocationHandler implements InvocationHandler { private <C> Set<C> queryIncomingAll(Resource entity, String rdf_property, Class<C> returnType) throws RepositoryException { final URI property = connection.getValueFactory().createURI(rdf_property); - final Set<C> dupSet = new LinkedHashSet<C>(); + final Set<C> dupSet = new LinkedHashSet<>(); final RepositoryResult<Statement> triples = connection.getStatements(null, property, entity, false); try { while (triples.hasNext()) { @@ -769,7 +768,7 @@ class FacadingInvocationHandler implements InvocationHandler { private Set<String> getProperties(Resource entity, URI property, Locale loc, URI context) throws RepositoryException { final String lang = loc == null ? null : loc.getLanguage().toLowerCase(); - final Set<String> values = new HashSet<String>(); + final Set<String> values = new HashSet<>(); final RepositoryResult<Statement> candidates = connection.getStatements(entity, property, null, false, context); try { while (candidates.hasNext()) { http://git-wip-us.apache.org/repos/asf/marmotta/blob/f45e3ddd/commons/marmotta-sesame-tools/marmotta-util-facading/src/main/java/org/apache/marmotta/commons/sesame/facading/impl/FacadingInvocationHelper.java ---------------------------------------------------------------------- diff --git a/commons/marmotta-sesame-tools/marmotta-util-facading/src/main/java/org/apache/marmotta/commons/sesame/facading/impl/FacadingInvocationHelper.java b/commons/marmotta-sesame-tools/marmotta-util-facading/src/main/java/org/apache/marmotta/commons/sesame/facading/impl/FacadingInvocationHelper.java index d4d443e..e333d82 100644 --- a/commons/marmotta-sesame-tools/marmotta-util-facading/src/main/java/org/apache/marmotta/commons/sesame/facading/impl/FacadingInvocationHelper.java +++ b/commons/marmotta-sesame-tools/marmotta-util-facading/src/main/java/org/apache/marmotta/commons/sesame/facading/impl/FacadingInvocationHelper.java @@ -103,9 +103,8 @@ class FacadingInvocationHelper { static boolean isMultiValue(Method method) { final FacadingInvocationHandler.OPERATOR oper = FacadingInvocationHandler.OPERATOR.getOperator(method); - final boolean isMultiValue = oper.writeOp && method.getParameterTypes().length == 0 || + return oper.writeOp && method.getParameterTypes().length == 0 || FacadeUtils.isCollection(oper.writeOp && oper.numArgs > 0 ? method.getParameterTypes()[0] : method.getReturnType()); - return isMultiValue; } static boolean checkLocale(final Locale loc, final Value object) { @@ -128,9 +127,9 @@ class FacadingInvocationHelper { if (Modifier.isAbstract(collectionType.getModifiers())) { // FIXME: Maybe we should add some more implementations here? if (collectionType.isAssignableFrom(HashSet.class)) { - result = new HashSet<E>(); + result = new HashSet<>(); } else if (collectionType.isAssignableFrom(LinkedList.class)) { - result = new LinkedList<E>(); + result = new LinkedList<>(); } else { throw new InstantiationException("Could not find an implementation of " + collectionType.getName()); } http://git-wip-us.apache.org/repos/asf/marmotta/blob/f45e3ddd/commons/marmotta-sesame-tools/marmotta-util-facading/src/main/java/org/apache/marmotta/commons/sesame/facading/util/FacadeUtils.java ---------------------------------------------------------------------- diff --git a/commons/marmotta-sesame-tools/marmotta-util-facading/src/main/java/org/apache/marmotta/commons/sesame/facading/util/FacadeUtils.java b/commons/marmotta-sesame-tools/marmotta-util-facading/src/main/java/org/apache/marmotta/commons/sesame/facading/util/FacadeUtils.java index 0ee82cc..d4da08f 100644 --- a/commons/marmotta-sesame-tools/marmotta-util-facading/src/main/java/org/apache/marmotta/commons/sesame/facading/util/FacadeUtils.java +++ b/commons/marmotta-sesame-tools/marmotta-util-facading/src/main/java/org/apache/marmotta/commons/sesame/facading/util/FacadeUtils.java @@ -127,9 +127,8 @@ public class FacadeUtils { } final Class<?> clazz = in.getClass(); - final boolean result = isFacade(clazz); - return result; + return isFacade(clazz); } /** @@ -215,8 +214,7 @@ public class FacadeUtils { } // even if the char is a primitive is not a number - final boolean isCharacter = Character.class.equals(clazz); - return isCharacter; + return Character.class.equals(clazz); } @@ -254,8 +252,7 @@ public class FacadeUtils { } final Class<? super C> superClass = clazz.getSuperclass(); - final boolean isNumber = Number.class.equals(superClass); - return isNumber; + return Number.class.equals(superClass); } http://git-wip-us.apache.org/repos/asf/marmotta/blob/f45e3ddd/commons/marmotta-sesame-tools/marmotta-util-filter/src/main/java/org/apache/marmotta/commons/sesame/filter/AllOfFilter.java ---------------------------------------------------------------------- diff --git a/commons/marmotta-sesame-tools/marmotta-util-filter/src/main/java/org/apache/marmotta/commons/sesame/filter/AllOfFilter.java b/commons/marmotta-sesame-tools/marmotta-util-filter/src/main/java/org/apache/marmotta/commons/sesame/filter/AllOfFilter.java index 5e531eb..88e2d11 100644 --- a/commons/marmotta-sesame-tools/marmotta-util-filter/src/main/java/org/apache/marmotta/commons/sesame/filter/AllOfFilter.java +++ b/commons/marmotta-sesame-tools/marmotta-util-filter/src/main/java/org/apache/marmotta/commons/sesame/filter/AllOfFilter.java @@ -33,8 +33,9 @@ public class AllOfFilter<T> implements SesameFilter<T> { private Set<SesameFilter<T>> children; + @SafeVarargs public AllOfFilter(SesameFilter<T>... children) { - this(new HashSet<SesameFilter<T>>(Arrays.asList(children))); + this(new HashSet<>(Arrays.asList(children))); } public AllOfFilter(Set<SesameFilter<T>> children) { http://git-wip-us.apache.org/repos/asf/marmotta/blob/f45e3ddd/commons/marmotta-sesame-tools/marmotta-util-filter/src/main/java/org/apache/marmotta/commons/sesame/filter/OneOfFilter.java ---------------------------------------------------------------------- diff --git a/commons/marmotta-sesame-tools/marmotta-util-filter/src/main/java/org/apache/marmotta/commons/sesame/filter/OneOfFilter.java b/commons/marmotta-sesame-tools/marmotta-util-filter/src/main/java/org/apache/marmotta/commons/sesame/filter/OneOfFilter.java index da5af16..790e629 100644 --- a/commons/marmotta-sesame-tools/marmotta-util-filter/src/main/java/org/apache/marmotta/commons/sesame/filter/OneOfFilter.java +++ b/commons/marmotta-sesame-tools/marmotta-util-filter/src/main/java/org/apache/marmotta/commons/sesame/filter/OneOfFilter.java @@ -32,8 +32,9 @@ public class OneOfFilter<T> implements SesameFilter<T> { private Set<SesameFilter<T>> children; + @SafeVarargs public OneOfFilter(SesameFilter<T>... children) { - this(new HashSet<SesameFilter<T>>(Arrays.asList(children))); + this(new HashSet<>(Arrays.asList(children))); } public OneOfFilter(Set<SesameFilter<T>> children) { http://git-wip-us.apache.org/repos/asf/marmotta/blob/f45e3ddd/commons/marmotta-sesame-tools/marmotta-util-filter/src/main/java/org/apache/marmotta/commons/sesame/filter/resource/UriPrefixFilter.java ---------------------------------------------------------------------- diff --git a/commons/marmotta-sesame-tools/marmotta-util-filter/src/main/java/org/apache/marmotta/commons/sesame/filter/resource/UriPrefixFilter.java b/commons/marmotta-sesame-tools/marmotta-util-filter/src/main/java/org/apache/marmotta/commons/sesame/filter/resource/UriPrefixFilter.java index 4287dd0..fd702d2 100644 --- a/commons/marmotta-sesame-tools/marmotta-util-filter/src/main/java/org/apache/marmotta/commons/sesame/filter/resource/UriPrefixFilter.java +++ b/commons/marmotta-sesame-tools/marmotta-util-filter/src/main/java/org/apache/marmotta/commons/sesame/filter/resource/UriPrefixFilter.java @@ -35,7 +35,7 @@ public class UriPrefixFilter implements ResourceFilter { private Set<String> prefixes; public UriPrefixFilter(String... prefixes) { - this(new HashSet<String>(Arrays.asList(prefixes))); + this(new HashSet<>(Arrays.asList(prefixes))); } public UriPrefixFilter(Set<String> prefixes) { http://git-wip-us.apache.org/repos/asf/marmotta/blob/f45e3ddd/commons/marmotta-sesame-tools/marmotta-util-filter/src/main/java/org/apache/marmotta/commons/sesame/filter/resource/UriRegexFilter.java ---------------------------------------------------------------------- diff --git a/commons/marmotta-sesame-tools/marmotta-util-filter/src/main/java/org/apache/marmotta/commons/sesame/filter/resource/UriRegexFilter.java b/commons/marmotta-sesame-tools/marmotta-util-filter/src/main/java/org/apache/marmotta/commons/sesame/filter/resource/UriRegexFilter.java index 608c35e..fc086cc 100644 --- a/commons/marmotta-sesame-tools/marmotta-util-filter/src/main/java/org/apache/marmotta/commons/sesame/filter/resource/UriRegexFilter.java +++ b/commons/marmotta-sesame-tools/marmotta-util-filter/src/main/java/org/apache/marmotta/commons/sesame/filter/resource/UriRegexFilter.java @@ -36,7 +36,7 @@ public class UriRegexFilter implements ResourceFilter { public UriRegexFilter(Collection<String> regexps) { - patterns = new HashSet<Pattern>(); + patterns = new HashSet<>(); for(String s : regexps) { Pattern p = Pattern.compile(s); http://git-wip-us.apache.org/repos/asf/marmotta/blob/f45e3ddd/commons/marmotta-sesame-tools/marmotta-util-tripletable/src/main/java/org/apache/marmotta/commons/sesame/tripletable/TripleTable.java ---------------------------------------------------------------------- diff --git a/commons/marmotta-sesame-tools/marmotta-util-tripletable/src/main/java/org/apache/marmotta/commons/sesame/tripletable/TripleTable.java b/commons/marmotta-sesame-tools/marmotta-util-tripletable/src/main/java/org/apache/marmotta/commons/sesame/tripletable/TripleTable.java index 2897212..7d50b04 100644 --- a/commons/marmotta-sesame-tools/marmotta-util-tripletable/src/main/java/org/apache/marmotta/commons/sesame/tripletable/TripleTable.java +++ b/commons/marmotta-sesame-tools/marmotta-util-tripletable/src/main/java/org/apache/marmotta/commons/sesame/tripletable/TripleTable.java @@ -56,15 +56,15 @@ public class TripleTable<Triple extends Statement> implements Set<Triple>, Seria public TripleTable() { data = StatementCommons.newQuadrupleSet(); - indexSPOC = new TreeMap<IntArray, Triple>(); - indexCSPO = new TreeMap<IntArray, Triple>(); + indexSPOC = new TreeMap<>(); + indexCSPO = new TreeMap<>(); } public TripleTable(Collection<Triple> triples) { data = StatementCommons.newQuadrupleSet(); - indexSPOC = new TreeMap<IntArray, Triple>(); - indexCSPO = new TreeMap<IntArray, Triple>(); + indexSPOC = new TreeMap<>(); + indexCSPO = new TreeMap<>(); addAll(triples); }
