Skip to content

Commit 0236dbc

Browse files
committed
address comments on PR in #737
1 parent dc4942a commit 0236dbc

4 files changed

Lines changed: 8 additions & 26 deletions

File tree

camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/creation/BrooklynComponentTemplateResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
import com.google.common.collect.Maps;
7777

7878
/**
79-
* This generates instances of a template resolver that use a {@link ServiceTypeResolver}
79+
* This generates instances of a template resolver that use a {@link EntitySpecResolver}
8080
* to parse the {@code serviceType} line in the template.
8181
*/
8282
public class BrooklynComponentTemplateResolver {

camp/camp-brooklyn/src/test/resources/META-INF/services/org.apache.brooklyn.camp.brooklyn.spi.creation.service.ServiceTypeResolver

Lines changed: 0 additions & 19 deletions
This file was deleted.

core/src/main/java/org/apache/brooklyn/core/catalog/internal/BasicBrooklynCatalog.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ private boolean attemptType(String key, CatalogItemType candidateCiType) {
908908
}
909909
{
910910
// legacy routine; should be the same as above code added in 0.12 because:
911-
// if type is symbolic_name, the type will match below, and version will be null so any version allowed to match
911+
// if type is symbolic_name, the type will match above, and version will be null so any version allowed to match
912912
// if type is symbolic_name:version, the id will match, and the version will also have to match
913913
// SHOULD NEVER NEED THIS - remove during or after 0.13
914914
String typeWithId = type;
@@ -922,7 +922,7 @@ private boolean attemptType(String key, CatalogItemType candidateCiType) {
922922
if (candidateCiType == candidate.getCatalogItemType() &&
923923
(type.equals(candidate.getSymbolicName()) || type.equals(candidate.getId()))) {
924924
if (version==null || version.equals(candidate.getVersion())) {
925-
log.warn("Lookup of '"+type+"' version '"+version+"' only worked using legacy routines; please advise Brooklyn community so they understand why");
925+
log.error("Lookup of '"+type+"' version '"+version+"' only worked using legacy routines; please advise Brooklyn community so they understand why");
926926
// matched - exit
927927
catalogItemType = candidateCiType;
928928
planYaml = candidateYaml;

core/src/main/java/org/apache/brooklyn/core/typereg/RegisteredTypeNaming.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ public class RegisteredTypeNaming {
3535
public final static String QUALIFIER = OSGI_TOKEN_REGEX;
3636
public final static String VERSION_REGEX =
3737
NUMBER +
38-
"(" + "\\." + NUMBER +
39-
"(" + "\\." + NUMBER +
40-
"(" + "\\." + QUALIFIER +
38+
"(" + DOT + NUMBER +
39+
"(" + DOT + NUMBER +
40+
"(" + DOT + QUALIFIER +
4141
")?" +
4242
")?" +
4343
")?";
@@ -49,7 +49,8 @@ private static boolean isUsable(String candidate) {
4949
/**
5050
* For type names we currently work with any non-empty string that does not contain
5151
* a ':' or whitespace or forward slash or backslash.
52-
* However we discourage things that are not OSGi symbolic names; see {@link #isValidTypeName(String)}.
52+
* However we discourage things that are not OSGi symbolic names;
53+
* see {@link #isGoodTypeName(String)}.
5354
* In some places (eg bundles) the use of OSGi symbolic names may be enforced.
5455
*/
5556
public static boolean isUsableTypeName(String candidate) {

0 commit comments

Comments
 (0)