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:
Matthias Klose
2008-06-28 13:29:13 +00:00
parent 15c151967d
commit e0441a5bfb
1429 changed files with 32837 additions and 18119 deletions
@@ -403,7 +403,7 @@ public class DatagramSocket
if (timeout < 0)
throw new IllegalArgumentException("Invalid timeout: " + timeout);
getImpl().setOption(SocketOptions.SO_TIMEOUT, new Integer(timeout));
getImpl().setOption(SocketOptions.SO_TIMEOUT, Integer.valueOf(timeout));
}
/**
@@ -450,7 +450,7 @@ public class DatagramSocket
if (size < 0)
throw new IllegalArgumentException("Buffer size is less than 0");
getImpl().setOption(SocketOptions.SO_SNDBUF, new Integer(size));
getImpl().setOption(SocketOptions.SO_SNDBUF, Integer.valueOf(size));
}
/**
@@ -497,7 +497,7 @@ public class DatagramSocket
if (size < 0)
throw new IllegalArgumentException("Buffer size is less than 0");
getImpl().setOption(SocketOptions.SO_RCVBUF, new Integer(size));
getImpl().setOption(SocketOptions.SO_RCVBUF, Integer.valueOf(size));
}
/**
@@ -916,7 +916,7 @@ public class DatagramSocket
if (tc < 0 || tc > 255)
throw new IllegalArgumentException();
getImpl().setOption(SocketOptions.IP_TOS, new Integer(tc));
getImpl().setOption(SocketOptions.IP_TOS, Integer.valueOf(tc));
}
/**
@@ -107,7 +107,7 @@ class ResolverCache
/**
* Return the hostname for the specified IP address.
*
* @param ip The IP address as a byte array
* @param addr The IP address as a byte array
*
* @return The hostname
*
@@ -116,7 +116,7 @@ class ResolverCache
public static String getHostByAddr(byte[] addr) throws UnknownHostException
{
Object key = makeHashableAddress(addr);
Entry entry = (Entry) get(key);
Entry entry = get(key);
if (entry != null)
{
if (entry.value == null)
@@ -149,7 +149,7 @@ class ResolverCache
public static byte[][] getHostByName(String hostname)
throws UnknownHostException
{
Entry entry = (Entry) get(hostname);
Entry entry = get(hostname);
if (entry != null)
{
if (entry.value == null)
+2 -2
View File
@@ -469,7 +469,7 @@ public class ServerSocket
if (timeout < 0)
throw new IllegalArgumentException("SO_TIMEOUT value must be >= 0");
impl.setOption(SocketOptions.SO_TIMEOUT, new Integer(timeout));
impl.setOption(SocketOptions.SO_TIMEOUT, Integer.valueOf(timeout));
}
/**
@@ -556,7 +556,7 @@ public class ServerSocket
if (size <= 0)
throw new IllegalArgumentException("SO_RCVBUF value must be > 0");
impl.setOption(SocketOptions.SO_RCVBUF, new Integer(size));
impl.setOption(SocketOptions.SO_RCVBUF, Integer.valueOf(size));
}
/**
+4 -4
View File
@@ -844,7 +844,7 @@ public class Socket
if (timeout < 0)
throw new IllegalArgumentException("SO_TIMEOUT value must be >= 0");
getImpl().setOption(SocketOptions.SO_TIMEOUT, new Integer(timeout));
getImpl().setOption(SocketOptions.SO_TIMEOUT, Integer.valueOf(timeout));
}
/**
@@ -896,7 +896,7 @@ public class Socket
if (size <= 0)
throw new IllegalArgumentException("SO_SNDBUF value must be > 0");
getImpl().setOption(SocketOptions.SO_SNDBUF, new Integer(size));
getImpl().setOption(SocketOptions.SO_SNDBUF, Integer.valueOf(size));
}
/**
@@ -943,7 +943,7 @@ public class Socket
if (size <= 0)
throw new IllegalArgumentException("SO_RCVBUF value must be > 0");
getImpl().setOption(SocketOptions.SO_RCVBUF, new Integer(size));
getImpl().setOption(SocketOptions.SO_RCVBUF, Integer.valueOf(size));
}
/**
@@ -1211,7 +1211,7 @@ public class Socket
if (tc < 0 || tc > 255)
throw new IllegalArgumentException();
getImpl().setOption(SocketOptions.IP_TOS, new Integer(tc));
getImpl().setOption(SocketOptions.IP_TOS, Integer.valueOf(tc));
}
/**
+11 -10
View File
@@ -483,7 +483,7 @@ public final class URI
*/
private static String quote(String str, String legalCharacters)
{
StringBuffer sb = new StringBuffer(str.length());
StringBuilder sb = new StringBuilder(str.length());
for (int i = 0; i < str.length(); i++)
{
char c = str.charAt(i);
@@ -778,8 +778,8 @@ public final class URI
This follows the algorithm in section 5.2.4. of RFC3986,
but doesn't modify the input buffer.
*/
StringBuffer input = new StringBuffer(relativePath);
StringBuffer output = new StringBuffer();
StringBuilder input = new StringBuilder(relativePath);
StringBuilder output = new StringBuilder();
int start = 0;
while (start < input.length())
{
@@ -853,7 +853,7 @@ public final class URI
*
* @param buffer the buffer containing the path.
*/
private void removeLastSegment(StringBuffer buffer)
private void removeLastSegment(StringBuilder buffer)
{
int lastSlash = buffer.lastIndexOf("/");
if (lastSlash == -1)
@@ -899,7 +899,7 @@ public final class URI
path = "";
if (! (path.startsWith("/")))
{
StringBuffer basepath = new StringBuffer(this.path);
StringBuilder basepath = new StringBuilder(this.path);
int i = this.path.lastIndexOf('/');
if (i >= 0)
@@ -1321,7 +1321,8 @@ public final class URI
int hCompare = host.compareTo(uri.getHost());
if (hCompare != 0)
return hCompare;
return new Integer(port).compareTo(new Integer(uri.getPort()));
int uriPort = uri.getPort();
return (uriPort == port) ? 0 : (uriPort > port) ? -1 : 1;
}
}
if (rawPath == null && uri.getRawPath() != null)
@@ -1387,8 +1388,8 @@ public final class URI
{
String strRep = toString();
boolean inNonAsciiBlock = false;
StringBuffer buffer = new StringBuffer();
StringBuffer encBuffer = null;
StringBuilder buffer = new StringBuilder();
StringBuilder encBuffer = null;
for (int i = 0; i < strRep.length(); i++)
{
char c = strRep.charAt(i);
@@ -1405,7 +1406,7 @@ public final class URI
{
if (!inNonAsciiBlock)
{
encBuffer = new StringBuffer();
encBuffer = new StringBuilder();
inNonAsciiBlock = true;
}
encBuffer.append(c);
@@ -1427,7 +1428,7 @@ public final class URI
{
try
{
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
// this is far from optimal, but it works
byte[] utf8 = str.getBytes("utf-8");
for (int j = 0; j < utf8.length; j++)
@@ -452,7 +452,7 @@ public class URLClassLoader extends SecureClassLoader
{
// Compute the name of the package as it may appear in the
// Manifest.
StringBuffer xform = new StringBuffer(name);
StringBuilder xform = new StringBuilder(name);
for (int i = xform.length () - 1; i >= 0; --i)
if (xform.charAt(i) == '.')
xform.setCharAt(i, '/');
@@ -641,7 +641,7 @@ public class URLClassLoader extends SecureClassLoader
{
if (thisString == null)
{
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
sb.append(this.getClass().getName());
sb.append("{urls=[" );
URL[] thisURLs = getURLs();
+1 -1
View File
@@ -113,7 +113,7 @@ public class URLEncoder
int start = 0;
int i = 0;
StringBuffer result = new StringBuffer(length);
StringBuilder result = new StringBuilder(length);
while (true)
{
while (i < length && isSafe(s.charAt(i)))