mirror of
https://github.com/opennetworkinglab/onos.git
synced 2026-05-05 04:06:49 +02:00
Update checkstyle to version 6.19
Change-Id: I32787f2a5f4f4b17fd4cdcf9bd2eb3903dcecfff
This commit is contained in:
parent
3d8d93318b
commit
88cc3432cf
@ -304,7 +304,7 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu
|
||||
List<Resource> tributarySlotResources = portsList.stream()
|
||||
.flatMap(cp -> tributarySlots
|
||||
.stream()
|
||||
.map(ts-> Resources.discrete(cp.deviceId(), cp.port()).resource().child(ts)))
|
||||
.map(ts -> Resources.discrete(cp.deviceId(), cp.port()).resource().child(ts)))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
if (!tributarySlotResources.stream().allMatch(resourceService::isAvailable)) {
|
||||
|
||||
@ -210,7 +210,7 @@ public class OpticalOduIntentCompiler implements IntentCompiler<OpticalOduIntent
|
||||
Set<Resource> resources = slotsMap.entrySet().stream()
|
||||
.flatMap(x -> x.getValue()
|
||||
.stream()
|
||||
.flatMap(ts-> Stream.of(
|
||||
.flatMap(ts -> Stream.of(
|
||||
Resources.discrete(x.getKey().src().deviceId(), x.getKey().src().port())
|
||||
.resource().child(ts),
|
||||
Resources.discrete(x.getKey().dst().deviceId(), x.getKey().dst().port())
|
||||
@ -386,4 +386,4 @@ public class OpticalOduIntentCompiler implements IntentCompiler<OpticalOduIntent
|
||||
Resources.discrete(cp.deviceId(), cp.port()).id(),
|
||||
TributarySlot.class);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -268,7 +268,9 @@ public class MessagingPerfApp {
|
||||
communicationService.<Data>addSubscriber(
|
||||
TEST_UNICAST_MESSAGE_TOPIC,
|
||||
decoder,
|
||||
d -> { received.incrementAndGet(); },
|
||||
d -> {
|
||||
received.incrementAndGet();
|
||||
},
|
||||
messageReceivingExecutor);
|
||||
|
||||
communicationService.<Data, Data>addSubscriber(
|
||||
|
||||
@ -379,7 +379,7 @@ public class SfcFlowRuleInstallerImpl implements SfcFlowRuleInstallerService {
|
||||
Set<PortNumber> ports = bridgeConfig.getPortNumbers();
|
||||
String tunnelName = "vxlan-" + DEFAULT_IP;
|
||||
ports.stream()
|
||||
.filter(p ->p.name().equalsIgnoreCase(tunnelName))
|
||||
.filter(p -> p.name().equalsIgnoreCase(tunnelName))
|
||||
.forEach(p -> {
|
||||
treatment.setOutput(p);
|
||||
sendSfcRule(selector, treatment, deviceId, type, TUNNEL_SEND_PRIORITY);
|
||||
@ -899,8 +899,8 @@ public class SfcFlowRuleInstallerImpl implements SfcFlowRuleInstallerService {
|
||||
private PortNumber getVxlanPortNumber(DeviceId deviceId) {
|
||||
Iterable<Port> ports = deviceService.getPorts(deviceId);
|
||||
Port vxlanPort = Sets.newHashSet(ports).stream()
|
||||
.filter(p ->!p.number().equals(PortNumber.LOCAL))
|
||||
.filter(p ->p.annotations().value(AnnotationKeys.PORT_NAME)
|
||||
.filter(p -> !p.number().equals(PortNumber.LOCAL))
|
||||
.filter(p -> p.annotations().value(AnnotationKeys.PORT_NAME)
|
||||
.startsWith(VXLANPORT_HEAD))
|
||||
.findFirst().get();
|
||||
return vxlanPort.number();
|
||||
|
||||
@ -148,11 +148,11 @@ public class SfcManager implements SfcService {
|
||||
|
||||
nshSpiPortChainMap = storageService.<PortChainId, Integer>eventuallyConsistentMapBuilder()
|
||||
.withName("nshSpiPortChainMap").withSerializer(serializer)
|
||||
.withTimestampProvider((k, v) ->new WallClockTimestamp()).build();
|
||||
.withTimestampProvider((k, v) -> new WallClockTimestamp()).build();
|
||||
|
||||
portChainFiveTupleMap = storageService.<PortChainId, List<FiveTuple>>eventuallyConsistentMapBuilder()
|
||||
.withName("portChainFiveTupleMap").withSerializer(serializer)
|
||||
.withTimestampProvider((k, v) ->new WallClockTimestamp()).build();
|
||||
.withTimestampProvider((k, v) -> new WallClockTimestamp()).build();
|
||||
|
||||
nshSpiIdFreeList = storageService.<Integer>setBuilder()
|
||||
.withName("nshSpiIdDeletedList")
|
||||
|
||||
@ -83,7 +83,7 @@ public class VirtualPortBindCommand extends AbstractShellCommand {
|
||||
VirtualNetworkService service = get(VirtualNetworkService.class);
|
||||
Set<VirtualPort> ports = service.getVirtualPorts(NetworkId.networkId(networkId),
|
||||
DeviceId.deviceId(deviceId));
|
||||
return ports.stream().filter(p->p.number().equals(aPortNumber))
|
||||
return ports.stream().filter(p -> p.number().equals(aPortNumber))
|
||||
.findFirst().get();
|
||||
}
|
||||
}
|
||||
|
||||
@ -360,8 +360,7 @@ public class FlowRuleCodecTest {
|
||||
checkCommonData(rule);
|
||||
|
||||
rule.treatment().allInstructions()
|
||||
.forEach(instruction ->
|
||||
{
|
||||
.forEach(instruction -> {
|
||||
String subType;
|
||||
if (instruction.type() == Instruction.Type.L0MODIFICATION) {
|
||||
subType = ((L0ModificationInstruction) instruction)
|
||||
|
||||
@ -416,7 +416,7 @@ public class SimpleGroupStore
|
||||
Optional<GroupBucket> matchingBucket =
|
||||
existing.buckets().buckets()
|
||||
.stream()
|
||||
.filter((existingBucket)->(existingBucket.equals(bucket)))
|
||||
.filter((existingBucket) -> (existingBucket.equals(bucket)))
|
||||
.findFirst();
|
||||
if (matchingBucket.isPresent()) {
|
||||
((StoredGroupBucketEntry) matchingBucket.
|
||||
|
||||
@ -197,10 +197,14 @@ public class DistributedFlowStatisticStore implements FlowStatisticStore {
|
||||
|
||||
// create one if absent and add this rule
|
||||
current.putIfAbsent(cp, new HashSet<>());
|
||||
current.computeIfPresent(cp, (c, e) -> { e.add(rule); return e; });
|
||||
current.computeIfPresent(cp, (c, e) -> {
|
||||
e.add(rule); return e;
|
||||
});
|
||||
|
||||
// remove previous one if present
|
||||
previous.computeIfPresent(cp, (c, e) -> { e.remove(rule); return e; });
|
||||
previous.computeIfPresent(cp, (c, e) -> {
|
||||
e.remove(rule); return e;
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -117,7 +117,7 @@ public class AtomixConsistentTreeMapTest extends AtomixTestBase {
|
||||
result.value())).join());
|
||||
//test all compute methods in this section
|
||||
allKeys.forEach(key -> map.computeIfAbsent(
|
||||
key, v ->allValues.get(allKeys.indexOf(key)
|
||||
key, v -> allValues.get(allKeys.indexOf(key)
|
||||
)).thenAccept(result ->
|
||||
assertArrayEquals(
|
||||
allValues.get(allKeys.indexOf(key)),
|
||||
@ -657,4 +657,4 @@ public class AtomixConsistentTreeMapTest extends AtomixTestBase {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -412,7 +412,7 @@ public class SimpleVirtualGroupStore
|
||||
Optional<GroupBucket> matchingBucket =
|
||||
existing.buckets().buckets()
|
||||
.stream()
|
||||
.filter((existingBucket)->(existingBucket.equals(bucket)))
|
||||
.filter((existingBucket) -> (existingBucket.equals(bucket)))
|
||||
.findFirst();
|
||||
if (matchingBucket.isPresent()) {
|
||||
((StoredGroupBucketEntry) matchingBucket.
|
||||
|
||||
10
lib/BUCK
10
lib/BUCK
@ -1,4 +1,4 @@
|
||||
# ***** This file was auto-generated at Fri, 24 Mar 2017 18:02:30 GMT. Do not edit this file manually. *****
|
||||
# ***** This file was auto-generated at Thu, 30 Mar 2017 23:42:03 GMT. Do not edit this file manually. *****
|
||||
# ***** Use onos-lib-gen *****
|
||||
|
||||
pass_thru_pom(
|
||||
@ -1031,10 +1031,10 @@ remote_jar (
|
||||
|
||||
remote_jar (
|
||||
name = 'checkstyle',
|
||||
out = 'checkstyle-6.11.2.jar',
|
||||
url = 'mvn:com.puppycrawl.tools:checkstyle:jar:6.11.2',
|
||||
sha1 = '2705f014697ac0219de0bb2bfc33afb7ec6d22c6',
|
||||
maven_coords = 'com.puppycrawl.tools:checkstyle:jar:NON-OSGI:6.11.2',
|
||||
out = 'checkstyle-6.19.jar',
|
||||
url = 'mvn:com.puppycrawl.tools:checkstyle:jar:6.19',
|
||||
sha1 = 'df5c3a46239d66c623922992a98080ae7f6cc932',
|
||||
maven_coords = 'com.puppycrawl.tools:checkstyle:jar:NON-OSGI:6.19',
|
||||
visibility = [ 'PUBLIC' ],
|
||||
)
|
||||
|
||||
|
||||
@ -191,7 +191,7 @@
|
||||
"slf4j-jdk14": "mvn:org.slf4j:slf4j-jdk14:1.7.21",
|
||||
"typesafe-config": "mvn:com.typesafe:config:1.2.1",
|
||||
"validation-api": "mvn:javax.validation:validation-api:1.1.0.Final",
|
||||
"checkstyle": "mvn:com.puppycrawl.tools:checkstyle:6.11.2",
|
||||
"checkstyle": "mvn:com.puppycrawl.tools:checkstyle:6.19",
|
||||
"apache-karaf": "http://onlab.vicci.org/onos/third-party/apache-karaf-3.0.8-offline-20170202.tar.gz",
|
||||
"bndlib": "mvn:biz.aQute.bnd:biz.aQute.bndlib:jar:3.1.0",
|
||||
"bndexe": "http://onlab.vicci.org/onos/third-party/biz.aQute.bnd-3.1.0.jar",
|
||||
|
||||
@ -273,14 +273,15 @@ public class TopologyForDeviceAndLinkImpl implements TopologyForDeviceAndLink {
|
||||
}
|
||||
}
|
||||
return isisRouter;
|
||||
}/*
|
||||
}
|
||||
|
||||
*//**
|
||||
/**
|
||||
* Removes Device and Link instance.
|
||||
*
|
||||
* @param lsPdu ISIS LSPDU instance
|
||||
* @return isisRouter isisRouter instance
|
||||
*//*
|
||||
*/
|
||||
/*
|
||||
public IsisRouter removeDeviceAndLinkInfo(LsPdu lsPdu) {
|
||||
IsisRouter isisRouter = createIsisRouter(lsPdu);
|
||||
return isisRouter;
|
||||
@ -487,4 +488,4 @@ public class TopologyForDeviceAndLinkImpl implements TopologyForDeviceAndLink {
|
||||
}
|
||||
return isisLinkTed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,4 +73,9 @@ public final class ChassisId extends Identifier<Long> {
|
||||
public int hashCode() {
|
||||
return Long.hashCode(identifier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
return super.equals(that);
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ public class ONOSLLDP extends LLDP {
|
||||
private final byte[] ttlValue = new byte[] {0, 0x78};
|
||||
|
||||
// Only needs to be accessed from LinkProbeFactory.
|
||||
public ONOSLLDP(byte ... subtype) {
|
||||
public ONOSLLDP(byte... subtype) {
|
||||
super();
|
||||
for (byte st : subtype) {
|
||||
opttlvs.put(st, new LLDPOrganizationalTLV());
|
||||
|
||||
@ -123,6 +123,11 @@ public class PredictableExecutorTest {
|
||||
public int hashCode() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
latch.await(1, TimeUnit.SECONDS);
|
||||
|
||||
@ -199,8 +199,7 @@ public class NetworkConfigWebResource extends AbstractWebResource {
|
||||
ObjectNode root = (ObjectNode) mapper().readTree(request);
|
||||
List<String> errorMsgs = new ArrayList<String>();
|
||||
root.fieldNames()
|
||||
.forEachRemaining(sk ->
|
||||
{
|
||||
.forEachRemaining(sk -> {
|
||||
errorMsgs.addAll(consumeJson(service, (ObjectNode) root.path(sk),
|
||||
service.getSubjectFactory(sk)));
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user