svn commit: r754653 - in /commons/proper/lang/trunk/src: java/org/apache/commons/lang/Entities.java test/org/apache/commons/lang/EntitiesPerformanceTest.java
Author: sebb Date: Sun Mar 15 11:18:30 2009 New Revision: 754653 URL: http://svn.apache.org/viewvc?rev=754653view=rev Log: Don't expose static arrays to potential writes, even for testing Add package protected read method instead Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/Entities.java commons/proper/lang/trunk/src/test/org/apache/commons/lang/EntitiesPerformanceTest.java Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/Entities.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/Entities.java?rev=754653r1=754652r2=754653view=diff == --- commons/proper/lang/trunk/src/java/org/apache/commons/lang/Entities.java (original) +++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/Entities.java Sun Mar 15 11:18:30 2009 @@ -51,8 +51,7 @@ private static final String[][] APOS_ARRAY = {{apos, 39}, // XML apostrophe }; -// package scoped for testing -static final String[][] ISO8859_1_ARRAY = {{nbsp, 160}, // non-breaking space +private static final String[][] ISO8859_1_ARRAY = {{nbsp, 160}, // non-breaking space {iexcl, 161}, // inverted exclamation mark {cent, 162}, // cent sign {pound, 163}, // pound sign @@ -150,9 +149,15 @@ {yuml, 255}, // ÿ - lowercase y, umlaut }; -// http://www.w3.org/TR/REC-html40/sgml/entities.html // package scoped for testing -static final String[][] HTML40_ARRAY = { +static int ISO8859_1_ARRAY_LENGTH = ISO8859_1_ARRAY.length; + +static String getISO8859_1(int i, int j) { +return ISO8859_1_ARRAY[i][j]; +} + +// http://www.w3.org/TR/REC-html40/sgml/entities.html +private static final String[][] HTML40_ARRAY = { // !-- Latin Extended-B -- {fnof, 402}, // latin small f with hook = function= florin, U+0192 ISOtech -- // !-- Greek -- @@ -348,6 +353,13 @@ // !-- rsaquo is proposed but not yet ISO standardized -- {euro, 8364}, // -- euro sign, U+20AC NEW -- }; + +// package scoped for testing +static int HTML40_ARRAY_LENGTH = HTML40_ARRAY.length; + +static String getHTML40(int i, int j) { +return HTML40_ARRAY[i][j]; +} /** * p @@ -438,9 +450,9 @@ } static class PrimitiveEntityMap implements EntityMap { -private Map mapNameToValue = new HashMap(); +private final Map mapNameToValue = new HashMap(); -private IntHashMap mapValueToName = new IntHashMap(); +private final IntHashMap mapValueToName = new IntHashMap(); /** * {...@inheritdoc} Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/EntitiesPerformanceTest.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/EntitiesPerformanceTest.java?rev=754653r1=754652r2=754653view=diff == --- commons/proper/lang/trunk/src/test/org/apache/commons/lang/EntitiesPerformanceTest.java (original) +++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/EntitiesPerformanceTest.java Sun Mar 15 11:18:30 2009 @@ -62,13 +62,13 @@ } private char html40value(int i) { -String entityValue = Entities.HTML40_ARRAY[i % Entities.HTML40_ARRAY.length][1]; +String entityValue = Entities.getHTML40(i % Entities.HTML40_ARRAY_LENGTH, 1); char ch = (char) Integer.parseInt(entityValue); return ch; } private char isovalue(int i) { -String entityValue = Entities.ISO8859_1_ARRAY[i % Entities.ISO8859_1_ARRAY.length][1]; +String entityValue = Entities.getISO8859_1(i % Entities.ISO8859_1_ARRAY_LENGTH, 1); char ch = (char) Integer.parseInt(entityValue); return ch; }
svn commit: r754677 - /commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSetUtils.java
Author: sebb Date: Sun Mar 15 15:06:03 2009 New Revision: 754677 URL: http://svn.apache.org/viewvc?rev=754677view=rev Log: LANG-438 - replace links to Javadoc that was deleted with the deprecated methods Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSetUtils.java Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSetUtils.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSetUtils.java?rev=754677r1=754676r2=754677view=diff == --- commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSetUtils.java (original) +++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSetUtils.java Sun Mar 15 15:06:03 2009 @@ -58,7 +58,7 @@ * CharSetUtils.squeeze(hello, a-e) = hello * /pre * - * @see #evaluateSet(java.lang.String[]) for set-syntax. + * @see CharSet#getInstance(java.lang.String) for set-syntax. * @param str the string to squeeze, may be null * @param set the character set to use for manipulation, may be null * @return modified String, codenull/code if null string input @@ -81,7 +81,7 @@ * lisqueeze(quot;helloquot;, {quot;elquot;}) = quot;heloquot;/li * /ul * - * @see #evaluateSet(java.lang.String[]) for set-syntax. + * @see CharSet#getInstance(java.lang.String) for set-syntax. * @param str the string to squeeze, may be null * @param set the character set to use for manipulation, may be null * @return modified String, codenull/code if null string input @@ -124,7 +124,7 @@ * CharSetUtils.count(hello, a-e) = 1 * /pre * - * @see #evaluateSet(java.lang.String[]) for set-syntax. + * @see CharSet#getInstance(java.lang.String) for set-syntax. * @param str String to count characters in, may be null * @param set String set of characters to count, may be null * @return character count, zero if null string input @@ -147,7 +147,7 @@ * licount(quot;helloquot;, {quot;c-fquot;, quot;oquot;}) returns 2./li * /ul * - * @see #evaluateSet(java.lang.String[]) for set-syntax. + * @see CharSet#getInstance(java.lang.String) for set-syntax. * @param str String to count characters in, may be null * @param set String[] set of characters to count, may be null * @return character count, zero if null string input @@ -183,7 +183,7 @@ * CharSetUtils.keep(hello, le) = ell * /pre * - * @see #evaluateSet(java.lang.String[]) for set-syntax. + * @see CharSet#getInstance(java.lang.String) for set-syntax. * @param str String to keep characters from, may be null * @param set String set of characters to keep, may be null * @return modified String, codenull/code if null string input @@ -211,7 +211,7 @@ * returns quot;eoquot;/li * /ul * - * @see #evaluateSet(java.lang.String[]) for set-syntax. + * @see CharSet#getInstance(java.lang.String) for set-syntax. * @param str String to keep characters from, may be null * @param set String[] set of characters to keep, may be null * @return modified String, codenull/code if null string input @@ -242,7 +242,7 @@ * CharSetUtils.delete(hello, le) = ho * /pre * - * @see #evaluateSet(java.lang.String[]) for set-syntax. + * @see CharSet#getInstance(java.lang.String) for set-syntax. * @param str String to delete characters from, may be null * @param set String set of characters to delete, may be null * @return modified String, codenull/code if null string input @@ -266,7 +266,7 @@ * quot;hllquot;/li * /ul * - * @see #evaluateSet(java.lang.String[]) for set-syntax. + * @see CharSet#getInstance(java.lang.String) for set-syntax. * @param str String to delete characters from, may be null * @param set String[] set of characters to delete, may be null * @return modified String, codenull/code if null string input
svn commit: r754678 - /commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSet.java
Author: sebb Date: Sun Mar 15 15:27:48 2009 New Revision: 754678 URL: http://svn.apache.org/viewvc?rev=754678view=rev Log: Genericize; add final qualifier to private var Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSet.java Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSet.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSet.java?rev=754678r1=754677r2=754678view=diff == --- commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSet.java (original) +++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/CharSet.java Sun Mar 15 15:27:48 2009 @@ -79,7 +79,7 @@ * Subclasses can add more common patterns if desired. * @since 2.0 */ -protected static final Map COMMON = new HashMap(); +protected static final MapString, CharSet COMMON = new HashMapString, CharSet(); static { COMMON.put(null, EMPTY); @@ -92,7 +92,7 @@ } /** The set of CharRange objects. */ -private Set set = new HashSet(); +private final SetCharRange set = new HashSetCharRange(); //--- /** @@ -231,7 +231,7 @@ * @since 2.0 */ public CharRange[] getCharRanges() { -return (CharRange[]) set.toArray(new CharRange[set.size()]); +return set.toArray(new CharRange[set.size()]); } //--- @@ -243,8 +243,8 @@ * @return codetrue/code if the set contains the characters */ public boolean contains(char ch) { -for (Iterator it = set.iterator(); it.hasNext();) { -CharRange range = (CharRange) it.next(); +for (IteratorCharRange it = set.iterator(); it.hasNext();) { +CharRange range = it.next(); if (range.contains(ch)) { return true; }
svn commit: r754682 - /commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java
Author: sebb Date: Sun Mar 15 16:11:01 2009 New Revision: 754682 URL: http://svn.apache.org/viewvc?rev=754682view=rev Log: Genericize; remove invalid Javadoc reference Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java?rev=754682r1=754681r2=754682view=diff == --- commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java (original) +++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java Sun Mar 15 16:11:01 2009 @@ -1989,7 +1989,7 @@ } int closeLen = close.length(); int openLen = open.length(); -List list = new ArrayList(); +ListString list = new ArrayListString(); int pos = 0; while (pos (strLen - closeLen)) { int start = str.indexOf(open, pos); @@ -2007,7 +2007,7 @@ if (list.isEmpty()) { return null; } -return (String[]) list.toArray(new String [list.size()]); +return list.toArray(new String [list.size()]); } // Nested extraction @@ -2286,7 +2286,7 @@ int separatorLength = separator.length(); -ArrayList substrings = new ArrayList(); +ArrayListString substrings = new ArrayListString(); int numberOfSubstrings = 0; int beg = 0; int end = 0; @@ -2330,7 +2330,7 @@ } } -return (String[]) substrings.toArray(new String[substrings.size()]); +return substrings.toArray(new String[substrings.size()]); } // --- @@ -2420,7 +2420,7 @@ if (len == 0) { return ArrayUtils.EMPTY_STRING_ARRAY; } -List list = new ArrayList(); +ListString list = new ArrayListString(); int i = 0, start = 0; boolean match = false; boolean lastMatch = false; @@ -2441,7 +2441,7 @@ if (match || (preserveAllTokens lastMatch)) { list.add(str.substring(start, i)); } -return (String[]) list.toArray(new String[list.size()]); +return list.toArray(new String[list.size()]); } /** @@ -2547,7 +2547,7 @@ if (len == 0) { return ArrayUtils.EMPTY_STRING_ARRAY; } -List list = new ArrayList(); +ListString list = new ArrayListString(); int sizePlus1 = 1; int i = 0, start = 0; boolean match = false; @@ -2617,7 +2617,7 @@ if (match || (preserveAllTokens lastMatch)) { list.add(str.substring(start, i)); } -return (String[]) list.toArray(new String[list.size()]); +return list.toArray(new String[list.size()]); } /** @@ -2693,7 +2693,7 @@ return ArrayUtils.EMPTY_STRING_ARRAY; } char[] c = str.toCharArray(); -List list = new ArrayList(); +ListString list = new ArrayListString(); int tokenStart = 0; int currentType = Character.getType(c[tokenStart]); for (int pos = tokenStart + 1; pos c.length; pos++) { @@ -2714,7 +2714,7 @@ currentType = type; } list.add(new String(c, tokenStart, c.length - tokenStart)); -return (String[]) list.toArray(new String[list.size()]); +return list.toArray(new String[list.size()]); } // Joining @@ -2925,7 +2925,7 @@ * @return the joined String, codenull/code if null iterator input * @since 2.0 */ -public static String join(Iterator iterator, char separator) { +public static String join(Iterator? iterator, char separator) { // handle null, zero and one elements before building a buffer if (iterator == null) { @@ -2969,7 +2969,7 @@ * @param separator the separator character to use, null treated as * @return the joined String, codenull/code if null iterator input */ -public static String join(Iterator iterator, String separator) { +public static String join(Iterator? iterator, String separator) { // handle null, zero and one elements before building a buffer if (iterator == null) { @@ -3015,7 +3015,7 @@ * @return the joined String, codenull/code if null iterator input * @since 2.3 */ -public static String join(Collection collection, char separator) { +public static String join(Collection? collection, char separator) { if (collection == null) { return null; } @@ -3036,7 +3036,7 @@ * @return the joined String, codenull/code if null iterator input * @since 2.3 */ -public static String join(Collection collection, String separator) {
svn commit: r754686 - in /commons/proper/lang/trunk/src/java/org/apache/commons/lang/text: StrBuilder.java StrTokenizer.java
Author: sebb Date: Sun Mar 15 16:27:34 2009 New Revision: 754686 URL: http://svn.apache.org/viewvc?rev=754686view=rev Log: Genericize Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/StrBuilder.java commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/StrTokenizer.java Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/StrBuilder.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/StrBuilder.java?rev=754686r1=754685r2=754686view=diff == --- commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/StrBuilder.java (original) +++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/StrBuilder.java Sun Mar 15 16:27:34 2009 @@ -946,9 +946,9 @@ * @return this, to enable chaining * @since 2.3 */ -public StrBuilder appendAll(Collection coll) { +public StrBuilder appendAll(Collection? coll) { if (coll != null coll.size() 0) { -Iterator it = coll.iterator(); +Iterator? it = coll.iterator(); while (it.hasNext()) { append(it.next()); } @@ -965,7 +965,7 @@ * @return this, to enable chaining * @since 2.3 */ -public StrBuilder appendAll(Iterator it) { +public StrBuilder appendAll(Iterator? it) { if (it != null) { while (it.hasNext()) { append(it.next()); @@ -1007,10 +1007,10 @@ * @param separator the separator to use, null means no separator * @return this, to enable chaining */ -public StrBuilder appendWithSeparators(Collection coll, String separator) { +public StrBuilder appendWithSeparators(Collection? coll, String separator) { if (coll != null coll.size() 0) { separator = (separator == null ? : separator); -Iterator it = coll.iterator(); +Iterator? it = coll.iterator(); while (it.hasNext()) { append(it.next()); if (it.hasNext()) { @@ -1031,7 +1031,7 @@ * @param separator the separator to use, null means no separator * @return this, to enable chaining */ -public StrBuilder appendWithSeparators(Iterator it, String separator) { +public StrBuilder appendWithSeparators(Iterator? it, String separator) { if (it != null) { separator = (separator == null ? : separator); while (it.hasNext()) { @@ -1292,6 +1292,7 @@ * @return this, to enable chaining * @throws IndexOutOfBoundsException if the index is invalid */ +@SuppressWarnings(null) // str cannot be null public StrBuilder insert(int index, String str) { validateIndex(index); if (str == null) { @@ -1303,7 +1304,7 @@ ensureCapacity(newSize); System.arraycopy(buffer, index, buffer, index + strLen, size - index); size = newSize; -str.getChars(0, strLen, buffer, index); +str.getChars(0, strLen, buffer, index); // str cannot be null here } return this; } @@ -2576,7 +2577,7 @@ /** {...@inheritdoc} */ @Override -protected List tokenize(char[] chars, int offset, int count) { +protected ListString tokenize(char[] chars, int offset, int count) { if (chars == null) { return super.tokenize(StrBuilder.this.buffer, 0, StrBuilder.this.size()); } else { Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/StrTokenizer.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/StrTokenizer.java?rev=754686r1=754685r2=754686view=diff == --- commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/StrTokenizer.java (original) +++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/StrTokenizer.java Sun Mar 15 16:27:34 2009 @@ -455,9 +455,9 @@ * * @return the tokens as a String array */ -public List getTokenList() { +public ListString getTokenList() { checkTokenized(); -List list = new ArrayList(tokens.length); +ListString list = new ArrayListString(tokens.length); for (int i = 0; i tokens.length; i++) { list.add(tokens[i]); } @@ -612,11 +612,11 @@ if (tokens == null) { if (chars == null) { // still call tokenize as subclass may do some work -List split = tokenize(null, 0, 0); -tokens = (String[]) split.toArray(new String[split.size()]); +ListString split = tokenize(null, 0, 0); +tokens = split.toArray(new String[split.size()]); } else { -List
svn commit: r754711 - /commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java
Author: dfabulich Date: Sun Mar 15 18:26:46 2009 New Revision: 754711 URL: http://svn.apache.org/viewvc?rev=754711view=rev Log: Documenting explicitly that SqlNullCheckedResultSet is not thread-safe Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java?rev=754711r1=754710r2=754711view=diff == --- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java (original) +++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java Sun Mar 15 18:26:46 2009 @@ -66,6 +66,7 @@ * /pre * /blockquote * /p + * pUnlike some other classes in DbUtils, this class is NOT thread-safe./p */ public class SqlNullCheckedResultSet implements InvocationHandler {
svn commit: r754713 - /commons/proper/dbutils/trunk/pom.xml
Author: dfabulich Date: Sun Mar 15 18:32:36 2009 New Revision: 754713 URL: http://svn.apache.org/viewvc?rev=754713view=rev Log: Rolling back to prepare for RC3 Modified: commons/proper/dbutils/trunk/pom.xml Modified: commons/proper/dbutils/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/pom.xml?rev=754713r1=754712r2=754713view=diff == --- commons/proper/dbutils/trunk/pom.xml [utf-8] (original) +++ commons/proper/dbutils/trunk/pom.xml [utf-8] Sun Mar 15 18:32:36 2009 @@ -24,7 +24,7 @@ modelVersion4.0.0/modelVersion groupIdcommons-dbutils/groupId artifactIdcommons-dbutils/artifactId - version1.3-SNAPSHOT/version + version1.2-SNAPSHOT/version nameCommons DbUtils/name inceptionYear2002/inceptionYear @@ -181,7 +181,7 @@ properties commons.componentiddbutils/commons.componentid commons.release.version1.2/commons.release.version -commons.rc.versionRC2/commons.rc.version +commons.rc.versionRC3/commons.rc.version commons.binary.suffix / commons.jira.idDBUTILS/commons.jira.id commons.jira.pid12310470/commons.jira.pid
svn commit: r754714 - /commons/proper/dbutils/tags/DBUTILS_1_2/
Author: dfabulich Date: Sun Mar 15 18:33:10 2009 New Revision: 754714 URL: http://svn.apache.org/viewvc?rev=754714view=rev Log: Deleting tag in preparation for RC3 Removed: commons/proper/dbutils/tags/DBUTILS_1_2/
svn commit: r754717 - /commons/proper/dbutils/trunk/pom.xml
Author: dfabulich Date: Sun Mar 15 18:55:21 2009 New Revision: 754717 URL: http://svn.apache.org/viewvc?rev=754717view=rev Log: [maven-release-plugin] prepare release DBUTILS_1_2 Modified: commons/proper/dbutils/trunk/pom.xml Modified: commons/proper/dbutils/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/pom.xml?rev=754717r1=754716r2=754717view=diff == --- commons/proper/dbutils/trunk/pom.xml [utf-8] (original) +++ commons/proper/dbutils/trunk/pom.xml [utf-8] Sun Mar 15 18:55:21 2009 @@ -24,7 +24,7 @@ modelVersion4.0.0/modelVersion groupIdcommons-dbutils/groupId artifactIdcommons-dbutils/artifactId - version1.2-SNAPSHOT/version + version1.2/version nameCommons DbUtils/name inceptionYear2002/inceptionYear @@ -38,9 +38,9 @@ /issueManagement scm - connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/dbutils/trunk/connection - developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/dbutils/trunk/developerConnection -urlhttp://svn.apache.org/viewvc/commons/proper/dbutils/trunk/url + connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/dbutils/tags/DBUTILS_1_2/connection + developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/dbutils/tags/DBUTILS_1_2/developerConnection + urlhttp://svn.apache.org/viewvc/commons/proper/dbutils/tags/DBUTILS_1_2/url /scm developers
svn commit: r754719 - /commons/proper/dbutils/trunk/pom.xml
Author: dfabulich Date: Sun Mar 15 18:55:29 2009 New Revision: 754719 URL: http://svn.apache.org/viewvc?rev=754719view=rev Log: [maven-release-plugin] prepare for next development iteration Modified: commons/proper/dbutils/trunk/pom.xml Modified: commons/proper/dbutils/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/pom.xml?rev=754719r1=754718r2=754719view=diff == --- commons/proper/dbutils/trunk/pom.xml [utf-8] (original) +++ commons/proper/dbutils/trunk/pom.xml [utf-8] Sun Mar 15 18:55:29 2009 @@ -24,7 +24,7 @@ modelVersion4.0.0/modelVersion groupIdcommons-dbutils/groupId artifactIdcommons-dbutils/artifactId - version1.2/version + version1.3-SNAPSHOT/version nameCommons DbUtils/name inceptionYear2002/inceptionYear @@ -38,9 +38,9 @@ /issueManagement scm - connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/dbutils/tags/DBUTILS_1_2/connection - developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/dbutils/tags/DBUTILS_1_2/developerConnection - urlhttp://svn.apache.org/viewvc/commons/proper/dbutils/tags/DBUTILS_1_2/url + connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/dbutils/trunk/connection + developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/dbutils/trunk/developerConnection +urlhttp://svn.apache.org/viewvc/commons/proper/dbutils/trunk/url /scm developers
svn commit: r754721 - /commons/proper/dbutils/trunk/pom.xml
Author: dfabulich Date: Sun Mar 15 19:00:10 2009 New Revision: 754721 URL: http://svn.apache.org/viewvc?rev=754721view=rev Log: Screwed up RC3 attempt, trying again Modified: commons/proper/dbutils/trunk/pom.xml Modified: commons/proper/dbutils/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/pom.xml?rev=754721r1=754720r2=754721view=diff == --- commons/proper/dbutils/trunk/pom.xml [utf-8] (original) +++ commons/proper/dbutils/trunk/pom.xml [utf-8] Sun Mar 15 19:00:10 2009 @@ -24,7 +24,7 @@ modelVersion4.0.0/modelVersion groupIdcommons-dbutils/groupId artifactIdcommons-dbutils/artifactId - version1.3-SNAPSHOT/version + version1.2-SNAPSHOT/version nameCommons DbUtils/name inceptionYear2002/inceptionYear
svn commit: r754722 - /commons/proper/dbutils/trunk/xdocs/changes.xml
Author: dfabulich Date: Sun Mar 15 19:00:48 2009 New Revision: 754722 URL: http://svn.apache.org/viewvc?rev=754722view=rev Log: Noting DBUTILS-52 Modified: commons/proper/dbutils/trunk/xdocs/changes.xml Modified: commons/proper/dbutils/trunk/xdocs/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/xdocs/changes.xml?rev=754722r1=754721r2=754722view=diff == --- commons/proper/dbutils/trunk/xdocs/changes.xml (original) +++ commons/proper/dbutils/trunk/xdocs/changes.xml Sun Mar 15 19:00:48 2009 @@ -39,6 +39,9 @@ /properties body release version=1.2 date=2009-03-06 description=Another round of fixes; deprecates methods in preparation for varargs in java5 + action dev=dfabulich type=update issue=DBUTILS-52 +Removed setDataSource method to guarantee thread safety + /action action dev=sebb type=update issue=DBUTILS-51 Made numerous private instance members final to guarantee thread safety; changed protected member of KeyedHandler to final /action
svn commit: r754723 - /commons/proper/dbutils/tags/DBUTILS_1_2/
Author: dfabulich Date: Sun Mar 15 19:01:24 2009 New Revision: 754723 URL: http://svn.apache.org/viewvc?rev=754723view=rev Log: Repeating RC3 attempt Removed: commons/proper/dbutils/tags/DBUTILS_1_2/
svn commit: r754724 - /commons/proper/dbutils/trunk/pom.xml
Author: dfabulich Date: Sun Mar 15 19:03:08 2009 New Revision: 754724 URL: http://svn.apache.org/viewvc?rev=754724view=rev Log: [maven-release-plugin] prepare release DBUTILS_1_2 Modified: commons/proper/dbutils/trunk/pom.xml Modified: commons/proper/dbutils/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/pom.xml?rev=754724r1=754723r2=754724view=diff == --- commons/proper/dbutils/trunk/pom.xml [utf-8] (original) +++ commons/proper/dbutils/trunk/pom.xml [utf-8] Sun Mar 15 19:03:08 2009 @@ -24,7 +24,7 @@ modelVersion4.0.0/modelVersion groupIdcommons-dbutils/groupId artifactIdcommons-dbutils/artifactId - version1.2-SNAPSHOT/version + version1.2/version nameCommons DbUtils/name inceptionYear2002/inceptionYear @@ -38,9 +38,9 @@ /issueManagement scm - connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/dbutils/trunk/connection - developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/dbutils/trunk/developerConnection -urlhttp://svn.apache.org/viewvc/commons/proper/dbutils/trunk/url + connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/dbutils/tags/DBUTILS_1_2/connection + developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/dbutils/tags/DBUTILS_1_2/developerConnection + urlhttp://svn.apache.org/viewvc/commons/proper/dbutils/tags/DBUTILS_1_2/url /scm developers
svn commit: r754725 - in /commons/proper/dbutils/tags/DBUTILS_1_2: ./ pom.xml
Author: dfabulich Date: Sun Mar 15 19:03:16 2009 New Revision: 754725 URL: http://svn.apache.org/viewvc?rev=754725view=rev Log: [maven-release-plugin] copy for tag DBUTILS_1_2 Added: commons/proper/dbutils/tags/DBUTILS_1_2/ - copied from r754722, commons/proper/dbutils/trunk/ commons/proper/dbutils/tags/DBUTILS_1_2/pom.xml - copied unchanged from r754724, commons/proper/dbutils/trunk/pom.xml
svn commit: r754726 - /commons/proper/dbutils/trunk/pom.xml
Author: dfabulich Date: Sun Mar 15 19:03:19 2009 New Revision: 754726 URL: http://svn.apache.org/viewvc?rev=754726view=rev Log: [maven-release-plugin] prepare for next development iteration Modified: commons/proper/dbutils/trunk/pom.xml Modified: commons/proper/dbutils/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/pom.xml?rev=754726r1=754725r2=754726view=diff == --- commons/proper/dbutils/trunk/pom.xml [utf-8] (original) +++ commons/proper/dbutils/trunk/pom.xml [utf-8] Sun Mar 15 19:03:19 2009 @@ -24,7 +24,7 @@ modelVersion4.0.0/modelVersion groupIdcommons-dbutils/groupId artifactIdcommons-dbutils/artifactId - version1.2/version + version1.3-SNAPSHOT/version nameCommons DbUtils/name inceptionYear2002/inceptionYear @@ -38,9 +38,9 @@ /issueManagement scm - connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/dbutils/tags/DBUTILS_1_2/connection - developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/dbutils/tags/DBUTILS_1_2/developerConnection - urlhttp://svn.apache.org/viewvc/commons/proper/dbutils/tags/DBUTILS_1_2/url + connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/dbutils/trunk/connection + developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/dbutils/trunk/developerConnection +urlhttp://svn.apache.org/viewvc/commons/proper/dbutils/trunk/url /scm developers
svn commit: r754727 [3/3] - in /commons/proper/math/trunk/src: java/org/apache/commons/math/optimization/ java/org/apache/commons/math/optimization/general/ test/org/apache/commons/math/optimization/g
Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/optimization/general/MinpackTest.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/optimization/general/MinpackTest.java?rev=754727r1=754726r2=754727view=diff == --- commons/proper/math/trunk/src/test/org/apache/commons/math/optimization/general/MinpackTest.java (original) +++ commons/proper/math/trunk/src/test/org/apache/commons/math/optimization/general/MinpackTest.java Sun Mar 15 19:11:02 2009 @@ -19,7 +19,10 @@ import java.util.Arrays; +import org.apache.commons.math.optimization.ObjectiveException; import org.apache.commons.math.optimization.OptimizationException; +import org.apache.commons.math.optimization.VectorialDifferentiableObjectiveFunction; +import org.apache.commons.math.optimization.VectorialPointValuePair; import junit.framework.*; @@ -86,8 +89,7 @@ * @author Jorge J. More (original fortran minpack tests) * @author Luc Maisonobe (non-minpack tests and minpack tests Java translation) */ -public class MinpackTest - extends TestCase { +public class MinpackTest extends TestCase { public MinpackTest(String name) { super(name); @@ -502,157 +504,117 @@ } private void minpackTest(MinpackFunction function, boolean exceptionExpected) { -LevenbergMarquardtEstimator estimator = new LevenbergMarquardtEstimator(); -estimator.setMaxCostEval(100 * (function.getN() + 1)); -estimator.setCostRelativeTolerance(Math.sqrt(2.22044604926e-16)); -estimator.setParRelativeTolerance(Math.sqrt(2.22044604926e-16)); -estimator.setOrthoTolerance(2.22044604926e-16); -assertTrue(function.checkTheoreticalStartCost(estimator.getRMS(function))); -try { - estimator.estimate(function); - assertFalse(exceptionExpected); -} catch (OptimizationException lsse) { - assertTrue(exceptionExpected); -} -assertTrue(function.checkTheoreticalMinCost(estimator.getRMS(function))); -assertTrue(function.checkTheoreticalMinParams()); + LevenbergMarquardtOptimizer optimizer = new LevenbergMarquardtOptimizer(); + optimizer.setMaxEvaluations(100 * (function.getN() + 1)); + optimizer.setCostRelativeTolerance(Math.sqrt(2.22044604926e-16)); + optimizer.setParRelativeTolerance(Math.sqrt(2.22044604926e-16)); + optimizer.setOrthoTolerance(2.22044604926e-16); +// assertTrue(function.checkTheoreticalStartCost(optimizer.getRMS())); + try { + VectorialPointValuePair optimum = + optimizer.optimize(function, + function.getTarget(), function.getWeight(), + function.getStartPoint()); + assertFalse(exceptionExpected); + assertTrue(function.checkTheoreticalMinCost(optimizer.getRMS())); + assertTrue(function.checkTheoreticalMinParams(optimum)); + } catch (OptimizationException lsse) { + assertTrue(exceptionExpected); + } catch (ObjectiveException oe) { + assertTrue(exceptionExpected); + } } - private static abstract class MinpackFunction implements EstimationProblem { + private static abstract class MinpackFunction + implements VectorialDifferentiableObjectiveFunction { -protected MinpackFunction(int m, - double[] startParams, - double theoreticalStartCost, - double theoreticalMinCost, - double[] theoreticalMinParams) { - this.m = m; - this.n = startParams.length; - parameters = new EstimatedParameter[n]; - for (int i = 0; i n; ++i) { -parameters[i] = new EstimatedParameter(p + i, startParams[i]); - } - this.theoreticalStartCost = theoreticalStartCost; - this.theoreticalMinCost = theoreticalMinCost; - this.theoreticalMinParams = theoreticalMinParams; - this.costAccuracy = 1.0e-8; - this.paramsAccuracy = 1.0e-5; -} - -protected static double[] buildArray(int n, double x) { - double[] array = new double[n]; - Arrays.fill(array, x); - return array; -} - -protected void setCostAccuracy(double costAccuracy) { - this.costAccuracy = costAccuracy; -} - -protected void setParamsAccuracy(double paramsAccuracy) { - this.paramsAccuracy = paramsAccuracy; -} - -public int getN() { - return parameters.length; -} - -public boolean checkTheoreticalStartCost(double rms) { - double threshold = costAccuracy * (1.0 + theoreticalStartCost); - return Math.abs(Math.sqrt(m) * rms - theoreticalStartCost) = threshold; -} + private static final long serialVersionUID = -6209760235478794233L; + protected int n; + protected int m; + protected double[] startParams; + protected double
svn commit: r754727 [1/3] - in /commons/proper/math/trunk/src: java/org/apache/commons/math/optimization/ java/org/apache/commons/math/optimization/general/ test/org/apache/commons/math/optimization/g
Author: luc Date: Sun Mar 15 19:11:02 2009 New Revision: 754727 URL: http://svn.apache.org/viewvc?rev=754727view=rev Log: adapted old Levenberg-Marquardt estimator to new top level optimizers API Added: commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/general/LevenbergMarquardtOptimizer.java (with props) commons/proper/math/trunk/src/test/org/apache/commons/math/optimization/general/LevenbergMarquardtOptimizerTest.java - copied, changed from r753644, commons/proper/math/trunk/src/test/org/apache/commons/math/optimization/general/LevenbergMarquardtEstimatorTest.java Removed: commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/general/AbstractEstimator.java commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/general/EstimatedParameter.java commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/general/EstimationProblem.java commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/general/Estimator.java commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/general/GaussNewtonEstimator.java commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/general/LevenbergMarquardtEstimator.java commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/general/SimpleEstimationProblem.java commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/general/WeightedMeasurement.java commons/proper/math/trunk/src/test/org/apache/commons/math/optimization/general/EstimatedParameterTest.java commons/proper/math/trunk/src/test/org/apache/commons/math/optimization/general/LevenbergMarquardtEstimatorTest.java commons/proper/math/trunk/src/test/org/apache/commons/math/optimization/general/WeightedMeasurementTest.java Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/VectorialDifferentiableOptimizer.java commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java commons/proper/math/trunk/src/test/org/apache/commons/math/optimization/general/MinpackTest.java Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/VectorialDifferentiableOptimizer.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/VectorialDifferentiableOptimizer.java?rev=754727r1=754726r2=754727view=diff == --- commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/VectorialDifferentiableOptimizer.java (original) +++ commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/VectorialDifferentiableOptimizer.java Sun Mar 15 19:11:02 2009 @@ -60,7 +60,17 @@ * /p * @return number of evaluations of the objective function */ - int getEvaluations(); +int getEvaluations(); + +/** Get the number of evaluations of the objective function jacobian . + * p + * The number of evaluation correspond to the last call to the + * {...@link #optimize(ObjectiveFunction, GoalType, double[]) optimize} + * method. It is 0 if the method has not been called yet. + * /p + * @return number of evaluations of the objective function jacobian + */ +int getJacobianEvaluations(); /** Set the convergence checker. * @param checker object to use to check for convergence Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java?rev=754727r1=754726r2=754727view=diff == --- commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java (original) +++ commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java Sun Mar 15 19:11:02 2009 @@ -30,8 +30,8 @@ import org.apache.commons.math.optimization.VectorialPointValuePair; /** - * Base class for implementing estimators. - * pThis base class handles the boilerplates methods associated to thresholds + * Base class for implementing least squares optimizers. + * pThis base class handles the boilerplate methods associated to thresholds * settings, jacobian and error estimation./p * @version $Revision$ $Date$ * @since 1.2 @@ -61,8 +61,8 @@ * Jacobian matrix. * pThis matrix is in canonical form just after the calls to * {...@link #updateJacobian()}, but may be modified by the solver - * in the derived class (the {...@link LevenbergMarquardtEstimator - * Levenberg-Marquardt estimator} does this)./p + * in the derived class (the
svn commit: r754727 [2/3] - in /commons/proper/math/trunk/src: java/org/apache/commons/math/optimization/ java/org/apache/commons/math/optimization/general/ test/org/apache/commons/math/optimization/g
Copied: commons/proper/math/trunk/src/test/org/apache/commons/math/optimization/general/LevenbergMarquardtOptimizerTest.java (from r753644, commons/proper/math/trunk/src/test/org/apache/commons/math/optimization/general/LevenbergMarquardtEstimatorTest.java) URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/optimization/general/LevenbergMarquardtOptimizerTest.java?p2=commons/proper/math/trunk/src/test/org/apache/commons/math/optimization/general/LevenbergMarquardtOptimizerTest.javap1=commons/proper/math/trunk/src/test/org/apache/commons/math/optimization/general/LevenbergMarquardtEstimatorTest.javar1=753644r2=754727rev=754727view=diff == --- commons/proper/math/trunk/src/test/org/apache/commons/math/optimization/general/LevenbergMarquardtEstimatorTest.java (original) +++ commons/proper/math/trunk/src/test/org/apache/commons/math/optimization/general/LevenbergMarquardtOptimizerTest.java Sun Mar 15 19:11:02 2009 @@ -17,16 +17,23 @@ package org.apache.commons.math.optimization.general; +import java.awt.geom.Point2D; import java.util.ArrayList; -import java.util.HashSet; - -import org.apache.commons.math.optimization.OptimizationException; - +import java.util.Arrays; +import java.util.List; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; +import org.apache.commons.math.linear.DenseRealMatrix; +import org.apache.commons.math.linear.RealMatrix; +import org.apache.commons.math.optimization.ObjectiveException; +import org.apache.commons.math.optimization.OptimizationException; +import org.apache.commons.math.optimization.SimpleVectorialValueChecker; +import org.apache.commons.math.optimization.VectorialDifferentiableObjectiveFunction; +import org.apache.commons.math.optimization.VectorialPointValuePair; + /** * pSome of the unit tests are re-implementations of the MINPACK a * href=http://www.netlib.org/minpack/ex/file17;file17/a and a @@ -89,758 +96,554 @@ * @author Jorge J. More (original fortran minpack tests) * @author Luc Maisonobe (non-minpack tests and minpack tests Java translation) */ -public class LevenbergMarquardtEstimatorTest +public class LevenbergMarquardtOptimizerTest extends TestCase { - public LevenbergMarquardtEstimatorTest(String name) { -super(name); - } - - public void testTrivial() throws OptimizationException { -LinearProblem problem = - new LinearProblem(new LinearMeasurement[] { -new LinearMeasurement(new double[] {2}, - new EstimatedParameter[] { - new EstimatedParameter(p0, 0) - }, 3.0) - }); -LevenbergMarquardtEstimator estimator = new LevenbergMarquardtEstimator(); -estimator.estimate(problem); -assertEquals(0, estimator.getRMS(problem), 1.0e-10); -try { -estimator.guessParametersErrors(problem); -fail(an exception should have been thrown); -} catch (OptimizationException ee) { -// expected behavior -} catch (Exception e) { -fail(wrong exception caught); -} -assertEquals(1.5, - problem.getUnboundParameters()[0].getEstimate(), - 1.0e-10); - } - - public void testQRColumnsPermutation() throws OptimizationException { - -EstimatedParameter[] x = { - new EstimatedParameter(p0, 0), new EstimatedParameter(p1, 0) -}; -LinearProblem problem = new LinearProblem(new LinearMeasurement[] { - new LinearMeasurement(new double[] { 1.0, -1.0 }, -new EstimatedParameter[] { x[0], x[1] }, -4.0), - new LinearMeasurement(new double[] { 2.0 }, -new EstimatedParameter[] { x[1] }, -6.0), - new LinearMeasurement(new double[] { 1.0, -2.0 }, -new EstimatedParameter[] { x[0], x[1] }, -1.0) -}); - -LevenbergMarquardtEstimator estimator = new LevenbergMarquardtEstimator(); -estimator.estimate(problem); -assertEquals(0, estimator.getRMS(problem), 1.0e-10); -assertEquals(7.0, x[0].getEstimate(), 1.0e-10); -assertEquals(3.0, x[1].getEstimate(), 1.0e-10); - - } - - public void testNoDependency() throws OptimizationException { -EstimatedParameter[] p = new EstimatedParameter[] { - new EstimatedParameter(p0, 0), - new EstimatedParameter(p1, 0), - new EstimatedParameter(p2, 0), - new EstimatedParameter(p3, 0), - new EstimatedParameter(p4, 0), - new EstimatedParameter(p5, 0) -}; -LinearProblem problem = new LinearProblem(new LinearMeasurement[] { - new LinearMeasurement(new double[] {2}, new EstimatedParameter[] { p[0] }, 0.0), - new LinearMeasurement(new double[] {2}, new EstimatedParameter[] { p[1] }, 1.1), - new
svn commit: r754732 - in /commons/proper/math/trunk/src: java/org/apache/commons/math/estimation/ test/org/apache/commons/math/estimation/
Author: luc Date: Sun Mar 15 19:30:44 2009 New Revision: 754732 URL: http://svn.apache.org/viewvc?rev=754732view=rev Log: resurrected the estimation package but with all interfaces and classes deprecated this will help users switch smoothly to the new optimization.general package Added: commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/ - copied from r748273, commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/ commons/proper/math/trunk/src/test/org/apache/commons/math/estimation/ - copied from r748273, commons/proper/math/trunk/src/test/org/apache/commons/math/estimation/ Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/AbstractEstimator.java commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/EstimatedParameter.java commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/EstimationException.java commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/EstimationProblem.java commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/Estimator.java commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/GaussNewtonEstimator.java commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/LevenbergMarquardtEstimator.java commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/SimpleEstimationProblem.java commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/WeightedMeasurement.java commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/package.html commons/proper/math/trunk/src/test/org/apache/commons/math/estimation/EstimatedParameterTest.java commons/proper/math/trunk/src/test/org/apache/commons/math/estimation/GaussNewtonEstimatorTest.java commons/proper/math/trunk/src/test/org/apache/commons/math/estimation/LevenbergMarquardtEstimatorTest.java commons/proper/math/trunk/src/test/org/apache/commons/math/estimation/MinpackTest.java commons/proper/math/trunk/src/test/org/apache/commons/math/estimation/WeightedMeasurementTest.java Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/AbstractEstimator.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/AbstractEstimator.java?rev=754732r1=748273r2=754732view=diff == --- commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/AbstractEstimator.java (original) +++ commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/AbstractEstimator.java Sun Mar 15 19:30:44 2009 @@ -30,8 +30,11 @@ * settings, jacobian and error estimation./p * @version $Revision$ $Date$ * @since 1.2 + * @deprecated as of 2.0, everything in package org.apache.commons.math.estimation has + * been deprecated and replaced by package org.apache.commons.math.optimization.general * */ +...@deprecated public abstract class AbstractEstimator implements Estimator { /** Default maximal number of cost evaluations allowed. */ Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/EstimatedParameter.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/EstimatedParameter.java?rev=754732r1=748273r2=754732view=diff == --- commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/EstimatedParameter.java (original) +++ commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/EstimatedParameter.java Sun Mar 15 19:30:44 2009 @@ -29,9 +29,11 @@ * * @version $Revision$ $Date$ * @since 1.2 + * @deprecated as of 2.0, everything in package org.apache.commons.math.estimation has + * been deprecated and replaced by package org.apache.commons.math.optimization.general * */ - +...@deprecated public class EstimatedParameter implements Serializable { Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/EstimationException.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/EstimationException.java?rev=754732r1=748273r2=754732view=diff == --- commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/EstimationException.java (original) +++ commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/EstimationException.java Sun Mar 15 19:30:44 2009 @@ -24,9 +24,11 @@ * * @version $Revision$ $Date$ * @since 1.2 + * @deprecated as of 2.0, everything in package org.apache.commons.math.estimation has + * been deprecated and replaced by package org.apache.commons.math.optimization.general * */ - +...@deprecated public class
svn commit: r754741 - in /commons/proper/vfs/trunk: core/ core/src/main/java/org/apache/commons/vfs/provider/ core/src/main/java/org/apache/commons/vfs/provider/webdav/ core/src/test/java/org/apache/c
Author: rgoers Date: Sun Mar 15 20:11:19 2009 New Revision: 754741 URL: http://svn.apache.org/viewvc?rev=754741view=rev Log: Add versioning support to webdav Added: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/provider/webdav/test/WebdavVersioningTests.java Modified: commons/proper/vfs/trunk/core/pom.xml commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DefaultFileContent.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileContentInfoFactory.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileNameParser.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileProvider.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileSystem.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileSystemConfigBuilder.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavMethodRetryHandler.java commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/provider/webdav/test/WebdavProviderTestCase.java commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestCase.java commons/proper/vfs/trunk/xdocs/filesystems.xml commons/proper/vfs/trunk/xdocs/index.xml Modified: commons/proper/vfs/trunk/core/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/pom.xml?rev=754741r1=754740r2=754741view=diff == --- commons/proper/vfs/trunk/core/pom.xml (original) +++ commons/proper/vfs/trunk/core/pom.xml Sun Mar 15 20:11:19 2009 @@ -88,7 +88,7 @@ dependency groupIdorg.apache.jackrabbit/groupId artifactIdjackrabbit-webdav/artifactId - version1.4/version + version1.5.2/version optionaltrue/optional /dependency dependency Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DefaultFileContent.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DefaultFileContent.java?rev=754741r1=754740r2=754741view=diff == --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DefaultFileContent.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/DefaultFileContent.java Sun Mar 15 20:11:19 2009 @@ -60,6 +60,7 @@ private final FileContentInfoFactory fileContentInfoFactory; private final ThreadLocal threadData = new ThreadLocal(); +private boolean resetAttributes; /** * open streams counter for this file @@ -219,12 +220,16 @@ { throw new FileSystemException(vfs.provider/get-attributes-no-exist.error, file); } -if (roAttrs == null) +if (resetAttributes || roAttrs == null) { try { -attrs = file.doGetAttributes(); -roAttrs = Collections.unmodifiableMap(attrs); +synchronized(this) +{ +attrs = file.doGetAttributes(); +roAttrs = Collections.unmodifiableMap(attrs); +resetAttributes = false; +} } catch (final Exception e) { @@ -235,6 +240,15 @@ } /** + * Used internally to flag situations where the file attributes should be + * reretrieved. + */ +public void resetAttributes() +{ +resetAttributes = true; +} + +/** * Lists the attributes of this file. */ public String[] getAttributeNames() throws FileSystemException Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileContentInfoFactory.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileContentInfoFactory.java?rev=754741r1=754740r2=754741view=diff == --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileContentInfoFactory.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileContentInfoFactory.java Sun Mar 15 20:11:19 2009 @@ -36,7 +36,7 @@ /** * Description * - * @author + * @author a href=http://commons.apache.org/vfs/team-list.html;Commons VFS team/a * @version $Revision$ */ public class WebdavFileContentInfoFactory implements FileContentInfoFactory
svn commit: r754744 - /commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/package.html
Author: luc Date: Sun Mar 15 20:33:47 2009 New Revision: 754744 URL: http://svn.apache.org/viewvc?rev=754744view=rev Log: fixed typo in package documentation Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/package.html Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/package.html URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/package.html?rev=754744r1=754743r2=754744view=diff == --- commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/package.html (original) +++ commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/package.html Sun Mar 15 20:33:47 2009 @@ -20,7 +20,7 @@ p This package provides common interfaces for the optimization algorithms provided in sub-packages. The main interfaces defines objective functions -and optimzers. +and optimizers. /p p Objective functions interfaces are intended to be implemented by
svn commit: r754750 - /commons/proper/math/trunk/src/test/org/apache/commons/math/ode/nonstiff/StepInterpolatorAbstractTest.java
Author: luc Date: Sun Mar 15 21:03:39 2009 New Revision: 754750 URL: http://svn.apache.org/viewvc?rev=754750view=rev Log: removed a spurious print statement Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/ode/nonstiff/StepInterpolatorAbstractTest.java Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/ode/nonstiff/StepInterpolatorAbstractTest.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/ode/nonstiff/StepInterpolatorAbstractTest.java?rev=754750r1=754749r2=754750view=diff == --- commons/proper/math/trunk/src/test/org/apache/commons/math/ode/nonstiff/StepInterpolatorAbstractTest.java (original) +++ commons/proper/math/trunk/src/test/org/apache/commons/math/ode/nonstiff/StepInterpolatorAbstractTest.java Sun Mar 15 21:03:39 2009 @@ -77,9 +77,6 @@ 32 * (yP3h[i] - yM3h[i]) + -168 * (yP2h[i] - yM2h[i]) + 672 * (yP1h[i] - yM1h[i])) / (840 * h); -if (Math.abs(approYDot - yDot[i]) = threshold) { -System.out.println(gotcha!); -} assertEquals(approYDot, yDot[i], threshold); }
svn commit: r754751 - /commons/proper/exec/trunk/pom.xml
Author: sgoeschl Date: Sun Mar 15 21:07:24 2009 New Revision: 754751 URL: http://svn.apache.org/viewvc?rev=754751view=rev Log: +) fixed broken changelog report - the JIRA issue links did not work +) preparing new release candidate Modified: commons/proper/exec/trunk/pom.xml Modified: commons/proper/exec/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/pom.xml?rev=754751r1=754750r2=754751view=diff == --- commons/proper/exec/trunk/pom.xml (original) +++ commons/proper/exec/trunk/pom.xml Sun Mar 15 21:07:24 2009 @@ -125,6 +125,9 @@ groupIdorg.apache.maven.plugins/groupId artifactIdmaven-changes-plugin/artifactId version2.0/version +configuration + issueLinkTemplate%URL%/%ISSUE%/issueLinkTemplate +/configuration reportSets reportSet reports @@ -132,7 +135,7 @@ /reports /reportSet /reportSets - /plugin + /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdfindbugs-maven-plugin/artifactId @@ -184,7 +187,7 @@ commons.componentidexec/commons.componentid commons.jira.idEXEC/commons.jira.id commons.jira.pid12310814/commons.jira.pid -commons.release.version1.0.0/commons.release.version +commons.release.version1.0/commons.release.version !-- The RC version used in the staging repository URL. -- commons.rc.versionRC5/commons.rc.version /properties
svn commit: r754752 - /commons/proper/exec/trunk/src/changes/changes.xml
Author: sgoeschl Date: Sun Mar 15 21:08:08 2009 New Revision: 754752 URL: http://svn.apache.org/viewvc?rev=754752view=rev Log: Preparing new release candidate Modified: commons/proper/exec/trunk/src/changes/changes.xml Modified: commons/proper/exec/trunk/src/changes/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/changes/changes.xml?rev=754752r1=754751r2=754752view=diff == --- commons/proper/exec/trunk/src/changes/changes.xml (original) +++ commons/proper/exec/trunk/src/changes/changes.xml Sun Mar 15 21:08:08 2009 @@ -23,7 +23,7 @@ author email=sgoes...@apache.orgSiegfried Goeschl/author /properties body -release version=1.0.0 date=2009-02-24 description=First Public Release +release version=1.0 date=2009-03-15 description=First Public Release action dev=sgoeschl type=fix due-to=Sebastien Bazley issue=EXEC-37 Removed useless synchronized statement in OpenVmsProcessingEnvironment.createProcEnvironment
svn commit: r754755 - /commons/proper/exec/trunk/pom.xml
Author: sgoeschl Date: Sun Mar 15 21:20:02 2009 New Revision: 754755 URL: http://svn.apache.org/viewvc?rev=754755view=rev Log: Add implementation and specification details in the manifest since this is no longer the default behaviour for Maven Archiver 2.1 onwards. Modified: commons/proper/exec/trunk/pom.xml Modified: commons/proper/exec/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/pom.xml?rev=754755r1=754754r2=754755view=diff == --- commons/proper/exec/trunk/pom.xml (original) +++ commons/proper/exec/trunk/pom.xml Sun Mar 15 21:20:02 2009 @@ -107,6 +107,18 @@ tarLongFileModegnu/tarLongFileMode /configuration /plugin + plugin +groupIdorg.apache.maven.plugins/groupId +artifactIdmaven-jar-plugin/artifactId +configuration + archive +manifest + addDefaultImplementationEntriestrue/addDefaultImplementationEntries + addDefaultSpecificationEntriestrue/addDefaultSpecificationEntries +/manifest + /archive +/configuration + /plugin /plugins /build
svn commit: r754757 - /commons/proper/exec/tags/EXEC_1_0_0/
Author: sgoeschl Date: Sun Mar 15 21:23:24 2009 New Revision: 754757 URL: http://svn.apache.org/viewvc?rev=754757view=rev Log: Deleting tag from the cancelled RC4 Removed: commons/proper/exec/tags/EXEC_1_0_0/
svn commit: r754758 - /commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java
Author: markt Date: Sun Mar 15 21:25:31 2009 New Revision: 754758 URL: http://svn.apache.org/viewvc?rev=754758view=rev Log: Fix DBCP-285. Add warning re sub-classes and thread-safety Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java?rev=754758r1=754757r2=754758view=diff == --- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java (original) +++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java Sun Mar 15 21:25:31 2009 @@ -40,6 +40,9 @@ * configured via JavaBeans properties. This is not the only way to * combine the emcommons-dbcp/em and emcommons-pool/em packages, * but provides a one stop shopping solution for basic requirements./p + * + * pUsers extending this class should take care to use appropriate accessors + * rather than accessing protected fields directly to ensure thread-safety./p * * @author Glenn L. Nielsen * @author Craig R. McClanahan
svn commit: r754759 - /commons/proper/exec/trunk/pom.xml
Author: sgoeschl Date: Sun Mar 15 21:26:30 2009 New Revision: 754759 URL: http://svn.apache.org/viewvc?rev=754759view=rev Log: [maven-release-plugin] prepare release EXEC_1_0 Modified: commons/proper/exec/trunk/pom.xml Modified: commons/proper/exec/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/pom.xml?rev=754759r1=754758r2=754759view=diff == --- commons/proper/exec/trunk/pom.xml (original) +++ commons/proper/exec/trunk/pom.xml Sun Mar 15 21:26:30 2009 @@ -27,7 +27,7 @@ nameCommons Exec/name groupIdorg.apache.commons/groupId artifactIdcommons-exec/artifactId - version1.0-SNAPSHOT/version + version1.0/version descriptionA library to reliably execute external processes from within the JVM/description urlhttp://commons.apache.org/exec//url @@ -81,9 +81,9 @@ /contributors scm - connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/exec/trunk/connection - developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/exec/trunk/developerConnection -urlhttp://svn.apache.org/viewvc/commons/proper/exec/trunk/url + connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/exec/tags/EXEC_1_0/connection + developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/exec/tags/EXEC_1_0/developerConnection +urlhttp://svn.apache.org/viewvc/commons/proper/exec/tags/EXEC_1_0/url /scm build
svn commit: r754760 - in /commons/proper/exec/tags/EXEC_1_0: ./ pom.xml
Author: sgoeschl Date: Sun Mar 15 21:26:49 2009 New Revision: 754760 URL: http://svn.apache.org/viewvc?rev=754760view=rev Log: [maven-release-plugin] copy for tag EXEC_1_0 Added: commons/proper/exec/tags/EXEC_1_0/ - copied from r754753, commons/proper/exec/trunk/ commons/proper/exec/tags/EXEC_1_0/pom.xml - copied unchanged from r754759, commons/proper/exec/trunk/pom.xml
svn commit: r754763 - in /commons/proper/math/trunk/src/java/org/apache/commons/math/optimization: MultiStartOptimizer.java MultiStartScalarDifferentiableOptimizer.java MultiStartScalarOptimizer.java
Author: luc Date: Sun Mar 15 21:33:31 2009 New Revision: 754763 URL: http://svn.apache.org/viewvc?rev=754763view=rev Log: added all necessary multi-start optimizers types Added: commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/MultiStartScalarDifferentiableOptimizer.java (with props) commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/MultiStartScalarOptimizer.java (contents, props changed) - copied, changed from r754499, commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/MultiStartOptimizer.java commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/MultiStartVectorialDifferentiableOptimizer.java (with props) Removed: commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/MultiStartOptimizer.java Added: commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/MultiStartScalarDifferentiableOptimizer.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/MultiStartScalarDifferentiableOptimizer.java?rev=754763view=auto == --- commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/MultiStartScalarDifferentiableOptimizer.java (added) +++ commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/MultiStartScalarDifferentiableOptimizer.java Sun Mar 15 21:33:31 2009 @@ -0,0 +1,190 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.commons.math.optimization; + +import java.util.Arrays; +import java.util.Comparator; + +import org.apache.commons.math.ConvergenceException; +import org.apache.commons.math.MathRuntimeException; +import org.apache.commons.math.random.RandomVectorGenerator; + +/** + * Special implementation of the {...@link ScalarDifferentiableOptimizer} interface adding + * multi-start features to an existing optimizer. + * p + * This class wraps a classical optimizer to use it several times in + * turn with different starting points in order to avoid being trapped + * into a local extremum when looking for a global one. + * /p + * @version $Revision$ $Date$ + * @since 2.0 + */ +public class MultiStartScalarDifferentiableOptimizer implements ScalarDifferentiableOptimizer { + +/** Serializable version identifier. */ +private static final long serialVersionUID = 9008747186334431824L; + +/** Underlying classical optimizer. */ +private final ScalarDifferentiableOptimizer optimizer; + +/** Number of evaluations already performed for all starts. */ +private int totalEvaluations; + +/** Maximal number of evaluations allowed. */ +private int maxEvaluations; + +/** Number of starts to go. */ +private int starts; + +/** Random generator for multi-start. */ +private RandomVectorGenerator generator; + +/** Found optima. */ +private ScalarPointValuePair[] optima; + +/** + * Create a multi-start optimizer from a single-start optimizer + * @param optimizer single-start optimizer to wrap + * @param starts number of starts to perform (including the + * first one), multi-start is disabled if value is less than or + * equal to 1 + * @param generator random vector generator to use for restarts + */ +public MultiStartScalarDifferentiableOptimizer(final ScalarDifferentiableOptimizer optimizer, + final int starts, + final RandomVectorGenerator generator) { +this.optimizer= optimizer; +this.totalEvaluations = 0; +this.maxEvaluations = Integer.MAX_VALUE; +this.starts = starts; +this.generator= generator; +this.optima = null; +} + +/** Get all the optima found during the last call to {...@link + * #optimize(ScalarObjectiveFunction, GoalType, double[]) optimize}. + * pThe optimizer stores all the optima found during a set of + * restarts. The {...@link #optimize(ScalarObjectiveFunction, GoalType, + * double[]) optimize} method returns the
svn commit: r754764 - in /commons/proper/math/trunk/src/site: site.xml xdoc/changes.xml xdoc/userguide/estimation.xml xdoc/userguide/index.xml xdoc/userguide/ode.xml xdoc/userguide/optimization.xml
Author: luc Date: Sun Mar 15 21:34:47 2009 New Revision: 754764 URL: http://svn.apache.org/viewvc?rev=754764view=rev Log: updated documentation after the redesign of the optimization package Removed: commons/proper/math/trunk/src/site/xdoc/userguide/estimation.xml Modified: commons/proper/math/trunk/src/site/site.xml commons/proper/math/trunk/src/site/xdoc/changes.xml commons/proper/math/trunk/src/site/xdoc/userguide/index.xml commons/proper/math/trunk/src/site/xdoc/userguide/ode.xml commons/proper/math/trunk/src/site/xdoc/userguide/optimization.xml Modified: commons/proper/math/trunk/src/site/site.xml URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/site/site.xml?rev=754764r1=754763r2=754764view=diff == --- commons/proper/math/trunk/src/site/site.xml (original) +++ commons/proper/math/trunk/src/site/site.xml Sun Mar 15 21:34:47 2009 @@ -55,7 +55,6 @@ item name=Fractions href=/userguide/fraction.html/ item name=Transform Methods href=/userguide/transform.html/ item name=3D Geometry href=/userguide/geometry.html/ - item name=Parametric Estimation href=/userguide/estimation.html/ item name=Optimization href=/userguide/optimization.html/ item name=Ordinary Differential Equations href=/userguide/ode.html/ /menu Modified: commons/proper/math/trunk/src/site/xdoc/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/site/xdoc/changes.xml?rev=754764r1=754763r2=754764view=diff == --- commons/proper/math/trunk/src/site/xdoc/changes.xml (original) +++ commons/proper/math/trunk/src/site/xdoc/changes.xml Sun Mar 15 21:34:47 2009 @@ -39,6 +39,9 @@ /properties body release version=2.0 date=TBD description=TBD + action dev=luc type=fix issue=MATH-177 +Redesigned the optimization framework for a simpler yet more powerful API. + /action action dev=luc type=fix issue=MATH-243 due-to=Christian Semrau Fixed an error in computing gcd and lcm for some extreme values at integer range boundaries. Modified: commons/proper/math/trunk/src/site/xdoc/userguide/index.xml URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/site/xdoc/userguide/index.xml?rev=754764r1=754763r2=754764view=diff == --- commons/proper/math/trunk/src/site/xdoc/userguide/index.xml (original) +++ commons/proper/math/trunk/src/site/xdoc/userguide/index.xml Sun Mar 15 21:34:47 2009 @@ -112,28 +112,20 @@ lia href=geometry.html#a11.2_Vectors11.2 Vectors/a/li lia href=geometry.html#a11.3_Rotations11.3 Rotations/a/li /ul/li -lia href=estimation.html12. Parametric Estimation/a +lia href=optimization.html12. Optimization/a ul -lia href=estimation.html#a12.1_Overview12.1 Overview/a/li -lia href=estimation.html#a12.2_Models12.2 Models/a/li -lia href=estimation.html#a12.3_Parameters12.3 Parameters/a/li -lia href=estimation.html#a12.4_Measurements12.4 Measurements/a/li -lia href=estimation.html#a12.5_Solvers12.5 Solvers/a/li +lia href=optimization.html#a12.1_Overview12.1 Overview/a/li +lia href=analysis.html#a12.2_Univariate_Functions12.2 Univariate Functions/a/li +lia href=analysis.html#a12.3_Linear_Programming12.3 Linear Programming/a/li +lia href=optimization.html#a12.4_Direct_Methods12.4 Direct Methods/a/li +lia href=analysis.html#a12.5_General_Case12.5 General Case/a/li /ul/li -lia href=optimization.html13. Optimization/a +lia href=ode.html13. Ordinary Differential Equations Integration/a ul -lia href=optimization.html#a13.1_Overview13.1 Overview/a/li -lia href=analysis.html#a13.2_Univariate_Functions13.2 Univariate Functions/a/li -lia href=analysis.html#a13.3_Linear_Programming13.3 Linear Programming/a/li -lia href=optimization.html#a13.4_Direct_Methods13.4 Direct Methods/a/li -lia href=analysis.html#a13.5_General_Case13.5 General Case/a/li -/ul/li -lia href=ode.html14. Ordinary Differential Equations Integration/a -ul -lia href=ode.html#a14.1_Overview14.1 Overview/a/li -lia href=ode.html#a14.2_Discrete_Events_Handling14.2 Discrete Events Handling/a/li -lia href=ode.html#a14.3_ODE_Problems14.3 ODE Problems/a/li -lia
svn commit: r754765 - in /commons/proper/math/trunk: ./ src/java/org/apache/commons/math/optimization/ src/java/org/apache/commons/math/optimization/direct/ src/java/org/apache/commons/math/optimizati
Author: luc Date: Sun Mar 15 21:35:38 2009 New Revision: 754765 URL: http://svn.apache.org/viewvc?rev=754765view=rev Log: fixed checkstyle and findbugs errors Modified: commons/proper/math/trunk/findbugs-exclude-filter.xml commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/ScalarDifferentiableOptimizer.java commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/ScalarOptimizer.java commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/ScalarPointValuePair.java commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/VectorialDifferentiableOptimizer.java commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/direct/DirectSearchOptimizer.java commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/general/GaussNewtonOptimizer.java commons/proper/math/trunk/src/java/org/apache/commons/math/random/CorrelatedRandomVectorGenerator.java commons/proper/math/trunk/src/java/org/apache/commons/math/random/GaussianRandomGenerator.java commons/proper/math/trunk/src/java/org/apache/commons/math/random/NormalizedRandomGenerator.java commons/proper/math/trunk/src/java/org/apache/commons/math/random/RandomVectorGenerator.java commons/proper/math/trunk/src/java/org/apache/commons/math/random/UncorrelatedRandomVectorGenerator.java commons/proper/math/trunk/src/java/org/apache/commons/math/random/UniformRandomGenerator.java commons/proper/math/trunk/src/java/org/apache/commons/math/util/MathUtils.java commons/proper/math/trunk/src/test/org/apache/commons/math/optimization/general/GaussNewtonOptimizerTest.java commons/proper/math/trunk/src/test/org/apache/commons/math/optimization/general/LevenbergMarquardtOptimizerTest.java Modified: commons/proper/math/trunk/findbugs-exclude-filter.xml URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/findbugs-exclude-filter.xml?rev=754765r1=754764r2=754765view=diff == --- commons/proper/math/trunk/findbugs-exclude-filter.xml (original) +++ commons/proper/math/trunk/findbugs-exclude-filter.xml Sun Mar 15 21:35:38 2009 @@ -55,12 +55,12 @@ !-- the following expositions of internal representation are intentional and documented -- Match -Class name=org.apache.commons.math.optimization.PointValuePair/ +Class name=org.apache.commons.math.optimization.ScalarPointValuePair/ Method name=getPointRef params= returns=double[] / Bug pattern=EI_EXPOSE_REP / /Match Match -Class name=org.apache.commons.math.optimization.PointValuePair/ +Class name=org.apache.commons.math.optimization.ScalarPointValuePair/ Method name=lt;init params=double[],double,boolean returns=void / Bug pattern=EI_EXPOSE_REP2 / /Match Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/ScalarDifferentiableOptimizer.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/ScalarDifferentiableOptimizer.java?rev=754765r1=754764r2=754765view=diff == --- commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/ScalarDifferentiableOptimizer.java (original) +++ commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/ScalarDifferentiableOptimizer.java Sun Mar 15 21:35:38 2009 @@ -68,7 +68,7 @@ void setConvergenceChecker(ScalarConvergenceChecker checker); /** Get the convergence checker. - * @param checker object to use to check for convergence + * @return object used to check for convergence */ ScalarConvergenceChecker getConvergenceChecker(); Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/ScalarOptimizer.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/ScalarOptimizer.java?rev=754765r1=754764r2=754765view=diff == --- commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/ScalarOptimizer.java (original) +++ commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/ScalarOptimizer.java Sun Mar 15 21:35:38 2009 @@ -68,7 +68,7 @@ void setConvergenceChecker(ScalarConvergenceChecker checker); /** Get the convergence checker. - * @param checker object to use to check for convergence + * @return object used to check for convergence */ ScalarConvergenceChecker getConvergenceChecker(); Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/ScalarPointValuePair.java URL:
svn commit: r754766 - /commons/proper/exec/tags/EXEC_1_0/
Author: sgoeschl Date: Sun Mar 15 21:39:06 2009 New Revision: 754766 URL: http://svn.apache.org/viewvc?rev=754766view=rev Log: Redoing the RC since I forgot to use the -Prc Removed: commons/proper/exec/tags/EXEC_1_0/
svn commit: r754767 - /commons/proper/exec/trunk/pom.xml
Author: sgoeschl Date: Sun Mar 15 21:41:31 2009 New Revision: 754767 URL: http://svn.apache.org/viewvc?rev=754767view=rev Log: Redoing the RC since I forgot to use the -Prc Modified: commons/proper/exec/trunk/pom.xml Modified: commons/proper/exec/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/pom.xml?rev=754767r1=754766r2=754767view=diff == --- commons/proper/exec/trunk/pom.xml (original) +++ commons/proper/exec/trunk/pom.xml Sun Mar 15 21:41:31 2009 @@ -27,7 +27,7 @@ nameCommons Exec/name groupIdorg.apache.commons/groupId artifactIdcommons-exec/artifactId - version1.1-SNAPSHOT/version + version1.0-SNAPSHOT/version descriptionA library to reliably execute external processes from within the JVM/description urlhttp://commons.apache.org/exec//url
svn commit: r754769 - /commons/proper/exec/trunk/pom.xml
Author: sgoeschl Date: Sun Mar 15 21:47:35 2009 New Revision: 754769 URL: http://svn.apache.org/viewvc?rev=754769view=rev Log: [maven-release-plugin] prepare release EXEC_1_0 Modified: commons/proper/exec/trunk/pom.xml Modified: commons/proper/exec/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/pom.xml?rev=754769r1=754768r2=754769view=diff == --- commons/proper/exec/trunk/pom.xml (original) +++ commons/proper/exec/trunk/pom.xml Sun Mar 15 21:47:35 2009 @@ -27,7 +27,7 @@ nameCommons Exec/name groupIdorg.apache.commons/groupId artifactIdcommons-exec/artifactId - version1.0-SNAPSHOT/version + version1.0/version descriptionA library to reliably execute external processes from within the JVM/description urlhttp://commons.apache.org/exec//url @@ -81,9 +81,9 @@ /contributors scm - connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/exec/trunk/connection - developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/exec/trunk/developerConnection -urlhttp://svn.apache.org/viewvc/commons/proper/exec/trunk/url + connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/exec/tags/EXEC_1_0/connection + developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/exec/tags/EXEC_1_0/developerConnection +urlhttp://svn.apache.org/viewvc/commons/proper/exec/tags/EXEC_1_0/url /scm build
svn commit: r754770 - in /commons/proper/exec/tags/EXEC_1_0: ./ pom.xml
Author: sgoeschl Date: Sun Mar 15 21:47:52 2009 New Revision: 754770 URL: http://svn.apache.org/viewvc?rev=754770view=rev Log: [maven-release-plugin] copy for tag EXEC_1_0 Added: commons/proper/exec/tags/EXEC_1_0/ - copied from r754767, commons/proper/exec/trunk/ commons/proper/exec/tags/EXEC_1_0/pom.xml - copied unchanged from r754769, commons/proper/exec/trunk/pom.xml
svn commit: r754771 - /commons/proper/exec/trunk/pom.xml
Author: sgoeschl Date: Sun Mar 15 21:48:02 2009 New Revision: 754771 URL: http://svn.apache.org/viewvc?rev=754771view=rev Log: [maven-release-plugin] prepare for next development iteration Modified: commons/proper/exec/trunk/pom.xml Modified: commons/proper/exec/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/pom.xml?rev=754771r1=754770r2=754771view=diff == --- commons/proper/exec/trunk/pom.xml (original) +++ commons/proper/exec/trunk/pom.xml Sun Mar 15 21:48:02 2009 @@ -27,7 +27,7 @@ nameCommons Exec/name groupIdorg.apache.commons/groupId artifactIdcommons-exec/artifactId - version1.0/version + version1.1-SNAPSHOT/version descriptionA library to reliably execute external processes from within the JVM/description urlhttp://commons.apache.org/exec//url @@ -81,9 +81,9 @@ /contributors scm - connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/exec/tags/EXEC_1_0/connection - developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/exec/tags/EXEC_1_0/developerConnection -urlhttp://svn.apache.org/viewvc/commons/proper/exec/tags/EXEC_1_0/url + connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/exec/trunk/connection + developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/exec/trunk/developerConnection +urlhttp://svn.apache.org/viewvc/commons/proper/exec/trunk/url /scm build
svn commit: r754776 - /commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java
Author: markt Date: Sun Mar 15 22:12:28 2009 New Revision: 754776 URL: http://svn.apache.org/viewvc?rev=754776view=rev Log: Fix DBCP-214. Fall back to trying to load drive from ContextClassLoader. Patch provided by Bernd Kolb Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java?rev=754776r1=754775r2=754776view=diff == --- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java (original) +++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/BasicDataSource.java Sun Mar 15 22:12:28 2009 @@ -1330,9 +1330,16 @@ */ protected ConnectionFactory createConnectionFactory() throws SQLException { // Load the JDBC driver class +Class driverFromCCL = null; if (driverClassName != null) { try { -Class.forName(driverClassName); +try { +Class.forName(driverClassName); +} catch (ClassNotFoundException cnfe) { +driverFromCCL = Thread.currentThread( +).getContextClassLoader().loadClass( +driverClassName); +} } catch (Throwable t) { String message = Cannot load JDBC driver class ' + driverClassName + '; @@ -1345,7 +1352,16 @@ // Create a JDBC driver instance Driver driver = null; try { -driver = DriverManager.getDriver(url); +if (driverFromCCL == null) { +driver = DriverManager.getDriver(url); +} else { +// Usage of DriverManager is not possible, as it does not +// respect the ContextClassLoader +driver = (Driver) driverFromCCL.newInstance(); +if (!driver.acceptsURL(url)) { +new SQLException(No suitable driver, 08001); +} +} } catch (Throwable t) { String message = Cannot create JDBC driver of class ' + (driverClassName != null ? driverClassName : ) +
svn commit: r754780 - /commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolingDriver.java
Author: markt Date: Sun Mar 15 22:32:18 2009 New Revision: 754780 URL: http://svn.apache.org/viewvc?rev=754780view=rev Log: Fix DBCP-145. Fall back to ContextClassLoader for obtaining .jocl file Patch provided by Jörg von Frantzius Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolingDriver.java Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolingDriver.java URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolingDriver.java?rev=754780r1=754779r2=754780view=diff == --- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolingDriver.java (original) +++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolingDriver.java Sun Mar 15 22:32:18 2009 @@ -106,6 +106,10 @@ ObjectPool pool = (ObjectPool)(_pools.get(name)); if(null == pool) { InputStream in = this.getClass().getResourceAsStream(String.valueOf(name) + .jocl); +if (in == null) { +in = Thread.currentThread().getContextClassLoader( +).getResourceAsStream(String.valueOf(name) + .jocl); +} if(null != in) { JOCLContentHandler jocl = null; try {
svn commit: r754782 - /commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberUtils.java
Author: bayard Date: Sun Mar 15 22:36:07 2009 New Revision: 754782 URL: http://svn.apache.org/viewvc?rev=754782view=rev Log: Fixing javadoc to not reference removed method Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberUtils.java Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberUtils.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberUtils.java?rev=754782r1=754781r2=754782view=diff == --- commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberUtils.java (original) +++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberUtils.java Sun Mar 15 22:36:07 2009 @@ -76,7 +76,7 @@ /** * pcodeNumberUtils/code instances should NOT be constructed in standard programming. - * Instead, the class should be used as codeNumberUtils.stringToInt(6);/code./p + * Instead, the class should be used as codeNumberUtils.toInt(6);/code./p * * pThis constructor is public to permit tools that require a JavaBean instance * to operate./p
svn commit: r754804 - in /commons/proper/lang/trunk/src: java/org/apache/commons/lang/ java/org/apache/commons/lang/mutable/ test/org/apache/commons/lang/ test/org/apache/commons/lang/math/ test/org/a
Author: sebb Date: Mon Mar 16 02:06:18 2009 New Revision: 754804 URL: http://svn.apache.org/viewvc?rev=754804view=rev Log: Byte.valueOf() is definitely faster than new Byte() Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/ArrayUtils.java commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableByte.java commons/proper/lang/trunk/src/test/org/apache/commons/lang/ArrayUtilsTest.java commons/proper/lang/trunk/src/test/org/apache/commons/lang/math/RangeTest.java commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableByteTest.java Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/ArrayUtils.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ArrayUtils.java?rev=754804r1=754803r2=754804view=diff == --- commons/proper/lang/trunk/src/java/org/apache/commons/lang/ArrayUtils.java (original) +++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/ArrayUtils.java Mon Mar 16 02:06:18 2009 @@ -2603,7 +2603,7 @@ } final Byte[] result = new Byte[array.length]; for (int i = 0; i array.length; i++) { -result[i] = new Byte(array[i]); +result[i] = Byte.valueOf(array[i]); } return result; } @@ -3601,7 +3601,7 @@ * (index 0 || index array.length). */ public static byte[] add(byte[] array, int index, byte element) { -return (byte[]) add(array, index, new Byte(element), Byte.TYPE); +return (byte[]) add(array, index, Byte.valueOf(element), Byte.TYPE); } /** Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableByte.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableByte.java?rev=754804r1=754803r2=754804view=diff == --- commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableByte.java (original) +++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/mutable/MutableByte.java Mon Mar 16 02:06:18 2009 @@ -73,7 +73,7 @@ * @return the value as a Byte */ public Object getValue() { -return new Byte(this.value); +return Byte.valueOf(this.value); } /** @@ -159,7 +159,7 @@ * @return a Byte instance containing the value from this mutable */ public Byte toByte() { -return new Byte(byteValue()); +return Byte.valueOf(byteValue()); } //--- Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/ArrayUtilsTest.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/ArrayUtilsTest.java?rev=754804r1=754803r2=754804view=diff == --- commons/proper/lang/trunk/src/test/org/apache/commons/lang/ArrayUtilsTest.java (original) +++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/ArrayUtilsTest.java Mon Mar 16 02:06:18 2009 @@ -2108,12 +2108,12 @@ assertTrue(Arrays.equals( new byte[] {Byte.MIN_VALUE, Byte.MAX_VALUE, (byte)999}, -ArrayUtils.toPrimitive(new Byte[] {new Byte(Byte.MIN_VALUE), -new Byte(Byte.MAX_VALUE), new Byte((byte)999)})) +ArrayUtils.toPrimitive(new Byte[] {Byte.valueOf(Byte.MIN_VALUE), +Byte.valueOf(Byte.MAX_VALUE), Byte.valueOf((byte)999)})) ); try { -ArrayUtils.toPrimitive(new Byte[] {new Byte(Byte.MIN_VALUE), null}); +ArrayUtils.toPrimitive(new Byte[] {Byte.valueOf(Byte.MIN_VALUE), null}); fail(); } catch (NullPointerException ex) {} } @@ -2127,15 +2127,15 @@ assertTrue(Arrays.equals( new byte[] {Byte.MIN_VALUE, Byte.MAX_VALUE, (byte)999}, -ArrayUtils.toPrimitive(new Byte[] {new Byte(Byte.MIN_VALUE), -new Byte(Byte.MAX_VALUE), new Byte((byte)999)}, +ArrayUtils.toPrimitive(new Byte[] {Byte.valueOf(Byte.MIN_VALUE), +Byte.valueOf(Byte.MAX_VALUE), Byte.valueOf((byte)999)}, Byte.MIN_VALUE)) ); assertTrue(Arrays.equals( new byte[] {Byte.MIN_VALUE, Byte.MAX_VALUE, (byte)999}, -ArrayUtils.toPrimitive(new Byte[] {new Byte(Byte.MIN_VALUE), null, -new Byte((byte)999)}, Byte.MAX_VALUE)) +ArrayUtils.toPrimitive(new Byte[] {Byte.valueOf(Byte.MIN_VALUE), null, +Byte.valueOf((byte)999)}, Byte.MAX_VALUE)) ); } @@ -2147,8 +2147,8 @@ ArrayUtils.toObject(new byte[0]));
svn commit: r754805 - /commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberUtils.java
Author: sebb Date: Mon Mar 16 02:08:49 2009 New Revision: 754805 URL: http://svn.apache.org/viewvc?rev=754805view=rev Log: Byte.valueOf() is definitely faster than new Byte() Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberUtils.java Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberUtils.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberUtils.java?rev=754805r1=754804r2=754805view=diff == --- commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberUtils.java (original) +++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/math/NumberUtils.java Mon Mar 16 02:08:49 2009 @@ -56,11 +56,11 @@ /** Reusable Short constant for minus one. */ public static final Short SHORT_MINUS_ONE = new Short((short) -1); /** Reusable Byte constant for zero. */ -public static final Byte BYTE_ZERO = new Byte((byte) 0); +public static final Byte BYTE_ZERO = Byte.valueOf((byte) 0); /** Reusable Byte constant for one. */ -public static final Byte BYTE_ONE = new Byte((byte) 1); +public static final Byte BYTE_ONE = Byte.valueOf((byte) 1); /** Reusable Byte constant for minus one. */ -public static final Byte BYTE_MINUS_ONE = new Byte((byte) -1); +public static final Byte BYTE_MINUS_ONE = Byte.valueOf((byte) -1); /** Reusable Double constant for zero. */ public static final Double DOUBLE_ZERO = new Double(0.0d); /** Reusable Double constant for one. */
svn commit: r754806 - /commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateUtilsTest.java
Author: sebb Date: Mon Mar 16 02:11:08 2009 New Revision: 754806 URL: http://svn.apache.org/viewvc?rev=754806view=rev Log: Add test with empty string array Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateUtilsTest.java Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateUtilsTest.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateUtilsTest.java?rev=754806r1=754805r2=754806view=diff == --- commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateUtilsTest.java (original) +++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateUtilsTest.java Mon Mar 16 02:11:08 2009 @@ -285,6 +285,10 @@ DateUtils.parseDate(dateStr, null); fail(); } catch (IllegalArgumentException ex) {} +try { +DateUtils.parseDate(dateStr, new String[0]); +fail(); +} catch (ParseException ex) {} } //---
svn commit: r754808 - in /commons/proper/lang/trunk/src/java/org/apache/commons/lang: ./ exception/ text/ time/
Author: sebb Date: Mon Mar 16 02:11:38 2009 New Revision: 754808 URL: http://svn.apache.org/viewvc?rev=754808view=rev Log: Genericize some more classes Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java commons/proper/lang/trunk/src/java/org/apache/commons/lang/NotImplementedException.java commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/ExceptionUtils.java commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/ExtendedMessageFormat.java commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/StrTokenizer.java commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DateUtils.java commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DurationFormatUtils.java Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java?rev=754808r1=754807r2=754808view=diff == --- commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java (original) +++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java Mon Mar 16 02:11:38 2009 @@ -256,12 +256,12 @@ * @return the codeList/code of superclasses in order going up from this one * codenull/code if null input */ -public static List getAllSuperclasses(Class cls) { +public static ListClass? getAllSuperclasses(Class? cls) { if (cls == null) { return null; } -List classes = new ArrayList(); -Class superclass = cls.getSuperclass(); +ListClass? classes = new ArrayListClass?(); +Class? superclass = cls.getSuperclass(); while (superclass != null) { classes.add(superclass); superclass = superclass.getSuperclass(); Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/NotImplementedException.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/NotImplementedException.java?rev=754808r1=754807r2=754808view=diff == --- commons/proper/lang/trunk/src/java/org/apache/commons/lang/NotImplementedException.java (original) +++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/NotImplementedException.java Mon Mar 16 02:11:38 2009 @@ -16,8 +16,6 @@ */ package org.apache.commons.lang; -import java.io.PrintStream; -import java.io.PrintWriter; /** * pThrown to indicate that a block of code has not been implemented. @@ -44,6 +42,7 @@ * @since 2.0 * @version $Id$ */ +//@Immutable public class NotImplementedException extends UnsupportedOperationException { private static final String DEFAULT_MESSAGE = Code is not implemented; @@ -104,7 +103,7 @@ * @param clazz *the codeClass/code that has not implemented the method */ -public NotImplementedException(Class clazz) { +public NotImplementedException(Class? clazz) { super(clazz == null ? DEFAULT_MESSAGE : DEFAULT_MESSAGE + in + clazz); } Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/ExceptionUtils.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/ExceptionUtils.java?rev=754808r1=754807r2=754808view=diff == --- commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/ExceptionUtils.java (original) +++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/ExceptionUtils.java Mon Mar 16 02:11:38 2009 @@ -121,7 +121,7 @@ */ public static void addCauseMethodName(String methodName) { if (StringUtils.isNotEmpty(methodName) !isCauseMethodName(methodName)) { -List list = getCauseMethodNameList(); +ListString list = getCauseMethodNameList(); if (list.add(methodName)) { synchronized(CAUSE_METHOD_NAMES) { CAUSE_METHOD_NAMES = toArray(list); @@ -140,7 +140,7 @@ */ public static void removeCauseMethodName(String methodName) { if (StringUtils.isNotEmpty(methodName)) { -List list = getCauseMethodNameList(); +ListString list = getCauseMethodNameList(); if (list.remove(methodName)) { synchronized(CAUSE_METHOD_NAMES) { CAUSE_METHOD_NAMES = toArray(list); @@ -212,8 +212,8 @@ * @param list a list to transform. * @return the given list as a codeString[]/code. */ -private static String[] toArray(List list) { -return (String[]) list.toArray(new String[list.size()]); +private static String[] toArray(ListString list) { +return
svn commit: r754817 - in /commons/proper/vfs/trunk: core/src/main/java/org/apache/commons/vfs/FileSystemManager.java xdocs/filesystems.xml
Author: rgoers Date: Mon Mar 16 05:08:53 2009 New Revision: 754817 URL: http://svn.apache.org/viewvc?rev=754817view=rev Log: Add hasProvider method and update documentation. Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileSystemManager.java commons/proper/vfs/trunk/xdocs/filesystems.xml Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileSystemManager.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileSystemManager.java?rev=754817r1=754816r2=754817view=diff == --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileSystemManager.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/FileSystemManager.java Mon Mar 16 05:08:53 2009 @@ -254,6 +254,11 @@ public FileContentInfoFactory getFileContentInfoFactory(); /** +* Returns true if this manager has a provider for a particular scheme. +*/ + public boolean hasProvider(final String scheme); + +/** * Get the schemes currently available. */ public String[] getSchemes(); Modified: commons/proper/vfs/trunk/xdocs/filesystems.xml URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/xdocs/filesystems.xml?rev=754817r1=754816r2=754817view=diff == --- commons/proper/vfs/trunk/xdocs/filesystems.xml (original) +++ commons/proper/vfs/trunk/xdocs/filesystems.xml Mon Mar 16 05:08:53 2009 @@ -279,6 +279,18 @@ iabsolute-path/i] /code /p +p + bFile System Options/b + ul + libproxyHost/b The proxy host to connect through./li + libproxyPort/b The proxy port to use./li + libcookies/b An array of Cookies to add to the request./li + libmaxConnectionsPerHost/b The maximum number of connections allowed to + a specific host and port. The default is 5./li + libmaxTotalConnections/b The maximum number of connections allowed to + all hosts. The default is 50./li + /ul +/p p bExamples/b