Index: java/beans/BeanDescriptor.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/beans/BeanDescriptor.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- java/beans/BeanDescriptor.java 26 Dec 2003 19:39:54 -0000 1.6 +++ java/beans/BeanDescriptor.java 8 Mar 2004 23:15:49 -0000 1.7 @@ -1,5 +1,5 @@ /* java.beans.BeanDescriptor - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -67,6 +67,14 @@ public BeanDescriptor(Class beanClass, Class customizerClass) { this.beanClass = beanClass; this.customizerClass = customizerClass; + + // Set the FeatureDescriptor programmatic name. + String name = beanClass.getName(); + int lastInd = name.lastIndexOf('.'); + if (lastInd != -1) + name = name.substring(lastInd + 1); + + setName(name); } /** Get the Bean's class. **/ Index: java/io/BufferedInputStream.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/io/BufferedInputStream.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- java/io/BufferedInputStream.java 22 Jan 2002 22:26:59 -0000 1.10 +++ java/io/BufferedInputStream.java 9 Mar 2004 07:48:56 -0000 1.11 @@ -103,6 +103,19 @@ protected int marklimit = 0; /** + * This is the maximum size we have to allocate for the mark buffer. + * This number may be huge (Integer.MAX_VALUE). The class will continue + * to allocate new chunks (specified by CHUNKSIZE) until the + * the size specified by this field is achieved. + */ + private int marktarget = 0; + + /** + * This is the number of bytes to allocate to reach marktarget. + */ + static final private int CHUNKSIZE = 1024; + + /** * This method initializes a new BufferedInputStream that will * read from the specified subordinate stream with a default buffer size * of 2048 bytes @@ -183,7 +196,9 @@ */ public synchronized void mark(int readlimit) { - marklimit = readlimit; + marktarget = marklimit = readlimit; + if (marklimit > CHUNKSIZE) + marklimit = CHUNKSIZE; markpos = pos; } @@ -216,7 +231,7 @@ if (pos >= count && !refill()) return -1; // EOF - if (markpos >= 0 && pos - markpos > marklimit) + if (markpos >= 0 && pos - markpos > marktarget) markpos = -1; return ((int) buf[pos++]) & 0xFF; @@ -255,7 +270,7 @@ System.arraycopy(buf, pos, b, off, remain); pos += remain; - if (markpos >= 0 && pos - markpos > marklimit) + if (markpos >= 0 && pos - markpos > marktarget) markpos = -1; return remain; @@ -309,7 +324,7 @@ pos += numread; n -= numread; - if (markpos >= 0 && pos - markpos > marklimit) + if (markpos >= 0 && pos - markpos > marktarget) markpos = -1; } @@ -337,13 +352,16 @@ pos -= markpos; markpos = 0; } - else if (marklimit >= buf.length) // BTW, markpos == 0 + else if (marktarget >= buf.length && marklimit < marktarget) // BTW, markpos == 0 { // Need to grow the buffer now to have room for marklimit bytes. // Note that the new buffer is one greater than marklimit. // This is so that there will be one byte past marklimit to be read // before having to call refill again, thus allowing marklimit to be // invalidated. That way refill doesn't have to check marklimit. + marklimit += CHUNKSIZE; + if (marklimit >= marktarget) + marklimit = marktarget; byte[] newbuf = new byte[marklimit + 1]; System.arraycopy(buf, 0, newbuf, 0, count); buf = newbuf; Index: java/text/AttributedString.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/text/AttributedString.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- java/text/AttributedString.java 22 Jan 2002 22:27:01 -0000 1.4 +++ java/text/AttributedString.java 8 Mar 2004 23:27:04 -0000 1.5 @@ -1,5 +1,5 @@ /* AttributedString.java -- Models text with attributes - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -39,6 +39,7 @@ package java.text; import java.util.Iterator; +import java.util.HashMap; import java.util.Hashtable; import java.util.HashSet; import java.util.Map; @@ -329,7 +330,7 @@ * of the string. * * @param attrib The attribute to add. - * @param value The value of the attribute. + * @param value The value of the attribute, which may be null. * @param begin_index The beginning index of the subrange. * @param end_index The ending index of the subrange. * @@ -342,10 +343,10 @@ if (attrib == null) throw new IllegalArgumentException("null attribute"); - Hashtable ht = new Hashtable(); - ht.put(attrib, value); + HashMap hm = new HashMap(); + hm.put(attrib, value); - addAttributes(ht, begin_index, end_index); + addAttributes(hm, begin_index, end_index); } /*************************************************************************/ Index: java/text/DateFormatSymbols.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/text/DateFormatSymbols.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- java/text/DateFormatSymbols.java 17 Aug 2003 00:25:56 -0000 1.9 +++ java/text/DateFormatSymbols.java 8 Mar 2004 23:23:04 -0000 1.10 @@ -1,4 +1,4 @@ -/* ChoiceFormat.java -- Format over a range of numbers +/* DateFormatSymbols.java -- Format over a range of numbers Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath.