For a project we use some SunRay 3 Plus terminal with the Sun Oracle VDI server. After all I only can say this thin client solution rock!!! But in the project time we hade to debug a problem. The problem was some Sun Ray Clients did unexpected reboots every 2 till 5 minutes. And it comes even stranger, next day the Terminal works without any problem and another terminal reboots. After some vi action we found the following error in the Log of the vdi server.
If you are familiar with hamcrest and JUnit the time will come when you have the need to create your own matchers. Creating your own matcher can be as simple as useful. One reason for creating your own matcher could be that your object is not a default object like a String or a Collection. And if you would like to get a more readable version of the assert for the next developer who has to read your test. Let’s make an example. If you have an object with two methods; “getName”...
Have you ever thought that JUnit assertions are not really readable and do not correspond to natural language? It is a mess that the expected value is the first argument on an assert? This would not be like the spoken language where you would say “assert that this value is equal to this expected one” ? Or have you had tests where the expected value and the value to test were inverted? In this case you have not found an old friend of JUnit called hamcrest.
Do you program or do you already TDD? 🙂
If you prefer to do TDD you will love the eclipse plug-in called MoreUnit. It is as simple as powerful. All it does is executing tests from corresponding productive class and makes it very simple to change between them.
Just press Ctrl-J (like Jump) to jump from test to implementing class and the other way. Or press Ctrl-R (like Run) to run the test regardless if you are in the test or the implementation class.
Here I will show how to get bytes from a ByteBuffer. This isn’t as simple as it sounds.
Since a few weeks the new mockito release candidate is available. So I think it is the right time to place a new post. Here I will show the differences between ArgumentMatcher and ArgumentCaptor. Most developer will first see the ArgumentMatcher and use it. What can be done with ArgumentCaptor is often not seen. With the sample I will show that an ArgumentMatcher should not be used to fetch arguments. For this work there is the ArgumentCaptor. The Matcher should really be used to check if an...
Have you seen. Java 7 is now available on oracles web site.
Wouldn’t it be nice if you were able to write
@Getter @Setter private int age = 10;
which would generate those boilerplate setters and getters into the compiled code without messing up your source code?
With Lombok you get this and some other cool features most Java developers have on their wish list – and without setup hassle!
Did you ever consider learning OOP (Object-oriented programming)? Or maybe you want just write a little code in Java? But you don’t want build an Enterprise level Project or study 1 Day, how to start with a “hello world” project? If you can answer one or more of these questions with yes, BlueJ might be the solution for you.
Why should we leave apache common collection? There are several reasons to change the collections framework. Since the apache collections should be backward compatible it would not be possible to change to a actual Java version. It would be necessary to change to another collection framework (or write all the stuff by yourself). There are several projects which created a collections framework by themselves or took the apache collection library and upgraded it with generics. Guava is a project...