Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

Commit

Permalink
fix: no exception when trying the filename extension with invalid
Browse files Browse the repository at this point in the history
parameter
  • Loading branch information
juli1 committed Apr 4, 2022
1 parent 83ac307 commit 91ad266
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pluginGroup = codiga.io.plugins
pluginName = codiga-jetbrains-plugin
pluginVersion = 1.4.3
pluginVersion = 1.4.4


pluginSinceBuild = 212.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ private LanguageUtils() {
}

public static LanguageEnumeration getLanguageFromFilename(final String filename) {
final String extension = FilenameUtils.getExtension(filename);
String extension;
try {
extension = FilenameUtils.getExtension(filename);
} catch (IllegalArgumentException iae) {
return LanguageEnumeration.UNKNOWN;
}

if (filename.toLowerCase(java.util.Locale.getDefault()).startsWith("docker")) {
return LanguageEnumeration.DOCKER;
Expand Down

0 comments on commit 91ad266

Please sign in to comment.