Android.graphics.rect - always null

33
June 13, 2019, at 3:30 PM

I want to write some tests for my Android project - and I‘m trying to instantiate a Rect()-Object in a JUnit test - but I’m always getting a null instead of the object. Here some examples:

 Rect r = new Rect(1,3,4,5);
  System.out.println(r); // -> null
  System.out.println(r.right); // -> 0
READ ALSO
Issue with parsing LocalDate to Date in Java [duplicate]

Issue with parsing LocalDate to Date in Java [duplicate]

This question already has an answer here:

44
Nonblocking Java Async Processing - how to constrain memory usage?

Nonblocking Java Async Processing - how to constrain memory usage?

I'm coming back to Java after a few years away, and have been excited to see the introduction of non-blocking async support in the new javanet

25
Filter log by conversion pattern [%t]

Filter log by conversion pattern [%t]

I am using the log4j2 version 211

43
Different deserialization behavior between Java 8 and Java 11

Different deserialization behavior between Java 8 and Java 11

I have a problem with deserialization in Java 11 that results in a HashMap with a key that can't be foundI would appreciate if anyone with more knowledge about the issue could say if my proposed solution looks ok, or if there is something better I could do

19