From 93438cade8dc40abe10a6199749095efea19031b Mon Sep 17 00:00:00 2001 From: Sergey Grant Date: Thu, 3 Dec 2015 14:28:10 -0800 Subject: [PATCH] Minor code cleanup. Change-Id: Id546bda87390aa7501b19ce22b3835858df09e51 Signed-off-by: Sergey Grant --- .../cdt/dsf/mi/service/command/commands/MICommand.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MICommand.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MICommand.java index 7b23078af56..28e9a92d2c9 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MICommand.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MICommand.java @@ -166,11 +166,11 @@ public class MICommand implements ICommand { } String opt = optionsToString(); - if (!opt.isEmpty()) { + if (opt.length() > 0) { command.append(' ').append(opt); } String p = parametersToString(); - if (!p.isEmpty()) { + if (p.length() > 0) { command.append(' ').append(p); } command.append('\n'); @@ -212,7 +212,7 @@ public class MICommand implements ICommand { protected String optionsToString() { StringBuffer sb = new StringBuffer(); - if (fOptions != null && !fOptions.isEmpty()) { + if (fOptions != null && fOptions.size() > 0) { for (Adjustable option : fOptions) { sb.append(option.getAdjustedValue()); } @@ -223,7 +223,7 @@ public class MICommand implements ICommand { protected String parametersToString() { String[] options = getOptions(); StringBuffer buffer = new StringBuffer(); - if (fParameters != null && !fParameters.isEmpty()) { + if (fParameters != null && fParameters.size() > 0) { // According to GDB/MI spec // Add a "--" separator if any parameters start with "-" if (options != null && options.length > 0) {