View | Details | Raw Unified | Return to bug 267833 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java (-35 / +21 lines)
Lines 3319-3325 Link Here
3319
 * @see <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=73995">73995</a>
3319
 * @see <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=73995">73995</a>
3320
 */
3320
 */
3321
public void testBug73995() {
3321
public void testBug73995() {
3322
	runNegativeTest(
3322
	runConformTest(
3323
		new String[] {
3323
		new String[] {
3324
			"X.java",
3324
			"X.java",
3325
			"public class X extends Base {\n" +
3325
			"public class X extends Base {\n" +
Lines 3339-3352 Link Here
3339
				"/** return \"The foo2 value\" */" +
3339
				"/** return \"The foo2 value\" */" +
3340
				"public int foo2(){return 0;}\n" +
3340
				"public int foo2(){return 0;}\n" +
3341
				"}"
3341
				"}"
3342
		},
3342
		});
3343
		"----------\n" + 
3344
		"1. ERROR in X.java (at line 10)\n" + 
3345
		"	*		{@unknown_tag}\n" + 
3346
		"	 		  ^^^^^^^^^^^\n" + 
3347
		"Javadoc: Unexpected tag\n" + 
3348
		"----------\n"
3349
	);
3350
}
3343
}
3351
3344
3352
/**
3345
/**
Lines 8504-8510 Link Here
8504
 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=267833"
8497
 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=267833"
8505
 */
8498
 */
8506
public void testBug267833() {
8499
public void testBug267833() {
8507
	runNegativeTest(
8500
	runConformTest(
8508
		new String[] {
8501
		new String[] {
8509
			"X.java",
8502
			"X.java",
8510
			"/**\n" +
8503
			"/**\n" +
Lines 8513-8526 Link Here
8513
			"*/\n" +
8506
			"*/\n" +
8514
			"public class X {\n" +
8507
			"public class X {\n" +
8515
			"}"
8508
			"}"
8516
		},
8509
		});
8517
		"----------\n" + 
8518
		"1. ERROR in X.java (at line 2)\n" + 
8519
		"	* Invalid custom tag {@custom \"Invalid\"}   \n" + 
8520
		"	                       ^^^^^^\n" + 
8521
		"Javadoc: Unexpected tag\n" + 
8522
		"----------\n"
8523
	);
8524
}
8510
}
8525
/**
8511
/**
8526
 * Additional test for bug 267833
8512
 * Additional test for bug 267833
Lines 8567-8574 Link Here
8567
			"X.java",
8553
			"X.java",
8568
			"public class X {\n" +
8554
			"public class X {\n" +
8569
			"/** \n" +
8555
			"/** \n" +
8570
			"* Description {@see value} , {@return value}, {@since value}, {@param i}, {@throws NullPointerException}\n" +
8556
			"* Description {@see String} , {@return int}, {@since 1.0}, {@param i}, {@throws NullPointerException}\n" +
8571
			"* and more {@author jay}, {@category cat}, {@deprecated}, {@exception Exception}, {@version 1.1}\n" +
8557
			"* and more {@author jay}, {@category cat}, {@deprecated}, {@exception NullPointerException}, {@version 1.1}\n" +
8572
			"* and more {@since 1.0}, {@serial 0L}, {@serialData data}, {@serialField field}\n" +
8558
			"* and more {@since 1.0}, {@serial 0L}, {@serialData data}, {@serialField field}\n" +
8573
			"* @param i\n" + 
8559
			"* @param i\n" + 
8574
			"* @return value\n" +
8560
			"* @return value\n" +
Lines 8580-8632 Link Here
8580
			"}\n" },
8566
			"}\n" },
8581
			"----------\n" + 
8567
			"----------\n" + 
8582
			"1. ERROR in X.java (at line 3)\n" + 
8568
			"1. ERROR in X.java (at line 3)\n" + 
8583
			"	* Description {@see value} , {@return value}, {@since value}, {@param i}, {@throws NullPointerException}\n" + 
8569
			"	* Description {@see String} , {@return int}, {@since 1.0}, {@param i}, {@throws NullPointerException}\n" + 
8584
			"	                ^^^\n" + 
8570
			"	                ^^^\n" + 
8585
			"Javadoc: Unexpected tag\n" + 
8571
			"Javadoc: Unexpected tag\n" + 
8586
			"----------\n" + 
8572
			"----------\n" + 
8587
			"2. ERROR in X.java (at line 3)\n" + 
8573
			"2. ERROR in X.java (at line 3)\n" + 
8588
			"	* Description {@see value} , {@return value}, {@since value}, {@param i}, {@throws NullPointerException}\n" + 
8574
			"	* Description {@see String} , {@return int}, {@since 1.0}, {@param i}, {@throws NullPointerException}\n" + 
8589
			"	                               ^^^^^^\n" + 
8575
			"	                                ^^^^^^\n" + 
8590
			"Javadoc: Unexpected tag\n" + 
8576
			"Javadoc: Unexpected tag\n" + 
8591
			"----------\n" + 
8577
			"----------\n" + 
8592
			"3. ERROR in X.java (at line 3)\n" + 
8578
			"3. ERROR in X.java (at line 3)\n" + 
8593
			"	* Description {@see value} , {@return value}, {@since value}, {@param i}, {@throws NullPointerException}\n" + 
8579
			"	* Description {@see String} , {@return int}, {@since 1.0}, {@param i}, {@throws NullPointerException}\n" + 
8594
			"	                                                ^^^^^\n" + 
8580
			"	                                               ^^^^^\n" + 
8595
			"Javadoc: Unexpected tag\n" + 
8581
			"Javadoc: Unexpected tag\n" + 
8596
			"----------\n" + 
8582
			"----------\n" + 
8597
			"4. ERROR in X.java (at line 3)\n" + 
8583
			"4. ERROR in X.java (at line 3)\n" + 
8598
			"	* Description {@see value} , {@return value}, {@since value}, {@param i}, {@throws NullPointerException}\n" + 
8584
			"	* Description {@see String} , {@return int}, {@since 1.0}, {@param i}, {@throws NullPointerException}\n" + 
8599
			"	                                                                ^^^^^\n" + 
8585
			"	                                                             ^^^^^\n" + 
8600
			"Javadoc: Unexpected tag\n" + 
8586
			"Javadoc: Unexpected tag\n" + 
8601
			"----------\n" + 
8587
			"----------\n" + 
8602
			"5. ERROR in X.java (at line 3)\n" + 
8588
			"5. ERROR in X.java (at line 3)\n" + 
8603
			"	* Description {@see value} , {@return value}, {@since value}, {@param i}, {@throws NullPointerException}\n" + 
8589
			"	* Description {@see String} , {@return int}, {@since 1.0}, {@param i}, {@throws NullPointerException}\n" + 
8604
			"	                                                                            ^^^^^^\n" + 
8590
			"	                                                                         ^^^^^^\n" + 
8605
			"Javadoc: Unexpected tag\n" + 
8591
			"Javadoc: Unexpected tag\n" + 
8606
			"----------\n" + 
8592
			"----------\n" + 
8607
			"6. ERROR in X.java (at line 4)\n" + 
8593
			"6. ERROR in X.java (at line 4)\n" + 
8608
			"	* and more {@author jay}, {@category cat}, {@deprecated}, {@exception Exception}, {@version 1.1}\n" + 
8594
			"	* and more {@author jay}, {@category cat}, {@deprecated}, {@exception NullPointerException}, {@version 1.1}\n" + 
8609
			"	             ^^^^^^\n" + 
8595
			"	             ^^^^^^\n" + 
8610
			"Javadoc: Unexpected tag\n" + 
8596
			"Javadoc: Unexpected tag\n" + 
8611
			"----------\n" + 
8597
			"----------\n" + 
8612
			"7. ERROR in X.java (at line 4)\n" + 
8598
			"7. ERROR in X.java (at line 4)\n" + 
8613
			"	* and more {@author jay}, {@category cat}, {@deprecated}, {@exception Exception}, {@version 1.1}\n" + 
8599
			"	* and more {@author jay}, {@category cat}, {@deprecated}, {@exception NullPointerException}, {@version 1.1}\n" + 
8614
			"	                            ^^^^^^^^\n" + 
8600
			"	                            ^^^^^^^^\n" + 
8615
			"Javadoc: Unexpected tag\n" + 
8601
			"Javadoc: Unexpected tag\n" + 
8616
			"----------\n" + 
8602
			"----------\n" + 
8617
			"8. ERROR in X.java (at line 4)\n" + 
8603
			"8. ERROR in X.java (at line 4)\n" + 
8618
			"	* and more {@author jay}, {@category cat}, {@deprecated}, {@exception Exception}, {@version 1.1}\n" + 
8604
			"	* and more {@author jay}, {@category cat}, {@deprecated}, {@exception NullPointerException}, {@version 1.1}\n" + 
8619
			"	                                             ^^^^^^^^^^\n" + 
8605
			"	                                             ^^^^^^^^^^\n" + 
8620
			"Javadoc: Unexpected tag\n" + 
8606
			"Javadoc: Unexpected tag\n" + 
8621
			"----------\n" + 
8607
			"----------\n" + 
8622
			"9. ERROR in X.java (at line 4)\n" + 
8608
			"9. ERROR in X.java (at line 4)\n" + 
8623
			"	* and more {@author jay}, {@category cat}, {@deprecated}, {@exception Exception}, {@version 1.1}\n" + 
8609
			"	* and more {@author jay}, {@category cat}, {@deprecated}, {@exception NullPointerException}, {@version 1.1}\n" + 
8624
			"	                                                            ^^^^^^^^^\n" + 
8610
			"	                                                            ^^^^^^^^^\n" + 
8625
			"Javadoc: Unexpected tag\n" + 
8611
			"Javadoc: Unexpected tag\n" + 
8626
			"----------\n" + 
8612
			"----------\n" + 
8627
			"10. ERROR in X.java (at line 4)\n" + 
8613
			"10. ERROR in X.java (at line 4)\n" + 
8628
			"	* and more {@author jay}, {@category cat}, {@deprecated}, {@exception Exception}, {@version 1.1}\n" + 
8614
			"	* and more {@author jay}, {@category cat}, {@deprecated}, {@exception NullPointerException}, {@version 1.1}\n" + 
8629
			"	                                                                                    ^^^^^^^\n" + 
8615
			"	                                                                                               ^^^^^^^\n" + 
8630
			"Javadoc: Unexpected tag\n" + 
8616
			"Javadoc: Unexpected tag\n" + 
8631
			"----------\n" + 
8617
			"----------\n" + 
8632
			"11. ERROR in X.java (at line 5)\n" + 
8618
			"11. ERROR in X.java (at line 5)\n" + 
(-)compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java (-52 / +56 lines)
Lines 508-529 Link Here
508
		boolean valid = false;
508
		boolean valid = false;
509
		switch (firstChar) {
509
		switch (firstChar) {
510
			case 'a':
510
			case 'a':
511
				if (!this.inlineTagStarted && length == TAG_AUTHOR_LENGTH && CharOperation.equals(TAG_AUTHOR, tagName, 0, length)) {
511
				if (length == TAG_AUTHOR_LENGTH && CharOperation.equals(TAG_AUTHOR, tagName, 0, length)) {
512
					this.tagValue = TAG_AUTHOR_VALUE;
512
					this.tagValue = TAG_AUTHOR_VALUE;
513
					this.tagWaitingForDescription = this.tagValue;
513
					this.tagWaitingForDescription = this.tagValue;
514
				}
514
				}
515
				break;
515
				break;
516
			case 'c':
516
			case 'c':
517
				if (!this.inlineTagStarted && length == TAG_CATEGORY_LENGTH && CharOperation.equals(TAG_CATEGORY, tagName, 0, length)) {
517
				if (length == TAG_CATEGORY_LENGTH && CharOperation.equals(TAG_CATEGORY, tagName, 0, length)) {
518
					this.tagValue = TAG_CATEGORY_VALUE;
518
					this.tagValue = TAG_CATEGORY_VALUE;
519
					valid = parseIdentifierTag(false); // TODO (frederic) reconsider parameter value when @category will be significant in spec
519
					if (!this.inlineTagStarted) {
520
						valid = parseIdentifierTag(false); // TODO (frederic) reconsider parameter value when @category will be significant in spec
521
					}
520
				} else if (length == TAG_CODE_LENGTH && this.inlineTagStarted && CharOperation.equals(TAG_CODE, tagName, 0, length)) {
522
				} else if (length == TAG_CODE_LENGTH && this.inlineTagStarted && CharOperation.equals(TAG_CODE, tagName, 0, length)) {
521
					this.tagValue = TAG_CODE_VALUE;
523
					this.tagValue = TAG_CODE_VALUE;
522
					this.tagWaitingForDescription = this.tagValue;
524
					this.tagWaitingForDescription = this.tagValue;
523
				}
525
				}
524
				break;
526
				break;
525
			case 'd':
527
			case 'd':
526
				if (!this.inlineTagStarted && length == TAG_DEPRECATED_LENGTH && CharOperation.equals(TAG_DEPRECATED, tagName, 0, length)) {
528
				if (length == TAG_DEPRECATED_LENGTH && CharOperation.equals(TAG_DEPRECATED, tagName, 0, length)) {
527
					this.deprecated = true;
529
					this.deprecated = true;
528
					valid = true;
530
					valid = true;
529
					this.tagValue = TAG_DEPRECATED_VALUE;
531
					this.tagValue = TAG_DEPRECATED_VALUE;
Lines 536-544 Link Here
536
				}
538
				}
537
				break;
539
				break;
538
			case 'e':
540
			case 'e':
539
				if (!this.inlineTagStarted && length == TAG_EXCEPTION_LENGTH && CharOperation.equals(TAG_EXCEPTION, tagName, 0, length)) {
541
				if (length == TAG_EXCEPTION_LENGTH && CharOperation.equals(TAG_EXCEPTION, tagName, 0, length)) {
540
					this.tagValue = TAG_EXCEPTION_VALUE;
542
					this.tagValue = TAG_EXCEPTION_VALUE;
541
					valid = parseThrows();
543
					if (!this.inlineTagStarted) {
544
						valid = parseThrows();
545
					}
542
				}
546
				}
543
				break;
547
				break;
544
			case 'i':
548
			case 'i':
Lines 571-635 Link Here
571
					this.tagValue = TAG_LINK_VALUE;
575
					this.tagValue = TAG_LINK_VALUE;
572
					if (this.inlineTagStarted || (this.kind & COMPLETION_PARSER) != 0) {
576
					if (this.inlineTagStarted || (this.kind & COMPLETION_PARSER) != 0) {
573
						valid= parseReference();
577
						valid= parseReference();
574
					} else {
575
						// bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=53290
576
						// Cannot have @link outside inline comment
577
						valid = false;
578
						if (this.reportProblems) {
579
							this.sourceParser.problemReporter().javadocUnexpectedTag(this.tagSourceStart, this.tagSourceEnd);
580
						}
581
					}
578
					}
582
				} else if (length == TAG_LINKPLAIN_LENGTH && CharOperation.equals(TAG_LINKPLAIN, tagName, 0, length)) {
579
				} else if (length == TAG_LINKPLAIN_LENGTH && CharOperation.equals(TAG_LINKPLAIN, tagName, 0, length)) {
583
					this.tagValue = TAG_LINKPLAIN_VALUE;
580
					this.tagValue = TAG_LINKPLAIN_VALUE;
584
					if (this.inlineTagStarted) {
581
					if (this.inlineTagStarted) {
585
						valid = parseReference();
582
						valid = parseReference();
586
					} else {
583
					} 
587
						valid = false;
588
						if (this.reportProblems) {
589
							this.sourceParser.problemReporter().javadocUnexpectedTag(this.tagSourceStart, this.tagSourceEnd);
590
						}
591
					}
592
				} else if (length == TAG_LITERAL_LENGTH && this.inlineTagStarted && CharOperation.equals(TAG_LITERAL, tagName, 0, length)) {
584
				} else if (length == TAG_LITERAL_LENGTH && this.inlineTagStarted && CharOperation.equals(TAG_LITERAL, tagName, 0, length)) {
593
					this.tagValue = TAG_LITERAL_VALUE;
585
					this.tagValue = TAG_LITERAL_VALUE;
594
					this.tagWaitingForDescription = this.tagValue;
586
					this.tagWaitingForDescription = this.tagValue;
595
				}
587
				}
596
				break;
588
				break;
597
			case 'p':
589
			case 'p':
598
				if (!this.inlineTagStarted && length == TAG_PARAM_LENGTH && CharOperation.equals(TAG_PARAM, tagName, 0, length)) {
590
				if (length == TAG_PARAM_LENGTH && CharOperation.equals(TAG_PARAM, tagName, 0, length)) {
599
					this.tagValue = TAG_PARAM_VALUE;
591
					this.tagValue = TAG_PARAM_VALUE;
600
					valid = parseParam();
592
					if (!this.inlineTagStarted) {
593
						valid = parseParam();
594
					}
601
				}
595
				}
602
				break;
596
				break;
603
			case 'r':
597
			case 'r':
604
				if (!this.inlineTagStarted && length == TAG_RETURN_LENGTH && CharOperation.equals(TAG_RETURN, tagName, 0, length)) {
598
				if (length == TAG_RETURN_LENGTH && CharOperation.equals(TAG_RETURN, tagName, 0, length)) {
605
					this.tagValue = TAG_RETURN_VALUE;
599
					this.tagValue = TAG_RETURN_VALUE;
606
					valid = parseReturn();
600
					if (!this.inlineTagStarted) {
601
						valid = parseReturn();
602
					}
607
				}
603
				}
608
				break;
604
				break;
609
			case 's':
605
			case 's':
610
				if (!this.inlineTagStarted) {
606
				if (length == TAG_SEE_LENGTH && CharOperation.equals(TAG_SEE, tagName, 0, length)) {
611
					if (length == TAG_SEE_LENGTH && CharOperation.equals(TAG_SEE, tagName, 0, length)) {
607
					this.tagValue = TAG_SEE_VALUE;
612
						this.tagValue = TAG_SEE_VALUE;
608
					if (!this.inlineTagStarted) {
613
						valid = parseReference();
609
						valid = parseReference();
614
					} else if (length == TAG_SERIAL_LENGTH && CharOperation.equals(TAG_SERIAL, tagName, 0, length)) {
610
					}
615
						this.tagValue = TAG_SERIAL_VALUE;
611
				} else if (length == TAG_SERIAL_LENGTH && CharOperation.equals(TAG_SERIAL, tagName, 0, length)) {
616
						this.tagWaitingForDescription = this.tagValue;
612
					this.tagValue = TAG_SERIAL_VALUE;
617
					} else if (length == TAG_SERIAL_DATA_LENGTH && CharOperation.equals(TAG_SERIAL_DATA, tagName, 0, length)) {
613
					this.tagWaitingForDescription = this.tagValue;
618
						this.tagValue = TAG_SERIAL_DATA_VALUE;
614
				} else if (length == TAG_SERIAL_DATA_LENGTH && CharOperation.equals(TAG_SERIAL_DATA, tagName, 0, length)) {
619
						this.tagWaitingForDescription = this.tagValue;
615
					this.tagValue = TAG_SERIAL_DATA_VALUE;
620
					} else if (length == TAG_SERIAL_FIELD_LENGTH && CharOperation.equals(TAG_SERIAL_FIELD, tagName, 0, length)) {
616
					this.tagWaitingForDescription = this.tagValue;
621
						this.tagValue = TAG_SERIAL_FIELD_VALUE;
617
				} else if (length == TAG_SERIAL_FIELD_LENGTH && CharOperation.equals(TAG_SERIAL_FIELD, tagName, 0, length)) {
622
						this.tagWaitingForDescription = this.tagValue;
618
					this.tagValue = TAG_SERIAL_FIELD_VALUE;
623
					} else if (length == TAG_SINCE_LENGTH && CharOperation.equals(TAG_SINCE, tagName, 0, length)) {
619
					this.tagWaitingForDescription = this.tagValue;
624
						this.tagValue = TAG_SINCE_VALUE;
620
				} else if (length == TAG_SINCE_LENGTH && CharOperation.equals(TAG_SINCE, tagName, 0, length)) {
625
						this.tagWaitingForDescription = this.tagValue;
621
					this.tagValue = TAG_SINCE_VALUE;
626
					}					
622
					this.tagWaitingForDescription = this.tagValue;
627
				}
623
				}					
628
				break;
624
				break;
629
			case 't':
625
			case 't':
630
				if (!this.inlineTagStarted && length == TAG_THROWS_LENGTH && CharOperation.equals(TAG_THROWS, tagName, 0, length)) {
626
				if (length == TAG_THROWS_LENGTH && CharOperation.equals(TAG_THROWS, tagName, 0, length)) {
631
					this.tagValue = TAG_THROWS_VALUE;
627
					this.tagValue = TAG_THROWS_VALUE;
632
					valid = parseThrows();
628
					if (!this.inlineTagStarted) {
629
						valid = parseThrows();
630
					}
633
				}
631
				}
634
				break;
632
				break;
635
			case 'v':
633
			case 'v':
Lines 638-646 Link Here
638
					if (this.sourceLevel >= ClassFileConstants.JDK1_5) {
636
					if (this.sourceLevel >= ClassFileConstants.JDK1_5) {
639
						if (this.inlineTagStarted) {
637
						if (this.inlineTagStarted) {
640
							valid = parseReference();
638
							valid = parseReference();
641
						} else {
642
							valid = false;
643
							if (this.reportProblems) this.sourceParser.problemReporter().javadocUnexpectedTag(this.tagSourceStart, this.tagSourceEnd);
644
						}
639
						}
645
					} else {
640
					} else {
646
						if (this.validValuePositions == -1) {
641
						if (this.validValuePositions == -1) {
Lines 657-663 Link Here
657
							if (this.reportProblems) this.sourceParser.problemReporter().javadocUnexpectedTag(this.tagSourceStart, this.tagSourceEnd);
652
							if (this.reportProblems) this.sourceParser.problemReporter().javadocUnexpectedTag(this.tagSourceStart, this.tagSourceEnd);
658
						}
653
						}
659
					}
654
					}
660
				} else if (!this.inlineTagStarted && length == TAG_VERSION_LENGTH && CharOperation.equals(TAG_VERSION, tagName, 0, length)) {
655
				} else if (length == TAG_VERSION_LENGTH && CharOperation.equals(TAG_VERSION, tagName, 0, length)) {
661
					this.tagValue = TAG_VERSION_VALUE;
656
					this.tagValue = TAG_VERSION_VALUE;
662
					this.tagWaitingForDescription = this.tagValue;
657
					this.tagWaitingForDescription = this.tagValue;
663
				} else {
658
				} else {
Lines 669-680 Link Here
669
				break;
664
				break;
670
		}
665
		}
671
		this.textStart = this.index;
666
		this.textStart = this.index;
672
		if (this.tagValue != TAG_OTHERS_VALUE && !this.inlineTagStarted) {
667
		if (this.tagValue != TAG_OTHERS_VALUE) {
673
			this.lastBlockTagValue = this.tagValue;
668
			if (!this.inlineTagStarted) {
674
		}
669
				this.lastBlockTagValue = this.tagValue;
675
		if (this.inlineTagStarted && this.reportProblems
670
			}
676
				&& (this.tagValue >= JAVADOC_TAG_TYPE.length || JAVADOC_TAG_TYPE[this.tagValue] != TAG_TYPE_INLINE)) {
671
			// bug 267833:[javadoc] Custom tags should not be allowed for inline tags
677
				this.sourceParser.problemReporter().javadocUnexpectedTag(this.tagSourceStart, this.tagSourceEnd);
672
			// Report a problem if a block tag is being used in the context of an inline tag and vice versa.
673
			if ((this.inlineTagStarted && JAVADOC_TAG_TYPE[this.tagValue] == TAG_TYPE_BLOCK)
674
					|| (!this.inlineTagStarted && JAVADOC_TAG_TYPE[this.tagValue] == TAG_TYPE_INLINE)) {
675
				valid = false;
676
				this.tagValue = TAG_OTHERS_VALUE;
677
				this.tagWaitingForDescription = NO_TAG_VALUE;
678
				if (this.reportProblems) {
679
					this.sourceParser.problemReporter().javadocUnexpectedTag(this.tagSourceStart, this.tagSourceEnd);
680
				}
681
			}
678
		}
682
		}
679
		return valid;
683
		return valid;
680
	}
684
	}

Return to bug 267833