Java

Maven Development

Using SSL or HTTPS servers with self-signed certificates in IntelliJ IDEA

HTTPS connections need to make sure the server 'at the other end' is actually the server it claims to be. This is done using public key certificates. For testing purposes or to save the costs of a commercially issued certificate, it is possible to use a self-issued certificate. This blog post shows how to connect to this kind of servers in IntelliJ IDEA or other Java programs.

New mailing lists for JODReports project

I'm pleased to announce that the JODReports project has received two brand new mailing lists, one for user and one for developer discussion each. They are hosted by Google Groups and can be posted to by anyone with a valid Google account.

Maven Drools Support

Maven Drools Support

Ordering of sub-elements of a TestNG <suite>

To help in a discussion on the TestNG mailing list, I created a quick sketch of what I'd like to do regarding the ordering of subelements of a TestNG <suite> XML element.

Emulating "self types" using Java Generics to simplify fluent API implementation

The Java programming language does not support the notion of "self types", that is "type of this". When implementing fluent APIs, this lack of support can lead to significant duplication of boilerplate code. Taking FEST Assertions as an example, this article shows how "self types" can be emulated in Java using Generics.

Beware: now().equals(now()) might yield false

Using time-dependent data

I stumbled across a piece of code the other day, allowing some versioned entity from our domain model to find out whether it's valid from a certain point in time. The corresponding test failed sporadically, so I went and looked into it.

What's inside a violation?

What's Inside A Violation?

If the validator found a number of violations, what can we do with it? Let's have a look at the simple usages of violation objects.

Validate single, primitive attribute

Learning Test One: Validate a single, primitive attribute

Time to write our first (domain) object and validate something. We'll do this using the TestNG framework to create a tiny test driver showcasing how the most basic validation API calls interact.

Basic Project Setup

Basic Project Setup

I'll use Apache Maven 2.x and IntelliJ IDEA as my primary development tools, so you might want to learn how to use these first if you plan to work through the examples for yourself. All source code and project files for this walkthrough is available from github using

git://github.com/ansgarkonermann/bean-validation-with-jsr303.git

as clone URL.

Syndicate content