Author: rezan
Date: Wed Jul 29 00:24:09 2015
New Revision: 1693172
URL: http://svn.apache.org/r1693172
Log:
rename
Added:
devicemap/trunk/clients/2.0/reference/src/Main.java
- copied, changed from r1693161,
devicemap/trunk/clients/2.0/reference/src/DeviceMapClient.java
Removed:
devicemap/trunk/clients/2.0/reference/src/DeviceMapClient.java
Modified:
devicemap/trunk/clients/2.0/reference/run.sh
Modified: devicemap/trunk/clients/2.0/reference/run.sh
URL:
http://svn.apache.org/viewvc/devicemap/trunk/clients/2.0/reference/run.sh?rev=1693172&r1=1693171&r2=1693172&view=diff
==============================================================================
--- devicemap/trunk/clients/2.0/reference/run.sh (original)
+++ devicemap/trunk/clients/2.0/reference/run.sh Wed Jul 29 00:24:09 2015
@@ -8,4 +8,4 @@ fi
cd bin
-java DeviceMapClient "$@"
+java Main "$@"
Copied: devicemap/trunk/clients/2.0/reference/src/Main.java (from r1693161,
devicemap/trunk/clients/2.0/reference/src/DeviceMapClient.java)
URL:
http://svn.apache.org/viewvc/devicemap/trunk/clients/2.0/reference/src/Main.java?p2=devicemap/trunk/clients/2.0/reference/src/Main.java&p1=devicemap/trunk/clients/2.0/reference/src/DeviceMapClient.java&r1=1693161&r2=1693172&rev=1693172&view=diff
==============================================================================
--- devicemap/trunk/clients/2.0/reference/src/DeviceMapClient.java (original)
+++ devicemap/trunk/clients/2.0/reference/src/Main.java Wed Jul 29 00:24:09 2015
@@ -20,11 +20,11 @@
import java.util.ArrayList;
import java.util.List;
-public class DeviceMapClient {
+public class Main {
public final static String VERSION = "2.0";
- public static void main(String args[]) throws Exception {
+ public static void main(String args[]) {
System.out.println("DeviceMap Reference Client " + VERSION);
List<String> patterns = new ArrayList<String>();
@@ -49,13 +49,13 @@ public class DeviceMapClient {
testString = option;
} else {
printHelp();
- throw new Exception("unknown option: " + option);
+ throw new RuntimeException("unknown option: " + option);
}
}
if(patterns.isEmpty()) {
printHelp();
- throw new Exception("Pattern file required");
+ throw new RuntimeException("Pattern file required");
}
for(String pattern : patterns) {
@@ -76,7 +76,7 @@ public class DeviceMapClient {
}
private static void printHelp() {
- System.out.println("Usage: " + DeviceMapClient.class.getName() + "
[OPTIONS] [STRING]\n");
+ System.out.println("Usage: " + Main.class.getName() + " [OPTIONS]
[STRING]\n");
System.out.println(" -p <file> load DeviceMap 2.0 pattern file
(REQUIRED)");
System.out.println(" -a <file> load DeviceMap 2.0 attribute
file");
System.out.println(" -t <file> load DeviceMap 2.0 test file");
@@ -85,11 +85,11 @@ public class DeviceMapClient {
System.out.println("");
}
- private static String getParam(String args[], int pos, String error) throws
Exception {
+ private static String getParam(String args[], int pos, String error) {
if(pos >= args.length) {
- throw new Exception(error);
+ throw new RuntimeException(error);
} else if(args[pos].startsWith("-") || args[pos].isEmpty()) {
- throw new Exception(error);
+ throw new RuntimeException(error);
} else {
return args[pos];
}