Category "java"

Parameterize some tests but not others with RobolectricTest

I am looking to add a parameterized test to an existing test suite that uses the Robolectric test framework, like so: @RunWith(RobolectricTestRunner.class) publ

How to correctly close netty channel without workgroup termination

I have following binding to handle UDP packets private void doStartServer() { final UDPPacketHandler udpPacketHandler = new UDPPacketHandler(messageDeco

Apache POI: ${my_placeholder} is treated as three different runs

I have a .docx template with placeholders to be filled, such as ${programming_language}, ${education}, etc. The placeholder keywords must be easily distinguishe

Employee Salary Calculation

Task Description I have this problem statement: Create a class Employee with the following private member variables. int employeeId String employeeName double

how to fetch single attribute from redis cache spring boot?

how to fetch a single attribute from Redis cache spring boot? I want a response like this one { "answer": "FHFHFHFHFH" } but getting

how to disable gradle build scan permanently?

I know I can add --no-scan on an individual command line (see https://docs.gradle.com/build-scan-plugin/), but I'm looking for a way to disable this in build.gr

What are the defaults in Spring @Async?

Could you tell me what are the default parameters for Spring @Async ThreadPoolTaskExecutor or how can I find them one my own? What are the default values for m

generate auto increment id (int) in java for multi instance application

I have a table which stores users information(id, name, surname, address, email, etc). I don't want to use auto-increment function of the database. So, we don't

java.lang.NullPointerException: Cannot invoke "jdk.internal.platform.CgroupInfo.getMountPoint()" because "anyController" is null

I have an error when I'm trying to copy data from csv file into mysql database, but when I launch the temps.etl.xml file with java launcher, it gives me an erro

Password manager autofill

how to make an autofill app like dashlane, or lastpass on android studio. I want to make an autofill app, example facebook, It can autofill my login credentials

spring boot - springdoc open api: No api definiation provided error

I need to document my spring boot application's rest apis with SpringDoc OpenApi. So, I added this dependency in my pom.xml: <dependency> <groupId&

Find an object with certain private value in a java Collection

I am currently coding a game that uses an 8x8 grid. I have to stock a domino (2x1 size) in the grid for every player but when a player wants to add a Domino to

Read entire File to String Spring Boot [duplicate]

I have a text file with path as resources/templates/temp.txt. I tried reading it with built in Files.readAllBytes() function found in java.nio

Java code static analysis to find whether the code contains a HTTP call?

I am working on a very complex java web project with about hundreds of developers and intend to improve the performance of this monolitic. What I am trying to d

I have an issue with ProgressBar Widget

Basically I have a ConsentForm Activity that the user scrolls through and give their consent. Upon pressing the consent Btn (Yes) a dialog where they have to en

handleWindowVisibility: no activity for token android.os.BinderProxy

I have a Login screen and upon success login, it finishes and shows another page that has information about the user. I read about this post and also this post.

Is it possible to download the first 100 lines of a big file with millions of lines from S3?

I have multiple 100MB raw files with series of user activities in CSV format. I only want to download the first 100 lines of the files. The problem is that each

Should I use FFMPEG library vs CLI

In terms of performance, what is better to use, an FFMPEG library(like https://github.com/kokorin/Jaffree) or the FFMPEG command line interface?

How to combine ExtentReports for multiple JUnit5 test classes into one HTML file?

I'm using ExtentReports (version 5.0.5) with JUnit 5. Here is my BaseTest class snippet. public class BaseTest { protected static ExtentReports extent;

I must foreground service when receives location information only once in android 10 and above?

hello friends, i want receive update user location and show in text view only once and remove update location when it received. i must use foreground service f