Ignore:
Timestamp:
2015-07-06T11:47:31+02:00 (9 years ago)
Author:
nokutu
Message:

Fixed Findbugs errors, improved test and removed trailing whitespaces -- By floscher

Location:
applications/editors/josm/plugins/mapillary
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/mapillary/README

    r31185 r31341  
    11README
    22======
    3 
    4 Readme for your plugin
    53
    64    * nokutu <nokutu@openmailbox.org>
     
    97     
    108    * Feel free to contact me for any bug or suggestion.
     9
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryData.java

    r31333 r31341  
    1313/**
    1414 * Database class for all the MapillaryImage objects.
    15  * 
     15 *
    1616 * @author nokutu
    1717 * @see MapillaryAbstractImage
     
    4646    /**
    4747     * Adds a set of MapillaryImages to the object, and then repaints mapView.
    48      * 
     48     *
    4949     * @param images
    5050     *            The set of images to be added.
     
    5858    /**
    5959     * Adds an MapillaryImage to the object, and then repaints mapView.
    60      * 
     60     *
    6161     * @param image
    6262     *            The image to be added.
     
    8181     * Adds a set of MapillaryImages to the object, but doesn't repaint mapView.
    8282     * This is needed for concurrency.
    83      * 
     83     *
    8484     * @param images
    8585     *            The set of images to be added.
     
    9494    /**
    9595     * Highlights the image under the cursor.
    96      * 
     96     *
    9797     * @param image
    9898     *            The image under the cursor.
     
    104104    /**
    105105     * Returns the image under the mouse cursor.
    106      * 
     106     *
    107107     * @return The image under the mouse cursor.
    108108     */
     
    114114     * Adds a MapillaryImage to the object, but doesn't repaint mapView. This is
    115115     * needed for concurrency.
    116      * 
     116     *
    117117     * @param image
    118118     *            The image to be added.
     
    135135    /**
    136136     * Returns a List containing all images.
    137      * 
     137     *
    138138     * @return A List object containing all images.
    139139     */
     
    144144    /**
    145145     * Returns the MapillaryImage object that is currently selected.
    146      * 
     146     *
    147147     * @return The selected MapillaryImage object.
    148148     */
     
    215215     * surrounding thumbnails. If the user does ctrl+click, this isn't
    216216     * triggered.
    217      * 
     217     *
    218218     * @param image
    219219     *            The MapillaryImage which is going to be selected
     
    229229     * triggered. You can choose whether to center the view on the new image or
    230230     * not.
    231      * 
     231     *
    232232     * @param image
    233233     *            The {@link MapillaryImage} which is going to be selected.
     
    282282     * Adds a MapillaryImage object to the list of selected images, (when ctrl +
    283283     * click)
    284      * 
     284     *
    285285     * @param image
    286286     *            The MapillaryImage object to be added.
     
    299299     * Adds a set of {@code MapillaryAbstractImage} objects to the list of
    300300     * selected images.
    301      * 
     301     *
    302302     * @param images
    303303     *            A List object containing the set of images to be added.
     
    317317     * Returns a List containing all {@code MapillaryAbstractImage} objects
    318318     * selected with ctrl + click
    319      * 
     319     *
    320320     * @return A List object containing all the images selected.
    321321     */
     
    336336    /**
    337337     * Returns the amount of images contained by this object.
    338      * 
     338     *
    339339     * @return The amount of images in stored.
    340340     */
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImportedImage.java

    r31333 r31341  
    3232     * Returns the pictures of the file.
    3333     *
    34      * @return
     34     * @return An BufferedImage object containing the pictures.
    3535     * @throws IOException
     36     * @throws IllegalArgumentException if file is currently set to null
    3637     */
    3738    public BufferedImage getImage() throws IOException {
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java

    r31333 r31341  
    166166     * Returns the MapillaryData object, which acts as the database of the
    167167     * Layer.
    168      * 
     168     *
    169169     * @return
    170170     */
     
    214214    /**
    215215     * Replies background color for downloaded areas.
    216      * 
     216     *
    217217     * @return background color for downloaded areas. Black by default
    218218     */
     
    223223    /**
    224224     * Replies background color for non-downloaded areas.
    225      * 
     225     *
    226226     * @return background color for non-downloaded areas. Yellow by default
    227227     */
     
    349349    /**
    350350     * Draws the highlight of the icon.
    351      * 
     351     *
    352352     * @param g
    353353     * @param p
     
    372372     * Draws the given icon of an image. Also checks if the mouse is over the
    373373     * image.
    374      * 
     374     *
    375375     * @param g
    376376     * @param image
     
    428428    /**
    429429     * Returns the 2 closest images belonging to a different sequence.
    430      * 
     430     *
    431431     * @return
    432432     */
     
    504504     * When more data is downloaded, a delayed update is thrown, in order to
    505505     * wait for the data bounds to be set.
    506      * 
     506     *
    507507     * @param event
    508508     */
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryDownloadViewAction.java

    r31331 r31341  
    1717/**
    1818 * If in manual mode, downloads all the images in the current view.
    19  * 
     19 *
    2020 * @author nokutu
    2121 *
     
    2323public class MapillaryDownloadViewAction extends JosmAction {
    2424
    25     public static double MAX_AREA = Main.pref.getDouble(
     25    public static final double MAX_AREA = Main.pref.getDouble(
    2626            "mapillary.max-download-area", 0.020);
    2727
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryImageInfoDownloaderThread.java

    r31331 r31341  
    2020/**
    2121 * This thread downloads one of the images in a given area.
    22  * 
     22 *
    2323 * @author nokutu
    2424 * @see MapillarySquareDownloadManagerThread
     
    3939        try {
    4040            BufferedReader br = new BufferedReader(new InputStreamReader(
    41                     new URL(url).openStream()));
     41                    new URL(url).openStream(), "UTF-8"));
    4242            JsonObject jsonobj = Json.createReader(br).readObject();
    4343            if (!jsonobj.getBoolean("more"))
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillarySequenceDownloadThread.java

    r31333 r31341  
    2525 * needed MapillaryImage and MapillarySequence objects. It just stores the ones
    2626 * in the given area.
    27  * 
     27 *
    2828 * @author nokutu
    2929 * @see MapillarySquareDownloadManagerThread
     
    5050            BufferedReader br;
    5151            br = new BufferedReader(new InputStreamReader(
    52                     new URL(url).openStream()));
     52                    new URL(url).openStream(), "UTF-8"));
    5353            JsonObject jsonall = Json.createReader(br).readObject();
    5454
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillarySignDownloaderThread.java

    r31331 r31341  
    3535        try {
    3636            br = new BufferedReader(new InputStreamReader(
    37                     new URL(url).openStream()));
     37                    new URL(url).openStream(), "UTF-8"));
    3838            JsonObject jsonobj = Json.createReader(br).readObject();
    3939            if (!jsonobj.getBoolean("more")) {
  • applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/ImportTest.java

    r31314 r31341  
    22
    33import static org.junit.Assert.*;
     4
     5import java.io.IOException;
    46
    57import org.junit.Before;
     
    1416        }
    1517       
    16         @Test
    17         public void test() {
    18                 MapillaryImportedImage img = new MapillaryImportedImage(0,0,0, null);
    19                 assert(true);
    20         }
     18
     19    @Test(expected=IllegalArgumentException.class)
     20    public void test() throws IOException {
     21        MapillaryImportedImage img = new MapillaryImportedImage(0,0,0, null);
     22        img.getImage();
     23    }
    2124
    2225}
Note: See TracChangeset for help on using the changeset viewer.