[391852] [validation]taglibs are not seen if included indirectly - Fix-up TLDCMDocumentReference#equals()
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDCMDocumentManager.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDCMDocumentManager.java
index 1c42124..d234962 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDCMDocumentManager.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDCMDocumentManager.java
@@ -563,7 +563,18 @@
 		String uri;
 
 		public boolean equals(Object obj) {
-			return ((obj instanceof TLDCMDocumentReference) && ((TLDCMDocumentReference)obj).prefix == this.prefix && ((TLDCMDocumentReference)obj).uri == this.uri);
+			if (obj == this) {
+				return true;
+			}
+			if (!(obj instanceof TLDCMDocumentReference)) {
+				return false;
+			}
+			TLDCMDocumentReference other = (TLDCMDocumentReference) obj;
+			return equalsString(prefix, other.prefix) && equalsString(uri, other.uri);
+		}
+
+		private boolean equalsString(String s1, String s2) {
+			return (s1 == null && s2 == null) || s1 != null && s1.equals(s2);
 		}
 	}