Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'adopt'
java-version: 21
java-version: 25
cache: 'maven'
- name: Build maven parent project
run: mvn -B install -DskipTests
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'adopt'
java-version: 21
java-version: 25
- name: "Download Projucer"
run: ./build/download-projucer.sh
shell: bash
Expand All @@ -50,11 +50,11 @@ jobs:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'adopt'
java-version: 21
java-version: 25
- name: "Download Projucer"
run: ./build/download-projucer.sh
shell: bash
Expand All @@ -81,11 +81,11 @@ jobs:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'adopt'
java-version: 21
java-version: 25
- name: "Download Projucer"
run: ./build/download-projucer.sh
shell: bash
Expand Down Expand Up @@ -113,11 +113,11 @@ jobs:
needs: [build-host-win, build-host-osx, build-host-linux]
steps:
- uses: actions/checkout@v6
- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'adopt'
java-version: 21
java-version: 25
- name: Get version
run: echo "version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
id: get-version
Expand Down Expand Up @@ -159,11 +159,11 @@ jobs:
needs: [build-jar]
steps:
- uses: actions/checkout@v6
- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'adopt'
java-version: 21
java-version: 25
- name: Get version
run: echo "version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
shell: bash
Expand All @@ -185,11 +185,11 @@ jobs:
needs: [build-jar]
steps:
- uses: actions/checkout@v6
- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'adopt'
java-version: 21
java-version: 25
- name: Get version
run: echo "version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
id: get-version
Expand All @@ -210,11 +210,11 @@ jobs:
needs: [build-jar]
steps:
- uses: actions/checkout@v6
- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'adopt'
java-version: 21
java-version: 25
- name: Get version
run: echo "version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
id: get-version
Expand All @@ -235,11 +235,11 @@ jobs:
needs: [build-jar]
steps:
- uses: actions/checkout@v6
- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: 'adopt'
java-version: 21
java-version: 25
- name: Get version
run: echo "version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
id: get-version
Expand Down
4 changes: 1 addition & 3 deletions owlplug-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>

<properties>
<springboot.version>3.4.4</springboot.version>
<springboot.version>4.0.1</springboot.version>
<mockito.version>5.20.0</mockito.version>
</properties>

Expand Down Expand Up @@ -71,8 +71,6 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<!-- Override spring-boot managed version to fix https://github.com/DropSnorz/OwlPlug/issues/322 -->
<version>2.4.240</version>
<scope>runtime</scope>
</dependency>
<dependency>
Expand Down
33 changes: 18 additions & 15 deletions owlplug-client/src/main/java/com/owlplug/OwlPlug.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.nio.file.Paths;
import java.time.Duration;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
Expand Down Expand Up @@ -61,11 +62,23 @@ public class OwlPlug extends Application {

private ConfigurableApplicationContext context;
private Parent rootNode;



/**
* Main method called on JAR execution. It bootstraps JavaFx Application and
* it's preloader {@see com.owlplug.OwlPlugPreloader}
*
* @param args The command line arguments given on JAR execution. Usually empty.
*/
public static void boot(String[] args) {
System.setProperty("javafx.preloader", "com.owlplug.OwlPlugPreloader");
launch(OwlPlug.class, args);

}

/**
* JavaFX Application initialization method. It boostraps Spring boot
* application context and binds it to FXMLLoader controller factory.
* Running from the JavaFX-Launcher thread.
*/
@Override
public void init() throws Exception {
Expand All @@ -80,7 +93,9 @@ public void init() throws Exception {
rootNode = loader.load();

MainController mainController = context.getBean(MainController.class);
mainController.dispatchPostInitialize();

Platform.runLater(mainController::dispatchPostInitialize);

} catch (BeanCreationException e) {
if (e.getRootCause() instanceof HibernateException) {
log.error("OwlPlug is maybe already running", e);
Expand Down Expand Up @@ -147,7 +162,6 @@ public DataSource datasource() {
*/
@Bean
public CacheManager getCacheManager() {

CacheManager cacheManager = CacheManagerBuilder.newCacheManagerBuilder()
.with(CacheManagerBuilder.persistence(
Paths.get(ApplicationDefaults.getUserDataDirectory(), "cache").toString())
Expand All @@ -171,15 +185,4 @@ public void stop() {
context.close();
}

/**
* Main method called on JAR execution. It bootstraps JavaFx Application and
* it's preloader {@see com.owlplug.OwlPlugPreloader}
*
* @param args The command line arguments given on JAR execution. Usually empty.
*/
public static void boot(String[] args) {
System.setProperty("javafx.preloader", "com.owlplug.OwlPlugPreloader");
launch(OwlPlug.class, args);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@ public void initialize() {
accountComboBox.setButtonCell(new AccountCellFactory(imageCache, Pos.CENTER_RIGHT).call(null));
accountComboBox.setCellFactory(new AccountCellFactory(authenticationService, imageCache, true));

refreshAccounts();

downloadUpdateButton.setOnAction(e -> {
PlatformUtils.openDefaultBrowser(this.getApplicationDefaults().getDownloadUrl());
});
Expand Down Expand Up @@ -179,6 +177,8 @@ public void initialize() {
*/
public void dispatchPostInitialize() {

refreshAccounts();

if (!this.applicationMonitor.isPreviousExecutionSafelyTerminated()) {
log.info("Previous execution not terminated safely, opening crash recovery dialog");
crashRecoveryDialogController.show();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class ExploreCriteriaAdapter {

public static Specification<RemotePackage> toSpecification(List<ExploreFilterCriteria> criteriaList) {

Specification<RemotePackage> spec = Specification.where(null);
Specification<RemotePackage> spec = Specification.unrestricted();
for (ExploreFilterCriteria criteria : criteriaList) {
spec = spec.and(toSpecification(criteria));
}
Expand Down Expand Up @@ -63,7 +63,7 @@ public static Specification<RemotePackage> toSpecification(ExploreFilterCriteria
return RemotePackageRepository.hasFormat((List<String>) criteria.getValue());
}

return Specification.where(null);
return Specification.unrestricted();

}

Expand Down
4 changes: 2 additions & 2 deletions owlplug-client/src/test/java/com/owlplug/AppTestContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
import org.mockito.Mockito;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;

public class AppTestContext {

@MockBean
@MockitoBean
protected Preferences preferences;

@BeforeAll
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>21</java.version>
<javafx.version>21.0.2</javafx.version>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<java.version>25</java.version>
<javafx.version>25.0.1</javafx.version>
<maven.compiler.source>25</maven.compiler.source>
<maven.compiler.target>25</maven.compiler.target>
</properties>

<modules>
Expand Down