brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [18/27] brooklyn-server git commit: address comments on PR in #737
Date Fri, 30 Jun 2017 14:03:06 GMT
address comments on PR in #737


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/0236dbcd
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/0236dbcd
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/0236dbcd

Branch: refs/heads/master
Commit: 0236dbcd5809827c0f2548561c1ddfa5cc26d7a3
Parents: dc4942a
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Wed Jun 28 11:45:28 2017 +0100
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Wed Jun 28 11:45:28 2017 +0100

----------------------------------------------------------------------
 .../BrooklynComponentTemplateResolver.java       |  2 +-
 ...klyn.spi.creation.service.ServiceTypeResolver | 19 -------------------
 .../catalog/internal/BasicBrooklynCatalog.java   |  4 ++--
 .../core/typereg/RegisteredTypeNaming.java       |  9 +++++----
 4 files changed, 8 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/0236dbcd/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/creation/BrooklynComponentTemplateResolver.java
----------------------------------------------------------------------
diff --git a/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/creation/BrooklynComponentTemplateResolver.java
b/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/creation/BrooklynComponentTemplateResolver.java
index ae92c92..abc2e8e 100644
--- a/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/creation/BrooklynComponentTemplateResolver.java
+++ b/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/creation/BrooklynComponentTemplateResolver.java
@@ -76,7 +76,7 @@ import com.google.common.collect.Iterables;
 import com.google.common.collect.Maps;
 
 /**
- * This generates instances of a template resolver that use a {@link ServiceTypeResolver}
+ * This generates instances of a template resolver that use a {@link EntitySpecResolver}
  * to parse the {@code serviceType} line in the template.
  */
 public class BrooklynComponentTemplateResolver {

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/0236dbcd/camp/camp-brooklyn/src/test/resources/META-INF/services/org.apache.brooklyn.camp.brooklyn.spi.creation.service.ServiceTypeResolver
----------------------------------------------------------------------
diff --git a/camp/camp-brooklyn/src/test/resources/META-INF/services/org.apache.brooklyn.camp.brooklyn.spi.creation.service.ServiceTypeResolver
b/camp/camp-brooklyn/src/test/resources/META-INF/services/org.apache.brooklyn.camp.brooklyn.spi.creation.service.ServiceTypeResolver
deleted file mode 100644
index 3bba7fb..0000000
--- a/camp/camp-brooklyn/src/test/resources/META-INF/services/org.apache.brooklyn.camp.brooklyn.spi.creation.service.ServiceTypeResolver
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.brooklyn.camp.brooklyn.spi.creation.service.TestServiceTypeResolver
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/0236dbcd/core/src/main/java/org/apache/brooklyn/core/catalog/internal/BasicBrooklynCatalog.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/catalog/internal/BasicBrooklynCatalog.java
b/core/src/main/java/org/apache/brooklyn/core/catalog/internal/BasicBrooklynCatalog.java
index e4c9882..3817665 100644
--- a/core/src/main/java/org/apache/brooklyn/core/catalog/internal/BasicBrooklynCatalog.java
+++ b/core/src/main/java/org/apache/brooklyn/core/catalog/internal/BasicBrooklynCatalog.java
@@ -908,7 +908,7 @@ public class BasicBrooklynCatalog implements BrooklynCatalog {
             }
             {
                 // legacy routine; should be the same as above code added in 0.12 because:
-                // if type is symbolic_name, the type will match below, and version will
be null so any version allowed to match 
+                // if type is symbolic_name, the type will match above, and version will
be null so any version allowed to match 
                 // if type is symbolic_name:version, the id will match, and the version will
also have to match 
                 // SHOULD NEVER NEED THIS - remove during or after 0.13
                 String typeWithId = type;
@@ -922,7 +922,7 @@ public class BasicBrooklynCatalog implements BrooklynCatalog {
                         if (candidateCiType == candidate.getCatalogItemType() &&
                                 (type.equals(candidate.getSymbolicName()) || type.equals(candidate.getId())))
{
                             if (version==null || version.equals(candidate.getVersion()))
{
-                                log.warn("Lookup of '"+type+"' version '"+version+"' only
worked using legacy routines; please advise Brooklyn community so they understand why");
+                                log.error("Lookup of '"+type+"' version '"+version+"' only
worked using legacy routines; please advise Brooklyn community so they understand why");
                                 // matched - exit
                                 catalogItemType = candidateCiType;
                                 planYaml = candidateYaml;

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/0236dbcd/core/src/main/java/org/apache/brooklyn/core/typereg/RegisteredTypeNaming.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/typereg/RegisteredTypeNaming.java
b/core/src/main/java/org/apache/brooklyn/core/typereg/RegisteredTypeNaming.java
index 22e9e78..8e11ae9 100644
--- a/core/src/main/java/org/apache/brooklyn/core/typereg/RegisteredTypeNaming.java
+++ b/core/src/main/java/org/apache/brooklyn/core/typereg/RegisteredTypeNaming.java
@@ -35,9 +35,9 @@ public class RegisteredTypeNaming {
     public final static String QUALIFIER = OSGI_TOKEN_REGEX;
     public final static String VERSION_REGEX = 
         NUMBER + 
-            "(" + "\\." + NUMBER +  
-                "(" + "\\." + NUMBER +  
-                    "(" + "\\." + QUALIFIER +  
+            "(" + DOT + NUMBER +  
+                "(" + DOT + NUMBER +  
+                    "(" + DOT + QUALIFIER +  
                     ")?" +
                 ")?" +
             ")?";
@@ -49,7 +49,8 @@ public class RegisteredTypeNaming {
     /** 
      * For type names we currently work with any non-empty string that does not contain 
      * a ':' or whitespace or forward slash or backslash.
-     * However we discourage things that are not OSGi symbolic names; see {@link #isValidTypeName(String)}.

+     * However we discourage things that are not OSGi symbolic names; 
+     * see {@link #isGoodTypeName(String)}. 
      * In some places (eg bundles) the use of OSGi symbolic names may be enforced.  
      */
     public static boolean isUsableTypeName(String candidate) {


Mime
View raw message