Ignore:
Timestamp:
2015-05-18T23:34:11+02:00 (9 years ago)
Author:
Don-vip
Message:
  • global use of String.isEmpty()
  • Correctness - Method throws alternative exception from catch block without history
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java

    r8308 r8394  
    984984        public void validate() {
    985985            String value  = getComponent().getText();
    986             if (value == null || value.trim().length() == 0) {
     986            if (value == null || value.trim().isEmpty()) {
    987987                feedbackInvalid("");
    988988                return;
     
    10031003        public int getUid() {
    10041004            String value  = getComponent().getText();
    1005             if (value == null || value.trim().length() == 0) return 0;
     1005            if (value == null || value.trim().isEmpty()) return 0;
    10061006            try {
    10071007                int uid = Integer.parseInt(value.trim());
     
    10311031        public void validate() {
    10321032            String value  = getComponent().getText();
    1033             if (value.trim().length() == 0) {
     1033            if (value.trim().isEmpty()) {
    10341034                feedbackInvalid(tr("<html>The  current value is not a valid user name.<br>Please enter an non-empty user name.</html>"));
    10351035                return;
     
    11201120        @Override
    11211121        public boolean isValid() {
    1122             if (getComponent().getText().trim().length() == 0) return true;
     1122            if (getComponent().getText().trim().isEmpty()) return true;
    11231123            return getDate() != null;
    11241124        }
     
    11571157
    11581158        public Date getDate() {
    1159             if (getComponent().getText().trim().length() == 0)
     1159            if (getComponent().getText().trim().isEmpty())
    11601160                return null;
    11611161
Note: See TracChangeset for help on using the changeset viewer.