directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r945022 - /directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java
Date Mon, 17 May 2010 08:37:50 GMT
Author: felixk
Date: Mon May 17 08:37:50 2010
New Revision: 945022

URL: http://svn.apache.org/viewvc?rev=945022&view=rev
Log:
- Use more precise type
- Fix ClassCastException (which obviously never happened up to now -> the 'else' statement
never happened to be executed, not even in test cases)

Modified:
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java?rev=945022&r1=945021&r2=945022&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java
(original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java
Mon May 17 08:37:50 2010
@@ -21,6 +21,7 @@
 package org.apache.directory.shared.dsmlv2;
 
 
+import java.util.Arrays;
 import java.util.List;
 
 import javax.xml.transform.Transformer;
@@ -218,7 +219,7 @@ public class ParserUtils
                     controlElement.addAttribute( "criticality", "true" );
                 }
 
-                Object value = control.getValue();
+                byte[] value = control.getValue();
                 
                 if ( value != null )
                 {
@@ -236,7 +237,7 @@ public class ParserUtils
                     }
                     else
                     {
-                        controlElement.addElement( "controlValue" ).setText( ( String ) value
);
+                        controlElement.addElement( "controlValue" ).setText( Arrays.toString(
value ));
                     }
                 }
             }



Mime
View raw message