package com.darwinsys.todo.model;

import javax.persistence.*;

/**
 * A Hint is one little note to help people improve their use of
 * ToDo list management.
 */

@Entity
public class Hint {
	long id;
	String hint;
	String author;

	@Id @GeneratedValue(strategy=GenerationType.AUTO)
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getHint() {
		return hint;
	}

	public void setHint(String hint) {
		this.hint = hint;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	@Override
	public String toString() {
		if (author == null)
			return getHint();
		else
			return getHint() + " -- " + getAuthor();
	}
}

@@ -155,17 +155,16 @@
 nt.%0A */%0A
-%0A
 @Entity%0A
@@ -648,16 +648,40 @@
  == null
+ %7C%7C author.length() == 0
 )%0A%09%09%09ret

Improve Hint.toString() formatting