style: use uppercase L instead of lowercase version for better readability

This commit is contained in:
broDom
2017-07-03 17:16:54 +02:00
parent c91b3a39cd
commit efac49ccf7
22 changed files with 48 additions and 48 deletions

View File

@@ -177,8 +177,8 @@ public abstract class CacheTestBase
// skip test if implementation does not support stats
Assume.assumeTrue( stats != null );
assertEquals("test", stats.getName());
assertEquals(0l, stats.getHitCount());
assertEquals(0l, stats.getMissCount());
assertEquals(0L, stats.getHitCount());
assertEquals(0L, stats.getMissCount());
cache.put("test-1", "test123");
cache.put("test-2", "test456");
cache.get("test-1");
@@ -186,11 +186,11 @@ public abstract class CacheTestBase
cache.get("test-1");
cache.get("test-3");
// check that stats have not changed
assertEquals(0l, stats.getHitCount());
assertEquals(0l, stats.getMissCount());
assertEquals(0L, stats.getHitCount());
assertEquals(0L, stats.getMissCount());
stats = cache.getStatistics();
assertEquals(3l, stats.getHitCount());
assertEquals(1l, stats.getMissCount());
assertEquals(3L, stats.getHitCount());
assertEquals(1L, stats.getMissCount());
assertEquals(0.75d, stats.getHitRate(), 0.0d);
assertEquals(0.25d, stats.getMissRate(), 0.0d);
}

View File

@@ -63,7 +63,7 @@ public class GuavaConfigurationReaderTest
GuavaCacheConfiguration cfg =
readConfiguration("gcache.001.xml").getDefaultCache();
assertCacheValues(cfg, 200l, 1200l, 2400l);
assertCacheValues(cfg, 200L, 1200L, 2400L);
}
/**
@@ -82,10 +82,10 @@ public class GuavaConfigurationReaderTest
//J+
// cache sonia.test.cache.001 override by cache.004.xml
assertCacheValues(getCache(gcm, "sonia.test.cache.001"), 6l, 2l, 8l);
assertCacheValues(getCache(gcm, "sonia.test.cache.002"), 1000l, 120l, 60l);
assertCacheValues(getCache(gcm, "sonia.test.cache.003"), 3000l, 120l,
2400l);
assertCacheValues(getCache(gcm, "sonia.test.cache.001"), 6L, 2L, 8L);
assertCacheValues(getCache(gcm, "sonia.test.cache.002"), 1000L, 120L, 60L);
assertCacheValues(getCache(gcm, "sonia.test.cache.003"), 3000L, 120L,
2400L);
}
/**
@@ -100,8 +100,8 @@ public class GuavaConfigurationReaderTest
// check default
assertCacheValues(getCache(gcm, "sonia.test.cache.001"), 1000l, 60l, 30l);
assertCacheValues(getCache(gcm, "sonia.test.cache.002"), 1000l, 120l, 60l);
assertCacheValues(getCache(gcm, "sonia.test.cache.001"), 1000L, 60L, 30L);
assertCacheValues(getCache(gcm, "sonia.test.cache.002"), 1000L, 120L, 60L);
}
/**
@@ -115,10 +115,10 @@ public class GuavaConfigurationReaderTest
Iterators.forArray("gcache.002.xml",
"gcache.003.xml"));
assertCacheValues(getCache(gcm, "sonia.test.cache.001"), 1000l, 60l, 30l);
assertCacheValues(getCache(gcm, "sonia.test.cache.002"), 1000l, 120l, 60l);
assertCacheValues(getCache(gcm, "sonia.test.cache.003"), 3000l, 120l,
2400l);
assertCacheValues(getCache(gcm, "sonia.test.cache.001"), 1000L, 60L, 30L);
assertCacheValues(getCache(gcm, "sonia.test.cache.002"), 1000L, 120L, 60L);
assertCacheValues(getCache(gcm, "sonia.test.cache.003"), 3000L, 120L,
2400L);
}
/**
@@ -131,7 +131,7 @@ public class GuavaConfigurationReaderTest
GuavaCacheConfiguration cfg =
readConfiguration("gcache.001.xml").getCaches().get(0);
assertCacheValues(cfg, 1000l, 60l, 30l);
assertCacheValues(cfg, 1000L, 60L, 30L);
}
/**
@@ -144,7 +144,7 @@ public class GuavaConfigurationReaderTest
GuavaCacheConfiguration cfg =
readConfiguration("gcache.002.xml").getCaches().get(0);
assertCacheValues(cfg, 1000l, 120l, 60l);
assertCacheValues(cfg, 1000L, 120L, 60L);
}
/**

View File

@@ -193,7 +193,7 @@ public class ChangesetViewerITCase extends AbstractAdminITCaseBase
if (sleep) {
// cache clear is async
Thread.sleep(500l);
Thread.sleep(500L);
}
ChangesetPagingResult cpr = getChangesets(repository);

View File

@@ -122,7 +122,7 @@ public abstract class HttpCacheITCaseBase<T>
long lastModified = getLastModified(response);
// wait 1 second because http date is not millisecond precision
Thread.sleep(1000l);
Thread.sleep(1000L);
item = createSampleItem();
response = getCollectionResponse();

View File

@@ -188,7 +188,7 @@ public class BearerRealmTest
resolveKey(key);
Date exp = new Date(System.currentTimeMillis() - 600l);
Date exp = new Date(System.currentTimeMillis() - 600L);
String compact = createCompactToken(trillian.getName(), key, exp, Scope.empty());
realm.doGetAuthenticationInfo(BearerToken.valueOf(compact));

View File

@@ -74,7 +74,7 @@ public class ConfigurableLoginAttemptHandlerTest {
handler.onUnsuccessfulAuthentication(token, new SimpleAuthenticationInfo());
handler.beforeAuthentication(token);
handler.onUnsuccessfulAuthentication(token, new SimpleAuthenticationInfo());
Thread.sleep(TimeUnit.MILLISECONDS.toMillis(1200l));
Thread.sleep(TimeUnit.MILLISECONDS.toMillis(1200L));
handler.beforeAuthentication(token);
}
@@ -111,4 +111,4 @@ public class ConfigurableLoginAttemptHandlerTest {
return new ConfigurableLoginAttemptHandler(configuration);
}
}
}

View File

@@ -132,7 +132,7 @@ public class JwtAccessTokenResolverTest {
resolveKey(secureKey);
// create expired token
Date exp = new Date(System.currentTimeMillis() - 600l);
Date exp = new Date(System.currentTimeMillis() - 600L);
String compact = createCompactToken("trillian", secureKey, exp, Scope.empty());
// expect exception
@@ -236,4 +236,4 @@ public class JwtAccessTokenResolverTest {
}
}
}