Accessing fields is generally frowned upon in idiomatic Java.  I know it's an annoying extra couple of keystrokes, but it appears like the Task object is not actually encapsulating any state.