[aries-cdi] branch master updated: [ARIES-2017] reduce unsafe warnings for owb impl
This is an automated email from the ASF dual-hosted git repository. rmannibucau pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/aries-cdi.git The following commit(s) were added to refs/heads/master by this push: new 9242268 [ARIES-2017] reduce unsafe warnings for owb impl 9242268 is described below commit 9242268d9c0268dccb5fdcedaed383af5db92b25 Author: Romain Manni-Bucau AuthorDate: Wed Oct 21 17:02:23 2020 +0200 [ARIES-2017] reduce unsafe warnings for owb impl --- .../org/apache/aries/cdi/owb/core/OSGiDefiningClassService.java | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cdi-owb/src/main/java/org/apache/aries/cdi/owb/core/OSGiDefiningClassService.java b/cdi-owb/src/main/java/org/apache/aries/cdi/owb/core/OSGiDefiningClassService.java index a04ae37..57c6444 100644 --- a/cdi-owb/src/main/java/org/apache/aries/cdi/owb/core/OSGiDefiningClassService.java +++ b/cdi-owb/src/main/java/org/apache/aries/cdi/owb/core/OSGiDefiningClassService.java @@ -21,11 +21,9 @@ import org.apache.webbeans.proxy.Unsafe; import org.apache.webbeans.spi.DefiningClassService; public class OSGiDefiningClassService implements DefiningClassService { - private final Unsafe unsafe; private final ClassLoaders classloaders; public OSGiDefiningClassService(final WebBeansContext context) { - this.unsafe = new Unsafe(); this.classloaders = context.getService(ClassLoaders.class); } @@ -52,7 +50,7 @@ public class OSGiDefiningClassService implements DefiningClassService { if (classLoader != classloaders.bundleLoader) { // todo: log a warning? } - return unsafe.defineAndLoadClass(classLoader, name, bytes); + return UnsafeFacade.INSTANCE.defineAndLoadClass(classLoader, name, bytes); } return (Class) classloaders.loader.getOrRegister(name, bytes, proxied.getPackage(), proxied.getProtectionDomain()); } @@ -70,4 +68,9 @@ public class OSGiDefiningClassService implements DefiningClassService { this.loader = loader; } } + + // lazy init unsafe, not needed for a lot of apps and avoids warnings on java > 8 + private static class UnsafeFacade { + private static final Unsafe INSTANCE = new Unsafe(); + } }
[aries-rsa] 01/03: ARIES-2014 - Upgrade pax-url-aether to 2.6.2
This is an automated email from the ASF dual-hosted git repository. amichai pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/aries-rsa.git commit f13ef61f4375d119438b40b33b7b4e412052d906 Author: Amichai Rothman AuthorDate: Sun Mar 8 17:05:45 2020 +0200 ARIES-2014 - Upgrade pax-url-aether to 2.6.2 --- itests/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/itests/pom.xml b/itests/pom.xml index 3dea817..9455aa3 100644 --- a/itests/pom.xml +++ b/itests/pom.xml @@ -81,7 +81,7 @@ org.ops4j.pax.url pax-url-aether -2.4.5 +2.6.2
[aries-rsa] branch master updated (68662b0 -> a0aa2be)
This is an automated email from the ASF dual-hosted git repository. amichai pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/aries-rsa.git. from 68662b0 [maven-release-plugin] prepare for next development iteration new f13ef61 ARIES-2014 - Upgrade pax-url-aether to 2.6.2 new 659bab2 ARIES-2015 - Upgrade pax-exam to 4.13.4 new a0aa2be Remove double spaces The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: Readme.md| 4 ++-- .../zookeeper/client/ZookeeperEndpointRepository.java| 2 +- itests/pom.xml | 2 +- parent/pom.xml | 2 +- .../rsa/provider/fastbin/tcp/ServerInvokerImpl.java | 2 +- .../aries/rsa/provider/fastbin/FutureInvocationTest.java | 4 ++-- .../aries/rsa/provider/fastbin/InvocationTest.java | 16 .../aries/rsa/provider/fastbin/TransportFailureTest.java | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-)
[aries-rsa] 03/03: Remove double spaces
This is an automated email from the ASF dual-hosted git repository. amichai pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/aries-rsa.git commit a0aa2beb506631e79ede3695a8446d21e76d4d7c Author: Amichai Rothman AuthorDate: Sun Mar 8 17:39:38 2020 +0200 Remove double spaces --- Readme.md| 4 ++-- .../zookeeper/client/ZookeeperEndpointRepository.java| 2 +- .../rsa/provider/fastbin/tcp/ServerInvokerImpl.java | 2 +- .../aries/rsa/provider/fastbin/FutureInvocationTest.java | 4 ++-- .../aries/rsa/provider/fastbin/InvocationTest.java | 16 .../aries/rsa/provider/fastbin/TransportFailureTest.java | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Readme.md b/Readme.md index 84b02cf..3179c33 100644 --- a/Readme.md +++ b/Readme.md @@ -6,7 +6,7 @@ The [Aries Remote Service Admin (RSA)](http://aries.apache.org/modules/rsa.html) project is the reference implementation of [Remote Services](https://osgi.org/specification/osgi.cmpn/7.0.0/service.remoteservices.html ) and [Remote Service Admin](https://osgi.org/specification/osgi.cmpn/7.0.0/service.remoteserviceadmin.html) from the OSGi R7 specs. -It allows to transparently use OSGi services for remote communication. OSGi services can be marked for export by adding a service property service.exported.interfaces=*. Various other properties can be used to customize how the service is to be exposed. +It allows to transparently use OSGi services for remote communication. OSGi services can be marked for export by adding a service property service.exported.interfaces=*. Various other properties can be used to customize how the service is to be exposed. ## Distribution Provider @@ -42,4 +42,4 @@ The source zip needs to be copied to the [Apache release svn](https://dist.apach ### Add checksum -gpg --print-md SHA512 > .sha512 +gpg --print-md SHA512 > .sha512 diff --git a/discovery/zookeeper/src/main/java/org/apache/aries/rsa/discovery/zookeeper/client/ZookeeperEndpointRepository.java b/discovery/zookeeper/src/main/java/org/apache/aries/rsa/discovery/zookeeper/client/ZookeeperEndpointRepository.java index a447246..1bba003 100644 --- a/discovery/zookeeper/src/main/java/org/apache/aries/rsa/discovery/zookeeper/client/ZookeeperEndpointRepository.java +++ b/discovery/zookeeper/src/main/java/org/apache/aries/rsa/discovery/zookeeper/client/ZookeeperEndpointRepository.java @@ -110,7 +110,7 @@ public class ZookeeperEndpointRepository { LOG.error(msg, ex); } -private void add(EndpointDescription endpoint) throws KeeperException, InterruptedException { +private void add(EndpointDescription endpoint) throws KeeperException, InterruptedException { String path = getZooKeeperPath(endpoint.getId()); LOG.info("Exporting path: {}, Endpoint: {}", path, endpoint); createBasePath(); diff --git a/provider/fastbin/src/main/java/org/apache/aries/rsa/provider/fastbin/tcp/ServerInvokerImpl.java b/provider/fastbin/src/main/java/org/apache/aries/rsa/provider/fastbin/tcp/ServerInvokerImpl.java index de4dd04..b540c94 100644 --- a/provider/fastbin/src/main/java/org/apache/aries/rsa/provider/fastbin/tcp/ServerInvokerImpl.java +++ b/provider/fastbin/src/main/java/org/apache/aries/rsa/provider/fastbin/tcp/ServerInvokerImpl.java @@ -107,7 +107,7 @@ public class ServerInvokerImpl implements ServerInvoker, Dispatched { String[] parts = data.utf8().toString().split(","); String name = parts[0]; Class[] params = new Class[parts.length-1]; -for( int i=0; i < params.length; i++) { +for( int i=0; i < params.length; i++) { params[i] = decodeClass(parts[i+1]); } Method method = clazz.getMethod(name, params); diff --git a/provider/fastbin/src/test/java/org/apache/aries/rsa/provider/fastbin/FutureInvocationTest.java b/provider/fastbin/src/test/java/org/apache/aries/rsa/provider/fastbin/FutureInvocationTest.java index d32cf60..2622a81 100644 --- a/provider/fastbin/src/test/java/org/apache/aries/rsa/provider/fastbin/FutureInvocationTest.java +++ b/provider/fastbin/src/test/java/org/apache/aries/rsa/provider/fastbin/FutureInvocationTest.java @@ -157,7 +157,7 @@ public class FutureInvocationTest { public CompletableFuture exceptionAsync() throws IOException { CompletableFuture f = CompletableFuture.supplyAsync(() -> { sleep(500); -return "Hello"; +return "Hello"; }); f.completeExceptionally(new IOException("test")); return f; @@ -176,7 +176,7 @@ public class FutureInvocationTest { public Future helloAsyncStandardFuture() { return Executors.newSingleThreadExecutor().submit(() -> {
[aries-rsa] 02/03: ARIES-2015 - Upgrade pax-exam to 4.13.4
This is an automated email from the ASF dual-hosted git repository. amichai pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/aries-rsa.git commit 659bab2f9507686fb5b45fc04c8383c52e7c20ac Author: Amichai Rothman AuthorDate: Sun Mar 8 17:06:10 2020 +0200 ARIES-2015 - Upgrade pax-exam to 4.13.4 --- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parent/pom.xml b/parent/pom.xml index 77c6047..3bdb698 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -40,7 +40,7 @@ 1.2.6 1.21 1.11 -4.13.0 +4.13.4