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
14 changed files with 163 additions and 79 deletions

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;
// Start receiver
new Thread(receiver).start();
receiver.start();
// Write login credentials
SerializationUtils.writeBytesWithLength(credentials, socket.getOutputStream());

View File

@ -21,7 +21,7 @@ import envoy.util.SerializationUtils;
* @author Kai S. K. Engelbart
* @since Envoy v0.3-alpha
*/
public class Receiver implements Runnable {
public class Receiver extends Thread {
private final InputStream in;
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
*/
public Receiver(InputStream in) { this.in = in; }
public Receiver(InputStream in) {
super("Receiver");
this.in = in;
}
@Override
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
public Iterator<E> iterator() {
return new Iterator<E>() {
return new 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;
}