Skip to content

Commit

Permalink
Merge branch 'java17'
Browse files Browse the repository at this point in the history
  • Loading branch information
turbolocust committed Apr 9, 2022
2 parents 16ace35 + 3602364 commit 9a40b42
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 38 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
name: Java CI

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Build with Maven
run: mvn clean verify
5 changes: 0 additions & 5 deletions .travis.yml

This file was deleted.

6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<h1 align="center">GZipper</h1>
</p>

![Travis CI](https://travis-ci.org/turbolocust/GZipper.svg?branch=master)
![Java CI](https://github.com/turbolocust/GZipper/workflows/Java%20CI/badge.svg?branch=master)

## Features
Expand Down Expand Up @@ -37,6 +36,8 @@
* Windows 10
* Ubuntu (20.04)

*Note, that it should work on newer versions of these operating systems as well if a compatible JRE is used, but it is not guaranteed. The same is true for different Linux distributions.*

## Quick Start

In order to quickly launch the application, run either of the following scripts:
Expand Down Expand Up @@ -74,7 +75,8 @@ For compression and decompression this application uses parts of the commons-com

## Remarks

This application is built for Java 11 and supports Kotlin. In theory, it should work fine with higher Java versions. To use it with a higher version, the JavaFX dependencies may have to be updated (see pom.xml).
This application is built for Java 11 and higher and supports Kotlin.<br />
Since version 2.0.0, the main (or master) branch targets Java 17.

# Screenshots

Expand Down
20 changes: 10 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.gzipper</groupId>
<artifactId>GZipper</artifactId>
<version>1.5.2</version>
<version>2.0.0</version>
<packaging>jar</packaging>

<name>GZipper</name>
Expand Down Expand Up @@ -134,7 +134,7 @@
<!-- Maven surefire plugin -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<version>3.0.0-M5</version>
<configuration>
<argLine>-Dfile.encoding=UTF-8</argLine>
</configuration>
Expand All @@ -160,28 +160,28 @@
<!-- JavaFX Base -->
<groupId>org.openjfx</groupId>
<artifactId>javafx-base</artifactId>
<version>11.0.2</version>
<version>17.0.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<!-- JavaFX Controls -->
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>11.0.2</version>
<version>17.0.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<!-- JavaFX FXML -->
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>11.0.2</version>
<version>17.0.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<!-- JavaFX graphics -->
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>11.0.2</version>
<version>17.0.2</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand All @@ -198,7 +198,7 @@
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<artifactId>kotlin-stdlib</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
Expand All @@ -210,8 +210,8 @@
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<kotlin.version>1.5.32</kotlin.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<kotlin.version>1.6.10</kotlin.version>
</properties>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ public final class AboutViewController extends BaseController {
/**
* The version of this application.
*/
private static final String APP_VERSION = "1.5.2";
private static final String APP_VERSION = "2.0.0";

/**
* The build date of this application (mm/dd/yyyy).
*/
private static final String APP_BUILD_DATE = "02/27/2022";
private static final String APP_BUILD_DATE = "04/09/2022";

/**
* The author of this application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@
public final class HashViewController extends BaseController implements Interruptible {

/**
* Default buffer size when reading large files. Currently 1 mebibyte(s).
* Default buffer size when reading large files. Currently, set to 1 mebibyte.
*/
private static final int BUFFER_SIZE = 1024 * 1024;

/**
* Threshold at which {@link #BUFFER_SIZE} will be used. Currently set to 100 Mebibytes.
* Threshold at which {@link #BUFFER_SIZE} will be used. Currently, set to 100 Mebibyte.
*/
private static final int LARGE_FILE_THRESHOLD = 1024 * 1024 * 100;

Expand Down Expand Up @@ -190,12 +190,9 @@ void handleResultTableOnDragDropped(DragEvent evt) {
}

private void initTableCells() {
_fileNameColumn.setCellValueFactory(data
-> new ReadOnlyStringWrapper(data.getValue().getFileName()));
_filePathColumn.setCellValueFactory(data
-> new ReadOnlyStringWrapper(data.getValue().getFilePath()));
_hashValueColumn.setCellValueFactory(data
-> new ReadOnlyStringWrapper(data.getValue().getHashValue()));
_fileNameColumn.setCellValueFactory(data -> new ReadOnlyStringWrapper(data.getValue().getFileName()));
_filePathColumn.setCellValueFactory(data -> new ReadOnlyStringWrapper(data.getValue().getFilePath()));
_hashValueColumn.setCellValueFactory(data -> new ReadOnlyStringWrapper(data.getValue().getHashValue()));
setCellFactory(_fileNameColumn);
setCellFactory(_filePathColumn);
setCellFactory(_hashValueColumn);
Expand Down Expand Up @@ -306,8 +303,7 @@ private void computeAndAppend(File file) {
if (file.isFile()) { // folders are not supported
final MessageDigestAlgorithm algorithm = _algorithm.get();
if (file.length() > LARGE_FILE_THRESHOLD) {
final MessageDigestProvider provider
= MessageDigestProvider.createProvider(algorithm);
final MessageDigestProvider provider = MessageDigestProvider.createProvider(algorithm);
try (FileInputStream fis = new FileInputStream(file);
BufferedInputStream bis = new BufferedInputStream(fis, BUFFER_SIZE)) {
final byte[] buffer = new byte[BUFFER_SIZE];
Expand Down Expand Up @@ -443,8 +439,7 @@ private void appendColumn(NamedMessageDigestResult namedResult, File file) {
@Override
public void initialize(URL location, ResourceBundle resources) {
// set up combo box
final MessageDigestAlgorithm selectedAlgorithm
= MessageDigestAlgorithm.SHA_256;
final MessageDigestAlgorithm selectedAlgorithm = MessageDigestAlgorithm.SHA_256;
_algorithmComboBox.getItems().addAll(MessageDigestAlgorithm.values());
_algorithmComboBox.valueProperty().bindBidirectional(_algorithm);
_algorithm.setValue(selectedAlgorithm);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fxml/HashView.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<HBox alignment="CENTER_LEFT" spacing="8.0">
<children>
<CheckBox fx:id="_appendFilesCheckBox" mnemonicParsing="false" text="%appendFiles.text" wrapText="true" />
<CheckBox fx:id="_lowerCaseCheckBox" mnemonicParsing="false" onAction="#handleLowerCaseCheckBoxAction" text="%lowerCase.text" />
<CheckBox fx:id="_lowerCaseCheckBox" selected="true" mnemonicParsing="false" onAction="#handleLowerCaseCheckBoxAction" text="%lowerCase.text" />
</children>
<padding>
<Insets left="8.0" />
Expand Down

0 comments on commit 9a40b42

Please sign in to comment.