You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2019/03/19 11:04:28 UTC
[commons-rng] branch master updated: Get the absolute file then the
parent file.
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git
The following commit(s) were added to refs/heads/master by this push:
new 89b9d2a Get the absolute file then the parent file.
89b9d2a is described below
commit 89b9d2a05ecf8bed8cce5f1f20e0b47dd5c5f741
Author: aherbert <ah...@apache.org>
AuthorDate: Tue Mar 19 11:04:24 2019 +0000
Get the absolute file then the parent file.
Allows using the current directory to output results files (avoiding NPE
if parent file is null).
---
.../org/apache/commons/rng/examples/stress/RandomStressTester.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/commons-rng-examples/examples-stress/src/main/java/org/apache/commons/rng/examples/stress/RandomStressTester.java b/commons-rng-examples/examples-stress/src/main/java/org/apache/commons/rng/examples/stress/RandomStressTester.java
index 4de2395..d0ac345 100644
--- a/commons-rng-examples/examples-stress/src/main/java/org/apache/commons/rng/examples/stress/RandomStressTester.java
+++ b/commons-rng-examples/examples-stress/src/main/java/org/apache/commons/rng/examples/stress/RandomStressTester.java
@@ -82,7 +82,7 @@ public class RandomStressTester {
cmdLine = new ArrayList<String>(cmd);
fileOutputPrefix = outputPrefix;
- final File reportDir = new File(fileOutputPrefix).getParentFile();
+ final File reportDir = new File(fileOutputPrefix).getAbsoluteFile().getParentFile();
if (!reportDir.exists() ||
!reportDir.isDirectory() ||
!reportDir.canWrite()) {
@@ -226,7 +226,7 @@ public class RandomStressTester {
try {
while (true) {
- sink.writeInt(rng.nextInt());
+ sink.writeInt(Integer.reverseBytes(rng.nextInt()));
}
} catch (IOException e) {
// Hopefully getting here when the analyzing software terminates.