Revision: 4802
http://sourceforge.net/p/vexi/code/4802
Author: mkpg2
Date: 2015-06-28 20:16:13 +0000 (Sun, 28 Jun 2015)
Log Message:
-----------
Fix. Handle line splitting properly (need to account for \r and whitespace).
Modified Paths:
--------------
trunk/org.vexi-launcher/src/main/java/org/vexi/launcher/LauncherMain.java
Modified:
trunk/org.vexi-launcher/src/main/java/org/vexi/launcher/LauncherMain.java
===================================================================
--- trunk/org.vexi-launcher/src/main/java/org/vexi/launcher/LauncherMain.java
2015-06-28 20:03:31 UTC (rev 4801)
+++ trunk/org.vexi-launcher/src/main/java/org/vexi/launcher/LauncherMain.java
2015-06-28 20:16:13 UTC (rev 4802)
@@ -35,7 +35,7 @@
}
abstract public Launcher createLauncher();
- void init(String text){ init(text.split("\n")); }
+ void init(String text){ init(text.split("\\s*\\r?\\n\\s*")); }
void init(String[] args){
for(String s: args){
@@ -105,7 +105,8 @@
if(hash==null){
log.warn("no version check");
}else{
- for(String hash: hashes.split("\n")){
+ for(String hash: hashes.split("\\s+")){
+ hash = hash.trim();
if(this.hash.equals(hash)){
return;
}
@@ -115,7 +116,7 @@
sb.append("** Launcher incompatible, please download
new version **\n");
sb.append("our hash: "+hash+"\n");
sb.append("allowed: \n");
- for(String hash: hashes.split("\n")){
+ for(String hash: hashes.split("\\s*\\r?\\n\\s*")){
sb.append(" "+hash+"\n");
}
throw new Problem(sb.toString());
@@ -125,7 +126,7 @@
void fetchArgs() throws Exception{
params = new LinkedHashMap();
String args = readString(applicationUrl+"/launcher/args");
- String[] argArr = args.split("\n");
+ String[] argArr = args.split("\\s+");
for(String s: argArr){
if("".equals(s.trim())) continue;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn