title: Java Bean Utils to call all setters with non String types
body: <p>I am trying to call all setter method for my bean using a hashmap. The key is the property name and the value is the actual value i need to set by calling setters. Follwoing code works perfectly for string proerties but fails on non string properties like int,double etc.</p>
  
  <pre><code>        for(Map.Entry&lt;String, String&gt; entry : settings.entrySet()){
          try{
                      key = entry.getKey();
                      PropertyUtils.setProperty(bean, key, entry.getValue());
          }
          catch(Exception ex)
          {
              LOGGER.debug("failed...."+ex.getMessage());     
          }
      }
  </code></pre>
  
  <p>The above code throws exception for non String fields like int / double etc</p>
  
  <pre><code>failed....Cannot invoke setter on bean class - argument type mismatch - had objects of type "java.lang.String" but expected signature "int"
  
  failed....Cannot invoke setter on bean class - argument type mismatch - had objects of type "java.lang.String" but expected signature "double"
  </code></pre>
  
  <p>The question is: How to avoid this excepition, how to call setter successfully without having this exception.</p>