Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2 server/src/com/cloud/deploy/FirstFitPlanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ private void reorderClustersBasedOnImplicitTags(List<Long> clusterList, int requ
final HashMap<Long, Long> UniqueTagsInClusterMap = new HashMap<Long, Long>();
Long uniqueTags;
for (Long clusterId : clusterList) {
uniqueTags = (long) 0;
uniqueTags = 0L;
List<Long> hostList = capacityDao.listHostsWithEnoughCapacity(requiredCpu, requiredRam, clusterId, Host.Type.Routing.toString());
if (!hostList.isEmpty() && implicitHostTags.length > 0) {
uniqueTags = new Long(hostTagsDao.getDistinctImplicitHostTags(hostList, implicitHostTags).size());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,22 @@
import com.cloud.consoleproxy.util.Logger;

public class ConsoleProxyHttpHandlerHelper {
private static final Logger s_logger = Logger.getLogger(ConsoleProxyHttpHandlerHelper.class);

- private static final Logger s_logger = Logger.getLogger(ConsoleProxyHttpHandlerHelper.class);
- private static final String EQUALS = "=";

public static Map<String, String> getQueryMap(String query) {
String[] params = query.split("&");
Map<String, String> map = new HashMap<String, String>();
for (String param : params) {
String[] paramTokens = param.split("=");
String[] paramTokens = param.split(EQUALS);
if (paramTokens != null && paramTokens.length == 2) {
String name = param.split("=")[0];
String value = param.split("=")[1];
String name = param.split(EQUALS)[0];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be also simplified to paramTokens[0]

String value = param.split(EQUALS)[1];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be also simplified to paramTokens[1]

map.put(name, value);
} else if (paramTokens.length == 3) {
// very ugly, added for Xen tunneling url
String name = paramTokens[0];
String value = paramTokens[1] + "=" + paramTokens[2];
String value = paramTokens[1] + EQUALS + paramTokens[2];
map.put(name, value);
} else {
if (s_logger.isDebugEnabled())
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.