相关文章推荐
气势凌人的莴苣  ·  python ...·  2 年前    · 
拉风的汉堡包  ·  jai-core-1.1.3.jar ...·  2 年前    · 
光明磊落的米饭  ·  js 从数组里过滤 ...·  2 年前    · 

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft Edge More info about Internet Explorer and Microsoft Edge

What: Creates and adds if statements that check nullity of all the nullable, non-checked parameters.

When: You want to quickly add null checks for all applicable method parameters.

Why: Writing null checks for many parameters can be time consuming and repetitive. Using this refactoring is quick and makes the program more robust.

How-to

  • Place your cursor on any parameter within the method.

  • Press Ctrl + . to trigger the Quick Actions and Refactorings menu.

  • Select the option to Add null checks for all parameters .

    See also

  • Refactoring
  •