Tags:

Set elements of a java array from another class or file


I’m making a game right now and I’m trying to setup a CreatePlayer method. In the main class, I take the Player class as an object to get its variables, methods ect. package com.deud07.main; import …

Tags:

For restfulness, should I use one method for different get requests or seperate them


I am making a Blackjack rest service, and currently have 4 GET endpoints: /hit /stand /double down /surrender I could also make just 1 POST/PATCH endpoint that uses a dto to send a move, or should I …

Tags:

Error while trying to upload file conversion types mismatch


I have folowing entety. package com.example.model; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import …

Tags:

Java does not catch exception


I am trying to implement lambda expression for constructor. My constructor can throw an IllegalArgumentException. I tried different ways. First way is just calling lambda expression: catchThrowable(() …

Tags:

Stop receiving again and again messages in consumer of the queue when an exception occurs in Spring JMS


I send a message from the sender application as below. @GetMapping(“send/event”) public void sendEvent() { try { String stringEvent = objectMapper….

Tags:

inApp Update, download but not installed


I have a problem with inapp update. A new version window appears, when you press the “Update now” button, unfortunately nothing happens, the application downloads in the background, but …

Tags:

Spring Boot – @Slf4j Logging Behavior differs in Test and in real Application


I have a sample class like this, import lombok.extern.slf4j.Slf4j; @Slf4j public class TestLogging { public void printLogLevel(){ if(log.isErrorEnabled()){ log.error(“…

Tags:

Composite object not showing up in the response – Spring Boot


So I’m getting some roles introduced in my system. I have a class that looks like this : @Entity @Table(name = “user_role_mapping”) @AllArgsConstructor @NoArgsConstructor @Data public class …

Tags:

How to send both commands and files using Netty


I don’t understand what I’m doing wrong. How to send both commands and files. Below are the server and client pipelines. client pipeline: pipeline.addLast(new ObjectDecoder(ClassResolvers….

Tags:

How do I connect methods with dots? – Refactoring


I am trying to refactor my code. But I dont know how to do what I want to do. I dont know how it’s called so I dont find it with google. My Code: public void print(int from, int to) { // TODO …