Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
-
None
Description
There are unnecessary null check in split method of ConnectorStream.java
I thought there are posibillity to return a null in getEnumConstants() so created null check logic.
ConnectorStream.java
public <E extends Enum<E>> EnumMap<E,TStream<T>> split(Class<E> enumClass, Function<T, E> splitter) { E[] es = enumClass.getEnumConstants(); if(es == null) { throw new IllegalArgumentException("Class object does not represent an enum type"); }
But the argument defined that enumClass is alway enum<E>. It's my mistake. The null checker is not necessary.
It's simple change but create a jira issue because I believe it is important to leave a record of the changes and mapping 1-1(or 1-N) to github PR.
Attachments
Issue Links
- is related to
-
EDGENT-18 Split function based upon an enumeration.
- Closed