Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 141562 Details for
Bug 283133
[formatter] IAE when pasting a snippet
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_283133.txt (text/plain), 1.38 KB, created by
Olivier Thomann
on 2009-07-14 15:52:32 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2009-07-14 15:52:32 EDT
Size:
1.38 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: formatter/org/eclipse/jdt/core/formatter/IndentManipulation.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/IndentManipulation.java,v >retrieving revision 1.8 >diff -u -r1.8 IndentManipulation.java >--- formatter/org/eclipse/jdt/core/formatter/IndentManipulation.java 27 Jun 2008 16:04:12 -0000 1.8 >+++ formatter/org/eclipse/jdt/core/formatter/IndentManipulation.java 14 Jul 2009 19:54:04 -0000 >@@ -68,16 +68,17 @@ > * @return the number of indentation units that line is indented by > * @exception IllegalArgumentException if: > * <ul> >- * <li>the given <code>indentWidth</code> is lower or equals to zero</li> >+ * <li>the given <code>indentWidth</code> is lower than zero</li> > * <li>the given <code>tabWidth</code> is lower than zero</li> > * <li>the given <code>line</code> is null</li> > * </ul> > */ > public static int measureIndentUnits(CharSequence line, int tabWidth, int indentWidth) { >- if (indentWidth <= 0 || tabWidth < 0 || line == null) { >+ if (indentWidth < 0 || tabWidth < 0 || line == null) { > throw new IllegalArgumentException(); > } > >+ if (indentWidth == 0) return 0; > int visualLength= measureIndentInSpaces(line, tabWidth); > return visualLength / indentWidth; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 283133
:
141289
| 141562