[commons-compress] branch master updated: Add release section for 1.23
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-compress.git The following commit(s) were added to refs/heads/master by this push: new ac4279bd Add release section for 1.23 ac4279bd is described below commit ac4279bd66ff0cf136b7231d9cb5fe6098a4d662 Author: Matt Sicker AuthorDate: Tue Nov 1 15:38:17 2022 -0500 Add release section for 1.23 --- src/changes/changes.xml | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 165f5acc..d3d0e58c 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -42,7 +42,12 @@ The type attribute can be add,update,fix,remove. Apache Commons Compress Release Notes - + + + + + + Fix some compiler warnings in pack200 packages.
svn commit: r1904985 - /commons/cms-site/trunk/doap/doap_compress.rdf
Author: mattsicker Date: Tue Nov 1 20:36:45 2022 New Revision: 1904985 URL: http://svn.apache.org/viewvc?rev=1904985=rev Log: Add commons-compress 1.22 release Modified: commons/cms-site/trunk/doap/doap_compress.rdf Modified: commons/cms-site/trunk/doap/doap_compress.rdf URL: http://svn.apache.org/viewvc/commons/cms-site/trunk/doap/doap_compress.rdf?rev=1904985=1904984=1904985=diff == --- commons/cms-site/trunk/doap/doap_compress.rdf (original) +++ commons/cms-site/trunk/doap/doap_compress.rdf Tue Nov 1 20:36:45 2022 @@ -36,6 +36,13 @@ commons-compress +2022-11-01 +1.22 + + + + +commons-compress 2021-07-12 1.21
svn commit: r1904984 - /commons/cms-site/trunk/conf/component_releases.properties
Author: mattsicker Date: Tue Nov 1 20:35:05 2022 New Revision: 1904984 URL: http://svn.apache.org/viewvc?rev=1904984=rev Log: Update commons-compress release to 1.22 Modified: commons/cms-site/trunk/conf/component_releases.properties Modified: commons/cms-site/trunk/conf/component_releases.properties URL: http://svn.apache.org/viewvc/commons/cms-site/trunk/conf/component_releases.properties?rev=1904984=1904983=1904984=diff == --- commons/cms-site/trunk/conf/component_releases.properties (original) +++ commons/cms-site/trunk/conf/component_releases.properties Tue Nov 1 20:35:05 2022 @@ -12,7 +12,7 @@ codecVersion=1.15 codecReleased=2020-09-01 collectionsVersion=4.4 collectionsReleased=2019-07-05 -compressVersion=1.21 +compressVersion=1.22 compressReleased=2021-07-12 configurationVersion=2.8.0 configurationReleased=2022-07-03
svn commit: r57713 - in /release/commons/compress: binaries/ source/
Author: mattsicker Date: Tue Nov 1 20:34:29 2022 New Revision: 57713 Log: Remove old commons-compress release Removed: release/commons/compress/binaries/commons-compress-1.21-bin.tar.gz release/commons/compress/binaries/commons-compress-1.21-bin.tar.gz.asc release/commons/compress/binaries/commons-compress-1.21-bin.tar.gz.sha512 release/commons/compress/binaries/commons-compress-1.21-bin.zip release/commons/compress/binaries/commons-compress-1.21-bin.zip.asc release/commons/compress/binaries/commons-compress-1.21-bin.zip.sha512 release/commons/compress/source/commons-compress-1.21-src.tar.gz release/commons/compress/source/commons-compress-1.21-src.tar.gz.asc release/commons/compress/source/commons-compress-1.21-src.tar.gz.sha512 release/commons/compress/source/commons-compress-1.21-src.zip release/commons/compress/source/commons-compress-1.21-src.zip.asc release/commons/compress/source/commons-compress-1.21-src.zip.sha512
svn commit: r57697 - in /release/commons/compress/source: HEADER.html README.html
Author: mattsicker Date: Mon Oct 31 23:36:43 2022 New Revision: 57697 Log: Add header and readme links Added: release/commons/compress/source/HEADER.html (with props) release/commons/compress/source/README.html (with props) Added: release/commons/compress/source/HEADER.html == --- release/commons/compress/source/HEADER.html (added) +++ release/commons/compress/source/HEADER.html Mon Oct 31 23:36:43 2022 @@ -0,0 +1 @@ +link ../HEADER.html \ No newline at end of file Propchange: release/commons/compress/source/HEADER.html -- svn:special = * Added: release/commons/compress/source/README.html == --- release/commons/compress/source/README.html (added) +++ release/commons/compress/source/README.html Mon Oct 31 23:36:43 2022 @@ -0,0 +1 @@ +link ../README.html \ No newline at end of file Propchange: release/commons/compress/source/README.html -- svn:special = *
svn commit: r57696 - /release/commons/compress/README.html
Author: mattsicker Date: Mon Oct 31 23:35:37 2022 New Revision: 57696 Log: Update readme for compress download Modified: release/commons/compress/README.html Modified: release/commons/compress/README.html == --- release/commons/compress/README.html (original) +++ release/commons/compress/README.html Mon Oct 31 23:35:37 2022 @@ -1,6 +1,6 @@ -Commons-Compress 1.21 +Commons-Compress 1.22 -This is the 1.21 release of commons-compress. It is available in both binary and source distributions. +This is the 1.22 release of commons-compress. It is available in both binary and source distributions. Note: The tar files in the distribution use GNU tar extensions @@ -34,12 +34,12 @@ href="https://www.apache.org/dist/common Always test available signatures, e.g., $ pgpk -a KEYS -$ pgpv commons-compress-1.21-bin.tar.gz.asc +$ pgpv commons-compress-1.22-bin.tar.gz.asc or, $ pgp -ka KEYS -$ pgp commons-compress-1.21-bin.tar.gz.asc +$ pgp commons-compress-1.22-bin.tar.gz.asc or, $ gpg --import KEYS -$ gpg --verify commons-compress-1.21-bin.tar.gz.asc +$ gpg --verify commons-compress-1.22-bin.tar.gz.asc
[commons-compress] 01/01: [maven-release-plugin] prepare for next development iteration
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-compress.git commit df7e5d8e51af756c8d6fc87602837b496dcce8f4 Author: Matt Sicker AuthorDate: Tue Oct 25 14:34:03 2022 -0500 [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 364b5020..86e273e3 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ commons-compress - 1.22 + 1.23-SNAPSHOT Apache Commons Compress https://commons.apache.org/proper/commons-compress/ 2002 @@ -330,7 +330,7 @@ Brotli, Zstandard and ar, cpio, jar, tar, zip, dump, 7z, arj. scm:git:https://gitbox.apache.org/repos/asf/commons-compress.git scm:git:https://gitbox.apache.org/repos/asf/commons-compress.git https://gitbox.apache.org/repos/asf?p=commons-compress.git -commons-compress-1.22 +HEAD
[commons-compress] branch master updated (0cb79655 -> df7e5d8e)
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/commons-compress.git from 0cb79655 Bump Scorecards from 1 to 2 add 7f96e64d Update download page and pom for 1.22 release add 01ec025d Update files for 1.22 release add f7f61faa Update release notes for 1.22 add 1e8e7f7d Add 1.22 changes to homepage add 5183d0b0 [maven-release-plugin] prepare release commons-compress-1.22 new df7e5d8e [maven-release-plugin] prepare for next development iteration The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: CONTRIBUTING.md |2 +- RELEASE-NOTES.txt | 322 +++ pom.xml | 15 +- src/changes/release-notes.vm| 1044 +++ src/site/site.xml |1 + src/site/xdoc/download_compress.xml | 26 +- src/site/xdoc/index.xml | 15 +- src/site/xdoc/mail-lists.xml| 34 +- 8 files changed, 1309 insertions(+), 150 deletions(-)
[commons-compress] annotated tag rel/1.22 updated (5183d0b0 -> 8095a271)
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a change to annotated tag rel/1.22 in repository https://gitbox.apache.org/repos/asf/commons-compress.git *** WARNING: tag rel/1.22 was modified! *** from 5183d0b0 (commit) to 8095a271 (tag) tagging 5183d0b08c0897e6f0c41a038487b7c795136425 (commit) replaces rel/1.20 by Matt Sicker on Mon Oct 31 12:48:08 2022 -0500 - Log - Release commons-compress 1.22 -BEGIN SSH SIGNATURE- U1NIU0lHAQAAAGgTZWNkc2Etc2hhMi1uaXN0cDI1NghuaXN0cDI1NgAAAE EEe+7HtoFndPeMYoo5E2aYLFDEKDhsiaBibQ1xdqi9lqZzjmrojz3M0OABES7w05hZQ3CQ i52JB0jovvdsax5JFgNnaXQABnNoYTUxMgAAAGMTZWNkc2Etc2hhMi 1uaXN0cDI1NgAAAEggdRks0uJRJWNkojinJ6yVQLGFGJU8t9ISoPUtHRSn8ygg NZ3AddqXXg7Nxh81OWjhO1qba5j+9H60T0z8JH3m9wg= -END SSH SIGNATURE- --- No new revisions were added by this update. Summary of changes:
svn commit: r57691 - /dev/commons/compress/1.22-RC1/source/ /release/commons/compress/source/
Author: mattsicker Date: Mon Oct 31 17:45:53 2022 New Revision: 57691 Log: Move compress 1.22 source archives to dist Added: release/commons/compress/source/commons-compress-1.22-src.tar.gz - copied unchanged from r57690, dev/commons/compress/1.22-RC1/source/commons-compress-1.22-src.tar.gz release/commons/compress/source/commons-compress-1.22-src.tar.gz.asc - copied unchanged from r57690, dev/commons/compress/1.22-RC1/source/commons-compress-1.22-src.tar.gz.asc release/commons/compress/source/commons-compress-1.22-src.tar.gz.sha512 - copied unchanged from r57690, dev/commons/compress/1.22-RC1/source/commons-compress-1.22-src.tar.gz.sha512 release/commons/compress/source/commons-compress-1.22-src.zip - copied unchanged from r57690, dev/commons/compress/1.22-RC1/source/commons-compress-1.22-src.zip release/commons/compress/source/commons-compress-1.22-src.zip.asc - copied unchanged from r57690, dev/commons/compress/1.22-RC1/source/commons-compress-1.22-src.zip.asc release/commons/compress/source/commons-compress-1.22-src.zip.sha512 - copied unchanged from r57690, dev/commons/compress/1.22-RC1/source/commons-compress-1.22-src.zip.sha512 Removed: dev/commons/compress/1.22-RC1/source/commons-compress-1.22-src.tar.gz dev/commons/compress/1.22-RC1/source/commons-compress-1.22-src.tar.gz.asc dev/commons/compress/1.22-RC1/source/commons-compress-1.22-src.tar.gz.sha512 dev/commons/compress/1.22-RC1/source/commons-compress-1.22-src.zip dev/commons/compress/1.22-RC1/source/commons-compress-1.22-src.zip.asc dev/commons/compress/1.22-RC1/source/commons-compress-1.22-src.zip.sha512
svn commit: r57690 - /dev/commons/compress/1.22-RC1/binaries/ /release/commons/compress/binaries/
Author: mattsicker Date: Mon Oct 31 17:45:14 2022 New Revision: 57690 Log: Move compress 1.22 binaries to dist Added: release/commons/compress/binaries/commons-compress-1.22-bin.tar.gz - copied unchanged from r57689, dev/commons/compress/1.22-RC1/binaries/commons-compress-1.22-bin.tar.gz release/commons/compress/binaries/commons-compress-1.22-bin.tar.gz.asc - copied unchanged from r57689, dev/commons/compress/1.22-RC1/binaries/commons-compress-1.22-bin.tar.gz.asc release/commons/compress/binaries/commons-compress-1.22-bin.tar.gz.sha512 - copied unchanged from r57689, dev/commons/compress/1.22-RC1/binaries/commons-compress-1.22-bin.tar.gz.sha512 release/commons/compress/binaries/commons-compress-1.22-bin.zip - copied unchanged from r57689, dev/commons/compress/1.22-RC1/binaries/commons-compress-1.22-bin.zip release/commons/compress/binaries/commons-compress-1.22-bin.zip.asc - copied unchanged from r57689, dev/commons/compress/1.22-RC1/binaries/commons-compress-1.22-bin.zip.asc release/commons/compress/binaries/commons-compress-1.22-bin.zip.sha512 - copied unchanged from r57689, dev/commons/compress/1.22-RC1/binaries/commons-compress-1.22-bin.zip.sha512 Removed: dev/commons/compress/1.22-RC1/binaries/commons-compress-1.22-bin.tar.gz dev/commons/compress/1.22-RC1/binaries/commons-compress-1.22-bin.tar.gz.asc dev/commons/compress/1.22-RC1/binaries/commons-compress-1.22-bin.tar.gz.sha512 dev/commons/compress/1.22-RC1/binaries/commons-compress-1.22-bin.zip dev/commons/compress/1.22-RC1/binaries/commons-compress-1.22-bin.zip.asc dev/commons/compress/1.22-RC1/binaries/commons-compress-1.22-bin.zip.sha512
svn commit: r57689 - /dev/commons/compress/1.22-RC1/RELEASE-NOTES.txt /release/commons/compress/RELEASE-NOTES.txt
Author: mattsicker Date: Mon Oct 31 17:42:01 2022 New Revision: 57689 Log: Move compress 1.22 release notes into place Added: release/commons/compress/RELEASE-NOTES.txt - copied unchanged from r57688, dev/commons/compress/1.22-RC1/RELEASE-NOTES.txt Removed: dev/commons/compress/1.22-RC1/RELEASE-NOTES.txt
svn commit: r57688 - /release/commons/compress/RELEASE-NOTES.txt
Author: mattsicker Date: Mon Oct 31 17:41:49 2022 New Revision: 57688 Log: Remove old release notes Removed: release/commons/compress/RELEASE-NOTES.txt
[commons-compress] tag commons-compress-1.22-RC1 created (now 5183d0b0)
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a change to tag commons-compress-1.22-RC1 in repository https://gitbox.apache.org/repos/asf/commons-compress.git at 5183d0b0 (commit) No new revisions were added by this update.
svn commit: r57596 - in /dev/commons/compress/1.22-RC1: ./ binaries/ site/ site/apidocs/ site/apidocs/org/ site/apidocs/org/apache/ site/apidocs/org/apache/commons/ site/apidocs/org/apache/commons/com
Author: mattsicker Date: Tue Oct 25 19:51:57 2022 New Revision: 57596 Log: Staging release: commons-compress, version: 1.22 [This commit notification would consist of 703 parts, which exceeds the limit of 50 ones, so it was shortened to the summary.]
svn commit: r57595 - in /dev/commons/compress: binaries/ source/
Author: mattsicker Date: Tue Oct 25 19:44:44 2022 New Revision: 57595 Log: Cleaning distribution area for: commons-compress Removed: dev/commons/compress/binaries/ dev/commons/compress/source/
[commons-compress] branch release-1.22 updated: [maven-release-plugin] prepare for next development iteration
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a commit to branch release-1.22 in repository https://gitbox.apache.org/repos/asf/commons-compress.git The following commit(s) were added to refs/heads/release-1.22 by this push: new df7e5d8e [maven-release-plugin] prepare for next development iteration df7e5d8e is described below commit df7e5d8e51af756c8d6fc87602837b496dcce8f4 Author: Matt Sicker AuthorDate: Tue Oct 25 14:34:03 2022 -0500 [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 364b5020..86e273e3 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ commons-compress - 1.22 + 1.23-SNAPSHOT Apache Commons Compress https://commons.apache.org/proper/commons-compress/ 2002 @@ -330,7 +330,7 @@ Brotli, Zstandard and ar, cpio, jar, tar, zip, dump, 7z, arj. scm:git:https://gitbox.apache.org/repos/asf/commons-compress.git scm:git:https://gitbox.apache.org/repos/asf/commons-compress.git https://gitbox.apache.org/repos/asf?p=commons-compress.git -commons-compress-1.22 +HEAD
[commons-compress] annotated tag commons-compress-1.22 created (now baa23a3f)
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a change to annotated tag commons-compress-1.22 in repository https://gitbox.apache.org/repos/asf/commons-compress.git at baa23a3f (tag) tagging 5183d0b08c0897e6f0c41a038487b7c795136425 (commit) replaces rel/1.20 by Matt Sicker on Tue Oct 25 14:33:58 2022 -0500 - Log - [maven-release-plugin] copy for tag commons-compress-1.22 --- No new revisions were added by this update.
[commons-compress] 05/05: [maven-release-plugin] prepare release commons-compress-1.22
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a commit to branch release-1.22 in repository https://gitbox.apache.org/repos/asf/commons-compress.git commit 5183d0b08c0897e6f0c41a038487b7c795136425 Author: Matt Sicker AuthorDate: Tue Oct 25 14:33:45 2022 -0500 [maven-release-plugin] prepare release commons-compress-1.22 --- pom.xml | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index d3c0e0a7..364b5020 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ commons-compress - 1.22-SNAPSHOT + 1.22 Apache Commons Compress https://commons.apache.org/proper/commons-compress/ 2002 @@ -330,6 +330,7 @@ Brotli, Zstandard and ar, cpio, jar, tar, zip, dump, 7z, arj. scm:git:https://gitbox.apache.org/repos/asf/commons-compress.git scm:git:https://gitbox.apache.org/repos/asf/commons-compress.git https://gitbox.apache.org/repos/asf?p=commons-compress.git +commons-compress-1.22 @@ -466,9 +467,7 @@ Brotli, Zstandard and ar, cpio, jar, tar, zip, dump, 7z, arj. process-test-resources - + @@ -563,9 +562,7 @@ Brotli, Zstandard and ar, cpio, jar, tar, zip, dump, 7z, arj. process-test-resources - +
[commons-compress] branch release-1.22 created (now 5183d0b0)
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a change to branch release-1.22 in repository https://gitbox.apache.org/repos/asf/commons-compress.git at 5183d0b0 [maven-release-plugin] prepare release commons-compress-1.22 This branch includes the following new commits: new 7f96e64d Update download page and pom for 1.22 release new 01ec025d Update files for 1.22 release new f7f61faa Update release notes for 1.22 new 1e8e7f7d Add 1.22 changes to homepage new 5183d0b0 [maven-release-plugin] prepare release commons-compress-1.22 The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[commons-compress] 02/05: Update files for 1.22 release
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a commit to branch release-1.22 in repository https://gitbox.apache.org/repos/asf/commons-compress.git commit 01ec025d450ccafa1eea28352d39ee24fad6d34b Author: Matt Sicker AuthorDate: Tue Oct 25 14:04:51 2022 -0500 Update files for 1.22 release --- CONTRIBUTING.md | 2 +- src/site/site.xml| 1 + src/site/xdoc/mail-lists.xml | 34 ++ 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 48d051fd..8b7804b6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -61,7 +61,7 @@ Making Changes -- + Create a _topic branch_ for your isolated work. - * Usually you should base your branch on the `master` branch. + * Usually you should base your branch on the `master` or `trunk` branch. * A good topic branch name can be the JIRA bug id plus a keyword, e.g. `COMPRESS-123-InputStream`. * If you have submitted multiple JIRA issues, try to maintain separate branches and pull requests. + Make commits of logical units. diff --git a/src/site/site.xml b/src/site/site.xml index 809894f3..d1353843 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -39,6 +39,7 @@ + diff --git a/src/site/xdoc/mail-lists.xml b/src/site/xdoc/mail-lists.xml index a249a092..b4a693b7 100644 --- a/src/site/xdoc/mail-lists.xml +++ b/src/site/xdoc/mail-lists.xml @@ -105,10 +105,12 @@ limitations under the License. mailto:user-subscr...@commons.apache.org;>Subscribe mailto:user-unsubscr...@commons.apache.org;>Unsubscribe mailto:u...@commons.apache.org?subject=[compress];>Post - https://mail-archives.apache.org/mod_mbox/commons-user/;>mail-archives.apache.org + https://mail-archives.apache.org/mod_mbox/commons-user/;>mail-archives.apache.org + https://lists.apache.org/list.html?u...@commons.apache.org;>lists.apache.org + https://markmail.org/list/org.apache.commons.users/;>markmail.org https://www.mail-archive.com/user@commons.apache.org/;>www.mail-archive.com - http://news.gmane.org/gmane.comp.jakarta.commons.devel;>news.gmane.org + https://news.gmane.org/gmane.comp.jakarta.commons.devel;>news.gmane.org @@ -123,10 +125,12 @@ limitations under the License. mailto:dev-subscr...@commons.apache.org;>Subscribe mailto:dev-unsubscr...@commons.apache.org;>Unsubscribe mailto:d...@commons.apache.org?subject=[compress];>Post - https://mail-archives.apache.org/mod_mbox/commons-dev/;>mail-archives.apache.org + https://mail-archives.apache.org/mod_mbox/commons-dev/;>mail-archives.apache.org + https://lists.apache.org/list.html?d...@commons.apache.org;>lists.apache.org + https://markmail.org/list/org.apache.commons.dev/;>markmail.org https://www.mail-archive.com/dev@commons.apache.org/;>www.mail-archive.com - http://news.gmane.org/gmane.comp.jakarta.commons.devel;>news.gmane.org + https://news.gmane.org/gmane.comp.jakarta.commons.devel;>news.gmane.org @@ -141,7 +145,9 @@ limitations under the License. mailto:issues-subscr...@commons.apache.org;>Subscribe mailto:issues-unsubscr...@commons.apache.org;>Unsubscribe read only - https://mail-archives.apache.org/mod_mbox/commons-issues/;>mail-archives.apache.org + https://mail-archives.apache.org/mod_mbox/commons-issues/;>mail-archives.apache.org + https://lists.apache.org/list.html?iss...@commons.apache.org;>lists.apache.org + https://markmail.org/list/org.apache.commons.issues/;>markmail.org https://www.mail-archive.com/issues@commons.apache.org/;>www.mail-archive.com @@ -152,13 +158,15 @@ limitations under the License. Commons Commits List -Only for e-mails automatically generated by the source control system. +Only for e-mails automatically generated by the source control sytem. mailto:commits-subscr...@commons.apache.org;>Subscribe mailto:commits-unsubscr...@commons.apache.org;>Unsubscribe read only - https://mail-archives.apache.org/mod_mbox/commons-commits/;>mail-archives.apache.org + https://mail-archives.apache.org/mod_mbox/commons-commits/;>mail-archives.apache.org + https://lists.apache.org/list.html?commits@commons.apache.org;>lists.apache.org + https://markmail.org/list/org.apache.commons.commits/;>markmail.org https://www.mail-archive.com/co
[commons-compress] 03/05: Update release notes for 1.22
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a commit to branch release-1.22 in repository https://gitbox.apache.org/repos/asf/commons-compress.git commit f7f61faab13ccdc49ed18aba8d7215a3e0681ca1 Author: Matt Sicker AuthorDate: Tue Oct 25 14:16:23 2022 -0500 Update release notes for 1.22 --- RELEASE-NOTES.txt| 322 - src/changes/release-notes.vm | 1044 ++ 2 files changed, 1250 insertions(+), 116 deletions(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index d09f2eb3..63c7135a 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -5,6 +5,98 @@ compression and archive formats. These include: bzip2, gzip, pack200, lzma, xz, Snappy, traditional Unix Compress, DEFLATE, DEFLATE64, LZ4, Brotli, Zstandard and ar, cpio, jar, tar, zip, dump, 7z, arj. +Release 1.22 + + +New features: +o Migrate zip package to use NIO #236. + Issue: COMPRESS-602. Thanks to Postelnicu George, Gary Gregory. +o Add APK file extension constants: ArchiveStreamFactory.APK, APKM, APKS, XAPK. Thanks to Gary Gregory. +o ArchiveStreamFactory.createArchiveInputStream(String, InputStream, String) supports the "APK" format (it's a JAR). Thanks to Gary Gregory. +o Expander example now has NIO Path versions of IO File APIs. Thanks to Gary Gregory. +o Improve TAR support for file times #254. + Issue: COMPRESS-612. Thanks to Andre Brait, Gary Gregory. +o Add SevenZArchiveEntry.setContentMethods(SevenZMethodConfiguration...). Thanks to Gary Gregory. + +Fixed Bugs: +o Fix some compiler warnings in pack200 packages. Thanks to Gary Gregory. +o Close File input stream after unpacking in Pack200UnpackerAdapter.unpack(File, JarOutputStream). Thanks to Gary Gregory. +o Pack200UnpackerAdapter.unpack(InputStream, JarOutputStream) should not close its given input stream. Thanks to Gary Gregory. +o Fix minor problem in examples. + Issue: COMPRESS-596. Thanks to Tamas Mucs. +o Add a limit to the copy buffer in IOUtils.readRange() to + avoid reading more from a channel than asked for. + Github Pull Request #214. + Issue: COMPRESS-584. Thanks to Matthijs Laan, Peter Lee. +o Documentation nits #217. Thanks to Helder Magalh�es, Gary Gregory, PeterAlfredLee. +o Replace wrapper Collections.sort is with an instance method directly. #245. Thanks to Arturo Bernal. +o Replace manual comparisons with Comparator.comparingInt() #244. Thanks to Arturo Bernal. +o Replace manual copy of array contents with System.arraycopy() #246. Thanks to Arturo Bernal. +o Fix thread safety issues when encoding 7z password #248. Thanks to Glavo, Bruno P. Kinoshita, PeterAlfredLee, Gary Gregory. +o bzip2: calculate median-of-3 on unsigned values #242. Thanks to Peter Dettman. +o Use Math.min and Math.max calculations. #247. Thanks to Arturo Bernal, Gary Gregory, Bruno P. Kinoshita. +o Expander should be able to work if an entry's name is "./". + Issue: COMPRESS-603. Thanks to Matt Sicker. +o Ensure compatibility with Java 8 #252. + Issue: COMPRESS-604. Thanks to Andre Brait. +o Use StringBuilder instead of StringBuffer. #284. Thanks to Arturo Bernal. +o Inline variable. Remove redundant local variable. #283. Thanks to Arturo Bernal. +o Use compare method #285. Thanks to Arturo Bernal. +o Remove Unnecessary interface modifiers #281. Thanks to Arturo Bernal. +o Avoid use C-style array declaration. #282. Thanks to Arturo Bernal. +o ChecksumVerifyingInputStream.read() does not always validate checksum at end-of-stream. Thanks to Gary Gregory. +o Fix TarFileTest #289. Thanks to Matt Juntunen. +o Update Wikipedia link in TarUtils.java:627. + Issue: COMPRESS-625. Thanks to MrBump, Gary Gregory. +o OutOfMemoryError on malformed pack200 input (attributes). + Issue: COMPRESS-626. Thanks to Andrii Hudz, Gary Gregory. +o OutOfMemoryError on malformed pack200 input (org.apache.commons.compress.harmony.pack200.NewAttributeBands.readNextUnionCase). + Issue: COMPRESS-628. Thanks to Andrii Hudz, Gary Gregory. +o OutOfMemoryError on malformed unpack200 input (org.apache.commons.compress.harmony.unpack200.NewAttributeBands.readNextUnionCase). + Issue: COMPRESS-628. Thanks to Gary Gregory. +o Some input streams are not closed in org.apache.commons.compress.harmony.pack200.PackingUtils. Thanks to Gary Gregory. +o Pack200 causes a 'archive.3E' error if it?s not in the system class loader. + Issue: COMPRESS-627. Thanks to anatawa12, Gary Gregory. + +Changes: +o Bump actions/cache from 2.1.6 to 3.0.10 #230, #257, #305, #320. Thanks to Dependabot, Gary Gregory. +o Bump actions/checkout from 2.3.4 to 3.1.0 #226, #227, #251, #300, #321. Thanks to Dependabot, Gary Gregory. +o Bump actions/setup-java from 2 to 3.5.1 #278. Thanks to Dependabot. +o Bump github/codeql-action from 1 to 2 #287. Thanks to Dependabot. +o Bump mockito-core from 3.11.1 to 4.6.1 #209, #224, #231, #235, #243, #253,
[commons-compress] 04/05: Add 1.22 changes to homepage
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a commit to branch release-1.22 in repository https://gitbox.apache.org/repos/asf/commons-compress.git commit 1e8e7f7dc21a9e310e3ca1d39d920730c679dc6b Author: Matt Sicker AuthorDate: Tue Oct 25 14:27:06 2022 -0500 Add 1.22 changes to homepage --- src/site/xdoc/index.xml | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml index 539a9910..9c681e92 100644 --- a/src/site/xdoc/index.xml +++ b/src/site/xdoc/index.xml @@ -55,12 +55,25 @@ - The current release is 1.21 and requires Java 8. + The current release is 1.22 and requires Java 8. Below we highlight some new features, for a full list of changes see the Changes Report. + + + The zip package now uses NIO. + Support for APK files (JAR format) has been added +to ArchiveStreamFactory. + Improved TAR support for file times. + Added SevenZArchiveEntry::setContentMethods + Fixed Expander error when extracting archive +entries with names beginning with ./ + Fixed various fuzz testing and static analysis issues +discovered in pack200. + + A new class TarFile provides random
[commons-compress] 01/05: Update download page and pom for 1.22 release
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a commit to branch release-1.22 in repository https://gitbox.apache.org/repos/asf/commons-compress.git commit 7f96e64d3d051da4a6ca7a357102bbe0a9315e2d Author: Matt Sicker AuthorDate: Tue Oct 25 13:46:30 2022 -0500 Update download page and pom for 1.22 release --- pom.xml | 4 src/site/xdoc/download_compress.xml | 26 +- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index 5ce7d47f..d3c0e0a7 100644 --- a/pom.xml +++ b/pom.xml @@ -55,6 +55,10 @@ Brotli, Zstandard and ar, cpio, jar, tar, zip, dump, 7z, arj. 3.19.0 6.50.0 +true + scm:svn:https://dist.apache.org/repos/dist/dev/commons/${commons.componentid} +Matt Sicker +0x031EE010CA15D1EE ${project.build.outputDirectory}/META-INF ${commons.manifestlocation}/MANIFEST.MF diff --git a/src/site/xdoc/download_compress.xml b/src/site/xdoc/download_compress.xml index 67d7cf86..a17e344e 100644 --- a/src/site/xdoc/download_compress.xml +++ b/src/site/xdoc/download_compress.xml @@ -113,32 +113,32 @@ limitations under the License. - + - commons-compress-1.21-bin.tar.gz - https://www.apache.org/dist/commons/compress/binaries/commons-compress-1.21-bin.tar.gz.sha512;>sha512 - https://www.apache.org/dist/commons/compress/binaries/commons-compress-1.21-bin.tar.gz.asc;>pgp + commons-compress-1.22-bin.tar.gz + https://www.apache.org/dist/commons/compress/binaries/commons-compress-1.22-bin.tar.gz.sha512;>sha512 + https://www.apache.org/dist/commons/compress/binaries/commons-compress-1.22-bin.tar.gz.asc;>pgp - commons-compress-1.21-bin.zip - https://www.apache.org/dist/commons/compress/binaries/commons-compress-1.21-bin.zip.sha512;>sha512 - https://www.apache.org/dist/commons/compress/binaries/commons-compress-1.21-bin.zip.asc;>pgp + commons-compress-1.22-bin.zip + https://www.apache.org/dist/commons/compress/binaries/commons-compress-1.22-bin.zip.sha512;>sha512 + https://www.apache.org/dist/commons/compress/binaries/commons-compress-1.22-bin.zip.asc;>pgp - commons-compress-1.21-src.tar.gz - https://www.apache.org/dist/commons/compress/source/commons-compress-1.21-src.tar.gz.sha512;>sha512 - https://www.apache.org/dist/commons/compress/source/commons-compress-1.21-src.tar.gz.asc;>pgp + commons-compress-1.22-src.tar.gz + https://www.apache.org/dist/commons/compress/source/commons-compress-1.22-src.tar.gz.sha512;>sha512 + https://www.apache.org/dist/commons/compress/source/commons-compress-1.22-src.tar.gz.asc;>pgp - commons-compress-1.21-src.zip - https://www.apache.org/dist/commons/compress/source/commons-compress-1.21-src.zip.sha512;>sha512 - https://www.apache.org/dist/commons/compress/source/commons-compress-1.21-src.zip.asc;>pgp + commons-compress-1.22-src.zip + https://www.apache.org/dist/commons/compress/source/commons-compress-1.22-src.zip.sha512;>sha512 + https://www.apache.org/dist/commons/compress/source/commons-compress-1.22-src.zip.asc;>pgp
svn commit: r57594 - /release/commons/KEYS
Author: mattsicker Date: Tue Oct 25 18:44:18 2022 New Revision: 57594 Log: Add GPG release key for Matt Sicker Modified: release/commons/KEYS Modified: release/commons/KEYS == --- release/commons/KEYS (original) +++ release/commons/KEYS Tue Oct 25 18:44:18 2022 @@ -9430,3 +9430,38 @@ CF9l4/Pwg6FwoutWxLDNQsdBqF8tzhu/afOcGsOY UJ9MVCU= =yL9f -END PGP PUBLIC KEY BLOCK- + +pub ed25519/0x031EE010CA15D1EE 2022-03-10 [C] + Key fingerprint = 8378 BFAA D82F E5AA 602A C356 031E E010 CA15 D1EE +uid [ultimate] Matt Sicker +sig 30x031EE010CA15D1EE 2022-03-10 Matt Sicker +sub ed25519/0x0181B45EA58677BC 2022-03-10 [S] [expires: 2028-03-08] +sig 0x031EE010CA15D1EE 2022-03-10 Matt Sicker +sub cv25519/0x944EC8D1A08CF77A 2022-03-10 [E] [expires: 2028-03-08] +sig 0x031EE010CA15D1EE 2022-03-10 Matt Sicker +sub ed25519/0x11A629398030E936 2022-03-10 [A] [expires: 2028-03-08] +sig 0x031EE010CA15D1EE 2022-03-10 Matt Sicker + +-BEGIN PGP PUBLIC KEY BLOCK- + +mDMEYiljShYJKwYBBAHaRw8BAQdA4ativA3OtR15B4YnoRwpm9rRgHdd0A0lzJ4u +6q7gsMO0I01hdHQgU2lja2VyIDxtYXR0c2lja2VyQGFwYWNoZS5vcmc+iI4EExYK +ADYWIQSDeL+q2C/lqmAqw1YDHuAQyhXR7gUCYiljSgIbAQQLCQgHBBUKCQgFFgID +AQACHgECF4AACgkQAx7gEMoV0e4A9QEAwjrT892AmbfW8wz/v+GtePngb3lO1M13 +rgcvr2RStH0A/Ri4+kkaq8SJ1bKGutGQ1HdVKAezyH43gCElg2PIMBwLuDMEYilj +vhYJKwYBBAHaRw8BAQdAZu4+fS/JFKCVTzk4FGQdZUm2jVKoNmUYh4D90N7Md4yI +9QQYFgoAJhYhBIN4v6rYL+WqYCrDVgMe4BDKFdHuBQJiKWO+AhsCBQkLRzUAAIEJ +EAMe4BDKFdHudiAEGRYKAB0WIQTKYu0TDkBTlEQG32QBgbRepYZ3vAUCYiljvgAK +CRABgbRepYZ3vJtnAP0bBbIkexlDKrTeyTW3ah+KV2S1/OjA3WvtZZYdOengTgEA +7FxGQxTCEpL7ang6tEf335byU70z+Ctz4VbaoyCQUg0AhgD/SLe+JytxaIYw+VV7 +WvGj9UzoEFXqo6wAdu+nYEQcw+cBANgFCjQpgGEQCIEIjY/NrklZnMzXlHKZ1Ab8 +5KTuWCQEuDgEYilkCRIKKwYBBAGXVQEFAQEHQJX5V78g0svo7XH8mYaigbRAt/PY +X2A0g6Qxo0XEJD5YAwEIB4h+BBgWCgAmFiEEg3i/qtgv5apgKsNWAx7gEMoV0e4F +AmIpZAkCGwwFCQtHNQAACgkQAx7gEMoV0e4ecAD+KQWT2iO1W/EczvSgurkvbCgm +CkMeBwTucYVu6Hd0h0gA/2GVDe/McuK65LrqghHPek8PvSbMVtw/iR3OQ3cXyBYG +uDMEYilkGBYJKwYBBAHaRw8BAQdAPHx0bsFG7r3Zw3sZCc0GVVIPpxa3AA2YG8xg +7QAvNFeIfgQYFgoAJhYhBIN4v6rYL+WqYCrDVgMe4BDKFdHuBQJiKWQYAhsgBQkL +RzUAAAoJEAMe4BDKFdHuMZ0BALB9hOZO2olaDYA4UmLx9AQXAXy99Bz5bmt9qVa+ +Vg+DAP9lmPUPXEdV8ogQBoExOifUOgLUoJ2BTcysUyVRkDvyAw== +=oRrk +-END PGP PUBLIC KEY BLOCK-
[commons-codec] 02/02: Add user guide entry for Blake3
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-codec.git commit 5024e646b87f2efd0cabbeeea4defae720204fec Author: Matt Sicker AuthorDate: Sat Jan 22 16:31:16 2022 -0600 Add user guide entry for Blake3 --- src/site/xdoc/userguide.xml | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/site/xdoc/userguide.xml b/src/site/xdoc/userguide.xml index 36155b5..ef70a9e 100644 --- a/src/site/xdoc/userguide.xml +++ b/src/site/xdoc/userguide.xml @@ -100,6 +100,26 @@ tasks and provides GNU libc crypt(3) compatible password hashing functions. + + + Blake3 + + + Provides a pure Java implementation of the + https://github.com/BLAKE3-team/BLAKE3;>Blake3 hash function which can be used for computing + https://en.wikipedia.org/wiki/Cryptographic_hash_function;>cryptographic hashes + (message digests) which are extensible to arbitrary output lengths (known as an extensible-output + function or XOF), computing + https://en.wikipedia.org/wiki/Message_authentication_code;>message authentication codes + using a 32 byte (256-bit) secret key, computing subkeys from a primary key using a + https://en.wikipedia.org/wiki/Key_derivation_function;>key derivation function, and can be + used as the basis for a + https://en.wikipedia.org/wiki/Cryptographically-secure_pseudorandom_number_generator;> + cryptographically-secure pseudorandom number generator. WARNING: Blake3 is + not a password hashing algorithm! An algorithm such as + https://github.com/P-H-C/phc-winner-argon2;>Argon2 is more appropriate for password hashing. + + @@ -224,4 +244,4 @@ - \ No newline at end of file +
[commons-codec] branch master updated (afa3687 -> 5024e64)
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/commons-codec.git. from afa3687 [maven-release-plugin] prepare for next development iteration new de35b0b Add links to 1.16 docs and downloads new 5024e64 Add user guide entry for Blake3 The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: src/site/site.xml | 1 + src/site/xdoc/index.xml | 4 +++- src/site/xdoc/userguide.xml | 22 +- 3 files changed, 25 insertions(+), 2 deletions(-)
[commons-codec] 01/02: Add links to 1.16 docs and downloads
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-codec.git commit de35b0bc88545fd6a571c75482969262d81de203 Author: Matt Sicker AuthorDate: Sat Jan 22 16:31:04 2022 -0600 Add links to 1.16 docs and downloads --- src/site/site.xml | 1 + src/site/xdoc/index.xml | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/site/site.xml b/src/site/site.xml index 24f3513..b0378aa 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -28,6 +28,7 @@ https://commons.apache.org/codec/download_codec.cgi"/> + diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml index 4e83389..342ecfe 100644 --- a/src/site/xdoc/index.xml +++ b/src/site/xdoc/index.xml @@ -72,6 +72,7 @@ The Javadoc API documents are available online: Javadoc current (git master) + Javadoc 1.16 Javadoc 1.15 Javadoc 1.14 Javadoc 1.13 @@ -90,7 +91,8 @@ The subversion repository can be - https://commons.apache.org/codec/download_codec.cgi;>Codec 1.15 (mirrors) requires Java 7 + https://commons.apache.org/codec/download_codec.cgi;>Codec 1.16 (mirrors) requires Java 8 + https://archive.apache.org/dist/commons/codec/;>Codec 1.15 (archives) requires Java 7 https://archive.apache.org/dist/commons/codec/;>Codec 1.14 (archives) requires Java 7 https://archive.apache.org/dist/commons/codec/;>Codec 1.13 (archives) requires Java 7 https://archive.apache.org/dist/commons/codec/;>Codec 1.12 (archives) requires Java 7
svn commit: r52215 - in /dev/commons/codec/1.16-RC1: ./ binaries/ site/ site/apidocs/ site/apidocs/org/ site/apidocs/org/apache/ site/apidocs/org/apache/commons/ site/apidocs/org/apache/commons/codec/
Author: mattsicker Date: Sat Jan 22 05:22:27 2022 New Revision: 52215 Log: Staging release: commons-codec, version: 1.16 [This commit notification would consist of 210 parts, which exceeds the limit of 50 ones, so it was shortened to the summary.]
svn commit: r52214 - /dev/commons/codec/1.15-RC1/
Author: mattsicker Date: Sat Jan 22 05:04:58 2022 New Revision: 52214 Log: Cleaning distribution area for: commons-codec Removed: dev/commons/codec/1.15-RC1/
[commons-codec] branch master updated: [maven-release-plugin] prepare for next development iteration
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-codec.git The following commit(s) were added to refs/heads/master by this push: new afa3687 [maven-release-plugin] prepare for next development iteration afa3687 is described below commit afa36877e9e3f87c9456793d7af9f2ca75cce9fd Author: Matt Sicker AuthorDate: Fri Jan 21 23:03:10 2022 -0600 [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index fdb716f..8ebf148 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ limitations under the License. commons-codec commons-codec - 1.16 + 1.17-SNAPSHOT Apache Commons Codec 2002 @@ -47,7 +47,7 @@ limitations under the License. scm:git:https://gitbox.apache.org/repos/asf/commons-codec scm:git:https://gitbox.apache.org/repos/asf/commons-codec https://github.com/apache/commons-codec -commons-codec-1.16-rc1 +HEAD
[commons-codec] 03/04: Update version in readme
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-codec.git commit e657f5dcf836d80a53dacdb94fd84ed7e5918d34 Author: Matt Sicker AuthorDate: Fri Jan 21 22:53:35 2022 -0600 Update version in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f71f6fe..8f44459 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ Alternatively you can pull it from the central Maven repositories: commons-codec commons-codec - 1.15 + 1.16 ```
[commons-codec] 02/04: Update copyright year
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-codec.git commit 7ce691df02ef7ad98d5b093676253eadb8ed0d49 Author: Matt Sicker AuthorDate: Fri Jan 21 22:52:40 2022 -0600 Update copyright year --- NOTICE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NOTICE.txt b/NOTICE.txt index 32257bc..2eff3bd 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -1,5 +1,5 @@ Apache Commons Codec -Copyright 2002-2021 The Apache Software Foundation +Copyright 2002-2022 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (https://www.apache.org/).
[commons-codec] annotated tag commons-codec-1.16-rc1 created (now fc6bc69)
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a change to annotated tag commons-codec-1.16-rc1 in repository https://gitbox.apache.org/repos/asf/commons-codec.git. at fc6bc69 (tag) tagging a7af6b2159c8868899608a5fe89228c50ab985a5 (commit) replaces rel/commons-codec-1.15 by Matt Sicker on Fri Jan 21 23:03:07 2022 -0600 - Log - [maven-release-plugin] copy for tag commons-codec-1.16-rc1 --- No new revisions were added by this update.
[commons-codec] 04/04: [maven-release-plugin] prepare release commons-codec-1.16-rc1
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-codec.git commit a7af6b2159c8868899608a5fe89228c50ab985a5 Author: Matt Sicker AuthorDate: Fri Jan 21 23:03:02 2022 -0600 [maven-release-plugin] prepare release commons-codec-1.16-rc1 --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 070869c..fdb716f 100644 --- a/pom.xml +++ b/pom.xml @@ -19,8 +19,7 @@ limitations under the License. To produce reports, use the reporting profile, for example: mvn -Preporting clean site You may need to use the -U option to update your environment if you get an error. --> -http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd;> +http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd;> 4.0.0 org.apache.commons @@ -30,7 +29,7 @@ limitations under the License. commons-codec commons-codec - 1.16-SNAPSHOT + 1.16 Apache Commons Codec 2002 @@ -48,6 +47,7 @@ limitations under the License. scm:git:https://gitbox.apache.org/repos/asf/commons-codec scm:git:https://gitbox.apache.org/repos/asf/commons-codec https://github.com/apache/commons-codec +commons-codec-1.16-rc1
[commons-codec] 01/04: Update release notes for 1.16
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-codec.git commit 4f45360f15c2e3d3824a84ffae72bec010b54a53 Author: Matt Sicker AuthorDate: Fri Jan 21 22:52:13 2022 -0600 Update release notes for 1.16 --- RELEASE-NOTES.txt | 286 src/changes/changes.xml | 2 +- 2 files changed, 22 insertions(+), 266 deletions(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 00abff1..d7f2844 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,5 +1,4 @@ - Apache Commons Codec 1.15 RELEASE NOTES - September 1 2020 + Apache Apache Commons Codec 1.16 RELEASE NOTES The Apache Commons Codec package contains simple encoder and decoders for various formats such as Base64 and Hexadecimal. In addition to these @@ -11,277 +10,34 @@ Feature and fix release. Changes in this version include: New features: -o CODEC-290: Base16Codec and Base16Input/OutputStream. Thanks to Adam Retter. -o CODEC-291: Hex encode/decode with existing arrays. Thanks to Adam Retter. +o CODEC-296: Add support for Blake3 family of hashes. Thanks to Matt Sicker. Fixed Bugs: -o CODEC-264: MurmurHash3: Ensure hash128 maintains the sign extension bug. - Thanks to Andy Seaborne. +o Remove duplicated words from Javadocs. Thanks to James Gan. Changes: -o CODEC-280: Base32/Base64/BCodec: Added strict decoding property to control - handling of trailing bits. Default lenient mode discards them - without error. Strict mode raise an exception. -o CODEC-289: Base32/Base64 Input/OutputStream: Added strict decoding property - to control handling of trailing bits. Default lenient mode - discards them without error. Strict mode raise an exception. -o Update tests from JUnit 4.12 to 4.13. Thanks to Gary Gregory. -o Update actions/checkout from v1 to v2.3.2 #50, #56. - Thanks to Dependabot. -o Update actions/setup-java from v1.4.0 to v1.4.1 #57. - Thanks to Dependabot. - - -For complete information on Apache Commons Codec, including instructions on how -to submit bug reports, patches, or suggestions for improvement, see the -Apache Commons Codec website: - -https://commons.apache.org/proper/commons-codec/ - -Download page: https://commons.apache.org/proper/commons-codec/download_codec.cgi - - - Apache Commons Codec 1.14 RELEASE NOTES - December 30 2019 - -The Apache Commons Codec package contains simple encoder and decoders for -various formats such as Base64 and Hexadecimal. In addition to these -widely used encoders and decoders, the codec package also maintains a -collection of phonetic encoding utilities. - -Feature and fix release. - -Changes in this version include: - -New features: -o CODEC-264: Add MurmurHash3.hash128x64 methods to fix sign extension error during seeding in hash128 methods. Thanks to Claude Warren. -o CODEC-267: Add MurmurHash3.hash32x86 methods and IncrementalHash32x86 to fix sign extension error in hash32 methods. Thanks to Claude Warren. -o CODEC-272: Add RandomAccessFile digest methods #31. Thanks to Behrang, Alex Herbert, Gary Gregory. -o CODEC-273: Add Path APIs to org.apache.commons.codec.digest.DigestUtils similar to File APIs. Thanks to Gary Gregory. -o CODEC-274: Add SHA-512/224 and SHA-512/256 to DigestUtils for Java 9 and up. Thanks to Gary Gregory. -o CODEC-275: Add missing note in javadoc when sign extension error is present #34. Thanks to Claude Warren. - -Fixed Bugs: -o CODEC-261: Hex: Allow encoding read-only ByteBuffer. -o CODEC-259: Hex: Only use an available ByteBuffer backing array if the length equals the remaining byte count. -o CODEC-265: BaseNCodec to expand buffer using overflow conscious code. -o CODEC-270: Base32/64: Fixed decoding check that all the final trailing bits to discard are zero. -o CODEC-269: Allow repeat calls to MurmurHash3.IncrementalHash32.end() to generate the same value. -o CODEC-276: Reliance on default encoding in MurmurHash2 and MurmurHash3. Thanks to Gary Gregory. - -Changes: -o CODEC-268: MurmurHash3: Deprecate hash64 methods and hash methods accepting a String that use the default encoding. -o CODEC-277: Don't reload standard Charsets in org.apache.commons.codec.Charsets. Thanks to Gary Gregory. -o CODEC-278: Deprecate Charset constants in org.apache.commons.codec.Charsets in favor of java.nio.charset.StandardCharsets. Thanks to Gary Gregory. +o CODEC-295: Minor improvements #67. Thanks to Arturo Bernal. +o CODEC-301: Simplify assertion #84. Thanks to Alexander Pinske, Alex Herbert. +o CODEC-300: Simplify assertion #84. Thanks to Arturo Bernal. +o CODEC-298: Use
[commons-codec] branch master updated (6776877 -> a7af6b2)
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/commons-codec.git. from 6776877 Update download page in preparation for 1.16 new 4f45360 Update release notes for 1.16 new 7ce691d Update copyright year new e657f5d Update version in readme new a7af6b2 [maven-release-plugin] prepare release commons-codec-1.16-rc1 The 4 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: NOTICE.txt | 2 +- README.md | 2 +- RELEASE-NOTES.txt | 286 pom.xml | 6 +- src/changes/changes.xml | 2 +- 5 files changed, 27 insertions(+), 271 deletions(-)
[commons-codec] 02/02: Update download page in preparation for 1.16
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-codec.git commit 677687778462b0d177f0524ef73f2a33dc0d798b Author: Matt Sicker AuthorDate: Fri Jan 21 22:45:23 2022 -0600 Update download page in preparation for 1.16 --- src/site/xdoc/download_codec.xml | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/site/xdoc/download_codec.xml b/src/site/xdoc/download_codec.xml index 6caef9d..8c7caa9 100644 --- a/src/site/xdoc/download_codec.xml +++ b/src/site/xdoc/download_codec.xml @@ -113,32 +113,32 @@ limitations under the License. - + - commons-codec-1.15-bin.tar.gz - https://www.apache.org/dist/commons/codec/binaries/commons-codec-1.15-bin.tar.gz.sha512;>sha512 - https://www.apache.org/dist/commons/codec/binaries/commons-codec-1.15-bin.tar.gz.asc;>pgp + commons-codec-1.16-bin.tar.gz + https://www.apache.org/dist/commons/codec/binaries/commons-codec-1.16-bin.tar.gz.sha512;>sha512 + https://www.apache.org/dist/commons/codec/binaries/commons-codec-1.16-bin.tar.gz.asc;>pgp - commons-codec-1.15-bin.zip - https://www.apache.org/dist/commons/codec/binaries/commons-codec-1.15-bin.zip.sha512;>sha512 - https://www.apache.org/dist/commons/codec/binaries/commons-codec-1.15-bin.zip.asc;>pgp + commons-codec-1.16-bin.zip + https://www.apache.org/dist/commons/codec/binaries/commons-codec-1.16-bin.zip.sha512;>sha512 + https://www.apache.org/dist/commons/codec/binaries/commons-codec-1.16-bin.zip.asc;>pgp - commons-codec-1.15-src.tar.gz - https://www.apache.org/dist/commons/codec/source/commons-codec-1.15-src.tar.gz.sha512;>sha512 - https://www.apache.org/dist/commons/codec/source/commons-codec-1.15-src.tar.gz.asc;>pgp + commons-codec-1.16-src.tar.gz + https://www.apache.org/dist/commons/codec/source/commons-codec-1.16-src.tar.gz.sha512;>sha512 + https://www.apache.org/dist/commons/codec/source/commons-codec-1.16-src.tar.gz.asc;>pgp - commons-codec-1.15-src.zip - https://www.apache.org/dist/commons/codec/source/commons-codec-1.15-src.zip.sha512;>sha512 - https://www.apache.org/dist/commons/codec/source/commons-codec-1.15-src.zip.asc;>pgp + commons-codec-1.16-src.zip + https://www.apache.org/dist/commons/codec/source/commons-codec-1.16-src.zip.sha512;>sha512 + https://www.apache.org/dist/commons/codec/source/commons-codec-1.16-src.zip.asc;>pgp
[commons-codec] 01/02: Update release manager info
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-codec.git commit 9e38a8a7327375f2841ac141390ffafa3933359a Author: Matt Sicker AuthorDate: Fri Jan 21 22:42:04 2022 -0600 Update release manager info --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 7a44ef4..070869c 100644 --- a/pom.xml +++ b/pom.xml @@ -275,8 +275,8 @@ limitations under the License. 1.7 true scm:svn:https://dist.apache.org/repos/dist/dev/commons/${commons.componentid} -Alex Herbert - BC87A3FD0A54480F0BADBEBD21939FF0CA2A6567 +Matt Sicker + 748F15B2CF9BA8F024155E6ED7C92B70FA1C814D clean install apache-rat:check japicmp:cmp checkstyle:check javadoc:javadoc
[commons-codec] branch master updated (3161be5 -> 6776877)
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/commons-codec.git. from 3161be5 Run dependabot once a week. new 9e38a8a Update release manager info new 6776877 Update download page in preparation for 1.16 The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: pom.xml | 4 ++-- src/site/xdoc/download_codec.xml | 26 +- 2 files changed, 15 insertions(+), 15 deletions(-)
svn commit: r52213 - /release/commons/KEYS
Author: mattsicker Date: Sat Jan 22 04:36:28 2022 New Revision: 52213 Log: Add updated signing key Modified: release/commons/KEYS Modified: release/commons/KEYS == --- release/commons/KEYS (original) +++ release/commons/KEYS Sat Jan 22 04:36:28 2022 @@ -9089,3 +9089,343 @@ o1PLx2aW0kL2yCCHeLR+JMpdamxP+JxVpG4/d7VB 8/3SrhERH87ln/ZI424AA70j =xkU2 -END PGP PUBLIC KEY BLOCK- + +pub rsa4096/0xD7C92B70FA1C814D 2014-03-23 [SCEA] + Key fingerprint = 748F 15B2 CF9B A8F0 2415 5E6E D7C9 2B70 FA1C 814D + origin=ks last=2018-03-24 url=https://[2a02:898:31::48:4558:73:6b73]:443 +uid [ultimate] Matt Sicker (Apache Software Foundation) +sig 30xD7C92B70FA1C814D 2019-12-18 Matt Sicker (Apache Software Foundation) +sig 0x1FE9AF73118F1A7C 2019-05-18 Joan Touzet +sig 0x81ABAEA820DE9E54 2019-05-15 Craig Laird Russell (CODE SIGNING KEY) +sig 20x13971DA39475BD5D 2019-05-28 Roman V Shaposhnik (CODE SIGNING KEY) +sig 30xD7C92B70FA1C814D 2018-03-22 Matt Sicker (Apache Software Foundation) +uid [ultimate] Matthew Sicker (Signing Key) + origin=ks last=2018-03-24 +sig 0x5CFD37FACC78C893 2014-04-15 Rich Bowen +sig 0xDC78CFB7E74F3382 2014-04-12 Ian Clelland +sig 0x7186B06E1ED139E7 2014-04-10 Steven Alan Rowe (CODE SIGNING KEY) +sig 0x6140A18747CCBCC7 2014-04-13 Robert Cameron Weir (CODE SIGNING KEY) +sig 0xABE9C5D21EFAFD39 2014-04-17 Ryan Ernst +sig 0xF3AD5C94A67F707E 2014-04-15 Christopher Schultz +sig 0x1A223A02FA9336F8 2016-02-25 Mariano Gonzalez +sig 0x3F902C276ED9BE21 2016-03-02 Bob Paulin (CODE SIGNING KEY) +sig 0xB9D7B011C67ABE3F 2014-04-10 Marcus Sorensen (extra email) +sig 0x6C45F247A303D55F 2014-04-10 Nicholas Scott Williams (For ASF Code Signing Purposes Only) +sig 0x62D48FAD16A0DE01 2014-04-11 Ben Reser +sig 0xCDE1A37449275553 2014-04-15 Samuel Greenfeld +sig 30x2B118A5FA15F30B9 2014-11-08 David Nalley +sig 30xD7C92B70FA1C814D 2014-03-23 Matt Sicker (Apache Software Foundation) +sig 30xD7C92B70FA1C814D 2019-12-18 Matt Sicker (Apache Software Foundation) +sig 0x8AAF88D6D84E41AE 2014-04-13 Nick Burch +sig 0x1FE9AF73118F1A7C 2019-05-18 Joan Touzet +sig 0x81ABAEA820DE9E54 2019-05-15 Craig Laird Russell (CODE SIGNING KEY) +sig 20x13971DA39475BD5D 2019-05-28 Roman V Shaposhnik (CODE SIGNING KEY) +sub rsa4096/0xB4C70893B62BABE8 2014-03-23 [SEA] [expires: 2024-04-27] +sig 0xD7C92B70FA1C814D 2021-04-28 Matt Sicker (Apache Software Foundation) + +-BEGIN PGP PUBLIC KEY BLOCK- + +mQINBFMvQKsBEAC3/wuVMv4ia132SA1Y/KnuZYkSNDaRH/Ie1WTAX9X0KrWA5fx2 +WmzKfaLNyBHU5aI0BjoE9DW3zkZcLEcL/cxRzoXoavUGRhRsaHbj4PhQkEqV35L1 +OdsOPRc5vesIyvYlQsThz6LS1LRA+nOz5qW3gwfrdwuD1AWjHHluNVlgL2y2ydQI +m4nd24LD2VssfiNXkquuJmOHZKA1EWOwDq2SSQCyx0IcQZZSF+y/pnp2JUkGoI7L +m39XPa72sKRMBSWoRh9i4+dGZSQV/BVtD5UMOFsfTNG5Tnv2MXoql4q+C3Id9evM +3Qglih5Nmwld5OxjxhCvUf/FEz+55pibP948GRuhXL0FATabJEkEj3XwUaSvWQpr +4qu1qUDqfDlCSKBfJLkx8hBF6ZthGBQOZOCNTzIie96ZNEWmZu8iu4JBl/Wm+wTn ++Nkuu75wfTbHNIKPRBpuXysDtc4OvzDV51NW/6DOCJW+qLD+CI6BazdcaiWMoeFS +irt5deDJdr9C0d8m8iD11XQAM84nTxAKaBi0ihiWYCMRpwUV8j3qxEiziFRa5h85 +3/6WiozTxLgIoJIGPoGFDisJ4WXweeT+PkTgqJ6ZlR1FPk2n7tAaPEn6/O8rdiYa +HP0r9FhJYadPfjwAZP92JRIiv7buFz5VEq1Hqu8W85+/CeR/OLekTegkSwARAQAB +tEBNYXR0IFNpY2tlciAoQXBhY2hlIFNvZnR3YXJlIEZvdW5kYXRpb24pIDxtYXR0 +c2lja2VyQGFwYWNoZS5vcmc+iQJRBBMBCgA7AhsvBQsJCAcCBhUKCQgLAgQWAgMB +Ah4BAheAFiEEdI8Vss+bqPAkFV5u18krcPocgU0FAl35lQ4CGQEACgkQ18krcPoc +gU35ew//TbOSjL0rIy40vPDpdqLH9ulwNLnMx7xDtScYvSQOp43sBarvArtnZipo +8IHH9fxybVEMaNlqhF/fI+E9vNTYVU9YLrz3A5z82nQlHoWzExahdAV4TnsmmQQx +TAfp7sHqrfMckF2crZSWk+jiSlKo7BSAFDk3DHU8DPz00q7Q0TrxLQqhGjLbxvd5 +mBtgr/fD15HZdAo9uEnAnzGumuuoDc07fJzxM9tlymM7Y09Ykz+reF569synCA+u +LIkpp3cVHoXwULZCMGg6Enu4P982BMYVBYtz9mJotyVubxs3g3bkpl+AtFakwJxE +bXxHo29F+l+HJlte2RvGG8+5b+tLj6HWvmfpF0oRXXcvwnRZoNHPUsF74W0C4Xd0 +Uc4dCT6xdEMvnF0u4cmVaMkJ06vFKv4DGXlgZ10Xy/d1yf6EtWn8z6IrWnfctA6J +ZC0OYhOL+fXLG9QFqxsUS/KS3JC7zDOqAWL8jQPPDu53Rm3FiUAnzgYjyLfi4pJl +rnopzUu4VkCZOMuOwiKbvNRmZVKI8E/37UtpYtmn/wFs8e5j1SA0x6tpAX6UfMyO +io/9k3bvourZ6sp5Mv1gskEE3NuMWZBGWlRQbNzUm8xRIdVLogjzp74nFzQ6R0gw +/5voofA65kxYn6IKtrC/jsbkzcAKSK4axibD/n3DC34jFSXS0y2JAjMEEAEKAB0W +IQQp5POBE99wfXIqbvkf6a9zEY8afAUCXOCcJQAKCRAf6a9zEY8afL59D/9m6GuR +S9ROir7CGKzVCuHjH0Lilid4TzxGKX2TY4cbfOm43di7dQA0JCXYo4aZ3Fn4frBY +qolfdKwj36DKFQB62J8o//2JefIGjwvgeaAIIXZTVutOzjqvjVxDaCW4jH2q1M+v +D8UYgE3jSkB8t27J3uYt4DD5b9hxyYumRh8U+NOyWnTG9/XvDsew+Hr7PpMNVMMy +dGtjxZxJq/sH3rnwtTBOlW3eXeRt2I4Ya6WOtRAGXsK2OMbKQSoMbBgyYk6WRypF +enJPpJUQLbqfE3zvDw9F5V3h4sBl86tzcU7263bK4RQ30Jf3IMJ24CZ0dwPYfxiQ +CaDe/3m7b5qwZXTcyFP7R7W1J46zMj6k8krBL9m5vR3TXVasjAonZy6FFuVcBg9b
[commons-codec] branch master updated (9d75ecc -> b70e177)
This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/commons-codec.git. from 9d75ecc Replace GitHub build for Java 15 with Java 16 and drop Java 16-ea. new 921e2cd CODEC-296: Add support for Blake3 family of hashes new b71233b Fix checkstyle nits new 0ed8bd7 Improve javadoc, naming, magic constants new 0839e1a Ensure all public method args are validated and documented new 1391f3c Fix checkstyle nits new b70e177 Merge pull request #79 from jvz/blake3 The 2115 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: pom.xml| 6 + src/changes/changes.xml| 1 + .../org/apache/commons/codec/digest/Blake3.java| 538 + .../codec/digest/{B64Test.java => Blake3Test.java} | 28 +- .../codec/digest/Blake3TestVectorsTest.java| 317 5 files changed, 877 insertions(+), 13 deletions(-) create mode 100644 src/main/java/org/apache/commons/codec/digest/Blake3.java copy src/test/java/org/apache/commons/codec/digest/{B64Test.java => Blake3Test.java} (59%) create mode 100644 src/test/java/org/apache/commons/codec/digest/Blake3TestVectorsTest.java
commons-compress git commit: Deprecate charset constants superseded by Java 7
Repository: commons-compress Updated Branches: refs/heads/master 7a8f3c379 -> 69f38e818 Deprecate charset constants superseded by Java 7 Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/69f38e81 Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/69f38e81 Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/69f38e81 Branch: refs/heads/master Commit: 69f38e81872d70705fd7919df3d771f28c22dadc Parents: 7a8f3c3 Author: Matt SickerAuthored: Sat Apr 21 13:50:42 2018 -0500 Committer: Matt Sicker Committed: Sat Apr 21 13:50:42 2018 -0500 -- .../archivers/zip/ZipEncodingHelper.java| 6 ++-- .../apache/commons/compress/utils/Charsets.java | 21 +- .../commons/compress/utils/CharsetsTest.java| 30 3 files changed, 17 insertions(+), 40 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-compress/blob/69f38e81/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncodingHelper.java -- diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncodingHelper.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncodingHelper.java index 8cfe606..8aeb789 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncodingHelper.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncodingHelper.java @@ -20,8 +20,8 @@ package org.apache.commons.compress.archivers.zip; import java.nio.ByteBuffer; import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; import java.nio.charset.UnsupportedCharsetException; -import org.apache.commons.compress.utils.Charsets; /** * Static helper functions for robustly encoding filenames in zip files. @@ -73,10 +73,10 @@ public abstract class ZipEncodingHelper { // check platform's default encoding charsetName = Charset.defaultCharset().name(); } -if (Charsets.UTF_8.name().equalsIgnoreCase(charsetName)) { +if (StandardCharsets.UTF_8.name().equalsIgnoreCase(charsetName)) { return true; } -for (final String alias : Charsets.UTF_8.aliases()) { +for (final String alias : StandardCharsets.UTF_8.aliases()) { if (alias.equalsIgnoreCase(charsetName)) { return true; } http://git-wip-us.apache.org/repos/asf/commons-compress/blob/69f38e81/src/main/java/org/apache/commons/compress/utils/Charsets.java -- diff --git a/src/main/java/org/apache/commons/compress/utils/Charsets.java b/src/main/java/org/apache/commons/compress/utils/Charsets.java index fa9fa9a..9f5240a 100644 --- a/src/main/java/org/apache/commons/compress/utils/Charsets.java +++ b/src/main/java/org/apache/commons/compress/utils/Charsets.java @@ -19,6 +19,7 @@ package org.apache.commons.compress.utils; import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; /** * Charsets required of every implementation of the Java platform. @@ -51,8 +52,8 @@ import java.nio.charset.Charset; * component, it is not foreseen that Commons Compress would be made to depend on another Commons component. * * @see https://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html;>Standard charsets + * @see StandardCharsets * @since 1.4 - * @version $Id$ */ public class Charsets { @@ -94,8 +95,9 @@ public class Charsets { * * * @see https://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html;>Standard charsets + * @deprecated replaced by {@link StandardCharsets} in Java 7 */ -public static final Charset ISO_8859_1 = Charset.forName(CharsetNames.ISO_8859_1); +public static final Charset ISO_8859_1 = StandardCharsets.ISO_8859_1; /** * @@ -106,8 +108,9 @@ public class Charsets { * * * @see https://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html;>Standard charsets + * @deprecated replaced by {@link StandardCharsets} in Java 7 */ -public static final Charset US_ASCII = Charset.forName(CharsetNames.US_ASCII); +public static final Charset US_ASCII = StandardCharsets.US_ASCII; /** * @@ -119,8 +122,9 @@ public class Charsets { * * * @see https://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html;>Standard charsets + * @deprecated replaced by {@link StandardCharsets} in Java 7 */ -public static final Charset UTF_16 = Charset.forName(CharsetNames.UTF_16); +public static final Charset UTF_16 = StandardCharsets.UTF_16; /** *
commons-pool git commit: POOL-335: Make abandoned object logging verbosity configurable
Repository: commons-pool Updated Branches: refs/heads/master 26f072ec6 -> 3956eedbf POOL-335: Make abandoned object logging verbosity configurable This reverts the default behavior introduced by POOL-320 where abandoned object tracking would print less information by default when a SecurityManager was usable. This adds a new configuration option to AbandonedConfig to change that default behavior to use either a full stack trace (default) or an abbreviated one with only class names. Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/3956eedb Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/3956eedb Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/3956eedb Branch: refs/heads/master Commit: 3956eedbfcd8f57263892bb6667d21a839f67990 Parents: 26f072e Author: Matt SickerAuthored: Fri Nov 10 11:37:38 2017 -0600 Committer: Matt Sicker Committed: Fri Nov 10 11:37:38 2017 -0600 -- src/changes/changes.xml | 4 ++ .../org/apache/commons/pool2/PooledObject.java | 12 + .../commons/pool2/impl/AbandonedConfig.java | 41 - .../apache/commons/pool2/impl/CallStack.java| 2 +- .../commons/pool2/impl/CallStackUtils.java | 24 +- .../commons/pool2/impl/DefaultPooledObject.java | 26 +-- .../commons/pool2/impl/GenericObjectPool.java | 23 ++ .../commons/pool2/impl/NoOpCallStack.java | 48 .../commons/pool2/impl/ThrowableCallStack.java | 6 +-- .../commons/pool2/impl/NoOpCallStackTest.java | 34 ++ 10 files changed, 199 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/3956eedb/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 8df6291..59f8f9e 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -59,6 +59,10 @@ The type attribute can be add,update,fix,remove. org.apache.commons.pool2.impl.ThrowableCallStack.Snapshot is missing serialVersionUID. + + Make abandoned logging stack trace requirements configurable. This also reverts + the default behavior introduced by POOL-320. + http://git-wip-us.apache.org/repos/asf/commons-pool/blob/3956eedb/src/main/java/org/apache/commons/pool2/PooledObject.java -- diff --git a/src/main/java/org/apache/commons/pool2/PooledObject.java b/src/main/java/org/apache/commons/pool2/PooledObject.java index edf176f..06f50d3 100644 --- a/src/main/java/org/apache/commons/pool2/PooledObject.java +++ b/src/main/java/org/apache/commons/pool2/PooledObject.java @@ -167,6 +167,18 @@ public interface PooledObject extends Comparable { */ void setLogAbandoned(boolean logAbandoned); +// TODO: uncomment in 3.0 (API compatibility) +///** +// * Configures the stack trace generation strategy based on whether or not fully +// * detailed stack traces are required. When set to false, abandoned logs may +// * only include caller class information rather than method names, line numbers, +// * and other normal metadata available in a full stack trace. +// * +// * @param requireFullStackTrace the new configuration setting for abandoned object +// * logging +// */ +//void setRequireFullStackTrace(boolean requireFullStackTrace); + /** * Record the current stack trace as the last time the object was used. */ http://git-wip-us.apache.org/repos/asf/commons-pool/blob/3956eedb/src/main/java/org/apache/commons/pool2/impl/AbandonedConfig.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/AbandonedConfig.java b/src/main/java/org/apache/commons/pool2/impl/AbandonedConfig.java index fd430c5..24b27fb 100644 --- a/src/main/java/org/apache/commons/pool2/impl/AbandonedConfig.java +++ b/src/main/java/org/apache/commons/pool2/impl/AbandonedConfig.java @@ -17,11 +17,11 @@ package org.apache.commons.pool2.impl; -import java.io.PrintWriter; - import org.apache.commons.pool2.TrackedUse; import org.apache.commons.pool2.UsageTracking; +import java.io.PrintWriter; + /** * Configuration settings for abandoned object removal. * @@ -170,6 +170,43 @@ public class AbandonedConfig { } /** + * Determines whether or not to log full stack traces when logAbandoned is true. + * If disabled, then a faster method for logging stack traces with only class data + * may be used if possible. + * + * @since 2.5 +
[2/2] commons-pool git commit: Add self to pom
Add self to pom Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/868b9fd6 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/868b9fd6 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/868b9fd6 Branch: refs/heads/master Commit: 868b9fd6cec388d24f99d5840ea0c42c2d6a0baf Parents: 88c6bed Author: Matt Sicker <boa...@gmail.com> Authored: Sun Mar 12 14:52:37 2017 -0500 Committer: Matt Sicker <boa...@gmail.com> Committed: Sun Mar 12 14:52:37 2017 -0500 -- pom.xml | 5 + 1 file changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/868b9fd6/pom.xml -- diff --git a/pom.xml b/pom.xml index 42130c0..42fadd2 100644 --- a/pom.xml +++ b/pom.xml @@ -104,6 +104,11 @@ ggregory The Apache Software Foundation + + Matt Sicker + mattsicker + The Apache Software Foundation +
[1/2] commons-pool git commit: Update scm config to git
Repository: commons-pool Updated Branches: refs/heads/master 3994baf0f -> 868b9fd6c Update scm config to git Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/88c6bedf Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/88c6bedf Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/88c6bedf Branch: refs/heads/master Commit: 88c6bedf050657e1d168e0649364d2566dabf9ca Parents: 3994baf Author: Matt SickerAuthored: Sun Mar 12 14:51:46 2017 -0500 Committer: Matt Sicker Committed: Sun Mar 12 14:51:46 2017 -0500 -- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/88c6bedf/pom.xml -- diff --git a/pom.xml b/pom.xml index e54fd08..42130c0 100644 --- a/pom.xml +++ b/pom.xml @@ -40,9 +40,9 @@ - scm:svn:http://svn.apache.org/repos/asf/commons/proper/pool/trunk - scm:svn:https://svn.apache.org/repos/asf/commons/proper/pool/trunk -http://svn.apache.org/viewvc/commons/proper/pool/trunk + scm:git:https://git-wip-us.apache.org/repos/asf/commons-pool.git + https://git-wip-us.apache.org/repos/asf/commons-pool.git +https://git-wip-us.apache.org/repos/asf?p=commons-pool.git
[06/50] [abbrv] commons-pool git commit: commons-parent 34 -> 39.
commons-parent 34 -> 39. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1724895 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/1d288b3f Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/1d288b3f Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/1d288b3f Branch: refs/heads/master Commit: 1d288b3f0803964666b117082fdfd519cd93191f Parents: 2cf21c4 Author: Gary D. GregoryAuthored: Fri Jan 15 23:52:32 2016 + Committer: Gary D. Gregory Committed: Fri Jan 15 23:52:32 2016 + -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/1d288b3f/pom.xml -- diff --git a/pom.xml b/pom.xml index d99624c..08693ad 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ org.apache.commons commons-parent -34 +39 4.0.0 commons-pool2
[05/50] [abbrv] commons-pool git commit: Obsolete DOAP
Obsolete DOAP git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/branches/performance-ideas@1719171 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/ae5838a2 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/ae5838a2 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/ae5838a2 Branch: refs/heads/performance-ideas Commit: ae5838a2d9a1bfec10c7c63f17c4d34fc72826ce Parents: 97261a2 Author: Sebastian BazleyAuthored: Thu Dec 10 18:17:08 2015 + Committer: Sebastian Bazley Committed: Thu Dec 10 18:17:08 2015 + -- doap_pool.rdf | 50 -- 1 file changed, 50 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/ae5838a2/doap_pool.rdf -- diff --git a/doap_pool.rdf b/doap_pool.rdf deleted file mode 100644 index dc3fc84..000 --- a/doap_pool.rdf +++ /dev/null @@ -1,50 +0,0 @@ - -http://usefulinc.com/ns/doap#; xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#; xmlns:asfext="http://projects.apache.org/ns/asfext#; xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#; xmlns:doap="http://usefulinc.com/ns/doap#; xml:lang="en"> - http://jakarta.apache.org/commons/pool/;> -Apache Jakarta Commons Pool -http://jakarta.apache.org/commons/pool/"/> -Java -http://projects.apache.org/category/library"/> -http://usefulinc.com/doap/licenses/asl20"/> -http://issues.apache.org/bugzilla/buglist.cgi?product=Commonscomponent=pool"/> -http://jakarta.apache.org/site/downloads/downloads_commons-pool.cgi"/> -http://jakarta.apache.org/"/> -Commons Object Pooling Library -Commons Object Pooling Library - - -http://svn.apache.org/repos/asf/jakarta/commons/proper/pool/trunk"/> -http://svn.apache.org/repos/asf/jakarta/commons/proper/pool"/> - - - - -commons-pool -2004-06-07 -1.2 - - - - -commons-pool -2004-10-20 -1.1 - - - - -commons-pool -2002-08-12 -1.0.1 - - - - -commons-pool -2002-05-04 -1.0 - - -http://jakarta.apache.org/site/mail2.html#Commons"/> - -
[commons-pool] Git Push Summary
Repository: commons-pool Updated Tags: refs/tags/POOL_1_0 [created] af75ff68f refs/tags/POOL_1_0@139620 [created] 30f9edd77 refs/tags/POOL_1_0@560656 [created] 089a24a66 refs/tags/POOL_1_0@560657 [created] 92f12 refs/tags/POOL_1_0@560659 [created] a09fb7c8c refs/tags/POOL_1_0_1 [created] 8351007af refs/tags/POOL_1_0_1@139636 [created] 7b6fffd25 refs/tags/POOL_1_0_1@560656 [created] ce2709606 refs/tags/POOL_1_0_1@560657 [created] 08da461e4 refs/tags/POOL_1_0_1@560659 [created] 1cd219366 refs/tags/POOL_1_1 [created] 8f19d7015 refs/tags/POOL_1_1@139740 [created] d77cbfadc refs/tags/POOL_1_1@560656 [created] da2992911 refs/tags/POOL_1_1@560657 [created] 1891af53b refs/tags/POOL_1_1@560659 [created] 5f5dde104 refs/tags/POOL_1_1_RC1 [created] 005f76c99 refs/tags/POOL_1_1_RC1@139723 [created] 19cbefe5e refs/tags/POOL_1_1_RC1@560656 [created] 4f065ffba refs/tags/POOL_1_1_RC1@560657 [created] 9c0fc7fac refs/tags/POOL_1_1_RC1@560659 [created] ffd214018 refs/tags/POOL_1_1_RC2 [created] 258e8ac38 refs/tags/POOL_1_1_RC2@139738 [created] 34f8ba6ca refs/tags/POOL_1_1_RC2@560656 [created] 89d2665b8 refs/tags/POOL_1_1_RC2@560657 [created] 46655e9ae refs/tags/POOL_1_1_RC2@560659 [created] d2338f9c4 refs/tags/POOL_1_2 [created] e3035f842 refs/tags/POOL_1_2@139778 [created] 231ceeefd refs/tags/POOL_1_2@560656 [created] 8a5c17b47 refs/tags/POOL_1_2@560657 [created] 470c93cc1 refs/tags/POOL_1_2@560659 [created] 76754c949 refs/tags/POOL_1_2_RC1 [created] 6a33a3371 refs/tags/POOL_1_2_RC1@139775 [created] 72c4b4603 refs/tags/POOL_1_2_RC1@560656 [created] 9484420bb refs/tags/POOL_1_2_RC1@560657 [created] b756d181c refs/tags/POOL_1_2_RC1@560659 [created] 0ff7c80f4 refs/tags/POOL_1_3 [created] 222aab3a9 refs/tags/POOL_1_3@329376 [created] b70c8c948 refs/tags/POOL_1_3@390933 [created] 1c58fb424 refs/tags/POOL_1_3@560656 [created] 66c2e7e2a refs/tags/POOL_1_3@560657 [created] 2236ea38e refs/tags/POOL_1_3@560659 [created] 211e5e501 refs/tags/POOL_1_3_RC1 [created] 56d2d4b00 refs/tags/POOL_1_3_RC1@329376 [created] b70c8c948 refs/tags/POOL_1_3_RC1@387392 [created] 1000d91c3 refs/tags/POOL_1_3_RC1@560656 [created] 1fc490c42 refs/tags/POOL_1_3_RC1@560657 [created] a39b9fc4f refs/tags/POOL_1_3_RC1@560659 [created] d22a9f6ca refs/tags/POOL_1_3_RC3 [created] 99d2d4806 refs/tags/POOL_1_3_RC3@329376 [created] b70c8c948 refs/tags/POOL_1_3_RC3@388728 [created] e107e947a refs/tags/POOL_1_3_RC3@560656 [created] 9192121a6 refs/tags/POOL_1_3_RC3@560657 [created] 6be337565 refs/tags/POOL_1_3_RC3@560659 [created] 475927fb6 refs/tags/POOL_1_3_RC4 [created] fb7f6cf30 refs/tags/POOL_1_3_RC4@329376 [created] b70c8c948 refs/tags/POOL_1_3_RC4@388984 [created] e459d5fa5 refs/tags/POOL_1_3_RC4@560656 [created] ebca8f092 refs/tags/POOL_1_3_RC4@560657 [created] f032c3164 refs/tags/POOL_1_3_RC4@560659 [created] 8c17405f0 refs/tags/POOL_1_4 [created] 343dc92b4 refs/tags/POOL_1_4_RC1 [created] ae901d52c refs/tags/POOL_1_4_RC2 [created] b7aac082a refs/tags/POOL_1_4_RC3 [created] 50179ccf0 refs/tags/POOL_1_5 [created] 64989df7d refs/tags/POOL_1_5_1 [created] 6fefeb0a3 refs/tags/POOL_1_5_1_RC1 [created] bbe625445 refs/tags/POOL_1_5_2 [created] 93bfcc005 refs/tags/POOL_1_5_2_RC1 [created] 9cb8cfc10 refs/tags/POOL_1_5_2_RC2 [created] c8ef3861f refs/tags/POOL_1_5_3 [created] 4f0c069aa refs/tags/POOL_1_5_3_RC1 [created] adb2cc4e2 refs/tags/POOL_1_5_4 [created] be2f91441 refs/tags/POOL_1_5_4_RC1 [created] 4b10b3a89 refs/tags/POOL_1_5_5 [created] 4bd78f908 refs/tags/POOL_1_5_5_RC1 [created] c46ef07e1 refs/tags/POOL_1_5_5_RC2 [created] 236d3472d refs/tags/POOL_1_5_6 [created] 956104701 refs/tags/POOL_1_5_6_RC1 [created] 24cb4dcc6 refs/tags/POOL_1_5_6_RC2 [created] f73c2dd14 refs/tags/POOL_1_5_7 [created] 1c486e415 refs/tags/POOL_1_5_7_RC1 [created] 1dde94e25 refs/tags/POOL_1_5_7_RC2 [created] 2db51e187 refs/tags/POOL_1_5_7_RC3 [created] a9b847597 refs/tags/POOL_1_5_RC1 [created] db0f95399 refs/tags/POOL_1_5_RC2 [created] e0a1b6bc3 refs/tags/POOL_1_5_RC3 [created] 8ccc4d4b2 refs/tags/POOL_1_6 [created] 0e348d9c5 refs/tags/POOL_1_6_RC1 [created] 5013576a0 refs/tags/POOL_1_6_RC2 [created] d3aea95d7 refs/tags/POOL_1_6_RC3 [created] 189f62029 refs/tags/POOL_1_6_RC4 [created] f10060aca refs/tags/POOL_2_0 [created] b0e4868e4 refs/tags/POOL_2_0_RC1 [created] adeb72a5f refs/tags/POOL_2_0_RC2 [created] 4e59a828f refs/tags/POOL_2_0_RC3 [created] a1ddbfcea refs/tags/POOL_2_0_RC4 [created] 748538bd6 refs/tags/POOL_2_1 [created] a28d908dd refs/tags/POOL_2_1_RC1 [created] 25ab11e93 refs/tags/POOL_2_1_RC2 [created] 56dcc8e9b refs/tags/POOL_2_2 [created] f50e3a0e0 refs/tags/POOL_2_2_RC1 [created] ccf543b0e refs/tags/POOL_2_2_RC2 [created] adfb10e8e refs/tags/POOL_2_3 [created] 7ecfff80b refs/tags/POOL_2_3_RC1 [created] 002a42c03 refs/tags/POOL_2_3_RC2 [created] 18a7da481
[35/50] [abbrv] commons-pool git commit: Standard Maven location for assemblies
Standard Maven location for assemblies git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1739829 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/a04dac67 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/a04dac67 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/a04dac67 Branch: refs/heads/master Commit: a04dac67589279279c5308b99aca121ec0d61850 Parents: 7d8069f Author: Sebastian BazleyAuthored: Mon Apr 18 23:26:51 2016 + Committer: Sebastian Bazley Committed: Mon Apr 18 23:26:51 2016 + -- pom.xml | 6 +-- src/assembly/bin.xml | 44 + src/assembly/src-tar-gz.xml | 74 +++ src/assembly/src-zip.xml | 73 ++ src/main/assembly/bin.xml| 44 - src/main/assembly/src-tar-gz.xml | 74 --- src/main/assembly/src-zip.xml| 73 -- 7 files changed, 194 insertions(+), 194 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/a04dac67/pom.xml -- diff --git a/pom.xml b/pom.xml index 10d9803..7aca347 100644 --- a/pom.xml +++ b/pom.xml @@ -186,9 +186,9 @@ maven-assembly-plugin - src/main/assembly/bin.xml - src/main/assembly/src-tar-gz.xml - src/main/assembly/src-zip.xml + src/assembly/bin.xml + src/assembly/src-tar-gz.xml + src/assembly/src-zip.xml gnu http://git-wip-us.apache.org/repos/asf/commons-pool/blob/a04dac67/src/assembly/bin.xml -- diff --git a/src/assembly/bin.xml b/src/assembly/bin.xml new file mode 100644 index 000..5762291 --- /dev/null +++ b/src/assembly/bin.xml @@ -0,0 +1,44 @@ + + +bin + +tar.gz +zip + +false + + + +LICENSE.txt +NOTICE.txt +RELEASE-NOTES.txt + + + +target + + +*.jar + + + +target/site/apidocs +apidocs + + + http://git-wip-us.apache.org/repos/asf/commons-pool/blob/a04dac67/src/assembly/src-tar-gz.xml -- diff --git a/src/assembly/src-tar-gz.xml b/src/assembly/src-tar-gz.xml new file mode 100644 index 000..b2b9bfc --- /dev/null +++ b/src/assembly/src-tar-gz.xml @@ -0,0 +1,74 @@ + + +src + +tar.gz + +${project.artifactId}-${project.version}-src + + + +build.xml +checkstyle.xml +LICENSE.txt +license-header.txt +NOTICE.txt +pom.xml +README.txt +RELEASE-NOTES.txt +findbugs-exclude-filter.xml +build.properties.sample + +lf + + +doc +lf + + +src/site/resources + + +src/site/xdoc +lf + + +src/site + + site.xml + +lf + + +src/changes +lf + + +src/main +lf + + +src/test/java +lf + + +src/test/resources + + + + http://git-wip-us.apache.org/repos/asf/commons-pool/blob/a04dac67/src/assembly/src-zip.xml -- diff --git a/src/assembly/src-zip.xml b/src/assembly/src-zip.xml new file mode 100644 index 000..5fafe18 --- /dev/null +++ b/src/assembly/src-zip.xml @@ -0,0 +1,73 @@ + + +src + +zip + +${project.artifactId}-${project.version}-src + + + +build.xml +checkstyle.xml +LICENSE.txt +license-header.txt +NOTICE.txt +pom.xml +README.txt +RELEASE-NOTES.txt +findbugs-exclude-filter.xml +build.properties.sample + +crlf + + +doc +crlf + + +src/site/resources + + +
[17/50] [abbrv] commons-pool git commit: Add final modifier to method parameters.
http://git-wip-us.apache.org/repos/asf/commons-pool/blob/844cbd26/src/main/java/org/apache/commons/pool2/proxy/ProxiedKeyedObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/proxy/ProxiedKeyedObjectPool.java b/src/main/java/org/apache/commons/pool2/proxy/ProxiedKeyedObjectPool.java index 26536b0..b837300 100644 --- a/src/main/java/org/apache/commons/pool2/proxy/ProxiedKeyedObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/proxy/ProxiedKeyedObjectPool.java @@ -44,8 +44,8 @@ public class ProxiedKeyedObjectPoolimplements KeyedObjectPool { * @param pool The object pool to wrap * @param proxySource The source of the proxy objects */ -public ProxiedKeyedObjectPool(KeyedObjectPool pool, -ProxySource proxySource) { +public ProxiedKeyedObjectPool(final KeyedObjectPool pool, +final ProxySource proxySource) { this.pool = pool; this.proxySource = proxySource; } @@ -53,7 +53,7 @@ public class ProxiedKeyedObjectPool implements KeyedObjectPool { @SuppressWarnings("unchecked") @Override -public V borrowObject(K key) throws Exception, NoSuchElementException, +public V borrowObject(final K key) throws Exception, NoSuchElementException, IllegalStateException { UsageTracking usageTracking = null; if (pool instanceof UsageTracking) { @@ -65,30 +65,30 @@ public class ProxiedKeyedObjectPool implements KeyedObjectPool { } @Override -public void returnObject(K key, V proxy) throws Exception { +public void returnObject(final K key, final V proxy) throws Exception { final V pooledObject = proxySource.resolveProxy(proxy); pool.returnObject(key, pooledObject); } @Override -public void invalidateObject(K key, V proxy) throws Exception { +public void invalidateObject(final K key, final V proxy) throws Exception { final V pooledObject = proxySource.resolveProxy(proxy); pool.invalidateObject(key, pooledObject); } @Override -public void addObject(K key) throws Exception, IllegalStateException, +public void addObject(final K key) throws Exception, IllegalStateException, UnsupportedOperationException { pool.addObject(key); } @Override -public int getNumIdle(K key) { +public int getNumIdle(final K key) { return pool.getNumIdle(key); } @Override -public int getNumActive(K key) { +public int getNumActive(final K key) { return pool.getNumActive(key); } @@ -108,7 +108,7 @@ public class ProxiedKeyedObjectPool implements KeyedObjectPool { } @Override -public void clear(K key) throws Exception, UnsupportedOperationException { +public void clear(final K key) throws Exception, UnsupportedOperationException { pool.clear(key); } http://git-wip-us.apache.org/repos/asf/commons-pool/blob/844cbd26/src/main/java/org/apache/commons/pool2/proxy/ProxiedObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/proxy/ProxiedObjectPool.java b/src/main/java/org/apache/commons/pool2/proxy/ProxiedObjectPool.java index 59c5402..5496342 100644 --- a/src/main/java/org/apache/commons/pool2/proxy/ProxiedObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/proxy/ProxiedObjectPool.java @@ -43,7 +43,7 @@ public class ProxiedObjectPool implements ObjectPool { * @param pool The object pool to wrap * @param proxySource The source of the proxy objects */ -public ProxiedObjectPool(ObjectPool pool, ProxySource proxySource) { +public ProxiedObjectPool(final ObjectPool pool, final ProxySource proxySource) { this.pool = pool; this.proxySource = proxySource; } @@ -66,14 +66,14 @@ public class ProxiedObjectPool implements ObjectPool { @Override -public void returnObject(T proxy) throws Exception { +public void returnObject(final T proxy) throws Exception { final T pooledObject = proxySource.resolveProxy(proxy); pool.returnObject(pooledObject); } @Override -public void invalidateObject(T proxy) throws Exception { +public void invalidateObject(final T proxy) throws Exception { final T pooledObject = proxySource.resolveProxy(proxy); pool.invalidateObject(pooledObject); } http://git-wip-us.apache.org/repos/asf/commons-pool/blob/844cbd26/src/test/java/org/apache/commons/pool2/MethodCall.java -- diff --git a/src/test/java/org/apache/commons/pool2/MethodCall.java b/src/test/java/org/apache/commons/pool2/MethodCall.java index bb8fe02..7b56c79 100644 --- a/src/test/java/org/apache/commons/pool2/MethodCall.java +++
[13/50] [abbrv] commons-pool git commit: Add final modifier to local variables.
http://git-wip-us.apache.org/repos/asf/commons-pool/blob/5fe7dc02/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java -- diff --git a/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java b/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java index da7e14d..0ede9b0 100644 --- a/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java +++ b/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java @@ -61,7 +61,7 @@ public class TestGenericObjectPool extends TestBaseObjectPool { @Override protected ObjectPool makeEmptyPool(int mincap) { - GenericObjectPool mtPool = + final GenericObjectPool mtPool = new GenericObjectPool(new SimpleFactory()); mtPool.setMaxTotal(mincap); mtPool.setMaxIdle(mincap); @@ -87,21 +87,21 @@ public class TestGenericObjectPool extends TestBaseObjectPool { @After public void tearDown() throws Exception { -String poolName = pool.getJmxName().toString(); +final String poolName = pool.getJmxName().toString(); pool.clear(); pool.close(); pool = null; factory = null; -MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); -Set result = mbs.queryNames(new ObjectName( +final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); +final Set result = mbs.queryNames(new ObjectName( "org.apache.commoms.pool2:type=GenericObjectPool,*"), null); // There should be no registered pools at this point -int registeredPoolCount = result.size(); -StringBuilder msg = new StringBuilder("Current pool is: "); +final int registeredPoolCount = result.size(); +final StringBuilder msg = new StringBuilder("Current pool is: "); msg.append(poolName); msg.append(" Still open pools are: "); -for (ObjectName name : result) { +for (final ObjectName name : result) { // Clean these up ready for the next test msg.append(name.toString()); msg.append(" created via\n"); @@ -124,19 +124,19 @@ public class TestGenericObjectPool extends TestBaseObjectPool { public void testConstructors() throws Exception { // Make constructor arguments all different from defaults -int minIdle = 2; -long maxWait = 3; -int maxIdle = 4; -int maxTotal = 5; -long minEvictableIdleTimeMillis = 6; -int numTestsPerEvictionRun = 7; -boolean testOnBorrow = true; -boolean testOnReturn = true; -boolean testWhileIdle = true; -long timeBetweenEvictionRunsMillis = 8; -boolean blockWhenExhausted = false; -boolean lifo = false; -PooledObjectFactory dummyFactory = new DummyFactory(); +final int minIdle = 2; +final long maxWait = 3; +final int maxIdle = 4; +final int maxTotal = 5; +final long minEvictableIdleTimeMillis = 6; +final int numTestsPerEvictionRun = 7; +final boolean testOnBorrow = true; +final boolean testOnReturn = true; +final boolean testWhileIdle = true; +final long timeBetweenEvictionRunsMillis = 8; +final boolean blockWhenExhausted = false; +final boolean lifo = false; +final PooledObjectFactory dummyFactory = new DummyFactory(); GenericObjectPool dummyPool = new GenericObjectPool(dummyFactory); assertEquals(GenericObjectPoolConfig.DEFAULT_MAX_IDLE, dummyPool.getMaxIdle()); @@ -161,7 +161,7 @@ public class TestGenericObjectPool extends TestBaseObjectPool { Boolean.valueOf(dummyPool.getLifo())); dummyPool.close(); -GenericObjectPoolConfig config = +final GenericObjectPoolConfig config = new GenericObjectPoolConfig(); config.setLifo(lifo); config.setMaxIdle(maxIdle); @@ -201,12 +201,12 @@ public class TestGenericObjectPool extends TestBaseObjectPool { public void testWhenExhaustedFail() throws Exception { pool.setMaxTotal(1); pool.setBlockWhenExhausted(false); -String obj1 = pool.borrowObject(); +final String obj1 = pool.borrowObject(); assertNotNull(obj1); try { pool.borrowObject(); fail("Expected NoSuchElementException"); -} catch(NoSuchElementException e) { +} catch(final NoSuchElementException e) { // expected } pool.returnObject(obj1); @@ -219,12 +219,12 @@ public class TestGenericObjectPool extends TestBaseObjectPool { pool.setMaxTotal(1); pool.setBlockWhenExhausted(true); pool.setMaxWaitMillis(10L); -String obj1 = pool.borrowObject(); +final String obj1 = pool.borrowObject();
[23/50] [abbrv] commons-pool git commit: Fix various IDE warnings
Fix various IDE warnings git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1735057 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/2566fd6c Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/2566fd6c Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/2566fd6c Branch: refs/heads/master Commit: 2566fd6c479f86f46a0f0a65c4587572100b5cfc Parents: cd3f495 Author: Mark ThomasAuthored: Tue Mar 15 11:16:13 2016 + Committer: Mark Thomas Committed: Tue Mar 15 11:16:13 2016 + -- src/main/java/org/apache/commons/pool2/BaseObject.java | 9 +++-- src/main/java/org/apache/commons/pool2/BaseObjectPool.java | 1 + .../apache/commons/pool2/impl/BaseGenericObjectPool.java| 7 --- .../org/apache/commons/pool2/impl/BaseObjectPoolConfig.java | 1 + .../commons/pool2/impl/GenericKeyedObjectPoolConfig.java| 1 + .../apache/commons/pool2/impl/TestDefaultPooledObject.java | 4 +++- .../org/apache/commons/pool2/impl/TestPoolImplUtils.java| 2 ++ 7 files changed, 19 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/2566fd6c/src/main/java/org/apache/commons/pool2/BaseObject.java -- diff --git a/src/main/java/org/apache/commons/pool2/BaseObject.java b/src/main/java/org/apache/commons/pool2/BaseObject.java index 6a69abd..cc7f376 100644 --- a/src/main/java/org/apache/commons/pool2/BaseObject.java +++ b/src/main/java/org/apache/commons/pool2/BaseObject.java @@ -18,7 +18,7 @@ package org.apache.commons.pool2; /** * A base class for common functionality. - * + * * @since 2.4.3 */ public abstract class BaseObject { @@ -33,8 +33,13 @@ public abstract class BaseObject { return builder.toString(); } +/** + * Used by sub-classes to include the fields defined by the sub-class in the + * {@link #toString()} output. + * + * @param builder Field names and values are appended to this object + */ protected void toStringAppendFields(final StringBuilder builder) { // do nothing by default, needed for b/w compatibility. } - } http://git-wip-us.apache.org/repos/asf/commons-pool/blob/2566fd6c/src/main/java/org/apache/commons/pool2/BaseObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/BaseObjectPool.java b/src/main/java/org/apache/commons/pool2/BaseObjectPool.java index 2349622..7ef7187 100644 --- a/src/main/java/org/apache/commons/pool2/BaseObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/BaseObjectPool.java @@ -119,6 +119,7 @@ public abstract class BaseObjectPool extends BaseObject implements ObjectPool private volatile boolean closed = false; +@Override protected void toStringAppendFields(final StringBuilder builder) { builder.append("closed="); builder.append(closed); http://git-wip-us.apache.org/repos/asf/commons-pool/blob/2566fd6c/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java index 6eafcd1..6e197c9 100644 --- a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java @@ -1176,7 +1176,7 @@ public abstract class BaseGenericObjectPool extends BaseObject { } } - + /** * Wrapper for objects under management by the pool. * @@ -1189,7 +1189,7 @@ public abstract class BaseGenericObjectPool extends BaseObject { static class IdentityWrapper { /** Wrapped object */ private final T instance; - + /** * Create a wrapper for an instance. * @@ -1209,7 +1209,7 @@ public abstract class BaseGenericObjectPool extends BaseObject { public boolean equals(final Object other) { return ((IdentityWrapper) other).instance == instance; } - + /** * @return the wrapped object */ @@ -1227,6 +1227,7 @@ public abstract class BaseGenericObjectPool extends BaseObject { } } +@Override protected void toStringAppendFields(final StringBuilder builder) { builder.append("maxTotal="); builder.append(maxTotal); http://git-wip-us.apache.org/repos/asf/commons-pool/blob/2566fd6c/src/main/java/org/apache/commons/pool2/impl/BaseObjectPoolConfig.java
[30/50] [abbrv] commons-pool git commit: Re-working of fix for POOL-303
Re-working of fix for POOL-303 git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1735269 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/a4c544a2 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/a4c544a2 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/a4c544a2 Branch: refs/heads/master Commit: a4c544a24242701673073d32d2ddbf037fac0099 Parents: 170a509 Author: Mark ThomasAuthored: Wed Mar 16 17:20:41 2016 + Committer: Mark Thomas Committed: Wed Mar 16 17:20:41 2016 + -- .../pool2/impl/GenericKeyedObjectPool.java | 53 .../commons/pool2/impl/GenericObjectPool.java | 51 --- .../pool2/impl/TestGenericObjectPool.java | 6 ++- 3 files changed, 93 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/a4c544a2/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java index dcfe448..d477cfa 100644 --- a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java @@ -1017,26 +1017,58 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool } } -final long newCreateCount = objectDeque.getCreateCount().incrementAndGet(); +// Flag that indicates if create should: +// - TRUE: call the factory to create an object +// - FALSE: return null +// - null: loop and re-test the condition that determines whether to +// call the factory +Boolean create = null; +while (create == null) { +synchronized (objectDeque.makeObjectCountLock) { +final long newCreateCount = objectDeque.getCreateCount().incrementAndGet(); +// Check against the per key limit +if (newCreateCount > maxTotalPerKeySave) { +// The key is currently at capacity or in the process of +// making enough new objects to take it to capacity. +numTotal.decrementAndGet(); +objectDeque.getCreateCount().decrementAndGet(); +if (objectDeque.makeObjectCount == 0) { +// There are no makeObject() calls in progress for this +// key so the key is at capacity. Do not attempt to +// create a new object. Return and wait for an object to +// be returned. +create = Boolean.FALSE; +} else { +// There are makeObject() calls in progress that might +// bring the pool to capacity. Those calls might also +// fail so wait until they complete and then re-test if +// the pool is at capacity or not. +objectDeque.makeObjectCountLock.wait(); +} +} else { +// The pool is not at capacity. Create a new object. +objectDeque.makeObjectCount++; +create = Boolean.TRUE; +} +} +} -// Check against the per key limit -if (newCreateCount > maxTotalPerKeySave) { -numTotal.decrementAndGet(); -objectDeque.getCreateCount().decrementAndGet(); +if (!create.booleanValue()) { return null; } - PooledObject p = null; try { p = factory.makeObject(key); } catch (final Exception e) { numTotal.decrementAndGet(); objectDeque.getCreateCount().decrementAndGet(); -// POOL-303. There may be threads waiting on an object return that -// isn't going to happen. Unblock them. -objectDeque.idleObjects.interuptTakeWaiters(); throw e; +} finally { +synchronized (objectDeque.makeObjectCountLock) { +objectDeque.makeObjectCount--; +objectDeque.makeObjectCountLock.notifyAll(); +} } createdCount.incrementAndGet(); @@ -1431,6 +1463,9 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool */ private final AtomicInteger createCount = new AtomicInteger(0); +private long makeObjectCount = 0; +
[16/50] [abbrv] commons-pool git commit: Add final modifier to local variables.
Add final modifier to local variables. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1729267 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/5fe7dc02 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/5fe7dc02 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/5fe7dc02 Branch: refs/heads/master Commit: 5fe7dc020d070e165823f84ba9b34731f143412f Parents: 4a7f18b Author: Gary D. GregoryAuthored: Mon Feb 8 21:45:12 2016 + Committer: Gary D. Gregory Committed: Mon Feb 8 21:45:12 2016 + -- .../org/apache/commons/pool2/BaseObject.java| 2 +- .../org/apache/commons/pool2/PoolUtils.java | 66 +-- .../commons/pool2/impl/AbandonedConfig.java | 2 +- .../pool2/impl/BaseGenericObjectPool.java | 55 +-- .../commons/pool2/impl/DefaultPooledObject.java | 10 +- .../pool2/impl/DefaultPooledObjectInfo.java | 10 +- .../commons/pool2/impl/EvictionConfig.java | 2 +- .../commons/pool2/impl/EvictionTimer.java | 6 +- .../pool2/impl/GenericKeyedObjectPool.java | 178 .../impl/GenericKeyedObjectPoolConfig.java | 2 +- .../commons/pool2/impl/GenericObjectPool.java | 104 ++--- .../pool2/impl/GenericObjectPoolConfig.java | 2 +- .../pool2/impl/InterruptibleReentrantLock.java | 4 +- .../commons/pool2/impl/LinkedBlockingDeque.java | 47 +-- .../commons/pool2/impl/PoolImplUtils.java | 13 +- .../commons/pool2/impl/PooledSoftReference.java | 2 +- .../pool2/impl/SoftReferenceObjectPool.java | 24 +- .../commons/pool2/proxy/BaseProxyHandler.java | 6 +- .../commons/pool2/proxy/CglibProxySource.java | 10 +- .../commons/pool2/proxy/JdkProxySource.java | 6 +- .../pool2/proxy/ProxiedKeyedObjectPool.java | 10 +- .../commons/pool2/proxy/ProxiedObjectPool.java | 10 +- .../pool2/MethodCallPoolableObjectFactory.java | 2 +- .../TestBaseKeyedPoolableObjectFactory.java | 2 +- .../commons/pool2/TestBaseObjectPool.java | 44 +- .../pool2/TestBasePoolableObjectFactory.java| 2 +- .../commons/pool2/TestKeyedObjectPool.java | 100 ++--- .../apache/commons/pool2/TestObjectPool.java| 42 +- .../org/apache/commons/pool2/TestPoolUtils.java | 94 +++-- .../java/org/apache/commons/pool2/Waiter.java | 4 +- .../org/apache/commons/pool2/WaiterFactory.java | 8 +- .../pool2/impl/TestAbandonedObjectPool.java | 43 +- .../pool2/impl/TestBaseGenericObjectPool.java | 4 +- .../pool2/impl/TestDefaultPooledObject.java | 14 +- .../pool2/impl/TestDefaultPooledObjectInfo.java | 44 +- .../pool2/impl/TestGenericKeyedObjectPool.java | 412 +-- .../pool2/impl/TestGenericObjectPool.java | 378 - .../impl/TestGenericObjectPoolClassLoaders.java | 16 +- .../pool2/impl/TestLinkedBlockingDeque.java | 60 +-- .../commons/pool2/impl/TestPoolImplUtils.java | 4 +- .../pool2/impl/TestPooledSoftReference.java | 4 +- .../pool2/impl/TestSoftRefOutOfMemory.java | 14 +- .../pool2/performance/PerformanceTest.java | 36 +- .../performance/SleepingObjectFactory.java | 6 +- .../proxy/BaseTestProxiedKeyedObjectPool.java | 12 +- .../pool2/proxy/BaseTestProxiedObjectPool.java | 20 +- 46 files changed, 975 insertions(+), 961 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/5fe7dc02/src/main/java/org/apache/commons/pool2/BaseObject.java -- diff --git a/src/main/java/org/apache/commons/pool2/BaseObject.java b/src/main/java/org/apache/commons/pool2/BaseObject.java index 019b678..948dd3f 100644 --- a/src/main/java/org/apache/commons/pool2/BaseObject.java +++ b/src/main/java/org/apache/commons/pool2/BaseObject.java @@ -25,7 +25,7 @@ public abstract class BaseObject { @Override public String toString() { -StringBuilder builder = new StringBuilder(); +final StringBuilder builder = new StringBuilder(); builder.append(getClass().getSimpleName()); builder.append(" ["); toStringAppendFields(builder); http://git-wip-us.apache.org/repos/asf/commons-pool/blob/5fe7dc02/src/main/java/org/apache/commons/pool2/PoolUtils.java -- diff --git a/src/main/java/org/apache/commons/pool2/PoolUtils.java b/src/main/java/org/apache/commons/pool2/PoolUtils.java index 3b00a2f..a945702 100644 --- a/src/main/java/org/apache/commons/pool2/PoolUtils.java +++ b/src/main/java/org/apache/commons/pool2/PoolUtils.java @@ -605,7 +605,7 @@ public final class PoolUtils { }
[20/50] [abbrv] commons-pool git commit: [POOL-309] Fix misspellings from "destory" to "destroy".
[POOL-309] Fix misspellings from "destory" to "destroy". git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1733560 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/5ec116ad Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/5ec116ad Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/5ec116ad Branch: refs/heads/master Commit: 5ec116ad0b261b3143c24ff9a37c27bfc8182040 Parents: 14d8291 Author: Gary D. GregoryAuthored: Fri Mar 4 06:38:45 2016 + Committer: Gary D. Gregory Committed: Fri Mar 4 06:38:45 2016 + -- src/changes/changes.xml | 3 +++ .../apache/commons/pool2/impl/GenericObjectPool.java| 12 ++-- .../org/apache/commons/pool2/TestKeyedObjectPool.java | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/5ec116ad/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 2260289..2503b03 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -44,6 +44,9 @@ The type attribute can be add,update,fix,remove. + + Fix misspellings from "destory" to "destroy". + http://git-wip-us.apache.org/repos/asf/commons-pool/blob/5ec116ad/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java index 2e7f047..6c8dc71 100644 --- a/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java @@ -880,17 +880,17 @@ public class GenericObjectPool extends BaseGenericObjectPool /** * Destroys a wrapped pooled object. * - * @param toDestory The wrapped pooled object to destroy + * @param toDestroy The wrapped pooled object to destroy * * @throws Exception If the factory fails to destroy the pooled object * cleanly */ -private void destroy(final PooledObject toDestory) throws Exception { -toDestory.invalidate(); -idleObjects.remove(toDestory); -allObjects.remove(new IdentityWrapper(toDestory.getObject())); +private void destroy(final PooledObject toDestroy) throws Exception { +toDestroy.invalidate(); +idleObjects.remove(toDestroy); +allObjects.remove(new IdentityWrapper(toDestroy.getObject())); try { -factory.destroyObject(toDestory); +factory.destroyObject(toDestroy); } finally { destroyedCount.incrementAndGet(); createCount.decrementAndGet(); http://git-wip-us.apache.org/repos/asf/commons-pool/blob/5ec116ad/src/test/java/org/apache/commons/pool2/TestKeyedObjectPool.java -- diff --git a/src/test/java/org/apache/commons/pool2/TestKeyedObjectPool.java b/src/test/java/org/apache/commons/pool2/TestKeyedObjectPool.java index 4c646cc..75653f2 100644 --- a/src/test/java/org/apache/commons/pool2/TestKeyedObjectPool.java +++ b/src/test/java/org/apache/commons/pool2/TestKeyedObjectPool.java @@ -379,7 +379,7 @@ public abstract class TestKeyedObjectPool { PoolUtils.prefill(pool, KEY, 5); pool.clear(); - Test exception handling clear should swallow destory object failures + Test exception handling clear should swallow destroy object failures reset(pool, factory, expectedMethods); factory.setDestroyObjectFail(true); PoolUtils.prefill(pool, KEY, 5);
[24/50] [abbrv] commons-pool git commit: Fix POOL-306 Ensure BaseGenericObjectPool.IdentityWrapper#equals() follows the expected contract for equals().
Fix POOL-306 Ensure BaseGenericObjectPool.IdentityWrapper#equals() follows the expected contract for equals(). git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1735080 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/a898de84 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/a898de84 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/a898de84 Branch: refs/heads/master Commit: a898de843abe44f5f0910b271a89b60e884852a5 Parents: 2566fd6 Author: Mark ThomasAuthored: Tue Mar 15 14:29:11 2016 + Committer: Mark Thomas Committed: Tue Mar 15 14:29:11 2016 + -- src/changes/changes.xml | 4 .../org/apache/commons/pool2/impl/BaseGenericObjectPool.java | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/a898de84/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index f5d27d4..f515689 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -47,6 +47,10 @@ The type attribute can be add,update,fix,remove. Fix misspellings from "destory" to "destroy". + + Ensure BaseGenericObjectPool.IdentityWrapper#equals() follows the expected + contract for equals(). + http://git-wip-us.apache.org/repos/asf/commons-pool/blob/a898de84/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java index 6e197c9..8d5efbd 100644 --- a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java @@ -1207,7 +1207,8 @@ public abstract class BaseGenericObjectPool extends BaseObject { @Override @SuppressWarnings("rawtypes") public boolean equals(final Object other) { -return ((IdentityWrapper) other).instance == instance; +return other instanceof IdentityWrapper && +((IdentityWrapper) other).instance == instance; } /**
[19/50] [abbrv] commons-pool git commit: Always use statement blocks.
Always use statement blocks. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1729271 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/14d82910 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/14d82910 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/14d82910 Branch: refs/heads/master Commit: 14d829107a8a4d5ea443042b96f69318ad5d55c5 Parents: 844cbd2 Author: Gary D. GregoryAuthored: Mon Feb 8 21:49:46 2016 + Committer: Gary D. Gregory Committed: Mon Feb 8 21:49:46 2016 + -- .../org/apache/commons/pool2/impl/LinkedBlockingDeque.java | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/14d82910/src/main/java/org/apache/commons/pool2/impl/LinkedBlockingDeque.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/LinkedBlockingDeque.java b/src/main/java/org/apache/commons/pool2/impl/LinkedBlockingDeque.java index a0091cf..6cf9f4e 100644 --- a/src/main/java/org/apache/commons/pool2/impl/LinkedBlockingDeque.java +++ b/src/main/java/org/apache/commons/pool2/impl/LinkedBlockingDeque.java @@ -1250,14 +1250,15 @@ class LinkedBlockingDeque extends AbstractQueue // are possible if multiple interior nodes are removed. for (;;) { final Node s = nextNode(n); -if (s == null) +if (s == null) { return null; -else if (s.item != null) +} else if (s.item != null) { return s; -else if (s == n) +} else if (s == n) { return firstNode(); -else +} else { n = s; +} } }
[39/50] [abbrv] commons-pool git commit: Check class used for evictionPolicyClassName implements EvictionPolicy
Check class used for evictionPolicyClassName implements EvictionPolicy git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1767714 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/108f44a4 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/108f44a4 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/108f44a4 Branch: refs/heads/master Commit: 108f44a45f1e95dd6bbb6db3934fc0a2cc7019ab Parents: dcf4d6d Author: Mark ThomasAuthored: Wed Nov 2 15:53:08 2016 + Committer: Mark Thomas Committed: Wed Nov 2 15:53:08 2016 + -- src/changes/changes.xml | 4 +++ .../pool2/impl/BaseGenericObjectPool.java | 3 ++ .../pool2/impl/TestGenericObjectPool.java | 38 3 files changed, 30 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/108f44a4/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 65ca2b8..5cca806 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -67,6 +67,10 @@ The type attribute can be add,update,fix,remove. maxTotal threads try to borrow objects with different keys at the same time and the factory destroys objects on return. + + Ensure that any class name used for evictionPolicyClassName represents a + class that implements EvictionPolicy. + http://git-wip-us.apache.org/repos/asf/commons-pool/blob/108f44a4/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java index 8d5efbd..8afa8f1 100644 --- a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java @@ -613,6 +613,9 @@ public abstract class BaseGenericObjectPool extends BaseObject { final EvictionPolicy evicPolicy = (EvictionPolicy) policy; this.evictionPolicy = evicPolicy; +} else { +throw new IllegalArgumentException("[" + evictionPolicyClassName + +"] does not implement EvictionPolicy"); } } catch (final ClassNotFoundException e) { throw new IllegalArgumentException( http://git-wip-us.apache.org/repos/asf/commons-pool/blob/108f44a4/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java -- diff --git a/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java b/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java index 75b9438..c9014ac 100644 --- a/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java +++ b/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java @@ -1080,6 +1080,14 @@ public class TestGenericObjectPool extends TestBaseObjectPool { // expected } +try { +pool.setEvictionPolicyClassName(java.lang.String.class.getName()); +fail("setEvictionPolicyClassName must throw an error if a class that does not " ++ "implement EvictionPolicy is specified."); +} catch (final IllegalArgumentException e) { +// expected +} + pool.setEvictionPolicyClassName(TestEvictionPolicy.class.getName()); assertEquals(TestEvictionPolicy.class.getName(), pool.getEvictionPolicyClassName()); @@ -1704,49 +1712,49 @@ public class TestGenericObjectPool extends TestBaseObjectPool { public SimpleFactory() { this(true); } - + public SimpleFactory(final boolean valid) { this(valid,valid); } - + public SimpleFactory(final boolean evalid, final boolean ovalid) { evenValid = evalid; oddValid = ovalid; } - + public synchronized void setValid(final boolean valid) { setEvenValid(valid); setOddValid(valid); } - + public synchronized void setEvenValid(final boolean valid) { evenValid = valid; } - + public synchronized void setOddValid(final boolean valid) { oddValid = valid; } - + public synchronized void setThrowExceptionOnPassivate(final boolean bool) {
[32/50] [abbrv] commons-pool git commit: Correct location of decrement
Correct location of decrement git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1735292 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/f7a0d26b Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/f7a0d26b Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/f7a0d26b Branch: refs/heads/master Commit: f7a0d26b803e48ce272a5bcc96c7ff1319b00f71 Parents: 55c10ec Author: Mark ThomasAuthored: Wed Mar 16 20:20:11 2016 + Committer: Mark Thomas Committed: Wed Mar 16 20:20:11 2016 + -- .../java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/f7a0d26b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java index d477cfa..200c424 100644 --- a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java @@ -1030,7 +1030,6 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool if (newCreateCount > maxTotalPerKeySave) { // The key is currently at capacity or in the process of // making enough new objects to take it to capacity. -numTotal.decrementAndGet(); objectDeque.getCreateCount().decrementAndGet(); if (objectDeque.makeObjectCount == 0) { // There are no makeObject() calls in progress for this @@ -1054,6 +1053,7 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool } if (!create.booleanValue()) { +numTotal.decrementAndGet(); return null; }
[42/50] [abbrv] commons-pool git commit: Fix transposed digits
Fix transposed digits git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1767783 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/ed91f491 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/ed91f491 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/ed91f491 Branch: refs/heads/master Commit: ed91f491249950ba19b9d81e9590ded25ca14ec0 Parents: 4a20cdc Author: Mark ThomasAuthored: Wed Nov 2 20:54:06 2016 + Committer: Mark Thomas Committed: Wed Nov 2 20:54:06 2016 + -- src/changes/changes.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/ed91f491/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index dca51b3..ae14e69 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -71,7 +71,7 @@ The type attribute can be add,update,fix,remove. Ensure that any class name used for evictionPolicyClassName represents a class that implements EvictionPolicy. - + Add a configurable delay (default 10 seconds) to wait when shutting down an Evictor to allow the associated thread time to complete and current evictions and to terminate.
[33/50] [abbrv] commons-pool git commit: Fix POOL-310 Ensure that threads using GKOP do not block indefinitely if more than maxTotal threads try to borrow objects with different keys at the same time
Fix POOL-310 Ensure that threads using GKOP do not block indefinitely if more than maxTotal threads try to borrow objects with different keys at the same time and the factory destroys objects on return. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1735563 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/9257fb9e Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/9257fb9e Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/9257fb9e Branch: refs/heads/master Commit: 9257fb9e40526f7ad33ac83f0b7f152607510ccd Parents: f7a0d26 Author: Mark ThomasAuthored: Fri Mar 18 09:53:38 2016 + Committer: Mark Thomas Committed: Fri Mar 18 09:53:38 2016 + -- src/changes/changes.xml | 5 + .../pool2/impl/GenericKeyedObjectPool.java | 97 ++-- 2 files changed, 53 insertions(+), 49 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/9257fb9e/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 6b48a1f..65ca2b8 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -62,6 +62,11 @@ The type attribute can be add,update,fix,remove. Replace inefficient use of keySet with entrySet in GKOP. + + Ensure that threads using GKOP do not block indefinitely if more than + maxTotal threads try to borrow objects with different keys at the same + time and the factory destroys objects on return. + http://git-wip-us.apache.org/repos/asf/commons-pool/blob/9257fb9e/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java index 200c424..6976f2a 100644 --- a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java @@ -478,8 +478,29 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool final long activeTime = p.getActiveTimeMillis(); -if (getTestOnReturn()) { -if (!factory.validateObject(key, p)) { +try { +if (getTestOnReturn()) { +if (!factory.validateObject(key, p)) { +try { +destroy(key, p, true); +} catch (final Exception e) { +swallowException(e); +} +if (objectDeque.idleObjects.hasTakeWaiters()) { +try { +addObject(key); +} catch (final Exception e) { +swallowException(e); +} +} +return; +} +} + +try { +factory.passivateObject(key, p); +} catch (final Exception e1) { +swallowException(e1); try { destroy(key, p, true); } catch (final Exception e) { @@ -492,65 +513,43 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool swallowException(e); } } -updateStatsReturn(activeTime); return; } -} -try { -factory.passivateObject(key, p); -} catch (final Exception e1) { -swallowException(e1); -try { -destroy(key, p, true); -} catch (final Exception e) { -swallowException(e); +if (!p.deallocate()) { +throw new IllegalStateException( +"Object has already been returned to this pool"); } -if (objectDeque.idleObjects.hasTakeWaiters()) { + +final int maxIdle = getMaxIdlePerKey(); +final LinkedBlockingDeque idleObjects = +objectDeque.getIdleObjects(); + +if (isClosed() || maxIdle > -1 && maxIdle <= idleObjects.size()) { try { -addObject(key); +destroy(key, p, true); } catch (final Exception e) { swallowException(e); } -} -updateStatsReturn(activeTime); -return; -} - -if
[34/50] [abbrv] commons-pool git commit: Static fields should be accessed directly.
Static fields should be accessed directly. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1739389 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/7d8069f3 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/7d8069f3 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/7d8069f3 Branch: refs/heads/master Commit: 7d8069f324a523e4d29021fc4c40ab3a51d497b6 Parents: 9257fb9 Author: Gary D. GregoryAuthored: Sat Apr 16 00:04:10 2016 + Committer: Gary D. Gregory Committed: Sat Apr 16 00:04:10 2016 + -- .../commons/pool2/impl/TestGenericObjectPool.java | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/7d8069f3/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java -- diff --git a/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java b/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java index 5890146..97e07cd 100644 --- a/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java +++ b/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java @@ -142,24 +142,24 @@ public class TestGenericObjectPool extends TestBaseObjectPool { GenericObjectPool dummyPool = new GenericObjectPool(dummyFactory); assertEquals(GenericObjectPoolConfig.DEFAULT_MAX_IDLE, dummyPool.getMaxIdle()); -assertEquals(GenericObjectPoolConfig.DEFAULT_MAX_WAIT_MILLIS, dummyPool.getMaxWaitMillis()); +assertEquals(BaseObjectPoolConfig.DEFAULT_MAX_WAIT_MILLIS, dummyPool.getMaxWaitMillis()); assertEquals(GenericObjectPoolConfig.DEFAULT_MIN_IDLE, dummyPool.getMinIdle()); assertEquals(GenericObjectPoolConfig.DEFAULT_MAX_TOTAL, dummyPool.getMaxTotal()); - assertEquals(GenericObjectPoolConfig.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS, + assertEquals(BaseObjectPoolConfig.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS, dummyPool.getMinEvictableIdleTimeMillis()); - assertEquals(GenericObjectPoolConfig.DEFAULT_NUM_TESTS_PER_EVICTION_RUN, +assertEquals(BaseObjectPoolConfig.DEFAULT_NUM_TESTS_PER_EVICTION_RUN, dummyPool.getNumTestsPerEvictionRun()); - assertEquals(Boolean.valueOf(GenericObjectPoolConfig.DEFAULT_TEST_ON_BORROW), + assertEquals(Boolean.valueOf(BaseObjectPoolConfig.DEFAULT_TEST_ON_BORROW), Boolean.valueOf(dummyPool.getTestOnBorrow())); - assertEquals(Boolean.valueOf(GenericObjectPoolConfig.DEFAULT_TEST_ON_RETURN), + assertEquals(Boolean.valueOf(BaseObjectPoolConfig.DEFAULT_TEST_ON_RETURN), Boolean.valueOf(dummyPool.getTestOnReturn())); - assertEquals(Boolean.valueOf(GenericObjectPoolConfig.DEFAULT_TEST_WHILE_IDLE), + assertEquals(Boolean.valueOf(BaseObjectPoolConfig.DEFAULT_TEST_WHILE_IDLE), Boolean.valueOf(dummyPool.getTestWhileIdle())); - assertEquals(GenericObjectPoolConfig.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS, + assertEquals(BaseObjectPoolConfig.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS, dummyPool.getTimeBetweenEvictionRunsMillis()); - assertEquals(Boolean.valueOf(GenericObjectPoolConfig.DEFAULT_BLOCK_WHEN_EXHAUSTED), + assertEquals(Boolean.valueOf(BaseObjectPoolConfig.DEFAULT_BLOCK_WHEN_EXHAUSTED), Boolean.valueOf(dummyPool.getBlockWhenExhausted())); -assertEquals(Boolean.valueOf(GenericObjectPoolConfig.DEFAULT_LIFO), +assertEquals(Boolean.valueOf(BaseObjectPoolConfig.DEFAULT_LIFO), Boolean.valueOf(dummyPool.getLifo())); dummyPool.close();
[49/50] [abbrv] commons-pool git commit: Fix issue reported on users list. Ensure that a call to GKOP preparePool() takes account of other threads that might create objects concurrently, particularly
Fix issue reported on users list. Ensure that a call to GKOP preparePool() takes account of other threads that might create objects concurrently, particularly the Evictor. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1782329 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/d00d176f Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/d00d176f Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/d00d176f Branch: refs/heads/master Commit: d00d176fc04d730f63b47dde9bc334b5c3a67f3c Parents: 6a088d1 Author: Mark ThomasAuthored: Thu Feb 9 13:41:09 2017 + Committer: Mark Thomas Committed: Thu Feb 9 13:41:09 2017 + -- src/changes/changes.xml | 4 .../pool2/impl/GenericKeyedObjectPool.java | 22 +--- 2 files changed, 18 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/d00d176f/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index fb3a878..7409dc3 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -79,6 +79,10 @@ The type attribute can be add,update,fix,remove. an Evictor to allow the associated thread time to complete and current evictions and to terminate. + + Ensure that a call to GKOP preparePool() takes account of other threads + that might create objects concurrently, particularly the Evictor. + http://git-wip-us.apache.org/repos/asf/commons-pool/blob/d00d176f/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java index 7fa21b5..396aaf9 100644 --- a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java @@ -76,7 +76,7 @@ import org.apache.commons.pool2.SwallowedExceptionListener; * @since 2.0 */ public class GenericKeyedObjectPool extends BaseGenericObjectPool -implements KeyedObjectPool , GenericKeyedObjectPoolMXBean { +implements KeyedObjectPool , GenericKeyedObjectPoolMXBean { /** * Create a new GenericKeyedObjectPool using defaults from @@ -524,7 +524,7 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool final int maxIdle = getMaxIdlePerKey(); final LinkedBlockingDeque idleObjects = -objectDeque.getIdleObjects(); +objectDeque.getIdleObjects(); if (isClosed() || maxIdle > -1 && maxIdle <= idleObjects.size()) { try { @@ -758,7 +758,7 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool // for zero int itemsToRemove = ((int) (map.size() * 0.15)) + 1; final Iterator > iter = -map.entrySet().iterator(); +map.entrySet().iterator(); while (iter.hasNext() && itemsToRemove > 0) { final Map.Entry entry = iter.next(); @@ -843,7 +843,7 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool final ObjectDeque deque = entry.getValue(); if (deque != null) { final LinkedBlockingDeque pool = -deque.getIdleObjects(); +deque.getIdleObjects(); if(pool.hasTakeWaiters()) { return true; } @@ -1210,7 +1210,7 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool */ private void ensureMinIdle(final K key) throws Exception { // Calculate current pool objects -final ObjectDeque objectDeque = poolMap.get(key); +ObjectDeque objectDeque = poolMap.get(key); // objectDeque == null is OK here. It is handled correctly by both // methods called below. @@ -1224,6 +1224,12 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool for (int i = 0; i < deficit && calculateDeficit(objectDeque) > 0; i++) { addObject(key); +// If objectDeque was null, it won't be any more. Obtain a reference +// to it so the deficit can be correctly calculated. It needs to +// take account of objects created in other threads. +if (objectDeque == null) { +
[38/50] [abbrv] commons-pool git commit: Format: add a blank line between methods.
Format: add a blank line between methods. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1765926 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/dcf4d6de Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/dcf4d6de Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/dcf4d6de Branch: refs/heads/master Commit: dcf4d6de4875f7e35da266bcb3ec6096c0bdc6b7 Parents: 8cc1fa0 Author: Gary D. GregoryAuthored: Fri Oct 21 06:14:06 2016 + Committer: Gary D. Gregory Committed: Fri Oct 21 06:14:06 2016 + -- .../commons/pool2/impl/TestGenericObjectPool.java| 15 +++ 1 file changed, 15 insertions(+) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/dcf4d6de/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java -- diff --git a/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java b/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java index 97e07cd..75b9438 100644 --- a/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java +++ b/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java @@ -1704,38 +1704,49 @@ public class TestGenericObjectPool extends TestBaseObjectPool { public SimpleFactory() { this(true); } + public SimpleFactory(final boolean valid) { this(valid,valid); } + public SimpleFactory(final boolean evalid, final boolean ovalid) { evenValid = evalid; oddValid = ovalid; } + public synchronized void setValid(final boolean valid) { setEvenValid(valid); setOddValid(valid); } + public synchronized void setEvenValid(final boolean valid) { evenValid = valid; } + public synchronized void setOddValid(final boolean valid) { oddValid = valid; } + public synchronized void setThrowExceptionOnPassivate(final boolean bool) { exceptionOnPassivate = bool; } + public synchronized void setMaxTotal(final int maxTotal) { this.maxTotal = maxTotal; } + public synchronized void setDestroyLatency(final long destroyLatency) { this.destroyLatency = destroyLatency; } + public synchronized void setMakeLatency(final long makeLatency) { this.makeLatency = makeLatency; } + public synchronized void setValidateLatency(final long validateLatency) { this.validateLatency = validateLatency; } + @Override public PooledObject makeObject() { final long waitLatency; @@ -1756,6 +1767,7 @@ public class TestGenericObjectPool extends TestBaseObjectPool { } return new DefaultPooledObject(String.valueOf(counter)); } + @Override public void destroyObject(final PooledObject obj) throws Exception { final long waitLatency; @@ -1774,6 +1786,7 @@ public class TestGenericObjectPool extends TestBaseObjectPool { throw new Exception(); } } + @Override public boolean validateObject(final PooledObject obj) { final boolean validate; @@ -1796,6 +1809,7 @@ public class TestGenericObjectPool extends TestBaseObjectPool { } return true; } + @Override public void activateObject(final PooledObject obj) throws Exception { final boolean hurl; @@ -1814,6 +1828,7 @@ public class TestGenericObjectPool extends TestBaseObjectPool { } } } + @Override public void passivateObject(final PooledObject obj) throws Exception { final boolean hurl;
[27/50] [abbrv] commons-pool git commit: Fix POOL-307 Replace inefficient use of keySet with entrySet in GKOP.
Fix POOL-307 Replace inefficient use of keySet with entrySet in GKOP. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1735165 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/db15a295 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/db15a295 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/db15a295 Branch: refs/heads/master Commit: db15a295e120fcd5d5ad74207d03edf09b24bb19 Parents: 564334a Author: Mark ThomasAuthored: Tue Mar 15 20:37:58 2016 + Committer: Mark Thomas Committed: Tue Mar 15 20:37:58 2016 + -- src/changes/changes.xml | 5 ++- .../pool2/impl/GenericKeyedObjectPool.java | 42 +++- 2 files changed, 27 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/db15a295/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 30573e4..6b48a1f 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -56,9 +56,12 @@ The type attribute can be add,update,fix,remove. threads try to borrow an object at the same time and the factory fails to create any objects. - + Small refactoring of borrowObject() to reduce code duplication. + + Replace inefficient use of keySet with entrySet in GKOP. + http://git-wip-us.apache.org/repos/asf/commons-pool/blob/db15a295/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java index 8e1f88f..20281ee 100644 --- a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java @@ -738,13 +738,14 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool // build sorted map of idle objects final Map map = new TreeMap (); -for (final K k : poolMap.keySet()) { -final ObjectDeque queue = poolMap.get(k); +for (Map.Entry entry : poolMap.entrySet()) { +final K k = entry.getKey(); +final ObjectDeque deque = entry.getValue(); // Protect against possible NPE if key has been removed in another // thread. Not worth locking the keys while this loop completes. -if (queue != null) { +if (deque != null) { final LinkedBlockingDeque idleObjects = -queue.getIdleObjects(); +deque.getIdleObjects(); for (final PooledObject p : idleObjects) { // each item into the map using the PooledObject object as the // key. It then gets sorted based on the idle time @@ -800,8 +801,9 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool int maxQueueLength = 0; LinkedBlockingDeque mostLoaded = null; K loadedKey = null; -for (final K k : poolMap.keySet()) { -final ObjectDeque deque = poolMap.get(k); +for (Map.Entry entry : poolMap.entrySet()) { +final K k = entry.getKey(); +final ObjectDeque deque = entry.getValue(); if (deque != null) { final LinkedBlockingDeque pool = deque.getIdleObjects(); final int queueLength = pool.getTakeQueueLength(); @@ -837,8 +839,8 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool * {@code false} */ private boolean hasBorrowWaiters() { -for (final K k : poolMap.keySet()) { -final ObjectDeque deque = poolMap.get(k); +for (Map.Entry entry : poolMap.entrySet()) { +final ObjectDeque deque = entry.getValue(); if (deque != null) { final LinkedBlockingDeque pool = deque.getIdleObjects(); @@ -1371,14 +1373,15 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool public Map getNumWaitersByKey() { final Map result = new HashMap (); -for (final K key : poolMap.keySet()) { -final ObjectDeque queue = poolMap.get(key); -if (queue != null) { +for (Map.Entry
[50/50] [abbrv] commons-pool git commit: [POOL-320]: Use more efficient stack walking mechanisms for usage tracking
[POOL-320]: Use more efficient stack walking mechanisms for usage tracking git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1785520 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/3994baf0 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/3994baf0 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/3994baf0 Branch: refs/heads/master Commit: 3994baf0f3ce59b73bd36e869320275d757d1884 Parents: d00d176 Author: Matt SickerAuthored: Sat Mar 4 20:18:19 2017 + Committer: Matt Sicker Committed: Sat Mar 4 20:18:19 2017 + -- src/changes/changes.xml | 3 + .../apache/commons/pool2/impl/CallStack.java| 54 ++ .../commons/pool2/impl/CallStackUtils.java | 62 +++ .../commons/pool2/impl/DefaultPooledObject.java | 71 +++- .../pool2/impl/SecurityManagerCallStack.java| 107 +++ .../commons/pool2/impl/ThrowableCallStack.java | 76 + .../commons/pool2/impl/CallStackTest.java | 63 +++ .../pool2/impl/TestDefaultPooledObjectInfo.java | 17 ++- 8 files changed, 383 insertions(+), 70 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/3994baf0/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 7409dc3..c710cd5 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -83,6 +83,9 @@ The type attribute can be add,update,fix,remove. Ensure that a call to GKOP preparePool() takes account of other threads that might create objects concurrently, particularly the Evictor. + + Use more efficient stack walking mechanisms for usage tracking when possible. + http://git-wip-us.apache.org/repos/asf/commons-pool/blob/3994baf0/src/main/java/org/apache/commons/pool2/impl/CallStack.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/CallStack.java b/src/main/java/org/apache/commons/pool2/impl/CallStack.java new file mode 100644 index 000..9986553 --- /dev/null +++ b/src/main/java/org/apache/commons/pool2/impl/CallStack.java @@ -0,0 +1,54 @@ +/* + * 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.pool2.impl; + +import org.apache.commons.pool2.PooledObject; +import org.apache.commons.pool2.UsageTracking; + +import java.io.PrintWriter; + +/** + * Strategy for obtaining and printing the current call stack. This is primarily useful for + * {@linkplain UsageTracking usage tracking} so that different JVMs and configurations can use more efficient strategies + * for obtaining the current call stack. + * + * @see CallStackUtils + * @since 2.4.3 + */ +public interface CallStack { + +/** + * Prints the current stack trace if available to a PrintWriter. The format is undefined and is primarily useful + * for debugging issues with {@link PooledObject} usage in user code. + * + * @param writer a PrintWriter to write the curren stack trace to if available + * @return true if a stack trace was available to print or false if nothing was printed + */ +boolean printStackTrace(final PrintWriter writer); + +/** + * Takes a snapshot of the current call stack. Subsequent calls to {@link #printStackTrace(PrintWriter)} will print + * out that stack trace until it is {@linkplain #clear() cleared}. + */ +void fillInStackTrace(); + +/** + * Clears the current stack trace snapshot. Subsequent calls to {@link #printStackTrace(PrintWriter)} will be + * no-ops until another call to {@link #fillInStackTrace()}. + */ +void clear(); +} http://git-wip-us.apache.org/repos/asf/commons-pool/blob/3994baf0/src/main/java/org/apache/commons/pool2/impl/CallStackUtils.java
[45/50] [abbrv] commons-pool git commit: Follow-up to r1769582 Use the correct units. Thanks to kfujino.
Follow-up to r1769582 Use the correct units. Thanks to kfujino. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1769740 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/505842e0 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/505842e0 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/505842e0 Branch: refs/heads/master Commit: 505842e08d42af70f0c957b78197b90a74c1c6af Parents: b48c9f5 Author: Mark ThomasAuthored: Tue Nov 15 07:18:19 2016 + Committer: Mark Thomas Committed: Tue Nov 15 07:18:19 2016 + -- .../java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/505842e0/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java index 816e0d6..e9aa04e 100644 --- a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java @@ -720,7 +720,7 @@ public abstract class BaseGenericObjectPool extends BaseObject { final void startEvictor(final long delay) { synchronized (evictionLock) { if (null != evictor) { -EvictionTimer.cancel(evictor, evictorShutdownTimeoutMillis, TimeUnit.SECONDS); +EvictionTimer.cancel(evictor, evictorShutdownTimeoutMillis, TimeUnit.MILLISECONDS); evictor = null; evictionIterator = null; }
[41/50] [abbrv] commons-pool git commit: Fix POOL-351 Add a configurable delay (default 10 seconds) to wait when shutting down an Evictor to allow the associated thread time to complete and current ev
Fix POOL-351 Add a configurable delay (default 10 seconds) to wait when shutting down an Evictor to allow the associated thread time to complete and current evictions and to terminate. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1767782 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/4a20cdca Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/4a20cdca Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/4a20cdca Branch: refs/heads/master Commit: 4a20cdca923bd342360f821d7020538e985d9ec2 Parents: b15bc63 Author: Mark ThomasAuthored: Wed Nov 2 20:53:11 2016 + Committer: Mark Thomas Committed: Wed Nov 2 20:53:11 2016 + -- src/changes/changes.xml | 5 + .../pool2/impl/BaseGenericObjectPool.java | 30 +++- .../pool2/impl/BaseObjectPoolConfig.java| 48 ++- .../commons/pool2/impl/EvictionTimer.java | 144 +++ .../pool2/impl/GenericKeyedObjectPool.java | 1 + .../commons/pool2/impl/GenericObjectPool.java | 1 + .../pool2/impl/TestGenericObjectPool.java | 1 + 7 files changed, 132 insertions(+), 98 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/4a20cdca/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 5cca806..dca51b3 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -71,6 +71,11 @@ The type attribute can be add,update,fix,remove. Ensure that any class name used for evictionPolicyClassName represents a class that implements EvictionPolicy. + + Add a configurable delay (default 10 seconds) to wait when shutting down + an Evictor to allow the associated thread time to complete and current + evictions and to terminate. + http://git-wip-us.apache.org/repos/asf/commons-pool/blob/4a20cdca/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java index 8afa8f1..1f46811 100644 --- a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java @@ -25,6 +25,7 @@ import java.util.Arrays; import java.util.Deque; import java.util.Iterator; import java.util.TimerTask; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; import javax.management.InstanceAlreadyExistsException; @@ -87,6 +88,8 @@ public abstract class BaseGenericObjectPool extends BaseObject { private volatile long softMinEvictableIdleTimeMillis = BaseObjectPoolConfig.DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS; private volatile EvictionPolicy evictionPolicy; +private long evictorShutdownTimeoutMillis = +BaseObjectPoolConfig.DEFAULT_EVICTOR_SHUTDOWN_TIMEOUT_MILLIS; // Internal (primarily state) attributes @@ -632,6 +635,31 @@ public abstract class BaseGenericObjectPool extends BaseObject { } } +/** + * Gets the timeout that will be used when waiting for the Evictor to + * shutdown if this pool is closed and it is the only pool still using the + * the value for the Evictor. + * + * @return The timeout in milliseconds that will be used while waiting for + * the Evictor to shut down. + */ +public long getEvictorShutdownTimeoutMillis() { +return evictorShutdownTimeoutMillis; +} + +/** + * Sets the timeout that will be used when waiting for the Evictor to + * shutdown if this pool is closed and it is the only pool still using the + * the value for the Evictor. + * + * @param evictorShutdownTimeoutMillis the timeout in milliseconds that + * will be used while waiting for the + * Evictor to shut down. + */ +public void setEvictorShutdownTimeoutMillis( +final long evictorShutdownTimeoutMillis) { +this.evictorShutdownTimeoutMillis = evictorShutdownTimeoutMillis; +} /** * Closes the pool, destroys the remaining idle objects and, if registered @@ -692,7 +720,7 @@ public abstract class BaseGenericObjectPool extends BaseObject { final void startEvictor(final long delay) { synchronized (evictionLock) { if (null != evictor) { -
[40/50] [abbrv] commons-pool git commit: Keep static classes at the end of the file.
Keep static classes at the end of the file. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1767756 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/b15bc636 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/b15bc636 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/b15bc636 Branch: refs/heads/master Commit: b15bc636bfd12e7f8ea19ebb5fcfae57ab4f1f16 Parents: 108f44a Author: Mark ThomasAuthored: Wed Nov 2 18:29:39 2016 + Committer: Mark Thomas Committed: Wed Nov 2 18:29:39 2016 + -- .../commons/pool2/impl/EvictionTimer.java | 22 +++- 1 file changed, 12 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/b15bc636/src/main/java/org/apache/commons/pool2/impl/EvictionTimer.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/EvictionTimer.java b/src/main/java/org/apache/commons/pool2/impl/EvictionTimer.java index 0d74406..191dc86 100644 --- a/src/main/java/org/apache/commons/pool2/impl/EvictionTimer.java +++ b/src/main/java/org/apache/commons/pool2/impl/EvictionTimer.java @@ -49,6 +49,18 @@ class EvictionTimer { // Hide the default constructor } + +/** + * @since 2.4.3 + */ +@Override +public String toString() { +final StringBuilder builder = new StringBuilder(); +builder.append("EvictionTimer []"); +return builder.toString(); +} + + /** * Add the specified eviction task to the timer. Tasks that are added with a * call to this method *must* call {@link #cancel(TimerTask)} to cancel the @@ -156,14 +168,4 @@ class EvictionTimer { return new Timer("commons-pool-EvictionTimer", true); } } - -/** - * @since 2.4.3 - */ -@Override -public String toString() { -final StringBuilder builder = new StringBuilder(); -builder.append("EvictionTimer []"); -return builder.toString(); -} }
[26/50] [abbrv] commons-pool git commit: Small refactoring of borrowObject() to reduce code duplication.
Small refactoring of borrowObject() to reduce code duplication. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1735162 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/564334a3 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/564334a3 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/564334a3 Branch: refs/heads/master Commit: 564334a3b2a0c9716c7ada87b9bd790fb44f747e Parents: fa819eb Author: Mark ThomasAuthored: Tue Mar 15 20:27:16 2016 + Committer: Mark Thomas Committed: Tue Mar 15 20:27:16 2016 + -- src/changes/changes.xml | 3 ++ .../pool2/impl/GenericKeyedObjectPool.java | 30 +++- .../commons/pool2/impl/GenericObjectPool.java | 30 +++- 3 files changed, 23 insertions(+), 40 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/564334a3/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index a1293f7..30573e4 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -56,6 +56,9 @@ The type attribute can be add,update,fix,remove. threads try to borrow an object at the same time and the factory fails to create any objects. + + Small refactoring of borrowObject() to reduce code duplication. + http://git-wip-us.apache.org/repos/asf/commons-pool/blob/564334a3/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java index 697ae05..8e1f88f 100644 --- a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java @@ -350,14 +350,14 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool try { while (p == null) { create = false; -if (blockWhenExhausted) { -p = objectDeque.getIdleObjects().pollFirst(); -if (p == null) { -p = create(key); -if (p != null) { -create = true; -} +p = objectDeque.getIdleObjects().pollFirst(); +if (p == null) { +p = create(key); +if (p != null) { +create = true; } +} +if (blockWhenExhausted) { if (p == null) { if (borrowMaxWaitMillis < 0) { p = objectDeque.getIdleObjects().takeFirst(); @@ -370,23 +370,13 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool throw new NoSuchElementException( "Timeout waiting for idle object"); } -if (!p.allocate()) { -p = null; -} } else { -p = objectDeque.getIdleObjects().pollFirst(); -if (p == null) { -p = create(key); -if (p != null) { -create = true; -} -} if (p == null) { throw new NoSuchElementException("Pool exhausted"); } -if (!p.allocate()) { -p = null; -} +} +if (!p.allocate()) { +p = null; } if (p != null) { http://git-wip-us.apache.org/repos/asf/commons-pool/blob/564334a3/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java index b5ef9bd..7a3ee80 100644 --- a/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java @@ -428,14 +428,14 @@ public class GenericObjectPool extends BaseGenericObjectPool while (p == null) { create = false; -if (blockWhenExhausted) { -p =
[44/50] [abbrv] commons-pool git commit: Additional fix for POOL-315. Thanks to Keiichi Fujino Also review previous fix.
Additional fix for POOL-315. Thanks to Keiichi Fujino Also review previous fix. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1769582 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/b48c9f52 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/b48c9f52 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/b48c9f52 Branch: refs/heads/master Commit: b48c9f52be991f280bff592dd49c1fd0de2b080a Parents: 741d1f5 Author: Mark ThomasAuthored: Mon Nov 14 09:44:18 2016 + Committer: Mark Thomas Committed: Mon Nov 14 09:44:18 2016 + -- src/changes/changes.xml | 2 +- .../org/apache/commons/pool2/impl/BaseGenericObjectPool.java | 8 2 files changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/b48c9f52/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index ae14e69..545e1b7 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -71,7 +71,7 @@ The type attribute can be add,update,fix,remove. Ensure that any class name used for evictionPolicyClassName represents a class that implements EvictionPolicy. - + Add a configurable delay (default 10 seconds) to wait when shutting down an Evictor to allow the associated thread time to complete and current evictions and to terminate. http://git-wip-us.apache.org/repos/asf/commons-pool/blob/b48c9f52/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java index 1f46811..816e0d6 100644 --- a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java @@ -88,7 +88,7 @@ public abstract class BaseGenericObjectPool extends BaseObject { private volatile long softMinEvictableIdleTimeMillis = BaseObjectPoolConfig.DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS; private volatile EvictionPolicy evictionPolicy; -private long evictorShutdownTimeoutMillis = +private volatile long evictorShutdownTimeoutMillis = BaseObjectPoolConfig.DEFAULT_EVICTOR_SHUTDOWN_TIMEOUT_MILLIS; @@ -643,7 +643,7 @@ public abstract class BaseGenericObjectPool extends BaseObject { * @return The timeout in milliseconds that will be used while waiting for * the Evictor to shut down. */ -public long getEvictorShutdownTimeoutMillis() { +public final long getEvictorShutdownTimeoutMillis() { return evictorShutdownTimeoutMillis; } @@ -656,7 +656,7 @@ public abstract class BaseGenericObjectPool extends BaseObject { * will be used while waiting for the * Evictor to shut down. */ -public void setEvictorShutdownTimeoutMillis( +public final void setEvictorShutdownTimeoutMillis( final long evictorShutdownTimeoutMillis) { this.evictorShutdownTimeoutMillis = evictorShutdownTimeoutMillis; } @@ -720,7 +720,7 @@ public abstract class BaseGenericObjectPool extends BaseObject { final void startEvictor(final long delay) { synchronized (evictionLock) { if (null != evictor) { -EvictionTimer.cancel(evictor, 10, TimeUnit.SECONDS); +EvictionTimer.cancel(evictor, evictorShutdownTimeoutMillis, TimeUnit.SECONDS); evictor = null; evictionIterator = null; }
[46/50] [abbrv] commons-pool git commit: Add starter TravisCI configuration. Will pick up Travis profile from new parent module when released.
Add starter TravisCI configuration. Will pick up Travis profile from new parent module when released. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1770094 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/fe494538 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/fe494538 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/fe494538 Branch: refs/heads/master Commit: fe4945387e2fbc9ba2a9ac4eb7c1fa1d50f40310 Parents: 505842e Author: Gary D. GregoryAuthored: Thu Nov 17 00:02:16 2016 + Committer: Gary D. Gregory Committed: Thu Nov 17 00:02:16 2016 + -- .travis.yml | 24 ++ .../java/org/apache/commons/pool2/PoolTest.java | 80 2 files changed, 104 insertions(+) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/fe494538/.travis.yml -- diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000..fc2a03a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,24 @@ +# 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. + +language: java +sudo: false + +jdk: + - openjdk7 + - oraclejdk8 + +after_success: + - mvn clean cobertura:cobertura coveralls:report http://git-wip-us.apache.org/repos/asf/commons-pool/blob/fe494538/src/test/java/org/apache/commons/pool2/PoolTest.java -- diff --git a/src/test/java/org/apache/commons/pool2/PoolTest.java b/src/test/java/org/apache/commons/pool2/PoolTest.java new file mode 100644 index 000..e22e70b --- /dev/null +++ b/src/test/java/org/apache/commons/pool2/PoolTest.java @@ -0,0 +1,80 @@ +package org.apache.commons.pool2; + +import static org.junit.Assert.assertFalse; + +import org.apache.commons.pool2.impl.DefaultPooledObject; +import org.apache.commons.pool2.impl.GenericObjectPool; +import org.apache.commons.pool2.impl.GenericObjectPoolConfig; +import org.junit.Ignore; +import org.junit.Test; + +@Ignore +public class PoolTest { +private static final CharSequence COMMONS_POOL_EVICTIONS_TIMER_THREAD_NAME = "commons-pool-EvictionTimer"; +private static final long EVICTION_PERIOD_IN_MILLIS = 100; + +private static class Foo { +} + +private static class PooledFooFactory implements PooledObjectFactory { +private static final long VALIDATION_WAIT_IN_MILLIS = 1000; + +@Override +public PooledObject makeObject() throws Exception { +return new DefaultPooledObject(new Foo()); +} + +@Override +public void destroyObject(PooledObject pooledObject) throws Exception { +} + +@Override +public boolean validateObject(PooledObject pooledObject) { +try { +Thread.sleep(VALIDATION_WAIT_IN_MILLIS); +} catch (final InterruptedException e) { +Thread.interrupted(); +} +return false; +} + +@Override +public void activateObject(PooledObject pooledObject) throws Exception { +} + +@Override +public void passivateObject(PooledObject pooledObject) throws Exception { +} +} + +@Test +public void testPool() throws Exception { +final GenericObjectPoolConfig poolConfig = new GenericObjectPoolConfig(); +poolConfig.setTestWhileIdle(true /* testWhileIdle */); +final PooledFooFactory pooledFooFactory = new PooledFooFactory(); +GenericObjectPool pool = null; +try { +pool = new GenericObjectPool(pooledFooFactory, poolConfig); +pool.setTimeBetweenEvictionRunsMillis(EVICTION_PERIOD_IN_MILLIS); +pool.addObject(); +try { +Thread.sleep(EVICTION_PERIOD_IN_MILLIS); +} catch (final InterruptedException e) { +Thread.interrupted(); +} +
[22/50] [abbrv] commons-pool git commit: [POOL-309] Fix misspellings from "destory" to "destroy". interupt -> interrupt
[POOL-309] Fix misspellings from "destory" to "destroy". interupt -> interrupt git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1733562 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/cd3f495f Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/cd3f495f Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/cd3f495f Branch: refs/heads/master Commit: cd3f495f13f535c2e5b413d8988e34d53f617dff Parents: 29cc202 Author: Gary D. GregoryAuthored: Fri Mar 4 06:42:32 2016 + Committer: Gary D. Gregory Committed: Fri Mar 4 06:42:32 2016 + -- src/changes/changes.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/cd3f495f/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 2503b03..f5d27d4 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -44,7 +44,7 @@ The type attribute can be add,update,fix,remove. - + Fix misspellings from "destory" to "destroy".
[48/50] [abbrv] commons-pool git commit: Update commons-parent from 40 to 42.
Update commons-parent from 40 to 42. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1778232 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/6a088d1b Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/6a088d1b Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/6a088d1b Branch: refs/heads/master Commit: 6a088d1b8a4aa343362cdf4e749b7c5fca38971b Parents: 2561938 Author: Gary D. GregoryAuthored: Wed Jan 11 04:04:54 2017 + Committer: Gary D. Gregory Committed: Wed Jan 11 04:04:54 2017 + -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/6a088d1b/pom.xml -- diff --git a/pom.xml b/pom.xml index a7e0b45..e54fd08 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ org.apache.commons commons-parent -40 +42 4.0.0 commons-pool2
[28/50] [abbrv] commons-pool git commit: Simplify code a little
Simplify code a little git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1735259 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/9c75d18b Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/9c75d18b Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/9c75d18b Branch: refs/heads/master Commit: 9c75d18b8ca0c34d9a193e93b6ec435bb788c326 Parents: db15a29 Author: Mark ThomasAuthored: Wed Mar 16 16:35:26 2016 + Committer: Mark Thomas Committed: Wed Mar 16 16:35:26 2016 + -- .../apache/commons/pool2/impl/GenericKeyedObjectPool.java| 8 +--- .../org/apache/commons/pool2/impl/GenericObjectPool.java | 8 +--- 2 files changed, 10 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/9c75d18b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java index 20281ee..82987da 100644 --- a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java @@ -993,7 +993,10 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool * @throws Exception If the objection creation fails */ private PooledObject create(final K key) throws Exception { -final int maxTotalPerKeySave = getMaxTotalPerKey(); // Per key +int maxTotalPerKeySave = getMaxTotalPerKey(); // Per key +if (maxTotalPerKeySave < 0) { +maxTotalPerKeySave = Integer.MAX_VALUE; +} final int maxTotal = getMaxTotal(); // All keys final ObjectDeque objectDeque = poolMap.get(key); @@ -1020,8 +1023,7 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool final long newCreateCount = objectDeque.getCreateCount().incrementAndGet(); // Check against the per key limit -if (maxTotalPerKeySave > -1 && newCreateCount > maxTotalPerKeySave || -newCreateCount > Integer.MAX_VALUE) { +if (newCreateCount > maxTotalPerKeySave) { numTotal.decrementAndGet(); objectDeque.getCreateCount().decrementAndGet(); // POOL-303. There may be threads waiting on an object return that http://git-wip-us.apache.org/repos/asf/commons-pool/blob/9c75d18b/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java index 7a3ee80..2aadb43 100644 --- a/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java @@ -841,10 +841,12 @@ public class GenericObjectPool extends BaseGenericObjectPool * @throws Exception if the object factory's {@code makeObject} fails */ private PooledObject create() throws Exception { -final int localMaxTotal = getMaxTotal(); +int localMaxTotal = getMaxTotal(); +if (localMaxTotal < 0) { +localMaxTotal = Integer.MAX_VALUE; +} final long newCreateCount = createCount.incrementAndGet(); -if (localMaxTotal > -1 && newCreateCount > localMaxTotal || -newCreateCount > Integer.MAX_VALUE) { +if (newCreateCount > localMaxTotal) { createCount.decrementAndGet(); // POOL-303. There may be threads waiting on an object return that // isn't going to happen. Unblock them.
[47/50] [abbrv] commons-pool git commit: [POOL-317] Correction of default value of softMinEvictableIdleTimeMillis in BaseObjectPoolConfig.
[POOL-317] Correction of default value of softMinEvictableIdleTimeMillis in BaseObjectPoolConfig. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1771859 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/25619386 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/25619386 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/25619386 Branch: refs/heads/master Commit: 2561938620ae49ad7911d7fbaf0df3f151bdaca6 Parents: fe49453 Author: Gary D. GregoryAuthored: Tue Nov 29 08:47:07 2016 + Committer: Gary D. Gregory Committed: Tue Nov 29 08:47:07 2016 + -- src/changes/changes.xml | 3 +++ .../java/org/apache/commons/pool2/impl/BaseObjectPoolConfig.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/25619386/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 545e1b7..fb3a878 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -44,6 +44,9 @@ The type attribute can be add,update,fix,remove. + + Correction of default value of softMinEvictableIdleTimeMillis in BaseObjectPoolConfig. + Fix misspellings from "destory" to "destroy". http://git-wip-us.apache.org/repos/asf/commons-pool/blob/25619386/src/main/java/org/apache/commons/pool2/impl/BaseObjectPoolConfig.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/BaseObjectPoolConfig.java b/src/main/java/org/apache/commons/pool2/impl/BaseObjectPoolConfig.java index d635227..dc82784 100644 --- a/src/main/java/org/apache/commons/pool2/impl/BaseObjectPoolConfig.java +++ b/src/main/java/org/apache/commons/pool2/impl/BaseObjectPoolConfig.java @@ -178,7 +178,7 @@ public abstract class BaseObjectPoolConfig extends BaseObject implements Cloneab DEFAULT_EVICTOR_SHUTDOWN_TIMEOUT_MILLIS; private long softMinEvictableIdleTimeMillis = -DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS; +DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS; private int numTestsPerEvictionRun = DEFAULT_NUM_TESTS_PER_EVICTION_RUN;
[18/50] [abbrv] commons-pool git commit: Add final modifier to method parameters.
Add final modifier to method parameters. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1729268 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/844cbd26 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/844cbd26 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/844cbd26 Branch: refs/heads/master Commit: 844cbd2620b44f6264d39aa46e456add495d71d7 Parents: 5fe7dc0 Author: Gary D. GregoryAuthored: Mon Feb 8 21:47:12 2016 + Committer: Gary D. Gregory Committed: Mon Feb 8 21:47:12 2016 + -- .../pool2/BaseKeyedPooledObjectFactory.java | 10 +- .../org/apache/commons/pool2/BaseObject.java| 2 +- .../apache/commons/pool2/BaseObjectPool.java| 2 +- .../commons/pool2/BasePooledObjectFactory.java | 8 +- .../org/apache/commons/pool2/PoolUtils.java | 2 +- .../commons/pool2/impl/AbandonedConfig.java | 12 +- .../pool2/impl/BaseGenericObjectPool.java | 56 - .../pool2/impl/BaseObjectPoolConfig.java| 34 +++--- .../pool2/impl/DefaultEvictionPolicy.java | 4 +- .../commons/pool2/impl/DefaultPooledObject.java | 10 +- .../pool2/impl/DefaultPooledObjectInfo.java | 2 +- .../commons/pool2/impl/EvictionConfig.java | 4 +- .../commons/pool2/impl/EvictionTimer.java | 6 +- .../pool2/impl/GenericKeyedObjectPool.java | 50 .../impl/GenericKeyedObjectPoolConfig.java | 10 +- .../commons/pool2/impl/GenericObjectPool.java | 36 +++--- .../pool2/impl/GenericObjectPoolConfig.java | 8 +- .../pool2/impl/InterruptibleReentrantLock.java | 4 +- .../commons/pool2/impl/LinkedBlockingDeque.java | 68 +-- .../commons/pool2/impl/PoolImplUtils.java | 8 +- .../commons/pool2/impl/PooledSoftReference.java | 4 +- .../pool2/impl/SoftReferenceObjectPool.java | 14 +-- .../commons/pool2/proxy/BaseProxyHandler.java | 4 +- .../commons/pool2/proxy/CglibProxyHandler.java | 6 +- .../commons/pool2/proxy/CglibProxySource.java | 6 +- .../commons/pool2/proxy/JdkProxyHandler.java| 4 +- .../commons/pool2/proxy/JdkProxySource.java | 6 +- .../pool2/proxy/ProxiedKeyedObjectPool.java | 18 +-- .../commons/pool2/proxy/ProxiedObjectPool.java | 6 +- .../org/apache/commons/pool2/MethodCall.java| 2 +- .../TestBaseKeyedPoolableObjectFactory.java | 4 +- .../commons/pool2/TestBaseObjectPool.java | 6 +- .../pool2/TestBasePoolableObjectFactory.java| 2 +- .../commons/pool2/TestKeyedObjectPool.java | 12 +- .../apache/commons/pool2/TestObjectPool.java| 2 +- .../org/apache/commons/pool2/TestPoolUtils.java | 12 +- .../org/apache/commons/pool2/VisitTracker.java | 6 +- .../commons/pool2/VisitTrackerFactory.java | 18 +-- .../java/org/apache/commons/pool2/Waiter.java | 10 +- .../org/apache/commons/pool2/WaiterFactory.java | 40 +++ .../pool2/impl/TestAbandonedObjectPool.java | 20 ++-- .../pool2/impl/TestGenericKeyedObjectPool.java | 88 +++--- .../pool2/impl/TestGenericObjectPool.java | 116 +-- .../impl/TestGenericObjectPoolClassLoaders.java | 8 +- .../commons/pool2/impl/TestPoolImplUtils.java | 4 +- .../pool2/impl/TestSoftRefOutOfMemory.java | 14 +-- .../pool2/impl/TestSoftReferenceObjectPool.java | 6 +- .../pool2/performance/PerformanceTest.java | 6 +- .../performance/SleepingObjectFactory.java | 14 +-- .../proxy/BaseTestProxiedKeyedObjectPool.java | 6 +- .../pool2/proxy/BaseTestProxiedObjectPool.java | 4 +- 51 files changed, 402 insertions(+), 402 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/844cbd26/src/main/java/org/apache/commons/pool2/BaseKeyedPooledObjectFactory.java -- diff --git a/src/main/java/org/apache/commons/pool2/BaseKeyedPooledObjectFactory.java b/src/main/java/org/apache/commons/pool2/BaseKeyedPooledObjectFactory.java index 850a219..2f9edf9 100644 --- a/src/main/java/org/apache/commons/pool2/BaseKeyedPooledObjectFactory.java +++ b/src/main/java/org/apache/commons/pool2/BaseKeyedPooledObjectFactory.java @@ -58,7 +58,7 @@ public abstract class BaseKeyedPooledObjectFactory extends BaseObject public abstract PooledObject wrap(V value); @Override -public PooledObject makeObject(K key) throws Exception { +public PooledObject makeObject(final K key) throws Exception { return wrap(create(key)); } @@ -71,7 +71,7 @@ public abstract class BaseKeyedPooledObjectFactory extends BaseObject * @param p a {@code PooledObject} wrapping the the
[15/50] [abbrv] commons-pool git commit: Add final modifier to local variables.
http://git-wip-us.apache.org/repos/asf/commons-pool/blob/5fe7dc02/src/main/java/org/apache/commons/pool2/impl/PoolImplUtils.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/PoolImplUtils.java b/src/main/java/org/apache/commons/pool2/impl/PoolImplUtils.java index dc14e07..06a3984 100644 --- a/src/main/java/org/apache/commons/pool2/impl/PoolImplUtils.java +++ b/src/main/java/org/apache/commons/pool2/impl/PoolImplUtils.java @@ -58,11 +58,11 @@ class PoolImplUtils { // Look to see if this class implements the generic interface // Get all the interfaces -Type[] interfaces = clazz.getGenericInterfaces(); -for (Type iface : interfaces) { +final Type[] interfaces = clazz.getGenericInterfaces(); +for (final Type iface : interfaces) { // Only need to check interfaces that use generics if (iface instanceof ParameterizedType) { -ParameterizedType pi = (ParameterizedType) iface; +final ParameterizedType pi = (ParameterizedType) iface; // Look for the generic interface if (pi.getRawType() instanceof Class) { if (type.isAssignableFrom((Class) pi.getRawType())) { @@ -75,10 +75,11 @@ class PoolImplUtils { // Interface not found on this class. Look at the superclass. @SuppressWarnings("unchecked") +final Class superClazz = (Class) clazz.getSuperclass(); -Object result = getGenericType(type, superClazz); +final Object result = getGenericType(type, superClazz); if (result instanceof Class) { // Superclass implements interface and defines explicit type for // generic @@ -87,7 +88,7 @@ class PoolImplUtils { // Superclass implements interface and defines unknown type for // generic // Map that unknown type to the generic types defined in this class -ParameterizedType superClassType = +final ParameterizedType superClassType = (ParameterizedType) clazz.getGenericSuperclass(); return getTypeParameter(clazz, superClassType.getActualTypeArguments()[ @@ -114,7 +115,7 @@ class PoolImplUtils { if (argType instanceof Class) { return argType; } -TypeVariable[] tvs = clazz.getTypeParameters(); +final TypeVariable[] tvs = clazz.getTypeParameters(); for (int i = 0; i < tvs.length; i++) { if (tvs[i].equals(argType)) { return Integer.valueOf(i); http://git-wip-us.apache.org/repos/asf/commons-pool/blob/5fe7dc02/src/main/java/org/apache/commons/pool2/impl/PooledSoftReference.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/PooledSoftReference.java b/src/main/java/org/apache/commons/pool2/impl/PooledSoftReference.java index 104bc56..15d385f 100644 --- a/src/main/java/org/apache/commons/pool2/impl/PooledSoftReference.java +++ b/src/main/java/org/apache/commons/pool2/impl/PooledSoftReference.java @@ -63,7 +63,7 @@ public class PooledSoftReference extends DefaultPooledObject { */ @Override public String toString() { -StringBuilder result = new StringBuilder(); +final StringBuilder result = new StringBuilder(); result.append("Referenced Object: "); result.append(getObject().toString()); result.append(", State: "); http://git-wip-us.apache.org/repos/asf/commons-pool/blob/5fe7dc02/src/main/java/org/apache/commons/pool2/impl/SoftReferenceObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/SoftReferenceObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/SoftReferenceObjectPool.java index 3c1c54a..fd4f38a 100644 --- a/src/main/java/org/apache/commons/pool2/impl/SoftReferenceObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/SoftReferenceObjectPool.java @@ -146,11 +146,11 @@ public class SoftReferenceObjectPool extends BaseObjectPool { if (!factory.validateObject(ref)) { throw new Exception("ValidateObject failed"); } -} catch (Throwable t) { +} catch (final Throwable t) { PoolUtils.checkRethrow(t); try { destroy(ref); -} catch (Throwable t2) { +} catch (final Throwable t2) { PoolUtils.checkRethrow(t2); // Swallowed } finally { @@ -202,13 +202,13 @@ public class SoftReferenceObjectPool extends BaseObjectPool { } else { try {
[43/50] [abbrv] commons-pool git commit: Simplify
Simplify git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1767832 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/741d1f5c Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/741d1f5c Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/741d1f5c Branch: refs/heads/master Commit: 741d1f5c6d3cbfbf232d604d7c8fb9809b5449e7 Parents: ed91f49 Author: Mark ThomasAuthored: Thu Nov 3 08:09:38 2016 + Committer: Mark Thomas Committed: Thu Nov 3 08:09:38 2016 + -- src/main/java/org/apache/commons/pool2/impl/EvictionTimer.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/741d1f5c/src/main/java/org/apache/commons/pool2/impl/EvictionTimer.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/EvictionTimer.java b/src/main/java/org/apache/commons/pool2/impl/EvictionTimer.java index b448141..4b20a45 100644 --- a/src/main/java/org/apache/commons/pool2/impl/EvictionTimer.java +++ b/src/main/java/org/apache/commons/pool2/impl/EvictionTimer.java @@ -110,8 +110,7 @@ class EvictionTimer { @Override public Thread newThread(final Runnable r) { -final Thread t = new Thread(null, r, "commons-pool-evictor-thrreads"); -t.setName("commons-pool-evictor"); +final Thread t = new Thread(null, r, "commons-pool-evictor-thread"); AccessController.doPrivileged(new PrivilegedAction() { @Override
[29/50] [abbrv] commons-pool git commit: Partial fix for regression in fix for POOL-303. Remove interrupt calls where they can't help.
Partial fix for regression in fix for POOL-303. Remove interrupt calls where they can't help. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1735260 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/170a5097 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/170a5097 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/170a5097 Branch: refs/heads/master Commit: 170a5097d7840299a1564b82f4a47c613d94663b Parents: 9c75d18 Author: Mark ThomasAuthored: Wed Mar 16 16:37:02 2016 + Committer: Mark Thomas Committed: Wed Mar 16 16:37:02 2016 + -- .../org/apache/commons/pool2/impl/GenericKeyedObjectPool.java | 6 -- .../java/org/apache/commons/pool2/impl/GenericObjectPool.java | 3 --- 2 files changed, 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/170a5097/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java index 82987da..dcfe448 100644 --- a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java @@ -1009,9 +1009,6 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool if (maxTotal > -1 && newNumTotal > maxTotal) { numTotal.decrementAndGet(); if (getNumIdle() == 0) { -// POOL-303. There may be threads waiting on an object -// return that isn't going to happen. Unblock them. -objectDeque.idleObjects.interuptTakeWaiters(); return null; } clearOldest(); @@ -1026,9 +1023,6 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool if (newCreateCount > maxTotalPerKeySave) { numTotal.decrementAndGet(); objectDeque.getCreateCount().decrementAndGet(); -// POOL-303. There may be threads waiting on an object return that -// isn't going to happen. Unblock them. -objectDeque.idleObjects.interuptTakeWaiters(); return null; } http://git-wip-us.apache.org/repos/asf/commons-pool/blob/170a5097/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java index 2aadb43..0e0c9bd 100644 --- a/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java @@ -848,9 +848,6 @@ public class GenericObjectPool extends BaseGenericObjectPool final long newCreateCount = createCount.incrementAndGet(); if (newCreateCount > localMaxTotal) { createCount.decrementAndGet(); -// POOL-303. There may be threads waiting on an object return that -// isn't going to happen. Unblock them. -idleObjects.interuptTakeWaiters(); return null; }
[36/50] [abbrv] commons-pool git commit: commons-parent 39 -> 40.
commons-parent 39 -> 40. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1743106 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/bdab334c Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/bdab334c Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/bdab334c Branch: refs/heads/master Commit: bdab334cada9918eccc0a1ce4771338ae51a9f69 Parents: a04dac6 Author: Gary D. GregoryAuthored: Tue May 10 07:07:54 2016 + Committer: Gary D. Gregory Committed: Tue May 10 07:07:54 2016 + -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/bdab334c/pom.xml -- diff --git a/pom.xml b/pom.xml index 7aca347..a7e0b45 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ org.apache.commons commons-parent -39 +40 4.0.0 commons-pool2
[11/50] [abbrv] commons-pool git commit: Set svn:eol-style = native on Java files. No functional change.
Set svn:eol-style = native on Java files. No functional change. Noted when running checks on the copy of Apache Commons Pool in Apache Tomcat. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1725959 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/458f5e52 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/458f5e52 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/458f5e52 Branch: refs/heads/master Commit: 458f5e5231366ba94beeefa5030a153ec6590bf1 Parents: 3737d6e Author: Konstantin KolinkoAuthored: Thu Jan 21 14:22:28 2016 + Committer: Konstantin Kolinko Committed: Thu Jan 21 14:22:28 2016 + -- .../org/apache/commons/pool2/BaseObject.java| 80 ++-- 1 file changed, 40 insertions(+), 40 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/458f5e52/src/main/java/org/apache/commons/pool2/BaseObject.java -- diff --git a/src/main/java/org/apache/commons/pool2/BaseObject.java b/src/main/java/org/apache/commons/pool2/BaseObject.java index 1215430..019b678 100644 --- a/src/main/java/org/apache/commons/pool2/BaseObject.java +++ b/src/main/java/org/apache/commons/pool2/BaseObject.java @@ -1,40 +1,40 @@ -/* - * 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.pool2; - -/** - * A base class for common functionality. - * - * @since 2.4.3 - */ -public abstract class BaseObject { - -@Override -public String toString() { -StringBuilder builder = new StringBuilder(); -builder.append(getClass().getSimpleName()); -builder.append(" ["); -toStringAppendFields(builder); -builder.append("]"); -return builder.toString(); -} - -protected void toStringAppendFields(StringBuilder builder) { -// do nothing by default, needed for b/w compatibility. -} - -} +/* + * 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.pool2; + +/** + * A base class for common functionality. + * + * @since 2.4.3 + */ +public abstract class BaseObject { + +@Override +public String toString() { +StringBuilder builder = new StringBuilder(); +builder.append(getClass().getSimpleName()); +builder.append(" ["); +toStringAppendFields(builder); +builder.append("]"); +return builder.toString(); +} + +protected void toStringAppendFields(StringBuilder builder) { +// do nothing by default, needed for b/w compatibility. +} + +}
[37/50] [abbrv] commons-pool git commit: Format: add a blank line between methods.
Format: add a blank line between methods. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1765924 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/8cc1fa06 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/8cc1fa06 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/8cc1fa06 Branch: refs/heads/master Commit: 8cc1fa06c74e9262e5b1e676abcede026559677b Parents: bdab334 Author: Gary D. GregoryAuthored: Fri Oct 21 06:12:33 2016 + Committer: Gary D. Gregory Committed: Fri Oct 21 06:12:33 2016 + -- .../commons/pool2/VisitTrackerFactory.java | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/8cc1fa06/src/test/java/org/apache/commons/pool2/VisitTrackerFactory.java -- diff --git a/src/test/java/org/apache/commons/pool2/VisitTrackerFactory.java b/src/test/java/org/apache/commons/pool2/VisitTrackerFactory.java index f341dea..155613c 100644 --- a/src/test/java/org/apache/commons/pool2/VisitTrackerFactory.java +++ b/src/test/java/org/apache/commons/pool2/VisitTrackerFactory.java @@ -22,56 +22,67 @@ import org.apache.commons.pool2.PooledObjectFactory; import org.apache.commons.pool2.impl.DefaultPooledObject; /** - * Factory that creates VisitTracker instances. Used to - * test Evictor runs. + * Factory that creates VisitTracker instances. Used to test Evictor runs. * */ -public class VisitTrackerFactory implements PooledObjectFactory , -KeyedPooledObjectFactory { +public class VisitTrackerFactory +implements PooledObjectFactory , KeyedPooledObjectFactory { private int nextId = 0; + public VisitTrackerFactory() { super(); } + @Override public PooledObject makeObject() { return new DefaultPooledObject (new VisitTracker(nextId++)); } + @Override public PooledObject makeObject(final K key) { return new DefaultPooledObject (new VisitTracker(nextId++, key)); } + @Override public void destroyObject(final PooledObject ref) { ref.getObject().destroy(); } + @Override public void destroyObject(final K key, final PooledObject ref) { ref.getObject().destroy(); } + @Override public boolean validateObject(final PooledObject ref) { return ref.getObject().validate(); } + @Override public boolean validateObject(final K key, final PooledObject ref) { return ref.getObject().validate(); } + @Override public void activateObject(final PooledObject ref) throws Exception { ref.getObject().activate(); } + @Override public void activateObject(final K key, final PooledObject ref) throws Exception { ref.getObject().activate(); } + @Override public void passivateObject(final PooledObject ref) throws Exception { ref.getObject().passivate(); } + @Override public void passivateObject(final K key, final PooledObject ref) throws Exception { ref.getObject().passivate(); } + public void resetId() { nextId = 0; }
[31/50] [abbrv] commons-pool git commit: Confirm that POOL-310 is invalid.
Confirm that POOL-310 is invalid. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1735291 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/55c10ec2 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/55c10ec2 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/55c10ec2 Branch: refs/heads/master Commit: 55c10ec248933da2e2e8dd3dc8e9bad0811810c0 Parents: a4c544a Author: Mark ThomasAuthored: Wed Mar 16 20:19:53 2016 + Committer: Mark Thomas Committed: Wed Mar 16 20:19:53 2016 + -- .../pool2/impl/TestGenericKeyedObjectPool.java | 80 +++- 1 file changed, 61 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/55c10ec2/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java -- diff --git a/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java b/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java index 4777e55..5e8ea4a 100644 --- a/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java +++ b/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java @@ -416,8 +416,8 @@ public class TestGenericKeyedObjectPool extends TestKeyedObjectPool { assertFalse(pool.getBlockWhenExhausted()); } } - -/** + +/** * JIRA: POOL-270 - make sure constructor correctly sets run * frequency of evictor timer. */ @@ -437,7 +437,7 @@ public class TestGenericKeyedObjectPool extends TestKeyedObjectPool { assertEquals(0, p.getNumIdle("one")); p.close(); } - + @Test(timeout=6) public void testEviction() throws Exception { @@ -2141,13 +2141,13 @@ public class TestGenericKeyedObjectPool extends TestKeyedObjectPool { factory.exceptionOnCreate = false; pool.borrowObject("One"); } - + /** * JIRA: POOL-287 - * + * * Verify that when an attempt is made to borrow an instance from the pool * while the evictor is visiting it, there is no capacity leak. - * + * * Test creates the scenario described in POOL-287. */ @Test @@ -2161,15 +2161,15 @@ public class TestGenericKeyedObjectPool extends TestKeyedObjectPool { pool.setMaxTotalPerKey(2); pool.setNumTestsPerEvictionRun(1); pool.setTimeBetweenEvictionRunsMillis(500); - + // Load pool with two objects pool.addObject("one"); // call this o1 pool.addObject("one"); // call this o2 // Default is LIFO, so "one" pool is now [o2, o1] in offer order. // Evictor will visit in oldest-to-youngest order, so o1 then o2 - + Thread.sleep(800); // Wait for first eviction run to complete - + // At this point, one eviction run should have completed, visiting o1 // and eviction cursor should be pointed at o2, which is the next offered instance Thread.sleep(250); // Wait for evictor to start @@ -2179,11 +2179,11 @@ public class TestGenericKeyedObjectPool extends TestKeyedObjectPool { pool.returnObject("one", o2); pool.close(); } - + /** * Verifies that when a factory's makeObject produces instances that are not - * discernible by equals, the pool can handle them. - * + * discernible by equals, the pool can handle them. + * * JIRA: POOL-283 */ @Test @@ -2198,11 +2198,11 @@ public class TestGenericKeyedObjectPool extends TestKeyedObjectPool { pool.returnObject("a", s2); pool.close(); } - + /** * Verifies that when a borrowed object is mutated in a way that does not * preserve equality and hashcode, the pool can recognized it on return. - * + * * JIRA: POOL-284 */ @Test @@ -2219,11 +2219,11 @@ public class TestGenericKeyedObjectPool extends TestKeyedObjectPool { pool.returnObject("a", s2); pool.close(); } - + /** * Verifies that returning an object twice (without borrow in between) causes ISE * but does not re-validate or re-passivate the instance. - * + * * JIRA: POOL-285 */ @Test @@ -2246,6 +2246,48 @@ public class TestGenericKeyedObjectPool extends TestKeyedObjectPool { } } +/** + * Verifies that if a borrow of a new key is blocked because maxTotal has + * been reached, that that borrow continues once another object is returned. + * + * JIRA: POOL-310 + */ +
[12/50] [abbrv] commons-pool git commit: Removed self from developers.
Removed self from developers. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1728845 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/4a7f18bc Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/4a7f18bc Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/4a7f18bc Branch: refs/heads/master Commit: 4a7f18bc2b7733bdbd65d570d3631a414291770a Parents: 458f5e5 Author: Phil SteitzAuthored: Sat Feb 6 15:04:31 2016 + Committer: Phil Steitz Committed: Sat Feb 6 15:04:31 2016 + -- pom.xml | 6 -- 1 file changed, 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/4a7f18bc/pom.xml -- diff --git a/pom.xml b/pom.xml index 72de719..10d9803 100644 --- a/pom.xml +++ b/pom.xml @@ -95,12 +95,6 @@ The Apache Software Foundation - Phil Steitz - psteitz - - The Apache Software Foundation - - Simone Tripodi simonetripodi The Apache Software Foundation
[14/50] [abbrv] commons-pool git commit: Add final modifier to local variables.
http://git-wip-us.apache.org/repos/asf/commons-pool/blob/5fe7dc02/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java -- diff --git a/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java b/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java index de7cfc7..9305783 100644 --- a/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java +++ b/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java @@ -69,9 +69,9 @@ public class TestGenericKeyedObjectPool extends TestKeyedObjectPool { @Override protected KeyedObjectPool
[08/50] [abbrv] commons-pool git commit: Update copyright for 2016 in NOTICE.txt
Update copyright for 2016 in NOTICE.txt git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1725441 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/ccbbb32e Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/ccbbb32e Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/ccbbb32e Branch: refs/heads/master Commit: ccbbb32edfa9ed6c8af4eee3f041ab3111d22742 Parents: 6425322 Author: Gary D. GregoryAuthored: Tue Jan 19 06:21:14 2016 + Committer: Gary D. Gregory Committed: Tue Jan 19 06:21:14 2016 + -- NOTICE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/ccbbb32e/NOTICE.txt -- diff --git a/NOTICE.txt b/NOTICE.txt index db24c60..9db1cca 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -1,5 +1,5 @@ Apache Commons Pool -Copyright 2001-2015 The Apache Software Foundation +Copyright 2001-2016 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/).
[25/50] [abbrv] commons-pool git commit: POOL-303 Ensure that threads do not block indefinitely if more than maxTotal threads try to borrow an object at the same time and the factory fails to create a
POOL-303 Ensure that threads do not block indefinitely if more than maxTotal threads try to borrow an object at the same time and the factory fails to create any objects. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1735161 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/fa819eb4 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/fa819eb4 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/fa819eb4 Branch: refs/heads/master Commit: fa819eb4be47b7078ef973cbc37df38e7df6eb1f Parents: a898de8 Author: Mark ThomasAuthored: Tue Mar 15 20:17:51 2016 + Committer: Mark Thomas Committed: Tue Mar 15 20:17:51 2016 + -- src/changes/changes.xml | 5 ++ .../pool2/impl/GenericKeyedObjectPool.java | 18 +++- .../commons/pool2/impl/GenericObjectPool.java | 6 ++ .../pool2/impl/TestGenericObjectPool.java | 93 +--- 4 files changed, 107 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/fa819eb4/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index f515689..a1293f7 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -51,6 +51,11 @@ The type attribute can be add,update,fix,remove. Ensure BaseGenericObjectPool.IdentityWrapper#equals() follows the expected contract for equals(). + + Ensure that threads do not block indefinitely if more than maxTotal + threads try to borrow an object at the same time and the factory fails to + create any objects. + http://git-wip-us.apache.org/repos/asf/commons-pool/blob/fa819eb4/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java index eb335d6..697ae05 100644 --- a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java @@ -476,7 +476,7 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool throw new IllegalStateException( "Returned object not currently part of this pool"); } - + synchronized(p) { final PooledObjectState state = p.getState(); if (state != PooledObjectState.ALLOCATED) { @@ -907,7 +907,7 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool if (objectDeque == null) { continue; } - + final Deque idleObjects = objectDeque.getIdleObjects(); evictionIterator = new EvictionIterator(idleObjects); if (evictionIterator.hasNext()) { @@ -1004,6 +1004,8 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool final int maxTotalPerKeySave = getMaxTotalPerKey(); // Per key final int maxTotal = getMaxTotal(); // All keys +final ObjectDeque objectDeque = poolMap.get(key); + // Check against the overall limit boolean loop = true; @@ -1012,6 +1014,9 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool if (maxTotal > -1 && newNumTotal > maxTotal) { numTotal.decrementAndGet(); if (getNumIdle() == 0) { +// POOL-303. There may be threads waiting on an object +// return that isn't going to happen. Unblock them. +objectDeque.idleObjects.interuptTakeWaiters(); return null; } clearOldest(); @@ -1020,7 +1025,6 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool } } -final ObjectDeque objectDeque = poolMap.get(key); final long newCreateCount = objectDeque.getCreateCount().incrementAndGet(); // Check against the per key limit @@ -1028,6 +1032,9 @@ public class GenericKeyedObjectPool extends BaseGenericObjectPool newCreateCount > Integer.MAX_VALUE) { numTotal.decrementAndGet(); objectDeque.getCreateCount().decrementAndGet(); +// POOL-303. There may be threads waiting on an object return that +// isn't going to happen. Unblock
[07/50] [abbrv] commons-pool git commit: findbugs-maven-plugin 3.0.1 -> 3.0.3.
findbugs-maven-plugin 3.0.1 -> 3.0.3. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1724896 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/64253220 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/64253220 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/64253220 Branch: refs/heads/master Commit: 64253220a8c597663efffa9f716904efe54117ab Parents: 1d288b3 Author: Gary D. GregoryAuthored: Fri Jan 15 23:53:17 2016 + Committer: Gary D. Gregory Committed: Fri Jan 15 23:53:17 2016 + -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/64253220/pom.xml -- diff --git a/pom.xml b/pom.xml index 08693ad..72de719 100644 --- a/pom.xml +++ b/pom.xml @@ -243,7 +243,7 @@ org.codehaus.mojo findbugs-maven-plugin - 3.0.1 + 3.0.3 Normal Default
[04/50] [abbrv] commons-pool git commit: Obsolete DOAP
Obsolete DOAP git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/branches/performance-concurrent@1719170 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/05c3d6f1 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/05c3d6f1 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/05c3d6f1 Branch: refs/heads/performance-concurrent Commit: 05c3d6f1d57c76a2628cd845c542c5119defaff6 Parents: f8b3268 Author: Sebastian BazleyAuthored: Thu Dec 10 18:16:55 2015 + Committer: Sebastian Bazley Committed: Thu Dec 10 18:16:55 2015 + -- doap_pool.rdf | 50 -- 1 file changed, 50 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/05c3d6f1/doap_pool.rdf -- diff --git a/doap_pool.rdf b/doap_pool.rdf deleted file mode 100644 index dc3fc84..000 --- a/doap_pool.rdf +++ /dev/null @@ -1,50 +0,0 @@ - -http://usefulinc.com/ns/doap#; xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#; xmlns:asfext="http://projects.apache.org/ns/asfext#; xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#; xmlns:doap="http://usefulinc.com/ns/doap#; xml:lang="en"> - http://jakarta.apache.org/commons/pool/;> -Apache Jakarta Commons Pool -http://jakarta.apache.org/commons/pool/"/> -Java -http://projects.apache.org/category/library"/> -http://usefulinc.com/doap/licenses/asl20"/> -http://issues.apache.org/bugzilla/buglist.cgi?product=Commonscomponent=pool"/> -http://jakarta.apache.org/site/downloads/downloads_commons-pool.cgi"/> -http://jakarta.apache.org/"/> -Commons Object Pooling Library -Commons Object Pooling Library - - -http://svn.apache.org/repos/asf/jakarta/commons/proper/pool/trunk"/> -http://svn.apache.org/repos/asf/jakarta/commons/proper/pool"/> - - - - -commons-pool -2004-06-07 -1.2 - - - - -commons-pool -2004-10-20 -1.1 - - - - -commons-pool -2002-08-12 -1.0.1 - - - - -commons-pool -2002-05-04 -1.0 - - -http://jakarta.apache.org/site/mail2.html#Commons"/> - -
[01/50] [abbrv] commons-pool git commit: Obsolete DOAP
Repository: commons-pool Updated Branches: refs/heads/1_3_RELEASE_BRANCH [created] 69e8dabed refs/heads/1_4_RELEASE_BRANCH [created] 7c1298675 refs/heads/1_5_RELEASE [created] 1ad1ea8b8 refs/heads/2_0_DEV [created] ec8305a96 refs/heads/POOL_1_5 [created] 6d76be52d refs/heads/POOL_1_X [created] 3f9714fca refs/heads/POOL_FUTURE [created] 28a07d414 refs/heads/master [created] 3994baf0f refs/heads/performance-concurrent [created] 05c3d6f1d refs/heads/performance-ideas [created] ae5838a2d refs/heads/pool [created] 34bfbae4a Obsolete DOAP git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/branches/2_0_DEV@1719167 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/ec8305a9 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/ec8305a9 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/ec8305a9 Branch: refs/heads/2_0_DEV Commit: ec8305a96c2cbe76cda2f55c8b6b300a8b3c8f0f Parents: 6b7635d Author: Sebastian BazleyAuthored: Thu Dec 10 18:16:24 2015 + Committer: Sebastian Bazley Committed: Thu Dec 10 18:16:24 2015 + -- doap_pool.rdf | 50 -- 1 file changed, 50 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/ec8305a9/doap_pool.rdf -- diff --git a/doap_pool.rdf b/doap_pool.rdf deleted file mode 100644 index b8dcc66..000 --- a/doap_pool.rdf +++ /dev/null @@ -1,50 +0,0 @@ - -http://usefulinc.com/ns/doap#; xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#; xmlns:asfext="http://projects.apache.org/ns/asfext#; xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#; xmlns:doap="http://usefulinc.com/ns/doap#; xml:lang="en"> - http://commons.apache.org/pool/;> -Apache Commons Pool -http://commons.apache.org/pool/"/> -Java -http://projects.apache.org/category/library"/> -http://usefulinc.com/doap/licenses/asl20"/> -http://issues.apache.org/jira/browse/POOL"/> -http://jakarta.apache.org/site/downloads/downloads_commons-pool.cgi"/> -http://commons.apache.org/"/> -Commons Object Pooling Library -Commons Object Pooling Library - - -http://svn.apache.org/repos/asf/commons/proper/pool/trunk"/> -http://svn.apache.org/repos/asf/commons/proper/pool"/> - - - - -commons-pool -2004-06-07 -1.2 - - - - -commons-pool -2004-10-20 -1.1 - - - - -commons-pool -2002-08-12 -1.0.1 - - - - -commons-pool -2002-05-04 -1.0 - - -http://commons.apache.org/mail-lists.html"/> - -
[10/50] [abbrv] commons-pool git commit: Fill some Javadoc gaps
Fill some Javadoc gaps git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1725738 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/3737d6e6 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/3737d6e6 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/3737d6e6 Branch: refs/heads/master Commit: 3737d6e67cd4c2b141c1db6125a996c198e51909 Parents: d404937 Author: Mark ThomasAuthored: Wed Jan 20 15:20:09 2016 + Committer: Mark Thomas Committed: Wed Jan 20 15:20:09 2016 + -- .../commons/pool2/impl/LinkedBlockingDeque.java | 52 1 file changed, 32 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/3737d6e6/src/main/java/org/apache/commons/pool2/impl/LinkedBlockingDeque.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/LinkedBlockingDeque.java b/src/main/java/org/apache/commons/pool2/impl/LinkedBlockingDeque.java index 8ace792..dcbcc18 100644 --- a/src/main/java/org/apache/commons/pool2/impl/LinkedBlockingDeque.java +++ b/src/main/java/org/apache/commons/pool2/impl/LinkedBlockingDeque.java @@ -418,8 +418,9 @@ class LinkedBlockingDeque extends AbstractQueue * * @param e element to link * - * @throws NullPointerException - * @throws InterruptedException + * @throws NullPointerException if e is null + * @throws InterruptedException if the thread is interrupted whilst waiting + * for space */ public void putFirst(E e) throws InterruptedException { if (e == null) { @@ -441,8 +442,9 @@ class LinkedBlockingDeque extends AbstractQueue * * @param e element to link * - * @throws NullPointerException - * @throws InterruptedException + * @throws NullPointerException if e is null + * @throws InterruptedException if the thread is interrupted whilst waiting + * for space */ public void putLast(E e) throws InterruptedException { if (e == null) { @@ -468,8 +470,9 @@ class LinkedBlockingDeque extends AbstractQueue * * @return {@code true} if successful, otherwise {@code false} * - * @throws NullPointerException - * @throws InterruptedException + * @throws NullPointerException if e is null + * @throws InterruptedException if the thread is interrupted whilst waiting + * for space */ public boolean offerFirst(E e, long timeout, TimeUnit unit) throws InterruptedException { @@ -501,8 +504,9 @@ class LinkedBlockingDeque extends AbstractQueue * * @return {@code true} if successful, otherwise {@code false} * - * @throws NullPointerException - * @throws InterruptedException + * @throws NullPointerException if e is null + * @throws InterruptedException if the thread is interrupted whist waiting + * for space */ public boolean offerLast(E e, long timeout, TimeUnit unit) throws InterruptedException { @@ -773,8 +777,9 @@ class LinkedBlockingDeque extends AbstractQueue * * @param e element to link * - * @throws NullPointerException - * @throws InterruptedException + * @throws NullPointerException if e is null + * @throws InterruptedException if the thread is interrupted whilst waiting + * for space */ public void put(E e) throws InterruptedException { putLast(e); @@ -792,8 +797,9 @@ class LinkedBlockingDeque extends AbstractQueue * * @return {@code true} if successful, otherwise {@code false} * - * @throws NullPointerException - * @throws InterruptedException + * @throws NullPointerException if e is null + * @throws InterruptedException if the thread is interrupted whilst waiting + * for space */ public boolean offer(E e, long timeout, TimeUnit unit) throws InterruptedException { @@ -898,10 +904,13 @@ class LinkedBlockingDeque extends AbstractQueue * * @return number of elements added to the collection * - * @throws UnsupportedOperationException - * @throws ClassCastException - * @throws NullPointerException - * @throws IllegalArgumentException + * @throws UnsupportedOperationException if the add operation is not + * supported by the specified collection + * @throws ClassCastException if the class of the elements held by this + * collection prevents them from being added to the specified + * collection + * @throws NullPointerException if c is null + * @throws
[21/50] [abbrv] commons-pool git commit: [POOL-309] Fix misspellings from "destory" to "destroy". interupt -> interrupt
[POOL-309] Fix misspellings from "destory" to "destroy". interupt -> interrupt git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1733561 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/29cc202b Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/29cc202b Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/29cc202b Branch: refs/heads/master Commit: 29cc202b9c9783a8cf7a0e2d01785dbfb0a97060 Parents: 5ec116a Author: Gary D. GregoryAuthored: Fri Mar 4 06:41:20 2016 + Committer: Gary D. Gregory Committed: Fri Mar 4 06:41:20 2016 + -- .../java/org/apache/commons/pool2/impl/TestGenericObjectPool.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/29cc202b/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java -- diff --git a/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java b/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java index 92fee38..a694106 100644 --- a/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java +++ b/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java @@ -248,7 +248,7 @@ public class TestGenericObjectPool extends TestBaseObjectPool { Thread.sleep(200); wtt.interrupt(); -// Give interupt time to take effect +// Give interrupt time to take effect Thread.sleep(200); // Check thread was interrupted
[02/50] [abbrv] commons-pool git commit: Obsolete DOAP
Obsolete DOAP git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/branches/POOL_1_X@1719168 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/3f9714fc Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/3f9714fc Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/3f9714fc Branch: refs/heads/POOL_1_X Commit: 3f9714fca2c5509fb4e41e35984f1de210c5c360 Parents: 8153d2e Author: Sebastian BazleyAuthored: Thu Dec 10 18:16:34 2015 + Committer: Sebastian Bazley Committed: Thu Dec 10 18:16:34 2015 + -- doap_pool.rdf | 128 - 1 file changed, 128 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/3f9714fc/doap_pool.rdf -- diff --git a/doap_pool.rdf b/doap_pool.rdf deleted file mode 100644 index de8920b..000 --- a/doap_pool.rdf +++ /dev/null @@ -1,128 +0,0 @@ - - - -http://usefulinc.com/ns/doap#; xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#; xmlns:asfext="http://projects.apache.org/ns/asfext#; xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#; xmlns:doap="http://usefulinc.com/ns/doap#; xml:lang="en"> - http://commons.apache.org/pool/;> -Apache Commons Pool -http://commons.apache.org/pool/"/> -Java -http://projects.apache.org/category/library"/> -http://usefulinc.com/doap/licenses/asl20"/> -http://issues.apache.org/jira/browse/POOL"/> -http://commons.apache.org/pool/download_pool.cgi"/> -http://commons.apache.org/"/> -Commons Object Pooling Library -Commons Object Pooling Library - - -http://svn.apache.org/repos/asf/commons/proper/pool/trunk"/> -http://svn.apache.org/repos/asf/commons/proper/pool"/> - - - - -commons-pool -2012-01-07 -1.6 - - -commons-pool -2011-12-20 -1.5.7 - - -commons-pool -2011-04-03 -1.5.6 - - -commons-pool -2010-09-10 -1.5.5 - - -commons-pool -2009-11-20 -1.5.4 - - -commons-pool -2009-09-23 -1.5.3 - - -commons-pool -2009-07-12 -1.5.2 - - -commons-pool -2009-06-16 -1.5.1 - - -commons-pool -2009-06-10 -1.5 - - - - -commons-pool -2008-01-15 -1.4 - - - - -commons-pool -2006-04-06 -1.3 - - - - -commons-pool -2004-06-07 -1.2 - - - - -commons-pool -2003-10-20 -1.1 - - - - -commons-pool -2002-08-12 -1.0.1 - - - - -commons-pool -2002-05-04 -1.0 - - -http://commons.apache.org/mail-lists.html"/> - -
[09/50] [abbrv] commons-pool git commit: Remove unused throws
Remove unused throws git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1725736 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/d404937b Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/d404937b Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/d404937b Branch: refs/heads/master Commit: d404937b66525d96f8e4ba5dd034328dd7bd883d Parents: ccbbb32 Author: Mark ThomasAuthored: Wed Jan 20 15:01:00 2016 + Committer: Mark Thomas Committed: Wed Jan 20 15:01:00 2016 + -- .../org/apache/commons/pool2/impl/GenericObjectPool.java | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/d404937b/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java -- diff --git a/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java index ed18d49..6182d41 100644 --- a/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java @@ -327,7 +327,7 @@ public class GenericObjectPool extends BaseGenericObjectPool * * @see AbandonedConfig */ -public void setAbandonedConfig(AbandonedConfig abandonedConfig) throws IllegalArgumentException { +public void setAbandonedConfig(AbandonedConfig abandonedConfig) { if (abandonedConfig == null) { this.abandonedConfig = null; } else { @@ -534,7 +534,7 @@ public class GenericObjectPool extends BaseGenericObjectPool @Override public void returnObject(T obj) { PooledObject p = allObjects.get(new IdentityWrapper(obj)); - + if (p == null) { if (!isAbandonedConfig()) { throw new IllegalStateException( @@ -825,7 +825,7 @@ public class GenericObjectPool extends BaseGenericObjectPool removeAbandoned(ac); } } - + /** * Tries to ensure that {@link #getMinIdle()} idle instances are available * in the pool. @@ -1163,5 +1163,5 @@ public class GenericObjectPool extends BaseGenericObjectPool builder.append(", abandonedConfig="); builder.append(abandonedConfig); } - + }
[03/50] [abbrv] commons-pool git commit: Obsolete DOAP
Obsolete DOAP git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/branches/POOL_FUTURE@1719169 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/28a07d41 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/28a07d41 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/28a07d41 Branch: refs/heads/POOL_FUTURE Commit: 28a07d414c5aaf4e2f43e5274190347cc06c305a Parents: 49832ce Author: Sebastian BazleyAuthored: Thu Dec 10 18:16:44 2015 + Committer: Sebastian Bazley Committed: Thu Dec 10 18:16:44 2015 + -- doap_pool.rdf | 112 - 1 file changed, 112 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/28a07d41/doap_pool.rdf -- diff --git a/doap_pool.rdf b/doap_pool.rdf deleted file mode 100644 index bd81210..000 --- a/doap_pool.rdf +++ /dev/null @@ -1,112 +0,0 @@ - - -http://usefulinc.com/ns/doap#; xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#; xmlns:asfext="http://projects.apache.org/ns/asfext#; xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#; xmlns:doap="http://usefulinc.com/ns/doap#; xml:lang="en"> - http://commons.apache.org/pool/;> -Apache Commons Pool -http://commons.apache.org/pool/"/> -Java -http://projects.apache.org/category/library"/> -http://usefulinc.com/doap/licenses/asl20"/> -http://issues.apache.org/jira/browse/POOL"/> -http://commons.apache.org/pool/download_pool.cgi"/> -http://commons.apache.org/"/> -Commons Object Pooling Library -Commons Object Pooling Library - - -http://svn.apache.org/repos/asf/commons/proper/pool/trunk"/> -http://svn.apache.org/repos/asf/commons/proper/pool"/> - - - - -commons-pool -2010-09-10 -1.5.5 - - -commons-pool -2009-11-20 -1.5.4 - - -commons-pool -2009-09-23 -1.5.3 - - -commons-pool -2009-07-12 -1.5.2 - - -commons-pool -2009-06-16 -1.5.1 - - -commons-pool -2009-06-10 -1.5 - - - - -commons-pool -2008-01-15 -1.4 - - - - -commons-pool -2006-04-06 -1.3 - - - - -commons-pool -2004-06-07 -1.2 - - - - -commons-pool -2003-10-20 -1.1 - - - - -commons-pool -2002-08-12 -1.0.1 - - - - -commons-pool -2002-05-04 -1.0 - - -http://commons.apache.org/mail-lists.html"/> - -
svn commit: r1785520 - in /commons/proper/pool/trunk/src: changes/ main/java/org/apache/commons/pool2/impl/ test/java/org/apache/commons/pool2/impl/
Author: mattsicker Date: Sat Mar 4 20:18:19 2017 New Revision: 1785520 URL: http://svn.apache.org/viewvc?rev=1785520=rev Log: [POOL-320]: Use more efficient stack walking mechanisms for usage tracking Added: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/CallStack.java commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/CallStackUtils.java commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/SecurityManagerCallStack.java commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/ThrowableCallStack.java commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/CallStackTest.java Modified: commons/proper/pool/trunk/src/changes/changes.xml commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/DefaultPooledObject.java commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestDefaultPooledObjectInfo.java Modified: commons/proper/pool/trunk/src/changes/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/changes/changes.xml?rev=1785520=1785519=1785520=diff == --- commons/proper/pool/trunk/src/changes/changes.xml (original) +++ commons/proper/pool/trunk/src/changes/changes.xml Sat Mar 4 20:18:19 2017 @@ -83,6 +83,9 @@ The type attribute can be add,u Ensure that a call to GKOP preparePool() takes account of other threads that might create objects concurrently, particularly the Evictor. + + Use more efficient stack walking mechanisms for usage tracking when possible. + Added: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/CallStack.java URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/CallStack.java?rev=1785520=auto == --- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/CallStack.java (added) +++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/CallStack.java Sat Mar 4 20:18:19 2017 @@ -0,0 +1,54 @@ +/* + * 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.pool2.impl; + +import org.apache.commons.pool2.PooledObject; +import org.apache.commons.pool2.UsageTracking; + +import java.io.PrintWriter; + +/** + * Strategy for obtaining and printing the current call stack. This is primarily useful for + * {@linkplain UsageTracking usage tracking} so that different JVMs and configurations can use more efficient strategies + * for obtaining the current call stack. + * + * @see CallStackUtils + * @since 2.4.3 + */ +public interface CallStack { + +/** + * Prints the current stack trace if available to a PrintWriter. The format is undefined and is primarily useful + * for debugging issues with {@link PooledObject} usage in user code. + * + * @param writer a PrintWriter to write the curren stack trace to if available + * @return true if a stack trace was available to print or false if nothing was printed + */ +boolean printStackTrace(final PrintWriter writer); + +/** + * Takes a snapshot of the current call stack. Subsequent calls to {@link #printStackTrace(PrintWriter)} will print + * out that stack trace until it is {@linkplain #clear() cleared}. + */ +void fillInStackTrace(); + +/** + * Clears the current stack trace snapshot. Subsequent calls to {@link #printStackTrace(PrintWriter)} will be + * no-ops until another call to {@link #fillInStackTrace()}. + */ +void clear(); +} Added: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/CallStackUtils.java URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/CallStackUtils.java?rev=1785520=auto == --- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/CallStackUtils.java (added) +++ commons/proper/pool/trunk/src/main/java/org/apach
svn commit: r1780827 - /commons/proper/commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates/contributing-md-template.md
Author: mattsicker Date: Sun Jan 29 17:28:24 2017 New Revision: 1780827 URL: http://svn.apache.org/viewvc?rev=1780827=rev Log: Fix typo in CONTRIBUTING.md template Modified: commons/proper/commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates/contributing-md-template.md Modified: commons/proper/commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates/contributing-md-template.md URL: http://svn.apache.org/viewvc/commons/proper/commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates/contributing-md-template.md?rev=1780827=1780826=1780827=diff == --- commons/proper/commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates/contributing-md-template.md (original) +++ commons/proper/commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates/contributing-md-template.md Sun Jan 29 17:28:24 2017 @@ -50,7 +50,7 @@ Getting Started + Make sure you have a [JIRA account](https://issues.apache.org/jira/). + Make sure you have a [GitHub account](https://github.com/signup/free). -+ If you're planning to implement a new feature it makes sense to discuss you're changes on the [dev list](https://commons.apache.org/mail-lists.html) first. This way you can make sure you're not wasting your time on something that isn't considered to be in @NAME@'s scope. ++ If you're planning to implement a new feature it makes sense to discuss your changes on the [dev list](https://commons.apache.org/mail-lists.html) first. This way you can make sure you're not wasting your time on something that isn't considered to be in @NAME@'s scope. + Submit a [Jira Ticket][jira] for your issue, assuming one does not already exist. + Clearly describe the issue including steps to reproduce when it is a bug. + Make sure you fill in the earliest version that you know has the issue.
svn commit: r14694 - /dev/commons/dbcp/DBCP_2_2_RC2/
Author: mattsicker Date: Sun Aug 7 18:53:18 2016 New Revision: 14694 Log: Add artifacts for DBCP 2.2rc2 Added: dev/commons/dbcp/DBCP_2_2_RC2/ dev/commons/dbcp/DBCP_2_2_RC2/RELEASE-NOTES.txt dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-bin.tar.gz (with props) dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-bin.tar.gz.asc (with props) dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-bin.tar.gz.md5 dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-bin.tar.gz.sha1 dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-bin.zip (with props) dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-bin.zip.asc (with props) dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-bin.zip.md5 dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-bin.zip.sha1 dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-src.tar.gz (with props) dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-src.tar.gz.asc (with props) dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-src.tar.gz.md5 dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-src.tar.gz.sha1 dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-src.zip (with props) dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-src.zip.asc (with props) dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-src.zip.md5 dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-src.zip.sha1 Added: dev/commons/dbcp/DBCP_2_2_RC2/RELEASE-NOTES.txt == --- dev/commons/dbcp/DBCP_2_2_RC2/RELEASE-NOTES.txt (added) +++ dev/commons/dbcp/DBCP_2_2_RC2/RELEASE-NOTES.txt Sun Aug 7 18:53:18 2016 @@ -0,0 +1,37 @@ + Apache Apache Commons DBCP + Version 2.2 + RELEASE NOTES + +The Apache Commons DBCP team is pleased to announce the release of Apache Apache Commons DBCP 2.2. + +Apache Commons DBCP software implements Database Connection Pooling. + +This is a minor release, including bug fixes and enhancements. + +Changes in this version include: + +New features: +o DBCP-451: Add constructor DriverManagerConnectionFactory(String). + +Fixed Bugs: +o DBCP-454: OSGi declarations contain multiple import headers for javax.transaction. Thanks to Philipp Marx, Matt Sicker. +o DBCP-452: Add jmxName to properties set by BasicDataSourceFactory. This + enables container-managed pools created from JNDI Resource + definitions to enable JMX by supplying a valid root JMX name. +o DBCP-446: NullPointerException thrown when calling ManagedConnection.isClosed(). Thanks to Gary Gregory, feng yang, Euclides M, Phil Steitz. +o DBCP-444: InvalidateConnection can result in closed connection returned by getConnection. +o DBCP-449: Complete the fix for DBCP-418, enabling PoolableConnection class to load in environments + (such as GAE) where the JMX ManagementFactory is not available. Thanks to Grzegorz D.. +o DBCP-455: Ensure that the cacheState setting is used when statement pooling is + disabled. Thanks to Kyohei Nakamura. +o DBCP-453: Ensure that setSoftMinEvictableIdleTimeMillis is used when working with + BasicDataSource. Thanks to Philipp Marx. +o DBCP-456: Correct the name of the configuration attribute + softMinEvictableIdleTimeMillis. Thanks to Kyohei Nakamura. + + + +For complete information on Apache Commons DBCP, including instructions on how to submit bug reports, +patches, or suggestions for improvement, see the Apache Apache Commons DBCP website: + +http://commons.apache.org/dbcp/ Added: dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-bin.tar.gz == Binary file - no diff available. Propchange: dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-bin.tar.gz -- svn:mime-type = application/x-gzip Added: dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-bin.tar.gz.asc == Binary file - no diff available. Propchange: dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-bin.tar.gz.asc -- svn:mime-type = application/pgp-signature Added: dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-bin.tar.gz.md5 == --- dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-bin.tar.gz.md5 (added) +++ dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-bin.tar.gz.md5 Sun Aug 7 18:53:18 2016 @@ -0,0 +1 @@ +e90a99aa08ccab29f4d75d4ac453b405 \ No newline at end of file Added: dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-bin.tar.gz.sha1 == --- dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2-2.2-bin.tar.gz.sha1 (added) +++ dev/commons/dbcp/DBCP_2_2_RC2/commons-dbcp2