File tree Expand file tree Collapse file tree 2 files changed +2
-22
lines changed
api/src/main/java/org/apache/cloudstack/api/command/user/vm Expand file tree Collapse file tree 2 files changed +2
-22
lines changed Original file line number Diff line number Diff line change @@ -99,17 +99,7 @@ public Long getServiceOfferingId() {
9999 //it is because details.values() cannot be cast to a map.
100100 //it gives a exception
101101 public Map <String , String > getDetails () {
102- Map <String , String > customparameterMap = new HashMap <String , String >();
103- if (details != null && details .size () != 0 ) {
104- Collection parameterCollection = details .values ();
105- Iterator iter = parameterCollection .iterator ();
106- while (iter .hasNext ()) {
107- HashMap <String , String > value = (HashMap <String , String >)iter .next ();
108- for (String key : value .keySet ()) {
109- customparameterMap .put (key , value .get (key ));
110- }
111- }
112- }
102+ Map <String , String > customparameterMap = convertDetailsToMap (details );
113103
114104 if (shrinkOk != null ) customparameterMap .put (ApiConstants .SHRINK_OK , String .valueOf (isShrinkOk ()));
115105 if (autoMigrate != null ) customparameterMap .put (ApiConstants .AUTO_MIGRATE , String .valueOf (getAutoMigrate ()));
Original file line number Diff line number Diff line change @@ -95,17 +95,7 @@ public Long getServiceOfferingId() {
9595 }
9696
9797 public Map <String , String > getDetails () {
98- Map <String , String > customparameterMap = new HashMap <String , String >();
99- if (details != null && details .size () != 0 ) {
100- Collection parameterCollection = details .values ();
101- Iterator iter = parameterCollection .iterator ();
102- while (iter .hasNext ()) {
103- HashMap <String , String > value = (HashMap <String , String >)iter .next ();
104- for (String key : value .keySet ()) {
105- customparameterMap .put (key , value .get (key ));
106- }
107- }
108- }
98+ Map <String , String > customparameterMap = convertDetailsToMap (details );
10999
110100 if (shrinkOk != null ) customparameterMap .put (ApiConstants .SHRINK_OK , String .valueOf (isShrinkOk ()));
111101 if (autoMigrate != null ) customparameterMap .put (ApiConstants .AUTO_MIGRATE , String .valueOf (getAutoMigrate ()));
You can’t perform that action at this time.
0 commit comments