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 22177 Details for
Bug 96258
Bogus build path errors caused by multiple project import
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Possible fix
patch96258_org.eclipse.jdt.core.txt (text/plain), 1.85 KB, created by
Jerome Lanneluc
on 2005-06-01 12:50:19 EDT
(
hide
)
Description:
Possible fix
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2005-06-01 12:50:19 EDT
Size:
1.85 KB
patch
obsolete
>Index: model/org/eclipse/jdt/internal/core/JavaProject.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaProject.java,v >retrieving revision 1.345 >diff -u -r1.345 JavaProject.java >--- model/org/eclipse/jdt/internal/core/JavaProject.java 23 May 2005 15:11:35 -0000 1.345 >+++ model/org/eclipse/jdt/internal/core/JavaProject.java 1 Jun 2005 16:48:14 -0000 >@@ -11,15 +11,6 @@ > package org.eclipse.jdt.internal.core; > > import java.io.*; >-import java.io.BufferedInputStream; >-import java.io.ByteArrayInputStream; >-import java.io.ByteArrayOutputStream; >-import java.io.File; >-import java.io.FileInputStream; >-import java.io.IOException; >-import java.io.InputStream; >-import java.io.OutputStreamWriter; >-import java.io.StringReader; > import java.util.ArrayList; > import java.util.HashMap; > import java.util.HashSet; >@@ -2121,6 +2112,26 @@ > // fallback to default > property = new String(bytes); > } >+ } else { >+ // when a project is imported, we get a first delta for the addition of the .project, but the .classpath is not accessible >+ // so default to using java.io.File >+ // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=96258 >+ File file = rscFile.getLocation().toFile(); >+ if (file.exists()) { >+ byte[] bytes; >+ try { >+ bytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(file); >+ } catch (IOException e) { >+ return null; >+ } >+ try { >+ property = new String(bytes, "UTF-8"); //$NON-NLS-1$ // .classpath always encoded with UTF-8 >+ } catch (UnsupportedEncodingException e) { >+ Util.log(e, "Could not read .classpath with UTF-8 encoding"); //$NON-NLS-1$ >+ // fallback to default >+ property = new String(bytes); >+ } >+ } > } > return property; > }
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 96258
:
21568
| 22177