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 182303 Details for
Bug 329344
[compiler] Batch compiler should not removed some duplicated entries on the classpath
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_329344.txt (text/plain), 5.79 KB, created by
Olivier Thomann
on 2010-11-03 11:28:45 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2010-11-03 11:28:45 EDT
Size:
5.79 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: batch/org/eclipse/jdt/internal/compiler/batch/ClasspathDirectory.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathDirectory.java,v >retrieving revision 1.57 >diff -u -r1.57 ClasspathDirectory.java >--- batch/org/eclipse/jdt/internal/compiler/batch/ClasspathDirectory.java 19 Aug 2010 06:26:31 -0000 1.57 >+++ batch/org/eclipse/jdt/internal/compiler/batch/ClasspathDirectory.java 3 Nov 2010 15:28:26 -0000 >@@ -185,4 +185,7 @@ > public String getPath() { > return this.path; > } >+public int getMode() { >+ return this.mode; >+} > } >Index: batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJar.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJar.java,v >retrieving revision 1.52 >diff -u -r1.52 ClasspathJar.java >--- batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJar.java 21 Jul 2009 19:54:06 -0000 1.52 >+++ batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJar.java 3 Nov 2010 15:28:26 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2009 IBM Corporation and others. >+ * Copyright (c) 2000, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -202,4 +202,7 @@ > } > return this.path; > } >+public int getMode() { >+ return BINARY; >+} > } >Index: batch/org/eclipse/jdt/internal/compiler/batch/ClasspathLocation.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathLocation.java,v >retrieving revision 1.12 >diff -u -r1.12 ClasspathLocation.java >--- batch/org/eclipse/jdt/internal/compiler/batch/ClasspathLocation.java 27 Jun 2008 16:04:12 -0000 1.12 >+++ batch/org/eclipse/jdt/internal/compiler/batch/ClasspathLocation.java 3 Nov 2010 15:28:26 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2008 IBM Corporation and others. >+ * Copyright (c) 2000, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -67,4 +67,37 @@ > } > return this.accessRuleSet.getViolatedRestriction(qualifiedTypeName); > } >+ >+ public int getMode() { >+ return SOURCE | BINARY; >+ } >+ public int hashCode() { >+ final int prime = 31; >+ int result = 1; >+ result = prime * result + this.getMode(); >+ result = prime * result + ((this.path == null) ? 0 : this.path.hashCode()); >+ return result; >+ } >+ public boolean equals(Object obj) { >+ if (this == obj) >+ return true; >+ if (obj == null) >+ return false; >+ if (getClass() != obj.getClass()) >+ return false; >+ ClasspathLocation other = (ClasspathLocation) obj; >+ String localPath = this.getPath(); >+ String otherPath = other.getPath(); >+ if (localPath == null) { >+ if (otherPath != null) >+ return false; >+ } else if (!localPath.equals(otherPath)) >+ return false; >+ if (this.getMode() != other.getMode()) >+ return false; >+ return true; >+ } >+ public String getPath() { >+ return this.path; >+ } > } >Index: batch/org/eclipse/jdt/internal/compiler/batch/ClasspathSourceJar.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathSourceJar.java,v >retrieving revision 1.9 >diff -u -r1.9 ClasspathSourceJar.java >--- batch/org/eclipse/jdt/internal/compiler/batch/ClasspathSourceJar.java 7 Mar 2009 00:59:05 -0000 1.9 >+++ batch/org/eclipse/jdt/internal/compiler/batch/ClasspathSourceJar.java 3 Nov 2010 15:28:26 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2006, 2009 IBM Corporation and others. >+ * Copyright (c) 2006, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -61,4 +61,7 @@ > public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String qualifiedBinaryFileName) { > return findClass(typeName, qualifiedPackageName, qualifiedBinaryFileName, false); > } >+ public int getMode() { >+ return SOURCE; >+ } > } >Index: batch/org/eclipse/jdt/internal/compiler/batch/FileSystem.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/FileSystem.java,v >retrieving revision 1.56 >diff -u -r1.56 FileSystem.java >--- batch/org/eclipse/jdt/internal/compiler/batch/FileSystem.java 6 Oct 2010 14:44:06 -0000 1.56 >+++ batch/org/eclipse/jdt/internal/compiler/batch/FileSystem.java 3 Nov 2010 15:28:26 -0000 >@@ -91,10 +91,9 @@ > HashSet cache = new HashSet(); > for (Iterator iterator = classpaths.iterator(); iterator.hasNext(); ) { > FileSystem.Classpath classpath = (FileSystem.Classpath) iterator.next(); >- String path = classpath.getPath(); >- if (!cache.contains(path)) { >+ if (!cache.contains(classpath)) { > normalizedClasspath.add(classpath); >- cache.add(path); >+ cache.add(classpath); > } > } > return normalizedClasspath;
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 329344
: 182303