summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorRobert Antoni Buj i Gelonch <robert.buj@gmail.com>2014-10-16 18:58:13 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-10-25 12:07:22 +0000
commite61c4b5f06241dd248cfe28b29cb658ea47bd72e (patch)
tree04aeef2097ccaeb16642b209e8d3c5c48c0161eb /qadevOOo
parentf824b1b575dbdb2bc515656a66cbb94764031a44 (diff)
java: prevent overflow by using 'long int' arithmetic in multiplication
Change-Id: I8dda8f4621f265208c713c9edcfe725f1c9c5998 Reviewed-on: https://gerrit.libreoffice.org/12001 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/runner/convwatch/SimpleFileSemaphore.java2
-rw-r--r--qadevOOo/runner/convwatch/TimeHelper.java2
-rw-r--r--qadevOOo/runner/graphical/TimeHelper.java2
-rw-r--r--qadevOOo/runner/helper/OfficeProvider.java2
-rw-r--r--qadevOOo/runner/helper/ProcessHandler.java2
5 files changed, 5 insertions, 5 deletions
diff --git a/qadevOOo/runner/convwatch/SimpleFileSemaphore.java b/qadevOOo/runner/convwatch/SimpleFileSemaphore.java
index 02c965ceb37f..7f1864f6293b 100644
--- a/qadevOOo/runner/convwatch/SimpleFileSemaphore.java
+++ b/qadevOOo/runner/convwatch/SimpleFileSemaphore.java
@@ -33,7 +33,7 @@ public class SimpleFileSemaphore /* extends *//* implements */
// wait a second here
try
{
- java.lang.Thread.sleep(_nSeconds * 1000);
+ java.lang.Thread.sleep(1000L * _nSeconds);
}
catch (InterruptedException e2)
{
diff --git a/qadevOOo/runner/convwatch/TimeHelper.java b/qadevOOo/runner/convwatch/TimeHelper.java
index abb68b7c6abe..8d5d79252d1f 100644
--- a/qadevOOo/runner/convwatch/TimeHelper.java
+++ b/qadevOOo/runner/convwatch/TimeHelper.java
@@ -29,7 +29,7 @@ public class TimeHelper
{
GlobalLogWriter.get().println("Wait " + _nSeconds + " sec. Reason: " + _sReason);
try {
- java.lang.Thread.sleep(_nSeconds * 1000);
+ java.lang.Thread.sleep(1000L * _nSeconds);
} catch (InterruptedException e2) {}
}
}
diff --git a/qadevOOo/runner/graphical/TimeHelper.java b/qadevOOo/runner/graphical/TimeHelper.java
index 6b885bb635b7..72809828ca0e 100644
--- a/qadevOOo/runner/graphical/TimeHelper.java
+++ b/qadevOOo/runner/graphical/TimeHelper.java
@@ -31,7 +31,7 @@ public class TimeHelper
{
GlobalLogWriter.println("Wait 0.25 * " + _nSeconds + " sec. Reason: " + _sReason);
try {
- java.lang.Thread.sleep(_nSeconds * 250);
+ java.lang.Thread.sleep(250L * _nSeconds);
} catch (InterruptedException e2) {}
}
diff --git a/qadevOOo/runner/helper/OfficeProvider.java b/qadevOOo/runner/helper/OfficeProvider.java
index cfb2e232376b..4be6c27b68ef 100644
--- a/qadevOOo/runner/helper/OfficeProvider.java
+++ b/qadevOOo/runner/helper/OfficeProvider.java
@@ -264,7 +264,7 @@ public class OfficeProvider implements AppProvider
{
try
{
- Thread.sleep(k * 500);
+ Thread.sleep(500L * k);
}
catch (InterruptedException ex)
{
diff --git a/qadevOOo/runner/helper/ProcessHandler.java b/qadevOOo/runner/helper/ProcessHandler.java
index 2554d16e0704..fb3ff77e8f28 100644
--- a/qadevOOo/runner/helper/ProcessHandler.java
+++ b/qadevOOo/runner/helper/ProcessHandler.java
@@ -446,7 +446,7 @@ public class ProcessHandler
try
{
- Thread.sleep(1000 * counter); // 5000
+ Thread.sleep(1000L * counter); // 5000
}
catch (InterruptedException e)
{