summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim Sauer <jsauer@google.com>2017-04-27 10:49:40 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-04-27 10:49:46 +0000
commit08e69fdd4f7c5c7813c897c106523a8174185947 (patch)
treeb2e3f60df9283e84b57a490cce84dae92f60e66d
parentbf3a0dc9917a4c1e2d95ba76dd04421d842e3206 (diff)
parentf68824d25b14aaea71bc21d6723275c7dc854968 (diff)
downloadicu-08e69fdd4f7c5c7813c897c106523a8174185947.tar.gz
Merge "Deprecate internal Calendar methods." into oc-dev
-rw-r--r--android_icu4j/src/main/java/android/icu/util/Calendar.java6
-rw-r--r--tools/srcgen/resources/replacements.txt29
2 files changed, 35 insertions, 0 deletions
diff --git a/android_icu4j/src/main/java/android/icu/util/Calendar.java b/android_icu4j/src/main/java/android/icu/util/Calendar.java
index 2d304411e..c06e360f9 100644
--- a/android_icu4j/src/main/java/android/icu/util/Calendar.java
+++ b/android_icu4j/src/main/java/android/icu/util/Calendar.java
@@ -5475,6 +5475,9 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
* value from 0 to 23:59:59.999 inclusive, unless fields are out of
* range, in which case it can be an arbitrary value. This value
* reflects local zone wall time.
+ * @deprecated This method suffers from a potential integer overflow and may be removed or
+ * changed in a future release. See <a href="http://bugs.icu-project.org/trac/ticket/11632">
+ * ICU ticket #11632</a> for details.
*/
protected int computeMillisInDay() {
// Do the time portion of the conversion.
@@ -5520,6 +5523,9 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
* @param millisInDay milliseconds of the time fields; may be out
* or range.
* @return total zone offset (raw + DST) for the given moment
+ * @deprecated This method suffers from a potential integer overflow and may be removed or
+ * changed in a future release. See <a href="http://bugs.icu-project.org/trac/ticket/11632">
+ * ICU ticket #11632</a> for details.
*/
protected int computeZoneOffset(long millis, int millisInDay) {
int[] offsets = new int[2];
diff --git a/tools/srcgen/resources/replacements.txt b/tools/srcgen/resources/replacements.txt
index 554948a6b..c623ab95a 100644
--- a/tools/srcgen/resources/replacements.txt
+++ b/tools/srcgen/resources/replacements.txt
@@ -361,3 +361,32 @@
* @stable ICU 2.8
*/
--
+
+# Deprecate method.
+--method:android.icu.util.Calendar#computeZoneOffset(long,int)
+/**
+ * This method can assume EXTENDED_YEAR has been set.
+ * @param millis milliseconds of the date fields (local midnight millis)
+ * @param millisInDay milliseconds of the time fields; may be out
+ * or range.
+ * @return total zone offset (raw + DST) for the given moment
+ * @stable ICU 2.0
+ * @deprecated This method suffers from a potential integer overflow and may be removed or
+ * changed in a future release. See <a href="http://bugs.icu-project.org/trac/ticket/11632">
+ * ICU ticket #11632</a> for details.
+ */
+--
+
+# Deprecate method.
+--method:android.icu.util.Calendar#computeMillisInDay()
+/**
+ * Compute the milliseconds in the day from the fields. This is a
+ * value from 0 to 23:59:59.999 inclusive, unless fields are out of
+ * range, in which case it can be an arbitrary value. This value
+ * reflects local zone wall time.
+ * @stable ICU 2.0
+ * @deprecated This method suffers from a potential integer overflow and may be removed or
+ * changed in a future release. See <a href="http://bugs.icu-project.org/trac/ticket/11632">
+ * ICU ticket #11632</a> for details.
+ */
+--