From f4599e9caf16e855202490b72e3846d01537d195 Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Tue, 29 Jul 2008 10:20:29 +0000
Subject: [PATCH] Fix possible null pointer dereferencing and missing initialization
---
opends/src/messages/src/org/opends/messages/MessageDescriptor.java | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/opends/src/messages/src/org/opends/messages/MessageDescriptor.java b/opends/src/messages/src/org/opends/messages/MessageDescriptor.java
index 6787a26..aafd713 100644
--- a/opends/src/messages/src/org/opends/messages/MessageDescriptor.java
+++ b/opends/src/messages/src/org/opends/messages/MessageDescriptor.java
@@ -996,7 +996,7 @@
Severity severity) {
super(null, null, category, severity, null, null);
this.formatString = formatString != null ? formatString.toString() : "";
- this.requiresFormatter = formatString.toString().matches(".*%.*");
+ this.requiresFormatter = this.formatString.matches(".*%.*");
}
/**
@@ -1009,6 +1009,7 @@
Raw(CharSequence formatString, int mask, Severity severity) {
super(null, null, mask, severity, null, null);
this.formatString = formatString != null ? formatString.toString() : "";
+ this.requiresFormatter = this.formatString.matches(".*%.*");
}
/**
--
Gitblit v1.10.0