From 94947773b17cee9f9a9ac3fc491420d5c0901e70 Mon Sep 17 00:00:00 2001 From: Yoshito Umaoka Date: Mon, 26 Mar 2007 21:08:32 +0000 Subject: [PATCH] ICU-5664 Set the initial heap size to 96MB when running TestAll to avoid Java heap fragmentation problem on Java1.4/AIX X-SVN-Rev: 21319 --- icu4j/build.xml | 17 ++- .../com/ibm/icu/dev/tool/docs/ICUTaglet.java | 124 +++++++++--------- 2 files changed, 76 insertions(+), 65 deletions(-) diff --git a/icu4j/build.xml b/icu4j/build.xml index 327fc32d00f..eddff7fd8aa 100644 --- a/icu4j/build.xml +++ b/icu4j/build.xml @@ -556,8 +556,10 @@ - + + + @@ -571,8 +573,9 @@ - + + @@ -1794,8 +1797,10 @@ - + + + @@ -2020,6 +2025,9 @@ + + + @@ -2033,6 +2041,9 @@ + + + diff --git a/icu4j/src/com/ibm/icu/dev/tool/docs/ICUTaglet.java b/icu4j/src/com/ibm/icu/dev/tool/docs/ICUTaglet.java index 7c6eafb6a0c..f8cad0e3718 100644 --- a/icu4j/src/com/ibm/icu/dev/tool/docs/ICUTaglet.java +++ b/icu4j/src/com/ibm/icu/dev/tool/docs/ICUTaglet.java @@ -1,4 +1,4 @@ -//##header VERSION_1.5 +//##header VERSION_1.4 /** ******************************************************************************* * Copyright (C) 2002-2007, International Business Machines Corporation and * @@ -16,18 +16,18 @@ package com.ibm.icu.dev.tool.docs; import com.sun.javadoc.*; //#ifndef VERSION_1.5 -//##import com.sun.tools.doclets.*; +import com.sun.tools.doclets.*; //#endif //#ifdef VERSION_1.5 - -import com.sun.tools.doclets.internal.toolkit.taglets.*; -import com.sun.tools.doclets.internal.toolkit.taglets.Taglet; - -// jdk 1.5 contains both com.sun.tools.doclets.Taglet and -// com.sun.tools.doclets.internal.toolkit.taglets.Taglet. -// Their registration code casts to the second, not the first, and the -// second doesn't implement the first, so if you just implement the -// first, you die. +//## +//##import com.sun.tools.doclets.internal.toolkit.taglets.*; +//##import com.sun.tools.doclets.internal.toolkit.taglets.Taglet; +//## +//##// jdk 1.5 contains both com.sun.tools.doclets.Taglet and +//##// com.sun.tools.doclets.internal.toolkit.taglets.Taglet. +//##// Their registration code casts to the second, not the first, and the +//##// second doesn't implement the first, so if you just implement the +//##// first, you die. //#endif import java.text.BreakIterator; @@ -54,7 +54,7 @@ public abstract class ICUTaglet implements Taglet { ICUDraftTaglet.register(taglets); ICUStableTaglet.register(taglets); //#ifndef VERSION_1.5 -//## ICUDeprecatedTaglet.register(taglets); + ICUDeprecatedTaglet.register(taglets); //#endif ICUProvisionalTaglet.register(taglets); ICUObsoleteTaglet.register(taglets); @@ -117,22 +117,22 @@ public abstract class ICUTaglet implements Taglet { return null; } //#ifdef VERSION_1.5 - - public TagletOutput getTagletOutput(Tag tag, TagletWriter writer) throws IllegalArgumentException { - TagletOutput out = writer.getTagletOutputInstance(); - out.setOutput(toString(tag)); - return out; - } - - public TagletOutput getTagletOutput(Doc holder, TagletWriter writer) throws IllegalArgumentException { - TagletOutput out = writer.getTagletOutputInstance(); - Tag[] tags = holder.tags(getName()); - if (tags.length == 0) { - return null; - } - out.setOutput(toString(tags[0])); - return out; - } +//## +//## public TagletOutput getTagletOutput(Tag tag, TagletWriter writer) throws IllegalArgumentException { +//## TagletOutput out = writer.getTagletOutputInstance(); +//## out.setOutput(toString(tag)); +//## return out; +//## } +//## +//## public TagletOutput getTagletOutput(Doc holder, TagletWriter writer) throws IllegalArgumentException { +//## TagletOutput out = writer.getTagletOutputInstance(); +//## Tag[] tags = holder.tags(getName()); +//## if (tags.length == 0) { +//## return null; +//## } +//## out.setOutput(toString(tags[0])); +//## return out; +//## } //#endif protected static final String STATUS = "
Status:
"; @@ -194,40 +194,40 @@ public abstract class ICUTaglet implements Taglet { } } //#ifndef VERSION_1.5 -//## -//## /* -//## * sigh, in JDK 1.5 we can't override the standard deprecated taglet -//## * so easily. I'm not impressed with the javadoc code. -//## */ -//## public static class ICUDeprecatedTaglet extends ICUTaglet { -//## private static final String NAME = "deprecated"; -//## -//## public static void register(Map taglets) { -//## taglets.remove(NAME); // override standard deprecated taglet -//## taglets.put(NAME, new ICUDeprecatedTaglet()); -//## } -//## -//## private ICUDeprecatedTaglet() { -//## super(NAME, MASK_DEFAULT); -//## } -//## -//## public String toString(Tag tag) { -//## BreakIterator bi = BreakIterator.getSentenceInstance(Locale.US); -//## String text = tag.text(); -//## bi.setText(text); -//## int first = bi.first(); -//## int next = bi.next(); -//## if (first == -1 || next == -1) { -//## System.err.println("Warning: bad deprecated tag '" + text + "'"); -//## return "
Note. " + text + "
"; -//## } else { -//## if ("This API is ICU internal only.".equals(text)) { -//## return null; -//## } -//## return "
Note, " + text.substring(first, next) + ". " + text.substring(next) + "
"; -//## } -//## } -//## } + + /* + * sigh, in JDK 1.5 we can't override the standard deprecated taglet + * so easily. I'm not impressed with the javadoc code. + */ + public static class ICUDeprecatedTaglet extends ICUTaglet { + private static final String NAME = "deprecated"; + + public static void register(Map taglets) { + taglets.remove(NAME); // override standard deprecated taglet + taglets.put(NAME, new ICUDeprecatedTaglet()); + } + + private ICUDeprecatedTaglet() { + super(NAME, MASK_DEFAULT); + } + + public String toString(Tag tag) { + BreakIterator bi = BreakIterator.getSentenceInstance(Locale.US); + String text = tag.text(); + bi.setText(text); + int first = bi.first(); + int next = bi.next(); + if (first == -1 || next == -1) { + System.err.println("Warning: bad deprecated tag '" + text + "'"); + return "
Note. " + text + "
"; + } else { + if ("This API is ICU internal only.".equals(text)) { + return null; + } + return "
Note, " + text.substring(first, next) + ". " + text.substring(next) + "
"; + } + } + } //#endif public static class ICUProvisionalTaglet extends ICUTaglet {