Changeset 10985 in josm for trunk


Ignore:
Timestamp:
2016-09-10T04:17:55+02:00 (8 years ago)
Author:
Don-vip
Message:

code cleanup/simplification

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/LayerManager.java

    r10611 r10985  
    172172
    173173    /**
    174      * Add a layer. The layer will be added at a given psoition.
     174     * Add a layer. The layer will be added at a given position.
    175175     * @param layer The layer to add
    176176     */
  • trunk/src/org/openstreetmap/josm/tools/bugreport/ReportedException.java

    r10819 r10985  
    4646    private final LinkedList<Section> sections = new LinkedList<>();
    4747    private final transient Thread caughtOnThread;
    48     private final Throwable exception;
    4948    private String methodWarningFrom;
    5049
     
    5554    ReportedException(Throwable exception, Thread caughtOnThread) {
    5655        super(exception);
    57         this.exception = exception;
    5856
    5957        allStackTraces = Thread.getAllStackTraces();
     
    157155        }
    158156
    159         return hasSameStackTrace(new CauseTraceIterator(), e.exception);
     157        return hasSameStackTrace(new CauseTraceIterator(), e.getCause());
    160158    }
    161159
     
    247245    @Override
    248246    public String toString() {
    249         return "ReportedException [thread=" + caughtOnThread + ", exception=" + exception
     247        return "ReportedException [thread=" + caughtOnThread + ", exception=" + getCause()
    250248                + ", methodWarningFrom=" + methodWarningFrom + "]";
    251249    }
     
    276274     */
    277275    private final class CauseTraceIterator implements Iterator<Throwable> {
    278         private Throwable current = exception;
     276        private Throwable current = getCause();
    279277        private final Set<Throwable> dejaVu = Collections.newSetFromMap(new IdentityHashMap<Throwable, Boolean>());
    280278
Note: See TracChangeset for help on using the changeset viewer.