Skip to content
Merged
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
2 changes: 1 addition & 1 deletion base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.kill-bill.billing</groupId>
<artifactId>killbill-platform</artifactId>
<version>0.41.20-SNAPSHOT</version>
<version>0.42.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-platform-base</artifactId>
Expand Down
24 changes: 23 additions & 1 deletion base/spotbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,26 @@
<Method name="getDelegate" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
</FindBugsFilter>

<!-- justification: constructors intentionally validate configuration and bootstrap external resources; these types are not finalizable and the warning is not actionable here -->
<Match>
<Class name="org.killbill.billing.platform.config.DefaultKillbillConfigSource" />
<Or>
<Method name="&lt;init&gt;" params="" />
<Method name="&lt;init&gt;" params="java.util.Map" />
<Method name="&lt;init&gt;" params="java.lang.String" />
<Method name="&lt;init&gt;" params="java.lang.String, java.util.Map" />
</Or>
<Bug pattern="CT_CONSTRUCTOR_THROW" />
</Match>

<!-- justification: constructor bootstraps the in-memory RMI registry and may legitimately throw RemoteException during startup; this manager is not intended for finalization-sensitive inheritance -->
<Match>
<Class name="org.killbill.billing.platform.jndi.JNDIManager" />
<Or>
<Method name="&lt;init&gt;" params="" />
<Method name="&lt;init&gt;" params="int" />
</Or>
<Bug pattern="CT_CONSTRUCTOR_THROW" />
</Match>
</FindBugsFilter>
12 changes: 6 additions & 6 deletions lifecycle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.kill-bill.billing</groupId>
<artifactId>killbill-platform</artifactId>
<version>0.41.20-SNAPSHOT</version>
<version>0.42.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-platform-lifecycle</artifactId>
Expand All @@ -40,16 +40,16 @@
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
</dependency>
<dependency>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
Expand Down
19 changes: 18 additions & 1 deletion lifecycle/spotbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,21 @@
<Method name="doFireStage" />
<Bug pattern="DM_EXIT" />
</Match>
</FindBugsFilter>

<!-- justification: constructor eagerly discovers services and may fail fast on injector/bootstrap problems during lifecycle startup -->
<Match>
<Class name="org.killbill.billing.lifecycle.DefaultLifecycle" />
<Or>
<Method name="&lt;init&gt;" params="com.google.inject.Injector, org.killbill.billing.lifecycle.config.LifecycleConfig" />
<Method name="&lt;init&gt;" params="java.lang.Iterable" />
</Or>
<Bug pattern="CT_CONSTRUCTOR_THROW" />
</Match>

<!-- justification: constructor performs classpath scanning immediately and intentionally fails fast if service discovery cannot be initialized -->
<Match>
<Class name="org.killbill.billing.lifecycle.ServiceFinder" />
<Method name="&lt;init&gt;" params="java.lang.ClassLoader, java.lang.String" />
<Bug pattern="CT_CONSTRUCTOR_THROW" />
</Match>
</FindBugsFilter>
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import java.util.concurrent.ConcurrentHashMap;

import javax.annotation.Nullable;
import javax.inject.Inject;
import jakarta.inject.Inject;

import org.killbill.billing.lifecycle.api.Lifecycle;
import org.killbill.billing.lifecycle.config.LifecycleConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package org.killbill.billing.lifecycle.bus;

import javax.inject.Inject;
import jakarta.inject.Inject;

import org.killbill.billing.lifecycle.api.BusService;
import org.killbill.billing.platform.api.LifecycleHandlerType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

package org.killbill.billing.lifecycle.bus;

import javax.inject.Inject;
import javax.inject.Named;
import jakarta.inject.Inject;
import jakarta.inject.Named;

import org.killbill.billing.lifecycle.api.ExternalBusService;
import org.killbill.billing.lifecycle.glue.BusModule;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

package org.killbill.billing.lifecycle.glue;

import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Provider;
import jakarta.inject.Inject;
import jakarta.inject.Named;
import jakarta.inject.Provider;

import org.killbill.bus.DefaultPersistentBus;
import org.killbill.bus.InMemoryPersistentBus;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.util.Set;
import java.util.SortedSet;

import javax.inject.Inject;
import jakarta.inject.Inject;

import org.killbill.billing.lifecycle.DefaultLifecycle.LifecycleHandler;
import org.killbill.billing.platform.api.KillbillService;
Expand Down
2 changes: 1 addition & 1 deletion osgi-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.kill-bill.billing</groupId>
<artifactId>killbill-platform</artifactId>
<version>0.41.20-SNAPSHOT</version>
<version>0.42.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-platform-osgi-api</artifactId>
Expand Down
10 changes: 5 additions & 5 deletions osgi-bundles/bundles/eureka/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.kill-bill.billing</groupId>
<artifactId>killbill-platform-osgi-bundles</artifactId>
<version>0.41.20-SNAPSHOT</version>
<version>0.42.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-platform-osgi-bundles-eureka</artifactId>
Expand Down Expand Up @@ -74,15 +74,15 @@
<artifactId>jakarta.activation-api</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.framework</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package org.killbill.billing.osgi.bundles.eureka;

import javax.inject.Inject;
import jakarta.inject.Inject;

import org.killbill.billing.osgi.api.ServiceDiscoveryRegistry;
import org.slf4j.Logger;
Expand Down
7 changes: 6 additions & 1 deletion osgi-bundles/bundles/graphite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.kill-bill.billing</groupId>
<artifactId>killbill-platform-osgi-bundles</artifactId>
<version>0.41.20-SNAPSHOT</version>
<version>0.42.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-platform-osgi-bundles-graphite</artifactId>
Expand All @@ -40,6 +40,11 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<!-- Keep use the standard jakarta.servlet-api -->
<exclusion>
<groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-jakarta-servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
7 changes: 6 additions & 1 deletion osgi-bundles/bundles/influxdb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.kill-bill.billing</groupId>
<artifactId>killbill-platform-osgi-bundles</artifactId>
<version>0.41.20-SNAPSHOT</version>
<version>0.42.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-platform-osgi-bundles-influxdb</artifactId>
Expand All @@ -41,6 +41,11 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<!-- Keep use the standard jakarta.servlet-api -->
<exclusion>
<groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-jakarta-servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
29 changes: 16 additions & 13 deletions osgi-bundles/bundles/kpm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.kill-bill.billing</groupId>
<artifactId>killbill-platform-osgi-bundles</artifactId>
<version>0.41.20-SNAPSHOT</version>
<version>0.42.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>killbill-platform-osgi-bundles-kpm</artifactId>
Expand Down Expand Up @@ -64,28 +64,20 @@
<artifactId>jakarta.activation-api</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.framework</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jooby</groupId>
<artifactId>jooby</artifactId>
</dependency>
<dependency>
<groupId>org.jooby</groupId>
<artifactId>jooby-jackson</artifactId>
</dependency>
<dependency>
<groupId>org.kill-bill.billing</groupId>
<artifactId>killbill-api</artifactId>
Expand Down Expand Up @@ -117,6 +109,17 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.kill-bill.commons</groupId>
<artifactId>killbill-jooby</artifactId>
<exclusions>
<!-- slf4j-api is marked as provided: ignore RequireUpperBoundDeps errors -->
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.kill-bill.commons</groupId>
<artifactId>killbill-utils</artifactId>
Expand Down
23 changes: 22 additions & 1 deletion osgi-bundles/bundles/kpm/spotbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,25 @@
<Method name="uninstall" params="java.lang.String, java.lang.String" />
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE" />
</Match>
</FindBugsFilter>

<!-- Justification: default bundles path intentionally falls back to the standard on-disk plugin install root when no property is configured -->
<Match>
<Class name="org.killbill.billing.osgi.bundles.kpm.KpmProperties" />
<Method name="getBundlesPath" />
<Bug pattern="DMI_HARDCODED_ABSOLUTE_FILENAME" />
</Match>

<!-- Justification: constructor eagerly initializes downloader/DAO state and must fail fast when plugin management dependencies cannot be created -->
<Match>
<Class name="org.killbill.billing.osgi.bundles.kpm.impl.DefaultPluginManager" />
<Method name="&lt;init&gt;" params="org.killbill.billing.osgi.libs.killbill.OSGIKillbillAPI, org.killbill.billing.osgi.bundles.kpm.KpmProperties" />
<Bug pattern="CT_CONSTRUCTOR_THROW" />
</Match>

<!-- Justification: constructor creates the persistent identifiers directory/file up front and intentionally aborts plugin management startup on filesystem initialization errors -->
<Match>
<Class name="org.killbill.billing.osgi.bundles.kpm.impl.FileBasedPluginIdentifiersDAO" />
<Method name="&lt;init&gt;" params="org.killbill.billing.osgi.bundles.kpm.KpmProperties" />
<Bug pattern="CT_CONSTRUCTOR_THROW" />
</Match>
</FindBugsFilter>
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import java.util.Hashtable;
import java.util.Properties;

import javax.servlet.Servlet;
import javax.servlet.http.HttpServlet;
import jakarta.servlet.Servlet;
import jakarta.servlet.http.HttpServlet;

import org.jooby.json.Jackson;
import org.killbill.billing.osgi.api.OSGIKillbillRegistrar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

import java.util.Optional;

import javax.inject.Inject;
import javax.inject.Singleton;
import jakarta.inject.Inject;
import jakarta.inject.Singleton;

import org.jooby.Result;
import org.jooby.Results;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.killbill.billing.osgi.bundles.kpm.KpmProperties;
import org.killbill.billing.osgi.bundles.kpm.PluginIdentifiersDAO;
import org.killbill.billing.osgi.bundles.kpm.PluginManager.GetAvailablePluginsModel;
import org.killbill.billing.osgi.bundles.kpm.TestUtils;
import org.killbill.billing.osgi.libs.killbill.OSGIKillbillAPI;
import org.killbill.billing.util.nodes.KillbillNodesApi;
import org.killbill.billing.util.nodes.NodeInfo;
Expand All @@ -47,7 +48,7 @@ public void beforeMethod() {
final OSGIKillbillAPI osgiKillbillAPI = Mockito.mock(OSGIKillbillAPI.class);
Mockito.when(osgiKillbillAPI.getKillbillNodesApi()).thenReturn(nodesApi);

final Properties properties = new Properties();
final Properties properties = TestUtils.getTestProperties();
properties.setProperty("org.killbill.billing.plugin.kpm.availablePlugins.cache.enabled", "true");
final KpmProperties kpmProperties = new KpmProperties(properties);

Expand Down
Loading
Loading