1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 09:46:02 +02:00

Reverted an erroneous change.

This reverts commit 93438cade8.

Change-Id: I98d351ef120960b79cf969fd63c861cc5dc83825
This commit is contained in:
Sergey Prigogin 2015-12-04 12:46:08 -05:00
parent dd3815bb91
commit 2df93034f3

View file

@ -166,11 +166,11 @@ public class MICommand<V extends MIInfo> implements ICommand<V> {
} }
String opt = optionsToString(); String opt = optionsToString();
if (opt.length() > 0) { if (!opt.isEmpty()) {
command.append(' ').append(opt); command.append(' ').append(opt);
} }
String p = parametersToString(); String p = parametersToString();
if (p.length() > 0) { if (!p.isEmpty()) {
command.append(' ').append(p); command.append(' ').append(p);
} }
command.append('\n'); command.append('\n');
@ -212,7 +212,7 @@ public class MICommand<V extends MIInfo> implements ICommand<V> {
protected String optionsToString() { protected String optionsToString() {
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
if (fOptions != null && fOptions.size() > 0) { if (fOptions != null && !fOptions.isEmpty()) {
for (Adjustable option : fOptions) { for (Adjustable option : fOptions) {
sb.append(option.getAdjustedValue()); sb.append(option.getAdjustedValue());
} }
@ -223,7 +223,7 @@ public class MICommand<V extends MIInfo> implements ICommand<V> {
protected String parametersToString() { protected String parametersToString() {
String[] options = getOptions(); String[] options = getOptions();
StringBuffer buffer = new StringBuffer(); StringBuffer buffer = new StringBuffer();
if (fParameters != null && fParameters.size() > 0) { if (fParameters != null && !fParameters.isEmpty()) {
// According to GDB/MI spec // According to GDB/MI spec
// Add a "--" separator if any parameters start with "-" // Add a "--" separator if any parameters start with "-"
if (options != null && options.length > 0) { if (options != null && options.length > 0) {