Bug 50225 - Calling the default formatter with an empty string returns an invalid Edit
Summary: Calling the default formatter with an empty string returns an invalid Edit
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux-GTK
: P3 minor (vote)
Target Milestone: 3.0 M7   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-19 12:09 EST by Tom Hofmann CLA
Modified: 2004-02-12 14:34 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 Tom Hofmann CLA 2004-01-19 12:09:09 EST
I20040113 + recent plugin-export

call 

ToolFactory.createCodeFormatter(options).format(kind, string, offset, length,
indentationLevel, lineSeparator);

with:
kind= K_UNKNOWN
string= ""
offset= 0
length= 0
indentationLevel= 0
lineSeparator= "\n"

The returned edit, when applied to an emtpy document, throws a
MalformedEditException, as the edits length is 1.
Comment 1 Olivier Thomann CLA 2004-01-19 12:15:41 EST
I will investigate.
Comment 2 Olivier Thomann CLA 2004-01-20 08:53:19 EST
Fixed and released in HEAD.
Regression test added
Comment 3 Olivier Thomann CLA 2004-02-12 14:34:28 EST
Verified in 200402121200.