4951 Commits

Author SHA1 Message Date
pascalschumacher
314b6b56be LANG-1317: Add MethodUtils#findAnnotation and extend MethodUtils#getMethodsWithAnnotation for non-public, super-class and interface methods
Add changes.xml entry and minimal clean-up.
2017-04-21 10:45:03 +02:00
Yasser Zamani
46007c151e LANG-1317: Adds MethodUtils#findAnnotation and extend MethodUtils#getMethodsWithAnnotation for non-public, super-class and interface methods (closes #261) 2017-04-21 10:44:41 +02:00
pascalschumacher
859224ffad LANG-1167: Add null filter to ReflectionToStringBuilder
Fix/add since javadoc tags, fix checkstyle violations and do other small clean-ups.
2017-04-20 19:15:31 +02:00
Rob Tompkins
0446364ffa LANG-1167: attributing work to Mark Dacek 2017-04-20 11:23:42 -04:00
Rob Tompkins
8147cc5b3d Merge branch 'LANG-1167' of https://github.com/MarkDacek/commons-lang 2017-04-20 11:08:03 -04:00
pascalschumacher
ff6b0ada72 use Validate#isTrue to validate arguments 2017-04-19 21:07:05 +02:00
pascalschumacher
52d6e24d19 use Validate#notNull instead of "throw new NullPointerException" 2017-04-19 20:17:58 +02:00
Emmanuel Bourg
82cc24437f LANG-1272: Added shuffle methods to ArrayUtils 2017-04-19 18:54:23 +02:00
Allon Mureinik
9ceaaeb656 Add FindBugs to Travis CI (closes #262)
This patch copies the FindBugs configuration in pom.xml from the
reporting section to the build section so findbugs can be used as part
of the build process (by using the maven goal findbugs:check).

It then adds this goal to the Travis CI build so that FindBugs
becomes part of the CI, and new patches would be prevented from
introducing new FindBugs errors.
2017-04-19 18:25:04 +02:00
Allon Mureinik
9f7d03f091 Add a default case to switch to appease FindBugs 2017-04-19 18:24:58 +02:00
Allon Mureinik
8069e1c1ce Exclude SF_SWITCH_NO_DEFAULT on FastDatePrinter
FastDatePrinter#appendFullDigits uses a switch case without break
statements.

SF_SWITCH_NO_DEFAULT unfortunately cannot recognize this pattern, and
leave us with no choice but to suppress it.
2017-04-19 18:24:57 +02:00
Allon Mureinik
4d343ccc11 Exclude SF_SWITCH_FALLTHROUGH on FastDatePrinter
FastDatePrinter#appendFullDigits uses a switch statement that
intentionally falls through the cases.
This patch adds a FindBugs suppression for it.
2017-04-19 18:24:57 +02:00
Allon Mureinik
c40dcf6598 Exclude SF_SWITCH_NO_DEFAULT on FastDateParser
FastDateParser#simpleQuote uses a switch case that actually has a
default branch in it, but doesn't use break statements.

SF_SWITCH_NO_DEFAULT unfortunately cannot recognize this pattern, and
leave us with no choice but to suppress it.
2017-04-19 18:24:57 +02:00
Allon Mureinik
3304965840 FindBugs exclude filter for StringUtils
Exclude ES_COMPARING_PARAMETER_STRING_WITH_EQ FindBugs warnings from
StringUtils methods compare(String, String, boolean) and
compareIgnoreCase(String, String, boolean).

The usages of the == operator seem to be intentional optimizations
similar to the usage in indexOfDifference. If this reasoning is ever
overruled, this suppression should be removed.
2017-04-19 18:24:57 +02:00
Emmanuel Bourg
5a52446090 Fixed the indentation in ArrayUtilsTest 2017-04-18 22:52:21 +02:00
Gary Gregory
a91f76da21 [LANG-1291] Provide annotations to document thread safety. 2017-04-17 12:00:09 -07:00
Gary Gregory
a5e76ebc40 [LANG-1291] Provide annotations to document thread safety. 2017-04-17 11:54:04 -07:00
Benedikt Ritter
5242157dfb
Update copyright year 2017-04-17 14:13:42 +02:00
Benedikt Ritter
63dcba41a9
Update to latest PMD version 2017-04-17 13:13:40 +02:00
Benedikt Ritter
c82b1f062a
PMD: Nested if statements can be combined 2017-04-17 13:02:11 +02:00
Benedikt Ritter
fb4803623b
LANG-1312: LocaleUtils#toLocale does not support language followed by UN M.49 numeric-3 area code followed by variant 2017-04-17 12:55:42 +02:00
Benedikt Ritter
dfecbe9709
Introduce some more local variables to make the code better readable 2017-04-17 12:40:58 +02:00
Benedikt Ritter
f059e5f7fa
Remove initial if statement by adding an early return 2017-04-17 12:33:17 +02:00
Benedikt Ritter
8f54030347
Replace switch statement with if-else block 2017-04-17 12:31:34 +02:00
Benedikt Ritter
d3146a5456
Extract some helper methods to make the code better readable 2017-04-17 12:29:05 +02:00
Benedikt Ritter
d547412bbd
Extract method for parsing locales from string 2017-04-17 12:09:37 +02:00
Benedikt Ritter
3c89994355
Better local variable names 2017-04-17 12:01:54 +02:00
Rob Tompkins
cd05fddd4f (docs) removing erroneous link to sonar dashboard 2017-04-11 20:42:29 -04:00
pascalschumacher
5d3a2081c5 LANG-1313: Add ArchUtils
add missing since javadoc tags
2017-03-27 21:59:42 +02:00
pascalschumacher
30d4070af9 Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/commons-lang 2017-03-27 20:42:48 +02:00
pascalschumacher
46edb45d3e add changes.xml entry for LANG-1313 2017-03-27 20:41:07 +02:00
Tomschi
90f0a680ad LANG-1313: Add ArchUtils - an utility class for the "os.arch" system property (closes #231) 2017-03-27 20:40:28 +02:00
Benedikt Ritter
b06f13ff0e Remove trailing white spaces 2017-03-27 20:15:36 +02:00
Benedikt Ritter
54c3daaf17 Correct @since annotation 2017-03-27 20:09:14 +02:00
pascalschumacher
1674c953fa Restore clirr report generation
Since commons-parent version 41, generation of the clirr report for the site has to be explicitly enabled by adding a "src\site\resources\profile.clirr" file.
2017-03-26 14:06:23 +02:00
Tobias Soloschenko
4a300fee2e Fixed javadoc of MutableBoolean setTrue / setFalse (closes #260) 2017-03-22 17:32:14 +01:00
pascalschumacher
5d6c176388 changes.xml: add entry for LANG-1310 2017-03-19 17:14:42 +01:00
drajakumar
1a20867d01 LANG-1310: MethodUtils.invokeMethod throws ArrayStoreException if using varargs arguments and smaller types than the method defines (closes #256) 2017-03-19 17:12:16 +01:00
pascalschumacher
7ac12154b0 README.md: remove license badge, because github now displays the license at the top of the page 2017-03-19 14:42:31 +01:00
pascalschumacher
811dbe7226 restore deprecated annotation of StringUtils#getJaroWinklerDistance
This annotation was with "LANG-1316: Deprecate classes/methods moved to commons-text" and removed by mistake while reverting "LANG-1269: Wrong name or result of StringUtils#getJaroWinklerDistance".
2017-03-19 14:37:19 +01:00
pascalschumacher
f4ee399e31 Revert "LANG-1269: Wrong name or result of StringUtils#getJaroWinklerDistance (closes #198)"
This reverts commit a40b2a907a69e51675d7d0502b2608833c4da343, because adding a new method StringUtils#getJaroWinklerSimilarity and immediately deprecating it makes not sense.
2017-03-19 14:25:20 +01:00
pascalschumacher
844cd4298e LANG-1316: Deprecate classes/methods moved to commons-text (closes #255)
* org.apache.commons.lang3.text.translate - every class
* org.apache.commons.lang3.text - every class other than WordUtils
* StringEscapeUtils - whole class
* StringUtils: getLevenshteinDistance, getFuzzyDistance and getJaroWinklerSimilarity methods
* ObjectUtils: identityToString(final StrBuilder builder, final Object object) method (StrBuilder was moved to commons-text)
2017-03-19 14:12:44 +01:00
pascalschumacher
9aea44acea travis: add clirr check 2017-03-19 10:41:33 +01:00
pascalschumacher
e702828e7b checkstyle-suppressions.xml: make paths work on windows 2017-03-19 10:32:33 +01:00
pascalschumacher
99900ae089 StringUtilsEqualsIndexOfTest: fix checkstyle violations 2017-03-19 10:31:21 +01:00
Allon Mureinik
27d3d40f7c Apply checkstyle checks to test files (closes #257)
This patch enforces the code style defined by the checkstyle checks
to the test files too.

In the cases where it would just add robustness and not improve the
code's readability and maintainability (specifically - the javadoc
checks), those checks are explicitly suppressed.
2017-03-19 10:10:50 +01:00
Allon Mureinik
1731949116 MethodUtilsTest whitespaces
Clean up MethodUtilsTest whitespaces as per the project's standards -
no trailing whitespaces are allowed and spaces are used for
indentation.
2017-03-19 10:10:45 +01:00
Allon Mureinik
6bc8650ed4 Remove test wildcard imports
This patch applies the de-facto project's coding standard on the test
files and replaces wildcard static imports with series of single
method imports.
2017-03-19 10:10:45 +01:00
MarkDacek
e423b0bc2d LANG-1167: Added license to top of ReflectionToStringBuilderExcludeNullValuesTest.java 2017-03-18 18:49:40 -04:00
MarkDacek
3c2673e82d LANG-1167: Added more test cases for ReflectionToStringBuilderExcludeNullValuesTest 2017-03-18 16:00:46 -04:00