Posted by Stanislav Miklik | 15 04 2015| java
Java generics and class literals

Recently I stumble upon more problem with generics and class literals. I wanted to use Mockito ArgumentCaptor to capture List<Long> argument. As we know there is nothing like List<Long>.class so how to create properly parametrized type? Simple attempt does not work ArgumentCaptor<List<Long>> captor = (ArgumentCaptor<List<Long>>) ArgumentCaptor.forClass(List.class); and ends with compiler error "Cannot cast from ArgumentCaptor<List> to...

Continue reading
Posted by Stanislav Miklik | 26 09 2014| spring
Exception handling in Spring MVC

I have came across an interesting blog about exception handling in Spring MVC. It nicely describe different options how to handle exceptions in MVC controllers. As usual Spring gives you variety of options, so it is up to you to decide which works better for you. However with power comes the responsibility and you can't...

Continue reading
Posted by Stanislav Miklik | 07 09 2014| linux
Making panorama

I came from vacation and I wanted to make panorama photo. Google came as my friend and I found Hugin - Panorama photo stitcher. Everything worked smoothly and I had my first panorama photo. I can only recommend it. Pls, take a look: Chania port

Continue reading