'long' literal ending with 'l' instead of 'L' fix applied

This commit is contained in:
Tagir Valeev
2018-09-26 17:06:04 +07:00
parent c8e4fbf305
commit 7bb743637f
4 changed files with 13 additions and 13 deletions
@@ -116,7 +116,7 @@ public class ActionUtil {
final boolean isSlow = ud.averageUpdateDurationMs > 10;// empiric val: 10 ms
final long startTimeNs = System.nanoTime();
final long relaxMs = Math.min(ud.averageUpdateDurationMs*100, 10000); // empiric vals: min 1 sec, max 10 sec
if (isSlow && ud.lastUpdateEvent != null && (forceUseCached || (startTimeNs - ud.lastUpdateTimeNs)/1000000l < relaxMs)) {
if (isSlow && ud.lastUpdateEvent != null && (forceUseCached || (startTimeNs - ud.lastUpdateTimeNs) / 1000000L < relaxMs)) {
// System.out.println("use cached presentation for action '" + String.valueOf(action) + "', averageUpdateDuration=" + ud.averageUpdateDurationMs + " ms, " + (startTimeNs - ud.lastUpdateTimeNs)/1000000l + " ms elapsed from last update");
event.getPresentation().copyFrom(ud.lastUpdateEvent.getPresentation());
return;
@@ -130,7 +130,7 @@ public class ActionUtil {
final float smoothAlpha = isSlow ? 0.8f : 0.3f;
final float smoothCoAlpha = 1 - smoothAlpha;
final long spentMs = (finishUpdateNs - startTimeNs)/1000000l;
final long spentMs = (finishUpdateNs - startTimeNs) / 1000000L;
ud.averageUpdateDurationMs = Math.round(spentMs*smoothAlpha + ud.averageUpdateDurationMs*smoothCoAlpha);
}
@@ -239,7 +239,7 @@ class TouchBar implements NSTLibrary.ItemCreator {
// When user types text and presses modifier keys it causes to show alternative touchbar layouts, some of them are visible less than second.
// To avoid unnecessary slow-update invocations for such bars we always try to use cached presentations for the first 500 ms (for slow actions only)
final long elapsedFromStartShowNs = System.nanoTime() - myStartShowNs;
final boolean forceUseCached = elapsedFromStartShowNs < 500*1000000l;
final boolean forceUseCached = elapsedFromStartShowNs < 500 * 1000000L;
final boolean[] layoutChanged = new boolean[]{false};
forEachDeep(tbitem->{
@@ -201,7 +201,7 @@ public class SMTestRunnerResultsFormTest extends BaseSMTRunnerTestCase {
myResultsViewer.performUpdate();
PlatformTestUtil.waitWhileBusy(myResultsViewer.getTreeView());
myEventsProcessor.onTestFinished(new TestFinishedEvent("test_failed", 10l));
myEventsProcessor.onTestFinished(new TestFinishedEvent("test_failed", 10L));
myResultsViewer.performUpdate();
PlatformTestUtil.waitWhileBusy(myResultsViewer.getTreeView());
@@ -211,7 +211,7 @@ public class SMTestRunnerResultsFormTest extends BaseSMTRunnerTestCase {
assertEquals(2, myTreeModel.getChildCount(myTreeModel.getChild(myTreeModel.getRoot(), 0)));
myEventsProcessor.onTestFinished(new TestFinishedEvent("test", 10l));
myEventsProcessor.onTestFinished(new TestFinishedEvent("test", 10L));
PlatformTestUtil.waitWhileBusy(myResultsViewer.getTreeView());
assertEquals(2, myTreeModel.getChildCount(myTreeModel.getChild(myTreeModel.getRoot(), 0)));
@@ -233,13 +233,13 @@ public class SMTestRunnerResultsFormTest extends BaseSMTRunnerTestCase {
myResultsViewer.performUpdate();
myEventsProcessor.onTestFailure(new TestFailedEvent("test_failed", "", "", false, null, null));
myResultsViewer.performUpdate();
myEventsProcessor.onTestFinished(new TestFinishedEvent("test_failed", 10l));
myEventsProcessor.onTestFinished(new TestFinishedEvent("test_failed", 10L));
myResultsViewer.performUpdate();
myEventsProcessor.onTestStarted(new TestStartedEvent("test", null));
myResultsViewer.performUpdate();
myEventsProcessor.onTestFinished(new TestFinishedEvent("test", 10l));
myEventsProcessor.onTestFinished(new TestFinishedEvent("test", 10L));
myResultsViewer.performUpdate();
myEventsProcessor.onSuiteFinished(new TestSuiteFinishedEvent("suite2"));
@@ -279,7 +279,7 @@ public class SMTestRunnerResultsFormTest extends BaseSMTRunnerTestCase {
myResultsViewer.performUpdate();
myEventsProcessor.onTestFailure(new TestFailedEvent("test1", "", "", false, "a", "b"));
myResultsViewer.performUpdate();
myEventsProcessor.onTestFinished(new TestFinishedEvent("test1", 10l));
myEventsProcessor.onTestFinished(new TestFinishedEvent("test1", 10L));
myResultsViewer.performUpdate();
myEventsProcessor.onSuiteFinished(new TestSuiteFinishedEvent("suite1"));
myResultsViewer.performUpdate();
@@ -308,7 +308,7 @@ public class SMTestRunnerResultsFormTest extends BaseSMTRunnerTestCase {
myEventsProcessor.onTestFailure(new TestFailedEvent("test1", "", "", false, "a", "b"));
myResultsViewer.performUpdate();
myEventsProcessor.onTestFinished(new TestFinishedEvent("test1", 10l));
myEventsProcessor.onTestFinished(new TestFinishedEvent("test1", 10L));
myResultsViewer.performUpdate();
myEventsProcessor.onSuiteFinished(new TestSuiteFinishedEvent("suite1"));
myResultsViewer.performUpdate();
@@ -53,10 +53,10 @@ public class FoundationTest {
assertThat(Foundation.getEncodingName(10), equalTo("utf-16"));
assertThat(Foundation.getEncodingCode("utf-16"), equalTo(10L));
assertThat(Foundation.getEncodingName(2483028224l), equalTo("utf-16le"));
assertThat(Foundation.getEncodingCode("utf-16le"), equalTo(2483028224l));
assertThat(Foundation.getEncodingName(2415919360l), equalTo("utf-16be"));
assertThat(Foundation.getEncodingCode("utf-16be"), equalTo(2415919360l));
assertThat(Foundation.getEncodingName(2483028224L), equalTo("utf-16le"));
assertThat(Foundation.getEncodingCode("utf-16le"), equalTo(2483028224L));
assertThat(Foundation.getEncodingName(2415919360L), equalTo("utf-16be"));
assertThat(Foundation.getEncodingCode("utf-16be"), equalTo(2415919360L));
}
@Test