diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-12-18 11:11:47 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-12-18 11:11:47 +0100 |
commit | 9fe3b7ce6d350474d0827cb6ff6554eafa822378 (patch) | |
tree | 53dc7d1f27af688ed8d7b483a0590f86c652bb04 /src/de/blinkt/openvpn/ConfigParser.java | |
parent | 6ebe4f9500f0761a1b6b91da3ab415e1db4c19c5 (diff) |
Fix a few warnings and one bug when importing a file with a pkcs12 which cannot be read
Diffstat (limited to 'src/de/blinkt/openvpn/ConfigParser.java')
-rw-r--r-- | src/de/blinkt/openvpn/ConfigParser.java | 5 |
1 files changed, 3 insertions, 2 deletions
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<String> 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); } |