1,918,276 questions
0
votes
0
answers
12
views
Firebase Firestore only updates when accessed through a specific Android activity [duplicate]
I'm working on an Android app where users can add and remove restaurants from their favourites via the RestaurantPage activity. When I access the RestaurantPage activity from the UserFavourites ...
0
votes
0
answers
14
views
Why does RestTemplate, starting from Java 21, run on a different thread even without virtual threads and without @Async, and why does MDC get lost?
i recently migrated from java17 to 21. I use logback MDC to log http request and response. each http request may lead to execute several resttemplate sync call. i use mdc to generate UUID as traceId ...
0
votes
0
answers
34
views
How to List pdf filenames
I cannot get a list of files ending with .pdf, I have tried everything, it lists everything else in the folder, except for the pdf's, what is wrong with this. The program then displays the list in a
...
1
vote
0
answers
24
views
Spring WebClient takes too long to process the first request — subsequent calls fast
I'm using Spring WebClient in my Java application to authenticate with Keycloak.
The issue I'm facing is:
The first WebClient request takes a long time (5-9 seconds), but all subsequent requests are ...
-1
votes
0
answers
49
views
Hibernate 7 and H2 2.4.240 compatible issues
When upgrading H2 to the latest 2.4.240, the H2 specific tests failed with the following errors:
insert into posts (content,created_at,slug,status,title,version,id) values (?,?,?,?,?,?,?) [23514-240]
...
-1
votes
0
answers
30
views
I'm unable to implement auto focus in Iframe [closed]
I'm designing custom automation report(Playwright with Java using Junit). Encountering issue where I'm unable to implement "auto focus" when I click on the scenario in the table. Focus ...
0
votes
0
answers
37
views
JRecord - Build issues while trying to install package through Maven POM
I am trying out way to install JRecord and CB2XML in my spring boot application. I tried to use the package through POM xml by mentioning the dependencies.
<dependency>
<...
0
votes
0
answers
47
views
Translate escaped string from XML file
Let's assume I have the string "F%c3%bcr%20alle" in a xml file. It should translate to "Für alle". I can do the unescaping with JavaScript:
let decoded = decodeURIComponent("F%...
0
votes
0
answers
58
views
Mapping an entity with an embedded key
There is a class with an EmbeddedId.
@Entity
@Getter
@Setter
@Table(name = "indicator_values")
public class IndicatorValue {
@EmbeddedId
public IndicatorValueId id;
@Column(...
2
votes
0
answers
65
views
Can JavaFX WebView show webp images?
I use JavaFX 26-ea+6 on Ubuntu 20.04 and it seems that WebView can't show webp images. This is my code:
public class TestFx extends Application {
@Override
public void start(Stage ...
1
vote
0
answers
59
views
Firestore only updates when accessed through a specific Android activity
I'm working on an Android app where users can add and remove restaurants from their favourites via the RestaurantPage activity. When I access the RestaurantPage activity from the UserFavourites ...
0
votes
1
answer
36
views
Twilio Signature validation for ConversationRelay WebSocket with Java SDK
In https://github.com/enola-dev/enola/pull/1927 I attempted to add signature validation for WebSocket authentication security to my https://github.com/enola-dev/twilio-conversation-relay-java Java ...
Best practices
0
votes
4
replies
80
views
Looking for workaround for library with missing interface
I have a Java library (FIHR) where there are conventions in a bean class hierarchy that were NOT formalized as an interface.
For example many subclasses have a getStatus() property but there is no ...
2
votes
1
answer
54
views
ForkJoinPool and RecursiveTask lead to deadlock when join is called in a different thread than fork
The program below never ends:
void main() {
try (Fibonacci fibonacci = new Fibonacci()) {
IO.println(fibonacci.calculate(9));
}
}
public static class Fibonacci implements ...
1
vote
1
answer
45
views
Is there a way to automate user input with JLine's LineReader?
When handling user input through Scanner(System.in), you can use System.setIn() to automate user input.
Like this:
package edu.ntnu.idi.idat;
import java.io.ByteArrayInputStream;
import java.io....