String[] temp = (String[]) foo.toArray(); <-- may cause class cast exception it is better to use: String[] temp = foo.toArray(new String[foo.size()]) git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1173607 13f79535-47bb-0310-9956-ffa450edef68