[tor-commits] [orbot/master] matcher null pointer fix
n8fr8 at torproject.org
n8fr8 at torproject.org
Mon Jul 14 17:40:21 UTC 2014
commit 367002bf3d9ca6a1245afe8466eb7deb5087571d
Author: amoghbl1 <amoghbl1 at gmail.com>
Date: Fri Jun 20 02:20:13 2014 +0530
matcher null pointer fix
---
src/org/torproject/android/service/TorService.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/org/torproject/android/service/TorService.java b/src/org/torproject/android/service/TorService.java
index 5240f28..30bbd1a 100644
--- a/src/org/torproject/android/service/TorService.java
+++ b/src/org/torproject/android/service/TorService.java
@@ -1440,11 +1440,12 @@ public class TorService extends Service implements TorServiceConstants, TorConst
Pattern pattern = Pattern.compile(IPADDRESS_PATTERN);
Matcher matcher = null;
- if(nodeDetails!=null)
+ if(nodeDetails!=null){
matcher = pattern.matcher(nodeDetails);
- if (matcher!=null && matcher.find()) {
- Log.d(TAG, "ip: "+matcher.group());
- exitIP = matcher.group();
+ if (matcher.find()) {
+ Log.d(TAG, "ip: "+matcher.group());
+ exitIP = matcher.group();
+ }
}
}
}
More information about the tor-commits
mailing list