Changeset 15317 in josm


Ignore:
Timestamp:
2019-08-24T12:48:58+02:00 (4 weeks ago)
Author:
Don-vip
Message:

see #18057 - checkstyle/pmd

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Functions.java

    r15315 r15317  
    391391     * Get keys that follow a regex
    392392     * @param env the environment
    393      * @param key_regex the pattern that the key must match
     393     * @param keyRegex the pattern that the key must match
    394394     * @return the values for the keys that match the pattern
    395395     * @see Functions#tag_regex(Environment, String, String)
    396396     * @since 15315
    397397     */
    398     public static List<String> tag_regex(final Environment env, String key_regex) { // NO_UCD (unused code)
    399         return tag_regex(env, key_regex, "");
     398    public static List<String> tag_regex(final Environment env, String keyRegex) { // NO_UCD (unused code)
     399        return tag_regex(env, keyRegex, "");
    400400    }
    401401
     
    403403     * Get keys that follow a regex
    404404     * @param env the environment
    405      * @param key_regex the pattern that the key must match
     405     * @param keyRegex the pattern that the key must match
     406     * @param flags a string that may contain "i" (case insensitive), "m" (multiline) and "s" ("dot all")
    406407     * @return the values for the keys that match the pattern
    407      * @param flags a string that may contain "i" (case insensitive), "m" (multiline) and "s" ("dot all")
    408408     * @see Pattern#CASE_INSENSITIVE
    409409     * @see Pattern#DOTALL
     
    411411     * @since 15315
    412412     */
    413     public static List<String> tag_regex(final Environment env, String key_regex, String flags) { // NO_UCD (unused code)
     413    public static List<String> tag_regex(final Environment env, String keyRegex, String flags) { // NO_UCD (unused code)
    414414        int f = parse_regex_flags(flags);
    415         Pattern compiled = Pattern.compile(key_regex, f);
     415        Pattern compiled = Pattern.compile(keyRegex, f);
    416416        return env.osm.getKeys().entrySet().stream()
    417417                .filter(object -> compiled.matcher(object.getKey()).find())
     
    422422     * Parse flags for regex usage. Shouldn't be used in mapcss
    423423     * @param flags a string that may contain "i" (case insensitive), "m" (multiline) and "s" ("dot all")
     424     * @return An int that can be used by a {@link Pattern} object
    424425     * @see Pattern#CASE_INSENSITIVE
    425426     * @see Pattern#DOTALL
    426427     * @see Pattern#MULTILINE
    427      * @return An int that can be used by a {@link Pattern} object
    428      */
    429     private static final int parse_regex_flags(String flags) {
     428     */
     429    private static int parse_regex_flags(String flags) {
    430430        int f = 0;
    431431        if (flags.contains("i")) {
Note: See TracChangeset for help on using the changeset viewer.