From 0e76e955ba4848b18ee458cb9f53cc8e64671146 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Sun, 23 Jun 2013 17:09:52 +0200 Subject: Fix issues found by Code Analysis --- src/de/blinkt/openvpn/core/ConfigParser.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/de/blinkt/openvpn/core/ConfigParser.java') diff --git a/src/de/blinkt/openvpn/core/ConfigParser.java b/src/de/blinkt/openvpn/core/ConfigParser.java index 3c3b37a9..1a37f7cd 100644 --- a/src/de/blinkt/openvpn/core/ConfigParser.java +++ b/src/de/blinkt/openvpn/core/ConfigParser.java @@ -3,6 +3,7 @@ package de.blinkt.openvpn.core; import java.io.BufferedReader; import java.io.IOException; import java.io.Reader; +import java.util.Collections; import java.util.HashMap; import java.util.Locale; import java.util.Vector; @@ -64,8 +65,7 @@ public class ConfigParser { String meta = line.split("#\\sOVPN_ACCESS_SERVER_", 2)[1]; String[] parts = meta.split("=",2); Vector rval = new Vector(); - for(String p:parts) - rval.add(p); + Collections.addAll(rval, parts); return rval; } @@ -359,7 +359,7 @@ public class ConfigParser { Vector proto = getOption("proto", 1,1); if(proto!=null){ - np.mUseUdp=isUdpProto(proto.get(1));; + np.mUseUdp=isUdpProto(proto.get(1)); } // Parse remote config -- cgit v1.2.3