Changeset 7497 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/Lanes.java
r7308 r7497 1 1 // License: GPL. See LICENSE file for details. 2 2 package org.openstreetmap.josm.data.validation.tests; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 6 import java.util.ArrayList; 7 import java.util.Collection; 8 import java.util.HashSet; 9 import java.util.Set; 10 import java.util.regex.Pattern; 3 11 4 12 import org.openstreetmap.josm.Main; … … 9 17 import org.openstreetmap.josm.tools.Predicates; 10 18 import org.openstreetmap.josm.tools.Utils; 11 12 import java.util.Collection;13 import java.util.HashSet;14 import java.util.Set;15 import java.util.regex.Pattern;16 17 import static org.openstreetmap.josm.tools.I18n.tr;18 19 19 20 /** … … 35 36 36 37 protected void checkNumberOfLanesByKey(final OsmPrimitive p, String lanesKey, String message) { 37 final Collection<String> keysForPattern = Utils.filter(p.keySet(), 38 Predicates.stringContainsPattern(Pattern.compile(":" + lanesKey + "$"))); 38 final Collection<String> keysForPattern = new ArrayList<>(Utils.filter(p.keySet(), 39 Predicates.stringContainsPattern(Pattern.compile(":" + lanesKey + "$")))); 40 keysForPattern.remove("source:lanes"); 39 41 if (keysForPattern.size() < 1) { 40 42 // nothing to check -
trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
r7402 r7497 28 28 import static org.openstreetmap.josm.tools.I18n.tr; 29 29 30 import java.awt.GraphicsEnvironment; 30 31 import java.io.File; 31 32 import java.io.IOException; … … 265 266 return false; 266 267 } 267 // JOSM certificate not found, warn user 268 StringBuilder message = new StringBuilder("<html>"); 269 message.append(tr("Remote Control is configured to provide HTTPS support.<br>"+ 270 "This requires to add a custom certificate generated by JOSM to the Windows Root CA store.<br><br>"+ 271 "You are now going to be prompted by Windows to confirm this operation.<br>"+ 272 "To enable proper HTTPS support, <b>please click Yes</b> in next dialog.<br><br>"+ 273 "If unsure, you can also click No then disable HTTPS support in Remote Control preferences.")); 274 message.append("</html>"); 275 JOptionPane.showMessageDialog(Main.parent, message.toString(), 276 tr("HTTPS support in Remote Control"), JOptionPane.INFORMATION_MESSAGE); 268 if (!GraphicsEnvironment.isHeadless()) { 269 // JOSM certificate not found, warn user 270 StringBuilder message = new StringBuilder("<html>"); 271 message.append(tr("Remote Control is configured to provide HTTPS support.<br>"+ 272 "This requires to add a custom certificate generated by JOSM to the Windows Root CA store.<br><br>"+ 273 "You are now going to be prompted by Windows to confirm this operation.<br>"+ 274 "To enable proper HTTPS support, <b>please click Yes</b> in next dialog.<br><br>"+ 275 "If unsure, you can also click No then disable HTTPS support in Remote Control preferences.")); 276 message.append("</html>"); 277 JOptionPane.showMessageDialog(Main.parent, message.toString(), 278 tr("HTTPS support in Remote Control"), JOptionPane.INFORMATION_MESSAGE); 279 } 277 280 // install it to Windows-ROOT keystore, used by IE, Chrome and Safari, but not by Firefox 278 281 Main.info(tr("Adding JOSM localhost certificate to {0} keystore", WINDOWS_ROOT)); -
trunk/test/config/unit-josm.home
- Property svn:ignore
-
old new 4 4 preferences.xml 5 5 validator 6 remotecontrol
-
- Property svn:ignore
-
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/LanesTest.groovy
r7357 r7497 1 1 package org.openstreetmap.josm.data.validation.tests 2 2 3 import org.openstreetmap.josm.JOSMFixture 3 4 import org.openstreetmap.josm.data.osm.OsmUtils 4 5 … … 9 10 @Override 10 11 void setUp() { 12 JOSMFixture.createUnitTestFixture().init() 11 13 lanes.initialize() 12 14 lanes.startTest(null) … … 60 62 assert lanes.errors.isEmpty() 61 63 } 64 65 void test9() { 66 lanes.check(OsmUtils.createPrimitive("way highway=secondary lanes=2 source:lanes=survey")) 67 assert lanes.errors.isEmpty() 68 } 62 69 }
Note:
See TracChangeset
for help on using the changeset viewer.