[felix-dev] branch master updated: [FELIX-6564] Fixed NPE while retrieving component descriptions from SCR

2022-09-23 Thread tjwatson
This is an automated email from the ASF dual-hosted git repository.

tjwatson pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/felix-dev.git


The following commit(s) were added to refs/heads/master by this push:
 new 8815594fba [FELIX-6564] Fixed NPE while retrieving component 
descriptions from SCR
 new a27dd47244 Merge pull request #172 from amitjoy/fix/npe/scr
8815594fba is described below

commit 8815594fba7c7aeb121ae0cff33c67f36f486d36
Author: Amit Kumar Mondal 
AuthorDate: Wed Sep 14 13:20:56 2022 +0200

[FELIX-6564] Fixed NPE while retrieving component descriptions from SCR

Fixes https://issues.apache.org/jira/browse/FELIX-6564
---
 .../scr/impl/runtime/ServiceComponentRuntimeImpl.java   | 17 +
 1 file changed, 17 insertions(+)

diff --git 
a/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java
 
b/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java
index 0f13941502..32573091e0 100644
--- 
a/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java
+++ 
b/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java
@@ -117,6 +117,10 @@ public class ServiceComponentRuntimeImpl implements 
ServiceComponentRuntime
 try
 {
 ComponentHolder holder = getHolderFromDescription( description);
+// the holder can also be null if the associated component is 
deregistered
+if (holder == null) {
+return Collections.emptyList();
+}
 // Get a fully filled out valid description DTO
 description = holderToDescription(holder);
 if ( description == null)
@@ -146,6 +150,9 @@ public class ServiceComponentRuntimeImpl implements 
ServiceComponentRuntime
 try
 {
 ComponentHolder holder = getHolderFromDescription( description);
+if (holder == null) {
+return false;
+}
 return holder.isEnabled();
 }
 catch ( IllegalStateException ise)
@@ -163,6 +170,9 @@ public class ServiceComponentRuntimeImpl implements 
ServiceComponentRuntime
 try
 {
 final ComponentHolder holder = getHolderFromDescription( 
description);
+if (holder == null) {
+throw new IllegalStateException("The component is not 
available in the runtime");
+}
 final boolean doUpdate = !holder.isEnabled();
 final Promise result =  holder.enableComponents(true);
 if ( doUpdate ) {
@@ -185,6 +195,9 @@ public class ServiceComponentRuntimeImpl implements 
ServiceComponentRuntime
 try
 {
 final ComponentHolder holder = getHolderFromDescription( 
description);
+if (holder == null) {
+throw new IllegalStateException("The component is not 
available in the runtime");
+}
 final boolean doUpdate = holder.isEnabled();
 final Promise result = holder.disableComponents(true); 
//synchronous
 if ( doUpdate ) {
@@ -294,6 +307,10 @@ public class ServiceComponentRuntimeImpl implements 
ServiceComponentRuntime
 }
 long bundleId = description.bundle.id;
 Bundle b = context.getBundle(bundleId);
+if (b == null) {
+// the bundle is possibly uninstalled
+return null;
+}
 String name = description.name;
 return componentRegistry.getComponentHolder(b, name);
 }



svn commit: r56963 - /release/felix/

2022-09-23 Thread davidb
Author: davidb
Date: Fri Sep 23 13:53:56 2022
New Revision: 56963

Log:
org.apache.felix.configurator-1.0.16

Added:
release/felix/org.apache.felix.configurator-1.0.16-javadoc.jar   (with 
props)
release/felix/org.apache.felix.configurator-1.0.16-javadoc.jar.asc
release/felix/org.apache.felix.configurator-1.0.16-javadoc.jar.md5
release/felix/org.apache.felix.configurator-1.0.16-javadoc.jar.sha1
release/felix/org.apache.felix.configurator-1.0.16-source-release.tar.gz   
(with props)
release/felix/org.apache.felix.configurator-1.0.16-source-release.tar.gz.asc
release/felix/org.apache.felix.configurator-1.0.16-source-release.tar.gz.md5

release/felix/org.apache.felix.configurator-1.0.16-source-release.tar.gz.sha1
release/felix/org.apache.felix.configurator-1.0.16-source-release.zip   
(with props)
release/felix/org.apache.felix.configurator-1.0.16-source-release.zip.asc
release/felix/org.apache.felix.configurator-1.0.16-source-release.zip.md5
release/felix/org.apache.felix.configurator-1.0.16-source-release.zip.sha1
release/felix/org.apache.felix.configurator-1.0.16-sources.jar   (with 
props)
release/felix/org.apache.felix.configurator-1.0.16-sources.jar.asc
release/felix/org.apache.felix.configurator-1.0.16-sources.jar.md5
release/felix/org.apache.felix.configurator-1.0.16-sources.jar.sha1
release/felix/org.apache.felix.configurator-1.0.16.jar   (with props)
release/felix/org.apache.felix.configurator-1.0.16.jar.asc
release/felix/org.apache.felix.configurator-1.0.16.jar.md5
release/felix/org.apache.felix.configurator-1.0.16.jar.sha1
release/felix/org.apache.felix.configurator-1.0.16.pom
release/felix/org.apache.felix.configurator-1.0.16.pom.asc
release/felix/org.apache.felix.configurator-1.0.16.pom.md5
release/felix/org.apache.felix.configurator-1.0.16.pom.sha1
Removed:
release/felix/org.apache.felix.configurator-1.0.14-javadoc.jar
release/felix/org.apache.felix.configurator-1.0.14-javadoc.jar.asc
release/felix/org.apache.felix.configurator-1.0.14-javadoc.jar.sha1
release/felix/org.apache.felix.configurator-1.0.14-javadoc.jar.sha512
release/felix/org.apache.felix.configurator-1.0.14-source-release.tar.gz
release/felix/org.apache.felix.configurator-1.0.14-source-release.tar.gz.asc

release/felix/org.apache.felix.configurator-1.0.14-source-release.tar.gz.sha1

release/felix/org.apache.felix.configurator-1.0.14-source-release.tar.gz.sha512
release/felix/org.apache.felix.configurator-1.0.14-source-release.zip
release/felix/org.apache.felix.configurator-1.0.14-source-release.zip.asc
release/felix/org.apache.felix.configurator-1.0.14-source-release.zip.sha1
release/felix/org.apache.felix.configurator-1.0.14-source-release.zip.sha512
release/felix/org.apache.felix.configurator-1.0.14-sources.jar
release/felix/org.apache.felix.configurator-1.0.14-sources.jar.asc
release/felix/org.apache.felix.configurator-1.0.14-sources.jar.sha1
release/felix/org.apache.felix.configurator-1.0.14-sources.jar.sha512
release/felix/org.apache.felix.configurator-1.0.14.jar
release/felix/org.apache.felix.configurator-1.0.14.jar.asc
release/felix/org.apache.felix.configurator-1.0.14.jar.sha1
release/felix/org.apache.felix.configurator-1.0.14.jar.sha512
release/felix/org.apache.felix.configurator-1.0.14.pom
release/felix/org.apache.felix.configurator-1.0.14.pom.asc
release/felix/org.apache.felix.configurator-1.0.14.pom.sha1
release/felix/org.apache.felix.configurator-1.0.14.pom.sha512

Added: release/felix/org.apache.felix.configurator-1.0.16-javadoc.jar
==
Binary file - no diff available.

Propchange: release/felix/org.apache.felix.configurator-1.0.16-javadoc.jar
--
svn:mime-type = application/octet-stream

Added: release/felix/org.apache.felix.configurator-1.0.16-javadoc.jar.asc
==
--- release/felix/org.apache.felix.configurator-1.0.16-javadoc.jar.asc (added)
+++ release/felix/org.apache.felix.configurator-1.0.16-javadoc.jar.asc Fri Sep 
23 13:53:56 2022
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCgAdFiEE6xvDHSN2Fhyp8Ax73f1PYfJPDZ8FAmMpfNsACgkQ3f1PYfJP
+DZ8BghAAp4w1I+Z44UM5GKyjuLujITEt1IQvq/N5EEg+DLFk8UjMkqsN3jiuteBM
+zSrDlkuZns94eLAh1hzkKB6Sdx+c05M9oIQwU8wvKKB06z48ny//lbea52XKc4nd
+z2VtoPGZvwbLL2c4vBUQHQGO+1ZdEStceMoUlC3gLdVwJm/OKClhkz66fvNS3Yt4
+okFejhfnRiPjQEhwK/Px6ExatqZMje7Kafjc13sfVQHSHRSjCW1oaORsAJO0E4NK
+/C/6KVSxJ0RKl6DDGNbJziCeNjwQCtlKEWiSoCxKJhqLQl05d/RCBxunmqqpf0B/
+u6g428RMAP/lhGHl5pv4VvOKX6uyd4iDfXQiCKorPRGj19SYfRslkl7jeVWj9V8a
+U6YIzpwXizGLutTnKOmofb1li9hGLZlxTOKwHyMd8gnFVYczC2qXjgD+6ptex2fU
+9gCnFnZleBsVjNL4kvrsrFe9htGfdqL6CS/Iv32wZELZQl42sNnO0vh3FCxeiggx
++bHJlCCsv9TExyUdknwwfKz1MzWwxCrcvMB

[felix-atomos] branch master updated: add handling for running build on Windows

2022-09-23 Thread tjwatson
This is an automated email from the ASF dual-hosted git repository.

tjwatson pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/felix-atomos.git


The following commit(s) were added to refs/heads/master by this push:
 new 6a71137  add handling for running build on Windows
 new 4d50bad  Merge pull request #70 from fipro78/master
6a71137 is described below

commit 6a7113717944be3c7bb7e917078a2e2daab259ec
Author: Dirk Fauth 
AuthorDate: Thu Sep 22 19:08:57 2022 +0200

add handling for running build on Windows
---
 .../substrate/impl/NativeImageArgumentsImpl.java|  2 +-
 .../utils/substrate/impl/NativeImageCliUtil.java| 21 ++---
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git 
a/atomos.utils/atomos.utils.substrate.impl/src/main/java/org/apache/felix/atomos/utils/substrate/impl/NativeImageArgumentsImpl.java
 
b/atomos.utils/atomos.utils.substrate.impl/src/main/java/org/apache/felix/atomos/utils/substrate/impl/NativeImageArgumentsImpl.java
index a702164..a7e998c 100644
--- 
a/atomos.utils/atomos.utils.substrate.impl/src/main/java/org/apache/felix/atomos/utils/substrate/impl/NativeImageArgumentsImpl.java
+++ 
b/atomos.utils/atomos.utils.substrate.impl/src/main/java/org/apache/felix/atomos/utils/substrate/impl/NativeImageArgumentsImpl.java
@@ -121,7 +121,7 @@ public class NativeImageArgumentsImpl implements 
DefaultNativeImageArguments
 .map(Path::toAbsolutePath)//
 .sorted(NativeImageArgumentsImpl::byAbsolutePath)//
 .map(Path::toString)//
-.collect(Collectors.joining(":"));
+.collect(Collectors.joining(NativeImageCliUtil.isWindows() ? ";" : 
":"));
 arguments.add(cp);
 
 //--verbose
diff --git 
a/atomos.utils/atomos.utils.substrate.impl/src/main/java/org/apache/felix/atomos/utils/substrate/impl/NativeImageCliUtil.java
 
b/atomos.utils/atomos.utils.substrate.impl/src/main/java/org/apache/felix/atomos/utils/substrate/impl/NativeImageCliUtil.java
index 7bbcda2..5b9eee2 100644
--- 
a/atomos.utils/atomos.utils.substrate.impl/src/main/java/org/apache/felix/atomos/utils/substrate/impl/NativeImageCliUtil.java
+++ 
b/atomos.utils/atomos.utils.substrate.impl/src/main/java/org/apache/felix/atomos/utils/substrate/impl/NativeImageCliUtil.java
@@ -34,6 +34,17 @@ public class NativeImageCliUtil
 
 private static final String JAVA_HOME = "java.home";
 
+public static final String OS;
+private static final String EXECUTABLE;
+static {
+   OS = System.getProperty("os.name");
+   EXECUTABLE =  isWindows() ? "native-image.cmd" : "native-image";
+}
+
+public static boolean isWindows() {
+   return (OS != null && OS.startsWith("Windows"));
+}
+
 public static Path execute(final Path outputDir,
 final BaseNativeImageArguments arguments) throws Exception
 {
@@ -52,7 +63,11 @@ public class NativeImageCliUtil
 + "' with the path as an environment variable");
 }
 
-final Path resultFile = executionDir.resolve(arguments.name());
+String resultFileName = arguments.name();
+if (isWindows()) {
+   resultFileName += ".exe";
+}
+final Path resultFile = executionDir.resolve(resultFileName);
 
 final List commands = new ArrayList<>();
 commands.add(exec.get().toAbsolutePath().toString());
@@ -91,7 +106,7 @@ public class NativeImageCliUtil
 {
 if (path == null)
 {
-Optional oExec = 
findNativeImageExecutable(Paths.get("native-image"));
+Optional oExec = 
findNativeImageExecutable(Paths.get(EXECUTABLE));
 if (oExec.isPresent())
 {
 return oExec;
@@ -122,7 +137,7 @@ public class NativeImageCliUtil
 else if (Files.isDirectory(path))
 {
 final Optional candidate = findNativeImageExecutable(
-path.resolve("native-image"));
+path.resolve(EXECUTABLE));
 if (candidate.isPresent())
 {
 return candidate;