You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "mridulpathak (via GitHub) via notifications" <no...@ofbiz.apache.org> on 2026/10/31 18:15:16 UTC

[PR] Improved: Remove the this-escape warnings in DispatchContext (OFBIZ-13757) [ofbiz-framework]

mridulpathak opened a new pull request, #2532:
URL: https://github.com/apache/ofbiz-framework/pull/2532

   Improved: Remove the this-escape warnings in DispatchContext (OFBIZ-13757)
   
   javac reports a this-escape in the DispatchContext constructor because it read the service definitions through getGlobalServiceMap(), whose reader tasks called getDelegator() on the context being built, so a subclass could be seen before its constructor finished. The service definitions are now read by a private static method that takes the entity model reader name and the delegator; the constructor passes them directly, the reader tasks capture only the delegator, and the instance getGlobalServiceMap() delegates to the static method. DispatchContext stays open for subclasses and its public constructor and methods are unchanged. This removes the this-escape warnings for this class under JDK 25.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ofbiz.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Improved: Remove the this-escape warnings in DispatchContext (OFBIZ-13757) [ofbiz-framework]

Posted by "mridulpathak (via GitHub) via notifications" <no...@ofbiz.apache.org>.
mridulpathak merged PR #2532:
URL: https://github.com/apache/ofbiz-framework/pull/2532


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ofbiz.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org