Changeset 10097 in josm for trunk/src/org
- Timestamp:
- 2016-04-02T13:04:59+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java
r10035 r10097 18 18 import java.beans.PropertyChangeEvent; 19 19 import java.beans.PropertyChangeListener; 20 import java.lang.Character.UnicodeBlock; 20 21 import java.util.ArrayList; 21 22 import java.util.Collection; … … 503 504 } 504 505 506 static boolean isUploadCommentTooShort(String comment) { 507 String s = comment.trim(); 508 boolean result = true; 509 if (!s.isEmpty()) { 510 UnicodeBlock block = Character.UnicodeBlock.of(s.charAt(0)); 511 if (block.toString().contains("CJK")) { 512 result = s.length() < 4; 513 } else { 514 result = s.length() < 10; 515 } 516 } 517 return result; 518 } 519 505 520 @Override 506 521 public void actionPerformed(ActionEvent e) { 507 if ( dialog.getUploadComment().trim().length() < 10&& warnUploadComment()) {522 if (isUploadCommentTooShort(dialog.getUploadComment()) && warnUploadComment()) { 508 523 // abort for missing comment 509 524 dialog.handleMissingComment();
Note:
See TracChangeset
for help on using the changeset viewer.