harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r450827 [3/3] - in /incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans: ./ beancontext/
Date Thu, 28 Sep 2006 12:13:26 GMT
Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/VetoableChangeListener.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/VetoableChangeListener.java?view=diff&rev=450827&r1=450826&r2=450827
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/VetoableChangeListener.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/VetoableChangeListener.java
Thu Sep 28 05:13:24 2006
@@ -14,24 +14,12 @@
  *  limitations under the License.
  */
 
-/**
- * @author Maxim V. Berkultsev
- * @version $Revision: 1.3.6.3 $
- */
 package java.beans;
 
 import java.util.EventListener;
 
-/**
- * @author Maxim V. Berkultsev
- * @version $Revision: 1.3.6.3 $
- */
-
 public interface VetoableChangeListener extends EventListener {
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public void vetoableChange(PropertyChangeEvent evt)
             throws PropertyVetoException;
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/VetoableChangeListenerProxy.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/VetoableChangeListenerProxy.java?view=diff&rev=450827&r1=450826&r2=450827
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/VetoableChangeListenerProxy.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/VetoableChangeListenerProxy.java
Thu Sep 28 05:13:24 2006
@@ -14,47 +14,30 @@
  *  limitations under the License.
  */
 
-/**
- * @author Maxim V. Berkultsev
- * @version $Revision: 1.3.6.3 $
- */
 package java.beans;
 
 import java.util.EventListenerProxy;
 
-/**
- * @author Maxim V. Berkultsev
- * @version $Revision: 1.3.6.3 $
- */
-
-public class VetoableChangeListenerProxy extends EventListenerProxy
-        implements VetoableChangeListener {
-    
+public class VetoableChangeListenerProxy extends EventListenerProxy implements
+        VetoableChangeListener {
+
     private String propertyName;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public VetoableChangeListenerProxy(
-            String propertyName, VetoableChangeListener listener) {
+    public VetoableChangeListenerProxy(String propertyName,
+            VetoableChangeListener listener) {
         super(listener);
         this.propertyName = propertyName;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public String getPropertyName() {
         return propertyName;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public void vetoableChange(PropertyChangeEvent evt)
             throws PropertyVetoException {
-        VetoableChangeListener listener =
-                (VetoableChangeListener) getListener();
-        if(listener != null) listener.vetoableChange(evt);
+        VetoableChangeListener listener = (VetoableChangeListener) getListener();
+        if (listener != null) {
+            listener.vetoableChange(evt);
+        }
     }
 }

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?view=diff&rev=450827&r1=450826&r2=450827
==============================================================================
--- 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
Thu Sep 28 05:13:24 2006
@@ -14,10 +14,6 @@
  *  limitations under the License.
  */
 
-/**
- * @author Maxim V. Berkultsev
- * @version $Revision: 1.8.2.3 $
- */
 package java.beans;
 
 import java.io.IOException;
@@ -31,11 +27,6 @@
 import java.util.List;
 import java.util.Map;
 
-/**
- * @author Maxim V. Berkultsev
- * @version $Revision: 1.8.2.3 $
- */
-
 public class VetoableChangeSupport implements Serializable {
 
     private static final long serialVersionUID = -5090210921595982017l;
@@ -51,9 +42,6 @@
 
     private int vetoableChangeSupportSerializedDataVersion = 1;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public VetoableChangeSupport(Object sourceBean) {
         if (sourceBean == null) {
             throw new NullPointerException();
@@ -61,9 +49,6 @@
         this.sourceBean = sourceBean;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public void fireVetoableChange(String propertyName, Object oldValue,
             Object newValue) throws PropertyVetoException {
         PropertyChangeEvent event = createPropertyChangeEvent(propertyName,
@@ -71,9 +56,6 @@
         doFirePropertyChange(event);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public synchronized void removeVetoableChangeListener(String propertyName,
             VetoableChangeListener listener) {
         if ((propertyName != null) && (listener != null)) {
@@ -86,9 +68,6 @@
         }
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public synchronized void addVetoableChangeListener(String propertyName,
             VetoableChangeListener listener) {
         if (propertyName != null && listener != null) {
@@ -104,9 +83,6 @@
         }
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public synchronized VetoableChangeListener[] getVetoableChangeListeners(
             String propertyName) {
         List<VetoableChangeListener> listeners = null;
@@ -120,9 +96,6 @@
 
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public void fireVetoableChange(String propertyName, boolean oldValue,
             boolean newValue) throws PropertyVetoException {
         PropertyChangeEvent event = createPropertyChangeEvent(propertyName,
@@ -130,9 +103,6 @@
         doFirePropertyChange(event);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public void fireVetoableChange(String propertyName, int oldValue,
             int newValue) throws PropertyVetoException {
         PropertyChangeEvent event = createPropertyChangeEvent(propertyName,
@@ -140,9 +110,6 @@
         doFirePropertyChange(event);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public synchronized boolean hasListeners(String propertyName) {
         boolean result = allVetoableChangeListeners.size() > 0;
         if (!result && propertyName != null) {
@@ -155,9 +122,6 @@
         return result;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public synchronized void removeVetoableChangeListener(
             VetoableChangeListener listener) {
         if (listener != null) {
@@ -173,9 +137,6 @@
         }
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public synchronized void addVetoableChangeListener(
             VetoableChangeListener listener) {
         if (listener != null) {
@@ -183,9 +144,6 @@
         }
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public synchronized VetoableChangeListener[] getVetoableChangeListeners() {
         List<VetoableChangeListener> result = new ArrayList<VetoableChangeListener>(
                 allVetoableChangeListeners);
@@ -210,9 +168,6 @@
         return getAsVetoableChangeListenerArray(result);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     private void writeObject(ObjectOutputStream oos) throws IOException {
         List<VetoableChangeListener> allSerializedVetoableChangeListeners = new ArrayList<VetoableChangeListener>();
         for (VetoableChangeListener vcl : allVetoableChangeListeners) {
@@ -255,9 +210,6 @@
         oos.writeInt(vetoableChangeSupportSerializedDataVersion);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     private void readObject(ObjectInputStream ois) throws IOException,
             ClassNotFoundException {
 
@@ -275,9 +227,6 @@
         vetoableChangeSupportSerializedDataVersion = ois.readInt();
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public void fireVetoableChange(PropertyChangeEvent event)
             throws PropertyVetoException {
         doFirePropertyChange(event);
@@ -314,9 +263,9 @@
         /* Take note of who we are going to notify (and potentially un-notify) */
 
         VetoableChangeListener[] listensToAll; // Listeners to all property
-                                                // change events
+        // change events
         VetoableChangeListener[] listensToOne = null; // Listens to a given
-                                                        // property change
+        // property change
         synchronized (this) {
             listensToAll = allVetoableChangeListeners
                     .toArray(new VetoableChangeListener[allVetoableChangeListeners
@@ -345,14 +294,16 @@
                     propName, newValue, oldValue);
             for (VetoableChangeListener listener : listensToAll) {
                 try {
-                        listener.vetoableChange(revertEvent);
-                } catch (PropertyVetoException ignored){}
+                    listener.vetoableChange(revertEvent);
+                } catch (PropertyVetoException ignored) {
+                }
             }
             if (listensToOne != null) {
                 for (VetoableChangeListener listener : listensToOne) {
-                        try {
-                                listener.vetoableChange(revertEvent);
-                        } catch (PropertyVetoException ignored){}
+                    try {
+                        listener.vetoableChange(revertEvent);
+                    } catch (PropertyVetoException ignored) {
+                    }
                 }
             }
             throw pve;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Visibility.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Visibility.java?view=diff&rev=450827&r1=450826&r2=450827
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Visibility.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/Visibility.java
Thu Sep 28 05:13:24 2006
@@ -14,36 +14,15 @@
  *  limitations under the License.
  */
 
-/**
- * @author Maxim V. Berkultsev
- * @version $Revision: 1.2.6.3 $
- */
 package java.beans;
 
-/**
- * @author Maxim V. Berkultsev
- * @version $Revision: 1.2.6.3 $
- */
-
 public interface Visibility {
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public boolean needsGui();
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public boolean avoidingGui();
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public void okToUseGui();
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public void dontUseGui();
 }

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?view=diff&rev=450827&r1=450826&r2=450827
==============================================================================
--- 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
Thu Sep 28 05:13:24 2006
@@ -13,20 +13,20 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
+
 package java.beans;
 
-import java.io.InputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 import java.util.Vector;
 
-import org.xml.sax.helpers.XMLReaderFactory;
-import org.xml.sax.XMLReader;
+import org.apache.harmony.beans.Handler;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
-
-import org.apache.harmony.beans.Handler;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.XMLReaderFactory;
 
 public class XMLDecoder {
 

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?view=diff&rev=450827&r1=450826&r2=450827
==============================================================================
--- 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
Thu Sep 28 05:13:24 2006
@@ -14,28 +14,19 @@
  *  limitations under the License.
  */
 
-/**
- * @author Maxim V. Berkultsev
- * @version $Revision: 1.13.6.4 $
- */
 package java.beans;
 
 import java.io.IOException;
 import java.io.OutputStream;
 import java.util.Enumeration;
 import java.util.HashMap;
-import java.util.LinkedHashMap;
 import java.util.Iterator;
+import java.util.LinkedHashMap;
 import java.util.Vector;
 
 import org.apache.harmony.beans.ObjectNode;
 import org.apache.harmony.beans.internal.nls.Messages;
 
-/**
- * @author Maxim V. Berkultsev
- * @version $Revision: 1.13.6.4 $
- */
-
 public class XMLEncoder extends Encoder {
 
     private OutputStream out;
@@ -44,59 +35,38 @@
 
     private Vector<ObjectNode> printed = new Vector<ObjectNode>();
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public XMLEncoder(OutputStream out) {
         this.out = out;
         this.owner = null;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
+    @Override
     public void writeObject(Object object) {
         super.writeObject(object);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public void setOwner(Object owner) {
         this.owner = owner;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public Object getOwner() {
         return owner;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
+    @Override
     public void writeStatement(Statement oldStm) {
         super.writeStatement(oldStm);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
+    @Override
     public void writeExpression(Expression oldExp) {
         super.writeExpression(oldExp);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public void flush() {
         writeAll();
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public void close() {
         try {
             flush();
@@ -142,7 +112,8 @@
         try {
             nodeType = node.getObjectType();
         } catch (Exception e) {
-            Exception e2 = new Exception(Messages.getString("beans.3B", node.getInitializer()));
//$NON-NLS-1$
+            Exception e2 = new Exception(Messages.getString(
+                    "beans.3B", node.getInitializer())); //$NON-NLS-1$
 
             e2.initCause(e);
             getExceptionListener().exceptionThrown(e2);
@@ -215,7 +186,7 @@
                 // reference
                 printBytes(tabCount, tag.toStringShortForm());
             } else if (isArray(nodeType) && !node.statements().hasNext()) {
-                // if we have an empty array 
+                // if we have an empty array
                 printBytes(tabCount, tag.toStringShortForm());
             } else if (arguments.length == 0 && !node.statements().hasNext()
                     && !node.expressions().hasNext()) {
@@ -223,7 +194,7 @@
                 printBytes(tabCount, tag.toStringShortForm());
             } else {
                 // the tag has not been printed and contains children,
-                // let's print them  
+                // let's print them
 
                 printBytes(tabCount, tag.toStringOnOpen());
 
@@ -242,11 +213,11 @@
                     Iterator<Expression> i1;
                     Iterator<Statement> i2;
 
-                    for (int i = 0; i < arguments.length; ++i) {
-                        if (arguments[i] != null) {
-                            ObjectNode succNode = nodes.get(arguments[i]);
+                    for (Object element : arguments) {
+                        if (element != null) {
+                            ObjectNode succNode = nodes.get(element);
 
-                            printObjectTag(++tabCount, arguments[i], succNode);
+                            printObjectTag(++tabCount, element, succNode);
                         } else {
                             printNullTag(++tabCount);
                         }
@@ -302,8 +273,10 @@
             node = nodes.get(exprValue);
 
             // find out, if this object has no references to be printed
-            // System.out.println("---- node.getReferencesNumber() = " + node.getReferencesNumber());
-            // System.out.println("---- node.getReferencedExpressionsNumber() = " + node.getReferencedExpressionsNumber());
+            // System.out.println("---- node.getReferencesNumber() = " +
+            // node.getReferencesNumber());
+            // System.out.println("---- node.getReferencedExpressionsNumber() =
+            // " + node.getReferencedExpressionsNumber());
 
             if (node.getReferencesNumber() == 0) {
                 return;
@@ -357,7 +330,7 @@
 
             printed.add(node);
         } catch (Exception e) {
-            //TODO - signal problem with expr.getValue()
+            // TODO - signal problem with expr.getValue()
         }
 
     }
@@ -377,9 +350,8 @@
             String propertyName = methodName.substring(3);
 
             if (propertyName.length() > 0) {
-                tag
-                        .addAttr("property", Introspector //$NON-NLS-1$
-                                .decapitalize(propertyName));
+                tag.addAttr("property", Introspector //$NON-NLS-1$
+                        .decapitalize(propertyName));
             }
 
             if (methodName.startsWith("get") && args.length == 1 //$NON-NLS-1$
@@ -431,8 +403,10 @@
 
     /**
      * Escapes '&', '<', '>', '\'', '"' chars.
-     * @param input input string to be escaped
-     * @return string with escaped characters 
+     * 
+     * @param input
+     *            input string to be escaped
+     * @return string with escaped characters
      */
     static String escapeChars(String input) {
         StringBuffer sb = new StringBuffer();
@@ -465,7 +439,7 @@
     }
 
     /**
-     * This class is used by XMLEncoder to store XML tag information. 
+     * This class is used by XMLEncoder to store XML tag information.
      */
     static class Tag {
 
@@ -524,6 +498,7 @@
             return XMLEncoder.escapeChars(characters);
         }
 
+        @Override
         public String toString() {
             return toStringOnOpen() + toStringOnCharacters()
                     + toStringOnClose();
@@ -541,10 +516,8 @@
         private static String getCompName(Class clz) {
             if (clz.isArray()) {
                 return getCompName(clz.getComponentType()) + "Array"; //$NON-NLS-1$
-            } else {
-                return clz.getName().substring(
-                        clz.getName().lastIndexOf(".") + 1); //$NON-NLS-1$
             }
+            return clz.getName().substring(clz.getName().lastIndexOf(".") + 1); //$NON-NLS-1$
         }
 
         public static String getInstanceName(Class type) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContext.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContext.java?view=diff&rev=450827&r1=450826&r2=450827
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContext.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContext.java
Thu Sep 28 05:13:24 2006
@@ -14,60 +14,35 @@
  *  limitations under the License.
  */
 
-/**
- * @author Sergei A. Krivenko
- * @version $Revision: 1.3.4.3 $
- */
 package java.beans.beancontext;
 
 import java.beans.DesignMode;
 import java.beans.Visibility;
-
 import java.io.IOException;
 import java.io.InputStream;
-
 import java.net.URL;
-
 import java.util.Collection;
 
-/**
- * @author Sergei A. Krivenko
- * @version $Revision: 1.3.4.3 $
- */
-
-public interface BeanContext extends BeanContextChild, Collection, DesignMode, 
+public interface BeanContext extends BeanContextChild, Collection, DesignMode,
         Visibility {
 
-     /** @todo: find out what it should be initialized to **/
-    public static final Object globalHierarchyLock = new Object();
-    
     /**
-     * @com.intel.drl.spec_ref
+     * @todo: find out what it should be initialized to
      */
+    public static final Object globalHierarchyLock = new Object();
+
     public void addBeanContextMembershipListener(
             BeanContextMembershipListener bcml);
-    
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public URL getResource(String name, BeanContextChild bcc) 
-        throws IllegalArgumentException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public InputStream getResourceAsStream(String name, BeanContextChild bcc) 
-        throws IllegalArgumentException;
+    public URL getResource(String name, BeanContextChild bcc)
+            throws IllegalArgumentException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public Object instantiateChild(String beanName) 
-        throws IOException, ClassNotFoundException;
+    public InputStream getResourceAsStream(String name, BeanContextChild bcc)
+            throws IllegalArgumentException;
+
+    public Object instantiateChild(String beanName) throws IOException,
+            ClassNotFoundException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public void removeBeanContextMembershipListener(
             BeanContextMembershipListener bcml);
 }



Mime
View raw message