harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r718318 - in /harmony/enhanced: classlib/trunk/modules/accessibility/src/main/java/javax/accessibility/ classlib/trunk/modules/archive/src/main/java/java/util/jar/ classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/ cl...
Date Mon, 17 Nov 2008 18:35:30 GMT
Author: tellison
Date: Mon Nov 17 10:35:29 2008
New Revision: 718318

URL: http://svn.apache.org/viewvc?rev=718318&view=rev
Log:
Fix for HARMONY-6008 ([classlib] Fix japi found differences between harmony and spec)


Modified:
    harmony/enhanced/classlib/trunk/modules/accessibility/src/main/java/javax/accessibility/AccessibleAction.java
    harmony/enhanced/classlib/trunk/modules/accessibility/src/main/java/javax/accessibility/AccessibleRelation.java
    harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Attributes.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/synth/ColorPainter.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/synth/ColorType.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/FormView.java
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/rtf/RTFEditorKit.java
    harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/Bidi.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Class.java

Modified: harmony/enhanced/classlib/trunk/modules/accessibility/src/main/java/javax/accessibility/AccessibleAction.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/accessibility/src/main/java/javax/accessibility/AccessibleAction.java?rev=718318&r1=718317&r2=718318&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/accessibility/src/main/java/javax/accessibility/AccessibleAction.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/accessibility/src/main/java/javax/accessibility/AccessibleAction.java
Mon Nov 17 10:35:29 2008
@@ -15,18 +15,16 @@
  *  limitations under the License.
  */
 
-/**
- * @author Dennis Ushakov
- * @version $Revision$
- */
-
 package javax.accessibility;
 
 public interface AccessibleAction {
-    static final String TOGGLE_EXPAND = "toggle expand"; //$NON-NLS-1$
-    static final String INCREMENT = "increment"; //$NON-NLS-1$
-    static final String DECREMENT = "decrement"; //$NON-NLS-1$
+    static final String TOGGLE_EXPAND = new String("toggle expand"); //$NON-NLS-1$
+    static final String INCREMENT = new String("increment"); //$NON-NLS-1$
+    static final String DECREMENT = new String("decrement"); //$NON-NLS-1$
+
     int getAccessibleActionCount();
+
     String getAccessibleActionDescription(int i);
+
     boolean doAccessibleAction(int i);
 }

Modified: harmony/enhanced/classlib/trunk/modules/accessibility/src/main/java/javax/accessibility/AccessibleRelation.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/accessibility/src/main/java/javax/accessibility/AccessibleRelation.java?rev=718318&r1=718317&r2=718318&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/accessibility/src/main/java/javax/accessibility/AccessibleRelation.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/accessibility/src/main/java/javax/accessibility/AccessibleRelation.java
Mon Nov 17 10:35:29 2008
@@ -15,20 +15,15 @@
  *  limitations under the License.
  */
 
-/**
- * @author Dennis Ushakov
- * @version $Revision$
- */
-
 package javax.accessibility;
 
 
 public class AccessibleRelation extends AccessibleBundle {
-    public static final String LABEL_FOR = "labelFor"; //$NON-NLS-1$
-    public static final String LABELED_BY = "labeledBy"; //$NON-NLS-1$
-    public static final String MEMBER_OF = "memberOf"; //$NON-NLS-1$
-    public static final String CONTROLLER_FOR = "controllerFor"; //$NON-NLS-1$
-    public static final String CONTROLLED_BY = "controlledBy"; //$NON-NLS-1$
+    public static final String LABEL_FOR = new String("labelFor"); //$NON-NLS-1$
+    public static final String LABELED_BY = new String("labeledBy"); //$NON-NLS-1$
+    public static final String MEMBER_OF = new String("memberOf"); //$NON-NLS-1$
+    public static final String CONTROLLER_FOR = new String("controllerFor"); //$NON-NLS-1$
+    public static final String CONTROLLED_BY = new String("controlledBy"); //$NON-NLS-1$
     public static final String FLOWS_TO = "flowsTo"; //$NON-NLS-1$
     public static final String FLOWS_FROM = "flowsFrom"; //$NON-NLS-1$
     public static final String SUBWINDOW_OF = "subwindowOf"; //$NON-NLS-1$

Modified: harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Attributes.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Attributes.java?rev=718318&r1=718317&r2=718318&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Attributes.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Attributes.java
Mon Nov 17 10:35:29 2008
@@ -110,7 +110,7 @@
             name = buf;
         }
 
-        public byte[] getBytes() {
+        byte[] getBytes() {
             return name;
         }
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java?rev=718318&r1=718317&r2=718318&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
Mon Nov 17 10:35:29 2008
@@ -364,12 +364,12 @@
         }
     }
 
-    protected static final String ICONIFY_CMD = "Iconify";
-    protected static final String MAXIMIZE_CMD = "Maximize";
-    protected static final String RESTORE_CMD = "Restore";
-    protected static final String CLOSE_CMD = "Close";
-    protected static final String MOVE_CMD = "Move";
-    protected static final String SIZE_CMD = "Size";
+    protected static final String ICONIFY_CMD = new String("Iconify");
+    protected static final String MAXIMIZE_CMD = new String("Maximize");
+    protected static final String RESTORE_CMD = new String("Restore");
+    protected static final String CLOSE_CMD = new String("Close");
+    protected static final String MOVE_CMD = new String("Move");
+    protected static final String SIZE_CMD = new String("Size");
 
     protected JMenuBar menuBar;
     protected JMenu windowMenu;

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/synth/ColorPainter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/synth/ColorPainter.java?rev=718318&r1=718317&r2=718318&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/synth/ColorPainter.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/synth/ColorPainter.java
Mon Nov 17 10:35:29 2008
@@ -22,7 +22,7 @@
 
 import org.apache.harmony.x.swing.Utilities;
 
-public class ColorPainter extends SynthPainter {
+class ColorPainter extends SynthPainter {
 
     /**
      * Method that do paints

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/synth/ColorType.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/synth/ColorType.java?rev=718318&r1=718317&r2=718318&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/synth/ColorType.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/synth/ColorType.java
Mon Nov 17 10:35:29 2008
@@ -40,7 +40,11 @@
      * The maximum number of created color types. This field exist for
      * compatibility with RI only
      */
-    public static final int MAX_COUNT = 5;
+    public static final int MAX_COUNT; // Required by spec to be defined as a non-const value.
+    
+    static {
+        MAX_COUNT = 5;
+    }
 
     /**
      * The field is used for ID calculation

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/FormView.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/FormView.java?rev=718318&r1=718317&r2=718318&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/FormView.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/FormView.java
Mon Nov 17 10:35:29 2008
@@ -63,12 +63,12 @@
     /**
      * @deprecated
      */
-    public static final String RESET = "Reset";
+    public static final String RESET = new String("Reset");
 
     /**
      * @deprecated
      */
-    public static final String SUBMIT = "Submit Query";
+    public static final String SUBMIT = new String("Submit Query");
 
     private int inputTypeIndex = FormAttributes.INPUT_TYPE_INDEX_UNDEFINED;
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/rtf/RTFEditorKit.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/rtf/RTFEditorKit.java?rev=718318&r1=718317&r2=718318&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/rtf/RTFEditorKit.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/rtf/RTFEditorKit.java
Mon Nov 17 10:35:29 2008
@@ -17,6 +17,7 @@
 
 package javax.swing.text.rtf;
 
+import org.apache.harmony.luni.util.NotImplementedException;
 import org.apache.harmony.x.swing.text.rtf.RTFParser;
 import org.apache.harmony.x.swing.text.rtf.ParseException;
 import org.apache.harmony.x.swing.text.rtf.RTFHandler;
@@ -68,12 +69,12 @@
     }
   }
 
-  public void write(OutputStream out, Document doc, int pos, int len) {
-
+  public void write(OutputStream out, Document doc, int pos, int len) throws IOException,
BadLocationException, NotImplementedException {
+      throw new NotImplementedException();
   }
 
-  public void write(Writer out, Document doc, int pos, int len) {
-
+  public void write(Writer out, Document doc, int pos, int len) throws IOException, BadLocationException
{
+      throw new IOException("Cannot write RTF");
   }
 
 }
\ No newline at end of file

Modified: harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/Bidi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/Bidi.java?rev=718318&r1=718317&r2=718318&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/Bidi.java (original)
+++ harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/Bidi.java Mon Nov
17 10:35:29 2008
@@ -39,24 +39,38 @@
      * Constant that indicates the default base level. If there is no strong
      * character, then set the paragraph level to left-to-right.
      */
-    public static final int DIRECTION_DEFAULT_LEFT_TO_RIGHT = com.ibm.icu.text.Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT;
+    public static final int DIRECTION_DEFAULT_LEFT_TO_RIGHT = -2;
 
     /**
      * Constant that indicates the default base level. If there is no strong
      * character, then set the paragraph level to right-to-left.
      */
-    public static final int DIRECTION_DEFAULT_RIGHT_TO_LEFT = com.ibm.icu.text.Bidi.DIRECTION_DEFAULT_RIGHT_TO_LEFT;
+    public static final int DIRECTION_DEFAULT_RIGHT_TO_LEFT = -1;
 
     /**
      * Constant that specifies the default base level as 
      * left-to-right. 
      */
-    public static final int DIRECTION_LEFT_TO_RIGHT = com.ibm.icu.text.Bidi.DIRECTION_LEFT_TO_RIGHT;
+    public static final int DIRECTION_LEFT_TO_RIGHT = 0;
 
     /**
      * Constant that specifies the default base level right-to-left.
      */  
-    public static final int DIRECTION_RIGHT_TO_LEFT = com.ibm.icu.text.Bidi.DIRECTION_RIGHT_TO_LEFT;
+    public static final int DIRECTION_RIGHT_TO_LEFT = 1;
+
+    /*
+     * Converts the constant from the value specified in the Java spec, to the
+     * value required by the ICU implementation.
+     */
+    private final static int convertDirectionConstant(int javaConst) {
+        switch (javaConst) {
+        case DIRECTION_DEFAULT_LEFT_TO_RIGHT : return com.ibm.icu.text.Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT;
+        case DIRECTION_DEFAULT_RIGHT_TO_LEFT : return com.ibm.icu.text.Bidi.DIRECTION_DEFAULT_RIGHT_TO_LEFT;
+        case DIRECTION_LEFT_TO_RIGHT         : return com.ibm.icu.text.Bidi.DIRECTION_LEFT_TO_RIGHT;
+        case DIRECTION_RIGHT_TO_LEFT         : return com.ibm.icu.text.Bidi.DIRECTION_RIGHT_TO_LEFT;
+        default                              : return com.ibm.icu.text.Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT;
+        }
+    }
 
     /* 
      * Use an embedded ICU4J Bidi object to do all the work
@@ -159,7 +173,8 @@
                     "text.11", paragraphLength)); //$NON-NLS-1$
         }
 
-        icuBidi = new com.ibm.icu.text.Bidi(text, textStart, embeddings, embStart, paragraphLength,
flags);
+        icuBidi = new com.ibm.icu.text.Bidi(text, textStart, embeddings,
+                embStart, paragraphLength, convertDirectionConstant(flags));
     }
 
     /**

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Class.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Class.java?rev=718318&r1=718317&r2=718318&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Class.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Class.java
Mon Nov 17 10:35:29 2008
@@ -334,7 +334,7 @@
      * Note: We don't check member access permission for each super class.
      * Java 1.5 API specification doesn't require this check.
      */
-    public Class<?>[] getClasses() {
+    public Class[] getClasses() {
         checkMemberAccess(Member.PUBLIC);
         Class<?> clss = this;
         ArrayList<Class<?>> classes = null;
@@ -379,7 +379,7 @@
         return VMClassRegistry.getComponentType(this);
     }
 
-    public Constructor<T> getConstructor(Class<?>... argumentTypes)
+    public Constructor<T> getConstructor(Class... argumentTypes)
         throws NoSuchMethodException {
         checkMemberAccess(Member.PUBLIC);
         Constructor<T> ctors[] = getReflectionData().getPublicConstructors(); 



Mime
View raw message