Skip to content

Commit

Permalink
Merge pull request #2720 from dls-controls/fix_java11_build
Browse files Browse the repository at this point in the history
Fix build on the latest version of Java 11
  • Loading branch information
shroffk authored May 19, 2023
2 parents 2f9c853 + 8194083 commit 42d7d58
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
javax.xml.bind.context.factory=com.sun.xml.bind.v2.ContextFactory
4 changes: 2 additions & 2 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
jacoco-maven-plugin
</artifactId>
<versionRange>
[0.5.3.201107060350,)
[0.8.3,)
</versionRange>
<goals>
<goal>prepare-agent</goal>
Expand Down Expand Up @@ -269,7 +269,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.5.3.201107060350</version>
<version>0.8.3</version>
<configuration>
<includes>*</includes>
<destFile>${project.basedir}/../target/jacoco.exec</destFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
Expand All @@ -28,9 +26,7 @@

import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.IPreferencesService;
import org.eclipse.core.runtime.preferences.IScopeContext;
import org.eclipse.e4.core.services.events.IEventBroker;
import org.eclipse.e4.ui.model.application.ui.MSnippetContainer;
import org.eclipse.e4.ui.model.application.ui.MUIElement;
import org.eclipse.e4.ui.model.application.ui.advanced.MPerspective;
import org.eclipse.e4.ui.model.application.ui.advanced.MPlaceholder;
Expand Down Expand Up @@ -82,11 +78,9 @@ public class PerspectiveSaverUnitTest {
public void setUp() {
try {
URL workspaceUrl = new URL("file:" + workspaceLocation);
when(instanceLocation.getDataArea(anyString())).thenReturn(workspaceUrl);
doNothing().when(preferences).put(anyString(), anyString());
when(prefsService.getString(anyString(), anyString(), anyString(), any(IScopeContext[].class))).thenReturn("dummy");
when(prefsService.getString(any(), any(), any(), any())).thenReturn("dummy");
// Return first argument if cloneElement() is called on mockModelService.
when(mockModelService.cloneElement(any(MUIElement.class), any(MSnippetContainer.class))).thenAnswer(new Answer<MUIElement>() {
when(mockModelService.cloneElement(any(), any())).thenAnswer(new Answer<MUIElement>() {
@Override
public MUIElement answer(InvocationOnMock invocation) {
Object[] args = invocation.getArguments();
Expand Down Expand Up @@ -119,7 +113,6 @@ public void handleEventIgnoresEventsWherePropertiesAreNotMPerspectives() {
@Test
public void handleEventIgnoresEventsIfNoSaveDirPreferenceIsSet() {
// Return null from preference query.
when(prefsService.getString(anyString(), anyString(), anyString(), any(IScopeContext[].class))).thenReturn(null);
Event testEvent = createTestEvent(UIEvents.EventTags.ELEMENT, new Object());
saver.handleEvent(testEvent);
verify(mockModelService, never()).findElements(any(MUIElement.class), any(String.class), any(Class.class), any(List.class));
Expand Down

0 comments on commit 42d7d58

Please sign in to comment.