Nexus: Staging Repository Dropped
Message from: https://repository.apache.orgDescription:Scheduled task 'Drop Idle Closed Repos' has dropped repositoryDeployer properties:"userAgent" = "Apache-Maven/3.3.9 (Java 1.7.0_79; Windows 7 6.1)""userId" = "ggregory""ip" = "172.250.253.8"Details:The orgapachecommons-1176 staging repository has been dropped.
[1/4] commons-rng git commit: Fail early.
Repository: commons-rng Updated Branches: refs/heads/master d0989acd5 -> 3a703ee1a Fail early. Raise an exception (rather than return "null") if something wrong was detected. Project: http://git-wip-us.apache.org/repos/asf/commons-rng/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-rng/commit/c8cc2eed Tree: http://git-wip-us.apache.org/repos/asf/commons-rng/tree/c8cc2eed Diff: http://git-wip-us.apache.org/repos/asf/commons-rng/diff/c8cc2eed Branch: refs/heads/master Commit: c8cc2eed532c650fa9f5d53455c9488b8685d17d Parents: d0989ac Author: Gilles Authored: Fri Sep 2 01:18:36 2016 +0200 Committer: Gilles Committed: Fri Sep 2 01:18:36 2016 +0200 -- .../java/org/apache/commons/rng/internal/ProviderBuilder.java | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/commons-rng/blob/c8cc2eed/src/main/java/org/apache/commons/rng/internal/ProviderBuilder.java -- diff --git a/src/main/java/org/apache/commons/rng/internal/ProviderBuilder.java b/src/main/java/org/apache/commons/rng/internal/ProviderBuilder.java index 3ede581..0e100fe 100644 --- a/src/main/java/org/apache/commons/rng/internal/ProviderBuilder.java +++ b/src/main/java/org/apache/commons/rng/internal/ProviderBuilder.java @@ -180,6 +180,9 @@ public class ProviderBuilder { nativeSeed = SeedFactory.createIntArray(RANDOM_SEED_ARRAY_SIZE); } else if (source.getSeed().equals(long[].class)) { nativeSeed = SeedFactory.createLongArray(RANDOM_SEED_ARRAY_SIZE); +} else { +// Source's native type is not handled. +throw new IllegalStateException(INTERNAL_ERROR_MSG); } } else { // Convert to native type.
[3/4] commons-rng git commit: Javadoc.
Javadoc. Project: http://git-wip-us.apache.org/repos/asf/commons-rng/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-rng/commit/70ba100f Tree: http://git-wip-us.apache.org/repos/asf/commons-rng/tree/70ba100f Diff: http://git-wip-us.apache.org/repos/asf/commons-rng/diff/70ba100f Branch: refs/heads/master Commit: 70ba100f7604d49ad215518df4d72b67e42ac738 Parents: ce47274 Author: Gilles Authored: Fri Sep 2 03:10:29 2016 +0200 Committer: Gilles Committed: Fri Sep 2 03:10:29 2016 +0200 -- src/main/java/org/apache/commons/rng/RandomSource.java | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/commons-rng/blob/70ba100f/src/main/java/org/apache/commons/rng/RandomSource.java -- diff --git a/src/main/java/org/apache/commons/rng/RandomSource.java b/src/main/java/org/apache/commons/rng/RandomSource.java index 65d014f..0c22419 100644 --- a/src/main/java/org/apache/commons/rng/RandomSource.java +++ b/src/main/java/org/apache/commons/rng/RandomSource.java @@ -396,6 +396,7 @@ public enum RandomSource { * {@code Long} (or {@code long}) * {@code int[]} * {@code long[]} + * {@code byte[]} * * *
[4/4] commons-rng git commit: Userguide.
Userguide. Project: http://git-wip-us.apache.org/repos/asf/commons-rng/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-rng/commit/3a703ee1 Tree: http://git-wip-us.apache.org/repos/asf/commons-rng/tree/3a703ee1 Diff: http://git-wip-us.apache.org/repos/asf/commons-rng/diff/3a703ee1 Branch: refs/heads/master Commit: 3a703ee1a80f9e7d3c22e4037ab56bef745a62b9 Parents: 70ba100 Author: Gilles Authored: Fri Sep 2 03:10:42 2016 +0200 Committer: Gilles Committed: Fri Sep 2 03:10:42 2016 +0200 -- src/site/apt/userguide/rng.apt | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/commons-rng/blob/3a703ee1/src/site/apt/userguide/rng.apt -- diff --git a/src/site/apt/userguide/rng.apt b/src/site/apt/userguide/rng.apt index 5cbc0ef..6099097 100644 --- a/src/site/apt/userguide/rng.apt +++ b/src/site/apt/userguide/rng.apt @@ -113,6 +113,8 @@ long[] seed = RandomSource.createLongArray(128); // Length of returned array is ** <<>> +** <<>> + [] +--+
[2/4] commons-rng git commit: RNG-14
RNG-14 Seed can be passed as "byte[]". Project: http://git-wip-us.apache.org/repos/asf/commons-rng/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-rng/commit/ce472749 Tree: http://git-wip-us.apache.org/repos/asf/commons-rng/tree/ce472749 Diff: http://git-wip-us.apache.org/repos/asf/commons-rng/diff/ce472749 Branch: refs/heads/master Commit: ce4727490a97a4d108fd611b62b769ab87320e2d Parents: c8cc2ee Author: Gilles Authored: Fri Sep 2 02:49:10 2016 +0200 Committer: Gilles Committed: Fri Sep 2 02:49:10 2016 +0200 -- .../commons/rng/internal/ProviderBuilder.java | 18 .../rng/internal/util/ByteArray2IntArray.java | 39 ++ .../rng/internal/util/ByteArray2LongArray.java | 39 ++ .../rng/ProvidersCommonParametricTest.java | 12 -- .../internal/util/ByteArray2IntArrayTest.java | 43 .../internal/util/ByteArray2LongArrayTest.java | 43 6 files changed, 191 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-rng/blob/ce472749/src/main/java/org/apache/commons/rng/internal/ProviderBuilder.java -- diff --git a/src/main/java/org/apache/commons/rng/internal/ProviderBuilder.java b/src/main/java/org/apache/commons/rng/internal/ProviderBuilder.java index 0e100fe..93ad3d9 100644 --- a/src/main/java/org/apache/commons/rng/internal/ProviderBuilder.java +++ b/src/main/java/org/apache/commons/rng/internal/ProviderBuilder.java @@ -35,6 +35,8 @@ import org.apache.commons.rng.internal.util.IntArray2LongArray; import org.apache.commons.rng.internal.util.LongArray2IntArray; import org.apache.commons.rng.internal.util.LongArray2Long; import org.apache.commons.rng.internal.util.IntArray2Int; +import org.apache.commons.rng.internal.util.ByteArray2IntArray; +import org.apache.commons.rng.internal.util.ByteArray2LongArray; import org.apache.commons.rng.internal.util.SeedConverter; import org.apache.commons.rng.internal.util.SeedConverterComposer; import org.apache.commons.rng.internal.source32.JDKRandom; @@ -81,6 +83,10 @@ public class ProviderBuilder { private static final LongArray2IntArray LONG_ARRAY_TO_INT_ARRAY = new LongArray2IntArray(); /** Seed converter. */ private static final IntArray2LongArray INT_ARRAY_TO_LONG_ARRAY = new IntArray2LongArray(); +/** Seed converter. */ +private static final ByteArray2IntArray BYTE_ARRAY_TO_INT_ARRAY = new ByteArray2IntArray(); +/** Seed converter. */ +private static final ByteArray2LongArray BYTE_ARRAY_TO_LONG_ARRAY = new ByteArray2LongArray(); /** Map to convert "Integer" seeds. */ private static final Map, SeedConverter> CONV_INT = new HashMap, SeedConverter>(); @@ -93,6 +99,9 @@ public class ProviderBuilder { /** Map to convert "long[]" seeds. */ private static final Map, SeedConverter> CONV_LONG_ARRAY = new HashMap, SeedConverter>(); +/** Map to convert "byte[]" seeds. */ +private static final Map, SeedConverter> CONV_BYTE_ARRAY = +new HashMap, SeedConverter>(); static { // Input seed type is "Long". @@ -122,6 +131,13 @@ public class ProviderBuilder { CONV_LONG_ARRAY.put(Long.class, LONG_ARRAY_TO_LONG); CONV_LONG_ARRAY.put(int[].class, LONG_ARRAY_TO_INT_ARRAY); CONV_LONG_ARRAY.put(long[].class, new NoOpConverter()); + +// Input seed type is "byte[]". +// Key is the implementation's "native" seed type. +CONV_BYTE_ARRAY.put(Integer.class, new SeedConverterComposer(BYTE_ARRAY_TO_INT_ARRAY, INT_ARRAY_TO_INT)); +CONV_BYTE_ARRAY.put(Long.class, new SeedConverterComposer(BYTE_ARRAY_TO_LONG_ARRAY, LONG_ARRAY_TO_LONG)); +CONV_BYTE_ARRAY.put(int[].class, BYTE_ARRAY_TO_INT_ARRAY); +CONV_BYTE_ARRAY.put(long[].class, BYTE_ARRAY_TO_LONG_ARRAY); } /** @@ -195,6 +211,8 @@ public class ProviderBuilder { nativeSeed = CONV_INT_ARRAY.get(source.getSeed()).convert((int[]) seed); } else if (seed instanceof long[]) { nativeSeed = CONV_LONG_ARRAY.get(source.getSeed()).convert((long[]) seed); +} else if (seed instanceof byte[]) { +nativeSeed = CONV_BYTE_ARRAY.get(source.getSeed()).convert((byte[]) seed); } if (nativeSeed == null) { http://git-wip-us.apache.org/repos/asf/commons-rng/blob/ce472749/src/main/java/org/apache/commons/rng/internal/util/ByteArray2IntArray.java -- diff --git a/src/main/java/org/apache/commons/rng/internal/util/ByteArray2IntArray.java b/src/main/java/org/apache/commons/rng/internal/util/ByteArray2IntArray.java new file mode 100644 index 000..17bb19b --- /dev/null ++
commons-rng git commit: Unit test.
Repository: commons-rng Updated Branches: refs/heads/master 3a703ee1a -> 5dd1aeff7 Unit test. Project: http://git-wip-us.apache.org/repos/asf/commons-rng/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-rng/commit/5dd1aeff Tree: http://git-wip-us.apache.org/repos/asf/commons-rng/tree/5dd1aeff Diff: http://git-wip-us.apache.org/repos/asf/commons-rng/diff/5dd1aeff Branch: refs/heads/master Commit: 5dd1aeff7e6926776f958587fa5b508b3c1585e0 Parents: 3a703ee Author: Gilles Authored: Fri Sep 2 03:39:11 2016 +0200 Committer: Gilles Committed: Fri Sep 2 03:39:11 2016 +0200 -- .../internal/util/IntArray2LongArrayTest.java | 39 1 file changed, 39 insertions(+) -- http://git-wip-us.apache.org/repos/asf/commons-rng/blob/5dd1aeff/src/test/java/org/apache/commons/rng/internal/util/IntArray2LongArrayTest.java -- diff --git a/src/test/java/org/apache/commons/rng/internal/util/IntArray2LongArrayTest.java b/src/test/java/org/apache/commons/rng/internal/util/IntArray2LongArrayTest.java new file mode 100644 index 000..57c2d7e --- /dev/null +++ b/src/test/java/org/apache/commons/rng/internal/util/IntArray2LongArrayTest.java @@ -0,0 +1,39 @@ +/* + * 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.rng.internal.util; + +import org.junit.Assert; +import org.junit.Test; + +/** + * Tests for the {@link IntArray2LongArray} converter. + */ +public class IntArray2LongArrayTest { +@Test +public void testSeedSizeIsMultipleOfLongSize() { +final int[] seed = new int[12]; +final long[] out = new IntArray2LongArray().convert(seed); +Assert.assertEquals(6, out.length); +} + +@Test +public void testSeedSizeIsNotMultipleOfLongSize() { +final int[] seed = new int[13]; +final long[] out = new IntArray2LongArray().convert(seed); +Assert.assertEquals(7, out.length); +} +}