Skip to content

Commit

Permalink
Delete dangling parentheses.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Jan 31, 2025
1 parent 1e3808c commit f5ef9cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3483,7 +3483,7 @@ public boolean validateMenuItem(final NSMenuItem item) {
final NSArray elements = Rococoa.cast(o, NSArray.class);
if(elements.count().intValue() == 1) {
item.setTitle(MessageFormat.format(LocaleFactory.localizedString(title),
"\"" + elements.objectAtIndex(new NSUInteger(0)) + "\"").trim());
String.format("\"%s\"", elements.objectAtIndex(new NSUInteger(0)))).trim());
}
else {
item.setTitle(MessageFormat.format(LocaleFactory.localizedString(title),
Expand All @@ -3498,7 +3498,7 @@ public boolean validateMenuItem(final NSMenuItem item) {
else {
if(pasteboard.size() == 1) {
item.setTitle(MessageFormat.format(LocaleFactory.localizedString(title),
"\"" + pasteboard.get(0).getName() + "\"").trim());
String.format("\"%s\"", pasteboard.get(0).getName())).trim());
}
else {
item.setTitle(MessageFormat.format(LocaleFactory.localizedString(title),
Expand All @@ -3508,13 +3508,7 @@ public boolean validateMenuItem(final NSMenuItem item) {
}
}
else if(action.equals(Foundation.selector("cut:")) || action.equals(Foundation.selector("copy:"))) {
String title = null;
if(action.equals(Foundation.selector("cut:"))) {
title = "Cut {0}";
}
else if(action.equals(Foundation.selector("copy:"))) {
title = "Copy {0}";
}
final String title = action.equals(Foundation.selector("cut:")) ? "Cut {0}" : "Copy {0}";
if(this.isMounted()) {
int count = this.getSelectionCount();
if(0 == count) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ public boolean validateMenuItem(final NSMenuItem item) {
}
else {
item.setTitle(MessageFormat.format(LocaleFactory.localizedString("Paste {0}"),
MessageFormat.format(LocaleFactory.localizedString("{0} Items"), String.valueOf(pasteboard.size())) + ")"));
MessageFormat.format(LocaleFactory.localizedString("{0} Items"), String.valueOf(pasteboard.size()))));
}
}
}
Expand Down

0 comments on commit f5ef9cf

Please sign in to comment.