Skip to content

Commit

Permalink
Merge pull request #38065 from mkouba/deprecate-arc-init-config-opt-c…
Browse files Browse the repository at this point in the history
…ontexts

ArC: deprecate ArcInitConfig.Builder.setOptimizeContexts()
  • Loading branch information
mkouba authored Jan 8, 2024
2 parents 0ee923c + 3439d8f commit 1eeefbb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ public static ArcContainer initialize(ArcInitConfig config) {
container = INSTANCE.get();
if (container == null) {
// Set the container instance first because Arc.container() can be used within ArcContainerImpl.init()
container = new ArcContainerImpl(config.getCurrentContextFactory(),
config.isStrictCompatibility(), config.isOptimizeContexts());
container = new ArcContainerImpl(config.getCurrentContextFactory(), config.isStrictCompatibility());
INSTANCE.set(container);
container.init();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ public CurrentContextFactory getCurrentContextFactory() {
return currentContextFactory;
}

/**
*
* @return {@code true} if optimized contexts should be used, {@code false} otherwise
* @deprecated This method was never used and will be removed at some point after Quarkus 3.10
*/
@Deprecated(since = "3.7", forRemoval = true)
public boolean isOptimizeContexts() {
return optimizeContexts;
}
Expand All @@ -65,6 +71,14 @@ public Builder setCurrentContextFactory(CurrentContextFactory currentContextFact
return this;
}

/**
* The value was actually never used.
*
* @param value
* @return this
* @deprecated This value was never used; this method will be removed at some point after Quarkus 3.10
*/
@Deprecated(since = "3.7", forRemoval = true)
public Builder setOptimizeContexts(boolean value) {
optimizeContexts = value;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public class ArcContainerImpl implements ArcContainer {

private final boolean strictMode;

public ArcContainerImpl(CurrentContextFactory currentContextFactory, boolean strictMode, boolean optimizeContexts) {
public ArcContainerImpl(CurrentContextFactory currentContextFactory, boolean strictMode) {
this.strictMode = strictMode;
id = String.valueOf(ID_GENERATOR.incrementAndGet());
running = new AtomicBoolean(true);
Expand Down

0 comments on commit 1eeefbb

Please sign in to comment.