Kaydet (Commit) 85ab4a14 authored tarafından rbuj's avatar rbuj Kaydeden (comit) David Tardon

jurt: Use <T> T[] toArray(T[] a)

http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Set.html#toArray%28T%5b%5d%29

Change-Id: I601e77db3cc978d81aebddfe6abba1c020671913
Reviewed-on: https://gerrit.libreoffice.org/10853Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst c77e929c
...@@ -188,15 +188,12 @@ public class ServiceManager implements XMultiServiceFactory, ...@@ -188,15 +188,12 @@ public class ServiceManager implements XMultiServiceFactory,
public String[] getAvailableServiceNames() public String[] getAvailableServiceNames()
throws com.sun.star.uno.RuntimeException throws com.sun.star.uno.RuntimeException
{ {
int i = 0; try{
String[] availableServiceNames = new String[factoriesByServiceNames.size()]; return factoriesByServiceNames.keySet().toArray(
new String[ factoriesByServiceNames.size() ] );
java.util.Iterator<String> keys = factoriesByServiceNames.keySet().iterator(); } catch(Exception ex) {
throw new com.sun.star.uno.RuntimeException(ex.toString());
while (keys.hasNext()) }
availableServiceNames[i++] = keys.next();
return availableServiceNames;
} }
// XMultiComponentFactory implementation // XMultiComponentFactory implementation
......
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