package com.mydomain.model;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;

@JsonIgnoreProperties(ignoreUnknown=true)
public class Person {
	int age;
	String name;

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof Person == false)
			return false;

		Person p = (Person) obj;
		boolean isAgeSame = age == p.getAge();
		boolean isNameSame = false;
		if (name != null)
			isNameSame = name.equals(p.getName());
		else
			isNameSame = p.getName() == null;
		return isAgeSame && isNameSame;
	}
}

@@ -117,17 +117,19 @@
 eUnknown
-=
+ = 
 true)%0Apu
@@ -572,100 +572,64 @@
 e = 
-false;%0A%09%09if (
 name 
-!
+=
 = null
-)%0A%09%09%09isNameSame = name.equals(p.getName());%0A%09%09else%0A%09%09%09isNameSame = 
+ ? p.getName() == null : //%0A%09%09%09%09name.equals(
 p.ge
@@ -635,24 +635,17 @@
 etName()
- == null
+)
 ;%0A%09%09retu

modify equals method