Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
BUG 388: corrected media type in /operations resource
[controller.git]
/
opendaylight
/
md-sal
/
sal-rest-connector
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
sal
/
rest
/
impl
/
JsonMapper.java
diff --git
a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/JsonMapper.java
b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/JsonMapper.java
index ca318e4f3692d28da298810d0b4ff7272bc4f615..226eff44e133a7ad311253740d6d77ea28a1d411 100644
(file)
--- a/
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/JsonMapper.java
+++ b/
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/JsonMapper.java
@@
-252,14
+252,18
@@
class JsonMapper {
result.append("/");
writeModuleNameAndIdentifier(result, identityValue);
result.append("/");
writeModuleNameAndIdentifier(result, identityValue);
- if (identityValue.getPredicates() != null) {
+ if (identityValue.getPredicates() != null
&& !identityValue.getPredicates().isEmpty()
) {
for (Predicate predicate : identityValue.getPredicates()) {
IdentityValue identityValuePredicate = predicate.getName();
result.append("[");
for (Predicate predicate : identityValue.getPredicates()) {
IdentityValue identityValuePredicate = predicate.getName();
result.append("[");
- writeModuleNameAndIdentifier(result, identityValuePredicate);
- result.append("=\"");
+ if (identityValuePredicate == null) {
+ result.append(".");
+ } else {
+ writeModuleNameAndIdentifier(result, identityValuePredicate);
+ }
+ result.append("='");
result.append(predicate.getValue());
result.append(predicate.getValue());
- result.append("
\"
");
+ result.append("
'
");
result.append("]");
}
}
result.append("]");
}
}