weex-bot commented on issue #3081: Merge Release/20190925 into master
URL: https://github.com/apache/incubator-weex/pull/3081#issuecomment-565944691
 
 
   
   <!--
     4 failure:  AndroidLint Result, <section class="s..., AndroidLint Result, 
<section class="s...
     0 warning: 
     
     
     DangerID: danger-id-androidlint;
   -->
   
   <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>AndroidLint Result</td>
       </tr>
     
   <tr>
         <td>:no_entry_sign:</td>
         <td>
   
     <section class="section--center mdl-grid mdl-grid--no-spacing 
mdl-shadow--2dp" id="UseSparseArraysCard" style="display: block;">
               <div class="mdl-card mdl-cell mdl-cell--12-col">
     <div class="mdl-card__title">
       <h2 class="mdl-card__title-text">HashMap can be replaced with 
SparseArray</h2>
     </div>
                 <div class="mdl-card__supporting-text">
   <div class="issue">
   <div class="warningslist">
   <span class="location"><a 
href="../../src/main/java/org/apache/weex/jsEngine/JSEngine.java">../../src/main/java/org/apache/weex/jsEngine/JSEngine.java</a>:91</span>:
 <span class="message">Use <code>new 
android.support.v4.util.LongSparseArray(...)</code> instead for better 
performance</span><br /><pre class="errorlines">
   <span class="lineno">  88 </span>            
next.getValue().error(ERROR_JSENGINE_CRASHED);
   <span class="lineno">  89 </span>        }
   <span class="lineno">  90 </span>
   <span class="caretline"><span class="lineno">  91 </span>        
HashMap&lt;Long, JSContext> map = <span class="warning"><span 
class="keyword">new</span> 
HashMap&lt;>(mCreatedJSContext)</span>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
   <span class="lineno">  92 </span>        mCreatedJSContext.clear();
   <span class="lineno">  93 </span>        <span class="keyword">for</span> 
(Map.Entry&lt;Long, JSContext> next : map.entrySet()) {
   <span class="lineno">  94 </span>            JSContext value = 
next.getValue();
   </pre>
   
   <span class="location"><a 
href="../../src/main/java/org/apache/weex/jsEngine/JSEngine.java">../../src/main/java/org/apache/weex/jsEngine/JSEngine.java</a>:91</span>:
 <span class="message">Use <code>new 
android.support.v4.util.LongSparseArray(...)</code> instead for better 
performance</span><br /><pre class="errorlines">
   <span class="lineno">  88 </span>            
next.getValue().error(ERROR_JSENGINE_CRASHED);
   <span class="lineno">  89 </span>        }
   <span class="lineno">  90 </span>
   <span class="caretline"><span class="lineno">  91 </span>        
HashMap&lt;Long, JSContext> map = <span class="warning"><span 
class="keyword">new</span> 
HashMap&lt;>(mCreatedJSContext)</span>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
   <span class="lineno">  92 </span>        mCreatedJSContext.clear();
   <span class="lineno">  93 </span>        <span class="keyword">for</span> 
(Map.Entry&lt;Long, JSContext> next : map.entrySet()) {
   <span class="lineno">  94 </span>            JSContext value = 
next.getValue();
   </pre>
   
   </div>
   <div class="metadata"><div class="explanation" 
id="explanationUseSparseArrays" style="display: none;">
   For maps where the keys are of type integer, it's typically more efficient 
to use the Android <code>SparseArray</code> API. This check identifies 
scenarios where you might want to consider using <code>SparseArray</code> 
instead of <code>HashMap</code> for better performance.<br/>
   <br/>
   This is <b>particularly</b> useful when the value types are primitives like 
ints, where you can use <code>SparseIntArray</code> and avoid auto-boxing the 
values from <code>int</code> to <code>Integer</code>.<br/>
   <br/>
   If you need to construct a <code>HashMap</code> because you need to call an 
API outside of your control which requires a <code>Map</code>, you can suppress 
this warning using for example the <code>@SuppressLint</code> 
annotation.<br/>To suppress this error, use the issue id "UseSparseArrays" as 
explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> 
section.<br/>
   <br/></div>
   </div>
   </div>
   <div class="chips">
   <span class="mdl-chip">
       <span class="mdl-chip__text">UseSparseArrays</span>
   </span>
   <span class="mdl-chip">
       <span class="mdl-chip__text">Performance</span>
   </span>
   <span class="mdl-chip">
       <span class="mdl-chip__text">Warning</span>
   </span>
   <span class="mdl-chip">
       <span class="mdl-chip__text">Priority 4/10</span>
   </span>
   </div>
                 </div>
                 <div class="mdl-card__actions mdl-card--border">
   <button class="mdl-button mdl-js-button mdl-js-ripple-effect" 
id="explanationUseSparseArraysLink" 
onclick="reveal('explanationUseSparseArrays');">
   Explain</button><button class="mdl-button mdl-js-button 
mdl-js-ripple-effect" id="UseSparseArraysCardLink" 
onclick="hideid('UseSparseArraysCard');">
   Dismiss</button>            </div>
               </div>
             
     </td>
       </tr>
     
   <tr>
         <td>:no_entry_sign:</td>
         <td>AndroidLint Result</td>
       </tr>
     
   <tr>
         <td>:no_entry_sign:</td>
         <td>
   
     <section class="section--center mdl-grid mdl-grid--no-spacing 
mdl-shadow--2dp" id="UseSparseArraysCard" style="display: block;">
               <div class="mdl-card mdl-cell mdl-cell--12-col">
     <div class="mdl-card__title">
       <h2 class="mdl-card__title-text">HashMap can be replaced with 
SparseArray</h2>
     </div>
                 <div class="mdl-card__supporting-text">
   <div class="issue">
   <div class="warningslist">
   <span class="location"><a 
href="../../src/main/java/org/apache/weex/jsEngine/JSEngine.java">../../src/main/java/org/apache/weex/jsEngine/JSEngine.java</a>:91</span>:
 <span class="message">Use <code>new 
android.support.v4.util.LongSparseArray(...)</code> instead for better 
performance</span><br /><pre class="errorlines">
   <span class="lineno">  88 </span>            
next.getValue().error(ERROR_JSENGINE_CRASHED);
   <span class="lineno">  89 </span>        }
   <span class="lineno">  90 </span>
   <span class="caretline"><span class="lineno">  91 </span>        
HashMap&lt;Long, JSContext> map = <span class="warning"><span 
class="keyword">new</span> 
HashMap&lt;>(mCreatedJSContext)</span>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
   <span class="lineno">  92 </span>        mCreatedJSContext.clear();
   <span class="lineno">  93 </span>        <span class="keyword">for</span> 
(Map.Entry&lt;Long, JSContext> next : map.entrySet()) {
   <span class="lineno">  94 </span>            JSContext value = 
next.getValue();
   </pre>
   
   <span class="location"><a 
href="../../src/main/java/org/apache/weex/jsEngine/JSEngine.java">../../src/main/java/org/apache/weex/jsEngine/JSEngine.java</a>:91</span>:
 <span class="message">Use <code>new 
android.support.v4.util.LongSparseArray(...)</code> instead for better 
performance</span><br /><pre class="errorlines">
   <span class="lineno">  88 </span>            
next.getValue().error(ERROR_JSENGINE_CRASHED);
   <span class="lineno">  89 </span>        }
   <span class="lineno">  90 </span>
   <span class="caretline"><span class="lineno">  91 </span>        
HashMap&lt;Long, JSContext> map = <span class="warning"><span 
class="keyword">new</span> 
HashMap&lt;>(mCreatedJSContext)</span>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
   <span class="lineno">  92 </span>        mCreatedJSContext.clear();
   <span class="lineno">  93 </span>        <span class="keyword">for</span> 
(Map.Entry&lt;Long, JSContext> next : map.entrySet()) {
   <span class="lineno">  94 </span>            JSContext value = 
next.getValue();
   </pre>
   
   </div>
   <div class="metadata"><div class="explanation" 
id="explanationUseSparseArrays" style="display: none;">
   For maps where the keys are of type integer, it's typically more efficient 
to use the Android <code>SparseArray</code> API. This check identifies 
scenarios where you might want to consider using <code>SparseArray</code> 
instead of <code>HashMap</code> for better performance.<br/>
   <br/>
   This is <b>particularly</b> useful when the value types are primitives like 
ints, where you can use <code>SparseIntArray</code> and avoid auto-boxing the 
values from <code>int</code> to <code>Integer</code>.<br/>
   <br/>
   If you need to construct a <code>HashMap</code> because you need to call an 
API outside of your control which requires a <code>Map</code>, you can suppress 
this warning using for example the <code>@SuppressLint</code> 
annotation.<br/>To suppress this error, use the issue id "UseSparseArrays" as 
explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> 
section.<br/>
   <br/></div>
   </div>
   </div>
   <div class="chips">
   <span class="mdl-chip">
       <span class="mdl-chip__text">UseSparseArrays</span>
   </span>
   <span class="mdl-chip">
       <span class="mdl-chip__text">Performance</span>
   </span>
   <span class="mdl-chip">
       <span class="mdl-chip__text">Warning</span>
   </span>
   <span class="mdl-chip">
       <span class="mdl-chip__text">Priority 4/10</span>
   </span>
   </div>
                 </div>
                 <div class="mdl-card__actions mdl-card--border">
   <button class="mdl-button mdl-js-button mdl-js-ripple-effect" 
id="explanationUseSparseArraysLink" 
onclick="reveal('explanationUseSparseArrays');">
   Explain</button><button class="mdl-button mdl-js-button 
mdl-js-ripple-effect" id="UseSparseArraysCardLink" 
onclick="hideid('UseSparseArraysCard');">
   Dismiss</button>            </div>
               </div>
             
     </td>
       </tr>
     </tbody>
   </table>
   
   
   
   
   <p align="right">
     Generated by :no_entry_sign: <a 
href="https://danger.systems/js";>dangerJS</a> against 
64f39de79e3c67d5b3395dd64f636f96f851d7bf
   </p>
   

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


With regards,
Apache Git Services

Reply via email to