Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 259434 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java (-1 / +35 lines)
Lines 37-43 Link Here
37
37
38
	private static final String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
38
	private static final String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
39
39
40
	private static final String COMMENT_ATTACHMENT_STRING = Messages.SaxMultiBugReportContentHandler_CREATED_AN_ATTACHEMENT_ID;
40
	private static final String COMMENT_ATTACHMENT_STRING = /*Messages.SaxMultiBugReportContentHandler_CREATED_AN_ATTACHEMENT_ID*/"Created an attachment (id="; //$NON-NLS-1$
41
42
	private static final String ID_STRING_BEGIN = " (id="; //$NON-NLS-1$
43
44
	private static final String ID_STRING_END = ")"; //$NON-NLS-1$
41
45
42
	private StringBuffer characters;
46
	private StringBuffer characters;
43
47
Lines 586-591 Link Here
586
				}
590
				}
587
			}
591
			}
588
		}
592
		}
593
		//{{ Fixed by Hiroyuki
594
		else {
595
			int firstDelimiter = commentText.indexOf("\n"); //$NON-NLS-1$
596
			if (firstDelimiter < 0) {
597
				firstDelimiter = commentText.length();
598
			}
599
			int startIndex = commentText.indexOf(ID_STRING_BEGIN);
600
			if (startIndex > 0 && startIndex < firstDelimiter) {
601
				int endIndex = commentText.indexOf(ID_STRING_END, startIndex);
602
				if (endIndex > 0 && endIndex < firstDelimiter) {
603
					startIndex += ID_STRING_BEGIN.length();
604
					int p = startIndex;
605
					while (p < endIndex) {
606
						char c = commentText.charAt(p);
607
						if (c < '0' || c > '9') {
608
							break;
609
						}
610
						p++;
611
					}
612
					if (p == endIndex) {
613
						attachmentID = commentText.substring(startIndex, endIndex);
614
						if (!attachmentID.equals("")) { //$NON-NLS-1$
615
							attachIdToComment.put(attachmentID, comment);
616
						}
617
					}
618
				}
619
			}
620
621
		}
622
		//}} Fixed by Hiroyuki
589
	}
623
	}
590
624
591
	private static class TaskComment {
625
	private static class TaskComment {

Return to bug 259434