diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-12-21 17:52:32 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-12-21 17:52:59 +0100 |
commit | e0fd10bc42f335d6303b035c50a56cac336b907a (patch) | |
tree | 6561b59710df60a15d2a5308eb368789621ca94e /javaunohelper | |
parent | 29aec38789fa180964ce9f023c0c6808656591b5 (diff) |
cid#1343654 FindBugs: Bad practice (FB.DMI_RANDOM_USED_ONLY_ONCE)
Change-Id: Ifbc362835bc62578851a029e9c5ce8c20184846a
Diffstat (limited to 'javaunohelper')
-rw-r--r-- | javaunohelper/com/sun/star/comp/helper/Bootstrap.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java index d5711144bc9e..263398fef2ed 100644 --- a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java +++ b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java @@ -314,7 +314,7 @@ public class Bootstrap { // create random pipe name String sPipeName = "uno" + - Long.toString( (new Random()).nextLong() & 0x7fffffffffffffffL ); + Long.toString(randomPipeName.nextLong() & 0x7fffffffffffffffL); // create call with arguments String[] cmdArray = new String[ argArray.length + 2 ]; @@ -372,6 +372,8 @@ public class Bootstrap { return xContext; } + private static final Random randomPipeName = new Random(); + private static void pipe( final InputStream in, final PrintStream out, final String prefix ) { |