Re: [VOTE] Release Apache Commons JCS 2.0 based on RC1
On 2016-12-25, Thomas Vandahl wrote: > I would like to release the [jcs] component. +1 You should probably exclude src/scripts/zipcodes.txt from the RAT report, but that doesn't affect my vote :-) Stefan - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
Re: [VOTE] Release Compress 1.13 based on RC1
Many thanks, Oliver On 2016-12-27, Oliver Heger wrote: > build works fine with Java 1.7 and 1.8 on Windows 10. Artifacts and site > look good. > When building the site with Java 1.8 I get the failure below. Is there > any special configuration needed? Could this be a Windows problem? > [INFO] Generating "japicmp" report --- > japicmp-maven-plugin:0.9.3:cmp-report > [debug] No packaging support defined, no filtering > [debug] Searching for versions in versionRange: (,1.13) > [INFO] artifact org.apache.commons:commons-compress: checking for > updates from central > [debug] Parameter not configured, i.e. no version > filtered. > Downloading: > https://repo.maven.apache.org/maven2/org/apache/commons/commons-compress/1.12/commons-compress-1.12.jar > Downloaded: > https://repo.maven.apache.org/maven2/org/apache/commons/commons-compress/1.12/commons-compress-1.12.jar > (433 KB at 400.9 KB/sec) > [warn] No new version specified and file > 'c:\data\dev\projects\OpenSource\compress\commons-compress-1.13-src\target\classes' > of artifact could not be opened as jar archive: > c:\data\dev\projects\OpenSource\compress\commons-compress-1.13-src\target\classes > (Zugriff verweigert) Right now you must use "mvn package site" in order to ensure the jar is there. Commons Parent 42 will help a bit here as japicmp will be skipped if the jar is not there. Stefan - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
Re: [VOTE] Release Compress 1.13 based on RC1
Hi, build works fine with Java 1.7 and 1.8 on Windows 10. Artifacts and site look good. When building the site with Java 1.8 I get the failure below. Is there any special configuration needed? Could this be a Windows problem? Well, for me the site build is not that critical, so +1 Oliver [INFO] Generating "japicmp" report --- japicmp-maven-plugin:0.9.3:cmp-report [debug] No packaging support defined, no filtering [debug] Searching for versions in versionRange: (,1.13) [INFO] artifact org.apache.commons:commons-compress: checking for updates from central [debug] Parameter not configured, i.e. no version filtered. Downloading: https://repo.maven.apache.org/maven2/org/apache/commons/commons-compress/1.12/commons-compress-1.12.jar Downloaded: https://repo.maven.apache.org/maven2/org/apache/commons/commons-compress/1.12/commons-compress-1.12.jar (433 KB at 400.9 KB/sec) [warn] No new version specified and file 'c:\data\dev\projects\OpenSource\compress\commons-compress-1.13-src\target\classes' of artifact could not be opened as jar archive: c:\data\dev\projects\OpenSource\compress\commons-compress-1.13-src\target\classes (Zugriff verweigert) [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 01:40 min [INFO] Finished at: 2016-12-27T21:13:42+01:00 [INFO] Final Memory: 74M/942M [INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.4:site (default-site) on project commons-compress: Error generating japicmp-maven-plugin:0.9.3:cmp-report: Failed to generate report: Please provide at least one resolvable new version using one of the configuration elements or . -> [Help 1] Am 25.12.2016 um 14:19 schrieb Stefan Bodewig: > The Release Candidate is available for review at: > https://dist.apache.org/repos/dist/dev/commons/compress/ > (svn revision 17569) > > Maven artifacts are here: > > https://repository.apache.org/content/repositories/orgapachecommons-1231/org/apache/commons/commons-compress/1.13/ > > These are the Maven artifacts and their hashes > > d8e592b12f192a77c59d52ba7936279c04f6ff1a commons-compress-1.13.pom > 15c5e9584200122924e50203ae210b57616b75ee commons-compress-1.13.jar > 922598114ed03152c489a56510b3bbf9d5182a66 commons-compress-1.13-javadoc.jar > 68ace8baf343f0384ba1fc995944c1d60f41f660 commons-compress-1.13-sources.jar > afcc0429fa13803f7c029fdf5116db8fdf21376f commons-compress-1.13-tests.jar > 3121ecf5ac04dfc06924b518dd6c7fdf387a0f91 > commons-compress-1.13-test-sources.jar > > Details of changes since 1.12 are in the release notes: > https://dist.apache.org/repos/dist/dev/commons/compress/RELEASE-NOTES.txt > http://stefan.samaflost.de/staging/commons-compress-1.13/changes-report.html > > The tag is here: > > https://git-wip-us.apache.org/repos/asf?p=commons-compress.git;a=commit;h=45438471726fc5005a41cefecbf62d4d26eb15b2 > > Site: > http://stefan.samaflost.de/staging/commons-compress-1.13 > > as usual when I cut releases this is *not* the site that I'm going to > publish after the relase. I'll update changes.xml when I know the > release date. Also the javadocs for 1.13 and "latest release" are > missing for now (they are identical to the "GIT latest" ones) and the > download page doesn't work on my server. > > japicmp Report (compared to 1.12): > http://stefan.samaflost.de/staging/commons-compress-1.13/japicmp.html > > this is a bit harder to read than Clirr but Clirr dies with an NPE for > me. > > Binary serialization of UnsupportedZipFeatureException has changed, > but prior to 1.13 the class hasn't technically been serializable at > all. > > RAT Report: > http://stefan.samaflost.de/staging/commons-compress-1.13/rat-report.html > > KEYS: > https://www.apache.org/dist/commons/KEYS > > Please review the release candidate and vote. > Given the time of the year this vote will close no sooner that 96 hours > from now, i.e. sometime after 13:00 UTC 29-December 2016 > > [ ] +1 Release these artifacts > [ ] +0 OK, but... > [ ] -0 OK, but really should fix... > [ ] -1 I oppose this release because... > > Thanks! > > Stefan > > - > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
Re: [text] Complete test coverage for RandomStringGenerator
Am 27.12.2016 um 11:51 schrieb Duncan Jones: On 27 Dec 2016, at 10:29, Gilleswrote: Hi. On Tue, 27 Dec 2016 09:54:29 + (UTC), djo...@apache.org wrote: A string of length zero hardly qualifies as random. Shouldn't "generate(0)" rather raise an exception? [I know that "nextInt(1)" is also not random, but what applies to a general-purpose low-level utility might not be the best option for applications that would use TEXT.] I was following the Robustness principle. Asking for a zero-length string is odd, but as there was a way to interpret that request without throwing an exception, I did so. +1 When generating strings with a random length (e.g between 0 and 10) asking for a zero length string is not so odd. - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
Re: [text] Complete test coverage for RandomStringGenerator
> On Dec 27, 2016, at 5:51 AM, Duncan Joneswrote: > > >> On 27 Dec 2016, at 10:29, Gilles wrote: >> >> Hi. >> >>> On Tue, 27 Dec 2016 09:54:29 + (UTC), djo...@apache.org wrote: >>> Repository: commons-text >>> Updated Branches: >>> refs/heads/master 1b3e44809 -> 0b1ca53b3 >>> >>> >>> Complete test coverage for RandomStringGenerator >>> >>> Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo >>> Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/0b1ca53b >>> Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/0b1ca53b >>> Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/0b1ca53b >>> >>> Branch: refs/heads/master >>> Commit: 0b1ca53b3e00e74364849a14372e4b3f57c2d3a0 >>> Parents: 1b3e448 >>> Author: duncan >>> Authored: Tue Dec 27 09:54:19 2016 + >>> Committer: duncan >>> Committed: Tue Dec 27 09:54:19 2016 + >>> >>> -- >>> .../org/apache/commons/text/RandomStringGeneratorTest.java | 6 ++ >>> 1 file changed, 6 insertions(+) >>> -- >>> >>> >>> http://git-wip-us.apache.org/repos/asf/commons-text/blob/0b1ca53b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java >>> -- >>> diff --git >>> a/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java >>> b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java >>> index 2ff7a67..36ce5e0 100644 >>> --- a/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java >>> +++ b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java >>> @@ -203,4 +203,10 @@ public class RandomStringGeneratorTest { >>>assertTrue(c == 'b'); >>>} >>>} >>> + >>> +@Test >>> +public void testZeroLength() throws Exception { >>> +RandomStringGenerator generator = new >>> RandomStringGenerator.Builder().build(); >>> +assertEquals("", generator.generate(0)); >>> +} >>> } >> >> A string of length zero hardly qualifies as random. >> Shouldn't "generate(0)" rather raise an exception? >> [I know that "nextInt(1)" is also not random, but what applies to a >> general-purpose low-level utility might not be the best option for >> applications that would use TEXT.] > > I was following the Robustness principle. Asking for a zero-length string is > odd, but as there was a way to interpret that request without throwing an > exception, I did so. > This makes sense to me. It feels like every random string generator, regardless of the underlying distribution, on the request for the string of length 0 should return a string from the Kleene closure over the null set. -Rob > Duncan > >> >> Regards, >> Gilles >> >> >> - >> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org >> For additional commands, e-mail: dev-h...@commons.apache.org >> > > > - > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
Re: [text] Complete test coverage for RandomStringGenerator
> On 27 Dec 2016, at 10:29, Gilleswrote: > > Hi. > > On Tue, 27 Dec 2016 09:54:29 + (UTC), djo...@apache.org wrote: >> Repository: commons-text >> Updated Branches: >> refs/heads/master 1b3e44809 -> 0b1ca53b3 >> >> >> Complete test coverage for RandomStringGenerator >> >> Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo >> Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/0b1ca53b >> Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/0b1ca53b >> Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/0b1ca53b >> >> Branch: refs/heads/master >> Commit: 0b1ca53b3e00e74364849a14372e4b3f57c2d3a0 >> Parents: 1b3e448 >> Author: duncan >> Authored: Tue Dec 27 09:54:19 2016 + >> Committer: duncan >> Committed: Tue Dec 27 09:54:19 2016 + >> >> -- >> .../org/apache/commons/text/RandomStringGeneratorTest.java | 6 ++ >> 1 file changed, 6 insertions(+) >> -- >> >> >> http://git-wip-us.apache.org/repos/asf/commons-text/blob/0b1ca53b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java >> -- >> diff --git >> a/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java >> b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java >> index 2ff7a67..36ce5e0 100644 >> --- a/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java >> +++ b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java >> @@ -203,4 +203,10 @@ public class RandomStringGeneratorTest { >> assertTrue(c == 'b'); >> } >> } >> + >> +@Test >> +public void testZeroLength() throws Exception { >> +RandomStringGenerator generator = new >> RandomStringGenerator.Builder().build(); >> +assertEquals("", generator.generate(0)); >> +} >> } > > A string of length zero hardly qualifies as random. > Shouldn't "generate(0)" rather raise an exception? > [I know that "nextInt(1)" is also not random, but what applies to a > general-purpose low-level utility might not be the best option for > applications that would use TEXT.] I was following the Robustness principle. Asking for a zero-length string is odd, but as there was a way to interpret that request without throwing an exception, I did so. Duncan > > Regards, > Gilles > > > - > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
Re: [text] Complete test coverage for RandomStringGenerator
Hi. On Tue, 27 Dec 2016 09:54:29 + (UTC), djo...@apache.org wrote: Repository: commons-text Updated Branches: refs/heads/master 1b3e44809 -> 0b1ca53b3 Complete test coverage for RandomStringGenerator Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/0b1ca53b Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/0b1ca53b Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/0b1ca53b Branch: refs/heads/master Commit: 0b1ca53b3e00e74364849a14372e4b3f57c2d3a0 Parents: 1b3e448 Author: duncanAuthored: Tue Dec 27 09:54:19 2016 + Committer: duncan Committed: Tue Dec 27 09:54:19 2016 + -- .../org/apache/commons/text/RandomStringGeneratorTest.java | 6 ++ 1 file changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/commons-text/blob/0b1ca53b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java -- diff --git a/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java index 2ff7a67..36ce5e0 100644 --- a/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java +++ b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java @@ -203,4 +203,10 @@ public class RandomStringGeneratorTest { assertTrue(c == 'b'); } } + +@Test +public void testZeroLength() throws Exception { +RandomStringGenerator generator = new RandomStringGenerator.Builder().build(); +assertEquals("", generator.generate(0)); +} } A string of length zero hardly qualifies as random. Shouldn't "generate(0)" rather raise an exception? [I know that "nextInt(1)" is also not random, but what applies to a general-purpose low-level utility might not be the best option for applications that would use TEXT.] Regards, Gilles - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
Re: [text] Rename RandomStringBuilder and make it immutable and thread-safe.
> On 27 Dec 2016, at 08:45, djo...@apache.org wrote: > > Repository: commons-text > Updated Branches: > refs/heads/master 6f6da3467 -> 08ac56a50 > > > Rename RandomStringBuilder and make it immutable and thread-safe. > > The RandomStringBuilder class was renamed to RandomStringGenerator. The > class is now constructed using an inner Builder class, resulting in an > immutable and thread-safe generator. The default random generator is now > ThreadLocalRandom rather than Random. > > The inner CodePointPredicate class was extracted into a separate class > and renamed to CharacterPredicate. The commonly used predicates are now > in a separate enum, CharacterPredicates. > > Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo > Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/08ac56a5 > Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/08ac56a5 > Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/08ac56a5 > > Branch: refs/heads/master > Commit: 08ac56a502adb0d274d02f9d97f394e4a5c5966e > Parents: 6f6da34 > Author: duncan> Authored: Tue Dec 27 08:18:52 2016 + > Committer: duncan > Committed: Tue Dec 27 08:42:48 2016 + > > -- > .../apache/commons/text/CharacterPredicate.java | 37 ++ > .../commons/text/CharacterPredicates.java | 52 +++ > .../commons/text/RandomStringBuilder.java | 354 --- > .../commons/text/RandomStringGenerator.java | 316 + > .../commons/text/CharacterPredicatesTest.java | 50 +++ > .../commons/text/RandomStringBuilderTest.java | 235 > .../commons/text/RandomStringGeneratorTest.java | 206 +++ > 7 files changed, 661 insertions(+), 589 deletions(-) > ——— Apologies, should have split this into multiple commits but I got too far into it before I reached that conclusion! > > > http://git-wip-us.apache.org/repos/asf/commons-text/blob/08ac56a5/src/main/java/org/apache/commons/text/CharacterPredicate.java > -- > diff --git a/src/main/java/org/apache/commons/text/CharacterPredicate.java > b/src/main/java/org/apache/commons/text/CharacterPredicate.java > new file mode 100644 > index 000..fb23ac4 > --- /dev/null > +++ b/src/main/java/org/apache/commons/text/CharacterPredicate.java > @@ -0,0 +1,37 @@ > +/* > + * 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.text; > + > +/** > + * A predicate for selecting code points. Implementations of this interface > must > + * be thread safe. > + * > + * @since 1.0 > + */ > +public interface CharacterPredicate { > + > +/** > + * Tests the code point with this predicate. > + * > + * @param codePoint > + *the code point to test > + * @return {@code true} if the code point matches the predicate, > + * {@code false} otherwise > + * @since 1.0 > + */ > +boolean test(int codePoint); > +} > \ No newline at end of file > > http://git-wip-us.apache.org/repos/asf/commons-text/blob/08ac56a5/src/main/java/org/apache/commons/text/CharacterPredicates.java > -- > diff --git a/src/main/java/org/apache/commons/text/CharacterPredicates.java > b/src/main/java/org/apache/commons/text/CharacterPredicates.java > new file mode 100644 > index 000..7f38552 > --- /dev/null > +++ b/src/main/java/org/apache/commons/text/CharacterPredicates.java > @@ -0,0 +1,52 @@ > +/* > + * 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