Bug 61181 - Task tag starting with double-/ (//) causes compile error
Summary: Task tag starting with double-/ (//) causes compile error
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: 3.0 M9   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-06 06:04 EDT by Thorsten Fuehring CLA
Modified: 2004-05-18 12:53 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thorsten Fuehring CLA 2004-05-06 06:04:59 EDT
Defining a task tag starting with "//" may lead to an "Unexpected end of
comment" error if the respective source file ends with a "/* */" comment
where the second slash is the very last character in the source file.

----- Code snipped ------
public class Sample {
    public Sample() {}
}

/*
 * CVS log information:
 * $Log$
 */[EOF]
--- End of snippend ------


P.S.: The error also occurs in 2.1.0.
Comment 1 Philipe Mulet CLA 2004-05-06 06:30:03 EDT
Task tags should be identifiers. This being said, we shouldn't crash if bogus 
tags are given to us.
Comment 2 Frederic Fusier CLA 2004-05-07 09:45:47 EDT
Fixed.

Accept now '//' as task tag.

[jdt-core-internal]
Changes done in checkTasktag(int,int) method Scanner. Note that now lookup for
tags in comment start at first character (and not second one as before) to be
able to detect starting double '/'.
Changes duplicated in PublicScanner.
2 test cases added in NegativeTests
Comment 3 Olivier Thomann CLA 2004-05-18 12:42:06 EDT
It doesn't fail anymore, but:
	//toto
is seen as a task if //toto is a task tag. It could simply be the starts of a
line comment.
Comment 4 Olivier Thomann CLA 2004-05-18 12:53:43 EDT
Verified in 200405180816