Skip to content

Commit

Permalink
Update JaCoCo to 0.8.2 and fix wrong imports. Related to IQSS#775.
Browse files Browse the repository at this point in the history
As JaCoCo has been a direct dependency in *compile* scope, at four places
accidentially some classes from transitive dependencies from JaCoCo have been used
instead of the classes used commonly within the codebase.
Removing the JaCoCo direct dependency as only the plugin is used at build/test time. It is sufficient for Maven to have the
plugin included with its version number - this is handled as a transitive dependency during the build internally by Maven.

Hopefully this created no harm, but better fix this now.
  • Loading branch information
poikilotherm committed Nov 7, 2018
1 parent 0b19800 commit a64ad35
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 21 deletions.
8 changes: 2 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<junit.vintage.version>5.3.1</junit.vintage.version>
<junit.platform.version>1.3.1</junit.platform.version>
<mockito.version>2.22.0</mockito.version>
<jacoco.version>0.8.2</jacoco.version>
</properties>

<repositories>
Expand Down Expand Up @@ -418,11 +419,6 @@
<version>2.4.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.5.201505241946</version>
</dependency>
<!-- Added specific versionf of SLF4J jars; otherwise we end up with
conflicting versions of slf4j-api and slf4j-log4j12, loaded as
dependencies for different packages; which was causing some incompatibility
Expand Down Expand Up @@ -660,7 +656,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.5.201505241946</version>
<version>${jacoco.version}</version>
<configuration>
<destfile>${basedir}/target/coverage-reports/jacoco-unit.exec</destfile>
<datafile>${basedir}/target/coverage-reports/jacoco-unit.exec</datafile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import com.github.scribejava.apis.GitHubApi;
import com.github.scribejava.core.builder.api.BaseApi;
import edu.emory.mathcs.backport.java.util.Collections;
import edu.harvard.iq.dataverse.authorization.AuthenticatedUserDisplayInfo;
import edu.harvard.iq.dataverse.authorization.providers.oauth2.AbstractOAuth2AuthenticationProvider;
import edu.harvard.iq.dataverse.authorization.providers.shib.ShibUserNameFields;
import edu.harvard.iq.dataverse.authorization.providers.shib.ShibUtil;
import edu.harvard.iq.dataverse.util.BundleUtil;
import java.io.StringReader;
import java.util.Collections;
import javax.json.Json;
import javax.json.JsonObject;
import javax.json.JsonReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import javax.xml.parsers.ParserConfigurationException;

import org.apache.commons.lang.StringUtils;
import org.xml.sax.SAXException;
import javax.xml.transform.TransformerException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import org.codehaus.plexus.util.StringUtils;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
import edu.harvard.iq.dataverse.harvest.server.xoai.XlistRecords;
import edu.harvard.iq.dataverse.settings.SettingsServiceBean;
import edu.harvard.iq.dataverse.util.SystemConfig;
import org.apache.commons.lang.StringUtils;

import java.io.ByteArrayOutputStream;

import java.io.IOException;
Expand All @@ -57,7 +59,6 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.stream.XMLStreamException;
import org.codehaus.plexus.util.StringUtils;

/**
*
Expand Down
14 changes: 2 additions & 12 deletions src/main/java/edu/harvard/iq/dataverse/util/json/JsonPrinter.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package edu.harvard.iq.dataverse.util.json;

import edu.emory.mathcs.backport.java.util.Collections;
import edu.harvard.iq.dataverse.ControlledVocabularyValue;
import edu.harvard.iq.dataverse.DataFile;
import edu.harvard.iq.dataverse.DataFileTag;
Expand Down Expand Up @@ -41,20 +40,11 @@
import static edu.harvard.iq.dataverse.util.json.NullSafeJsonBuilder.jsonObjectBuilder;
import edu.harvard.iq.dataverse.workflow.Workflow;
import edu.harvard.iq.dataverse.workflow.step.WorkflowStepData;
import java.util.ArrayList;
import java.util.Set;

import java.util.*;
import javax.json.Json;
import javax.json.JsonArrayBuilder;
import javax.json.JsonObjectBuilder;
import java.util.Date;
import java.util.List;
import java.util.TreeSet;
import java.util.Arrays;
import java.util.Collection;
import java.util.Deque;
import java.util.EnumSet;
import java.util.LinkedList;
import java.util.Map;
import java.util.function.BiConsumer;
import java.util.function.BinaryOperator;
import java.util.function.Function;
Expand Down

0 comments on commit a64ad35

Please sign in to comment.