You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2011/04/25 11:19:32 UTC

svn commit: r1096439 [3/7] - in /incubator/isis/trunk/core/commons/src: main/java/org/apache/isis/core/commons/authentication/ main/java/org/apache/isis/core/commons/components/ main/java/org/apache/isis/core/commons/config/ main/java/org/apache/isis/c...

Modified: incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DebugDataInputExtended.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DebugDataInputExtended.java?rev=1096439&r1=1096438&r2=1096439&view=diff
==============================================================================
--- incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DebugDataInputExtended.java (original)
+++ incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DebugDataInputExtended.java Mon Apr 25 09:19:29 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.commons.encoding;
 
 import java.io.IOException;
@@ -25,8 +24,6 @@ import java.util.Arrays;
 
 import org.apache.log4j.Logger;
 
-
-
 public class DebugDataInputExtended extends DataInputExtendedDecorator {
 
     private static final Logger LOG = Logger.getLogger(DebugDataInputExtended.class);
@@ -39,7 +36,7 @@ public class DebugDataInputExtended exte
     public boolean readBoolean() throws IOException {
         final boolean b = super.readBoolean();
         if (LOG.isDebugEnabled()) {
-        	LOG.debug("boolean: " + b);
+            LOG.debug("boolean: " + b);
         }
         return b;
     }
@@ -48,7 +45,7 @@ public class DebugDataInputExtended exte
     public byte readByte() throws IOException {
         final byte b = super.readByte();
         if (LOG.isDebugEnabled()) {
-        	LOG.debug("byte: " + b);
+            LOG.debug("byte: " + b);
         }
         return b;
     }
@@ -57,7 +54,7 @@ public class DebugDataInputExtended exte
     public byte[] readBytes() throws IOException {
         final byte[] bs = super.readBytes();
         if (LOG.isDebugEnabled()) {
-        	LOG.debug("bytes: " + new String(bs));
+            LOG.debug("bytes: " + new String(bs));
         }
         return bs;
     }
@@ -66,7 +63,7 @@ public class DebugDataInputExtended exte
     public int readInt() throws IOException {
         final int i = super.readInt();
         if (LOG.isDebugEnabled()) {
-        	LOG.debug("int: " + i);
+            LOG.debug("int: " + i);
         }
         return i;
     }
@@ -75,7 +72,7 @@ public class DebugDataInputExtended exte
     public long readLong() throws IOException {
         final long l = super.readLong();
         if (LOG.isDebugEnabled()) {
-        	LOG.debug("long: " + l);
+            LOG.debug("long: " + l);
         }
         return l;
     }
@@ -84,7 +81,7 @@ public class DebugDataInputExtended exte
     public String readUTF() throws IOException {
         final String string = super.readUTF();
         if (LOG.isDebugEnabled()) {
-        	LOG.debug("string: " + string);
+            LOG.debug("string: " + string);
         }
         return string;
     }
@@ -93,30 +90,27 @@ public class DebugDataInputExtended exte
     public String[] readUTFs() throws IOException {
         final String[] strings = super.readUTFs();
         if (LOG.isDebugEnabled()) {
-        	LOG.debug("list: " + Arrays.toString(strings));
+            LOG.debug("list: " + Arrays.toString(strings));
         }
         return strings;
     }
 
     @Override
-    public <T> T readEncodable(Class<T> encodableType) throws IOException {
+    public <T> T readEncodable(final Class<T> encodableType) throws IOException {
         final T object = super.readEncodable(encodableType);
         if (LOG.isDebugEnabled()) {
-        	LOG.debug(">>> object");
+            LOG.debug(">>> object");
         }
         return object;
     }
 
     @Override
-    public <T> T[] readEncodables(Class<T> encodableType) throws IOException {
+    public <T> T[] readEncodables(final Class<T> encodableType) throws IOException {
         final T[] objects = super.readEncodables(encodableType);
         if (LOG.isDebugEnabled()) {
-        	LOG.debug(">>> objects x" + objects.length);
+            LOG.debug(">>> objects x" + objects.length);
         }
         return objects;
     }
 
-
-
 }
-

Modified: incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DebugDataOutputExtended.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DebugDataOutputExtended.java?rev=1096439&r1=1096438&r2=1096439&view=diff
==============================================================================
--- incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DebugDataOutputExtended.java (original)
+++ incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/DebugDataOutputExtended.java Mon Apr 25 09:19:29 2011
@@ -17,17 +17,14 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.commons.encoding;
 
 import java.io.IOException;
 
 import org.apache.log4j.Logger;
 
-
-
 public class DebugDataOutputExtended extends DataOutputExtendedDecorator {
-	
+
     private static final Logger LOG = Logger.getLogger(DebugDataOutputExtended.class);
 
     public DebugDataOutputExtended(final DataOutputExtended underlying) {
@@ -36,83 +33,81 @@ public class DebugDataOutputExtended ext
 
     @Override
     public void writeBoolean(final boolean flag) throws IOException {
-    	if (LOG.isDebugEnabled()) {
-    		LOG.debug("boolean: " + flag);
-    	}
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("boolean: " + flag);
+        }
         super.writeBoolean(flag);
     }
 
     @Override
     public void writeBytes(final byte[] value) throws IOException {
-    	if (LOG.isDebugEnabled()) {
-    		LOG.debug("bytes: (" + value.length + ") " + new String(value));
-    	}
-    	super.writeBytes(value);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("bytes: (" + value.length + ") " + new String(value));
+        }
+        super.writeBytes(value);
     }
 
     @Override
     public void writeByte(final int value) throws IOException {
-    	if (LOG.isDebugEnabled()) {
-    		LOG.debug("byte: " + value);
-    	}
-    	super.writeByte(value);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("byte: " + value);
+        }
+        super.writeByte(value);
     }
 
     @Override
     public void writeInt(final int value) throws IOException {
-    	if (LOG.isDebugEnabled()) {
-    		LOG.debug("int: " + value);
-    	}
-    	super.writeInt(value);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("int: " + value);
+        }
+        super.writeInt(value);
     }
-    
+
     @Override
     public void writeLong(final long value) throws IOException {
-    	if (LOG.isDebugEnabled()) {
-    		LOG.debug("long: " + value);
-    	}
-    	super.writeLong(value);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("long: " + value);
+        }
+        super.writeLong(value);
     }
 
     @Override
     public void writeEncodable(final Object object) throws IOException {
-    	if (LOG.isDebugEnabled()) {
-    		LOG.debug(">>> object: (" + object + ")");
-    	}
-    	super.writeEncodable(object);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug(">>> object: (" + object + ")");
+        }
+        super.writeEncodable(object);
     }
 
     @Override
     public void writeEncodables(final Object[] objects) throws IOException {
-    	if (LOG.isDebugEnabled()) {
-    		LOG.debug(">>> objects x" + objects.length);
-    	}
-    	super.writeEncodables(objects);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug(">>> objects x" + objects.length);
+        }
+        super.writeEncodables(objects);
     }
 
     @Override
     public void writeUTF(final String str) throws IOException {
-    	if (LOG.isDebugEnabled()) {
-    		LOG.debug("string: " + str);
-    	}
-    	super.writeUTF(str);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("string: " + str);
+        }
+        super.writeUTF(str);
     }
 
     @Override
     public void writeUTFs(final String[] strings) throws IOException {
-    	if (LOG.isDebugEnabled()) {
-	        final StringBuffer l = new StringBuffer();
-	        for (int i = 0; i < strings.length; i++) {
-            if (i > 0) {
-                l.append(", ");
+        if (LOG.isDebugEnabled()) {
+            final StringBuffer l = new StringBuffer();
+            for (int i = 0; i < strings.length; i++) {
+                if (i > 0) {
+                    l.append(", ");
+                }
+                l.append(strings[i]);
             }
-	            l.append(strings[i]);
-	        }
-        	LOG.debug("list: " + l);
+            LOG.debug("list: " + l);
         }
         super.writeUTFs(strings);
     }
 
-
 }
-

Modified: incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/Encodable.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/Encodable.java?rev=1096439&r1=1096438&r2=1096439&view=diff
==============================================================================
--- incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/Encodable.java (original)
+++ incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/Encodable.java Mon Apr 25 09:19:29 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.commons.encoding;
 
 import java.io.IOException;
@@ -26,15 +25,13 @@ import java.io.IOException;
  * This interface indicates that an object can be encoded into into a byte array so it can be streamed.
  * 
  * <p>
- * By implementing this interface you are agreeing to provide a constructor with a single argument of
- * type {@link DataInputExtended}, which create an instance from the stream.
+ * By implementing this interface you are agreeing to provide a constructor with a single argument of type
+ * {@link DataInputExtended}, which create an instance from the stream.
  */
 public interface Encodable {
 
-	
     /**
      * Returns the domain object's value as an encoded byte array via the encoder.
      */
     void encode(DataOutputExtended outputStream) throws IOException;
 }
-

Modified: incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/EncodingConstants.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/EncodingConstants.java?rev=1096439&r1=1096438&r2=1096439&view=diff
==============================================================================
--- incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/EncodingConstants.java (original)
+++ incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/EncodingConstants.java Mon Apr 25 09:19:29 2011
@@ -17,14 +17,13 @@
  *  under the License.
  */
 
+package org.apache.isis.core.commons.encoding;
 
-package org.apache.isis.core.commons.encoding;
-
-public class EncodingConstants {
-
-	static final String ENCODED_NULL_ARRAY = "$$.$null-array$.$$";
-	static final String ENCODED_BOOLEAN_FALSE = "$$.$false$.$$";
-	static final String ENCODED_BOOLEAN_TRUE = "$$.$true$.$$";
-	static final String ENCODED_NULL_OBJECT = "$$.$null$.$$";
-
-}
+public class EncodingConstants {
+
+    static final String ENCODED_NULL_ARRAY = "$$.$null-array$.$$";
+    static final String ENCODED_BOOLEAN_FALSE = "$$.$false$.$$";
+    static final String ENCODED_BOOLEAN_TRUE = "$$.$true$.$$";
+    static final String ENCODED_NULL_OBJECT = "$$.$null$.$$";
+
+}

Modified: incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/FailedToDecodeException.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/FailedToDecodeException.java?rev=1096439&r1=1096438&r2=1096439&view=diff
==============================================================================
--- incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/FailedToDecodeException.java (original)
+++ incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/FailedToDecodeException.java Mon Apr 25 09:19:29 2011
@@ -17,27 +17,26 @@
  *  under the License.
  */
 
+/**
+ * 
+ */
+package org.apache.isis.core.commons.encoding;
 
-/**
- * 
- */
-package org.apache.isis.core.commons.encoding;
-
 import java.io.IOException;
-
-public class FailedToDecodeException extends IOException {
-
-	private static final long serialVersionUID = 1L;
-	
-	private Throwable cause;
-	
-	public FailedToDecodeException(Throwable cause) {
-		this.cause = cause;
-	}
-
-	@Override
-	public Throwable getCause() {
-		return cause;
-	}
-	
+
+public class FailedToDecodeException extends IOException {
+
+    private static final long serialVersionUID = 1L;
+
+    private final Throwable cause;
+
+    public FailedToDecodeException(final Throwable cause) {
+        this.cause = cause;
+    }
+
+    @Override
+    public Throwable getCause() {
+        return cause;
+    }
+
 }
\ No newline at end of file

Modified: incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/FailedToDeserializeException.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/FailedToDeserializeException.java?rev=1096439&r1=1096438&r2=1096439&view=diff
==============================================================================
--- incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/FailedToDeserializeException.java (original)
+++ incubator/isis/trunk/core/commons/src/main/java/org/apache/isis/core/commons/encoding/FailedToDeserializeException.java Mon Apr 25 09:19:29 2011
@@ -17,27 +17,26 @@
  *  under the License.
  */
 
+/**
+ * 
+ */
+package org.apache.isis.core.commons.encoding;
 
-/**
- * 
- */
-package org.apache.isis.core.commons.encoding;
-
 import java.io.IOException;
-
-public class FailedToDeserializeException extends IOException {
-
-	private static final long serialVersionUID = 1L;
-	
-	private Throwable cause;
-	
-	public FailedToDeserializeException(ClassNotFoundException cause) {
-		this.cause = cause;
-	}
-
-	@Override
-	public Throwable getCause() {
-		return cause;
-	}
-	
+
+public class FailedToDeserializeException extends IOException {
+
+    private static final long serialVersionUID = 1L;
+
+    private final Throwable cause;
+
+    public FailedToDeserializeException(final ClassNotFoundException cause) {
+        this.cause = cause;
+    }
+
+    @Override
+    public Throwable getCause() {
+        return cause;
+    }
+
 }
\ No newline at end of file