You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by br...@apache.org on 2016/06/18 11:04:24 UTC

svn commit: r1748963 - /commons/proper/bcel/trunk/src/test/java/org/apache/bcel/ElementValueGenTestCase.java

Author: britter
Date: Sat Jun 18 11:04:24 2016
New Revision: 1748963

URL: http://svn.apache.org/viewvc?rev=1748963&view=rev
Log:
Use spaces for indentation

Modified:
    commons/proper/bcel/trunk/src/test/java/org/apache/bcel/ElementValueGenTestCase.java

Modified: commons/proper/bcel/trunk/src/test/java/org/apache/bcel/ElementValueGenTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/ElementValueGenTestCase.java?rev=1748963&r1=1748962&r2=1748963&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/bcel/ElementValueGenTestCase.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/bcel/ElementValueGenTestCase.java Sat Jun 18 11:04:24 2016
@@ -210,23 +210,23 @@ public class ElementValueGenTestCase ext
     }
 
     private void checkSerialize(final ElementValueGen evgBefore, final ConstantPoolGen cpg) {
-		try {
-			String beforeValue = evgBefore.stringifyValue();
-			ByteArrayOutputStream baos = new ByteArrayOutputStream();
-			try (DataOutputStream dos = new DataOutputStream(baos)) {
-				evgBefore.dump(dos);
-				dos.flush();
-			}
-			ElementValueGen evgAfter;
-			try (DataInputStream dis = new DataInputStream(new ByteArrayInputStream(baos.toByteArray()))) {
-				evgAfter = ElementValueGen.readElementValue(dis, cpg);
-			}
-			String afterValue = evgAfter.stringifyValue();
-			if (!beforeValue.equals(afterValue)) {
-				fail("Deserialization failed: before='" + beforeValue + "' after='" + afterValue + "'");
-			}
-		} catch (IOException ioe) {
-			fail("Unexpected exception whilst checking serialization: " + ioe);
-		}
-	}
+        try {
+            String beforeValue = evgBefore.stringifyValue();
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            try (DataOutputStream dos = new DataOutputStream(baos)) {
+                evgBefore.dump(dos);
+                dos.flush();
+            }
+            ElementValueGen evgAfter;
+            try (DataInputStream dis = new DataInputStream(new ByteArrayInputStream(baos.toByteArray()))) {
+                evgAfter = ElementValueGen.readElementValue(dis, cpg);
+            }
+            String afterValue = evgAfter.stringifyValue();
+            if (!beforeValue.equals(afterValue)) {
+                fail("Deserialization failed: before='" + beforeValue + "' after='" + afterValue + "'");
+            }
+        } catch (IOException ioe) {
+            fail("Unexpected exception whilst checking serialization: " + ioe);
+        }
+    }
 }



Re: svn commit: r1748963 - /commons/proper/bcel/trunk/src/test/java/org/apache/bcel/ElementValueGenTestCase.java

Posted by Benedikt Ritter <br...@apache.org>.
No problem!

Gary Gregory <ga...@gmail.com> schrieb am Sa., 18. Juni 2016 um
18:06:

> I messed that up, sorry about that.
>
> Gary
> ---------- Forwarded message ----------
> From: <br...@apache.org>
> Date: Jun 18, 2016 4:04 AM
> Subject: svn commit: r1748963 -
>
> /commons/proper/bcel/trunk/src/test/java/org/apache/bcel/ElementValueGenTestCase.java
> To: <co...@commons.apache.org>
> Cc:
>
> Author: britter
> Date: Sat Jun 18 11:04:24 2016
> New Revision: 1748963
>
> URL: http://svn.apache.org/viewvc?rev=1748963&view=rev
> Log:
> Use spaces for indentation
>
> Modified:
>
>
> commons/proper/bcel/trunk/src/test/java/org/apache/bcel/ElementValueGenTestCase.java
>
> Modified:
>
> commons/proper/bcel/trunk/src/test/java/org/apache/bcel/ElementValueGenTestCase.java
> URL:
>
> http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/ElementValueGenTestCase.java?rev=1748963&r1=1748962&r2=1748963&view=diff
>
> ==============================================================================
> ---
>
> commons/proper/bcel/trunk/src/test/java/org/apache/bcel/ElementValueGenTestCase.java
> (original)
> +++
>
> commons/proper/bcel/trunk/src/test/java/org/apache/bcel/ElementValueGenTestCase.java
> Sat Jun 18 11:04:24 2016
> @@ -210,23 +210,23 @@ public class ElementValueGenTestCase ext
>      }
>
>      private void checkSerialize(final ElementValueGen evgBefore, final
> ConstantPoolGen cpg) {
> -               try {
> -                       String beforeValue = evgBefore.stringifyValue();
> -                       ByteArrayOutputStream baos = new
> ByteArrayOutputStream();
> -                       try (DataOutputStream dos = new
> DataOutputStream(baos)) {
> -                               evgBefore.dump(dos);
> -                               dos.flush();
> -                       }
> -                       ElementValueGen evgAfter;
> -                       try (DataInputStream dis = new DataInputStream(new
> ByteArrayInputStream(baos.toByteArray()))) {
> -                               evgAfter =
> ElementValueGen.readElementValue(dis, cpg);
> -                       }
> -                       String afterValue = evgAfter.stringifyValue();
> -                       if (!beforeValue.equals(afterValue)) {
> -                               fail("Deserialization failed: before='" +
> beforeValue + "' after='" + afterValue + "'");
> -                       }
> -               } catch (IOException ioe) {
> -                       fail("Unexpected exception whilst checking
> serialization: " + ioe);
> -               }
> -       }
> +        try {
> +            String beforeValue = evgBefore.stringifyValue();
> +            ByteArrayOutputStream baos = new ByteArrayOutputStream();
> +            try (DataOutputStream dos = new DataOutputStream(baos)) {
> +                evgBefore.dump(dos);
> +                dos.flush();
> +            }
> +            ElementValueGen evgAfter;
> +            try (DataInputStream dis = new DataInputStream(new
> ByteArrayInputStream(baos.toByteArray()))) {
> +                evgAfter = ElementValueGen.readElementValue(dis, cpg);
> +            }
> +            String afterValue = evgAfter.stringifyValue();
> +            if (!beforeValue.equals(afterValue)) {
> +                fail("Deserialization failed: before='" + beforeValue + "'
> after='" + afterValue + "'");
> +            }
> +        } catch (IOException ioe) {
> +            fail("Unexpected exception whilst checking serialization: " +
> ioe);
> +        }
> +    }
>  }
>

Fwd: svn commit: r1748963 - /commons/proper/bcel/trunk/src/test/java/org/apache/bcel/ElementValueGenTestCase.java

Posted by Gary Gregory <ga...@gmail.com>.
I messed that up, sorry about that.

Gary
---------- Forwarded message ----------
From: <br...@apache.org>
Date: Jun 18, 2016 4:04 AM
Subject: svn commit: r1748963 -
/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/ElementValueGenTestCase.java
To: <co...@commons.apache.org>
Cc:

Author: britter
Date: Sat Jun 18 11:04:24 2016
New Revision: 1748963

URL: http://svn.apache.org/viewvc?rev=1748963&view=rev
Log:
Use spaces for indentation

Modified:

commons/proper/bcel/trunk/src/test/java/org/apache/bcel/ElementValueGenTestCase.java

Modified:
commons/proper/bcel/trunk/src/test/java/org/apache/bcel/ElementValueGenTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/ElementValueGenTestCase.java?rev=1748963&r1=1748962&r2=1748963&view=diff
==============================================================================
---
commons/proper/bcel/trunk/src/test/java/org/apache/bcel/ElementValueGenTestCase.java
(original)
+++
commons/proper/bcel/trunk/src/test/java/org/apache/bcel/ElementValueGenTestCase.java
Sat Jun 18 11:04:24 2016
@@ -210,23 +210,23 @@ public class ElementValueGenTestCase ext
     }

     private void checkSerialize(final ElementValueGen evgBefore, final
ConstantPoolGen cpg) {
-               try {
-                       String beforeValue = evgBefore.stringifyValue();
-                       ByteArrayOutputStream baos = new
ByteArrayOutputStream();
-                       try (DataOutputStream dos = new
DataOutputStream(baos)) {
-                               evgBefore.dump(dos);
-                               dos.flush();
-                       }
-                       ElementValueGen evgAfter;
-                       try (DataInputStream dis = new DataInputStream(new
ByteArrayInputStream(baos.toByteArray()))) {
-                               evgAfter =
ElementValueGen.readElementValue(dis, cpg);
-                       }
-                       String afterValue = evgAfter.stringifyValue();
-                       if (!beforeValue.equals(afterValue)) {
-                               fail("Deserialization failed: before='" +
beforeValue + "' after='" + afterValue + "'");
-                       }
-               } catch (IOException ioe) {
-                       fail("Unexpected exception whilst checking
serialization: " + ioe);
-               }
-       }
+        try {
+            String beforeValue = evgBefore.stringifyValue();
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            try (DataOutputStream dos = new DataOutputStream(baos)) {
+                evgBefore.dump(dos);
+                dos.flush();
+            }
+            ElementValueGen evgAfter;
+            try (DataInputStream dis = new DataInputStream(new
ByteArrayInputStream(baos.toByteArray()))) {
+                evgAfter = ElementValueGen.readElementValue(dis, cpg);
+            }
+            String afterValue = evgAfter.stringifyValue();
+            if (!beforeValue.equals(afterValue)) {
+                fail("Deserialization failed: before='" + beforeValue + "'
after='" + afterValue + "'");
+            }
+        } catch (IOException ioe) {
+            fail("Unexpected exception whilst checking serialization: " +
ioe);
+        }
+    }
 }