Skip to content

Wrong values from string empty test (java x kotlin)

I’m having a super weird behavior from a code that I was testing. The test I wrote was to see the behavior of the class if the Android returned an empty package name. After some debugging, I found this (consider that packageName is empty): Is this expected? Can someone tell what the deal with this? ps1.…

QuickSort descending order

I am trying to implement QuickSort in a descending order. I have tried to trace through my code to see why it is only partially-sorted. My input was an int array of: {3,4,6,1,9,7}. After sorting, I got {9,4,7,6,3,1}, where 4 is not in the correct place. Answer Your code should look something like this:

Spring boot CLIENT_PLUGIN_AUTH is required

I have my app working fine on local, but when I tried to connect to remote server I get this error: CLIENT_PLUGIN_AUTH is required. Answer I got it. Step 1. Create an user on remote mysql server and grant all privileges. Step 2. Change datasource url Step 3. Change pom.xml mysql Check that version is changed …

@Generated annotation using gradlew + dagger

I’m confronting a weird issue using gradlew(4.10.2) + dagger(2.18). The problem is when I call: The build fails with: Task :Common:compileDebugJavaWithJavac FAILED /CommonModule_ProvidesGsonFactory.java:6: error: package javax.annotation.processing does not exist import javax.annotation.processing.Gener…

Visual Studio Code: Formatting Java method chaining

I’m trying to change the VSCode settings which will allow me to do something like this with method chaining : The problem is whenever the formatter is applied, it changes it back to just one line: I have the Java Extensions Pack installed, which includes the ‘Language Support for Java by Red Hat&#…

Is there a maven repository to quickstart Java 11 app

There is a quickstart maven archetype for Java 7, as I can see here: https://maven.apache.org/archetypes/maven-archetype-quickstart/ The problem with this is when I fire this command: Enter project directory and fire this command: I get this error: Please note that there is some problem with my JDK install, a…