You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by eh...@apache.org on 2006/10/16 19:44:32 UTC

svn commit: r464583 - /incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/lang/Objects.java

Author: ehillenius
Date: Mon Oct 16 10:44:32 2006
New Revision: 464583

URL: http://svn.apache.org/viewvc?view=rev&rev=464583
Log:
sorted members

Modified:
    incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/lang/Objects.java

Modified: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/lang/Objects.java
URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/lang/Objects.java?view=diff&rev=464583&r1=464582&r2=464583
==============================================================================
--- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/lang/Objects.java (original)
+++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/util/lang/Objects.java Mon Oct 16 10:44:32 2006
@@ -47,17 +47,14 @@
  */
 public final class Objects
 {
-	
-	/** log. */
-	private static final Log log = LogFactory.getLog(Objects.class);
 
 	private static final class ReplaceObjectInputStream extends ObjectInputStream
 	{
-		private HashMap replacedComponents;
 		private final ClassLoader classloader;
+		private HashMap replacedComponents;
 
-		private ReplaceObjectInputStream(InputStream in, HashMap replacedComponents, ClassLoader classloader)
-				throws IOException
+		private ReplaceObjectInputStream(InputStream in, HashMap replacedComponents,
+				ClassLoader classloader) throws IOException
 		{
 			super(in);
 			this.replacedComponents = replacedComponents;
@@ -65,16 +62,6 @@
 			enableResolveObject(true);
 		}
 
-		protected Object resolveObject(Object obj) throws IOException
-		{
-			Object replaced = replacedComponents.get(obj);
-			if (replaced != null)
-			{
-				return replaced;
-			}
-			return super.resolveObject(obj);
-		}
-
 		// This overide is required to resolve classess inside in different
 		// bundle, i.e.
 		// The classess can be resolved by OSGI classresolver implementation
@@ -90,8 +77,9 @@
 			catch (ClassNotFoundException ex1)
 			{
 				// ignore this exception.
-				log.debug("Class not found by using objects own classloader, trying the IClassResolver");
-			} 
+				log
+						.debug("Class not found by using objects own classloader, trying the IClassResolver");
+			}
 
 			Application application = Application.get();
 			IApplicationSettings applicationSettings = application.getApplicationSettings();
@@ -115,6 +103,16 @@
 			}
 			return candidate;
 		}
+
+		protected Object resolveObject(Object obj) throws IOException
+		{
+			Object replaced = replacedComponents.get(obj);
+			if (replaced != null)
+			{
+				return replaced;
+			}
+			return super.resolveObject(obj);
+		}
 	}
 
 	private static final class ReplaceObjectOutputStream extends ObjectOutputStream
@@ -141,6 +139,15 @@
 		}
 	}
 
+	/** defaults for primitives. */
+	static HashMap primitiveDefaults = new HashMap();
+
+	/** Type tag meaning java.math.BigDecimal. */
+	private static final int BIGDEC = 9;
+
+	/** Type tag meaning java.math.BigInteger. */
+	private static final int BIGINT = 6;
+
 	/** Type tag meaning boolean. */
 	private static final int BOOL = 0;
 
@@ -150,29 +157,20 @@
 	/** Type tag meaning char. */
 	private static final int CHAR = 2;
 
-	/** Type tag meaning short. */
-	private static final int SHORT = 3;
-
-	/** Type tag meaning int. */
-	private static final int INT = 4;
-
-	/** Type tag meaning long. */
-	private static final int LONG = 5;
-
-	/** Type tag meaning java.math.BigInteger. */
-	private static final int BIGINT = 6;
+	/** Type tag meaning double. */
+	private static final int DOUBLE = 8;
 
 	/** Type tag meaning float. */
 	private static final int FLOAT = 7;
 
-	/** Type tag meaning double. */
-	private static final int DOUBLE = 8;
+	/** Type tag meaning int. */
+	private static final int INT = 4;
 
-	/** Type tag meaning java.math.BigDecimal. */
-	private static final int BIGDEC = 9;
+	/** log. */
+	private static final Log log = LogFactory.getLog(Objects.class);
 
-	/** Type tag meaning something other than a number. */
-	private static final int NONNUMERIC = 10;
+	/** Type tag meaning long. */
+	private static final int LONG = 5;
 
 	/**
 	 * The smallest type tag that represents reals as opposed to integers. You
@@ -184,8 +182,11 @@
 	 */
 	private static final int MIN_REAL_TYPE = FLOAT;
 
-	/** defaults for primitives. */
-	static HashMap primitiveDefaults = new HashMap();
+	/** Type tag meaning something other than a number. */
+	private static final int NONNUMERIC = 10;
+
+	/** Type tag meaning short. */
+	private static final int SHORT = 3;
 
 	static
 	{
@@ -368,7 +369,7 @@
 				ObjectOutputStream oos = new ReplaceObjectOutputStream(out, replacedObjects);
 				oos.writeObject(object);
 				ObjectInputStream ois = new ReplaceObjectInputStream(new ByteArrayInputStream(out
-						.toByteArray()), replacedObjects,object.getClass().getClassLoader());
+						.toByteArray()), replacedObjects, object.getClass().getClassLoader());
 				return ois.readObject();
 			}
 			catch (ClassNotFoundException e)
@@ -415,18 +416,20 @@
 							ClassNotFoundException
 					{
 						String className = desc.getName();
-						
+
 						try
 						{
-							return Class.forName(className, true, object.getClass().getClassLoader());
+							return Class.forName(className, true, object.getClass()
+									.getClassLoader());
 						}
 						catch (ClassNotFoundException ex1)
 						{
 							// ignore this exception.
-							log.debug("Class not found by using objects own classloader, trying the IClassResolver");
-						} 
-						
-						
+							log
+									.debug("Class not found by using objects own classloader, trying the IClassResolver");
+						}
+
+
 						Application application = Application.get();
 						IApplicationSettings applicationSettings = application
 								.getApplicationSettings();