1,915,465 questions
Score of 0
0 answers
6 views
Frameset that displays random pages
I am trying to make a frameset that displays random pages from my site. There are a handful of pages that need to open in new tabs and are excluded. I'm not sure how to link this JS script with the ...
Advice
0
votes
0
replies
38
views
How to make ANTLR ignore unwanted tokens in the parse tree?
When parsing my grammar file, ANTLR seems to be reluctant to correct its course by ignoring tokens. For example, ? if true { is valid syntax, which is parsed into a definition with an expression true ...
Score of -2
0 answers
47 views
How to clear Redis ClientSideCaching/FrontendCache
I have some wrapper over CacheFrontend to make client-side caching in my app.
I have the config class where I create my client-side cache:
@Configuration
public class RedisConfiguration {
private ...
Best practices
1
vote
3
replies
59
views
Unit test separation
I have a test method for a utility class I made. Here's the test method
@Test
void interpolateTest() {
String input = "Hi, I am {} and it is {}℃ out";
...
Score of 0
1 answer
125 views
Java generics parameters multiple levels
I'm trying to extend MutableLiveData in multiple classes, each one extends the previous, like (those following rows could be copy/pasted directly in java file to test/lint them):
class ALiveData<T&...
Score of 0
0 answers
69 views
Spring thinks that my post processor doesn't implement the right interface if load time weaving is enabled and I use a factory method to create it
I've tried to create a minimal example of the problem. It took me many hours of debugging to understand the issue well enough to even attempt this. Hopefully, I got it right. We need three files:
...
Score of 0
1 answer
58 views
How to customize the pager prompt for JLine's Less builtin?
Is there a method to customize what is displayed as the pager prompt printed by JLine's Less builtin?
Examining the source code for JLine's Less, I can find no support for the -P option (which is what ...
Score of 0
0 answers
60 views
Ignoring binary data in Hibernate JDBC logging
I am using Hibernate 6.5.x, and I am currently logging the SQLs an the JDBC binding parameters using the following configuration from the Hibernate logging guide by Thorben Jannsen
org.hibernate.SQL=...
Score of -4
0 answers
69 views
Java NullPointerException after looping through a empty array, and trying to check if a certain variable is there [duplicate]
I have 2 builder patterns, in which I have items, and character respectively, the characters have arrays as one of their components. ( I have to include these just, so you can run the code, I can't ...
Score of -2
3 answers
230 views
My if statement always gives the same output [duplicate]
This if statement checks whether playerInput.contains("equip") or playerInput.contains("unequip")
System.out.println("Equip or UnEquip");
String playerInput = scanner....
Score of 0
0 answers
59 views
JxBrowser OFF_SCREEN mode: window.innerWidth/outerWidth report stale/inconsistent values during rapid resize — is there a resize-completion callback?
I'm embedding JxBrowser (Chromium) inside a Java Swing desktop application using OFF_SCREEN rendering mode. During window resize, I'm seeing a consistent race condition between Java's known-correct ...
Best practices
2
votes
4
replies
148
views
How would you read the data from the Excel file and store it into a database using Java?
You have an Excel (.xls/.xlsx) file containing 1000 employee records. How would you read the data from the Excel file and store it into a database using Java?
<dependency>
<groupId>org....
Score of -5
0 answers
157 views
IntelliJ IDEA debug issue
IntelliJ IDEA version 2026.1 | JDK 17 | Gradle 9.4.1
I cannot debug newly written code in IntelliJ IDEA, right now I want to use Hazelcast, I don't care about the correctness of the code, I just need ...
Score of 2
1 answer
108 views
How to configure maven to generate a site for a modular project
I've got a JPMS modular project with tests, and I want to generate a site using the Maven site plugin. I've made a minimal project to reproduce the problem which is here
If I run mvn site I get a ...
Score of 1
1 answer
109 views
Use custom validators in correct order
I have this DTO class that has class-level custom validators, Password and ConfirmPassword, depend on other fields, and I intend to use them on another DTO object.
@Data
@Builder(toBuilder = true)
@...