Skip to content

Commit d28e5be

Browse files
committed
Blind attempt to fix 'AssertionError: Already disposed: Project'
1 parent 9dcf88e commit d28e5be

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning].
44

5+
## 3.1.2 - 2019-05-21
6+
7+
### Fixed
8+
9+
- Try to recover from `AssertionError: Already disposed: Project`, reported via email and in ([#83])
10+
511
## 3.1.1 - 2019-04-24
612

713
### Fixed
@@ -99,6 +105,7 @@ This project adheres to [Semantic Versioning].
99105
[#70]: https://github.com/Ashald/EnvFile/issues/70
100106
[#72]: https://github.com/Ashald/EnvFile/issues/72
101107
[#81]: https://github.com/Ashald/EnvFile/issues/81
108+
[#81]: https://github.com/Ashald/EnvFile/issues/83
102109

103110
[Keep a CHANGELOG]: http://keepachangelog.com
104111
[Semantic Versioning]: http://semver.org/

modules/platform/src/main/java/net/ashald/envfile/platform/EnvFileEntry.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,12 @@ private File getFile() {
105105
}
106106
String resolvedPath = path;
107107
if (!FileUtil.isAbsolute(resolvedPath)) {
108-
VirtualFile virtualFile = runConfig.getProject().getBaseDir().findFileByRelativePath(resolvedPath);
108+
VirtualFile virtualFile;
109+
try {
110+
virtualFile = runConfig.getProject().getBaseDir().findFileByRelativePath(resolvedPath);
111+
} catch (AssertionError ignored) { // can bee thrown deep from IoC implementation
112+
virtualFile = null;
113+
}
109114
if (virtualFile != null) {
110115
resolvedPath = virtualFile.getPath();
111116
}

src/main/resources/META-INF/plugin.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@
3838
]]></description>
3939

4040
<change-notes><![CDATA[
41-
<a href="https://github.com/Ashald/EnvFile/tree/v3.1.1"><b>v3.1.1</b></a> (2019-04-24)
41+
<a href="https://github.com/Ashald/EnvFile/tree/v3.1.2"><b>v3.1.2</b></a> (2019-05-21)
4242
<br/>
4343
<br/>
4444
4545
<b>Fixed</b>:
4646
<ul>
47-
<li>Substitute parent process env vars in IDEA - wasn't working before</li>
47+
<li>Try to recover from 'AssertionError: Already disposed: Project', reported via email and in</li>
4848
</ul>
4949
<br/>
5050
<br/>

0 commit comments

Comments
 (0)