diff --git a/src/main/java/envoy/client/net/Receiver.java b/src/main/java/envoy/client/net/Receiver.java index 514e20a..55042d3 100644 --- a/src/main/java/envoy/client/net/Receiver.java +++ b/src/main/java/envoy/client/net/Receiver.java @@ -69,8 +69,9 @@ public class Receiver extends Thread { // Get appropriate processor @SuppressWarnings("rawtypes") final Consumer processor = processors.get(obj.getClass()); - if (processor == null) logger.log(Level.WARNING, - String.format("The received object has the class %s for which no processor is defined.", obj.getClass())); + if (processor == null) + logger.log(Level.WARNING, String.format( + "The received object has the class %s for which no processor is defined.", obj.getClass())); else processor.accept(obj); } } diff --git a/src/main/java/envoy/client/ui/Startup.java b/src/main/java/envoy/client/ui/Startup.java index 906f704..cc70ec2 100644 --- a/src/main/java/envoy/client/ui/Startup.java +++ b/src/main/java/envoy/client/ui/Startup.java @@ -65,7 +65,7 @@ public final class Startup extends Application { if (!config.isInitialized()) throw new EnvoyException("Configuration is not fully initialized"); } catch (final Exception e) { new Alert(AlertType.ERROR, "Error loading configuration values:\n" + e); - logger.log(Level.SEVERE, "Error loading configuration values", e); + logger.log(Level.SEVERE, "Error loading configuration values: ", e); e.printStackTrace(); System.exit(1); } diff --git a/src/main/java/envoy/client/ui/controller/ChatScene.java b/src/main/java/envoy/client/ui/controller/ChatScene.java index 08e1501..5f675f9 100644 --- a/src/main/java/envoy/client/ui/controller/ChatScene.java +++ b/src/main/java/envoy/client/ui/controller/ChatScene.java @@ -199,15 +199,15 @@ public final class ChatScene { /** * Checks the text length of the {@code messageTextArea}, adjusts the - * {@code remainingChars} - Label and checks whether to send the message + * {@code remainingChars} label and checks whether to send the message * automatically. * - * @param e the keys that have been entered + * @param e the key event that will be analyzed for a post request * @since Envoy Client v0.1-beta */ @FXML private void checkKeyCombination(KeyEvent e) { - // checks whether the text is too long + // Checks whether the text is too long messageTextUpdated(); // Automatic sending of messages via (ctrl +) enter checkPostConditions(e); @@ -219,8 +219,8 @@ public final class ChatScene { */ @FXML private void checkPostConditions(KeyEvent e) { - if (!postButton.isDisabled() && settings.isEnterToSend() && e.getCode() == KeyCode.ENTER - || !settings.isEnterToSend() && e.getCode() == KeyCode.ENTER && e.isControlDown()) + if (!postButton.isDisabled() && (settings.isEnterToSend() && e.getCode() == KeyCode.ENTER + || !settings.isEnterToSend() && e.getCode() == KeyCode.ENTER && e.isControlDown())) postMessage(); postButton.setDisable(messageTextArea.getText().isBlank() || currentChat == null); } @@ -242,7 +242,7 @@ public final class ChatScene { } /** - * Sets the text and text-color of the {@code remainingChars} - Label. + * Sets the text and text color of the {@code remainingChars} label. * * @since Envoy Client v0.1-beta */