Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove the dependency on ArrayUtils from ResourceTypeTree

  • Loading branch information...
commit 29cbc452dce6ed456a8c6382d7e9c47b608e2d36 1 parent fbc6d5a
@simonbrandhof simonbrandhof authored committed
View
4 sonar-plugin-api/src/main/java/org/sonar/api/resources/ResourceTypeTree.java
@@ -23,7 +23,6 @@
import com.google.common.base.Preconditions;
import com.google.common.base.Predicate;
import com.google.common.collect.*;
-import org.apache.commons.lang.ArrayUtils;
import org.sonar.api.BatchExtension;
import org.sonar.api.ServerExtension;
import org.sonar.api.batch.InstantiationStrategy;
@@ -84,7 +83,8 @@ public Builder addType(ResourceType type) {
public Builder addRelations(String parentQualifier, String... childQualifiers) {
Preconditions.checkNotNull(parentQualifier);
- Preconditions.checkArgument(ArrayUtils.isNotEmpty(childQualifiers), "childQualifiers can't be empty");
+ Preconditions.checkNotNull(childQualifiers);
+ Preconditions.checkArgument(childQualifiers.length > 0, "childQualifiers can't be empty");
relations.putAll(parentQualifier, Arrays.asList(childQualifiers));
return this;
}
Please sign in to comment.
Something went wrong with that request. Please try again.