Questions tagged [java8]
Java 8 refers to the version of the Java platform released in March 2014.
73 questions
1 vote
2 answers
281 views
Choosing a strategy for representing and handling errors (or more generally status codes) in java 8
I asked this questions on StackOverflow but it's definitely a bit too broad. Even for this website, although the question is about software design, it might not be enough "focused". I am ...
1 vote
1 answer
2k views
How to remove unused code from a jar file? [closed]
I have a jar file, for example foo.jar. My code contains a lot of libraries (almost 75 jar dependencies). I am not using anything like maven or gradle, I'm just using pure java with pure jar files as ...
0 votes
1 answer
1k views
Best practice to create model objects in Java
I have an existing microservice that talks to a Natural Language Processing (NLP) product and fetches around 50 fields. I need to create domain objects in Java now from these fields. I read about ...
-1 votes
1 answer
603 views
How to handle pagination in a stateless application having multiple components involved for the data?
This problem statement is around one UI component, 3 service components. The current design of the application is like: UI makes request to Service-A to get data Service-A first makes a call to ...
2 votes
4 answers
2k views
Is the Java Stream API intended to replace loops?
I mean the question in the sense of: Should the occurrence of simple loops on collections in code in Java 8 and higher be regarded as code smell (except in justified exceptions)? When it came to Java ...
1 vote
0 answers
60 views
how to handle external shared libraries, which we do not want to expose
We have 800-900 services we expose via an ESB. Each service is a web app hosted on Tomcat servers. We have 4 tomcat servers per group of services. Our services are split into 4 groups. Each service (...
0 votes
3 answers
1k views
Populate values in a map from a series of function calls
I have the following common pattern that I need to use in an application: Given a list of keys, call a function with a parameter to find values for the keys. The function may return null for a given ...
3 votes
2 answers
2k views
Are there any problems with using class variables in Java that can be accessed by any method?
So I've been coding in Java for a decent amount of time, but recently, I've started a class that cares about my coding design. In the past, if I had two methods inside a class that needed to edit the ...