target stringlengths 20 113k | src_fm stringlengths 11 86.3k | src_fm_fc stringlengths 21 86.4k | src_fm_fc_co stringlengths 30 86.4k | src_fm_fc_ms stringlengths 42 86.8k | src_fm_fc_ms_ff stringlengths 43 86.8k |
|---|---|---|---|---|---|
@Test public void testIsAlphaNumericThrowsStringIndexOutOfBoundsException1() throws Throwable { try { ISOUtil.isAlphaNumeric(""); fail("Expected StringIndexOutOfBoundsException to be thrown"); } catch (StringIndexOutOfBoundsException ex) { assertEquals("String index out of range: 0", ex.getMessage(), "ex.getMessage()")... | public static boolean isAlphaNumeric ( String s ) { int i = 0, len = s.length(); while ( i < len && ( Character.isLetterOrDigit( s.charAt( i ) ) || s.charAt( i ) == ' ' || s.charAt( i ) == '.' || s.charAt( i ) == '-' || s.charAt( i ) == '_' ) || s.charAt(i) == '?' ){ i++; } return i >= len; } | ISOUtil { public static boolean isAlphaNumeric ( String s ) { int i = 0, len = s.length(); while ( i < len && ( Character.isLetterOrDigit( s.charAt( i ) ) || s.charAt( i ) == ' ' || s.charAt( i ) == '.' || s.charAt( i ) == '-' || s.charAt( i ) == '_' ) || s.charAt(i) == '?' ){ i++; } return i >= len; } } | ISOUtil { public static boolean isAlphaNumeric ( String s ) { int i = 0, len = s.length(); while ( i < len && ( Character.isLetterOrDigit( s.charAt( i ) ) || s.charAt( i ) == ' ' || s.charAt( i ) == '.' || s.charAt( i ) == '-' || s.charAt( i ) == '_' ) || s.charAt(i) == '?' ){ i++; } return i >= len; } ISOUtil(); } | ISOUtil { public static boolean isAlphaNumeric ( String s ) { int i = 0, len = s.length(); while ( i < len && ( Character.isLetterOrDigit( s.charAt( i ) ) || s.charAt( i ) == ' ' || s.charAt( i ) == '.' || s.charAt( i ) == '-' || s.charAt( i ) == '_' ) || s.charAt(i) == '?' ){ i++; } return i >= len; } ISOUtil(); stati... | ISOUtil { public static boolean isAlphaNumeric ( String s ) { int i = 0, len = s.length(); while ( i < len && ( Character.isLetterOrDigit( s.charAt( i ) ) || s.charAt( i ) == ' ' || s.charAt( i ) == '.' || s.charAt( i ) == '-' || s.charAt( i ) == '_' ) || s.charAt(i) == '?' ){ i++; } return i >= len; } ISOUtil(); stati... |
@Test public void testIsAlphaNumericThrowsStringIndexOutOfBoundsException2() throws Throwable { try { ISOUtil.isAlphaNumeric("testISOUtils"); fail("Expected StringIndexOutOfBoundsException to be thrown"); } catch (StringIndexOutOfBoundsException ex) { assertEquals("String index out of range: 12", ex.getMessage(), "ex.g... | public static boolean isAlphaNumeric ( String s ) { int i = 0, len = s.length(); while ( i < len && ( Character.isLetterOrDigit( s.charAt( i ) ) || s.charAt( i ) == ' ' || s.charAt( i ) == '.' || s.charAt( i ) == '-' || s.charAt( i ) == '_' ) || s.charAt(i) == '?' ){ i++; } return i >= len; } | ISOUtil { public static boolean isAlphaNumeric ( String s ) { int i = 0, len = s.length(); while ( i < len && ( Character.isLetterOrDigit( s.charAt( i ) ) || s.charAt( i ) == ' ' || s.charAt( i ) == '.' || s.charAt( i ) == '-' || s.charAt( i ) == '_' ) || s.charAt(i) == '?' ){ i++; } return i >= len; } } | ISOUtil { public static boolean isAlphaNumeric ( String s ) { int i = 0, len = s.length(); while ( i < len && ( Character.isLetterOrDigit( s.charAt( i ) ) || s.charAt( i ) == ' ' || s.charAt( i ) == '.' || s.charAt( i ) == '-' || s.charAt( i ) == '_' ) || s.charAt(i) == '?' ){ i++; } return i >= len; } ISOUtil(); } | ISOUtil { public static boolean isAlphaNumeric ( String s ) { int i = 0, len = s.length(); while ( i < len && ( Character.isLetterOrDigit( s.charAt( i ) ) || s.charAt( i ) == ' ' || s.charAt( i ) == '.' || s.charAt( i ) == '-' || s.charAt( i ) == '_' ) || s.charAt(i) == '?' ){ i++; } return i >= len; } ISOUtil(); stati... | ISOUtil { public static boolean isAlphaNumeric ( String s ) { int i = 0, len = s.length(); while ( i < len && ( Character.isLetterOrDigit( s.charAt( i ) ) || s.charAt( i ) == ' ' || s.charAt( i ) == '.' || s.charAt( i ) == '-' || s.charAt( i ) == '_' ) || s.charAt(i) == '?' ){ i++; } return i >= len; } ISOUtil(); stati... |
@Test public void testIsBlank() throws Throwable { boolean result = ISOUtil.isBlank(""); assertTrue(result, "result"); } | public static boolean isBlank( String s ){ return s.trim().length() == 0; } | ISOUtil { public static boolean isBlank( String s ){ return s.trim().length() == 0; } } | ISOUtil { public static boolean isBlank( String s ){ return s.trim().length() == 0; } ISOUtil(); } | ISOUtil { public static boolean isBlank( String s ){ return s.trim().length() == 0; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[] ebcdicToAsciiBytes(byte[] e); static byte[] ebcdicToAsciiBytes(byte[] e, int offset, int len); static byte[] a... | ISOUtil { public static boolean isBlank( String s ){ return s.trim().length() == 0; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[] ebcdicToAsciiBytes(byte[] e); static byte[] ebcdicToAsciiBytes(byte[] e, int offset, int len); static byte[] a... |
@Test public void testIsBlank1() throws Throwable { boolean result = ISOUtil.isBlank("1"); assertFalse(result, "result"); } | public static boolean isBlank( String s ){ return s.trim().length() == 0; } | ISOUtil { public static boolean isBlank( String s ){ return s.trim().length() == 0; } } | ISOUtil { public static boolean isBlank( String s ){ return s.trim().length() == 0; } ISOUtil(); } | ISOUtil { public static boolean isBlank( String s ){ return s.trim().length() == 0; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[] ebcdicToAsciiBytes(byte[] e); static byte[] ebcdicToAsciiBytes(byte[] e, int offset, int len); static byte[] a... | ISOUtil { public static boolean isBlank( String s ){ return s.trim().length() == 0; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[] ebcdicToAsciiBytes(byte[] e); static byte[] ebcdicToAsciiBytes(byte[] e, int offset, int len); static byte[] a... |
@Test public void testIsBlankThrowsNullPointerException() throws Throwable { assertThrows(NullPointerException.class, () -> { ISOUtil.isBlank(null); }); } | public static boolean isBlank( String s ){ return s.trim().length() == 0; } | ISOUtil { public static boolean isBlank( String s ){ return s.trim().length() == 0; } } | ISOUtil { public static boolean isBlank( String s ){ return s.trim().length() == 0; } ISOUtil(); } | ISOUtil { public static boolean isBlank( String s ){ return s.trim().length() == 0; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[] ebcdicToAsciiBytes(byte[] e); static byte[] ebcdicToAsciiBytes(byte[] e, int offset, int len); static byte[] a... | ISOUtil { public static boolean isBlank( String s ){ return s.trim().length() == 0; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[] ebcdicToAsciiBytes(byte[] e); static byte[] ebcdicToAsciiBytes(byte[] e, int offset, int len); static byte[] a... |
@Test public void testIsNumeric() throws Throwable { boolean result = ISOUtil.isNumeric("10Characte", 32); assertTrue(result, "result"); } | public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } | ISOUtil { public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } } | ISOUtil { public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } ISOUtil(); } | ISOUtil { public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[]... | ISOUtil { public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[]... |
@Test public void testRunThrowsNumberFormatException() throws Throwable { Configuration cfg = new SimpleConfiguration(); DailyTaskAdaptor dailyTaskAdaptor = new DailyTaskAdaptor(); dailyTaskAdaptor.setState(2); dailyTaskAdaptor.setConfiguration(cfg); try { dailyTaskAdaptor.run(); fail("Expected NumberFormatException to... | public void run () { while (running()) { waitUntilStartTime(); if (running()) { Thread taskThread = new Thread(task); taskThread.setDaemon (true); taskThread.start(); ISOUtil.sleep (1000); } } } | DailyTaskAdaptor extends QBeanSupport implements Runnable { public void run () { while (running()) { waitUntilStartTime(); if (running()) { Thread taskThread = new Thread(task); taskThread.setDaemon (true); taskThread.start(); ISOUtil.sleep (1000); } } } } | DailyTaskAdaptor extends QBeanSupport implements Runnable { public void run () { while (running()) { waitUntilStartTime(); if (running()) { Thread taskThread = new Thread(task); taskThread.setDaemon (true); taskThread.start(); ISOUtil.sleep (1000); } } } DailyTaskAdaptor(); } | DailyTaskAdaptor extends QBeanSupport implements Runnable { public void run () { while (running()) { waitUntilStartTime(); if (running()) { Thread taskThread = new Thread(task); taskThread.setDaemon (true); taskThread.start(); ISOUtil.sleep (1000); } } } DailyTaskAdaptor(); void run(); Date getWhen(); } | DailyTaskAdaptor extends QBeanSupport implements Runnable { public void run () { while (running()) { waitUntilStartTime(); if (running()) { Thread taskThread = new Thread(task); taskThread.setDaemon (true); taskThread.start(); ISOUtil.sleep (1000); } } } DailyTaskAdaptor(); void run(); Date getWhen(); } |
@Test public void testIsNumeric1() throws Throwable { boolean result = ISOUtil.isNumeric("testISOUtils", 100); assertFalse(result, "result"); } | public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } | ISOUtil { public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } } | ISOUtil { public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } ISOUtil(); } | ISOUtil { public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[]... | ISOUtil { public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[]... |
@Test public void testIsNumeric2() throws Throwable { boolean result = ISOUtil.isNumeric("testISOUtil\rs", 32); assertFalse(result, "result"); } | public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } | ISOUtil { public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } } | ISOUtil { public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } ISOUtil(); } | ISOUtil { public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[]... | ISOUtil { public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[]... |
@Test public void testIsNumeric3() throws Throwable { boolean result = ISOUtil.isNumeric("", 100); assertFalse(result, "result"); } | public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } | ISOUtil { public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } } | ISOUtil { public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } ISOUtil(); } | ISOUtil { public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[]... | ISOUtil { public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[]... |
@Test public void testIsNumericThrowsNullPointerException() throws Throwable { assertThrows(NullPointerException.class, () -> { ISOUtil.isNumeric(null, 100); }); } | public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } | ISOUtil { public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } } | ISOUtil { public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } ISOUtil(); } | ISOUtil { public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[]... | ISOUtil { public static boolean isNumeric ( String s, int radix ) { int i = 0, len = s.length(); while ( i < len && Character.digit(s.charAt(i), radix) > -1 ){ i++; } return i >= len && len > 0; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[]... |
@Test public void testIsZero() throws Throwable { boolean result = ISOUtil.isZero("0 q"); assertFalse(result, "result"); } | public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } | ISOUtil { public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } } | ISOUtil { public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } ISOUtil(); } | ISOUtil { public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[] ebcdicToAsciiBytes(byte[] e); static byte[] eb... | ISOUtil { public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[] ebcdicToAsciiBytes(byte[] e); static byte[] eb... |
@Test public void testIsZero1() throws Throwable { boolean result = ISOUtil.isZero("000"); assertTrue(result, "result"); } | public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } | ISOUtil { public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } } | ISOUtil { public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } ISOUtil(); } | ISOUtil { public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[] ebcdicToAsciiBytes(byte[] e); static byte[] eb... | ISOUtil { public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[] ebcdicToAsciiBytes(byte[] e); static byte[] eb... |
@Test public void testIsZero2() throws Throwable { boolean result = ISOUtil.isZero("testISOUtils"); assertFalse(result, "result"); } | public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } | ISOUtil { public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } } | ISOUtil { public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } ISOUtil(); } | ISOUtil { public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[] ebcdicToAsciiBytes(byte[] e); static byte[] eb... | ISOUtil { public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[] ebcdicToAsciiBytes(byte[] e); static byte[] eb... |
@Test public void testIsZero3() throws Throwable { boolean result = ISOUtil.isZero(""); assertTrue(result, "result"); } | public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } | ISOUtil { public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } } | ISOUtil { public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } ISOUtil(); } | ISOUtil { public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[] ebcdicToAsciiBytes(byte[] e); static byte[] eb... | ISOUtil { public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[] ebcdicToAsciiBytes(byte[] e); static byte[] eb... |
@Test public void testIsZeroThrowsNullPointerException() throws Throwable { assertThrows(NullPointerException.class, () -> { ISOUtil.isZero(null); }); } | public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } | ISOUtil { public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } } | ISOUtil { public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } ISOUtil(); } | ISOUtil { public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[] ebcdicToAsciiBytes(byte[] e); static byte[] eb... | ISOUtil { public static boolean isZero( String s ) { int i = 0, len = s.length(); while ( i < len && s.charAt( i ) == '0'){ i++; } return i >= len; } ISOUtil(); static String ebcdicToAscii(byte[] e); static String ebcdicToAscii(byte[] e, int offset, int len); static byte[] ebcdicToAsciiBytes(byte[] e); static byte[] eb... |
@Test public void testNormalize() throws Throwable { String result = ISOUtil .normalize( "S\u0002\"m\u0011Ap}q\\!\u0005\u0010$:\"X\u0008FM\u00028\u000E&CZ#\"\"]'\u0008k\"\u000B$jT>L\u0017-<3z\u0000%E<\u0011\"j\u001F\u0014\u001C\fR\u00138\r\">\u0016<T7l\u0002]oM|w\"$4*ks{~Cqqx7fW^^zi}gV;cY<A=ylA%DR-9", true); assertEqua... | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testStartService() throws Throwable { DailyTaskAdaptor dailyTaskAdaptor = new DailyTaskAdaptor(); dailyTaskAdaptor.startService(); assertTrue(true, "Test completed without Exception"); } | protected void startService () throws Exception { if (task instanceof Configurable) { Element e = getPersist (); QFactory factory = getServer().getFactory(); ((Configurable)task).setConfiguration ( factory.getConfiguration (e) ); } (thisThread = new Thread(this)).start(); } | DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void startService () throws Exception { if (task instanceof Configurable) { Element e = getPersist (); QFactory factory = getServer().getFactory(); ((Configurable)task).setConfiguration ( factory.getConfiguration (e) ); } (thisThread = new Thread(thi... | DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void startService () throws Exception { if (task instanceof Configurable) { Element e = getPersist (); QFactory factory = getServer().getFactory(); ((Configurable)task).setConfiguration ( factory.getConfiguration (e) ); } (thisThread = new Thread(thi... | DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void startService () throws Exception { if (task instanceof Configurable) { Element e = getPersist (); QFactory factory = getServer().getFactory(); ((Configurable)task).setConfiguration ( factory.getConfiguration (e) ); } (thisThread = new Thread(thi... | DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void startService () throws Exception { if (task instanceof Configurable) { Element e = getPersist (); QFactory factory = getServer().getFactory(); ((Configurable)task).setConfiguration ( factory.getConfiguration (e) ); } (thisThread = new Thread(thi... |
@Test public void testNormalize1() throws Throwable { String result = ISOUtil.normalize("testISOUtil\rs", true); assertEquals("testISOUtil\\u000ds", result, "result"); } | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testNormalize10() throws Throwable { String result = ISOUtil.normalize(null, true); assertEquals("", result, "result"); } | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testNormalize11() throws Throwable { String result = ISOUtil.normalize("", true); assertEquals("", result, "result"); } | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testNormalize12() throws Throwable { String result = ISOUtil.normalize("\u5BC7<t2e76HTO- 63;TwFix", true); assertEquals("\u5BC7<t2e76HTO- 63;TwFix", result, "result"); } | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testNormalize13() throws Throwable { String result = ISOUtil.normalize("\u0014", true); assertEquals("\\u0014", result, "result"); } | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testNormalize14() throws Throwable { String result = ISOUtil.normalize("\u7D79\u0001#h<Fuo|s)C<D&\\J:'{ul'p\\Nz@^dt`.", true); assertEquals("\u7D79\\u0001#h<Fuo|s)C<D&\\J:'{ul'p\\Nz@^dt`.", result, "result"); } | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testNormalize15() throws Throwable { String result = ISOUtil.normalize(""", true); assertEquals("&quot;", result, "result"); } | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testNormalize16() throws Throwable { String result = ISOUtil.normalize(" "); assertEquals(" ", result, "result"); } | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testNormalize17() throws Throwable { String result = ISOUtil.normalize("testISOUtil\rs"); assertEquals("testISOUtil\\u000ds", result, "result"); } | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testNormalize18() throws Throwable { String result = ISOUtil.normalize("\rI\u0004\"e", true); assertEquals("\\u000dI\\u0004"e", result, "result"); } | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testStopService() throws Throwable { DailyTaskAdaptor dailyTaskAdaptor = new DailyTaskAdaptor(); dailyTaskAdaptor.startService(); dailyTaskAdaptor.stopService(); assertTrue(true, "Test completed without Exception"); } | protected void stopService () throws Exception { if (thisThread != null) thisThread.interrupt(); } | DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void stopService () throws Exception { if (thisThread != null) thisThread.interrupt(); } } | DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void stopService () throws Exception { if (thisThread != null) thisThread.interrupt(); } DailyTaskAdaptor(); } | DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void stopService () throws Exception { if (thisThread != null) thisThread.interrupt(); } DailyTaskAdaptor(); void run(); Date getWhen(); } | DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void stopService () throws Exception { if (thisThread != null) thisThread.interrupt(); } DailyTaskAdaptor(); void run(); Date getWhen(); } |
@Test public void testNormalize19() throws Throwable { String result = ISOUtil .normalize( "\u0014iSa4\r@\u0005/\u001Ai>iK>&%EA]\u001E\u001D:B\u000F-\u0016\u0012K=9\u001D\u0019t:&.2\"F<}Nf\u0011\u0003\u0008,\u0015=\u001D\n?\u0012\u000Eo<E\u001F\u0007\u001AC\u001C3\u0012d7:rf^l,`", false); assertEquals( "\\u0014iSa4
... | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testNormalize2() throws Throwable { String result = ISOUtil.normalize(" ", true); assertEquals(" ", result, "result"); } | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testNormalize20() throws Throwable { String result = ISOUtil.normalize("\rX XX", false); assertEquals(" X XX", result, "result"); } | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testNormalize21() throws Throwable { String result = ISOUtil .normalize( "\u0004r2\u0013&mX&\u0014\u0017hT\u000E}Y!{\u0004&\u0016\u000Fb\"D\u001B\u0014Qz\u001E-&fe<\u0012]<.5\\\u0001\u0000\u001D%v\u001FraS\"mMlc\u0014\u001F\u0008Q\"\u0019&\u000E\\\u0004\u000F\t\u000F&:\u4BF6", true); assertEquals( "\\... | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testNormalize22() throws Throwable { String result = ISOUtil .normalize( "@|k7\u0014[\"7w\u0002'>\u0005\u001D[\u001D\fu0,\"9'K\u0007u\u0017[@\">V><uNo>\u001Eyj8>, pS5V&</sCZ \u0008dBz\"M\"%Wv)lQ)<u7>c]VKWRExFkiXlc1#'>?QU |d45\\eZR", true); assertEquals( "@|k7\\u0014["7w\\u0002'>\\u0005\\u... | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testNormalize23() throws Throwable { String result = ISOUtil.normalize(">&Y/G%za1ZHz$O^bPBeB nUlTf{n9,", true); assertEquals(">&Y/G%za1ZHz$O^bPBeB nUlTf{n9,", result, "result"); } | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testNormalize24() throws Throwable { String result = ISOUtil .normalize( "iC\u0012Vi<\t< A\\`>|&\rw\u0018l\u0000d\u000F_`>\\ N8\u0016%Up\rf\u0005\u0019G>%>1Wnx;Ul0Rz}%[wn\u000E\u001C*\t>DJ,<\uDB18\uCA4B\u8FF8\u340F\u4F1F", false); assertEquals( "iC\\u0012Vi<\\u0009< A\\`>|& w\\u0018l\... | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testNormalize3() throws Throwable { String result = ISOUtil.normalize("#g];unko,nsk 3<yhj>\\-)fw47&3,@p~rh[2cGi[", true); assertEquals("#g];unko,nsk 3<yhj>\\-)fw47&3,@p~rh[2cGi[", result, "result"); } | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testNormalize4() throws Throwable { String result = ISOUtil.normalize(" XX XXXX XX XXXX X XXX XX XXXXX XXXXX XX XXXXXXXX XX X X \t XXX", true); assertEquals(" XX XXXX XX XXXX X XXX XX XXXXX XXXXX XX XXXXXXXX XX X X \\u0009 XXX", result, "result"); } | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testNormalize5() throws Throwable { String result = ISOUtil .normalize( "iC\u0012Vi<\t< A\\`>|&\rw\u0018l\u0000d\u000F_`>\\ N8\u0016%Up\rf\u0005\u0019G>%>1Wnx;Ul0Rz}%[wn\u000E\u001C*\t>DJ,<\uDB18\uCA4B\u8FF8\u340F\u4F1F", true); assertEquals( "iC\\u0012Vi<\\u0009< A\\`>|&\\u000dw\\u0018l\... | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testStopService1() throws Throwable { DailyTaskAdaptor dailyTaskAdaptor = new DailyTaskAdaptor(); dailyTaskAdaptor.stopService(); assertNull(dailyTaskAdaptor.thisThread, "dailyTaskAdaptor.thisThread"); } | protected void stopService () throws Exception { if (thisThread != null) thisThread.interrupt(); } | DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void stopService () throws Exception { if (thisThread != null) thisThread.interrupt(); } } | DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void stopService () throws Exception { if (thisThread != null) thisThread.interrupt(); } DailyTaskAdaptor(); } | DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void stopService () throws Exception { if (thisThread != null) thisThread.interrupt(); } DailyTaskAdaptor(); void run(); Date getWhen(); } | DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void stopService () throws Exception { if (thisThread != null) thisThread.interrupt(); } DailyTaskAdaptor(); void run(); Date getWhen(); } |
@Test public void testNormalize6() throws Throwable { String result = ISOUtil.normalize("\rI\u0004\"e", false); assertEquals(" I\\u0004"e", result, "result"); } | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testNormalize7() throws Throwable { String result = ISOUtil.normalize("J\u0006YTuVP>F}R+Js:(aD", true); assertEquals("J\\u0006YTuVP>F}R+Js:(aD", result, "result"); } | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testNormalize8() throws Throwable { String result = ISOUtil.normalize(">=\u0011[\u0011_f\u0019<&[", true); assertEquals(">=\\u0011[\\u0011_f\\u0019<&[", result, "result"); } | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testNormalize9() throws Throwable { String s = "<\u0010}\"\uCD88\uD16A\u1384\uFE1A\u44B2\u2712\u3BD7\u3AE5\uFCC4\uD19B\u16F2\uD45A\u45F8\u65FF\uA224\u3930\u946E\u8FB0\u3550\u061D\u4741\u8084\u8606\u6B1A\u8F81\uC634\u0190\u2053\uFA5A\u4C3F\uD365\uF7A7\uF8D4"; String result = ISOUtil.normalize(s, true);... | public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&"); brea... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... | ISOUtil { public static String normalize (String s, boolean canonical) { StringBuilder str = new StringBuilder(); int len = s != null ? s.length() : 0; for (int i = 0; i < len; i++) { char ch = s.charAt(i); switch (ch) { case '<': str.append("<"); break; case '>': str.append(">"); break; case '&': str.append("&am... |
@Test public void testPadleft() throws Throwable { String result = ISOUtil.padleft("testString", 11, '2'); assertEquals("2testString", result, "result"); } | public static String padleft(String s, int len, char c) throws ISOException { s = s.trim(); if (s.length() > len) throw new ISOException("invalid len " +s.length() + "/" +len); StringBuilder d = new StringBuilder (len); int fill = len - s.length(); while (fill-- > 0) d.append (c); d.append(s); return d.toString(); } | ISOUtil { public static String padleft(String s, int len, char c) throws ISOException { s = s.trim(); if (s.length() > len) throw new ISOException("invalid len " +s.length() + "/" +len); StringBuilder d = new StringBuilder (len); int fill = len - s.length(); while (fill-- > 0) d.append (c); d.append(s); return d.toStri... | ISOUtil { public static String padleft(String s, int len, char c) throws ISOException { s = s.trim(); if (s.length() > len) throw new ISOException("invalid len " +s.length() + "/" +len); StringBuilder d = new StringBuilder (len); int fill = len - s.length(); while (fill-- > 0) d.append (c); d.append(s); return d.toStri... | ISOUtil { public static String padleft(String s, int len, char c) throws ISOException { s = s.trim(); if (s.length() > len) throw new ISOException("invalid len " +s.length() + "/" +len); StringBuilder d = new StringBuilder (len); int fill = len - s.length(); while (fill-- > 0) d.append (c); d.append(s); return d.toStri... | ISOUtil { public static String padleft(String s, int len, char c) throws ISOException { s = s.trim(); if (s.length() > len) throw new ISOException("invalid len " +s.length() + "/" +len); StringBuilder d = new StringBuilder (len); int fill = len - s.length(); while (fill-- > 0) d.append (c); d.append(s); return d.toStri... |
@Test public void testPadleft1() throws Throwable { String result = ISOUtil.padleft("2C", 2, ' '); assertEquals("2C", result, "result"); } | public static String padleft(String s, int len, char c) throws ISOException { s = s.trim(); if (s.length() > len) throw new ISOException("invalid len " +s.length() + "/" +len); StringBuilder d = new StringBuilder (len); int fill = len - s.length(); while (fill-- > 0) d.append (c); d.append(s); return d.toString(); } | ISOUtil { public static String padleft(String s, int len, char c) throws ISOException { s = s.trim(); if (s.length() > len) throw new ISOException("invalid len " +s.length() + "/" +len); StringBuilder d = new StringBuilder (len); int fill = len - s.length(); while (fill-- > 0) d.append (c); d.append(s); return d.toStri... | ISOUtil { public static String padleft(String s, int len, char c) throws ISOException { s = s.trim(); if (s.length() > len) throw new ISOException("invalid len " +s.length() + "/" +len); StringBuilder d = new StringBuilder (len); int fill = len - s.length(); while (fill-- > 0) d.append (c); d.append(s); return d.toStri... | ISOUtil { public static String padleft(String s, int len, char c) throws ISOException { s = s.trim(); if (s.length() > len) throw new ISOException("invalid len " +s.length() + "/" +len); StringBuilder d = new StringBuilder (len); int fill = len - s.length(); while (fill-- > 0) d.append (c); d.append(s); return d.toStri... | ISOUtil { public static String padleft(String s, int len, char c) throws ISOException { s = s.trim(); if (s.length() > len) throw new ISOException("invalid len " +s.length() + "/" +len); StringBuilder d = new StringBuilder (len); int fill = len - s.length(); while (fill-- > 0) d.append (c); d.append(s); return d.toStri... |
@Test public void testPadleftThrowsISOException() throws Throwable { try { ISOUtil.padleft("testString", 0, '\u0002'); fail("Expected ISOException to be thrown"); } catch (ISOException ex) { assertEquals("invalid len 10/0", ex.getMessage(), "ex.getMessage()"); assertNull(ex.nested, "ex.nested"); } } | public static String padleft(String s, int len, char c) throws ISOException { s = s.trim(); if (s.length() > len) throw new ISOException("invalid len " +s.length() + "/" +len); StringBuilder d = new StringBuilder (len); int fill = len - s.length(); while (fill-- > 0) d.append (c); d.append(s); return d.toString(); } | ISOUtil { public static String padleft(String s, int len, char c) throws ISOException { s = s.trim(); if (s.length() > len) throw new ISOException("invalid len " +s.length() + "/" +len); StringBuilder d = new StringBuilder (len); int fill = len - s.length(); while (fill-- > 0) d.append (c); d.append(s); return d.toStri... | ISOUtil { public static String padleft(String s, int len, char c) throws ISOException { s = s.trim(); if (s.length() > len) throw new ISOException("invalid len " +s.length() + "/" +len); StringBuilder d = new StringBuilder (len); int fill = len - s.length(); while (fill-- > 0) d.append (c); d.append(s); return d.toStri... | ISOUtil { public static String padleft(String s, int len, char c) throws ISOException { s = s.trim(); if (s.length() > len) throw new ISOException("invalid len " +s.length() + "/" +len); StringBuilder d = new StringBuilder (len); int fill = len - s.length(); while (fill-- > 0) d.append (c); d.append(s); return d.toStri... | ISOUtil { public static String padleft(String s, int len, char c) throws ISOException { s = s.trim(); if (s.length() > len) throw new ISOException("invalid len " +s.length() + "/" +len); StringBuilder d = new StringBuilder (len); int fill = len - s.length(); while (fill-- > 0) d.append (c); d.append(s); return d.toStri... |
@Test public void testPadleftThrowsNullPointerException() throws Throwable { assertThrows(NullPointerException.class, () -> { ISOUtil.padleft(null, 0, '\u0002'); }); } | public static String padleft(String s, int len, char c) throws ISOException { s = s.trim(); if (s.length() > len) throw new ISOException("invalid len " +s.length() + "/" +len); StringBuilder d = new StringBuilder (len); int fill = len - s.length(); while (fill-- > 0) d.append (c); d.append(s); return d.toString(); } | ISOUtil { public static String padleft(String s, int len, char c) throws ISOException { s = s.trim(); if (s.length() > len) throw new ISOException("invalid len " +s.length() + "/" +len); StringBuilder d = new StringBuilder (len); int fill = len - s.length(); while (fill-- > 0) d.append (c); d.append(s); return d.toStri... | ISOUtil { public static String padleft(String s, int len, char c) throws ISOException { s = s.trim(); if (s.length() > len) throw new ISOException("invalid len " +s.length() + "/" +len); StringBuilder d = new StringBuilder (len); int fill = len - s.length(); while (fill-- > 0) d.append (c); d.append(s); return d.toStri... | ISOUtil { public static String padleft(String s, int len, char c) throws ISOException { s = s.trim(); if (s.length() > len) throw new ISOException("invalid len " +s.length() + "/" +len); StringBuilder d = new StringBuilder (len); int fill = len - s.length(); while (fill-- > 0) d.append (c); d.append(s); return d.toStri... | ISOUtil { public static String padleft(String s, int len, char c) throws ISOException { s = s.trim(); if (s.length() > len) throw new ISOException("invalid len " +s.length() + "/" +len); StringBuilder d = new StringBuilder (len); int fill = len - s.length(); while (fill-- > 0) d.append (c); d.append(s); return d.toStri... |
@Test public void testParseInt() throws Throwable { char[] cArray = new char[2]; cArray[0] = 'S'; cArray[1] = 'C'; int result = ISOUtil.parseInt(cArray, 35); assertEquals(992, result, "result"); } | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseInt1() throws Throwable { char[] cArray = new char[1]; cArray[0] = '1'; int result = ISOUtil.parseInt(cArray); assertEquals(1, result, "result"); } | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testWaitUntilStartTimeThrowsNullPointerException() throws Throwable { DailyTaskAdaptor dailyTaskAdaptor = new DailyTaskAdaptor(); try { dailyTaskAdaptor.waitUntilStartTime(); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { ass... | protected void waitUntilStartTime() { Date when = getWhen(); while (running()) { Date now = new GregorianCalendar().getTime(); if (now.before (when)) { long sleepTime = when.getTime() - now.getTime(); if (sleepTime <= 0) { ISOUtil.sleep(1000); continue; } getLog().info ("sleeping", sleepTime/1000 + " secs until " + whe... | DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void waitUntilStartTime() { Date when = getWhen(); while (running()) { Date now = new GregorianCalendar().getTime(); if (now.before (when)) { long sleepTime = when.getTime() - now.getTime(); if (sleepTime <= 0) { ISOUtil.sleep(1000); continue; } getL... | DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void waitUntilStartTime() { Date when = getWhen(); while (running()) { Date now = new GregorianCalendar().getTime(); if (now.before (when)) { long sleepTime = when.getTime() - now.getTime(); if (sleepTime <= 0) { ISOUtil.sleep(1000); continue; } getL... | DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void waitUntilStartTime() { Date when = getWhen(); while (running()) { Date now = new GregorianCalendar().getTime(); if (now.before (when)) { long sleepTime = when.getTime() - now.getTime(); if (sleepTime <= 0) { ISOUtil.sleep(1000); continue; } getL... | DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void waitUntilStartTime() { Date when = getWhen(); while (running()) { Date now = new GregorianCalendar().getTime(); if (now.before (when)) { long sleepTime = when.getTime() - now.getTime(); if (sleepTime <= 0) { ISOUtil.sleep(1000); continue; } getL... |
@Test public void testParseInt2() throws Throwable { int result = ISOUtil.parseInt("1", 10); assertEquals(1, result, "result"); } | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseInt3() throws Throwable { int result = ISOUtil.parseInt("2C", 31); assertEquals(74, result, "result"); } | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseInt4() throws Throwable { int result = ISOUtil.parseInt("1"); assertEquals(1, result, "result"); } | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseInt5() throws Throwable { byte[] bArray = new byte[1]; bArray[0] = (byte) 49; int result = ISOUtil.parseInt(bArray); assertEquals(1, result, "result"); } | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsArrayIndexOutOfBoundsException() throws Throwable { char[] cArray = new char[0]; try { ISOUtil.parseInt(cArray, 100); fail("Expected ArrayIndexOutOfBoundsException to be thrown"); } catch (ArrayIndexOutOfBoundsException ex) { if (isJavaVersionAtMost(JAVA_10)) { assertEquals("0", ex.g... | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsArrayIndexOutOfBoundsException1() throws Throwable { char[] cArray = new char[0]; try { ISOUtil.parseInt(cArray); fail("Expected ArrayIndexOutOfBoundsException to be thrown"); } catch (ArrayIndexOutOfBoundsException ex) { if (isJavaVersionAtMost(JAVA_10)) { assertEquals("0", ex.getMe... | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsArrayIndexOutOfBoundsException2() throws Throwable { byte[] bArray = new byte[0]; try { ISOUtil.parseInt(bArray, 100); fail("Expected ArrayIndexOutOfBoundsException to be thrown"); } catch (ArrayIndexOutOfBoundsException ex) { if (isJavaVersionAtMost(JAVA_10)) { assertEquals("0", ex.... | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsArrayIndexOutOfBoundsException3() throws Throwable { byte[] bArray = new byte[0]; try { ISOUtil.parseInt(bArray); fail("Expected ArrayIndexOutOfBoundsException to be thrown"); } catch (ArrayIndexOutOfBoundsException ex) { if (isJavaVersionAtMost(JAVA_10)) { assertEquals("0", ex.getMe... | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsNullPointerException() throws Throwable { assertThrows(NullPointerException.class, () -> { ISOUtil.parseInt((char[]) null, 100); }); } | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsNullPointerException1() throws Throwable { assertThrows(NullPointerException.class, () -> { ISOUtil.parseInt((char[]) null); }); } | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testWaitUntilStartTimeThrowsNumberFormatException() throws Throwable { DailyTaskAdaptor dailyTaskAdaptor = new DailyTaskAdaptor(); Configuration cfg = new SimpleConfiguration(); dailyTaskAdaptor.setConfiguration(cfg); try { dailyTaskAdaptor.waitUntilStartTime(); fail("Expected NumberFormatException to... | protected void waitUntilStartTime() { Date when = getWhen(); while (running()) { Date now = new GregorianCalendar().getTime(); if (now.before (when)) { long sleepTime = when.getTime() - now.getTime(); if (sleepTime <= 0) { ISOUtil.sleep(1000); continue; } getLog().info ("sleeping", sleepTime/1000 + " secs until " + whe... | DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void waitUntilStartTime() { Date when = getWhen(); while (running()) { Date now = new GregorianCalendar().getTime(); if (now.before (when)) { long sleepTime = when.getTime() - now.getTime(); if (sleepTime <= 0) { ISOUtil.sleep(1000); continue; } getL... | DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void waitUntilStartTime() { Date when = getWhen(); while (running()) { Date now = new GregorianCalendar().getTime(); if (now.before (when)) { long sleepTime = when.getTime() - now.getTime(); if (sleepTime <= 0) { ISOUtil.sleep(1000); continue; } getL... | DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void waitUntilStartTime() { Date when = getWhen(); while (running()) { Date now = new GregorianCalendar().getTime(); if (now.before (when)) { long sleepTime = when.getTime() - now.getTime(); if (sleepTime <= 0) { ISOUtil.sleep(1000); continue; } getL... | DailyTaskAdaptor extends QBeanSupport implements Runnable { protected void waitUntilStartTime() { Date when = getWhen(); while (running()) { Date now = new GregorianCalendar().getTime(); if (now.before (when)) { long sleepTime = when.getTime() - now.getTime(); if (sleepTime <= 0) { ISOUtil.sleep(1000); continue; } getL... |
@Test public void testParseIntThrowsNullPointerException2() throws Throwable { assertThrows(NullPointerException.class, () -> { ISOUtil.parseInt((String) null, 100); }); } | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsNullPointerException3() throws Throwable { assertThrows(NullPointerException.class, () -> { ISOUtil.parseInt((String) null); }); } | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsNullPointerException4() throws Throwable { assertThrows(NullPointerException.class, () -> { ISOUtil.parseInt((byte[]) null, 100); }); } | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsNullPointerException5() throws Throwable { assertThrows(NullPointerException.class, () -> { ISOUtil.parseInt((byte[]) null); }); } | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsNumberFormatException() throws Throwable { char[] cArray = new char[9]; cArray[0] = 'c'; cArray[1] = '1'; try { ISOUtil.parseInt(cArray, 35); fail("Expected NumberFormatException to be thrown"); } catch (NumberFormatException ex) { assertEquals("Char array contains non-digit", ex.get... | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsNumberFormatException1() throws Throwable { char[] cArray = new char[8]; cArray[0] = '1'; try { ISOUtil.parseInt(cArray, 10); fail("Expected NumberFormatException to be thrown"); } catch (NumberFormatException ex) { assertEquals("Char array contains non-digit", ex.getMessage(), "ex.g... | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsNumberFormatException10() throws Throwable { try { ISOUtil.parseInt("0\"/", 10); fail("Expected NumberFormatException to be thrown"); } catch (NumberFormatException ex) { assertEquals("String contains non-digit", ex.getMessage(), "ex.getMessage()"); } } | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsNumberFormatException11() throws Throwable { try { ISOUtil.parseInt("9Characte", 100); fail("Expected NumberFormatException to be thrown"); } catch (NumberFormatException ex) { assertEquals("String contains non-digit", ex.getMessage(), "ex.getMessage()"); } } | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsNumberFormatException12() throws Throwable { try { ISOUtil.parseInt("8Charact", 100); fail("Expected NumberFormatException to be thrown"); } catch (NumberFormatException ex) { assertEquals("String contains non-digit", ex.getMessage(), "ex.getMessage()"); } } | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsNumberFormatException13() throws Throwable { try { ISOUtil.parseInt("10Characte", 100); fail("Expected NumberFormatException to be thrown"); } catch (NumberFormatException ex) { assertEquals("Number can have maximum 9 digits", ex.getMessage(), "ex.getMessage()"); } } | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testGetWhen() { } | public Date getWhen() { String s = cfg.get ("start")+":00:00"; int hh = Integer.parseInt(s.substring (0, 2)); int mm = Integer.parseInt(s.substring (3, 5)); int ss = Integer.parseInt(s.substring (6, 8)); Date now = new Date(); Calendar cal = new GregorianCalendar(); cal.setTime (now); cal.set (Calendar.HOUR_OF_DAY, hh)... | DailyTaskAdaptor extends QBeanSupport implements Runnable { public Date getWhen() { String s = cfg.get ("start")+":00:00"; int hh = Integer.parseInt(s.substring (0, 2)); int mm = Integer.parseInt(s.substring (3, 5)); int ss = Integer.parseInt(s.substring (6, 8)); Date now = new Date(); Calendar cal = new GregorianCalen... | DailyTaskAdaptor extends QBeanSupport implements Runnable { public Date getWhen() { String s = cfg.get ("start")+":00:00"; int hh = Integer.parseInt(s.substring (0, 2)); int mm = Integer.parseInt(s.substring (3, 5)); int ss = Integer.parseInt(s.substring (6, 8)); Date now = new Date(); Calendar cal = new GregorianCalen... | DailyTaskAdaptor extends QBeanSupport implements Runnable { public Date getWhen() { String s = cfg.get ("start")+":00:00"; int hh = Integer.parseInt(s.substring (0, 2)); int mm = Integer.parseInt(s.substring (3, 5)); int ss = Integer.parseInt(s.substring (6, 8)); Date now = new Date(); Calendar cal = new GregorianCalen... | DailyTaskAdaptor extends QBeanSupport implements Runnable { public Date getWhen() { String s = cfg.get ("start")+":00:00"; int hh = Integer.parseInt(s.substring (0, 2)); int mm = Integer.parseInt(s.substring (3, 5)); int ss = Integer.parseInt(s.substring (6, 8)); Date now = new Date(); Calendar cal = new GregorianCalen... |
@Test public void testUnpackEmptyTag() { instance.unpack("02000"); assertAll( () -> assertEquals(1, instance.size()), () -> assertEquals("02", instance.get("02").getTagId()), () -> assertEquals("", instance.get("02").getValue()) ); } | public void unpack(CharSequence data) throws IllegalArgumentException { if (data == null) throw new IllegalArgumentException("TLV data are required to unpack"); CharBuffer buffer = CharBuffer.wrap(data); CharTag currentTag; while (buffer.hasRemaining()) { currentTag = getTLVMsg(buffer); put(currentTag.getTagId(), curre... | CharTagMap extends HashMap<String, CharTag> { public void unpack(CharSequence data) throws IllegalArgumentException { if (data == null) throw new IllegalArgumentException("TLV data are required to unpack"); CharBuffer buffer = CharBuffer.wrap(data); CharTag currentTag; while (buffer.hasRemaining()) { currentTag = getTL... | CharTagMap extends HashMap<String, CharTag> { public void unpack(CharSequence data) throws IllegalArgumentException { if (data == null) throw new IllegalArgumentException("TLV data are required to unpack"); CharBuffer buffer = CharBuffer.wrap(data); CharTag currentTag; while (buffer.hasRemaining()) { currentTag = getTL... | CharTagMap extends HashMap<String, CharTag> { public void unpack(CharSequence data) throws IllegalArgumentException { if (data == null) throw new IllegalArgumentException("TLV data are required to unpack"); CharBuffer buffer = CharBuffer.wrap(data); CharTag currentTag; while (buffer.hasRemaining()) { currentTag = getTL... | CharTagMap extends HashMap<String, CharTag> { public void unpack(CharSequence data) throws IllegalArgumentException { if (data == null) throw new IllegalArgumentException("TLV data are required to unpack"); CharBuffer buffer = CharBuffer.wrap(data); CharTag currentTag; while (buffer.hasRemaining()) { currentTag = getTL... |
@Test public void testGetL1() { byte[] value = new byte[1]; byte[] result = tl.createTLVMsg(TEST_TAG1, value).getL(); assertArrayEquals(ISOUtil.hex2byte("01"), result); } | public byte[] getL() { if (lengthSize > 0) return getLengthArray(); if (value == null) return new byte[1]; BigInteger bi = BigInteger.valueOf(value.length); byte[] rBytes = bi.toByteArray(); if (value.length < 0x80) return rBytes; if (rBytes[0] > 0) rBytes = ISOUtil.concat(new byte[1], rBytes); rBytes[0] = (byte) (0x80... | TLVMsg implements Loggeable { public byte[] getL() { if (lengthSize > 0) return getLengthArray(); if (value == null) return new byte[1]; BigInteger bi = BigInteger.valueOf(value.length); byte[] rBytes = bi.toByteArray(); if (value.length < 0x80) return rBytes; if (rBytes[0] > 0) rBytes = ISOUtil.concat(new byte[1], rBy... | TLVMsg implements Loggeable { public byte[] getL() { if (lengthSize > 0) return getLengthArray(); if (value == null) return new byte[1]; BigInteger bi = BigInteger.valueOf(value.length); byte[] rBytes = bi.toByteArray(); if (value.length < 0x80) return rBytes; if (rBytes[0] > 0) rBytes = ISOUtil.concat(new byte[1], rBy... | TLVMsg implements Loggeable { public byte[] getL() { if (lengthSize > 0) return getLengthArray(); if (value == null) return new byte[1]; BigInteger bi = BigInteger.valueOf(value.length); byte[] rBytes = bi.toByteArray(); if (value.length < 0x80) return rBytes; if (rBytes[0] > 0) rBytes = ISOUtil.concat(new byte[1], rBy... | TLVMsg implements Loggeable { public byte[] getL() { if (lengthSize > 0) return getLengthArray(); if (value == null) return new byte[1]; BigInteger bi = BigInteger.valueOf(value.length); byte[] rBytes = bi.toByteArray(); if (value.length < 0x80) return rBytes; if (rBytes[0] > 0) rBytes = ISOUtil.concat(new byte[1], rBy... |
@Test public void testParseIntThrowsNumberFormatException2() throws Throwable { byte[] bArray = new byte[8]; bArray[0] = (byte) 55; try { ISOUtil.parseInt(bArray, 10); fail("Expected NumberFormatException to be thrown"); } catch (NumberFormatException ex) { assertEquals("Byte array contains non-digit", ex.getMessage(),... | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsNumberFormatException3() throws Throwable { byte[] bArray = new byte[8]; try { ISOUtil.parseInt(bArray, 100); fail("Expected NumberFormatException to be thrown"); } catch (NumberFormatException ex) { assertEquals("Byte array contains non-digit", ex.getMessage(), "ex.getMessage()"); }... | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsNumberFormatException4() throws Throwable { byte[] bArray = new byte[9]; try { ISOUtil.parseInt(bArray, 100); fail("Expected NumberFormatException to be thrown"); } catch (NumberFormatException ex) { assertEquals("Byte array contains non-digit", ex.getMessage(), "ex.getMessage()"); }... | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsNumberFormatException5() throws Throwable { byte[] bArray = new byte[10]; try { ISOUtil.parseInt(bArray, 100); fail("Expected NumberFormatException to be thrown"); } catch (NumberFormatException ex) { assertEquals("Number can have maximum 9 digits", ex.getMessage(), "ex.getMessage()"... | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsNumberFormatException6() throws Throwable { char[] cArray = new char[9]; try { ISOUtil.parseInt(cArray, 100); fail("Expected NumberFormatException to be thrown"); } catch (NumberFormatException ex) { assertEquals("Char array contains non-digit", ex.getMessage(), "ex.getMessage()"); }... | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsNumberFormatException7() throws Throwable { char[] cArray = new char[10]; try { ISOUtil.parseInt(cArray, 100); fail("Expected NumberFormatException to be thrown"); } catch (NumberFormatException ex) { assertEquals("Number can have maximum 9 digits", ex.getMessage(), "ex.getMessage()"... | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsNumberFormatException8() throws Throwable { try { ISOUtil.parseInt("o`2L\\*@@#", 28); fail("Expected NumberFormatException to be thrown"); } catch (NumberFormatException ex) { assertEquals("String contains non-digit", ex.getMessage(), "ex.getMessage()"); } } | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsNumberFormatException9() throws Throwable { try { ISOUtil.parseInt("9Characte", 28); fail("Expected NumberFormatException to be thrown"); } catch (NumberFormatException ex) { assertEquals("String contains non-digit", ex.getMessage(), "ex.getMessage()"); } } | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsStringIndexOutOfBoundsException() throws Throwable { try { ISOUtil.parseInt("", 100); fail("Expected StringIndexOutOfBoundsException to be thrown"); } catch (StringIndexOutOfBoundsException ex) { assertEquals("String index out of range: 0", ex.getMessage(), "ex.getMessage()"); } } | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testParseIntThrowsStringIndexOutOfBoundsException1() throws Throwable { try { ISOUtil.parseInt(""); fail("Expected StringIndexOutOfBoundsException to be thrown"); } catch (StringIndexOutOfBoundsException ex) { assertEquals("String index out of range: 0", ex.getMessage(), "ex.getMessage()"); } } | public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFormatExcepti... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... | ISOUtil { public static int parseInt (String s, int radix) throws NumberFormatException { int length = s.length(); if (length > 9) throw new NumberFormatException ("Number can have maximum 9 digits"); int result; int index = 0; int digit = Character.digit (s.charAt(index++), radix); if (digit == -1) throw new NumberFor... |
@Test public void testparseCommand_LineIsNull() throws IOException { String[] args = cliCommandInterface.parseCommand(null); assertThat(args).isEmpty(); } | public String[] parseCommand(String line) throws IOException { if (line == null) { return new String[0]; } List<String> matchList = new ArrayList<String>(); Pattern regex = Pattern.compile("[^\\s\"']+|\"([^\"]*)\"|'([^']*)'"); Matcher regexMatcher = regex.matcher(line); while (regexMatcher.find()) { if (regexMatcher.gr... | CLICommandInterface { public String[] parseCommand(String line) throws IOException { if (line == null) { return new String[0]; } List<String> matchList = new ArrayList<String>(); Pattern regex = Pattern.compile("[^\\s\"']+|\"([^\"]*)\"|'([^']*)'"); Matcher regexMatcher = regex.matcher(line); while (regexMatcher.find())... | CLICommandInterface { public String[] parseCommand(String line) throws IOException { if (line == null) { return new String[0]; } List<String> matchList = new ArrayList<String>(); Pattern regex = Pattern.compile("[^\\s\"']+|\"([^\"]*)\"|'([^']*)'"); Matcher regexMatcher = regex.matcher(line); while (regexMatcher.find())... | CLICommandInterface { public String[] parseCommand(String line) throws IOException { if (line == null) { return new String[0]; } List<String> matchList = new ArrayList<String>(); Pattern regex = Pattern.compile("[^\\s\"']+|\"([^\"]*)\"|'([^']*)'"); Matcher regexMatcher = regex.matcher(line); while (regexMatcher.find())... | CLICommandInterface { public String[] parseCommand(String line) throws IOException { if (line == null) { return new String[0]; } List<String> matchList = new ArrayList<String>(); Pattern regex = Pattern.compile("[^\\s\"']+|\"([^\"]*)\"|'([^']*)'"); Matcher regexMatcher = regex.matcher(line); while (regexMatcher.find())... |
@Test public void testProtect() throws Throwable { String result = ISOUtil.protect("10Characte"); assertEquals("10Characte", result, "result"); } | public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.indexOf('^'... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... |
@Test public void testProtect1() throws Throwable { String result = ISOUtil.protect("=WaW=4V0"); assertEquals("=___=___", result, "result"); } | public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.indexOf('^'... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... |
@Test public void testProtect10() throws Throwable { String result = ISOUtil.protect("=====^===========^====^==="); assertEquals("=====^===========^====^===", result, "result"); } | public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.indexOf('^'... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... |
@Test public void testProtect11() throws Throwable { String result = ISOUtil.protect("testISOUtils"); assertEquals("testIS__tils", result, "result"); } | public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.indexOf('^'... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... |
@Test public void testProtect12() throws Throwable { String result = ISOUtil.protect("=HNb^D4uZfz0@|\")61b:~dSS`[.2!!qlL4Z0"); assertEquals("=___^D4uZfz0@|\")61b:~dSS`[.2!!qlL4Z0", result, "result"); } | public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.indexOf('^'... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... |
@Test public void testProtect13() throws Throwable { String result = ISOUtil.protect("^58*(=@"); assertEquals("^58*(=_", result, "result"); } | public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.indexOf('^'... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... |
@Test public void testProtect14() throws Throwable { String result = ISOUtil.protect("===\u3455w"); assertEquals("===__", result, "result"); } | public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.indexOf('^'... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... |
@Test public void testProtect15() throws Throwable { String result = ISOUtil.protect("=\u0AC4\uC024\uF29B=~2A)~5aCgl\"lLU*lm_cJ1M/!KFnA"); assertEquals("=___=________________________KFnA", result, "result"); } | public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.indexOf('^'... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... |
@Test public void testProtect16() throws Throwable { String result = ISOUtil.protect("\u30C5\uE09B\u6028\uB54E\u2094\uFA25\uAD56\u3A1F\uE55C\u31AA\u5FE0=$"); assertEquals("\u30C5\uE09B\u6028\uB54E\u2094\uFA25_\u3A1F\uE55C\u31AA\u5FE0=_", result, "result"); } | public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.indexOf('^'... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... |
@Test public void testProtect17() throws Throwable { String result = ISOUtil.protect("+6+[=I?"); assertEquals("+6+[=__", result, "result"); } | public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.indexOf('^'... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... |
@Test public void testparseCommand_LineContainsSpacesOnly() throws IOException { String line = " "; String[] args = cliCommandInterface.parseCommand(line); assertThat(args).isEmpty(); } | public String[] parseCommand(String line) throws IOException { if (line == null) { return new String[0]; } List<String> matchList = new ArrayList<String>(); Pattern regex = Pattern.compile("[^\\s\"']+|\"([^\"]*)\"|'([^']*)'"); Matcher regexMatcher = regex.matcher(line); while (regexMatcher.find()) { if (regexMatcher.gr... | CLICommandInterface { public String[] parseCommand(String line) throws IOException { if (line == null) { return new String[0]; } List<String> matchList = new ArrayList<String>(); Pattern regex = Pattern.compile("[^\\s\"']+|\"([^\"]*)\"|'([^']*)'"); Matcher regexMatcher = regex.matcher(line); while (regexMatcher.find())... | CLICommandInterface { public String[] parseCommand(String line) throws IOException { if (line == null) { return new String[0]; } List<String> matchList = new ArrayList<String>(); Pattern regex = Pattern.compile("[^\\s\"']+|\"([^\"]*)\"|'([^']*)'"); Matcher regexMatcher = regex.matcher(line); while (regexMatcher.find())... | CLICommandInterface { public String[] parseCommand(String line) throws IOException { if (line == null) { return new String[0]; } List<String> matchList = new ArrayList<String>(); Pattern regex = Pattern.compile("[^\\s\"']+|\"([^\"]*)\"|'([^']*)'"); Matcher regexMatcher = regex.matcher(line); while (regexMatcher.find())... | CLICommandInterface { public String[] parseCommand(String line) throws IOException { if (line == null) { return new String[0]; } List<String> matchList = new ArrayList<String>(); Pattern regex = Pattern.compile("[^\\s\"']+|\"([^\"]*)\"|'([^']*)'"); Matcher regexMatcher = regex.matcher(line); while (regexMatcher.find())... |
@Test public void testProtect18() throws Throwable { String result = ISOUtil.protect("======="); assertEquals("=======", result, "result"); } | public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.indexOf('^'... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... |
@Test public void testProtect19() throws Throwable { String result = ISOUtil.protect("===^^+^="); assertEquals("===^^+^=", result, "result"); } | public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.indexOf('^'... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... |
@Test public void testProtect2() throws Throwable { String result = ISOUtil.protect("===^==="); assertEquals("===^===", result, "result"); } | public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.indexOf('^'... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... | ISOUtil { public static String protect (String s, char mask) { StringBuilder sb = new StringBuilder(); int len = s.length(); int clear = len > 6 ? 6 : 0; int lastFourIndex = -1; if (clear > 0) { lastFourIndex = s.indexOf ('=') - 4; if (lastFourIndex < 0) lastFourIndex = s.indexOf ('^') - 4; if (lastFourIndex < 0 && s.i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.