Skip to content
Permalink
Browse files
IGNITE-12959: Add support for GenericWhitespace to checkstyle rules (#…
  • Loading branch information
NSAmelchev committed Apr 28, 2020
1 parent 3569a02 commit bf88f0c168d93cf823e5e8a677749517cea88b47
Show file tree
Hide file tree
Showing 15 changed files with 21 additions and 15 deletions.
@@ -103,5 +103,11 @@
See: https://checkstyle.sourceforge.io/config_whitespace.html#SingleSpaceSeparator
-->
<module name="SingleSpaceSeparator"/>

<!--
Checks that the whitespace around the Generic tokens are correct.
See: https://checkstyle.sourceforge.io/config_whitespace.html#GenericWhitespace
-->
<module name="GenericWhitespace"/>
</module>
</module>
@@ -142,7 +142,7 @@ public void testOneNodeDefaultHostAndPort() throws Exception {
public void testResolveReachableOneAddress() throws Exception {
InetAddress addr = InetAddress.getByAddress(new byte[] {127, 0, 0, 1} );

List <InetAddress> filtered = IgniteUtils.filterReachable(Collections.singletonList(addr));
List<InetAddress> filtered = IgniteUtils.filterReachable(Collections.singletonList(addr));

assertEquals(1, filtered.size());
assertEquals(addr, filtered.get(0));
@@ -21,7 +21,7 @@
* @param <T> Type for iterator.
* @param <V> Type for cache query future.
*/
public abstract class CacheIteratorConverter <T, V> {
public abstract class CacheIteratorConverter<T, V> {
/**
* Converts class V to class T.
*
@@ -2125,6 +2125,6 @@ public static boolean isCacheTemplateName(String cacheName) {
*
*/
public interface BackupPostProcessingClosure extends IgniteInClosure<Collection<GridCacheEntryInfo>>,
IgniteBiInClosure<CacheObject, GridCacheVersion>{
IgniteBiInClosure<CacheObject, GridCacheVersion> {
}
}
@@ -48,7 +48,7 @@ class CacheContinuousQueryAcknowledgeBuffer {
* @return Non-null tuple if acknowledge should be sent to backups.
*/
@SuppressWarnings("unchecked")
@Nullable synchronized IgniteBiTuple<Map<Integer, Long>, Set<AffinityTopologyVersion>>onAcknowledged(
@Nullable synchronized IgniteBiTuple<Map<Integer, Long>, Set<AffinityTopologyVersion>> onAcknowledged(
GridContinuousBatch batch) {
assert batch instanceof GridContinuousQueryBatch;

@@ -2614,7 +2614,7 @@ public <K, V> QueryCursor<Cache.Entry<K,V>> querySql(
).get(0);

// Convert.
QueryKeyValueIterable<K, V>converted = new QueryKeyValueIterable<>(res);
QueryKeyValueIterable<K, V> converted = new QueryKeyValueIterable<>(res);

return new QueryCursorImpl<Cache.Entry<K, V>>(converted) {
@Override public void close() {
@@ -116,7 +116,7 @@ public void testUnloadEvents() throws Exception {

checkObjectUnloadEvents(objEvts, g1, g2Keys);

Collection <Event> partEvts =
Collection<Event> partEvts =
g1.events().localQuery(F.<Event>alwaysTrue(), EVT_CACHE_REBALANCE_PART_UNLOADED);

checkPartitionUnloadEvents(partEvts, g1, dht(g2.cache(DEFAULT_CACHE_NAME)).topology().localPartitions());
@@ -253,7 +253,7 @@ public void testLocalProxyInvocation() throws Exception {
for (int i = 0; i < nodeCount(); i++) {
final int idx = i;

final AtomicReference< MapService<Integer, String>> ref = new AtomicReference<>();
final AtomicReference<MapService<Integer, String>> ref = new AtomicReference<>();

//wait because after deployNodeSingleton we don't have guarantees what service was deploy.
boolean wait = GridTestUtils.waitForCondition(new PA() {
@@ -46,7 +46,7 @@ public class GridConcurrentMultiPairQueueTest extends GridCommonAbstractTest {
Map<Integer, Collection<Integer>> mapForCheck;

/** */
Map<Integer, Collection<Integer>>mapForCheck2;
Map<Integer, Collection<Integer>> mapForCheck2;

/** */
Integer[] arr2 = {2, 4};
@@ -136,7 +136,7 @@ public void testSendOrderedDefaultMode() throws Exception {

final List<String> msgs = orderedMessages();

sendOrdered(ignite1.message(), msgs, new IgniteBiInClosure< List<String>, List<Thread>>() {
sendOrdered(ignite1.message(), msgs, new IgniteBiInClosure<List<String>, List<Thread>>() {
@Override public void apply(List<String> received, List<Thread> threads) {
assertFalse(threads.contains(Thread.currentThread()));
assertTrue(msgs.equals(received));
@@ -424,7 +424,7 @@ private void sendOrderedWith2Node(
* @param cls Callback for compare result.
* @throws Exception If failed.
*/
private<T> void sendOrdered(
private <T> void sendOrdered(
final IgniteMessaging igniteMsg,
final List<T> msgs,
final IgniteBiInClosure<List<T>,List<Thread>> cls
@@ -44,7 +44,7 @@ public static class DynamicReproducingSuite extends Suite {
* @return List of test(s) for reproduction some problem.
*/
private static List<Class<?>> classes() {
List <Class<?>> suite = new ArrayList<>();
List<Class<?>> suite = new ArrayList<>();

suite.add(IgniteReproducingSuite.TestStub.class);

@@ -197,7 +197,7 @@ V getValue() throws IgniteCheckedException {
* @param <K> the type of the key.
* @param <V> the type of the value.
*/
public interface ValueFactory <K, V> {
public interface ValueFactory<K, V> {
/**
* Creates the new value. Should never return null.
*
@@ -174,7 +174,7 @@ public void testFieldsQueryReplicatedTransactional() throws Exception {
* @throws Exception If failed.
*/
private void checkFieldsQuery(CacheMode cacheMode, CacheAtomicityMode atomicity) throws Exception {
IgniteCache<Object, Object>cache = grid(GRID_CNT - 1).getOrCreateCache(cache(cacheMode, atomicity));
IgniteCache<Object, Object> cache = grid(GRID_CNT - 1).getOrCreateCache(cache(cacheMode, atomicity));

try {
populate(cache);
@@ -41,7 +41,7 @@ public class LongIndexNameTest extends AbstractIndexingCommonTest {
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
return super.getConfiguration(igniteInstanceName)
.setDataStorageConfiguration(new DataStorageConfiguration())
.setCacheConfiguration(new <String, Person>CacheConfiguration("cache")
.setCacheConfiguration(new CacheConfiguration<String, Person>("cache")
.setQueryEntities(getIndexCfg())
.setAffinity(new RendezvousAffinityFunction(false, 16)));
}
@@ -83,7 +83,7 @@ public Set<String> unsignedTypes(DatabaseMetaData dbMeta) throws SQLException {
* @param idxs Table indexes.
* @return New {@code DbTable} instance.
*/
protected DbTable table(String schema, String tbl, Collection<DbColumn> cols, Collection<QueryIndex>idxs) {
protected DbTable table(String schema, String tbl, Collection<DbColumn> cols, Collection<QueryIndex> idxs) {
Collection<VisorQueryIndex> res = new ArrayList<>(idxs.size());

for (QueryIndex idx : idxs)

0 comments on commit bf88f0c

Please sign in to comment.