[tor-bugs] #14859 [Onionoo]: Adapt Onionoo's parsing code for MaxMind's GeoLite2 City files to their new format

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat Feb 21 18:37:44 UTC 2015


#14859: Adapt Onionoo's parsing code for MaxMind's GeoLite2 City files to their new
format
-------------------------+-----------------
     Reporter:  karsten  |      Owner:
         Type:  defect   |     Status:  new
     Priority:  normal   |  Milestone:
    Component:  Onionoo  |    Version:
   Resolution:           |   Keywords:
Actual Points:           |  Parent ID:
       Points:           |
-------------------------+-----------------

Comment (by karsten):

 Hmm, looks like the current code already contains such a run-time
 verification:

 {{{
     try {
       // ...
       BufferedReader br = new BufferedReader(new InputStreamReader(
           new FileInputStream(this.geoLite2CityBlocksIPv4CsvFile),
           "UTF-8"));
       // ...
     } catch (IOException e) {
       log.error("I/O exception while reading "
           + this.geoLite2CityBlocksIPv4CsvFile.getAbsolutePath() + ".");
       return lookupResults;
     }
 }}}

 The differences to your code are that the encoding is specified using a
 String and that CharacterCodingException is not caught directly but its
 super class IOException.  But I think the effect should be the same, no?

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/14859#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list