harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ton...@apache.org
Subject svn commit: r633384 [4/15] - in /harmony/enhanced/classlib/branches/java6: depends/build/platform/ depends/files/ depends/files/bcprov/ doc/ doc/classlib/ make/ make/linux.ia64/ make/linux.ppc32/ make/linux.ppc64/ make/linux.x86.libstdc++6/ make/linux....
Date Tue, 04 Mar 2008 08:02:45 GMT
Modified: harmony/enhanced/classlib/branches/java6/modules/luni-kernel/src/main/java/java/lang/Class.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni-kernel/src/main/java/java/lang/Class.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni-kernel/src/main/java/java/lang/Class.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni-kernel/src/main/java/java/lang/Class.java Tue Mar  4 00:02:13 2008
@@ -75,12 +75,14 @@
  * 
  * @since 1.0
  */
-public final class Class<T> implements Serializable, AnnotatedElement, GenericDeclaration, Type {
+public final class Class<T> implements Serializable, AnnotatedElement,
+        GenericDeclaration, Type {
 
     private static final long serialVersionUID = 3206093459760846163L;
-    
-    private Class(){
-        //prevent this class to be instantiated, instance should be created by JVM only
+
+    private Class() {
+        // prevent this class to be instantiated, instance should be created by
+        // JVM only
     }
 
     /**
@@ -110,8 +112,10 @@
      * the caller of this method.</li>
      * </ul>
      * 
-     * @param maxDepth maximum depth to walk the stack, -1 for the entire stack
-     * @param stopAtPrivileged stop at privileged classes
+     * @param maxDepth
+     *            maximum depth to walk the stack, -1 for the entire stack
+     * @param stopAtPrivileged
+     *            stop at privileged classes
      * @return the array of the most recent classes on the stack
      */
     static final Class[] getStackClasses(int maxDepth, boolean stopAtPrivileged) {
@@ -120,32 +124,37 @@
 
     /**
      * Answers a Class object which represents the class named by the argument.
+     * 
      * The name should be the name of a class as described in the class
-     * definition of {@link Class}, however Classes representing base types can
-     * not be found using this method.
+     * definition of <code>Class</code>, however Classes representing base
+     * types can not be found using this method.
      * 
-     * @param className The name of the non-base type class to find
+     * @param className
+     *            The name of the non-base type class to find
      * @return the named Class
-     * @throws ClassNotFoundException If the class could not be found
-     * @see {@link Class}
+     * @throws ClassNotFoundException
+     *             If the class could not be found
      */
-    public static Class<?> forName(String className) throws ClassNotFoundException {
+    public static Class<?> forName(String className)
+            throws ClassNotFoundException {
         return null;
     }
 
     /**
      * Answers a Class object which represents the class named by the argument.
      * The name should be the name of a class as described in the class
-     * definition of {@link Class}, however Classes representing base types can
-     * not be found using this method. Security rules will be obeyed.
+     * definition of <code>Class</code>, however Classes representing base
+     * types can not be found using this method. Security rules will be obeyed.
      * 
-     * @param className The name of the non-base type class to find
-     * @param initializeBoolean A boolean indicating whether the class should be
-     *        initialized
-     * @param classLoader The class loader to use to load the class
+     * @param className
+     *            The name of the non-base type class to find
+     * @param initializeBoolean
+     *            A boolean indicating whether the class should be initialized
+     * @param classLoader
+     *            The class loader to use to load the class
      * @return the named class.
-     * @throws ClassNotFoundException If the class could not be found
-     * @see {@link Class}
+     * @throws ClassNotFoundException
+     *             If the class could not be found
      */
     public static Class<?> forName(String className, boolean initializeBoolean,
             ClassLoader classLoader) throws ClassNotFoundException {
@@ -157,8 +166,8 @@
      * the receiver represents and its super classes and interfaces
      * 
      * @return the class' public class members
-     * @throws SecurityException If member access is not allowed
-     * @see {@link Class}
+     * @throws SecurityException
+     *             If member access is not allowed
      */
     public Class[] getClasses() {
         return null;
@@ -167,7 +176,8 @@
     /**
      * Verify the specified Class using the VM byte code verifier.
      * 
-     * @throws VerifyError if the Class cannot be verified
+     * @throws VerifyError
+     *             if the Class cannot be verified
      */
     void verify() {
         return;
@@ -177,7 +187,8 @@
      * Answers the annotation of the given type. If there is no annotation the
      * method returns <code>null</code>.
      * 
-     * @param annotationClass the annotation type.
+     * @param annotationClass
+     *            the annotation type.
      * @return the annotation of the given type, or <code>null</code> if none.
      * @since 1.5
      */
@@ -211,8 +222,7 @@
      * the receiver. Answer null if the class was loaded by the system class
      * loader
      * 
-     * @return the receiver's class loader or nil
-     * @see {@link ClassLoader}
+     * @return the receiver's class loader or null
      */
     public ClassLoader getClassLoader() {
         return null;
@@ -236,11 +246,10 @@
 
     /**
      * Answers a Class object which represents the receiver's component type if
-     * the receiver represents an array type. Otherwise answers nil. The
+     * the receiver represents an array type. Otherwise answers null. The
      * component type of an array type is the type of the elements of the array.
      * 
      * @return the component type of the receiver.
-     * @see {@link Class}
      */
     public Class<?> getComponentType() {
         return null;
@@ -250,14 +259,17 @@
      * Answers a public Constructor object which represents the constructor
      * described by the arguments.
      * 
-     * @param parameterTypes the types of the arguments.
+     * @param parameterTypes
+     *            the types of the arguments.
      * @return the constructor described by the arguments.
-     * @throws NoSuchMethodException if the constructor could not be found.
-     * @throws SecurityException if member access is not allowed
+     * @throws NoSuchMethodException
+     *             if the constructor could not be found.
+     * @throws SecurityException
+     *             if member access is not allowed
      * @see #getConstructors
      */
-    public Constructor<T> getConstructor(Class... parameterTypes) throws NoSuchMethodException,
-            SecurityException {
+    public Constructor<T> getConstructor(Class... parameterTypes)
+            throws NoSuchMethodException, SecurityException {
         return null;
     }
 
@@ -266,7 +278,8 @@
      * constructors which are visible from the current execution context.
      * 
      * @return all visible constructors starting from the receiver.
-     * @throws SecurityException if member access is not allowed
+     * @throws SecurityException
+     *             if member access is not allowed
      * @see #getMethods
      */
     public Constructor[] getConstructors() throws SecurityException {
@@ -292,8 +305,8 @@
      * not be visible in the current execution context.
      * 
      * @return the class' class members
-     * @throws SecurityException if member access is not allowed
-     * @see {@link Class}
+     * @throws SecurityException
+     *             if member access is not allowed
      */
     public Class[] getDeclaredClasses() throws SecurityException {
         return new Class[0];
@@ -303,10 +316,13 @@
      * Answers a Constructor object which represents the constructor described
      * by the arguments.
      * 
-     * @param parameterTypes the types of the arguments.
+     * @param parameterTypes
+     *            the types of the arguments.
      * @return the constructor described by the arguments.
-     * @throws NoSuchMethodException if the constructor could not be found.
-     * @throws SecurityException if member access is not allowed
+     * @throws NoSuchMethodException
+     *             if the constructor could not be found.
+     * @throws SecurityException
+     *             if member access is not allowed
      * @see #getConstructors
      */
     public Constructor<T> getDeclaredConstructor(Class... parameterTypes)
@@ -321,7 +337,8 @@
      * context.
      * 
      * @return the receiver's constructors.
-     * @throws SecurityException if member access is not allowed
+     * @throws SecurityException
+     *             if member access is not allowed
      * @see #getMethods
      */
     public Constructor[] getDeclaredConstructors() throws SecurityException {
@@ -333,13 +350,17 @@
      * argument. Note that the Constructor may not be visible from the current
      * execution context.
      * 
-     * @param name The name of the field to look for.
+     * @param name
+     *            The name of the field to look for.
      * @return the field in the receiver named by the argument.
-     * @throws NoSuchFieldException if the requested field could not be found
-     * @throws SecurityException if member access is not allowed
+     * @throws NoSuchFieldException
+     *             if the requested field could not be found
+     * @throws SecurityException
+     *             if member access is not allowed
      * @see #getDeclaredFields
      */
-    public Field getDeclaredField(String name) throws NoSuchFieldException, SecurityException {
+    public Field getDeclaredField(String name) throws NoSuchFieldException,
+            SecurityException {
         return null;
     }
 
@@ -349,7 +370,8 @@
      * may not be visible in the current execution context.
      * 
      * @return the receiver's fields.
-     * @throws SecurityException If member access is not allowed
+     * @throws SecurityException
+     *             If member access is not allowed
      * @see #getFields
      */
     public Field[] getDeclaredFields() throws SecurityException {
@@ -361,12 +383,17 @@
      * arguments. Note that the associated method may not be visible from the
      * current execution context.
      * 
-     * @param name the name of the method
-     * @param parameterTypes the types of the arguments.
+     * @param name
+     *            the name of the method
+     * @param parameterTypes
+     *            the types of the arguments.
      * @return the method described by the arguments.
-     * @throws NoSuchMethodException if the method could not be found.
-     * @throws SecurityException If member access is not allowed
-     * @throws NullPointerException if the name parameter is <code>null</code>.
+     * @throws NoSuchMethodException
+     *             if the method could not be found.
+     * @throws SecurityException
+     *             If member access is not allowed
+     * @throws NullPointerException
+     *             if the name parameter is <code>null</code>.
      * @see #getMethods
      */
     public Method getDeclaredMethod(String name, Class... parameterTypes)
@@ -379,7 +406,8 @@
      * are defined by the receiver. Note that some of the methods which are
      * returned may not be visible in the current execution context.
      * 
-     * @throws SecurityException if member access is not allowed
+     * @throws SecurityException
+     *             if member access is not allowed
      * @return the receiver's methods.
      * @see #getMethods
      */
@@ -447,13 +475,17 @@
      * Answers a Field object describing the field in the receiver named by the
      * argument which must be visible from the current execution context.
      * 
-     * @param name The name of the field to look for.
+     * @param name
+     *            The name of the field to look for.
      * @return the field in the receiver named by the argument.
-     * @throws NoSuchFieldException If the given field does not exist
-     * @throws SecurityException If access is denied
+     * @throws NoSuchFieldException
+     *             If the given field does not exist
+     * @throws SecurityException
+     *             If access is denied
      * @see #getDeclaredFields
      */
-    public Field getField(String name) throws NoSuchFieldException, SecurityException {
+    public Field getField(String name) throws NoSuchFieldException,
+            SecurityException {
         return null;
     }
 
@@ -462,7 +494,8 @@
      * visible from the current execution context.
      * 
      * @return all visible fields starting from the receiver.
-     * @throws SecurityException If member access is not allowed
+     * @throws SecurityException
+     *             If member access is not allowed
      * @see #getDeclaredFields
      */
     public Field[] getFields() throws SecurityException {
@@ -504,15 +537,19 @@
      * Answers a Method object which represents the method described by the
      * arguments.
      * 
-     * @param name String the name of the method
-     * @param parameterTypes Class[] the types of the arguments.
+     * @param name
+     *            String the name of the method
+     * @param parameterTypes
+     *            Class[] the types of the arguments.
      * @return Method the method described by the arguments.
-     * @throws NoSuchMethodException if the method could not be found.
-     * @throws SecurityException if member access is not allowed
+     * @throws NoSuchMethodException
+     *             if the method could not be found.
+     * @throws SecurityException
+     *             if member access is not allowed
      * @see #getMethods
      */
-    public Method getMethod(String name, Class... parameterTypes) throws NoSuchMethodException,
-            SecurityException {
+    public Method getMethod(String name, Class... parameterTypes)
+            throws NoSuchMethodException, SecurityException {
         return null;
     }
 
@@ -521,7 +558,8 @@
      * are visible from the current execution context.
      * 
      * @return Method[] all visible methods starting from the receiver.
-     * @throws SecurityException if member access is not allowed
+     * @throws SecurityException
+     *             if member access is not allowed
      * @see #getDeclaredMethods
      */
     public Method[] getMethods() throws SecurityException {
@@ -542,10 +580,9 @@
     /**
      * Answers the name of the class which the receiver represents. For a
      * description of the format which is used, see the class definition of
-     * {@link Class}.
+     * <code>Class</code>.
      * 
      * @return the receiver's name.
-     * @see {@link Class}
      */
     public String getName() {
         return null;
@@ -565,7 +602,7 @@
 
     /**
      * Answers the ProtectionDomain of the receiver.
-     * <p>
+     * 
      * Note: In order to conserve space in embedded targets, we allow this
      * method to answer null for classes in the system protection domain (i.e.
      * for system classes). System classes are always given full permissions
@@ -573,7 +610,6 @@
      * java.security.Policy.
      * 
      * @return ProtectionDomain the receiver's ProtectionDomain.
-     * @see {@link Class}
      */
     public ProtectionDomain getProtectionDomain() {
         return null;
@@ -581,11 +617,10 @@
 
     /**
      * Answers the ProtectionDomain of the receiver.
-     * <p>
+     * 
      * This method is for internal use only.
      * 
      * @return ProtectionDomain the receiver's ProtectionDomain.
-     * @see {@link Class}
      */
     ProtectionDomain getPDImpl() {
         return null;
@@ -596,9 +631,10 @@
      * resName. The mapping between the resource name and the stream is managed
      * by the class' class loader.
      * 
-     * @param resName the name of the resource.
+     * @param resName
+     *            the name of the resource.
      * @return a stream on the resource.
-     * @see {@link ClassLoader}
+     * @see ClassLoader
      */
     public URL getResource(String resName) {
         return null;
@@ -609,9 +645,10 @@
      * resName. The mapping between the resource name and the stream is managed
      * by the class' class loader.
      * 
-     * @param resName the name of the resource.
+     * @param resName
+     *            the name of the resource.
      * @return a stream on the resource.
-     * @see {@link ClassLoader}
+     * @see ClassLoader
      */
     public InputStream getResourceAsStream(String resName) {
         return null;
@@ -664,12 +701,14 @@
     /**
      * Indicates whether or not the given annotation is present for this class.
      * 
-     * @param annotationClass The annotation to look for in this class.
+     * @param annotationClass
+     *            The annotation to look for in this class.
      * @return A value of <code>true</code> if the annotation is present,
      *         otherwise <code>false</code>.
      * @since 1.5
      */
-    public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) {
+    public boolean isAnnotationPresent(
+            Class<? extends Annotation> annotationClass) {
         return false;
     }
 
@@ -703,8 +742,10 @@
      * @return <code>true</code> the argument can be assigned into the
      *         receiver <code>false</code> the argument cannot be assigned
      *         into the receiver
-     * @param cls Class the class to test
-     * @throws NullPointerException if the parameter is null
+     * @param cls
+     *            Class the class to test
+     * @throws NullPointerException
+     *             if the parameter is null
      */
     public boolean isAssignableFrom(Class<?> cls) {
         return false;
@@ -729,7 +770,8 @@
      * @return <code>true</code> the argument can be cast to the type of the
      *         receiver <code>false</code> the argument is null or cannot be
      *         cast to the type of the receiver
-     * @param object Object the object to test
+     * @param object
+     *            Object the object to test
      */
     public boolean isInstance(Object object) {
         return false;
@@ -795,11 +837,13 @@
      * IllegalAccessException is thrown.
      * 
      * @return a new instance of the class represented by the receiver.
-     * @throws IllegalAccessException if the constructor is not visible to the
-     *         sender.
-     * @throws InstantiationException if the instance could not be created.
+     * @throws IllegalAccessException
+     *             if the constructor is not visible to the sender.
+     * @throws InstantiationException
+     *             if the instance could not be created.
      */
-    public T newInstance() throws IllegalAccessException, InstantiationException {
+    public T newInstance() throws IllegalAccessException,
+            InstantiationException {
         return null;
     }
 
@@ -836,26 +880,29 @@
     }
 
     /**
-     * Casts the receiver to a subclass of the given class.  If successful
+     * Casts the receiver to a subclass of the given class. If successful
      * answers the receiver, otherwise if the cast cannot be made throws a
      * <code>ClassCastException</code>.
      * 
-     * @param clazz the required type.
+     * @param clazz
+     *            the required type.
      * @return this class cast as a subclass of the given type.
-     * @throws ClassCastException if the class cannot be cast to the given type.
+     * @throws ClassCastException
+     *             if the class cannot be cast to the given type.
      */
     public <U> Class<? extends U> asSubclass(Class<U> clazz) {
         return null;
     }
 
     /**
-     * Cast the given object to the type <code>T</code>.
-     * If the object is <code>null</code> the result is also
-     * <code>null</code>.
+     * Cast the given object to the type <code>T</code>. If the object is
+     * <code>null</code> the result is also <code>null</code>.
      * 
-     * @param obj the object to cast
+     * @param obj
+     *            the object to cast
      * @return The object that has been cast.
-     * @throws ClassCastException if the object cannot be cast to the given type.
+     * @throws ClassCastException
+     *             if the object cannot be cast to the given type.
      */
     public T cast(Object obj) {
         return null;

Modified: harmony/enhanced/classlib/branches/java6/modules/luni-kernel/src/main/java/java/lang/ClassLoader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni-kernel/src/main/java/java/lang/ClassLoader.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni-kernel/src/main/java/java/lang/ClassLoader.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni-kernel/src/main/java/java/lang/ClassLoader.java Tue Mar  4 00:02:13 2008
@@ -43,6 +43,7 @@
 
     /**
      * The 'System' ClassLoader; also known as the bootstrap ClassLoader.
+     * 
      * @see #getSystemClassLoader()
      */
     static ClassLoader systemClassLoader;
@@ -68,8 +69,9 @@
      * thrown.
      * 
      * @return The system classLoader.
-     * @throws SecurityException if a security manager exists and it does not
-     *         allow access to the system class loader.
+     * @throws SecurityException
+     *             if a security manager exists and it does not allow access to
+     *             the system class loader.
      */
     public static ClassLoader getSystemClassLoader() {
         return null;
@@ -80,7 +82,8 @@
      * resName using the system class loader's resource lookup algorithm.
      * 
      * @return A URL specifying a system resource or null.
-     * @param resName The name of the resource to find.
+     * @param resName
+     *            The name of the resource to find.
      * @see Class#getResource
      */
     public static URL getSystemResource(String resName) {
@@ -93,9 +96,13 @@
      * lookup algorithm.
      * 
      * @return An Enumeration of URLs containing the system resources
-     * @param resName String the name of the resource to find.
+     * @param resName
+     *            String the name of the resource to find.
+     * @throws IOException
+     *             if an IO exception occurs
      */
-    public static Enumeration<URL> getSystemResources(String resName) throws IOException {
+    public static Enumeration<URL> getSystemResources(String resName)
+            throws IOException {
         return null;
     }
 
@@ -106,7 +113,8 @@
      * matches the specified resource.
      * 
      * @return A stream on the resource or null.
-     * @param resName The name of the resource to find.
+     * @param resName
+     *            The name of the resource to find.
      * @see Class#getResourceAsStream
      */
     public static InputStream getSystemResourceAsStream(String resName) {
@@ -117,8 +125,9 @@
      * Constructs a new instance of this class with the system class loader as
      * its parent.
      * 
-     * @throws SecurityException if a security manager exists and it does not
-     *         allow the creation of new ClassLoaders.
+     * @throws SecurityException
+     *             if a security manager exists and it does not allow the
+     *             creation of new ClassLoaders.
      */
     protected ClassLoader() {
         super();
@@ -128,11 +137,13 @@
      * Constructs a new instance of this class with the given class loader as
      * its parent.
      * 
-     * @param parentLoader The ClassLoader to use as the new class loaders
-     *        parent.
-     * @throws SecurityException if a security manager exists and it does not
-     *         allow the creation of new ClassLoaders.
-     * @throws NullPointerException if the parent is null.
+     * @param parentLoader
+     *            The ClassLoader to use as the new class loaders parent.
+     * @throws SecurityException
+     *             if a security manager exists and it does not allow the
+     *             creation of new ClassLoaders.
+     * @throws NullPointerException
+     *             if the parent is null.
      */
     protected ClassLoader(ClassLoader parentLoader) {
         super();
@@ -142,9 +153,12 @@
      * Constructs a new class from an array of bytes containing a class
      * definition in class file format.
      * 
-     * @param classRep A memory image of a class file.
-     * @param offset The offset into the classRep.
-     * @param length The length of the class file.
+     * @param classRep
+     *            A memory image of a class file.
+     * @param offset
+     *            The offset into the classRep.
+     * @param length
+     *            The length of the class file.
      * @deprecated Use defineClass(String, byte[], int, int)
      */
     @Deprecated
@@ -157,13 +171,17 @@
      * Constructs a new class from an array of bytes containing a class
      * definition in class file format.
      * 
-     * @param className The name of the new class
-     * @param classRep A memory image of a class file
-     * @param offset The offset into the classRep
-     * @param length The length of the class file
+     * @param className
+     *            The name of the new class
+     * @param classRep
+     *            A memory image of a class file
+     * @param offset
+     *            The offset into the classRep
+     * @param length
+     *            The length of the class file
      */
-    protected final Class<?> defineClass(String className, byte[] classRep, int offset,
-            int length) throws ClassFormatError {
+    protected final Class<?> defineClass(String className, byte[] classRep,
+            int offset, int length) throws ClassFormatError {
         return null;
     }
 
@@ -172,15 +190,20 @@
      * definition in class file format and assigns the new class to the
      * specified protection domain.
      * 
-     * @param className The name of the new class.
-     * @param classRep A memory image of a class file.
-     * @param offset The offset into the classRep.
-     * @param length The length of the class file.
-     * @param protectionDomain The protection domain this class should belongs
-     *        to.
-     */
-    protected final Class<?> defineClass(String className, byte[] classRep, int offset,
-            int length, ProtectionDomain protectionDomain) throws java.lang.ClassFormatError {
+     * @param className
+     *            The name of the new class.
+     * @param classRep
+     *            A memory image of a class file.
+     * @param offset
+     *            The offset into the classRep.
+     * @param length
+     *            The length of the class file.
+     * @param protectionDomain
+     *            The protection domain this class should belongs to.
+     */
+    protected final Class<?> defineClass(String className, byte[] classRep,
+            int offset, int length, ProtectionDomain protectionDomain)
+            throws java.lang.ClassFormatError {
         return null;
     }
 
@@ -190,11 +213,15 @@
      * protection domain.
      * </p>
      * 
-     * @param name The name of the class to define.
-     * @param b The byte buffer containing the bytecodes of the new class.
-     * @param protectionDomain The protection domain this class belongs to.
+     * @param name
+     *            The name of the class to define.
+     * @param b
+     *            The byte buffer containing the bytecodes of the new class.
+     * @param protectionDomain
+     *            The protection domain this class belongs to.
      * @return The defined class.
-     * @throws ClassFormatError if an invalid class file is defined.
+     * @throws ClassFormatError
+     *             if an invalid class file is defined.
      * @since 1.5
      */
     protected final Class<?> defineClass(String name, ByteBuffer b,
@@ -210,10 +237,13 @@
      * to find a loaded class of the same name.
      * 
      * @return The class or null.
-     * @param className The name of the class to search for.
-     * @throws ClassNotFoundException if the class cannot be found.
+     * @param className
+     *            The name of the class to search for.
+     * @throws ClassNotFoundException
+     *             if the class cannot be found.
      */
-    protected Class<?> findClass(String className) throws ClassNotFoundException {
+    protected Class<?> findClass(String className)
+            throws ClassNotFoundException {
         return null;
     }
 
@@ -223,7 +253,8 @@
      * caller should call resolveClass() on the result if necessary.
      * 
      * @return The class or null.
-     * @param className The name of the class to search for.
+     * @param className
+     *            The name of the class to search for.
      */
     protected final Class<?> findLoadedClass(String className) {
         return null;
@@ -234,10 +265,13 @@
      * class has already been been linked.
      * 
      * @return The class which was loaded.
-     * @param className The name of the class to search for.
-     * @throws ClassNotFoundException if the class cannot be found.
+     * @param className
+     *            The name of the class to search for.
+     * @throws ClassNotFoundException
+     *             if the class cannot be found.
      */
-    protected final Class<?> findSystemClass(String className) throws ClassNotFoundException {
+    protected final Class<?> findSystemClass(String className)
+            throws ClassNotFoundException {
         return null;
     }
 
@@ -245,8 +279,9 @@
      * Returns the specified ClassLoader's parent.
      * 
      * @return The class or null.
-     * @throws SecurityException if a security manager exists and it does not
-     *         allow the parent loader to be retrieved.
+     * @throws SecurityException
+     *             if a security manager exists and it does not allow the parent
+     *             loader to be retrieved.
      */
     public final ClassLoader getParent() {
         return null;
@@ -258,8 +293,9 @@
      * behavior is just to return null.
      * 
      * @return The location of the resource.
-     * @param resName String the name of the resource to find.
-     * @see Class#getResource
+     * @param resName
+     *            String the name of the resource to find.
+     * @see Class#getResource(String)
      */
     public URL getResource(String resName) {
         return null;
@@ -271,7 +307,10 @@
      * The default behavior is just to return an empty Enumeration.
      * 
      * @return The location of the resources.
-     * @param resName String the name of the resource to find.
+     * @param resName
+     *            String the name of the resource to find.
+     * @throws IOException
+     *             if an IO exception occurs
      */
     public Enumeration<URL> getResources(String resName) throws IOException {
         return null;
@@ -283,7 +322,8 @@
      * return null.
      * 
      * @return A stream on the resource or null.
-     * @param resName String the name of the resource to find.
+     * @param resName
+     *            String the name of the resource to find.
      * @see Class#getResourceAsStream
      */
     public InputStream getResourceAsStream(String resName) {
@@ -295,8 +335,10 @@
      * Equivalent to loadClass(className, false);
      * 
      * @return The Class object.
-     * @param className The name of the class to search for.
-     * @throws ClassNotFoundException if the class could not be found.
+     * @param className
+     *            The name of the class to search for.
+     * @throws ClassNotFoundException
+     *             if the class could not be found.
      */
     public Class<?> loadClass(String className) throws ClassNotFoundException {
         return null;
@@ -309,9 +351,12 @@
      * loader. 3) Call findClass(className) to find the class
      * 
      * @return The Class object.
-     * @param className The name of the class to search for.
-     * @param resolveClass Indicates if class should be resolved after loading.
-     * @throws ClassNotFoundException if the class could not be found.
+     * @param className
+     *            The name of the class to search for.
+     * @param resolveClass
+     *            Indicates if class should be resolved after loading.
+     * @throws ClassNotFoundException
+     *             if the class could not be found.
      */
     protected Class<?> loadClass(String className, boolean resolveClass)
             throws ClassNotFoundException {
@@ -322,28 +367,27 @@
      * Forces a class to be linked (initialized). If the class has already been
      * linked this operation has no effect.
      * 
-     * @param clazz The Class to link.
-     * @throws NullPointerException if clazz is null.
-     * @see Class#getResource
+     * @param clazz
+     *            The Class to link.
+     * @throws NullPointerException
+     *             if clazz is null.
      */
     protected final void resolveClass(Class<?> clazz) {
         return;
     }
 
     /**
-     * <p>
      * This method must be provided by the VM vendor, as it is used by other
      * provided class implementations in this package. A sample implementation
      * of this method is provided by the reference implementation. This method
      * is used by SecurityManager.classLoaderDepth(), currentClassLoader() and
      * currentLoadedClass(). Answers true if the receiver is a system class
      * loader.
-     * </p>
-     * <p>
+     * 
      * Note that this method has package visibility only. It is defined here to
      * avoid the security manager check in getSystemClassLoader, which would be
      * required to implement this method anywhere else.
-     * </p>
+     *
      * 
      * @return <code>true</code> if the receiver is a system class loader
      * @see Class#getClassLoaderImpl()
@@ -362,7 +406,8 @@
      * implement this method anywhere else.
      * </p>
      * 
-     * @param child A child candidate
+     * @param child
+     *            A child candidate
      * @return <code>true</code> if the receiver is ancestor of the parameter
      */
     final boolean isAncestorOf(ClassLoader child) {
@@ -376,7 +421,8 @@
      * ClassLoader.
      * 
      * @return The location of the resource.
-     * @param resName The name of the resource to find.
+     * @param resName
+     *            The name of the resource to find.
      */
     protected URL findResource(String resName) {
         return null;
@@ -387,11 +433,13 @@
      * described by resName, using the class loader's resource lookup algorithm.
      * The default behavior is just to return an empty Enumeration.
      * 
-     * @param resName The name of the resource to find.
+     * @param resName
+     *            The name of the resource to find.
      * 
      * @return The locations of the resources.
      * 
-     * @throws IOException when an error occurs
+     * @throws IOException
+     *             when an error occurs
      */
     protected Enumeration<URL> findResources(String resName) throws IOException {
         return null;
@@ -403,7 +451,8 @@
      * the directories specified by the system property "java.library.path".
      * 
      * @return The library file name or null.
-     * @param libName The name of the library to find.
+     * @param libName
+     *            The name of the library to find.
      */
     protected String findLibrary(String libName) {
         return null;
@@ -413,7 +462,8 @@
      * Attempt to locate the requested package. If no package information can be
      * located, null is returned.
      * 
-     * @param name The name of the package to find
+     * @param name
+     *            The name of the package to find
      * @return The package requested, or null
      */
     protected Package getPackage(String name) {
@@ -432,28 +482,39 @@
     /**
      * Define a new Package using the specified information.
      * 
-     * @param name The name of the package
-     * @param specTitle The title of the specification for the Package
-     * @param specVersion The version of the specification for the Package
-     * @param specVendor The vendor of the specification for the Package
-     * @param implTitle The implementation title of the Package
-     * @param implVersion The implementation version of the Package
-     * @param implVendor The specification vendor of the Package
-     * @param sealBase If sealBase is null, the package is left unsealed.
-     *        Otherwise, the the package is sealed using this URL.
+     * @param name
+     *            The name of the package
+     * @param specTitle
+     *            The title of the specification for the Package
+     * @param specVersion
+     *            The version of the specification for the Package
+     * @param specVendor
+     *            The vendor of the specification for the Package
+     * @param implTitle
+     *            The implementation title of the Package
+     * @param implVersion
+     *            The implementation version of the Package
+     * @param implVendor
+     *            The specification vendor of the Package
+     * @param sealBase
+     *            If sealBase is null, the package is left unsealed. Otherwise,
+     *            the the package is sealed using this URL.
      * @return The Package created
-     * @throws IllegalArgumentException if the Package already exists
+     * @throws IllegalArgumentException
+     *             if the Package already exists
      */
-    protected Package definePackage(String name, String specTitle, String specVersion,
-            String specVendor, String implTitle, String implVersion, String implVendor,
-            URL sealBase) throws IllegalArgumentException {
+    protected Package definePackage(String name, String specTitle,
+            String specVersion, String specVendor, String implTitle,
+            String implVersion, String implVendor, URL sealBase)
+            throws IllegalArgumentException {
         return null;
     }
 
     /**
      * Gets the signers of a class.
      * 
-     * @param c The Class object
+     * @param c
+     *            The Class object
      * @return signers The signers for the class
      */
     final Object[] getSigners(Class<?> c) {
@@ -463,8 +524,10 @@
     /**
      * Sets the signers of a class.
      * 
-     * @param c The Class object
-     * @param signers The signers for the class
+     * @param c
+     *            The Class object
+     * @param signers
+     *            The signers for the class
      */
     protected final void setSigners(Class<?> c, Object[] signers) {
         return;
@@ -496,7 +559,8 @@
      * <li>The item at depth zero is the caller of this method</li>
      * </ul>
      * 
-     * @param depth the stack depth of the requested ClassLoader
+     * @param depth
+     *            the stack depth of the requested ClassLoader
      * @return the ClassLoader at the specified depth
      */
     static final ClassLoader getStackClassLoader(int depth) {
@@ -524,10 +588,14 @@
      * ClassLoader of the calling method. Loads and links the library specified
      * by the argument.
      * 
-     * @param libName the name of the library to load
-     * @param loader the classloader in which to load the library
-     * @throws UnsatisfiedLinkError if the library could not be loaded
-     * @throws SecurityException if the library was not allowed to be loaded
+     * @param libName
+     *            the name of the library to load
+     * @param loader
+     *            the classloader in which to load the library
+     * @throws UnsatisfiedLinkError
+     *             if the library could not be loaded
+     * @throws SecurityException
+     *             if the library was not allowed to be loaded
      */
     static void loadLibraryWithClassLoader(String libName, ClassLoader loader) {
         return;
@@ -540,20 +608,27 @@
      * and links the library specified by the argument. No security check is
      * done.
      * 
-     * @param libName the name of the library to load
-     * @param loader the classloader in which to load the library
-     * @param libraryPath the library path to search, or null
-     * @throws UnsatisfiedLinkError if the library could not be loaded
+     * @param libName
+     *            the name of the library to load
+     * @param loader
+     *            the classloader in which to load the library
+     * @param libraryPath
+     *            the library path to search, or null
+     * @throws UnsatisfiedLinkError
+     *             if the library could not be loaded
      */
-    static void loadLibraryWithPath(String libName, ClassLoader loader, String libraryPath) {
+    static void loadLibraryWithPath(String libName, ClassLoader loader,
+            String libraryPath) {
         return;
     }
 
     /**
      * Sets the assertion status of a class.
      * 
-     * @param cname Class name
-     * @param enable Enable or disable assertion
+     * @param cname
+     *            Class name
+     * @param enable
+     *            Enable or disable assertion
      */
     public void setClassAssertionStatus(String cname, boolean enable) {
         return;
@@ -562,8 +637,10 @@
     /**
      * Sets the assertion status of a package.
      * 
-     * @param pname Package name
-     * @param enable Enable or disable assertion
+     * @param pname
+     *            Package name
+     * @param enable
+     *            Enable or disable assertion
      */
     public void setPackageAssertionStatus(String pname, boolean enable) {
         return;
@@ -572,7 +649,8 @@
     /**
      * Sets the default assertion status of a classloader
      * 
-     * @param enable Enable or disable assertion
+     * @param enable
+     *            Enable or disable assertion
      */
     public void setDefaultAssertionStatus(boolean enable) {
         return;
@@ -594,7 +672,8 @@
      * 0 for disabled.
      * 
      * @return the assertion status.
-     * @param cname the name of class.
+     * @param cname
+     *            the name of class.
      */
     boolean getClassAssertionStatus(String cname) {
         return false;
@@ -607,7 +686,8 @@
      * 0 for disabled.
      * 
      * @return the assertion status.
-     * @param pname the name of package.
+     * @param pname
+     *            the name of package.
      */
     boolean getPackageAssertionStatus(String pname) {
         return false;

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/build.xml?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/build.xml Tue Mar  4 00:02:13 2008
@@ -58,7 +58,7 @@
                 <include name="fdlibm.h" />
                 <include name="hymagic.h" />
                 <include name="jsig.h" />
-                <include name="hyzip.h"/>
+                <include name="vmizip.h"/>
             </fileset>
         </copy>
         <copy todir="${hy.jdk}/include" overwrite="yes">

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/BufferedReader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/BufferedReader.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/BufferedReader.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/BufferedReader.java Tue Mar  4 00:02:13 2008
@@ -302,7 +302,7 @@
      * <code>'\r\n'</code> or end of stream. The <code>String</code> does not
      * include the newline sequence. 
      * In EBCDIC systems, a new line can also be represented by the 
-     * <code>'\u0085'</code> (NEL) character.
+     * <code>'&#92;u0085'</code> (NEL) character.
      * 
      * @return the contents of the line or null if no characters were read
      *         before end of stream.

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/DataInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/DataInputStream.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/DataInputStream.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/DataInputStream.java Tue Mar  4 00:02:13 2008
@@ -29,6 +29,9 @@
  * @see DataOutputStream
  */
 public class DataInputStream extends FilterInputStream implements DataInput {
+
+    byte[] buff;
+
     /**
      * Constructs a new DataInputStream on the InputStream <code>in</code>.
      * All reads can now be filtered through this stream. Note that data read by
@@ -41,9 +44,6 @@
      * @see DataOutputStream
      * @see RandomAccessFile
      */
-
-    byte[] buff;
-
     public DataInputStream(InputStream in) {
         super(in);
         buff = new byte[8];

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/LineNumberInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/LineNumberInputStream.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/LineNumberInputStream.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/LineNumberInputStream.java Tue Mar  4 00:02:13 2008
@@ -110,6 +110,7 @@
      *             If the stream is already closed or another IOException
      *             occurs.
      */
+    @SuppressWarnings("fallthrough")
     @Override
     public int read() throws IOException {
         int currentChar = lastChar;

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/LineNumberReader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/LineNumberReader.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/LineNumberReader.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/LineNumberReader.java Tue Mar  4 00:02:13 2008
@@ -111,6 +111,7 @@
      *             If the reader is already closed or another IOException
      *             occurs.
      */
+    @SuppressWarnings("fallthrough")
     @Override
     public int read() throws IOException {
         synchronized (lock) {

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/Reader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/Reader.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/Reader.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/Reader.java Tue Mar  4 00:02:13 2008
@@ -187,7 +187,7 @@
      * action is to throw <code>IOException</code>.
      * 
      * @throws IOException
-     *             If a problem occured or the receiver does not support
+     *             If a problem occurred or the receiver does not support
      *             <code>mark()/reset()</code>.
      */
     public void reset() throws IOException {

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/StreamTokenizer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/StreamTokenizer.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/StreamTokenizer.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/StreamTokenizer.java Tue Mar  4 00:02:13 2008
@@ -120,7 +120,7 @@
      * specification.
      */
     private StreamTokenizer() {
-        /**
+        /*
          * Initialize the default state per specification. All byte values 'A'
          * through 'Z', 'a' through 'z', and '\u00A0' through '\u00FF' are
          * considered to be alphabetic.
@@ -173,10 +173,10 @@
      * Construct a new StreamTokenizer on the Reader <code>r</code>.
      * Initialize the default state per specification.
      * <UL>
-     * <LI>All byte values 'A' through 'Z', 'a' through 'z', and '\u00A0'
-     * through '\u00FF' are considered to be alphabetic.</LI>
-     * <LI>All byte values '\u0000' through '\u0020' are considered to be white
-     * space. '/' is a comment character.</LI>
+     * <LI>All byte values 'A' through 'Z', 'a' through 'z', and '&#92;u00A0'
+     * through '&#92;u00FF' are considered to be alphabetic.</LI>
+     * <LI>All byte values '&#92;u0000' through '&#92;u0020' are considered to
+     * be white space. '/' is a comment character.</LI>
      * <LI>Single quote '\'' and double quote '"' are string quote characters.</LI>
      * <LI>Numbers are parsed.</LI>
      * <LI>Ends of lines are considered to be white space rather than separate

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/AbstractStringBuilder.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/AbstractStringBuilder.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/AbstractStringBuilder.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/AbstractStringBuilder.java Tue Mar  4 00:02:13 2008
@@ -497,7 +497,7 @@
     /**
      * Sets the current length to a new value. If the new length is larger than
      * the current length, then the new characters at the end of this object
-     * will contain the <code>char</code> value of <code>\u0000</code>.
+     * will contain the <code>char</code> value of <code>&#92;u0000</code>.
      * 
      * @param length
      *            the new length of this StringBuffer

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/Character.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/Character.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/Character.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/Character.java Tue Mar  4 00:02:13 2008
@@ -370,7 +370,7 @@
     /**
      * <p>
      * Minimum value of a high surrogate or leading surrogate unit in UTF-16
-     * encoding - <code>'\uD800'</code>.
+     * encoding - <code>'&#92;uD800'</code>.
      * </p>
      * 
      * @since 1.5
@@ -380,7 +380,7 @@
     /**
      * <p>
      * Maximum value of a high surrogate or leading surrogate unit in UTF-16
-     * encoding - <code>'\uDBFF'</code>.
+     * encoding - <code>'&#92;uDBFF'</code>.
      * </p>
      * 
      * @since 1.5
@@ -390,7 +390,7 @@
     /**
      * <p>
      * Minimum value of a low surrogate or trailing surrogate unit in UTF-16
-     * encoding - <code>'\uDC00'</code>.
+     * encoding - <code>'&#92;uDC00'</code>.
      * </p>
      * 
      * @since 1.5
@@ -399,7 +399,7 @@
 
     /**
      * Maximum value of a low surrogate or trailing surrogate unit in UTF-16
-     * encoding - <code>'\uDFFF'</code>.
+     * encoding - <code>'&#92;uDFFF'</code>.
      * </p>
      * 
      * @since 1.5
@@ -408,7 +408,7 @@
 
     /**
      * <p>
-     * Minimum value of a surrogate unit in UTF-16 encoding - <code>'\uD800'</code>.
+     * Minimum value of a surrogate unit in UTF-16 encoding - <code>'&#92;uD800'</code>.
      * </p>
      * 
      * @since 1.5
@@ -417,7 +417,7 @@
 
     /**
      * <p>
-     * Maximum value of a surrogate unit in UTF-16 encoding - <code>'\uDFFF'</code>.
+     * Maximum value of a surrogate unit in UTF-16 encoding - <code>'&#92;uDFFF'</code>.
      * </p>
      * 
      * @since 1.5

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/Comparable.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/Comparable.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/Comparable.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/Comparable.java Tue Mar  4 00:02:13 2008
@@ -21,14 +21,13 @@
 /**
  * This interface should be implemented by all classes which wish to define a
  * <em>natural ordering</em> of their instances. The ordering rule must be
- * transitive and invertable (i.e. the sign of the result of x.compareTo(y) must
+ * transitive and invertible (i.e. the sign of the result of x.compareTo(y) must
  * equal the negation of the sign of the result of y.compareTo(x) for all x and
  * y).
  * <p>
- * In addition, it is desireable (but not required) that when the result of
+ * In addition, it is desirable (but not required) that when the result of
  * x.compareTo(y) is zero (and only then) the result of x.equals(y) should be
  * true.
- * 
  */
 public interface Comparable<T> {
 	

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/Math.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/Math.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/Math.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/Math.java Tue Mar  4 00:02:13 2008
@@ -174,7 +174,9 @@
 	 *            the value to be converted
 	 * @return the ceiling of the argument.
 	 */
-	public static native double ceil(double d);
+	public static double ceil(double d) {
+            return -floor(-d);
+        } 
 
 	/**
 	 * Answers the closest double approximation of the cosine of the argument
@@ -228,7 +230,13 @@
 	 *            the value to be converted
 	 * @return the ceiling of the argument.
 	 */
-	public static native double floor(double d);
+	public static double floor(double d) {
+            if (Double.isNaN(d) || Double.isInfinite(d) || d == 0) {
+               return d; 
+            }  
+            double res = (double)(long)d;
+            return d > 0 || res == d ? res : res - 1; 
+        }
     
     /**
      * Answers sqrt(<i>x</i><sup>2</sup>+<i>y</i><sup>2</sup>). The
@@ -311,8 +319,7 @@
 		if (d1 != d2)
 			return Double.NaN;
 		/* max( +0.0,-0.0) == +0.0 */
-		if (d1 == 0.0
-				&& ((Double.doubleToLongBits(d1) & Double.doubleToLongBits(d2)) & 0x8000000000000000L) == 0)
+		if (d1 == 0.0 && (d1 != -0.0d || d2 != -0.0d))
 			return 0.0;
 		return d1;
 	}
@@ -336,8 +343,7 @@
 		if (f1 != f2)
 			return Float.NaN;
 		/* max( +0.0,-0.0) == +0.0 */
-		if (f1 == 0.0f
-				&& ((Float.floatToIntBits(f1) & Float.floatToIntBits(f2)) & 0x80000000) == 0)
+		if (f1 == 0.0f && (f1 != -0.0f || f2 != -0.0f))
 			return 0.0f;
 		return f1;
 	}
@@ -389,9 +395,8 @@
 		if (d1 != d2)
 			return Double.NaN;
 		/* min( +0.0,-0.0) == -0.0 */
-		if (d1 == 0.0
-				&& ((Double.doubleToLongBits(d1) | Double.doubleToLongBits(d2)) & 0x8000000000000000l) != 0)
-			return 0.0 * (-1.0);
+		if (d1 == 0.0 && (d1 == -0.0d || d2 == -0.0d))
+			return -0.0d;
 		return d1;
 	}
 
@@ -414,9 +419,8 @@
 		if (f1 != f2)
 			return Float.NaN;
 		/* min( +0.0,-0.0) == -0.0 */
-		if (f1 == 0.0f
-				&& ((Float.floatToIntBits(f1) | Float.floatToIntBits(f2)) & 0x80000000) != 0)
-			return 0.0f * (-1.0f);
+		if (f1 == 0.0f	&& (f1 == -0.0f || f2 == -0.0f)) 
+			return -0.0f;
 		return f1;
 	}
 
@@ -468,7 +472,13 @@
 	 *            the value to be converted
 	 * @return the closest integer to the argument (as a double).
 	 */
-	public static native double rint(double d);
+	public static double rint(double d) {
+	    if(d == +0.0d || d == -0.0d) {
+	        return d;
+	    }
+            double res = floor(d + 0.5d);
+            return res - d == 0.5d && res%2 != 0 ? res - 1 : res;
+        }
 
 	/**
 	 * Answers the result of rounding the argument to an integer.

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/String.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/String.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/String.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/String.java Tue Mar  4 00:02:13 2008
@@ -1657,7 +1657,7 @@
      * Return the index of the specified character into the upperValues table.
      * The upperValues table contains three entries at each position. These
      * three characters are the upper case conversion. If only two characters
-     * are used, the third character in the table is \u0000.
+     * are used, the third character in the table is &#92;u0000.
      * 
      * @param ch
      *            the char being converted to upper case
@@ -1777,11 +1777,16 @@
     }
 
     /**
-     * Copies this String removing white space characters from the beginning and
-     * end of the string.
+     * Answers a copy of this String with white space characters at the
+     * beginning and end removed.
      * 
-     * @return a new String with characters <code><= \\u0020</code> removed
-     *         from the beginning and the end
+     * If the receiver has no leading or trailing blanks then it returns itself.
+     * 
+     * Blanks are defined as characters with Unicode value
+     * <code><= &#92;u0020</code>.
+     * 
+     * @return a new String with leading and trailing blanks removed, or this
+     *         string if there are none.
      */
     public String trim() {
         int start = offset, last = offset + count - 1;

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/StringBuffer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/StringBuffer.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/StringBuffer.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/StringBuffer.java Tue Mar  4 00:02:13 2008
@@ -836,7 +836,7 @@
      * Sets the length of this StringBuffer to the specified length. If there
      * are more than length characters in this StringBuffer, the characters at
      * end are lost. If there are less than length characters in the
-     * StringBuffer, the additional characters are set to <code>\\u0000</code>.
+     * StringBuffer, the additional characters are set to <code>&#92;u0000</code>.
      * 
      * @param length
      *            the new length of this StringBuffer
@@ -844,7 +844,7 @@
      * @throws IndexOutOfBoundsException
      *             when <code>length < 0</code>
      * 
-     * @see #length
+     * @see #length()
      */
     @Override
     public synchronized void setLength(int length) {

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/SuppressWarnings.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/SuppressWarnings.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/SuppressWarnings.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/lang/SuppressWarnings.java Tue Mar  4 00:02:13 2008
@@ -22,17 +22,22 @@
 import java.lang.annotation.Target;
 
 /**
- * <p>
  * An annotation that indicates a compiler should suppress any warnings of the
  * type specified in the {@link #value()}.
- * </p>
  * 
  * @since 1.5
  */
 @Target( { ElementType.TYPE, ElementType.FIELD, ElementType.METHOD,
-ElementType.PARAMETER, ElementType.CONSTRUCTOR,
-ElementType.LOCAL_VARIABLE })
+        ElementType.PARAMETER, ElementType.CONSTRUCTOR,
+        ElementType.LOCAL_VARIABLE })
 @Retention(RetentionPolicy.SOURCE)
 public @interface SuppressWarnings {
+
+    /**
+     * Answers the array of warnings that compilers should suppress for the
+     * annotated element.
+     * 
+     * @return an array of warning types to suppress.
+     */
     public String[] value();
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/URL.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/URL.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/URL.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/URL.java Tue Mar  4 00:02:13 2008
@@ -386,7 +386,7 @@
 
     /**
      * Constructs a new URL instance using the arguments provided.
-     * <p>
+     * 
      * If the handler argument is non-null, a security check is made to verify
      * that user-defined protocol handlers can be specified.
      * 
@@ -407,20 +407,18 @@
     public URL(String protocol, String host, int port, String file,
             URLStreamHandler handler) throws MalformedURLException {
         if (port < -1) {
-            throw new MalformedURLException(org.apache.harmony.luni.util.Msg
-                    .getString("K0325", port)); //$NON-NLS-1$
+            throw new MalformedURLException(Msg.getString("K0325", port)); //$NON-NLS-1$
         }
 
         if (host != null && host.indexOf(":") != -1 && host.charAt(0) != '[') { //$NON-NLS-1$
             host = "[" + host + "]"; //$NON-NLS-1$ //$NON-NLS-2$
         }
 
-        if (protocol != null) {
-            this.protocol = protocol;
-        } else {
-            throw new NullPointerException(Msg.getString("K00b3", protocol)); //$NON-NLS-1$
+        if (protocol == null) {
+            throw new NullPointerException(Msg.getString("K00b3", "null")); //$NON-NLS-1$ //$NON-NLS-2$
         }
 
+        this.protocol = protocol;
         this.host = host;
         this.port = port;
 
@@ -443,8 +441,7 @@
             setupStreamHandler();
             if (strmHandler == null) {
                 throw new MalformedURLException(
-                        org.apache.harmony.luni.util.Msg.getString(
-                                "K00b3", protocol)); //$NON-NLS-1$
+                        Msg.getString("K00b3", protocol)); //$NON-NLS-1$
             }
         } else {
             SecurityManager sm = System.getSecurityManager();
@@ -522,7 +519,7 @@
      * @return <code>true</code> if the object is the same as this URL,
      *         <code>false</code> otherwise.
      * 
-     * @see #hashCode
+     * @see #hashCode()
      */
     @Override
     public boolean equals(Object o) {

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/URLEncoder.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/URLEncoder.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/URLEncoder.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/URLEncoder.java Tue Mar  4 00:02:13 2008
@@ -89,10 +89,15 @@
      * 
      * @param s
      *            the string to be converted
+     * @param enc
+     *            the name of a charset to use for encoding unsafe chars
      * @return the converted string
+     * @throws UnsupportedEncodingException
+     *             if the named charset is unsupported
      */
     public static String encode(String s, String enc)
             throws UnsupportedEncodingException {
+
         if (s == null || enc == null) {
             throw new NullPointerException();
         }

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Arrays.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Arrays.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Arrays.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Arrays.java Tue Mar  4 00:02:13 2008
@@ -3312,14 +3312,14 @@
     }
 
     /**
-     * <p>
      * Creates a <code>String</code> representation of the <code>byte[]</code>
-     * passed. The result is surrounded by brackets (<code>&quot;[]&quot;</code>),
+     * passed.
+     * 
+     * The result is surrounded by brackets (<code>&quot;[]&quot;</code>),
      * each element is converted to a <code>String</code> via the
-     * {@link String#valueOf(byte)} and separated by <code>&quot;, &quot;</code>.
+     * {@link String#valueOf(int)} and separated by <code>&quot;, &quot;</code>.
      * If the array is <code>null</code>, then <code>&quot;null&quot;</code>
      * is returned.
-     * </p>
      * 
      * @param array
      *            The <code>byte</code> array to convert.
@@ -3510,14 +3510,14 @@
     }
 
     /**
-     * <p>
      * Creates a <code>String</code> representation of the
-     * <code>short[]</code> passed. The result is surrounded by brackets (<code>&quot;[]&quot;</code>),
+     * <code>short[]</code> passed.
+     * 
+     * The result is surrounded by brackets (<code>&quot;[]&quot;</code>),
      * each element is converted to a <code>String</code> via the
-     * {@link String#valueOf(short)} and separated by
-     * <code>&quot;, &quot;</code>. If the array is <code>null</code>,
-     * then <code>&quot;null&quot;</code> is returned.
-     * </p>
+     * {@link String#valueOf(int)} and separated by <code>&quot;, &quot;</code>.
+     * If the array is <code>null</code>, then <code>&quot;null&quot;</code>
+     * is returned.
      * 
      * @param array
      *            The <code>short</code> array to convert.

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Collections.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Collections.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Collections.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Collections.java Tue Mar  4 00:02:13 2008
@@ -169,12 +169,27 @@
         }
     }
 
+    /**
+     * An immutable, serializable, empty <code>List</code>.
+     *
+     * @see Collections#emptyList()
+     */
     @SuppressWarnings("unchecked")
     public static final List EMPTY_LIST = new EmptyList();
 
+    /**
+     * An immutable, serializable, empty <code>Set</code>.
+     * 
+     * @see Collections#emptySet()
+     */
     @SuppressWarnings("unchecked")
     public static final Set EMPTY_SET = new EmptySet();
 
+    /**
+     * An immutable, serializable, empty <code>Map</code>.
+     * 
+     * @see Collections#emptyMap()
+     */
     @SuppressWarnings("unchecked")
     public static final Map EMPTY_MAP = new EmptyMap();
 
@@ -1506,6 +1521,8 @@
      * Performs a binary search for the specified element in the specified
      * sorted List using the specified Comparator.
      * 
+     * @param <T> The element type
+     * 
      * @param list
      *            the sorted List to search
      * @param object
@@ -2544,7 +2561,7 @@
     /**
      * Returns a dynamically typesafe view of the specified set.
      * 
-     * @param c
+     * @param s
      *            the set
      * @param type
      *            the type of the elements is permitted to insert
@@ -2575,7 +2592,7 @@
     /**
      * Returns a dynamically typesafe view of the specified sorted set.
      * 
-     * @param c
+     * @param s
      *            the sorted set
      * @param type
      *            the type of the elements is permitted to insert
@@ -3465,9 +3482,11 @@
              * Constructs a dynamically typesafe view of the specified map
              * entry.
              * 
-             * @param e -
+             * @param e
              *            the map entry for which a dynamically typesafe view is
              *            to be constructed.
+             * @param valueType
+             *            the type of the value
              */
             public CheckedEntry(Map.Entry<K, V> e, Class<V> valueType) {
                 if (e == null) {

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/FormattableFlags.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/FormattableFlags.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/FormattableFlags.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/FormattableFlags.java Tue Mar  4 00:02:13 2008
@@ -29,11 +29,11 @@
     
     /**
      * Denotes the output to be left-justified. In order to fill the minimum
-     * width requirement, spaces('\u0020') will be appended at the end of the
+     * width requirement, spaces('&#92;u0020') will be appended at the end of the
      * specified output element. If no such flag is set, the output is
      * right-justified.
      * 
-     * The flag corresponds to '-' ('\u002d') in the format specifier.
+     * The flag corresponds to '-' ('&#92;u002d') in the format specifier.
      */
     public static final int LEFT_JUSTIFY = 1;
 
@@ -42,7 +42,7 @@
      * parameter of Formatter.formatTo() requires. The output has the same
      * effect as String.toUpperCase(java.util.Locale).
      * 
-     * This flag corresponds to '^' ('\u005e') in the format specifier.
+     * This flag corresponds to '^' ('&#92;u005e') in the format specifier.
      */
     public static final int UPPERCASE = 2;
 
@@ -50,7 +50,7 @@
      * Denotes the output to be formatted in an alternate form. The definition
      * of the alternate form is given out by Formattable.
      * 
-     * This flag corresponds to '#' ('\u0023') in the format specifier.
+     * This flag corresponds to '#' ('&#92;u0023') in the format specifier.
      */
     public static final int ALTERNATE = 4;
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Locale.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Locale.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Locale.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Locale.java Tue Mar  4 00:02:13 2008
@@ -245,9 +245,10 @@
         }
 
         // countryCode is defined in ASCII character set
-        countryCode = uLocale.getCountry();
+        countryCode = country.length()!=0?uLocale.getCountry():"";
 
-        variantCode = uLocale.getVariant();
+        // Work around for be compatible with RI
+        variantCode = variant;
     }
 
 	/**

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Properties.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Properties.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Properties.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Properties.java Tue Mar  4 00:02:13 2008
@@ -35,16 +35,19 @@
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
-import org.apache.harmony.luni.util.PriviAction;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
 import org.xml.sax.EntityResolver;
 import org.xml.sax.ErrorHandler;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXParseException;
 
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+import org.apache.harmony.luni.internal.nls.Messages;
+import org.apache.harmony.luni.util.PriviAction;
+
 /**
  * Properties is a Hashtable where the keys and values must be Strings. Each
  * Properties can have a default Properties which specifies the default values
@@ -452,8 +455,9 @@
                     if (++count < 4) {
                         continue;
                     }
-                } else {
-                    throw new IllegalArgumentException();
+                } else if (count <= 4) {
+                    // luni.09=Invalid Unicode sequence: illegal character
+                    throw new IllegalArgumentException(Messages.getString("luni.09"));
                 }
                 mode = NONE;
                 buf[offset++] = (char) unicode;
@@ -572,9 +576,21 @@
             }
             buf[offset++] = nextChar;
         }
+        if (mode == UNICODE && count <= 4) {
+            // luni.08=Invalid Unicode sequence: expected format \\uxxxx
+            throw new IllegalArgumentException(Messages.getString("luni.08"));
+        }
+        if (keyLength == -1 && offset > 0) {
+            keyLength = offset;
+        }
         if (keyLength >= 0) {
             String temp = new String(buf, 0, offset);
-            put(temp.substring(0, keyLength), temp.substring(keyLength));
+            String key = temp.substring(0, keyLength);
+            String value = temp.substring(keyLength);
+            if (mode == SLASH) {
+                value += "\u0000";
+            }
+            put(key, value);
         }
     }   
 

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Scanner.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Scanner.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Scanner.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Scanner.java Tue Mar  4 00:02:13 2008
@@ -818,11 +818,9 @@
         boolean hasNextLine = false;
         while (true) {
             if (matcher.find()) {
-                if (inputExhausted || matcher.end() != bufferLength) {
-                    matchSuccessful = true;
-                    hasNextLine = true;
-                    break;
-                }
+                matchSuccessful = true;
+                hasNextLine = true;
+                break;
             } else {
                 if (inputExhausted) {
                     matchSuccessful = false;
@@ -1394,12 +1392,10 @@
         String result = null;
         while (true) {
             if (matcher.find()) {
-                if (inputExhausted || matcher.end() != bufferLength) {
-                    matchSuccessful = true;
-                    findStartIndex = matcher.end();
-                    result = matcher.group();
-                    break;
-                }
+                matchSuccessful = true;
+                findStartIndex = matcher.end();
+                result = matcher.group();
+                break;
             } else {
                 if (inputExhausted) {
                     matchSuccessful = false;

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/SimpleTimeZone.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/SimpleTimeZone.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/SimpleTimeZone.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/SimpleTimeZone.java Tue Mar  4 00:02:13 2008
@@ -585,6 +585,7 @@
     @Override
     public void setRawOffset(int offset) {
         rawOffset = offset;
+        icuTZ.setRawOffset(offset);
     }
 
     private void setStartMode() {

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/TimeZone.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/TimeZone.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/TimeZone.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/TimeZone.java Tue Mar  4 00:02:13 2008
@@ -20,7 +20,6 @@
 import java.io.Serializable;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
-import java.text.DateFormatSymbols;
 
 import org.apache.harmony.luni.util.PriviAction;
 
@@ -61,6 +60,8 @@
     static TimeZone GMT = new SimpleTimeZone(0, "GMT"); // Greenwich Mean Time
 
     private String ID;
+    
+    private com.ibm.icu.util.TimeZone icuTimeZone = null;
 
     private static void initializeAvailable() {
         TimeZone[] zones = TimeZones.getTimeZones();
@@ -79,16 +80,6 @@
     public TimeZone() {
     }
 
-    private void appendNumber(StringBuffer buffer, int count, int value) {
-        String string = Integer.toString(value);
-        if (count > string.length()) {
-            for (int i = 0; i < count - string.length(); i++) {
-                buffer.append('0');
-            }
-        }
-        buffer.append(string);
-    }
-
     /**
      * Answers a new TimeZone with the same ID, rawOffset and daylight savings
      * time rules as this TimeZone.
@@ -216,37 +207,11 @@
      * @return the TimeZone name
      */
     public String getDisplayName(boolean daylightTime, int style, Locale locale) {
-        if (style == SHORT || style == LONG) {
-            boolean useDaylight = daylightTime && useDaylightTime();
-            DateFormatSymbols data = new DateFormatSymbols(locale);
-            String id = getID();
-            String[][] zones = data.getZoneStrings();
-            for (int i = 0; i < zones.length; i++) {
-                if (id.equals(zones[i][0])) {
-                    String res = style == SHORT ? zones[i][useDaylight ? 4 : 2]
-                            : zones[i][useDaylight ? 3 : 1];
-                    return res == null ? "" : res;
-                }
-            }
-            int offset = getRawOffset();
-            if (useDaylight && this instanceof SimpleTimeZone) {
-                offset += ((SimpleTimeZone) this).getDSTSavings();
-            }
-            offset /= 60000;
-            char sign = '+';
-            if (offset < 0) {
-                sign = '-';
-                offset = -offset;
-            }
-            StringBuffer buffer = new StringBuffer(9);
-            buffer.append("GMT");
-            buffer.append(sign);
-            appendNumber(buffer, 2, offset / 60);
-            buffer.append(':');
-            appendNumber(buffer, 2, offset % 60);
-            return buffer.toString();
+        if(icuTimeZone == null || !ID.equals(icuTimeZone.getID())){
+            icuTimeZone = com.ibm.icu.util.TimeZone.getTimeZone(ID);
         }
-        throw new IllegalArgumentException();
+        return icuTimeZone.getDisplayName(
+                daylightTime, style, locale);
     }
 
     /**
@@ -337,6 +302,7 @@
         if (AvailableZones == null) {
             initializeAvailable();
         }
+
         TimeZone zone = AvailableZones.get(name);
         if (zone == null) {
             if (name.startsWith("GMT") && name.length() > 3) {
@@ -456,9 +422,14 @@
         String zone = AccessController.doPrivileged(new PriviAction<String>(
                 "user.timezone"));
 
+        // sometimes DRLVM incorrectly adds "\n" to the end of timezone ID
+        if (zone != null && zone.contains("\n")) {
+            zone = zone.substring(0, zone.indexOf("\n")); 
+        }
+
         // if property user.timezone is not set, we call the native method
         // getCustomTimeZone
-        if (zone == null) {
+        if (zone == null || zone.length() == 0) {
             int[] tzinfo = new int[10];
             boolean[] isCustomTimeZone = new boolean[1];
 

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/internal/nls/messages.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/internal/nls/messages.properties?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/internal/nls/messages.properties (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/internal/nls/messages.properties Tue Mar  4 00:02:13 2008
@@ -22,3 +22,5 @@
 luni.05=Attempt to insert {0} element into collection with element type {1}
 luni.06=The string argument is null
 luni.07=The stream is corrupted
+luni.08=Invalid Unicode sequence: expected format \\uxxxx
+luni.09=Invalid Unicode sequence: illegal character

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/platform/INetworkSystem.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/platform/INetworkSystem.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/platform/INetworkSystem.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/platform/INetworkSystem.java Tue Mar  4 00:02:13 2008
@@ -31,10 +31,6 @@
  */
 public interface INetworkSystem {
 
-	// -----------------------------------------------
-	// Class Const
-	// -----------------------------------------------
-
 	/*
 	 * Socket connect Step start
 	 */
@@ -45,10 +41,6 @@
 	 */
 	public final int SOCKET_CONNECT_STEP_CHECK = 1;
 
-	// -----------------------------------------------
-	// Methods
-	// -----------------------------------------------
-
 	/*
 	 * socket accept
 	 */
@@ -67,13 +59,13 @@
 	public int read(FileDescriptor aFD, byte[] data, int offset, int count,
 			int timeout) throws IOException;
     
-    public int readDirect(FileDescriptor aFD, long address, int offset, int count,
+    public int readDirect(FileDescriptor aFD, long address, int count,
             int timeout) throws IOException;
 
 	public int write(FileDescriptor fd, byte[] data, int offset, int count)
 			throws IOException;
     
-    public int writeDirect(FileDescriptor fd, long address, int offset, int count)
+    public int writeDirect(FileDescriptor fd, long address, int count)
             throws IOException;
 
 	public void setNonBlocking(FileDescriptor aFD, boolean block)

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java?rev=633384&r1=633383&r2=633384&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java Tue Mar  4 00:02:13 2008
@@ -63,13 +63,6 @@
 		return ref;
 	}
 
-	// Useing when cache set/get is OK
-	// public static native void oneTimeInitializationDatagram(
-	// boolean jcl_IPv6_support);
-	//
-	// public static native void oneTimeInitializationSocket(
-	// boolean jcl_IPv6_support);
-
 	// --------------------------------------------------
 	// java codes that wrap native codes
 	// --------------------------------------------------
@@ -89,9 +82,9 @@
 		return readSocketImpl(aFD, data, offset, count, timeout);
 	}
     
-    public int readDirect(FileDescriptor aFD, long address, int offset, int count,
+    public int readDirect(FileDescriptor aFD, long address, int count,
             int timeout) throws IOException {
-        return readSocketDirectImpl(aFD, address, offset, count, timeout);
+        return readSocketDirectImpl(aFD, address, count, timeout);
     }
 
 	public int write(FileDescriptor aFD, byte[] data, int offset, int count)
@@ -99,9 +92,9 @@
 		return writeSocketImpl(aFD, data, offset, count);
 	}
     
-    public int writeDirect(FileDescriptor aFD, long address, int offset,
-            int count) throws IOException {
-        return writeSocketDirectImpl(aFD, address, offset, count);
+    public int writeDirect(FileDescriptor aFD, long address, int count)
+            throws IOException {
+        return writeSocketDirectImpl(aFD, address, count);
     }
 
 	public void setNonBlocking(FileDescriptor aFD, boolean block)
@@ -435,13 +428,13 @@
 			int offset, int count, int timeout) throws IOException;
     
     static native int readSocketDirectImpl(FileDescriptor aFD, long address,
-            int offset, int count, int timeout) throws IOException;
+            int count, int timeout) throws IOException;
 
 	static native int writeSocketImpl(FileDescriptor fd, byte[] data,
 			int offset, int count) throws IOException;
     
     static native int writeSocketDirectImpl(FileDescriptor fd, long address,
-            int offset, int count) throws IOException;
+            int count) throws IOException;
 
 	static native void setNonBlockingImpl(FileDescriptor aFD,
 			boolean block);



Mime
View raw message