From a01e771f678fbcfff3b7a38f42ce392102165fcc Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Tue, 18 Dec 2012 11:11:47 +0100 Subject: Fix a few warnings and one bug when importing a file with a pkcs12 which cannot be read --HG-- extra : rebase_source : d11215373582cb1a656f7cae9bf3642b34c3a2c9 --- src/de/blinkt/openvpn/ConfigParser.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/de/blinkt/openvpn/ConfigParser.java') diff --git a/src/de/blinkt/openvpn/ConfigParser.java b/src/de/blinkt/openvpn/ConfigParser.java index 826f3b62..0e746d44 100644 --- a/src/de/blinkt/openvpn/ConfigParser.java +++ b/src/de/blinkt/openvpn/ConfigParser.java @@ -5,6 +5,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.HashMap; +import java.util.Locale; import java.util.Vector; //! Openvpn Config FIle Parser, probably not 100% accurate but close enough @@ -85,7 +86,7 @@ public class ConfigParser { private boolean space(char c) { // I really hope nobody is using zero bytes inside his/her config file // to sperate parameter but here we go: - return Character.isSpace(c) || c == '\0'; + return Character.isWhitespace(c) || c == '\0'; } @@ -525,7 +526,7 @@ public class ConfigParser { for(Vector optionline:args) if(optionline.size()< (minarg+1) || optionline.size() > maxarg+1) { - String err = String.format("Option %s has %d parameters, expected between %d and %d", + String err = String.format(Locale.getDefault(),"Option %s has %d parameters, expected between %d and %d", option,optionline.size()-1,minarg,maxarg ); throw new ConfigParseError(err); } -- cgit v1.2.3