Bug 51626 - Incorrected deprecation check
Summary: Incorrected deprecation check
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M7   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-11 09:22 EST by David Audel CLA
Modified: 2004-02-12 15:40 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.