This PR changes the types of exceptions being thrown by the methods. More specifically, this PR:
Replaces uses of java.lang.Exception (way too broad) with more appropriate subclasses of it
Replaces uses of java.lang.RuntimeException with more appropriate subclasses of it
Replaces uses of java.lang.IllegalArgumentException for invalid null arguments with java.lang.NullPointerException (mostly via java.util.Objects.requireNonNull(Object))
This PR changes the types of exceptions being thrown by the methods. More specifically, this PR:
java.lang.Exception
(way too broad) with more appropriate subclasses of itjava.lang.RuntimeException
with more appropriate subclasses of itjava.lang.IllegalArgumentException
for invalidnull
arguments withjava.lang.NullPointerException
(mostly viajava.util.Objects.requireNonNull(Object)
)java.lang.IllegalArgumentException
for invalid index withjava.lang.IndexOutOfBoundsException