Category "java"

Apache Ignite No data inserted while using cache.put method with BinaryObjects

After going through several posts on getting and putting data into a SQL table in appche ignite with the help of BinaryObjects I wrote below code for a test. Th

Updating notifications after being added

I want to update the content for a reminder after it has been added before being received by the user. After setting a reminder through AlarmManager using the d

After upgrade android version getting "Duplicate class android.support.v4.app.INotificationSideChannel"

before android update 3.4 my application run perfectly but after upgrade android my application getting merging error: "Duplicate class android.support.v4.app

How to find the selected id in my List<String> ids arraylist?

Here is my code. I am trying to use JUnit to test the deleteUsers() method, but everytime I write my test, it deletes all the users that I have in the database.

How to resolve class file for com.google.cloud.Service not found

I am Trying to upload JSON data to gcs. As I did not use google cloud previously I started with uploading random String to gcs but I got stuck at the beginning

Is there an equivalent of verifyZeroInteractions() for verifying an exact number of interaction with a mock object?

I would like to verify there were exactly x interactions with might db mock object. Is there something similar to the 'verifyZeroInteractions()' method for doin

spring-boot-starter-data-cassandra-reactive depends on CVE-2020-13946 native-protocol-1.5.0.jar

Small question regarding a SpringBoot project please. Currently with version 2.6.x, I am developing a very small web application storing data inside Cassandra.

Bouncycastle how to envelop the signed digest it in the original document with java?

In connection with this issue: https://github.com/bcgit/bc-java/issues/1021 I am looking for the best method to envelope the signed hash of a document inside th

Why are none of the titles showing in JTable?

I added some rows to a DefaultTableModel, but none of them was shown. My question is - what is the problem? It seems to me like Intellij idea just playing a jo

Achieve "all-or-nothing" transaction between Oracle and MongoDB

I have an usecase(migrate data from Oracle to MongoDB via Java app) where I required to implement transaction management to ensure "all-or-nothing" in the datas

How to create Bitmap from Android MediaImage in OUTPUT_IMAGE_FORMAT_RGBA_8888 format?

I am trying to use this new feature of CameraX Image Analysis (version 1.1.0-alpha08): using setOutputImageFormat(ImageAnalysis.OUTPUT_IMAGE_FORMAT_RGBA_8888),

Mock call to static method of a utility class

I need to write a unit test for the method processNotification. But this method internally calls JsonUtility.getNotificationDTOFromMessage. I need the return

Kafka producer config: Why request.timeout.ms should be larger than replica.lag.time.max.ms

From Kafka doc https://kafka.apache.org/11/documentation.html#producerconfigs , it says that: The configuration controls the maximum amount of time the client

How to return an array that contains values, which appear in two arrays? And no duplicates

I want to pass two arrays of names so that it will return an array containing the names that appear in either or both arrays. The returned array should have no

Intellij Run/Debug Configuration change ../bin/java

Our java sdk include custom bash script for run a java application. Intellij default configuration for java application call this command: JDK_PATH/bin/java -AL

Can a static method access and modify a non-static field in java? [duplicate]

Here is the code, I'm trying to use a non-static field in a static-method, but I don't know how to do it. package hombre.numbro; public class

MockMvc Error: java.lang.NoSuchFieldError: defaultInstance

I am trying to write some integration tests in my spring application. POM: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.

Excluding “ when using StringEscapeUtils.escapeHtml4

I am trying to Sanitize the requestBody. For this purpose I am converting Object to Json and then passing the Json to requestBody { "data": { "id": "

Accessing keycloak roles / users attributes from Java API

I've created a role and and a user in Keycloak and added one attribute in both of them; for example: my_role_attr = 'x' my_user_attr = 'y' Then I'm trying to

AWS Java SDK not finding profile when using AWS SSO

I can't reach aws when my login is made using AWS SSO. I login from my computer using: aws sso login --profile staging The profile is configured like this: [pr