@Override public String debug() { return mId + "; deps = " + Arrays.toString(cp); }
@SuppressWarnings("rawtypes") @Override public List getTableNames(Connection connection) throws SQLException { return Arrays.asList(TABLES_NAMES); }
/** * Returns an array containing all of the elements in this queue. * The returned array elements are in no particular order. * * <p>The returned array will be "safe" in that no references to it are * maintained by this queue. (In other words, this method must allocate * a new array). The caller is thus free to modify the returned array. * * <p>This method acts as bridge between array-based and collection-based * APIs. * * @return an array containing all of the elements in this queue */ public Object[] toArray() { return Arrays.copyOf(buffer, size, Object[].class); }
else deepToString((Object[])e, buf, seen); (e instanceof byte[]) ? toString( (byte[]) e) : (e instanceof short[]) ? toString( (short[]) e) : (e instanceof int[]) ? toString( (int[]) e) : (e instanceof long[]) ? toString( (long[]) e) : (e instanceof char[]) ? toString( (char[]) e) : (e instanceof boolean[]) ? toString( (boolean[]) e) : (e instanceof float[]) ? toString( (float[]) e) : (e instanceof double[]) ? toString( (double[]) e) : "");
e1.equals(e2) : (e1 instanceof Object[] && e2 instanceof Object[]) ? deepEquals((Object[])e1, (Object[])e2) : (e1 instanceof byte[] && e2 instanceof byte[]) ? equals((byte[])e1, (byte[])e2) : (e1 instanceof short[] && e2 instanceof short[]) ? equals((short[])e1, (short[])e2) : (e1 instanceof int[] && e2 instanceof int[]) ? equals((int[])e1, (int[])e2) :
@Test public void testGetAllKeys() throws Exception { BootstrappedKeyStoreProtectionManager mgr = new BootstrappedKeyStoreProtectionManager(); mgr.setKeyStoreProtectionKey("1234"); mgr.setPrivateKeyProtectionKey("5678"); final Map<String, Key> keys = mgr.getAllKeys(); assertEquals(2, keys.size()); Iterator<Entry<String, Key>> entryIter = keys.entrySet().iterator(); Key key = entryIter.next().getValue(); assertTrue(Arrays.equals("5678".getBytes(), key.getEncoded())); key = entryIter.next().getValue(); assertTrue(Arrays.equals("1234".getBytes(), key.getEncoded())); } }
/** * @since 1.6 */ public static Object[] copyOfRange(Object[] original, int from, int to) { return copyOfRange(original, from, to, original.getClass()); }
public MigrateToV2(String[] recipe) { this(Arrays.asList(recipe)); }
/** * Returns an array containing all of the elements in this queue. * The returned array elements are in no particular order. * * <p>The returned array will be "safe" in that no references to it are * maintained by this queue. (In other words, this method must allocate * a new array). The caller is thus free to modify the returned array. * * <p>This method acts as bridge between array-based and collection-based * APIs. * * @return an array containing all of the elements in this queue */ public Object[] toArray() { return Arrays.copyOf(buffer, size, Object[].class); }
else deepToString((Object[])e, buf, seen); (e instanceof byte[]) ? toString( (byte[]) e) : (e instanceof short[]) ? toString( (short[]) e) : (e instanceof int[]) ? toString( (int[]) e) : (e instanceof long[]) ? toString( (long[]) e) : (e instanceof char[]) ? toString( (char[]) e) : (e instanceof boolean[]) ? toString( (boolean[]) e) : (e instanceof float[]) ? toString( (float[]) e) : (e instanceof double[]) ? toString( (double[]) e) : "");
e1.equals(e2) : (e1 instanceof Object[] && e2 instanceof Object[]) ? deepEquals((Object[])e1, (Object[])e2) : (e1 instanceof byte[] && e2 instanceof byte[]) ? equals((byte[])e1, (byte[])e2) : (e1 instanceof short[] && e2 instanceof short[]) ? equals((short[])e1, (short[])e2) : (e1 instanceof int[] && e2 instanceof int[]) ? equals((int[])e1, (int[])e2) :
@Test public void testGetSetKeysFromByteArray() throws Exception { BootstrappedKeyStoreProtectionManager mgr = new BootstrappedKeyStoreProtectionManager(); mgr.setKeyStoreProtectionKey("1234".getBytes()); mgr.setPrivateKeyProtectionKey("5678".getBytes()); assertTrue(Arrays.equals("1234".getBytes(), mgr.getKeyStoreProtectionKey().getEncoded())); assertTrue(Arrays.equals("5678".getBytes(), mgr.getPrivateKeyProtectionKey().getEncoded())); }
/** * @since 1.6 */ public static Object[] copyOfRange(Object[] original, int from, int to) { return copyOfRange(original, from, to, original.getClass()); }
/** * @return a list of all files with ".substvar" extension in "META-INF" folder of the project. */ protected List<File> getAllSubstVarFiles() { FileFilter substVarFilter = new FileFilter() { @Override public boolean accept(File file) { return file.getName().toLowerCase().endsWith(".substvar"); } }; File[] substVarFiles = metaInfSource.listFiles(substVarFilter); List<File> result = new ArrayList<File>(); List<?> substVarFilesList = Arrays.asList(substVarFiles); for (Object substVarFileObject : substVarFilesList) { File substVarFile = (File) substVarFileObject; result.add(substVarFile); } return result; }
/** * Returns an array containing all of the elements in this queue. * The returned array elements are in no particular order. * * <p>The returned array will be "safe" in that no references to it are * maintained by this queue. (In other words, this method must allocate * a new array). The caller is thus free to modify the returned array. * * <p>This method acts as bridge between array-based and collection-based * APIs. * * @return an array containing all of the elements in this queue */ public Object[] toArray() { return Arrays.copyOf(buffer, size, Object[].class); }
else deepToString((Object[])e, buf, seen); (e instanceof byte[]) ? toString( (byte[]) e) : (e instanceof short[]) ? toString( (short[]) e) : (e instanceof int[]) ? toString( (int[]) e) : (e instanceof long[]) ? toString( (long[]) e) : (e instanceof char[]) ? toString( (char[]) e) : (e instanceof boolean[]) ? toString( (boolean[]) e) : (e instanceof float[]) ? toString( (float[]) e) : (e instanceof double[]) ? toString( (double[]) e) : "");
e1.equals(e2) : (e1 instanceof Object[] && e2 instanceof Object[]) ? deepEquals((Object[])e1, (Object[])e2) : (e1 instanceof byte[] && e2 instanceof byte[]) ? equals((byte[])e1, (byte[])e2) : (e1 instanceof short[] && e2 instanceof short[]) ? equals((short[])e1, (short[])e2) : (e1 instanceof int[] && e2 instanceof int[]) ? equals((int[])e1, (int[])e2) :
jc.parse(args); } catch (ParameterException e) { logger.debug("Failed while parsing the args " + Arrays.toString(args), e); showHelp(jc.getParsedCommand()); return;
@Test public void testGetSetKeysFromString() throws Exception { BootstrappedKeyStoreProtectionManager mgr = new BootstrappedKeyStoreProtectionManager(); mgr.setKeyStoreProtectionKey("1234"); mgr.setPrivateKeyProtectionKey("5678"); assertTrue(Arrays.equals("1234".getBytes(), mgr.getKeyStoreProtectionKey().getEncoded())); assertTrue(Arrays.equals("5678".getBytes(), mgr.getPrivateKeyProtectionKey().getEncoded())); }
/** * @since 1.6 */ public static Object[] copyOfRange(Object[] original, int from, int to) { return copyOfRange(original, from, to, original.getClass()); }