mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

coulbeck
25.00.2007 991c53543dd6ed8bc0017b89f70c734b889b6335
Replace use of Java 6 Arrays.copyOf with System.arraycopy.
1 files modified
7 ■■■■ changed files
opends/src/server/org/opends/server/types/CryptoManager.java 7 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/types/CryptoManager.java
@@ -360,8 +360,11 @@
          final byte[] requestedInstanceKeyID)
          throws CryptoManagerException {
    final byte[] instanceKeyID = getInstanceKeyID();
    final byte[] keyIDPrefix = Arrays.copyOf(symmetricKeyAttribute,
            instanceKeyID.length);
//    final byte[] keyIDPrefix = Arrays.copyOf(symmetricKeyAttribute,
//            instanceKeyID.length);
    final byte[] keyIDPrefix = new byte[instanceKeyID.length];
    System.arraycopy(symmetricKeyAttribute, 0,
                     keyIDPrefix, 0, instanceKeyID.length);
    if (! Arrays.equals(keyIDPrefix, instanceKeyID)) {
      throw new CryptoManagerException(
              // TODO: i18n