You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by pa...@apache.org on 2020/09/27 20:41:48 UTC
[felix-dev] branch connect updated: Fix a warning
This is an automated email from the ASF dual-hosted git repository.
pauls pushed a commit to branch connect
in repository https://gitbox.apache.org/repos/asf/felix-dev.git
The following commit(s) were added to refs/heads/connect by this push:
new f4322aa Fix a warning
f4322aa is described below
commit f4322aa5ac1298924a3032fec8bbbd53f508361e
Author: Karl Pauls <ka...@gmail.com>
AuthorDate: Sun Sep 27 22:41:32 2020 +0200
Fix a warning
---
framework/src/main/java/org/apache/felix/framework/Felix.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/framework/src/main/java/org/apache/felix/framework/Felix.java b/framework/src/main/java/org/apache/felix/framework/Felix.java
index 81f5bcc..ade90ee 100644
--- a/framework/src/main/java/org/apache/felix/framework/Felix.java
+++ b/framework/src/main/java/org/apache/felix/framework/Felix.java
@@ -5055,9 +5055,12 @@ public class Felix extends BundleImpl implements Framework
try
{
File file = m_cache.getSystemBundleDataFile("bundle.id");
- is = m_secureAction.getInputStream(file);
- br = new BufferedReader(new InputStreamReader(is));
- return Long.parseLong(br.readLine());
+ if (m_secureAction.isFile(file))
+ {
+ is = m_secureAction.getInputStream(file);
+ br = new BufferedReader(new InputStreamReader(is));
+ return Long.parseLong(br.readLine());
+ }
}
catch (FileNotFoundException ex)
{