Category "java"

Comparison with the Method equal() [duplicate]

When i compare two instances in java of the same type class, with the same values of their Attributes, why i get false? I'm new with OOP and d

Sending post request to S3 with RestAssured

I want to reproduce a postman call with RestAssured. The call send some text parameters and a file parameter to upload file to S3 It look like this : In rest a

Java.lang.NoClassDefFoundError: junit/framework/TestCase

After upgrading from JUnit 4 to JUnit 5 getting this error when i am trying to run test as JUnit in eclipse. Getting warning: failed to load class 'org.eclipse.

Creating a configurable JUnit library to test same features across several microservices

A set of tests should be run on every microservice. Current solution is to have an abstract class and extend in every service, providing the necessary propertie

openjdk@8 java is loading libcrypto in an unsafe way in macOS Monterey

I'm getting this error when running some mvn test on my Java application in macOS Monterey WARNING: /usr/local/Cellar/openjdk@8/1.8.0+322/libexec/openjdk.jdk/Co

Custom message for Type Mismatch validation error while using Spring Boot and Hibernate Validator

Controller public String dummyAction(@Valid @ModelAttribute DummyInputData inputData) { return "success"; } Entity public class DummyInputData {

I am getting problem while installing sts in eclipse

No repository found at https://download.springsource.com/release/TOOLS/update/3.9.22.RELEASE/e4.23. I am getting this when try to download it.

Add the edit data function in recycler view using interfaces

My code is working fine, it adds the data when refresh the page and it deletes the data on long press, but when I refresh the page duplicates the same data that

Can we implement a Java library by using Java Frameworks like Guice or Spring?

I am creating a new java library and will make the package as a jar file and have another JAVA application that can use it in terms of a JAVA library. So, is it

SpannableStringBuilder only keeping formatting for the first for loop

I am trying to use a for loop to add formatting using SpannableStringBuild from strings in a list, however in the TextView, despite all the strings having been

Profiles property is deprecated is properties.yml for Spring-Kafka

I'm configuring the application.yml file in my Spring Kafka MS and I'm getting a notification that the profiles property is deprecated. This 'profiles' property

How to mix endpoints from an application with external plugins using spring boot and pf4j?

I have created a spring-boot application (2.6.4) and I want to integrate some plugins using p4fj. I have used p4fj before in non spring boot applications, but I

Cannot invoke "org.springframework.web.servlet.mvc.condition.PatternsRequestCondition.getPatterns()" because "this.condition" is null

I'm trying to run Springdoc with Spring Boot 2.6.7. Configuration: @Configuration public class SwaggerConfiguration { @Bean public GroupedOpenApi publicA

Best way to Create a custom Transformer In Java spark ml

I am learning Big data using Apache spark and I want to create a custom transformer for Spark ml so that I can execute some aggregate functions or can perform o

Android: Automatically modify metadata of any new file(s) saved or downloaded

Is there a way to attach a piece of custom code to the Android OS which automatically deletes all the metadata of any new file(s) saved or downloaded (e.x. owne

Read the next column as translate after I find rhe word which I type

Hello everyone in this program I can find any word in a text file I want using Socket , but I need to write also the next column as translate and I don't know h

JFlex complaining about caret character

I'm trying to produce a simple standalone scanner with the use of JFlex. What I want to do now is to simply recognize the beginning of a line with the use of th

Cannot create queue from Websphere JMS API

I wanted to create IBM queues from REST endpoint as described in documentation https://www.ibm.com/docs/en/ibm-mq/9.1?topic=applications-creating-destinations-i

How to access incoming HTTP requests in X-Ray SegmentListener?

Issue I use AWS X-Ray SDK for Java to enable X-Ray tracing for my Spring Boot micro services. With following snippet I am able to attach a custom SegmentListene

Optional fields in Java DTO with validation constraint

I've created a DTO with some properties with validation constraint (like all the properties must be present in JSON Object). Now, I want to make that DTO in a w