Add checkClasspathForConflicts Gradle task

* The new `checkClasspathForConflicts` will fail if modules has dependencies
containing the same classes.
One of the dependency must be excluded to avoid target classpath pollution
and possible conflicts
* Make the task working as `onlyIf { isCI }`
* Fix warning for illegal access in the `asciidoctorPdf` task add `--add-opens`
to its JVM
* Fix `DefaultHeaderChannelRegistry` for proper `MessageChannelWrapper` access
and change it to `record`
This commit is contained in:
Artem Bilan
2022-01-13 11:49:17 -05:00
parent 6ebdd4fbb6
commit 8e7a0a0de5
3 changed files with 59 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2021 the original author or authors.
* Copyright 2013-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -57,7 +57,7 @@ public class DefaultHeaderChannelRegistry extends IntegrationObjectSupport
protected final Map<String, MessageChannelWrapper> channels = new ConcurrentHashMap<>(); // NOSONAR
protected final String uuid = UUID.randomUUID().toString() + ":"; // NOSONAR
protected final String uuid = UUID.randomUUID() + ":"; // NOSONAR
private boolean removeOnGet;
@@ -228,16 +228,7 @@ public class DefaultHeaderChannelRegistry extends IntegrationObjectSupport
}
private static final class MessageChannelWrapper {
private final MessageChannel channel;
private final long expireAt;
MessageChannelWrapper(MessageChannel channel, long expireAt) {
this.channel = channel;
this.expireAt = expireAt;
}
protected record MessageChannelWrapper(MessageChannel channel, long expireAt) {
public long getExpireAt() {
return this.expireAt;