Re: svn commit: r926940 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/PrimaryKeyFinder.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r926940 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/PrimaryKeyFinder.java

Adam Heath-2
[hidden email] wrote:

> Author: adrianc
> Date: Wed Mar 24 05:52:51 2010
> New Revision: 926940
>
> URL: http://svn.apache.org/viewvc?rev=926940&view=rev
> Log:
> Compiler warning and spelling fixups in PrimaryKeyFinder.java. No functional change.
>
> Modified:
>     ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/PrimaryKeyFinder.java
>
> Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/PrimaryKeyFinder.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/PrimaryKeyFinder.java?rev=926940&r1=926939&r2=926940&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/PrimaryKeyFinder.java (original)
> +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/PrimaryKeyFinder.java Wed Mar 24 05:52:51 2010
> @@ -41,6 +41,7 @@ import org.w3c.dom.Element;
>   * Uses the delegator to find entity values by a condition
>   *
>   */
> +@SuppressWarnings("serial")
>  public class PrimaryKeyFinder extends Finder {
>      public static final String module = PrimaryKeyFinder.class.getName();
>  
> @@ -99,9 +100,9 @@ public class PrimaryKeyFinder extends Fi
>          if (autoFieldMap) {
>              GenericValue tempVal = delegator.makeValue(modelEntity.getEntityName());
>  
> -            // try a map called "parameters", try it first so values from here are overriden by values in the main context
> +            // try a map called "parameters", try it first so values from here are overridden by values in the main context
>              Object parametersObj = context.get("parameters");
> -            if (parametersObj != null && parametersObj instanceof Map) {
> +            if (parametersObj != null && parametersObj instanceof Map<?, ?>) {
>                  tempVal.setAllFields(UtilGenerics.checkMap(parametersObj), true, null, Boolean.TRUE);
>              }

Again, and this is for everyone, if you are doing an instanceof, the
null check is not required.