Changeset 12909 in josm


Ignore:
Timestamp:
2017-09-30T14:40:47+02:00 (3 weeks ago)
Author:
Don-vip
Message:

see #15361 - add more debug info + update licence information

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/CONTRIBUTION

    r11660 r12909  
    5454(https://today.java.net/pub/a/today/2006/03/23/multi-split-pane.html).
    5555
    56 The Alphanum Algorithm is from David Koelle and license with LGPL
     56The Alphanum Algorithm is from David Koelle and license with MIT
    5757(http://www.davekoelle.com/alphanum.html)
    5858
  • trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java

    r12846 r12909  
    8787import org.openstreetmap.josm.tools.SubclassFilteredCollection;
    8888import org.openstreetmap.josm.tools.Utils;
     89import org.openstreetmap.josm.tools.bugreport.BugReport;
    8990
    9091/**
     
    464465     *
    465466     */
    466     private static class SelectionListModel extends AbstractListModel<OsmPrimitive>
     467    static class SelectionListModel extends AbstractListModel<OsmPrimitive>
    467468    implements ActiveLayerChangeListener, SelectionChangedListener, DataSetListener {
    468469
     
    662663         */
    663664        public synchronized void sort() {
    664             if (selection.size() <= Config.getPref().getInt("selection.no_sort_above", 100_000)) {
    665                 boolean quick = selection.size() > Config.getPref().getInt("selection.fast_sort_above", 10_000);
     665            int size = selection.size();
     666            if (size > 1 && size <= Config.getPref().getInt("selection.no_sort_above", 100_000)) {
     667                boolean quick = size > Config.getPref().getInt("selection.fast_sort_above", 10_000);
    666668                Comparator<OsmPrimitive> c = Config.getPref().getBoolean("selection.sort_relations_before_ways", true)
    667669                        ? OsmPrimitiveComparator.orderingRelationsWaysNodes()
    668670                        : OsmPrimitiveComparator.orderingWaysRelationsNodes();
    669                 selection.sort(c.thenComparing(quick
    670                         ? OsmPrimitiveComparator.comparingUniqueId()
    671                         : OsmPrimitiveComparator.comparingNames()));
     671                try {
     672                    selection.sort(c.thenComparing(quick
     673                            ? OsmPrimitiveComparator.comparingUniqueId()
     674                            : OsmPrimitiveComparator.comparingNames()));
     675                } catch (IllegalArgumentException e) {
     676                    throw BugReport.intercept(e).put("size", size).put("quick", quick).put("selection", selection);
     677                }
    672678            }
    673679        }
  • trunk/src/org/openstreetmap/josm/tools/AlphanumComparator.java

    r8928 r12909  
    99 * The Alphanum Algorithm is discussed at http://www.DaveKoelle.com
    1010 *
     11 * Released under the MIT License - https://opensource.org/licenses/MIT
    1112 *
    12  * This library is free software; you can redistribute it and/or modify it under
    13  * the terms of the GNU Lesser General Public License as published by the Free
    14  * Software Foundation; either version 2.1 of the License, or any later version.
     13 * Copyright 2007-2017 David Koelle
    1514 *
    16  * This library is distributed in the hope that it will be useful, but WITHOUT
    17  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    18  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
    19  * details.
     15 * Permission is hereby granted, free of charge, to any person obtaining
     16 * a copy of this software and associated documentation files (the "Software"),
     17 * to deal in the Software without restriction, including without limitation
     18 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
     19 * and/or sell copies of the Software, and to permit persons to whom the
     20 * Software is furnished to do so, subject to the following conditions:
    2021 *
    21  * You should have received a copy of the GNU Lesser General Public License
    22  * along with this library; if not, write to the Free Software Foundation, Inc.,
    23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
     22 * The above copyright notice and this permission notice shall be included
     23 * in all copies or substantial portions of the Software.
    2424 *
     25 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
     26 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     27 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
     28 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
     29 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
     30 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
     31 * USE OR OTHER DEALINGS IN THE SOFTWARE.
    2532 */
    2633import java.io.Serializable;
     
    3744 *
    3845 * This is an updated version with enhancements made by Daniel Migowski, Andre
    39  * Bogus, and David Koelle and others.
     46 * Bogus, David Koelle and others.
    4047 *
    4148 */
Note: See TracChangeset for help on using the changeset viewer.