Skip to content

Commit 9a800ae

Browse files
committed
catch all invalid files for dotenv extract "Malformed \uxxxx encoding."
1 parent f1894f9 commit 9a800ae

File tree

1 file changed

+3
-3
lines changed
  • src/main/java/fr/adrienbrault/idea/symfony2plugin/dic/container/util

1 file changed

+3
-3
lines changed

src/main/java/fr/adrienbrault/idea/symfony2plugin/dic/container/util/DotEnvUtil.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -115,20 +115,20 @@ private static void visitEnvironment(@NotNull Project project, @NotNull Consumer
115115

116116
for (VirtualFile virtualFile : files) {
117117
PsiFile file = PsiManager.getInstance(project).findFile(virtualFile);
118-
if(file == null) {
118+
if (file == null) {
119119
continue;
120120
}
121121

122122
Properties variables = new Properties();
123123
try {
124124
variables.load(virtualFile.getInputStream());
125-
} catch (IOException e) {
125+
} catch (Throwable e) {
126126
continue;
127127
}
128128

129129
for (Map.Entry<Object, Object> variable : variables.entrySet()) {
130130
Object key = variable.getKey();
131-
if(key instanceof String) {
131+
if (key instanceof String) {
132132
consumer.accept(Pair.create((String) key, file));
133133
}
134134
}

0 commit comments

Comments
 (0)