Conditional bandwidth profile string creation based on parameters
Change-Id: Ia7de8556967e94dcfe3b853c692162ad57653755
diff --git a/.gitignore b/.gitignore
index 8bc2e12..08b0d9e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
.settings
*.swp
*.iml
+.idea/
diff --git a/api/src/main/java/org/opencord/sadis/BandwidthProfileInformation.java b/api/src/main/java/org/opencord/sadis/BandwidthProfileInformation.java
index 3f71d0b..ea9fd31 100644
--- a/api/src/main/java/org/opencord/sadis/BandwidthProfileInformation.java
+++ b/api/src/main/java/org/opencord/sadis/BandwidthProfileInformation.java
@@ -152,12 +152,15 @@
public String toString() {
final StringBuilder sb = new StringBuilder("BandwidthProfileInformation{");
sb.append("id=").append(id);
- sb.append(", peakInformationRate=").append(peakInformationRate);
- sb.append(", peakBurstSize=").append(peakBurstSize);
+ if (peakInformationRate == 0 && peakBurstSize == null) {
+ sb.append(", exceededInformationRate=").append(exceededInformationRate);
+ sb.append(", exceededBurstSize=").append(exceededBurstSize);
+ } else {
+ sb.append(", peakInformationRate=").append(peakInformationRate);
+ sb.append(", peakBurstSize=").append(peakBurstSize);
+ }
sb.append(", committedInformationRate=").append(committedInformationRate);
sb.append(", committedBurstSize=").append(committedBurstSize);
- sb.append(", exceededInformationRate=").append(exceededInformationRate);
- sb.append(", exceededBurstSize=").append(exceededBurstSize);
sb.append(", assuredInformationRate=").append(assuredInformationRate);
sb.append(", guaranteedInformationRate=").append(guaranteedInformationRate);
sb.append('}');