Name: gm110360 Date: 09/11/2002
FULL PRODUCT VERSION :
java version "1.4.1-rc"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-rc-b19)
Java HotSpot(TM) Client VM (build 1.4.1-rc-b19, mixed mode)
FULL OPERATING SYSTEM VERSION :
Microsoft Windows XP [Version 5.1.2600]
ADDITIONAL OPERATING SYSTEMS :
A DESCRIPTION OF THE PROBLEM :
Yes, I know about 4160136, and that it was closed.
I'm reopening this with a request for one of two resolutions:
(a) Either a Calendar constructor with a Date parameter, OR
(b) a setTime(Date) that returns a Calendar (instead of
(c) a setDate(Date) that returns a Calendar.
The problem today is that it's not possible to construct a
Calendar with a time in it, in one expression. This sort of
operation is needed for working with JAX/RPC, which favors
Calendar as the type for the Date/Time type.
It would be really nice to say
...(..., Calendar.getInstance().setTime(new Date()), ...);
as a single expression to pass to a JAX/RPC stub API, but
you can't do that today: You have to make a 3-step operation
Calendar temp = Calendar.getInstance();
...(..., temp, ...)
Any of the above 3 solutions would make this less clumsy to
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
EXPECTED VERSUS ACTUAL BEHAVIOR :
Expected: some way to create and set a time in a Calendar in
This bug can be reproduced always.
CUSTOMER WORKAROUND :
See description: create a Calendar, assign to a temp, set
the time in the temp, and use the temp in an expression.
(Review ID: 164308)