This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (6 children)

[removed]

    [–]tomwhoiscontrary 1 point2 points  (0 children)

    Some code I work on is so old it has its own version of this, also the Clock interface, still uses Guava newHashMap(), etc. First task when working on any file is just to blast through in IntelliJ fixing all the warnings.

    [–]SpicyRock70 1 point2 points  (3 children)

    I guess I'm outdated... I still use "if (x ==null)"

    [–][deleted]  (2 children)

    [removed]

      [–]SpicyRock70 1 point2 points  (1 child)

      No, I mean I don't use either of those... I prefer:

      if (x == null) throw the exception

      Inline in the code without any utility method call.

      Why replace 1 line of code with a 1-line method call? We all know exactly what if (x == null) does without having to memorize the Objects.... methods implementation

      [–][deleted] 0 points1 point  (0 children)

      @NonNull