Reputation: 329
I import commons-lang3 as following:
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
But I can not found sub package collections in package org.apache.commons.lang3
Upvotes: 4
Views: 23726
Reputation: 1523
You will not find it in this jar. Maybe you are looking for the commons-collections artifact:
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.4</version>
</dependency>
or
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.2</version>
</dependency>
In both of them, you will find the class CollectionUtils. But, in your case, I think the version 3.2.2 will fit better.
Upvotes: 8