summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/LogWindow.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-06-23 17:09:52 +0200
committerArne Schwabe <arne@rfc2549.org>2013-06-23 17:09:52 +0200
commit0e76e955ba4848b18ee458cb9f53cc8e64671146 (patch)
tree818cb149d78d508dcc34fa6cdfc3e94e3655db4b /src/de/blinkt/openvpn/LogWindow.java
parent180642560ef5c8a0139dcd50c1a7fa949c0c20f4 (diff)
Fix issues found by Code Analysis
Diffstat (limited to 'src/de/blinkt/openvpn/LogWindow.java')
-rw-r--r--src/de/blinkt/openvpn/LogWindow.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/de/blinkt/openvpn/LogWindow.java b/src/de/blinkt/openvpn/LogWindow.java
index 1d75c154..e06dbe6c 100644
--- a/src/de/blinkt/openvpn/LogWindow.java
+++ b/src/de/blinkt/openvpn/LogWindow.java
@@ -23,6 +23,7 @@ import de.blinkt.openvpn.core.OpenVpnService.LocalBinder;
import de.blinkt.openvpn.core.ProfileManager;
import java.text.SimpleDateFormat;
+import java.util.Collections;
import java.util.Date;
import java.util.Locale;
import java.util.Vector;
@@ -58,7 +59,7 @@ public class LogWindow extends ListActivity implements StateListener {
private static final int MESSAGE_CLEARLOG = 1;
- private static final int MESSAGE_NEWTS = 1;
+ private static final int MESSAGE_NEWTS = 2;
private Vector<LogItem> myEntries=new Vector<LogItem>();
@@ -83,9 +84,7 @@ public class LogWindow extends ListActivity implements StateListener {
private void initLogBuffer() {
myEntries.clear();
- for (LogItem litem : OpenVPN.getlogbuffer()) {
- myEntries.add(litem);
- }
+ Collections.addAll(myEntries, OpenVPN.getlogbuffer());
}
String getLogStr() {
@@ -189,6 +188,7 @@ public class LogWindow extends ListActivity implements StateListener {
@Override
public void newLog(LogItem logmessage) {
Message msg = Message.obtain();
+ assert (msg!=null);
msg.what=MESSAGE_NEWLOG;
Bundle mbundle=new Bundle();
mbundle.putParcelable("logmessage", logmessage);