cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jasongin <...@git.apache.org>
Subject [GitHub] cordova-plugin-camera pull request: CB-9960 android: Fixed FileNot...
Date Fri, 06 Nov 2015 01:13:23 GMT
Github user jasongin commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-camera/pull/135#discussion_r44093297
  
    --- Diff: src/android/CameraLauncher.java ---
    @@ -547,7 +547,7 @@ private String ouputModifiedBitmap(Bitmap bitmap, Uri uri) throws
IOException {
             String realPath = FileHelper.getRealPath(uri, this.cordova);
     
             // Get filename from uri
    -        String fileName = realPath != null ?
    +        String fileName = realPath != null && !realPath.isEmpty() ?
    --- End diff --
    
    This is fine, but you may also consider [TextUtils.isEmpty(realPath)] (http://developer.android.com/reference/android/text/TextUtils.html#isEmpty(java.lang.CharSequence))
-- that is the recommended way in Android to check if a string is null or empty.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message