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:
@@ -524,7 +524,7 @@ public abstract class AbstractMap<K, V> implements Map<K, V>
|
||||
public String toString()
|
||||
{
|
||||
Iterator<Map.Entry<K, V>> entries = entrySet().iterator();
|
||||
StringBuffer r = new StringBuffer("{");
|
||||
StringBuilder r = new StringBuilder("{");
|
||||
for (int pos = size(); pos > 0; pos--)
|
||||
{
|
||||
Map.Entry<K, V> entry = entries.next();
|
||||
|
||||
@@ -572,7 +572,7 @@ public abstract class Calendar
|
||||
* Cache of locale->calendar-class mappings. This avoids having to do a ResourceBundle
|
||||
* lookup for every getInstance call.
|
||||
*/
|
||||
private static HashMap<Locale,Class> cache = new HashMap<Locale,Class>();
|
||||
private static final HashMap<Locale,Class> cache = new HashMap<Locale,Class>();
|
||||
|
||||
/** Preset argument types for calendar-class constructor lookup. */
|
||||
private static Class[] ctorArgTypes = new Class[]
|
||||
@@ -1266,7 +1266,7 @@ public abstract class Calendar
|
||||
|
||||
/**
|
||||
* Compares the time of two calendar instances.
|
||||
* @param calendar the calendar to which the time should be compared.
|
||||
* @param cal the calendar to which the time should be compared.
|
||||
* @return 0 if the two calendars are set to the same time,
|
||||
* less than 0 if the time of this calendar is before that of
|
||||
* <code>cal</code>, or more than 0 if the time of this calendar is after
|
||||
@@ -1328,8 +1328,8 @@ public abstract class Calendar
|
||||
*/
|
||||
public String toString()
|
||||
{
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append(getClass().getName()).append('[');
|
||||
StringBuilder sb = new StringBuilder(getClass().getName());
|
||||
sb.append('[');
|
||||
sb.append("time=");
|
||||
if (isTimeSet)
|
||||
sb.append(time);
|
||||
|
||||
@@ -6167,7 +6167,7 @@ public class Collections
|
||||
* correct type.
|
||||
*
|
||||
* @param index the index at which to place the new element.
|
||||
* @param c the collections of objects to add.
|
||||
* @param coll the collections of objects to add.
|
||||
* @throws ClassCastException if the type of any element in c is not a
|
||||
* valid type for the underlying collection.
|
||||
*/
|
||||
@@ -6870,7 +6870,7 @@ public class Collections
|
||||
* Adds all pairs within the supplied map to the underlying map,
|
||||
* provided they are all have the correct key and value types.
|
||||
*
|
||||
* @param m the map, the entries of which should be added
|
||||
* @param map the map, the entries of which should be added
|
||||
* to the underlying map.
|
||||
* @throws ClassCastException if the type of a key or value is
|
||||
* not a valid type for the underlying map.
|
||||
|
||||
@@ -722,7 +722,7 @@ public class Date
|
||||
boolean localTimezone = true;
|
||||
|
||||
// Trim out any nested stuff in parentheses now to make parsing easier.
|
||||
StringBuffer buf = new StringBuffer();
|
||||
StringBuilder buf = new StringBuilder();
|
||||
int parenNesting = 0;
|
||||
int len = string.length();
|
||||
for (int i = 0; i < len; i++)
|
||||
|
||||
@@ -291,7 +291,7 @@ public final class Formatter
|
||||
* If the locale is <code>null</code>, then no localization is
|
||||
* applied.
|
||||
*
|
||||
* @param file the output stream.
|
||||
* @param out the output stream.
|
||||
* @param charset the character set to use for output.
|
||||
* @param loc the locale to use.
|
||||
* @throws UnsupportedEncodingException if the supplied character
|
||||
@@ -1427,7 +1427,7 @@ public final class Formatter
|
||||
* Outputs a formatted string based on the supplied specification,
|
||||
* <code>fmt</code>, and its arguments using the formatter's locale.
|
||||
*
|
||||
* @param fmt the format specification.
|
||||
* @param format the format specification.
|
||||
* @param args the arguments to apply to the specification.
|
||||
* @throws IllegalFormatException if there is a problem with
|
||||
* the syntax of the format
|
||||
|
||||
@@ -579,7 +579,7 @@ public class Hashtable<K, V> extends Dictionary<K, V>
|
||||
// would repeatedly re-lock/release the monitor, we directly use the
|
||||
// unsynchronized EntryIterator instead.
|
||||
Iterator<Map.Entry<K, V>> entries = new EntryIterator();
|
||||
StringBuffer r = new StringBuffer("{");
|
||||
StringBuilder r = new StringBuilder("{");
|
||||
for (int pos = size; pos > 0; pos--)
|
||||
{
|
||||
r.append(entries.next());
|
||||
@@ -1088,7 +1088,7 @@ public class Hashtable<K, V> extends Dictionary<K, V>
|
||||
* <code>next()</code> gives a different result, by returning just
|
||||
* the key rather than the whole element.
|
||||
*/
|
||||
private EntryIterator iterator;
|
||||
private final EntryIterator iterator;
|
||||
|
||||
/**
|
||||
* Construct a new KeyIterator
|
||||
@@ -1153,7 +1153,7 @@ public class Hashtable<K, V> extends Dictionary<K, V>
|
||||
* <code>next()</code> gives a different result, by returning just
|
||||
* the value rather than the whole element.
|
||||
*/
|
||||
private EntryIterator iterator;
|
||||
private final EntryIterator iterator;
|
||||
|
||||
/**
|
||||
* Construct a new KeyIterator
|
||||
@@ -1294,7 +1294,7 @@ public class Hashtable<K, V> extends Dictionary<K, V>
|
||||
* <code>nextElement()</code> gives a different result, by returning just
|
||||
* the key rather than the whole element.
|
||||
*/
|
||||
private EntryEnumerator enumerator;
|
||||
private final EntryEnumerator enumerator;
|
||||
|
||||
/**
|
||||
* Construct a new KeyEnumerator
|
||||
@@ -1355,7 +1355,7 @@ public class Hashtable<K, V> extends Dictionary<K, V>
|
||||
* <code>nextElement()</code> gives a different result, by returning just
|
||||
* the value rather than the whole element.
|
||||
*/
|
||||
private EntryEnumerator enumerator;
|
||||
private final EntryEnumerator enumerator;
|
||||
|
||||
/**
|
||||
* Construct a new ValueEnumerator
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* LinkedHashSet.java -- a set backed by a LinkedHashMap, for linked
|
||||
list traversal.
|
||||
Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 2001, 2004, 2005, 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
@@ -98,7 +98,7 @@ public class LinkedHashSet<T> extends HashSet<T>
|
||||
|
||||
/**
|
||||
* Construct a new, empty HashSet whose backing HashMap has the default
|
||||
* capacity (11) and loadFacor (0.75).
|
||||
* capacity (11) and loadFactor (0.75).
|
||||
*/
|
||||
public LinkedHashSet()
|
||||
{
|
||||
|
||||
@@ -178,21 +178,21 @@ public final class Locale implements Serializable, Cloneable
|
||||
*
|
||||
* @serial the languange, possibly ""
|
||||
*/
|
||||
private String language;
|
||||
private final String language;
|
||||
|
||||
/**
|
||||
* The country code, as returned by getCountry().
|
||||
*
|
||||
* @serial the country, possibly ""
|
||||
*/
|
||||
private String country;
|
||||
private final String country;
|
||||
|
||||
/**
|
||||
* The variant code, as returned by getVariant().
|
||||
*
|
||||
* @serial the variant, possibly ""
|
||||
*/
|
||||
private String variant;
|
||||
private final String variant;
|
||||
|
||||
/**
|
||||
* This is the cached hashcode. When writing to stream, we write -1.
|
||||
@@ -324,13 +324,12 @@ public final class Locale implements Serializable, Cloneable
|
||||
// default locale.
|
||||
if (defaultLocale != null)
|
||||
{
|
||||
language = convertLanguage(language).intern();
|
||||
country = country.toUpperCase().intern();
|
||||
variant = variant.intern();
|
||||
language = convertLanguage(language);
|
||||
country = country.toUpperCase();
|
||||
}
|
||||
this.language = language;
|
||||
this.country = country;
|
||||
this.variant = variant;
|
||||
this.language = language.intern();
|
||||
this.country = country.intern();
|
||||
this.variant = variant.intern();
|
||||
hashcode = language.hashCode() ^ country.hashCode() ^ variant.hashCode();
|
||||
}
|
||||
|
||||
@@ -1022,9 +1021,6 @@ public final class Locale implements Serializable, Cloneable
|
||||
throws IOException, ClassNotFoundException
|
||||
{
|
||||
s.defaultReadObject();
|
||||
language = language.intern();
|
||||
country = country.intern();
|
||||
variant = variant.intern();
|
||||
hashcode = language.hashCode() ^ country.hashCode() ^ variant.hashCode();
|
||||
}
|
||||
} // class Locale
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -138,7 +138,7 @@ public class Manifest implements Cloneable
|
||||
*/
|
||||
public Attributes getAttributes(String entryName)
|
||||
{
|
||||
return (Attributes) getEntries().get(entryName);
|
||||
return getEntries().get(entryName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -357,7 +357,7 @@ public class ZipEntry implements ZipConstants, Cloneable
|
||||
| (extra[pos+2] & 0xff) << 8
|
||||
| (extra[pos+3] & 0xff) << 16
|
||||
| (extra[pos+4] & 0xff) << 24);
|
||||
setTime(time);
|
||||
setTime(time*1000);
|
||||
}
|
||||
}
|
||||
pos += len;
|
||||
|
||||
Reference in New Issue
Block a user