Skip to content
Advertisement

Tag: java

How can i set browser language in Selenide using Java?

Hello guys please how can i do it?When i run not headless mode browser is in english and everything works fine, but when i run headless mode language is changed to my native language. I am using this for headless mode. Answer Selenide Configuration class contains public static MutableCapabilities browserCapabilities which used within the driver startup if provided. For Chrome:

Does this hashCode make sense?

I came across some an hashcode function that does kind of the following: I am not fully convinced of the method used to calculate the hashCode, I know use of prime numbers yields a better distribution in general. But in this implementation I am not really convinced that’s the case. For example assuming a standard hash implementation I would miss

Importing OpenTelemetry trace data from Spring Boot application to Elastic APM – views are missing data

I have a Spring Boot application with Spring Cloud Sleuth, OpenTelemetry instrumentation and OpenTelemetry exporter OTLP. This is a gist of dependencies: spring-cloud-starter-sleuth without Brave, because we are using OpenTelemetry instrumentation spring-cloud-sleuth-otel-autoconfigure which introduces OpenTelemetry instrumentation libs and provides Spring autoconfiguration opentelemetry-exporter-otlp for sending data to apm server I have only basic configuration in my application.yml: With this setup I

incompatible types: Object cannot be converted to Diff

I have this Java method which his used to compare data: But for this line for (Diff<?> diff : diffResult.getDiffs()) { I get error: So I have: Do you know how I can fix this issue? P.S unfortunately the problem is not solved. I created this small example code: https://github.com/rcbandit111/hateos_poc/blob/main/src/main/java/com/hateos/test/assembler/CodeLogAssembler.java#L14 Can you advise how can be fixed, please? Answer If

Incoming kafka metrics are not detected in Appdynamcis – springkafka

We are using springboot and springkafka to consume and process the messages, and Appdynamics for capturing the Performance metrics. Appdynamics is capturing the out going topics and metrics, but not detecting the incoming topic and the metrics.The solutions we tried Custom configured the topics name in the backend Set enable-kafka-consumer to true Custom-interceptors.xml mentioned below In any of the cases

MapStruct. Mapping fields of list element by expression

Good afternoon! There is an object that contains field as type List, is it possible to set each (some) field of type T, by values generated in the annotation by the expression parameter? For example: Target object: Mapper interface: How can such an idea be implemented? In the documentation, I found only examples with 1:1 mapping. Edited: Also, i try

Advertisement