Import GNU Classpath (classpath-0_97_2-release).
libjava/ 2008-06-28 Matthias Klose <doko@ubuntu.com> Import GNU Classpath (classpath-0_97_2-release). * Regenerate class and header files. * Regenerate auto* files. * gcj/javaprims.h: Define jobjectRefType. * jni.cc (_Jv_JNI_GetObjectRefType): New (stub only). (_Jv_JNIFunctions): Initialize GetObjectRefType. * gnu/classpath/jdwp/VMVirtualMachine.java, java/security/VMSecureRandom.java: Merge from classpath. * HACKING: Fix typo. * ChangeLog-2007: New file. * configure.ac: Set JAVAC, pass --disable-regen-headers to classpath. libjava/classpath/ 2008-06-28 Matthias Klose <doko@ubuntu.com> * m4/ac_prog_javac.m4: Disable check for JAVAC, when not configured with --enable-java-maintainer-mode. * aclocal.m4, configure: Regenerate. * native/jni/gstreamer-peer/Makefile.am: Do not link with libclasspathnative. * native/jni/gstreamer-peer/Makefile.in: Regenerate. * tools/Makefile.am, lib/Makefile.am: Use JAVAC for setting JCOMPILER, drop flags not understood by gcj. From-SVN: r137223
This commit is contained in:
@@ -114,10 +114,10 @@ public class ChoiceFormat extends NumberFormat
|
||||
|
||||
if (index == max)
|
||||
throw new IllegalArgumentException ("unexpected end of text");
|
||||
Double d = new Double (newPattern.substring(dstart, index));
|
||||
Double d = Double.valueOf (newPattern.substring(dstart, index));
|
||||
|
||||
if (newPattern.charAt(index) == '<')
|
||||
d = new Double (nextDouble (d.doubleValue()));
|
||||
d = Double.valueOf (nextDouble (d.doubleValue()));
|
||||
|
||||
limitVec.addElement(d);
|
||||
|
||||
@@ -404,11 +404,11 @@ public class ChoiceFormat extends NumberFormat
|
||||
if (sourceStr.startsWith(choiceFormats[i], index))
|
||||
{
|
||||
pos.setIndex(index + choiceFormats[i].length());
|
||||
return new Double (choiceLimits[i]);
|
||||
return Double.valueOf (choiceLimits[i]);
|
||||
}
|
||||
}
|
||||
pos.setErrorIndex(index);
|
||||
return new Double (Double.NaN);
|
||||
return Double.valueOf (Double.NaN);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -73,7 +73,7 @@ public final class CollationElementIterator
|
||||
/**
|
||||
* This is the String that is being iterated over.
|
||||
*/
|
||||
String text;
|
||||
CharacterIterator text;
|
||||
|
||||
/**
|
||||
* This is the index into the collation decomposition where we are currently scanning.
|
||||
@@ -111,6 +111,21 @@ public final class CollationElementIterator
|
||||
setText (text);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method initializes a new instance of <code>CollationElementIterator</code>
|
||||
* to iterate over the specified <code>String</code> using the rules in the
|
||||
* specified <code>RuleBasedCollator</code>.
|
||||
*
|
||||
* @param collator The <code>RuleBasedCollation</code> used for calculating collation values
|
||||
* @param text The character iterator to iterate over.
|
||||
*/
|
||||
CollationElementIterator(RuleBasedCollator collator, CharacterIterator text)
|
||||
{
|
||||
this.collator = collator;
|
||||
|
||||
setText (text);
|
||||
}
|
||||
|
||||
RuleBasedCollator.CollationElement nextBlock()
|
||||
{
|
||||
if (index >= text_decomposition.length)
|
||||
@@ -246,7 +261,7 @@ public final class CollationElementIterator
|
||||
int alreadyExpanded = 0;
|
||||
int idxToMove = 0;
|
||||
|
||||
this.text = text;
|
||||
this.text = new StringCharacterIterator(text);
|
||||
this.index = 0;
|
||||
|
||||
String work_text = text.intern();
|
||||
@@ -440,7 +455,7 @@ public final class CollationElementIterator
|
||||
if (offset < 0)
|
||||
throw new IllegalArgumentException("Negative offset: " + offset);
|
||||
|
||||
if (offset > (text.length() - 1))
|
||||
if (offset > (text.getEndIndex() - 1))
|
||||
throw new IllegalArgumentException("Offset too large: " + offset);
|
||||
|
||||
for (index = 0; index < text_decomposition.length; index++)
|
||||
|
||||
@@ -716,15 +716,15 @@ public class DecimalFormat extends NumberFormat
|
||||
if (this.parseBigDecimal)
|
||||
{
|
||||
if (isNegative)
|
||||
return new BigDecimal(Double.NEGATIVE_INFINITY);
|
||||
return BigDecimal.valueOf(Double.NEGATIVE_INFINITY);
|
||||
|
||||
return new BigDecimal(Double.POSITIVE_INFINITY);
|
||||
return BigDecimal.valueOf(Double.POSITIVE_INFINITY);
|
||||
}
|
||||
|
||||
if (isNegative)
|
||||
return new Double(Double.NEGATIVE_INFINITY);
|
||||
return Double.valueOf(Double.NEGATIVE_INFINITY);
|
||||
|
||||
return new Double(Double.POSITIVE_INFINITY);
|
||||
return Double.valueOf(Double.POSITIVE_INFINITY);
|
||||
}
|
||||
|
||||
// no number...
|
||||
@@ -771,21 +771,21 @@ public class DecimalFormat extends NumberFormat
|
||||
|
||||
// want integer?
|
||||
if (this.parseIntegerOnly)
|
||||
return new Long(bigDecimal.longValue());
|
||||
return Long.valueOf(bigDecimal.longValue());
|
||||
|
||||
// 3th special case -0.0
|
||||
if (isNegative && (bigDecimal.compareTo(BigDecimal.ZERO) == 0))
|
||||
return new Double(-0.0);
|
||||
return Double.valueOf(-0.0);
|
||||
|
||||
try
|
||||
{
|
||||
BigDecimal integer
|
||||
= bigDecimal.setScale(0, BigDecimal.ROUND_UNNECESSARY);
|
||||
return new Long(integer.longValue());
|
||||
return Long.valueOf(integer.longValue());
|
||||
}
|
||||
catch (ArithmeticException e)
|
||||
{
|
||||
return new Double(bigDecimal.doubleValue());
|
||||
return Double.valueOf(bigDecimal.doubleValue());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1787,7 +1787,7 @@ public class DecimalFormat extends NumberFormat
|
||||
int endIndexFract = 0;
|
||||
|
||||
// compute the multiplier to use with percent and similar
|
||||
number = number.multiply(new BigDecimal(_multiplier));
|
||||
number = number.multiply(BigDecimal.valueOf(_multiplier));
|
||||
|
||||
// XXX: special case, not sure if it belongs here or if it is
|
||||
// correct at all. There may be other special cases as well
|
||||
|
||||
@@ -498,7 +498,7 @@ public class MessageFormat extends Format
|
||||
int position = output_iterator.getEndIndex();
|
||||
|
||||
hash_argument.put (MessageFormat.Field.ARGUMENT,
|
||||
new Integer(elements[i].argNumber));
|
||||
Integer.valueOf(elements[i].argNumber));
|
||||
|
||||
|
||||
if (iterator != null)
|
||||
@@ -630,7 +630,7 @@ public class MessageFormat extends Format
|
||||
// have recursive formatting.
|
||||
ChoiceFormat cf = (ChoiceFormat) formatter;
|
||||
String[] formats = (String[]) cf.getFormats();
|
||||
double[] limits = (double[]) cf.getLimits();
|
||||
double[] limits = cf.getLimits();
|
||||
MessageFormat subfmt = new MessageFormat ();
|
||||
subfmt.setLocale(locale);
|
||||
ParsePosition subpos = new ParsePosition (index);
|
||||
|
||||
@@ -923,17 +923,8 @@ element_loop:
|
||||
* @return A <code>CollationElementIterator</code> for the specified <code>String</code>.
|
||||
*/
|
||||
public CollationElementIterator getCollationElementIterator(CharacterIterator source)
|
||||
throws NotImplementedException // Because decomposeCharacter does not work
|
||||
{
|
||||
StringBuffer expand = new StringBuffer("");
|
||||
|
||||
// Right now we assume that we will read from the beginning of the string.
|
||||
for (char c = source.first();
|
||||
c != CharacterIterator.DONE;
|
||||
c = source.next())
|
||||
decomposeCharacter(c, expand);
|
||||
|
||||
return getCollationElementIterator(expand.toString());
|
||||
return new CollationElementIterator(this, source);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -139,9 +139,9 @@ public class SimpleDateFormat extends DateFormat
|
||||
*/
|
||||
public String toString()
|
||||
{
|
||||
StringBuffer builder;
|
||||
StringBuilder builder;
|
||||
|
||||
builder = new StringBuffer(getClass().getName());
|
||||
builder = new StringBuilder(getClass().getName());
|
||||
builder.append("[field=");
|
||||
builder.append(field);
|
||||
builder.append(", size=");
|
||||
@@ -322,7 +322,7 @@ public class SimpleDateFormat extends DateFormat
|
||||
// Look for the terminating quote. However, if we
|
||||
// see a '', that represents a literal quote and
|
||||
// we must iterate.
|
||||
StringBuffer buf = new StringBuffer();
|
||||
StringBuilder buf = new StringBuilder();
|
||||
int oldPos = i + 1;
|
||||
do
|
||||
{
|
||||
@@ -346,7 +346,7 @@ public class SimpleDateFormat extends DateFormat
|
||||
else
|
||||
{
|
||||
// A special character
|
||||
tokens.add(new Character(thisChar));
|
||||
tokens.add(Character.valueOf(thisChar));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -372,7 +372,7 @@ public class SimpleDateFormat extends DateFormat
|
||||
*/
|
||||
public String toString()
|
||||
{
|
||||
StringBuffer output = new StringBuffer(getClass().getName());
|
||||
StringBuilder output = new StringBuilder(getClass().getName());
|
||||
output.append("[tokens=");
|
||||
output.append(tokens);
|
||||
output.append(", formatData=");
|
||||
@@ -554,7 +554,7 @@ public class SimpleDateFormat extends DateFormat
|
||||
String oldChars, String newChars)
|
||||
{
|
||||
int len = pattern.length();
|
||||
StringBuffer buf = new StringBuffer(len);
|
||||
StringBuilder buf = new StringBuilder(len);
|
||||
boolean quoted = false;
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
@@ -1279,12 +1279,12 @@ public class SimpleDateFormat extends DateFormat
|
||||
|
||||
// advance the index
|
||||
pos.setIndex(pos.getIndex() + matcher.end());
|
||||
return new Integer(offset);
|
||||
return Integer.valueOf(offset);
|
||||
}
|
||||
else if (zoneString.startsWith("GMT"))
|
||||
{
|
||||
pos.setIndex(pos.getIndex() + 3);
|
||||
return new Integer(0);
|
||||
return Integer.valueOf(0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user