prolog-shell: Simple command line Prolog interpreter
Since Prolog isn't the most popular language, define a small interactive interpreter that users or site administartors can play around with by downloading the Gerrit WAR file and executing: java -jar gerrit.war prolog-shell Change-Id: I0474b59e6ace24e6e6bfda58f574add3b2bf79e0
This commit is contained in:
@@ -120,7 +120,17 @@ public final class GerritLauncher {
|
||||
try {
|
||||
String cn = name;
|
||||
if (cn.equals(cn.toLowerCase())) {
|
||||
cn = cn.substring(0, 1).toUpperCase() + cn.substring(1);
|
||||
StringBuilder buf = new StringBuilder();
|
||||
buf.append(Character.toUpperCase(cn.charAt(0)));
|
||||
for (int i = 1; i < cn.length(); i++) {
|
||||
if (cn.charAt(i) == '-' && i + 1 < cn.length()) {
|
||||
i++;
|
||||
buf.append(Character.toUpperCase(cn.charAt(i)));
|
||||
} else {
|
||||
buf.append(cn.charAt(i));
|
||||
}
|
||||
}
|
||||
cn = buf.toString();
|
||||
}
|
||||
clazz = Class.forName(pkg + "." + cn, true, loader);
|
||||
} catch (ClassNotFoundException cnfe) {
|
||||
|
Reference in New Issue
Block a user