TulanCN opened a new issue, #4622:
URL: https://github.com/apache/shenyu/issues/4622

   ### Question
   
   When I read the document of ‘code-suggestions’ , I found that some examples 
are confusing.
   Such as:
   current : `return null == a.getB() ? null : a.getB().getC();`
   recommendation : `return 
Optional.ofNullable(a.getB()).map(C::getD).orElse(null);`
   current : `return null == a ? new B() : C.newD(a);`
   recommendation : `return Optional.ofNullable(a).map(B::newC).orElse(new 
D());`
   
   The code marked with the current and the code marked with the recommendation 
do not seem to match exactly.


-- 
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