Ignore:
Timestamp:
2017-04-10T00:14:42+02:00 (3 years ago)
Author:
Don-vip
Message:

findbugs - EI_EXPOSE_REP2 + javadoc

Location:
trunk/src/org/openstreetmap/josm/tools
Files:
2 edited

Legend:

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

    r11553 r11878  
    1414import java.net.HttpURLConnection;
    1515import java.net.URL;
     16import java.util.Arrays;
    1617import java.util.Collections;
    1718import java.util.List;
     
    558559     */
    559560    public HttpClient setRequestBody(byte[] requestBody) {
    560         this.requestBody = requestBody;
     561        this.requestBody = Arrays.copyOf(requestBody, requestBody.length);
    561562        return this;
    562563    }
  • trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java

    r11620 r11878  
    163163    }
    164164
     165    /**
     166     * Null-safe date cloning method.
     167     * @param d date to clone, or null
     168     * @return cloned date, or null
     169     * @since 11878
     170     */
     171    public static Date cloneDate(Date d) {
     172        return d != null ? (Date) d.clone() : null;
     173    }
     174
    165175    private static boolean checkLayout(String text, String pattern) {
    166176        if (text.length() != pattern.length())
Note: See TracChangeset for help on using the changeset viewer.