You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2016/06/29 21:16:00 UTC
[1/2] cordova-plugin-network-information git commit: fixed two
potential memory leaks when doing Analyze on iOS 9
Repository: cordova-plugin-network-information
Updated Branches:
refs/heads/master 83e870bf4 -> 3ded941ff
fixed two potential memory leaks when doing Analyze on iOS 9
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/commit/3ded941f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/tree/3ded941f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/diff/3ded941f
Branch: refs/heads/master
Commit: 3ded941ff31db832f0b1ffa97cacb65350ca34c5
Parents: da7e85e
Author: allenconquest <al...@valexa.com>
Authored: Tue Apr 19 15:40:05 2016 +0100
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Wed Jun 29 14:06:04 2016 -0700
----------------------------------------------------------------------
src/ios/CDVReachability.m | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/blob/3ded941f/src/ios/CDVReachability.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVReachability.m b/src/ios/CDVReachability.m
index c60261a..1399867 100644
--- a/src/ios/CDVReachability.m
+++ b/src/ios/CDVReachability.m
@@ -142,6 +142,9 @@ static void CDVReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkRe
retVal->reachabilityRef = reachability;
retVal->localWiFiRef = NO;
}
+ else {
+ CFRelease(reachability);
+ }
}
return retVal;
}
@@ -156,6 +159,9 @@ static void CDVReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkRe
retVal->reachabilityRef = reachability;
retVal->localWiFiRef = NO;
}
+ else {
+ CFRelease(reachability);
+ }
}
return retVal;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[2/2] cordova-plugin-network-information git commit: CB-11384
android: Does not pass sonarqube scan
Posted by pu...@apache.org.
CB-11384 android: Does not pass sonarqube scan
The problem is "Empty Catch Block", which sonarqube considers a blocker. Added
a log message to the empty block.
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/commit/da7e85ec
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/tree/da7e85ec
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/diff/da7e85ec
Branch: refs/heads/master
Commit: da7e85ec92a200ffb60cdb25827d58dce3bef8f2
Parents: 83e870b
Author: Rob Close <ro...@sap.com>
Authored: Mon Jun 6 15:13:13 2016 -0400
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Wed Jun 29 14:06:04 2016 -0700
----------------------------------------------------------------------
src/android/NetworkManager.java | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/blob/da7e85ec/src/android/NetworkManager.java
----------------------------------------------------------------------
diff --git a/src/android/NetworkManager.java b/src/android/NetworkManager.java
index 59965bd..29066fa 100755
--- a/src/android/NetworkManager.java
+++ b/src/android/NetworkManager.java
@@ -127,7 +127,9 @@ public class NetworkManager extends CordovaPlugin {
String connectionType = "";
try {
connectionType = this.getConnectionInfo(info).get("type").toString();
- } catch (JSONException e) { }
+ } catch (JSONException e) {
+ Log.d(LOG_TAG, e.getLocalizedMessage());
+ }
PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, connectionType);
pluginResult.setKeepCallback(true);
@@ -171,7 +173,9 @@ public class NetworkManager extends CordovaPlugin {
String connectionType = "";
try {
connectionType = thisInfo.get("type").toString();
- } catch (JSONException e) { }
+ } catch (JSONException e) {
+ Log.d(LOG_TAG, e.getLocalizedMessage());
+ }
sendUpdate(connectionType);
lastInfo = thisInfo;
@@ -206,7 +210,9 @@ public class NetworkManager extends CordovaPlugin {
try {
connectionInfo.put("type", type);
connectionInfo.put("extraInfo", extraInfo);
- } catch (JSONException e) { }
+ } catch (JSONException e) {
+ Log.d(LOG_TAG, e.getLocalizedMessage());
+ }
return connectionInfo;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org