Commit Graph

5012 Commits

Author SHA1 Message Date
Basha 9766e22b42 Adding testcase to cover a missing branch. 2017-04-29 20:06:31 +05:30
Basha ece2f255ee Increase test coverage of ToStringBuilder class to 100% 2017-04-29 19:22:59 +05:30
Allon Mureinik c8e648b92c HashSetvBitSetTest: use diamond operator (closes #264)
Use Java 7's diamond operator to make the code a tad more elegant, as
done in the rest of the codebase.
2017-04-29 10:48:41 +02:00
pascalschumacher d61090ab64 LANG-1256: Add JMH maven dependencies.
move checkstyle exclusion of JMH generated classes from pom.xml to checkstyle-suppressions.xml
2017-04-28 21:03:56 +02:00
pascalschumacher b7cc7a1c7b LANG-1256: Add JMH maven dependencies.
fix checkstyle exclusion on older maven versions
2017-04-28 19:09:14 +02:00
pascalschumacher 331d2f21f9 LANG-1256: Add JMH maven dependencies.
do not run checksytle on classes generated by JMH

remove unnecessary maven-compiler-plugin configuration from benchmark profile
2017-04-28 18:34:29 +02:00
pascalschumacher e685d847b4 LANG-1110: Implement HashSetvBitSetTest using JMH
(side effect: closes #253, closes #191)
2017-04-28 17:36:58 +02:00
Artem Barger 111fd3f6ee LANG-1256: Add JMH maven dependencies. (closes #182)
In order to provide patch for LANG-1110, required dependency on JMH lib.
Current commit add benchmark profile and ability to run JMH based benchmark by
executing "mvn test -P benchmark" command, moreover it's also possible to
specify exact benchmark name by running "mvn test -P benchmark
-Dbenchmark=benchmark.full.class.name".
2017-04-28 17:30:46 +02:00
pascalschumacher a060733e63 use Assert#assertFalse instead of Assert#assertTrue with a negated condition 2017-04-22 22:25:52 +02:00
Allon Mureinik d5be24a126 Use String#contains where possible (closes #263)
Since the project defines a JDK 7 source compatibility, it's safe to use JDK 5's features.
This patch replaces usages of String#indexOf with String#contains where possible to make the code easier to read and maintain.
2017-04-22 22:18:16 +02:00
pascalschumacher 8cafd87c83 LANG-1317: Add MethodUtils#findAnnotation and extend MethodUtils#getMethodsWithAnnotation for non-public, super-class and interface methods
fix bug introduced by last commit
2017-04-21 10:53:17 +02:00
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