Serializer/Deserializer for Vavr objects

Hello Im trying to add vavr to my projet, right now Im struggling with proper serializaition of Vavr.List objects. Below is my controller: import io.vavr.collection.List; @GetMapping(value = "/xxx") public List<EntityDeleted> getFile() {...
more »

2017-09-18 20:09 (2) Answers

Jackson and generic types inside a subclass

I am rewriting the question since I figured out the actual error in the code. This is a fully functional example of my issue (I am using Jackson 2.9.0): import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.Objec...
more »

2017-09-18 19:09 (1) Answers

Combine Java with Kotlin in Android

I am slightly moving from Java to Kotlin in android app development, but there are some cases where I don't want to code in Kotlin and want those particular cases be written in Java: It is effort-saving that Kotlin removes extra usage of f...
more »

2017-09-18 18:09 (4) Answers

JUnit 4.12: testing util classes

I have a maven project in Eclipse called TdkUtils, with this pom.xml: This is a utils project. So I want to create a jar, put it in the repository and use it in another projects. In this project I have this class: @Service("smsService") public clas...
more »

2017-09-18 13:09 (1) Answers

ViewPager for images on SD card not working

I am a newbie in android app development and I am following this tutorial to create an image gallery. https://deepshikhapuri.wordpress.com/2017/03/20/get-all-images-from-gallery-in-android-programmatically/. It's working perfectly but now I want to d...
more »

2017-09-18 08:09 (3) Answers

Gradle - Including other project causes error

I have cloned this github repo, created a new branch and wanted to include that local project in another gradle project. So, my folder structure is +- socketcluster-client-java (github project) +---- build.gradle +---- settings.gradle +- Project...
more »

2017-09-17 22:09 (1) Answers

How to get module name by class in Java 9?

How to get module name by class in Java 9? For example, let's consider the following situation. There are two named modules - ModuleA and ModuleB. ModuleA knows nothing about ModuleB. ModuleB requires ModuleA. ModuleA contains class: public class C...
more »

2017-09-17 19:09 (1) Answers

FrameLayout not appearing under text view

I'm trying to create a RelativeLayout dynamically but for some reason, the custom view is being drawn on top of the text view. Does anyone know what is going wrong and how to place the text view above the drawing? public class MyRLayout extends andr...
more »

2017-09-17 19:09 (1) Answers

Codility: longest set within array

I took a test for a company recently in Codility which really puzzeled me, I would like to hear your ideas about it, the statement is the following: A zero- indexed array A consisting of N different integers is given. The array contains all integers...
more »

2017-09-17 19:09 (1) Answers

Eclipse RCP application - plug-ins organization

I'm reading the book Eclipse Rich Client Platform by Lars Vogel and in the meantime I'm building an application (not the example on the book). I must state I'm still half way through the book. In the example application Lars built, which is a To-do ...
more »

2017-09-17 19:09 (0) Answers

Java: Style-Correcting Code: finding comment

I'm writing these algorithms for a style-correcting program which makes adjustments to a java source file, that can compile without error. It is currently set to read the file line-by-line. Right now, I'm having trouble writing 2 methods/algorithms ...
more »

2017-09-17 19:09 (1) Answers

javafx fxml LoadException

I am quite new at JavaFx. I am trying to build a simple calculator by following a tutorial . I followed the tutorial step by step . When I run the project , it shows javafx fxml LoadException. I watched some solution relating to this but still I can ...
more »

2017-09-17 17:09 (1) Answers

How does OSGi application work on Java 9?

I am trying to understand how OSGi application works in Java 9 assuming that OSGi bundle is not JPMS module (as far as I know there is still no solution that OSGi bundle could be at the same time JPMS module for production). And I have several questi...
more »

2017-09-17 13:09 (2) Answers

Maven can't find tools.jar

I am working on a Spring STS project using Eclipse and when I try to run my unit tests using Run as > Maven test I have the following error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile...
more »

2017-09-17 13:09 (2) Answers

Jackson: parse custom offset date time

I have a model which has a timestamp property: class Model { @JsonProperty("timestamp") private OffsetDateTime timestamp; } The format of the timestamp is as following: 2017-09-17 13:45:42.710576+02 OffsetDateTime is unable to parse thi...
more »

2017-09-17 13:09 (1) Answers

How many unnamed modules are created in Java 9?

I am trying to understand how JPMS works. From here The classpath is not completely gone yet. All JARs (modular or not) and classes on the classpath will be contained in the Unnamed Module. Similar to automatic modules, it exports all packa...
more »

2017-09-17 12:09 (2) Answers

Parsing EventElement for XMPP using Smack Library

Can anyone please help to show me on how to parse this Event pub element and get the Message object for the following Packet. Maybe my keyword/search term googling is not correct but I'm not able to find anything helpful while looking for the documen...
more »

2017-09-17 10:09 (0) Answers