{"thread":{"id":"19131","subject":"[PATCH JGIT] Equals method should not assume anything about the type of its argument","startedAt":"2009-04-29T21:47:29Z","lastAt":"2009-04-29T21:51:49Z","messageCount":2,"participants":["Sohn, Matthias","Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"112700","messageId":"366BBB1215D0AB4B8A153AF047A287800302A82C@dewdfe18.wdf.sap.corp","threadId":"19131","inReplyTo":null,"subject":"[PATCH JGIT] Equals method should not assume anything about the type of its argument","fromName":"Sohn, Matthias","fromEmail":"matthias.sohn@sap.com","sentAt":"2009-04-29T21:47:29Z","receivedAt":"2009-04-29T21:47:29Z","isPatch":true,"sender":{"key":"matthias.sohn@sap.com","avatar":"https://gravatar.com/avatar/88bbb2733bcb977ec2d2cc1916ba8a70d6d41432c146bb8dab4f7f802261194e?d=mp&s=160"},"body":"From: Matthias Sohn <matthias.sohn@sap.com>\nThe equals(Object o) method shouldn't make any assumptions about the\ntype of o. It should simply return false if o is not the same type as\nthis.\n\nSigned-off-by: Matthias Sohn <matthias.sohn@sap.com>\n---\nShawn Pearce <spearce@spearce.org> wrote:\n> FWIW, your From header in the emails comes out \"Sohn, Matthias\"\n> while your Signed-off-By is as above.  This means that when I slam\n> your patch through git-am I get an author name of \"Sohn, Matthias\",\n> which looks damn funny.  I have to remember to edit the patch after\n> the fact to make it come out correct.\n>\n> Any change you can get your MUA to behave better?  Or is this\n> Exchange enforcing a nice uniform standard... *sigh*\n\nDidn't find a way to get around our Exchange server mangling the from header, \nhence trying to give From: in mail body. If this doesn't help I will issue a \nticket for our Exchange administration to get this solved.\n\n.../src/org/spearce/jgit/lib/AnyObjectId.java      |    5 ++++-\n 1 files changed, 4 insertions(+), 1 deletions(-)\n\ndiff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/AnyObjectId.java b/org.spearce.jgit/src/org/spearce/jgit/lib/AnyObjectId.java\nindex 2e3a43e..acb3cb5 100644\n--- a/org.spearce.jgit/src/org/spearce/jgit/lib/AnyObjectId.java\n+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/AnyObjectId.java\n@@ -253,7 +253,10 @@ public boolean equals(final AnyObjectId other) {\n \t}\n \n \tpublic boolean equals(final Object o) {\n-\t\treturn equals((AnyObjectId) o);\n+\t\tif (o instanceof AnyObjectId)\n+\t\t\treturn equals((AnyObjectId) o);\n+\t\telse\n+\t\t\treturn false;\n \t}\n \n \t/**\n-- \n1.6.2.2.1669.g7eaf8\n"},{"id":"112703","messageId":"20090429215149.GK23604@spearce.org","threadId":"19131","inReplyTo":"366BBB1215D0AB4B8A153AF047A287800302A82C@dewdfe18.wdf.sap.corp","subject":"Re: [PATCH JGIT] Equals method should not assume anything about the type of its argument","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-04-29T21:51:49Z","receivedAt":"2009-04-29T21:51:49Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"\"Sohn, Matthias\" <matthias.sohn@sap.com> wrote:\n> From: Matthias Sohn <matthias.sohn@sap.com>\n...\n> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>\n> Shawn Pearce <spearce@spearce.org> wrote:\n> > FWIW, your From header in the emails comes out \"Sohn, Matthias\"\n...\n> Didn't find a way to get around our Exchange server mangling the from header, \n> hence trying to give From: in mail body. If this doesn't help I will issue a \n> ticket for our Exchange administration to get this solved.\n\nOh, yea, doing that works.  :-)\n\nThanks.\n\n-- \nShawn.\n"}]}