Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MH-13229, External Library Updates #561

Merged
merged 1 commit into from Dec 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions assemblies/karaf-features/src/main/feature/feature.xml
Expand Up @@ -3,7 +3,7 @@

<feature name="query-dsl" version="${project.version}">
<bundle>mvn:com.google.guava/guava/${guava.version}</bundle>
<bundle>mvn:joda-time/joda-time/2.10</bundle>
<bundle>mvn:joda-time/joda-time/${joda-time.version}</bundle>
<bundle>mvn:com.mysema.commons/mysema-commons-lang/0.2.4</bundle>
<bundle>mvn:com.mysema.querydsl/querydsl-core/3.6.5</bundle>
<bundle>mvn:com.mysema.querydsl/querydsl-sql/3.6.5</bundle>
Expand Down Expand Up @@ -47,13 +47,13 @@
<bundle>mvn:commons-io/commons-io/2.6</bundle>
<!-- FIXME: commons-lang 2.6 only needed for the ical library in the commons bundle -->
<bundle>mvn:commons-lang/commons-lang/2.6</bundle>
<bundle>mvn:joda-time/joda-time/2.9.9</bundle>
<bundle>mvn:joda-time/joda-time/${joda-time.version}</bundle>
<bundle>mvn:org.aopalliance/com.springsource.org.aopalliance/1.0.0</bundle>
<bundle>mvn:org.apache.commons/commons-collections4/${commons-collections.version}</bundle>
<bundle>mvn:org.apache.commons/commons-compress/${commons-compress.version}</bundle>
<bundle>mvn:org.apache.commons/commons-csv/1.5</bundle>
<bundle>mvn:org.apache.commons/commons-lang3/3.7</bundle>
<bundle>mvn:org.apache.commons/commons-text/1.2</bundle>
<bundle>mvn:org.apache.commons/commons-csv/${commons-csv.version}</bundle>
<bundle>mvn:org.apache.commons/commons-lang3/${commons-lang3.version}</bundle>
<bundle>mvn:org.apache.commons/commons-text/${commons-text.version}</bundle>
<bundle>mvn:org.apache.neethi/neethi/3.0.1</bundle>
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.bcel/5.2_3</bundle>
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.batik/1.7_3</bundle>
Expand Down
1 change: 0 additions & 1 deletion modules/asset-manager-storage-aws/pom.xml
Expand Up @@ -91,7 +91,6 @@
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>3.1</version>
<scope>test</scope>
</dependency>
<!-- Persistence -->
Expand Down
3 changes: 1 addition & 2 deletions modules/common/pom.xml
Expand Up @@ -105,7 +105,7 @@
<dependency>
<groupId>de.schlichtherle</groupId>
<artifactId>truezip</artifactId>
<version>6.8</version>
<version>6.8.4</version>
<exclusions>
<exclusion>
<groupId>bouncycastle</groupId>
Expand Down Expand Up @@ -196,7 +196,6 @@
<dependency>
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
<version>1.5</version>
<scope>test</scope>
</dependency>
<!-- for xml matchers (org.w3c.dom.ElementTraversal) -->
Expand Down
1 change: 0 additions & 1 deletion modules/composer-ffmpeg/pom.xml
Expand Up @@ -76,7 +76,6 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
Expand Down
1 change: 0 additions & 1 deletion modules/distribution-service-aws-s3-remote/pom.xml
Expand Up @@ -66,7 +66,6 @@
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>3.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
1 change: 0 additions & 1 deletion modules/distribution-service-aws-s3/pom.xml
Expand Up @@ -93,7 +93,6 @@
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>3.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Expand Up @@ -550,7 +550,7 @@ public void testForNullsInDublinCoreCatalogImpl() throws Exception {
Assert.assertFalse(e instanceof NullPointerException);
}
try {
dc.add(null, EasyMock.createNiceMock(DublinCoreValue.class));
dc.add(null, (DublinCoreValue) EasyMock.createNiceMock(DublinCoreValue.class));
} catch (Exception e) {
// throw assertion if it happens to be a nullpointer, never a null pointer!
Assert.assertFalse(e instanceof NullPointerException);
Expand Down
Expand Up @@ -23,8 +23,8 @@
package org.opencastproject.metadata.dublincore;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.opencastproject.metadata.dublincore.TestUtil.createDate;
import static org.opencastproject.util.data.Collections.find;

import org.opencastproject.mediapackage.DefaultMediaPackageSerializerImpl;
import org.opencastproject.mediapackage.MediaPackage;
Expand All @@ -33,22 +33,15 @@
import org.opencastproject.metadata.api.MetadataValue;
import org.opencastproject.metadata.api.MetadataValues;
import org.opencastproject.metadata.api.StaticMetadata;
import org.opencastproject.util.data.Function;
import org.opencastproject.util.data.Predicate;
import org.opencastproject.workspace.api.Workspace;

import org.apache.commons.io.IOUtils;
import org.easymock.EasyMock;
import org.easymock.IAnswer;
import org.junit.Test;

import java.io.File;
import java.io.InputStream;
import java.net.URI;
import java.net.URL;

import junit.framework.Assert;

public final class StaticMetadataServiceDublinCoreImplTest {

@Test
Expand All @@ -57,17 +50,8 @@ public void testExtractMetadata() throws Exception {
StaticMetadataServiceDublinCoreImpl ms = newStaticMetadataService();
StaticMetadata md = ms.getMetadata(mp);
assertEquals("Land and Vegetation: Key players on the Climate Scene",
find(md.getTitles(), new Predicate<MetadataValue<String>>() {
@Override
public Boolean apply(MetadataValue<String> v) {
return v.getLanguage().equals(MetadataValues.LANGUAGE_UNDEFINED);
}
}).map(new Function<MetadataValue<String>, String>() {
@Override
public String apply(MetadataValue<String> v) {
return v.getValue();
}
}).getOrElse(""));
md.getTitles().stream().filter(v -> v.getLanguage().equals(MetadataValues.LANGUAGE_UNDEFINED))
.findFirst().map(MetadataValue::getValue).orElse(""));
assertEquals(createDate(2007, 12, 5, 0, 0, 0), md.getCreated().get());
}

Expand All @@ -90,14 +74,10 @@ private Workspace newWorkspace() throws Exception {
Workspace workspace = EasyMock.createNiceMock(Workspace.class);
final File dcFile = new File(getClass().getResource("/dublincore.xml").toURI());
final File dcFileDefect = new File(getClass().getResource("/dublincore-defect.xml").toURI());
Assert.assertNotNull(dcFile);
assertNotNull(dcFile);
// set expectations
EasyMock.expect(workspace.get((URI) EasyMock.anyObject())).andAnswer(new IAnswer<File>() {
@Override
public File answer() throws Throwable {
return EasyMock.getCurrentArguments()[0].toString().contains("-defect") ? dcFileDefect : dcFile;
}
}).anyTimes();
EasyMock.expect(workspace.get(EasyMock.anyObject())).andAnswer(
() -> EasyMock.getCurrentArguments()[0].toString().contains("-defect") ? dcFileDefect : dcFile).anyTimes();
// put into replay mode
EasyMock.replay(workspace);
return workspace;
Expand All @@ -108,12 +88,8 @@ private MediaPackage newMediaPackage(String manifest) throws Exception {
MediaPackageBuilder mediaPackageBuilder = builderFactory.newMediaPackageBuilder();
URL rootUrl = getClass().getResource("/");
mediaPackageBuilder.setSerializer(new DefaultMediaPackageSerializerImpl(rootUrl));
InputStream is = null;
try {
is = getClass().getResourceAsStream(manifest);
try (InputStream is = getClass().getResourceAsStream(manifest)) {
return mediaPackageBuilder.loadFromXml(is);
} finally {
IOUtils.closeQuietly(is);
}
}
}
Expand Up @@ -849,7 +849,7 @@ public void testUpdateMediaPackageMetadata() throws Exception {
// Using scheduler as the source of the media package here.
SchedulerService schedulerService = EasyMock.createMock(SchedulerService.class);
EasyMock.expect(schedulerService.getMediaPackage(EasyMock.anyString())).andReturn(mp);
Capture<Opt<MediaPackage>> mpCapture = new Capture<>();
Capture<Opt<MediaPackage>> mpCapture = Capture.newInstance();
schedulerService.updateEvent(EasyMock.anyString(), EasyMock.anyObject(Opt.class),
EasyMock.anyObject(Opt.class), EasyMock.anyObject(Opt.class), EasyMock.anyObject(Opt.class),
EasyMock.capture(mpCapture),
Expand Down Expand Up @@ -1068,17 +1068,17 @@ public void updatePresenters() throws IOException, org.osgi.service.cm.Configura
metadata.removeField(metadata.getOutputFields().get(DublinCore.PROPERTY_CREATOR.getLocalName()));
metadata.addField(multiUserUpdatedPresenter);
updatedPresenters = indexServiceImpl.getTechnicalPresenters(metadata);
assertTrue("There should be three presenters", updatedPresenters.getA().size() == 3);
assertTrue("There should be three technical presenters", updatedPresenters.getB().size() == 3);
assertEquals("There should be three presenters", 3, updatedPresenters.getA().size());
assertEquals("There should be three technical presenters", 3, updatedPresenters.getB().size());
assertTrue("The list of technical presenters should contain all of the user names",
updatedPresenters.getB().containsAll(multiUserList));

// Mixed non-user and user presenters
metadata.removeField(metadata.getOutputFields().get(DublinCore.PROPERTY_CREATOR.getLocalName()));
metadata.addField(mixedPresenters);
updatedPresenters = indexServiceImpl.getTechnicalPresenters(metadata);
assertTrue("There should be six presenters", updatedPresenters.getA().size() == 6);
assertTrue("There should be three technical presenters", updatedPresenters.getB().size() == 3);
assertEquals("There should be six presenters", 6, updatedPresenters.getA().size());
assertEquals("There should be three technical presenters", 3, updatedPresenters.getB().size());
assertTrue("The list of presenters should contain all of the non-user names",
updatedPresenters.getA().containsAll(multiNonUserList));
assertTrue("The list of presenters should contain all of the user full names",
Expand Down
Expand Up @@ -65,8 +65,8 @@ public void testInstall() throws Exception {
String listName = "BLACKLISTS.USERS.REASONS";
File file = new File(
ListProvidersScannerTest.class.getResource("/ListProvidersScannerTest-GoodProperties.properties").toURI());
Capture<ResourceListProvider> resourceListProvider = new Capture<>();
Capture<String> captureListName = new Capture<>();
Capture<ResourceListProvider> resourceListProvider = Capture.newInstance();
Capture<String> captureListName = Capture.newInstance();
ListProvidersService listProvidersService = EasyMock.createNiceMock(ListProvidersService.class);
listProvidersService.addProvider(EasyMock.capture(captureListName), EasyMock.capture(resourceListProvider));
EasyMock.expectLastCall();
Expand All @@ -92,8 +92,8 @@ public void testUpdate() throws Exception {
String listName = "BLACKLISTS.USERS.REASONS";
File file = new File(
ListProvidersScannerTest.class.getResource("/ListProvidersScannerTest-GoodProperties.properties").toURI());
Capture<ResourceListProvider> resourceListProvider = new Capture<>();
Capture<String> captureListName = new Capture<>();
Capture<ResourceListProvider> resourceListProvider = Capture.newInstance();
Capture<String> captureListName = Capture.newInstance();
ListProvidersService listProvidersService = EasyMock.createNiceMock(ListProvidersService.class);
listProvidersService.addProvider(EasyMock.capture(captureListName), EasyMock.capture(resourceListProvider));
EasyMock.expectLastCall();
Expand Down Expand Up @@ -165,8 +165,8 @@ public void testInstallInputOrgInPropertiesFileExpectsAddedToService() throws Ex
String listName = "BLACKLISTS.USERS.REASONS";
File file = new File(
ListProvidersScannerTest.class.getResource("/ListProvidersScannerTest-WithOrg.properties").toURI());
Capture<ResourceListProvider> resourceListProvider = new Capture<>();
Capture<String> captureListName = new Capture<>();
Capture<ResourceListProvider> resourceListProvider = Capture.newInstance();
Capture<String> captureListName = Capture.newInstance();
ListProvidersService listProvidersService = EasyMock.createNiceMock(ListProvidersService.class);
listProvidersService.addProvider(EasyMock.capture(captureListName), EasyMock.capture(resourceListProvider));
EasyMock.expectLastCall();
Expand Down
1 change: 0 additions & 1 deletion modules/messages/pom.xml
Expand Up @@ -129,7 +129,6 @@
<dependency>
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
<version>1.5</version>
<scope>test</scope>
</dependency>
<!-- for xml matchers (org.w3c.dom.ElementTraversal) -->
Expand Down
Expand Up @@ -44,7 +44,6 @@
import org.junit.Test;

import java.io.File;
import java.io.InputStream;
import java.net.URI;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -134,11 +133,11 @@ public void testCreateTimelinePreviewImages() throws Exception {
public void testProcess() throws Exception {
File file = new File(track.getURI());
Workspace workspace = EasyMock.createNiceMock(Workspace.class);
EasyMock.expect(workspace.get((URI) EasyMock.anyObject()))
EasyMock.expect(workspace.get(EasyMock.anyObject()))
.andReturn(file);
Capture filenameCapture = new Capture();
Capture<String> filenameCapture = Capture.newInstance();
EasyMock.expect(workspace.putInCollection(
EasyMock.anyString(), (String) EasyMock.capture(filenameCapture), (InputStream) EasyMock.anyObject()))
EasyMock.anyString(), EasyMock.capture(filenameCapture), EasyMock.anyObject()))
.andReturn(new URI("timelinepreviews.png"));
EasyMock.replay(workspace);

Expand Down
1 change: 0 additions & 1 deletion modules/urlsigning-common/pom.xml
Expand Up @@ -18,7 +18,6 @@
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down
1 change: 0 additions & 1 deletion modules/userdirectory/pom.xml
Expand Up @@ -97,7 +97,6 @@
<dependency>
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
<version>1.5</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Expand Up @@ -46,7 +46,6 @@
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URI;
import java.util.ArrayList;
Expand Down Expand Up @@ -144,11 +143,11 @@ public void testGenerateWaveformImage() throws Exception {
@Test
public void testProcess() throws Exception {
Workspace workspace = EasyMock.createNiceMock(Workspace.class);
EasyMock.expect(workspace.get((URI) EasyMock.anyObject()))
EasyMock.expect(workspace.get(EasyMock.anyObject()))
.andReturn(new File(audioTrack.getURI()));
Capture filenameCapture = new Capture();
Capture<String> filenameCapture = Capture.newInstance();
EasyMock.expect(workspace.putInCollection(
EasyMock.anyString(), (String) EasyMock.capture(filenameCapture), (InputStream) EasyMock.anyObject()))
EasyMock.anyString(), EasyMock.capture(filenameCapture), EasyMock.anyObject()))
.andReturn(new URI("waveform.png"));
EasyMock.replay(workspace);

Expand Down