[Libreoffice-commits] core.git: javaunohelper/com
Stephan Bergmann
sbergman at redhat.com
Mon Dec 21 08:53:30 PST 2015
javaunohelper/com/sun/star/comp/helper/Bootstrap.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit e0fd10bc42f335d6303b035c50a56cac336b907a
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Dec 21 17:52:32 2015 +0100
cid#1343654 FindBugs: Bad practice (FB.DMI_RANDOM_USED_ONLY_ONCE)
Change-Id: Ifbc362835bc62578851a029e9c5ce8c20184846a
diff --git a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
index d571114..263398f 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 ) {
More information about the Libreoffice-commits
mailing list