251252253254255256257258259260261
} rs.close(); s.close(); String[] result = new String[v.size()]; result = (String[]) v.toArray(result); return result; } catch (SQLException sqle) { if (sqle instanceof com.mysql.jdbc.CommunicationsException && !reconnectLoop) { logger.log(BasicLevel.WARN, "Database reconnection problem at list, Reconnecting");
180181182183184185186187188189190
// at least one filter if (objects.size() == 0) objects.add(new AllFilter()); setFilters((Filter[]) objects.toArray(new Filter[objects.size()])); objects = new Vector(); while ((tmpStr = Utils.getOption("R", options)).length() != 0) { if (tmpStr.startsWith("inv(") && tmpStr.endsWith(")")) { range = new Range(tmpStr.substring(4, tmpStr.length() - 1));
198199200201202203204205206207208
// at least one Range if (objects.size() == 0) objects.add(new Range("first-last")); setRanges((Range[]) objects.toArray(new Range[objects.size()])); // is number of filters the same as ranges? checkDimensions(); }
237238239240241242243244245246247
tmpStr = "inv(" + tmpStr + ")"; result.add("-R"); result.add(tmpStr); } return (String[]) result.toArray(new String[result.size()]); } /** * checks whether the dimensions of filters and ranges fit together. *
126127128129130131132133134135136
result.add(options[i]); result.add("-model"); result.add("" + getModelFile()); return (String[]) result.toArray(new String[result.size()]); } /** * Parses the options for this object. <p/> *
256257258259260261262263264265266
} if (getDebug()) options.add("-D"); return (String[]) options.toArray(new String[options.size()]); } /** * Makes a database query using the query set through the -Q option * to convert a table into a set of instances
376377378379380381382383384385386
options = super.getOptions(); for (i = 0; i < options.length; i++) result.add(options[i]); return (String[]) result.toArray(new String[result.size()]); } /** * Parses a given list of options. <p/> *
267268269270271272273274275276277
} else ret.add(comp[i]); } return (MessageComponent[]) ret.toArray(new MessageComponent[0]); } /** * Split a text component to smileys and plain text. *
356357358359360361362363364365366
} else ret.add(comp[i]); } return (MessageComponent[]) ret.toArray(new MessageComponent[0]); } private static Pattern fontColorPattern = Pattern.compile("(<font\\s+(face\\s*=\\s*\"(.+)\"\\s*)?size\\s*=\\s*\"(\\d+)\">)|(\033\\[((\\d+)|(#([0-9a-fA-F]+)))m)"); /** * Parses a text component to extract font and color information.
940941942943944945946947948949950
tok = new StringTokenizer(split[1], ","); for(int j = 0; tok.hasMoreTokens(); j++) buddyVector.add(new Buddy(this, tok.nextToken(), split[0])); } return (Buddy[])buddyVector.toArray(new Buddy[0]); } /** * Process the change in status of a user. *