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 | a01e771f678fbcfff3b7a38f42ce392102165fcc (patch) | |
tree | 7b29bc4f601e40eef74e51bfb4ded45e2be4d927 /src/de/blinkt/openvpn/ConfigParser.java | |
parent | fd52a72467252aa449f1c8081ed02fc064a65729 (diff) |
Fix a few warnings and one bug when importing a file with a pkcs12 which cannot be read
--HG--
extra : rebase_source : d11215373582cb1a656f7cae9bf3642b34c3a2c9
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); } |