From e6c51fa3bf1f746a3413751561f48dd1963e9e3b Mon Sep 17 00:00:00 2001 From: Doug Felt Date: Fri, 5 May 2006 19:19:15 +0000 Subject: [PATCH] ICU-5051 swat deprecated (two additional files, tool change) X-SVN-Rev: 19617 --- .../ibm/icu/dev/tool/docs/SwatDeprecated.java | 20 +++++++++++++------ icu4j/src/com/ibm/icu/text/DecimalFormat.java | 14 ++++++------- .../text/DictionaryBasedBreakIterator.java | 7 +++---- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/icu4j/src/com/ibm/icu/dev/tool/docs/SwatDeprecated.java b/icu4j/src/com/ibm/icu/dev/tool/docs/SwatDeprecated.java index f4aaea30638..e6ebe60c643 100644 --- a/icu4j/src/com/ibm/icu/dev/tool/docs/SwatDeprecated.java +++ b/icu4j/src/com/ibm/icu/dev/tool/docs/SwatDeprecated.java @@ -7,6 +7,8 @@ package com.ibm.icu.dev.tool.docs; import java.io.*; +import java.text.SimpleDateFormat; +import java.util.Date; public class SwatDeprecated { private File srcFile; @@ -20,6 +22,7 @@ public class SwatDeprecated { private int verbosity; private int cc; // changed file count private boolean inPlace; + private String copyYear; private PrintWriter pw = new PrintWriter(System.out); @@ -84,6 +87,7 @@ public class SwatDeprecated { this.dstFile = new File(dst); this.overwrite = overwrite; this.verbosity = verbosity; + this.copyYear = new SimpleDateFormat("yyyy").format(new Date()); this.srcTag = "@deprecated This is a draft API and might change in a future release of ICU."; this.trgTag = "@provisional This API might change or be removed in a future release."; @@ -207,7 +211,7 @@ public class SwatDeprecated { ++tc; } else if (n < 20) { - // swat copyrights while we're at it + // swat copyrights in the first 20 lines while we're at it ix = line.indexOf("opyright"); if (ix != -1) { String nline = null; @@ -217,27 +221,31 @@ public class SwatDeprecated { } ix = line.indexOf("-200"); if (ix != -1) { - nline = line.substring(0, ix) + "-2006" + line.substring(ix+5); + nline = line.substring(0, ix) + "-" + copyYear + line.substring(ix+5); break; } ix = line.indexOf("- 200"); if (ix != -1) { - nline = line.substring(0, ix) + "-2006" + line.substring(ix+6); + nline = line.substring(0, ix) + "-" + copyYear + line.substring(ix+6); break; } ix = line.indexOf("-199"); if (ix != -1) { - nline = line.substring(0, ix) + "-2006" + line.substring(ix+5); + nline = line.substring(0, ix) + "-" + copyYear + line.substring(ix+5); break; } + ix = line.indexOf(copyYear); + if (ix != -1) { + break; // nothing needs changing + } ix = line.indexOf("200"); if (ix != -1) { - nline = line.substring(0, ix) + "2006" + line.substring(ix+4); + nline = line.substring(0, ix+4) + "-" + copyYear + line.substring(ix+4); break; } ix = line.indexOf("199"); if (ix != -1) { - nline = line.substring(0, ix) + "2006" + line.substring(ix+4); + nline = line.substring(0, ix+4) + "-" + copyYear + line.substring(ix+4); break; } } while (false); diff --git a/icu4j/src/com/ibm/icu/text/DecimalFormat.java b/icu4j/src/com/ibm/icu/text/DecimalFormat.java index c1704a7b9a8..792a5573f88 100755 --- a/icu4j/src/com/ibm/icu/text/DecimalFormat.java +++ b/icu4j/src/com/ibm/icu/text/DecimalFormat.java @@ -2307,7 +2307,7 @@ public class DecimalFormat extends NumberFormat { * @see #getRoundingMode * @see #setRoundingMode * @draft ICU 3.4.2 - * @deprecated This is a draft API and might change in a future release of ICU. + * @provisional This API might change or be removed in a future release. */ public void setRoundingIncrement(BigDecimal newValue) { int i = newValue == null @@ -3840,7 +3840,7 @@ public class DecimalFormat extends NumberFormat { * returns true. * @return the fewest significant digits that will be shown * @draft ICU 3.0 - * @deprecated This is a draft API and might change in a future release of ICU. + * @provisional This API might change or be removed in a future release. */ public int getMinimumSignificantDigits() { return minSignificantDigits; @@ -3852,7 +3852,7 @@ public class DecimalFormat extends NumberFormat { * returns true. * @return the most significant digits that will be shown * @draft ICU 3.0 - * @deprecated This is a draft API and might change in a future release of ICU. + * @provisional This API might change or be removed in a future release. */ public int getMaximumSignificantDigits() { return maxSignificantDigits; @@ -3866,7 +3866,7 @@ public class DecimalFormat extends NumberFormat { * value has no effect unless areSignificantDigitsUsed() returns true. * @param min the fewest significant digits to be shown * @draft ICU 3.0 - * @deprecated This is a draft API and might change in a future release of ICU. + * @provisional This API might change or be removed in a future release. */ public void setMinimumSignificantDigits(int min) { if (min < 1) { @@ -3886,7 +3886,7 @@ public class DecimalFormat extends NumberFormat { * value has no effect unless areSignificantDigitsUsed() returns true. * @param max the most significant digits to be shown * @draft ICU 3.0 - * @deprecated This is a draft API and might change in a future release of ICU. + * @provisional This API might change or be removed in a future release. */ public void setMaximumSignificantDigits(int max) { if (max < 1) { @@ -3903,7 +3903,7 @@ public class DecimalFormat extends NumberFormat { * integer and fraction digit counts are in use. * @return true if significant digits are in use * @draft ICU 3.0 - * @deprecated This is a draft API and might change in a future release of ICU. + * @provisional This API might change or be removed in a future release. */ public boolean areSignificantDigitsUsed() { return useSignificantDigits; @@ -3915,7 +3915,7 @@ public class DecimalFormat extends NumberFormat { * @param useSignificantDigits true to use significant digits, or * false to use integer and fraction digit counts * @draft ICU 3.0 - * @deprecated This is a draft API and might change in a future release of ICU. + * @provisional This API might change or be removed in a future release. */ public void setSignificantDigitsUsed(boolean useSignificantDigits) { this.useSignificantDigits = useSignificantDigits; diff --git a/icu4j/src/com/ibm/icu/text/DictionaryBasedBreakIterator.java b/icu4j/src/com/ibm/icu/text/DictionaryBasedBreakIterator.java index f47f7d02c4e..5f31f1a3c22 100755 --- a/icu4j/src/com/ibm/icu/text/DictionaryBasedBreakIterator.java +++ b/icu4j/src/com/ibm/icu/text/DictionaryBasedBreakIterator.java @@ -1,6 +1,6 @@ /* ******************************************************************************* - * Copyright (C) 1996-2005, International Business Machines Corporation and * + * Copyright (C) 1996-2006, International Business Machines Corporation and * * others. All Rights Reserved. * ******************************************************************************* */ @@ -246,7 +246,7 @@ public class DictionaryBasedBreakIterator extends RuleBasedBreakIterator { * @return the status from the break rule that determined the most recently * returned break position. * @draft ICU 3.0 - * @deprecated This is a draft API and might change in a future release of ICU. + * @provisional This API might change or be removed in a future release. */ public int getRuleStatus() { return 0; @@ -268,7 +268,7 @@ public class DictionaryBasedBreakIterator extends RuleBasedBreakIterator { * is the total number of status values that were available, * not the reduced number that were actually returned. * @draft ICU 3.0 - * @deprecated This is a draft API and might change in a future release of ICU. + * @provisional This API might change or be removed in a future release. */ public int getRuleStatusVec(int[] fillInArray) { if (fillInArray != null && fillInArray.length>=1) { @@ -519,5 +519,4 @@ public class DictionaryBasedBreakIterator extends RuleBasedBreakIterator { } positionInCache = 0; } - }