Questions tagged [java]
Java is a high-level, platform-independent, object-oriented programming language originally developed by Sun Microsystems. Java is currently owned by Oracle, which purchased Sun in 2010.
5,020 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
2
answers
223
views
Since `float` (plus `double`) stores exponents, does replacement of ` / 2` with `>> 1` improve CPU use?
Searches have not found standard functions which do this.
Do you have to produce your own, such as:
double shift(double value, long shift) {
static long exponentMask = 0x7ff0000000000000l;
long ...
7
votes
3
answers
517
views
What SOLID principles does the Java List interface challenge?
The Java List<E> interface includes methods, such as add(E) and remove(Object), that work as the names suggest on instances of mutable concrete implementations, such as ArrayList<E> and ...
1
vote
1
answer
196
views
What is the difference between Vertical Slice Architecture and Feature-Based Architecture
I am refactoring my monolithic application, in which the code is organized based on layered architecture.
I want to implement Modulith (Modular Monolit) in my app, but I've run into a problem: I haven'...
0
votes
2
answers
140
views
A class that implements two interfaces that extend the same interface [duplicate]
I'll get straight to the point. I want to implement a class structure in Java similar to the one in the image.
Am I falling into bad practice with this kind of diamond-shaped interface implementation?...
2
votes
3
answers
630
views
Convenience inheritance
Sometimes, you inherit from a class that defines the semantics of your type (Shape – Ellipse – Circle). Other times, you inherit simply because it's convenient to do so.
A superclass may have ...
1
vote
2
answers
255
views
Testing GUI panel involving modal dialogs
Suppose you have a panel with a table, which I will call a pane.
The table has a toolbar above it, including an edit button.
Editing involves showing an editing dialog. It allows the user to edit the ...
0
votes
2
answers
201
views
Keeping the impact of changes low when moving shared domain objects into a library
I’m refactoring a microservice project where multiple services share the same domain objects. Over time, these objects have diverged across services, causing inconsistencies.
To solve this, I plan to ...
4
votes
2
answers
321
views
Managing Growth in Microservice Architecture: Is Modular Monolith the Solution?
Our team of 5 members are managing a microservice architecture that currently includes around 200 Java Spring boot microservices, with approximately 50 new services being added each year. We follow ...
0
votes
3
answers
217
views
Tracking data change in GUI form
Problem: our application allows users to close a form window after certain changes without any confirmation, instead of pressing the Save button. This makes them complain they have to start afresh.
We ...
1
vote
2
answers
207
views
Classpath hell: independently updated apps with shared dependencies
This is how our desktop applications are launched. In this case, it's called DesktopApp (I changed the actual name). As you see, the dependencies are hard-coded, including their versions. In the ...
0
votes
1
answer
128
views
How to create a job management for a hybrid cloud/on-premise software?
I am exploring the state-of-the-art methods to create a service that can run and scale in both cloud (container) and on-premise environments.
The current version of the software is designed for on-...
0
votes
1
answer
111
views
Designing a Scalable Caching Layer for User and Tenant Metadata in a Messaging System
I'm developing a microservice-based application that processes a high volume of messages. Each message must be handled according to the user’s personal settings and some tenant-specific (customer) ...
2
votes
3
answers
263
views
Search requests with multiple search values
(related: Fetching records matching multiple joined attributes)
If Spring Data doesn't allow GET requests to have a body (and it's considered bad practice anyway)
curl -X 'GET' \
'http://localhost:...
0
votes
2
answers
156
views
Is it better to pass a specific "context" object to handlers rather than the entire domain object?
I’m designing a system where various "handlers" apply business rules to an object. Initially I had each handler receive the full domain object:
// A large domain object with many properties and ...
1
vote
5
answers
556
views
Code reusability/inheritance introduces pointless testing
Say I have a bunch of classes that imitate cars: SportsCar, Truck, and SUV. All of these classes share some public methods like start() and stop() which they inherit from an abstract class Car. While ...