- Timestamp:
- 2016-03-15T02:16:30+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/routines/EmailValidator.java
r9921 r9997 137 137 138 138 /** 139 * Protected constructor for subclasses to use.140 *141 * @param allowLocal Should local addresses be considered valid?142 */143 protected EmailValidator(boolean allowLocal) {144 super();145 this.allowLocal = allowLocal;146 this.allowTld = false;147 }148 149 /**150 139 * <p>Checks if a field has a valid e-mail address.</p> 151 140 * -
trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
r9799 r9997 16 16 import java.util.Collection; 17 17 import java.util.HashMap; 18 import java.util.HashSet; 18 19 import java.util.List; 19 20 import java.util.Locale; … … 128 129 protected static final int MISSPELLED_KEY = 1213; 129 130 protected static final int MULTIPLE_SPACES = 1214; 130 / ** 1250 and up is used by tagcheck */131 // 1250 and up is used by tagcheck 131 132 132 133 protected EditableList sourcesList; 133 134 134 private static final List<String> DEFAULT_SOURCES = Arrays.asList(/*DATA_FILE, */IGNORE_FILE, SPELL_FILE);135 private static final Set<String> DEFAULT_SOURCES = new HashSet<>(Arrays.asList(/*DATA_FILE, */IGNORE_FILE, SPELL_FILE)); 135 136 136 137 /** -
trunk/src/org/openstreetmap/josm/gui/MapFrame.java
r9996 r9997 131 131 132 132 // Toggle dialogs 133 134 /** Conflict dialog */ 133 135 public ConflictDialog conflictDialog; 136 /** Filter dialog */ 134 137 public FilterDialog filterDialog; 138 /** Relation list dialog */ 135 139 public RelationListDialog relationListDialog; 140 /** Validator dialog */ 136 141 public ValidatorDialog validatorDialog; 142 /** Selection list dialog */ 137 143 public SelectionListDialog selectionListDialog; 144 /** Properties dialog */ 138 145 public PropertiesDialog propertiesDialog; 146 /** Map paint dialog */ 139 147 public MapPaintDialog mapPaintDialog; 148 /** Notes dialog */ 140 149 public NotesDialog noteDialog; 141 150 142 151 // Map modes 152 153 /** Select mode */ 143 154 public final SelectAction mapModeSelect; 155 /** Draw mode */ 144 156 public final DrawAction mapModeDraw; 157 /** Zoom mode */ 145 158 public final ZoomAction mapModeZoom; 159 /** Select Lasso mode */ 146 160 public LassoModeAction mapModeSelectLasso; 147 161 -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java
r9668 r9997 6 6 import java.beans.PropertyChangeListener; 7 7 import java.beans.PropertyChangeSupport; 8 import java.lang.reflect.Constructor;9 8 import java.lang.reflect.Method; 10 9 import java.util.ArrayList; … … 105 104 Boolean canEdit = (Boolean) m.invoke(null, r); 106 105 if (canEdit) { 107 Constructor<RelationEditor> con = e.getConstructor(Relation.class, Collection.class); 108 return con.newInstance(layer, r, selectedMembers); 106 return e.getConstructor(Relation.class, Collection.class).newInstance(layer, r, selectedMembers); 109 107 } 110 108 } catch (Exception ex) { -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r9880 r9997 1391 1391 } catch (NumberFormatException nfe) { 1392 1392 // Invalid timezone 1393 throw new ParseException(error, 0);1393 throw (ParseException) new ParseException(error, 0).initCause(nfe); 1394 1394 } 1395 1395 … … 1459 1459 return Offset.milliseconds(Math.round(Double.parseDouble(offset) * 1000)); 1460 1460 } catch (NumberFormatException nfe) { 1461 throw new ParseException(error, 0);1461 throw (ParseException) new ParseException(error, 0).initCause(nfe); 1462 1462 } 1463 1463 } else { -
trunk/src/org/openstreetmap/josm/io/CertificateAmendment.java
r9995 r9997 38 38 * 39 39 * The certificates are added in-memory at each start, nothing is written to disk. 40 * @since 9995 40 41 */ 41 public class CertificateAmendment {42 public final class CertificateAmendment { 42 43 43 p ublic static final String[] CERT_AMEND = {44 private static final String[] CERT_AMEND = { 44 45 "resource://data/security/DST_Root_CA_X3.pem", 45 46 "resource://data/security/StartCom_Certification_Authority.pem" 46 47 }; 47 public static final String[] SHA_HASHES = { 48 49 private static final String[] SHA_HASHES = { 48 50 "139a5e4a4e0fa505378c72c5f700934ce8333f4e6b1b508886c4b0eb14f4be99", 49 51 "916a8f9232328192968c81c8edb672fa539f726861dfe379ca722050e19962cd" 50 52 }; 53 54 private CertificateAmendment() { 55 // Hide default constructor for utility classes 56 } 51 57 52 58 /** … … 81 87 for (int i = 0; i < CERT_AMEND.length; i++) { 82 88 CachedFile certCF = new CachedFile(CERT_AMEND[i]); 83 byte[] certBytes = certCF.getByteContent();84 89 MessageDigest md; 85 90 try { … … 88 93 throw new RuntimeException(ex); 89 94 } 95 byte[] certBytes = certCF.getByteContent(); 90 96 byte[] sha = md.digest(certBytes); 91 97 if (!SHA_HASHES[i].equals(Utils.toHexString(sha))) … … 131 137 */ 132 138 private static boolean certificateIsMissing(KeyStore keyStore, X509Certificate crt) { 133 String id = crt.getSubjectX500Principal().getName();134 139 PKIXParameters params; 135 140 try { … … 140 145 throw new RuntimeException(ex); 141 146 } 147 String id = crt.getSubjectX500Principal().getName(); 142 148 for (TrustAnchor ta : params.getTrustAnchors()) { 143 149 X509Certificate cert = ta.getTrustedCert(); -
trunk/src/org/openstreetmap/josm/tools/CopyList.java
r9231 r9997 183 183 } catch (IndexOutOfBoundsException e) { 184 184 checkForComodification(); 185 throw new NoSuchElementException(e.getMessage());185 throw (NoSuchElementException) new NoSuchElementException(e.getMessage()).initCause(e); 186 186 } 187 187 } -
trunk/src/org/openstreetmap/josm/tools/OverpassTurboQueryWizard.java
r9856 r9997 72 72 return query; 73 73 } catch (NoSuchMethodException e) { 74 throw new IllegalStateException( );74 throw new IllegalStateException(e); 75 75 } catch (ScriptException e) { 76 76 throw new RuntimeException("Failed to execute OverpassTurboQueryWizard", e); 77 77 } 78 78 } 79 80 79 } -
trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java
r9823 r9997 137 137 return XML_DATE.newXMLGregorianCalendar(str).toGregorianCalendar().getTimeInMillis(); 138 138 } catch (Exception ex) { 139 throw new UncheckedParseException("The date string (" + str + ") could not be parsed." );139 throw new UncheckedParseException("The date string (" + str + ") could not be parsed.", ex); 140 140 } 141 141 }
Note:
See TracChangeset
for help on using the changeset viewer.