date.setHours has been deprecated since Java 1.1

On Jan 5, 2:42 am, bond <[email protected]> wrote:
> Yes,
> if I comment the line date.setHours(13); it works!!!
>
> Thanks!
>
> On 3 Gen, 22:38, Y2i <[email protected]> wrote:
>
>
>
>
>
>
>
> > You are using java.util.Date because if you used java.sql.Date your
> > example would not compile.
>
> > does your example work if you comment out the line below?
> > // date.setHours(13);
>
> > On Jan 3, 1:16 pm, bond <[email protected]> wrote:
>
> > > Hi,
> > > I'm usign java.util.Date!!! So the dafult constructor is present.
> > > My IDE import java.util and not java.sql package.
>
> > > Any ideas?
>
> > > Thanks!
>
> > > On 30 Dic 2010, 22:49, Y2i <[email protected]> wrote:
>
> > > > java.sql.Date does not have a default constructor, so the example
> > > > won't compile; it must be something different.
>
> > > > BTW, I copied the three lines above to my client code: there is no
> > > > problem with compiling and running it using java.util.Date and GWT
> > > > 2.1.1.
>
> > > > On Dec 30, 1:31 pm, Slava Lovkiy <[email protected]> wrote:
>
> > > > > Is this error happing in old code or newly created?
> > > > > Check the package name in the import of the file, there is a chance
> > > > > your IDE auto-imported class Date not from java.util but from java.sql
> > > > > package.
>
> > > > > On Dec 31, 2:17 am, bond <[email protected]> wrote:
>
> > > > > > Hi,
> > > > > > with the last version of GWT (2.1.1); in the client when I'm using
> > > > > > this code:
> > > > > > Date date = new Date();
> > > > > > date.setHours(13);
> > > > > > date.setMinutes(00);
>
> > > > > > throw this exception:
>
> > > > > > java.lang.IllegalArgumentException: null
> > > > > >     at java.sql.Date.setHours(Unknown Source)
>
> > > > > > I think that the problem is linked to the fact that now 
> > > > > > java.sql.Date
> > > > > > is implemented in Gwt.
> > > > > > How I can resolve the problem?
>
> > > > > > Thanks very much
>
> > > > > > Best regards

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to