This is an automated email from the ASF dual-hosted git repository. btellier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 8eb044b723b9f760b89a5141d1e8af31b27cc78e Author: Romain Moreau <romainmor...@gmail.com> AuthorDate: Tue Feb 20 00:25:12 2024 +0100 JAMES-3730 CR fixes --- .../appended-resources/supplemental-models.xml | 2 +- .../src/assemble/license-for-binary.txt | 4 +-- .../apps/cli/src/assemble/license-for-binary.txt | 4 +-- .../src/assemble/license-for-binary.txt | 4 +-- .../jpa-app/src/assemble/license-for-binary.txt | 4 +-- .../src/assemble/license-for-binary.txt | 4 +-- .../memory-app/src/assemble/license-for-binary.txt | 4 +-- .../appended-resources/supplemental-models.xml | 4 +-- .../src/main/licensing/app/license-for-binary.txt | 4 +-- .../src/main/licensing/app/licensing.xml | 4 +-- .../apps/spring-app/src/main/licensing/war/LICENSE | 4 +-- .../src/main/licensing/war/licensing.xml | 4 +-- .../appended-resources/supplemental-models.xml | 4 +-- .../mailets/RecipientRewriteTableProcessor.java | 2 +- .../james/transport/mailets/RemoteDelivery.java | 10 +++---- .../org/apache/james/transport/mailets/SPF.java | 4 +-- .../mailets/delivery/MailboxAppenderImpl.java | 6 ++-- .../transport/mailets/jsieve/ActionDispatcher.java | 2 +- .../jmap/method/EmailSubmissionSetMethod.scala | 14 +++++----- .../jmap/change/MailboxChangeListenerTest.scala | 12 ++++---- .../webadmin/service/ClearMailRepositoryTask.java | 2 +- .../webadmin/service/ReprocessingAllMailsTask.java | 2 +- .../james/queue/pulsar/PulsarMailQueue.scala | 32 +++++++++++----------- .../appended-resources/supplemental-models.xml | 4 +-- 24 files changed, 70 insertions(+), 70 deletions(-) diff --git a/mailet/crypto/src/main/appended-resources/supplemental-models.xml b/mailet/crypto/src/main/appended-resources/supplemental-models.xml index e215ff019c..9bfb430a31 100644 --- a/mailet/crypto/src/main/appended-resources/supplemental-models.xml +++ b/mailet/crypto/src/main/appended-resources/supplemental-models.xml @@ -55,7 +55,7 @@ <supplement> <project> <groupId>org.bouncycastle</groupId> - <artifactId>bcjmail-jdk15on</artifactId> + <artifactId>bcjmail-jdk18on</artifactId> <name>Bouncy Castle Mail API</name> <organization> <name>The Legion of the Bouncy Castle</name> diff --git a/server/apps/cassandra-app/src/assemble/license-for-binary.txt b/server/apps/cassandra-app/src/assemble/license-for-binary.txt index 7f73a67419..c3342f633c 100644 --- a/server/apps/cassandra-app/src/assemble/license-for-binary.txt +++ b/server/apps/cassandra-app/src/assemble/license-for-binary.txt @@ -457,8 +457,8 @@ Within the lib directory WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. from The Legion of the Bouncy Castle http://www.bouncycastle.org/ - bcjmail-jdk15on-1.70.jar - bcprov-jdk15on-1.70.jar + bcjmail-jdk18on-1.77.jar + bcprov-jdk18on-1.77.jar licensed under the COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 http://www.opensource.org/licenses/CDDL-1.0 (as follows) diff --git a/server/apps/cli/src/assemble/license-for-binary.txt b/server/apps/cli/src/assemble/license-for-binary.txt index 7f73a67419..c3342f633c 100644 --- a/server/apps/cli/src/assemble/license-for-binary.txt +++ b/server/apps/cli/src/assemble/license-for-binary.txt @@ -457,8 +457,8 @@ Within the lib directory WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. from The Legion of the Bouncy Castle http://www.bouncycastle.org/ - bcjmail-jdk15on-1.70.jar - bcprov-jdk15on-1.70.jar + bcjmail-jdk18on-1.77.jar + bcprov-jdk18on-1.77.jar licensed under the COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 http://www.opensource.org/licenses/CDDL-1.0 (as follows) diff --git a/server/apps/distributed-app/src/assemble/license-for-binary.txt b/server/apps/distributed-app/src/assemble/license-for-binary.txt index 7f73a67419..c3342f633c 100644 --- a/server/apps/distributed-app/src/assemble/license-for-binary.txt +++ b/server/apps/distributed-app/src/assemble/license-for-binary.txt @@ -457,8 +457,8 @@ Within the lib directory WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. from The Legion of the Bouncy Castle http://www.bouncycastle.org/ - bcjmail-jdk15on-1.70.jar - bcprov-jdk15on-1.70.jar + bcjmail-jdk18on-1.77.jar + bcprov-jdk18on-1.77.jar licensed under the COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 http://www.opensource.org/licenses/CDDL-1.0 (as follows) diff --git a/server/apps/jpa-app/src/assemble/license-for-binary.txt b/server/apps/jpa-app/src/assemble/license-for-binary.txt index 7f73a67419..c3342f633c 100644 --- a/server/apps/jpa-app/src/assemble/license-for-binary.txt +++ b/server/apps/jpa-app/src/assemble/license-for-binary.txt @@ -457,8 +457,8 @@ Within the lib directory WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. from The Legion of the Bouncy Castle http://www.bouncycastle.org/ - bcjmail-jdk15on-1.70.jar - bcprov-jdk15on-1.70.jar + bcjmail-jdk18on-1.77.jar + bcprov-jdk18on-1.77.jar licensed under the COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 http://www.opensource.org/licenses/CDDL-1.0 (as follows) diff --git a/server/apps/jpa-smtp-app/src/assemble/license-for-binary.txt b/server/apps/jpa-smtp-app/src/assemble/license-for-binary.txt index 7f73a67419..c3342f633c 100644 --- a/server/apps/jpa-smtp-app/src/assemble/license-for-binary.txt +++ b/server/apps/jpa-smtp-app/src/assemble/license-for-binary.txt @@ -457,8 +457,8 @@ Within the lib directory WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. from The Legion of the Bouncy Castle http://www.bouncycastle.org/ - bcjmail-jdk15on-1.70.jar - bcprov-jdk15on-1.70.jar + bcjmail-jdk18on-1.77.jar + bcprov-jdk18on-1.77.jar licensed under the COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 http://www.opensource.org/licenses/CDDL-1.0 (as follows) diff --git a/server/apps/memory-app/src/assemble/license-for-binary.txt b/server/apps/memory-app/src/assemble/license-for-binary.txt index 7f73a67419..c3342f633c 100644 --- a/server/apps/memory-app/src/assemble/license-for-binary.txt +++ b/server/apps/memory-app/src/assemble/license-for-binary.txt @@ -457,8 +457,8 @@ Within the lib directory WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. from The Legion of the Bouncy Castle http://www.bouncycastle.org/ - bcjmail-jdk15on-1.70.jar - bcprov-jdk15on-1.70.jar + bcjmail-jdk18on-1.77.jar + bcprov-jdk18on-1.77.jar licensed under the COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 http://www.opensource.org/licenses/CDDL-1.0 (as follows) diff --git a/server/apps/spring-app/src/main/appended-resources/supplemental-models.xml b/server/apps/spring-app/src/main/appended-resources/supplemental-models.xml index 0ff6a0c8a3..9f150185c6 100644 --- a/server/apps/spring-app/src/main/appended-resources/supplemental-models.xml +++ b/server/apps/spring-app/src/main/appended-resources/supplemental-models.xml @@ -328,7 +328,7 @@ The Legion Of The Bouncy Castle <supplement> <project> <groupId>org.bouncycastle</groupId> - <artifactId>bcjmail-jdk15on</artifactId> + <artifactId>bcjmail-jdk18on</artifactId> <organization> <name>The Legion of the Bouncy Castle</name> <url>http://www.bouncycastle.org/</url> @@ -338,7 +338,7 @@ The Legion Of The Bouncy Castle <supplement> <project> <groupId>org.bouncycastle</groupId> - <artifactId>bcprov-jdk15on</artifactId> + <artifactId>bcprov-jdk18on</artifactId> <organization> <name>The Legion of the Bouncy Castle</name> <url>http://www.bouncycastle.org/</url> diff --git a/server/apps/spring-app/src/main/licensing/app/license-for-binary.txt b/server/apps/spring-app/src/main/licensing/app/license-for-binary.txt index 7f73a67419..c3342f633c 100644 --- a/server/apps/spring-app/src/main/licensing/app/license-for-binary.txt +++ b/server/apps/spring-app/src/main/licensing/app/license-for-binary.txt @@ -457,8 +457,8 @@ Within the lib directory WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. from The Legion of the Bouncy Castle http://www.bouncycastle.org/ - bcjmail-jdk15on-1.70.jar - bcprov-jdk15on-1.70.jar + bcjmail-jdk18on-1.77.jar + bcprov-jdk18on-1.77.jar licensed under the COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 http://www.opensource.org/licenses/CDDL-1.0 (as follows) diff --git a/server/apps/spring-app/src/main/licensing/app/licensing.xml b/server/apps/spring-app/src/main/licensing/app/licensing.xml index 224a8974a9..d6d5e6c485 100644 --- a/server/apps/spring-app/src/main/licensing/app/licensing.xml +++ b/server/apps/spring-app/src/main/licensing/app/licensing.xml @@ -1397,8 +1397,8 @@ All rights reserved. Copyright (c) 2000 - 2011 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) </copyright-notice> <by-organisation id='TheLegionoftheBouncyCastle'> - <resource name='bcjmail-jdk15on-1.70.jar'/> - <resource name='bcprov-jdk15on-1.70.jar'/> + <resource name='bcjmail-jdk18on-1.77.jar'/> + <resource name='bcprov-jdk18on-1.77.jar'/> </by-organisation> </with-license> <with-license id='BSD2Clause'> diff --git a/server/apps/spring-app/src/main/licensing/war/LICENSE b/server/apps/spring-app/src/main/licensing/war/LICENSE index 42dc961fcf..fee128b605 100644 --- a/server/apps/spring-app/src/main/licensing/war/LICENSE +++ b/server/apps/spring-app/src/main/licensing/war/LICENSE @@ -332,8 +332,8 @@ Within the WEB-INF/lib directory WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. from The Legion of the Bouncy Castle http://www.bouncycastle.org/ - bcjmail-jdk15on-1.70.jar - bcprov-jdk15on-1.70.jar + bcjmail-jdk18on-1.77.jar + bcprov-jdk18on-1.77.jar licensed under the COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 http://www.opensource.org/licenses/CDDL-1.0 (as follows) diff --git a/server/apps/spring-app/src/main/licensing/war/licensing.xml b/server/apps/spring-app/src/main/licensing/war/licensing.xml index 2a53f77782..6e57679ea4 100644 --- a/server/apps/spring-app/src/main/licensing/war/licensing.xml +++ b/server/apps/spring-app/src/main/licensing/war/licensing.xml @@ -1346,8 +1346,8 @@ All rights reserved. Copyright (c) 2000 - 2011 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) </copyright-notice> <by-organisation id='TheLegionoftheBouncyCastle'> - <resource name='bcjmail-jdk15on-1.70.jar'/> - <resource name='bcprov-jdk15on-1.70.jar'/> + <resource name='bcjmail-jdk18on-1.77.jar'/> + <resource name='bcprov-jdk18on-1.77.jar'/> </by-organisation> </with-license> <with-license id='BSD3Clause'> diff --git a/server/container/spring/src/main/appended-resources/supplemental-models.xml b/server/container/spring/src/main/appended-resources/supplemental-models.xml index fb6c8b6021..2776be5eba 100644 --- a/server/container/spring/src/main/appended-resources/supplemental-models.xml +++ b/server/container/spring/src/main/appended-resources/supplemental-models.xml @@ -328,7 +328,7 @@ The Legion Of The Bouncy Castle <supplement> <project> <groupId>org.bouncycastle</groupId> - <artifactId>bcjmail-jdk15on</artifactId> + <artifactId>bcjmail-jdk18on</artifactId> <organization> <name>The Legion of the Bouncy Castle</name> <url>http://www.bouncycastle.org/</url> @@ -338,7 +338,7 @@ The Legion Of The Bouncy Castle <supplement> <project> <groupId>org.bouncycastle</groupId> - <artifactId>bcprov-jdk15on</artifactId> + <artifactId>bcprov-jdk18on</artifactId> <organization> <name>The Legion of the Bouncy Castle</name> <url>http://www.bouncycastle.org/</url> diff --git a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RecipientRewriteTableProcessor.java b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RecipientRewriteTableProcessor.java index d94c5836de..01e6109312 100644 --- a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RecipientRewriteTableProcessor.java +++ b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RecipientRewriteTableProcessor.java @@ -178,7 +178,7 @@ public class RecipientRewriteTableProcessor { mappingTypes = types; } else { mappingTypes = EnumSet.allOf(Mapping.Type.class); - } + } } public RecipientRewriteTableProcessor(RecipientRewriteTable virtualTableStore, DomainList domainList, MailetContext mailetContext) { diff --git a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RemoteDelivery.java b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RemoteDelivery.java index 34ca78b931..cc2836b997 100644 --- a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RemoteDelivery.java +++ b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RemoteDelivery.java @@ -250,8 +250,8 @@ public class RemoteDelivery extends GenericMailet { if (configuration.isDebug()) { LOGGER.debug("Sending mail to {} via {}", mail.getRecipients(), configuration.getGatewayServer()); } - queue.enQueue(mail); - } + queue.enQueue(mail); + } private void serviceNoGateway(Mail mail) throws MailQueueException { String mailName = mail.getName(); @@ -268,8 +268,8 @@ public class RemoteDelivery extends GenericMailet { mail.setRecipients(entry.getValue()); mail.setName(originalName + NAME_JUNCTION + entry.getKey().name()); - queue.enQueue(mail); - } + queue.enQueue(mail); + } private Map<Domain, Collection<MailAddress>> groupByServer(Collection<MailAddress> recipients) { // Must first organize the recipients into distinct servers (name made case insensitive) @@ -303,5 +303,5 @@ public class RemoteDelivery extends GenericMailet { configuration.getOnSuccess().stream()) .flatMap(x -> x) .collect(ImmutableList.toImmutableList()); -} + } } diff --git a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/SPF.java b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/SPF.java index dbcb04b58e..f0f84f3724 100644 --- a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/SPF.java +++ b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/SPF.java @@ -107,7 +107,7 @@ public class SPF extends GenericMailet { createSPF(new DNSServiceXBillImpl()); } else { createSPF(spfDnsService); - } + } Collection<String> ignoredNetworks = Splitter.on(',') .trimResults() @@ -155,4 +155,4 @@ public class SPF extends GenericMailet { } } } - } +} diff --git a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/delivery/MailboxAppenderImpl.java b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/delivery/MailboxAppenderImpl.java index 6990570d1f..3cc8b974c4 100644 --- a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/delivery/MailboxAppenderImpl.java +++ b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/delivery/MailboxAppenderImpl.java @@ -135,7 +135,7 @@ public class MailboxAppenderImpl implements MailboxAppender { private MessageManager.AppendCommand.Builder appendCommand(Optional<Flags> flags) { MessageManager.AppendCommand.Builder builder = MessageManager.AppendCommand.builder() - .recent() + .recent() .delivery(); return flags.map(builder::withFlags) .orElse(builder); @@ -179,7 +179,7 @@ public class MailboxAppenderImpl implements MailboxAppender { } private void closeProcessing(MailboxSession session) { - mailboxManager.endProcessingRequest(session); - } + mailboxManager.endProcessingRequest(session); + } } diff --git a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/jsieve/ActionDispatcher.java b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/jsieve/ActionDispatcher.java index c8593c2b27..2b73750b8d 100644 --- a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/jsieve/ActionDispatcher.java +++ b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/jsieve/ActionDispatcher.java @@ -64,4 +64,4 @@ public class ActionDispatcher { MAIL_ACTIONS.get(anAction.getClass()) .execute(anAction, aMail, context); } - } +} diff --git a/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/method/EmailSubmissionSetMethod.scala b/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/method/EmailSubmissionSetMethod.scala index 926622ef82..3fdbfc5633 100644 --- a/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/method/EmailSubmissionSetMethod.scala +++ b/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/method/EmailSubmissionSetMethod.scala @@ -252,7 +252,7 @@ class EmailSubmissionSetMethod @Inject()(serializer: EmailSubmissionSetSerialize private def sendEmail(mailboxSession: MailboxSession, request: EmailSubmissionCreationRequest): SMono[(EmailSubmissionCreationResponse, MessageId)] = - for { + for { message <- SFlux(messageIdManager.getMessagesReactive(List(request.emailId).asJava, FetchGroup.FULL_CONTENT, mailboxSession)) .next .switchIfEmpty(SMono.error(MessageNotFoundException(request.emailId))) @@ -392,22 +392,22 @@ class EmailSubmissionSetMethod @Inject()(serializer: EmailSubmissionSetSerialize .map(Boolean.unbox(_)).map(!_), Queues.SMALL_BUFFER_SIZE) .collectSeq() .flatMap(forbiddenMailFrom => { - if (forbiddenMailFrom.nonEmpty) { + if (forbiddenMailFrom.nonEmpty) { SMono.just(Failure(ForbiddenMailFromException(forbiddenMailFrom.toList))) - } else if (envelope.rcptTo.isEmpty) { + } else if (envelope.rcptTo.isEmpty) { SMono.just(Failure(NoRecipientException())) - } else { + } else { SMono.fromPublisher(canSendFrom.userCanSendFromReactive(session.getUser, Username.fromMailAddress(envelope.mailFrom.email))) .filter(bool => bool.equals(false)) .map(_ => Failure(ForbiddenFromException(envelope.mailFrom.email.asString))) .switchIfEmpty(SMono.just(Success(mimeMessage))) - } + } }) .handle[MimeMessage]((aTry, sink) => { aTry match { case Success(mimeMessage) => sink.next(mimeMessage) case Failure(ex) => sink.error(ex) - } + } }) private def resolveEnvelope(mimeMessage: MimeMessage, maybeEnvelope: Option[Envelope]): Try[Envelope] = @@ -436,5 +436,5 @@ class EmailSubmissionSetMethod @Inject()(serializer: EmailSubmissionSetSerialize private def recordCreationIdInProcessingContext(emailSubmissionCreationId: EmailSubmissionCreationId, processingContext: ProcessingContext, emailSubmissionId: EmailSubmissionId): ProcessingContext = - processingContext.recordCreatedId(ClientId(emailSubmissionCreationId.id), ServerId(emailSubmissionId.value)) + processingContext.recordCreatedId(ClientId(emailSubmissionCreationId.id), ServerId(emailSubmissionId.value)) } diff --git a/server/protocols/jmap-rfc-8621/src/test/scala/org/apache/james/jmap/change/MailboxChangeListenerTest.scala b/server/protocols/jmap-rfc-8621/src/test/scala/org/apache/james/jmap/change/MailboxChangeListenerTest.scala index e582936e1f..f19c3a5517 100644 --- a/server/protocols/jmap-rfc-8621/src/test/scala/org/apache/james/jmap/change/MailboxChangeListenerTest.scala +++ b/server/protocols/jmap-rfc-8621/src/test/scala/org/apache/james/jmap/change/MailboxChangeListenerTest.scala @@ -426,7 +426,7 @@ class MailboxChangeListenerTest { Thread.sleep(200) assertThat(mailboxChangeRepository.getSinceState(ACCOUNT_ID, state, None.toJava).block().getUpdated) .containsExactly(inboxId) - } + } @Test def unSubscribeMailboxShouldStoreMailboxUnSubscribedEvent(): Unit = { @@ -794,12 +794,12 @@ class MailboxChangeListenerTest { private def dummyState(): State = { val state = stateFactory.generate() emailChangeRepository.save(EmailChange.builder() - .accountId(ACCOUNT_ID) - .state(state) - .date(ZonedDateTime.now) + .accountId(ACCOUNT_ID) + .state(state) + .date(ZonedDateTime.now) .isShared(false) - .created(TestMessageId.of(0)) - .build) + .created(TestMessageId.of(0)) + .build) .block() state } diff --git a/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ClearMailRepositoryTask.java b/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ClearMailRepositoryTask.java index 05814f381f..7c42b3c8b4 100644 --- a/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ClearMailRepositoryTask.java +++ b/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ClearMailRepositoryTask.java @@ -149,6 +149,6 @@ public class ClearMailRepositoryTask implements Task { .reduce(0L, Long::sum); } catch (MailRepositoryStore.MailRepositoryStoreException e) { throw new RuntimeException(e); + } } } -} diff --git a/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ReprocessingAllMailsTask.java b/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ReprocessingAllMailsTask.java index 456ae5db3a..4b7ab090a4 100644 --- a/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ReprocessingAllMailsTask.java +++ b/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ReprocessingAllMailsTask.java @@ -108,7 +108,7 @@ public class ReprocessingAllMailsTask implements Task { public Result run() { return reprocessingService.reprocessAll(repositoryPath, configuration, this::notifyProgress) .block(); - } + } MailRepositoryPath getRepositoryPath() { return repositoryPath; diff --git a/server/queue/queue-pulsar/src/main/scala/org/apache/james/queue/pulsar/PulsarMailQueue.scala b/server/queue/queue-pulsar/src/main/scala/org/apache/james/queue/pulsar/PulsarMailQueue.scala index cdaecc1c7c..68a842752d 100644 --- a/server/queue/queue-pulsar/src/main/scala/org/apache/james/queue/pulsar/PulsarMailQueue.scala +++ b/server/queue/queue-pulsar/src/main/scala/org/apache/james/queue/pulsar/PulsarMailQueue.scala @@ -86,13 +86,13 @@ private[pulsar] object schemas { class PulsarMailQueue( config: PulsarMailQueueConfiguration, pulsar: PulsarClients, - blobIdFactory: BlobId.Factory, - mimeMessageStore: Store[MimeMessage, MimeMessagePartsId], - mailQueueItemDecoratorFactory: MailQueueItemDecoratorFactory, - metricFactory: MetricFactory, - gaugeRegistry: GaugeRegistry, - system: ActorSystem -) extends MailQueue with ManageableMailQueue { + blobIdFactory: BlobId.Factory, + mimeMessageStore: Store[MimeMessage, MimeMessagePartsId], + mailQueueItemDecoratorFactory: MailQueueItemDecoratorFactory, + metricFactory: MetricFactory, + gaugeRegistry: GaugeRegistry, + system: ActorSystem + ) extends MailQueue with ManageableMailQueue { import schemas._ import serializers._ @@ -208,7 +208,7 @@ class PulsarMailQueue( private val filterScheduledStage: ActorRef = system.actorOf(FilterStage.props) private val requeueMessage = Flow.apply[CommittableMessage[String]] .via(filteringFlow(filterScheduledStage)) - .flatMapConcat{case (_,_,message) => Source.future(requeue.offer(ProducerMessage(message.message.value)).map(_ => message))} + .flatMapConcat { case (_, _, message) => Source.future(requeue.offer(ProducerMessage(message.message.value)).map(_ => message)) } .flatMapConcat(message => Source.future(message.ack(cumulative = false))) .toMat(Sink.ignore)(Keep.none) @@ -240,7 +240,7 @@ class PulsarMailQueue( .toMat(Sink.asPublisher[MailQueue.MailQueueItem](true).withAttributes(Attributes.inputBuffer(initial = 1, max = 1)))(Keep.both) } - private def filteringFlow(filterActor:ActorRef) = { + private def filteringFlow(filterActor: ActorRef) = { implicit val timeout: Timeout = Timeout(1, TimeUnit.SECONDS) Flow.apply[CommittableMessage[String]].map(message => (Json.fromJson[MailMetadata](Json.parse(message.message.value)).get, @@ -250,14 +250,14 @@ class PulsarMailQueue( case (None, Some(partsId), committableMessage) => Source.lazyFuture(() => committableMessage.ack()) .flatMapConcat(_ => - deleteMimeMessage(partsId) - .flatMapConcat(_ => Source.empty) + deleteMimeMessage(partsId) + .flatMapConcat(_ => Source.empty) ) case (Some(metadata), _, committableMessage) => val partsId = metadata.partsId Source .fromPublisher(readMimeMessage(partsId)) - .collect{ case Some(message) => message } + .collect { case Some(message) => message } .map(message => (readMail(metadata, message), partsId, committableMessage)) case _ => throw new NotImplementedError() } @@ -281,8 +281,8 @@ class PulsarMailQueue( Await.ready(message.nack(), awaitTimeout) case CompletionStatus.REJECT => Await.ready(message.nack(), awaitTimeout) - } } + } def registerDequeueSubscription(): Unit = consumer().close() @@ -322,7 +322,7 @@ class PulsarMailQueue( * * @see [[FilterStage]] */ - private def filtersCommandFlow(topic:Topic, filterSubscription: Subscription, filteringStage: ActorRef) = { + private def filtersCommandFlow(topic: Topic, filterSubscription: Subscription, filteringStage: ActorRef) = { val logInvalidFilterPayload = Flow.apply[JsResult[Filter]] .collectType[JsError] .map(error => "unable to parse filter" + Json.prettyPrint(JsError.toJson(error))) @@ -544,7 +544,7 @@ class PulsarMailQueue( * @param producer * @param filter */ - private def publishFilter(producer:Producer[String])(filter:Filter): Unit ={ + private def publishFilter(producer: Producer[String])(filter: Filter): Unit = { import Filter._ // Optimizes for the local/single instance case, the duplicated filter // received through pulsar will be eliminated by the filter stage as @@ -583,7 +583,7 @@ class PulsarMailQueue( .bodyBlobId(blobIdFactory.from(metadata.bodyBlobId)) .build() Source.fromPublisher(readMimeMessage(partsId)) - .collect{ case Some(message) => message } + .collect { case Some(message) => message } .map(message => readMail(metadata, message)) }) diff --git a/server/src/main/appended-resources/supplemental-models.xml b/server/src/main/appended-resources/supplemental-models.xml index 6d141f2a61..29da73b231 100644 --- a/server/src/main/appended-resources/supplemental-models.xml +++ b/server/src/main/appended-resources/supplemental-models.xml @@ -328,7 +328,7 @@ The Legion Of The Bouncy Castle <supplement> <project> <groupId>org.bouncycastle</groupId> - <artifactId>bcjmail-jdk15on</artifactId> + <artifactId>bcjmail-jdk18on</artifactId> <organization> <name>The Legion of the Bouncy Castle</name> <url>http://www.bouncycastle.org/</url> @@ -338,7 +338,7 @@ The Legion Of The Bouncy Castle <supplement> <project> <groupId>org.bouncycastle</groupId> - <artifactId>bcprov-jdk15on</artifactId> + <artifactId>bcprov-jdk18on</artifactId> <organization> <name>The Legion of the Bouncy Castle</name> <url>http://www.bouncycastle.org/</url> --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org For additional commands, e-mail: notifications-h...@james.apache.org