Re: [jdbi-scm] [287] trunk/src/test/org/skife/jdbi/v2: changes per code review

View: New views
1 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: [jdbi-scm] [287] trunk/src/test/org/skife/jdbi/v2: changes per code review

by Brian McCallister :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>   private Number getNumber(Object name)
> @@ -322,7 +266,7 @@
>   if ( obj != null && obj instanceof Number) {
>   return (Number) obj ;
>   }
> - return null;
> + throw new IllegalArgumentException("Parameter result not a number or doesn't exist");
>   }

Would be good to split the or on this (two different messages). Would
also be good to include the name/position in the error message.

>
>   private Long getEpoch(Object name)
> @@ -331,7 +275,7 @@
>   if ( obj != null && obj instanceof java.util.Date) {
>   return ((java.util.Date) obj).getTime() ;
>   }
> - return null;
> + throw new IllegalArgumentException("Parameter result not a Date or doesn't exist");
>   }
>   }
>  }

Same as above.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email