java/code/src/com/redhat/rhn/manager/audit/AuditManager.java | 37 +++++------
1 file changed, 20 insertions(+), 17 deletions(-)
New commits:
commit 4531e96e8a2d5b6bed5c9598e9d8810932310f8d
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Dec 21 16:10:29 2009 +0100
549391 - ISE when audit searching without any machine information
just adding a check for null return value
diff --git a/java/code/src/com/redhat/rhn/manager/audit/AuditManager.java
b/java/code/src/com/redhat/rhn/manager/audit/AuditManager.java
index 82b154c..85ae7ae 100644
--- a/java/code/src/com/redhat/rhn/manager/audit/AuditManager.java
+++ b/java/code/src/com/redhat/rhn/manager/audit/AuditManager.java
@@ -97,26 +97,29 @@ public class AuditManager /* extends BaseManager */ {
}
try {
- for (AuditReviewDto aureview : getMachineReviewSections(machine)) {
- fileStart = aureview.getStart().getTime();
- fileEnd = aureview.getEnd().getTime();
-
- if (fileEnd < start || fileStart > end) {
- continue;
- }
+ DataResult<AuditReviewDto> aureviewsections =
getMachineReviewSections(machine);
+ if (aureviewsections != null) {
+ for (AuditReviewDto aureview : getMachineReviewSections(machine)) {
+ fileStart = aureview.getStart().getTime();
+ fileEnd = aureview.getEnd().getTime();
+
+ if (fileEnd < start || fileStart > end) {
+ continue;
+ }
- File auditLog = new File(
- logDirStr + "/" + aureview.getName() +
"/audit/audit-" +
- (fileStart / 1000) + "-" +
- (fileEnd / 1000) + ".parsed");
+ File auditLog = new File(
+ logDirStr + "/" + aureview.getName() +
"/audit/audit-" +
+ (fileStart / 1000) + "-" +
+ (fileEnd / 1000) + ".parsed");
- l = readAuditFile(auditLog, types, start, end);
+ l = readAuditFile(auditLog, types, start, end);
- if (dr == null) {
- dr = new DataResult(l);
- }
- else {
- dr.addAll(l);
+ if (dr == null) {
+ dr = new DataResult(l);
+ }
+ else {
+ dr.addAll(l);
+ }
}
}
}
Show replies by date