Checkstyle OK locally but not on GH CI

Reformat experiment
This commit is contained in:
Gary Gregory 2024-10-03 17:43:12 -04:00
parent 8c34a14222
commit 1d1bab626c
1 changed files with 52 additions and 66 deletions

View File

@ -29,8 +29,7 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
/**
* Extension of {@link AbstractMapTest} for exercising the
* {@link CompositeMap} implementation.
* Extension of {@link AbstractMapTest} for exercising the {@link CompositeMap} implementation.
*
* @param <K> the key type.
* @param <V> the value type.
@ -69,7 +68,7 @@ public class CompositeMapTest<K, V> extends AbstractIterableMapTest<K, V> {
public CompositeMap<K, V> makeObject() {
final CompositeMap<K, V> map = new CompositeMap<>();
map.addComposited(new HashMap<>());
map.setMutator( new EmptyMapMutator<>() );
map.setMutator(new EmptyMapMutator<>());
return map;
}
@ -101,12 +100,11 @@ public class CompositeMapTest<K, V> extends AbstractIterableMapTest<K, V> {
@Test
@SuppressWarnings("unchecked")
public void testPut() {
final CompositeMap<K, V> map = new CompositeMap<>(buildOne(), buildTwo(),
new CompositeMap.MapMutator<K, V>() {
final CompositeMap<K, V> map = new CompositeMap<>(buildOne(), buildTwo(), new CompositeMap.MapMutator<K, V>() {
private static final long serialVersionUID = 1L;
@Override
public V put(final CompositeMap<K, V> map, final Map<K, V>[] composited, final K key,
final V value) {
public V put(final CompositeMap<K, V> map, final Map<K, V>[] composited, final K key, final V value) {
pass = true;
return (V) "foo";
}
@ -117,10 +115,7 @@ public class CompositeMapTest<K, V> extends AbstractIterableMapTest<K, V> {
}
@Override
public void resolveCollision(final CompositeMap<K, V> composite,
final Map<K, V> existing,
final Map<K, V> added,
final Collection<K> intersect) {
public void resolveCollision(final CompositeMap<K, V> composite, final Map<K, V> existing, final Map<K, V> added, final Collection<K> intersect) {
throw new UnsupportedOperationException();
}
});
@ -131,12 +126,11 @@ public class CompositeMapTest<K, V> extends AbstractIterableMapTest<K, V> {
@Test
public void testPutAll() {
final CompositeMap<K, V> map = new CompositeMap<>(buildOne(), buildTwo(),
new CompositeMap.MapMutator<K, V>() {
final CompositeMap<K, V> map = new CompositeMap<>(buildOne(), buildTwo(), new CompositeMap.MapMutator<K, V>() {
private static final long serialVersionUID = 1L;
@Override
public V put(final CompositeMap<K, V> map, final Map<K, V>[] composited, final K key,
final V value) {
public V put(final CompositeMap<K, V> map, final Map<K, V>[] composited, final K key, final V value) {
throw new UnsupportedOperationException();
}
@ -146,10 +140,7 @@ public class CompositeMapTest<K, V> extends AbstractIterableMapTest<K, V> {
}
@Override
public void resolveCollision(final CompositeMap<K, V> composite,
final Map<K, V> existing,
final Map<K, V> added,
final Collection<K> intersect) {
public void resolveCollision(final CompositeMap<K, V> composite, final Map<K, V> existing, final Map<K, V> added, final Collection<K> intersect) {
throw new UnsupportedOperationException();
}
});
@ -186,7 +177,7 @@ public class CompositeMapTest<K, V> extends AbstractIterableMapTest<K, V> {
map.addComposited(three);
assertTrue(map.containsKey("5"));
//Now remove "5"
// Now remove "5"
map.remove("5");
assertFalse(three.containsKey("5"));
}
@ -201,20 +192,18 @@ public class CompositeMapTest<K, V> extends AbstractIterableMapTest<K, V> {
map.addComposited(three);
assertTrue(map.containsKey("5"));
//Now remove "5"
// Now remove "5"
three.remove("5");
assertFalse(map.containsKey("5"));
}
@Test
public void testResolveCollision() {
final CompositeMap<K, V> map = new CompositeMap<>(buildOne(), buildTwo(),
new CompositeMap.MapMutator<K, V>() {
final CompositeMap<K, V> map = new CompositeMap<>(buildOne(), buildTwo(), new CompositeMap.MapMutator<K, V>() {
private static final long serialVersionUID = 1L;
@Override
public V put(final CompositeMap<K, V> map, final Map<K, V>[] composited, final K key,
final V value) {
public V put(final CompositeMap<K, V> map, final Map<K, V>[] composited, final K key, final V value) {
throw new UnsupportedOperationException();
}
@ -224,10 +213,7 @@ public class CompositeMapTest<K, V> extends AbstractIterableMapTest<K, V> {
}
@Override
public void resolveCollision(final CompositeMap<K, V> composite,
final Map<K, V> existing,
final Map<K, V> added,
final Collection<K> intersect) {
public void resolveCollision(final CompositeMap<K, V> composite, final Map<K, V> existing, final Map<K, V> added, final Collection<K> intersect) {
pass = true;
}
});