java: decompiler test fixes

This commit is contained in:
Roman Shevchenko
2014-06-21 08:01:24 +02:00
parent feb0483056
commit 9dd95eee2e
2 changed files with 5 additions and 3 deletions
@@ -20,6 +20,7 @@ import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.fileTypes.StdFileTypes;
import com.intellij.openapi.project.DefaultProjectFactory;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.codeStyle.CodeStyleSettings;
@@ -114,8 +115,9 @@ public class IdeaDecompiler extends ClassFileDecompilers.Light {
@Override
public InputStream getBytecodeStream(String externalPath, String internalPath) {
try {
VirtualFile file = myFiles.get(externalPath);
assert file != null : externalPath;
String path = FileUtil.toSystemIndependentName(externalPath);
VirtualFile file = myFiles.get(path);
assert file != null : path;
return file.getInputStream();
}
catch (IOException e) {
@@ -83,7 +83,7 @@ public class IdeaDecompilerTest extends LightCodeInsightFixtureTestCase {
public void testStubCompatibilityIdea() {
String path = PathManager.getHomePath() + "/out/classes/production";
VirtualFile dir = StandardFileSystems.local().findFileByPath(path);
VirtualFile dir = StandardFileSystems.local().refreshAndFindFileByPath(path);
assertNotNull(path, dir);
doTestStubCompatibility(dir);
}