From 1a948b6d5d2fb3a45c0319d8e35b3e39f8da0e71 Mon Sep 17 00:00:00 2001 From: Philippe Charles Date: Thu, 29 Aug 2024 13:09:30 +0200 Subject: [PATCH] Deprecate `@ServiceDefinition#singleton` option to avoid class loading issues --- CHANGELOG.md | 4 ++++ .../src/main/java/nbbrd/service/ServiceDefinition.java | 2 ++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e1477f..9f8e9f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Deprecate `@ServiceDefinition#singleton` option to avoid class loading issues + ## [1.9.0] - 2024-02-06 ### Added diff --git a/java-service-annotation/src/main/java/nbbrd/service/ServiceDefinition.java b/java-service-annotation/src/main/java/nbbrd/service/ServiceDefinition.java index a567eae..31e264d 100644 --- a/java-service-annotation/src/main/java/nbbrd/service/ServiceDefinition.java +++ b/java-service-annotation/src/main/java/nbbrd/service/ServiceDefinition.java @@ -77,7 +77,9 @@ * Specifies if the loader must be a singleton. * * @return true if the loader is a singleton, false otherwise + * @deprecated Don't use this option because it is the source of many class loading issues. */ + @Deprecated boolean singleton() default false; /**