1,914,477 questions
Score of -5
0 answers
47 views
Resource leak: 'input' is never closedJava(536871799) [duplicate]
import java.util.Scanner;
class Hello{
public static void main(String[] args){
Scanner input = new Scanner(System.in);
System.out.println("Hello! Enter your name: ");
...
Score of 0
0 answers
57 views
Web service response time increased significantly after adding field-level data masking (30 records taking [X] ms vs [Y] ms before) [closed]
Question
What can be the recommended way to profile where the time is going when masking was the only change (e.g. regex compilation, per-field DB/config lookups, encryption/decryption, extra ...
Score of -3
1 answer
100 views
Maven Extension for global version override
I'm currently trying to write a Maven extension to make it a bit easier for our team(s) to do dependencies overrides. Or to at least override versions from imported boms like the spring-boot-...
Score of -1
1 answer
105 views
Modeling a hierarchical staff role system alongside a plain customer role: same User entity or split into Customer/Employee?
I'm building an e-commerce backend in Spring Boot with Spring Security. Currently I have a single User entity that implements UserDetails, used for both customers and staff (admins/managers/employees),...
Score of 2
2 answers
128 views
How should I handle retries when a Spring Boot service provisions a PostgreSQL cluster through a cloud API?
I'm working on a Spring Boot service that provisions PostgreSQL clusters through a cloud provider's API.
The provider's API is asynchronous, so my endpoint roughly works like this:
POST /clusters
...
Score of 0
3 answers
121 views
React App.jsx page not able to make web socket connection with Spring Boot backend
Here is the App.jsx, all the packages are installed:
import React, { useState, useEffect, useRef } from 'react';
import SockJS from 'sockjs-client';
import { Client } from '@stomp/stompjs';
function ...
Score of 0
1 answer
88 views
Hibernate issue: makes an insert when running a delete on managed entity [closed]
I am working on a Spring Boot project that utilizes Hibernate 7.4.7.Final and an Oracle database. I came across a situation when I tried to delete a managed entity from its table.
The managed entity's ...
Score of 2
1 answer
82 views
Disable `maven-build-cache-extension` for specific modules while _also_ allowing it to wholesale dis/enabled from command line
I have a multi-module Maven project.
I want to integrate maven-build-cache-extension against a remote cache, but with some restrictions - I'm struggling to satisfy all simultaneously:
I only want to ...
Score of 0
2 answers
105 views
Log4j2 logging works for Tomcat9 but not for webapps
I'm in the process of upgrading our server platform for several webapps running successfully for years on Tomcat8. I'd like to upgrade all relevant platforms on my Mac as a proof of concept before ...
Score of 0
2 answers
190 views
Trying to call a constructor + instance that summons a ball from another class that just works as a centric timeframe [closed]
I am trying to call a class that summons a ball from another class that just works as a centric timeframe.
It doesn't give me any errors upon loading but all I see is the window popping up with a ...
Score of 1
1 answer
122 views
How to create a smooth zoomable JTextPane/JTextArea in Swing?
I'm trying to achieve a MS Word-like zoom slider which allows you to zoom to basically any percent you want to. Take for instance this answer; while it does work, it doesn't essentially zoom in '...
Score of 4
1 answer
146 views
How to access current attempt count in Spring Boot 4's native for soft vs hard retry limits?
With the native retry support in Spring Boot 4 / Spring Framework, org.springframework.core.retry.RetryPolicy uses a simplified method signature:
public interface RetryPolicy {
boolean shouldRetry(...
Score of 5
1 answer
132 views
iText CCITTFaxDecode returns corrupted image when width is not multiple of 8, PDFBox works correctly
I'm investigating a problem in iText (tested with recent versions of iText Core 9.5.0+ and pdfSweep 5.0.5+ and java 21) when extracting a monochrome CCITT image from a PDF like this above:
<<
/...
Score of -3
2 answers
315 views
Unicode escapes in Java and compilation [closed]
I have a few questions about translations of Unicode escapes in Java :
As per JLS 25, section 3.3 :
A Java compiler should use the \uxxxx notation as an output format to display Unicode characters ...
Score of 4
2 answers
150 views
spring-boot-maven-plugin:start starts multiples instances of my application as wished, but stop only ends one
I have a Spring Boot application that I customize through external properties files.
During Maven's pre-integration-test, I launch three instances of it, through org.springframework.boot:spring-boot-...