Ignore:
Timestamp:
2020-11-23T16:28:11+01:00 (3 years ago)
Author:
Don-vip
Message:

see #20129 - Fix typos and misspellings in the code (patch by gaben)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/OverpassDownloadReader.java

    r16643 r17333  
    9494     * @since 11916
    9595     */
    96     public enum OverpassOutpoutFormat {
     96    public enum OverpassOutputFormat {
    9797        /** Default output format: plain OSM XML */
    9898        OSM_XML("xml"),
     
    110110        private final String directive;
    111111
    112         OverpassOutpoutFormat(String directive) {
     112        OverpassOutputFormat(String directive) {
    113113            this.directive = directive;
    114114        }
     
    123123
    124124        /**
    125          * Returns the {@code OverpassOutpoutFormat} matching the given directive.
     125         * Returns the {@code OverpassOutputFormat} matching the given directive.
    126126         * @param directive directive used in {@code [out:<directive>]} statement
    127          * @return {@code OverpassOutpoutFormat} matching the given directive
     127         * @return {@code OverpassOutputFormat} matching the given directive
    128128         * @throws IllegalArgumentException in case of invalid directive
    129129         */
    130         static OverpassOutpoutFormat from(String directive) {
    131             for (OverpassOutpoutFormat oof : values()) {
     130        static OverpassOutputFormat from(String directive) {
     131            for (OverpassOutputFormat oof : values()) {
    132132                if (oof.directive.equals(directive)) {
    133133                    return oof;
     
    140140    static final Pattern OUTPUT_FORMAT_STATEMENT = Pattern.compile(".*\\[out:([a-z]{3,})\\].*", Pattern.DOTALL);
    141141
    142     static final Map<OverpassOutpoutFormat, Class<? extends AbstractReader>> outputFormatReaders = new ConcurrentHashMap<>();
     142    static final Map<OverpassOutputFormat, Class<? extends AbstractReader>> outputFormatReaders = new ConcurrentHashMap<>();
    143143
    144144    final String overpassServer;
     
    165165     * @return the previous value associated with {@code format}, or {@code null} if there was no mapping
    166166     */
    167     public static final Class<? extends AbstractReader> registerOverpassOutpoutFormatReader(
    168             OverpassOutpoutFormat format, Class<? extends AbstractReader> readerClass) {
     167    public static final Class<? extends AbstractReader> registerOverpassOutputFormatReader(
     168            OverpassOutputFormat format, Class<? extends AbstractReader> readerClass) {
    169169        return outputFormatReaders.put(Objects.requireNonNull(format), Objects.requireNonNull(readerClass));
    170170    }
    171171
    172172    static {
    173         registerOverpassOutpoutFormatReader(OverpassOutpoutFormat.OSM_XML, OverpassOsmReader.class);
    174         registerOverpassOutpoutFormatReader(OverpassOutpoutFormat.OSM_JSON, OverpassOsmJsonReader.class);
     173        registerOverpassOutputFormatReader(OverpassOutputFormat.OSM_XML, OverpassOsmReader.class);
     174        registerOverpassOutputFormatReader(OverpassOutputFormat.OSM_JSON, OverpassOsmJsonReader.class);
    175175    }
    176176
     
    369369        Matcher m = OUTPUT_FORMAT_STATEMENT.matcher(overpassQuery);
    370370        if (m.matches()) {
    371             Class<? extends AbstractReader> readerClass = outputFormatReaders.get(OverpassOutpoutFormat.from(m.group(1)));
     371            Class<? extends AbstractReader> readerClass = outputFormatReaders.get(OverpassOutputFormat.from(m.group(1)));
    372372            if (readerClass != null) {
    373373                try {
Note: See TracChangeset for help on using the changeset viewer.