Bug 51626

Summary: Incorrected deprecation check
Product: [Eclipse Project] JDT Reporter: David Audel <david_audel>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.0 M7   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description David Audel CLA 2004-02-11 09:22:24 EST
build 20040210
1) create the follong test case
public class Y {
  /**
   * @see
   * String @deprecated
   */
  void foo() {
  }
}
public class Z {
  void bar() {
    Y y = new Y();
    y.foo();
  }
}
foo() is marked as a deprecated, but @deprecated must be at the beginning of a 
line.

The behavior is the same with
public class Y {
  /**
   * @see String
   * String @deprecated
   */
  void foo() {
  }
}
But the error does not occur with
public class Y {
  /**
   * @see String String
   * String @deprecated
   */
  void foo() {
  }
}

see bug 50644.
Comment 1 Frederic Fusier CLA 2004-02-12 10:09:19 EST
Fixed.

Now compiler does not complain for deprecation in this peculiar case.
First token of next line was uncorrectly consumed after the @see declaration 
and scanner was incorrectly restarting at @deprecated.

[jdt-core-dev internal]
Change made in AbstractCommentParser and DocCommentParser.

Test case added in jdt.core.tests.compiler.regression.JavadocTestMixed


Comment 2 Olivier Thomann CLA 2004-02-12 15:40:06 EST
Verified in 200402121200.