You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2015/09/11 19:05:49 UTC
[3/4] jena git commit: Replace compatibility code with direct call.
Replace compatibility code with direct call.
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/0b97e774
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/0b97e774
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/0b97e774
Branch: refs/heads/master
Commit: 0b97e774570bd33b5f3e44fc54b1dd5d00281c61
Parents: b064a3b
Author: Andy Seaborne <an...@apache.org>
Authored: Fri Sep 11 09:34:21 2015 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Fri Sep 11 09:34:21 2015 +0100
----------------------------------------------------------------------
.../java/org/apache/jena/fuseki/FusekiCmd.java | 23 +-------------------
1 file changed, 1 insertion(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/0b97e774/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiCmd.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiCmd.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiCmd.java
index 5746394..f3ed119 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiCmd.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiCmd.java
@@ -18,32 +18,11 @@
package org.apache.jena.fuseki;
-import java.lang.reflect.Method ;
-
public class FusekiCmd {
public static void main(String[] args) {
// Must NOT use any logging. The command processor sets that up.
System.err.println("Deprecated: Use org.apache.jena.fuseki.cmd.FusekiCmd") ;
- try {
- // A
- callByRefection("org.apache.jena.fuseki.cmd.FusekiCmd", "main", args) ;
- } catch (ClassNotFoundException | NoSuchMethodException ex) {
- System.err.println("Failed to find the command processor: "+ ex.getMessage()) ;
- } catch (Exception ex) {
- System.err.println("Failed to invoke the command processor: "+ ex.getMessage()) ;
- ex.printStackTrace(System.err) ;
- }
- }
-
- // Call a static of no arguments by reflection.
- private static void callByRefection(String className, String staticMethod, String[] args)
- throws Exception
- {
- Class<? > cls = Class.forName(className) ;
- // Pass up : ClassNotFoundException
-
- Method m = cls.getMethod(staticMethod, String[].class) ;
- m.invoke(null, (Object)args) ;
+ org.apache.jena.fuseki.cmd.FusekiCmd.main(args);
}
}