You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by GitBox <gi...@apache.org> on 2018/12/18 12:32:00 UTC

[GitHub] YorkShen closed pull request #1925: [WEEX][Android] Bugfix java.lang.NullPointerException: println needs a message

YorkShen closed pull request #1925: [WEEX][Android] Bugfix java.lang.NullPointerException: println needs a message
URL: https://github.com/apache/incubator-weex/pull/1925
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java b/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java
index e75726b6d7..2a3fd6264c 100644
--- a/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java
+++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java
@@ -72,8 +72,9 @@ public static void renderPerformanceLog(String type, long time) {
   }
 
   private static void log(String tag, String msg, LogLevel level){
-    if(msg == null || tag == null || level == null)
+    if(TextUtils.isEmpty(msg) || TextUtils.isEmpty(tag) || level == null || TextUtils.isEmpty(level.getName())){
       return;
+    }
 
     if(sLogWatcher !=null){
       sLogWatcher.onLog(level.getName(), tag, msg);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services