codeconsole commented on PR #16149:
URL: https://github.com/apache/grails-core/pull/16149#issuecomment-5513288557

   > > > > @codeconsole why did you rename currentRequest -> request throughout 
the code? What's the reasoning for this change?
   > > > 
   > > > 
   > > > @jdaugherty `getCurrentRequest()` does exactly 1 thing now. It just 
returns `getRequest()`. Why unnecessarily proxy a method?
   > > 
   > > 
   > > Because it's been there since 2009 and has a distinguished name. It was 
clearly used throughout the code base too and resulted in a significant diff to 
remove it.
   > 
   > Actually, 2009 is just when 1.1 was merged. It's been there since the 
start of Grails.
   
   @jdaugherty 
   but it was only there for handling multipart requests and it is no longer 
needed after this PR.  We don't need a bunch of legacy calls all over the place 
that do nothing?  The method still exists. If you really want to use it, you 
will get a deprecated warning.
   
   ```groovy
   public HttpServletRequest getCurrentRequest() {
       if (multipartRequest != null) {
         return multipartRequest;
       }
       else {
           return getRequest();
       }
   }
   ```
   
   replaced with
   
   ``` groovy
   @Deprecated(since = "8.0")
   public HttpServletRequest getCurrentRequest() {
         return getRequest();
   }
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to