jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject [03/14] jena git commit: Minor cleanup, removing dead code
Date Sun, 30 Oct 2016 18:36:15 GMT
Minor cleanup, removing dead code


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/26ca8ce2
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/26ca8ce2
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/26ca8ce2

Branch: refs/heads/master
Commit: 26ca8ce297aa6628d467ecf76dba1155bb967bd8
Parents: 865aab6
Author: ajs6f <ajs6f@virginia.edu>
Authored: Sat Oct 8 16:05:32 2016 -0400
Committer: ajs6f <ajs6f@virginia.edu>
Committed: Sun Oct 30 14:12:31 2016 -0400

----------------------------------------------------------------------
 .../jena/arq/querybuilder/handlers/PrologHandler.java   |  2 +-
 .../jena/arq/querybuilder/handlers/SelectHandler.java   |  2 +-
 .../jena/arq/querybuilder/handlers/WhereHandler.java    |  2 +-
 .../jena/arq/querybuilder/rewriters/ExprRewriter.java   |  2 +-
 .../org/apache/jena/arq/AbstractRegexpBasedTest.java    | 12 ++++++------
 .../arq/querybuilder/clauses/AbstractClauseTest.java    |  8 ++++----
 .../arq/querybuilder/handlers/AbstractHandlerTest.java  |  6 +++---
 7 files changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/26ca8ce2/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/PrologHandler.java
----------------------------------------------------------------------
diff --git a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/PrologHandler.java
b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/PrologHandler.java
index 0a5b1b9..fe3dcfc 100644
--- a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/PrologHandler.java
+++ b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/PrologHandler.java
@@ -52,7 +52,7 @@ public class PrologHandler implements Handler {
 	 * @param x The prefix name
 	 * @return The prefix name with the trialing ':' removed.
 	 */
-	private String canonicalPfx(String x) {
+	private static String canonicalPfx(String x) {
 		if (x.endsWith(":"))
 			return x.substring(0, x.length() - 1);
 		return x;

http://git-wip-us.apache.org/repos/asf/jena/blob/26ca8ce2/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/SelectHandler.java
----------------------------------------------------------------------
diff --git a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/SelectHandler.java
b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/SelectHandler.java
index a42f305..4013096 100644
--- a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/SelectHandler.java
+++ b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/SelectHandler.java
@@ -120,7 +120,7 @@ public class SelectHandler implements Handler {
 	 * @throws QueryParseException
 	 *             on error
 	 */
-	private Expr parseExpr(String s) throws QueryParseException {
+	private static Expr parseExpr(String s) throws QueryParseException {
 		try {
 			ARQParser parser = new ARQParser(new StringReader("SELECT " + s));
 			parser.setQuery(new Query());

http://git-wip-us.apache.org/repos/asf/jena/blob/26ca8ce2/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/WhereHandler.java
----------------------------------------------------------------------
diff --git a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/WhereHandler.java
b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/WhereHandler.java
index 83cd469..b5303c6 100644
--- a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/WhereHandler.java
+++ b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/handlers/WhereHandler.java
@@ -138,7 +138,7 @@ public class WhereHandler implements Handler {
 	 * @param t
 	 *            The trip to test.
 	 */
-	private void testTriple(Triple t) {
+	private static void testTriple(Triple t) {
 		// verify Triple is valid
 		boolean validSubject = t.getSubject().isURI() || t.getSubject().isBlank() || t.getSubject().isVariable()
 				|| t.getSubject().equals(Node.ANY);

http://git-wip-us.apache.org/repos/asf/jena/blob/26ca8ce2/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/ExprRewriter.java
----------------------------------------------------------------------
diff --git a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/ExprRewriter.java
b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/ExprRewriter.java
index ba148c4..2487c9b 100644
--- a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/ExprRewriter.java
+++ b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/ExprRewriter.java
@@ -81,7 +81,7 @@ public class ExprRewriter extends AbstractRewriter<Expr> implements
ExprVisitor
 		push(retval);
 	}
 
-	private void setExprList(ExprFunctionN n, ExprList exprList) {
+	private static void setExprList(ExprFunctionN n, ExprList exprList) {
 		try {
 			Field f = ExprFunctionN.class.getDeclaredField("args");
 			f.setAccessible(true);

http://git-wip-us.apache.org/repos/asf/jena/blob/26ca8ce2/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/AbstractRegexpBasedTest.java
----------------------------------------------------------------------
diff --git a/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/AbstractRegexpBasedTest.java
b/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/AbstractRegexpBasedTest.java
index 57b1f77..da93255 100644
--- a/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/AbstractRegexpBasedTest.java
+++ b/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/AbstractRegexpBasedTest.java
@@ -62,7 +62,7 @@ public abstract class AbstractRegexpBasedTest {
 	/** Regex for rdf:type as a URI or the abbreviation 'a' */
 	protected static String regexRDFtype = "("+uri("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")+"|a)"
;
 	
-	protected final String var(String s) {
+	protected final static String var(String s) {
 		return "\\?" + s;
 	}
 
@@ -70,12 +70,12 @@ public abstract class AbstractRegexpBasedTest {
 	 * RDF 1.0 : use ^^xsd:string form.
 	 * RDF 1.1 : use untyped form.
 	 */
-	protected final String presentStringType() {
+	protected final static String presentStringType() {
 	    return 
 	        JenaRuntime.isRDF11 ? "" : "\\^\\^\\<http://www.w3.org/2001/XMLSchema#string\\>"
;
 	}
 
-	protected final void assertNotContainsRegex(String expected, String lst) {
+	protected final static void assertNotContainsRegex(String expected, String lst) {
 
 		Pattern patt = Pattern.compile(expected, Pattern.DOTALL);
 
@@ -84,7 +84,7 @@ public abstract class AbstractRegexpBasedTest {
 		}
 	}
 
-	protected final void assertContainsRegex(String expected, String entry) {
+	protected final static void assertContainsRegex(String expected, String entry) {
 
 		Pattern patt = Pattern.compile(expected, Pattern.DOTALL);
 		if (patt.matcher(entry).find()) {
@@ -93,7 +93,7 @@ public abstract class AbstractRegexpBasedTest {
 		fail(String.format("%s not found in %s", expected, entry));
 	}
 
-	protected final void assertNotContainsRegex(String expected, String[] lst) {
+	protected final static void assertNotContainsRegex(String expected, String[] lst) {
 
 		Pattern patt = Pattern.compile(expected, Pattern.DOTALL);
 		for (String s : lst) {
@@ -104,7 +104,7 @@ public abstract class AbstractRegexpBasedTest {
 		}
 	}
 
-	protected final void assertContainsRegex(String expected, String[] lst) {
+	protected final static void assertContainsRegex(String expected, String[] lst) {
 		Pattern patt = Pattern.compile(expected, Pattern.DOTALL|Pattern.CASE_INSENSITIVE);
 		for (String s : lst) {
 			if (patt.matcher(s).find()) {

http://git-wip-us.apache.org/repos/asf/jena/blob/26ca8ce2/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/querybuilder/clauses/AbstractClauseTest.java
----------------------------------------------------------------------
diff --git a/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/querybuilder/clauses/AbstractClauseTest.java
b/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/querybuilder/clauses/AbstractClauseTest.java
index 7b3ed94..e54eb36 100644
--- a/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/querybuilder/clauses/AbstractClauseTest.java
+++ b/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/querybuilder/clauses/AbstractClauseTest.java
@@ -30,11 +30,11 @@ import org.apache.jena.query.Query ;
 
 public abstract class AbstractClauseTest extends AbstractRegexpBasedTest {
 
-	protected final String[] byLine(AbstractQueryBuilder<?> builder) {
+	protected final static String[] byLine(AbstractQueryBuilder<?> builder) {
 		return builder.buildString().split("\n");
 	}
 
-	protected final Query getQuery(AbstractQueryBuilder<?> builder)
+	protected final static Query getQuery(AbstractQueryBuilder<?> builder)
 			throws NoSuchFieldException, SecurityException,
 			IllegalArgumentException, IllegalAccessException {
 		Field f = AbstractQueryBuilder.class.getDeclaredField("query");
@@ -42,13 +42,13 @@ public abstract class AbstractClauseTest extends AbstractRegexpBasedTest
{
 		return (Query) f.get(builder);
 	}
 
-	protected final void assertContains(String expected, String[] lst) {
+	protected final static void assertContains(String expected, String[] lst) {
 		List<String> s = Arrays.asList(lst);
 		assertTrue(String.format("%s not found in %s", expected, s),
 				s.contains(expected));
 	}
 
-	protected final void assertNotContains(String expected, String[] lst) {
+	protected final static void assertNotContains(String expected, String[] lst) {
 		List<String> s = Arrays.asList(lst);
 		assertFalse(String.format("%s found in %s", expected, s),
 				s.contains(expected));

http://git-wip-us.apache.org/repos/asf/jena/blob/26ca8ce2/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/querybuilder/handlers/AbstractHandlerTest.java
----------------------------------------------------------------------
diff --git a/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/querybuilder/handlers/AbstractHandlerTest.java
b/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/querybuilder/handlers/AbstractHandlerTest.java
index 64cd39c..e2b0894 100644
--- a/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/querybuilder/handlers/AbstractHandlerTest.java
+++ b/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/querybuilder/handlers/AbstractHandlerTest.java
@@ -25,17 +25,17 @@ import org.apache.jena.arq.AbstractRegexpBasedTest;
 
 public abstract class AbstractHandlerTest extends AbstractRegexpBasedTest {
 
-	protected final String[] byLine(String s) {
+	protected final static String[] byLine(String s) {
 		return s.split("\n");
 	}
 
-	protected final void assertContains(String expected, String[] lst) {
+	protected final static void assertContains(String expected, String[] lst) {
 		List<String> s = Arrays.asList(lst);
 		assertTrue(String.format("%s not found in %s", expected, s),
 				s.contains(expected));
 	}
 
-	protected final void assertNotContains(String expected, String[] lst) {
+	protected final static void assertNotContains(String expected, String[] lst) {
 		List<String> s = Arrays.asList(lst);
 		assertFalse(String.format("%s found in %s", expected, s),
 				s.contains(expected));


Mime
View raw message