modules/core/domain/src/main/java/org/rhq/core/domain/criteria/Criteria.java | 17 ++++++---
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/group/inventory/AddGroupResourcesFormPrepareAction.java | 5 ++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java | 8 ++--
modules/plugins/netservices/pom.xml | 18 +++++++---
4 files changed, 34 insertions(+), 14 deletions(-)
New commits:
commit 3e1622402c2fa5724f505065c5b89512fa7da664
Merge: 59a906f... a986379...
Author: Partha Aji <paji(a)redhat.com>
Date: Thu Feb 25 10:19:20 2010 -0500
Merge branch 'linux-config' into ldap
commit a98637975ee9a36b3c1ef1574bed5a5b947bdc78
Merge: 073abeb... 3705350...
Author: Partha Aji <paji(a)redhat.com>
Date: Thu Feb 25 10:19:06 2010 -0500
Merge branch 'master' into linux-config
commit 37053500c05ec42b23740e4612899f2c56a21864
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Feb 25 11:27:51 2010 +0100
BZ 568275 - add commons-codec which is needed with commons-httpclient 3
diff --git a/modules/plugins/netservices/pom.xml b/modules/plugins/netservices/pom.xml
index 58087fa..06ae2ae 100644
--- a/modules/plugins/netservices/pom.xml
+++ b/modules/plugins/netservices/pom.xml
@@ -33,6 +33,11 @@
<artifactId>commons-httpclient</artifactId>
<version>3.0.1</version>
</dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.2</version>
+ </dependency>
</dependencies>
@@ -58,6 +63,11 @@
<artifactId>commons-httpclient</artifactId>
<version>3.0.1</version>
</artifactItem>
+ <artifactItem>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.2</version>
+ </artifactItem>
</artifactItems>
<outputDirectory>${project.build.outputDirectory}/lib</outputDirectory>
</configuration>
@@ -202,13 +212,13 @@
<id>deploy-jar-meta-inf</id>
<phase>package</phase>
<configuration>
- <tasks>
- <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <tasks>
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
<echo>*** Updating META-INF dir in ${deployment.file}...</echo>
<unjar src="${project.build.directory}/${project.build.finalName}.jar" dest="${project.build.outputDirectory}">
<patternset><include name="META-INF/**" /></patternset>
</unjar>
- <jar destfile="${deployment.file}" manifest="${project.build.outputDirectory}/META-INF/MANIFEST.MF" update="true">
+ <jar destfile="${deployment.file}" manifest="${project.build.outputDirectory}/META-INF/MANIFEST.MF" update="true">
</jar>
</tasks>
</configuration>
@@ -216,7 +226,7 @@
<goal>run</goal>
</goals>
</execution>
-
+
<execution>
<id>undeploy</id>
<phase>clean</phase>
commit b32fab5ccf90e3f6bc5c9c16e78daeb069f62675
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Feb 25 10:59:56 2010 +0100
Persisting a new resource is no error ...
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
index 6755733..3af7a35 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
@@ -188,7 +188,7 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
}
entityManager.persist(resource);
- log.error("********* resource persisted ************");
+ log.debug("********* resource persisted ************");
// Execute sub-methods as overlord to bypass additional security checks.
Subject overlord = this.subjectManager.getOverlord();
updateImplicitMembership(overlord, resource);
@@ -366,7 +366,7 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
PluginConfigurationUpdate.QUERY_DELETE_BY_RESOURCES_0,
PluginConfigurationUpdate.QUERY_DELETE_BY_RESOURCES_1, // first delete the config objects
PluginConfigurationUpdate.QUERY_DELETE_BY_RESOURCES_2, // then the history objects wrapping those configs
- AlertConditionLog.QUERY_DELETE_BY_RESOURCES, // Don't
+ AlertConditionLog.QUERY_DELETE_BY_RESOURCES, // Don't
AlertNotificationLog.QUERY_DELETE_BY_RESOURCES, // alter
Alert.QUERY_DELETE_BY_RESOURCES, // order
AlertCondition.QUERY_DELETE_BY_RESOURCES, // of
@@ -2134,7 +2134,7 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
parent = null;
break;
}
-
+
} while (parent != null);
if (resource != null) {
if (!authorizationManager.canViewResource(subject, resource.getId())) {
@@ -2164,7 +2164,7 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
public <T> ResourceNamesDisambiguationResult<T> disambiguate(List<T> results, boolean alwaysIncludeParent,
IntExtractor<? super T> extractor) {
-
+
if (results.isEmpty()) {
return new ResourceNamesDisambiguationResult<T>(new ArrayList<DisambiguationReport<T>>(), false, false,
false);
commit 810993311fa5e22495be1eb9cfebb154a0e3a3ef
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Feb 24 12:21:24 2010 -0500
don't bother looping/logging if debug not enabled.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/Criteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/Criteria.java
index ef27906..dd943e0 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/Criteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/Criteria.java
@@ -125,8 +125,11 @@ public abstract class Criteria implements Serializable {
results.put(getCleansedFieldName(filterField, 6), filterFieldValue);
}
}
- for (Map.Entry<String, Object> entries : results.entrySet()) {
- LOG.debug("Filter: (" + entries.getKey() + ", " + entries.getValue() + ")");
+
+ if (LOG.isDebugEnabled()) {
+ for (Map.Entry<String, Object> entries : results.entrySet()) {
+ LOG.debug("Filter: (" + entries.getKey() + ", " + entries.getValue() + ")");
+ }
}
return results;
}
@@ -160,8 +163,10 @@ public abstract class Criteria implements Serializable {
}
}
}
- for (String entry : results) {
- LOG.debug("Fetch: (" + entry + ")");
+ if (LOG.isDebugEnabled()) {
+ for (String entry : results) {
+ LOG.debug("Fetch: (" + entry + ")");
+ }
}
return results;
}
@@ -283,7 +288,9 @@ public abstract class Criteria implements Serializable {
}
}
}
- LOG.debug("Page Control: " + pc);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Page Control: " + pc);
+ }
return pc;
}
commit 7f4d76951a1e2686aa4d104477765d9b4d350dad
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed Feb 24 18:13:05 2010 +0100
BZ 566749 - fixing the NPE when adding platforms (that don't have a parent) to a resource group.
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/group/inventory/AddGroupResourcesFormPrepareAction.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/group/inventory/AddGroupResourcesFormPrepareAction.java
index 698cb5a..808f331 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/group/inventory/AddGroupResourcesFormPrepareAction.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/group/inventory/AddGroupResourcesFormPrepareAction.java
@@ -201,7 +201,10 @@ public class AddGroupResourcesFormPrepareAction extends Action {
Resource resource = dr.getOriginal();
Resource parent = resource.getParentResource();
- parent.setName(buildLineage(dr.getParents()));
+ //platforms don't have parents, need to check for null here
+ if (parent != null) {
+ parent.setName(buildLineage(dr.getParents()));
+ }
convertedResults.add(resource);
}