From 54cea43e8970c0c8175d9ccceea7e26453855be2 Mon Sep 17 00:00:00 2001
From: Chris Ridd <chris.ridd@forgerock.com>
Date: Wed, 08 Aug 2012 08:07:09 +0000
Subject: [PATCH] Address overlooked review comments
---
opendj-sdk/opends/src/server/org/opends/server/schema/JPEGSyntax.java | 23 +++++------------------
1 files changed, 5 insertions(+), 18 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/JPEGSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/JPEGSyntax.java
index 9a45270..19e38e6 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/JPEGSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/JPEGSyntax.java
@@ -64,9 +64,6 @@
extends AttributeSyntax<JPEGAttributeSyntaxCfg>
implements ConfigurationChangeListener<JPEGAttributeSyntaxCfg>
{
- // Indicates whether this syntax should operate in strict mode.
- private boolean strictMode;
-
// The default equality matching rule for this syntax.
private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -77,7 +74,7 @@
private SubstringMatchingRule defaultSubstringMatchingRule;
// The current configuration for this JPEG syntax.
- private JPEGAttributeSyntaxCfg currentConfig;
+ private volatile JPEGAttributeSyntaxCfg config;
@@ -124,16 +121,8 @@
SMR_OCTET_STRING_OID, SYNTAX_JPEG_NAME));
}
- // We may or may not have access to the config entry. If we do, then see if
- // we should use the strict compliance mode. If not, just assume that we
- // won't.
- strictMode = false;
- if (configuration != null)
- {
- currentConfig = configuration;
- currentConfig.addJPEGChangeListener(this);
- strictMode = currentConfig.isStrictFormat();
- }
+ this.config = configuration;
+ config.addJPEGChangeListener(this);
}
@@ -251,7 +240,7 @@
MessageBuilder invalidReason)
{
// anything is acceptable if we're not strict.
- if (strictMode == false)
+ if (!config.isStrictFormat())
return true;
/* JFIF files start:
@@ -304,9 +293,7 @@
public ConfigChangeResult applyConfigurationChange(
JPEGAttributeSyntaxCfg configuration)
{
- currentConfig = configuration;
- strictMode = configuration.isStrictFormat();
-
+ this.config = configuration;
return new ConfigChangeResult(ResultCode.SUCCESS, false);
}
--
Gitblit v1.10.0