Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing uses declarations in module descriptor #3254

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

import static org.assertj.core.api.Assertions.assertThat;

import aQute.bnd.annotation.Cardinality;
import aQute.bnd.annotation.spi.ServiceConsumer;
import java.util.Comparator;
import java.util.List;
import java.util.ServiceLoader;
Expand All @@ -27,6 +29,7 @@
import org.apache.logging.log4j.util.ServiceLoaderUtil;
import org.junit.jupiter.api.Test;

@ServiceConsumer(value = RecyclerFactoryProvider.class, resolution = Cardinality.MULTIPLE)
class DisruptorRecyclerFactoryProviderTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*/
package org.apache.logging.log4j.core.impl;

import aQute.bnd.annotation.Cardinality;
import aQute.bnd.annotation.spi.ServiceConsumer;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -83,6 +85,7 @@
* @see LogEventFactory
* @see StrSubstitutor
*/
@ServiceConsumer(value = RecyclerFactoryProvider.class, cardinality = Cardinality.MULTIPLE)
public final class CoreDefaultBundle {

@SingletonFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

import static org.assertj.core.api.Assertions.assertThat;

import aQute.bnd.annotation.Cardinality;
import aQute.bnd.annotation.spi.ServiceConsumer;
import java.util.Comparator;
import java.util.List;
import java.util.ServiceLoader;
Expand All @@ -26,6 +28,7 @@
import org.apache.logging.log4j.util.ServiceLoaderUtil;
import org.junit.jupiter.api.Test;

@ServiceConsumer(value = RecyclerFactoryProvider.class, cardinality = Cardinality.MULTIPLE)
class JCToolsRecyclerFactoryProviderTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*/
package org.apache.logging.log4j.kit.recycler.internal;

import aQute.bnd.annotation.Cardinality;
import aQute.bnd.annotation.spi.ServiceConsumer;
import java.util.HashMap;
import java.util.Map;
import java.util.ServiceLoader;
Expand All @@ -27,6 +29,7 @@
import org.apache.logging.log4j.util.ServiceLoaderUtil;
import org.jspecify.annotations.Nullable;

@ServiceConsumer(value = RecyclerFactoryProvider.class, cardinality = Cardinality.MULTIPLE)
final class RecyclerFactoryTestUtil {

private RecyclerFactoryTestUtil() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*/
package org.apache.logging.log4j.plugins.di;

import aQute.bnd.annotation.Cardinality;
import aQute.bnd.annotation.spi.ServiceConsumer;
import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.Comparator;
Expand All @@ -36,6 +38,7 @@
* {@link ConfigurableInstanceFactory} using bindings registered before and after standard
* {@link ConfigurableInstanceFactoryPostProcessor} service provider classes are invoked.
*/
@ServiceConsumer(value = ConfigurableInstanceFactoryPostProcessor.class, cardinality = Cardinality.MULTIPLE)
public final class DI {
private DI() {
throw new IllegalStateException("Utility class");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
package org.apache.logging.log4j.plugins.di.spi;

import aQute.bnd.annotation.spi.ServiceConsumer;
import java.util.ServiceLoader;
import org.apache.logging.log4j.plugins.Ordered;
import org.apache.logging.log4j.plugins.di.ConfigurableInstanceFactory;
Expand All @@ -27,7 +26,6 @@
* {@link Ordered} annotation on the class for overriding the order it will be invoked.
*/
@FunctionalInterface
@ServiceConsumer(ConfigurableInstanceFactoryPostProcessor.class)
public interface ConfigurableInstanceFactoryPostProcessor {

/**
Expand Down
8 changes: 8 additions & 0 deletions src/changelog/.3.x.x/3250_declare_uses.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://logging.apache.org/xml/ns"
xsi:schemaLocation="https://logging.apache.org/xml/ns https://logging.apache.org/xml/ns/log4j-changelog-0.xsd"
type="fixed">
<issue id="3250" link="https://github.com/apache/logging-log4j2/issues/3250"/>
<description format="asciidoc">Add missing `uses` declarations in module descriptor.</description>
</entry>