From 310df200f78f7d98cc52e4ab97d8a5feb744fa52 Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 28 Apr 2016 09:04:35 +0000
Subject: [PATCH] UCDetector and AutoRefactor code cleanup
---
opendj-server-legacy/src/main/java/org/opends/server/tools/makeldif/TemplateEntry.java | 30 +++++++-----------------------
1 files changed, 7 insertions(+), 23 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tools/makeldif/TemplateEntry.java b/opendj-server-legacy/src/main/java/org/opends/server/tools/makeldif/TemplateEntry.java
index cd2c7f5..a030a66 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/tools/makeldif/TemplateEntry.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/tools/makeldif/TemplateEntry.java
@@ -44,11 +44,11 @@
public class TemplateEntry
{
/** The branch used to generate this entry (if it is associated with a branch). */
- private Branch branch;
+ private final Branch branch;
/** The DN for this template entry, if it is known. */
private DN dn;
/** The DN of the parent entry for this template entry, if it is available. */
- private DN parentDN;
+ private final DN parentDN;
/**
* The set of attributes associated with this template entry, mapped from the
@@ -57,7 +57,7 @@
private final LinkedHashMap<AttributeType, ArrayList<TemplateValue>> attributes = new LinkedHashMap<>();
/** The template used to generate this entry (if it is associated with a template). */
- private Template template;
+ private final Template template;
/**
@@ -69,8 +69,9 @@
public TemplateEntry(Branch branch)
{
this.branch = branch;
-
dn = branch.getBranchDN();
+ template = null;
+ parentDN = null;
}
@@ -84,6 +85,8 @@
*/
public TemplateEntry(Template template, DN parentDN)
{
+ this.branch = null;
+ dn = null;
this.template = template;
this.parentDN = parentDN;
}
@@ -158,25 +161,6 @@
return dn;
}
-
-
- /**
- * Indicates whether this entry contains one or more values for the specified
- * attribute type.
- *
- * @param attributeType The attribute type for which to make the
- * determination.
- *
- * @return <CODE>true</CODE> if this entry contains one or more values for
- * the specified attribute type, or <CODE>false</CODE> if not.
- */
- public boolean hasAttribute(AttributeType attributeType)
- {
- return attributes.containsKey(attributeType);
- }
-
-
-
/**
* Retrieves the value for the specified attribute, if defined. If the
* specified attribute has multiple values, then the first will be returned.
--
Gitblit v1.10.0