Make openDecisions array final, use StringBuilder

This commit is contained in:
Daniel Schaal 2015-09-27 10:01:20 +02:00
parent 76e693c40e
commit 394be98975

View file

@ -86,7 +86,7 @@ public class MemorizingTrustManager implements X509TrustManager {
Activity foregroundAct;
NotificationManager notificationManager;
private static int decisionId = 0;
private static SparseArray<MTMDecision> openDecisions = new SparseArray<MTMDecision>();
private static final SparseArray<MTMDecision> openDecisions = new SparseArray<>();
Handler masterHandler;
private File keyStoreFile;
@ -332,7 +332,7 @@ public class MemorizingTrustManager implements X509TrustManager {
}
private static String hexString(byte[] data) {
StringBuffer si = new StringBuffer();
StringBuilder si = new StringBuilder();
for (int i = 0; i < data.length; i++) {
si.append(String.format("%02x", data[i]));
if (i < data.length - 1)