1,916,404 questions
Advice
1
vote
3
replies
68
views
How can a class that implements an interface return another interface in a method?
I am sorry for asking this, but I am very confused. I am creating a project where I compare various sorting methods (such as Selection Sort, Bubble Sort, and Merge Sort). It asks me to create two ...
0
votes
0
answers
52
views
Getting an java.io.IOException: The parameter is incorrect when trying to read/write to a disk partition
I am trying to read/write chunks bytes on a disk partition (lettered W). However, when I try to use a RandomAccessFile to do this, it always tells me that my parameter is incorrect on the line reading ...
Best practices
0
votes
0
replies
49
views
Java ReferenceQueue and garbage collection
The documentation for SoftReference states that
All soft references are guaranteed to be cleared before the virtual machine throws an OutOfMemoryError
This is only sensible, but on all occasions I ...
0
votes
1
answer
68
views
Efficient concurrent 'bag' implementation for Java
I need a most generic mutable collection implementation. The only operations I am interested in are:
Adding a new element to the collection;
Traversal in any order;
Finalizing the collection, ...
Best practices
0
votes
7
replies
79
views
How do I determine the concrete subclass of an Object knowing only the abstract superclass?
I'm using an external library which builds an internal representation of an abstract syntax tree (AST) for a toy programming language given an XML file representation of the AST.
The method I'm using, ...
Advice
0
votes
3
replies
53
views
What is the difference between spring.cloud.gateway.server.webflux.httpclient.response-timeout and spring.cloud.gateway.httpclient.response-timeout
What is the difference between these two Spring Cloud Gateway properties -
spring.cloud.gateway.server.webflux.httpclient.response-timeout and spring.cloud.gateway.httpclient.response-timeout
Are both ...
0
votes
1
answer
64
views
Behaviour at reading linebased data from a socket
I have an external weather sensor, which gives periodically linebased NMEA-Data:
$WIMWV,357.0,R,5.2,M,A*1A\r\n$WIMWV,123.0,T,5.2,M,A*1A\r\n
The structure of the data contains exactly two lines (R and ...
Advice
0
votes
0
replies
35
views
Camera2 + MediaRecorder: How to crop recorded video to match preview (portrait WYSIWYG) on Android (Rockchip device)?
I am building an Android app using Camera2 API + MediaRecorder where the device is locked in portrait mode (kiosk mode).
Problem
The camera preview looks correct (portrait, 9:16), but the recorded ...
0
votes
1
answer
42
views
Cannot enable TRACE/FINEST logging for Oracle Universal Connection Pool (UCP) in Spring Boot 3
I have spent couple of days trying to turn on Oracle UCP logs in my Spring boot app but haven't succeeded.
Here is code that i used to get some details (root and oracle loggers level, handlers):
@...
Advice
0
votes
1
replies
64
views
Free resources to learn Java Full Stack Development (beginner to advanced)
I’m looking for good free resources to learn Java Full Stack Development (beginner to advanced). It would be helpful if the resources cover:
Core Java
Spring / Spring Boot
REST APIs
Database (...
2
votes
2
answers
76
views
My recreation of John Conway's Game of Life isn't acting as I expected
Recently, I tried recreating John Conway's Game of Life in Java. While I was coding, I did lots of tests, and everything seemed fine. However, when I actually tested it, it didn't work correctly. For ...
3
votes
1
answer
41
views
Jackson 3 and final Map deserialization
In a corporate project, I’m migrating from Spring 3.x to Spring 4.x, and also from Jackson 2.x to 3.x at the same time.
I do have the following problem: with Jackson 2 this code works "as is"...
Advice
3
votes
3
replies
89
views
What project types best prepare students for real-world software engineering?
I am leading a university coding lab where students work in teams on 3-month projects. The goal is to help them become job-ready junior developers by working on problems that reflect real-world ...
Tooling
0
votes
1
replies
47
views
Quarkus extension: is it possible to merge runtime and deployment JARs into a single artifact?
A Quarkus extension uses a multi-module Maven structure. A minimal example is:
quarkus-extension
├── integration-tests
│ └── pom.xml
├── deployment
│ └── pom.xml
├── runtime
│ └── pom.xml
└── ...
Tooling
0
votes
2
replies
56
views
maven multimodules and bypassing the lifecycle system
I'm trying to build a CI system that does each part of a maven build step in a separate job.
That is, we run mvn compiler:compile compiler:testCompile in one job, then mvn surefire:test in another one,...