Ignore:
Timestamp:
2014-05-09T15:47:48+02:00 (10 years ago)
Author:
Don-vip
Message:

code refactoring to avoid classes in methods (cause problems for code analysis tools)

File:
1 edited

Legend:

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

    r7089 r7090  
    733733    }
    734734
     735    /** Quit parsing, when a certain condition is met */
     736    private static class SAXReturnException extends SAXException {
     737        private final String result;
     738
     739        public SAXReturnException(String result) {
     740            this.result = result;
     741        }
     742
     743        public String getResult() {
     744            return result;
     745        }
     746    }
     747
    735748    /**
    736749     * Reads the wiki page on a certain file in html format in order to find the real image URL.
    737750     */
    738751    private static String getImgUrlFromWikiInfoPage(final String base, final String fn) {
    739 
    740         /** Quit parsing, when a certain condition is met */
    741         class SAXReturnException extends SAXException {
    742             private final String result;
    743 
    744             public SAXReturnException(String result) {
    745                 this.result = result;
    746             }
    747 
    748             public String getResult() {
    749                 return result;
    750             }
    751         }
    752 
    753752        try {
    754753            final XMLReader parser = XMLReaderFactory.createXMLReader();
Note: See TracChangeset for help on using the changeset viewer.