Given that, in this instance, the parameter Map is currently expected to contain no more than one (1) entry, this isn&#39;t going to boost performance... ;-)<br><br>But, generally speaking, findbugs does a great job.<br><br>
-W<br><br><br><div class="gmail_quote">On 19 September 2011 15:09, Mauricio Salatino <span dir="ltr">&lt;<a href="mailto:salaboy@gmail.com">salaboy@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Nice one! I will try it now!<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Mon, Sep 19, 2011 at 10:07 AM, Geoffrey De Smet <span dir="ltr">&lt;<a href="mailto:ge0ffrey.spam@gmail.com" target="_blank">ge0ffrey.spam@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi guys,<br>
<br>
It&#39;s very easy to run findbugs on your module:<br>
<br>
   cd droolsjbpm/drools-core<br>
   mvn site -DskipTests<br>
   firefox target/site/findbugs.html<br>
<br>
Most of the &quot;bugs&quot; on that webpage are ignorable, but there are a couple<br>
of very interesting cases.<br>
Just look for category PERFORMANCE.<br>
<br>
<br>
For example in drools-core:<br>
   Method new<br>
org.drools.io.impl.ResourceChangeScannerConfigurationImpl(Properties)<br>
makes inefficient use of keySet iterator instead of entrySet iterator<br>
<br>
This code:<br>
     public ResourceChangeScannerConfigurationImpl(Properties properties) {<br>
         for( Object key : properties.keySet() ) {<br>
             setProperty( (String) key, (String) properties.get( key ) );<br>
         }<br>
     }<br>
should be the faster alternative:<br>
     public ResourceChangeScannerConfigurationImpl(Properties properties) {<br>
         for(Map.Entry&lt;Object, Object&gt; entry : properties.entrySet() ) {<br>
             setProperty( (String) entry.getKey(), (String)<br>
entry.getValue());<br>
         }<br>
     }<br>
<br>
--<br>
With kind regards,<br>
Geoffrey De Smet<br>
<br>
<br>
_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div></div></div><font color="#888888">-- <br> - CTO @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com</a>  <br> - MyJourney @ <a href="http://salaboy.wordpress.com" target="_blank">http://salaboy.wordpress.com</a><div>

- Co-Founder @ <a href="http://www.jugargentina.org" target="_blank">http://www.jugargentina.org</a><br> - Co-Founder @ <a href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br> <br> - Salatino &quot;Salaboy&quot; Mauricio -</div>

<br>
</font><br>_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br></blockquote></div><br>