diff options
Diffstat (limited to 'org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AddMarkerAction.java')
-rw-r--r-- | org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AddMarkerAction.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AddMarkerAction.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AddMarkerAction.java index 988415a4d41..2161baf3f73 100644 --- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AddMarkerAction.java +++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AddMarkerAction.java @@ -182,7 +182,7 @@ public class AddMarkerAction extends TextEditorAction { IInputValidator inputValidator= new IInputValidator() { @Override public String isValid(String newText) { - return (newText == null || newText.trim().length() == 0) ? " " : null; //$NON-NLS-1$ + return (newText == null || newText.trim().isEmpty()) ? " " : null; //$NON-NLS-1$ } }; InputDialog dialog= new InputDialog(getTextEditor().getSite().getShell(), title, message, proposal, inputValidator); @@ -195,7 +195,7 @@ public class AddMarkerAction extends TextEditorAction { return false; label= label.trim(); - if (label.length() == 0) + if (label.isEmpty()) return false; attributes.put("message", label); //$NON-NLS-1$ |