Commit Graph

3034 Commits

Author SHA1 Message Date
Henri Yandell 1ccb2bfe75 Fixing the @since for LANG-875
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1467205 13f79535-47bb-0310-9956-ffa450edef68
2013-04-12 08:36:53 +00:00
Henri Yandell 3d6069ac24 Noted LANG-875 in the changes.xml
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1467204 13f79535-47bb-0310-9956-ffa450edef68
2013-04-12 08:34:34 +00:00
Henri Yandell b7f9beed29 Applying Joanne Polsky's patch adding appendIfMissing/prependIfMissing methods to StringUtils [LANG-875]
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1467202 13f79535-47bb-0310-9956-ffa450edef68
2013-04-12 08:27:22 +00:00
Sebastian Bazley a0f577f6aa Add tests to try and break createNumber exponent handling
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1461698 13f79535-47bb-0310-9956-ffa450edef68
2013-03-27 16:29:56 +00:00
Sebastian Bazley d80be57d6e Document why double exponent (e and E) seems to work even though the index will be wrong
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1461697 13f79535-47bb-0310-9956-ffa450edef68
2013-03-27 16:29:25 +00:00
Sebastian Bazley a1d5af1297 Factor out number failure tests
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1461685 13f79535-47bb-0310-9956-ffa450edef68
2013-03-27 16:09:55 +00:00
Sebastian Bazley 0b58bbef33 Show input as well as output for failures
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1461682 13f79535-47bb-0310-9956-ffa450edef68
2013-03-27 16:06:05 +00:00
Sebastian Bazley f1d2999aa2 Fix test failure comments
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1461679 13f79535-47bb-0310-9956-ffa450edef68
2013-03-27 16:00:38 +00:00
Sebastian Bazley acec03e45a No need to check for Java 1.3+ any more
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1461673 13f79535-47bb-0310-9956-ffa450edef68
2013-03-27 15:56:49 +00:00
Sebastian Bazley b3db6ed9ef LANG-881 NumberUtils.createNumber() Javadoc says it does not work for octal numbers
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1461671 13f79535-47bb-0310-9956-ffa450edef68
2013-03-27 15:52:25 +00:00
Sebastian Bazley 5df8f55e4f LANG-881 Enhance test so it also checks the exact values
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1461654 13f79535-47bb-0310-9956-ffa450edef68
2013-03-27 15:32:24 +00:00
Gary D. Gregory ad43a49dab Statements unnecessarily nested within else clauses.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1461559 13f79535-47bb-0310-9956-ffa450edef68
2013-03-27 13:04:25 +00:00
Henri Yandell 48d5e443c8 Updating changes file for two recent commits
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1459654 13f79535-47bb-0310-9956-ffa450edef68
2013-03-22 07:39:03 +00:00
Henri Yandell fbf996cb7e Fixing urls to point to new oracle pages and not old, sometimes broken, sun urls
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1459653 13f79535-47bb-0310-9956-ffa450edef68
2013-03-22 07:37:03 +00:00
Henri Yandell 3b69ed8d34 Fixing link from javadoc to point to new oracle site
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1459652 13f79535-47bb-0310-9956-ffa450edef68
2013-03-22 07:28:34 +00:00
Henri Yandell 733739cfc1 Adding CR and LF to StringUtils. LANG-870
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1459651 13f79535-47bb-0310-9956-ffa450edef68
2013-03-22 07:25:50 +00:00
Gary D. Gregory 7e03508fa6 [LANG-873] Add FieldUtils getAllFields() to return all the fields defined in the given class and super classes. Alternate impl that splits into two APIs, one with an array result, the other with a List.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1456305 13f79535-47bb-0310-9956-ffa450edef68
2013-03-14 01:35:37 +00:00
Gary D. Gregory b4ba50f6c8 [LANG-873] Add FieldUtils getAllFields() to return all the fields defined in the given class and super classes. Alternate impl that splits into two APIs, one with an array result, the other with a List.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1456304 13f79535-47bb-0310-9956-ffa450edef68
2013-03-14 01:35:23 +00:00
Gary D. Gregory 8d33312704 [LANG-873] Add FieldUtils getAllFields() to return all the fields defined in the given class and super classes.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1456010 13f79535-47bb-0310-9956-ffa450edef68
2013-03-13 15:55:41 +00:00
Benedikt Ritter 7a3255738a trivial: remove unnecessary <p> tags in one line JavaDoc comments
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1455920 13f79535-47bb-0310-9956-ffa450edef68
2013-03-13 12:55:40 +00:00
Benedikt Ritter 415ce96a40 trivial: remove trailing white spaces
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1455915 13f79535-47bb-0310-9956-ffa450edef68
2013-03-13 12:50:23 +00:00
Gary D. Gregory f33fba71c5 Remove useless parentheses (PMD).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1455893 13f79535-47bb-0310-9956-ffa450edef68
2013-03-13 11:41:02 +00:00
Gary D. Gregory fca46212ac Fix PMD: Avoid modifiers which are implied by the context.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1455892 13f79535-47bb-0310-9956-ffa450edef68
2013-03-13 11:35:00 +00:00
Gary D. Gregory 035e5c7115 [LANG-873] Add FieldUtils getDeclaredFields() to return all the fields defined in the given class and super classes.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1455751 13f79535-47bb-0310-9956-ffa450edef68
2013-03-12 23:23:04 +00:00
Olivier Lamy d7ac6963d6 add missing license header
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1451550 13f79535-47bb-0310-9956-ffa450edef68
2013-03-01 10:06:13 +00:00
Olivier Lamy 52c2bdc026 fix link
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1451438 13f79535-47bb-0310-9956-ffa450edef68
2013-02-28 23:39:58 +00:00
Olivier Lamy 39528d55ee restore download cgi
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1450355 13f79535-47bb-0310-9956-ffa450edef68
2013-02-26 18:50:19 +00:00
Thomas Neidhart ecd4dc9ca0 Fix typo.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1448370 13f79535-47bb-0310-9956-ffa450edef68
2013-02-20 19:54:19 +00:00
Thomas Neidhart 8bfee9ba52 Add generic type parameter javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1448293 13f79535-47bb-0310-9956-ffa450edef68
2013-02-20 16:57:52 +00:00
Thomas Neidhart 9e4c7ad562 Remove wrong param tags, complete javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1448290 13f79535-47bb-0310-9956-ffa450edef68
2013-02-20 16:51:35 +00:00
Thomas Neidhart 295ab041dc Add missing param tag.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1448288 13f79535-47bb-0310-9956-ffa450edef68
2013-02-20 16:49:31 +00:00
Thomas Neidhart e7788c0231 Add missing javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1448287 13f79535-47bb-0310-9956-ffa450edef68
2013-02-20 16:47:42 +00:00
Thomas Neidhart 99ff604efa Add missing javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1448286 13f79535-47bb-0310-9956-ffa450edef68
2013-02-20 16:47:18 +00:00
Gary D. Gregory 909630731f JUnit 3 -> 4: replace import of junit.framework.Assert with org.junit.Assert.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1437526 13f79535-47bb-0310-9956-ffa450edef68
2013-01-23 16:05:20 +00:00
Gary D. Gregory 9b2d0335e6 Fix Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1437065 13f79535-47bb-0310-9956-ffa450edef68
2013-01-22 17:29:33 +00:00
Gary D. Gregory 5292526e47 Add final modifier to local variables.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1436770 13f79535-47bb-0310-9956-ffa450edef68
2013-01-22 07:09:45 +00:00
Gary D. Gregory 5bd622dab0 Add final modifier to method parameters.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1436768 13f79535-47bb-0310-9956-ffa450edef68
2013-01-22 07:07:42 +00:00
Gary D. Gregory adfcc014bd Add final modifier to private fields.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1436767 13f79535-47bb-0310-9956-ffa450edef68
2013-01-22 07:05:41 +00:00
Gary D. Gregory 4d46f014fb [LANG-865] LocaleUtils.toLocale does not parse strings starting with an underscore.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1428174 13f79535-47bb-0310-9956-ffa450edef68
2013-01-03 06:19:52 +00:00
Olivier Lamy bc255ccf5c fix links with new tree for javadocs
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1422900 13f79535-47bb-0310-9956-ffa450edef68
2012-12-17 12:29:12 +00:00
Sebastian Bazley b1304061e9 Missing interface @Override
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1417452 13f79535-47bb-0310-9956-ffa450edef68
2012-12-05 14:45:42 +00:00
Sebastian Bazley 78ef8313bd Imports
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1417451 13f79535-47bb-0310-9956-ffa450edef68
2012-12-05 14:45:09 +00:00
Gary D. Gregory 8b89b0ea93 <action issue="LANG-835" type="add">StrBuilder should support StringBuilder as an input parameter</action>
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1413671 13f79535-47bb-0310-9956-ffa450edef68
2012-11-26 15:04:00 +00:00
Gary D. Gregory 0c9622b749 <action issue="LANG-858" type="fix">StringEscapeUtils.escapeJava() and escapeEcmaScript() do not output the escaped surrogate pairs that are Java parsable</action>
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1413114 13f79535-47bb-0310-9956-ffa450edef68
2012-11-24 01:56:20 +00:00
Gary D. Gregory e5a1ea6a76 [LANG-858] StringEscapeUtils.escapeJava() does not output the escaped surrogate pairs that is Java parsable.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1412408 13f79535-47bb-0310-9956-ffa450edef68
2012-11-22 02:21:55 +00:00
Gary D. Gregory ed8a178479 Remove extra whitespace.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1412407 13f79535-47bb-0310-9956-ffa450edef68
2012-11-22 02:17:32 +00:00
Gary D. Gregory 0ea20fa351 Add testEscapeXmlAllCharacters.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1412256 13f79535-47bb-0310-9956-ffa450edef68
2012-11-21 19:51:28 +00:00
Gary D. Gregory 52bcd9b8e8 [LANG-857] StringIndexOutOfBoundsException in CharSequenceTranslator.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1411850 13f79535-47bb-0310-9956-ffa450edef68
2012-11-20 20:45:50 +00:00
Sebastian Bazley f5a83bb90c LANG-856 Code refactoring in NumberUtils
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1408713 13f79535-47bb-0310-9956-ffa450edef68
2012-11-13 13:21:37 +00:00
Sebastian Bazley d844d1eb5e LANG-854 NumberUtils#createNumber - does not allow for hex numbers to be larger than Long
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1408537 13f79535-47bb-0310-9956-ffa450edef68
2012-11-13 01:39:40 +00:00
Sebastian Bazley c1f9320476 LANG-855 NumberUtils#createBigInteger does not allow for hex and octal numbers
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1408524 13f79535-47bb-0310-9956-ffa450edef68
2012-11-13 00:59:22 +00:00
Sebastian Bazley d2bea5ffd3 Add tests to show magnitude boundary between Float, Double and BigDecimal
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1408359 13f79535-47bb-0310-9956-ffa450edef68
2012-11-12 17:13:37 +00:00
Sebastian Bazley cbb9aed860 Wrong order of testing
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1408324 13f79535-47bb-0310-9956-ffa450edef68
2012-11-12 15:31:45 +00:00
Gary D. Gregory 8df49927b1 Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1408273 13f79535-47bb-0310-9956-ffa450edef68
2012-11-12 13:04:33 +00:00
Sebastian Bazley 350cf8c2da LANG-822: NumberUtils#createNumber - bad behaviour for leading "--"
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1407973 13f79535-47bb-0310-9956-ffa450edef68
2012-11-11 13:16:22 +00:00
Sebastian Bazley a7b467a74c Document return value with null input
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1407967 13f79535-47bb-0310-9956-ffa450edef68
2012-11-11 13:00:08 +00:00
Gary D. Gregory e4939f079a [LANG-853] StringUtils join APIs for primitives.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1407899 13f79535-47bb-0310-9956-ffa450edef68
2012-11-10 23:30:43 +00:00
Gary D. Gregory c3ba1f83b9 Remove whitespace.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1407878 13f79535-47bb-0310-9956-ffa450edef68
2012-11-10 20:36:56 +00:00
Chas Honton 343886c1c4 LANG-582 - minutes missing from test format
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1407715 13f79535-47bb-0310-9956-ffa450edef68
2012-11-10 01:58:07 +00:00
Matthew Jason Benson 8a946932c8 explain whitespace pattern
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1407537 13f79535-47bb-0310-9956-ffa450edef68
2012-11-09 16:50:39 +00:00
Matthew Jason Benson fa4ed70023 restrict whitespace pattern to ignore 'blocks' of whitespace consisting of only a single space
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1407536 13f79535-47bb-0310-9956-ffa450edef68
2012-11-09 16:45:37 +00:00
Matthew Jason Benson 1ea6e4471c StrBuilder implements Builder; provide toStringBuilder as toStringBuffer
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1407534 13f79535-47bb-0310-9956-ffa450edef68
2012-11-09 16:42:18 +00:00
Matthew Jason Benson fd5af17932 support varargs in StrBuilder.appendAll(); also convert iterable form of method to use enhanced for loop
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1407525 13f79535-47bb-0310-9956-ffa450edef68
2012-11-09 16:26:44 +00:00
Gary D. Gregory 16774d1c0d [LANG-701] StringUtils join with var args. Add and use SPACE string constant for " ".
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1407148 13f79535-47bb-0310-9956-ffa450edef68
2012-11-08 16:08:23 +00:00
Gary D. Gregory f416eb209c Rename private WHITESPACE_BLOCK to WHITESPACE_PATTERN.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1407141 13f79535-47bb-0310-9956-ffa450edef68
2012-11-08 15:54:25 +00:00
Gary D. Gregory 8fc7c1fe06 Refactor some duplicate code.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1406122 13f79535-47bb-0310-9956-ffa450edef68
2012-11-06 13:12:12 +00:00
Gary D. Gregory 4cdb63d6c0 [LANG-849] FastDateFormat and FastDatePrinter generates Date objects wastefully.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1406027 13f79535-47bb-0310-9956-ffa450edef68
2012-11-06 01:59:50 +00:00
Gary D. Gregory 310edf6439 [LANG-849] FastDateFormat generates Date objects wastefully.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1406026 13f79535-47bb-0310-9956-ffa450edef68
2012-11-06 01:58:29 +00:00
Gary D. Gregory 641aa249c3 [LANG-845] Spelling fixes.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1401523 13f79535-47bb-0310-9956-ffa450edef68
2012-10-24 00:50:52 +00:00
Gary D. Gregory f7a8fa91ea [LANG-841] Add StringUtils API to call String.replaceAll in DOTALL a.k.a. single-line mode.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1396375 13f79535-47bb-0310-9956-ffa450edef68
2012-10-09 22:07:08 +00:00
Thomas Neidhart 22d050b781 [LANG-844] Fix javadoc of StringUtils.center methods, thanks to John Lindwall.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1396313 13f79535-47bb-0310-9956-ffa450edef68
2012-10-09 20:58:50 +00:00
Sebastian Bazley 307c280caf Fail if BitSet not faster overall
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1396215 13f79535-47bb-0310-9956-ffa450edef68
2012-10-09 19:28:59 +00:00
Sebastian Bazley 8bbf8a9e2f LANG-839 ArrayUtils removeElements methods use unnecessary HashSet
Eliminate conversion of BitSet to int[]

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1396075 13f79535-47bb-0310-9956-ffa450edef68
2012-10-09 15:37:05 +00:00
Sebastian Bazley 49685a4156 Add test for FreeBSD
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1395965 13f79535-47bb-0310-9956-ffa450edef68
2012-10-09 11:02:02 +00:00
Sebastian Bazley f381f00df8 Show what we could not test
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1395961 13f79535-47bb-0310-9956-ffa450edef68
2012-10-09 10:52:27 +00:00
Sebastian Bazley 43a2736e22 LANG-839 Add tests to compare extractIndices+removeAll with direct use of BitSet in new version of removeAll
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1395943 13f79535-47bb-0310-9956-ffa450edef68
2012-10-09 10:28:08 +00:00
Sebastian Bazley 17910d3cc7 LANG-839 ArrayUtils removeElements methods use unnecessary HashSet
Replace HashSet with BitSet (less memory; faster)

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1395837 13f79535-47bb-0310-9956-ffa450edef68
2012-10-09 01:26:13 +00:00
Sebastian Bazley ec242df460 LANG-839 ArrayUtils removeElements methods use unnecessary HashSet
Add benchmark test to show whether Bitset is faster

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1395834 13f79535-47bb-0310-9956-ffa450edef68
2012-10-09 01:15:20 +00:00
Sebastian Bazley 73a89b07dc Check empty arrrays handled OK
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1394318 13f79535-47bb-0310-9956-ffa450edef68
2012-10-04 22:55:43 +00:00
Joerg Schaible ff5b829efd Use term "binary" instead of "boolArray" in Conversion. Improve Javadoc of class.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1393800 13f79535-47bb-0310-9956-ffa450edef68
2012-10-03 22:30:51 +00:00
Joerg Schaible 016c0e5858 Improve and fix javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1393797 13f79535-47bb-0310-9956-ffa450edef68
2012-10-03 22:21:09 +00:00
Joerg Schaible 0b748abd18 Use better method names. Document possible ArrayIndexOutOfBoundsException and StringIndexOutOfBoundsException.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1393792 13f79535-47bb-0310-9956-ffa450edef68
2012-10-03 22:05:11 +00:00
Joerg Schaible ca9cbf976e Code clean-up for CheckStyle.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1393626 13f79535-47bb-0310-9956-ffa450edef68
2012-10-03 17:17:40 +00:00
Joerg Schaible 28476afb7d LANG-778: Add to Conversion from byte[] to UUID and UUID to byte[]
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1393614 13f79535-47bb-0310-9956-ffa450edef68
2012-10-03 17:00:08 +00:00
Joerg Schaible 46448a690c Simplify expressions again.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1393539 13f79535-47bb-0310-9956-ffa450edef68
2012-10-03 15:26:13 +00:00
Joerg Schaible bb7462c8b5 Document exceptions. Use IllegalArgumentException instead of assert. Throw IllegalArgumentException for empty arrays.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1393425 13f79535-47bb-0310-9956-ffa450edef68
2012-10-03 11:25:51 +00:00
Joerg Schaible 216411597d Use lowercase presentation for hex values as it is done in the JDK.
Use JDK functionality where available.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1393073 13f79535-47bb-0310-9956-ffa450edef68
2012-10-02 18:12:53 +00:00
Sebastian Bazley f01111b634 Add some code comments
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391783 13f79535-47bb-0310-9956-ffa450edef68
2012-09-29 11:28:57 +00:00
Sebastian Bazley 86226bb499 There are only two distinct boolean values
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391701 13f79535-47bb-0310-9956-ffa450edef68
2012-09-28 23:59:55 +00:00
Sebastian Bazley 2be663db75 LANG-838 ArrayUtils removeElements methods clone temporary index arrays unnecessarily
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391695 13f79535-47bb-0310-9956-ffa450edef68
2012-09-28 23:30:31 +00:00
Joerg Schaible 6545db8bb7 Revert 1391258 by veto of Sebb.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391571 13f79535-47bb-0310-9956-ffa450edef68
2012-09-28 17:40:16 +00:00
Joerg Schaible 413a98eb21 Use conversion tables for boolean arrays.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391258 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 22:53:46 +00:00
Joerg Schaible 560bde10c7 "import java.lang.*" is always implicit.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391246 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 22:35:09 +00:00
Sebastian Bazley 91b9a3de99 Document sync. strategy
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391242 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 22:30:08 +00:00
Joerg Schaible 38fea7d456 Avoid unnecessary conversions.
Use StringBuilder instead of StringBuffer.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391237 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 22:10:55 +00:00
Joerg Schaible 3de2a0c914 Implement test TODO.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391233 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 21:52:05 +00:00
Joerg Schaible 342a9184a9 JUnit 3 --> JUnit 4
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391222 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 21:08:54 +00:00
Sebastian Bazley c62d888e94 Use JUnit4 methods where possible
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391216 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 21:00:02 +00:00
Sebastian Bazley 0ee336a58f Convert to JUNit4
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391199 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 20:24:35 +00:00
Sebastian Bazley 82f04621a4 Javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391195 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 20:10:33 +00:00
Sebastian Bazley 2abc129650 Convert Strategy to abstract class; simplifies the subclasses
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391187 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 19:41:33 +00:00
Joerg Schaible 1000d1a1bd LANG-801: Add Conversion utility to convert between data types on byte level
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391148 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 18:09:08 +00:00
Sebastian Bazley 7c7c9447f6 Add test for StringBuilder
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391116 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 17:27:29 +00:00
Sebastian Bazley b5c79770db Add comment
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391113 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 17:22:50 +00:00
Sebastian Bazley 89c6497228 StringBuffer => StringBuilder where being used as a local-only buffer
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391112 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 17:21:12 +00:00
Sebastian Bazley 3ab8e13026 Javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391095 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 16:46:50 +00:00
Sebastian Bazley acb89828f1 Javadoc typos
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391048 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 15:02:09 +00:00
Sebastian Bazley a0148b0e20 Explicit boxing
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391027 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 14:20:10 +00:00
Sebastian Bazley f9837a0728 Suppress boxing warnings for assertEquals()
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391025 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 14:18:55 +00:00
Sebastian Bazley cc730589cd Document some @SuppressWarning annotations
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391003 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 13:34:33 +00:00
Sebastian Bazley 76833dc4a4 Explicit boxing
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390993 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 13:16:30 +00:00
Sebastian Bazley f068cb71b5 Tab police
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390989 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 13:12:09 +00:00
Sebastian Bazley 0490f1c291 LANG-820 TypeUtils.normalizeUpperBounds broken?
Added test to show it works OK

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390984 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 13:01:57 +00:00
Sebastian Bazley 04babff379 LANG-818 FastDateFormat's "z" pattern does not respect timezone of Calendar instances passed to format()
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390980 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 12:56:19 +00:00
Sebastian Bazley cfab1e4fa1 LANG-815 DurationFormatUtils.formatPeriod() mis-calculation
Add test case to show there is no issue

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390971 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 12:46:42 +00:00
Sebastian Bazley 77eed078c8 LANG-777 jar contains velocity template of release notes
Merge releases notes into standard location

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390966 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 12:32:45 +00:00
Sebastian Bazley 586e0b1c8a Copy of Commons Parent version; generates same output
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390962 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 12:21:51 +00:00
Sebastian Bazley 6ecb0a30c3 LANG-830 FastDateParser could use \Q \E to quote regexes
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390954 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 11:50:52 +00:00
Sebastian Bazley e5ae84a6fc LANG-829 FastDateParser could use Calendar.getDisplayNames for all text fields
Remove unnecessary KeyValue instances

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390937 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 10:59:30 +00:00
Chas Honton 8c87749695 LANG-829: FastDateParser could use Calendar.getDisplayNames for all text fields
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390839 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 04:50:21 +00:00
Sebastian Bazley 9960dd4204 Add some more tests
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390816 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 03:04:49 +00:00
Sebastian Bazley 67914b1475 Add some more tests
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390815 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 02:46:55 +00:00
Sebastian Bazley 9dabaeeb96 Show where the parsing failed
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390814 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 02:33:01 +00:00
Sebastian Bazley f899c178b7 Don't save short eras if they are the same as the long eras
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390811 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 02:18:18 +00:00
Sebastian Bazley 65a6458eaa LANG-832 FastDateParser does not handle unterminated quotes correctly
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390795 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 00:55:31 +00:00
Sebastian Bazley ad72b9f2bf LANG-831 FastDateParser does not handle white-space properly
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390779 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 00:09:15 +00:00
Sebastian Bazley 192b1e1b6b Allow access to parsedPattern for test purposes
Make ParseException text similar to that thrown by SimpleDateFormat

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390778 13f79535-47bb-0310-9956-ffa450edef68
2012-09-27 00:02:58 +00:00
Sebastian Bazley c03f033c1c Trailing spaces
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390722 13f79535-47bb-0310-9956-ffa450edef68
2012-09-26 20:44:16 +00:00
Sebastian Bazley de3d06ff01 Package protection is sufficient here
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390656 13f79535-47bb-0310-9956-ffa450edef68
2012-09-26 18:43:40 +00:00
Sebastian Bazley e568101617 Wrong class name; make line stand out better
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390650 13f79535-47bb-0310-9956-ffa450edef68
2012-09-26 18:37:31 +00:00
Sebastian Bazley d7af943548 LANG-828 FastDateParser does not handle non-Gregorian calendars properly
Use Calendar#getDisplayNames() instead of DateFormatSymbols#getEras()

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390626 13f79535-47bb-0310-9956-ffa450edef68
2012-09-26 18:03:24 +00:00
Sebastian Bazley e582456625 LANG-828 FastDateParser does not handle non-Gregorian calendars properly
Fix bug in Java 7 (Locale.toString() format has changed)

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390189 13f79535-47bb-0310-9956-ffa450edef68
2012-09-25 22:12:14 +00:00
Sebastian Bazley 73ea9c43c6 Extract constant
Label output with test case name

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390172 13f79535-47bb-0310-9956-ffa450edef68
2012-09-25 21:46:34 +00:00
Sebastian Bazley eedd1169bf Label output with test case name
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390171 13f79535-47bb-0310-9956-ffa450edef68
2012-09-25 21:46:11 +00:00
Sebastian Bazley 3e47c0599e Remove unused field
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390158 13f79535-47bb-0310-9956-ffa450edef68
2012-09-25 21:31:41 +00:00
Sebastian Bazley 6ac6f2c870 Unused imports
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390157 13f79535-47bb-0310-9956-ffa450edef68
2012-09-25 21:30:27 +00:00
Sebastian Bazley 005f41f136 One reason why the ja_JP_JP and th_TH_* locales don't work
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1390143 13f79535-47bb-0310-9956-ffa450edef68
2012-09-25 21:11:34 +00:00
Sebastian Bazley 34beef1d08 LANG-828 FastDateParser does not handle non-Gregorian calendars properly
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1389976 13f79535-47bb-0310-9956-ffa450edef68
2012-09-25 16:32:20 +00:00
Sebastian Bazley 5ffcb8d35b getInstance() (Java 1.6) supports more locales
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1389939 13f79535-47bb-0310-9956-ffa450edef68
2012-09-25 15:41:57 +00:00
Sebastian Bazley 6d06d0a1c0 Fix testParses() so it works for non-GMT timezones: the format must include hours to allow for GMT-offsets
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1389869 13f79535-47bb-0310-9956-ffa450edef68
2012-09-25 14:07:47 +00:00
Sebastian Bazley f67add0e72 Grammar
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1389682 13f79535-47bb-0310-9956-ffa450edef68
2012-09-25 02:03:24 +00:00
Sebastian Bazley f621ea87cc Document why tests seem to fail
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1389681 13f79535-47bb-0310-9956-ffa450edef68
2012-09-25 02:02:21 +00:00
Sebastian Bazley 62d5c0eecb LANG-826 FastDateParser does not handle non-ASCII digits correctly
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1389673 13f79535-47bb-0310-9956-ffa450edef68
2012-09-25 01:07:01 +00:00
Sebastian Bazley bb8164bb2c Make immutable private variable final
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1389670 13f79535-47bb-0310-9956-ffa450edef68
2012-09-25 01:01:50 +00:00
Sebastian Bazley 0120e9264d More tests; era seems to cause issues, so check this separately
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1389667 13f79535-47bb-0310-9956-ffa450edef68
2012-09-25 00:51:11 +00:00
Sebastian Bazley 246ecda5e2 Split test into 4 so each failure can be detected
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1389484 13f79535-47bb-0310-9956-ffa450edef68
2012-09-24 17:01:47 +00:00
Sebastian Bazley a81da42d90 LANG-799 - DateUtils#parseDate uses default locale; add Locale support
Remove inappropriate test - we don't use localized formats

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1389172 13f79535-47bb-0310-9956-ffa450edef68
2012-09-24 00:11:23 +00:00
Gary D. Gregory 01ee7028e6 [LANG-825] Create StrBuilder APIs similar to String.format(String, Object...)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1389042 13f79535-47bb-0310-9956-ffa450edef68
2012-09-23 13:01:27 +00:00
Sebastian Bazley 72b9613ddb LANG-799 - DateUtils#parseDate uses default locale; add Locale support
Show current default locale

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1388824 13f79535-47bb-0310-9956-ffa450edef68
2012-09-22 16:07:55 +00:00
Sebastian Bazley 12a0e3bdde LANG-799 - DateUtils#parseDate uses default locale; add Locale support
Parse German date with English Locale, specifying German Locale override

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1388821 13f79535-47bb-0310-9956-ffa450edef68
2012-09-22 15:36:31 +00:00