ripple-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Barham (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (RIPPLE-91) Various problems with the gpx file implementation in Geolocation panel
Date Thu, 18 Jun 2015 22:20:01 GMT

     [ https://issues.apache.org/jira/browse/RIPPLE-91?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tim Barham closed RIPPLE-91.
----------------------------
    Resolution: Fixed

> Various problems with the gpx file implementation in Geolocation panel
> ----------------------------------------------------------------------
>
>                 Key: RIPPLE-91
>                 URL: https://issues.apache.org/jira/browse/RIPPLE-91
>             Project: Apache Ripple
>          Issue Type: Bug
>            Reporter: Julian Horn
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Clicking on the gpx file input box raises a file picker dialog.
> Selecting a file usually leads to a change event on the input box.
> This causes loadGpxFile to be called, passing in two null values
> and an array containing one element, which is the change event.
> loadGpxFile then extracts the change event from the array, extracts
> the array of files selected by the file picker from the change event,
> and reads the file that is the first element of this array.
> There are a number of problems with this implementation.
> 1) if you select a file and then click on the input box again and cancel
> out of the file picker, then you select no files but still generate a
> change event.  This causes loadGpxFile to throw an unhandled exception.
> 2) if an error were to occur while reading the file, loadGpxFile would
> call a null function value (the "fail" callback).
> 3) loadGpx has an absurd interface.  This routine is only called in one
> place.  All you need is a string which is the file to load.
> The fix is to verify that a file was selected before calling loadGpxFile,
> and to have loadGpxFile call console.log to report read errors.
> In addition to fixing these problems, there is also a mixture of CR
> and CRLF line endings, both in lib/client/ui/plugins/geoView.js where all this code lives,
and in lib/client/ui/plugins/geoView/panel.html.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message