TimeZone.java (getDefaultDisplayName): Don't check if TimeZone is instanceof SimpleTimeZone.

* java/util/TimeZone.java (getDefaultDisplayName): Don't
	check if TimeZone is instanceof SimpleTimeZone.

From-SVN: r122330
This commit is contained in:
Jakub Jelinek 2007-02-26 12:01:55 +01:00 committed by Jakub Jelinek
parent 681a691966
commit 07008ce4ee
2 changed files with 6 additions and 8 deletions

View File

@ -1,3 +1,8 @@
2007-02-26 Jakub Jelinek <jakub@redhat.com>
* java/util/TimeZone.java (getDefaultDisplayName): Don't
check if TimeZone is instanceof SimpleTimeZone.
2007-02-21 Gary Benson <gbenson@redhat.com>
* java/util/GregorianCalendar.java,

View File

@ -1402,14 +1402,7 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable
private String getDefaultDisplayName(boolean dst)
{
int offset = getRawOffset();
if (dst && this instanceof SimpleTimeZone)
{
// ugly, but this is a design failure of the API:
// getDisplayName takes a dst parameter even though
// TimeZone knows nothing about daylight saving offsets.
offset += ((SimpleTimeZone) this).getDSTSavings();
}
int offset = getRawOffset() + (dst ? getDSTSavings() : 0);
StringBuffer sb = new StringBuffer(9);
sb.append("GMT");