[ 
https://issues.apache.org/jira/browse/IO-711?focusedWorklogId=544308&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-544308
 ]

ASF GitHub Bot logged work on IO-711:
-------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Jan/21 15:25
            Start Date: 29/Jan/21 15:25
    Worklog Time Spent: 10m 
      Work Description: boris-unckel commented on pull request #196:
URL: https://github.com/apache/commons-io/pull/196#issuecomment-769871226


   @garydgregory 
   - Fixed the formatting (is there a official eclipse configuration you can 
recommend?)
   - Removed single parameter checks in case of direct usage, 
   - Kept single parameter checks when prior (different) Object creation 
happens (see case above)
   - Kept multiple parameter checks
   - Removed double checks in constructors, even if objects are created
   - Kept all checks in constructors, where fail will be in post constructor 
usage of methods


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

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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 544308)
    Time Spent: 1h  (was: 50m)

> Use Objects.requireNotNull for fail fast method/constructors
> ------------------------------------------------------------
>
>                 Key: IO-711
>                 URL: https://issues.apache.org/jira/browse/IO-711
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Filters, Streams/Writers, Utilities
>    Affects Versions: 2.8.0
>            Reporter: Boris Unckel
>            Priority: Major
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Currently some NullPointer checks are IllegalArgumentException, at other 
> points a lot of constructor and/or method logic happens before a null pointer 
> occurs.
> The approach is to make these places use 
> Objects.requireNonNull(sampleObject,"sampleObject");
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to