Skip to content

Commit cae2afd

Browse files
committed
Remove ResourceTest#isCaseSensitive #903
Removes the obsolete utility method isCaseSensitive() in ResourceTest. For the only two consumers of that method, the information given by Workspace#caseSensitive is sufficient. Contributes to #903
1 parent 67a075b commit cae2afd

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/IWorkspaceRootTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import org.eclipse.core.filesystem.EFS;
2121
import org.eclipse.core.filesystem.IFileStore;
2222
import org.eclipse.core.filesystem.URIUtil;
23+
import org.eclipse.core.internal.resources.Workspace;
2324
import org.eclipse.core.resources.IContainer;
2425
import org.eclipse.core.resources.IFile;
2526
import org.eclipse.core.resources.IFolder;
@@ -204,7 +205,7 @@ private void testFindFilesForLocation(IProject project) throws CoreException {
204205
assertResources("4.1", nonExisting, result);
205206

206207
//existing file with different case
207-
if (!isCaseSensitive(existing)) {
208+
if (!Workspace.caseSensitive) {
208209
IPath differentCase = IPath.fromOSString(existingFileLocation.toOSString().toUpperCase());
209210
result = root.findFilesForLocation(differentCase);
210211
assertResources("5.0", existing, result);

resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/LinkedResourceTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ public void testCreateLinkCaseVariant() throws Throwable {
625625

626626
ThrowingRunnable linkCreation = () -> link.createLink(localFolder, IResource.NONE, getMonitor());
627627
// should fail on case insensitive platforms
628-
if (isCaseSensitive(variant)) {
628+
if (Workspace.caseSensitive) {
629629
linkCreation.run();
630630
} else {
631631
assertThrows(CoreException.class, linkCreation);

resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/ResourceTest.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,6 @@ private final void restoreWorkspaceDescription() throws CoreException {
104104
storedWorkspaceDescription = null;
105105
}
106106

107-
/**
108-
* Returns whether the file system in which the provided resource
109-
* is stored is case sensitive. This succeeds whether or not the resource
110-
* exists.
111-
*/
112-
protected static boolean isCaseSensitive(IResource resource) {
113-
return ((Resource) resource).getStore().getFileSystem().isCaseSensitive();
114-
}
115-
116107
/**
117108
* Convenience method to copy contents from one stream to another.
118109
*/

0 commit comments

Comments
 (0)