Kaydet (Commit) cd6b7305 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1326980 SBSC: String concatenation in loop using + operator

Change-Id: I91ae690e26a05dbe4424b7f2ac3bd9ad029ebf5c
üst 66103ac9
...@@ -258,15 +258,15 @@ public class dbg { ...@@ -258,15 +258,15 @@ public class dbg {
public static void getSuppServices (Object aObject) { public static void getSuppServices (Object aObject) {
XServiceInfo xSI = UnoRuntime.queryInterface(XServiceInfo.class,aObject); XServiceInfo xSI = UnoRuntime.queryInterface(XServiceInfo.class,aObject);
printArray(xSI.getSupportedServiceNames()); printArray(xSI.getSupportedServiceNames());
String str="Therein not Supported Service"; StringBuilder str = new StringBuilder("Therein not Supported Service");
boolean notSupportedServices = false; boolean notSupportedServices = false;
for (int i=0;i<xSI.getSupportedServiceNames().length;i++) { for (int i=0;i<xSI.getSupportedServiceNames().length;i++) {
if (! xSI.supportsService(xSI.getSupportedServiceNames()[i])) { if (! xSI.supportsService(xSI.getSupportedServiceNames()[i])) {
notSupportedServices = true; notSupportedServices = true;
str+="\n" + xSI.getSupportedServiceNames()[i]; str.append("\n").append(xSI.getSupportedServiceNames()[i]);
} }
} }
if (notSupportedServices) if (notSupportedServices)
System.out.println(str); System.out.println(str.toString());
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment