Changed compiler compliance to 11, modularized all packages (#114)

* added module- and package-info.java, changed JRE from 8 to 11

* updated maven from Java 1.8 to 11

Co-authored-by: CyB3RC0nN0R <kske@outlook.de>
This commit is contained in:
delvh 2020-03-07 19:38:06 +01:00 committed by GitHub
parent 6ffec1a3e3
commit 9a81fc5b06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 163 additions and 79 deletions

View File

@ -18,7 +18,7 @@
<attribute name="test" value="true"/> <attribute name="test" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>

View File

@ -9,9 +9,9 @@ jobs:
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Set up JDK 1.8 - name: Set up JDK 11
uses: actions/setup-java@v1 uses: actions/setup-java@v1
with: with:
java-version: 1.8 java-version: 11
- name: Build with Maven - name: Build with Maven
run: mvn -B package --file pom.xml run: mvn -B package --file pom.xml

View File

@ -10,9 +10,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@ -87,7 +87,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warn
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
@ -127,4 +127,4 @@ org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.compiler.source=11

17
pom.xml
View File

@ -5,7 +5,7 @@
<groupId>informatik-ag-ngl</groupId> <groupId>informatik-ag-ngl</groupId>
<artifactId>envoy-client</artifactId> <artifactId>envoy-client</artifactId>
<version>0.3-alpha</version> <version>0.1-beta</version>
<name>Envoy Client</name> <name>Envoy Client</name>
<url>https://github.com/informatik-ag-ngl/envoy-client</url> <url>https://github.com/informatik-ag-ngl/envoy-client</url>
@ -13,8 +13,8 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>11</maven.compiler.target>
</properties> </properties>
<repositories> <repositories>
@ -39,11 +39,20 @@
<directory>src/main/resources</directory> <directory>src/main/resources</directory>
</resource> </resource>
</resources> </resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<version>2.4.1</version> <version>3.2.0</version>
<executions> <executions>
<execution> <execution>
<phase>package</phase> <phase>package</phase>

View File

@ -0,0 +1,9 @@
/**
* This package contains all data classes and classes related to persistence.
*
* @author Kai S. K. Engelbart
* @author Leon Hofmeister
* @author Maximilian K&auml;fer
* @since Envoy v0.1-beta
*/
package envoy.client.data;

View File

@ -0,0 +1,9 @@
/**
* This package contains all client-sided events.
*
* @author Kai S. K. Engelbart
* @author Leon Hofmeister
* @author Maximilian K&auml;fer
* @since Envoy v0.1-beta
*/
package envoy.client.event;

View File

@ -85,7 +85,7 @@ public class Client implements Closeable {
rejected = false; rejected = false;
// Start receiver // Start receiver
new Thread(receiver).start(); receiver.start();
// Write login credentials // Write login credentials
SerializationUtils.writeBytesWithLength(credentials, socket.getOutputStream()); SerializationUtils.writeBytesWithLength(credentials, socket.getOutputStream());

View File

@ -21,7 +21,7 @@ import envoy.util.SerializationUtils;
* @author Kai S. K. Engelbart * @author Kai S. K. Engelbart
* @since Envoy v0.3-alpha * @since Envoy v0.3-alpha
*/ */
public class Receiver implements Runnable { public class Receiver extends Thread {
private final InputStream in; private final InputStream in;
private final Map<Class<?>, Consumer<?>> processors = new HashMap<>(); private final Map<Class<?>, Consumer<?>> processors = new HashMap<>();
@ -33,7 +33,10 @@ public class Receiver implements Runnable {
* *
* @param in the {@link InputStream} to parse objects from * @param in the {@link InputStream} to parse objects from
*/ */
public Receiver(InputStream in) { this.in = in; } public Receiver(InputStream in) {
super("Receiver");
this.in = in;
}
@Override @Override
public void run() { public void run() {

View File

@ -0,0 +1,9 @@
/**
* This package contains all classes related to client-server communication.
*
* @author Kai S. K. Engelbart
* @author Leon Hofmeister
* @author Maximilian K&auml;fer
* @since Envoy v0.1-beta
*/
package envoy.client.net;

View File

@ -91,7 +91,7 @@ public final class ComponentListModel<E> implements Iterable<E>, Serializable {
*/ */
@Override @Override
public Iterator<E> iterator() { public Iterator<E> iterator() {
return new Iterator<E>() { return new Iterator<>() {
Iterator<E> iter = elements.iterator(); Iterator<E> iter = elements.iterator();

View File

@ -0,0 +1,10 @@
/**
* This package defines a Swing component that can be used to display lists of
* other components to the user.
*
* @author Kai S. K. Engelbart
* @author Leon Hofmeister
* @author Maximilian K&auml;fer
* @since Envoy v0.3-alpha
*/
package envoy.client.ui.list;

View File

@ -0,0 +1,9 @@
/**
* This package contains classes defining the user interface.
*
* @author Kai S. K. Engelbart
* @author Leon Hofmeister
* @author Maximilian K&auml;fer
* @since Envoy v0.1-beta
*/
package envoy.client.ui;

View File

@ -0,0 +1,9 @@
/**
* This package contains user interface classes related to the settings screen.
*
* @author Kai S. K. Engelbart
* @author Leon Hofmeister
* @author Maximilian K&auml;fer
* @since Envoy v0.2-alpha
*/
package envoy.client.ui.settings;

View File

@ -0,0 +1,17 @@
/**
* This module contains all classes defining the client application of the Envoy
* project.
*
* @author Kai S. K. Engelbart
* @author Leon Hofmeister
* @author Maximilian K&auml;fer
* @since Envoy v0.1-beta
*/
module envoy {
requires transitive envoy.common;
requires transitive java.desktop;
requires transitive java.logging;
requires transitive java.naming;
requires transitive java.prefs;
}