This is an automated email from the ASF dual-hosted git repository.

jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git


The following commit(s) were added to refs/heads/master by this push:
     new 0d2bf3a13e refactor: remove 3-arg RestOpContext constructor and 
simplify RrpcRestOpContext to use default bean store
0d2bf3a13e is described below

commit 0d2bf3a13e3f32397c861e048fb7291870795a07
Author: James Bognar <[email protected]>
AuthorDate: Mon May 4 11:22:38 2026 -0400

    refactor: remove 3-arg RestOpContext constructor and simplify 
RrpcRestOpContext to use default bean store
---
 .../java/org/apache/juneau/rest/RestOpContext.java    | 19 -------------------
 .../apache/juneau/rest/rrpc/RrpcRestOpContext.java    | 15 ++-------------
 2 files changed, 2 insertions(+), 32 deletions(-)

diff --git 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestOpContext.java
 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestOpContext.java
index 6f955c3307..db29564688 100644
--- 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestOpContext.java
+++ 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestOpContext.java
@@ -1172,25 +1172,6 @@ public class RestOpContext extends Context implements 
Comparable<RestOpContext>
                this(new Builder(method, context));
        }
 
-       /**
-        * 3-arg positional context constructor (for internal subclass use).
-        *
-        * <p>
-        * Allows a subclass (e.g. {@link 
org.apache.juneau.rest.rrpc.RrpcRestOpContext}) to override the builder-time
-        * {@link BasicBeanStore} used for constructor-argument resolution. The 
default, reached via the 2-arg ctor, is
-        * {@link RestContext#getBeanStore()}.
-        *
-        * @param method The Java method this context represents. Must not be 
<jk>null</jk>.
-        * @param context The owning {@link RestContext}. Must not be 
<jk>null</jk>.
-        * @param beanStoreOverride An optional bean store to use in place of 
{@code context.getBeanStore()}. May be
-        *              <jk>null</jk>, in which case the default store is used.
-        * @throws ServletException If context could not be created.
-        * @since 9.5.0
-        */
-       protected RestOpContext(java.lang.reflect.Method method, RestContext 
context, BasicBeanStore beanStoreOverride) throws ServletException {
-               this(nn(beanStoreOverride) ? new Builder(method, 
context).beanStore(beanStoreOverride) : new Builder(method, context));
-       }
-
        /**
         * Context constructor.
         *
diff --git 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/rrpc/RrpcRestOpContext.java
 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/rrpc/RrpcRestOpContext.java
index 1c25e006f9..99dbee4bd8 100644
--- 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/rrpc/RrpcRestOpContext.java
+++ 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/rrpc/RrpcRestOpContext.java
@@ -43,25 +43,14 @@ public class RrpcRestOpContext extends RestOpContext {
        private final RrpcInterfaceMeta meta;
 
        /**
-        * 2-arg positional context constructor.
-        *
-        * <p>
-        * Constructs an {@code RrpcRestOpContext} directly from a Java method 
and its owning {@link RestContext}, mirroring
-        * {@link RestOpContext#RestOpContext(Method, RestContext) 
RestOpContext}'s 2-arg ctor.
-        *
-        * <p>
-        * Internally invokes the protected 3-arg {@link 
RestOpContext#RestOpContext(Method, RestContext, 
org.apache.juneau.cp.BasicBeanStore)}
-        * ctor with the root bean store (rather than the resource-scoped 
{@link RestContext#getBeanStore()} used by
-        * {@code RestOpContext}'s 2-arg ctor). The root bean store is 
preserved verbatim from the legacy fluent chain to
-        * avoid behavioral drift in RRPC builder-time bean creation.
+        * Constructor.
         *
         * @param method The Java method this context represents. Must not be 
<jk>null</jk>.
         * @param context The owning {@link RestContext}. Must not be 
<jk>null</jk>.
         * @throws ServletException If context could not be created.
-        * @since 9.5.0
         */
        public RrpcRestOpContext(Method method, RestContext context) throws 
ServletException {
-               super(method, context, context.getBootstrapBeanStore());
+               super(method, context);
 
                var interfaceClass = 
getBeanContext().getClassMeta(getJavaMethod().getGenericReturnType());
                meta = new RrpcInterfaceMeta(interfaceClass.inner(), null);

Reply via email to