directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Knecht <fel...@apache.org>
Subject Re: svn commit: r709903 - in /directory/shared/trunk/ldap/src: main/java/org/apache/directory/shared/ldap/schema/BooleanNormalizer.java test/java/org/apache/directory/shared/ldap/schema/BooleanNormalizerTest.java
Date Mon, 03 Nov 2008 11:47:03 GMT
Kiran Ayyagari schrieb:
> hi Felix,
>
>   The return type can also vary so we have to either return Object (
> the current
>   case) or may be we can return Value<T> instead just like the way
> Emmanuel
>   proposed to accept Value<T> as a parameter

Hmmm. I realize, that the discussion is getting deeper than what I
actually meant (but that's ok ;-) ).

Trying to make it clearer what I meant in the beginning:
For some Normalizer implementation it's absolutely clear, what kind of
type is returned for others not. Being as specific as possible why can't
we return the specific type when it's clearly defined within the method?
For all the others I agree with the Value<T> as we can be more specific.

I sorted out some of them below (and test are running fine, including
-Dintegration):

Index:
ldap/src/main/java/org/apache/directory/shared/ldap/schema/NumericNormalizer.java
===================================================================
---
ldap/src/main/java/org/apache/directory/shared/ldap/schema/NumericNormalizer.java  
(revision 710036)
+++
ldap/src/main/java/org/apache/directory/shared/ldap/schema/NumericNormalizer.java  
(working copy)
@@ -36,7 +36,7 @@
 {
    static final long serialVersionUID = 1L;

-   public Object normalize( Object value ) throws NamingException
+   public String normalize( Object value ) throws NamingException
    {
        try
        {
Index:
ldap/src/main/java/org/apache/directory/shared/ldap/schema/DeepTrimNormalizer.java
===================================================================
---
ldap/src/main/java/org/apache/directory/shared/ldap/schema/DeepTrimNormalizer.java 
(revision 710036)
+++
ldap/src/main/java/org/apache/directory/shared/ldap/schema/DeepTrimNormalizer.java 
(working copy)
@@ -39,7 +39,7 @@
 {
    private static final long serialVersionUID = 1L;

-   public Object normalize( Object value ) throws NamingException
+   public String normalize( Object value ) throws NamingException
    {
        try
        {
Index:
ldap/src/main/java/org/apache/directory/shared/ldap/schema/BooleanNormalizer.java
===================================================================
---
ldap/src/main/java/org/apache/directory/shared/ldap/schema/BooleanNormalizer.java  
(revision 710036)
+++
ldap/src/main/java/org/apache/directory/shared/ldap/schema/BooleanNormalizer.java  
(working copy)
@@ -37,7 +37,7 @@
     private static final long serialVersionUID = 1L;


-    public Object normalize( Object value ) throws NamingException
+    public String normalize( Object value ) throws NamingException
     {
         if ( value == null )
         {


Felix

Mime
View raw message