Questions tagged [java]
Java is a high-level object-oriented programming language. Use this tag when you're having problems using or understanding the language itself. This tag is frequently used alongside other tags for libraries and/or frameworks used by Java developers.
1,919,569
questions
0
votes
0
answers
3
views
GRPC python cannot modify trailing metadata of python rpc status when aborting request (StatusRuntimeException)
Tried some hours to transfer trailing metadata inside StatusRuntimeException from a python service. This is like the current code sample which apparently doesn't work since the trailing_metadata is ...
0
votes
0
answers
4
views
Spring Boot JSON Merge Patch map properties to custom type field
In our codebase, we have a class called OptionalOrUndefined
public class OptionalOrUndefined<T> {
@Getter private final boolean defined;
private final T value;
public static <T> ...
0
votes
0
answers
10
views
Proper way to shut down a Spring Boot application after a specific unit of work is completed
I have a number of Spring Boot services that are always running that perform several different kinds of tasks. For example I have one service that is reading from an Azure Service Bus queue using ...
0
votes
0
answers
5
views
ObservationHandler<ServerRequestObservationContext> does not expose context values to DefaultServerRequestObservationConvention
I am trying to use and extend spring boot's Observation API solution for instrumenting metrics for spring mvc http.server.requests.
I'm trying to add a custom tag, with the key duration, and a value ...
0
votes
0
answers
11
views
OpenAPI Swagger Documentation Jargons
I have configured OpenAPI documentation in my spring boot application. Everything is coming that is expected but there are a lot of jargons coming up. Only the highlighted and ticked values are ...
0
votes
0
answers
6
views
Getting AccessDenied while accessing getAllSites() method in MS Graph using Java
Getting AccessDenied error while accessing getAllSites() method in MS Graph using Java. I have taken this block of code from Microsoft Learn. When I tried to execute this code, I'm receiving Access ...
-2
votes
0
answers
28
views
Exception in thread "main" java.time.format.DateTimeParseException: Text '04-Sep-2023' could not be parsed at index 3 [duplicate]
below is the datetimeformatter
DateTimeFormatter dtf2 = new DateTimeFormatterBuilder().parseCaseInsensitive()
.append(DateTimeFormatter.ofPattern("dd-MMM-yyyy")).toFormatter()...
-1
votes
1
answer
30
views
Stream anyMatch accept an method reference not implement Predicate [duplicate]
Stream.anyMatch is defined as:
boolean anyMatch(Predicate<? super T> predicate)
I created a new Class as follows:
class ClassA {
public boolean anyMethodName(Object o) {
return ...
-1
votes
0
answers
10
views
Trouble streaming non-local Google Photos video without downloading
I'm making an app where the user can select a video from the gallery and launch it later using their default viewer.
My initial attempt looked like this
Intent intent = new Intent();
intent.setType(&...
0
votes
0
answers
4
views
Java API only partially available with Frida aarch64
I tried to attach with Frida to Java process run on aarch64 Linux (not Android)
I got that error:
using frida-server-16.4.3-linux-arm64
[Remote::PID::1234 ]-> Java.enumerateLoadedClasses();
Error: ...
-4
votes
0
answers
39
views
Why Can't Characters Be Converted to Operators at Runtime?(java) [closed]
While learning Java, I wondered if there was a way to take an operator as a character input and use it directly in calculations. I realized that without using if or switch statements, there is no way ...
0
votes
1
answer
34
views
How do you assess code for problems handling leap seconds (particularly Java)? [duplicate]
We recently got notice that there may be a negative leap second at the end of the year and we need to determine how it will affect our programs (we write mostly java programs). I've done some ...
0
votes
0
answers
15
views
cannot access class com.sun.tools.javac.api.JavacTrees (in module jdk.compiler)
I have customized an annotation handler using java21. The pom file of the project where the annotation processor is located is shown below:
<project xmlns="http://maven.apache.org/POM/4.0.0&...
0
votes
0
answers
11
views
Android - BillingLogger: Skipped logging since initialization failed
Testing out in app purchases with the following:
purchasesUpdatedListener = new PurchasesUpdatedListener() {
@Override
public void onPurchasesUpdated(BillingResult billingResult, List<...
0
votes
0
answers
28
views
Why is a clean Maven project in Netbeans not running
I am setting up a local instance to run a Java webapp. It's been a while since I've done this but I've done it in the past. So far what I've done is installed JDK 22.0.2 and Netbeans 22 on my local ...