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 32466 Details for
Bug 119430
Potential performance problem in getViolatedRestriction()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Changes over 119108
org.eclipse.jdt.core_03.txt (text/plain), 3.56 KB, created by
Maxime Daniel
on 2006-01-04 11:45:13 EST
(
hide
)
Description:
Changes over 119108
Filename:
MIME Type:
Creator:
Maxime Daniel
Created:
2006-01-04 11:45:13 EST
Size:
3.56 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >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.2 >diff -u -r1.2 ClasspathLocation.java >--- batch/org/eclipse/jdt/internal/compiler/batch/ClasspathLocation.java 1 Jun 2005 09:06:28 -0000 1.2 >+++ batch/org/eclipse/jdt/internal/compiler/batch/ClasspathLocation.java 6 Dec 2005 16:11:18 -0000 >@@ -10,6 +10,9 @@ > *******************************************************************************/ > package org.eclipse.jdt.internal.compiler.batch; > >+import java.io.File; >+ >+import org.eclipse.jdt.core.compiler.CharOperation; > import org.eclipse.jdt.internal.compiler.env.AccessRestriction; > import org.eclipse.jdt.internal.compiler.env.AccessRuleSet; > import org.eclipse.jdt.internal.compiler.util.SuffixConstants; >@@ -29,16 +32,21 @@ > * > * @param qualifiedBinaryFileName > * tested type specification, formed as: >- * "org/eclipse/jdt/core/JavaCore.class" >+ * "org/eclipse/jdt/core/JavaCore.class"; on systems that >+ * use \ as File.separator, the >+ * "org\eclipse\jdt\core\JavaCore.class" is accepted as well > * @return the first access rule which is violated when accessing a given > * type, or null if none applies > */ > AccessRestriction fetchAccessRestriction(String qualifiedBinaryFileName) { > if (this.accessRuleSet == null) > return null; >- return this.accessRuleSet >- .getViolatedRestriction( >- qualifiedBinaryFileName.substring(0, qualifiedBinaryFileName.length() - SUFFIX_CLASS.length) >- .toCharArray()); >+ char [] qualifiedTypeName = qualifiedBinaryFileName. >+ substring(0, qualifiedBinaryFileName.length() - SUFFIX_CLASS.length) >+ .toCharArray(); >+ if (File.separatorChar == '\\') { >+ CharOperation.replace(qualifiedTypeName, File.separatorChar, '/'); >+ } >+ return this.accessRuleSet.getViolatedRestriction(qualifiedTypeName); > } > } >Index: compiler/org/eclipse/jdt/internal/compiler/env/AccessRuleSet.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/AccessRuleSet.java,v >retrieving revision 1.7 >diff -u -r1.7 AccessRuleSet.java >--- compiler/org/eclipse/jdt/internal/compiler/env/AccessRuleSet.java 6 Dec 2005 11:56:53 -0000 1.7 >+++ compiler/org/eclipse/jdt/internal/compiler/env/AccessRuleSet.java 6 Dec 2005 16:11:18 -0000 >@@ -58,17 +58,10 @@ > * Select the first access rule which is violated when accessing a given type, > * or null if no 'non accessible' access rule applies. > * @param targetTypeFilePath the target type file path, formed as: >- * "org/eclipse/jdt/core/JavaCore"; on systems that use '\' as their file >- * separator, the alternative format: "org\eclipse\jdt\core\JavaCore" is >- * accepted as well; the use of a mix of separators is tolerated but >- * discouraged. >+ * "org/eclipse/jdt/core/JavaCore" > * @return the first access restriction that applies if any, null else > */ > public AccessRestriction getViolatedRestriction(char[] targetTypeFilePath) { >- if (File.separatorChar == '\\') { >- targetTypeFilePath = CharOperation.replaceOnCopy(targetTypeFilePath, >- File.separatorChar, '/'); >- } > for (int i = 0, length = this.accessRules.length; i < length; i++) { > AccessRule accessRule = this.accessRules[i]; > if (CharOperation.pathMatch(accessRule.pattern, targetTypeFilePath,
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 119430
: 32466