Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion base/uk.ac.stfc.isis.ibex.client.tycho.parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@
<failOnWarning>true</failOnWarning>
<showWarnings>true</showWarnings>
<useProjectSettings>false</useProjectSettings>
<compilerArgument>-warn:-warningToken</compilerArgument>
<compilerArgs>
<arg>-warn:-warningToken</arg>
<!-- Provide the project coordinates to `GraalVmProcessor`: -->
<arg>-Alog4j.graalvm.groupId=${project.groupId}</arg>
<arg>-Alog4j.graalvm.artifactId=${project.artifactId}</arg>
</compilerArgs>
</configuration>
</plugin>

Expand Down
4 changes: 2 additions & 2 deletions base/uk.ac.stfc.isis.ibex.logger/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Bundle-Activator: uk.ac.stfc.isis.ibex.logger.IsisLog
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
com.google.guava,
org.apache.logging.log4j.api;bundle-version="2.24.1";visibility:=reexport,
org.apache.logging.log4j.core;bundle-version="2.24.1";visibility:=reexport
org.apache.logging.log4j.api;bundle-version="2.25.2";visibility:=reexport,
org.apache.logging.log4j.core;bundle-version="2.25.2";visibility:=reexport
Bundle-RequiredExecutionEnvironment: JavaSE-21
Bundle-ActivationPolicy: lazy
Export-Package: uk.ac.stfc.isis.ibex.logger
Expand Down
34 changes: 17 additions & 17 deletions base/uk.ac.stfc.isis.ibex.targetplatform/targetplatform.target
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
<repository location="http://download.eclipse.org/e4/snapshots/org.eclipse.e4.tools/latest"/>
<unit id="org.eclipse.e4.tools.spies.feature.feature.group" version="0.0.0"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="https://download.eclipse.org/nebula/releases/3.0.0"/>
<unit id="org.eclipse.nebula.visualization.feature.feature.group" version="2.1.0.202303072132"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="https://download.eclipse.org/eclipse/updates/4.34/"/>
<unit id="org.eclipse.platform.ide" version="0.0.0"/>
Expand Down Expand Up @@ -90,16 +86,15 @@
<unit id="org.epics.pvdata.source" version="0.0.0"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="http://shadow.nd.rl.ac.uk/ICP_P2/Pydev/features/org.python.pydev.p2-repo/target/repository/"/>
<unit id="org.python.pydev.feature.feature.group" version="11.0.3.202408070859"/>
<unit id="org.python.pydev.feature.source.feature.group" version="11.0.3.202408070859"/>
<repository location="https://archive.eclipse.org/nebula/releases/3.1.1/"/>
<unit id="org.eclipse.nebula.visualization.feature.feature.group" version="2.1.0.202402011804"/>
</location>
<location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="generate" type="Maven">
<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.24.3</version>
<version>2.25.2</version>
<type>jar</type>
</dependency>
</dependencies>
Expand All @@ -109,7 +104,7 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.24.3</version>
<version>2.25.2</version>
<type>jar</type>
</dependency>
</dependencies>
Expand Down Expand Up @@ -139,7 +134,7 @@
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.18.0</version>
<version>1.19.0</version>
<type>jar</type>
</dependency>
</dependencies>
Expand All @@ -149,7 +144,7 @@
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.13.1</version>
<version>2.14.0</version>
<type>jar</type>
</dependency>
</dependencies>
Expand All @@ -169,7 +164,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.16.1</version>
<version>5.20.0</version>
<type>jar</type>
</dependency>
</dependencies>
Expand Down Expand Up @@ -209,7 +204,7 @@
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.12.1</version>
<version>2.13.2</version>
<type>jar</type>
</dependency>
</dependencies>
Expand All @@ -219,7 +214,7 @@
<dependency>
<groupId>jakarta.mail</groupId>
<artifactId>jakarta.mail-api</artifactId>
<version>2.1.3</version>
<version>2.2.0-M1</version>
<type>jar</type>
</dependency>
</dependencies>
Expand All @@ -229,7 +224,7 @@
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>3.0.2</version>
<version>4.0.6</version>
<type>jar</type>
</dependency>
</dependencies>
Expand All @@ -239,7 +234,7 @@
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-core</artifactId>
<version>3.0.2</version>
<version>4.0.6</version>
<type>jar</type>
</dependency>
</dependencies>
Expand All @@ -259,7 +254,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>33.4.0-jre</version>
<version>33.5.0-jre</version>
<type>jar</type>
</dependency>
</dependencies>
Expand All @@ -274,6 +269,11 @@
</dependency>
</dependencies>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="http://shadow.nd.rl.ac.uk/ICP_P2/Pydev/features/org.python.pydev.p2-repo/target/repository/"/>
<unit id="org.python.pydev.feature.feature.group" version="13.1.0.202511051529"/>
<unit id="org.python.pydev.feature.source.feature.group" version="13.1.0.202511051529"/>
</location>
</locations>
<environment>
<os>linux</os>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.*;

import java.util.EventListener;
import java.util.List;
import java.util.stream.Stream;

Expand All @@ -34,8 +35,8 @@
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.TypedListener;
import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
Expand All @@ -47,7 +48,24 @@
*
*/
public class CheckboxLabelProviderTest {


public class mockSelectionListener implements Listener {

Check notice

Code scanning / CodeQL

Inner class could be static Note test

mockSelectionListener should be made static, since the enclosing instance is not used.

Copilot Autofix

AI 7 days ago

To fix the problem, the inner class mockSelectionListener should be made static. This can be done by adding the static keyword to its declaration inside CheckboxLabelProviderTest. This change will prevent all instances of mockSelectionListener from implicitly storing a reference to the outer CheckboxLabelProviderTest instance, improving memory usage and code clarity. Make sure to only modify the class declaration at line 52 in the provided file; since the class itself does not use outer class members, no further changes are needed elsewhere.

Suggested changeset 1
base/uk.ac.stfc.isis.ibex.ui.configserver.tests/src/uk/ac/stfc/isis/ibex/ui/configserver/tests/CheckboxLabelProviderTest.java

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/base/uk.ac.stfc.isis.ibex.ui.configserver.tests/src/uk/ac/stfc/isis/ibex/ui/configserver/tests/CheckboxLabelProviderTest.java b/base/uk.ac.stfc.isis.ibex.ui.configserver.tests/src/uk/ac/stfc/isis/ibex/ui/configserver/tests/CheckboxLabelProviderTest.java
--- a/base/uk.ac.stfc.isis.ibex.ui.configserver.tests/src/uk/ac/stfc/isis/ibex/ui/configserver/tests/CheckboxLabelProviderTest.java
+++ b/base/uk.ac.stfc.isis.ibex.ui.configserver.tests/src/uk/ac/stfc/isis/ibex/ui/configserver/tests/CheckboxLabelProviderTest.java
@@ -49,7 +49,7 @@
  */
 public class CheckboxLabelProviderTest {
 	
-	public class mockSelectionListener implements Listener {
+	public static class mockSelectionListener implements Listener {
 		private EventListener eventListener;
 		@Override
 		public void handleEvent(Event event) {
EOF
@@ -49,7 +49,7 @@
*/
public class CheckboxLabelProviderTest {

public class mockSelectionListener implements Listener {
public static class mockSelectionListener implements Listener {
private EventListener eventListener;
@Override
public void handleEvent(Event event) {
Copilot is powered by AI and may make mistakes. Always verify output.
private EventListener eventListener;
@Override
public void handleEvent(Event event) {
return;

}

public mockSelectionListener (EventListener listener) {
this.eventListener = listener;
}

public EventListener getEventListener() {
return this.eventListener;
}

}
private CheckboxLabelProvider<String> modifiedCheckboxLabelProvider;

private final String[] testModels = {"block", "ioc", "synoptic"};
Expand Down Expand Up @@ -228,9 +246,9 @@
public void GIVEN_checkbox_with_non_selection_listeners_WHEN_clear_checkbox_selection_listeners_THEN_no_listener_removed() {
Button mockCheckBox = mock(Button.class);

TypedListener[] checkBoxListeners = new TypedListener[2];
checkBoxListeners[0] = new TypedListener(mock(SelectionListener.class));
checkBoxListeners[1] = new TypedListener(mock(SelectionListener.class));
Listener[] checkBoxListeners = new mockSelectionListener[2];
checkBoxListeners[0] = new mockSelectionListener(mock(SelectionListener.class));
checkBoxListeners[1] = new mockSelectionListener(mock(SelectionListener.class));

when(mockCheckBox.getListeners(SWT.Selection)).thenReturn(checkBoxListeners);

Expand Down
2 changes: 1 addition & 1 deletion build/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ setlocal
cd /d %~dp0

REM We bundle our own JRE with the client, this is where it is
set "JRELOCATION=\\isis.cclrc.ac.uk\inst$\Kits$\CompGroup\ICP\ibex_client_jdk-21.0.6+7"
set "JRELOCATION=\\isis.cclrc.ac.uk\inst$\Kits$\CompGroup\ICP\ibex_client_jdk-21.0.9+10"
set "LOCAL_JRE_LOCATION=%~dp0jdk"

set "TARGET_DIR=%3"
Expand Down
Loading