Apr 20th, 2015

How to finally delete documents in CouchDB

Documents in Apache CouchDB are usually not really deleted but rather marked as such. In use cases with many document insertions and deletions, this considerably affects disc space consumption and performance. This post shows a practical way how to get rid of deleted documents and make your data base fast and efficient again. Deletion is [...]

4 Comments
Jun 12th, 2014

Parsing JSON responses with JMeter

JSON is becoming more and more important as a data exchange format, especially in Ajax web frameworks and RESTful web services. Apache JMeter, which is a very popular tool to perform load tests for web applications, does not come with native support to handle HTTP responses with JSON bodies. This post shows different possibilities how [...]

Leave a Comment
Nov 28th, 2013

Get rid of your StringUtils!

Probably every Java developer has developed at least one String utility class in his life. Need a proof? Feed "java StringUtil" to your favorite search engine – I found 20 different implementations among the first 30 search hits only! There is a simple reason for that – Strings are used quite frequently in common Java [...]

9 Comments
Nov 28th, 2013

Mutable variable capture in anonymous Java classes

The Java compiler requires local variables of enclosing contexts referenced in anonymous classes (so-called captured variables) to be final. What if the anonymous class wants to alter the value of the variable, i.e. requires the variable to be mutable? This post shows different ways how to achieve that. The problem Let’s assume we have a [...]

2 Comments
Jul 18th, 2013

Invisible chaos – mastering white spaces in Eclipse

Did you ever look at a colleague’s Java source code file which contained mixed spaces and tabs for indentation, making the code completely unreadable? Or did you ever try to compare two versions of a Java file where the line endings changed, obfuscating the one line of code that really changed? This post shows a [...]

Leave a Comment
Jul 18th, 2013

UTF-8 RAP I18N

I always wanted to write a blog post with a title consisting of just acronyms and numeronyms – here it is! Obviously, this post is about internationalizing web applications based on the Eclipse Remote Application Platform (RAP), using property files encoded with UTF-8 character encoding. Usually, Eclipse developers use resource bundles (pure Java) or message bundles (when [...]

1 Comment
Jun 19th, 2013

Using EasyMock class extensions in Eclipse PDE tests

EasyMock is a powerful framework to create mock objects to use in Java JUnit tests. When used in an OSGi environment (e.g. to write Eclipse PDE tests), the creation of class extensions can cause trouble. This post describes a problematic use case and possible solutions. The use case Imagine the following situation: an Eclipse RCP [...]

Leave a Comment
Apr 25th, 2013

When an exception gets lost

Recently I fell into the lost exception pitfall – when an exception thrown in a try block gets lost because another exception is thrown in the finally block. It wasn’t that I was not aware of the problem, but rather that I underestimated and therefore ignored it. This post describes an example where suppressed exceptions [...]

1 Comment
Apr 17th, 2013

Running Eclipse applications on Windows 8

Reading the title, you might ask why this could be a problem. Good news: in most cases it isn’t. However it can be problem if you use native code in your Eclipse plug-in and run on an older version of Equinox (3.7.2 and earlier). This post describes the problem and possible solutions. The problem On [...]

3 Comments