diff options
author | Jakub Jelinek <jakub@redhat.com> | 2012-04-03 12:58:19 +0100 |
---|---|---|
committer | Andrew John Hughes <ahughes@redhat.com> | 2012-04-03 12:58:19 +0100 |
commit | 9d9b5f5b0a9cc8607687fb484ca48cf990ad61db (patch) | |
tree | 07d3f1a2d9d90e823323b081c9f14bad1b712c3e /java/util | |
parent | 7dbf9fc8c6b98137c4db3d8a6c63e5344746fefd (diff) | |
download | classpath-9d9b5f5b0a9cc8607687fb484ca48cf990ad61db.tar.gz |
Don't check if TimeZone is an instance of SimpleTimeZone.
2007-02-26 Jakub Jelinek <jakub@redhat.com>
* java/util/TimeZone.java (getDefaultDisplayName): Don't
check if TimeZone is instanceof SimpleTimeZone.
Signed-off-by: Andrew John Hughes <ahughes@redhat.com>
Diffstat (limited to 'java/util')
-rw-r--r-- | java/util/TimeZone.java | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/java/util/TimeZone.java b/java/util/TimeZone.java index 276602e67..8436440f8 100644 --- a/java/util/TimeZone.java +++ b/java/util/TimeZone.java @@ -1404,14 +1404,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); CPStringBuilder sb = new CPStringBuilder(9); sb.append("GMT"); |