mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-11 05:59:52 +00:00
8321958: @param/@return descriptions of ZoneRules#isDaylightSavings() are incorrect
Reviewed-by: jlu, joehw, jpai
This commit is contained in:
parent
05f7f0ade2
commit
87ef73329f
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -828,9 +828,9 @@ public final class ZoneRules implements Serializable {
|
||||
* This default implementation compares the {@link #getOffset(java.time.Instant) actual}
|
||||
* and {@link #getStandardOffset(java.time.Instant) standard} offsets.
|
||||
*
|
||||
* @param instant the instant to find the offset information for, not null, but null
|
||||
* @param instant the instant to check the daylight savings for, not null, but null
|
||||
* may be ignored if the rules have a single offset for all instants
|
||||
* @return the standard offset, not null
|
||||
* @return true if the specified instant is in daylight savings, false otherwise.
|
||||
*/
|
||||
public boolean isDaylightSavings(Instant instant) {
|
||||
return (getStandardOffset(instant).equals(getOffset(instant)) == false);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user