Changeset 27470 in osm for applications/editors/josm


Ignore:
Timestamp:
2012-01-15T20:35:19+01:00 (13 years ago)
Author:
frederik
Message:

properly handle anonymous contributions in JOSM license change plugin. fixes #7269.

Location:
applications/editors/josm/plugins/licensechange/src/org/openstreetmap/josm/plugins/licensechange
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/licensechange/src/org/openstreetmap/josm/plugins/licensechange/CheckAction.java

    r26509 r27470  
    8787    {
    8888        private Check licenseCheck;
    89         private Collection<OsmPrimitive> validatedPrimitives;
    90         private Collection<OsmPrimitive> formerValidatedPrimitives;
     89        private Collection<OsmPrimitive> checkedPrimitives;
     90        private Collection<OsmPrimitive> formerCheckedPrimitives;
    9191        private boolean canceled;
    9292        private List<LicenseProblem> problems;
     
    9494        /**
    9595         *
    96          * @param validatedPrimitives the collection of primitives to validate.
    97          * @param formerValidatedPrimitives the last collection of primitives being validates. May be null.
     96         * @param checkedPrimitives the collection of primitives to validate.
     97         * @param formerCheckedPrimitives the last collection of primitives being validates. May be null.
    9898         */
    99         public CheckTask(Collection<OsmPrimitive> validatedPrimitives, Collection<OsmPrimitive> formerValidatedPrimitives)
     99        public CheckTask(Collection<OsmPrimitive> checkedPrimitives, Collection<OsmPrimitive> formerCheckedPrimitives)
    100100        {
    101101            super(tr("Loading"), false /*don't ignore exceptions */);
    102102
    103             this.validatedPrimitives  = validatedPrimitives;
    104             this.formerValidatedPrimitives = formerValidatedPrimitives;
     103            this.checkedPrimitives  = checkedPrimitives;
     104            this.formerCheckedPrimitives = formerCheckedPrimitives;
    105105            this.licenseCheck = new BasicLicenseCheck(plugin);
    106106        }
     
    141141        {
    142142            getProgressMonitor().indeterminateSubTask(tr("Loading from Quick History Service..."));
    143             plugin.loadDataFromQuickHistoryService(validatedPrimitives);
     143            plugin.loadDataFromQuickHistoryService(checkedPrimitives);
    144144            problems = new ArrayList<LicenseProblem>(200);
    145145            int testCounter = 0;
    146146            getProgressMonitor().indeterminateSubTask(tr("Analyzing..."));
    147             //licenseCheck.startCheck(getProgressMonitor().createSubTaskMonitor(validatedPrimitives.size(), false));
     147            //licenseCheck.startCheck(getProgressMonitor().createSubTaskMonitor(checkedPrimitives.size(), false));
    148148            licenseCheck.startCheck(getProgressMonitor());
    149             licenseCheck.visit(validatedPrimitives);
     149            licenseCheck.visit(checkedPrimitives);
    150150            licenseCheck.endCheck();
    151151            problems.addAll(licenseCheck.getProblems());
  • applications/editors/josm/plugins/licensechange/src/org/openstreetmap/josm/plugins/licensechange/LicenseChangePlugin.java

    r27400 r27470  
    174174                String s = atts.getValue("severity");
    175175
    176                 if (!"undecided".equals(d) && !"no".equals(d)) return;
     176                if (!"undecided".equals(d) && !"no".equals(d) && !"anonymous".equals(d)) return;
    177177
    178178                if ("normal".equals(s) && "first".equals(v)) s = "first";
Note: See TracChangeset for help on using the changeset viewer.