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 55510 Details for
Bug 110771
Fup on bug 102305 - align all ICompilationUnit#getContents implementations on a 'never null' behavior
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
New proposed patch
v01.txt (text/plain), 2.09 KB, created by
Frederic Fusier
on 2006-12-12 12:00:29 EST
(
hide
)
Description:
New proposed patch
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2006-12-12 12:00:29 EST
Size:
2.09 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/CompilationUnit.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnit.java,v >retrieving revision 1.236 >diff -u -r1.236 CompilationUnit.java >--- model/org/eclipse/jdt/internal/core/CompilationUnit.java 24 Nov 2006 13:56:36 -0000 1.236 >+++ model/org/eclipse/jdt/internal/core/CompilationUnit.java 12 Dec 2006 16:55:41 -0000 >@@ -88,9 +88,13 @@ > if (buffer == null) { > buffer = openBuffer(pm, unitInfo); // open buffer independently from the info, since we are building the info > } >- final char[] contents = buffer == null ? >- CharOperation.NO_CHAR : >- buffer.getCharacters(); >+ final char[] contents; >+ if (buffer == null) { >+ contents = CharOperation.NO_CHAR ; >+ } else { >+ char[] characters = buffer.getCharacters(); >+ contents = characters == null ? CharOperation.NO_CHAR : characters; >+ } > > // generate structure and compute syntax problems if needed > CompilationUnitStructureRequestor requestor = new CompilationUnitStructureRequestor(this, unitInfo, newElements); >Index: model/org/eclipse/jdt/internal/core/ClassFileWorkingCopy.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ClassFileWorkingCopy.java,v >retrieving revision 1.49 >diff -u -r1.49 ClassFileWorkingCopy.java >--- model/org/eclipse/jdt/internal/core/ClassFileWorkingCopy.java 29 Mar 2006 03:08:48 -0000 1.49 >+++ model/org/eclipse/jdt/internal/core/ClassFileWorkingCopy.java 12 Dec 2006 16:55:41 -0000 >@@ -51,7 +51,11 @@ > > public char[] getContents() { > try { >- return getBuffer().getCharacters(); >+ IBuffer buffer = getBuffer(); >+ if (buffer == null) return CharOperation.NO_CHAR; >+ char[] characters = buffer.getCharacters(); >+ if (characters == null) return CharOperation.NO_CHAR; >+ return characters; > } catch (JavaModelException e) { > return CharOperation.NO_CHAR; > }
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 110771
:
53801
|
55428
|
55468
| 55510