You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2014/02/20 20:17:12 UTC
[06/50] [abbrv] git commit: updated refs/heads/ui-restyle to c64bfa5
Fix functional issue introduced by some findbug changes.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/443acac9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/443acac9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/443acac9
Branch: refs/heads/ui-restyle
Commit: 443acac92792cbffff2654c3414df276efac404f
Parents: 97bad4f
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Fri Feb 14 18:36:18 2014 +0100
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Fri Feb 14 18:37:47 2014 +0100
----------------------------------------------------------------------
.../src/com/cloud/utils/db/GenericDaoBase.java | 28 ++++++++++----------
1 file changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/443acac9/framework/db/src/com/cloud/utils/db/GenericDaoBase.java
----------------------------------------------------------------------
diff --git a/framework/db/src/com/cloud/utils/db/GenericDaoBase.java b/framework/db/src/com/cloud/utils/db/GenericDaoBase.java
index d929e00..9f18c34 100755
--- a/framework/db/src/com/cloud/utils/db/GenericDaoBase.java
+++ b/framework/db/src/com/cloud/utils/db/GenericDaoBase.java
@@ -554,7 +554,7 @@ public abstract class GenericDaoBase<T, ID extends Serializable> extends Compone
final Enum<?>[] enums = (Enum<?>[])field.getType().getEnumConstants();
for (final Enum<?> e : enums) {
if ((enumType == EnumType.STRING && e.name().equalsIgnoreCase(rs.getString(index))) ||
- (enumType == EnumType.ORDINAL && e.ordinal() == rs.getInt(index))) {
+ (enumType == EnumType.ORDINAL && e.ordinal() == rs.getInt(index))) {
field.set(entity, e);
return;
}
@@ -768,7 +768,7 @@ public abstract class GenericDaoBase<T, ID extends Serializable> extends Compone
protected int addJoinAttributes(int count, PreparedStatement pstmt, Collection<JoinBuilder<SearchCriteria<?>>> joins) throws SQLException {
for (JoinBuilder<SearchCriteria<?>> join : joins) {
for (final Pair<Attribute, Object> value : join.getT().getValues()) {
- prepareAttribute(++count, pstmt, value.first(), value.second());
+ prepareAttribute(count++, pstmt, value.first(), value.second());
}
}
@@ -1255,18 +1255,18 @@ public abstract class GenericDaoBase<T, ID extends Serializable> extends Compone
for (JoinBuilder<SearchCriteria<?>> join : joins) {
StringBuilder onClause = new StringBuilder();
onClause.append(" ")
- .append(join.getType().getName())
- .append(" ")
- .append(join.getSecondAttribute().table)
- .append(" ON ")
- .append(join.getFirstAttribute().table)
- .append(".")
- .append(join.getFirstAttribute().columnName)
- .append("=")
- .append(join.getSecondAttribute().table)
- .append(".")
- .append(join.getSecondAttribute().columnName)
- .append(" ");
+ .append(join.getType().getName())
+ .append(" ")
+ .append(join.getSecondAttribute().table)
+ .append(" ON ")
+ .append(join.getFirstAttribute().table)
+ .append(".")
+ .append(join.getFirstAttribute().columnName)
+ .append("=")
+ .append(join.getSecondAttribute().table)
+ .append(".")
+ .append(join.getSecondAttribute().columnName)
+ .append(" ");
str.insert(fromIndex, onClause);
String whereClause = join.getT().getWhereClause();
if ((whereClause != null) && !"".equals(whereClause)) {