Ignore:
Timestamp:
2017-04-10T03:28:15+02:00 (7 years ago)
Author:
Don-vip
Message:

findbugs - EI_EXPOSE_REP

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r11747 r11879  
    357357
    358358    /**
     359     * Copies the given array. Unlike {@link Arrays#copyOf}, this method is null-safe.
     360     * @param array The array to copy
     361     * @return A copy of the original array, or {@code null} if {@code array} is null
     362     * @since 11879
     363     */
     364    public static byte[] copyArray(byte... array) {
     365        if (array != null) {
     366            return Arrays.copyOf(array, array.length);
     367        }
     368        return array;
     369    }
     370
     371    /**
    359372     * Simple file copy function that will overwrite the target file.
    360373     * @param in The source file
Note: See TracChangeset for help on using the changeset viewer.