Commit Graph

2438 Commits

Author SHA1 Message Date
Henri Yandell ac4bc3dbd5 Fixing referred to method after API change. getInitializedObject became get
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@930816 13f79535-47bb-0310-9956-ffa450edef68
2010-04-05 07:57:10 +00:00
Henri Yandell 95e1aaebc2 Fixing javadoc to refer to CharSequence after API change
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@930815 13f79535-47bb-0310-9956-ffa450edef68
2010-04-05 07:56:44 +00:00
Henri Yandell ebe7f51668 Minor 3.0 updates
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@930469 13f79535-47bb-0310-9956-ffa450edef68
2010-04-03 04:37:26 +00:00
Oliver Heger f96d4df26e LANG-609: Added AtomicInitializer class. Introduced new ConcurrentInitializer interface which is now implemented by all all initializer classes.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@929189 13f79535-47bb-0310-9956-ffa450edef68
2010-03-30 16:49:22 +00:00
Henri Yandell e4789bd4fc Minor language tweaks (LANG-576)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@928465 13f79535-47bb-0310-9956-ffa450edef68
2010-03-28 18:17:48 +00:00
Joerg Schaible f9e141cfe5 Improve javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@928453 13f79535-47bb-0310-9956-ffa450edef68
2010-03-28 17:04:59 +00:00
Henri Yandell 910d8a0d66 Removing unused import, putting fully qualified name in javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@927257 13f79535-47bb-0310-9956-ffa450edef68
2010-03-25 02:32:57 +00:00
Henri Yandell 6dcc663d58 Updating Change report with all the resolved 3.0 issues
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@926954 13f79535-47bb-0310-9956-ffa450edef68
2010-03-24 06:49:41 +00:00
Henri Yandell 571b8e3017 Adding concat(Object...) and concatWith(String, Object...) methods to provide vararg'd versions of the more prominent join methods. This ties into the String.concat method. LANG-396
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@926448 13f79535-47bb-0310-9956-ffa450edef68
2010-03-23 02:56:18 +00:00
Henri Yandell 1865f0b68d Vararging constructor methods; much like the method ones were in MethodUtils. LANG-396
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@925970 13f79535-47bb-0310-9956-ffa450edef68
2010-03-22 06:22:28 +00:00
Henri Yandell a22c0543d8 Vararging more methods. StringUtils.getCommonPrefix, StringUtils.indexOfDifference, WordUtils.initials, WordUtils.uncapitalize, WordUtils.capitalizeFully, WordUtils.capitalize, BooleanUtils.xor. LANG-396
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@925967 13f79535-47bb-0310-9956-ffa450edef68
2010-03-22 06:16:49 +00:00
Henri Yandell 2c6e919e65 Vararging parseDate methods. LANG-396
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@925963 13f79535-47bb-0310-9956-ffa450edef68
2010-03-22 06:02:56 +00:00
Henri Yandell 8d20f34c7d Removed osgi jcip import note
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@925962 13f79535-47bb-0310-9956-ffa450edef68
2010-03-22 06:00:37 +00:00
Henri Yandell 5ba837e409 Moving most of the methods over to varargs. A couple can't change because they are Object[], Class[] with both end parameters ideally wanting to be vararg. LANG-396
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@925961 13f79535-47bb-0310-9956-ffa450edef68
2010-03-22 05:59:31 +00:00
Oliver Heger 0769eb977b [LANG-610] Introduced ConcurrentRuntimeException and extended the exception handling methods of ConcurrentUtils to support runtime exceptions, too.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@925818 13f79535-47bb-0310-9956-ffa450edef68
2010-03-21 16:35:22 +00:00
Henri Yandell bc22af91e7 Adding Builder interface, and refactoring the builder classes and BasicThreadFactory to implement this interface. Patch from Michael Wooten in LANG-601
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@925674 13f79535-47bb-0310-9956-ffa450edef68
2010-03-20 20:20:26 +00:00
Henri Yandell 1a60c21395 Applying the copy of the HashCodeBuilder code to stop cyclic references over to EqualsBuilder per LANG-606 and Oliver Sauder's patch
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@925671 13f79535-47bb-0310-9956-ffa450edef68
2010-03-20 20:16:57 +00:00
Oliver Heger cfff2579f5 Switched test class to jUnit 4 style.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@925419 13f79535-47bb-0310-9956-ffa450edef68
2010-03-19 21:08:06 +00:00
Henri Yandell 53d9ad9ffb 'stolen' is a cute word, but given it means taking without permission it's incorrect here
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@924407 13f79535-47bb-0310-9956-ffa450edef68
2010-03-17 18:32:36 +00:00
Henri Yandell dec906e158 Fixing javadoc per LANG-600. Examples already in tests.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@924372 13f79535-47bb-0310-9956-ffa450edef68
2010-03-17 17:17:45 +00:00
Sebastian Bazley 311dc94070 Tab police (and trailing spaces)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@923551 13f79535-47bb-0310-9956-ffa450edef68
2010-03-16 02:34:00 +00:00
Gary D. Gregory 2fdfb4a387 Change the APIs from char to int character input to match underlying JRE API called. There is no need to narrow the input type argument to the JRE, in fact this causes us to loose support for Unicode supplementary characters. The APIs changed are:
- indexOf(String, char) -> indexOf(String, int)
- indexOf(String, char, int) -> indexOf(String, int, int)
- lastIndexOf(String, char) -> lastIndexOf(String, int)
- lastIndexOf(String, char, int) -> lastIndexOf(String, int, int)
- contains(String, char) -> contains(String, int) 

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@923527 13f79535-47bb-0310-9956-ffa450edef68
2010-03-16 00:46:02 +00:00
Gary D. Gregory bc52782cd8 https://issues.apache.org/jira/browse/LANG-607 StringUtils methods do not handle Unicode 2.0+ supplementary characters correctly.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@923525 13f79535-47bb-0310-9956-ffa450edef68
2010-03-16 00:37:07 +00:00
Niall Pemberton 79f7a7ef52 Upgrade to commons-parent-14 (and maven-javadoc-plugin 2.5 when specified)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@923495 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 23:10:18 +00:00
Gary D. Gregory 6505531d5c Fix tabs to spaces, thank you Jörg.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@923386 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 18:47:37 +00:00
Joerg Schaible 022d08cfd3 Fix DefaultExceptionContext.addValue that overwrites information in a recursive situation (LANG-605). Allow explicit replacement of a label with the new replaceValue methods.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@923341 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 17:11:55 +00:00
Niall Pemberton 4d7a616cca Update components to point to the new download pages
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@923339 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 17:04:53 +00:00
Gary D. Gregory 646c27b226 Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@922912 13f79535-47bb-0310-9956-ffa450edef68
2010-03-14 17:45:49 +00:00
Gary D. Gregory a9b61fc427 Back out a CSU experiment.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@922911 13f79535-47bb-0310-9956-ffa450edef68
2010-03-14 17:44:23 +00:00
Gary D. Gregory 7780fa0ad5 Oops, experiment in progress. Back out last change.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@922910 13f79535-47bb-0310-9956-ffa450edef68
2010-03-14 17:42:08 +00:00
Gary D. Gregory 5fe2d862fc Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@922909 13f79535-47bb-0310-9956-ffa450edef68
2010-03-14 17:37:07 +00:00
Gary D. Gregory 5b7817cc3f Fix defaultIsEmpty typing.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@922904 13f79535-47bb-0310-9956-ffa450edef68
2010-03-14 17:33:23 +00:00
Gary D. Gregory 1ced894df7 https://issues.apache.org/jira/browse/LANG-607 StringUtils.containsAny methods incorrectly matches Unicode 2.0+ supplementary characters.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@922703 13f79535-47bb-0310-9956-ffa450edef68
2010-03-14 00:54:03 +00:00
Gary D. Gregory 8a8859cb88 Makes sure "..." is the same all over this method.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@922448 13f79535-47bb-0310-9956-ffa450edef68
2010-03-12 22:59:21 +00:00
Gary D. Gregory 655050f6fd Use INDEX_NOT_FOUND instead of magic number.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@920546 13f79535-47bb-0310-9956-ffa450edef68
2010-03-08 22:22:31 +00:00
Joerg Schaible 7f23ec3d90 ContextedRuntimeException must extend RuntimeException (LANG-602).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@920544 13f79535-47bb-0310-9956-ffa450edef68
2010-03-08 22:20:12 +00:00
Gary D. Gregory 7cfa8a9328 Change StringUtils arguments from String to CharSequence.
Details: Working with (trunk) StringUtils (SU) I see the following emerge: 

- In SVN already and continuing: Change StringUtils arguments from String to CharSequence (CS).

- This leads to replacing calls to String.substring(int[,int]) with calls to CharSequence.subSequence(int)

- This leads to creating a CharSequenceUtils class (in SVN now, more on this new class below) and CharSequenceUtils.subSequence(CharSequence,int) to avoid changing "str.substring(start)" over and over to "str.subSequence(start, str.length())". For examples, see new versions of capitalize and uncapitalize.

- We end up using a toString() on CharSequence to return a String from StringUtil when working with a CharSequence.

So we have StringUtils using CharSequence inputs as much as possible instead of String, which is nice. 

The CharSequence method subSequence returns a CharSequence; though the Javadoc states "Returns a new CharSequence that is a subsequence of this sequence.", this does not guaranteed the return value to be the same kind of CharSequence as the receiver). Since we are after all in a class called StringUtil, calling toString() is a must.

I propose that we create when possible the methods that are now StringUtils CharSequence methods into CharSequenceUtils and let StringUtil call CharSequenceUtils and then do its toString() and other String specific logic. Later we could have other CharSequence type of utils (for CharBuffer, StringBuiler, StringBuffer, etc) that use the 'primitives' from CharSequenceUtils.
This means that for methods that are based solely on methods that are now in CharSequence, these can be moved to CharSequenceUtils without effort (all is* methods only call CharSequence#length() and charAt() for example and are now typed as CS, still in SU). 

We can leave @deprecateds method in SU as a nicety to avoid too much porting pain: First change the package to lang3 then you can 'optimize' by changing call sites from SU to CSU.

As a start, I put in SVN a CharSequenceUtils (CSU) implementation for length() and subSequence().


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@920543 13f79535-47bb-0310-9956-ffa450edef68
2010-03-08 22:15:08 +00:00
Gary D. Gregory 9c0379850b Convert defaultIfEmpty from String to CharSequence.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@920187 13f79535-47bb-0310-9956-ffa450edef68
2010-03-08 03:41:49 +00:00
Niall Pemberton e1077c023d Re-generate the download pages using the new commons-build-plugin .12 (via commons-parent version 13)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@920156 13f79535-47bb-0310-9956-ffa450edef68
2010-03-08 00:11:50 +00:00
Niall Pemberton 0195cd60c5 Upgrade to version 13 of commons-parent
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@920154 13f79535-47bb-0310-9956-ffa450edef68
2010-03-08 00:05:47 +00:00
Gary D. Gregory 9abfbaecab More tests for length()
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@919872 13f79535-47bb-0310-9956-ffa450edef68
2010-03-06 22:54:34 +00:00
Gary D. Gregory 543f2d36e4 Change length(String) to length(CharSequence)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@919859 13f79535-47bb-0310-9956-ffa450edef68
2010-03-06 22:09:37 +00:00
Henri Yandell f91a7c97d3 Per David M. Sledge's patch to LANG-599, added support to ClassUtils.getClass(String) to support inner classes being separated by '.' as well as the official '$'
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@919340 13f79535-47bb-0310-9956-ffa450edef68
2010-03-05 09:05:47 +00:00
Henri Yandell 51df5ea90c Closing the paragraph tag on the ThreadSafe notation. LANG-370
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@918868 13f79535-47bb-0310-9956-ffa450edef68
2010-03-04 06:22:16 +00:00
Sebastian Bazley 18e7603cac Fix threadsafety comments
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@918836 13f79535-47bb-0310-9956-ffa450edef68
2010-03-04 03:12:36 +00:00
Sebastian Bazley 26cdd7ba56 Iterator is not threadsafe
Make private field final

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@918829 13f79535-47bb-0310-9956-ffa450edef68
2010-03-04 02:57:03 +00:00
Henri Yandell c84c4669aa Some more #ThreadSafe# tags per LANG-370
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@918373 13f79535-47bb-0310-9956-ffa450edef68
2010-03-03 09:22:46 +00:00
Henri Yandell bb0d189f1b Adding ThreadSafe notes to some obviously threadsafe classes (LANG-370)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@918369 13f79535-47bb-0310-9956-ffa450edef68
2010-03-03 09:16:38 +00:00
Henri Yandell 36a29645fb Fixing javadoc @see tags
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@918368 13f79535-47bb-0310-9956-ffa450edef68
2010-03-03 09:09:14 +00:00
Henri Yandell 45488c9826 Adding info on the LANG-559 commits
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@918367 13f79535-47bb-0310-9956-ffa450edef68
2010-03-03 08:58:10 +00:00