diff options
author | 2022-09-25 20:14:42 +0200 | |
---|---|---|
committer | 2022-10-03 20:06:52 +0200 | |
commit | 89d6f019f764532d85d1f7499355e1cd3075f0b5 (patch) | |
tree | bc007da572948f9de1df5bc7497cda6f6a1fa752 /buildSrc/src/main/groovy/refinery-frontend-worktree.gradle | |
parent | feat: data structure for assertion merging (diff) | |
download | refinery-89d6f019f764532d85d1f7499355e1cd3075f0b5.tar.gz refinery-89d6f019f764532d85d1f7499355e1cd3075f0b5.tar.zst refinery-89d6f019f764532d85d1f7499355e1cd3075f0b5.zip |
chore: fix some warnings
Diffstat (limited to 'buildSrc/src/main/groovy/refinery-frontend-worktree.gradle')
-rw-r--r-- | buildSrc/src/main/groovy/refinery-frontend-worktree.gradle | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/buildSrc/src/main/groovy/refinery-frontend-worktree.gradle b/buildSrc/src/main/groovy/refinery-frontend-worktree.gradle index e1324746..1d239fd5 100644 --- a/buildSrc/src/main/groovy/refinery-frontend-worktree.gradle +++ b/buildSrc/src/main/groovy/refinery-frontend-worktree.gradle | |||
@@ -14,13 +14,13 @@ frontend { | |||
14 | 14 | ||
15 | ext.frontedPropertiesFile = "${frontend.nodeInstallDirectory.get()}/frontend.properties" | 15 | ext.frontedPropertiesFile = "${frontend.nodeInstallDirectory.get()}/frontend.properties" |
16 | 16 | ||
17 | def String getFrontendProperty(String propertyName) { | 17 | String getFrontendProperty(String propertyName) { |
18 | FileInputStream inputStream = null | 18 | FileInputStream inputStream = null |
19 | Properties props = new Properties() | 19 | Properties props = new Properties() |
20 | try { | 20 | try { |
21 | inputStream = new FileInputStream(frontedPropertiesFile) | 21 | inputStream = new FileInputStream(frontedPropertiesFile) |
22 | props.load(inputStream) | 22 | props.load(inputStream) |
23 | } catch (FileNotFoundException | IOException e) { | 23 | } catch (IOException ignored) { |
24 | return null | 24 | return null |
25 | } finally { | 25 | } finally { |
26 | if (inputStream != null) { | 26 | if (inputStream != null) { |
@@ -30,13 +30,13 @@ def String getFrontendProperty(String propertyName) { | |||
30 | return props.get(propertyName) | 30 | return props.get(propertyName) |
31 | } | 31 | } |
32 | 32 | ||
33 | def String putFrontedProperty(String propertyName, String propertyValue) { | 33 | void putFrontedProperty(String propertyName, String propertyValue) { |
34 | FileInputStream inputStream = null | 34 | FileInputStream inputStream = null |
35 | Properties props = new Properties() | 35 | Properties props = new Properties() |
36 | try { | 36 | try { |
37 | inputStream = new FileInputStream(frontedPropertiesFile) | 37 | inputStream = new FileInputStream(frontedPropertiesFile) |
38 | props.load(inputStream) | 38 | props.load(inputStream) |
39 | } catch (FileNotFoundException e) { | 39 | } catch (FileNotFoundException ignored) { |
40 | // Use an empty Properties object instead | 40 | // Use an empty Properties object instead |
41 | } finally { | 41 | } finally { |
42 | if (inputStream != null) { | 42 | if (inputStream != null) { |
@@ -48,8 +48,7 @@ def String putFrontedProperty(String propertyName, String propertyValue) { | |||
48 | try { | 48 | try { |
49 | outputStream = new FileOutputStream(frontedPropertiesFile) | 49 | outputStream = new FileOutputStream(frontedPropertiesFile) |
50 | props.store(outputStream, null) | 50 | props.store(outputStream, null) |
51 | } catch (IOException e) { | 51 | } catch (IOException ignored) { |
52 | return true; | ||
53 | } finally { | 52 | } finally { |
54 | if (outputStream != null) { | 53 | if (outputStream != null) { |
55 | outputStream.close() | 54 | outputStream.close() |