harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r439260 [1/2] - in /incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java: java/beans/ java/beans/beancontext/ org/apache/harmony/beans/ org/apache/harmony/beans/editors/ org/apache/harmony/beans/internal/nls/
Date Fri, 01 Sep 2006 10:08:30 GMT
Author: mloenko
Date: Fri Sep  1 03:08:27 2006
New Revision: 439260

URL: http://svn.apache.org/viewvc?rev=439260&view=rev
Log:
applied patches for HARMONY-1328
[classlib][internationalization]Internationalization of the beans module

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanDescriptor.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Beans.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/DefaultPersistenceDelegate.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/DesignMode.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Encoder.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventHandler.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Expression.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/IndexedPropertyDescriptor.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Introspector.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyChangeSupport.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyDescriptor.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyEditorManager.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyEditorSupport.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/SimpleBeanInfo.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Statement.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/VetoableChangeSupport.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/XMLDecoder.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/XMLEncoder.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextChildSupport.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextMembershipEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextServicesSupport.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/ArrayPersistenceDelegate.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/Command.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/DefaultPersistenceDelegatesFactory.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/Handler.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/editors/BooleanEditor.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/editors/ColorEditor.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/editors/FontEditor.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/internal/nls/messages.properties
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_BooleanPersistenceDelegate.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_BytePersistenceDelegate.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_CharacterPersistenceDelegate.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_ClassPersistenceDelegate.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_DoublePersistenceDelegate.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_FloatPersistenceDelegate.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_IntegerPersistenceDelegate.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_LongPersistenceDelegate.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_ShortPersistenceDelegate.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_StringPersistenceDelegate.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_reflect_FieldPersistenceDelegate.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanDescriptor.java?rev=439260&r1=439259&r2=439260&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanDescriptor.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanDescriptor.java Fri Sep  1 03:08:27 2006
@@ -102,7 +102,7 @@
 
         if (beanClass != null) {
             String beanClassName = beanClass.getName();
-            int idx = beanClassName.lastIndexOf(".");
+            int idx = beanClassName.lastIndexOf("."); //$NON-NLS-1$
 
             result = (idx == -1) ? beanClassName : beanClassName
                     .substring(idx + 1);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java?rev=439260&r1=439259&r2=439260&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java Fri Sep  1 03:08:27 2006
@@ -27,6 +27,8 @@
 import java.util.Map;
 import java.util.Vector;
 
+import org.apache.harmony.beans.internal.nls.Messages;
+
 class BeanInfoImpl implements BeanInfo {
 
     private static int MT_OTHER = 0;
@@ -136,13 +138,13 @@
 
                 String listenerName = null;
 
-                if (methodName.endsWith("Listener")) {
+                if (methodName.endsWith("Listener")) { //$NON-NLS-1$
                     listenerName = methodName.substring(0, methodName
-                            .lastIndexOf("Listener"));
+                            .lastIndexOf("Listener")); //$NON-NLS-1$
 
-                    if (methodName.startsWith("add")) {
+                    if (methodName.startsWith("add")) { //$NON-NLS-1$
                         listenerName = listenerName.substring(3);
-                    } else if (methodName.startsWith("remove")) {
+                    } else if (methodName.startsWith("remove")) { //$NON-NLS-1$
                         listenerName = listenerName.substring(6);
                     } else {
                         continue;
@@ -161,10 +163,10 @@
                             // listener name extracted from registration method are the same
                             String listenerNameFromParam = listenerTypeName
                                     .substring(listenerTypeName
-                                            .lastIndexOf(".") + 1);
+                                            .lastIndexOf(".") + 1); //$NON-NLS-1$
 
                             String listenerNameFromMethod = listenerName
-                                    + "Listener";
+                                    + "Listener"; //$NON-NLS-1$
 
                             if (!listenerNameFromParam
                                     .equals(listenerNameFromMethod)) {
@@ -172,8 +174,8 @@
                             }
 
                             String eventTypeName = listenerTypeName.substring(
-                                    0, listenerTypeName.lastIndexOf(".") + 1)
-                                    + listenerName + "Event";
+                                    0, listenerTypeName.lastIndexOf(".") + 1) //$NON-NLS-1$
+                                    + listenerName + "Event"; //$NON-NLS-1$
 
                             // classes generated from classes names
                             Class<?> eventType = null;
@@ -182,8 +184,7 @@
                                 eventType = Class.forName(eventTypeName, true,
                                         beanClass.getClassLoader());
                             } catch (ClassNotFoundException cnfe) {
-                                System.out.println("Event type with name "
-                                        + eventTypeName + " is not found.");
+                                System.out.println(Messages.getString("beans.3A", eventTypeName)); //$NON-NLS-1$
                             } finally {
                                 if (eventType == null) {
                                     continue;
@@ -213,8 +214,8 @@
                             }
 
                             Method addListenerMethod = null;
-                            String addListenerMethodName = "add" + listenerName
-                                    + "Listener";
+                            String addListenerMethodName = "add" + listenerName //$NON-NLS-1$
+                                    + "Listener"; //$NON-NLS-1$
                             try {
                                 addListenerMethod = beanClass.getMethod(
                                         addListenerMethodName,
@@ -225,8 +226,8 @@
                             }
 
                             Method removeListenerMethod = null;
-                            String removeListenerMethodName = "remove"
-                                    + listenerName + "Listener";
+                            String removeListenerMethodName = "remove" //$NON-NLS-1$
+                                    + listenerName + "Listener"; //$NON-NLS-1$
                             try {
                                 removeListenerMethod = beanClass.getMethod(
                                         removeListenerMethodName,
@@ -237,8 +238,8 @@
                             }
 
                             Method getListenerMethod = null;
-                            String getListenerMethodName = "get" + listenerName
-                                    + "Listeners";
+                            String getListenerMethodName = "get" + listenerName //$NON-NLS-1$
+                                    + "Listeners"; //$NON-NLS-1$
                             try {
                                 getListenerMethod = beanClass.getMethod(
                                         getListenerMethodName, new Class[] {});
@@ -256,10 +257,7 @@
                                 result.put(listenerName, esd);
                             } catch (IntrospectionException ie) {
                                 System.out
-                                        .println("Cannot generate event set descriptor "
-                                                + "for name"
-                                                + listenerName
-                                                + ".");
+                                        .println(Messages.getString("beans.39", listenerName)); //$NON-NLS-1$
                             }
 
                         }
@@ -321,24 +319,24 @@
                 Class[] parameterTypes = method.getParameterTypes();
                 Class<?> returnType = method.getReturnType();
 
-                if (name.startsWith("get") && (parameterTypes.length == 0)
+                if (name.startsWith("get") && (parameterTypes.length == 0) //$NON-NLS-1$
                         && (returnType != void.class) && (name.length() > 3)) {
                     result = MT_GETTER;
-                } else if (name.startsWith("is")
+                } else if (name.startsWith("is") //$NON-NLS-1$
                         && (parameterTypes.length == 0)
                         && (returnType == boolean.class) && (name.length() > 2)) {
                     result = MT_BOOLEAN_GETTER;
-                } else if (name.startsWith("get")
+                } else if (name.startsWith("get") //$NON-NLS-1$
                         && (parameterTypes.length == 1)
                         && (returnType != void.class)
                         && (parameterTypes[0] == int.class)
                         && (name.length() > 3)) {
                     result = MT_INDEXED_GETTER;
-                } else if (name.startsWith("set")
+                } else if (name.startsWith("set") //$NON-NLS-1$
                         && (parameterTypes.length == 1)
                         && (returnType == void.class) && (name.length() > 3)) {
                     result = MT_SETTER;
-                } else if (name.startsWith("set")
+                } else if (name.startsWith("set") //$NON-NLS-1$
                         && (parameterTypes.length == 2)
                         && (returnType == void.class)
                         && (parameterTypes[0] == int.class)
@@ -357,10 +355,10 @@
             throws Exception {
         String result = null;
 
-        if (methodName.startsWith("set") || methodName.startsWith("get")) {
+        if (methodName.startsWith("set") || methodName.startsWith("get")) { //$NON-NLS-1$ //$NON-NLS-2$
             result = methodName.substring(3);
             result = Introspector.decapitalize(result);
-        } else if (methodName.startsWith("is")) {
+        } else if (methodName.startsWith("is")) { //$NON-NLS-1$
             result = methodName.substring(2);
             result = Introspector.decapitalize(result);
         }
@@ -397,7 +395,7 @@
                             beanClass);
                     hmPropertyDescriptors.put(propertyName, propertyDescriptor);
                 } catch (IntrospectionException ie) {
-                    System.out.println(ie.getClass() + ": " + ie.getMessage());
+                    System.out.println(ie.getClass() + ": " + ie.getMessage()); //$NON-NLS-1$
                 }
             }
         }
@@ -420,7 +418,7 @@
                     hmPropertyDescriptors.put(propertyName,
                             indexedPropertyDescriptor);
                 } catch (IntrospectionException ie) {
-                    System.out.println(ie.getClass() + ": " + ie.getMessage());
+                    System.out.println(ie.getClass() + ": " + ie.getMessage()); //$NON-NLS-1$
                 }
             }
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Beans.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Beans.java?rev=439260&r1=439259&r2=439260&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Beans.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Beans.java Fri Sep  1 03:08:27 2006
@@ -28,6 +28,8 @@
 import java.io.ObjectStreamClass;
 import java.lang.reflect.Array;
 
+import org.apache.harmony.beans.internal.nls.Messages;
+
 /**
  * @author Maxim V. Berkultsev
  * @version $Revision: 1.6.6.3 $
@@ -114,11 +116,11 @@
                         applet.init();
                     }
                 } catch (IllegalAccessException iae) {
-                    throw new ClassNotFoundException(iae.getClass() + ": "
+                    throw new ClassNotFoundException(iae.getClass() + ": " //$NON-NLS-1$
                             + iae.getMessage());
                 }
             } catch (InstantiationException ie) {
-                throw new ClassNotFoundException(ie.getClass() + ": "
+                throw new ClassNotFoundException(ie.getClass() + ": " //$NON-NLS-1$
                         + ie.getMessage());
             }
         }
@@ -138,7 +140,7 @@
      */
     public static boolean isInstanceOf(Object bean, Class<?> targetType) {
         if (bean == null) {
-            throw new NullPointerException("bean is null");
+            throw new NullPointerException(Messages.getString("beans.1D")); //$NON-NLS-1$
         }
 
         return targetType == null ? false : targetType.isInstance(bean);
@@ -185,7 +187,7 @@
     }
 
     private static String getBeanResourceName(String beanName) {
-        return beanName.replace('.', '/') + ".ser";
+        return beanName.replace('.', '/') + ".ser"; //$NON-NLS-1$
     }
 
 }
@@ -208,8 +210,8 @@
             ClassNotFoundException {
         String className = desc.getName();
 
-        if (className.startsWith("[")) {
-            int idx = className.lastIndexOf("[");
+        if (className.startsWith("[")) { //$NON-NLS-1$
+            int idx = className.lastIndexOf("["); //$NON-NLS-1$
             String prefix = className.substring(0, idx + 1);
             int[] dimensions = new int[prefix.length()];
             String postfix;
@@ -220,30 +222,29 @@
             }
 
             postfix = className.substring(idx + 1);
-            if (postfix.equals("Z")) {
+            if (postfix.equals("Z")) { //$NON-NLS-1$
                 componentType = boolean.class;
-            } else if (postfix.equals("B")) {
+            } else if (postfix.equals("B")) { //$NON-NLS-1$
                 componentType = byte.class;
-            } else if (postfix.equals("C")) {
+            } else if (postfix.equals("C")) { //$NON-NLS-1$
                 componentType = char.class;
-            } else if (postfix.equals("D")) {
+            } else if (postfix.equals("D")) { //$NON-NLS-1$
                 componentType = double.class;
-            } else if (postfix.equals("F")) {
+            } else if (postfix.equals("F")) { //$NON-NLS-1$
                 componentType = float.class;
-            } else if (postfix.equals("I")) {
+            } else if (postfix.equals("I")) { //$NON-NLS-1$
                 componentType = int.class;
-            } else if (postfix.equals("L")) {
+            } else if (postfix.equals("L")) { //$NON-NLS-1$
                 componentType = long.class;
-            } else if (postfix.equals("S")) {
+            } else if (postfix.equals("S")) { //$NON-NLS-1$
                 componentType = short.class;
-            } else if (postfix.equals("V")) {
+            } else if (postfix.equals("V")) { //$NON-NLS-1$
                 componentType = null;
-            } else if (postfix.startsWith("L")) {
+            } else if (postfix.startsWith("L")) { //$NON-NLS-1$
                 componentType = cls.loadClass(postfix.substring(1, postfix
                         .length() - 1));
             } else {
-                throw new IllegalArgumentException("Illegal class name: "
-                        + className);
+                throw new IllegalArgumentException(Messages.getString("beans.1E", className)); //$NON-NLS-1$
             }
 
             return Array.newInstance(componentType, dimensions).getClass();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/DefaultPersistenceDelegate.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/DefaultPersistenceDelegate.java?rev=439260&r1=439259&r2=439260&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/DefaultPersistenceDelegate.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/DefaultPersistenceDelegate.java Fri Sep  1 03:08:27 2006
@@ -22,6 +22,8 @@
 
 import java.lang.reflect.Method;
 
+import org.apache.harmony.beans.internal.nls.Messages;
+
 /**
  * @author Maxim V. Berkultsev
  * @version $Revision: 1.7.6.3 $
@@ -126,16 +128,14 @@
                                 found = true;
                                 break;
                             } else {
-                                throw new NoSuchMethodException("no getter for "
-                                        + pds[j].getName() + " property");
+                                throw new NoSuchMethodException(Messages.getString("beans.00", pds[j].getName())); //$NON-NLS-1$
                             }
 
                         }
                     } // for j
 
                     if (found == false) {
-                        throw new NoSuchMethodException("no property for name "
-                                + constructorPropertyNames[i] + " is found");
+                        throw new NoSuchMethodException(Messages.getString("beans.01", constructorPropertyNames[i])); //$NON-NLS-1$
                     }
 
                 } // for i
@@ -147,7 +147,7 @@
 
         }
 
-        return new Expression(oldInstance, oldInstance.getClass(), "new", args);
+        return new Expression(oldInstance, oldInstance.getClass(), "new", args); //$NON-NLS-1$
     }
 
     /**
@@ -157,7 +157,7 @@
         if (oldInstance != null) {
             try {
                 Method equalsMethod = oldInstance.getClass().getMethod(
-                        "equals", new Class[] { Object.class });
+                        "equals", new Class[] { Object.class }); //$NON-NLS-1$
 
                 if (equalsMethod != null) {
                     Object result = equalsMethod.invoke(oldInstance,
@@ -167,8 +167,7 @@
                 }
             } catch (Exception e) {
                 // XXX bad style of logging
-                System.out.println("in DefaultPersistenceDelegate.mutatesTo() "
-                        + e.getClass() + " :" + e.getMessage());
+                System.out.println(Messages.getString("beans.02", e.getClass(), e.getMessage())); //$NON-NLS-1$
 
                 return false;
             }
@@ -177,7 +176,7 @@
     }
 
     private static boolean isTransient(PropertyDescriptor pd) {
-        Boolean isTransient = (Boolean) pd.getValue("transient");
+        Boolean isTransient = (Boolean) pd.getValue("transient"); //$NON-NLS-1$
 
         return (isTransient != null) && isTransient.equals(Boolean.TRUE);
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/DesignMode.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/DesignMode.java?rev=439260&r1=439259&r2=439260&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/DesignMode.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/DesignMode.java Fri Sep  1 03:08:27 2006
@@ -27,7 +27,7 @@
 
 public interface DesignMode {
 
-    public static final String PROPERTYNAME = "designTime";
+    public static final String PROPERTYNAME = "designTime"; //$NON-NLS-1$
 
     /**
      * @com.intel.drl.spec_ref

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Encoder.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Encoder.java?rev=439260&r1=439259&r2=439260&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Encoder.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Encoder.java Fri Sep  1 03:08:27 2006
@@ -28,6 +28,7 @@
 import org.apache.harmony.beans.NullPersistenceDelegate;
 import org.apache.harmony.beans.ObjectNode;
 import org.apache.harmony.beans.DefaultPersistenceDelegatesFactory;
+import org.apache.harmony.beans.internal.nls.Messages;
 
 public class Encoder {
 
@@ -132,8 +133,7 @@
         } else {
             // FIXME incompatible with RI, default constructor should be
             // called instead
-            System.out.println("no node is found for statement with target = "
-                    + oldStm.getTarget());
+            System.out.println(Messages.getString("beans.10", oldStm.getTarget())); //$NON-NLS-1$
         }
     }
 
@@ -181,7 +181,7 @@
                 }
 
                 nodes.put(oldValue, valueNode);
-            } else if (oldExp.getMethodName().equals("new")) {
+            } else if (oldExp.getMethodName().equals("new")) { //$NON-NLS-1$
                 valueNode.addReference();
             } else {
                 // XXX the information about referencedExpressions is not
@@ -210,7 +210,7 @@
             exceptionListener = new ExceptionListener() {
 
                 public void exceptionThrown(Exception e) {
-                    System.out.println(e.getClass() + ": " + e.getMessage());
+                    System.out.println(e.getClass() + ": " + e.getMessage()); //$NON-NLS-1$
                 }
             };
         }
@@ -292,25 +292,25 @@
         String result = null;
 
         if (type == Boolean.class) {
-            result = "boolean";
+            result = "boolean"; //$NON-NLS-1$
         } else if (type == Byte.class) {
-            result = "byte";
+            result = "byte"; //$NON-NLS-1$
         } else if (type == Character.class) {
-            result = "char";
+            result = "char"; //$NON-NLS-1$
         } else if (type == Double.class) {
-            result = "double";
+            result = "double"; //$NON-NLS-1$
         } else if (type == Float.class) {
-            result = "float";
+            result = "float"; //$NON-NLS-1$
         } else if (type == Integer.class) {
-            result = "int";
+            result = "int"; //$NON-NLS-1$
         } else if (type == Long.class) {
-            result = "long";
+            result = "long"; //$NON-NLS-1$
         } else if (type == Short.class) {
-            result = "short";
+            result = "short"; //$NON-NLS-1$
         } else if (type == String.class) {
-            result = "string";
+            result = "string"; //$NON-NLS-1$
         } else if (type == Class.class) {
-            result = "class";
+            result = "class"; //$NON-NLS-1$
         }
 
         return result;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventHandler.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventHandler.java?rev=439260&r1=439259&r2=439260&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventHandler.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventHandler.java Fri Sep  1 03:08:27 2006
@@ -26,6 +26,8 @@
 import java.lang.reflect.Proxy;
 import java.util.StringTokenizer;
 
+import org.apache.harmony.beans.internal.nls.Messages;
+
 public class EventHandler implements InvocationHandler {
 
     private Object target;
@@ -70,14 +72,14 @@
 
                 // if the method from the Object class is called
                 if (method.getDeclaringClass().equals(Object.class)) {
-                    if (method.getName().equals("hashCode") && 
+                    if (method.getName().equals("hashCode") &&  //$NON-NLS-1$
                             arguments.length == 0) {
                         result = hashCode();
-                    } else if (method.getName().equals("equals") &&
+                    } else if (method.getName().equals("equals") && //$NON-NLS-1$
                             arguments.length == 1 &&
                             arguments[0] != null) {
                         result = (proxy == arguments[0]);
-                    } else if (method.getName().equals("toString") &&
+                    } else if (method.getName().equals("toString") && //$NON-NLS-1$
                             arguments.length == 0) {
                         result = proxy.getClass().getSimpleName() +
                                 toString().substring(
@@ -95,7 +97,7 @@
                         // we have a valid listener method at this point
                         result = m.invoke(target, args);
                     } catch (Throwable t) {
-                        System.out.println(t.getClass() + ": " + t.getMessage());
+                        System.out.println(t.getClass() + ": " + t.getMessage()); //$NON-NLS-1$
                     }
 
                 } // valid call
@@ -199,7 +201,7 @@
             return arguments;
         } else {
             Object arg = arguments[0];
-            StringTokenizer st = new StringTokenizer(eventPropertyName, ".");
+            StringTokenizer st = new StringTokenizer(eventPropertyName, "."); //$NON-NLS-1$
 
             while (st.hasMoreTokens()) {
                 String propertyName = st.nextToken();
@@ -213,8 +215,7 @@
                         arg = getter.invoke(arg, new Object[] {});
                     } else {
                         throw new IntrospectionException(
-                                "no getter for property " + propertyName
-                                        + " found");
+                                Messages.getString("beans.11", propertyName)); //$NON-NLS-1$
                     }
                 } else {
                     Method method = findStaticGetter(arg.getClass(),
@@ -224,8 +225,7 @@
                         arg = method.invoke(null, new Object[] {});
                     } else {
                         throw new IntrospectionException(
-                                "cannot access property " + propertyName
-                                        + " getter");
+                                Messages.getString("beans.12", propertyName)); //$NON-NLS-1$
                     }
                 }
             }
@@ -285,17 +285,17 @@
 
                     if (result == null) {
                         throw new NoSuchMethodException(
-                                "no setter for property " + action + " found");
+                                Messages.getString("beans.13", action)); //$NON-NLS-1$ //$NON-NLS-2$
                     }
                 } else {
                     throw new Exception(
-                            "Exception while finding property descriptor");
+                            Messages.getString("beans.14")); //$NON-NLS-1$
                 }
             } else {
                 return result;
             }
         } catch (IntrospectionException ie) {
-            throw new Exception("Exception while finding property descriptor");
+            throw new Exception(Messages.getString("beans.14")); //$NON-NLS-1$
         }
 
         return result;
@@ -328,9 +328,9 @@
                 String methodName = methods[i].getName();
                 String postfix = null;
 
-                if (methodName.startsWith("get")) {
+                if (methodName.startsWith("get")) { //$NON-NLS-1$
                     postfix = methodName.substring(3);
-                } else if (methodName.startsWith("is")) {
+                } else if (methodName.startsWith("is")) { //$NON-NLS-1$
                     postfix = methodName.substring(2);
                 } else {
                     continue;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java?rev=439260&r1=439259&r2=439260&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java Fri Sep  1 03:08:27 2006
@@ -25,6 +25,8 @@
 import java.util.Iterator;
 import java.util.TooManyListenersException;
 
+import org.apache.harmony.beans.internal.nls.Messages;
+
 public class EventSetDescriptor extends FeatureDescriptor {
 
     //XXX: never read
@@ -64,17 +66,17 @@
         this.listenerMethodDescriptors.add(new MethodDescriptor(
                 findMethodByName(listenerType, listenerMethodName)));
 
-        this.addListenerMethod = findMethodByPrefix(sourceClass, "add", "",
+        this.addListenerMethod = findMethodByPrefix(sourceClass, "add", "", //$NON-NLS-1$ //$NON-NLS-2$
                 listenerType);
-        this.removeListenerMethod = findMethodByPrefix(sourceClass, "remove",
-                "", listenerType);
+        this.removeListenerMethod = findMethodByPrefix(sourceClass, "remove", //$NON-NLS-1$
+                "", listenerType); //$NON-NLS-1$
 
         if (addListenerMethod == null && removeListenerMethod == null) {
             throw new IntrospectionException(
-                    "Add and remove methods are not available");
+                    Messages.getString("beans.38")); //$NON-NLS-1$
         }
 
-        this.getListenerMethod = findMethodByPrefix(sourceClass, "get", "s",
+        this.getListenerMethod = findMethodByPrefix(sourceClass, "get", "s", //$NON-NLS-1$ //$NON-NLS-2$
                 listenerType);
 
         this.unicast = isUnicastByDefault(addListenerMethod);
@@ -362,10 +364,10 @@
     private Class<?> getEventType(Class<?> listenerType)
             throws ClassNotFoundException {
         String listenerTypeName = listenerType.getName();
-        int idx = listenerTypeName.lastIndexOf("Listener");
+        int idx = listenerTypeName.lastIndexOf("Listener"); //$NON-NLS-1$
         String eventTypeName = listenerTypeName;
         if (idx != -1) {
-            eventTypeName = listenerTypeName.substring(0, idx) + "Event";
+            eventTypeName = listenerTypeName.substring(0, idx) + "Event"; //$NON-NLS-1$
         }
         return Class
                 .forName(eventTypeName, true, listenerType.getClassLoader());
@@ -376,9 +378,8 @@
         if (listenerMethod != null
                 && !listenerMethod.getDeclaringClass().isAssignableFrom(
                         listenerType)) {
-            throw new IntrospectionException("No method \""
-                    + listenerMethod.getName() + "\" for "
-                    + listenerType.getName() + " found.");
+            throw new IntrospectionException(Messages.getString("beans.31", //$NON-NLS-1$
+                    listenerMethod.getName(), listenerType.getName()));
         } else {
             return true;
         }
@@ -390,12 +391,10 @@
             return listenerType.getMethod(listenerMethodName,
                     new Class[] { getEventType(listenerType) });
         } catch (NoSuchMethodException nsme) {
-            throw new IntrospectionException("No method \""
-                    + listenerMethodName + "\" for " + listenerType.getName()
-                    + " found.");
+            throw new IntrospectionException(Messages.getString("beans.31", //$NON-NLS-1$
+                    listenerMethodName, listenerType.getName())); //$NON-NLS-1$
         } catch (ClassNotFoundException cnfe) {
-            throw new IntrospectionException("Cannot acquire event type from "
-                    + listenerType.getName() + " listener.");
+            throw new IntrospectionException(Messages.getString("beans.32", listenerType.getName())); //$NON-NLS-1$
         }
     }
 
@@ -404,12 +403,12 @@
 
         // com.drl.beans.SmthListener
         String fullName = listenerType.getName();
-        int idx = fullName.lastIndexOf(".");
+        int idx = fullName.lastIndexOf("."); //$NON-NLS-1$
         // prefix(e.g., add) + SmthListener
         String methodName = prefix + fullName.substring(idx + 1) + postfix;
 
         try {
-            if (prefix.equals("get")) {
+            if (prefix.equals("get")) { //$NON-NLS-1$
                 return sourceClass.getMethod(methodName, new Class[] {});
             } else {
                 return sourceClass.getMethod(methodName,
@@ -443,18 +442,17 @@
             Class[] parameterTypes;
 
             if (returnType != void.class) {
-                throw new IntrospectionException(registrationMethod.getName()
-                        + " does not return <void>");
+                throw new IntrospectionException(
+                        Messages.getString("beans.33", registrationMethod.getName())); //$NON-NLS-1$
             }
 
             parameterTypes = registrationMethod.getParameterTypes();
             if (parameterTypes == null || parameterTypes.length != 1) {
-                throw new IntrospectionException(registrationMethod.getName()
-                        + " should have a single input parameter");
+                throw new IntrospectionException(
+                        Messages.getString("beans.34", registrationMethod.getName())); //$NON-NLS-1$
             } else if (parameterTypes[0] != listenerType) {
                 throw new IntrospectionException(
-                        "Single parameter does not match to "
-                                + listenerType.getName() + " class");
+                        Messages.getString("beans.35", listenerType.getName())); //$NON-NLS-1$
             } else {
                 return registrationMethod;
             }
@@ -471,7 +469,7 @@
 
             if (parameterTypes.length != 0) {
                 throw new IntrospectionException(
-                        "No input params are allowed for getListenerMethod");
+                        Messages.getString("beans.36")); //$NON-NLS-1$
             }
 
             returnType = getListenerMethod.getReturnType();
@@ -480,8 +478,7 @@
                 return getListenerMethod;
             } else {
                 throw new IntrospectionException(
-                        "Return type of getListenerMethod is not an array "
-                                + "of listeners");
+                        Messages.getString("beans.37")); //$NON-NLS-1$
             }
         }
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Expression.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Expression.java?rev=439260&r1=439259&r2=439260&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Expression.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Expression.java Fri Sep  1 03:08:27 2006
@@ -20,6 +20,8 @@
  */
 package java.beans;
 
+import org.apache.harmony.beans.internal.nls.Messages;
+
 /**
  * @author Maxim V. Berkultsev
  * @version $Revision: 1.7.6.3 $
@@ -60,10 +62,10 @@
             StringBuilder sb = new StringBuilder();
             
             if (!valueIsDefined) {
-                sb.append("<unbound>");
+                sb.append("<unbound>"); //$NON-NLS-1$
             } else {
                 if (value == null) {
-                    sb.append("null");
+                    sb.append("null"); //$NON-NLS-1$
                 } else {
                     sb.append(convertClassName(value.getClass()));
                 }
@@ -73,7 +75,7 @@
             
             return sb.toString();
         } catch(Exception e) {
-            return new String("Error in expression: " + e.getClass());
+            return new String(Messages.getString("beans.0D", e.getClass())); //$NON-NLS-1$
         }
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/IndexedPropertyDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/IndexedPropertyDescriptor.java?rev=439260&r1=439259&r2=439260&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/IndexedPropertyDescriptor.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/IndexedPropertyDescriptor.java Fri Sep  1 03:08:27 2006
@@ -23,6 +23,8 @@
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 
+import org.apache.harmony.beans.internal.nls.Messages;
+
 /**
  * @author Maxim V. Berkultsev
  * @version $Revision: 1.5.6.3 $
@@ -69,18 +71,18 @@
             throws IntrospectionException {
         super(propertyName, beanClass);        
         
-        String indexedGetterName = createDefaultMethodName(propertyName, "get");
+        String indexedGetterName = createDefaultMethodName(propertyName, "get"); //$NON-NLS-1$
         if(hasMethod(beanClass, indexedGetterName)) {
             setIndexedReadMethod(beanClass, indexedGetterName);
         } else {
-            throw new IntrospectionException("Method not found: get" + propertyName);
+            throw new IntrospectionException(Messages.getString("beans.1F", propertyName)); //$NON-NLS-1$
         }
         
-        String indexedSetterName = createDefaultMethodName(propertyName, "set");
+        String indexedSetterName = createDefaultMethodName(propertyName, "set"); //$NON-NLS-1$
         if(hasMethod(beanClass, indexedSetterName)) {
             setIndexedWriteMethod(beanClass, indexedSetterName);
         } else {
-            throw new IntrospectionException("Method not found: set" + propertyName);
+            throw new IntrospectionException(Messages.getString("beans.20", propertyName)); //$NON-NLS-1$
         }
     }
 
@@ -93,20 +95,18 @@
             int modifiers = indexedGetter.getModifiers();
             if (!Modifier.isPublic(modifiers)) {
                 throw new IntrospectionException(
-                        "Modifier for indexed getter method should be public.");
+                        Messages.getString("beans.21")); //$NON-NLS-1$
             }
             
             Class[] parameterTypes = indexedGetter.getParameterTypes();
             if (parameterTypes.length != 1) {
                 throw new IntrospectionException(
-                        "Number of parameters in getter method is not "
-                        + "equal to 1.");
+                        Messages.getString("beans.22")); //$NON-NLS-1$
             }
             
             if (!parameterTypes[0].equals(int.class)) {
                 throw new IntrospectionException(
-                        "Parameter in indexed getter method is not of "
-                        + "integer type.");
+                        Messages.getString("beans.23")); //$NON-NLS-1$
             }
             
             Class<?> returnType = indexedGetter.getReturnType();
@@ -114,8 +114,7 @@
             if((indexedPropertyType != null) && !returnType.equals(
                     indexedPropertyType)) {
                 throw new IntrospectionException(
-                        "Parameter type in indexed getter method does not "
-                        + "correspond to predefined.");
+                        Messages.getString("beans.24")); //$NON-NLS-1$
             }
         }
         
@@ -131,28 +130,25 @@
             int modifiers = indexedSetter.getModifiers();
             if (!Modifier.isPublic(modifiers)) {
                 throw new IntrospectionException(
-                        "Modifier for indexed setter method should be public.");
+                        Messages.getString("beans.25")); //$NON-NLS-1$
             }
             
             Class[] parameterTypes = indexedSetter.getParameterTypes();
             if (parameterTypes.length != 2) {
                 throw new IntrospectionException(
-                        "Number of parameters in indexed setter method is not "
-                        + "equal to 2.");
+                        Messages.getString("beans.26")); //$NON-NLS-1$
             }
             
             Class<?> firstParameterType = parameterTypes[0];
             if (!firstParameterType.equals(int.class)) {
                 throw new IntrospectionException(
-                        "First parameter type in indexed setter method "
-                        + "should be int.");
+                        Messages.getString("beans.27")); //$NON-NLS-1$
             }            
             
             Class<?> secondParameterType = parameterTypes[1];
             if (!secondParameterType.equals(getIndexedPropertyType())) {
                 throw new IntrospectionException(
-                        "Second parameter type in indexed setter method "
-                        + "does not corresponds to predefined.");
+                        Messages.getString("beans.28")); //$NON-NLS-1$
             }
         }
         

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Introspector.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Introspector.java?rev=439260&r1=439259&r2=439260&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Introspector.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Introspector.java Fri Sep  1 03:08:27 2006
@@ -182,10 +182,10 @@
 
     private static Class<?> findBeanInfoClass(Class<?> beanClass) {
         String beanClassName = beanClass.getName();
-        int idx = beanClassName.lastIndexOf(".");
+        int idx = beanClassName.lastIndexOf("."); //$NON-NLS-1$
         String shortBeanInfoClassName = beanClassName.substring(idx + 1,
-            beanClassName.length()) + "BeanInfo";
-        String fullBeanInfoClassName = beanClassName + "BeanInfo";
+            beanClassName.length()) + "BeanInfo"; //$NON-NLS-1$
+        String fullBeanInfoClassName = beanClassName + "BeanInfo"; //$NON-NLS-1$
 
         Class<?> beanInfoClass = null;
         try {
@@ -195,7 +195,7 @@
         } catch (ClassNotFoundException cnfe) {
             for (int i = 0; i < path.length; ++i) {
                 try {
-                    fullBeanInfoClassName = path[i] + "."
+                    fullBeanInfoClassName = path[i] + "." //$NON-NLS-1$
                             + shortBeanInfoClassName;
                     beanInfoClass = Class.forName(fullBeanInfoClassName, true,
                             beanClass.getClassLoader());
@@ -258,7 +258,7 @@
 
     // private fields
 
-    private static String[] path = {"org.apache.harmony.beans.infos"};
+    private static String[] path = {"org.apache.harmony.beans.infos"}; //$NON-NLS-1$
     private static Map<String, List<BeanInfoData>> beanInfos =
         new HashMap<String, List<BeanInfoData>>();
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyChangeSupport.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyChangeSupport.java?rev=439260&r1=439259&r2=439260&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyChangeSupport.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyChangeSupport.java Fri Sep  1 03:08:27 2006
@@ -320,7 +320,7 @@
 
 		children = new Hashtable<String, List<PropertyChangeListener>>(
 				selectedSerializedPropertiesChangeListeners);
-		children.put("", allSerializedPropertiesChangeListeners);
+		children.put("", allSerializedPropertiesChangeListeners); //$NON-NLS-1$
 		oos.writeObject(children);
 
 		Object source = null;
@@ -343,7 +343,7 @@
 		selectedPropertiesChangeListeners = new HashMap<String, List<PropertyChangeListener>>(
 				children);
 		allPropertiesChangeListeners = selectedPropertiesChangeListeners
-				.remove("");
+				.remove(""); //$NON-NLS-1$
 		if (allPropertiesChangeListeners == null) {
 			allPropertiesChangeListeners = new ArrayList<PropertyChangeListener>();
 		}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyDescriptor.java?rev=439260&r1=439259&r2=439260&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyDescriptor.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyDescriptor.java Fri Sep  1 03:08:27 2006
@@ -24,6 +24,8 @@
 import java.lang.reflect.Modifier;
 import java.util.Vector;
 
+import org.apache.harmony.beans.internal.nls.Messages;
+
 /**
  * @author Maxim V. Berkultsev
  * @version $Revision: 1.9.4.3 $
@@ -50,10 +52,10 @@
 
         super();
         if (beanClass == null) {
-            throw new IntrospectionException("Target Bean class is null");
+            throw new IntrospectionException(Messages.getString("beans.03")); //$NON-NLS-1$
         }
         if (propertyName == null || propertyName.length() == 0) {
-            throw new IntrospectionException("bad property name");
+            throw new IntrospectionException(Messages.getString("beans.04")); //$NON-NLS-1$
         }
 
         this.beanClass = beanClass;
@@ -73,7 +75,7 @@
             throws IntrospectionException {
         super();
         if (propertyName == null || propertyName.length() == 0) {
-            throw new IntrospectionException("bad property name");
+            throw new IntrospectionException(Messages.getString("beans.04")); //$NON-NLS-1$
         }
 
         this.propertyName = propertyName;
@@ -92,10 +94,10 @@
             throws IntrospectionException {
         super();
         if (beanClass == null) {
-            throw new IntrospectionException("Target Bean class is null");
+            throw new IntrospectionException(Messages.getString("beans.03")); //$NON-NLS-1$
         }
         if (propertyName == null || propertyName.length() == 0) {
-            throw new IntrospectionException("bad property name");
+            throw new IntrospectionException(Messages.getString("beans.04")); //$NON-NLS-1$
         }
 
         this.propertyName = propertyName;
@@ -103,16 +105,16 @@
         this.setName(propertyName);
         this.setDisplayName(propertyName);
         
-        String getterName = createDefaultMethodName(propertyName, "is");
+        String getterName = createDefaultMethodName(propertyName, "is"); //$NON-NLS-1$
         if(hasMethod(beanClass, getterName)) {
             setReadMethod(beanClass, getterName);
         } else {
-            getterName = createDefaultMethodName(propertyName, "get");
+            getterName = createDefaultMethodName(propertyName, "get"); //$NON-NLS-1$
             if(hasMethod(beanClass, getterName)) {
                 setReadMethod(beanClass, getterName);
             }
         }
-        String setterName = createDefaultMethodName(propertyName, "set");
+        String setterName = createDefaultMethodName(propertyName, "set"); //$NON-NLS-1$
         if(hasMethod(beanClass, setterName)) {
             setWriteMethod(beanClass, setterName);
         }
@@ -126,22 +128,20 @@
             int modifiers = setter.getModifiers();
             if (!Modifier.isPublic(modifiers)) {
                 throw new IntrospectionException(
-                        "Modifier for setter method should be public.");
+                        Messages.getString("beans.05")); //$NON-NLS-1$
             }
             
             Class[] parameterTypes = setter.getParameterTypes();
             if (parameterTypes.length != 1) {
                 throw new IntrospectionException(
-                        "Number of parameters in setter method is not "
-                        + "equal to 1.");
+                        Messages.getString("beans.06")); //$NON-NLS-1$
             }
             
             Class<?> parameterType = parameterTypes[0];
             Class<?> propertyType = getPropertyType();
             if(propertyType != null && !propertyType.equals(parameterType)) {
                 throw new IntrospectionException(
-                        "Parameter type in setter method does not "
-                        + "corresponds to predefined.");
+                        Messages.getString("beans.07")); //$NON-NLS-1$
             }
         }
         
@@ -156,22 +156,20 @@
             int modifiers = getter.getModifiers();
             if (!Modifier.isPublic(modifiers)) {
                 throw new IntrospectionException(
-                        "Modifier for getter method should be public.");
+                        Messages.getString("beans.0A")); //$NON-NLS-1$
             }
             
             Class[] parameterTypes = getter.getParameterTypes();
             if (parameterTypes.length != 0) {
                 throw new IntrospectionException(
-                        "Number of parameters in getter method is not "
-                        + "equal to 0.");
+                        Messages.getString("beans.08")); //$NON-NLS-1$
             }
             
             Class<?> returnType = getter.getReturnType();
             Class<?> propertyType = getPropertyType();
             if((propertyType != null) && !returnType.equals(propertyType)) {
                 throw new IntrospectionException(
-                        "Parameter type in getter method does not "
-                        + "corresponds to predefined.");
+                        Messages.getString("beans.09")); //$NON-NLS-1$
             }
         }
         

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyEditorManager.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyEditorManager.java?rev=439260&r1=439259&r2=439260&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyEditorManager.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyEditorManager.java Fri Sep  1 03:08:27 2006
@@ -30,7 +30,7 @@
 
 public class PropertyEditorManager {
     
-    private static String[] path = {"org.apache.harmony.beans.editors"};
+    private static String[] path = {"org.apache.harmony.beans.editors"}; //$NON-NLS-1$
     private static Map<Class<?>, Class<?>> registeredEditors = new HashMap<Class<?>, Class<?>>();
     
     /**
@@ -71,7 +71,7 @@
         editorClass = registeredEditors.get(targetType);
 
         if (editorClass == null) {
-            String editorClassName = targetType.getName() + "Editor";
+            String editorClassName = targetType.getName() + "Editor"; //$NON-NLS-1$
             ClassLoader loader = targetType.getClassLoader();
 
             if (loader == null) {
@@ -82,7 +82,7 @@
                 editorClass = Class.forName(editorClassName, true, loader);
             } catch (ClassNotFoundException cnfe) {
                 String shortEditorClassName = editorClassName
-                        .substring(editorClassName.lastIndexOf(".") + 1);
+                        .substring(editorClassName.lastIndexOf(".") + 1); //$NON-NLS-1$
 
                 if (targetType.isPrimitive()) {
                     shortEditorClassName = shortEditorClassName.substring(0, 1)
@@ -91,7 +91,7 @@
                 }
 
                 for (int i = 0; i < path.length; ++i) {
-                    editorClassName = path[i] + "." + shortEditorClassName;
+                    editorClassName = path[i] + "." + shortEditorClassName; //$NON-NLS-1$
 
                     try {
                         editorClass = Class.forName(editorClassName, true,

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyEditorSupport.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyEditorSupport.java?rev=439260&r1=439259&r2=439260&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyEditorSupport.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyEditorSupport.java Fri Sep  1 03:08:27 2006
@@ -27,6 +27,8 @@
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.harmony.beans.internal.nls.Messages;
+
 /**
  * @author Maxim V. Berkultsev
  * @version $Revision: 1.3.6.3 $
@@ -44,7 +46,7 @@
      */
     public PropertyEditorSupport(Object source) {
         if( source == null ) {
-            throw new NullPointerException("source is null");
+            throw new NullPointerException(Messages.getString("beans.0C")); //$NON-NLS-1$
         }
         this.source = source;
     }
@@ -84,14 +86,14 @@
      * @com.intel.drl.spec_ref
      */
     public String getJavaInitializationString() {
-        return "???";
+        return "???"; //$NON-NLS-1$
     }
 
     /**
      * @com.intel.drl.spec_ref
      */
     public String getAsText() {
-        return newValue == null ? "null" : newValue.toString();
+        return newValue == null ? "null" : newValue.toString(); //$NON-NLS-1$
     }
 
     /**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/SimpleBeanInfo.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/SimpleBeanInfo.java?rev=439260&r1=439259&r2=439260&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/SimpleBeanInfo.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/SimpleBeanInfo.java Fri Sep  1 03:08:27 2006
@@ -68,12 +68,12 @@
                 
             } catch (IOException ioe) {
                 byteArrayList.clear();
-                System.out.println(ioe.getClass() + ": " + ioe.getMessage());
+                System.out.println(ioe.getClass() + ": " + ioe.getMessage()); //$NON-NLS-1$
             } finally {
                    try {
                        is.close();
                    } catch (IOException ioe) {
-                       System.out.println(ioe.getClass() + ": "
+                       System.out.println(ioe.getClass() + ": " //$NON-NLS-1$
                                + ioe.getMessage());
                    }
             }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Statement.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Statement.java?rev=439260&r1=439259&r2=439260&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Statement.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Statement.java Fri Sep  1 03:08:27 2006
@@ -32,6 +32,8 @@
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 
+import org.apache.harmony.beans.internal.nls.Messages;
+
 /**
  * @author Maxim V. Berkultsev
  * @version $Revision: 1.18.6.3 $
@@ -64,7 +66,7 @@
     public String toString() {
         StringBuffer sb = new StringBuffer();
         String targetVar = target != null ? convertClassName(target.getClass())
-                : "null";
+                : "null"; //$NON-NLS-1$
 
         sb.append(targetVar);
         sb.append('.');
@@ -74,11 +76,11 @@
         if (arguments != null) {
             for (int i = 0; i < arguments.length; ++i) {
                 if (i > 0) {
-                    sb.append(", ");
+                    sb.append(", "); //$NON-NLS-1$
                 }
 
                 if (arguments[i] == null) {
-                    sb.append("null");
+                    sb.append("null"); //$NON-NLS-1$
                 } else if (arguments[i] instanceof String) {
                     sb.append('"');
                     sb.append(arguments[i].toString());
@@ -130,16 +132,16 @@
                 Object[] ama = getArrayMethodArguments();
 
                 result = method.invoke(null, ama);
-            } else if (methodName.equals("newInstance")
+            } else if (methodName.equals("newInstance") //$NON-NLS-1$
                     && target instanceof Class
                     && ((Class) target).getName().equals(
-                            "java.lang.reflect.Array")) {
+                            "java.lang.reflect.Array")) { //$NON-NLS-1$
                 Class<?> componentType = (Class) arguments[0];
                 int length = ((Integer) arguments[1]).intValue();
 
                 result = Array.newInstance(componentType, length);
-            } else if (methodName.equals("new")
-                    || methodName.equals("newInstance")) {
+            } else if (methodName.equals("new") //$NON-NLS-1$
+                    || methodName.equals("newInstance")) { //$NON-NLS-1$
                 if (target instanceof Class) {
                     Constructor<?> constructor = findConstructor();
 
@@ -190,26 +192,25 @@
 
     private Method findArrayMethod() throws NoSuchMethodException {
         // the code below reproduces exact RI exception throwing behavior 
-        if (!methodName.equals("set") && !methodName.equals("get")) {
-            throw new NoSuchMethodException("Unknown method name for array");
+        if (!methodName.equals("set") && !methodName.equals("get")) { //$NON-NLS-1$ //$NON-NLS-2$
+            throw new NoSuchMethodException(Messages.getString("beans.3C")); //$NON-NLS-1$
         } else if (arguments.length > 0
                 && arguments[0].getClass() != Integer.class) {
             throw new ClassCastException(
-                    "First parameter in array getter(setter) is not of "
-                            + "Integer type");
-        } else if (methodName.equals("get") && (arguments.length != 1)) {
+                    Messages.getString("beans.3D")); //$NON-NLS-1$
+        } else if (methodName.equals("get") && (arguments.length != 1)) { //$NON-NLS-1$
             throw new ArrayIndexOutOfBoundsException(
-                    "Illegal number of arguments in array getter");
-        } else if (methodName.equals("set") && (arguments.length != 2)) {
+                    Messages.getString("beans.3E")); //$NON-NLS-1$
+        } else if (methodName.equals("set") && (arguments.length != 2)) { //$NON-NLS-1$
             throw new ArrayIndexOutOfBoundsException(
-                    "Illegal number of arguments in array setter");
+                    Messages.getString("beans.3F")); //$NON-NLS-1$
         }
 
-        if (methodName.equals("get")) {
-            return Array.class.getMethod("get", new Class[] { Object.class,
+        if (methodName.equals("get")) { //$NON-NLS-1$
+            return Array.class.getMethod("get", new Class[] { Object.class, //$NON-NLS-1$
                     int.class });
         } else {
-            return Array.class.getMethod("set", new Class[] { Object.class,
+            return Array.class.getMethod("set", new Class[] { Object.class, //$NON-NLS-1$
                     int.class, Object.class });
         }
     }
@@ -261,8 +262,7 @@
         }
 
         if (result == null) {
-            throw new NoSuchMethodException("No constructor for class "
-                    + targetClass.getName() + " found");
+            throw new NoSuchMethodException(Messages.getString("beans.40", targetClass.getName())); //$NON-NLS-1$
         }
 
         return result;
@@ -318,8 +318,7 @@
         }
 
         if (foundMethods.size() == 0) {
-            throw new NoSuchMethodException("No method with name " + methodName
-                    + " is found");
+            throw new NoSuchMethodException(Messages.getString("beans.41", methodName)); //$NON-NLS-1$
         }
 
         foundMethodsArr = foundMethods.toArray(new Method[foundMethods.size()]);
@@ -351,20 +350,20 @@
      * objects. Not necessary reflects to real methods.
      */
     private static String[][] pdConstructorSignatures = {
-        {"java.lang.Class", "new", "java.lang.Boolean", "", "", ""}, 
-        {"java.lang.Class", "new", "java.lang.Byte", "", "", ""}, 
-        {"java.lang.Class", "new", "java.lang.Character", "", "", ""}, 
-        {"java.lang.Class", "new", "java.lang.Double", "", "", ""}, 
-        {"java.lang.Class", "new", "java.lang.Float", "", "", ""}, 
-        {"java.lang.Class", "new", "java.lang.Integer", "", "", ""}, 
-        {"java.lang.Class", "new", "java.lang.Long", "", "", ""}, 
-        {"java.lang.Class", "new", "java.lang.Short", "", "", ""}, 
-        {"java.lang.Class", "new", "java.lang.String", "", "", ""}, 
-        {"java.lang.Class", "forName", "java.lang.String", "", "", ""},
-        {"java.lang.Class", "newInstance", "java.lang.Class",
-                "java.lang.Integer", "", ""},
-        {"java.lang.reflect.Field", "get", "null", "", "", ""},
-        {"java.lang.Class", "forName", "java.lang.String", "", "", ""}
+        {"java.lang.Class", "new", "java.lang.Boolean", "", "", ""},  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+        {"java.lang.Class", "new", "java.lang.Byte", "", "", ""},  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+        {"java.lang.Class", "new", "java.lang.Character", "", "", ""},  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+        {"java.lang.Class", "new", "java.lang.Double", "", "", ""},  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+        {"java.lang.Class", "new", "java.lang.Float", "", "", ""},  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+        {"java.lang.Class", "new", "java.lang.Integer", "", "", ""},  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+        {"java.lang.Class", "new", "java.lang.Long", "", "", ""},  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+        {"java.lang.Class", "new", "java.lang.Short", "", "", ""},  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+        {"java.lang.Class", "new", "java.lang.String", "", "", ""},  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+        {"java.lang.Class", "forName", "java.lang.String", "", "", ""}, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+        {"java.lang.Class", "newInstance", "java.lang.Class", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+                "java.lang.Integer", "", ""}, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+        {"java.lang.reflect.Field", "get", "null", "", "", ""}, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+        {"java.lang.Class", "forName", "java.lang.String", "", "", ""} //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
     };
     
     static boolean isPDConstructor(Statement stmt) {
@@ -386,9 +385,9 @@
         for (int i = 2; i < sig.length; i++) {
             if (args.length > i - 2) {
                 sig[i] = args[i - 2] != null ?
-                        args[i - 2].getClass().getName() : "null"; 
+                        args[i - 2].getClass().getName() : "null";  //$NON-NLS-1$
             } else {
-                sig[i] = "";
+                sig[i] = ""; //$NON-NLS-1$
             }
 
         }
@@ -447,7 +446,7 @@
         }
 
         if (componentType != null) {
-            result += "Array";
+            result += "Array"; //$NON-NLS-1$
         }
 
         return result;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/VetoableChangeSupport.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/VetoableChangeSupport.java?rev=439260&r1=439259&r2=439260&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/VetoableChangeSupport.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/VetoableChangeSupport.java Fri Sep  1 03:08:27 2006
@@ -243,7 +243,7 @@
 
         children = new Hashtable<String, List<VetoableChangeListener>>(
                 selectedSerializedVetoableChangeListeners);
-        children.put("", allSerializedVetoableChangeListeners);
+        children.put("", allSerializedVetoableChangeListeners); //$NON-NLS-1$
         oos.writeObject(children);
 
         Object source = null;
@@ -266,7 +266,7 @@
 
         selectedVetoableChangeListeners = new HashMap<String, List<VetoableChangeListener>>(
                 children);
-        allVetoableChangeListeners = selectedVetoableChangeListeners.remove("");
+        allVetoableChangeListeners = selectedVetoableChangeListeners.remove(""); //$NON-NLS-1$
         if (allVetoableChangeListeners == null) {
             allVetoableChangeListeners = new ArrayList<VetoableChangeListener>();
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/XMLDecoder.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/XMLDecoder.java?rev=439260&r1=439259&r2=439260&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/XMLDecoder.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/XMLDecoder.java Fri Sep  1 03:08:27 2006
@@ -137,10 +137,10 @@
     private void initialize() {
         try {
             String saxParserClassName = System
-                    .getProperty("org.xml.sax.driver");
+                    .getProperty("org.xml.sax.driver"); //$NON-NLS-1$
 
             if (saxParserClassName == null) {
-                saxParserClassName = "org.apache.xerces.parsers.SAXParser";
+                saxParserClassName = "org.apache.xerces.parsers.SAXParser"; //$NON-NLS-1$
             }
             XMLReader xmlReader = XMLReaderFactory
                     .createXMLReader(saxParserClassName);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/XMLEncoder.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/XMLEncoder.java?rev=439260&r1=439259&r2=439260&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/XMLEncoder.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/XMLEncoder.java Fri Sep  1 03:08:27 2006
@@ -29,6 +29,7 @@
 import java.util.Vector;
 
 import org.apache.harmony.beans.ObjectNode;
+import org.apache.harmony.beans.internal.nls.Messages;
 
 /**
  * @author Maxim V. Berkultsev
@@ -106,16 +107,16 @@
     }
 
     private void writeAll() {
-        Tag mainTag = new Tag("java");
+        Tag mainTag = new Tag("java"); //$NON-NLS-1$
         Enumeration<Object> e;
 
         printed.clear();
         NameMaker.clear();
 
-        mainTag.addAttr("version", System.getProperty("java.version"));
-        mainTag.addAttr("class", "java.beans.XMLDecoder");
+        mainTag.addAttr("version", System.getProperty("java.version")); //$NON-NLS-1$ //$NON-NLS-2$
+        mainTag.addAttr("class", "java.beans.XMLDecoder"); //$NON-NLS-1$ //$NON-NLS-2$
 
-        printBytes(0, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
+        printBytes(0, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); //$NON-NLS-1$
         printBytes(0, mainTag.toStringOnOpen());
 
         e = roots.elements();
@@ -141,8 +142,7 @@
         try {
             nodeType = node.getObjectType();
         } catch (Exception e) {
-            Exception e2 = new Exception("skipping expression "
-                    + node.getInitializer() + "...");
+            Exception e2 = new Exception(Messages.getString("beans.3B", node.getInitializer())); //$NON-NLS-1$
 
             e2.initCause(e);
             getExceptionListener().exceptionThrown(e2);
@@ -162,9 +162,9 @@
             boolean isReferenced = node.getReferencesNumber() > 0;
 
             if (isArray(nodeType)) {
-                tag = new Tag("array");
+                tag = new Tag("array"); //$NON-NLS-1$
             } else {
-                tag = new Tag("object");
+                tag = new Tag("object"); //$NON-NLS-1$
             }
 
             // check if the object presents references
@@ -173,7 +173,7 @@
                     String nodeId = node.getId();
 
                     if (nodeId != null) {
-                        tag.addAttr("idref", node.getId());
+                        tag.addAttr("idref", node.getId()); //$NON-NLS-1$
                     }
 
                     objectPrinted = true;
@@ -187,7 +187,7 @@
                             String objectName = NameMaker.getInstanceName(type);
 
                             node.setId(objectName);
-                            tag.addAttr("id", objectName);
+                            tag.addAttr("id", objectName); //$NON-NLS-1$
                         }
                     } catch (Exception e) {
                         getExceptionListener().exceptionThrown(e);
@@ -198,11 +198,11 @@
             if (!objectPrinted) {
                 try {
                     if (isArray(nodeType)) {
-                        tag.addAttr("class", ((Class) arguments[0]).getName());
-                        tag.addAttr("length", ((Integer) arguments[1])
+                        tag.addAttr("class", ((Class) arguments[0]).getName()); //$NON-NLS-1$
+                        tag.addAttr("length", ((Integer) arguments[1]) //$NON-NLS-1$
                                 .toString());
                     } else {
-                        tag.addAttr("class", node.getObjectType().getName());
+                        tag.addAttr("class", node.getObjectType().getName()); //$NON-NLS-1$
                     }
                 } catch (Exception e) {
                     getExceptionListener().exceptionThrown(e);
@@ -309,39 +309,39 @@
                 return;
             }
 
-            tag = new Tag("void");
+            tag = new Tag("void"); //$NON-NLS-1$
             objectName = NameMaker.getInstanceName(exprValue.getClass());
 
             node.setId(objectName);
-            tag.addAttr("id", objectName);
+            tag.addAttr("id", objectName); //$NON-NLS-1$
 
             methodName = expr.getMethodName();
             args = expr.getArguments();
 
-            if (methodName.startsWith("get")
+            if (methodName.startsWith("get") //$NON-NLS-1$
                     && (args.length == 0 || args.length == 1
                             && args[0].getClass() == Integer.class)
-                    || methodName.startsWith("set")
+                    || methodName.startsWith("set") //$NON-NLS-1$
                     && (args.length == 1 || args.length == 2
                             && args[0].getClass() == Integer.class)) {
                 String propertyName = methodName.substring(3);
 
                 if (propertyName.length() > 0) {
-                    tag.addAttr("property", Introspector
+                    tag.addAttr("property", Introspector //$NON-NLS-1$
                             .decapitalize(propertyName));
                 }
 
-                if (methodName.startsWith("get") && args.length == 1
-                        || methodName.startsWith("set") && args.length == 2) {
-                    tag.addAttr("index", args[0].toString());
+                if (methodName.startsWith("get") && args.length == 1 //$NON-NLS-1$
+                        || methodName.startsWith("set") && args.length == 2) { //$NON-NLS-1$
+                    tag.addAttr("index", args[0].toString()); //$NON-NLS-1$
                 }
             } else {
-                tag.addAttr("method", expr.getMethodName());
+                tag.addAttr("method", expr.getMethodName()); //$NON-NLS-1$
             }
 
             printBytes(tabCount, tag.toStringOnOpen());
 
-            for (int i = tag.hasAttr("index") ? 1 : 0; i < args.length; ++i) {
+            for (int i = tag.hasAttr("index") ? 1 : 0; i < args.length; ++i) { //$NON-NLS-1$
                 if (args[i] != null) {
                     ObjectNode node2 = nodes.get(args[i]);
 
@@ -363,36 +363,36 @@
     }
 
     private void printVoidTag(int tabCount, Statement stat) {
-        Tag tag = new Tag("void");
+        Tag tag = new Tag("void"); //$NON-NLS-1$
 
         String methodName = stat.getMethodName();
         Object[] args = stat.getArguments();
 
-        if (methodName.startsWith("get")
+        if (methodName.startsWith("get") //$NON-NLS-1$
                 && (args.length == 0 || args.length == 1
                         && args[0].getClass() == Integer.class)
-                || methodName.startsWith("set")
+                || methodName.startsWith("set") //$NON-NLS-1$
                 && (args.length == 1 || args.length == 2
                         && args[0].getClass() == Integer.class)) {
             String propertyName = methodName.substring(3);
 
             if (propertyName.length() > 0) {
                 tag
-                        .addAttr("property", Introspector
+                        .addAttr("property", Introspector //$NON-NLS-1$
                                 .decapitalize(propertyName));
             }
 
-            if (methodName.startsWith("get") && args.length == 1
-                    || methodName.startsWith("set") && args.length == 2) {
-                tag.addAttr("index", args[0].toString());
+            if (methodName.startsWith("get") && args.length == 1 //$NON-NLS-1$
+                    || methodName.startsWith("set") && args.length == 2) { //$NON-NLS-1$
+                tag.addAttr("index", args[0].toString()); //$NON-NLS-1$
             }
         } else {
-            tag.addAttr("method", stat.getMethodName());
+            tag.addAttr("method", stat.getMethodName()); //$NON-NLS-1$
         }
 
         printBytes(tabCount, tag.toStringOnOpen());
 
-        for (int i = tag.hasAttr("index") ? 1 : 0; i < args.length; ++i) {
+        for (int i = tag.hasAttr("index") ? 1 : 0; i < args.length; ++i) { //$NON-NLS-1$
             if (args[i] != null) {
                 ObjectNode node = nodes.get(args[i]);
 
@@ -408,18 +408,18 @@
     }
 
     private void printNullTag(int tabCount) {
-        printBytes(tabCount, "<null/>");
+        printBytes(tabCount, "<null/>"); //$NON-NLS-1$
     }
 
     private void printBytes(int tabCount, String s) {
         try {
-            String result = "";
+            String result = ""; //$NON-NLS-1$
 
             for (int i = 0; i < tabCount; ++i) {
                 result += '\t';
             }
-            result = result + s + "\n";
-            out.write(result.getBytes("UTF-8"));
+            result = result + s + "\n"; //$NON-NLS-1$
+            out.write(result.getBytes("UTF-8")); //$NON-NLS-1$
         } catch (IOException ioe) {
             ExceptionListener listener = getExceptionListener();
 
@@ -442,19 +442,19 @@
 
             switch (c) {
                 case '&':
-                    sb.append("&amp;");
+                    sb.append("&amp;"); //$NON-NLS-1$
                     break;
                 case '<':
-                    sb.append("&lt;");
+                    sb.append("&lt;"); //$NON-NLS-1$
                     break;
                 case '>':
-                    sb.append("&gt;");
+                    sb.append("&gt;"); //$NON-NLS-1$
                     break;
                 case '\'':
-                    sb.append("&apos;");
+                    sb.append("&apos;"); //$NON-NLS-1$
                     break;
                 case '"':
-                    sb.append("&quot;");
+                    sb.append("&quot;"); //$NON-NLS-1$
                     break;
                 default:
                     sb.append(c);
@@ -496,28 +496,28 @@
         }
 
         public String toStringOnOpenUnfinished() {
-            String result = "<" + name;
+            String result = "<" + name; //$NON-NLS-1$
             Iterator<String> i = attrs.keySet().iterator();
 
             while (i.hasNext()) {
                 String attrName = i.next();
                 String attrValue = attrs.get(attrName);
 
-                result += " " + attrName + "=\"" + attrValue + "\"";
+                result += " " + attrName + "=\"" + attrValue + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
             }
             return result;
         }
 
         public String toStringOnOpen() {
-            return toStringOnOpenUnfinished() + ">";
+            return toStringOnOpenUnfinished() + ">"; //$NON-NLS-1$
         }
 
         public String toStringShortForm() {
-            return toStringOnOpenUnfinished() + "/>";
+            return toStringOnOpenUnfinished() + "/>"; //$NON-NLS-1$
         }
 
         public String toStringOnClose() {
-            return "</" + name + ">";
+            return "</" + name + ">"; //$NON-NLS-1$ //$NON-NLS-2$
         }
 
         public String toStringOnCharacters() {
@@ -540,10 +540,10 @@
 
         private static String getCompName(Class clz) {
             if (clz.isArray()) {
-                return getCompName(clz.getComponentType()) + "Array";
+                return getCompName(clz.getComponentType()) + "Array"; //$NON-NLS-1$
             } else {
                 return clz.getName().substring(
-                        clz.getName().lastIndexOf(".") + 1);
+                        clz.getName().lastIndexOf(".") + 1); //$NON-NLS-1$
             }
         }
 
@@ -559,12 +559,12 @@
                 shortName = fullName;
             } else {
                 fullName = type.getName();
-                shortName = fullName.substring(fullName.lastIndexOf(".") + 1);
+                shortName = fullName.substring(fullName.lastIndexOf(".") + 1); //$NON-NLS-1$
             }
             iNum = numOfExemplars.get(shortName);
             if (iNum == null) {
                 numOfExemplars.put(shortName, new Integer(0));
-                result = shortName + "0";
+                result = shortName + "0"; //$NON-NLS-1$
             } else {
                 int newValue = iNum.intValue() + 1;
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextChildSupport.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextChildSupport.java?rev=439260&r1=439259&r2=439260&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextChildSupport.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextChildSupport.java Fri Sep  1 03:08:27 2006
@@ -32,6 +32,8 @@
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
 
+import org.apache.harmony.beans.internal.nls.Messages;
+
 /**
  * @author Sergei A. Krivenko
  * @version $Revision: 1.7.4.3 $
@@ -41,7 +43,7 @@
         implements BeanContextChild, BeanContextServicesListener, Serializable {
 
     private static final long serialVersionUID = 6328947014421475877L;
-    static final String BEAN_CONTEXT = "beanContext";
+    static final String BEAN_CONTEXT = "beanContext"; //$NON-NLS-1$
     
     /**
      * 
@@ -245,7 +247,7 @@
                 fireVetoableChange(BEAN_CONTEXT, this.beanContext, bc);
                 
                 throw new PropertyVetoException(
-                    "The new BeanContext can not be set", 
+                    Messages.getString("beans.0F"),  //$NON-NLS-1$
                     new PropertyChangeEvent(this.beanContextChildPeer, 
                                             BEAN_CONTEXT, 
                                             this.beanContext, 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextMembershipEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextMembershipEvent.java?rev=439260&r1=439259&r2=439260&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextMembershipEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextMembershipEvent.java Fri Sep  1 03:08:27 2006
@@ -24,6 +24,8 @@
 import java.util.Iterator;
 import java.util.Vector;
 
+import org.apache.harmony.beans.internal.nls.Messages;
+
 /**
  * @author Sergei A. Krivenko
  * @version $Revision: 1.4.4.3 $
@@ -45,7 +47,7 @@
         super(bc);
 
         if (changes == null) {
-            throw new NullPointerException("Changes are null");
+            throw new NullPointerException(Messages.getString("beans.0E")); //$NON-NLS-1$
         }
 
         this.children = changes;
@@ -58,7 +60,7 @@
         super(bc);
 
         if (changes == null) {
-            throw new NullPointerException("Changes are null");
+            throw new NullPointerException(Messages.getString("beans.0E")); //$NON-NLS-1$
         }
 
         // Initialize collection



Mime
View raw message