Stop using deprecated method

This commit is contained in:
Roman Shevchenko
2012-08-24 22:19:12 +04:00
parent 451fba2c78
commit 3ad72015bf
7 changed files with 47 additions and 20 deletions
@@ -1,3 +1,19 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* User: anna
* Date: 11-Sep-2007
@@ -8,9 +24,9 @@ import com.intellij.JavaTestUtil;
import com.intellij.codeInspection.ex.LocalInspectionToolWrapper;
import com.intellij.codeInspection.java15api.Java15APIUsageInspection;
import com.intellij.openapi.roots.ContentIterator;
import com.intellij.openapi.roots.impl.FileIndexImplUtil;
import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.vfs.JarFileSystem;
import com.intellij.openapi.vfs.VfsUtilCore;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.VirtualFileFilter;
import com.intellij.pom.java.LanguageLevel;
@@ -45,6 +61,7 @@ public class JavaAPIUsagesInspectionTest extends InspectionTestCase {
doTest();
}
@SuppressWarnings("UnusedDeclaration")
public void _testCollectSinceApiUsages() {
final String version = "1.4";
final ContentIterator contentIterator = new ContentIterator() {
@@ -77,6 +94,7 @@ public class JavaAPIUsagesInspectionTest extends InspectionTestCase {
}
};
final VirtualFile srcFile = JarFileSystem.getInstance().findFileByPath("c:/program files/java/jdk1.6.0_12/src.zip!/");
FileIndexImplUtil.iterateRecursively(srcFile, VirtualFileFilter.ALL, contentIterator);
assert srcFile != null;
VfsUtilCore.iterateChildrenRecursively(srcFile, VirtualFileFilter.ALL, contentIterator);
}
}