Skip to content

Commit

Permalink
Merge pull request #222 from opencb/TASK-2094
Browse files Browse the repository at this point in the history
TASK-2094 - ClassNotFoundException: org.apache.commons.collections.CollectionUtils
  • Loading branch information
j-coll authored Sep 27, 2022
2 parents 358c8ee + 4bde5db commit ed2ae57
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 11 deletions.
6 changes: 6 additions & 0 deletions biodata-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@
<groupId>org.opencb.ga4gh</groupId>
<artifactId>ga4gh</artifactId>
<version>0.6.0a5</version>
<exclusions>
<exclusion>
<groupId>org.apache.avro</groupId>
<artifactId>avro-ipc</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import htsjdk.samtools.util.BlockCompressedFilePointerUtil;
import htsjdk.samtools.util.BlockCompressedInputStream;
import htsjdk.samtools.util.Log;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.ga4gh.models.ReadAlignment;
import org.opencb.biodata.models.alignment.RegionCoverage;
import org.opencb.biodata.models.core.Region;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

package org.opencb.biodata.tools.clinical;

import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.opencb.biodata.models.clinical.ClinicalDiscussion;
import org.opencb.biodata.models.clinical.ClinicalProperty;
import org.opencb.biodata.models.clinical.ClinicalProperty.ModeOfInheritance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

package org.opencb.biodata.tools.clinical;

import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.opencb.biodata.models.clinical.ClinicalDiscussion;
import org.opencb.biodata.models.clinical.ClinicalProperty.ModeOfInheritance;
import org.opencb.biodata.models.clinical.ClinicalProperty.Penetrance;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.opencb.biodata.tools.pedigree;

import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.opencb.biodata.models.clinical.ClinicalProperty.Penetrance;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.opencb.biodata.tools.variant;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.mortbay.util.ajax.JSON;
import org.opencb.biodata.formats.variant.io.VariantReader;
import org.opencb.biodata.models.variant.Variant;
import org.opencb.biodata.models.variant.VariantBuilder;
Expand Down Expand Up @@ -109,7 +109,12 @@ public List<Variant> read(int batchSize) {
String line;
int i = 0;
while ((i < batchSize) && (line = readLine()) != null) {
Variant variant = new Variant(jsonObjectMapper.convertValue(JSON.parse(line), VariantAvro.class));
Variant variant;
try {
variant = new Variant(jsonObjectMapper.readValue(line, VariantAvro.class));
} catch (JsonProcessingException e) {
throw new UncheckedIOException(e);
}

// Read variants may not have the variant type set and this might cause NPE
if (variant.getType() == null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.opencb.biodata.tools.variant.stats;

import htsjdk.variant.vcf.VCFConstants;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.opencb.biodata.models.clinical.pedigree.Member;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.opencb.biodata.tools.variant.metadata;

import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.collections4.map.HashedMap;
import org.junit.Before;
import org.junit.Test;
import org.opencb.biodata.models.metadata.Individual;
Expand Down

0 comments on commit ed2ae57

Please sign in to comment.