diff options
Diffstat (limited to 'cadi/core/src/test')
10 files changed, 23 insertions, 23 deletions
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/filter/test/JU_AUTHZServlet.java b/cadi/core/src/test/java/org/onap/aaf/cadi/filter/test/JU_AUTHZServlet.java index f57bb93e..22ce8abf 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/filter/test/JU_AUTHZServlet.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/filter/test/JU_AUTHZServlet.java @@ -99,7 +99,7 @@ public class JU_AUTHZServlet { field.setAccessible(true); field.set(target, value); field.setAccessible(false); - } catch(Exception e) { + } catch (Exception e) { System.err.println("Could not set field [" + fieldName + "] to " + value); } } diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_X509Principal.java b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_X509Principal.java index a8839f2c..ea45c128 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_X509Principal.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_X509Principal.java @@ -93,7 +93,7 @@ public class JU_X509Principal { try { x509 = new X509Principal(cert, cred, null); fail("Should have thrown an Exception"); - } catch(IOException e) { + } catch (IOException e) { assertThat(e.getMessage(), is("X509 does not have Identity as CN")); } @@ -102,7 +102,7 @@ public class JU_X509Principal { try { x509 = new X509Principal(cert, cred, null); fail("Should have thrown an Exception"); - } catch(IOException e) { + } catch (IOException e) { assertThat(e.getMessage(), is("X509 does not have Identity as CN")); } @@ -111,7 +111,7 @@ public class JU_X509Principal { try { x509 = new X509Principal(cert, cred, null); fail("Should have thrown an Exception"); - } catch(IOException e) { + } catch (IOException e) { assertThat(e.getMessage(), is("X509 does not have Identity as CN")); } diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/taf/dos/test/JU_DenialOfServiceTaf.java b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/dos/test/JU_DenialOfServiceTaf.java index d67acf3c..47d8f8d1 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/taf/dos/test/JU_DenialOfServiceTaf.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/dos/test/JU_DenialOfServiceTaf.java @@ -353,7 +353,7 @@ public class JU_DenialOfServiceTaf { field.setAccessible(true); field.set(null, value); field.setAccessible(false); - } catch(Exception e) { + } catch (Exception e) { System.err.println("Could not set field [" + fieldName + "] to " + value); } } diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_AES.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_AES.java index affaccc5..a3e0db0d 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_AES.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_AES.java @@ -60,7 +60,7 @@ public class JU_AES { byte[] keyBytes = new byte[AES.AES_KEY_SIZE/8]; char[] codeset = Symm.base64.codeset; int offset = (Math.abs(codeset[0]) + 47) % (codeset.length - keyBytes.length); - for(int i = 0; i < keyBytes.length; ++i) { + for (int i = 0; i < keyBytes.length; ++i) { keyBytes[i] = (byte)codeset[i+offset]; } aes = new AES(keyBytes, 0, keyBytes.length); diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_BufferedServletInputStream.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_BufferedServletInputStream.java index 78a6fa21..60999b69 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_BufferedServletInputStream.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_BufferedServletInputStream.java @@ -151,7 +151,7 @@ public class JU_BufferedServletInputStream { @Test public void ByteArrayReadStateIsReadTest() throws Exception { byte output[] = new byte[200]; - for(int i = 0; i < 2; ++i) { + for (int i = 0; i < 2; ++i) { bsis.mark(0); bsis.read(output, 0, 100); Assert.assertEquals(new String(output, 0, expected.length()), expected); @@ -160,7 +160,7 @@ public class JU_BufferedServletInputStream { bsis.read(output, 0, output.length); Assert.assertEquals(new String(output, 0, expected.length()), expected); bsis = new BufferedServletInputStream(new ByteArrayInputStream(output)); - if(i == 0) { + if (i == 0) { output = new byte[200]; } } @@ -286,7 +286,7 @@ public class JU_BufferedServletInputStream { byte aa[] = new byte[testString.length()]; // 65 count... important for our test (divisible by 5); int read; - for(int i=0;i<aa.length;i+=5) { + for (int i=0;i<aa.length;i+=5) { read = bsis.read(aa, i, 5); assertEquals(5,read); } @@ -296,7 +296,7 @@ public class JU_BufferedServletInputStream { byte bb[] = new byte[aa.length]; read = 0; - for(int i=0;read>=0;i+=read) { + for (int i=0;read>=0;i+=read) { read = bsis.read(bb,i,5); switch(i) { case 65: diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_Capacitor.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_Capacitor.java index 1bdbc571..4c842915 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_Capacitor.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_Capacitor.java @@ -58,13 +58,13 @@ public class JU_Capacitor { assertNull(curr_field.get(cap)); assertEquals(idx_field.get(cap), 0); - for(int iter = 0; iter < 20; ++iter) { - for(int i = 0; i < 20; ++i) { + for (int iter = 0; iter < 20; ++iter) { + for (int i = 0; i < 20; ++i) { cap.put((byte)('a' + i)); } cap.setForRead(); byte[] array = new byte[20]; - for(int i = 0; i < 20; ++i) { + for (int i = 0; i < 20; ++i) { array[i]=(byte)cap.read(); } assertEquals("abcdefghijklmnopqrst", new String(array)); @@ -73,12 +73,12 @@ public class JU_Capacitor { cap.done(); } - for(int i = 0; i < 500; i++) { + for (int i = 0; i < 500; i++) { cap.put((byte)'a'); } cap.setForRead(); byte[] array = new byte[500]; - for(int i = 0; i < 500; ++i) { + for (int i = 0; i < 500; ++i) { array[i]=(byte)cap.read(); } assertEquals((new String(array)).length(), 500); @@ -88,7 +88,7 @@ public class JU_Capacitor { @Test public void availableTest() { assertEquals(cap.available(), 0); - for(int i = 0; i < 100; ++i) { + for (int i = 0; i < 100; ++i) { cap.put((byte)'a'); } // The Capacitor can hold 256 bytes. After reading 100 bytes, @@ -114,12 +114,12 @@ public class JU_Capacitor { byte[] a = b.getBytes(); byte[] c = new byte[b.length()]; // we want to use this to test reading offsets, etc - for(int i = 0; i < a.length; i += 11) { + for (int i = 0; i < a.length; i += 11) { cap.put(a, i, Math.min(11, a.length-i)); } cap.reset(); int read; - for(int i = 0; i < c.length; i += read) { + for (int i = 0; i < c.length; i += read) { read = cap.read(c, i, Math.min(3, c.length-i)); } assertEquals(b, new String(c)); diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CmdLine.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CmdLine.java index cba4c46a..967bf221 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CmdLine.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CmdLine.java @@ -163,7 +163,7 @@ public class JU_CmdLine { String filePath = "test/output_key"; File testDir = new File("test"); - if(!testDir.exists()) { + if (!testDir.exists()) { testDir.mkdirs(); } CmdLine.main(new String[]{"keygen", filePath}); diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_PropAccess.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_PropAccess.java index 6f6f49e1..45f221c4 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_PropAccess.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_PropAccess.java @@ -115,7 +115,7 @@ public class JU_PropAccess { }); try { pa.log(new Exception("This exception was thrown intentionally, please ignore it")); - } catch(Exception e) { + } catch (Exception e) { fail("Should have thrown an exception"); } } diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_ServletContextAccess.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_ServletContextAccess.java index 15464bf1..7c67f8c9 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_ServletContextAccess.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_ServletContextAccess.java @@ -89,7 +89,7 @@ public class JU_ServletContextAccess { try { sca.log(new Exception("This exception was thrown intentionally, please ignore it")); - } catch(Exception e) { + } catch (Exception e) { fail("Should have thrown an exception"); } } diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/wsse/test/JU_WSSEParser.java b/cadi/core/src/test/java/org/onap/aaf/cadi/wsse/test/JU_WSSEParser.java index 5a1014bc..5f880403 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/wsse/test/JU_WSSEParser.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/wsse/test/JU_WSSEParser.java @@ -130,12 +130,12 @@ public class JU_WSSEParser { // is = new BufferedServletInputStream(fis); // is.mark(0); // try { -// while(is.read()>=0); +// while (is.read()>=0); // } finally { // fis.close(); // } // -// for(int i=0;i<iter;++i) { +// for (int i=0;i<iter;++i) { // start = System.nanoTime(); // is.reset(); // try { |