felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1778330 - in /felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl: Configurator.java CoordinatorUtil.java json/JSONUtil.java
Date Wed, 11 Jan 2017 17:42:51 GMT
Author: cziegeler
Date: Wed Jan 11 17:42:51 2017
New Revision: 1778330

URL: http://svn.apache.org/viewvc?rev=1778330&view=rev
Log:
Update to latest spec version

Modified:
    felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/Configurator.java
    felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/CoordinatorUtil.java
    felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/json/JSONUtil.java

Modified: felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/Configurator.java
URL: http://svn.apache.org/viewvc/felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/Configurator.java?rev=1778330&r1=1778329&r2=1778330&view=diff
==============================================================================
--- felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/Configurator.java
(original)
+++ felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/Configurator.java
Wed Jan 11 17:42:51 2017
@@ -54,7 +54,7 @@ public class Configurator {
 
     private static final String PROP_INITIAL = "configurator.initial";
 
-    private static final String PROP_DIRECTORY = "configurator.directory";
+    private static final String PROP_DIRECTORY = "configurator.binaries";
 
     private final BundleContext bundleContext;
 
@@ -163,11 +163,11 @@ public class Configurator {
         if ( initial == null ) {
             this.processRemoveBundle(-1);
         } else {
-            // YAML or URLs
+            // JSON or URLs ?
             final Set<String> hashes = new HashSet<>();
             final Map<String, String> files = new TreeMap<>();
 
-            if ( initial.indexOf('\n') == -1 ) {
+            if ( !initial.trim().startsWith("{") ) {
                 // URLs
                 final String[] urls = initial.trim().split(",");
                 for(final String urlString : urls) {
@@ -185,7 +185,7 @@ public class Configurator {
                     }
                 }
             } else {
-                // YAML
+                // JSON
                 hashes.add(Util.getSHA256(initial.trim()));
                 files.put(PROP_INITIAL, initial);
             }

Modified: felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/CoordinatorUtil.java
URL: http://svn.apache.org/viewvc/felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/CoordinatorUtil.java?rev=1778330&r1=1778329&r2=1778330&view=diff
==============================================================================
--- felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/CoordinatorUtil.java
(original)
+++ felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/CoordinatorUtil.java
Wed Jan 11 17:42:51 2017
@@ -21,7 +21,6 @@ package org.apache.felix.configurator.im
 import org.apache.felix.configurator.impl.logger.SystemLogger;
 import org.osgi.service.coordinator.Coordination;
 import org.osgi.service.coordinator.Coordinator;
-import org.osgi.service.coordinator.Participant;
 
 /**
  * Utility class for coordinations
@@ -31,20 +30,7 @@ public class CoordinatorUtil {
     public static Object getOrStartCoordination(final Object object) {
         final Coordinator coordinator = (Coordinator) object;
         final Coordination threadCoordination = coordinator.peek();
-        if ( threadCoordination != null ) {
-            threadCoordination.addParticipant(new Participant() {
-
-                @Override
-                public void failed(final Coordination coordination) throws Exception {
-                    // nothing to do
-                }
-
-                @Override
-                public void ended(final Coordination coordination) throws Exception {
-                    // nothing to do
-                }
-            });
-        } else {
+        if ( threadCoordination == null ) {
             try {
                 return coordinator.create("org.apache.felix.configurator", 0L);
             } catch (final Exception e) {

Modified: felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/json/JSONUtil.java
URL: http://svn.apache.org/viewvc/felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/json/JSONUtil.java?rev=1778330&r1=1778329&r2=1778330&view=diff
==============================================================================
--- felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/json/JSONUtil.java
(original)
+++ felix/trunk/osgi-r7/configurator/src/main/java/org/apache/felix/configurator/impl/json/JSONUtil.java
Wed Jan 11 17:42:51 2017
@@ -49,7 +49,7 @@ public class JSONUtil {
 
     private static final String INTERNAL_PREFIX = ":configurator:";
 
-    private static final String PROP_VERSION = INTERNAL_PREFIX + "version";
+    private static final String PROP_VERSION = INTERNAL_PREFIX + "json-version";
 
     private static final String PROP_ENVIRONMENTS = "environments";
 



Mime
View raw message