You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by YorkShen <gi...@git.apache.org> on 2017/06/12 04:08:00 UTC

[GitHub] incubator-weex pull request #439: * [android] Fixing clearTimeout and clearI...

GitHub user YorkShen opened a pull request:

    https://github.com/apache/incubator-weex/pull/439

    * [android] Fixing clearTimeout and clearInterval doesn't when funId is greater than 127

    Due the implementation of [int auto-boxing](https://stackoverflow.com/questions/3130311/weird-integer-boxing-in-java) and [messageQueue](https://stackoverflow.com/questions/36190851/android-os-handler-removemessages-doesnt-work-when-poxing-value-type-as-msg-obj), clearTimeout and clearTimeout won't work when funId is greater than 127. It works fine when funId is smaller than 127.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/YorkShen/incubator-weex android-bugfix-timer

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-weex/pull/439.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #439
    
----
commit 0040dcaa106de388db0b9c2ce70ce40b24a10926
Author: YorkShen <sh...@gmail.com>
Date:   2017-06-12T04:06:43Z

    * [android] Fixing clearTimeout and clearInterval doesn't when funId is greater than 127.
    
    Due the implementation of [int auto-boxing](https://stackoverflow.com/questions/3130311/weird-integer-boxing-in-java) and [messageQueue](https://stackoverflow.com/questions/36190851/android-os-handler-removemessages-doesnt-work-when-poxing-value-type-as-msg-obj), clearTimeout and clearTimeout won't work when funId is greater than 127. It works fine when funId is smaller than 127.

----


---
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.
---

[GitHub] incubator-weex pull request #439: * [android] Fixing clearTimeout and clearI...

Posted by sospartan <gi...@git.apache.org>.
Github user sospartan commented on a diff in the pull request:

    https://github.com/apache/incubator-weex/pull/439#discussion_r121316941
  
    --- Diff: android/sdk/src/main/java/com/taobao/weex/ui/module/WXTimerModule.java ---
    @@ -34,28 +39,20 @@
     import com.taobao.weex.dom.action.Actions;
     import com.taobao.weex.utils.WXJsonUtils;
     import com.taobao.weex.utils.WXLogUtils;
    -
     import java.util.ArrayList;
     import java.util.HashMap;
     
    -import static com.taobao.weex.bridge.WXBridgeManager.KEY_ARGS;
    -import static com.taobao.weex.bridge.WXBridgeManager.KEY_METHOD;
    -import static com.taobao.weex.bridge.WXBridgeManager.METHOD_CALLBACK;
    -import static com.taobao.weex.bridge.WXBridgeManager.METHOD_CALL_JS;
    -
     public class WXTimerModule extends WXModule implements Destroyable, Handler.Callback {
     
       private final static String TAG = "timer";
       private Handler handler;
    +  private SparseArray<Integer> antiIntAutoBoxing;
    --- End diff --
    
    `m` prefix?


---
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.
---

[GitHub] incubator-weex issue #439: * [android] Fixing clearTimeout and clearInterval...

Posted by YorkShen <gi...@git.apache.org>.
Github user YorkShen commented on the issue:

    https://github.com/apache/incubator-weex/pull/439
  
    https://issues.apache.org/jira/projects/WEEX/issues/WEEX-45?filter=allopenissues


---
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.
---

[GitHub] incubator-weex pull request #439: * [android] Fixing clearTimeout and clearI...

Posted by YorkShen <gi...@git.apache.org>.
Github user YorkShen commented on a diff in the pull request:

    https://github.com/apache/incubator-weex/pull/439#discussion_r121319317
  
    --- Diff: android/sdk/src/main/java/com/taobao/weex/ui/module/WXTimerModule.java ---
    @@ -34,28 +39,20 @@
     import com.taobao.weex.dom.action.Actions;
     import com.taobao.weex.utils.WXJsonUtils;
     import com.taobao.weex.utils.WXLogUtils;
    -
     import java.util.ArrayList;
     import java.util.HashMap;
     
    -import static com.taobao.weex.bridge.WXBridgeManager.KEY_ARGS;
    -import static com.taobao.weex.bridge.WXBridgeManager.KEY_METHOD;
    -import static com.taobao.weex.bridge.WXBridgeManager.METHOD_CALLBACK;
    -import static com.taobao.weex.bridge.WXBridgeManager.METHOD_CALL_JS;
    -
     public class WXTimerModule extends WXModule implements Destroyable, Handler.Callback {
     
       private final static String TAG = "timer";
       private Handler handler;
    +  private SparseArray<Integer> antiIntAutoBoxing;
    --- End diff --
    
    antiIntAutoBoxing is enough. 
    
    * JIRA is down, BTW.
    * JIRA waring is irrelevant.


---
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.
---

[GitHub] incubator-weex issue #439: * [android] Fixing clearTimeout and clearInterval...

Posted by weex-bot <gi...@git.apache.org>.
Github user weex-bot commented on the issue:

    https://github.com/apache/incubator-weex/pull/439
  
    
    <!--
      1 failure:  This PR modify SD...
      2 warning:  No Changelog chan..., This PR should up...
      1 messages
      
    -->
    
    <table>
      <thead>
        <tr>
          <th width="50"></th>
          <th width="100%" data-danger-table="true">Fails</th>
        </tr>
      </thead>
      <tbody><tr>
          <td>:no_entry_sign:</td>
          <td>This PR modify SDK code. Please add/modify corresponding testcases. If it is ok, please comment about it. Or put '@notdanger' in you commit message.</td>
        </tr>
      </tbody>
    </table>
    
    
    <table>
      <thead>
        <tr>
          <th width="50"></th>
          <th width="100%" data-danger-table="true">Warnings</th>
        </tr>
      </thead>
      <tbody><tr>
          <td>:warning:</td>
          <td>No Changelog changes!</td>
        </tr>
      
    <tr>
          <td>:warning:</td>
          <td>This PR should update related documents as well. </td>
        </tr>
      </tbody>
    </table>
    
    
    <table>
      <thead>
        <tr>
          <th width="50"></th>
          <th width="100%" data-danger-table="true">Messages</th>
        </tr>
      </thead>
      <tbody><tr>
          <td>:book:</td>
          <td>According to the blame info, we recommended @Rowandjj , @sospartan to be the reviewers.</td>
        </tr>
      </tbody>
    </table>
    
    
    <p align="right">
      Generated by :no_entry_sign: <a href="http://github.com/danger/danger-js/">dangerJS</a>
    </p>



---
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.
---

[GitHub] incubator-weex issue #439: * [android] Fixing clearTimeout and clearInterval...

Posted by YorkShen <gi...@git.apache.org>.
Github user YorkShen commented on the issue:

    https://github.com/apache/incubator-weex/pull/439
  
    * JIRA is down, BTW.
    * JIRA waring is irrelevant. I'm just fixing bug. NO document is needed.


---
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.
---

[GitHub] incubator-weex pull request #439: * [android] Fixing clearTimeout and clearI...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-weex/pull/439


---
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.
---